auth0-deploy-cli 7.17.1 → 7.17.3

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.
Files changed (148) hide show
  1. package/.nyc_output/4931ff4a-8b09-4a9b-899c-ce541c2f6b8a.json +1 -0
  2. package/.nyc_output/processinfo/{7746620e-e4aa-4851-a0e0-8720b493c434.json → 4931ff4a-8b09-4a9b-899c-ce541c2f6b8a.json} +1 -1
  3. package/.nyc_output/processinfo/760b21c1-74f0-47a2-bacb-55b1796d1d84.json +1 -0
  4. package/.nyc_output/processinfo/f8a6012a-6f3c-46cf-8693-1687738e001c.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -1
  6. package/CHANGELOG.md +19 -1
  7. package/README.md +5 -4
  8. package/coverage/lcov-report/index.html +25 -25
  9. package/coverage/lcov-report/src/args.ts.html +1 -1
  10. package/coverage/lcov-report/src/commands/export.ts.html +1 -1
  11. package/coverage/lcov-report/src/commands/import.ts.html +1 -1
  12. package/coverage/lcov-report/src/commands/index.html +1 -1
  13. package/coverage/lcov-report/src/configFactory.ts.html +1 -1
  14. package/coverage/lcov-report/src/context/defaults.ts.html +1 -1
  15. package/coverage/lcov-report/src/context/directory/handlers/actions.ts.html +1 -1
  16. package/coverage/lcov-report/src/context/directory/handlers/attackProtection.ts.html +1 -1
  17. package/coverage/lcov-report/src/context/directory/handlers/branding.ts.html +1 -1
  18. package/coverage/lcov-report/src/context/directory/handlers/clientGrants.ts.html +1 -1
  19. package/coverage/lcov-report/src/context/directory/handlers/clients.ts.html +1 -1
  20. package/coverage/lcov-report/src/context/directory/handlers/connections.ts.html +1 -1
  21. package/coverage/lcov-report/src/context/directory/handlers/customDomains.ts.html +1 -1
  22. package/coverage/lcov-report/src/context/directory/handlers/databases.ts.html +1 -1
  23. package/coverage/lcov-report/src/context/directory/handlers/emailProvider.ts.html +1 -1
  24. package/coverage/lcov-report/src/context/directory/handlers/emailTemplates.ts.html +1 -1
  25. package/coverage/lcov-report/src/context/directory/handlers/guardianFactorProviders.ts.html +1 -1
  26. package/coverage/lcov-report/src/context/directory/handlers/guardianFactorTemplates.ts.html +1 -1
  27. package/coverage/lcov-report/src/context/directory/handlers/guardianFactors.ts.html +1 -1
  28. package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorMessageTypes.ts.html +1 -1
  29. package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorSelectedProvider.ts.html +1 -1
  30. package/coverage/lcov-report/src/context/directory/handlers/guardianPolicies.ts.html +1 -1
  31. package/coverage/lcov-report/src/context/directory/handlers/hooks.ts.html +1 -1
  32. package/coverage/lcov-report/src/context/directory/handlers/index.html +1 -1
  33. package/coverage/lcov-report/src/context/directory/handlers/index.ts.html +1 -1
  34. package/coverage/lcov-report/src/context/directory/handlers/logStreams.ts.html +1 -1
  35. package/coverage/lcov-report/src/context/directory/handlers/migrations.ts.html +1 -1
  36. package/coverage/lcov-report/src/context/directory/handlers/organizations.ts.html +1 -1
  37. package/coverage/lcov-report/src/context/directory/handlers/pages.ts.html +1 -1
  38. package/coverage/lcov-report/src/context/directory/handlers/prompts.ts.html +1 -1
  39. package/coverage/lcov-report/src/context/directory/handlers/resourceServers.ts.html +1 -1
  40. package/coverage/lcov-report/src/context/directory/handlers/roles.ts.html +1 -1
  41. package/coverage/lcov-report/src/context/directory/handlers/rules.ts.html +1 -1
  42. package/coverage/lcov-report/src/context/directory/handlers/rulesConfigs.ts.html +1 -1
  43. package/coverage/lcov-report/src/context/directory/handlers/tenant.ts.html +1 -1
  44. package/coverage/lcov-report/src/context/directory/handlers/themes.ts.html +1 -1
  45. package/coverage/lcov-report/src/context/directory/handlers/triggers.ts.html +1 -1
  46. package/coverage/lcov-report/src/context/directory/index.html +1 -1
  47. package/coverage/lcov-report/src/context/directory/index.ts.html +1 -1
  48. package/coverage/lcov-report/src/context/index.html +1 -1
  49. package/coverage/lcov-report/src/context/index.ts.html +1 -1
  50. package/coverage/lcov-report/src/context/yaml/handlers/actions.ts.html +1 -1
  51. package/coverage/lcov-report/src/context/yaml/handlers/attackProtection.ts.html +1 -1
  52. package/coverage/lcov-report/src/context/yaml/handlers/branding.ts.html +1 -1
  53. package/coverage/lcov-report/src/context/yaml/handlers/clientGrants.ts.html +1 -1
  54. package/coverage/lcov-report/src/context/yaml/handlers/clients.ts.html +1 -1
  55. package/coverage/lcov-report/src/context/yaml/handlers/connections.ts.html +1 -1
  56. package/coverage/lcov-report/src/context/yaml/handlers/customDomains.ts.html +1 -1
  57. package/coverage/lcov-report/src/context/yaml/handlers/databases.ts.html +1 -1
  58. package/coverage/lcov-report/src/context/yaml/handlers/emailProvider.ts.html +1 -1
  59. package/coverage/lcov-report/src/context/yaml/handlers/emailTemplates.ts.html +1 -1
  60. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorProviders.ts.html +1 -1
  61. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorTemplates.ts.html +1 -1
  62. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactors.ts.html +1 -1
  63. package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorMessageTypes.ts.html +1 -1
  64. package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorSelectedProvider.ts.html +1 -1
  65. package/coverage/lcov-report/src/context/yaml/handlers/guardianPolicies.ts.html +1 -1
  66. package/coverage/lcov-report/src/context/yaml/handlers/hooks.ts.html +1 -1
  67. package/coverage/lcov-report/src/context/yaml/handlers/index.html +1 -1
  68. package/coverage/lcov-report/src/context/yaml/handlers/index.ts.html +1 -1
  69. package/coverage/lcov-report/src/context/yaml/handlers/logStreams.ts.html +1 -1
  70. package/coverage/lcov-report/src/context/yaml/handlers/migrations.ts.html +1 -1
  71. package/coverage/lcov-report/src/context/yaml/handlers/organizations.ts.html +1 -1
  72. package/coverage/lcov-report/src/context/yaml/handlers/pages.ts.html +1 -1
  73. package/coverage/lcov-report/src/context/yaml/handlers/prompts.ts.html +1 -1
  74. package/coverage/lcov-report/src/context/yaml/handlers/resourceServers.ts.html +1 -1
  75. package/coverage/lcov-report/src/context/yaml/handlers/roles.ts.html +1 -1
  76. package/coverage/lcov-report/src/context/yaml/handlers/rules.ts.html +1 -1
  77. package/coverage/lcov-report/src/context/yaml/handlers/rulesConfigs.ts.html +1 -1
  78. package/coverage/lcov-report/src/context/yaml/handlers/tenant.ts.html +1 -1
  79. package/coverage/lcov-report/src/context/yaml/handlers/themes.ts.html +1 -1
  80. package/coverage/lcov-report/src/context/yaml/handlers/triggers.ts.html +1 -1
  81. package/coverage/lcov-report/src/context/yaml/index.html +1 -1
  82. package/coverage/lcov-report/src/context/yaml/index.ts.html +1 -1
  83. package/coverage/lcov-report/src/index.html +17 -17
  84. package/coverage/lcov-report/src/index.ts.html +1 -1
  85. package/coverage/lcov-report/src/keywordPreservation.ts.html +211 -100
  86. package/coverage/lcov-report/src/logger.ts.html +1 -1
  87. package/coverage/lcov-report/src/readonly.ts.html +1 -1
  88. package/coverage/lcov-report/src/sessionDurationsToMinutes.ts.html +1 -1
  89. package/coverage/lcov-report/src/tools/auth0/client.ts.html +1 -1
  90. package/coverage/lcov-report/src/tools/auth0/handlers/actions.ts.html +1 -1
  91. package/coverage/lcov-report/src/tools/auth0/handlers/attackProtection.ts.html +1 -1
  92. package/coverage/lcov-report/src/tools/auth0/handlers/branding.ts.html +1 -1
  93. package/coverage/lcov-report/src/tools/auth0/handlers/clientGrants.ts.html +1 -1
  94. package/coverage/lcov-report/src/tools/auth0/handlers/clients.ts.html +1 -1
  95. package/coverage/lcov-report/src/tools/auth0/handlers/connections.ts.html +1 -1
  96. package/coverage/lcov-report/src/tools/auth0/handlers/customDomains.ts.html +1 -1
  97. package/coverage/lcov-report/src/tools/auth0/handlers/databases.ts.html +1 -1
  98. package/coverage/lcov-report/src/tools/auth0/handlers/default.ts.html +1 -1
  99. package/coverage/lcov-report/src/tools/auth0/handlers/emailProvider.ts.html +1 -1
  100. package/coverage/lcov-report/src/tools/auth0/handlers/emailTemplates.ts.html +1 -1
  101. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorProviders.ts.html +1 -1
  102. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorTemplates.ts.html +1 -1
  103. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactors.ts.html +1 -1
  104. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorMessageTypes.ts.html +1 -1
  105. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.ts.html +1 -1
  106. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPolicies.ts.html +1 -1
  107. package/coverage/lcov-report/src/tools/auth0/handlers/hooks.ts.html +1 -1
  108. package/coverage/lcov-report/src/tools/auth0/handlers/index.html +13 -13
  109. package/coverage/lcov-report/src/tools/auth0/handlers/index.ts.html +1 -1
  110. package/coverage/lcov-report/src/tools/auth0/handlers/logStreams.ts.html +1 -1
  111. package/coverage/lcov-report/src/tools/auth0/handlers/migrations.ts.html +1 -1
  112. package/coverage/lcov-report/src/tools/auth0/handlers/organizations.ts.html +1 -1
  113. package/coverage/lcov-report/src/tools/auth0/handlers/pages.ts.html +1 -1
  114. package/coverage/lcov-report/src/tools/auth0/handlers/prompts.ts.html +1 -1
  115. package/coverage/lcov-report/src/tools/auth0/handlers/resourceServers.ts.html +1 -1
  116. package/coverage/lcov-report/src/tools/auth0/handlers/roles.ts.html +1 -1
  117. package/coverage/lcov-report/src/tools/auth0/handlers/rules.ts.html +1 -1
  118. package/coverage/lcov-report/src/tools/auth0/handlers/rulesConfigs.ts.html +1 -1
  119. package/coverage/lcov-report/src/tools/auth0/handlers/tenant.ts.html +24 -15
  120. package/coverage/lcov-report/src/tools/auth0/handlers/themes.ts.html +1 -1
  121. package/coverage/lcov-report/src/tools/auth0/handlers/triggers.ts.html +1 -1
  122. package/coverage/lcov-report/src/tools/auth0/index.html +1 -1
  123. package/coverage/lcov-report/src/tools/auth0/index.ts.html +1 -1
  124. package/coverage/lcov-report/src/tools/auth0/schema.ts.html +1 -1
  125. package/coverage/lcov-report/src/tools/calculateChanges.ts.html +1 -1
  126. package/coverage/lcov-report/src/tools/constants.ts.html +1 -1
  127. package/coverage/lcov-report/src/tools/deploy.ts.html +1 -1
  128. package/coverage/lcov-report/src/tools/index.html +1 -1
  129. package/coverage/lcov-report/src/tools/index.ts.html +1 -1
  130. package/coverage/lcov-report/src/tools/utils.ts.html +18 -18
  131. package/coverage/lcov-report/src/tools/validationError.ts.html +1 -1
  132. package/coverage/lcov-report/src/types.ts.html +1 -1
  133. package/coverage/lcov-report/src/utils.ts.html +1 -1
  134. package/coverage/lcov.info +237 -211
  135. package/docs/keyword-replacement.md +13 -4
  136. package/docs/using-as-cli.md +1 -1
  137. package/docs/using-as-node-module.md +1 -1
  138. package/lib/keywordPreservation.d.ts +33 -31
  139. package/lib/keywordPreservation.js +42 -15
  140. package/lib/keywordPreservation.js.map +1 -1
  141. package/lib/tools/auth0/handlers/tenant.js +5 -2
  142. package/lib/tools/auth0/handlers/tenant.js.map +1 -1
  143. package/package.json +1 -1
  144. package/.nyc_output/7746620e-e4aa-4851-a0e0-8720b493c434.json +0 -1
  145. package/.nyc_output/processinfo/8e8d4fa2-9be8-4228-b4c1-c9b7e72c99ea.json +0 -1
  146. package/.nyc_output/processinfo/cf32e35e-b65d-442d-bf1a-0484952dc58e.json +0 -1
  147. /package/.nyc_output/{8e8d4fa2-9be8-4228-b4c1-c9b7e72c99ea.json → 760b21c1-74f0-47a2-bacb-55b1796d1d84.json} +0 -0
  148. /package/.nyc_output/{cf32e35e-b65d-442d-bf1a-0484952dc58e.json → f8a6012a-6f3c-46cf-8693-1687738e001c.json} +0 -0
