auth0-deploy-cli 7.12.0 → 7.12.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.
@@ -47,16 +47,6 @@ jobs:
47
47
  - run:
48
48
  name: Publish package
49
49
  command: npm publish
50
-
51
- ts_migration_progress:
52
- machine:
53
- image: ubuntu-2004:202111-02
54
- steps:
55
- - checkout
56
- - run :
57
- name: Typescript Migration Progress
58
- command: sh typescript-migration-progress.sh
59
-
60
50
  workflows:
61
51
  version: 2
62
52
  test:
@@ -66,7 +56,7 @@ workflows:
66
56
  v: "lts"
67
57
  - test:
68
58
  name: test_current
69
- v: "current"
59
+ v: "18.0.0"
70
60
  test_and_deploy:
71
61
  jobs:
72
62
  - test:
@@ -86,9 +76,3 @@ workflows:
86
76
  ignore: /.*/
87
77
  tags:
88
78
  only: /^v.*/
89
- ts_migration:
90
- jobs:
91
- - ts_migration_progress:
92
- filters:
93
- tags:
94
- ignore: /.*/
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "npm"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
package/.husky/pre-commit CHANGED
@@ -6,5 +6,3 @@ npm run lint:fix
6
6
  npx pretty-quick --staged
7
7
 
8
8
  npx tsc --noEmit # Ensure that code compiles
