auth0-deploy-cli 8.20.4-beta.0 → 8.22.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 +5 -46
- package/.eslintignore +5 -0
- package/.eslintrc +69 -0
- package/CHANGELOG.md +30 -6
- package/lib/args.js +1 -0
- package/lib/args.js.map +1 -0
- package/lib/commands/export.js +49 -41
- package/lib/commands/export.js.map +1 -0
- package/lib/commands/import.js +43 -36
- package/lib/commands/import.js.map +1 -0
- package/lib/commands/index.js +1 -0
- package/lib/commands/index.js.map +1 -0
- package/lib/configFactory.js +1 -0
- package/lib/configFactory.js.map +1 -0
- package/lib/context/defaults.js +10 -38
- package/lib/context/defaults.js.map +1 -0
- package/lib/context/directory/handlers/actions.js +39 -40
- package/lib/context/directory/handlers/actions.js.map +1 -0
- package/lib/context/directory/handlers/attackProtection.js +34 -22
- package/lib/context/directory/handlers/attackProtection.js.map +1 -0
- package/lib/context/directory/handlers/branding.js +21 -12
- package/lib/context/directory/handlers/branding.js.map +1 -0
- package/lib/context/directory/handlers/clientGrants.js +62 -52
- package/lib/context/directory/handlers/clientGrants.js.map +1 -0
- package/lib/context/directory/handlers/clients.js +60 -17
- package/lib/context/directory/handlers/clients.js.map +1 -0
- package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/directory/handlers/connectionProfiles.js +59 -0
- package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/directory/handlers/connections.js +41 -32
- package/lib/context/directory/handlers/connections.js.map +1 -0
- package/lib/context/directory/handlers/customDomains.js +21 -9
- package/lib/context/directory/handlers/customDomains.js.map +1 -0
- package/lib/context/directory/handlers/databases.js +35 -37
- package/lib/context/directory/handlers/databases.js.map +1 -0
- package/lib/context/directory/handlers/emailProvider.js +36 -22
- package/lib/context/directory/handlers/emailProvider.js.map +1 -0
- package/lib/context/directory/handlers/emailTemplates.js +29 -20
- package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
- package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
- package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/directory/handlers/flows.js +48 -38
- package/lib/context/directory/handlers/flows.js.map +1 -0
- package/lib/context/directory/handlers/forms.js +48 -38
- package/lib/context/directory/handlers/forms.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
- package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
- package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactors.js +21 -9
- package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/directory/handlers/guardianPolicies.js +20 -8
- package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/directory/handlers/hooks.js +34 -24
- package/lib/context/directory/handlers/hooks.js.map +1 -0
- package/lib/context/directory/handlers/index.js +3 -0
- package/lib/context/directory/handlers/index.js.map +1 -0
- package/lib/context/directory/handlers/logStreams.js +24 -12
- package/lib/context/directory/handlers/logStreams.js.map +1 -0
- package/lib/context/directory/handlers/networkACLs.js +34 -22
- package/lib/context/directory/handlers/networkACLs.js.map +1 -0
- package/lib/context/directory/handlers/organizations.js +44 -39
- package/lib/context/directory/handlers/organizations.js.map +1 -0
- package/lib/context/directory/handlers/pages.js +37 -31
- package/lib/context/directory/handlers/pages.js.map +1 -0
- package/lib/context/directory/handlers/phoneProvider.js +24 -12
- package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
- package/lib/context/directory/handlers/prompts.js +76 -58
- package/lib/context/directory/handlers/prompts.js.map +1 -0
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js +30 -18
- package/lib/context/directory/handlers/resourceServers.js.map +1 -0
- package/lib/context/directory/handlers/roles.js +31 -21
- package/lib/context/directory/handlers/roles.js.map +1 -0
- package/lib/context/directory/handlers/rules.js +32 -22
- package/lib/context/directory/handlers/rules.js.map +1 -0
- package/lib/context/directory/handlers/rulesConfigs.js +15 -3
- package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
- package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/directory/handlers/tenant.js +34 -14
- package/lib/context/directory/handlers/tenant.js.map +1 -0
- package/lib/context/directory/handlers/themes.js +21 -9
- package/lib/context/directory/handlers/themes.js.map +1 -0
- package/lib/context/directory/handlers/triggers.d.ts +1 -1
- package/lib/context/directory/handlers/triggers.js +26 -16
- package/lib/context/directory/handlers/triggers.js.map +1 -0
- package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
- package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/directory/index.js +80 -66
- package/lib/context/directory/index.js.map +1 -0
- package/lib/context/index.js +20 -9
- package/lib/context/index.js.map +1 -0
- package/lib/context/yaml/handlers/actions.js +41 -39
- package/lib/context/yaml/handlers/actions.js.map +1 -0
- package/lib/context/yaml/handlers/attackProtection.js +41 -27
- package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
- package/lib/context/yaml/handlers/branding.js +69 -47
- package/lib/context/yaml/handlers/branding.js.map +1 -0
- package/lib/context/yaml/handlers/clientGrants.js +40 -26
- package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
- package/lib/context/yaml/handlers/clients.js +85 -41
- package/lib/context/yaml/handlers/clients.js.map +1 -0
- package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
- package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/connections.js +67 -63
- package/lib/context/yaml/handlers/connections.js.map +1 -0
- package/lib/context/yaml/handlers/customDomains.js +19 -7
- package/lib/context/yaml/handlers/customDomains.js.map +1 -0
- package/lib/context/yaml/handlers/databases.js +65 -63
- package/lib/context/yaml/handlers/databases.js.map +1 -0
- package/lib/context/yaml/handlers/emailProvider.js +37 -22
- package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
- package/lib/context/yaml/handlers/emailTemplates.js +39 -28
- package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
- package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/yaml/handlers/flows.js +66 -55
- package/lib/context/yaml/handlers/flows.js.map +1 -0
- package/lib/context/yaml/handlers/forms.js +66 -55
- package/lib/context/yaml/handlers/forms.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactors.js +19 -7
- package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
- package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/yaml/handlers/hooks.js +48 -34
- package/lib/context/yaml/handlers/hooks.js.map +1 -0
- package/lib/context/yaml/handlers/index.js +3 -0
- package/lib/context/yaml/handlers/index.js.map +1 -0
- package/lib/context/yaml/handlers/logStreams.js +30 -16
- package/lib/context/yaml/handlers/logStreams.js.map +1 -0
- package/lib/context/yaml/handlers/networkACLs.js +39 -25
- package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
- package/lib/context/yaml/handlers/organizations.js +46 -37
- package/lib/context/yaml/handlers/organizations.js.map +1 -0
- package/lib/context/yaml/handlers/pages.js +39 -31
- package/lib/context/yaml/handlers/pages.js.map +1 -0
- package/lib/context/yaml/handlers/phoneProvider.js +31 -17
- package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
- package/lib/context/yaml/handlers/prompts.js +47 -22
- package/lib/context/yaml/handlers/prompts.js.map +1 -0
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js +33 -21
- package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
- package/lib/context/yaml/handlers/roles.js +33 -19
- package/lib/context/yaml/handlers/roles.js.map +1 -0
- package/lib/context/yaml/handlers/rules.js +39 -28
- package/lib/context/yaml/handlers/rules.js.map +1 -0
- package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
- package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
- package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/tenant.js +41 -19
- package/lib/context/yaml/handlers/tenant.js.map +1 -0
- package/lib/context/yaml/handlers/themes.js +19 -7
- package/lib/context/yaml/handlers/themes.js.map +1 -0
- package/lib/context/yaml/handlers/triggers.d.ts +1 -1
- package/lib/context/yaml/handlers/triggers.js +29 -15
- package/lib/context/yaml/handlers/triggers.js.map +1 -0
- package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
- package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/yaml/index.js +128 -120
- package/lib/context/yaml/index.js.map +1 -0
- package/lib/index.d.ts +96 -4
- package/lib/index.js +34 -24
- package/lib/index.js.map +1 -0
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +6 -10
- package/lib/keywordPreservation.js.map +1 -0
- package/lib/logger.js +1 -0
- package/lib/logger.js.map +1 -0
- package/lib/readonly.js +4 -3
- package/lib/readonly.js.map +1 -0
- package/lib/sessionDurationsToMinutes.js +1 -0
- package/lib/sessionDurationsToMinutes.js.map +1 -0
- package/lib/tools/auth0/client.js +127 -108
- package/lib/tools/auth0/client.js.map +1 -0
- package/lib/tools/auth0/handlers/actions.d.ts +26 -8
- package/lib/tools/auth0/handlers/actions.js +149 -138
- package/lib/tools/auth0/handlers/actions.js.map +1 -0
- package/lib/tools/auth0/handlers/attackProtection.js +92 -80
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
- package/lib/tools/auth0/handlers/branding.js +99 -75
- package/lib/tools/auth0/handlers/branding.js.map +1 -0
- package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
- package/lib/tools/auth0/handlers/clientGrants.js +72 -65
- package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
- package/lib/tools/auth0/handlers/clients.d.ts +96 -7
- package/lib/tools/auth0/handlers/clients.js +221 -66
- package/lib/tools/auth0/handlers/clients.js.map +1 -0
- package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/connections.d.ts +1 -3
- package/lib/tools/auth0/handlers/connections.js +135 -130
- package/lib/tools/auth0/handlers/connections.js.map +1 -0
- package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
- package/lib/tools/auth0/handlers/customDomains.js +53 -43
- package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
- package/lib/tools/auth0/handlers/databases.js +114 -94
- package/lib/tools/auth0/handlers/databases.js.map +1 -0
- package/lib/tools/auth0/handlers/default.d.ts +2 -2
- package/lib/tools/auth0/handlers/default.js +171 -210
- package/lib/tools/auth0/handlers/default.js.map +1 -0
- package/lib/tools/auth0/handlers/emailProvider.js +52 -41
- package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
- package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
- package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
- package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
- package/lib/tools/auth0/handlers/flows.d.ts +3 -2
- package/lib/tools/auth0/handlers/flows.js +129 -92
- package/lib/tools/auth0/handlers/flows.js.map +1 -0
- package/lib/tools/auth0/handlers/forms.d.ts +3 -3
- package/lib/tools/auth0/handlers/forms.js +112 -98
- package/lib/tools/auth0/handlers/forms.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
- package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
- package/lib/tools/auth0/handlers/hooks.js +153 -123
- package/lib/tools/auth0/handlers/hooks.js.map +1 -0
- package/lib/tools/auth0/handlers/index.js +3 -0
- package/lib/tools/auth0/handlers/index.js.map +1 -0
- package/lib/tools/auth0/handlers/logStreams.js +47 -42
- package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
- package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
- package/lib/tools/auth0/handlers/networkACLs.js +133 -115
- package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
- package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
- package/lib/tools/auth0/handlers/organizations.js +429 -360
- package/lib/tools/auth0/handlers/organizations.js.map +1 -0
- package/lib/tools/auth0/handlers/pages.js +83 -74
- package/lib/tools/auth0/handlers/pages.js.map +1 -0
- package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
- package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
- package/lib/tools/auth0/handlers/prompts.js +235 -240
- package/lib/tools/auth0/handlers/prompts.js.map +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +2 -3
- package/lib/tools/auth0/handlers/resourceServers.js +106 -57
- package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
- package/lib/tools/auth0/handlers/roles.js +178 -162
- package/lib/tools/auth0/handlers/roles.js.map +1 -0
- package/lib/tools/auth0/handlers/rules.js +162 -144
- package/lib/tools/auth0/handlers/rules.js.map +1 -0
- package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
- package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
- package/lib/tools/auth0/handlers/scimHandler.js +132 -110
- package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
- package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
- package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
- package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
- package/lib/tools/auth0/handlers/tenant.js +52 -45
- package/lib/tools/auth0/handlers/tenant.js.map +1 -0
- package/lib/tools/auth0/handlers/themes.d.ts +12 -12
- package/lib/tools/auth0/handlers/themes.js +102 -86
- package/lib/tools/auth0/handlers/themes.js.map +1 -0
- package/lib/tools/auth0/handlers/triggers.js +75 -59
- package/lib/tools/auth0/handlers/triggers.js.map +1 -0
- package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
- package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/tools/auth0/index.js +48 -35
- package/lib/tools/auth0/index.js.map +1 -0
- package/lib/tools/auth0/schema.js +4 -6
- package/lib/tools/auth0/schema.js.map +1 -0
- package/lib/tools/calculateChanges.js +15 -24
- package/lib/tools/calculateChanges.js.map +1 -0
- package/lib/tools/constants.d.ts +3 -2
- package/lib/tools/constants.js +2 -0
- package/lib/tools/constants.js.map +1 -0
- package/lib/tools/deploy.js +29 -17
- package/lib/tools/deploy.js.map +1 -0
- package/lib/tools/index.d.ts +89 -3
- package/lib/tools/index.js +2 -3
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/utils.d.ts +1 -1
- package/lib/tools/utils.js +22 -12
- package/lib/tools/utils.js.map +1 -0
- package/lib/tools/validationError.js +1 -0
- package/lib/tools/validationError.js.map +1 -0
- package/lib/types.d.ts +8 -9
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +58 -3
- package/lib/utils.js +5 -8
- package/lib/utils.js.map +1 -0
- package/package.json +12 -13
- package/tsconfig.json +3 -4
- package/eslint.config.js +0 -130
|
@@ -38,6 +38,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
40
|
})();
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
41
50
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
51
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
52
|
};
|
|
@@ -62,9 +71,7 @@ exports.schema = {
|
|
|
62
71
|
properties: {
|
|
63
72
|
customScripts: {
|
|
64
73
|
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
...constants_1.default.DATABASE_SCRIPTS.reduce((o, script) => ({ ...o, [script]: { type: 'string' } }), {}),
|
|
67
|
-
},
|
|
74
|
+
properties: Object.assign({}, constants_1.default.DATABASE_SCRIPTS.reduce((o, script) => (Object.assign(Object.assign({}, o), { [script]: { type: 'string' } })), {})),
|
|
68
75
|
},
|
|
69
76
|
attributes: {
|
|
70
77
|
type: 'object',
|
|
@@ -147,28 +154,30 @@ exports.schema = {
|
|
|
147
154
|
};
|
|
148
155
|
class DatabaseHandler extends default_1.default {
|
|
149
156
|
constructor(config) {
|
|
150
|
-
super({
|
|
151
|
-
...config,
|
|
152
|
-
type: 'databases',
|
|
153
|
-
stripUpdateFields: ['strategy', 'name'],
|
|
154
|
-
});
|
|
157
|
+
super(Object.assign(Object.assign({}, config), { type: 'databases', stripUpdateFields: ['strategy', 'name'] }));
|
|
155
158
|
}
|
|
156
159
|
objString(db) {
|
|
157
160
|
return super.objString({ name: db.name, id: db.id });
|
|
158
161
|
}
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
validate(assets) {
|
|
163
|
+
const _super = Object.create(null, {
|
|
164
|
+
validate: { get: () => super.validate }
|
|
165
|
+
});
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
const { databases } = assets;
|
|
168
|
+
// Do nothing if not set
|
|
169
|
+
if (!databases)
|
|
170
|
+
return;
|
|
171
|
+
// Validate each database
|
|
172
|
+
databases.forEach((database) => {
|
|
173
|
+
this.validateEmailUniqueConstraints(database);
|
|
174
|
+
});
|
|
175
|
+
yield _super.validate.call(this, assets);
|
|
167
176
|
});
|
|
168
|
-
await super.validate(assets);
|
|
169
177
|
}
|
|
170
178
|
validateEmailUniqueConstraints(payload) {
|
|
171
|
-
|
|
179
|
+
var _a, _b, _c, _d, _e;
|
|
180
|
+
const attributes = (_a = payload === null || payload === void 0 ? void 0 : payload.options) === null || _a === void 0 ? void 0 : _a.attributes;
|
|
172
181
|
// Only validate if attributes are present
|
|
173
182
|
if (!attributes)
|
|
174
183
|
return;
|
|
@@ -176,15 +185,15 @@ class DatabaseHandler extends default_1.default {
|
|
|
176
185
|
const usernameAttributes = attributes.username;
|
|
177
186
|
const phoneAttributes = attributes.phone_number;
|
|
178
187
|
// At least one identifier must always be active
|
|
179
|
-
const hasAnyActiveIdentifier = emailAttributes
|
|
180
|
-
usernameAttributes
|
|
181
|
-
phoneAttributes
|
|
188
|
+
const hasAnyActiveIdentifier = ((_b = emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.identifier) === null || _b === void 0 ? void 0 : _b.active) === true ||
|
|
189
|
+
((_c = usernameAttributes === null || usernameAttributes === void 0 ? void 0 : usernameAttributes.identifier) === null || _c === void 0 ? void 0 : _c.active) === true ||
|
|
190
|
+
((_d = phoneAttributes === null || phoneAttributes === void 0 ? void 0 : phoneAttributes.identifier) === null || _d === void 0 ? void 0 : _d.active) === true;
|
|
182
191
|
if (!hasAnyActiveIdentifier) {
|
|
183
192
|
throw new Error(`Database "${payload.name}": At least one identifier must be active. Either email.identifier.active, username.identifier.active, or phone_number.identifier.active must be set to true.`);
|
|
184
193
|
}
|
|
185
|
-
if (emailAttributes
|
|
194
|
+
if ((emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.unique) === false) {
|
|
186
195
|
// When email.unique = false, email.identifier.active cannot be true
|
|
187
|
-
if (emailAttributes
|
|
196
|
+
if (((_e = emailAttributes === null || emailAttributes === void 0 ? void 0 : emailAttributes.identifier) === null || _e === void 0 ? void 0 : _e.active) === true) {
|
|
188
197
|
throw new Error(`Database "${payload.name}": Cannot set email.identifier.active to true when email.unique is false. Non-unique emails cannot be used as active identifiers.`);
|
|
189
198
|
}
|
|
190
199
|
}
|
|
@@ -196,103 +205,114 @@ class DatabaseHandler extends default_1.default {
|
|
|
196
205
|
}
|
|
197
206
|
// If we going to update database, we need to get current options first
|
|
198
207
|
if (fn === 'update') {
|
|
199
|
-
return (params, payload) => this.client.connections.get(params
|
|
200
|
-
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
const
|
|
208
|
+
return (params, payload) => this.client.connections.get(params).then((response) => {
|
|
209
|
+
var _a, _b, _c;
|
|
210
|
+
const connection = response.data;
|
|
211
|
+
const attributes = (_a = payload === null || payload === void 0 ? void 0 : payload.options) === null || _a === void 0 ? void 0 : _a.attributes;
|
|
212
|
+
const requiresUsername = (_b = payload === null || payload === void 0 ? void 0 : payload.options) === null || _b === void 0 ? void 0 : _b.requires_username;
|
|
213
|
+
const validation = (_c = payload === null || payload === void 0 ? void 0 : payload.options) === null || _c === void 0 ? void 0 : _c.validation;
|
|
204
214
|
if (attributes && (requiresUsername || validation)) {
|
|
205
215
|
logger_1.default.warn('Warning: "attributes" cannot be used with "requires_username" or "validation". Please remove one of the conflicting options.');
|
|
206
216
|
}
|
|
207
217
|
else if (attributes) {
|
|
208
|
-
delete connection.options
|
|
209
|
-
delete connection.options
|
|
218
|
+
delete connection.options.validation;
|
|
219
|
+
delete connection.options.requires_username;
|
|
210
220
|
}
|
|
211
221
|
else if (requiresUsername || validation) {
|
|
212
|
-
delete connection.options
|
|
222
|
+
delete connection.options.attributes;
|
|
213
223
|
}
|
|
214
|
-
payload.options = {
|
|
224
|
+
payload.options = Object.assign(Object.assign({}, connection.options), payload.options);
|
|
215
225
|
if (payload.options && Object.keys(payload.options).length === 0) {
|
|
216
226
|
delete payload.options;
|
|
217
227
|
}
|
|
218
|
-
return this.client.connections.update(params
|
|
228
|
+
return this.client.connections.update(params, payload);
|
|
219
229
|
});
|
|
220
230
|
}
|
|
221
231
|
return this.client.connections[fn].bind(this.client.connections);
|
|
222
232
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
233
|
+
getType() {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
if (this.existing)
|
|
236
|
+
return this.existing;
|
|
237
|
+
const connections = yield (0, client_1.paginate)(this.client.connections.getAll, {
|
|
238
|
+
strategy: [auth0_1.GetConnectionsStrategyEnum.auth0],
|
|
239
|
+
checkpoint: true,
|
|
240
|
+
include_totals: true,
|
|
241
|
+
});
|
|
242
|
+
const dbConnectionsWithEnabledClients = yield Promise.all(connections.map((con) => __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
const enabledClients = yield (0, connections_1.getConnectionEnabledClients)(this.client, con.id);
|
|
244
|
+
if (enabledClients && (enabledClients === null || enabledClients === void 0 ? void 0 : enabledClients.length)) {
|
|
245
|
+
return Object.assign(Object.assign({}, con), { enabled_clients: enabledClients });
|
|
246
|
+
}
|
|
232
247
|
return con;
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
248
|
+
})));
|
|
249
|
+
// If options option is empty for all connection, log the missing options scope.
|
|
250
|
+
const isOptionExists = dbConnectionsWithEnabledClients.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
251
|
+
if (!isOptionExists) {
|
|
252
|
+
logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
|
|
236
253
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
// If options option is empty for all connection, log the missing options scope.
|
|
240
|
-
const isOptionExists = dbConnectionsWithEnabledClients.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
241
|
-
if (!isOptionExists) {
|
|
242
|
-
logger_1.default.warn(`Insufficient scope the read:connections_options scope is required to get ${this.type} options.`);
|
|
243
|
-
}
|
|
244
|
-
this.existing = dbConnectionsWithEnabledClients;
|
|
245
|
-
return this.existing;
|
|
246
|
-
}
|
|
247
|
-
async calcChanges(assets) {
|
|
248
|
-
const { databases } = assets;
|
|
249
|
-
// Do nothing if not set
|
|
250
|
-
if (!databases)
|
|
251
|
-
return {
|
|
252
|
-
del: [],
|
|
253
|
-
create: [],
|
|
254
|
-
update: [],
|
|
255
|
-
conflicts: [],
|
|
256
|
-
};
|
|
257
|
-
// Convert enabled_clients by name to the id
|
|
258
|
-
const clients = await (0, client_1.paginate)(this.client.clients.list, {
|
|
259
|
-
paginate: true,
|
|
254
|
+
this.existing = dbConnectionsWithEnabledClients;
|
|
255
|
+
return this.existing;
|
|
260
256
|
});
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
}
|
|
258
|
+
calcChanges(assets) {
|
|
259
|
+
const _super = Object.create(null, {
|
|
260
|
+
calcChanges: { get: () => super.calcChanges }
|
|
265
261
|
});
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
const { databases } = assets;
|
|
264
|
+
// Do nothing if not set
|
|
265
|
+
if (!databases)
|
|
268
266
|
return {
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
del: [],
|
|
268
|
+
create: [],
|
|
269
|
+
update: [],
|
|
270
|
+
conflicts: [],
|
|
271
271
|
};
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
// Convert enabled_clients by name to the id
|
|
273
|
+
const clients = yield (0, client_1.paginate)(this.client.clients.getAll, {
|
|
274
|
+
paginate: true,
|
|
275
|
+
include_totals: true,
|
|
276
|
+
});
|
|
277
|
+
const existingDatabasesConnections = yield (0, client_1.paginate)(this.client.connections.getAll, {
|
|
278
|
+
strategy: [auth0_1.GetConnectionsStrategyEnum.auth0],
|
|
279
|
+
checkpoint: true,
|
|
280
|
+
include_totals: true,
|
|
281
|
+
});
|
|
282
|
+
const formatted = databases.map((db) => {
|
|
283
|
+
if (db.enabled_clients) {
|
|
284
|
+
return Object.assign(Object.assign({}, db), { enabled_clients: (0, utils_1.getEnabledClients)(assets, db, existingDatabasesConnections, clients) });
|
|
285
|
+
}
|
|
286
|
+
return db;
|
|
287
|
+
});
|
|
288
|
+
return _super.calcChanges.call(this, Object.assign(Object.assign({}, assets), { databases: formatted }));
|
|
274
289
|
});
|
|
275
|
-
return super.calcChanges({ ...assets, databases: formatted });
|
|
276
290
|
}
|
|
277
291
|
// Run after clients are updated so we can convert all the enabled_clients names to id's
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
processChanges(assets) {
|
|
293
|
+
const _super = Object.create(null, {
|
|
294
|
+
processChanges: { get: () => super.processChanges }
|
|
295
|
+
});
|
|
296
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
297
|
+
const { databases } = assets;
|
|
298
|
+
// Do nothing if not set
|
|
299
|
+
if (!databases)
|
|
300
|
+
return;
|
|
301
|
+
// If options option is empty for all connection, log the missing options scope.
|
|
302
|
+
const isOptionExists = databases.every((c) => c.options && Object.keys(c.options).length > 0);
|
|
303
|
+
if (!isOptionExists) {
|
|
304
|
+
logger_1.default.warn(`Insufficient scope the update:connections_options scope is required to update ${this.type} options.`);
|
|
305
|
+
}
|
|
306
|
+
const excludedConnections = (assets.exclude && assets.exclude.databases) || [];
|
|
307
|
+
const changes = yield this.calcChanges(assets);
|
|
308
|
+
yield _super.processChanges.call(this, assets, (0, utils_1.filterExcluded)(changes, excludedConnections));
|
|
309
|
+
// process enabled clients
|
|
310
|
+
yield (0, connections_1.processConnectionEnabledClients)(this.client, this.type, (0, utils_1.filterExcluded)(changes, excludedConnections));
|
|
311
|
+
});
|
|
293
312
|
}
|
|
294
313
|
}
|
|
295
314
|
exports.default = DatabaseHandler;
|
|
296
315
|
__decorate([
|
|
297
316
|
(0, default_1.order)('60')
|
|
298
317
|
], DatabaseHandler.prototype, "processChanges", null);
|
|
318
|
+
//# sourceMappingURL=databases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databases.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/databases.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuE;AACvE,qDAAqD;AACrD,gEAAwC;AACxC,uCAAgE;AAEhE,sCAAqC;AACrC,6DAAkC;AAClC,+CAA6F;AAEhF,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;YAC/D,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,aAAa,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,UAAU,oBACL,mBAAS,CAAC,gBAAgB,CAAC,MAAM,CAClC,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,MAAM,CAA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
|
name?: string;
|
|
20
20
|
functions: {
|
|
21
|
-
|
|
21
|
+
getAll: ApiMethodOverride;
|
|
22
22
|
update: ApiMethodOverride;
|
|
23
23
|
create: ApiMethodOverride;
|
|
24
24
|
delete: ApiMethodOverride;
|
|
@@ -34,7 +34,7 @@ export default class APIHandler {
|
|
|
34
34
|
sensitiveFieldsToObfuscate?: APIHandler['sensitiveFieldsToObfuscate'];
|
|
35
35
|
stripCreateFields?: APIHandler['stripCreateFields'];
|
|
36
36
|
functions: {
|
|
37
|
-
|
|
37
|
+
getAll?: ApiMethodOverride;
|
|
38
38
|
update?: ApiMethodOverride;
|
|
39
39
|
create?: ApiMethodOverride;
|
|
40
40
|
delete?: ApiMethodOverride;
|