@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,30 +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.contextifyRequest = void 0;
|
|
7
|
-
const path_1 = __importDefault(require(
|
|
9
|
+
const path_1 = __importDefault(require('path'));
|
|
8
10
|
function contextifyRequest(context, request) {
|
|
9
11
|
return request
|
|
10
12
|
.split('!')
|
|
11
13
|
.map(r => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const splitPath = r.split('?');
|
|
15
|
+
if (/^[a-zA-Z]:\\/.test(splitPath[0])) {
|
|
16
|
+
splitPath[0] = path_1.default.win32.relative(context, splitPath[0]);
|
|
17
|
+
if (!/^[a-zA-Z]:\\/.test(splitPath[0])) {
|
|
18
|
+
splitPath[0] = splitPath[0].replace(/\\/g, '/');
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})
|
|
21
|
+
if (/^\//.test(splitPath[0])) {
|
|
22
|
+
splitPath[0] = path_1.default.posix.relative(context, splitPath[0]);
|
|
23
|
+
}
|
|
24
|
+
if (!/^(\.\.\/|\/|[a-zA-Z]:\\)/.test(splitPath[0])) {
|
|
25
|
+
splitPath[0] = `./${splitPath[0]}`;
|
|
26
|
+
}
|
|
27
|
+
return splitPath.join('?');
|
|
28
|
+
})
|
|
27
29
|
.join('!');
|
|
28
30
|
}
|
|
29
31
|
exports.contextifyRequest = contextifyRequest;
|
|
30
|
-
//# sourceMappingURL=contextify-request.js.map
|
|
32
|
+
//# sourceMappingURL=contextify-request.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function getNewUserRequest(request: string): string;
|
|
2
|
-
//# sourceMappingURL=get-new-user-request.d.ts.map
|
|
2
|
+
//# sourceMappingURL=get-new-user-request.d.ts.map
|
|
@@ -1,19 +1,28 @@
|
|
|
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.getNewUserRequest = void 0;
|
|
7
|
-
const path_1 = __importDefault(require(
|
|
9
|
+
const path_1 = __importDefault(require('path'));
|
|
8
10
|
function getNewUserRequest(request) {
|
|
9
11
|
var _a, _b;
|
|
10
12
|
const splittedRequest = request.split('!');
|
|
11
|
-
const lastPartRequest =
|
|
13
|
+
const lastPartRequest =
|
|
14
|
+
(_b =
|
|
15
|
+
(_a = splittedRequest.pop()) === null || _a === void 0 ? void 0 : _a.split('?', 2)) !==
|
|
16
|
+
null && _b !== void 0
|
|
17
|
+
? _b
|
|
18
|
+
: [];
|
|
12
19
|
const pathObject = path_1.default.parse(lastPartRequest[0]);
|
|
13
|
-
pathObject.base = `${path_1.default.basename(pathObject.base, pathObject.ext)}-exposed${
|
|
20
|
+
pathObject.base = `${path_1.default.basename(pathObject.base, pathObject.ext)}-exposed${
|
|
21
|
+
pathObject.ext
|
|
22
|
+
}`;
|
|
14
23
|
lastPartRequest[0] = path_1.default.format(pathObject);
|
|
15
24
|
splittedRequest.push(lastPartRequest.join('?'));
|
|
16
25
|
return splittedRequest.join('!');
|
|
17
26
|
}
|
|
18
27
|
exports.getNewUserRequest = getNewUserRequest;
|
|
19
|
-
//# sourceMappingURL=get-new-user-request.js.map
|
|
28
|
+
//# sourceMappingURL=get-new-user-request.js.map
|
|
@@ -1,20 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
Object.defineProperty(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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('./contextify-request'), exports);
|
|
31
|
+
__exportStar(require('./get-new-user-request'), exports);
|
|
32
|
+
__exportStar(require('./stringify-request'), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function stringifyRequest(context: string, request: string): string;
|
|
2
|
-
//# sourceMappingURL=stringify-request.d.ts.map
|
|
2
|
+
//# sourceMappingURL=stringify-request.d.ts.map
|
|
@@ -1,27 +1,31 @@
|
|
|
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.stringifyRequest = void 0;
|
|
7
|
-
const path_1 = __importDefault(require(
|
|
9
|
+
const path_1 = __importDefault(require('path'));
|
|
8
10
|
function stringifyRequest(context, request) {
|
|
9
11
|
const splitted = request.split('!');
|
|
10
|
-
return JSON.stringify(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
return JSON.stringify(
|
|
13
|
+
splitted
|
|
14
|
+
.map(part => {
|
|
15
|
+
// First, separate singlePath from query, because the query might contain paths again
|
|
16
|
+
const splittedPart = /^(.*?)(\?.*)/.exec(part);
|
|
17
|
+
const query = splittedPart ? splittedPart[2] : '';
|
|
18
|
+
let singlePath = splittedPart ? splittedPart[1] : part;
|
|
19
|
+
if (isAbsolutePath(singlePath) && context) {
|
|
20
|
+
singlePath = path_1.default.relative(context, singlePath);
|
|
21
|
+
}
|
|
22
|
+
return singlePath.replace(/\\/g, '/') + query;
|
|
23
|
+
})
|
|
24
|
+
.join('!')
|
|
25
|
+
);
|
|
22
26
|
}
|
|
23
27
|
exports.stringifyRequest = stringifyRequest;
|
|
24
28
|
function isAbsolutePath(str) {
|
|
25
29
|
return path_1.default.posix.isAbsolute(str) || path_1.default.win32.isAbsolute(str);
|
|
26
30
|
}
|
|
27
|
-
//# sourceMappingURL=stringify-request.js.map
|
|
31
|
+
//# sourceMappingURL=stringify-request.js.map
|
package/dist/webpack/types.d.ts
CHANGED
package/dist/webpack/types.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.getModuleEntryPath = void 0;
|
|
4
4
|
const path = require('path');
|
|
5
5
|
/**
|
|
@@ -17,4 +17,4 @@ function getModuleEntryPath(packageName) {
|
|
|
17
17
|
return defaultPath;
|
|
18
18
|
}
|
|
19
19
|
exports.getModuleEntryPath = getModuleEntryPath;
|
|
20
|
-
//# sourceMappingURL=bundle.js.map
|
|
20
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.featureCohort = void 0;
|
|
4
|
-
const username_1 = require(
|
|
5
|
-
const utils_1 = require(
|
|
6
|
-
const hash_mod_1 = require(
|
|
4
|
+
const username_1 = require('username');
|
|
5
|
+
const utils_1 = require('../../utils');
|
|
6
|
+
const hash_mod_1 = require('./hash-mod');
|
|
7
7
|
/**
|
|
8
8
|
* Allows to enable feature for part of the auditory based on stable trait (username).
|
|
9
9
|
*/
|
|
@@ -19,4 +19,4 @@ function featureCohort([limit, total], fn) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
exports.featureCohort = featureCohort;
|
|
22
|
-
//# sourceMappingURL=feature-cohort.js.map
|
|
22
|
+
//# sourceMappingURL=feature-cohort.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function getCallerFile(): string;
|
|
2
|
-
//# sourceMappingURL=get-caller-filename.d.ts.map
|
|
2
|
+
//# sourceMappingURL=get-caller-filename.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.getCallerFile = void 0;
|
|
4
4
|
function getCallerFile() {
|
|
5
5
|
var _a;
|
|
@@ -17,11 +17,10 @@ function getCallerFile() {
|
|
|
17
17
|
break;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
}
|
|
21
|
-
finally {
|
|
20
|
+
} finally {
|
|
22
21
|
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
23
22
|
}
|
|
24
23
|
return filename;
|
|
25
24
|
}
|
|
26
25
|
exports.getCallerFile = getCallerFile;
|
|
27
|
-
//# sourceMappingURL=get-caller-filename.js.map
|
|
26
|
+
//# sourceMappingURL=get-caller-filename.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
/*
|
|
3
3
|
* salvaged from https://github.com/segment-boneyard/hash-mod
|
|
4
4
|
* 1. recent code from repo never got into npm registry
|
|
5
5
|
* 2. no types in DefinitelyTyped
|
|
6
6
|
*/
|
|
7
|
-
Object.defineProperty(exports,
|
|
7
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
exports.hashMod = void 0;
|
|
9
9
|
/**
|
|
10
10
|
* Returns a `hashMod` function that will return an integer hash of a string
|
|
@@ -32,4 +32,4 @@ function integerHash(string) {
|
|
|
32
32
|
return (memo * 31 * item.charCodeAt(0)) % 982451653;
|
|
33
33
|
}, 7);
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=hash-mod.js.map
|
|
35
|
+
//# sourceMappingURL=hash-mod.js.map
|
|
@@ -1,21 +1,34 @@
|
|
|
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
|
-
|
|
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('./bundle'), exports);
|
|
31
|
+
__exportStar(require('./feature-cohort'), exports);
|
|
32
|
+
__exportStar(require('./get-caller-filename'), exports);
|
|
33
|
+
__exportStar(require('./split-by-entry'), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { Compilation } from 'webpack';
|
|
2
|
-
export declare function splitByEntry(
|
|
3
|
-
|
|
2
|
+
export declare function splitByEntry(
|
|
3
|
+
compilation: Compilation,
|
|
4
|
+
entry: string,
|
|
5
|
+
outputFiles: string[]
|
|
6
|
+
): [string[], string[]];
|
|
7
|
+
//# sourceMappingURL=split-by-entry.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.splitByEntry = void 0;
|
|
4
4
|
function splitByEntry(compilation, entry, outputFiles) {
|
|
5
5
|
const filenames = getFiles(compilation, entry);
|
|
@@ -8,8 +8,7 @@ function splitByEntry(compilation, entry, outputFiles) {
|
|
|
8
8
|
for (const output of outputFiles) {
|
|
9
9
|
if (filenames.some(filename => output.includes(filename))) {
|
|
10
10
|
first.push(output);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
11
|
+
} else {
|
|
13
12
|
second.push(output);
|
|
14
13
|
}
|
|
15
14
|
}
|
|
@@ -23,4 +22,4 @@ function getFiles(compilation, entry) {
|
|
|
23
22
|
}
|
|
24
23
|
return entrypoint.getFiles();
|
|
25
24
|
}
|
|
26
|
-
//# sourceMappingURL=split-by-entry.js.map
|
|
25
|
+
//# sourceMappingURL=split-by-entry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.compile = void 0;
|
|
4
4
|
function compile(compiler) {
|
|
5
5
|
return new Promise((resolve, reject) => {
|
|
@@ -12,4 +12,4 @@ function compile(compiler) {
|
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
exports.compile = compile;
|
|
15
|
-
//# sourceMappingURL=compile.js.map
|
|
15
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export declare function executeFactory(cwd: string): (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare function executeFactory(cwd: string): (
|
|
2
|
+
code: string,
|
|
3
|
+
{
|
|
4
|
+
before,
|
|
5
|
+
after,
|
|
6
|
+
}?: {
|
|
7
|
+
before: string;
|
|
8
|
+
after: string;
|
|
9
|
+
}
|
|
10
|
+
) => any;
|
|
11
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -1,21 +1,28 @@
|
|
|
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.executeFactory = void 0;
|
|
7
|
-
const module_1 = __importDefault(require(
|
|
8
|
-
const path_1 = __importDefault(require(
|
|
9
|
+
const module_1 = __importDefault(require('module'));
|
|
10
|
+
const path_1 = __importDefault(require('path'));
|
|
9
11
|
const parentModule = module;
|
|
10
12
|
function executeFactory(cwd) {
|
|
11
|
-
return function execute(
|
|
13
|
+
return function execute(
|
|
14
|
+
code,
|
|
15
|
+
{ before, after } = { before: 'const __export__;', after: 'module.exports = __export__;' }
|
|
16
|
+
) {
|
|
12
17
|
const resource = 'test.js';
|
|
13
18
|
const module = new module_1.default(resource, parentModule);
|
|
14
|
-
module.paths = module_1.default._nodeModulePaths(
|
|
19
|
+
module.paths = module_1.default._nodeModulePaths(
|
|
20
|
+
path_1.default.resolve(cwd, './__tests__/__mocks__')
|
|
21
|
+
);
|
|
15
22
|
module.filename = resource;
|
|
16
23
|
module._compile(`${before}\n${code}\n${after}`, resource);
|
|
17
24
|
return module.exports;
|
|
18
25
|
};
|
|
19
26
|
}
|
|
20
27
|
exports.executeFactory = executeFactory;
|
|
21
|
-
//# sourceMappingURL=execute.js.map
|
|
28
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import webpack, { Configuration } from 'webpack';
|
|
2
|
-
export declare function getCompilerFactory(
|
|
3
|
-
|
|
2
|
+
export declare function getCompilerFactory(
|
|
3
|
+
cwd: string
|
|
4
|
+
): (entry: string, loaderOptions?: {}, config?: Configuration) => webpack.Compiler;
|
|
5
|
+
//# sourceMappingURL=get-compiler.d.ts.map
|
|
@@ -1,44 +1,51 @@
|
|
|
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.getCompilerFactory = void 0;
|
|
7
|
-
const path_1 = __importDefault(require(
|
|
8
|
-
const webpack_1 = __importDefault(require(
|
|
9
|
-
const webpack_merge_1 = require(
|
|
10
|
-
const memfs_1 = require(
|
|
9
|
+
const path_1 = __importDefault(require('path'));
|
|
10
|
+
const webpack_1 = __importDefault(require('webpack'));
|
|
11
|
+
const webpack_merge_1 = require('webpack-merge');
|
|
12
|
+
const memfs_1 = require('memfs');
|
|
11
13
|
function getCompilerFactory(cwd) {
|
|
12
14
|
return function getCompiler(entry, loaderOptions = {}, config = {}) {
|
|
13
15
|
var _a;
|
|
14
|
-
const compiler = (0, webpack_1.default)(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
test: new RegExp(`\\.${path_1.default.basename(cwd)}\\.\\w+$`, 'i'),
|
|
16
|
+
const compiler = (0, webpack_1.default)(
|
|
17
|
+
(0, webpack_merge_1.merge)(
|
|
18
|
+
{
|
|
19
|
+
mode: 'development',
|
|
20
|
+
devtool: (_a = config.devtool) !== null && _a !== void 0 ? _a : false,
|
|
21
|
+
context: path_1.default.resolve(cwd, './__tests__/__mocks__'),
|
|
22
|
+
entry: path_1.default.resolve(cwd, './__tests__/__mocks__', entry),
|
|
23
|
+
output: {
|
|
24
|
+
path: path_1.default.resolve(cwd, './__tests__/dist'),
|
|
25
|
+
filename: '[name].bundle.js',
|
|
26
|
+
chunkFilename: '[name].chunk.js',
|
|
27
|
+
},
|
|
28
|
+
module: {
|
|
28
29
|
rules: [
|
|
29
30
|
{
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
test: new RegExp(`\\.${path_1.default.basename(cwd)}\\.\\w+$`, 'i'),
|
|
32
|
+
rules: [
|
|
33
|
+
{
|
|
34
|
+
loader: require.resolve(cwd),
|
|
35
|
+
options: loaderOptions,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
32
38
|
},
|
|
33
39
|
],
|
|
34
40
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
plugins: [],
|
|
42
|
+
},
|
|
43
|
+
config
|
|
44
|
+
)
|
|
45
|
+
);
|
|
39
46
|
compiler.outputFileSystem = (0, memfs_1.createFsFromVolume)(new memfs_1.Volume());
|
|
40
47
|
return compiler;
|
|
41
48
|
};
|
|
42
49
|
}
|
|
43
50
|
exports.getCompilerFactory = getCompilerFactory;
|
|
44
|
-
//# sourceMappingURL=get-compiler.js.map
|
|
51
|
+
//# sourceMappingURL=get-compiler.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.getErrors = void 0;
|
|
4
|
-
const normalize_errors_1 = require(
|
|
4
|
+
const normalize_errors_1 = require('./normalize-errors');
|
|
5
5
|
function getErrors(stats) {
|
|
6
6
|
return (0, normalize_errors_1.normalizeErrors)(stats.compilation.errors);
|
|
7
7
|
}
|
|
8
8
|
exports.getErrors = getErrors;
|
|
9
|
-
//# sourceMappingURL=get-errors.js.map
|
|
9
|
+
//# sourceMappingURL=get-errors.js.map
|