9
-
10
- /bin/bash ./typescript-migration-progress.sh
package/CHANGELOG.md CHANGED
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [7.12.3] - 2022-05-24
11
+
12
+ ### Fixed
13
+
14
+ - Resource exclusion respected during import even if resource configuration exists [#545]
15
+ - Environment variables ingested by default [#553]
16
+
17
+ ## [7.12.2] - 2022-05-17
18
+
19
+ ### Fixed
20
+
21
+ - Properly handle all screen types within a prompt grouping [#541]
22
+ - Gracefully ignoring custom domains if not supported by tenant [#542]
23
+
24
+ ## [7.12.1] - 2022-05-11
25
+
26
+ ### Fixed
27
+
28
+ - Unable to deploy without branding settings feature [#532]
29
+
10
30
  ## [7.12.0] - 2022-05-10
11
31
 
12
32
  ### Added
@@ -732,7 +752,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
732
752
  [#526]: https://github.com/auth0/auth0-deploy-cli/issues/526
733
753
  [#527]: https://github.com/auth0/auth0-deploy-cli/issues/527
734
754
  [#530]: https://github.com/auth0/auth0-deploy-cli/issues/530
735
- [unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.0...HEAD
755
+ [#532]: https://github.com/auth0/auth0-deploy-cli/issues/532
756
+ [#541]: https://github.com/auth0/auth0-deploy-cli/issues/541
757
+ [#542]: https://github.com/auth0/auth0-deploy-cli/issues/542
758
+ [#545]: https://github.com/auth0/auth0-deploy-cli/issues/545
759
+ [#553]: https://github.com/auth0/auth0-deploy-cli/issues/553
760
+ [unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.3...HEAD
761
+ [7.12.3]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.2...v7.12.3
762
+ [7.12.2]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.1...v7.12.2
763
+ [7.12.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.12.0...v7.12.1
736
764
  [7.12.0]: https://github.com/auth0/auth0-deploy-cli/compare/v7.11.1...v7.12.0
737
765
  [7.11.1]: https://github.com/auth0/auth0-deploy-cli/compare/v7.11.0...v7.11.1
738
766
  [7.11.0]: https://github.com/auth0/auth0-deploy-cli/compare/v7.10.0...v7.11.0
package/README.md CHANGED
@@ -19,7 +19,7 @@ Supported Auth0 Management API resources
19
19
  - [x] [Log Streams](https://auth0.com/docs/api/management/v2#!/Log_Streams/get_log_streams)
20
20
  - [ ] [Logs](https://auth0.com/docs/api/management/v2#!/Logs/get_logs)
21
21
  - [x] [Organizations](https://auth0.com/docs/api/management/v2#!/Organizations/get_organizations)
22
- - [ ] [Prompts](https://auth0.com/docs/api/management/v2#!/Prompts/get_prompts)
22
+ - [x] [Prompts](https://auth0.com/docs/api/management/v2#!/Prompts/get_prompts)
23
23
  - [x] [Resource Servers (APIs)](https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers)
24
24
  - [x] [Roles](https://auth0.com/docs/api/management/v2#!/Roles)
25
25
  - [x] [Rules](https://auth0.com/docs/api/management/v2#!/Rules/get_rules)
package/lib/args.js CHANGED
@@ -70,7 +70,7 @@ function getParams() {
70
70
  env: {
71
71
  describe: 'Override the mappings in config with environment variables.',
72
72
  boolean: true,
73
- default: false,
73
+ default: true,
74
74
  },
75
75
  export_ids: {
76
76
  alias: 'e',
@@ -18,12 +18,18 @@ const tools_1 = require("../../../tools");
18
18
  const utils_1 = require("../../../utils");
19
19
  function parse(context) {
20
20
  const brandingDirectory = path_1.default.join(context.filePath, tools_1.constants.BRANDING_DIRECTORY);
21
+ const brandingFile = path_1.default.join(brandingDirectory, 'branding.json');
21
22
  if (!(0, utils_1.existsMustBeDir)(brandingDirectory))
22
23
  return { branding: null };
23
- const branding = (0, utils_1.loadJSON)(path_1.default.join(brandingDirectory, 'branding.json'), context.mappings);
24
+ const brandingSettings = (() => {
25
+ if ((0, utils_1.isFile)(brandingFile)) {
26
+ return (0, utils_1.loadJSON)(brandingFile, context.mappings);
27
+ }
28
+ return null;
29
+ })();
24
30
  const brandingTemplatesFolder = path_1.default.join(brandingDirectory, tools_1.constants.BRANDING_TEMPLATES_DIRECTORY);
25
31
  if (!(0, utils_1.existsMustBeDir)(brandingTemplatesFolder))
26
- return { branding: null };
32
+ return { branding: brandingSettings };
27
33
  const templatesDefinitionFiles = (0, utils_1.getFiles)(brandingTemplatesFolder, ['.json']);
28
34
  const templates = templatesDefinitionFiles.map((templateDefinitionFile) => {
29
35
  const definition = (0, utils_1.loadJSON)(templateDefinitionFile, context.mappings);
@@ -31,7 +37,7 @@ function parse(context) {
31
37
  return definition;
32
38
  }, {});
33
39
  return {
34
- branding: Object.assign(Object.assign({}, branding), { templates }),
40
+ branding: Object.assign(Object.assign({}, brandingSettings), { templates }),
35
41
  };
36
42
  }
37
43
  function dump(context) {
@@ -73,7 +73,12 @@ class DirectoryContext {
73
73
  if ((0, utils_1.isDirectory)(this.filePath)) {
74
74
  /* If this is a directory, look for each file in the directory */
75
75
  logger_1.default.info(`Processing directory ${this.filePath}`);
76
- Object.values(handlers_1.default).forEach((handler) => {
76
+ Object.entries(handlers_1.default)
77
+ .filter(([handlerName]) => {
78
+ const excludedAssetTypes = this.config.AUTH0_EXCLUDED || [];
79
+ return !excludedAssetTypes.includes(handlerName);
80
+ })
81
+ .forEach(([_name, handler]) => {
77
82
  const parsed = handler.parse(this);
78
83
  Object.entries(parsed).forEach(([k, v]) => {
79
84
  this.assets[k] = v;
@@ -69,6 +69,13 @@ class YAMLContext {
69
69
  throw new Error(`Problem loading ${this.configFile}\n${err}`);
70
70
  }
71
71
  }
72
+ const excludedAssetsFiltered = Object.keys(this.assets).reduce((acc, key) => {
73
+ const excludedAssetTypes = this.config.AUTH0_EXCLUDED || [];
74
+ if (excludedAssetTypes.includes(key))
75
+ return acc;
76
+ return Object.assign(Object.assign({}, acc), { [key]: this.assets[key] });
77
+ }, {});
78
+ this.assets = excludedAssetsFiltered;
72
79
  // Run initial schema check to ensure valid YAML
73
80
  const auth0 = new tools_1.Auth0(this.mgmtClient, this.assets, (0, utils_1.toConfigFn)(this.config));
74
81
  yield auth0.validate();
@@ -83,7 +83,7 @@ export declare const schema: {
83
83
  };
84
84
  export default class ActionHandler extends DefaultAPIHandler {
85
85
  existing: Asset[] | null;
86
- constructor(options: any);
86
+ constructor(options: DefaultAPIHandler);
87
87
  createAction(action: any): Promise<Asset>;
88
88
  deleteAction(action: any): Promise<void | never[]>;
89
89
  objString(action: any): string;
@@ -38,6 +38,6 @@ export default class CustomDomainsHadnler extends DefaultAPIHandler {
38
38
  existing: Asset[] | null;
39
39
  constructor(config: DefaultAPIHandler);
40
40
  objString(item: Asset): string;
41
- getType(): Promise<Asset>;
41
+ getType(): Promise<Asset | null>;
42
42
  processChanges(assets: Assets): Promise<void>;
43
43
  }
@@ -37,10 +37,7 @@ exports.schema = {
37
37
  class CustomDomainsHadnler extends default_1.default {
38
38
  constructor(config) {
39
39
  super(Object.assign(Object.assign({}, config), { type: 'customDomains', id: 'custom_domain_id', identifiers: ['domain'], stripCreateFields: ['status', 'primary', 'verification'], functions: {
40
- //@ts-ignore
41
- delete: (args) => {
42
- return this.client.customDomains.delete({ id: args.custom_domain_id });
43
- },
40
+ delete: (args) => this.client.customDomains.delete({ id: args.custom_domain_id }),
44
41
  } }));
45
42
  }
46
43
  objString(item) {
@@ -48,12 +45,22 @@ class CustomDomainsHadnler extends default_1.default {
48
45
  }
49
46
  getType() {
50
47
  return __awaiter(this, void 0, void 0, function* () {
51
- if (this.existing) {
52
- return this.existing;
48
+ try {
49
+ if (this.existing) {
50
+ return this.existing;
51
+ }
52
+ const customDomains = yield this.client.customDomains.getAll({ paginate: false });
53
+ this.existing = customDomains;
54
+ return customDomains;
55
+ }
56
+ catch (err) {
57
+ if (err.statusCode === 403 &&
58
+ err.message ===
59
+ 'The account is not allowed to perform this operation, please contact our support team') {
60
+ return null;
61
+ }
62
+ throw err;
53
63
  }
54
- const customDomains = yield this.client.customDomains.getAll({ paginate: false });
55
- this.existing = customDomains;
56
- return customDomains;
57
64
  });
58
65
  }
59
66
  processChanges(assets) {
@@ -1,6 +1,7 @@
1
1
  import { Asset, Assets, Auth0APIClient, CalculatedChanges } from '../../../types';
2
2
  import { ConfigFunction } from '../../../configFactory';
3
3
  export declare function order(value: any): (t: any, n: any, descriptor: any) => any;
4
+ declare type ApiMethodOverride = string | Function;
4
5
  export default class APIHandler {
5
6
  config: ConfigFunction;
6
7
  id: string;
@@ -17,10 +18,10 @@ export default class APIHandler {
17
18
  stripCreateFields: string[];
18
19
  name?: string;
19
20
  functions: {
20
- getAll: string;
21
- update: string;
22
- create: string;
23
- delete: string;
21
+ getAll: ApiMethodOverride;
22
+ update: ApiMethodOverride;
23
+ create: ApiMethodOverride;
24
+ delete: ApiMethodOverride;
24
25
  };
25
26
  constructor(options: {
26
27
  id?: APIHandler['id'];
@@ -33,13 +34,13 @@ export default class APIHandler {
33
34
  sensitiveFieldsToObfuscate?: APIHandler['sensitiveFieldsToObfuscate'];
34
35
  stripCreateFields?: APIHandler['stripCreateFields'];
35
36
  functions: {
36
- getAll?: string;
37
- update?: string;
38
- create?: string;
39
- delete?: string;
37
+ getAll?: ApiMethodOverride;
38
+ update?: ApiMethodOverride;
39
+ create?: ApiMethodOverride;
40
+ delete?: ApiMethodOverride;
40
41
  };
41
42
  });
42
- getClientFN(fn: string | Function): Function;
43
+ getClientFN(fn: ApiMethodOverride): Function;
43
44
  didDelete(item: Asset): void;
44
45
  didCreate(item: Asset): void;
45
46
  didUpdate(item: Asset): void;
@@ -52,3 +53,4 @@ export default class APIHandler {
52
53
  validate(assets: Assets): Promise<void>;
53
54
  processChanges(assets: Assets, changes: CalculatedChanges): Promise<void>;
54
55
  }
56
+ export {};
@@ -1,6 +1,9 @@
1
1
  import DefaultHandler from './default';
2
2
  import { Assets, Language } from '../../../types';
3
- declare const promptScreenTypes: readonly ["login", "login-id", "login-password", "login-email-verification", "signup", "signup-id", "signup-password", "reset-password", "consent", "mfa-push", "mfa-otp", "mfa-voice", "mfa-phone", "mfa-webauthn", "mfa-sms", "mfa-email", "mfa-recovery-code", "mfa", "status", "device-flow", "email-verification", "email-otp-challenge", "organizations", "invitation", "common"];
3
+ declare const promptTypes: readonly ["login", "login-id", "login-password", "login-email-verification", "signup", "signup-id", "signup-password", "reset-password", "consent", "mfa-push", "mfa-otp", "mfa-voice", "mfa-phone", "mfa-webauthn", "mfa-sms", "mfa-email", "mfa-recovery-code", "mfa", "status", "device-flow", "email-verification", "email-otp-challenge", "organizations", "invitation", "common"];
4
+ export declare type PromptTypes = typeof promptTypes[number];
5
+ declare const screenTypes: readonly ["login", "login-id", "login-password", "login-email-verification", "signup", "signup-id", "signup-password", "reset-password-request", "reset-password-email", "reset-password", "reset-password-success", "reset-password-error", "consent", "status", "mfa-detect-browser-capabilities", "mfa-enroll-result", "mfa-login-options", "mfa-begin-enroll-options", "mfa-otp-enrollment-qr", "mfa-otp-enrollment-code", "mfa-otp-challenge", "mfa-voice-challenge", "mfa-sms-challenge", "mfa-recovery-code-enrollment", "mfa-recovery-code-challenge", "mfa-country-codes", "mfa-sms-enrollment", "mfa-voice-enrollment", "mfa-phone-challenge", "mfa-phone-enrollment", "mfa-webauthn-roaming-enrollment", "mfa-webauthn-platform-enrollment", "mfa-webauthn-platform-challenge", "mfa-webauthn-roaming-challenge", "mfa-webauthn-change-key-nickname", "mfa-webauthn-enrollment-success", "mfa-webauthn-error", "mfa-webauthn-not-available-error", "mfa-sms-list", "mfa-email-challenge", "mfa-email-list", "mfa-push-welcome", "mfa-push-list", "mfa-push-enrollment-qr", "mfa-push-enrollment-code", "mfa-push-success", "mfa-push-challenge-push", "device-code-activation", "device-code-activation-allowed", "device-code-activation-denied", "device-code-confirmation", "email-verification-result", "email-otp-challenge", "redeem-ticket", "organization-selection", "accept-invitation"];
6
+ export declare type ScreenTypes = typeof screenTypes[number];
4
7
  export declare const schema: {
5
8
  type: string;
6
9
  properties: {
@@ -20,16 +23,17 @@ export declare const schema: {
20
23
  };
21
24
  };
22
25
  };
23
- export declare type PromptScreenTypes = typeof promptScreenTypes[number];
24
26
  export declare type PromptSettings = {
25
27
  universal_login_experience?: 'new' | 'classic';
26
28
  webauthn_platform_first_factor?: boolean;
27
29
  identifier_first?: boolean;
28
30
  };
29
31
  export declare type PromptsCustomText = {
30
- [key in PromptScreenTypes]: {
31
- [key: string]: string;
32
- };
32
+ [key in PromptTypes]: Partial<{
33
+ [key in ScreenTypes]: {
34
+ [key: string]: string;
35
+ };
36
+ }>;
33
37
  };
34
38
  export declare type Prompts = Partial<PromptSettings & {
35
39
  customText: AllPromptsByLanguage;
@@ -27,7 +27,7 @@ exports.schema = void 0;
27
27
  const default_1 = __importDefault(require("./default"));
28
28
  const types_1 = require("../../../types");
29
29
  const lodash_1 = require("lodash");
30
- const promptScreenTypes = [
30
+ const promptTypes = [
31
31
  'login',
32
32
  'login-id',
33
33
  'login-password',
@@ -54,6 +54,64 @@ const promptScreenTypes = [
54
54
  'invitation',
55
55
  'common',
56
56
  ];
57
+ const screenTypes = [
58
+ 'login',
59
+ 'login-id',
60
+ 'login-password',
61
+ 'login-email-verification',
62
+ 'signup',
63
+ 'signup-id',
64
+ 'signup-password',
65
+ 'reset-password-request',
66
+ 'reset-password-email',
67
+ 'reset-password',
68
+ 'reset-password-success',
69
+ 'reset-password-error',
70
+ 'consent',
71
+ 'status',
72
+ 'mfa-detect-browser-capabilities',
73
+ 'mfa-enroll-result',
74
+ 'mfa-login-options',
75
+ 'mfa-begin-enroll-options',
76
+ 'mfa-otp-enrollment-qr',
77
+ 'mfa-otp-enrollment-code',
78
+ 'mfa-otp-challenge',
79
+ 'mfa-voice-challenge',
80
+ 'mfa-sms-challenge',
81
+ 'mfa-recovery-code-enrollment',
82
+ 'mfa-recovery-code-challenge',
83
+ 'mfa-country-codes',
84
+ 'mfa-sms-enrollment',
85
+ 'mfa-voice-enrollment',
86
+ 'mfa-phone-challenge',
87
+ 'mfa-phone-enrollment',
88
+ 'mfa-webauthn-roaming-enrollment',
89
+ 'mfa-webauthn-platform-enrollment',
90
+ 'mfa-webauthn-platform-challenge',
91
+ 'mfa-webauthn-roaming-challenge',
92
+ 'mfa-webauthn-change-key-nickname',
93
+ 'mfa-webauthn-enrollment-success',
94
+ 'mfa-webauthn-error',
95
+ 'mfa-webauthn-not-available-error',
96
+ 'mfa-sms-list',
97
+ 'mfa-email-challenge',
98
+ 'mfa-email-list',
99
+ 'mfa-push-welcome',
100
+ 'mfa-push-list',
101
+ 'mfa-push-enrollment-qr',
102
+ 'mfa-push-enrollment-code',
103
+ 'mfa-push-success',
104
+ 'mfa-push-challenge-push',
105
+ 'device-code-activation',
106
+ 'device-code-activation-allowed',
107
+ 'device-code-activation-denied',
108
+ 'device-code-confirmation',
109
+ 'email-verification-result',
110
+ 'email-otp-challenge',
111
+ 'redeem-ticket',
112
+ 'organization-selection',
113
+ 'accept-invitation',
114
+ ];
57
115
  exports.schema = {
58
116
  type: 'object',
59
117
  properties: {
@@ -72,9 +130,14 @@ exports.schema = {
72
130
  properties: types_1.languages.reduce((acc, language) => {
73
131
  return Object.assign(Object.assign({}, acc), { [language]: {
74
132
  type: 'object',
75
- properties: promptScreenTypes.reduce((acc, screenType) => {
76
- return Object.assign(Object.assign({}, acc), { [screenType]: {
133
+ properties: promptTypes.reduce((acc, promptTypes) => {
134
+ return Object.assign(Object.assign({}, acc), { [promptTypes]: {
77
135
  type: 'object',
136
+ properties: screenTypes.reduce((acc, screenTypes) => {
137
+ return Object.assign(Object.assign({}, acc), { [screenTypes]: {
138
+ type: 'object',
139
+ } });
140
+ }, {}),
78
141
  } });
79
142
  }, {}),
80
143
  } });
@@ -102,16 +165,19 @@ class PromptsHandler extends default_1.default {
102
165
  .getSettings()
103
166
  .then(({ enabled_locales }) => enabled_locales);
104
167
  const data = yield Promise.all(supportedLanguages.flatMap((language) => {
105
- return promptScreenTypes.map((screenType) => {
168
+ return promptTypes.map((promptType) => {
106
169
  return this.client.prompts
107
170
  .getCustomTextByLanguage({
108
- prompt: screenType,
171
+ prompt: promptType,
109
172
  language,
110
173
  })
111
174
  .then((customTextData) => {
112
175
  if ((0, lodash_1.isEmpty)(customTextData))
113
176
  return null;
114
- return Object.assign({ language }, customTextData);
177
+ return {
178
+ language,
179
+ [promptType]: Object.assign({}, customTextData),
180
+ };
115
181
  });
116
182
  });
117
183
  })).then((customTextData) => {
@@ -156,14 +222,11 @@ class PromptsHandler extends default_1.default {
156
222
  if (!languageScreenTypes)
157
223
  return [];
158
224
  return Object.keys(languageScreenTypes).map((prompt) => {
159
- const body = languageScreenTypes[prompt];
225
+ const body = languageScreenTypes[prompt] || {};
160
226
  return this.client.prompts.updateCustomTextByLanguage({
161
227
  prompt,
162
228
  language,
163
- //@ts-ignore
164
- body: {
165
- [prompt]: languageScreenTypes[prompt],
166
- } || {},
229
+ body,
167
230
  });
168
231
  });
169
232
  }));
package/lib/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { PromptScreenTypes, Prompts, PromptsCustomText, PromptSettings } from './tools/auth0/handlers/prompts';
1
+ import { PromptTypes, ScreenTypes, Prompts, PromptsCustomText, PromptSettings } from './tools/auth0/handlers/prompts';
2
2
  declare type SharedPaginationParams = {
3
3
  checkpoint?: boolean;
4
4
  paginate?: boolean;
@@ -129,14 +129,16 @@ export declare type BaseAuth0APIClient = {
129
129
  };
130
130
  prompts: {
131
131
  updateCustomTextByLanguage: (arg0: {
132
- prompt: PromptScreenTypes;
132
+ prompt: PromptTypes;
133
133
  language: Language;
134
- body: {
135
- [key: string]: string;
136
- };
134
+ body: Partial<{
135
+ [key in ScreenTypes]: {
136
+ [key: string]: string;
137
+ };
138
+ }>;
137
139
  }) => Promise<void>;
138
140
  getCustomTextByLanguage: (arg0: {
139
- prompt: PromptScreenTypes;
141
+ prompt: PromptTypes;
140
142
  language: Language;
141
143
  }) => Promise<Partial<PromptsCustomText>>;
142
144
  getSettings: () => Promise<PromptSettings>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "auth0-deploy-cli",
3
- "version": "7.12.0",
3
+ "version": "7.12.3",
4
4
  "description": "A command line tool for deploying updates to your Auth0 tenant",
5
5
  "main": "lib/index.js",
6
6
  "bin": {
@@ -11,7 +11,7 @@
11
11
  "lint": "eslint --ignore-path .eslintignore --ignore-pattern webpack . && kacl lint",
12
12
  "format": "npx prettier --write .",
13
13
  "pretest": "rimraf ./.nyc_output",
14
- "test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*'",
14
+ "test": "ts-mocha -p tsconfig.json --recursive 'test/**/*.test*' --timeout 5000",
15
15
  "build": "rimraf ./lib && npx tsc",
16
16
  "dev": "npx tsc --watch",
17
17
  "prepare": "npm run build",
@@ -36,11 +36,11 @@
36
36
  "ajv": "^6.12.6",
37
37
  "auth0": "^2.40.0",
38
38
  "dot-prop": "^5.2.0",
39
- "fs-extra": "^7.0.0",
39
+ "fs-extra": "^10.1.0",
40
40
  "global-agent": "^2.1.12",
41
41
  "js-yaml": "^4.1.0",
42
42
  "lodash": "^4.17.20",
43
- "mkdirp": "^0.5.6",
43
+ "mkdirp": "^1.0.4",
44
44
  "nconf": "^0.12.0",
45
45
  "promise-pool-executor": "^1.1.1",
46
46
  "sanitize-filename": "^1.6.1",
@@ -1,22 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script providing insight into the progress of migrating Deploy CLI source code to Typescript. See: DXCDT-70
4
- # This can be deleted once migration from JS => TS is complete
5
-
6
- echo "- - - - - Typescript Migration - - - - - -"
7
-
8
- locJs=$( (find ./src -name "*.js" -print0 | xargs -0 cat) | wc -l | xargs)
9
- locTs=$( (find ./src -name "*.ts" -print0 | xargs -0 cat) | wc -l | xargs)
10
- totalLoc=$(expr ${locJs} + ${locTs})
11
- percentLocMigrated=$(expr $(expr ${locTs} \* 100) / ${totalLoc})
12
-
13
- echo "${locTs} of ${totalLoc} (${percentLocMigrated}%) lines of code migrated to Typescript"
14
-
15
- numTsFiles=$(find ./src -name "*.ts" | wc -l | xargs)
16
- numJsFiles=$(find ./src -name "*.js" | wc -l | xargs)
17
- totalNumFiles=$(expr ${numTsFiles} + ${numJsFiles})
18
- percentFilesMigrated=$(expr $(expr ${numTsFiles} \* 100) / ${totalNumFiles})
19
-
20
- echo "${numTsFiles} of ${totalNumFiles} (${percentFilesMigrated}%) files migrated to Typescript"
21
-
22
- echo "- - - - - - - - - - - - - - - - - - - - - -"