@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.
- package/dist/__mocks__/create-package.js +14 -5
- package/dist/__mocks__/index.js +31 -18
- package/dist/cli/commands/build.js +83 -34
- package/dist/cli/commands/bundle-package.js +91 -39
- package/dist/cli/commands/eslint.js +74 -31
- package/dist/cli/commands/get-command.js +16 -16
- package/dist/cli/commands/get-user-commands.js +9 -9
- package/dist/cli/commands/index.js +45 -32
- package/dist/cli/commands/init.js +93 -42
- package/dist/cli/commands/install.js +77 -32
- package/dist/cli/commands/kendo-ui-license.js +86 -39
- package/dist/cli/commands/mfe-publish.js +176 -79
- package/dist/cli/commands/prepare-package.js +84 -35
- package/dist/cli/commands/start.js +107 -58
- package/dist/cli/commands/styles-check.js +63 -35
- package/dist/cli/commands/tests.js +77 -32
- package/dist/cli/commands/types.d.ts +1 -1
- package/dist/cli/commands/types.js +3 -3
- package/dist/cli/index.js +23 -18
- package/dist/cli/utils/assets-copy.js +52 -23
- package/dist/cli/utils/bundle.js +130 -56
- package/dist/cli/utils/cli-git.js +4 -4
- package/dist/cli/utils/cli-npm.js +73 -27
- package/dist/cli/utils/cli-os.js +14 -15
- package/dist/cli/utils/compile-less.d.ts +1 -1
- package/dist/cli/utils/compile-less.js +42 -18
- package/dist/cli/utils/compile-sass.d.ts +1 -1
- package/dist/cli/utils/compile-sass.js +41 -17
- package/dist/cli/utils/eslint.js +70 -34
- package/dist/cli/utils/get-module-type.js +17 -11
- package/dist/cli/utils/index.js +42 -29
- package/dist/cli/utils/is-module-installed.d.ts +1 -1
- package/dist/cli/utils/is-module-installed.js +4 -5
- package/dist/cli/utils/lerna-exec.js +52 -20
- package/dist/cli/utils/maybe-create-git-folder.d.ts +1 -1
- package/dist/cli/utils/maybe-create-git-folder.js +9 -7
- package/dist/cli/utils/publish.d.ts +1 -1
- package/dist/cli/utils/publish.js +3 -3
- package/dist/cli/utils/set-node-options.js +28 -12
- package/dist/cli/utils/styles-copy.js +52 -23
- package/dist/cli/utils/tcm.js +60 -34
- package/dist/cli/utils/tsc.js +46 -18
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/jest/index.js +4 -4
- package/dist/utils/debug.d.ts +1 -1
- package/dist/utils/debug.js +9 -7
- package/dist/utils/find-packages.d.ts +1 -1
- package/dist/utils/find-packages.js +37 -20
- package/dist/utils/get-destination-folders.js +27 -22
- package/dist/utils/get-folders.js +15 -9
- package/dist/utils/get-jest-config.js +78 -36
- package/dist/utils/get-package-data.d.ts +5 -2
- package/dist/utils/get-package-data.js +14 -8
- package/dist/utils/get-package-name.d.ts +1 -1
- package/dist/utils/get-package-name.js +10 -8
- package/dist/utils/get-packages.js +37 -19
- package/dist/utils/get-startup-version.d.ts +1 -1
- package/dist/utils/get-startup-version.js +16 -9
- package/dist/utils/get-tsconfig.d.ts +1 -1
- package/dist/utils/get-tsconfig.js +13 -9
- package/dist/utils/index.js +44 -31
- package/dist/utils/load-shared-dependencies.d.ts +5 -2
- package/dist/utils/load-shared-dependencies.js +12 -6
- package/dist/utils/log.d.ts +5 -2
- package/dist/utils/log.js +13 -12
- package/dist/utils/read-json.d.ts +1 -1
- package/dist/utils/read-json.js +10 -9
- package/dist/utils/to-array.d.ts +1 -1
- package/dist/utils/to-array.js +3 -3
- package/dist/webpack/__mocks__/file-rules.d.ts +1 -1
- package/dist/webpack/__mocks__/file-rules.js +3 -3
- package/dist/webpack/__mocks__/index.d.ts +1 -1
- package/dist/webpack/__mocks__/index.js +32 -19
- package/dist/webpack/configs/amd-config.js +3 -3
- package/dist/webpack/configs/cache-config.js +5 -5
- package/dist/webpack/configs/dev-server-config.js +38 -20
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/devtool-config.js +4 -5
- package/dist/webpack/configs/entry.config.js +4 -4
- package/dist/webpack/configs/externals-config.js +9 -7
- package/dist/webpack/configs/index.js +43 -30
- package/dist/webpack/configs/loaders/css-loader.js +15 -9
- package/dist/webpack/configs/loaders/index.js +34 -21
- package/dist/webpack/configs/loaders/less-loader.d.ts +1 -1
- package/dist/webpack/configs/loaders/less-loader.js +3 -3
- package/dist/webpack/configs/loaders/style-loader.js +11 -8
- package/dist/webpack/configs/loaders/types.d.ts +1 -1
- package/dist/webpack/configs/loaders/types.js +3 -3
- package/dist/webpack/configs/module-config.js +4 -4
- package/dist/webpack/configs/optimization-config.js +3 -3
- package/dist/webpack/configs/output-config.js +20 -9
- package/dist/webpack/configs/plugins/assets-manifest-plugin.js +15 -10
- package/dist/webpack/configs/plugins/bundle-analyser-plugin.js +10 -8
- package/dist/webpack/configs/plugins/define-exposed-dependencies-plugin.js +21 -14
- package/dist/webpack/configs/plugins/define-web-component-name-plugin.js +4 -4
- package/dist/webpack/configs/plugins/filter-warnings-plugin.js +3 -3
- package/dist/webpack/configs/plugins/html-plugin.js +43 -22
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.d.ts +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/check-resource.js +5 -6
- package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +5 -5
- package/dist/webpack/configs/plugins/ignore-plugin/index.js +31 -18
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.d.ts +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-peer-dependency.js +6 -4
- package/dist/webpack/configs/plugins/index.js +42 -29
- package/dist/webpack/configs/plugins/mini-css-extract-plugin.js +20 -11
- package/dist/webpack/configs/plugins/moment-locales-plugin.js +9 -7
- package/dist/webpack/configs/plugins/provide-react-plugin.js +4 -4
- package/dist/webpack/configs/plugins/ts-checker-plugin.js +31 -23
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +14 -10
- package/dist/webpack/configs/plugins-config.js +4 -4
- package/dist/webpack/configs/resolve-config.js +3 -3
- package/dist/webpack/configs/rules/css-rules.js +25 -16
- package/dist/webpack/configs/rules/font-rules.js +3 -3
- package/dist/webpack/configs/rules/image-rules.js +3 -3
- package/dist/webpack/configs/rules/index.js +38 -25
- package/dist/webpack/configs/rules/js-rules.js +3 -3
- package/dist/webpack/configs/rules/less-rules.js +9 -5
- package/dist/webpack/configs/rules/scss-rules.js +9 -5
- package/dist/webpack/configs/rules/svg-rules.js +3 -3
- package/dist/webpack/configs/rules/tsx-rules.js +3 -3
- package/dist/webpack/configs/rules-config.js +8 -6
- package/dist/webpack/configs/stats-config.js +3 -3
- package/dist/webpack/configs/types.js +3 -3
- package/dist/webpack/configs/utils/generate-metadata.js +21 -14
- package/dist/webpack/configs/utils/get-web-components-version.js +16 -9
- package/dist/webpack/configs/utils/index.js +31 -18
- package/dist/webpack/create-webpack-config.js +70 -30
- package/dist/webpack/index.js +32 -19
- package/dist/webpack/loaders/expose-loader/index.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/index.js +11 -5
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/runtime/get-global-this.js +3 -4
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/utils/contextify-request.js +23 -21
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/utils/get-new-user-request.js +18 -9
- package/dist/webpack/loaders/expose-loader/utils/index.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/utils/index.js +33 -20
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.d.ts +1 -1
- package/dist/webpack/loaders/expose-loader/utils/stringify-request.js +23 -19
- package/dist/webpack/types.d.ts +1 -1
- package/dist/webpack/types.js +3 -3
- package/dist/webpack/utils/bundle.d.ts +1 -1
- package/dist/webpack/utils/bundle.js +3 -3
- package/dist/webpack/utils/feature-cohort.js +6 -6
- package/dist/webpack/utils/get-caller-filename.d.ts +1 -1
- package/dist/webpack/utils/get-caller-filename.js +4 -5
- package/dist/webpack/utils/hash-mod.d.ts +1 -1
- package/dist/webpack/utils/hash-mod.js +3 -3
- package/dist/webpack/utils/index.js +34 -21
- package/dist/webpack/utils/split-by-entry.d.ts +6 -2
- package/dist/webpack/utils/split-by-entry.js +4 -5
- package/dist/webpack/utils/testing/compile.d.ts +1 -1
- package/dist/webpack/utils/testing/compile.js +3 -3
- package/dist/webpack/utils/testing/execute.d.ts +11 -5
- package/dist/webpack/utils/testing/execute.js +17 -10
- package/dist/webpack/utils/testing/get-compiler.d.ts +4 -2
- package/dist/webpack/utils/testing/get-compiler.js +37 -30
- package/dist/webpack/utils/testing/get-errors.d.ts +1 -1
- package/dist/webpack/utils/testing/get-errors.js +4 -4
- package/dist/webpack/utils/testing/get-module-source.d.ts +1 -1
- package/dist/webpack/utils/testing/get-module-source.js +9 -4
- package/dist/webpack/utils/testing/get-warnings.d.ts +1 -1
- package/dist/webpack/utils/testing/get-warnings.js +4 -4
- package/dist/webpack/utils/testing/index.d.ts +16 -6
- package/dist/webpack/utils/testing/index.js +12 -12
- package/dist/webpack/utils/testing/normalize-errors.d.ts +1 -1
- package/dist/webpack/utils/testing/normalize-errors.js +3 -3
- package/dist/webpack/utils/testing/read-asset.d.ts +1 -1
- package/dist/webpack/utils/testing/read-asset.js +12 -10
- package/dist/webpack/utils/testing/read-assets.d.ts +1 -1
- package/dist/webpack/utils/testing/read-assets.js +4 -4
- package/package.json +7 -8
- package/src/index.ts +1 -0
- package/src/webpack/__tests__/create-webpack-config.test.ts +4 -0
- package/src/webpack/configs/dev-server-config.ts +6 -1
package/dist/cli/utils/eslint.js
CHANGED
|
@@ -1,43 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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(
|
|
25
|
-
const utils_1 = require(
|
|
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)(),
|
|
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(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
'
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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(
|
|
8
|
-
const utils_1 = require(
|
|
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(
|
|
17
|
-
|
|
18
|
-
|
|
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
|
package/dist/cli/utils/index.js
CHANGED
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(
|
|
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(
|
|
21
|
-
__exportStar(require(
|
|
22
|
-
__exportStar(require(
|
|
23
|
-
__exportStar(require(
|
|
24
|
-
__exportStar(require(
|
|
25
|
-
__exportStar(require(
|
|
26
|
-
__exportStar(require(
|
|
27
|
-
__exportStar(require(
|
|
28
|
-
__exportStar(require(
|
|
29
|
-
__exportStar(require(
|
|
30
|
-
__exportStar(require(
|
|
31
|
-
__exportStar(require(
|
|
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
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
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
|
-
|
|
2
|
-
var __awaiter =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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(
|
|
17
|
-
const utils_1 = require(
|
|
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 =>
|
|
50
|
+
...((_a = args['--']) !== null && _a !== void 0 ? _a : []).flatMap(arg =>
|
|
51
|
+
arg.split(' ')
|
|
52
|
+
),
|
|
27
53
|
];
|
|
28
|
-
utils_1.log.info(
|
|
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(
|
|
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
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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(
|
|
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
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
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
|
-
|
|
2
|
-
var __importDefault =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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(
|
|
8
|
-
const utils_1 = require(
|
|
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 =
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
-
|
|
2
|
-
var __awaiter =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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(
|
|
17
|
-
const util_1 = __importDefault(require(
|
|
18
|
-
const utils_1 = require(
|
|
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)(
|
|
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
|
|
33
|
-
|
|
34
|
-
|
|
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
|