@servicetitan/startup 26.0.0 → 26.0.2-canary.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.
Files changed (179) hide show
  1. package/dist/__mocks__/create-package.js +14 -5
  2. package/dist/__mocks__/index.js +31 -18
  3. package/dist/cli/commands/build.js +83 -34
  4. package/dist/cli/commands/bundle-package.js +91 -39
  5. package/dist/cli/commands/eslint.js +74 -31
  6. package/dist/cli/commands/get-command.js +16 -16
  7. package/dist/cli/commands/get-user-commands.js +9 -9
  8. package/dist/cli/commands/index.js +45 -32
  9. package/dist/cli/commands/init.js +93 -42
  10. package/dist/cli/commands/install.js +77 -32
  11. package/dist/cli/commands/kendo-ui-license.js +86 -39
  12. package/dist/cli/commands/mfe-publish.js +176 -79
  13. package/dist/cli/commands/prepare-package.js +84 -35
  14. package/dist/cli/commands/start.js +107 -58
  15. package/dist/cli/commands/styles-check.js +63 -35
  16. package/dist/cli/commands/tests.js +77 -32
  17. package/dist/cli/commands/types.d.ts +1 -1
  18. package/dist/cli/commands/types.js +3 -3
  19. package/dist/cli/index.js +23 -18
  20. package/dist/cli/utils/assets-copy.js +52 -23
  21. package/dist/cli/utils/bundle.js +130 -56
  22. package/dist/cli/utils/cli-git.js +4 -4
  23. package/dist/cli/utils/cli-npm.js +73 -27
  24. package/dist/cli/utils/cli-os.js +14 -15
  25. package/dist/cli/utils/compile-less.d.ts +1 -1
  26. package/dist/cli/utils/compile-less.js +42 -18
  27. package/dist/cli/utils/compile-sass.d.ts +1 -1
  28. package/dist/cli/utils/compile-sass.js +41 -17
  29. package/dist/cli/utils/eslint.js +70 -34
  30. package/dist/cli/utils/get-module-type.js +17 -11
  31. package/dist/cli/utils/index.js +42 -29
  32. package/dist/cli/utils/is-module-installed.d.ts +1 -1
  33. package/dist/cli/utils/is-module-installed.js +4 -5
  34. package/dist/cli/utils/lerna-exec.js +52 -20
  35. package/dist/cli/utils/maybe-create-git-folder.d.ts +1 -1
  36. package/dist/cli/utils/maybe-create-git-folder.js +9 -7
  37. package/dist/cli/utils/publish.d.ts +1 -1
  38. package/dist/cli/utils/publish.js +3 -3
  39. package/dist/cli/utils/set-node-options.js +28 -12
  40. package/dist/cli/utils/styles-copy.js +52 -23
  41. package/dist/cli/utils/tcm.js +60 -34
  42. package/dist/cli/utils/tsc.js +46 -18
  43. package/dist/index.d.ts +1 -0
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +1 -0
  46. package/dist/index.js.map +1 -1
  47. package/dist/jest/index.js +4 -4
  48. package/dist/utils/debug.d.ts +1 -1
  49. package/dist/utils/debug.js +9 -7
  50. package/dist/utils/find-packages.d.ts +1 -1
  51. package/dist/utils/find-packages.js +37 -20
  52. package/dist/utils/get-destination-folders.js +27 -22
  53. package/dist/utils/get-folders.js +15 -9
  54. package/dist/utils/get-jest-config.js +78 -36
  55. package/dist/utils/get-package-data.d.ts +5 -2
  56. package/dist/utils/get-package-data.js +14 -8
  57. package/dist/utils/get-package-name.d.ts +1 -1
  58. package/dist/utils/get-package-name.js +10 -8
  59. package/dist/utils/get-packages.js +37 -19
  60. package/dist/utils/get-startup-version.d.ts +1 -1
  61. package/dist/utils/get-startup-version.js +16 -9
  62. package/dist/utils/get-tsconfig.d.ts +1 -1
  63. package/dist/utils/get-tsconfig.js +13 -9
  64. package/dist/utils/index.js +44 -31
  65. package/dist/utils/load-shared-dependencies.d.ts +5 -2
  66. package/dist/utils/load-shared-dependencies.js +12 -6
  67. package/dist/utils/log.d.ts +5 -2
  68. package/dist/utils/log.js +13 -12
  69. package/dist/utils/read-json.d.ts +1 -1
  70. package/dist/utils/read-json.js +10 -9
  71. package/dist/utils/to-array.d.ts +1 -1
  72. package/dist/utils/to-array.js +3 -3
  73. package/dist/webpack/__mocks__/file-rules.d.ts +1 -1
  74. package/dist/webpack/__mocks__/file-rules.js +3 -3
  75. package/dist/webpack/__mocks__/index.d.ts +1 -1
  76. package/dist/webpack/__mocks__/index.js +32 -19
  77. package/dist/webpack/configs/amd-config.js +3 -3
  78. package/dist/webpack/configs/cache-config.js +5 -5
  79. package/dist/webpack/configs/dev-server-config.js +38 -20
  80. package/dist/webpack/configs/dev-server-config.js.map +1 -1
  81. package/dist/webpack/configs/devtool-config.js +4 -5
  82. package/dist/webpack/configs/entry.config.js +4 -4
  83. package/dist/webpack/configs/externals-config.js +9 -7
  84. package/dist/webpack/configs/index.js +43 -30
  85. package/dist/webpack/configs/loaders/css-loader.js +15 -9
  86. package/dist/webpack/configs/loaders/index.js +34 -21
  87. package/dist/webpack/configs/loaders/less-loader.d.ts +1 -1
  88. package/dist/webpack/configs/loaders/less-loader.js +3 -3
  89. package/dist/webpack/configs/loaders/style-loader.js +11 -8
  90. package/dist/webpack/configs/loaders/types.d.ts +1 -1
  91. package/dist/webpack/configs/loaders/types.js +3 -3
  92. package/dist/webpack/configs/module-config.js +4 -4
  93. package/dist/webpack/configs/optimization-config.js +3 -3
  94. package/dist/webpack/configs/output-config.js +20 -9
  95. package/dist/webpack/configs/plugins/assets-manifest-plugin.js +15 -10
  96. package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +10 -8
  97. package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +21 -14
  98. package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +4 -4
  99. package/dist/webpack/configs/plugins/filter-warnings-plugin.js +3 -3
  100. package/dist/webpack/configs/plugins/html-plugin.js +43 -22
  101. package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts +1 -1
  102. package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +5 -6
  103. package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +5 -5
  104. package/dist/webpack/configs/plugins/ignore-plugin/index.js +31 -18
  105. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.d.ts +1 -1
  106. package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +6 -4
  107. package/dist/webpack/configs/plugins/index.js +42 -29
  108. package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +20 -11
  109. package/dist/webpack/configs/plugins/moment-locales-plugin.js +9 -7
  110. package/dist/webpack/configs/plugins/provide-react-plugin.js +4 -4
  111. package/dist/webpack/configs/plugins/ts-checker-plugin.js +31 -23
  112. package/dist/webpack/configs/plugins/virtual-modules-plugin.js +14 -10
  113. package/dist/webpack/configs/plugins-config.js +4 -4
  114. package/dist/webpack/configs/resolve-config.js +3 -3
  115. package/dist/webpack/configs/rules/css-rules.js +25 -16
  116. package/dist/webpack/configs/rules/font-rules.js +3 -3
  117. package/dist/webpack/configs/rules/image-rules.js +3 -3
  118. package/dist/webpack/configs/rules/index.js +38 -25
  119. package/dist/webpack/configs/rules/js-rules.js +3 -3
  120. package/dist/webpack/configs/rules/less-rules.js +9 -5
  121. package/dist/webpack/configs/rules/scss-rules.js +9 -5
  122. package/dist/webpack/configs/rules/svg-rules.js +3 -3
  123. package/dist/webpack/configs/rules/tsx-rules.js +3 -3
  124. package/dist/webpack/configs/rules-config.js +8 -6
  125. package/dist/webpack/configs/stats-config.js +3 -3
  126. package/dist/webpack/configs/types.js +3 -3
  127. package/dist/webpack/configs/utils/generate-metadata.js +21 -14
  128. package/dist/webpack/configs/utils/get-web-components-version.js +16 -9
  129. package/dist/webpack/configs/utils/index.js +31 -18
  130. package/dist/webpack/create-webpack-config.js +70 -30
  131. package/dist/webpack/index.js +32 -19
  132. package/dist/webpack/loaders/expose-loader/index.d.ts +1 -1
  133. package/dist/webpack/loaders/expose-loader/index.js +11 -5
  134. package/dist/webpack/loaders/expose-loader/runtime/get-global-this.d.ts +1 -1
  135. package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +3 -4
  136. package/dist/webpack/loaders/expose-loader/utils/contextify-request.d.ts +1 -1
  137. package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +23 -21
  138. package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.d.ts +1 -1
  139. package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +18 -9
  140. package/dist/webpack/loaders/expose-loader/utils/index.d.ts +1 -1
  141. package/dist/webpack/loaders/expose-loader/utils/index.js +33 -20
  142. package/dist/webpack/loaders/expose-loader/utils/stringify-request.d.ts +1 -1
  143. package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +23 -19
  144. package/dist/webpack/types.d.ts +1 -1
  145. package/dist/webpack/types.js +3 -3
  146. package/dist/webpack/utils/bundle.d.ts +1 -1
  147. package/dist/webpack/utils/bundle.js +3 -3
  148. package/dist/webpack/utils/feature-cohort.js +6 -6
  149. package/dist/webpack/utils/get-caller-filename.d.ts +1 -1
  150. package/dist/webpack/utils/get-caller-filename.js +4 -5
  151. package/dist/webpack/utils/hash-mod.d.ts +1 -1
  152. package/dist/webpack/utils/hash-mod.js +3 -3
  153. package/dist/webpack/utils/index.js +34 -21
  154. package/dist/webpack/utils/split-by-entry.d.ts +6 -2
  155. package/dist/webpack/utils/split-by-entry.js +4 -5
  156. package/dist/webpack/utils/testing/compile.d.ts +1 -1
  157. package/dist/webpack/utils/testing/compile.js +3 -3
  158. package/dist/webpack/utils/testing/execute.d.ts +11 -5
  159. package/dist/webpack/utils/testing/execute.js +17 -10
  160. package/dist/webpack/utils/testing/get-compiler.d.ts +4 -2
  161. package/dist/webpack/utils/testing/get-compiler.js +37 -30
  162. package/dist/webpack/utils/testing/get-errors.d.ts +1 -1
  163. package/dist/webpack/utils/testing/get-errors.js +4 -4
  164. package/dist/webpack/utils/testing/get-module-source.d.ts +1 -1
  165. package/dist/webpack/utils/testing/get-module-source.js +9 -4
  166. package/dist/webpack/utils/testing/get-warnings.d.ts +1 -1
  167. package/dist/webpack/utils/testing/get-warnings.js +4 -4
  168. package/dist/webpack/utils/testing/index.d.ts +16 -6
  169. package/dist/webpack/utils/testing/index.js +12 -12
  170. package/dist/webpack/utils/testing/normalize-errors.d.ts +1 -1
  171. package/dist/webpack/utils/testing/normalize-errors.js +3 -3
  172. package/dist/webpack/utils/testing/read-asset.d.ts +1 -1
  173. package/dist/webpack/utils/testing/read-asset.js +12 -10
  174. package/dist/webpack/utils/testing/read-assets.d.ts +1 -1
  175. package/dist/webpack/utils/testing/read-assets.js +4 -4
  176. package/package.json +7 -8
  177. package/src/index.ts +1 -0
  178. package/src/webpack/__tests__/create-webpack-config.test.ts +4 -0
  179. package/src/webpack/configs/dev-server-config.ts +6 -1
