@ibm-cloud/secrets-manager 0.1.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,7 +76,6 @@ const authenticator = new IamAuthenticator({
76
76
  import { getAuthenticatorFromEnvironment } from '@ibm-cloud/secrets-manager/auth';
77
77
 
78
78
  // env vars
79
- // SECRETS_MANAGER_API_AUTH_TYPE=iam
80
79
  // SECRETS_MANAGER_API_APIKEY==<apikey>
81
80
  const iamAuthenticator = getAuthenticatorFromEnvironment('SECRETS_MANAGER_API');
82
81
  ```
@@ -156,7 +155,7 @@ secretsManagerSdkExample();
156
155
  To delete a secret, specify the `secretType` and its `id`.
157
156
 
158
157
  ```js
159
- res = await secretsManagerApi.deleteSecret({
158
+ res = await secretsManager.deleteSecret({
160
159
  secretType: 'username_password',
161
160
  id: secretId,
162
161
  });
@@ -177,11 +176,11 @@ Create a secret group, and then add a new secret to this group.
177
176
  resources: [{ name: 'Test Group', description: 'Group my test secrets' }],
178
177
  };
179
178
 
180
- let res = await ibmCloudSecretsManagerApiService.createSecretGroup(createGroupParams);
179
+ let res = await secretsManager.createSecretGroup(createGroupParams);
181
180
  const secretGroupId = res.result.resources[0].id;
182
181
 
183
182
  // Create a secret and associate it with your secret group
184
- res = await ibmCloudSecretsManagerApiService.createSecret({
183
+ res = await secretsManager.createSecret({
185
184
  metadata: {
186
185
  collection_type: 'application/vnd.ibm.secrets-manager.secret+json',
187
186
  collection_total: 1,
@@ -204,7 +203,7 @@ Create a secret group, and then add a new secret to this group.
204
203
  Create a rotation policy of one month for a secret.
205
204
 
206
205
  ```js
207
- let res = await ibmCloudSecretsManagerApiService.putPolicy({
206
+ let res = await secretsManager.putPolicy({
208
207
  metadata: {
209
208
  collection_type: 'application/vnd.ibm.secrets-manager.secret.policy+json',
210
209
  collection_total: 1,
@@ -234,7 +233,6 @@ The integration tests are run against an actual Secrets Manager instance and req
234
233
  to be set:
235
234
 
236
235
  ```
237
- SECRETS_MANAGER_API_AUTH_TYPE=iam;
238
236
  SECRETS_MANAGER_API_APIKEY=<API_KEY>
239
237
  SERVICE_URL=<SECRETS_MANAGER_ENDPOINT_URL>
240
238
  ```
@@ -248,8 +246,8 @@ npm test
248
246
  ## Questions
249
247
 
250
248
  If you're having difficulties using this SDK, you can ask questions about this project by
251
- using [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-cloud+secrets-manager). Be sure to include
252
- the `ibm-cloud` and `secrets-manager` tags.
249
+ using [Stack Overflow](https://stackoverflow.com/questions/tagged/ibm-secrets-manager). Be sure to include
250
+ the `ibm-cloud` and `ibm-secrets-manager` tags.
253
251
 
254
252
  You can also check out the [Secrets Manager documentation](https://cloud.ibm.com/docs/secrets-manager)
255
253
  and [API reference](https://cloud.ibm.com/apidocs/secrets-manager) for more information about the service.
package/auth/index.d.ts CHANGED
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export { NoAuthAuthenticator, BasicAuthenticator, BearerTokenAuthenticator, IamAuthenticator, CloudPakForDataAuthenticator, IamTokenManager, Cp4dTokenManager, getAuthenticatorFromEnvironment } from 'ibm-cloud-sdk-core';
16
+ export { NoAuthAuthenticator, BasicAuthenticator, BearerTokenAuthenticator, IamAuthenticator, CloudPakForDataAuthenticator, IamTokenManager, Cp4dTokenManager, getAuthenticatorFromEnvironment, } from 'ibm-cloud-sdk-core';
package/lib/common.js CHANGED
@@ -29,7 +29,7 @@ function getSdkHeaders(serviceName, serviceVersion, operationId) {
29
29
  var osVersion = os.release();
30
30
  var nodeVersion = process.version;
31
31
  var headers = {
32
- 'User-Agent': sdkName + "/" + sdkVersion + " (lang=node.js; os.name=" + osName + " os.version=" + osVersion + " node.version=" + nodeVersion + ")"
32
+ 'User-Agent': sdkName + "/" + sdkVersion + " (lang=node.js; os.name=" + osName + " os.version=" + osVersion + " node.version=" + nodeVersion + ")",
33
33
  };
34
34
  return headers;
35
35
  }
package/lib/common.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAA0B;AAE1B,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAMvC;;GAEG;AACH,SAAgB,aAAa,CAAC,WAAmB,EAAE,cAAsB,EAAE,WAAmB;IAC5F,IAAM,OAAO,GAAG,4BAA4B,CAAC;IAC7C,IAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpC,IAAM,OAAO,GAAG;QACd,YAAY,EAAK,OAAO,SAAI,UAAU,gCAA2B,MAAM,oBAAe,SAAS,sBAAiB,WAAW,MAAG;KAC/H,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAZD,sCAYC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../lib/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uBAA0B;AAE1B,2CAA2C;AAC3C,IAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAMvC;;GAEG;AACH,SAAgB,aAAa,CAC3B,WAAmB,EACnB,cAAsB,EACtB,WAAmB;IAEnB,IAAM,OAAO,GAAG,4BAA4B,CAAC;IAC7C,IAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC;IAC/B,IAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC7B,IAAM,SAAS,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;IAEpC,IAAM,OAAO,GAAG;QACd,YAAY,EAAK,OAAO,SAAI,UAAU,gCAA2B,MAAM,oBAAe,SAAS,sBAAiB,WAAW,MAAG;KAC/H,CAAC;IAEF,OAAO,OAAO,CAAC;AACjB,CAAC;AAhBD,sCAgBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm-cloud/secrets-manager",
3
- "version": "0.1.1",
3
+ "version": "1.0.3",
4
4
  "description": "Client library for IBM Cloud Secrets Manager",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,10 +14,8 @@
14
14
  "scripts": {
15
15
  "eslint:fix": "eslint . --fix",
16
16
  "eslint:check": "eslint . --cache",
17
- "tslint:fix": "tslint --fix -p . -c tslint.json",
18
- "tslint:check": "tslint -p . -c ./tslint.json",
19
- "lint": "npm run eslint:check && npm run tslint:check",
20
- "lint-fix": "npm run eslint:fix && npm run tslint:fix",
17
+ "lint": "npm run eslint:check",
18
+ "lint-fix": "npm run eslint:fix",
21
19
  "build": "tsc && cp package.json dist/ && cp README.md dist/",
22
20
  "postversion": "tsc-publish --no-checks --dry-run",
23
21
  "publishDist": "npm run build && cd dist && npm publish --access public",
@@ -39,27 +37,30 @@
39
37
  "dependencies": {
40
38
  "@types/node": "^12.0.8",
41
39
  "extend": "^3.0.2",
42
- "ibm-cloud-sdk-core": "^2.8.0"
40
+ "ibm-cloud-sdk-core": "^2.17.9"
43
41
  },
44
42
  "devDependencies": {
45
- "@semantic-release/changelog": "5.0.1",
46
- "@semantic-release/git": "9.0.0",
47
- "axios": "^0.21.1",
48
- "codecov": "^3.7.0",
43
+ "@semantic-release/changelog": "6.0.0",
44
+ "@semantic-release/git": "10.0.0",
45
+ "@typescript-eslint/eslint-plugin": "^4.24.0",
46
+ "@typescript-eslint/parser": "^4.24.0",
47
+ "axios": "^0.21.4",
49
48
  "dotenv": "^8.2.0",
50
- "eslint": "^5.16.0",
51
- "eslint-config-google": "^0.12.0",
52
- "eslint-config-prettier": "^4.2.0",
49
+ "eslint": "^7.26.0",
50
+ "eslint-config-airbnb-base": "^14.2.1",
51
+ "eslint-config-airbnb-typescript": "^12.3.1",
52
+ "eslint-config-prettier": "^8.3.0",
53
+ "eslint-plugin-import": "^2.23.2",
54
+ "eslint-plugin-jest": "^24.3.6",
55
+ "eslint-plugin-jsdoc": "^34.6.3",
53
56
  "eslint-plugin-node": "^9.0.0",
54
57
  "eslint-plugin-prettier": "^3.0.1",
55
58
  "installed-check": "^2.2.0",
56
- "jest": "^25.4.0",
57
- "prettier": "^1.17.1",
59
+ "jest": "^27.2.5",
60
+ "prettier": "^2.3.0",
61
+ "semantic-release": "18.0.1",
58
62
  "tsc-publish": "^0.5.2",
59
- "tslint": "^5.16.0",
60
- "tslint-config-prettier": "^1.18.0",
61
- "tslint-eslint-rules": "^5.4.0",
62
- "typedoc": "^0.15.0",
63
+ "typedoc": "^0.20.36",
63
64
  "typescript": "^3.8.3"
64
65
  },
65
66
  "jest": {