@servicetitan/startup 27.4.0 → 28.0.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/cli/commands/get-branch-configs.d.ts +4 -0
- package/dist/cli/commands/get-branch-configs.d.ts.map +1 -0
- package/dist/cli/commands/get-branch-configs.js +13 -0
- package/dist/cli/commands/get-branch-configs.js.map +1 -0
- package/dist/cli/commands/get-command.d.ts.map +1 -1
- package/dist/cli/commands/get-command.js +4 -2
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/init.d.ts +0 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +39 -9
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.d.ts +13 -0
- package/dist/cli/commands/mfe-package-clean.d.ts.map +1 -0
- package/dist/cli/commands/mfe-package-clean.js +113 -0
- package/dist/cli/commands/mfe-package-clean.js.map +1 -0
- package/dist/cli/commands/mfe-package-publish.d.ts +20 -0
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -0
- package/dist/cli/commands/mfe-package-publish.js +153 -0
- package/dist/cli/commands/mfe-package-publish.js.map +1 -0
- package/dist/cli/commands/mfe-publish.d.ts +4 -29
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +1 -213
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/utils/assets-copy.d.ts.map +1 -1
- package/dist/cli/utils/assets-copy.js +3 -3
- package/dist/cli/utils/assets-copy.js.map +1 -1
- package/dist/cli/utils/cli-os.d.ts +9 -2
- package/dist/cli/utils/cli-os.d.ts.map +1 -1
- package/dist/cli/utils/cli-os.js +16 -8
- package/dist/cli/utils/cli-os.js.map +1 -1
- package/dist/cli/utils/styles-copy.d.ts.map +1 -1
- package/dist/cli/utils/styles-copy.js +3 -3
- package/dist/cli/utils/styles-copy.js.map +1 -1
- package/dist/utils/get-folders.js +2 -2
- package/dist/utils/get-folders.js.map +1 -1
- package/dist/utils/get-jest-config.d.ts.map +1 -1
- package/dist/utils/get-jest-config.js +2 -10
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/webpack/configs/dev-server-config.d.ts.map +1 -1
- package/dist/webpack/configs/dev-server-config.js +1 -1
- package/dist/webpack/configs/dev-server-config.js.map +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-anvil-peer-dependency.js +1 -1
- package/dist/webpack/configs/plugins/ignore-plugin/is-optional-anvil-peer-dependency.js.map +1 -1
- package/dist/webpack/configs/plugins/index.d.ts +1 -0
- package/dist/webpack/configs/plugins/index.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/index.js +1 -0
- package/dist/webpack/configs/plugins/index.js.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.d.ts.map +1 -1
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js +15 -5
- package/dist/webpack/configs/plugins/virtual-modules-plugin.js.map +1 -1
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts +8 -0
- package/dist/webpack/configs/plugins/watch-run-plugin.d.ts.map +1 -0
- package/dist/webpack/configs/plugins/watch-run-plugin.js +26 -0
- package/dist/webpack/configs/plugins/watch-run-plugin.js.map +1 -0
- package/dist/webpack/configs/plugins-config.d.ts.map +1 -1
- package/dist/webpack/configs/plugins-config.js +1 -0
- package/dist/webpack/configs/plugins-config.js.map +1 -1
- package/dist/webpack/configs/types.d.ts +16 -0
- package/dist/webpack/configs/types.d.ts.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.d.ts.map +1 -1
- package/dist/webpack/configs/utils/generate-metadata.js +3 -3
- package/dist/webpack/configs/utils/generate-metadata.js.map +1 -1
- package/jest/jest-preset.js +9 -0
- package/package.json +16 -21
- package/src/cli/commands/__tests__/init.test.ts +108 -28
- package/src/cli/commands/__tests__/mfe-package-clean.test.ts +1 -1
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +77 -7
- package/src/cli/commands/__tests__/tests.test.ts +4 -0
- package/src/cli/commands/get-branch-configs.ts +8 -0
- package/src/cli/commands/get-command.ts +3 -1
- package/src/cli/commands/init.ts +40 -10
- package/src/cli/commands/mfe-package-clean.ts +132 -0
- package/src/cli/commands/mfe-package-publish.ts +189 -0
- package/src/cli/commands/mfe-publish.ts +5 -294
- package/src/cli/utils/__tests__/assets-copy.test.ts +3 -7
- package/src/cli/utils/__tests__/cli-os.test.ts +41 -6
- package/src/cli/utils/__tests__/eslint.test.ts +4 -0
- package/src/cli/utils/__tests__/styles-copy.test.ts +3 -7
- package/src/cli/utils/assets-copy.ts +3 -3
- package/src/cli/utils/cli-os.ts +20 -8
- package/src/cli/utils/styles-copy.ts +3 -3
- package/src/utils/__tests__/get-jest-config.test.ts +1 -7
- package/src/utils/__tests__/load-shared-dependencies.test.ts +82 -88
- package/src/utils/get-folders.ts +1 -1
- package/src/utils/get-jest-config.ts +2 -10
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +0 -1
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +47 -13
- package/src/webpack/__tests__/create-webpack-config.test.ts +3 -2
- package/src/webpack/configs/dev-server-config.ts +2 -1
- package/src/webpack/configs/plugins/ignore-plugin/is-optional-anvil-peer-dependency.ts +1 -1
- package/src/webpack/configs/plugins/index.ts +1 -0
- package/src/webpack/configs/plugins/virtual-modules-plugin.ts +17 -5
- package/src/webpack/configs/plugins/watch-run-plugin.ts +23 -0
- package/src/webpack/configs/plugins-config.ts +2 -0
- package/src/webpack/configs/types.ts +19 -0
- package/src/webpack/configs/utils/generate-metadata.ts +5 -5
- package/tsconfig/base.json +1 -1
- package/template/.eslintrc.json +0 -3
- package/template/.gitignore +0 -21
- package/template/.npmrc +0 -3
- package/template/.prettierrc +0 -9
- package/template/.stylelintignore +0 -1
- package/template/.stylelintrc.json +0 -3
- package/template/.vscode/extensions.json +0 -18
- package/template/.vscode/settings.json +0 -4
- package/template/lerna.json +0 -4
- package/template/package.json +0 -32
- package/template/packages/application/package.json +0 -35
- package/template/packages/application/src/__tests__/app.test.tsx +0 -33
- package/template/packages/application/src/app.css +0 -3
- package/template/packages/application/src/app.tsx +0 -45
- package/template/packages/application/src/design-system.css +0 -3
- package/template/packages/application/src/index.tsx +0 -8
- package/template/packages/application/src/main-page.tsx +0 -5
- package/template/packages/application/src/second-page.tsx +0 -5
- package/template/packages/application/tsconfig.json +0 -13
- package/template/packages/feature-a/package.json +0 -19
- package/template/packages/feature-a/src/index.ts +0 -0
- package/template/packages/feature-a/tsconfig.json +0 -9
- package/template/packages/feature-b/package.json +0 -19
- package/template/packages/feature-b/src/index.ts +0 -0
- package/template/packages/feature-b/tsconfig.json +0 -9
- package/template/packages/feature-c/package.json +0 -19
- package/template/packages/feature-c/src/index.ts +0 -0
- package/template/packages/feature-c/tsconfig.json +0 -9
- package/template/setupTests.ts +0 -27
- package/template/tsconfig.test.json +0 -5
- package/template-react18/packages/application/package.json +0 -35
- package/template-react18/packages/application/src/index.tsx +0 -9
- package/template-react18/packages/feature-a/package.json +0 -19
- package/template-react18/packages/feature-b/package.json +0 -19
- package/template-react18/packages/feature-c/package.json +0 -19
- package/tsconfig.json +0 -13
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Compiler } from 'webpack';
|
|
2
|
+
import { Context, Overrides } from '../types';
|
|
3
|
+
export declare function watchRunPlugin(_context: Context, _overrides: Overrides): WatchRunPlugin | undefined;
|
|
4
|
+
declare class WatchRunPlugin {
|
|
5
|
+
apply(compiler: Compiler): void;
|
|
6
|
+
}
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=watch-run-plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-run-plugin.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/watch-run-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,8BAKtE;AAED,cAAM,cAAc;IAEhB,KAAK,CAAC,QAAQ,EAAE,QAAQ;CAO3B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.watchRunPlugin = watchRunPlugin;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const utils_1 = require("../../../utils");
|
|
9
|
+
function watchRunPlugin(_context, _overrides) {
|
|
10
|
+
/* istanbul ignore next: debug only */
|
|
11
|
+
if (utils_1.log.debug('modified-files').enabled) {
|
|
12
|
+
return new WatchRunPlugin();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
class WatchRunPlugin {
|
|
16
|
+
/* istanbul ignore next: debug only */
|
|
17
|
+
apply(compiler) {
|
|
18
|
+
compiler.hooks.watchRun.tap('WatchRun', compilation => {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = compilation.modifiedFiles) === null || _a === void 0 ? void 0 : _a.forEach(file => {
|
|
21
|
+
utils_1.log.debug('modified-files', path_1.default.relative('', file));
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=watch-run-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watch-run-plugin.js","sourceRoot":"","sources":["../../../../src/webpack/configs/plugins/watch-run-plugin.ts"],"names":[],"mappings":";;;;;AAMA,wCAKC;AAXD,gDAAwB;AAGxB,0CAAqC;AAGrC,SAAgB,cAAc,CAAC,QAAiB,EAAE,UAAqB;IACnE,sCAAsC;IACtC,IAAI,WAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE,CAAC;QACtC,OAAO,IAAI,cAAc,EAAE,CAAC;IAChC,CAAC;AACL,CAAC;AAED,MAAM,cAAc;IAChB,sCAAsC;IACtC,KAAK,CAAC,QAAkB;QACpB,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE;;YAClD,MAAA,WAAW,CAAC,aAAa,0CAAE,OAAO,CAAC,IAAI,CAAC,EAAE;gBACtC,WAAG,CAAC,KAAK,CAAC,gBAAgB,EAAE,cAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-config.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"plugins-config.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgBxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG7C,KAAK,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAE7C,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAoB5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-config.js","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"plugins-config.js","sourceRoot":"","sources":["../../../src/webpack/configs/plugins-config.ts"],"names":[],"mappings":";;AAqBA,sCAoBC;AAxCD,uCAcmB;AAMnB,SAAgB,aAAa,CAAC,OAAgB,EAAE,SAAoB;IAChE,MAAM,OAAO,GAAW;QACpB,8BAAoB;QACpB,8BAAoB;QACpB,yCAA+B;QAC/B,sCAA4B;QAC5B,8BAAoB;QACpB,oBAAU;QACV,sBAAY;QACZ,8BAAoB;QACpB,6BAAmB;QACnB,yBAAe;QACf,4BAAkB;QAClB,8BAAoB;QACpB,wBAAc;KACjB;SACI,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;SACjC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEhC,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,CAAC"}
|
|
@@ -12,8 +12,24 @@ export interface Context extends Options {
|
|
|
12
12
|
isProduction: boolean;
|
|
13
13
|
isWebComponent: boolean;
|
|
14
14
|
minify?: MinifyOptions;
|
|
15
|
+
name: string;
|
|
15
16
|
packageData: ReturnType<typeof getPackageData>;
|
|
16
17
|
sharedDependencies: ReturnType<typeof loadSharedDependencies>;
|
|
17
18
|
source: string;
|
|
18
19
|
}
|
|
20
|
+
export interface EntryPoint {
|
|
21
|
+
css?: string[];
|
|
22
|
+
js?: string[];
|
|
23
|
+
}
|
|
24
|
+
export interface EntryPoints {
|
|
25
|
+
full?: EntryPoint;
|
|
26
|
+
light?: EntryPoint;
|
|
27
|
+
}
|
|
28
|
+
export interface Metadata {
|
|
29
|
+
name: string;
|
|
30
|
+
bundledWith: Record<string, string>;
|
|
31
|
+
sharedDependencies: Record<string, string>;
|
|
32
|
+
dependencies: Record<string, string>;
|
|
33
|
+
entrypoints: EntryPoints;
|
|
34
|
+
}
|
|
19
35
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/C,kBAAkB,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IAC9D,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/webpack/configs/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC/C,kBAAkB,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;IAC9D,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACvB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;CAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-metadata.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/utils/generate-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"generate-metadata.d.ts","sourceRoot":"","sources":["../../../../src/webpack/configs/utils/generate-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAY,MAAM,UAAU,CAAC;AAI7C,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,QAyBhD"}
|
|
@@ -10,9 +10,8 @@ const utils_1 = require("../../../utils");
|
|
|
10
10
|
const get_web_components_version_1 = require("./get-web-components-version");
|
|
11
11
|
function generateMetadata(context) {
|
|
12
12
|
const { destination, name, packageData, sharedDependencies } = context;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
fs_1.default.mkdirSync(`./${destination}`, { recursive: true });
|
|
13
|
+
if (!fs_1.default.existsSync(destination)) {
|
|
14
|
+
fs_1.default.mkdirSync(destination, { recursive: true });
|
|
16
15
|
}
|
|
17
16
|
const full = (0, utils_1.readJsonSafe)(path_1.default.join(destination, 'bundle', 'full', 'entrypoints.json'));
|
|
18
17
|
const light = (0, utils_1.readJsonSafe)(path_1.default.join(destination, 'bundle', 'light', 'entrypoints.json'));
|
|
@@ -26,6 +25,7 @@ function generateMetadata(context) {
|
|
|
26
25
|
dependencies: packageData.dependencies,
|
|
27
26
|
entrypoints: { ...(full ? { full } : {}), ...(light ? { light } : {}) },
|
|
28
27
|
};
|
|
28
|
+
const outputFile = path_1.default.join(destination, 'metadata.json');
|
|
29
29
|
fs_1.default.writeFileSync(outputFile, JSON.stringify(metadata, null, 2), 'utf8');
|
|
30
30
|
/* istanbul ignore next: debug only */
|
|
31
31
|
utils_1.log.debug('generate-metadata', `${outputFile}:`, () => JSON.stringify(metadata));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-metadata.js","sourceRoot":"","sources":["../../../../src/webpack/configs/utils/generate-metadata.ts"],"names":[],"mappings":";;;;;AAOA,4CAyBC;AAhCD,4CAAoB;AACpB,gDAAwB;AACxB,0CAAsE;AAGtE,6EAAuE;AAEvE,SAAgB,gBAAgB,CAAC,OAAgB;IAC7C,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-metadata.js","sourceRoot":"","sources":["../../../../src/webpack/configs/utils/generate-metadata.ts"],"names":[],"mappings":";;;;;AAOA,4CAyBC;AAhCD,4CAAoB;AACpB,gDAAwB;AACxB,0CAAsE;AAGtE,6EAAuE;AAEvE,SAAgB,gBAAgB,CAAC,OAAgB;IAC7C,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;IAEvE,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,YAAE,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,IAAI,GAAG,IAAA,oBAAY,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACxF,MAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC1F,MAAM,QAAQ,GAAa;QACvB,IAAI;QACJ,WAAW,EAAE;YACT,uBAAuB,EAAE,IAAA,yBAAiB,GAAE;YAC5C,8BAA8B,EAAE,IAAA,oDAAuB,GAAE;SAC5D;QACD,kBAAkB;QAClB,YAAY,EAAE,WAAW,CAAC,YAAY;QACtC,WAAW,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;KAC1E,CAAC;IAEF,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC3D,YAAE,CAAC,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAExE,sCAAsC;IACtC,WAAG,CAAC,KAAK,CAAC,mBAAmB,EAAE,GAAG,UAAU,GAAG,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/startup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "https://docs.st.dev/docs/frontend/startup",
|
|
6
6
|
"repository": {
|
|
@@ -15,12 +15,7 @@
|
|
|
15
15
|
"dist",
|
|
16
16
|
"jest",
|
|
17
17
|
"src",
|
|
18
|
-
"
|
|
19
|
-
"template-react18",
|
|
20
|
-
"template/.gitignore",
|
|
21
|
-
"template/.npmrc",
|
|
22
|
-
"tsconfig",
|
|
23
|
-
"tsconfig.json"
|
|
18
|
+
"tsconfig"
|
|
24
19
|
],
|
|
25
20
|
"bin": "./bin/index.js",
|
|
26
21
|
"devDependencies": {
|
|
@@ -32,12 +27,12 @@
|
|
|
32
27
|
"@types/yargs": "~17.0.24"
|
|
33
28
|
},
|
|
34
29
|
"dependencies": {
|
|
35
|
-
"@babel/preset-env": "~7.
|
|
30
|
+
"@babel/preset-env": "~7.26.0",
|
|
36
31
|
"@jest/core": "~29.7.0",
|
|
37
32
|
"@jest/types": "~29.6.3",
|
|
38
33
|
"@jsdevtools/coverage-istanbul-loader": "^3.0.5",
|
|
39
|
-
"@servicetitan/eslint-config": "
|
|
40
|
-
"@servicetitan/stylelint-config": "
|
|
34
|
+
"@servicetitan/eslint-config": "28.0.0",
|
|
35
|
+
"@servicetitan/stylelint-config": "28.0.0",
|
|
41
36
|
"@svgr/webpack": "^8.1.0",
|
|
42
37
|
"@swc/core": "1.7.26",
|
|
43
38
|
"@types/debug": "^4.1.12",
|
|
@@ -54,39 +49,39 @@
|
|
|
54
49
|
"execa": "~5.1.1",
|
|
55
50
|
"fork-ts-checker-webpack-plugin": "~9.0.2",
|
|
56
51
|
"glob": "~10.4.2",
|
|
57
|
-
"html-webpack-plugin": "~5.6.
|
|
52
|
+
"html-webpack-plugin": "~5.6.3",
|
|
58
53
|
"identity-obj-proxy": "~3.0.0",
|
|
59
54
|
"jest": "~29.7.0",
|
|
60
55
|
"jest-circus": "~29.7.0",
|
|
61
56
|
"jest-environment-jsdom": "^29.7.0",
|
|
62
57
|
"jest-fetch-mock": "~3.0.3",
|
|
63
|
-
"lerna": "~8.1.
|
|
58
|
+
"lerna": "~8.1.9",
|
|
64
59
|
"less": "~4.2.0",
|
|
65
60
|
"less-loader": "~12.2.0",
|
|
66
61
|
"less-plugin-npm-import": "~2.1.0",
|
|
67
|
-
"memfs": "~4.
|
|
68
|
-
"mini-css-extract-plugin": "~2.9.
|
|
62
|
+
"memfs": "~4.14.0",
|
|
63
|
+
"mini-css-extract-plugin": "~2.9.2",
|
|
69
64
|
"moment": "^2.30.1",
|
|
70
65
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
71
66
|
"multimatch": "~5.0.0",
|
|
72
67
|
"portfinder": "~1.0.32",
|
|
73
68
|
"postcss": "~8.4.47",
|
|
74
69
|
"prettier": "~3.3.3",
|
|
75
|
-
"sass": "~1.
|
|
76
|
-
"sass-loader": "~16.0.
|
|
70
|
+
"sass": "~1.80.6",
|
|
71
|
+
"sass-loader": "~16.0.3",
|
|
77
72
|
"source-map-loader": "~5.0.0",
|
|
78
73
|
"string-width": "<5.0.0",
|
|
79
74
|
"style-loader": "~4.0.0",
|
|
80
|
-
"stylelint": "~16.
|
|
75
|
+
"stylelint": "~16.10.0",
|
|
81
76
|
"swc-loader": "0.2.6",
|
|
82
77
|
"terser-webpack-plugin": "^5.3.10",
|
|
83
|
-
"ts-jest": "
|
|
78
|
+
"ts-jest": "29.2.5",
|
|
84
79
|
"ts-loader": "~9.5.1",
|
|
85
80
|
"ts-node": "~10.9.2",
|
|
86
81
|
"typed-css-modules": "~0.9.1",
|
|
87
|
-
"typescript": "5.6.
|
|
82
|
+
"typescript": "5.6.3",
|
|
88
83
|
"username": "~5.1.0",
|
|
89
|
-
"webpack": "~5.
|
|
84
|
+
"webpack": "~5.96.1",
|
|
90
85
|
"webpack-assets-manifest": "~5.2.1",
|
|
91
86
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
92
87
|
"webpack-dev-server": "~5.1.0",
|
|
@@ -107,5 +102,5 @@
|
|
|
107
102
|
"cli": {
|
|
108
103
|
"webpack": false
|
|
109
104
|
},
|
|
110
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "7b905cd6ecfd5bb4a748050a83ebd8ca4e185e09"
|
|
111
106
|
}
|
|
@@ -1,67 +1,118 @@
|
|
|
1
|
-
import cpx from 'cpx2';
|
|
2
|
-
import path from 'path';
|
|
3
1
|
import { fs, vol } from 'memfs';
|
|
2
|
+
import { mkdirSync, rmSync } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
4
|
|
|
5
5
|
import { Init } from '../init';
|
|
6
|
+
import { runCommand, runCommandOutput } from '../../utils/cli-os';
|
|
6
7
|
|
|
7
8
|
jest.mock('fs', () => fs);
|
|
8
|
-
|
|
9
|
-
jest.mock('cpx2', () => ({
|
|
10
|
-
copy: jest.fn().mockImplementation((...args: any[]) => {
|
|
11
|
-
const callback = args[args.length - 1];
|
|
12
|
-
callback(null);
|
|
13
|
-
}),
|
|
14
|
-
}));
|
|
15
|
-
|
|
9
|
+
jest.mock('../../utils//cli-os', () => ({ runCommand: jest.fn(), runCommandOutput: jest.fn() }));
|
|
16
10
|
jest.mock('../../../utils', () => ({
|
|
17
11
|
log: { info: jest.fn() }, // suppress log output
|
|
18
12
|
}));
|
|
19
13
|
|
|
14
|
+
const webUrl = 'https://github.com/servicetitan/frontend-example.git';
|
|
15
|
+
const sshUrl = 'git@github.com:servicetitan/frontend-example.git';
|
|
16
|
+
|
|
20
17
|
describe(`[startup] ${Init.name}`, () => {
|
|
21
18
|
let args: ConstructorParameters<typeof Init>[0];
|
|
22
19
|
|
|
23
20
|
beforeEach(() => {
|
|
24
21
|
args = {};
|
|
25
22
|
vol.reset();
|
|
23
|
+
jest.clearAllMocks();
|
|
24
|
+
jest.mocked(runCommand).mockImplementation(jest.fn());
|
|
25
|
+
jest.mocked(runCommandOutput).mockImplementation(jest.fn());
|
|
26
|
+
jest.spyOn(fs, 'mkdirSync').mockImplementation(jest.fn());
|
|
27
|
+
jest.spyOn(fs, 'rmSync').mockImplementation(jest.fn());
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
const subject = async () => new Init(args).execute();
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
test(`clones ${webUrl} to current directory`, async () => {
|
|
33
|
+
const cwd = path.resolve('.');
|
|
34
|
+
await subject();
|
|
35
|
+
|
|
36
|
+
expect(runCommand).toHaveBeenCalledWith(`git clone -q ${webUrl} ${cwd}`, {
|
|
37
|
+
quiet: true,
|
|
38
|
+
});
|
|
39
|
+
expect(rmSync).toHaveBeenCalledWith(path.join(cwd, '.git'), {
|
|
40
|
+
recursive: true,
|
|
41
|
+
force: true,
|
|
42
|
+
});
|
|
43
|
+
expect(rmSync).toHaveBeenCalledWith(path.join(cwd, '.github', 'CODEOWNERS'));
|
|
44
|
+
expect(rmSync).toHaveBeenCalledWith(path.join(cwd, 'package-lock.json'));
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
describe(`when cloning ${webUrl} fails`, () => {
|
|
48
|
+
beforeEach(() => jest.mocked(runCommand).mockRejectedValueOnce('Nope!'));
|
|
49
|
+
|
|
50
|
+
test(`clones ${sshUrl} to current directory`, async () => {
|
|
32
51
|
await subject();
|
|
33
52
|
|
|
34
|
-
expect(
|
|
35
|
-
|
|
36
|
-
process.cwd(),
|
|
53
|
+
expect(runCommand).toHaveBeenCalledWith(
|
|
54
|
+
`git clone -q ${sshUrl} ${path.resolve('.')}`,
|
|
37
55
|
expect.anything()
|
|
38
56
|
);
|
|
39
57
|
});
|
|
40
|
-
}
|
|
41
58
|
|
|
42
|
-
|
|
59
|
+
describe(`when cloning ${sshUrl} also fails`, () => {
|
|
60
|
+
beforeEach(() => {
|
|
61
|
+
jest.mocked(runCommand).mockRejectedValue('Nope!');
|
|
62
|
+
});
|
|
43
63
|
|
|
44
|
-
|
|
45
|
-
|
|
64
|
+
test(`checks if ${webUrl} is reachable`, async () => {
|
|
65
|
+
await subject();
|
|
46
66
|
|
|
47
|
-
|
|
67
|
+
expect(runCommandOutput).toHaveBeenCalledWith(`git ls-remote -qt ${webUrl}`, {
|
|
68
|
+
quiet: true,
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe(`when ${webUrl} is not reachable`, () => {
|
|
73
|
+
beforeEach(() => {
|
|
74
|
+
jest.mocked(runCommandOutput).mockImplementationOnce(() => {
|
|
75
|
+
throw new Error('Oops!');
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
test(`checks if ${sshUrl} is reachable`, async () => {
|
|
80
|
+
await subject();
|
|
81
|
+
|
|
82
|
+
expect(runCommandOutput).toHaveBeenCalledWith(`git ls-remote -qt ${sshUrl}`, {
|
|
83
|
+
quiet: true,
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
describe(`when ${sshUrl} is also unreachable`, () => {
|
|
88
|
+
beforeEach(() =>
|
|
89
|
+
jest.mocked(runCommandOutput).mockImplementation(() => {
|
|
90
|
+
throw new Error('Oops');
|
|
91
|
+
})
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
test('raises error', async () => {
|
|
95
|
+
await expect(subject()).rejects.toThrow(
|
|
96
|
+
/could not read servicetitan\/frontend-example repository/
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
});
|
|
48
102
|
});
|
|
49
103
|
|
|
50
104
|
describe('with an output location', () => {
|
|
51
105
|
beforeEach(() => (args.output = 'foo/bar'));
|
|
52
106
|
|
|
53
|
-
test(
|
|
54
|
-
const mkdirSpy = jest.spyOn(fs, 'mkdirSync');
|
|
107
|
+
test(`clones ${webUrl} to output location`, async () => {
|
|
55
108
|
const destination = path.resolve(args.output!);
|
|
56
109
|
|
|
57
110
|
await subject();
|
|
58
111
|
|
|
59
|
-
expect(
|
|
60
|
-
expect(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
expect.anything()
|
|
64
|
-
);
|
|
112
|
+
expect(mkdirSync).toHaveBeenCalledWith(destination, { recursive: true });
|
|
113
|
+
expect(runCommand).toHaveBeenCalledWith(`git clone -q ${webUrl} ${destination}`, {
|
|
114
|
+
quiet: true,
|
|
115
|
+
});
|
|
65
116
|
});
|
|
66
117
|
|
|
67
118
|
describe('when output location is a file', () => {
|
|
@@ -71,5 +122,34 @@ describe(`[startup] ${Init.name}`, () => {
|
|
|
71
122
|
await expect(subject()).rejects.toThrow(/is not a directory/);
|
|
72
123
|
});
|
|
73
124
|
});
|
|
125
|
+
|
|
126
|
+
describe('when output location is not empty', () => {
|
|
127
|
+
beforeEach(() => vol.fromNestedJSON({ [args.output!]: { baz: '' } }));
|
|
128
|
+
|
|
129
|
+
test('raises error', async () => {
|
|
130
|
+
await expect(subject()).rejects.toThrow(/is not an empty directory/);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
describe('when running in CI environment with GITHUB_TOKEN', () => {
|
|
136
|
+
const originalEnv = process.env;
|
|
137
|
+
const token = 'foo-bar';
|
|
138
|
+
|
|
139
|
+
beforeEach(() => {
|
|
140
|
+
process.env.CI = 'true';
|
|
141
|
+
process.env.GITHUB_TOKEN = token;
|
|
142
|
+
});
|
|
143
|
+
afterEach(() => (process.env = originalEnv));
|
|
144
|
+
|
|
145
|
+
test(`adds token to ${webUrl}`, async () => {
|
|
146
|
+
await subject();
|
|
147
|
+
|
|
148
|
+
const urlWithToken = webUrl.replace('github.com', `oauth2:${token}@github.com`);
|
|
149
|
+
expect(runCommand).toHaveBeenCalledWith(
|
|
150
|
+
`git clone -q ${urlWithToken} ${path.resolve('.')}`,
|
|
151
|
+
expect.anything()
|
|
152
|
+
);
|
|
153
|
+
});
|
|
74
154
|
});
|
|
75
155
|
});
|
|
@@ -2,7 +2,7 @@ import { fs, vol } from 'memfs';
|
|
|
2
2
|
import { isWebComponent, log } from '../../../utils';
|
|
3
3
|
import { npmGetPackageVersionDates, npmUnpublish } from '../../utils/cli-npm';
|
|
4
4
|
|
|
5
|
-
import { MFEPackageClean } from '../mfe-
|
|
5
|
+
import { MFEPackageClean } from '../mfe-package-clean';
|
|
6
6
|
|
|
7
7
|
jest.mock('fs', () => fs);
|
|
8
8
|
jest.mock('../../../utils', () => ({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fs, vol } from 'memfs';
|
|
2
|
-
import
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { isWebComponent, log, readJson } from '../../../utils';
|
|
3
4
|
import { gitGetBranch, gitGetCommitHash } from '../../utils/cli-git';
|
|
4
5
|
import {
|
|
5
6
|
npmGetPackageVersions,
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
npmPublishDry,
|
|
9
10
|
npmTagVersion,
|
|
10
11
|
} from '../../utils/cli-npm';
|
|
11
|
-
import { MFEPackagePublish } from '../mfe-publish';
|
|
12
|
+
import { MFEPackagePublish } from '../mfe-package-publish';
|
|
12
13
|
|
|
13
14
|
jest.mock('fs', () => fs);
|
|
14
15
|
jest.mock('../../../utils', () => ({
|
|
@@ -44,7 +45,30 @@ describe(`[startup] ${MFEPackagePublish.name}`, () => {
|
|
|
44
45
|
jest.mocked(gitGetBranch).mockReturnValue(branch);
|
|
45
46
|
jest.mocked(gitGetCommitHash).mockReturnValue(commitHash);
|
|
46
47
|
jest.mocked(npmGetPackageVersions).mockReturnValue([]);
|
|
47
|
-
vol.
|
|
48
|
+
vol.fromNestedJSON({
|
|
49
|
+
'package.json': JSON.stringify({ name: packageName, files: [] }),
|
|
50
|
+
'tsconfig.json': JSON.stringify({
|
|
51
|
+
compilerOptions: { outDir: 'dist', rootDir: 'src' },
|
|
52
|
+
}),
|
|
53
|
+
'dist': {
|
|
54
|
+
'metadata.json': JSON.stringify({
|
|
55
|
+
entrypoints: {
|
|
56
|
+
full: { css: ['main.bundle.css'], js: ['main.bundle.js'] },
|
|
57
|
+
light: { css: ['main.bundle.css'], js: ['main.bundle.js'] },
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
'bundle': {
|
|
61
|
+
full: {
|
|
62
|
+
'main.bundle.css': '',
|
|
63
|
+
'main.bundle.js': '',
|
|
64
|
+
},
|
|
65
|
+
light: {
|
|
66
|
+
'main.bundle.css': '',
|
|
67
|
+
'main.bundle.js': '',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
48
72
|
});
|
|
49
73
|
|
|
50
74
|
afterEach(() => vol.reset());
|
|
@@ -239,17 +263,63 @@ describe(`[startup] ${MFEPackagePublish.name}`, () => {
|
|
|
239
263
|
});
|
|
240
264
|
});
|
|
241
265
|
|
|
242
|
-
|
|
243
|
-
beforeEach(() => jest.mocked(isWebComponent).mockReturnValue(false));
|
|
244
|
-
|
|
266
|
+
function itThrowsError(message: RegExp) {
|
|
245
267
|
test('throws error', async () => {
|
|
246
268
|
jest.spyOn(process.stdout, 'write').mockImplementation(jest.fn()); // suppress error output
|
|
247
269
|
expect.assertions(1);
|
|
248
270
|
try {
|
|
249
271
|
await subject();
|
|
250
272
|
} catch (error: any) {
|
|
251
|
-
expect(error.message).toMatch(
|
|
273
|
+
expect(error.message).toMatch(message);
|
|
252
274
|
}
|
|
253
275
|
});
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
describe('when package is not web component', () => {
|
|
279
|
+
beforeEach(() => jest.mocked(isWebComponent).mockReturnValue(false));
|
|
280
|
+
|
|
281
|
+
itThrowsError(/only web-components can be published/);
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
describe('when metadata.json is missing', () => {
|
|
285
|
+
beforeEach(() => fs.unlinkSync('dist/metadata.json'));
|
|
286
|
+
|
|
287
|
+
itThrowsError(/metadata.json is not present/);
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
describe(`when metadata.json contains no entrypoints`, () => {
|
|
291
|
+
beforeEach(() => {
|
|
292
|
+
const metadataJson = path.join('dist', 'metadata.json');
|
|
293
|
+
const metadata = readJson(metadataJson);
|
|
294
|
+
delete metadata.entrypoints;
|
|
295
|
+
fs.writeFileSync(metadataJson, JSON.stringify(metadata));
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
itThrowsError(/not found in metadata.json/);
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
['full', 'light'].forEach(name => {
|
|
302
|
+
describe.each(['css', 'js'])(`when ${name}.%s entry point is missing`, key => {
|
|
303
|
+
beforeEach(() => {
|
|
304
|
+
const metadataJson = path.join('dist', 'metadata.json');
|
|
305
|
+
const metadata = readJson(metadataJson);
|
|
306
|
+
delete metadata.entrypoints[name][key];
|
|
307
|
+
fs.writeFileSync(metadataJson, JSON.stringify(metadata));
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
itThrowsError(new RegExp(`${name}.${key} not found in metadata.json`));
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
describe(`when ${name} JS bundle is missing`, () => {
|
|
314
|
+
beforeEach(() => fs.unlinkSync(`dist/bundle/${name}/main.bundle.js`));
|
|
315
|
+
|
|
316
|
+
itThrowsError(/referenced bundle main.bundle.js was not found/);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
describe(`when ${name} CSS bundle is missing`, () => {
|
|
320
|
+
beforeEach(() => fs.unlinkSync(`dist/bundle/${name}/main.bundle.css`));
|
|
321
|
+
|
|
322
|
+
itThrowsError(/referenced bundle main.bundle.css was not found/);
|
|
323
|
+
});
|
|
254
324
|
});
|
|
255
325
|
});
|
|
@@ -30,10 +30,14 @@ describe(`[startup] ${Tests.name}`, () => {
|
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
describe('when the command fails', () => {
|
|
33
|
+
const exitCode = process.exitCode;
|
|
34
|
+
|
|
33
35
|
beforeEach(() => {
|
|
34
36
|
jest.mocked(runCLI).mockResolvedValue({ results: { success: false } } as any);
|
|
35
37
|
});
|
|
36
38
|
|
|
39
|
+
afterAll(() => (process.exitCode = exitCode));
|
|
40
|
+
|
|
37
41
|
test('sets process execCode to 1', async () => {
|
|
38
42
|
await subject();
|
|
39
43
|
|
|
@@ -7,7 +7,9 @@ import { Init } from './init';
|
|
|
7
7
|
import { Install } from './install';
|
|
8
8
|
import { KendoUILicense } from './kendo-ui-license';
|
|
9
9
|
import { Lint } from './lint';
|
|
10
|
-
import { MFEPackageClean
|
|
10
|
+
import { MFEPackageClean } from './mfe-package-clean';
|
|
11
|
+
import { MFEPackagePublish } from './mfe-package-publish';
|
|
12
|
+
import { MFEPublish } from './mfe-publish';
|
|
11
13
|
import { PreparePackage } from './prepare-package';
|
|
12
14
|
import { Start } from './start';
|
|
13
15
|
import { StylesCheck } from './styles-check';
|