@@ -1,43 +1,79 @@
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
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
1
+ 'use strict';
2
+ var __awaiter =
3
+ (this && this.__awaiter) ||
4
+ function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) {
6
+ return value instanceof P
7
+ ? value
8
+ : new P(function (resolve) {
9
+ resolve(value);
10
+ });
19
11
  }
20
- return t;
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) {
14
+ try {
15
+ step(generator.next(value));
16
+ } catch (e) {
17
+ reject(e);
18
+ }
19
+ }
20
+ function rejected(value) {
21
+ try {
22
+ step(generator['throw'](value));
23
+ } catch (e) {
24
+ reject(e);
25
+ }
26
+ }
27
+ function step(result) {
28
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
29
+ }
30
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
31
+ });
32
+ };
33
+ var __rest =
34
+ (this && this.__rest) ||
35
+ function (s, e) {
36
+ var t = {};
37
+ for (var p in s)
38
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === 'function')
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, '__esModule', { value: true });
23
47
  exports.eslint = void 0;
24
- const eslint_1 = require("eslint");
25
- const utils_1 = require("../../utils");
48
+ const eslint_1 = require('eslint');
49
+ const utils_1 = require('../../utils');
26
50
  function eslint(_a) {
27
51
  return __awaiter(this, arguments, void 0, function* ({ fix, paths }) {
28
- const _b = (0, utils_1.getESLintConfiguration)(), { disabled } = _b, config = __rest(_b, ["disabled"]);
52
+ const _b = (0, utils_1.getESLintConfiguration)(),
53
+ { disabled } = _b,
54
+ config = __rest(_b, ['disabled']);
29
55
  if (disabled) {
30
56
  return;
31
57
  }
32
- const eslint = new eslint_1.ESLint(Object.assign({ errorOnUnmatchedPattern: false, extensions: ['.ts', '.tsx'], baseConfig: {
33
- ignorePatterns: [
34
- 'node_modules',
35
- '*.css.d.ts',
36
- '*.scss.d.ts',
37
- '*.less.d.ts',
38
- ...(0, utils_1.getDestinationFolders)(),
39
- ],
40
- }, fix }, config));
58
+ const eslint = new eslint_1.ESLint(
59
+ Object.assign(
60
+ {
61
+ errorOnUnmatchedPattern: false,
62
+ extensions: ['.ts', '.tsx'],
63
+ baseConfig: {
64
+ ignorePatterns: [
65
+ 'node_modules',
66
+ '*.css.d.ts',
67
+ '*.scss.d.ts',
68
+ '*.less.d.ts',
69
+ ...(0, utils_1.getDestinationFolders)(),
70
+ ],
71
+ },
72
+ fix,
73
+ },
74
+ config
75
+ )
76
+ );
41
77
  let files = paths;
42
78
  if (files.length === 0) {
43
79
  files = [process.cwd()];
@@ -54,4 +90,4 @@ function eslint(_a) {
54
90
  });
55
91
  }
56
92
  exports.eslint = eslint;
57
- //# sourceMappingURL=eslint.js.map
93
+ //# sourceMappingURL=eslint.js.map
@@ -1,11 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __importDefault =
3
+ (this && this.__importDefault) ||
4
+ function (mod) {
5
+ return mod && mod.__esModule ? mod : { default: mod };
6
+ };
7
+ Object.defineProperty(exports, '__esModule', { value: true });
6
8
  exports.getModuleType = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const utils_1 = require("../../utils");
9
+ const path_1 = __importDefault(require('path'));
10
+ const utils_1 = require('../../utils');
9
11
  function getModuleType(configPath) {
10
12
  var _a;
11
13
  const config = (0, utils_1.readJson)(configPath);
@@ -13,11 +15,15 @@ function getModuleType(configPath) {
13
15
  return config.compilerOptions.module.toLowerCase();
14
16
  }
15
17
  if (config.extends) {
16
- return getModuleType(require.resolve(config.extends.startsWith('./') || config.extends.startsWith('../')
17
- ? path_1.default.join(path_1.default.dirname(configPath), config.extends)
18
- : config.extends));
18
+ return getModuleType(
19
+ require.resolve(
20
+ config.extends.startsWith('./') || config.extends.startsWith('../')
21
+ ? path_1.default.join(path_1.default.dirname(configPath), config.extends)
22
+ : config.extends
23
+ )
24
+ );
19
25
  }
20
26
  return 'commonjs';
21
27
  }
22
28
  exports.getModuleType = getModuleType;
23
- //# sourceMappingURL=get-module-type.js.map
29
+ //# sourceMappingURL=get-module-type.js.map
@@ -1,32 +1,45 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __exportStar =
23
+ (this && this.__exportStar) ||
24
+ function (m, exports) {
25
+ for (var p in m)
26
+ if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p))
27
+ __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, '__esModule', { value: true });
17
30
  exports.styleExtensions = exports.assetExtensions = void 0;