@@ -1,6 +1,6 @@
1
1
  # Using as a CLI
2
2
 
3
- The Deploy CLI can be used as a standalone command line utility. Doing so provides a simple way to manage your Auth0 tenant configuration in CI/CD workflows.
3
+ The Deploy CLI can be used as a standalone command line utility. Doing so provides a simple way to manage your Auth0 tenant configuration in CI/CD workflows. Refer to the [Configuring the Deploy CLI](./configuring-the-deploy-cli.md) documentation for a comprehensive list of configuration settings.
4
4
 
5
5
  ## `export` command
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Using as a Node Module
2
2
 
3
- The Deploy CLI can not only be used as a standalone CLI, but as a node module. Doing so allows you to manage Auth0 resources within expressive node scripts.
3
+ The Deploy CLI can not only be used as a standalone CLI, but as a node module. Doing so allows you to manage Auth0 resources within expressive node scripts. Refer to the [Configuring the Deploy CLI](./configuring-the-deploy-cli.md) documentation for a comprehensive list of configuration settings.
4
4
 
5
5
  ## `dump` function
6
6
 
@@ -1,36 +1,36 @@
1
1
  import { AssetTypes, KeywordMappings } from './types';
2
2
  import APIHandler from './tools/auth0/handlers/default';
3
- export declare const shouldFieldBePreserved: (string: string, keywordMappings: KeywordMappings) => boolean;
3
+ export declare const doesHaveKeywordMarker: (string: string, keywordMappings: KeywordMappings) => boolean;
4
4
  export declare const getPreservableFieldsFromAssets: (asset: object, keywordMappings: KeywordMappings, resourceSpecificIdentifiers: Partial<{
5
- rules: string;
6
- hooks: string;
7
- actions: string;
8
- triggers: string;
9
- pages: string;
10
- resourceServers: string;
11
- clients: string;
12
- branding: string;
13
- connections: string;
14
- roles: string;
15
- prompts: string;
16
- themes: string;
17
- attackProtection: string;
18
- clientGrants: string;
19
- customDomains: string;
20
- databases: string;
21
- emailProvider: string;
22
- emailTemplates: string;
23
- guardianFactorProviders: string;
24
- guardianFactors: string;
25
- guardianFactorTemplates: string;
26
- guardianPhoneFactorMessageTypes: string;
27
- guardianPhoneFactorSelectedProvider: string;
28
- guardianPolicies: string;
29
- logStreams: string;
30
- migrations: string;
31
- organizations: string;
32
- rulesConfigs: string;
33
- tenant: string;
5
+ rules: string | string[];
6
+ hooks: string | string[];
7
+ actions: string | string[];
8
+ triggers: string | string[];
9
+ pages: string | string[];
10
+ resourceServers: string | string[];
11
+ clients: string | string[];
12
+ branding: string | string[];
13
+ connections: string | string[];
14
+ roles: string | string[];
15
+ prompts: string | string[];
16
+ themes: string | string[];
17
+ attackProtection: string | string[];
18
+ clientGrants: string | string[];
19
+ customDomains: string | string[];
20
+ databases: string | string[];
21
+ emailProvider: string | string[];
22
+ emailTemplates: string | string[];
23
+ guardianFactorProviders: string | string[];
24
+ guardianFactors: string | string[];
25
+ guardianFactorTemplates: string | string[];
26
+ guardianPhoneFactorMessageTypes: string | string[];
27
+ guardianPhoneFactorSelectedProvider: string | string[];
28
+ guardianPolicies: string | string[];
29
+ logStreams: string | string[];
30
+ migrations: string | string[];
31
+ organizations: string | string[];
32
+ rulesConfigs: string | string[];
33
+ tenant: string | string[];
34
34
  }>, address?: string) => string[];
35
35
  export declare const getAssetsValueByAddress: (address: string, assets: any) => any;
36
36
  export declare const convertAddressToDotNotation: (assets: any, address: string, finalAddressTrail?: string) => string | null;
@@ -39,5 +39,7 @@ export declare const preserveKeywords: ({ localAssets, remoteAssets, keywordMapp
39
39
  localAssets: object;
40
40
  remoteAssets: object;
41
41
  keywordMappings: KeywordMappings;
42
- auth0Handlers: Pick<APIHandler, 'id' | 'identifiers' | 'type'>[];
42
+ auth0Handlers: (Pick<APIHandler, 'id' | 'type'> & {
43
+ identifiers: (string | string[])[];
44
+ })[];
43
45
  }) => object;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.preserveKeywords = exports.updateAssetsByAddress = exports.convertAddressToDotNotation = exports.getAssetsValueByAddress = exports.getPreservableFieldsFromAssets = exports.shouldFieldBePreserved = void 0;
3
+ exports.preserveKeywords = exports.updateAssetsByAddress = exports.convertAddressToDotNotation = exports.getAssetsValueByAddress = exports.getPreservableFieldsFromAssets = exports.doesHaveKeywordMarker = void 0;
4
4
  const dot_prop_1 = require("dot-prop");
5
5
  const utils_1 = require("./tools/utils");
