Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "basyx-typescript-sdk",
"version": "0.1.7",
"description": "BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)",
"type": "module",
"main": "bundle/index.js",
"exports": {
".": {
Expand Down Expand Up @@ -36,7 +37,6 @@
"devDependencies": {
"@aas-core-works/aas-core3.0-typescript": "^1.0.3",
"@hey-api/openapi-ts": "^0.64.1",
"@rollup/plugin-commonjs": "^28.0.2",
"@rollup/plugin-node-resolve": "^16.0.0",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.7",
Expand Down
8 changes: 1 addition & 7 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';

export default {
// Use your compiled entry point from the dist folder
input: 'dist/index.js',
output: {
file: 'bundle/index.js',
format: 'esm',
sourcemap: true,
},
plugins: [
resolve(), // helps Rollup find node_modules packages
commonjs(), // converts CommonJS modules to ES6, so they can be included in a Rollup bundle
],
// Externalize dependencies that shouldn't be bundled
plugins: [resolve()],
external: ['@aas-core-works/aas-core3.0-typescript', '@hey-api/client-fetch'],
};
10 changes: 5 additions & 5 deletions src/clients/AasRepositoryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import type {
AssetInformation,
Reference,
} from '@aas-core-works/aas-core3.0-typescript/types';
import * as AasRepository from '../generated';
import { AssetinformationThumbnailBody } from '../generated/types.gen';
import * as AasRepository from '../generated/index.ts';
import { AssetinformationThumbnailBody } from '../generated/types.gen.ts';
import {
convertApiAasToCoreAas,
convertApiAssetInformationToCoreAssetInformation,
convertApiReferenceToCoreReference,
convertCoreAasToApiAas,
convertCoreAssetInformationToApiAssetInformation,
convertCoreReferenceToApiReference,
} from '../lib/convertAasTypes';
import { createCustomClient } from '../lib/createAasRepoClient';
import { GetAllAssetAdministrationShellsResponse, getAllSubmodelReferencesResponse } from '../models/aas-repository';
} from '../lib/convertAasTypes.ts';
import { createCustomClient } from '../lib/createAasRepoClient.ts';
import { GetAllAssetAdministrationShellsResponse, getAllSubmodelReferencesResponse } from '../models/aas-repository.ts';

export class AasRepositoryClient {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/clients/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { AasRepositoryClient } from './AasRepositoryClient';
export { AasRepositoryClient } from './AasRepositoryClient.ts';
4 changes: 2 additions & 2 deletions src/generated/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This file is auto-generated by @hey-api/openapi-ts
export * from './types.gen';
export * from './sdk.gen';
export * from './types.gen.ts';
export * from './sdk.gen.ts';
2 changes: 1 addition & 1 deletion src/generated/sdk.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ import type {
GetDescriptionData,
GetDescriptionResponse,
GetDescriptionError,
} from './types.gen';
} from './types.gen.ts';

export const client = createClient(createConfig());

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './clients';
export * from './clients/index.ts';
2 changes: 1 addition & 1 deletion src/lib/convertAasTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
AssetAdministrationShell as ApiAssetAdministrationShell,
AssetInformation as ApiAssetInformation,
Reference as ApiReference,
} from '../generated/types.gen';
} from '../generated/types.gen.ts';

/**
* Convert an API AssetAdministrationShell to a Core Works AssetAdministrationShell
Expand Down
2 changes: 1 addition & 1 deletion src/models/aas-repository.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AssetAdministrationShell, Reference } from '@aas-core-works/aas-core3.0-typescript/types';
import type { PagedResultPagingMetadata } from '../generated/types.gen';
import type { PagedResultPagingMetadata } from '../generated/types.gen.ts';

export interface GetAllAssetAdministrationShellsResponse {
pagedResult: PagedResultPagingMetadata | undefined;
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"strict": true,
"esModuleInterop": true,
"baseUrl": ".",
"allowImportingTsExtensions": true,
"emitDeclarationOnly": true,
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "**/*.test.ts", "src/generated/**/*"]
Expand Down
41 changes: 2 additions & 39 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280"
integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==

"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.5.0":
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
Expand Down Expand Up @@ -686,19 +686,6 @@
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==

"@rollup/plugin-commonjs@^28.0.2":
version "28.0.2"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.2.tgz#193d7a86470f112b56927c1d821ee45951a819ea"
integrity sha512-BEFI2EDqzl+vA1rl97IDRZ61AIwGH093d9nz8+dThxJNH8oSoB7MjWvPCX3dkaK1/RCJ/1v/R1XB15FuSs0fQw==
dependencies:
"@rollup/pluginutils" "^5.0.1"
commondir "^1.0.1"
estree-walker "^2.0.2"
fdir "^6.2.0"
is-reference "1.2.1"
magic-string "^0.30.3"
picomatch "^4.0.2"

"@rollup/plugin-node-resolve@^16.0.0":
version "16.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.0.tgz#b1a0594661f40d7b061d82136e847354ff85f211"
Expand Down Expand Up @@ -886,7 +873,7 @@
dependencies:
"@babel/types" "^7.20.7"

"@types/estree@*", "@types/estree@1.0.6", "@types/estree@^1.0.0", "@types/estree@^1.0.6":
"@types/estree@1.0.6", "@types/estree@^1.0.0", "@types/estree@^1.0.6":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
Expand Down Expand Up @@ -1361,11 +1348,6 @@ commander@^12.0.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3"
integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand Down Expand Up @@ -1719,11 +1701,6 @@ fb-watchman@^2.0.0:
dependencies:
bser "2.1.1"

fdir@^6.2.0:
version "6.4.3"
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.3.tgz#011cdacf837eca9b811c89dbb902df714273db72"
integrity sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==

file-entry-cache@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f"
Expand Down Expand Up @@ -2012,13 +1989,6 @@ is-number@^7.0.0:
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==

is-reference@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
dependencies:
"@types/estree" "*"

is-stream@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077"
Expand Down Expand Up @@ -2580,13 +2550,6 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"

magic-string@^0.30.3:
version "0.30.17"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453"
integrity sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==
dependencies:
"@jridgewell/sourcemap-codec" "^1.5.0"

make-dir@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e"
Expand Down