18
31
  exports.assetExtensions = ['eot', 'gif', 'jpg', 'otf', 'png', 'svg', 'ttf', 'woff', 'woff2'];
19
32
  exports.styleExtensions = ['css', 'less', 'scss'];
20
- __exportStar(require("./assets-copy"), exports);
21
- __exportStar(require("./bundle"), exports);
22
- __exportStar(require("./compile-less"), exports);
23
- __exportStar(require("./compile-sass"), exports);
24
- __exportStar(require("./eslint"), exports);
25
- __exportStar(require("./get-module-type"), exports);
26
- __exportStar(require("./is-module-installed"), exports);
27
- __exportStar(require("./lerna-exec"), exports);
28
- __exportStar(require("./set-node-options"), exports);
29
- __exportStar(require("./styles-copy"), exports);
30
- __exportStar(require("./tcm"), exports);
31
- __exportStar(require("./tsc"), exports);
32
- //# sourceMappingURL=index.js.map
33
+ __exportStar(require('./assets-copy'), exports);
34
+ __exportStar(require('./bundle'), exports);
35
+ __exportStar(require('./compile-less'), exports);
36
+ __exportStar(require('./compile-sass'), exports);
37
+ __exportStar(require('./eslint'), exports);
38
+ __exportStar(require('./get-module-type'), exports);
39
+ __exportStar(require('./is-module-installed'), exports);
40
+ __exportStar(require('./lerna-exec'), exports);
41
+ __exportStar(require('./set-node-options'), exports);
42
+ __exportStar(require('./styles-copy'), exports);
43
+ __exportStar(require('./tcm'), exports);
44
+ __exportStar(require('./tsc'), exports);
45
+ //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
1
  export declare function isModuleInstalled(name: string): boolean;