6
6
  const utils_2 = require("./tools/utils");
@@ -9,17 +9,17 @@ const lodash_1 = require("lodash");
9
9
  RFC for Keyword Preservation: https://github.com/auth0/auth0-deploy-cli/issues/688
10
10
  Original Github Issue: https://github.com/auth0/auth0-deploy-cli/issues/328
11
11
  */
12
- const shouldFieldBePreserved = (string, keywordMappings) => {
12
+ const doesHaveKeywordMarker = (string, keywordMappings) => {
13
13
  return !Object.keys(keywordMappings).every((keyword) => {
14
14
  const hasArrayMarker = (0, utils_2.keywordReplaceArrayRegExp)(keyword).test(string);
15
15
  const hasStringMarker = (0, utils_2.keywordReplaceStringRegExp)(keyword).test(string);
16
16
  return !hasArrayMarker && !hasStringMarker;
17
17
  });
18
18
  };
19
- exports.shouldFieldBePreserved = shouldFieldBePreserved;
19
+ exports.doesHaveKeywordMarker = doesHaveKeywordMarker;
20
20
  const getPreservableFieldsFromAssets = (asset, keywordMappings, resourceSpecificIdentifiers, address = '') => {
21
21
  if (typeof asset === 'string') {
22
- if ((0, exports.shouldFieldBePreserved)(asset, keywordMappings)) {
22
+ if ((0, exports.doesHaveKeywordMarker)(asset, keywordMappings)) {
23
23
  return [address];
24
24
  }
25
25
  return [];
@@ -28,13 +28,24 @@ const getPreservableFieldsFromAssets = (asset, keywordMappings, resourceSpecific
28
28
  if (Array.isArray(asset)) {
29
29
  return asset
30
30
  .map((arrayItem) => {
31
- const resourceIdentifier = resourceSpecificIdentifiers[address];
32
- if (resourceIdentifier === undefined)
33
- return []; // See if this specific resource type has an identifier
34
- const identifierFieldValue = arrayItem[resourceIdentifier];
35
- if (identifierFieldValue === undefined)
36
- return []; // See if this specific array item possess the resource-specific identifier
37
- return (0, exports.getPreservableFieldsFromAssets)(arrayItem, keywordMappings, resourceSpecificIdentifiers, `${address}${shouldRenderDot ? '.' : ''}[${resourceIdentifier}=${identifierFieldValue}]`);
31
+ const resourceIdentifiers = (() => {
32
+ const identifiers = resourceSpecificIdentifiers[address];
33
+ if (Array.isArray(identifiers)) {
34
+ return identifiers;
35
+ }
36
+ return [identifiers];
37
+ })();
38
+ return resourceIdentifiers
39
+ .map((resourceIdentifier) => {
40
+ resourceSpecificIdentifiers[address];
41
+ if (resourceIdentifier === undefined)
42
+ return []; // See if this specific resource type has an identifier
43
+ const identifierFieldValue = arrayItem[resourceIdentifier];
44
+ if (identifierFieldValue === undefined)
45
+ return []; // See if this specific array item possess the resource-specific identifier
46
+ return (0, exports.getPreservableFieldsFromAssets)(arrayItem, keywordMappings, resourceSpecificIdentifiers, `${address}${shouldRenderDot ? '.' : ''}[${resourceIdentifier}=${identifierFieldValue}]`);
47
+ })
48
+ .flat();
38
49
  })
39
50
  .flat();
40
51
  }
@@ -66,7 +77,7 @@ const getAssetsValueByAddress = (address, assets) => {
66
77
  }
67
78
  // It is easier to handle an address piece-by-piece by
68
79
  // splitting on the period into separate "directions"
69
- const directions = address.split('.');
80
+ const directions = address.split(/\.(?![^\[]*\])/g);
70
81
  // If the the next directions are the proprietary array syntax (ex: `[name=foo]`)
71
82
  // then perform lookup against unique array-item property
72
83
  if (directions[0].charAt(0) === '[') {
@@ -87,7 +98,7 @@ exports.getAssetsValueByAddress = getAssetsValueByAddress;
87
98
  // of updating a specific property for a given asset tree using the dot-prop library
88
99
  // returns null if address value does not exist in asset tree
89
100
  const convertAddressToDotNotation = (assets, address, finalAddressTrail = '') => {
90
- const directions = address.split('.');
101
+ const directions = address.split(/\.(?![^\[]*\])/g);
91
102
  if (directions[0] === '')
92
103
  return finalAddressTrail;
93
104
  if (directions[0].charAt(0) === '[') {
@@ -133,7 +144,14 @@ const preserveKeywords = ({ localAssets, remoteAssets, keywordMappings, auth0Han
133
144
  let updatedRemoteAssets = (0, lodash_1.cloneDeep)(remoteAssets);
134
145
  addresses.forEach((address) => {
135
146
  const localValue = (0, exports.getAssetsValueByAddress)(address, localAssets);
136
- const remoteValue = (0, exports.getAssetsValueByAddress)(address, remoteAssets);
147
+ const remoteAssetsAddress = (() => {
148
+ const doesAddressHaveKeyword = (0, exports.doesHaveKeywordMarker)(address, keywordMappings);
149
+ if (doesAddressHaveKeyword) {
150
+ return (0, utils_1.keywordReplace)(address, keywordMappings);
151
+ }
152
+ return address;
153
+ })();
154
+ const remoteValue = (0, exports.getAssetsValueByAddress)(remoteAssetsAddress, remoteAssets);
137
155
  const localValueWithReplacement = (0, utils_1.keywordReplace)(localValue, keywordMappings);
138
156
  const localAndRemoteValuesAreEqual = (() => {
139
157
  if (typeof remoteValue === 'string') {
@@ -144,7 +162,16 @@ const preserveKeywords = ({ localAssets, remoteAssets, keywordMappings, auth0Han
144
162
  if (!localAndRemoteValuesAreEqual) {
145
163
  console.warn(`WARNING! The remote value with address of ${address} has value of "${remoteValue}" but will be preserved with "${localValueWithReplacement}" due to keyword preservation.`);
146
164
  }
147
- updatedRemoteAssets = (0, exports.updateAssetsByAddress)(updatedRemoteAssets, address, localValue);
165
+ // Two address possibilities are provided to account for cases when there is a keyword
166
+ // in the resources's identifier field. When the resource identifier's field is preserved
167
+ // on the remote assets tree, it loses its identify, so we'll need to try two addresses:
168
+ // one where the identifier field has a keyword and one where the identifier field has
169
+ // the literal replaced value.
170
+ // Example: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
171
+ updatedRemoteAssets = (0, exports.updateAssetsByAddress)(updatedRemoteAssets, address, //Two possible addresses need to be passed, one with identifier field keyword replaced and one where it is not replaced. Ex: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
172
+ localValue);
173
+ updatedRemoteAssets = (0, exports.updateAssetsByAddress)(updatedRemoteAssets, remoteAssetsAddress, //Two possible addresses need to be passed, one with identifier field keyword replaced and one where it is not replaced. Ex: `customDomains.[domain=##DOMAIN].domain` and `customDomains.[domain=travel0.com].domain`
174
+ localValue);
148
175
  });
149
176
  return updatedRemoteAssets;
150
177
  };
@@ -1 +1 @@
1
- {"version":3,"file":"keywordPreservation.js","sourceRoot":"","sources":["../src/keywordPreservation.ts"],"names":[],"mappings":";;;AAAA,uCAA4E;AAC5E,yCAA+C;AAE/C,yCAAsF;AACtF,mCAAmC;AAGnC;;;EAGE;AAEK,MAAM,sBAAsB,GAAG,CACpC,MAAc,EACd,eAAgC,EACvB,EAAE;IACX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AAmB,GAAG,IAAA,6BAAqB,EACzC,mBAAmB,EACnB,OAAO,EAAE,qNAAqN;QAC9N,UAAU,CACX,CAAC;QACF,mBAAmB,GAAG,IAAA,6BAAqB,EACzC,mBAAmB,EACnB,mBAAmB,EAAE,qNAAqN;QAC1O,UAAU,CACX,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC;AAhFW,QAAA,gBAAgB,oBAgF3B"}
@@ -89,10 +89,13 @@ class TenantHandler extends default_1.default {
89
89
  if (!tenant)
90
90
  return;
91
91
  const existingTenant = this.existing || (yield this.getType());
92
- const updatedTenant = Object.assign(Object.assign({}, tenant), { flags: (0, exports.sanitizeMigrationFlags)({
92
+ const updatedTenant = Object.assign({}, tenant);
93
+ if ('flags' in updatedTenant) {
94
+ updatedTenant.flags = (0, exports.sanitizeMigrationFlags)({
93
95
  existingFlags: existingTenant.flags,
94
96
  proposedFlags: tenant.flags,
95
- }) });
97
+ });
98
+ }
96
99
  if (updatedTenant && Object.keys(updatedTenant).length > 0) {
97
100
  yield this.client.tenant.updateSettings(updatedTenant);
98
101
  this.updated += 1;
@@ -1 +1 @@
1
- {"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/tenant.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4EAAoD;AAEpD,qDAAkD;AAClD,mCAAsD;AACtD,uCAAkD;AAGrC,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,QAAQ;CACf,CAAC;AAIF,MAAM,aAAa,GAAG;IACpB,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAW,CAAC;IAC3B,GAAG,MAAM,CAAC,MAAM,CAAC,mBAAW,CAAC;IAC7B,GAAG,sBAAc;CAClB,CAAC;AAEF,MAAqB,aAAc,SAAQ,iBAAc;IAGvD,YAAY,OAAuB;QACjC,KAAK,iCACA,OAAO,KACV,IAAI,E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Q,CAAC,WAAW,CAAC,CAAC;QACnE,IAAI,CAAC,eAAe;YAClB,uCACK,GAAG,KACN,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,IACzC;QAEJ,MAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC;QACpE,IAAI,kBAAkB;YACpB,uCACK,GAAG,KACN,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,IACzC;QAEJ,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAE,CACH,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,sBAAsB,0BA2CjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-deploy-cli",
3
- "version": "7.17.1",
3
+ "version": "7.17.3",
4
4
  "description": "A command line tool for deploying updates to your Auth0 tenant",
5
5
  "main": "lib/index.js",
6
6
  "bin": {