Skip to content

Commit 4dcaab4

Browse files
DEP-1: SDK additions (#52)
* DEP-1: Support for rich query, list channels, list assets and addition of x-api-key header integration for SaaS * Update docs, NPM publish github action added * Update errors.js Co-authored-by: KK, Amith <amith.kk@unisys.com>
1 parent 68b2fd3 commit 4dcaab4

9 files changed

Lines changed: 1148 additions & 5812 deletions

File tree

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"env": {
33
"browser": true,
44
"commonjs": true,
5-
"es6": true
5+
"es6": true,
6+
"mocha": true
67
},
78
"extends": "airbnb-base",
89
"globals": {
@@ -15,7 +16,7 @@
1516
"rules": {
1617
"linebreak-style":"off",
1718
"func-names": ["warn", "as-needed", { "generators": "never" }],
18-
"max-classes-per-file": ["error", 2],
19+
"max-classes-per-file": "off",
1920
"no-underscore-dangle": "off"
2021
}
2122
}

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish on NPM
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-node@v2
11+
with:
12+
node-version: '14.x'
13+
registry-url: 'https://registry.npmjs.org'
14+
- run: npm install
15+
- run: npm publish --access public
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,7 @@ dist
115115
.pnp.*
116116

117117
# generated documentation
118-
docs/gen
118+
docs/gen
119+
120+
# Consumer Examples WIP
121+
sdk-consumer-examples/

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ The DBoM SDK for Node.js provides a high level API to interact with a DBoM node.
99
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
1010

1111

12-
- [Getting Started](#getting-started)
13-
- [Prerequisites](#prerequisites)
14-
- [Development](#development)
15-
- [Usage](#usage)
16-
- [Create and Update Asset](#create-and-update-asset)
17-
- [Attach or Detach SubAsset](#attach-or-detach-subasset)
18-
- [Validate or Audit the Asset](#validate-or-audit-the-asset)
19-
- [Docs](#docs)
20-
- [Getting Help](#getting-help)
21-
- [Getting Involved](#getting-involved)
12+
- [DBoM Node SDK](#dbom-node-sdk)
13+
- [Table of Contents](#table-of-contents)
14+
- [Getting Started](#getting-started)
15+
- [Prerequisites](#prerequisites)
16+
- [Development](#development)
17+
- [Usage](#usage)
18+
- [Create and Update Asset](#create-and-update-asset)
19+
- [Attach or Detach SubAsset](#attach-or-detach-subasset)
20+
- [Validate or Audit the Asset](#validate-or-audit-the-asset)
21+
- [Docs](#docs)
22+
- [Getting help](#getting-help)
23+
- [Getting involved](#getting-involved)
2224

2325
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
2426

@@ -58,7 +60,7 @@ The DBoM SDK can now be imported:
5860

5961
```javascript
6062
const DbomNode = require('@dbom/sdk');
61-
let dNode = new DbomNode('<gateway-uri>', '<signing-service-uri>');
63+
let dNode = new DbomNode('<gateway-uri>', '<optional-signing-service-uri>', '<optional-api-key>');
6264
```
6365

6466
### Create and Update Asset

0 commit comments

Comments
 (0)