2
- //# sourceMappingURL=is-module-installed.d.ts.map
2
+ //# sourceMappingURL=is-module-installed.d.ts.map
@@ -1,14 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.isModuleInstalled = void 0;
4
4
  function isModuleInstalled(name) {
5
5
  try {
6
6
  require.resolve(name);
7
7
  return true;
8
- }
9
- catch (e) {
8
+ } catch (e) {
10
9
  return false;
11
10
  }
12
11
  }
13
12
  exports.isModuleInstalled = isModuleInstalled;
14
- //# sourceMappingURL=is-module-installed.js.map
13
+ //# sourceMappingURL=is-module-installed.js.map
@@ -1,20 +1,44 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __awaiter =
3
+ (this && this.__awaiter) ||
4
+ function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) {
6
+ return value instanceof P
7
+ ? value
8
+ : new P(function (resolve) {
9
+ resolve(value);
10
+ });
11
+ }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) {
14
+ try {
15
+ step(generator.next(value));
16
+ } catch (e) {
17
+ reject(e);
18
+ }
19
+ }
20
+ function rejected(value) {
21
+ try {
22
+ step(generator['throw'](value));
23
+ } catch (e) {
24
+ reject(e);
25
+ }
26
+ }
27
+ function step(result) {
28
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
29
+ }
30
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
31
+ });
32
+ };
33
+ var __importDefault =
34
+ (this && this.__importDefault) ||
35
+ function (mod) {
36
+ return mod && mod.__esModule ? mod : { default: mod };
37
+ };
38
+ Object.defineProperty(exports, '__esModule', { value: true });
15
39
  exports.lernaExec = void 0;
