File tree Expand file tree Collapse file tree 5 files changed +114
-187
lines changed Expand file tree Collapse file tree 5 files changed +114
-187
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to npm
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ publish :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - name : Checkout repository
13
+ uses : actions/checkout@v3
14
+
15
+ - name : Set up Node.js
16
+ uses : actions/setup-node@v4
17
+ with :
18
+ node-version : ' 22'
19
+ registry-url : ' https://registry.npmjs.org/'
20
+
21
+ - name : Install Yarn
22
+ run : npm install -g yarn
23
+
24
+ - name : Install dependencies
25
+ run : yarn install
26
+
27
+ - name : Lint code
28
+ run : yarn lint:check
29
+
30
+ - name : Run tests
31
+ run : yarn test
32
+
33
+ - name : Update package.json version
34
+ id : version
35
+ run : |
36
+ # Extract the version from the release tag
37
+ TAG_VERSION=${GITHUB_REF#refs/tags/}
38
+ VERSION=${TAG_VERSION#v} # Remove 'v' prefix if present
39
+
40
+ # Update package.json version
41
+ yarn version --new-version $VERSION --no-git-tag-version
42
+
43
+ # Output the version for later steps
44
+ echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV
45
+ env :
46
+ GITHUB_REF : ${{ github.ref }}
47
+
48
+ - name : Commit updated package.json
49
+ run : |
50
+ git config user.name "github-actions[bot]"
51
+ git config user.email "github-actions[bot]@users.noreply.github.com"
52
+ git add package.json yarn.lock
53
+ git commit -m "chore: update package.json to version $PACKAGE_VERSION" || echo "No changes to commit"
54
+ git push origin ${{ github.ref }} || echo "Nothing to push"
55
+
56
+ # 8. Build the project
57
+ - name : Build project
58
+ run : yarn build
59
+
60
+ # 9. Publish to npm
61
+ - name : Publish to npm
62
+ run : yarn publish
63
+ env :
64
+ NODE_AUTH_TOKEN : ${{ secrets.NPMJS_TOKEN }}
Original file line number Diff line number Diff line change 1
1
# basyx-typescript-sdk
2
+
2
3
BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)
4
+
5
+ ## Features
6
+
7
+ Clients for the AAS API components:
8
+ - AAS Repository
9
+ - Submodel Repository (coming soon)
10
+ - Concept Description Repository (coming soon)
11
+ - AAS Registry (coming soon)
12
+ - Submodel Registry (coming soon)
13
+ - AAS Discovery Service (coming soon)
14
+ - AASX File Service (coming soon)
15
+
16
+ Utility functions for working with AAS data:
17
+ - Coming soon
18
+
19
+ ## Installation
20
+
21
+ ``` bash
22
+ npm install basyx-typescript-sdk
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ``` typescript
28
+ import { AasRepositoryClient } from ' basyx-typescript-sdk' ;
29
+
30
+ async function getAllShells() {
31
+ const baseURL = ' http://localhost:8081' ;
32
+ const client = new AasRepositoryClient ();
33
+
34
+ try {
35
+ const response = await client .getAllAssetAdministrationShells (baseURL );
36
+ console .log (' Asset Administration Shells fetched successfully:' , response );
37
+ // You can now use the response as needed
38
+ } catch (error ) {
39
+ console .error (' Error fetching Asset Administration Shells:' , error );
40
+ }
41
+ }
42
+
43
+ getAllShells ();
44
+ ```
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " basyx-typescript-sdk" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.1.0 " ,
4
4
"description" : " BaSyx TypeScript SDK for developing applications and components for the Asset Administration Shell (AAS)" ,
5
- "main" : " index.ts " ,
5
+ "main" : " dist/ index.js " ,
6
6
"repository" : " https://github.com/eclipse-basyx/basyx-typescript-sdk.git" ,
7
7
"author" : " Aaron Zielstorff <aaron.zielstorff@iese.fraunhofer.de>" ,
8
8
"license" : " MIT" ,
9
+ "files" : [
10
+ " dist" ,
11
+ " src" ,
12
+ " README.md" ,
13
+ " LICENSE"
14
+ ],
9
15
"scripts" : {
10
16
"gen:aasrepository" : " openapi-ts -c @hey-api/client-fetch -i ./openapi/Plattform_i40-AssetAdministrationShellRepositoryServiceSpecification-V3.0.3_SSP-001-resolved.json -o ./src/generated/aas-repository" ,
11
17
"build" : " tsc" ,
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments