auth0-deploy-cli 7.13.1 → 7.14.2

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 (165) hide show
  1. package/.circleci/config.yml +40 -11
  2. package/.eslintignore +1 -0
  3. package/.github/dependabot.yml +3 -0
  4. package/.nyc_output/1b0a2de3-0dae-4f80-9af7-f45cabfd5e99.json +1 -0
  5. package/.nyc_output/50c50e87-6b9d-4f9f-b6bb-a462368ff653.json +1 -0
  6. package/.nyc_output/cd0c5bb1-9480-4de3-b099-e95349d10f89.json +1 -0
  7. package/.nyc_output/processinfo/1b0a2de3-0dae-4f80-9af7-f45cabfd5e99.json +1 -0
  8. package/.nyc_output/processinfo/50c50e87-6b9d-4f9f-b6bb-a462368ff653.json +1 -0
  9. package/.nyc_output/processinfo/cd0c5bb1-9480-4de3-b099-e95349d10f89.json +1 -0
  10. package/.nyc_output/processinfo/index.json +1 -0
  11. package/.prettierignore +2 -1
  12. package/CHANGELOG.md +34 -1
  13. package/README.md +122 -65
  14. package/coverage/lcov-report/base.css +224 -0
  15. package/coverage/lcov-report/block-navigation.js +87 -0
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +251 -0
  18. package/coverage/lcov-report/prettify.css +1 -0
  19. package/coverage/lcov-report/prettify.js +2 -0
  20. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. package/coverage/lcov-report/sorter.js +196 -0
  22. package/coverage/lcov-report/src/args.ts.html +505 -0
  23. package/coverage/lcov-report/src/commands/export.ts.html +274 -0
  24. package/coverage/lcov-report/src/commands/import.ts.html +250 -0
  25. package/coverage/lcov-report/src/commands/index.html +131 -0
  26. package/coverage/lcov-report/src/configFactory.ts.html +175 -0
  27. package/coverage/lcov-report/src/context/defaults.ts.html +196 -0
  28. package/coverage/lcov-report/src/context/directory/handlers/actions.ts.html +355 -0
  29. package/coverage/lcov-report/src/context/directory/handlers/attackProtection.ts.html +307 -0
  30. package/coverage/lcov-report/src/context/directory/handlers/branding.ts.html +448 -0
  31. package/coverage/lcov-report/src/context/directory/handlers/clientGrants.ts.html +262 -0
  32. package/coverage/lcov-report/src/context/directory/handlers/clients.ts.html +319 -0
  33. package/coverage/lcov-report/src/context/directory/handlers/connections.ts.html +370 -0
  34. package/coverage/lcov-report/src/context/directory/handlers/customDomains.ts.html +223 -0
  35. package/coverage/lcov-report/src/context/directory/handlers/databases.ts.html +544 -0
  36. package/coverage/lcov-report/src/context/directory/handlers/emailProvider.ts.html +241 -0
  37. package/coverage/lcov-report/src/context/directory/handlers/emailTemplates.ts.html +316 -0
  38. package/coverage/lcov-report/src/context/directory/handlers/guardianFactorProviders.ts.html +256 -0
  39. package/coverage/lcov-report/src/context/directory/handlers/guardianFactorTemplates.ts.html +247 -0
  40. package/coverage/lcov-report/src/context/directory/handlers/guardianFactors.ts.html +247 -0
  41. package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorMessageTypes.ts.html +214 -0
  42. package/coverage/lcov-report/src/context/directory/handlers/guardianPhoneFactorSelectedProvider.ts.html +226 -0
  43. package/coverage/lcov-report/src/context/directory/handlers/guardianPolicies.ts.html +214 -0
  44. package/coverage/lcov-report/src/context/directory/handlers/hooks.ts.html +274 -0
  45. package/coverage/lcov-report/src/context/directory/handlers/index.html +551 -0
  46. package/coverage/lcov-report/src/context/directory/handlers/index.ts.html +304 -0
  47. package/coverage/lcov-report/src/context/directory/handlers/logStreams.ts.html +220 -0
  48. package/coverage/lcov-report/src/context/directory/handlers/migrations.ts.html +196 -0
  49. package/coverage/lcov-report/src/context/directory/handlers/organizations.ts.html +289 -0
  50. package/coverage/lcov-report/src/context/directory/handlers/pages.ts.html +334 -0
  51. package/coverage/lcov-report/src/context/directory/handlers/prompts.ts.html +313 -0
  52. package/coverage/lcov-report/src/context/directory/handlers/resourceServers.ts.html +229 -0
  53. package/coverage/lcov-report/src/context/directory/handlers/roles.ts.html +253 -0
  54. package/coverage/lcov-report/src/context/directory/handlers/rules.ts.html +262 -0
  55. package/coverage/lcov-report/src/context/directory/handlers/rulesConfigs.ts.html +193 -0
  56. package/coverage/lcov-report/src/context/directory/handlers/tenant.ts.html +289 -0
  57. package/coverage/lcov-report/src/context/directory/handlers/themes.ts.html +232 -0
  58. package/coverage/lcov-report/src/context/directory/handlers/triggers.ts.html +214 -0
  59. package/coverage/lcov-report/src/context/directory/index.html +116 -0
  60. package/coverage/lcov-report/src/context/directory/index.ts.html +400 -0
  61. package/coverage/lcov-report/src/context/index.html +131 -0
  62. package/coverage/lcov-report/src/context/index.ts.html +475 -0
  63. package/coverage/lcov-report/src/context/yaml/handlers/actions.ts.html +349 -0
  64. package/coverage/lcov-report/src/context/yaml/handlers/attackProtection.ts.html +193 -0
  65. package/coverage/lcov-report/src/context/yaml/handlers/branding.ts.html +391 -0
  66. package/coverage/lcov-report/src/context/yaml/handlers/clientGrants.ts.html +199 -0
  67. package/coverage/lcov-report/src/context/yaml/handlers/clients.ts.html +301 -0
  68. package/coverage/lcov-report/src/context/yaml/handlers/connections.ts.html +394 -0
  69. package/coverage/lcov-report/src/context/yaml/handlers/customDomains.ts.html +151 -0
  70. package/coverage/lcov-report/src/context/yaml/handlers/databases.ts.html +346 -0
  71. package/coverage/lcov-report/src/context/yaml/handlers/emailProvider.ts.html +208 -0
  72. package/coverage/lcov-report/src/context/yaml/handlers/emailTemplates.ts.html +241 -0
  73. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorProviders.ts.html +151 -0
  74. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactorTemplates.ts.html +151 -0
  75. package/coverage/lcov-report/src/context/yaml/handlers/guardianFactors.ts.html +151 -0
  76. package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorMessageTypes.ts.html +151 -0
  77. package/coverage/lcov-report/src/context/yaml/handlers/guardianPhoneFactorSelectedProvider.ts.html +169 -0
  78. package/coverage/lcov-report/src/context/yaml/handlers/guardianPolicies.ts.html +151 -0
  79. package/coverage/lcov-report/src/context/yaml/handlers/hooks.ts.html +280 -0
  80. package/coverage/lcov-report/src/context/yaml/handlers/index.html +551 -0
  81. package/coverage/lcov-report/src/context/yaml/handlers/index.ts.html +298 -0
  82. package/coverage/lcov-report/src/context/yaml/handlers/logStreams.ts.html +151 -0
  83. package/coverage/lcov-report/src/context/yaml/handlers/migrations.ts.html +145 -0
  84. package/coverage/lcov-report/src/context/yaml/handlers/organizations.ts.html +235 -0
  85. package/coverage/lcov-report/src/context/yaml/handlers/pages.ts.html +268 -0
  86. package/coverage/lcov-report/src/context/yaml/handlers/prompts.ts.html +154 -0
  87. package/coverage/lcov-report/src/context/yaml/handlers/resourceServers.ts.html +154 -0
  88. package/coverage/lcov-report/src/context/yaml/handlers/roles.ts.html +199 -0
  89. package/coverage/lcov-report/src/context/yaml/handlers/rules.ts.html +253 -0
  90. package/coverage/lcov-report/src/context/yaml/handlers/rulesConfigs.ts.html +181 -0
  91. package/coverage/lcov-report/src/context/yaml/handlers/tenant.ts.html +235 -0
  92. package/coverage/lcov-report/src/context/yaml/handlers/themes.ts.html +154 -0
  93. package/coverage/lcov-report/src/context/yaml/handlers/triggers.ts.html +172 -0
  94. package/coverage/lcov-report/src/context/yaml/index.html +116 -0
  95. package/coverage/lcov-report/src/context/yaml/index.ts.html +568 -0
  96. package/coverage/lcov-report/src/index.html +221 -0
  97. package/coverage/lcov-report/src/index.ts.html +361 -0
  98. package/coverage/lcov-report/src/logger.ts.html +133 -0
  99. package/coverage/lcov-report/src/readonly.ts.html +346 -0
  100. package/coverage/lcov-report/src/sessionDurationsToMinutes.ts.html +154 -0
  101. package/coverage/lcov-report/src/tools/auth0/client.ts.html +604 -0
  102. package/coverage/lcov-report/src/tools/auth0/handlers/actions.ts.html +793 -0
  103. package/coverage/lcov-report/src/tools/auth0/handlers/attackProtection.ts.html +367 -0
  104. package/coverage/lcov-report/src/tools/auth0/handlers/branding.ts.html +427 -0
  105. package/coverage/lcov-report/src/tools/auth0/handlers/clientGrants.ts.html +418 -0
  106. package/coverage/lcov-report/src/tools/auth0/handlers/clients.ts.html +340 -0
  107. package/coverage/lcov-report/src/tools/auth0/handlers/connections.ts.html +598 -0
  108. package/coverage/lcov-report/src/tools/auth0/handlers/customDomains.ts.html +379 -0
  109. package/coverage/lcov-report/src/tools/auth0/handlers/databases.ts.html +436 -0
  110. package/coverage/lcov-report/src/tools/auth0/handlers/default.ts.html +1027 -0
  111. package/coverage/lcov-report/src/tools/auth0/handlers/emailProvider.ts.html +274 -0
  112. package/coverage/lcov-report/src/tools/auth0/handlers/emailTemplates.ts.html +337 -0
  113. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorProviders.ts.html +301 -0
  114. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactorTemplates.ts.html +265 -0
  115. package/coverage/lcov-report/src/tools/auth0/handlers/guardianFactors.ts.html +241 -0
  116. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorMessageTypes.ts.html +337 -0
  117. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.ts.html +331 -0
  118. package/coverage/lcov-report/src/tools/auth0/handlers/guardianPolicies.ts.html +256 -0
  119. package/coverage/lcov-report/src/tools/auth0/handlers/hooks.ts.html +829 -0
  120. package/coverage/lcov-report/src/tools/auth0/handlers/index.html +566 -0
  121. package/coverage/lcov-report/src/tools/auth0/handlers/index.ts.html +295 -0
  122. package/coverage/lcov-report/src/tools/auth0/handlers/logStreams.ts.html +346 -0
  123. package/coverage/lcov-report/src/tools/auth0/handlers/migrations.ts.html +319 -0
  124. package/coverage/lcov-report/src/tools/auth0/handlers/organizations.ts.html +949 -0
  125. package/coverage/lcov-report/src/tools/auth0/handlers/pages.ts.html +517 -0
  126. package/coverage/lcov-report/src/tools/auth0/handlers/prompts.ts.html +913 -0
  127. package/coverage/lcov-report/src/tools/auth0/handlers/resourceServers.ts.html +412 -0
  128. package/coverage/lcov-report/src/tools/auth0/handlers/roles.ts.html +751 -0
  129. package/coverage/lcov-report/src/tools/auth0/handlers/rules.ts.html +727 -0
  130. package/coverage/lcov-report/src/tools/auth0/handlers/rulesConfigs.ts.html +256 -0
  131. package/coverage/lcov-report/src/tools/auth0/handlers/tenant.ts.html +466 -0
  132. package/coverage/lcov-report/src/tools/auth0/handlers/themes.ts.html +1882 -0
  133. package/coverage/lcov-report/src/tools/auth0/handlers/triggers.ts.html +430 -0
  134. package/coverage/lcov-report/src/tools/auth0/index.html +146 -0
  135. package/coverage/lcov-report/src/tools/auth0/index.ts.html +355 -0
  136. package/coverage/lcov-report/src/tools/auth0/schema.ts.html +184 -0
  137. package/coverage/lcov-report/src/tools/calculateChanges.ts.html +688 -0
  138. package/coverage/lcov-report/src/tools/constants.ts.html +610 -0
  139. package/coverage/lcov-report/src/tools/deploy.ts.html +181 -0
  140. package/coverage/lcov-report/src/tools/index.html +191 -0
  141. package/coverage/lcov-report/src/tools/index.ts.html +127 -0
  142. package/coverage/lcov-report/src/tools/utils.ts.html +796 -0
  143. package/coverage/lcov-report/src/tools/validationError.ts.html +127 -0
  144. package/coverage/lcov-report/src/types.ts.html +1093 -0
  145. package/coverage/lcov-report/src/utils.ts.html +679 -0
  146. package/coverage/lcov.info +7168 -0
  147. package/docs/available-resource-config-formats.md +19 -0
  148. package/docs/configuring-the-deploy-cli.md +140 -0
  149. package/docs/excluding-from-management.md +81 -0
  150. package/docs/how-to-contribute.md +49 -0
  151. package/docs/keyword-replacement.md +45 -0
  152. package/docs/multi-environment-workflow.md +98 -0
  153. package/docs/terraform-provider.md +20 -0
  154. package/docs/using-as-cli.md +89 -0
  155. package/docs/using-as-node-module.md +114 -0
  156. package/examples/yaml/config.json.example +1 -1
  157. package/lib/context/directory/handlers/connections.js +3 -2
  158. package/lib/context/yaml/handlers/connections.js +5 -2
  159. package/lib/context/yaml/handlers/pages.js +1 -1
  160. package/lib/tools/auth0/handlers/tenant.d.ts +12 -1
  161. package/lib/tools/auth0/handlers/tenant.js +39 -4
  162. package/lib/tools/auth0/handlers/themes.js +11 -3
  163. package/lib/types.d.ts +6 -7
  164. package/lib/utils.d.ts +1 -1
  165. package/package.json +11 -5