16
- const execa_1 = __importDefault(require("execa"));
17
- const utils_1 = require("../../utils");
40
+ const execa_1 = __importDefault(require('execa'));
41
+ const utils_1 = require('../../utils');
18
42
  function lernaExec(args) {
19
43
  return __awaiter(this, void 0, void 0, function* () {
20
44
  var _a, _b;
@@ -23,16 +47,24 @@ function lernaExec(args) {
23
47
  ...getOptions(args),
24
48
  '--',
25
49
  ...args.cmd.split(' '),
26
- ...((_a = args['--']) !== null && _a !== void 0 ? _a : []).flatMap(arg => arg.split(' ')),
50
+ ...((_a = args['--']) !== null && _a !== void 0 ? _a : []).flatMap(arg =>
51
+ arg.split(' ')
52
+ ),
27
53
  ];
28
- utils_1.log.info(`Running ${[args.cmd, ...((_b = args['--']) !== null && _b !== void 0 ? _b : [])].join(' ')}`);
54
+ utils_1.log.info(
55
+ `Running ${[args.cmd, ...((_b = args['--']) !== null && _b !== void 0 ? _b : [])].join(
56
+ ' '
57
+ )}`
58
+ );
29
59
  yield (0, execa_1.default)('lerna', lernaArguments, { stdio: 'inherit' });
30
60
  });
31
61
  }
