@skillswaveca/nova-shared-libraries 3.11.1 → 3.12.1
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.
- package/docs-base/package-info.js +5 -5
- package/package.json +1 -1
- package/packages/drivers/package.json +1 -1
- package/packages/drivers/src/aws/secrets-manager.js +4 -1
- package/packages/drivers/src/oauth.js +5 -0
- package/packages/drivers/src/wave.js +5 -0
- package/packages/nova-middleware/package.json +1 -1
- package/packages/nova-model/package.json +1 -1
- package/packages/nova-router/package.json +1 -1
- package/packages/nova-utils/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
export const packageInfo = [
|
|
2
2
|
{
|
|
3
3
|
"name": "@skillswaveca/nova-utils",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.12.0",
|
|
5
5
|
"description": "A collection of random utils used in nova repos",
|
|
6
6
|
"docsPath": "./nova-utils/index.html"
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"name": "nova-router",
|
|
10
|
-
"version": "3.
|
|
10
|
+
"version": "3.12.0",
|
|
11
11
|
"description": "An extended Koa router that enables better validation",
|
|
12
12
|
"docsPath": "./nova-router/index.html"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "@skillswaveca/nova-model",
|
|
16
|
-
"version": "3.
|
|
16
|
+
"version": "3.12.0",
|
|
17
17
|
"description": "Nova model stuff",
|
|
18
18
|
"docsPath": "./nova-model/index.html"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "@skillswaveca/nova-middleware",
|
|
22
|
-
"version": "3.
|
|
22
|
+
"version": "3.12.0",
|
|
23
23
|
"description": "A collection of middleware used by nova projects",
|
|
24
24
|
"docsPath": "./nova-middleware/index.html"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "@skillswaveca/nova-drivers",
|
|
28
|
-
"version": "3.
|
|
28
|
+
"version": "3.12.0",
|
|
29
29
|
"description": "Some helper drivers for AWS services",
|
|
30
30
|
"docsPath": "./drivers/index.html"
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@skillswaveca/nova-shared-libraries",
|
|
4
4
|
"description": "A monorepo of shared libraries for Nova projects.",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"keywords": [],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@skillswaveca/nova-drivers",
|
|
4
4
|
"description": "Some helper drivers for AWS services",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"pre-release": "pnpm run create-index",
|
|
@@ -27,7 +27,10 @@ export class SecretsManager extends AwsBaseDriver {
|
|
|
27
27
|
* is a JSON. Otherwise (e.g. via the API), this string is the secret itself.
|
|
28
28
|
*/
|
|
29
29
|
async getSecret(secretName, keyId) {
|
|
30
|
-
if (!secretName)
|
|
30
|
+
if (!secretName) {
|
|
31
|
+
this.log.error('Missing secret name to fetch secret');
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
31
34
|
|
|
32
35
|
try {
|
|
33
36
|
const data = await this.client.send(new GetSecretValueCommand({ SecretId: secretName }));
|
|
@@ -39,6 +39,11 @@ export class OAuthDriver extends HttpDriver {
|
|
|
39
39
|
constructor(apiIdentifier, configuration = {}) {
|
|
40
40
|
const { baseUrl, oauth, tokenConfig } = configuration;
|
|
41
41
|
super(baseUrl, configuration);
|
|
42
|
+
if(!oauth) {
|
|
43
|
+
this.log.error({ apiIdentifier }, 'OAuthClient - no oauth configuration provided');
|
|
44
|
+
this.enabled = false;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
42
47
|
this.log.info({ apiIdentifier, configuration }, 'OAuthClient - creating new instance');
|
|
43
48
|
this.clientConfig = oauth;
|
|
44
49
|
this.apiIdentifier = apiIdentifier;
|
|
@@ -78,6 +78,11 @@ export class WaveDriver extends OAuthDriver {
|
|
|
78
78
|
this.log.error({ 'response': { success, error } }, 'Failed to retrieve tenant from wave');
|
|
79
79
|
throw new Error(`Failed to retrieve tenant from Wave: ${error}`);
|
|
80
80
|
}
|
|
81
|
+
}
|
|
81
82
|
|
|
83
|
+
_deleteUser(guid) {
|
|
84
|
+
const url = `/api/v2/users/${guid}`;
|
|
85
|
+
this.log.debug({ guid, url }, 'Deleting user from Wave');
|
|
86
|
+
return this.delete(url, {});
|
|
82
87
|
}
|
|
83
88
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@skillswaveca/nova-middleware",
|
|
4
4
|
"description": "A collection of middleware used by nova projects",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"pre-release": "pnpm run create-index",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@skillswaveca/nova-model",
|
|
4
4
|
"description": "Nova model stuff",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"pre-release": "pnpm run create-index",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "nova-router",
|
|
4
4
|
"description": "An extended Koa router that enables better validation",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"pre-release": "pnpm run create-index",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@skillswaveca/nova-utils",
|
|
4
4
|
"description": "A collection of random utils used in nova repos",
|
|
5
5
|
"repository": "https://github.com/SkillsWave/nova-shared-libraries",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.12.1",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"pre-release": "pnpm run create-index",
|