@@ -29,9 +29,10 @@ function parse(context) {
29
29
  if (connection.strategy === 'email') {
30
30
  (0, utils_1.ensureProp)(connection, 'options.email.body');
31
31
  const htmlFileName = path_1.default.join(connectionsFolder, connection.options.email.body);
32
- if ((0, utils_1.isFile)(htmlFileName)) {
33
- connection.options.email.body = (0, tools_1.loadFileAndReplaceKeywords)(htmlFileName, context.mappings);
32
+ if (!(0, utils_1.isFile)(htmlFileName)) {
33
+ throw new Error(`Passwordless email template purportedly located at ${htmlFileName} does not exist for connection. Ensure the existence of this file to proceed with deployment.`);
34
34
  }
35
+ connection.options.email.body = (0, tools_1.loadFileAndReplaceKeywords)(htmlFileName, context.mappings);
35
36
  }
36
37
  return connection;
37
38
  })
@@ -30,9 +30,12 @@ function parse(context) {
30
30
  if (connection.strategy === 'email') {
31
31
  (0, utils_1.ensureProp)(connection, 'options.email.body');
32
32
  const htmlFileName = path_1.default.join(connectionsFolder, connection.options.email.body);
33
- if ((0, utils_1.isFile)(htmlFileName)) {
34
- connection.options.email.body = context.loadFile(htmlFileName);
33
+ if (!(0, utils_1.isFile)(htmlFileName)) {
34
+ const missingTemplateErrorMessage = `Passwordless email template purportedly located at ${htmlFileName} does not exist for connection. Ensure the existence of this file to proceed with deployment.`;
35
+ logger_1.default.error(missingTemplateErrorMessage);
36
+ throw new Error(missingTemplateErrorMessage);
35
37
  }
38
+ connection.options.email.body = context.loadFile(htmlFileName);
36
39
  }
37
40
  return connection;
38
41
  }),