32
62
  exports.lernaExec = lernaExec;
33
63
  function getOptions(args) {
34
64
  var _a;
35
- const result = ((_a = args.scope) !== null && _a !== void 0 ? _a : []).map(name => `--scope=${name}`);
65
+ const result = ((_a = args.scope) !== null && _a !== void 0 ? _a : []).map(
66
+ name => `--scope=${name}`
67
+ );
36
68
  if (args.bail === false) {
37
69
  result.push('--no-bail');
38
70
  }
@@ -47,4 +79,4 @@ function getOptions(args) {
47
79
  }
48
80
  return result;
49
81
  }
50
- //# sourceMappingURL=lerna-exec.js.map
82
+ //# sourceMappingURL=lerna-exec.js.map
@@ -7,4 +7,4 @@
7
7
  * https://github.com/nrwl/nx/issues/18094)
8
8
  */
9
9
  export declare function maybeCreateGitFolder(): void;
10
- //# sourceMappingURL=maybe-create-git-folder.d.ts.map
10
+ //# sourceMappingURL=maybe-create-git-folder.d.ts.map
@@ -1,10 +1,12 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __importDefault =
3
+ (this && this.__importDefault) ||
4
+ function (mod) {
5
+ return mod && mod.__esModule ? mod : { default: mod };
6
+ };
7
+ Object.defineProperty(exports, '__esModule', { value: true });
6
8
  exports.maybeCreateGitFolder = void 0;
