auth0-deploy-cli 7.14.1 → 7.14.2
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/.circleci/config.yml +40 -11
- package/.eslintignore +1 -0
- package/.nyc_output/1b0a2de3-0dae-4f80-9af7-f45cabfd5e99.json +1 -0
- package/.nyc_output/50c50e87-6b9d-4f9f-b6bb-a462368ff653.json +1 -0
- package/.nyc_output/cd0c5bb1-9480-4de3-b099-e95349d10f89.json +1 -0
- package/.nyc_output/processinfo/1b0a2de3-0dae-4f80-9af7-f45cabfd5e99.json +1 -0
- package/.nyc_output/processinfo/50c50e87-6b9d-4f9f-b6bb-a462368ff653.json +1 -0
- package/.nyc_output/processinfo/cd0c5bb1-9480-4de3-b099-e95349d10f89.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.prettierignore +2 -1
- package/CHANGELOG.md +11 -1
- package/README.md +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +251 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/args.ts.html +505 -0
- package/coverage/lcov-report/src/commands/export.ts.html +274 -0
- package/coverage/lcov-report/src/commands/import.ts.html +250 -0
- package/coverage/lcov-report/src/commands/index.html +131 -0
- package/coverage/lcov-report/src/configFactory.ts.html +175 -0
- package/coverage/lcov-report/src/context/defaults.ts.html +196 -0
- package/coverage/lcov-report/src/context/directory/handlers/actions.ts.html +355 -0
- package/coverage/lcov-report/src/context/directory/handlers/attackProtection.ts.html +307 -0
- package/coverage/lcov-report/src/context/directory/handlers/branding.ts.html +448 -0
- package/coverage/lcov-report/src/context/directory/handlers/clientGrants.ts.html +262 -0
- package/coverage/lcov-report/src/context/directory/handlers/clients.ts.html +319 -0
- package/coverage/lcov-report/src/context/directory/handlers/connections.ts.html +370 -0
- package/coverage/lcov-report/src/context/directory/handlers/customDomains.ts.html +223 -0
- package/coverage/lcov-report/src/context/directory/handlers/databases.ts.html +544 -0
- package/coverage/lcov-report/src/context/directory/handlers/emailProvider.ts.html +241 -0
- package/coverage/lcov-report/src/context/directory/handlers/emailTemplates.ts.html +316 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianFactorProviders.ts.html +256 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianFactorTemplates.ts.html +247 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianFactors.ts.html +247 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorMessageTypes.ts.html +214 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorSelectedProvider.ts.html +226 -0
- package/coverage/lcov-report/src/context/directory/handlers/guardianPolicies.ts.html +214 -0
- package/coverage/lcov-report/src/context/directory/handlers/hooks.ts.html +274 -0
- package/coverage/lcov-report/src/context/directory/handlers/index.html +551 -0
- package/coverage/lcov-report/src/context/directory/handlers/index.ts.html +304 -0
- package/coverage/lcov-report/src/context/directory/handlers/logStreams.ts.html +220 -0
- package/coverage/lcov-report/src/context/directory/handlers/migrations.ts.html +196 -0
- package/coverage/lcov-report/src/context/directory/handlers/organizations.ts.html +289 -0
- package/coverage/lcov-report/src/context/directory/handlers/pages.ts.html +334 -0
- package/coverage/lcov-report/src/context/directory/handlers/prompts.ts.html +313 -0
- package/coverage/lcov-report/src/context/directory/handlers/resourceServers.ts.html +229 -0
- package/coverage/lcov-report/src/context/directory/handlers/roles.ts.html +253 -0
- package/coverage/lcov-report/src/context/directory/handlers/rules.ts.html +262 -0
- package/coverage/lcov-report/src/context/directory/handlers/rulesConfigs.ts.html +193 -0
- package/coverage/lcov-report/src/context/directory/handlers/tenant.ts.html +289 -0
- package/coverage/lcov-report/src/context/directory/handlers/themes.ts.html +232 -0
- package/coverage/lcov-report/src/context/directory/handlers/triggers.ts.html +214 -0
- package/coverage/lcov-report/src/context/directory/index.html +116 -0
- package/coverage/lcov-report/src/context/directory/index.ts.html +400 -0
- package/coverage/lcov-report/src/context/index.html +131 -0
- package/coverage/lcov-report/src/context/index.ts.html +475 -0
- package/coverage/lcov-report/src/context/yaml/handlers/actions.ts.html +349 -0
- package/coverage/lcov-report/src/context/yaml/handlers/attackProtection.ts.html +193 -0
- package/coverage/lcov-report/src/context/yaml/handlers/branding.ts.html +391 -0
- package/coverage/lcov-report/src/context/yaml/handlers/clientGrants.ts.html +199 -0
- package/coverage/lcov-report/src/context/yaml/handlers/clients.ts.html +301 -0
- package/coverage/lcov-report/src/context/yaml/handlers/connections.ts.html +394 -0
- package/coverage/lcov-report/src/context/yaml/handlers/customDomains.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/databases.ts.html +346 -0
- package/coverage/lcov-report/src/context/yaml/handlers/emailProvider.ts.html +208 -0
- package/coverage/lcov-report/src/context/yaml/handlers/emailTemplates.ts.html +241 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorProviders.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorTemplates.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianFactors.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorMessageTypes.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorSelectedProvider.ts.html +169 -0
- package/coverage/lcov-report/src/context/yaml/handlers/guardianPolicies.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/hooks.ts.html +280 -0
- package/coverage/lcov-report/src/context/yaml/handlers/index.html +551 -0
- package/coverage/lcov-report/src/context/yaml/handlers/index.ts.html +298 -0
- package/coverage/lcov-report/src/context/yaml/handlers/logStreams.ts.html +151 -0
- package/coverage/lcov-report/src/context/yaml/handlers/migrations.ts.html +145 -0
- package/coverage/lcov-report/src/context/yaml/handlers/organizations.ts.html +235 -0
- package/coverage/lcov-report/src/context/yaml/handlers/pages.ts.html +268 -0
- package/coverage/lcov-report/src/context/yaml/handlers/prompts.ts.html +154 -0
- package/coverage/lcov-report/src/context/yaml/handlers/resourceServers.ts.html +154 -0
- package/coverage/lcov-report/src/context/yaml/handlers/roles.ts.html +199 -0
- package/coverage/lcov-report/src/context/yaml/handlers/rules.ts.html +253 -0
- package/coverage/lcov-report/src/context/yaml/handlers/rulesConfigs.ts.html +181 -0
- package/coverage/lcov-report/src/context/yaml/handlers/tenant.ts.html +235 -0
- package/coverage/lcov-report/src/context/yaml/handlers/themes.ts.html +154 -0
- package/coverage/lcov-report/src/context/yaml/handlers/triggers.ts.html +172 -0
- package/coverage/lcov-report/src/context/yaml/index.html +116 -0
- package/coverage/lcov-report/src/context/yaml/index.ts.html +568 -0
- package/coverage/lcov-report/src/index.html +221 -0
- package/coverage/lcov-report/src/index.ts.html +361 -0
- package/coverage/lcov-report/src/logger.ts.html +133 -0
- package/coverage/lcov-report/src/readonly.ts.html +346 -0
- package/coverage/lcov-report/src/sessionDurationsToMinutes.ts.html +154 -0
- package/coverage/lcov-report/src/tools/auth0/client.ts.html +604 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/actions.ts.html +793 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/attackProtection.ts.html +367 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/branding.ts.html +427 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/clientGrants.ts.html +418 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/clients.ts.html +340 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/connections.ts.html +598 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/customDomains.ts.html +379 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/databases.ts.html +436 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/default.ts.html +1027 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/emailProvider.ts.html +274 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/emailTemplates.ts.html +337 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorProviders.ts.html +301 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorTemplates.ts.html +265 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactors.ts.html +241 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorMessageTypes.ts.html +337 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.ts.html +331 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/guardianPolicies.ts.html +256 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/hooks.ts.html +829 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/index.html +566 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/index.ts.html +295 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/logStreams.ts.html +346 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/migrations.ts.html +319 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/organizations.ts.html +949 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/pages.ts.html +517 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/prompts.ts.html +913 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/resourceServers.ts.html +412 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/roles.ts.html +751 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/rules.ts.html +727 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/rulesConfigs.ts.html +256 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/tenant.ts.html +466 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/themes.ts.html +1882 -0
- package/coverage/lcov-report/src/tools/auth0/handlers/triggers.ts.html +430 -0
- package/coverage/lcov-report/src/tools/auth0/index.html +146 -0
- package/coverage/lcov-report/src/tools/auth0/index.ts.html +355 -0
- package/coverage/lcov-report/src/tools/auth0/schema.ts.html +184 -0
- package/coverage/lcov-report/src/tools/calculateChanges.ts.html +688 -0
- package/coverage/lcov-report/src/tools/constants.ts.html +610 -0
- package/coverage/lcov-report/src/tools/deploy.ts.html +181 -0
- package/coverage/lcov-report/src/tools/index.html +191 -0
- package/coverage/lcov-report/src/tools/index.ts.html +127 -0
- package/coverage/lcov-report/src/tools/utils.ts.html +796 -0
- package/coverage/lcov-report/src/tools/validationError.ts.html +127 -0
- package/coverage/lcov-report/src/types.ts.html +1093 -0
- package/coverage/lcov-report/src/utils.ts.html +679 -0
- package/coverage/lcov.info +7168 -0
- package/examples/yaml/config.json.example +1 -1
- package/lib/context/directory/handlers/connections.js +3 -2
- package/lib/context/yaml/handlers/connections.js +5 -2
- package/lib/tools/auth0/handlers/themes.js +11 -3
- package/lib/types.d.ts +2 -2
- package/package.json +11 -5
|
@@ -29,9 +29,10 @@ function parse(context) {
|
|
|
29
29
|
if (connection.strategy === 'email') {
|
|
30
30
|
(0, utils_1.ensureProp)(connection, 'options.email.body');
|
|
31
31
|
const htmlFileName = path_1.default.join(connectionsFolder, connection.options.email.body);
|
|
32
|
-
if ((0, utils_1.isFile)(htmlFileName)) {
|
|
33
|
-
|
|
32
|
+
if (!(0, utils_1.isFile)(htmlFileName)) {
|
|
33
|
+
throw new Error(`Passwordless email template purportedly located at ${htmlFileName} does not exist for connection. Ensure the existence of this file to proceed with deployment.`);
|
|
34
34
|
}
|
|
35
|
+
connection.options.email.body = (0, tools_1.loadFileAndReplaceKeywords)(htmlFileName, context.mappings);
|
|
35
36
|
}
|
|
36
37
|
return connection;
|
|
37
38
|
})
|
|
@@ -30,9 +30,12 @@ function parse(context) {
|
|
|
30
30
|
if (connection.strategy === 'email') {
|
|
31
31
|
(0, utils_1.ensureProp)(connection, 'options.email.body');
|
|
32
32
|
const htmlFileName = path_1.default.join(connectionsFolder, connection.options.email.body);
|
|
33
|
-
if ((0, utils_1.isFile)(htmlFileName)) {
|
|
34
|
-
connection.
|
|
33
|
+
if (!(0, utils_1.isFile)(htmlFileName)) {
|
|
34
|
+
const missingTemplateErrorMessage = `Passwordless email template purportedly located at ${htmlFileName} does not exist for connection. Ensure the existence of this file to proceed with deployment.`;
|
|
35
|
+
logger_1.default.error(missingTemplateErrorMessage);
|
|
36
|
+
throw new Error(missingTemplateErrorMessage);
|
|
35
37
|
}
|
|
38
|
+
connection.options.email.body = context.loadFile(htmlFileName);
|
|
36
39
|
}
|
|
37
40
|
return connection;
|
|
38
41
|
}),
|
|
@@ -66,13 +66,21 @@ class ThemesHandler extends default_1.default {
|
|
|
66
66
|
logger_1.default.warn('Only one theme is supported per tenant');
|
|
67
67
|
}
|
|
68
68
|
const currentThemes = yield this.getThemes();
|
|
69
|
+
const themeReqPayload = (() => {
|
|
70
|
+
// Removing themeId from update and create payloads, otherwise API will error
|
|
71
|
+
// Theme ID may be required to handle if `--export_ids=true`
|
|
72
|
+
const payload = themes[0];
|
|
73
|
+
//@ts-ignore to quell non-optional themeId property, but we know that it's ok to delete
|
|
74
|
+
delete payload.themeId;
|
|
75
|
+
return payload;
|
|
76
|
+
})();
|
|
69
77
|
if (currentThemes === null || currentThemes.length === 0) {
|
|
70
|
-
yield this.client.branding.createTheme(
|
|
78
|
+
yield this.client.branding.createTheme(themeReqPayload);
|
|
71
79
|
}
|
|
72
80
|
else {
|
|
73
81
|
const currentTheme = currentThemes[0];
|
|
74
82
|
// if theme exists, overwrite it otherwise create it
|
|
75
|
-
yield this.client.branding.updateTheme({ id: currentTheme.themeId },
|
|
83
|
+
yield this.client.branding.updateTheme({ id: currentTheme.themeId }, themeReqPayload);
|
|
76
84
|
}
|
|
77
85
|
this.updated += 1;
|
|
78
86
|
this.didUpdate(themes[0]);
|
|
@@ -102,7 +110,7 @@ exports.default = ThemesHandler;
|
|
|
102
110
|
exports.schema = {
|
|
103
111
|
type: 'array',
|
|
104
112
|
items: {
|
|
105
|
-
additionalProperties:
|
|
113
|
+
additionalProperties: true,
|
|
106
114
|
properties: {
|
|
107
115
|
borders: {
|
|
108
116
|
additionalProperties: false,
|
package/lib/types.d.ts
CHANGED
|
@@ -70,8 +70,8 @@ export declare type BaseAuth0APIClient = {
|
|
|
70
70
|
getDefaultTheme: () => Promise<Theme>;
|
|
71
71
|
updateTheme: (arg0: {
|
|
72
72
|
id: string;
|
|
73
|
-
},
|
|
74
|
-
createTheme: (arg0: Theme) => Promise<Omit<Theme, 'themeId'>>;
|
|
73
|
+
}, arg1: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
|
|
74
|
+
createTheme: (arg0: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
|
|
75
75
|
deleteTheme: (arg0: {
|
|
76
76
|
id: string;
|
|
77
77
|
}) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "7.14.
|
|
3
|
+
"version": "7.14.2",
|
|
4
4
|
"description": "A command line tool for deploying updates to your Auth0 tenant",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"lint:fix": "eslint --fix --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
|
|
11
11
|
"lint": "eslint --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
|
|
12
12
|
"format": "npx prettier --write .",
|
|
13
|
-
"
|
|
14
|
-
"test": "ts-mocha -p tsconfig.json --recursive 'test
|
|
13
|
+
"test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*' --exclude 'test/e2e/*' --timeout 5000",
|
|
14
|
+
"test:e2e:node-module": "ts-mocha -p tsconfig.json --recursive 'test/e2e/*.test*' --timeout 120000",
|
|
15
|
+
"test:e2e:cli": "sh ./test/e2e/e2e-cli.sh",
|
|
16
|
+
"test:coverage": "nyc npm run test; nyc report --reporter=lcov",
|
|
15
17
|
"build": "rimraf ./lib && npx tsc",
|
|
16
18
|
"dev": "npx tsc --watch",
|
|
17
19
|
"prepare": "npm run build",
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@types/lodash": "^4.14.181",
|
|
34
36
|
"@types/nconf": "^0.10.2",
|
|
37
|
+
"@types/nock": "^11.1.0",
|
|
35
38
|
"@types/winston": "^2.4.4",
|
|
36
39
|
"ajv": "^6.12.6",
|
|
37
40
|
"auth0": "^2.42.0",
|
|
@@ -46,13 +49,14 @@
|
|
|
46
49
|
"sanitize-filename": "^1.6.1",
|
|
47
50
|
"sinon": "^13.0.1",
|
|
48
51
|
"sinon-chai": "^3.7.0",
|
|
52
|
+
"ts-node": "^10.9.1",
|
|
49
53
|
"winston": "^3.7.2",
|
|
50
54
|
"yargs": "^15.3.1"
|
|
51
55
|
},
|
|
52
56
|
"devDependencies": {
|
|
53
57
|
"@types/expect": "^24.3.0",
|
|
54
58
|
"@types/mocha": "^9.1.0",
|
|
55
|
-
"@typescript-eslint/parser": "^5.
|
|
59
|
+
"@typescript-eslint/parser": "^5.30.3",
|
|
56
60
|
"chai": "^4.3.6",
|
|
57
61
|
"chai-as-promised": "^7.1.1",
|
|
58
62
|
"cross-env": "^3.1.4",
|
|
@@ -63,13 +67,15 @@
|
|
|
63
67
|
"husky": "^7.0.4",
|
|
64
68
|
"kacl": "^1.1.1",
|
|
65
69
|
"mocha": "^9.2.2",
|
|
70
|
+
"nock": "^13.2.9",
|
|
66
71
|
"nyc": "^15.0.1",
|
|
67
72
|
"prettier": "^2.6.2",
|
|
68
73
|
"pretty-quick": "^3.1.3",
|
|
69
74
|
"rimraf": "^3.0.2",
|
|
70
75
|
"rmdir-sync": "^1.0.1",
|
|
71
76
|
"ts-mocha": "^9.0.2",
|
|
72
|
-
"typescript": "^4.7.
|
|
77
|
+
"typescript": "^4.7.4",
|
|
78
|
+
"zlib": "^1.0.5"
|
|
73
79
|
},
|
|
74
80
|
"overrides": {
|
|
75
81
|
"istanbul-reports": "3.1.4"
|