@@ -44,7 +44,7 @@ function dump(context) {
44
44
  // Dump html to file
45
45
  const htmlFile = path_1.default.join(pagesFolder, `${page.name}.html`);
46
46
  logger_1.default.info(`Writing ${htmlFile}`);
47
- fs_extra_1.default.writeFileSync(htmlFile, page.html);
47
+ fs_extra_1.default.writeFileSync(htmlFile, page.html || '');
48
48
  return Object.assign(Object.assign({}, page), { html: `./pages/${page.name}.html` });
49
49
  });
50
50
  return { pages };
@@ -1,11 +1,22 @@
1
1
  import DefaultHandler from './default';
2
- import { Asset, Assets } from '../../../types';
2
+ import { Asset, Assets, Language } from '../../../types';
3
3
  export declare const schema: {
4
4
  type: string;
5
5
  };
6
+ export declare type Tenant = Asset & {
7
+ enabled_locales: Language[];
8
+ flags: {
9
+ [key: string]: boolean;
10
+ };
11
+ };
6
12
  export default class TenantHandler extends DefaultHandler {
13
+ existing: Tenant;
7
14
  constructor(options: DefaultHandler);
8
15
  getType(): Promise<Asset>;
9
16
  validate(assets: Assets): Promise<void>;
10
17
  processChanges(assets: Assets): Promise<void>;
11
18
  }
