auth0-deploy-cli 8.26.0 → 8.28.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.
@@ -36,12 +36,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.isForbiddenFeatureError = exports.isDeprecatedError = exports.detectInsufficientScopeError = exports.stripObfuscatedFieldsFromPayload = exports.obfuscateSensitiveValues = exports.keywordReplaceStringRegExp = exports.keywordReplaceArrayRegExp = void 0;
39
+ exports.shouldExcludeThirdPartyClients = exports.isForbiddenFeatureError = exports.isDeprecatedError = exports.detectInsufficientScopeError = exports.stripObfuscatedFieldsFromPayload = exports.obfuscateSensitiveValues = exports.keywordReplaceStringRegExp = exports.keywordReplaceArrayRegExp = void 0;
40
40
  exports.keywordArrayReplace = keywordArrayReplace;
41
41
  exports.keywordStringReplace = keywordStringReplace;
42
42
  exports.keywordReplace = keywordReplace;
43
43
  exports.wrapArrayReplaceMarkersInQuotes = wrapArrayReplaceMarkersInQuotes;
44
44
  exports.convertClientNameToId = convertClientNameToId;
45
+ exports.convertActionNameToId = convertActionNameToId;
46
+ exports.convertActionIdToName = convertActionIdToName;
45
47
  exports.convertClientNamesToIds = convertClientNamesToIds;
46
48
  exports.loadFileAndReplaceKeywords = loadFileAndReplaceKeywords;
47
49
  exports.flatten = flatten;
@@ -115,6 +117,14 @@ function convertClientNameToId(name, clients) {
115
117
  const found = clients.find((c) => c.name === name);
116
118
  return (found && found.client_id) || name;
117
119
  }
120
+ function convertActionNameToId(name, actions) {
121
+ const found = actions.find((a) => a.name === name);
122
+ return (found && found.id) || name;
123
+ }
124
+ function convertActionIdToName(id, actions) {
125
+ const found = actions.find((a) => a.id === id);
126
+ return (found && found.name) || id;
127
+ }
118
128
  function convertClientNamesToIds(names, clients) {
119
129
  const resolvedNames = names.map((name) => ({ name, resolved: false }));
120
130
  const result = clients.reduce((acc, client) => {
@@ -311,3 +321,16 @@ function maskSecretAtPath({ resourceTypeName, maskedKeyName, maskOnObj, keyJsonP
311
321
  }
312
322
  return maskOnObj;
313
323
  }
324
+ /**
325
+ * Determines whether third-party clients should be excluded based on configuration.
326
+ * Checks the AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS config value and returns true if it's
327
+ * set to boolean true or string 'true'.
328
+ *
329
+ * @param configFn - The configuration function to retrieve the config value.
330
+ * @returns True if third-party clients should be excluded, false otherwise.
331
+ */
332
+ const shouldExcludeThirdPartyClients = (configFn) => {
333
+ const value = configFn('AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS');
334
+ return value === 'true' || value === true;
335
+ };
336
+ exports.shouldExcludeThirdPartyClients = shouldExcludeThirdPartyClients;
package/lib/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Management, ManagementClient } from 'auth0';
2
2
  import { PromisePoolExecutor } from 'promise-pool-executor';
3
3
  import { Action } from './tools/auth0/handlers/actions';
4
+ import { ActionModule } from './tools/auth0/handlers/actionModules';
4
5
  import { Prompts } from './tools/auth0/handlers/prompts';
5
6
  import { Tenant } from './tools/auth0/handlers/tenant';
6
7
  import { Page } from './tools/auth0/handlers/pages';
@@ -91,6 +92,7 @@ export type Asset = {
91
92
  };
92
93
  export type Assets = Partial<{
93
94
  actions: Action[] | null;
95
+ actionModules: ActionModule[] | null;
94
96
  attackProtection: AttackProtection | null;
95
97
  riskAssessment: RiskAssessment | null;
96
98
  branding: (Asset & {
@@ -153,7 +155,7 @@ export type CalculatedChanges = {
153
155
  conflicts: Asset[];
154
156
  create: Asset[];
155
157
  };
156
- export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | 'guardianPhoneFactorMessageTypes' | 'guardianPhoneFactorSelectedProvider' | 'guardianPolicies' | 'roles' | 'actions' | 'organizations' | 'triggers' | 'attackProtection' | 'riskAssessment' | 'branding' | 'phoneProviders' | 'phoneTemplates' | 'logStreams' | 'prompts' | 'customDomains' | 'themes' | 'forms' | 'flows' | 'flowVaultConnections' | 'selfServiceProfiles' | 'networkACLs' | 'userAttributeProfiles' | 'connectionProfiles' | 'tokenExchangeProfiles';
158
+ export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | 'guardianPhoneFactorMessageTypes' | 'guardianPhoneFactorSelectedProvider' | 'guardianPolicies' | 'roles' | 'actions' | 'actionModules' | 'organizations' | 'triggers' | 'attackProtection' | 'riskAssessment' | 'branding' | 'phoneProviders' | 'phoneTemplates' | 'logStreams' | 'prompts' | 'customDomains' | 'themes' | 'forms' | 'flows' | 'flowVaultConnections' | 'selfServiceProfiles' | 'networkACLs' | 'userAttributeProfiles' | 'connectionProfiles' | 'tokenExchangeProfiles';
157
159
  export type KeywordMappings = {
158
160
  [key: string]: (string | number)[] | string | number;
159
161
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-deploy-cli",
3
- "version": "8.26.0",
3
+ "version": "8.28.0",
4
4
  "description": "A command line tool for deploying updates to your Auth0 tenant",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
34
34
  "dependencies": {
35
35
  "ajv": "^6.12.6",
36
- "auth0": "^5.3.0",
36
+ "auth0": "^5.3.1",
37
37
  "dot-prop": "^5.3.0",
38
38
  "fs-extra": "^10.1.0",
39
39
  "js-yaml": "^4.1.1",
@@ -42,18 +42,18 @@
42
42
  "nconf": "^0.13.0",
43
43
  "promise-pool-executor": "^1.1.1",
44
44
  "sanitize-filename": "^1.6.3",
45
- "undici": "^7.19.2",
45
+ "undici": "^7.22.0",
46
46
  "winston": "^3.19.0",
47
47
  "yargs": "^15.4.1"
48
48
  },
49
49
  "devDependencies": {
50
+ "@eslint/js": "^9.39.2",
50
51
  "@types/fs-extra": "^9.0.13",
51
52
  "@types/lodash": "^4.17.23",
52
53
  "@types/mocha": "^10.0.10",
53
54
  "@types/nconf": "^0.10.7",
54
- "@eslint/js": "^9.39.2",
55
- "@typescript-eslint/eslint-plugin": "^8.54.0",
56
- "@typescript-eslint/parser": "^8.54.0",
55
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
56
+ "@typescript-eslint/parser": "^8.55.0",
57
57
  "chai": "^4.5.0",
58
58
  "chai-as-promised": "^7.1.2",
59
59
  "eslint": "^9.39.2",