auth0-deploy-cli 8.22.0 → 8.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +57 -5
- package/CHANGELOG.md +41 -2
- package/README.md +1 -1
- package/eslint.config.js +131 -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.d.ts +1 -0
- package/lib/context/defaults.js +57 -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 +44 -57
- package/lib/context/directory/handlers/connectionProfiles.d.ts +1 -1
- package/lib/context/directory/handlers/connectionProfiles.js +20 -30
- 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 +40 -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 +4 -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/phoneTemplates.d.ts +6 -0
- package/lib/context/directory/handlers/phoneTemplates.js +39 -0
- 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/tokenExchangeProfiles.d.ts +5 -0
- package/lib/context/directory/handlers/tokenExchangeProfiles.js +41 -0
- 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 +69 -84
- package/lib/context/yaml/handlers/connectionProfiles.d.ts +1 -1
- package/lib/context/yaml/handlers/connectionProfiles.js +20 -34
- 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 +37 -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 +4 -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/phoneTemplates.d.ts +6 -0
- package/lib/context/yaml/handlers/phoneTemplates.js +25 -0
- 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/tokenExchangeProfiles.d.ts +5 -0
- package/lib/context/yaml/handlers/tokenExchangeProfiles.js +27 -0
- 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 -96
- package/lib/index.js +24 -34
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +11 -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 +108 -127
- 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 -9
- package/lib/tools/auth0/handlers/clientGrants.js +68 -73
- package/lib/tools/auth0/handlers/clients.d.ts +17 -16
- package/lib/tools/auth0/handlers/clients.js +120 -106
- package/lib/tools/auth0/handlers/connectionProfiles.d.ts +3 -1
- package/lib/tools/auth0/handlers/connectionProfiles.js +36 -32
- 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.d.ts +1 -0
- package/lib/tools/auth0/handlers/emailTemplates.js +54 -70
- package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +5 -12
- package/lib/tools/auth0/handlers/flowVaultConnections.js +102 -145
- 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 +4 -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 +350 -431
- 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/phoneTemplates.d.ts +63 -0
- package/lib/tools/auth0/handlers/phoneTemplates.js +221 -0
- package/lib/tools/auth0/handlers/prompts.d.ts +7 -7
- package/lib/tools/auth0/handlers/prompts.js +246 -240
- package/lib/tools/auth0/handlers/resourceServers.d.ts +6 -2
- package/lib/tools/auth0/handlers/resourceServers.js +94 -105
- package/lib/tools/auth0/handlers/roles.js +149 -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 +12 -3
- package/lib/tools/auth0/handlers/selfServiceProfiles.js +173 -203
- package/lib/tools/auth0/handlers/tenant.d.ts +5 -3
- package/lib/tools/auth0/handlers/tenant.js +46 -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/tokenExchangeProfiles.d.ts +60 -0
- package/lib/tools/auth0/handlers/tokenExchangeProfiles.js +263 -0
- 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 +41 -43
- 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 +4 -2
- package/lib/tools/constants.js +3 -1
- package/lib/tools/deploy.js +17 -29
- package/lib/tools/index.d.ts +3 -89
- 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 +13 -5
- package/lib/types.js +0 -1
- package/lib/utils.d.ts +3 -58
- package/lib/utils.js +8 -5
- package/package.json +11 -10
- 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/connectionProfiles.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/connectionProfiles.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/connectionProfiles.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
package/.circleci/config.yml
CHANGED
|
@@ -6,7 +6,7 @@ orbs:
|
|
|
6
6
|
jobs:
|
|
7
7
|
e2e_test_as_node_module:
|
|
8
8
|
docker:
|
|
9
|
-
- image: cimg/node:22.
|
|
9
|
+
- image: cimg/node:22.12.0
|
|
10
10
|
working_directory: ~/repo
|
|
11
11
|
steps:
|
|
12
12
|
- checkout
|
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
|
|
16
16
|
e2e_test_as_cli:
|
|
17
17
|
docker:
|
|
18
|
-
- image: cimg/node:22.
|
|
18
|
+
- image: cimg/node:22.12.0
|
|
19
19
|
working_directory: ~/repo
|
|
20
20
|
steps:
|
|
21
21
|
- checkout
|
|
@@ -66,15 +66,42 @@ jobs:
|
|
|
66
66
|
name: Publish package
|
|
67
67
|
command: npm publish
|
|
68
68
|
|
|
69
|
+
deploy_beta:
|
|
70
|
+
parameters:
|
|
71
|
+
v:
|
|
72
|
+
type: string
|
|
73
|
+
default: "lts"
|
|
74
|
+
docker:
|
|
75
|
+
- image: cimg/node:<< parameters.v >>
|
|
76
|
+
working_directory: ~/repo
|
|
77
|
+
steps:
|
|
78
|
+
- attach_workspace:
|
|
79
|
+
at: ~/repo
|
|
80
|
+
- run:
|
|
81
|
+
name: Authenticate with registry
|
|
82
|
+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
|
|
83
|
+
- run:
|
|
84
|
+
name: Publish beta package
|
|
85
|
+
command: npm publish --tag beta
|
|
86
|
+
|
|
69
87
|
does_typescript_compile:
|
|
70
88
|
docker:
|
|
71
|
-
- image: cimg/node:22.
|
|
89
|
+
- image: cimg/node:22.12.0
|
|
72
90
|
working_directory: ~/repo
|
|
73
91
|
steps:
|
|
74
92
|
- checkout
|
|
75
93
|
- run: npm ci
|
|
76
94
|
- run: npx tsc --noEmit
|
|
77
95
|
|
|
96
|
+
does_lint_pass:
|
|
97
|
+
docker:
|
|
98
|
+
- image: cimg/node:22.12.0
|
|
99
|
+
working_directory: ~/repo
|
|
100
|
+
steps:
|
|
101
|
+
- checkout
|
|
102
|
+
- run: npm ci
|
|
103
|
+
- run: npm run lint
|
|
104
|
+
|
|
78
105
|
workflows:
|
|
79
106
|
version: 2
|
|
80
107
|
|
|
@@ -92,12 +119,14 @@ workflows:
|
|
|
92
119
|
jobs:
|
|
93
120
|
- does_typescript_compile:
|
|
94
121
|
name: Does Typescript compile?
|
|
122
|
+
- does_lint_pass:
|
|
123
|
+
name: Does lint pass?
|
|
95
124
|
- unit_test:
|
|
96
125
|
name: Unit tests with Node LTS
|
|
97
126
|
v: "lts"
|
|
98
127
|
- unit_test:
|
|
99
128
|
name: Unit tests with Node current
|
|
100
|
-
v: "22.
|
|
129
|
+
v: "22.12.0"
|
|
101
130
|
|
|
102
131
|
test_and_deploy:
|
|
103
132
|
jobs:
|
|
@@ -118,6 +147,29 @@ workflows:
|
|
|
118
147
|
branches:
|
|
119
148
|
ignore: /.*/
|
|
120
149
|
tags:
|
|
121
|
-
only: /^v
|
|
150
|
+
only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
|
|
151
|
+
context:
|
|
152
|
+
- publish-npm
|
|
153
|
+
|
|
154
|
+
test_and_deploy_beta:
|
|
155
|
+
jobs:
|
|
156
|
+
- unit_test:
|
|
157
|
+
name: Unit tests with Node LTS (Beta)
|
|
158
|
+
v: "lts"
|
|
159
|
+
filters:
|
|
160
|
+
branches:
|
|
161
|
+
only: beta
|
|
162
|
+
tags:
|
|
163
|
+
only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
|
|
164
|
+
- deploy_beta:
|
|
165
|
+
name: Publish Beta to NPM
|
|
166
|
+
v: "lts"
|
|
167
|
+
requires:
|
|
168
|
+
- Unit tests with Node LTS (Beta)
|
|
169
|
+
filters:
|
|
170
|
+
branches:
|
|
171
|
+
ignore: /.*/
|
|
172
|
+
tags:
|
|
173
|
+
only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
|
|
122
174
|
context:
|
|
123
175
|
- publish-npm
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.23.1] - 2025-12-18
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fix resolve race conditions in processChanges for handlers. [#1240]
|
|
15
|
+
- Fix client grants pagination to use checkpoint. [#1239]
|
|
16
|
+
|
|
17
|
+
## [8.23.0] - 2025-12-16
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Add support for `brute-force-protection` in prompts custom-text. [#1221]
|
|
22
|
+
- Add support for `phoneTemplates`. [#1224]
|
|
23
|
+
- Add support for `tokenExchangeProfiles`. [#1232]
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Upgrading `node-auth0` from v4 to v5. [#1207]
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Fix `improved_signup_bot_detection_in_classic` is added in allowed `tenant` flags. [#1231]
|
|
32
|
+
|
|
10
33
|
## [8.22.0] - 2025-12-10
|
|
11
34
|
|
|
12
35
|
### Added
|
|
@@ -30,6 +53,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
53
|
|
|
31
54
|
- Fix handle responses when paginating custom domains. [#1214]
|
|
32
55
|
|
|
56
|
+
## [8.20.4-beta.0] - 2025-12-02
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- Upgrading node-auth0 from v4 to v5 [beta]. [#1207]
|
|
61
|
+
|
|
33
62
|
## [8.20.3] - 2025-11-14
|
|
34
63
|
|
|
35
64
|
### Fixed
|
|
@@ -1535,15 +1564,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1535
1564
|
[#1200]: https://github.com/auth0/auth0-deploy-cli/issues/1200
|
|
1536
1565
|
[#1203]: https://github.com/auth0/auth0-deploy-cli/issues/1203
|
|
1537
1566
|
[#1204]: https://github.com/auth0/auth0-deploy-cli/issues/1204
|
|
1567
|
+
[#1207]: https://github.com/auth0/auth0-deploy-cli/issues/1207
|
|
1538
1568
|
[#1209]: https://github.com/auth0/auth0-deploy-cli/issues/1209
|
|
1539
1569
|
[#1211]: https://github.com/auth0/auth0-deploy-cli/issues/1211
|
|
1540
1570
|
[#1212]: https://github.com/auth0/auth0-deploy-cli/issues/1212
|
|
1541
1571
|
[#1214]: https://github.com/auth0/auth0-deploy-cli/issues/1214
|
|
1572
|
+
[#1221]: https://github.com/auth0/auth0-deploy-cli/issues/1221
|
|
1542
1573
|
[#1223]: https://github.com/auth0/auth0-deploy-cli/issues/1223
|
|
1574
|
+
[#1224]: https://github.com/auth0/auth0-deploy-cli/issues/1224
|
|
1543
1575
|
[#1229]: https://github.com/auth0/auth0-deploy-cli/issues/1229
|
|
1544
|
-
[
|
|
1576
|
+
[#1231]: https://github.com/auth0/auth0-deploy-cli/issues/1231
|
|
1577
|
+
[#1232]: https://github.com/auth0/auth0-deploy-cli/issues/1232
|
|
1578
|
+
[#1239]: https://github.com/auth0/auth0-deploy-cli/issues/1239
|
|
1579
|
+
[#1240]: https://github.com/auth0/auth0-deploy-cli/issues/1240
|
|
1580
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.1...HEAD
|
|
1581
|
+
[8.23.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.0...v8.23.1
|
|
1582
|
+
[8.23.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.22.0...v8.23.0
|
|
1545
1583
|
[8.22.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.21.0...v8.22.0
|
|
1546
|
-
[8.21.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.
|
|
1584
|
+
[8.21.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.4-beta.0...v8.21.0
|
|
1585
|
+
[8.20.4-beta.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.3...v8.20.4-beta.0
|
|
1547
1586
|
[8.20.3]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.2...v8.20.3
|
|
1548
1587
|
[8.20.2]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.1...v8.20.2
|
|
1549
1588
|
[8.20.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.0...v8.20.1
|
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ This guide will help you to a working implementation of the Deploy CLI tool used
|
|
|
48
48
|
|
|
49
49
|
### Prerequisites
|
|
50
50
|
|
|
51
|
-
- [Node](https://nodejs.dev/) version 20(v20.
|
|
51
|
+
- [Node](https://nodejs.dev/) version 20(v20.19.0) or greater
|
|
52
52
|
- [Auth0 Tenant](https://auth0.com/)
|
|
53
53
|
|
|
54
54
|
### Install the Deploy CLI
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
const js = require('@eslint/js');
|
|
2
|
+
const tsParser = require('@typescript-eslint/parser');
|
|
3
|
+
const tsEslint = require('@typescript-eslint/eslint-plugin');
|
|
4
|
+
const importPlugin = require('eslint-plugin-import');
|
|
5
|
+
const globals = require('globals');
|
|
6
|
+
const eslintConfigPrettier = require('eslint-config-prettier');
|
|
7
|
+
|
|
8
|
+
const baseRecommended = js.configs.recommended;
|
|
9
|
+
|
|
10
|
+
module.exports = [
|
|
11
|
+
{
|
|
12
|
+
ignores: [
|
|
13
|
+
'coverage/**',
|
|
14
|
+
'examples/**',
|
|
15
|
+
'local/**',
|
|
16
|
+
'node_modules/**',
|
|
17
|
+
'lib/**',
|
|
18
|
+
'test/e2e/testdata/**',
|
|
19
|
+
'webpack/**',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
...baseRecommended,
|
|
24
|
+
files: ['**/*.{js,ts,cjs,mjs}'],
|
|
25
|
+
linterOptions: {
|
|
26
|
+
reportUnusedDisableDirectives: 'off',
|
|
27
|
+
},
|
|
28
|
+
languageOptions: {
|
|
29
|
+
...(baseRecommended.languageOptions ?? {}),
|
|
30
|
+
parser: tsParser,
|
|
31
|
+
parserOptions: {
|
|
32
|
+
...(baseRecommended.languageOptions?.parserOptions ?? {}),
|
|
33
|
+
ecmaVersion: 2020,
|
|
34
|
+
sourceType: 'module',
|
|
35
|
+
},
|
|
36
|
+
globals: {
|
|
37
|
+
...(baseRecommended.languageOptions?.globals ?? {}),
|
|
38
|
+
...globals.es2020,
|
|
39
|
+
...globals.node,
|
|
40
|
+
...globals.mocha,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
plugins: {
|
|
44
|
+
...(baseRecommended.plugins ?? {}),
|
|
45
|
+
import: importPlugin,
|
|
46
|
+
'@typescript-eslint': tsEslint,
|
|
47
|
+
},
|
|
48
|
+
settings: {
|
|
49
|
+
'import/resolver': {
|
|
50
|
+
node: {
|
|
51
|
+
extensions: ['.js', '.ts', '.mjs', '.cjs'],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
rules: {
|
|
56
|
+
...(baseRecommended.rules ?? {}),
|
|
57
|
+
'max-len': 'off',
|
|
58
|
+
'class-methods-use-this': 'off',
|
|
59
|
+
'comma-dangle': 'off',
|
|
60
|
+
'eol-last': ['error', 'always'],
|
|
61
|
+
indent: [
|
|
62
|
+
'error',
|
|
63
|
+
2,
|
|
64
|
+
{
|
|
65
|
+
SwitchCase: 1,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'import/no-extraneous-dependencies': [
|
|
69
|
+
'error',
|
|
70
|
+
{
|
|
71
|
+
devDependencies: true,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
'import/no-dynamic-require': 'off',
|
|
75
|
+
'prefer-arrow-callback': 'off',
|
|
76
|
+
'object-shorthand': 'off',
|
|
77
|
+
'prefer-template': 'off',
|
|
78
|
+
'func-names': 'off',
|
|
79
|
+
'new-cap': 'off',
|
|
80
|
+
'no-await-in-loop': 'off',
|
|
81
|
+
'no-param-reassign': 'off',
|
|
82
|
+
'no-multiple-empty-lines': [
|
|
83
|
+
'error',
|
|
84
|
+
{
|
|
85
|
+
max: 1,
|
|
86
|
+
maxEOF: 0,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
'no-plusplus': 'off',
|
|
90
|
+
'no-extra-boolean-cast': 'off',
|
|
91
|
+
'no-useless-escape': 'off',
|
|
92
|
+
'no-redeclare': 'off',
|
|
93
|
+
'no-unused-vars': 'off',
|
|
94
|
+
'no-console': 'warn',
|
|
95
|
+
'@typescript-eslint/no-unused-vars': [
|
|
96
|
+
'error',
|
|
97
|
+
{
|
|
98
|
+
argsIgnorePattern: '^_',
|
|
99
|
+
varsIgnorePattern: '^_',
|
|
100
|
+
caughtErrors: 'none',
|
|
101
|
+
ignoreRestSiblings: true,
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
'@typescript-eslint/no-redeclare': 'off',
|
|
105
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
106
|
+
'no-var': 'off',
|
|
107
|
+
'object-curly-spacing': ['error', 'always'],
|
|
108
|
+
quotes: [
|
|
109
|
+
'error',
|
|
110
|
+
'single',
|
|
111
|
+
{
|
|
112
|
+
avoidEscape: true,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
semi: ['error', 'always'],
|
|
116
|
+
strict: 'off',
|
|
117
|
+
'space-before-blocks': ['error', 'always'],
|
|
118
|
+
'import/extensions': [
|
|
119
|
+
'error',
|
|
120
|
+
'ignorePackages',
|
|
121
|
+
{
|
|
122
|
+
js: 'never',
|
|
123
|
+
ts: 'never',
|
|
124
|
+
mjs: 'never',
|
|
125
|
+
cjs: 'never',
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
eslintConfigPrettier,
|
|
131
|
+
];
|
package/lib/args.js
CHANGED
package/lib/commands/export.js
CHANGED
|
@@ -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
|
};
|
|
@@ -19,44 +10,45 @@ const mkdirp_1 = __importDefault(require("mkdirp"));
|
|
|
19
10
|
const logger_1 = __importDefault(require("../logger"));
|
|
20
11
|
const utils_1 = require("../utils");
|
|
21
12
|
const index_1 = require("../context/index");
|
|
22
|
-
function exportCMD(params) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
13
|
+
async function exportCMD(params) {
|
|
14
|
+
const { output_folder: outputFolder, base_path: basePath, config_file: configFile, config: configObj, export_ids: exportIds, secret: clientSecret, env: shouldInheritEnv = false, experimental_ea: experimentalEA, } = params;
|
|
15
|
+
if (shouldInheritEnv) {
|
|
16
|
+
nconf_1.default.env().use('memory');
|
|
17
|
+
}
|
|
18
|
+
if (configFile) {
|
|
19
|
+
nconf_1.default.file(configFile);
|
|
20
|
+
}
|
|
21
|
+
const overrides = {
|
|
22
|
+
AUTH0_INPUT_FILE: outputFolder,
|
|
23
|
+
AUTH0_BASE_PATH: basePath,
|
|
24
|
+
...(configObj || {}),
|
|
25
|
+
};
|
|
26
|
+
// Prepare configuration by initializing nconf, then passing that as the provider to the config object
|
|
27
|
+
// Allow passed in secret to override the configured one
|
|
28
|
+
if (clientSecret) {
|
|
29
|
+
overrides.AUTH0_CLIENT_SECRET = clientSecret;
|
|
30
|
+
}
|
|
31
|
+
// Allow passed in export_ids to override the configured one
|
|
32
|
+
if (exportIds) {
|
|
33
|
+
overrides.AUTH0_EXPORT_IDENTIFIERS = exportIds;
|
|
34
|
+
}
|
|
35
|
+
// Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
|
|
36
|
+
if (experimentalEA) {
|
|
37
|
+
overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
|
|
38
|
+
// nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
|
|
39
|
+
nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
|
|
40
|
+
}
|
|
41
|
+
// Check output folder
|
|
42
|
+
if (!(0, utils_1.isDirectory)(outputFolder)) {
|
|
43
|
+
logger_1.default.info(`Creating ${outputFolder}`);
|
|
44
|
+
mkdirp_1.default.sync(outputFolder);
|
|
45
|
+
}
|
|
46
|
+
if (params.format === 'yaml') {
|
|
47
|
+
overrides.AUTH0_INPUT_FILE = path_1.default.join(outputFolder, 'tenant.yaml');
|
|
48
|
+
}
|
|
49
|
+
nconf_1.default.overrides(overrides);
|
|
50
|
+
// Setup context and load
|
|
51
|
+
const context = await (0, index_1.setupContext)(nconf_1.default.get(), 'export');
|
|
52
|
+
await context.dump();
|
|
53
|
+
logger_1.default.info('Export Successful');
|
|
61
54
|
}
|
|
62
|
-
//# sourceMappingURL=export.js.map
|
package/lib/commands/import.js
CHANGED
|
@@ -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,38 +9,40 @@ const configFactory_1 = require("../configFactory");
|
|
|
18
9
|
const tools_1 = require("../tools");
|
|
19
10
|
const logger_1 = __importDefault(require("../logger"));
|
|
20
11
|
const context_1 = require("../context");
|
|
21
|
-
function importCMD(params) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
12
|
+
async function importCMD(params) {
|
|
13
|
+
const { input_file: inputFile, base_path: basePath, config_file: configFile, config: configObj, env: shouldInheritEnv = false, secret: clientSecret, experimental_ea: experimentalEA, } = params;
|
|
14
|
+
if (shouldInheritEnv) {
|
|
15
|
+
nconf_1.default.env().use('memory');
|
|
16
|
+
const mappings = nconf_1.default.get('AUTH0_KEYWORD_REPLACE_MAPPINGS') || {};
|
|
17
|
+
nconf_1.default.set('AUTH0_KEYWORD_REPLACE_MAPPINGS', Object.assign(mappings, process.env));
|
|
18
|
+
}
|
|
19
|
+
if (configFile) {
|
|
20
|
+
nconf_1.default.file(configFile);
|
|
21
|
+
}
|
|
22
|
+
const overrides = {
|
|
23
|
+
AUTH0_INPUT_FILE: inputFile,
|
|
24
|
+
AUTH0_BASE_PATH: basePath,
|
|
25
|
+
AUTH0_KEYWORD_REPLACE_MAPPINGS: {},
|
|
26
|
+
...(configObj || {}),
|
|
27
|
+
};
|
|
28
|
+
// Prepare configuration by initializing nconf, then passing that as the provider to the config object
|
|
29
|
+
// Allow passed in secret to override the configured one
|
|
30
|
+
if (clientSecret) {
|
|
31
|
+
overrides.AUTH0_CLIENT_SECRET = clientSecret;
|
|
32
|
+
}
|
|
33
|
+
// Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
|
|
34
|
+
if (experimentalEA) {
|
|
35
|
+
overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
|
|
36
|
+
// nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
|
|
37
|
+
nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
|
|
38
|
+
}
|
|
39
|
+
nconf_1.default.overrides(overrides);
|
|
40
|
+
// Setup context and load
|
|
41
|
+
const context = await (0, context_1.setupContext)(nconf_1.default.get(), 'import');
|
|
42
|
+
await context.loadAssetsFromLocal();
|
|
43
|
+
const config = (0, configFactory_1.configFactory)();
|
|
44
|
+
config.setProvider((key) => nconf_1.default.get(key));
|
|
45
|
+
//@ts-ignore because context and assets still need to be typed TODO: type assets and type context
|
|
46
|
+
await (0, tools_1.deploy)(context.assets, context.mgmtClient, config);
|
|
47
|
+
logger_1.default.info('Import Successful');
|
|
54
48
|
}
|
|
55
|
-
//# sourceMappingURL=import.js.map
|
package/lib/commands/index.js
CHANGED
package/lib/configFactory.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AttackProtection } from '../tools/auth0/handlers/attackProtection';
|
|
2
2
|
export declare function emailProviderDefaults(emailProvider: any): any;
|
|
3
3
|
export declare function phoneProviderDefaults(phoneProvider: any): any;
|
|
4
|
+
export declare function phoneTemplatesDefaults(phoneTemplate: any): any;
|
|
4
5
|
export declare function connectionDefaults(connection: any): any;
|
|
5
6
|
export declare function logStreamDefaults(logStreams: any): any;
|
|
6
7
|
export declare function attackProtectionDefaults(attackProtection: AttackProtection): AttackProtection;
|
package/lib/context/defaults.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.emailProviderDefaults = emailProviderDefaults;
|
|
4
4
|
exports.phoneProviderDefaults = phoneProviderDefaults;
|
|
5
|
+
exports.phoneTemplatesDefaults = phoneTemplatesDefaults;
|
|
5
6
|
exports.connectionDefaults = connectionDefaults;
|
|
6
7
|
exports.logStreamDefaults = logStreamDefaults;
|
|
7
8
|
exports.attackProtectionDefaults = attackProtectionDefaults;
|
|
@@ -9,33 +10,55 @@ const utils_1 = require("../tools/utils");
|
|
|
9
10
|
// eslint-disable-next-line import/prefer-default-export
|
|
10
11
|
function emailProviderDefaults(emailProvider) {
|
|
11
12
|
// eslint-disable-line
|
|
12
|
-
const updated =
|
|
13
|
+
const updated = { ...emailProvider };
|
|
13
14
|
const apiKeyProviders = ['mailgun', 'mandrill', 'sendgrid', 'sparkpost'];
|
|
14
15
|
// Add placeholder for credentials as they cannot be exported
|
|
15
16
|
const { name } = updated;
|
|
16
17
|
if (apiKeyProviders.includes(name)) {
|
|
17
|
-
updated.credentials =
|
|
18
|
+
updated.credentials = {
|
|
19
|
+
api_key: `##${name.toUpperCase()}_API_KEY##`,
|
|
20
|
+
...(updated.credentials || {}),
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
23
|
if (name === 'smtp') {
|
|
20
24
|
// This is to mask smtp_user to '##SMTP_USER##'
|
|
21
25
|
if (updated.credentials && 'smtp_user' in updated.credentials) {
|
|
22
26
|
delete updated.credentials.smtp_user;
|
|
23
27
|
}
|
|
24
|
-
updated.credentials =
|
|
28
|
+
updated.credentials = {
|
|
29
|
+
smtp_host: '##SMTP_HOSTNAME##',
|
|
30
|
+
smtp_port: '##SMTP_PORT##',
|
|
31
|
+
smtp_user: '##SMTP_USER##',
|
|
32
|
+
smtp_pass: '##SMTP_PASS##',
|
|
33
|
+
...(updated.credentials || {}),
|
|
34
|
+
};
|
|
25
35
|
}
|
|
26
36
|
if (name === 'ses') {
|
|
27
|
-
updated.credentials =
|
|
37
|
+
updated.credentials = {
|
|
38
|
+
accessKeyId: '##SES_ACCESS_KEY_ID##',
|
|
39
|
+
secretAccessKey: '##SES_ACCESS_SECRET_KEY##',
|
|
40
|
+
region: '##SES_AWS_REGION##',
|
|
41
|
+
...(updated.credentials || {}),
|
|
42
|
+
};
|
|
28
43
|
}
|
|
29
44
|
if (name === 'azure_cs') {
|
|
30
|
-
updated.credentials =
|
|
45
|
+
updated.credentials = {
|
|
46
|
+
connectionString: '##AZURE_CS_CONNECTION_KEY##',
|
|
47
|
+
...(updated.credentials || {}),
|
|
48
|
+
};
|
|
31
49
|
}
|
|
32
50
|
if (name === 'ms365') {
|
|
33
|
-
updated.credentials =
|
|
51
|
+
updated.credentials = {
|
|
52
|
+
tenantId: '##MS365_TENANT_ID##',
|
|
53
|
+
clientId: '##MS365_CLIENT_ID##',
|
|
54
|
+
clientSecret: '##MS365_CLIENT_SECRET##',
|
|
55
|
+
...(updated.credentials || {}),
|
|
56
|
+
};
|
|
34
57
|
}
|
|
35
58
|
return updated;
|
|
36
59
|
}
|
|
37
60
|
function phoneProviderDefaults(phoneProvider) {
|
|
38
|
-
const updated =
|
|
61
|
+
const updated = { ...phoneProvider };
|
|
39
62
|
const removeKeysFromOutput = [
|
|
40
63
|
'id',
|
|
41
64
|
'created_at',
|
|
@@ -59,6 +82,24 @@ function phoneProviderDefaults(phoneProvider) {
|
|
|
59
82
|
}
|
|
60
83
|
return updated;
|
|
61
84
|
}
|
|
85
|
+
function phoneTemplatesDefaults(phoneTemplate) {
|
|
86
|
+
const updated = { ...phoneTemplate };
|
|
87
|
+
// Strip read-only fields that are returned by the API but should not be included in exported config
|
|
88
|
+
const removeKeysFromOutput = [
|
|
89
|
+
'id',
|
|
90
|
+
'channel',
|
|
91
|
+
'customizable',
|
|
92
|
+
'tenant',
|
|
93
|
+
'created_at',
|
|
94
|
+
'updated_at',
|
|
95
|
+
];
|
|
96
|
+
removeKeysFromOutput.forEach((key) => {
|
|
97
|
+
if (key in updated) {
|
|
98
|
+
delete updated[key];
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
return updated;
|
|
102
|
+
}
|
|
62
103
|
function connectionDefaults(connection) {
|
|
63
104
|
if (connection.options) {
|
|
64
105
|
// Mask secret for key: connection.options.client_secret
|
|
@@ -103,14 +144,20 @@ function attackProtectionDefaults(attackProtection) {
|
|
|
103
144
|
const providersWithSecrets = ['arkose', 'hcaptcha', 'friendly_captcha', 'recaptcha_v2'];
|
|
104
145
|
providersWithSecrets.forEach((provider) => {
|
|
105
146
|
if (captcha[provider]) {
|
|
106
|
-
captcha[provider] =
|
|
147
|
+
captcha[provider] = {
|
|
148
|
+
...captcha[provider],
|
|
149
|
+
secret: `##CAPTCHA_${provider.toUpperCase()}_SECRET##`,
|
|
150
|
+
};
|
|
107
151
|
}
|
|
108
152
|
});
|
|
109
153
|
if ('recaptcha_enterprise' in captcha) {
|
|
110
|
-
captcha.recaptcha_enterprise =
|
|
154
|
+
captcha.recaptcha_enterprise = {
|
|
155
|
+
...captcha.recaptcha_enterprise,
|
|
156
|
+
api_key: '##CAPTCHA_RECAPTCHA_ENTERPRISE_API_KEY##',
|
|
157
|
+
project_id: '##CAPTCHA_RECAPTCHA_ENTERPRISE_PROJECT_ID##',
|
|
158
|
+
};
|
|
111
159
|
}
|
|
112
160
|
attackProtection.captcha = captcha;
|
|
113
161
|
}
|
|
114
162
|
return attackProtection;
|
|
115
163
|
}
|
|
116
|
-
//# sourceMappingURL=defaults.js.map
|