@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,24 +1,37 @@
|
|
|
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.htmlPlugin = void 0;
|
|
7
|
-
const deepmerge_1 = __importDefault(require(
|
|
8
|
-
const html_webpack_plugin_1 = __importDefault(require(
|
|
9
|
-
const utils_1 = require(
|
|
9
|
+
const deepmerge_1 = __importDefault(require('deepmerge'));
|
|
10
|
+
const html_webpack_plugin_1 = __importDefault(require('html-webpack-plugin'));
|
|
11
|
+
const utils_1 = require('../../utils');
|
|
10
12
|
function htmlPlugin({ embed, isWebComponent, name }, { plugins }) {
|
|
11
|
-
const { HtmlWebpackPlugin: htmlWebpackPluginOptions = {} } =
|
|
13
|
+
const { HtmlWebpackPlugin: htmlWebpackPluginOptions = {} } =
|
|
14
|
+
plugins !== null && plugins !== void 0 ? plugins : {};
|
|
12
15
|
if (embed) {
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
|
-
return new html_webpack_plugin_1.default(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
return new html_webpack_plugin_1.default(
|
|
19
|
+
(0, deepmerge_1.default)(
|
|
20
|
+
Object.assign(
|
|
21
|
+
Object.assign(
|
|
22
|
+
{ title: 'ServiceTitan', hash: true },
|
|
23
|
+
isWebComponent
|
|
24
|
+
? {
|
|
25
|
+
inject: false,
|
|
26
|
+
publicPath: '/',
|
|
27
|
+
templateContent: ({
|
|
28
|
+
htmlWebpackPlugin: {
|
|
29
|
+
tags: { headTags, bodyTags },
|
|
30
|
+
files,
|
|
31
|
+
},
|
|
32
|
+
}) => {
|
|
33
|
+
const styleUrls = encodeURIComponent(JSON.stringify(files.css));
|
|
34
|
+
return `
|
|
22
35
|
<!DOCTYPE html>
|
|
23
36
|
<html>
|
|
24
37
|
<head>
|
|
@@ -32,11 +45,19 @@ function htmlPlugin({ embed, isWebComponent, name }, { plugins }) {
|
|
|
32
45
|
</body>
|
|
33
46
|
</html>
|
|
34
47
|
`;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
: {}
|
|
51
|
+
),
|
|
52
|
+
{
|
|
53
|
+
templateParameters: {
|
|
54
|
+
splitByEntry: utils_1.splitByEntry,
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
htmlWebpackPluginOptions
|
|
59
|
+
)
|
|
60
|
+
);
|
|
40
61
|
}
|
|
41
62
|
exports.htmlPlugin = htmlPlugin;
|
|
42
|
-
//# sourceMappingURL=html-plugin.js.map
|
|
63
|
+
//# sourceMappingURL=html-plugin.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function checkResource(resource: string, context: string): boolean;
|
|
2
|
-
//# sourceMappingURL=check-resource.d.ts.map
|
|
2
|
+
//# sourceMappingURL=check-resource.d.ts.map
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.checkResource = void 0;
|
|
4
|
-
const is_optional_peer_dependency_1 = require(
|
|
4
|
+
const is_optional_peer_dependency_1 = require('./is-optional-peer-dependency');
|
|
5
5
|
function checkResource(resource, context) {
|
|
6
6
|
if ((0, is_optional_peer_dependency_1.isOptionalPeerDependency)({ resource, context })) {
|
|
7
7
|
try {
|
|
8
8
|
require.resolve(resource);
|
|
9
|
-
}
|
|
10
|
-
catch (e) {
|
|
9
|
+
} catch (e) {
|
|
11
10
|
return true;
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
return false;
|
|
15
14
|
}
|
|
16
15
|
exports.checkResource = checkResource;
|
|
17
|
-
//# sourceMappingURL=check-resource.js.map
|
|
16
|
+
//# sourceMappingURL=check-resource.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.ignorePlugin = void 0;
|
|
4
|
-
const webpack_1 = require(
|
|
5
|
-
const check_resource_1 = require(
|
|
4
|
+
const webpack_1 = require('webpack');
|
|
5
|
+
const check_resource_1 = require('./check-resource');
|
|
6
6
|
function ignorePlugin(_context, _) {
|
|
7
7
|
/**
|
|
8
8
|
* Ignore optional peer dependencies
|
|
@@ -12,4 +12,4 @@ function ignorePlugin(_context, _) {
|
|
|
12
12
|
return new webpack_1.IgnorePlugin({ checkResource: check_resource_1.checkResource });
|
|
13
13
|
}
|
|
14
14
|
exports.ignorePlugin = ignorePlugin;
|
|
15
|
-
//# sourceMappingURL=ignore-plugin.js.map
|
|
15
|
+
//# sourceMappingURL=ignore-plugin.js.map
|
|
@@ -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('./ignore-plugin'), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.isOptionalPeerDependency = void 0;
|
|
4
4
|
function isOptionalPeerDependency({ context, resource }) {
|
|
5
|
-
return (
|
|
5
|
+
return (
|
|
6
|
+
resource === 'react-dom/client' && /@servicetitan\/(ko-bridge|web-components)/.test(context)
|
|
7
|
+
);
|
|
6
8
|
}
|
|
7
9
|
exports.isOptionalPeerDependency = isOptionalPeerDependency;
|
|
8
|
-
//# sourceMappingURL=is-optional-peer-dependency.js.map
|
|
10
|
+
//# sourceMappingURL=is-optional-peer-dependency.js.map
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
__exportStar
|
|
23
|
-
__exportStar
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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('./assets-manifest-plugin'), exports);
|
|
31
|
+
__exportStar(require('./bundle-analyser-plugin'), exports);
|
|
32
|
+
__exportStar(require('./define-exposed-dependencies-plugin'), exports);
|
|
33
|
+
__exportStar(require('./define-web-component-name-plugin'), exports);
|
|
34
|
+
__exportStar(require('./filter-warnings-plugin'), exports);
|
|
35
|
+
__exportStar(require('./html-plugin'), exports);
|
|
36
|
+
__exportStar(require('./ignore-plugin'), exports);
|
|
37
|
+
__exportStar(require('./mini-css-extract-plugin'), exports);
|
|
38
|
+
__exportStar(require('./moment-locales-plugin'), exports);
|
|
39
|
+
__exportStar(require('./provide-react-plugin'), exports);
|
|
40
|
+
__exportStar(require('./ts-checker-plugin'), exports);
|
|
41
|
+
__exportStar(require('./virtual-modules-plugin'), exports);
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,23 +1,32 @@
|
|
|
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.miniCssExtractPlugin = void 0;
|
|
7
|
-
const mini_css_extract_plugin_1 = __importDefault(require(
|
|
9
|
+
const mini_css_extract_plugin_1 = __importDefault(require('mini-css-extract-plugin'));
|
|
8
10
|
function miniCssExtractPlugin(context, overrides) {
|
|
9
11
|
var _a;
|
|
10
|
-
const { isCustomStyleRules, isExposeSharedDependencies, isProduction, isWebComponent } =
|
|
12
|
+
const { isCustomStyleRules, isExposeSharedDependencies, isProduction, isWebComponent } =
|
|
13
|
+
context;
|
|
11
14
|
if (isProduction) {
|
|
12
15
|
if (!isCustomStyleRules) {
|
|
13
|
-
return new mini_css_extract_plugin_1.default(
|
|
16
|
+
return new mini_css_extract_plugin_1.default(
|
|
17
|
+
Object.assign(
|
|
18
|
+
{ filename: '[name].[contenthash:8].bundle.css' },
|
|
19
|
+
(_a = overrides.plugins) === null || _a === void 0
|
|
20
|
+
? void 0
|
|
21
|
+
: _a.MiniCssExtractPlugin
|
|
22
|
+
)
|
|
23
|
+
);
|
|
14
24
|
}
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
25
|
+
} else {
|
|
17
26
|
if (isWebComponent || (isExposeSharedDependencies && !isCustomStyleRules)) {
|
|
18
27
|
return new mini_css_extract_plugin_1.default({ filename: '[name].bundle.css' });
|
|
19
28
|
}
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
exports.miniCssExtractPlugin = miniCssExtractPlugin;
|
|
23
|
-
//# sourceMappingURL=mini-css-extract-plugin.js.map
|
|
32
|
+
//# sourceMappingURL=mini-css-extract-plugin.js.map
|
|
@@ -1,14 +1,16 @@
|
|
|
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.momentLocalesPlugin = void 0;
|
|
7
|
-
const moment_locales_webpack_plugin_1 = __importDefault(require(
|
|
9
|
+
const moment_locales_webpack_plugin_1 = __importDefault(require('moment-locales-webpack-plugin'));
|
|
8
10
|
function momentLocalesPlugin(_, _overrides) {
|
|
9
11
|
return new moment_locales_webpack_plugin_1.default({
|
|
10
12
|
localesToKeep: ['en-au', 'en-ca', 'en-gb'],
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
15
|
exports.momentLocalesPlugin = momentLocalesPlugin;
|
|
14
|
-
//# sourceMappingURL=moment-locales-plugin.js.map
|
|
16
|
+
//# sourceMappingURL=moment-locales-plugin.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.provideReactPlugin = void 0;
|
|
4
|
-
const webpack_1 = require(
|
|
4
|
+
const webpack_1 = require('webpack');
|
|
5
5
|
function provideReactPlugin({ esbuild, experimentalBundlers }, _) {
|
|
6
6
|
if (!(esbuild || experimentalBundlers)) {
|
|
7
7
|
return;
|
|
@@ -11,4 +11,4 @@ function provideReactPlugin({ esbuild, experimentalBundlers }, _) {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
exports.provideReactPlugin = provideReactPlugin;
|
|
14
|
-
//# sourceMappingURL=provide-react-plugin.js.map
|
|
14
|
+
//# sourceMappingURL=provide-react-plugin.js.map
|
|
@@ -1,31 +1,39 @@
|
|
|
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.tsCheckerPlugin = void 0;
|
|
7
|
-
const deepmerge_1 = __importDefault(require(
|
|
8
|
-
const fork_ts_checker_webpack_plugin_1 = __importDefault(require(
|
|
9
|
-
const utils_1 = require(
|
|
9
|
+
const deepmerge_1 = __importDefault(require('deepmerge'));
|
|
10
|
+
const fork_ts_checker_webpack_plugin_1 = __importDefault(require('fork-ts-checker-webpack-plugin'));
|
|
11
|
+
const utils_1 = require('../../../utils');
|
|
10
12
|
function tsCheckerPlugin({ embed }, { plugins }) {
|
|
11
|
-
const { ForkTsCheckerWebpackPlugin: forkTsCheckerWebpackPluginOptions = {} } =
|
|
13
|
+
const { ForkTsCheckerWebpackPlugin: forkTsCheckerWebpackPluginOptions = {} } =
|
|
14
|
+
plugins !== null && plugins !== void 0 ? plugins : {};
|
|
12
15
|
if (embed) {
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
|
-
return new fork_ts_checker_webpack_plugin_1.default(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
return new fork_ts_checker_webpack_plugin_1.default(
|
|
19
|
+
(0, deepmerge_1.default)(
|
|
20
|
+
{
|
|
21
|
+
typescript: {
|
|
22
|
+
configFile: (0, utils_1.getTsConfig)(),
|
|
23
|
+
configOverwrite: {
|
|
24
|
+
exclude: [
|
|
25
|
+
'**/__tests__/**/*',
|
|
26
|
+
'**/__mocks__/**/*',
|
|
27
|
+
'**/*.test.*',
|
|
28
|
+
'**/*.stories.tsx',
|
|
29
|
+
],
|
|
30
|
+
references: [],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
26
33
|
},
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
forkTsCheckerWebpackPluginOptions
|
|
35
|
+
)
|
|
36
|
+
);
|
|
29
37
|
}
|
|
30
38
|
exports.tsCheckerPlugin = tsCheckerPlugin;
|
|
31
|
-
//# sourceMappingURL=ts-checker-plugin.js.map
|
|
39
|
+
//# sourceMappingURL=ts-checker-plugin.js.map
|
|
@@ -1,12 +1,14 @@
|
|
|
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.virtualModulesPlugin = void 0;
|
|
7
|
-
const fs_1 = __importDefault(require(
|
|
8
|
-
const path_1 = __importDefault(require(
|
|
9
|
-
const webpack_virtual_modules_1 = __importDefault(require(
|
|
9
|
+
const fs_1 = __importDefault(require('fs'));
|
|
10
|
+
const path_1 = __importDefault(require('path'));
|
|
11
|
+
const webpack_virtual_modules_1 = __importDefault(require('webpack-virtual-modules'));
|
|
10
12
|
function virtualModulesPlugin(context, _) {
|
|
11
13
|
if (!context.isWebComponent) {
|
|
12
14
|
return;
|
|
@@ -31,7 +33,9 @@ function designSystemCode() {
|
|
|
31
33
|
].join('\n');
|
|
32
34
|
}
|
|
33
35
|
function indexCode({ embed = false, isLegacyRoot, sharedDependencies }) {
|
|
34
|
-
const options = `{ legacyRoot: ${isLegacyRoot}, sharedDependenciesNames: ${JSON.stringify(
|
|
36
|
+
const options = `{ legacyRoot: ${isLegacyRoot}, sharedDependenciesNames: ${JSON.stringify(
|
|
37
|
+
Object.keys(sharedDependencies)
|
|
38
|
+
)} }`;
|
|
35
39
|
return [
|
|
36
40
|
...(embed ? [] : [`require('./design-system.css');`]),
|
|
37
41
|
`import { register } from '@servicetitan/web-components';`,
|
|
@@ -39,4 +43,4 @@ function indexCode({ embed = false, isLegacyRoot, sharedDependencies }) {
|
|
|
39
43
|
`register(App, ${embed}, ${options});`,
|
|
40
44
|
].join('\n');
|
|
41
45
|
}
|
|
42
|
-
//# sourceMappingURL=virtual-modules-plugin.js.map
|
|
46
|
+
//# sourceMappingURL=virtual-modules-plugin.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.pluginsConfig = void 0;
|
|
4
|
-
const plugins_1 = require(
|
|
4
|
+
const plugins_1 = require('./plugins');
|
|
5
5
|
function pluginsConfig(context, overrides) {
|
|
6
6
|
const plugins = [
|
|
7
7
|
plugins_1.assetsManifestPlugin,
|
|
@@ -22,4 +22,4 @@ function pluginsConfig(context, overrides) {
|
|
|
22
22
|
return { plugins };
|
|
23
23
|
}
|
|
24
24
|
exports.pluginsConfig = pluginsConfig;
|
|
25
|
-
//# sourceMappingURL=plugins-config.js.map
|
|
25
|
+
//# sourceMappingURL=plugins-config.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.resolveConfig = void 0;
|
|
4
4
|
function resolveConfig(_context, _) {
|
|
5
5
|
const resolve = {
|
|
@@ -8,4 +8,4 @@ function resolveConfig(_context, _) {
|
|
|
8
8
|
return { resolve };
|
|
9
9
|
}
|
|
10
10
|
exports.resolveConfig = resolveConfig;
|
|
11
|
-
//# sourceMappingURL=resolve-config.js.map
|
|
11
|
+
//# sourceMappingURL=resolve-config.js.map
|
|
@@ -1,22 +1,29 @@
|
|
|
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.cssRules = void 0;
|
|
7
|
-
const mini_css_extract_plugin_1 = __importDefault(require(
|
|
8
|
-
const loaders_1 = require(
|
|
9
|
+
const mini_css_extract_plugin_1 = __importDefault(require('mini-css-extract-plugin'));
|
|
10
|
+
const loaders_1 = require('../loaders');
|
|
9
11
|
const sharedCssDependencies = [/design-system\.css$/, /@servicetitan\/anvil2\/.*\.css$/];
|
|
10
12
|
function cssRules(context) {
|
|
11
13
|
const { isExposeSharedDependencies, isProduction } = context;
|
|
12
|
-
const excludeCallback =
|
|
13
|
-
return (
|
|
14
|
-
|
|
14
|
+
const excludeCallback = path => {
|
|
15
|
+
return (
|
|
16
|
+
path.endsWith('.module.css') ||
|
|
17
|
+
(isExposeSharedDependencies && sharedCssDependencies.some(regex => regex.test(path)))
|
|
18
|
+
);
|
|
15
19
|
};
|
|
16
20
|
const result = [
|
|
17
21
|
{
|
|
18
22
|
test: /\.module.css$/,
|
|
19
|
-
use: [
|
|
23
|
+
use: [
|
|
24
|
+
(0, loaders_1.styleLoader)(context, { esModule: true }),
|
|
25
|
+
(0, loaders_1.cssLoader)(context, { esModule: true }),
|
|
26
|
+
],
|
|
20
27
|
},
|
|
21
28
|
{
|
|
22
29
|
test: /(\.css)$/,
|
|
@@ -25,12 +32,14 @@ function cssRules(context) {
|
|
|
25
32
|
},
|
|
26
33
|
];
|
|
27
34
|
if (isExposeSharedDependencies && !isProduction) {
|
|
28
|
-
result.push(
|
|
29
|
-
test
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
result.push(
|
|
36
|
+
...sharedCssDependencies.map(test => ({
|
|
37
|
+
test,
|
|
38
|
+
use: [mini_css_extract_plugin_1.default.loader, (0, loaders_1.cssLoader)(context)],
|
|
39
|
+
}))
|
|
40
|
+
);
|
|
32
41
|
}
|
|
33
42
|
return result;
|
|
34
43
|
}
|
|
35
44
|
exports.cssRules = cssRules;
|
|
36
|
-
//# sourceMappingURL=css-rules.js.map
|
|
45
|
+
//# sourceMappingURL=css-rules.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.fontRules = void 0;
|
|
4
4
|
function fontRules(_) {
|
|
5
5
|
return [
|
|
@@ -13,4 +13,4 @@ function fontRules(_) {
|
|
|
13
13
|
];
|
|
14
14
|
}
|
|
15
15
|
exports.fontRules = fontRules;
|
|
16
|
-
//# sourceMappingURL=font-rules.js.map
|
|
16
|
+
//# sourceMappingURL=font-rules.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.imageRules = void 0;
|
|
4
4
|
function imageRules(_) {
|
|
5
5
|
return [
|
|
@@ -13,4 +13,4 @@ function imageRules(_) {
|
|
|
13
13
|
];
|
|
14
14
|
}
|
|
15
15
|
exports.imageRules = imageRules;
|
|
16
|
-
//# sourceMappingURL=image-rules.js.map
|
|
16
|
+
//# sourceMappingURL=image-rules.js.map
|