auth0-deploy-cli 8.20.2 → 8.20.4-beta.0
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 +46 -5
- package/CHANGELOG.md +17 -1
- package/eslint.config.js +130 -0
- package/lib/args.js +0 -1
- package/lib/commands/export.js +41 -49
- package/lib/commands/import.js +36 -43
- package/lib/commands/index.js +0 -1
- package/lib/configFactory.js +0 -1
- package/lib/context/defaults.js +38 -10
- package/lib/context/directory/handlers/actions.js +40 -39
- package/lib/context/directory/handlers/attackProtection.js +22 -34
- package/lib/context/directory/handlers/branding.js +12 -21
- package/lib/context/directory/handlers/clientGrants.js +52 -62
- package/lib/context/directory/handlers/clients.js +17 -29
- package/lib/context/directory/handlers/connections.js +32 -41
- package/lib/context/directory/handlers/customDomains.js +9 -21
- package/lib/context/directory/handlers/databases.js +37 -35
- package/lib/context/directory/handlers/emailProvider.js +22 -36
- package/lib/context/directory/handlers/emailTemplates.js +20 -29
- package/lib/context/directory/handlers/flowVaultConnections.js +39 -49
- package/lib/context/directory/handlers/flows.js +38 -48
- package/lib/context/directory/handlers/forms.js +38 -48
- package/lib/context/directory/handlers/guardianFactorProviders.js +9 -21
- package/lib/context/directory/handlers/guardianFactorTemplates.js +9 -21
- package/lib/context/directory/handlers/guardianFactors.js +9 -21
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +8 -20
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +8 -20
- package/lib/context/directory/handlers/guardianPolicies.js +8 -20
- package/lib/context/directory/handlers/hooks.js +24 -34
- package/lib/context/directory/handlers/index.js +0 -1
- package/lib/context/directory/handlers/logStreams.js +12 -24
- package/lib/context/directory/handlers/networkACLs.js +22 -34
- package/lib/context/directory/handlers/organizations.js +39 -44
- package/lib/context/directory/handlers/pages.js +31 -37
- package/lib/context/directory/handlers/phoneProvider.js +12 -24
- package/lib/context/directory/handlers/prompts.js +58 -76
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js +18 -30
- package/lib/context/directory/handlers/roles.js +21 -31
- package/lib/context/directory/handlers/rules.js +22 -32
- package/lib/context/directory/handlers/rulesConfigs.js +3 -15
- package/lib/context/directory/handlers/selfServiceProfiles.js +28 -40
- package/lib/context/directory/handlers/tenant.js +14 -34
- package/lib/context/directory/handlers/themes.js +9 -21
- package/lib/context/directory/handlers/triggers.d.ts +1 -1
- package/lib/context/directory/handlers/triggers.js +16 -26
- package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/directory/handlers/userAttributeProfiles.js +16 -26
- package/lib/context/directory/index.js +66 -80
- package/lib/context/index.js +7 -18
- package/lib/context/yaml/handlers/actions.js +39 -41
- package/lib/context/yaml/handlers/attackProtection.js +27 -41
- package/lib/context/yaml/handlers/branding.js +47 -69
- package/lib/context/yaml/handlers/clientGrants.js +26 -40
- package/lib/context/yaml/handlers/clients.js +41 -55
- package/lib/context/yaml/handlers/connections.js +63 -67
- package/lib/context/yaml/handlers/customDomains.js +7 -19
- package/lib/context/yaml/handlers/databases.js +63 -65
- package/lib/context/yaml/handlers/emailProvider.js +22 -37
- package/lib/context/yaml/handlers/emailTemplates.js +28 -39
- package/lib/context/yaml/handlers/flowVaultConnections.js +36 -50
- package/lib/context/yaml/handlers/flows.js +55 -66
- package/lib/context/yaml/handlers/forms.js +55 -66
- package/lib/context/yaml/handlers/guardianFactorProviders.js +7 -19
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +7 -19
- package/lib/context/yaml/handlers/guardianFactors.js +7 -19
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +7 -19
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +7 -19
- package/lib/context/yaml/handlers/guardianPolicies.js +7 -19
- package/lib/context/yaml/handlers/hooks.js +34 -48
- package/lib/context/yaml/handlers/index.js +0 -1
- package/lib/context/yaml/handlers/logStreams.js +16 -30
- package/lib/context/yaml/handlers/networkACLs.js +25 -39
- package/lib/context/yaml/handlers/organizations.js +37 -46
- package/lib/context/yaml/handlers/pages.js +31 -39
- package/lib/context/yaml/handlers/phoneProvider.js +17 -31
- package/lib/context/yaml/handlers/prompts.js +22 -47
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js +21 -33
- package/lib/context/yaml/handlers/roles.js +19 -33
- package/lib/context/yaml/handlers/rules.js +28 -39
- package/lib/context/yaml/handlers/rulesConfigs.js +14 -28
- package/lib/context/yaml/handlers/selfServiceProfiles.js +29 -43
- package/lib/context/yaml/handlers/tenant.js +19 -41
- package/lib/context/yaml/handlers/themes.js +7 -19
- package/lib/context/yaml/handlers/triggers.d.ts +1 -1
- package/lib/context/yaml/handlers/triggers.js +15 -29
- package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/yaml/handlers/userAttributeProfiles.js +7 -19
- package/lib/context/yaml/index.js +120 -128
- package/lib/index.d.ts +4 -95
- package/lib/index.js +24 -34
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +10 -6
- package/lib/logger.js +0 -1
- package/lib/readonly.js +3 -4
- package/lib/sessionDurationsToMinutes.js +0 -1
- package/lib/tools/auth0/client.js +111 -120
- package/lib/tools/auth0/handlers/actions.d.ts +8 -26
- package/lib/tools/auth0/handlers/actions.js +138 -149
- package/lib/tools/auth0/handlers/attackProtection.js +80 -92
- package/lib/tools/auth0/handlers/branding.js +75 -99
- package/lib/tools/auth0/handlers/clientGrants.d.ts +2 -8
- package/lib/tools/auth0/handlers/clientGrants.js +65 -70
- package/lib/tools/auth0/handlers/clients.d.ts +3 -9
- package/lib/tools/auth0/handlers/clients.js +59 -63
- package/lib/tools/auth0/handlers/connections.d.ts +3 -1
- package/lib/tools/auth0/handlers/connections.js +130 -135
- package/lib/tools/auth0/handlers/customDomains.d.ts +4 -1
- package/lib/tools/auth0/handlers/customDomains.js +43 -53
- package/lib/tools/auth0/handlers/databases.js +94 -114
- package/lib/tools/auth0/handlers/default.d.ts +2 -2
- package/lib/tools/auth0/handlers/default.js +210 -171
- package/lib/tools/auth0/handlers/emailProvider.js +41 -52
- package/lib/tools/auth0/handlers/emailTemplates.js +49 -71
- package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +5 -12
- package/lib/tools/auth0/handlers/flowVaultConnections.js +108 -143
- package/lib/tools/auth0/handlers/flows.d.ts +2 -3
- package/lib/tools/auth0/handlers/flows.js +92 -129
- package/lib/tools/auth0/handlers/forms.d.ts +3 -3
- package/lib/tools/auth0/handlers/forms.js +98 -112
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +61 -84
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +46 -68
- package/lib/tools/auth0/handlers/guardianFactors.js +35 -45
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +29 -45
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +29 -45
- package/lib/tools/auth0/handlers/guardianPolicies.js +20 -35
- package/lib/tools/auth0/handlers/hooks.js +123 -153
- package/lib/tools/auth0/handlers/index.js +0 -1
- package/lib/tools/auth0/handlers/logStreams.js +42 -47
- package/lib/tools/auth0/handlers/networkACLs.d.ts +5 -4
- package/lib/tools/auth0/handlers/networkACLs.js +115 -133
- package/lib/tools/auth0/handlers/organizations.d.ts +10 -9
- package/lib/tools/auth0/handlers/organizations.js +360 -429
- package/lib/tools/auth0/handlers/pages.js +74 -83
- package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/phoneProvider.js +69 -82
- package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
- package/lib/tools/auth0/handlers/prompts.js +242 -249
- package/lib/tools/auth0/handlers/resourceServers.d.ts +3 -1
- package/lib/tools/auth0/handlers/resourceServers.js +59 -60
- package/lib/tools/auth0/handlers/roles.js +162 -178
- package/lib/tools/auth0/handlers/rules.js +144 -162
- package/lib/tools/auth0/handlers/rulesConfigs.js +30 -39
- package/lib/tools/auth0/handlers/scimHandler.d.ts +4 -3
- package/lib/tools/auth0/handlers/scimHandler.js +110 -132
- package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +11 -3
- package/lib/tools/auth0/handlers/selfServiceProfiles.js +170 -208
- package/lib/tools/auth0/handlers/tenant.d.ts +5 -3
- package/lib/tools/auth0/handlers/tenant.js +45 -52
- package/lib/tools/auth0/handlers/themes.d.ts +12 -12
- package/lib/tools/auth0/handlers/themes.js +86 -102
- package/lib/tools/auth0/handlers/triggers.js +59 -75
- package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +3 -2
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +54 -56
- package/lib/tools/auth0/index.js +35 -48
- package/lib/tools/auth0/schema.js +6 -4
- package/lib/tools/calculateChanges.js +24 -15
- package/lib/tools/constants.d.ts +2 -2
- package/lib/tools/constants.js +0 -1
- package/lib/tools/deploy.js +17 -29
- package/lib/tools/index.d.ts +3 -88
- package/lib/tools/index.js +3 -2
- package/lib/tools/utils.d.ts +1 -1
- package/lib/tools/utils.js +12 -22
- package/lib/tools/validationError.js +0 -1
- package/lib/types.d.ts +8 -4
- package/lib/types.js +0 -1
- package/lib/utils.d.ts +3 -57
- package/lib/utils.js +8 -5
- package/package.json +12 -11
- package/tsconfig.json +4 -3
- package/.eslintignore +0 -5
- package/.eslintrc +0 -69
- package/lib/args.js.map +0 -1
- package/lib/commands/export.js.map +0 -1
- package/lib/commands/import.js.map +0 -1
- package/lib/commands/index.js.map +0 -1
- package/lib/configFactory.js.map +0 -1
- package/lib/context/defaults.js.map +0 -1
- package/lib/context/directory/handlers/actions.js.map +0 -1
- package/lib/context/directory/handlers/attackProtection.js.map +0 -1
- package/lib/context/directory/handlers/branding.js.map +0 -1
- package/lib/context/directory/handlers/clientGrants.js.map +0 -1
- package/lib/context/directory/handlers/clients.js.map +0 -1
- package/lib/context/directory/handlers/connections.js.map +0 -1
- package/lib/context/directory/handlers/customDomains.js.map +0 -1
- package/lib/context/directory/handlers/databases.js.map +0 -1
- package/lib/context/directory/handlers/emailProvider.js.map +0 -1
- package/lib/context/directory/handlers/emailTemplates.js.map +0 -1
- package/lib/context/directory/handlers/flowVaultConnections.js.map +0 -1
- package/lib/context/directory/handlers/flows.js.map +0 -1
- package/lib/context/directory/handlers/forms.js.map +0 -1
- package/lib/context/directory/handlers/guardianFactorProviders.js.map +0 -1
- package/lib/context/directory/handlers/guardianFactorTemplates.js.map +0 -1
- package/lib/context/directory/handlers/guardianFactors.js.map +0 -1
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
- package/lib/context/directory/handlers/guardianPolicies.js.map +0 -1
- package/lib/context/directory/handlers/hooks.js.map +0 -1
- package/lib/context/directory/handlers/index.js.map +0 -1
- package/lib/context/directory/handlers/logStreams.js.map +0 -1
- package/lib/context/directory/handlers/networkACLs.js.map +0 -1
- package/lib/context/directory/handlers/organizations.js.map +0 -1
- package/lib/context/directory/handlers/pages.js.map +0 -1
- package/lib/context/directory/handlers/phoneProvider.js.map +0 -1
- package/lib/context/directory/handlers/prompts.js.map +0 -1
- package/lib/context/directory/handlers/resourceServers.js.map +0 -1
- package/lib/context/directory/handlers/roles.js.map +0 -1
- package/lib/context/directory/handlers/rules.js.map +0 -1
- package/lib/context/directory/handlers/rulesConfigs.js.map +0 -1
- package/lib/context/directory/handlers/selfServiceProfiles.js.map +0 -1
- package/lib/context/directory/handlers/tenant.js.map +0 -1
- package/lib/context/directory/handlers/themes.js.map +0 -1
- package/lib/context/directory/handlers/triggers.js.map +0 -1
- package/lib/context/directory/handlers/userAttributeProfiles.js.map +0 -1
- package/lib/context/directory/index.js.map +0 -1
- package/lib/context/index.js.map +0 -1
- package/lib/context/yaml/handlers/actions.js.map +0 -1
- package/lib/context/yaml/handlers/attackProtection.js.map +0 -1
- package/lib/context/yaml/handlers/branding.js.map +0 -1
- package/lib/context/yaml/handlers/clientGrants.js.map +0 -1
- package/lib/context/yaml/handlers/clients.js.map +0 -1
- package/lib/context/yaml/handlers/connections.js.map +0 -1
- package/lib/context/yaml/handlers/customDomains.js.map +0 -1
- package/lib/context/yaml/handlers/databases.js.map +0 -1
- package/lib/context/yaml/handlers/emailProvider.js.map +0 -1
- package/lib/context/yaml/handlers/emailTemplates.js.map +0 -1
- package/lib/context/yaml/handlers/flowVaultConnections.js.map +0 -1
- package/lib/context/yaml/handlers/flows.js.map +0 -1
- package/lib/context/yaml/handlers/forms.js.map +0 -1
- package/lib/context/yaml/handlers/guardianFactorProviders.js.map +0 -1
- package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +0 -1
- package/lib/context/yaml/handlers/guardianFactors.js.map +0 -1
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
- package/lib/context/yaml/handlers/guardianPolicies.js.map +0 -1
- package/lib/context/yaml/handlers/hooks.js.map +0 -1
- package/lib/context/yaml/handlers/index.js.map +0 -1
- package/lib/context/yaml/handlers/logStreams.js.map +0 -1
- package/lib/context/yaml/handlers/networkACLs.js.map +0 -1
- package/lib/context/yaml/handlers/organizations.js.map +0 -1
- package/lib/context/yaml/handlers/pages.js.map +0 -1
- package/lib/context/yaml/handlers/phoneProvider.js.map +0 -1
- package/lib/context/yaml/handlers/prompts.js.map +0 -1
- package/lib/context/yaml/handlers/resourceServers.js.map +0 -1
- package/lib/context/yaml/handlers/roles.js.map +0 -1
- package/lib/context/yaml/handlers/rules.js.map +0 -1
- package/lib/context/yaml/handlers/rulesConfigs.js.map +0 -1
- package/lib/context/yaml/handlers/selfServiceProfiles.js.map +0 -1
- package/lib/context/yaml/handlers/tenant.js.map +0 -1
- package/lib/context/yaml/handlers/themes.js.map +0 -1
- package/lib/context/yaml/handlers/triggers.js.map +0 -1
- package/lib/context/yaml/handlers/userAttributeProfiles.js.map +0 -1
- package/lib/context/yaml/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/keywordPreservation.js.map +0 -1
- package/lib/logger.js.map +0 -1
- package/lib/readonly.js.map +0 -1
- package/lib/sessionDurationsToMinutes.js.map +0 -1
- package/lib/tools/auth0/client.js.map +0 -1
- package/lib/tools/auth0/handlers/actions.js.map +0 -1
- package/lib/tools/auth0/handlers/attackProtection.js.map +0 -1
- package/lib/tools/auth0/handlers/branding.js.map +0 -1
- package/lib/tools/auth0/handlers/clientGrants.js.map +0 -1
- package/lib/tools/auth0/handlers/clients.js.map +0 -1
- package/lib/tools/auth0/handlers/connections.js.map +0 -1
- package/lib/tools/auth0/handlers/customDomains.js.map +0 -1
- package/lib/tools/auth0/handlers/databases.js.map +0 -1
- package/lib/tools/auth0/handlers/default.js.map +0 -1
- package/lib/tools/auth0/handlers/emailProvider.js.map +0 -1
- package/lib/tools/auth0/handlers/emailTemplates.js.map +0 -1
- package/lib/tools/auth0/handlers/flowVaultConnections.js.map +0 -1
- package/lib/tools/auth0/handlers/flows.js.map +0 -1
- package/lib/tools/auth0/handlers/forms.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianFactors.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +0 -1
- package/lib/tools/auth0/handlers/hooks.js.map +0 -1
- package/lib/tools/auth0/handlers/index.js.map +0 -1
- package/lib/tools/auth0/handlers/logStreams.js.map +0 -1
- package/lib/tools/auth0/handlers/networkACLs.js.map +0 -1
- package/lib/tools/auth0/handlers/organizations.js.map +0 -1
- package/lib/tools/auth0/handlers/pages.js.map +0 -1
- package/lib/tools/auth0/handlers/phoneProvider.js.map +0 -1
- package/lib/tools/auth0/handlers/prompts.js.map +0 -1
- package/lib/tools/auth0/handlers/resourceServers.js.map +0 -1
- package/lib/tools/auth0/handlers/roles.js.map +0 -1
- package/lib/tools/auth0/handlers/rules.js.map +0 -1
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +0 -1
- package/lib/tools/auth0/handlers/scimHandler.js.map +0 -1
- package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +0 -1
- package/lib/tools/auth0/handlers/tenant.js.map +0 -1
- package/lib/tools/auth0/handlers/themes.js.map +0 -1
- package/lib/tools/auth0/handlers/triggers.js.map +0 -1
- package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +0 -1
- package/lib/tools/auth0/index.js.map +0 -1
- package/lib/tools/auth0/schema.js.map +0 -1
- package/lib/tools/calculateChanges.js.map +0 -1
- package/lib/tools/constants.js.map +0 -1
- package/lib/tools/deploy.js.map +0 -1
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/utils.js.map +0 -1
- package/lib/tools/validationError.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/lib/utils.js.map +0 -1
|
@@ -1,24 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
4
|
};
|
|
@@ -28,62 +8,60 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
28
8
|
const tools_1 = require("../../../tools");
|
|
29
9
|
const logger_1 = __importDefault(require("../../../logger"));
|
|
30
10
|
const utils_1 = require("../../../utils");
|
|
31
|
-
function parse(context) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const markupFile = path_1.default.join(context.basePath, ...normalizedPathArray);
|
|
42
|
-
return {
|
|
43
|
-
template: templateDefinition.template,
|
|
44
|
-
body: (0, tools_1.loadFileAndReplaceKeywords)(markupFile, {
|
|
45
|
-
mappings: context.mappings,
|
|
46
|
-
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
47
|
-
}),
|
|
48
|
-
};
|
|
49
|
-
});
|
|
11
|
+
async function parse(context) {
|
|
12
|
+
if (!context.assets.branding)
|
|
13
|
+
return { branding: null };
|
|
14
|
+
const { branding: { templates, ...branding }, } = context.assets;
|
|
15
|
+
if (!templates) {
|
|
16
|
+
return { branding: { ...branding } };
|
|
17
|
+
}
|
|
18
|
+
const parsedTemplates = templates.map((templateDefinition) => {
|
|
19
|
+
const normalizedPathArray = (0, utils_1.nomalizedYAMLPath)(templateDefinition.body);
|
|
20
|
+
const markupFile = path_1.default.join(context.basePath, ...normalizedPathArray);
|
|
50
21
|
return {
|
|
51
|
-
|
|
22
|
+
template: templateDefinition.template,
|
|
23
|
+
body: (0, tools_1.loadFileAndReplaceKeywords)(markupFile, {
|
|
24
|
+
mappings: context.mappings,
|
|
25
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
26
|
+
}),
|
|
52
27
|
};
|
|
53
28
|
});
|
|
29
|
+
return {
|
|
30
|
+
branding: {
|
|
31
|
+
...branding,
|
|
32
|
+
templates: parsedTemplates,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
54
35
|
}
|
|
55
|
-
function dump(context) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return { branding: Object.assign({ templates }, branding) };
|
|
82
|
-
});
|
|
36
|
+
async function dump(context) {
|
|
37
|
+
if (!context.assets.branding)
|
|
38
|
+
return { branding: null };
|
|
39
|
+
const { templates: templateConfig, ...branding } = context.assets.branding;
|
|
40
|
+
let templates = templateConfig || [];
|
|
41
|
+
// create templates folder
|
|
42
|
+
if (templates.length) {
|
|
43
|
+
const brandingTemplatesFolder = path_1.default.join(context.basePath, tools_1.constants.BRANDING_TEMPLATES_YAML_DIRECTORY);
|
|
44
|
+
fs_extra_1.default.ensureDirSync(brandingTemplatesFolder);
|
|
45
|
+
templates = templates.map((templateDefinition) => {
|
|
46
|
+
const file = `${templateDefinition.template}.html`;
|
|
47
|
+
const templateMarkupFile = path_1.default.join(brandingTemplatesFolder, file);
|
|
48
|
+
logger_1.default.info(`Writing ${templateMarkupFile}`);
|
|
49
|
+
const markup = templateDefinition.body;
|
|
50
|
+
try {
|
|
51
|
+
fs_extra_1.default.writeFileSync(templateMarkupFile, markup);
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
throw new Error(`Error writing template file: ${templateDefinition.template}, because: ${e.message}`);
|
|
55
|
+
}
|
|
56
|
+
// save the location as relative file.
|
|
57
|
+
templateDefinition.body = `./${tools_1.constants.BRANDING_TEMPLATES_YAML_DIRECTORY}/${file}`;
|
|
58
|
+
return templateDefinition;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return { branding: { templates, ...branding } };
|
|
83
62
|
}
|
|
84
63
|
const brandingHandler = {
|
|
85
64
|
parse,
|
|
86
65
|
dump,
|
|
87
66
|
};
|
|
88
67
|
exports.default = brandingHandler;
|
|
89
|
-
//# sourceMappingURL=branding.js.map
|
|
@@ -1,51 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
const utils_1 = require("../../../utils");
|
|
13
4
|
const client_1 = require("../../../tools/auth0/client");
|
|
14
|
-
function parse(context) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
});
|
|
5
|
+
async function parse(context) {
|
|
6
|
+
const { clientGrants } = context.assets;
|
|
7
|
+
if (!clientGrants)
|
|
8
|
+
return { clientGrants: null };
|
|
9
|
+
return {
|
|
10
|
+
clientGrants,
|
|
11
|
+
};
|
|
23
12
|
}
|
|
24
|
-
function dump(context) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
});
|
|
13
|
+
async function dump(context) {
|
|
14
|
+
let { clients } = context.assets;
|
|
15
|
+
const { clientGrants } = context.assets;
|
|
16
|
+
if (!clientGrants)
|
|
17
|
+
return { clientGrants: null };
|
|
18
|
+
if (clients === undefined) {
|
|
19
|
+
clients = await (0, client_1.paginate)(context.mgmtClient.clients.list, {
|
|
20
|
+
paginate: true,
|
|
21
|
+
include_totals: true,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
// Convert client_id to the client name for readability
|
|
25
|
+
return {
|
|
26
|
+
clientGrants: clientGrants.map((grant) => {
|
|
27
|
+
const dumpGrant = { ...grant };
|
|
28
|
+
dumpGrant.client_id = (0, utils_1.convertClientIdToName)(dumpGrant.client_id, clients || []);
|
|
29
|
+
return dumpGrant;
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
45
32
|
}
|
|
46
33
|
const clientGrantsHandler = {
|
|
47
34
|
parse,
|
|
48
35
|
dump,
|
|
49
36
|
};
|
|
50
37
|
exports.default = clientGrantsHandler;
|
|
51
|
-
//# sourceMappingURL=clientGrants.js.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -17,57 +8,52 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
17
8
|
const tools_1 = require("../../../tools");
|
|
18
9
|
const logger_1 = __importDefault(require("../../../logger"));
|
|
19
10
|
const utils_1 = require("../../../utils");
|
|
20
|
-
function parse(context) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
clients
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
client.custom_login_page = context.loadFile(htmlFileName);
|
|
35
|
-
}
|
|
11
|
+
async function parse(context) {
|
|
12
|
+
// Load the HTML file for custom_login_page
|
|
13
|
+
const { clients } = context.assets;
|
|
14
|
+
const clientsFolder = path_1.default.join(context.basePath, tools_1.constants.CLIENTS_DIRECTORY);
|
|
15
|
+
if (!clients) {
|
|
16
|
+
return { clients: null };
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
clients: [
|
|
20
|
+
...clients.map((client) => {
|
|
21
|
+
if (client.custom_login_page) {
|
|
22
|
+
const htmlFileName = path_1.default.join(clientsFolder, client.custom_login_page);
|
|
23
|
+
if ((0, utils_1.isFile)(htmlFileName)) {
|
|
24
|
+
client.custom_login_page = context.loadFile(htmlFileName);
|
|
36
25
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
26
|
+
}
|
|
27
|
+
return client;
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
42
31
|
}
|
|
43
|
-
function dump(context) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
clients
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
});
|
|
32
|
+
async function dump(context) {
|
|
33
|
+
// Save custom_login_page to a separate html file
|
|
34
|
+
const clientsFolder = path_1.default.join(context.basePath, tools_1.constants.CLIENTS_DIRECTORY);
|
|
35
|
+
const { clients } = context.assets;
|
|
36
|
+
if (!clients)
|
|
37
|
+
return { clients: null };
|
|
38
|
+
return {
|
|
39
|
+
clients: [
|
|
40
|
+
...clients.map((client) => {
|
|
41
|
+
if (client.custom_login_page) {
|
|
42
|
+
const clientName = (0, utils_1.sanitize)(client.name);
|
|
43
|
+
const html = client.custom_login_page;
|
|
44
|
+
const customLoginHtml = path_1.default.join(clientsFolder, `${clientName}_custom_login_page.html`);
|
|
45
|
+
logger_1.default.info(`Writing ${customLoginHtml}`);
|
|
46
|
+
fs_extra_1.default.ensureDirSync(clientsFolder);
|
|
47
|
+
fs_extra_1.default.writeFileSync(customLoginHtml, html);
|
|
48
|
+
client.custom_login_page = `./${clientName}_custom_login_page.html`;
|
|
49
|
+
}
|
|
50
|
+
return (0, utils_1.clearClientArrays)(client);
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
};
|
|
67
54
|
}
|
|
68
55
|
const clientsHandler = {
|
|
69
56
|
parse,
|
|
70
57
|
dump,
|
|
71
58
|
};
|
|
72
59
|
exports.default = clientsHandler;
|
|
73
|
-
//# sourceMappingURL=clients.js.map
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -18,81 +9,86 @@ const tools_1 = require("../../../tools");
|
|
|
18
9
|
const logger_1 = __importDefault(require("../../../logger"));
|
|
19
10
|
const utils_1 = require("../../../utils");
|
|
20
11
|
const defaults_1 = require("../../defaults");
|
|
21
|
-
function parse(context) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
connections
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
throw new Error(missingTemplateErrorMessage);
|
|
38
|
-
}
|
|
39
|
-
connection.options.email.body = context.loadFile(htmlFileName);
|
|
12
|
+
async function parse(context) {
|
|
13
|
+
const { connections } = context.assets;
|
|
14
|
+
const connectionsFolder = path_1.default.join(context.basePath, tools_1.constants.CONNECTIONS_DIRECTORY);
|
|
15
|
+
if (!connections) {
|
|
16
|
+
return { connections: null };
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
connections: [
|
|
20
|
+
...connections.map((connection) => {
|
|
21
|
+
if (connection.strategy === 'email') {
|
|
22
|
+
(0, utils_1.ensureProp)(connection, 'options.email.body');
|
|
23
|
+
const htmlFileName = path_1.default.join(connectionsFolder, connection.options.email.body);
|
|
24
|
+
if (!(0, utils_1.isFile)(htmlFileName)) {
|
|
25
|
+
const missingTemplateErrorMessage = `Passwordless email template purportedly located at ${htmlFileName} does not exist for connection. Ensure the existence of this file to proceed with deployment.`;
|
|
26
|
+
logger_1.default.error(missingTemplateErrorMessage);
|
|
27
|
+
throw new Error(missingTemplateErrorMessage);
|
|
40
28
|
}
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
connection.options.email.body = context.loadFile(htmlFileName);
|
|
30
|
+
}
|
|
31
|
+
return connection;
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
34
|
+
};
|
|
46
35
|
}
|
|
47
36
|
const getFormattedOptions = (connection, clients) => {
|
|
48
37
|
try {
|
|
49
38
|
return {
|
|
50
|
-
options:
|
|
39
|
+
options: {
|
|
40
|
+
...connection.options,
|
|
41
|
+
idpinitiated: {
|
|
42
|
+
...connection.options.idpinitiated,
|
|
43
|
+
client_id: (0, utils_1.convertClientIdToName)(connection.options.idpinitiated.client_id, clients),
|
|
44
|
+
},
|
|
45
|
+
},
|
|
51
46
|
};
|
|
52
47
|
}
|
|
53
48
|
catch (e) {
|
|
54
49
|
return {};
|
|
55
50
|
}
|
|
56
51
|
};
|
|
57
|
-
function dump(context) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
async function dump(context) {
|
|
53
|
+
const { connections, clients } = context.assets;
|
|
54
|
+
if (!connections)
|
|
55
|
+
return { connections: null };
|
|
56
|
+
return {
|
|
57
|
+
connections: connections.map((connection) => {
|
|
58
|
+
let dumpedConnection = {
|
|
59
|
+
...connection,
|
|
60
|
+
...getFormattedOptions(connection, clients),
|
|
61
|
+
...(connection.enabled_clients && {
|
|
65
62
|
enabled_clients: (0, utils_1.mapClientID2NameSorted)(connection.enabled_clients, clients || []),
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
// Mask secrets
|
|
66
|
+
dumpedConnection = (0, defaults_1.connectionDefaults)(dumpedConnection);
|
|
67
|
+
if (dumpedConnection.strategy === 'email') {
|
|
68
|
+
(0, utils_1.ensureProp)(connection, 'options.email.body');
|
|
69
|
+
const connectionsFolder = path_1.default.join(context.basePath, tools_1.constants.CONNECTIONS_DIRECTORY);
|
|
70
|
+
const connectionName = (0, utils_1.sanitize)(dumpedConnection.name);
|
|
71
|
+
const html = dumpedConnection.options.email.body;
|
|
72
|
+
const emailConnectionHtml = path_1.default.join(connectionsFolder, `${connectionName}.html`);
|
|
73
|
+
logger_1.default.info(`Writing ${emailConnectionHtml}`);
|
|
74
|
+
fs_extra_1.default.ensureDirSync(connectionsFolder);
|
|
75
|
+
fs_extra_1.default.writeFileSync(emailConnectionHtml, html);
|
|
76
|
+
dumpedConnection.options.email.body = `./${connectionName}.html`;
|
|
77
|
+
}
|
|
78
|
+
if (dumpedConnection.strategy === 'samlp' && dumpedConnection.options) {
|
|
79
|
+
if ('cert' in dumpedConnection.options) {
|
|
80
|
+
dumpedConnection.options.cert = (0, utils_1.encodeCertStringToBase64)(dumpedConnection.options.cert);
|
|
79
81
|
}
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
dumpedConnection.options.cert = (0, utils_1.encodeCertStringToBase64)(dumpedConnection.options.cert);
|
|
83
|
-
}
|
|
84
|
-
if ('signingCert' in dumpedConnection.options) {
|
|
85
|
-
dumpedConnection.options.signingCert = (0, utils_1.encodeCertStringToBase64)(dumpedConnection.options.signingCert);
|
|
86
|
-
}
|
|
82
|
+
if ('signingCert' in dumpedConnection.options) {
|
|
83
|
+
dumpedConnection.options.signingCert = (0, utils_1.encodeCertStringToBase64)(dumpedConnection.options.signingCert);
|
|
87
84
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
85
|
+
}
|
|
86
|
+
return dumpedConnection;
|
|
87
|
+
}),
|
|
88
|
+
};
|
|
92
89
|
}
|
|
93
90
|
const connectionsHandler = {
|
|
94
91
|
parse,
|
|
95
92
|
dump,
|
|
96
93
|
};
|
|
97
94
|
exports.default = connectionsHandler;
|
|
98
|
-
//# sourceMappingURL=connections.js.map
|
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
function parseAndDump(context) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
});
|
|
3
|
+
async function parseAndDump(context) {
|
|
4
|
+
const { customDomains } = context.assets;
|
|
5
|
+
if (!customDomains)
|
|
6
|
+
return { customDomains: null };
|
|
7
|
+
return {
|
|
8
|
+
customDomains,
|
|
9
|
+
};
|
|
21
10
|
}
|
|
22
11
|
const customDomainsHandler = {
|
|
23
12
|
parse: parseAndDump,
|
|
24
13
|
dump: parseAndDump,
|
|
25
14
|
};
|
|
26
15
|
exports.default = customDomainsHandler;
|
|
27
|
-
//# sourceMappingURL=customDomains.js.map
|