@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
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.createPackage = void 0;
|
|
4
|
-
const utils_1 = require(
|
|
4
|
+
const utils_1 = require('../utils');
|
|
5
5
|
function createPackage(props) {
|
|
6
6
|
var _a;
|
|
7
7
|
const baseName = (_a = props.name) === null || _a === void 0 ? void 0 : _a.split('/').pop();
|
|
8
|
-
return Object.assign(
|
|
8
|
+
return Object.assign(
|
|
9
|
+
{
|
|
10
|
+
name: '@servicetitan/foo',
|
|
11
|
+
type: utils_1.PackageType.Legacy,
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
private: false,
|
|
14
|
+
location: `packages/${baseName !== null && baseName !== void 0 ? baseName : 'foo'}`,
|
|
15
|
+
},
|
|
16
|
+
props
|
|
17
|
+
);
|
|
9
18
|
}
|
|
10
19
|
exports.createPackage = createPackage;
|
|
11
|
-
//# sourceMappingURL=create-package.js.map
|
|
20
|
+
//# sourceMappingURL=create-package.js.map
|
package/dist/__mocks__/index.js
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(
|
|
17
|
-
|
|
18
|
-
|
|
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 });
|
|
30
|
+
__exportStar(require('./create-package'), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,34 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
var __decorate =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r =
|
|
7
|
+
c < 3
|
|
8
|
+
? target
|
|
9
|
+
: desc === null
|
|
10
|
+
? (desc = Object.getOwnPropertyDescriptor(target, key))
|
|
11
|
+
: desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
14
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
else
|
|
16
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
17
|
+
if ((d = decorators[i]))
|
|
18
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
};
|
|
21
|
+
var __metadata =
|
|
22
|
+
(this && this.__metadata) ||
|
|
23
|
+
function (k, v) {
|
|
24
|
+
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function')
|
|
25
|
+
return Reflect.metadata(k, v);
|
|
26
|
+
};
|
|
27
|
+
var __awaiter =
|
|
28
|
+
(this && this.__awaiter) ||
|
|
29
|
+
function (thisArg, _arguments, P, generator) {
|
|
30
|
+
function adopt(value) {
|
|
31
|
+
return value instanceof P
|
|
32
|
+
? value
|
|
33
|
+
: new P(function (resolve) {
|
|
34
|
+
resolve(value);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function rejected(value) {
|
|
46
|
+
try {
|
|
47
|
+
step(generator['throw'](value));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
reject(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function step(result) {
|
|
53
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
54
|
+
}
|
|
55
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
21
59
|
exports.Build = void 0;
|
|
22
|
-
const utils_1 = require(
|
|
23
|
-
const utils_2 = require(
|
|
24
|
-
const _1 = require(
|
|
60
|
+
const utils_1 = require('../../utils');
|
|
61
|
+
const utils_2 = require('../utils');
|
|
62
|
+
const _1 = require('.');
|
|
25
63
|
class Build {
|
|
26
64
|
constructor(args) {
|
|
27
|
-
Object.defineProperty(this,
|
|
65
|
+
Object.defineProperty(this, 'args', {
|
|
28
66
|
enumerable: true,
|
|
29
67
|
configurable: true,
|
|
30
68
|
writable: true,
|
|
31
|
-
value: args
|
|
69
|
+
value: args,
|
|
32
70
|
});
|
|
33
71
|
}
|
|
34
72
|
description() {
|
|
@@ -36,7 +74,9 @@ class Build {
|
|
|
36
74
|
}
|
|
37
75
|
execute() {
|
|
38
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
const packages = (0, utils_1.splitPackagesByType)(
|
|
77
|
+
const packages = (0, utils_1.splitPackagesByType)(
|
|
78
|
+
(0, utils_1.getPackages)({ scope: this.args.scope, ignore: this.args.ignore })
|
|
79
|
+
);
|
|
40
80
|
const packagesWithPreparation = [
|
|
41
81
|
...packages[utils_1.PackageType.TSC],
|
|
42
82
|
...packages[utils_1.PackageType.Webpack],
|
|
@@ -64,7 +104,11 @@ class Build {
|
|
|
64
104
|
...[this.args.config ? `--config "${this.args.config}"` : undefined],
|
|
65
105
|
...[this.args['code-coverage'] ? '--code-coverage' : undefined],
|
|
66
106
|
...[this.args.esbuild ? '--esbuild' : undefined],
|
|
67
|
-
...[
|
|
107
|
+
...[
|
|
108
|
+
this.args['experimental-bundlers']
|
|
109
|
+
? '--experimental-bundlers'
|
|
110
|
+
: undefined,
|
|
111
|
+
],
|
|
68
112
|
...[this.args.stat ? '--stat' : undefined],
|
|
69
113
|
].filter(item => !!item),
|
|
70
114
|
});
|
|
@@ -73,10 +117,15 @@ class Build {
|
|
|
73
117
|
}
|
|
74
118
|
}
|
|
75
119
|
exports.Build = Build;
|
|
76
|
-
__decorate(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
120
|
+
__decorate(
|
|
121
|
+
[
|
|
122
|
+
utils_1.logErrors,
|
|
123
|
+
__metadata('design:type', Function),
|
|
124
|
+
__metadata('design:paramtypes', []),
|
|
125
|
+
__metadata('design:returntype', Promise),
|
|
126
|
+
],
|
|
127
|
+
Build.prototype,
|
|
128
|
+
'execute',
|
|
129
|
+
null
|
|
130
|
+
);
|
|
131
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -1,37 +1,77 @@
|
|
|
1
|
-
|
|
2
|
-
var __decorate =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r =
|
|
7
|
+
c < 3
|
|
8
|
+
? target
|
|
9
|
+
: desc === null
|
|
10
|
+
? (desc = Object.getOwnPropertyDescriptor(target, key))
|
|
11
|
+
: desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
14
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
else
|
|
16
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
17
|
+
if ((d = decorators[i]))
|
|
18
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
};
|
|
21
|
+
var __metadata =
|
|
22
|
+
(this && this.__metadata) ||
|
|
23
|
+
function (k, v) {
|
|
24
|
+
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function')
|
|
25
|
+
return Reflect.metadata(k, v);
|
|
26
|
+
};
|
|
27
|
+
var __awaiter =
|
|
28
|
+
(this && this.__awaiter) ||
|
|
29
|
+
function (thisArg, _arguments, P, generator) {
|
|
30
|
+
function adopt(value) {
|
|
31
|
+
return value instanceof P
|
|
32
|
+
? value
|
|
33
|
+
: new P(function (resolve) {
|
|
34
|
+
resolve(value);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function rejected(value) {
|
|
46
|
+
try {
|
|
47
|
+
step(generator['throw'](value));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
reject(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function step(result) {
|
|
53
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
54
|
+
}
|
|
55
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
var __importDefault =
|
|
59
|
+
(this && this.__importDefault) ||
|
|
60
|
+
function (mod) {
|
|
61
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
24
64
|
exports.BundlePackage = void 0;
|
|
25
|
-
const path_1 = __importDefault(require(
|
|
26
|
-
const utils_1 = require(
|
|
27
|
-
const utils_2 = require(
|
|
65
|
+
const path_1 = __importDefault(require('path'));
|
|
66
|
+
const utils_1 = require('../../utils');
|
|
67
|
+
const utils_2 = require('../utils');
|
|
28
68
|
class BundlePackage {
|
|
29
69
|
constructor(args) {
|
|
30
|
-
Object.defineProperty(this,
|
|
70
|
+
Object.defineProperty(this, 'args', {
|
|
31
71
|
enumerable: true,
|
|
32
72
|
configurable: true,
|
|
33
73
|
writable: true,
|
|
34
|
-
value: args
|
|
74
|
+
value: args,
|
|
35
75
|
});
|
|
36
76
|
}
|
|
37
77
|
description() {
|
|
@@ -40,8 +80,16 @@ class BundlePackage {
|
|
|
40
80
|
execute() {
|
|
41
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
82
|
const { config, stat = false, watch } = this.args;
|
|
43
|
-
if (
|
|
44
|
-
|
|
83
|
+
if (
|
|
84
|
+
(0, utils_2.getModuleType)(
|
|
85
|
+
path_1.default.join(process.cwd(), './tsconfig.json')
|
|
86
|
+
) !== 'esnext'
|
|
87
|
+
) {
|
|
88
|
+
utils_1.log.warning(
|
|
89
|
+
'\x1b[31m',
|
|
90
|
+
'It\'s recommended to use the "esnext" option for the "compilerOptions.module" in the "tsconfig.json" for the Webpack packages!',
|
|
91
|
+
'\x1b[0m'
|
|
92
|
+
);
|
|
45
93
|
}
|
|
46
94
|
const options = {
|
|
47
95
|
config,
|
|
@@ -51,18 +99,22 @@ class BundlePackage {
|
|
|
51
99
|
};
|
|
52
100
|
if (!watch) {
|
|
53
101
|
yield (0, utils_2.bundle)(Object.assign({ buildStat: stat }, options));
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
102
|
+
} else {
|
|
56
103
|
yield (0, utils_2.bundleWatch)(options);
|
|
57
104
|
}
|
|
58
105
|
});
|
|
59
106
|
}
|
|
60
107
|
}
|
|
61
108
|
exports.BundlePackage = BundlePackage;
|
|
62
|
-
__decorate(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
109
|
+
__decorate(
|
|
110
|
+
[
|
|
111
|
+
utils_1.logErrors,
|
|
112
|
+
__metadata('design:type', Function),
|
|
113
|
+
__metadata('design:paramtypes', []),
|
|
114
|
+
__metadata('design:returntype', Promise),
|
|
115
|
+
],
|
|
116
|
+
BundlePackage.prototype,
|
|
117
|
+
'execute',
|
|
118
|
+
null
|
|
119
|
+
);
|
|
120
|
+
//# sourceMappingURL=bundle-package.js.map
|
|
@@ -1,33 +1,71 @@
|
|
|
1
|
-
|
|
2
|
-
var __decorate =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __decorate =
|
|
3
|
+
(this && this.__decorate) ||
|
|
4
|
+
function (decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length,
|
|
6
|
+
r =
|
|
7
|
+
c < 3
|
|
8
|
+
? target
|
|
9
|
+
: desc === null
|
|
10
|
+
? (desc = Object.getOwnPropertyDescriptor(target, key))
|
|
11
|
+
: desc,
|
|
12
|
+
d;
|
|
13
|
+
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function')
|
|
14
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
15
|
+
else
|
|
16
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
17
|
+
if ((d = decorators[i]))
|
|
18
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
};
|
|
21
|
+
var __metadata =
|
|
22
|
+
(this && this.__metadata) ||
|
|
23
|
+
function (k, v) {
|
|
24
|
+
if (typeof Reflect === 'object' && typeof Reflect.metadata === 'function')
|
|
25
|
+
return Reflect.metadata(k, v);
|
|
26
|
+
};
|
|
27
|
+
var __awaiter =
|
|
28
|
+
(this && this.__awaiter) ||
|
|
29
|
+
function (thisArg, _arguments, P, generator) {
|
|
30
|
+
function adopt(value) {
|
|
31
|
+
return value instanceof P
|
|
32
|
+
? value
|
|
33
|
+
: new P(function (resolve) {
|
|
34
|
+
resolve(value);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) {
|
|
39
|
+
try {
|
|
40
|
+
step(generator.next(value));
|
|
41
|
+
} catch (e) {
|
|
42
|
+
reject(e);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function rejected(value) {
|
|
46
|
+
try {
|
|
47
|
+
step(generator['throw'](value));
|
|
48
|
+
} catch (e) {
|
|
49
|
+
reject(e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function step(result) {
|
|
53
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
54
|
+
}
|
|
55
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
21
59
|
exports.ESLintCommand = void 0;
|
|
22
|
-
const utils_1 = require(
|
|
23
|
-
const utils_2 = require(
|
|
60
|
+
const utils_1 = require('../../utils');
|
|
61
|
+
const utils_2 = require('../utils');
|
|
24
62
|
class ESLintCommand {
|
|
25
63
|
constructor(args) {
|
|
26
|
-
Object.defineProperty(this,
|
|
64
|
+
Object.defineProperty(this, 'args', {
|
|
27
65
|
enumerable: true,
|
|
28
66
|
configurable: true,
|
|
29
67
|
writable: true,
|
|
30
|
-
value: args
|
|
68
|
+
value: args,
|
|
31
69
|
});
|
|
32
70
|
}
|
|
33
71
|
description() {
|
|
@@ -41,10 +79,15 @@ class ESLintCommand {
|
|
|
41
79
|
}
|
|
42
80
|
}
|
|
43
81
|
exports.ESLintCommand = ESLintCommand;
|
|
44
|
-
__decorate(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
__decorate(
|
|
83
|
+
[
|
|
84
|
+
utils_1.logErrors,
|
|
85
|
+
__metadata('design:type', Function),
|
|
86
|
+
__metadata('design:paramtypes', []),
|
|
87
|
+
__metadata('design:returntype', Promise),
|
|
88
|
+
],
|
|
89
|
+
ESLintCommand.prototype,
|
|
90
|
+
'execute',
|
|
91
|
+
null
|
|
92
|
+
);
|
|
93
|
+
//# sourceMappingURL=eslint.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.getCommand = void 0;
|
|
4
|
-
const utils_1 = require(
|
|
5
|
-
const build_1 = require(
|
|
6
|
-
const bundle_package_1 = require(
|
|
7
|
-
const eslint_1 = require(
|
|
8
|
-
const init_1 = require(
|
|
9
|
-
const install_1 = require(
|
|
10
|
-
const kendo_ui_license_1 = require(
|
|
11
|
-
const lint_1 = require(
|
|
12
|
-
const mfe_publish_1 = require(
|
|
13
|
-
const prepare_package_1 = require(
|
|
14
|
-
const start_1 = require(
|
|
15
|
-
const styles_check_1 = require(
|
|
16
|
-
const tests_1 = require(
|
|
4
|
+
const utils_1 = require('../../utils');
|
|
5
|
+
const build_1 = require('./build');
|
|
6
|
+
const bundle_package_1 = require('./bundle-package');
|
|
7
|
+
const eslint_1 = require('./eslint');
|
|
8
|
+
const init_1 = require('./init');
|
|
9
|
+
const install_1 = require('./install');
|
|
10
|
+
const kendo_ui_license_1 = require('./kendo-ui-license');
|
|
11
|
+
const lint_1 = require('./lint');
|
|
12
|
+
const mfe_publish_1 = require('./mfe-publish');
|
|
13
|
+
const prepare_package_1 = require('./prepare-package');
|
|
14
|
+
const start_1 = require('./start');
|
|
15
|
+
const styles_check_1 = require('./styles-check');
|
|
16
|
+
const tests_1 = require('./tests');
|
|
17
17
|
function getCommand(name) {
|
|
18
18
|
switch (name) {
|
|
19
19
|
case utils_1.CommandName.build:
|
|
@@ -47,4 +47,4 @@ function getCommand(name) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
exports.getCommand = getCommand;
|
|
50
|
-
//# sourceMappingURL=get-command.js.map
|
|
50
|
+
//# sourceMappingURL=get-command.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.getUserCommands = void 0;
|
|
4
|
-
const utils_1 = require(
|
|
5
|
-
const get_command_1 = require(
|
|
4
|
+
const utils_1 = require('../../utils');
|
|
5
|
+
const get_command_1 = require('./get-command');
|
|
6
6
|
function getUserCommands() {
|
|
7
7
|
return Object.values(utils_1.CommandName)
|
|
8
8
|
.sort((a, b) => a.localeCompare(b))
|
|
9
9
|
.map(name => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const Command = (0, get_command_1.getCommand)(name);
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12
|
+
return { name, description: new Command({ _: [] }).description() };
|
|
13
|
+
})
|
|
14
14
|
.filter(({ description }) => !!description);
|
|
15
15
|
}
|
|
16
16
|
exports.getUserCommands = getUserCommands;
|
|
17
|
-
//# sourceMappingURL=get-user-commands.js.map
|
|
17
|
+
//# sourceMappingURL=get-user-commands.js.map
|