7
- const fs_1 = __importDefault(require("fs"));
9
+ const fs_1 = __importDefault(require('fs'));
8
10
  /**
9
11
  * Create empty .git folder to workaround issue where Lerna does not
10
12
  * detect workspace packages on Windows systems. The empty .git folder
@@ -22,4 +24,4 @@ function maybeCreateGitFolder() {
22
24
  }
23
25
  }
24
26
  exports.maybeCreateGitFolder = maybeCreateGitFolder;
25
- //# sourceMappingURL=maybe-create-git-folder.js.map
27
+ //# sourceMappingURL=maybe-create-git-folder.js.map
@@ -1,2 +1,2 @@
1
1
  export declare const getDefaultBuildVersion: (branchName: string, commitHash: string) => string;
2
- //# sourceMappingURL=publish.d.ts.map
2
+ //# sourceMappingURL=publish.d.ts.map
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.getDefaultBuildVersion = void 0;
4
4
  const getDefaultBuildVersion = (branchName, commitHash) => {
5
5
  let ch = commitHash;
@@ -14,4 +14,4 @@ const getDefaultBuildVersion = (branchName, commitHash) => {
14
14
  return `${branchName.replace(/\W/g, '')}.${ch}`;
15
15
  };
16
16
  exports.getDefaultBuildVersion = getDefaultBuildVersion;
17
- //# sourceMappingURL=publish.js.map
17
+ //# sourceMappingURL=publish.js.map
@@ -1,11 +1,13 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __importDefault =
3
+ (this && this.__importDefault) ||
4
+ function (mod) {
5
+ return mod && mod.__esModule ? mod : { default: mod };
6
+ };
7
+ Object.defineProperty(exports, '__esModule', { value: true });
6
8
  exports.setNodeOptions = void 0;
7
- const os_1 = __importDefault(require("os"));
8
- const utils_1 = require("../../utils");
9
+ const os_1 = __importDefault(require('os'));
10
+ const utils_1 = require('../../utils');
9
11
  const MAX_OLD_SPACE_SIZE_OPTION = 'max_old_space_size';
10
12
  const DEFAULT_MAX_OLD_SPACE_SIZE_MB = 8192;
11
13
  const MIN_REMAINING_MEMORY_MB = 512;
@@ -18,13 +20,27 @@ function setNodeOptions(command) {
18
20
  var _a, _b, _c, _d, _e;
19
21
  const cliConfig = (0, utils_1.getConfigurationSafe)();
20
22
  const cmdConfig = cliConfig[command];
21
- const cmdNodeOptions = (_b = (_a = cmdConfig === null || cmdConfig === void 0 ? void 0 : cmdConfig.NODE_OPTIONS) === null || _a === void 0 ? void 0 : _a.join(' ')) !== null && _b !== void 0 ? _b : '';
22
- const cliNodeOptions = (_d = (_c = cliConfig === null || cliConfig === void 0 ? void 0 : cliConfig.NODE_OPTIONS) === null || _c === void 0 ? void 0 : _c.join(' ')) !== null && _d !== void 0 ? _d : '';
23
+ const cmdNodeOptions =
24
+ (_b =
25
+ (_a = cmdConfig === null || cmdConfig === void 0 ? void 0 : cmdConfig.NODE_OPTIONS) ===
26
+ null || _a === void 0
27
+ ? void 0
28
+ : _a.join(' ')) !== null && _b !== void 0
29
+ ? _b
30
+ : '';
31
+ const cliNodeOptions =
32
+ (_d =
33
+ (_c = cliConfig === null || cliConfig === void 0 ? void 0 : cliConfig.NODE_OPTIONS) ===
34
+ null || _c === void 0
35
+ ? void 0
36
+ : _c.join(' ')) !== null && _d !== void 0
37
+ ? _d
38
+ : '';
23
39
  const oldNodeOptions = (_e = process.env.NODE_OPTIONS) !== null && _e !== void 0 ? _e : '';
24
40
  const mergedOptions = [cmdNodeOptions, cliNodeOptions]
25
41
  .reduce((result, options) => {
26
- return result.includes(options) ? result : `${options} ${result}`;
27
- }, oldNodeOptions)
42
+ return result.includes(options) ? result : `${options} ${result}`;
43
+ }, oldNodeOptions)
28
44
  .trim();
29
45
  const newNodeOptions = ensureMaxOldSpaceSize(mergedOptions);
30
46
  if (newNodeOptions !== oldNodeOptions) {
@@ -43,4 +59,4 @@ function getMaxOldSpaceSize() {
43
59
  const totalMB = os_1.default.totalmem() / (1024 * 1024);
44
60
  return Math.min(DEFAULT_MAX_OLD_SPACE_SIZE_MB, Math.floor(totalMB - MIN_REMAINING_MEMORY_MB));
45
61
  }
46
- //# sourceMappingURL=set-node-options.js.map
62
+ //# sourceMappingURL=set-node-options.js.map
@@ -1,27 +1,54 @@
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
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ var __awaiter =
3
+ (this && this.__awaiter) ||
4
+ function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) {
6
+ return value instanceof P
7
+ ? value
8
+ : new P(function (resolve) {
9
+ resolve(value);
10
+ });
11
+ }
12
+ return new (P || (P = Promise))(function (resolve, reject) {
13
+ function fulfilled(value) {
14
+ try {
15
+ step(generator.next(value));
16
+ } catch (e) {
17
+ reject(e);
18
+ }
19
+ }
20
+ function rejected(value) {
21
+ try {
22
+ step(generator['throw'](value));
23
+ } catch (e) {
24
+ reject(e);
25
+ }
26
+ }
27
+ function step(result) {
28
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
29
+ }
30
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
31
+ });
32
+ };
33
+ var __importDefault =
34
+ (this && this.__importDefault) ||
35
+ function (mod) {
36
+ return mod && mod.__esModule ? mod : { default: mod };
37
+ };
38
+ Object.defineProperty(exports, '__esModule', { value: true });
15
39
  exports.stylesCopyWatch = exports.stylesCopy = void 0;
16
- const cpx_1 = __importDefault(require("cpx"));
17
- const util_1 = __importDefault(require("util"));
18
- const utils_1 = require("../../utils");
19
- const _1 = require(".");
40
+ const cpx_1 = __importDefault(require('cpx'));
41
+ const util_1 = __importDefault(require('util'));
42
+ const utils_1 = require('../../utils');
43
+ const _1 = require('.');
20
44
  function stylesCopy() {
21
45
  return __awaiter(this, void 0, void 0, function* () {
22
46
  const { source, destination } = (0, utils_1.getFolders)();
23
47
  utils_1.log.info('Copying style files...');
24
- yield util_1.default.promisify(cpx_1.default.copy)(`${source}/**/*.{${_1.styleExtensions.join()}}`, destination);
48
+ yield util_1.default.promisify(cpx_1.default.copy)(
49
+ `${source}/**/*.{${_1.styleExtensions.join()}}`,
50
+ destination
51
+ );
25
52
  });
26
53
  }
27
54
  exports.stylesCopy = stylesCopy;
@@ -29,11 +56,13 @@ function stylesCopyWatch() {
29
56
  return __awaiter(this, void 0, void 0, function* () {
30
57
  const { source, destination } = (0, utils_1.getFolders)();
31
58
  yield new Promise((_0, reject) => {
32
- cpx_1.default.watch(`${source}/**/*.{${_1.styleExtensions.join()}}`, destination, {
33
- initialCopy: false,
34
- }).on('watch-error', reject);
59
+ cpx_1.default
60
+ .watch(`${source}/**/*.{${_1.styleExtensions.join()}}`, destination, {
61
+ initialCopy: false,
62
+ })
63
+ .on('watch-error', reject);
35
64
  });
36
65
  });
37
66
  }
38
67
  exports.stylesCopyWatch = stylesCopyWatch;
39
- //# sourceMappingURL=styles-copy.js.map
68
+ //# sourceMappingURL=styles-copy.js.map