19
+ export declare const sanitizeMigrationFlags: ({ existingFlags, proposedFlags, }: {
20
+ existingFlags: Tenant['flags'];
21
+ proposedFlags: Tenant['flags'];
22
+ }) => Tenant['flags'];
@@ -41,7 +41,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
41
41
  return (mod && mod.__esModule) ? mod : { "default": mod };
42
42
  };
43
43
  Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.schema = void 0;
44
+ exports.sanitizeMigrationFlags = exports.schema = void 0;
45
45
  const validationError_1 = __importDefault(require("../../validationError"));
46
46
  const default_1 = __importStar(require("./default"));
47
47
  const pages_1 = require("./pages");
@@ -61,6 +61,7 @@ class TenantHandler extends default_1.default {
61
61
  getType() {
62
62
  return __awaiter(this, void 0, void 0, function* () {
63
63
  const tenant = yield this.client.tenant.getSettings();
64
+ this.existing = tenant;
64
65
  blockPageKeys.forEach((key) => {
65
66
  if (tenant[key])
66
67
  delete tenant[key];
@@ -84,10 +85,18 @@ class TenantHandler extends default_1.default {
84
85
  processChanges(assets) {
85
86
  return __awaiter(this, void 0, void 0, function* () {
86
87
  const { tenant } = assets;
87
- if (tenant && Object.keys(tenant).length > 0) {
88
- yield this.client.tenant.updateSettings(tenant);
88
+ // Do nothing if not set
89
+ if (!tenant)
90
+ return;
91
+ const existingTenant = this.existing || (yield this.getType());
92
+ const updatedTenant = Object.assign(Object.assign({}, tenant), { flags: (0, exports.sanitizeMigrationFlags)({
93
+ existingFlags: existingTenant.flags,
94
+ proposedFlags: tenant.flags,
95
+ }) });
96
+ if (updatedTenant && Object.keys(updatedTenant).length > 0) {
97
+ yield this.client.tenant.updateSettings(updatedTenant);
89
98
  this.updated += 1;
90
- this.didUpdate(tenant);
99
+ this.didUpdate(updatedTenant);
91
100
  }
92
101
  });
93
102
  }
@@ -96,3 +105,29 @@ __decorate([
96
105
  (0, default_1.order)('100')
97
106
  ], TenantHandler.prototype, "processChanges", null);
98
107
  exports.default = TenantHandler;
108
+ const sanitizeMigrationFlags = ({ existingFlags = {}, proposedFlags = {}, }) => {
109
+ /*
110
+ Tenants can only update migration flags that are already configured.
111
+ If moving configuration from one tenant to another, there may be instances
112
+ where different migration flags exist and cause an error on update. This
113
+ function removes any migration flags that aren't already present on the target
114
+ tenant. See: https://github.com/auth0/auth0-deploy-cli/issues/374
115
+ */
116
+ const tenantMigrationFlags = [
117
+ 'disable_clickjack_protection_headers',
118
+ 'enable_mgmt_api_v1',
119
+ 'trust_azure_adfs_email_verified_connection_property',
120
+ 'include_email_in_reset_pwd_redirect',
121
+ 'include_email_in_verify_email_redirect',
122
+ ];
123
+ return Object.keys(proposedFlags).reduce((acc, proposedKey) => {
124
+ const isMigrationFlag = tenantMigrationFlags.includes(proposedKey);
125
+ if (!isMigrationFlag)
126
+ return Object.assign(Object.assign({}, acc), { [proposedKey]: proposedFlags[proposedKey] });
127
+ const keyCurrentlyExists = existingFlags[proposedKey] !== undefined;
128
+ if (keyCurrentlyExists)
129
+ return Object.assign(Object.assign({}, acc), { [proposedKey]: proposedFlags[proposedKey] });
130
+ return acc;
131
+ }, {});
132
+ };
133
+ exports.sanitizeMigrationFlags = sanitizeMigrationFlags;
@@ -66,13 +66,21 @@ class ThemesHandler extends default_1.default {
66
66
  logger_1.default.warn('Only one theme is supported per tenant');
67
67
  }
68
68
  const currentThemes = yield this.getThemes();
69
+ const themeReqPayload = (() => {
70
+ // Removing themeId from update and create payloads, otherwise API will error
71
+ // Theme ID may be required to handle if `--export_ids=true`
72
+ const payload = themes[0];
73
+ //@ts-ignore to quell non-optional themeId property, but we know that it's ok to delete
74
+ delete payload.themeId;
75
+ return payload;
76
+ })();
69
77
  if (currentThemes === null || currentThemes.length === 0) {
70
- yield this.client.branding.createTheme(themes[0]);
78
+ yield this.client.branding.createTheme(themeReqPayload);
71
79
  }
72
80
  else {
73
81
  const currentTheme = currentThemes[0];
74
82
  // if theme exists, overwrite it otherwise create it
75
- yield this.client.branding.updateTheme({ id: currentTheme.themeId }, themes[0]);
83
+ yield this.client.branding.updateTheme({ id: currentTheme.themeId }, themeReqPayload);
76
84
  }
77
85
  this.updated += 1;
78
86
  this.didUpdate(themes[0]);
@@ -102,7 +110,7 @@ exports.default = ThemesHandler;
102
110
  exports.schema = {
103
111
  type: 'array',
104
112
  items: {
105
- additionalProperties: false,
113
+ additionalProperties: true,
106
114
  properties: {
107
115
  borders: {
108
116
  additionalProperties: false,
package/lib/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { PromptTypes, ScreenTypes, Prompts, PromptsCustomText, PromptSettings } from './tools/auth0/handlers/prompts';
2
+ import { Tenant } from './tools/auth0/handlers/tenant';
2
3
  import { Theme } from './tools/auth0/handlers/themes';
3
4
  declare type SharedPaginationParams = {
4
5
  checkpoint?: boolean;
@@ -69,8 +70,8 @@ export declare type BaseAuth0APIClient = {
69
70
  getDefaultTheme: () => Promise<Theme>;
70
71
  updateTheme: (arg0: {
71
72
  id: string;
72
- }, Theme: any) => Promise<Omit<Theme, 'themeId'>>;
73
- createTheme: (arg0: Theme) => Promise<Omit<Theme, 'themeId'>>;
73
+ }, arg1: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
74
+ createTheme: (arg0: Omit<Theme, 'themeId'>) => Promise<Omit<Theme, 'themeId'>>;
74
75
  deleteTheme: (arg0: {
75
76
  id: string;
76
77
  }) => Promise<void>;
@@ -173,10 +174,8 @@ export declare type BaseAuth0APIClient = {
173
174
  getAll: () => Promise<Asset[]>;
174
175
  };
175
176
  tenant: APIClientBaseFunctions & {
176
- getSettings: () => Promise<Asset & {
177
- enabled_locales: Language[];
178
- }>;
179
- updateSettings: (arg0: Asset) => Promise<void>;
177
+ getSettings: () => Promise<Tenant>;
178
+ updateSettings: (arg0: Partial<Tenant>) => Promise<Tenant>;
180
179
  };
181
180
  triggers: APIClientBaseFunctions & {
182
181
  getTriggerBindings: () => Promise<Asset>;
@@ -266,7 +265,7 @@ export declare type Assets = Partial<{
266
265
  roles: Asset[] | null;
267
266
  rules: Asset[] | null;
268
267
  rulesConfigs: Asset[] | null;
269
- tenant: Asset | null;
268
+ tenant: Tenant | null;
270
269
  triggers: Asset[] | null;
271
270
  exclude?: {
272
271
  [key: string]: string[];
package/lib/utils.d.ts CHANGED
@@ -91,7 +91,7 @@ export declare function stripIdentifiers(auth0: Auth0, assets: Assets): {
91
91
  roles?: Asset[] | null | undefined;
92
92
  rules?: Asset[] | null | undefined;
93
93
  rulesConfigs?: Asset[] | null | undefined;
94
- tenant?: Asset | null | undefined;
94
+ tenant?: import("./tools/auth0/handlers/tenant").Tenant | null | undefined;
95
95
  triggers?: Asset[] | null | undefined;
96
96
  exclude?: {
97
97
  [key: string]: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-deploy-cli",
3
- "version": "7.13.1",
3
+ "version": "7.14.2",
4
4
  "description": "A command line tool for deploying updates to your Auth0 tenant",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -10,8 +10,10 @@
10
10
  "lint:fix": "eslint --fix --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
11
11
  "lint": "eslint --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
12
12
  "format": "npx prettier --write .",
13
- "pretest": "rimraf ./.nyc_output",
14
- "test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*' --timeout 5000",
13
+ "test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*' --exclude 'test/e2e/*' --timeout 5000",
14
+ "test:e2e:node-module": "ts-mocha -p tsconfig.json --recursive 'test/e2e/*.test*' --timeout 120000",
15
+ "test:e2e:cli": "sh ./test/e2e/e2e-cli.sh",
16
+ "test:coverage": "nyc npm run test; nyc report --reporter=lcov",
15
17
  "build": "rimraf ./lib && npx tsc",
16
18
  "dev": "npx tsc --watch",
17
19
  "prepare": "npm run build",
@@ -32,6 +34,7 @@
32
34
  "dependencies": {
33
35
  "@types/lodash": "^4.14.181",
34
36
  "@types/nconf": "^0.10.2",
37
+ "@types/nock": "^11.1.0",
35
38
  "@types/winston": "^2.4.4",
36
39
  "ajv": "^6.12.6",
37
40
  "auth0": "^2.42.0",
@@ -46,13 +49,14 @@
46
49
  "sanitize-filename": "^1.6.1",
47
50
  "sinon": "^13.0.1",
48
51
  "sinon-chai": "^3.7.0",
52
+ "ts-node": "^10.9.1",
49
53
  "winston": "^3.7.2",
50
54
  "yargs": "^15.3.1"
51
55
  },
52
56
  "devDependencies": {
53
57
  "@types/expect": "^24.3.0",
54
58
  "@types/mocha": "^9.1.0",
55
- "@typescript-eslint/parser": "^5.18.0",
59
+ "@typescript-eslint/parser": "^5.30.3",
56
60
  "chai": "^4.3.6",
57
61
  "chai-as-promised": "^7.1.1",
58
62
  "cross-env": "^3.1.4",
@@ -63,13 +67,15 @@
63
67
  "husky": "^7.0.4",
64
68
  "kacl": "^1.1.1",
65
69
  "mocha": "^9.2.2",
70
+ "nock": "^13.2.9",
66
71
  "nyc": "^15.0.1",
67
72
  "prettier": "^2.6.2",
68
73
  "pretty-quick": "^3.1.3",
69
74
  "rimraf": "^3.0.2",
70
75
  "rmdir-sync": "^1.0.1",
71
76
  "ts-mocha": "^9.0.2",
72
- "typescript": "^4.6.4"
77
+ "typescript": "^4.7.4",
78
+ "zlib": "^1.0.5"
73
79
  },
74
80
  "overrides": {
75
81
  "istanbul-reports": "3.1.4"