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
|
@@ -1,4 +1,13 @@
|
|
|
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
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -21,29 +30,35 @@ exports.schema = {
|
|
|
21
30
|
};
|
|
22
31
|
class GuardianPoliciesHandler extends default_1.default {
|
|
23
32
|
constructor(options) {
|
|
24
|
-
super({
|
|
25
|
-
...options,
|
|
26
|
-
type: 'guardianPolicies',
|
|
27
|
-
});
|
|
33
|
+
super(Object.assign(Object.assign({}, options), { type: 'guardianPolicies' }));
|
|
28
34
|
}
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
//TODO: standardize empty object literal with more intentional empty indicator
|
|
36
|
+
getType() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
// in case client version does not support the operation
|
|
39
|
+
if (!this.client.guardian || typeof this.client.guardian.getPolicies !== 'function') {
|
|
40
|
+
return {};
|
|
41
|
+
}
|
|
42
|
+
if (this.existing)
|
|
43
|
+
return this.existing;
|
|
44
|
+
const { data: policies } = yield this.client.guardian.getPolicies();
|
|
45
|
+
this.existing = { policies };
|
|
32
46
|
return this.existing;
|
|
33
|
-
|
|
34
|
-
this.existing = { policies };
|
|
35
|
-
return this.existing;
|
|
47
|
+
});
|
|
36
48
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
processChanges(assets) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
// No API to delete or create guardianPolicies, we can only update.
|
|
52
|
+
const { guardianPolicies } = assets;
|
|
53
|
+
// Do nothing if not set
|
|
54
|
+
if (!guardianPolicies || !guardianPolicies.policies)
|
|
55
|
+
return;
|
|
56
|
+
const data = guardianPolicies.policies;
|
|
57
|
+
yield this.client.guardian.updatePolicies(data);
|
|
58
|
+
this.updated += 1;
|
|
59
|
+
this.didUpdate(guardianPolicies);
|
|
60
|
+
});
|
|
47
61
|
}
|
|
48
62
|
}
|
|
49
63
|
exports.default = GuardianPoliciesHandler;
|
|
64
|
+
//# sourceMappingURL=guardianPolicies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guardianPolicies.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/guardianPolicies.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAAuC;AACvC,gEAAwC;AAG3B,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,mBAAS,CAAC,iBAAiB;aAClC;SACF;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAqB,uBAAwB,SAAQ,iBAAc;IAKjE,YAAY,OAAO;QACjB,KAAK,iCACA,OAAO,KACV,IAAI,EAAE,kBAAkB,IACxB,CAAC;IACL,CAAC;IAED,8EAA8E;IACxE,OAAO;;YACX,wDAAwD;YACxD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;gBACpF,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;YACxC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;YACpE,IAAI,CAAC,QAAQ,GAAG,EAAE,QAAQ,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;KAAA;IAEK,cAAc,CAAC,MAAc;;YACjC,mEAAmE;YACnE,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;YAEpC,wBAAwB;YACxB,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,QAAQ;gBAAE,OAAO;YAE5D,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC;YACvC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;YAChD,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;YAClB,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QACnC,CAAC;KAAA;CACF;AArCD,0CAqCC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
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
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -78,145 +87,166 @@ const getActive = (hooks) => {
|
|
|
78
87
|
};
|
|
79
88
|
class HooksHandler extends default_1.default {
|
|
80
89
|
constructor(options) {
|
|
81
|
-
super({
|
|
82
|
-
...options,
|
|
83
|
-
type: 'hooks',
|
|
84
|
-
stripUpdateFields: ['id', 'triggerId'],
|
|
85
|
-
});
|
|
90
|
+
super(Object.assign(Object.assign({}, options), { type: 'hooks', stripUpdateFields: ['id', 'triggerId'] }));
|
|
86
91
|
}
|
|
87
92
|
objString(hook) {
|
|
88
93
|
return super.objString({ name: hook.name, triggerId: hook.triggerId });
|
|
89
94
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
95
|
+
processSecrets(hooks) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
const allHooks = yield this.getType(true);
|
|
98
|
+
if (allHooks === null)
|
|
99
|
+
return;
|
|
100
|
+
const changes = {
|
|
101
|
+
create: [],
|
|
102
|
+
update: [],
|
|
103
|
+
del: [],
|
|
104
|
+
conflicts: [],
|
|
105
|
+
};
|
|
106
|
+
hooks.forEach((hook) => {
|
|
107
|
+
const current = getCertainHook(allHooks, hook.name, hook.triggerId);
|
|
108
|
+
if (current) {
|
|
109
|
+
// if the hook was deleted we don't care about its secrets
|
|
110
|
+
const oldSecrets = current.secrets || {};
|
|
111
|
+
const newSecrets = hook.secrets || {};
|
|
112
|
+
const create = {};
|
|
113
|
+
const update = {};
|
|
114
|
+
const del = [];
|
|
115
|
+
Object.keys(newSecrets).forEach((key) => {
|
|
116
|
+
if (!oldSecrets[key]) {
|
|
117
|
+
create[key] = newSecrets[key];
|
|
118
|
+
}
|
|
119
|
+
else if (newSecrets[key] !== constants_1.default.HOOKS_HIDDEN_SECRET_VALUE) {
|
|
120
|
+
update[key] = newSecrets[key];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
Object.keys(oldSecrets).forEach((key) => {
|
|
124
|
+
if (!newSecrets[key]) {
|
|
125
|
+
del.push(key);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
if (Object.keys(create).length)
|
|
129
|
+
changes.create.push({ hookId: current.id, secrets: create });
|
|
130
|
+
if (Object.keys(update).length)
|
|
131
|
+
changes.update.push({ hookId: current.id, secrets: update });
|
|
132
|
+
if (del.length)
|
|
133
|
+
changes.del.push({ hookId: current.id, secrets: del });
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
yield Promise.all(changes.del.map((data) => __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
yield this.client.hooks.deleteSecrets({ id: data.hookId }, data.secrets);
|
|
138
|
+
})));
|
|
139
|
+
yield Promise.all(changes.update.map((data) => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
yield this.client.hooks.updateSecrets({ id: data.hookId }, data.secrets);
|
|
141
|
+
})));
|
|
142
|
+
yield Promise.all(changes.create.map((data) => __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
yield this.client.hooks.addSecrets({ id: data.hookId }, data.secrets);
|
|
144
|
+
})));
|
|
129
145
|
});
|
|
130
|
-
await Promise.all(changes.del.map(async (data) => {
|
|
131
|
-
await this.client.hooks.secrets.delete(data.hookId, data.secrets);
|
|
132
|
-
}));
|
|
133
|
-
await Promise.all(changes.update.map(async (data) => {
|
|
134
|
-
await this.client.hooks.secrets.update(data.hookId, data.secrets);
|
|
135
|
-
}));
|
|
136
|
-
await Promise.all(changes.create.map(async (data) => {
|
|
137
|
-
await this.client.hooks.secrets.create(data.hookId, data.secrets);
|
|
138
|
-
}));
|
|
139
146
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
});
|
|
149
|
-
// hooks.getAll does not return code and secrets, we have to fetch hooks one-by-one
|
|
150
|
-
this.existing = await Promise.all(hooks.map((hook) => this.client.hooks
|
|
151
|
-
.get(hook.id)
|
|
152
|
-
.then((hookWithCode) => this.client.hooks.secrets
|
|
153
|
-
.get(hook.id)
|
|
154
|
-
.then(({ data: secrets }) => ({ ...hookWithCode, secrets })))));
|
|
155
|
-
return this.existing;
|
|
156
|
-
}
|
|
157
|
-
catch (err) {
|
|
158
|
-
if (err.statusCode === 404 || err.statusCode === 501) {
|
|
147
|
+
//@ts-ignore because hooks use a special reload argument
|
|
148
|
+
getType(reload) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
if (this.existing && !reload) {
|
|
151
|
+
return this.existing;
|
|
152
|
+
}
|
|
153
|
+
// in case client version does not support hooks
|
|
154
|
+
if (!this.client.hooks || typeof this.client.hooks.getAll !== 'function') {
|
|
159
155
|
return [];
|
|
160
156
|
}
|
|
161
|
-
|
|
162
|
-
|
|
157
|
+
try {
|
|
158
|
+
const hooks = yield (0, client_1.paginate)(this.client.hooks.getAll, {
|
|
159
|
+
paginate: true,
|
|
160
|
+
include_totals: true,
|
|
161
|
+
});
|
|
162
|
+
// hooks.getAll does not return code and secrets, we have to fetch hooks one-by-one
|
|
163
|
+
this.existing = yield Promise.all(hooks.map((hook) => this.client.hooks
|
|
164
|
+
.get({ id: hook.id })
|
|
165
|
+
.then(({ data: hookWithCode }) => this.client.hooks
|
|
166
|
+
.getSecrets({ id: hook.id })
|
|
167
|
+
.then(({ data: secrets }) => (Object.assign(Object.assign({}, hookWithCode), { secrets }))))));
|
|
168
|
+
return this.existing;
|
|
163
169
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
return {
|
|
172
|
-
del,
|
|
173
|
-
update: stripSecrets(update),
|
|
174
|
-
create: stripSecrets(create),
|
|
175
|
-
conflicts: stripSecrets(conflicts),
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
async validate(assets) {
|
|
179
|
-
const { hooks } = assets;
|
|
180
|
-
// Do nothing if not set
|
|
181
|
-
if (!hooks)
|
|
182
|
-
return;
|
|
183
|
-
const activeHooks = getActive(hooks);
|
|
184
|
-
ALLOWED_TRIGGER_IDS.forEach((type) => {
|
|
185
|
-
if (activeHooks[type].length > 1) {
|
|
186
|
-
// There can be only one!
|
|
187
|
-
const conflict = activeHooks[type].map((h) => h.name).join(', ');
|
|
188
|
-
const err = new Error(`Only one active hook allowed for "${type}" extensibility point. Conflicting hooks: ${conflict}`);
|
|
189
|
-
// @ts-ignore need to investigate if appending status actually works here
|
|
190
|
-
err.status = 409;
|
|
170
|
+
catch (err) {
|
|
171
|
+
if (err.statusCode === 404 || err.statusCode === 501) {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
if ((0, utils_1.isDeprecatedError)(err)) {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
191
177
|
throw err;
|
|
192
178
|
}
|
|
193
179
|
});
|
|
194
|
-
await super.validate(assets);
|
|
195
180
|
}
|
|
196
|
-
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
create:
|
|
208
|
-
|
|
209
|
-
|
|
181
|
+
calcChanges(assets) {
|
|
182
|
+
const _super = Object.create(null, {
|
|
183
|
+
calcChanges: { get: () => super.calcChanges }
|
|
184
|
+
});
|
|
185
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const { del, update, create, conflicts } = yield _super.calcChanges.call(this, assets);
|
|
187
|
+
// strip secrets before hooks creating/updating, secrets have to be handled separately
|
|
188
|
+
const stripSecrets = (list) => list.map((item) => (Object.assign(Object.assign({}, item), { secrets: undefined })));
|
|
189
|
+
return {
|
|
190
|
+
del,
|
|
191
|
+
update: stripSecrets(update),
|
|
192
|
+
create: stripSecrets(create),
|
|
193
|
+
conflicts: stripSecrets(conflicts),
|
|
194
|
+
};
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
validate(assets) {
|
|
198
|
+
const _super = Object.create(null, {
|
|
199
|
+
validate: { get: () => super.validate }
|
|
200
|
+
});
|
|
201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
202
|
+
const { hooks } = assets;
|
|
203
|
+
// Do nothing if not set
|
|
204
|
+
if (!hooks)
|
|
205
|
+
return;
|
|
206
|
+
const activeHooks = getActive(hooks);
|
|
207
|
+
ALLOWED_TRIGGER_IDS.forEach((type) => {
|
|
208
|
+
if (activeHooks[type].length > 1) {
|
|
209
|
+
// There can be only one!
|
|
210
|
+
const conflict = activeHooks[type].map((h) => h.name).join(', ');
|
|
211
|
+
const err = new Error(`Only one active hook allowed for "${type}" extensibility point. Conflicting hooks: ${conflict}`);
|
|
212
|
+
//@ts-ignore need to investigate if appending status actually works here
|
|
213
|
+
err.status = 409;
|
|
214
|
+
throw err;
|
|
215
|
+
}
|
|
210
216
|
});
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
217
|
+
yield _super.validate.call(this, assets);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
processChanges(assets) {
|
|
221
|
+
const _super = Object.create(null, {
|
|
222
|
+
processChanges: { get: () => super.processChanges }
|
|
223
|
+
});
|
|
224
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
const { hooks } = assets;
|
|
226
|
+
// Do nothing if not set
|
|
227
|
+
if (!hooks)
|
|
216
228
|
return;
|
|
229
|
+
logger_1.default.warn('Hooks are deprecated, migrate to using actions instead. See: https://auth0.com/docs/customize/actions/migrate/migrate-from-hooks-to-actions for more information.');
|
|
230
|
+
try {
|
|
231
|
+
// Figure out what needs to be updated vs created
|
|
232
|
+
const changes = yield this.calcChanges(assets);
|
|
233
|
+
yield _super.processChanges.call(this, assets, {
|
|
234
|
+
del: changes.del,
|
|
235
|
+
create: changes.create,
|
|
236
|
+
update: changes.update,
|
|
237
|
+
conflicts: changes.conflicts,
|
|
238
|
+
});
|
|
239
|
+
yield this.processSecrets(hooks);
|
|
217
240
|
}
|
|
218
|
-
|
|
219
|
-
|
|
241
|
+
catch (err) {
|
|
242
|
+
if ((0, utils_1.isDeprecatedError)(err)) {
|
|
243
|
+
logger_1.default.warn('Failed to update hooks because functionality has been deprecated in favor of actions. See: https://auth0.com/docs/customize/actions/migrate/migrate-from-hooks-to-actions for more information.');
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
throw err;
|
|
247
|
+
}
|
|
248
|
+
});
|
|
220
249
|
}
|
|
221
250
|
}
|
|
222
251
|
exports.default = HooksHandler;
|
|
252
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/hooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wDAAuC;AACvC,gEAAwC;AAExC,6DAAkC;AAClC,uCAAgD;AAChD,sCAAqC;AAErC,MAAM,mBAAmB,GAAG;IAC1B,sBAAsB;IACtB,uBAAuB;IACvB,wBAAwB;IACxB,sBAAsB;IACtB,oBAAoB;CACrB,CAAC;AAEW,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CAC1B,CAAC;AA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zB,wBAAwB;YACxB,IAAI,CAAC,KAAK;gBAAE,OAAO;YAEnB,gBAAG,CAAC,IAAI,CACN,mKAAmK,CACpK,CAAC;YAEF,IAAI,CAAC;gBACH,iDAAiD;gBACjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAC/C,MAAM,OAAM,cAAc,YAAC,MAAM,EAAE;oBACjC,GAAG,EAAE,OAAO,CAAC,GAAG;oBAChB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC7B,CAAC,CAAC;gBAEH,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YACnC,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,IAAA,yBAAiB,EAAC,GAAG,CAAC,EAAE,CAAC;oBAC3B,gBAAG,CAAC,IAAI,CACN,iMAAiM,CAClM,CAAC;oBACF,OAAO;gBACT,CAAC;gBACD,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;KAAA;CACF;AA7LD,+BA6LC"}
|
|
@@ -68,6 +68,7 @@ const flowVaultConnections = __importStar(require("./flowVaultConnections"));
|
|
|
68
68
|
const selfServiceProfiles = __importStar(require("./selfServiceProfiles"));
|
|
69
69
|
const networkACLs = __importStar(require("./networkACLs"));
|
|
70
70
|
const userAttributeProfiles = __importStar(require("./userAttributeProfiles"));
|
|
71
|
+
const connectionProfiles = __importStar(require("./connectionProfiles"));
|
|
71
72
|
const auth0ApiHandlers = {
|
|
72
73
|
rules,
|
|
73
74
|
rulesConfigs,
|
|
@@ -105,5 +106,7 @@ const auth0ApiHandlers = {
|
|
|
105
106
|
selfServiceProfiles,
|
|
106
107
|
networkACLs,
|
|
107
108
|
userAttributeProfiles,
|
|
109
|
+
connectionProfiles,
|
|
108
110
|
};
|
|
109
111
|
exports.default = auth0ApiHandlers; // TODO: apply stronger types to schema properties
|
|
112
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,6DAA+C;AAC/C,+CAAiC;AACjC,+CAAiC;AACjC,mEAAqD;AACrD,uDAAyC;AACzC,2DAA6C;AAC7C,mDAAqC;AACrC,iDAAmC;AACnC,+DAAiD;AACjD,iEAAmD;AACnD,6DAA+C;AAC/C,mEAAqD;AACrD,mFAAqE;AACrE,mFAAqE;AACrE,qEAAuD;AACvD,2GAA6F;AAC7F,mGAAqF;AACrF,+CAAiC;AACjC,qDAAuC;AACvC,gEAAkD;AAClD,mDAAqC;AACrC,mDAAqC;AACrC,qDAAuC;AACvC,+DAAiD;AACjD,qEAAuD;AACvD,yDAA2C;AAC3C,+DAAiD;AACjD,iDAAmC;AACnC,+CAAiC;AACjC,+CAAiC;AACjC,6EAA+D;AAC/D,2EAA6D;AAC7D,2DAA6C;AAC7C,+EAAiE;AACjE,yEAA2D;AAK3D,MAAM,gBAAgB,GAAiC;IACrD,KAAK;IACL,YAAY;IACZ,KAAK;IACL,KAAK;IACL,eAAe;IACf,OAAO;IACP,SAAS;IACT,WAAW;IACX,MAAM;IACN,aAAa;IACb,cAAc;IACd,YAAY;IACZ,eAAe;IACf,uBAAuB;IACvB,uBAAuB;IACvB,gBAAgB;IAChB,mCAAmC;IACnC,+BAA+B;IAC/B,KAAK;IACL,QAAQ;IACR,cAAc;IACd,sEAAsE;IACtE,OAAO;IACP,OAAO;IACP,QAAQ;IACR,aAAa;IACb,gBAAgB;IAChB,UAAU;IACV,aAAa;IACb,MAAM;IACN,KAAK;IACL,KAAK;IACL,oBAAoB;IACpB,mBAAmB;IACnB,WAAW;IACX,qBAAqB;IACrB,kBAAkB;CACnB,CAAC;AAEF,kBAAe,gBAEd,CAAC,CAAC,kDAAkD"}
|
|
@@ -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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
51
|
exports.schema = void 0;
|
|
43
52
|
const default_1 = __importStar(require("./default"));
|
|
@@ -86,59 +95,55 @@ exports.schema = {
|
|
|
86
95
|
};
|
|
87
96
|
class LogStreamsHandler extends default_1.default {
|
|
88
97
|
constructor(config) {
|
|
89
|
-
super({
|
|
90
|
-
...config,
|
|
91
|
-
type: 'logStreams',
|
|
92
|
-
stripUpdateFields: ['type'],
|
|
93
|
-
stripCreateFields: ['status', 'sink.awsPartnerEventSource', 'sink.azurePartnerTopic'],
|
|
94
|
-
sensitiveFieldsToObfuscate: [
|
|
98
|
+
super(Object.assign(Object.assign({}, config), { type: 'logStreams', stripUpdateFields: ['type'], stripCreateFields: ['status', 'sink.awsPartnerEventSource', 'sink.azurePartnerTopic'], sensitiveFieldsToObfuscate: [
|
|
95
99
|
'sink.httpAuthorization',
|
|
96
100
|
'sink.splunkToken',
|
|
97
101
|
'sink.datadogApiKey',
|
|
98
|
-
]
|
|
99
|
-
functions: {
|
|
100
|
-
update: async (params, payload) => this.client.logStreams.update(params?.id, payload),
|
|
101
|
-
},
|
|
102
|
-
});
|
|
102
|
+
] }));
|
|
103
103
|
}
|
|
104
104
|
objString(item) {
|
|
105
105
|
return super.objString(item.name);
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
getType() {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
if (this.existing) {
|
|
110
|
+
return this.existing;
|
|
111
|
+
}
|
|
112
|
+
const logStreams = yield this.client.logStreams.getAll().then(({ data: logStreams }) => logStreams.map((logStream) => {
|
|
113
|
+
if (logStream.status === 'suspended')
|
|
114
|
+
delete logStream.status;
|
|
115
|
+
return logStream;
|
|
116
|
+
}));
|
|
117
|
+
this.existing = logStreams;
|
|
118
|
+
return logStreams;
|
|
119
|
+
});
|
|
118
120
|
}
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
121
|
+
processChanges(assets) {
|
|
122
|
+
const _super = Object.create(null, {
|
|
123
|
+
processChanges: { get: () => super.processChanges }
|
|
124
|
+
});
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
const { logStreams } = assets;
|
|
127
|
+
if (!logStreams)
|
|
128
|
+
return;
|
|
129
|
+
const changes = yield this.calcChanges(assets).then((changes) => (Object.assign(Object.assign({}, changes), { update: changes.update.map((update) => {
|
|
130
|
+
if (update.type === 'eventbridge' || update.type === 'eventgrid') {
|
|
131
|
+
delete update.sink;
|
|
132
|
+
}
|
|
133
|
+
if (update.status === 'suspended') {
|
|
134
|
+
// @ts-ignore because while status is usually expected for update payloads, it is ok to be omitted
|
|
135
|
+
// for suspended log streams. Setting as `active` in these instances would probably be ok
|
|
136
|
+
// but bit presumptuous, let suspended log streams remain suspended.
|
|
137
|
+
delete update.status;
|
|
138
|
+
}
|
|
139
|
+
return update;
|
|
140
|
+
}) })));
|
|
141
|
+
yield _super.processChanges.call(this, assets, changes);
|
|
142
|
+
});
|
|
139
143
|
}
|
|
140
144
|
}
|
|
141
145
|
exports.default = LogStreamsHandler;
|
|
142
146
|
__decorate([
|
|
143
147
|
(0, default_1.order)('70')
|
|
144
148
|
], LogStreamsHandler.prototype, "processChanges", null);
|
|
149
|
+
//# sourceMappingURL=logStreams.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logStreams.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/logStreams.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAqD;AAGxC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE;YACnE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,YAAY,CAAC;gBACxB,UAAU,E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AI,SAAS,CAAC,MAAM,KAAK,WAAW;oBAAE,OAAQ,SAAiB,CAAC,MAAM,CAAC;gBACvE,OAAO,SAAS,CAAC;YACnB,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;YAE3B,OAAO,UAAU,CAAC;QACpB,CAAC;KAAA;IAGK,cAAc,CAAC,MAAc;;;;;YACjC,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;YAE9B,IAAI,CAAC,UAAU;gBAAE,OAAO;YAExB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5D,OAAO,KACV,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAiB,EAAE,EAAE;oBAC/C,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;wBACjE,OAAO,MAAM,CAAC,IAAI,CAAC;oBACrB,CAAC;oBACD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;wBAClC,kGAAkG;wBAClG,yFAAyF;wBACzF,oEAAoE;wBACpE,OAAO,MAAM,CAAC,MAAM,CAAC;oBACvB,CAAC;oBACD,OAAO,MAAM,CAAC;gBAChB,CAAC,CAAC,IACF,CAAC,CAAC;YAEJ,MAAM,OAAM,cAAc,YAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,CAAC;KAAA;CACF;AA9DD,oCA8DC;AAvBO;IADL,IAAA,eAAK,EAAC,IAAI,CAAC;uDAuBX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetNetworkAclsById200Response } from 'auth0';
|
|
2
2
|
import DefaultAPIHandler from './default';
|
|
3
3
|
import { Asset, Assets, CalculatedChanges } from '../../../types';
|
|
4
|
-
export type NetworkACL =
|
|
4
|
+
export type NetworkACL = GetNetworkAclsById200Response;
|
|
5
5
|
export declare const schema: {
|
|
6
6
|
type: string;
|
|
7
7
|
description: string;
|
|
@@ -246,12 +246,11 @@ export declare const schema: {
|
|
|
246
246
|
export default class NetworkACLsHandler extends DefaultAPIHandler {
|
|
247
247
|
existing: NetworkACL[] | null;
|
|
248
248
|
constructor(config: DefaultAPIHandler);
|
|
249
|
-
objString(acl: NetworkACL): string;
|
|
250
249
|
getType(): Promise<Asset | null>;
|
|
251
250
|
processChanges(assets: Assets): Promise<void>;
|
|
252
|
-
createNetworkACL(acl: NetworkACL): Promise<
|
|
251
|
+
createNetworkACL(acl: NetworkACL): Promise<Asset>;
|
|
253
252
|
createNetworkACLs(creates: CalculatedChanges['create']): Promise<void>;
|
|
254
|
-
updateNetworkACL(acl: NetworkACL): Promise<
|
|
253
|
+
updateNetworkACL(acl: NetworkACL): Promise<import("auth0").ApiResponse<GetNetworkAclsById200Response>>;
|
|
255
254
|
updateNetworkACLs(updates: CalculatedChanges['update']): Promise<void>;
|
|
256
255
|
deleteNetworkACL(acl: NetworkACL): Promise<void>;
|
|
257
256
|
deleteNetworkACLs(data: Asset[]): Promise<void>;
|