@servicetitan/startup 31.5.1 → 32.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/build.d.ts +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +1 -1
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts +1 -1
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.js +2 -2
- package/dist/cli/commands/get-command.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +3 -2
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +24 -43
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +4 -0
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +91 -3
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-package-clean.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-clean.js +5 -7
- package/dist/cli/commands/mfe-package-clean.js.map +1 -1
- package/dist/cli/commands/mfe-package-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-package-publish.js +11 -15
- package/dist/cli/commands/mfe-package-publish.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts +1 -1
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +1 -1
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/review/rules/index.d.ts.map +1 -1
- package/dist/cli/commands/review/rules/index.js +4 -0
- package/dist/cli/commands/review/rules/index.js.map +1 -1
- package/dist/cli/commands/review/rules/require-all-react-dependencies.d.ts +14 -0
- package/dist/cli/commands/review/rules/require-all-react-dependencies.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-all-react-dependencies.js +64 -0
- package/dist/cli/commands/review/rules/require-all-react-dependencies.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-react-version.d.ts +5 -0
- package/dist/cli/commands/review/rules/require-one-react-version.d.ts.map +1 -0
- package/dist/cli/commands/review/rules/require-one-react-version.js +25 -0
- package/dist/cli/commands/review/rules/require-one-react-version.js.map +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.d.ts.map +1 -1
- package/dist/cli/commands/review/rules/require-one-uikit-version.js +1 -0
- package/dist/cli/commands/review/rules/require-one-uikit-version.js.map +1 -1
- package/dist/cli/commands/review/utils/format-depends-on.d.ts +1 -0
- package/dist/cli/commands/review/utils/format-depends-on.d.ts.map +1 -1
- package/dist/cli/commands/review/utils/format-depends-on.js +15 -8
- package/dist/cli/commands/review/utils/format-depends-on.js.map +1 -1
- package/dist/cli/commands/review/utils/set-version.d.ts +2 -1
- package/dist/cli/commands/review/utils/set-version.d.ts.map +1 -1
- package/dist/cli/commands/review/utils/set-version.js +4 -2
- package/dist/cli/commands/review/utils/set-version.js.map +1 -1
- package/dist/cli/commands/start.d.ts +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/test/index.d.ts +2 -0
- package/dist/cli/commands/test/index.d.ts.map +1 -0
- package/dist/cli/commands/test/index.js +20 -0
- package/dist/cli/commands/test/index.js.map +1 -0
- package/dist/cli/commands/test/runners/index.d.ts +3 -0
- package/dist/cli/commands/test/runners/index.d.ts.map +1 -0
- package/dist/cli/commands/test/runners/index.js +21 -0
- package/dist/cli/commands/test/runners/index.js.map +1 -0
- package/dist/cli/commands/test/runners/jest.d.ts +7 -0
- package/dist/cli/commands/test/runners/jest.d.ts.map +1 -0
- package/dist/cli/commands/test/runners/jest.js +43 -0
- package/dist/cli/commands/test/runners/jest.js.map +1 -0
- package/dist/cli/commands/test/runners/vitest.d.ts +4 -0
- package/dist/cli/commands/test/runners/vitest.d.ts.map +1 -0
- package/dist/cli/commands/test/runners/vitest.js +86 -0
- package/dist/cli/commands/test/runners/vitest.js.map +1 -0
- package/dist/cli/commands/test/tests.d.ts +18 -0
- package/dist/cli/commands/test/tests.d.ts.map +1 -0
- package/dist/cli/commands/{tests.js → test/tests.js} +10 -9
- package/dist/cli/commands/test/tests.js.map +1 -0
- package/dist/cli/commands/upload-sourcemaps.d.ts.map +1 -1
- package/dist/cli/commands/upload-sourcemaps.js +1 -1
- package/dist/cli/commands/upload-sourcemaps.js.map +1 -1
- package/dist/cli/index.js +1 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/bundle.d.ts.map +1 -1
- package/dist/cli/utils/bundle.js +7 -4
- package/dist/cli/utils/bundle.js.map +1 -1
- package/dist/cli/utils/cli-git.d.ts +11 -2
- package/dist/cli/utils/cli-git.d.ts.map +1 -1
- package/dist/cli/utils/cli-git.js +60 -4
- package/dist/cli/utils/cli-git.js.map +1 -1
- package/dist/cli/utils/index.d.ts +6 -0
- package/dist/cli/utils/index.d.ts.map +1 -1
- package/dist/cli/utils/index.js +6 -0
- package/dist/cli/utils/index.js.map +1 -1
- package/dist/cli/utils/is-ci.d.ts +2 -0
- package/dist/cli/utils/is-ci.d.ts.map +1 -0
- package/dist/cli/utils/is-ci.js +15 -0
- package/dist/cli/utils/is-ci.js.map +1 -0
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +2 -1
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/cli/utils/set-node-options.d.ts.map +1 -1
- package/dist/cli/utils/set-node-options.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/get-branch-configs.d.ts +1 -1
- package/dist/utils/get-branch-configs.d.ts.map +1 -1
- package/dist/utils/get-branch-configs.js +2 -2
- package/dist/utils/get-branch-configs.js.map +1 -1
- package/dist/utils/get-configuration.d.ts +8 -2
- package/dist/utils/get-configuration.d.ts.map +1 -1
- package/dist/utils/get-configuration.js +10 -2
- package/dist/utils/get-configuration.js.map +1 -1
- package/dist/utils/get-jest-config.d.ts +1 -7
- package/dist/utils/get-jest-config.d.ts.map +1 -1
- package/dist/utils/get-jest-config.js +49 -58
- package/dist/utils/get-jest-config.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/webpack/utils/testing/get-compiler.js.map +1 -1
- package/package.json +16 -14
- package/src/cli/commands/__tests__/init.test.ts +21 -87
- package/src/cli/commands/__tests__/install.test.ts +174 -12
- package/src/cli/commands/__tests__/mfe-package-clean.test.ts +3 -6
- package/src/cli/commands/__tests__/mfe-package-publish.test.ts +6 -8
- package/src/cli/commands/__tests__/upload-sourcemaps.test.ts +7 -3
- package/src/cli/commands/build.ts +1 -1
- package/src/cli/commands/bundle-package.ts +1 -1
- package/src/cli/commands/eslint.ts +1 -1
- package/src/cli/commands/get-command.ts +1 -1
- package/src/cli/commands/index.ts +1 -1
- package/src/cli/commands/init.ts +18 -38
- package/src/cli/commands/install.ts +95 -6
- package/src/cli/commands/lint.ts +1 -1
- package/src/cli/commands/mfe-package-clean.ts +2 -4
- package/src/cli/commands/mfe-package-publish.ts +18 -6
- package/src/cli/commands/mfe-publish.ts +1 -1
- package/src/cli/commands/prepare-package.ts +1 -1
- package/src/cli/commands/review/rules/__tests__/require-all-react-dependencies.test.ts +132 -0
- package/src/cli/commands/review/rules/__tests__/require-one-package-version.test.ts +0 -1
- package/src/cli/commands/review/rules/__tests__/require-one-react-version.test.ts +22 -0
- package/src/cli/commands/review/rules/__tests__/{require-one-uikit-version.ts → require-one-uikit-version.test.ts} +1 -0
- package/src/cli/commands/review/rules/index.ts +4 -0
- package/src/cli/commands/review/rules/require-all-react-dependencies.ts +53 -0
- package/src/cli/commands/review/rules/require-one-react-version.ts +9 -0
- package/src/cli/commands/review/rules/require-one-uikit-version.ts +1 -0
- package/src/cli/commands/review/utils/__tests__/set-version.test.ts +18 -8
- package/src/cli/commands/review/utils/format-depends-on.ts +8 -5
- package/src/cli/commands/review/utils/set-version.ts +10 -2
- package/src/cli/commands/start.ts +1 -1
- package/src/cli/commands/test/__tests__/tests.test.ts +78 -0
- package/src/cli/commands/test/index.ts +1 -0
- package/src/cli/commands/{__tests__/tests.test.ts → test/runners/__tests__/jest.test.ts} +10 -13
- package/src/cli/commands/test/runners/__tests__/vitest.test.ts +150 -0
- package/src/cli/commands/test/runners/index.ts +2 -0
- package/src/cli/commands/{tests.ts → test/runners/jest.ts} +5 -16
- package/src/cli/commands/test/runners/vitest.ts +70 -0
- package/src/cli/commands/test/tests.ts +34 -0
- package/src/cli/commands/upload-sourcemaps.ts +2 -2
- package/src/cli/index.ts +1 -2
- package/src/cli/utils/__tests__/bundle.test.ts +1 -1
- package/src/cli/utils/__tests__/cli-git.test.ts +142 -6
- package/src/cli/utils/__tests__/eslint.test.ts +3 -2
- package/src/cli/utils/__tests__/is-ci.test.ts +40 -0
- package/src/cli/utils/__tests__/lerna-exec.test.ts +6 -3
- package/src/cli/utils/bundle.ts +8 -3
- package/src/cli/utils/cli-git.ts +55 -5
- package/src/cli/utils/index.ts +6 -0
- package/src/cli/utils/is-ci.ts +3 -0
- package/src/cli/utils/lerna-exec.ts +2 -1
- package/src/cli/utils/set-node-options.ts +2 -2
- package/src/index.ts +0 -1
- package/src/utils/__tests__/get-configuration.test.ts +48 -11
- package/src/utils/__tests__/get-jest-config.test.ts +35 -61
- package/src/utils/get-branch-configs.ts +1 -1
- package/src/utils/get-configuration.ts +14 -3
- package/src/utils/get-jest-config.ts +39 -47
- package/src/utils/index.ts +1 -0
- package/src/webpack/__tests__/create-webpack-config-shared-dependencies.test.ts +1 -1
- package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +1 -1
- package/src/webpack/__tests__/create-webpack-config.test.ts +1 -1
- package/src/webpack/utils/testing/get-compiler.ts +1 -1
- package/dist/cli/commands/tests.d.ts +0 -13
- package/dist/cli/commands/tests.d.ts.map +0 -1
- package/dist/cli/commands/tests.js.map +0 -1
- package/dist/jest/index.d.ts +0 -2
- package/dist/jest/index.d.ts.map +0 -1
- package/dist/jest/index.js +0 -16
- package/dist/jest/index.js.map +0 -1
- package/src/jest/index.ts +0 -5
|
@@ -9,19 +9,75 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
+
get gitCloneRepo () {
|
|
13
|
+
return gitCloneRepo;
|
|
14
|
+
},
|
|
12
15
|
get gitGetBranch () {
|
|
13
16
|
return gitGetBranch;
|
|
14
17
|
},
|
|
15
18
|
get gitGetCommitHash () {
|
|
16
19
|
return gitGetCommitHash;
|
|
20
|
+
},
|
|
21
|
+
get gitIsReachable () {
|
|
22
|
+
return gitIsReachable;
|
|
17
23
|
}
|
|
18
24
|
});
|
|
25
|
+
const _utils = require("../../utils");
|
|
19
26
|
const _clios = require("./cli-os");
|
|
20
|
-
const
|
|
27
|
+
const _isci = require("./is-ci");
|
|
28
|
+
function gitGetBranch() {
|
|
21
29
|
return (0, _clios.runCommandOutput)('git rev-parse --abbrev-ref HEAD').trim();
|
|
22
|
-
}
|
|
23
|
-
|
|
30
|
+
}
|
|
31
|
+
function gitGetCommitHash() {
|
|
24
32
|
return (0, _clios.runCommandOutput)('git rev-parse --short HEAD').trim();
|
|
25
|
-
}
|
|
33
|
+
}
|
|
34
|
+
async function gitCloneRepo(params) {
|
|
35
|
+
const { destination, name, owner = 'servicetitan' } = params;
|
|
36
|
+
const gitUrls = getGitUrls({
|
|
37
|
+
owner,
|
|
38
|
+
name
|
|
39
|
+
});
|
|
40
|
+
for (const url of gitUrls){
|
|
41
|
+
try {
|
|
42
|
+
const command = `git clone -q ${url} ${destination}`;
|
|
43
|
+
_utils.log.debug('git:clone-repo', `running ${command}`);
|
|
44
|
+
// eslint-disable-next-line no-await-in-loop
|
|
45
|
+
await (0, _clios.runCommand)(command, {
|
|
46
|
+
quiet: true
|
|
47
|
+
});
|
|
48
|
+
return true;
|
|
49
|
+
} catch (e) {
|
|
50
|
+
// ignore error
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
function gitIsReachable({ owner = 'servicetitan', name }) {
|
|
56
|
+
return getGitUrls({
|
|
57
|
+
owner,
|
|
58
|
+
name
|
|
59
|
+
}).some((url)=>{
|
|
60
|
+
try {
|
|
61
|
+
(0, _clios.runCommandOutput)(`git ls-remote -qt ${url}`, {
|
|
62
|
+
quiet: true
|
|
63
|
+
});
|
|
64
|
+
return true;
|
|
65
|
+
} catch (e) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function getGitUrls({ owner, name }) {
|
|
71
|
+
const webUrl = `https://github.com/${owner}/${name}.git`;
|
|
72
|
+
const sshUrl = `git@github.com:${owner}/${name}.git`;
|
|
73
|
+
const urls = [
|
|
74
|
+
webUrl,
|
|
75
|
+
sshUrl
|
|
76
|
+
];
|
|
77
|
+
if ((0, _isci.isCI)() && !!process.env.GITHUB_TOKEN) {
|
|
78
|
+
urls.unshift(webUrl.replace('github.com', `oauth2:${process.env.GITHUB_TOKEN}@github.com`));
|
|
79
|
+
}
|
|
80
|
+
return urls;
|
|
81
|
+
}
|
|
26
82
|
|
|
27
83
|
//# sourceMappingURL=cli-git.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/utils/cli-git.ts"],"sourcesContent":["import { runCommandOutput } from './cli-os';\n\nexport
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/cli-git.ts"],"sourcesContent":["import { log } from '../../utils';\nimport { runCommand, runCommandOutput } from './cli-os';\nimport { isCI } from './is-ci';\n\nexport function gitGetBranch(): string {\n return runCommandOutput('git rev-parse --abbrev-ref HEAD').trim();\n}\n\nexport function gitGetCommitHash(): string {\n return runCommandOutput('git rev-parse --short HEAD').trim();\n}\n\ninterface Repo {\n owner?: string;\n name: string;\n}\n\nexport async function gitCloneRepo(params: Repo & { destination: string }) {\n const { destination, name, owner = 'servicetitan' } = params;\n const gitUrls = getGitUrls({ owner, name });\n\n for (const url of gitUrls) {\n try {\n const command = `git clone -q ${url} ${destination}`;\n log.debug('git:clone-repo', `running ${command}`);\n\n // eslint-disable-next-line no-await-in-loop\n await runCommand(command, { quiet: true });\n return true;\n } catch {\n // ignore error\n }\n }\n\n return false;\n}\n\nexport function gitIsReachable({ owner = 'servicetitan', name }: Repo) {\n return getGitUrls({ owner, name }).some(url => {\n try {\n runCommandOutput(`git ls-remote -qt ${url}`, { quiet: true });\n return true;\n } catch {\n return false;\n }\n });\n}\n\nfunction getGitUrls({ owner, name }: Repo) {\n const webUrl = `https://github.com/${owner}/${name}.git`;\n const sshUrl = `git@github.com:${owner}/${name}.git`;\n\n const urls = [webUrl, sshUrl];\n if (isCI() && !!process.env.GITHUB_TOKEN) {\n urls.unshift(webUrl.replace('github.com', `oauth2:${process.env.GITHUB_TOKEN}@github.com`));\n }\n\n return urls;\n}\n"],"names":["gitCloneRepo","gitGetBranch","gitGetCommitHash","gitIsReachable","runCommandOutput","trim","params","destination","name","owner","gitUrls","getGitUrls","url","command","log","debug","runCommand","quiet","some","webUrl","sshUrl","urls","isCI","process","env","GITHUB_TOKEN","unshift","replace"],"mappings":";;;;;;;;;;;QAiBsBA;eAAAA;;QAbNC;e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,QAAQC,GAAG,CAACC,YAAY,EAAE;QACtCJ,KAAKK,OAAO,CAACP,OAAOQ,OAAO,CAAC,cAAc,CAAC,OAAO,EAAEJ,QAAQC,GAAG,CAACC,YAAY,CAAC,WAAW,CAAC;IAC7F;IAEA,OAAOJ;AACX"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
export * from './bundle';
|
|
2
2
|
export * from './check-args';
|
|
3
|
+
export * from './cli-git';
|
|
4
|
+
export * from './cli-npm';
|
|
5
|
+
export * from './cli-os';
|
|
3
6
|
export * from './compile';
|
|
4
7
|
export * from './compile-less';
|
|
5
8
|
export * from './compile-sass';
|
|
6
9
|
export * from './copy-files';
|
|
7
10
|
export * from './eslint';
|
|
8
11
|
export * from './get-module-type';
|
|
12
|
+
export * from './is-ci';
|
|
9
13
|
export * from './is-module-installed';
|
|
10
14
|
export * from './lerna-exec';
|
|
15
|
+
export * from './maybe-create-git-folder';
|
|
11
16
|
export * from './pipe-stdout';
|
|
12
17
|
export * from './process-tree';
|
|
18
|
+
export * from './publish';
|
|
13
19
|
export * from './set-node-options';
|
|
14
20
|
export * from './ts-config';
|
|
15
21
|
export * from './type-check';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|
package/dist/cli/utils/index.js
CHANGED
|
@@ -4,16 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
_export_star(require("./bundle"), exports);
|
|
6
6
|
_export_star(require("./check-args"), exports);
|
|
7
|
+
_export_star(require("./cli-git"), exports);
|
|
8
|
+
_export_star(require("./cli-npm"), exports);
|
|
9
|
+
_export_star(require("./cli-os"), exports);
|
|
7
10
|
_export_star(require("./compile"), exports);
|
|
8
11
|
_export_star(require("./compile-less"), exports);
|
|
9
12
|
_export_star(require("./compile-sass"), exports);
|
|
10
13
|
_export_star(require("./copy-files"), exports);
|
|
11
14
|
_export_star(require("./eslint"), exports);
|
|
12
15
|
_export_star(require("./get-module-type"), exports);
|
|
16
|
+
_export_star(require("./is-ci"), exports);
|
|
13
17
|
_export_star(require("./is-module-installed"), exports);
|
|
14
18
|
_export_star(require("./lerna-exec"), exports);
|
|
19
|
+
_export_star(require("./maybe-create-git-folder"), exports);
|
|
15
20
|
_export_star(require("./pipe-stdout"), exports);
|
|
16
21
|
_export_star(require("./process-tree"), exports);
|
|
22
|
+
_export_star(require("./publish"), exports);
|
|
17
23
|
_export_star(require("./set-node-options"), exports);
|
|
18
24
|
_export_star(require("./ts-config"), exports);
|
|
19
25
|
_export_star(require("./type-check"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/utils/index.ts"],"sourcesContent":["export * from './bundle';\nexport * from './check-args';\nexport * from './compile';\nexport * from './compile-less';\nexport * from './compile-sass';\nexport * from './copy-files';\nexport * from './eslint';\nexport * from './get-module-type';\nexport * from './is-module-installed';\nexport * from './lerna-exec';\nexport * from './pipe-stdout';\nexport * from './process-tree';\nexport * from './set-node-options';\nexport * from './ts-config';\nexport * from './type-check';\nexport * from './watch-stdout';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/index.ts"],"sourcesContent":["export * from './bundle';\nexport * from './check-args';\nexport * from './cli-git';\nexport * from './cli-npm';\nexport * from './cli-os';\nexport * from './compile';\nexport * from './compile-less';\nexport * from './compile-sass';\nexport * from './copy-files';\nexport * from './eslint';\nexport * from './get-module-type';\nexport * from './is-ci';\nexport * from './is-module-installed';\nexport * from './lerna-exec';\nexport * from './maybe-create-git-folder';\nexport * from './pipe-stdout';\nexport * from './process-tree';\nexport * from './publish';\nexport * from './set-node-options';\nexport * from './ts-config';\nexport * from './type-check';\nexport * from './watch-stdout';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-ci.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/is-ci.ts"],"names":[],"mappings":"AAAA,wBAAgB,IAAI,YAEnB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "isCI", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return isCI;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function isCI() {
|
|
12
|
+
return !!process.env.CI || !!process.env.TEAMCITY_VERSION;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=is-ci.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/is-ci.ts"],"sourcesContent":["export function isCI() {\n return !!process.env.CI || !!process.env.TEAMCITY_VERSION;\n}\n"],"names":["isCI","process","env","CI","TEAMCITY_VERSION"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA;IACZ,OAAO,CAAC,CAACC,QAAQC,GAAG,CAACC,EAAE,IAAI,CAAC,CAACF,QAAQC,GAAG,CAACE,gBAAgB;AAC7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lerna-exec.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/lerna-exec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"lerna-exec.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/lerna-exec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAM3C,UAAU,IAAI;IACV,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,WAAW,EAAE,CAAC;CACpE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,mCAgBnC"}
|
|
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "lernaExec", {
|
|
|
11
11
|
const _execa = /*#__PURE__*/ _interop_require_default(require("execa"));
|
|
12
12
|
const _nodeos = /*#__PURE__*/ _interop_require_default(require("node:os"));
|
|
13
13
|
const _utils = require("../../utils");
|
|
14
|
+
const _isci = require("./is-ci");
|
|
14
15
|
function _interop_require_default(obj) {
|
|
15
16
|
return obj && obj.__esModule ? obj : {
|
|
16
17
|
default: obj
|
|
@@ -46,7 +47,7 @@ function getOptions(args) {
|
|
|
46
47
|
result.push('--no-bail');
|
|
47
48
|
}
|
|
48
49
|
if (args.parallel === true) {
|
|
49
|
-
result.push(
|
|
50
|
+
result.push((0, _isci.isCI)() ? `--concurrency=${_nodeos.default.availableParallelism()}` : '--parallel');
|
|
50
51
|
} else if (typeof args.parallel === 'number') {
|
|
51
52
|
result.push(`--concurrency=${args.parallel}`);
|
|
52
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/utils/lerna-exec.ts"],"sourcesContent":["import execa, { StdioOption } from 'execa';\nimport os from 'node:os';\n\nimport { log } from '../../utils';\n\ninterface Args {\n 'bail'?: boolean;\n 'cmd': string;\n 'scope'?: string[];\n 'stream'?: boolean;\n 'parallel'?: boolean | number;\n '--'?: string[];\n 'stdio'?: 'pipe' | 'ignore' | 'inherit' | readonly StdioOption[];\n}\n\nexport function lernaExec(args: Args) {\n const lernaArguments = [\n 'exec',\n ...getOptions(args),\n '--',\n ...args.cmd.split(' '),\n ...(args['--'] ?? []).flatMap(arg => arg.split(' ')),\n ];\n log.info(`Running ${[args.cmd, ...(args['--'] ?? [])].join(' ')}`);\n return execa('lerna', lernaArguments, {\n stdio: args.stdio ?? 'inherit',\n env: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n FORCE_COLOR: 'true',\n },\n });\n}\n\nfunction getOptions(args: Args) {\n const result = (args.scope ?? []).map(name => `--scope=${name}`);\n if (args.bail === false) {\n result.push('--no-bail');\n }\n if (args.parallel === true) {\n result.push(
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/lerna-exec.ts"],"sourcesContent":["import execa, { StdioOption } from 'execa';\nimport os from 'node:os';\n\nimport { log } from '../../utils';\nimport { isCI } from './is-ci';\n\ninterface Args {\n 'bail'?: boolean;\n 'cmd': string;\n 'scope'?: string[];\n 'stream'?: boolean;\n 'parallel'?: boolean | number;\n '--'?: string[];\n 'stdio'?: 'pipe' | 'ignore' | 'inherit' | readonly StdioOption[];\n}\n\nexport function lernaExec(args: Args) {\n const lernaArguments = [\n 'exec',\n ...getOptions(args),\n '--',\n ...args.cmd.split(' '),\n ...(args['--'] ?? []).flatMap(arg => arg.split(' ')),\n ];\n log.info(`Running ${[args.cmd, ...(args['--'] ?? [])].join(' ')}`);\n return execa('lerna', lernaArguments, {\n stdio: args.stdio ?? 'inherit',\n env: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n FORCE_COLOR: 'true',\n },\n });\n}\n\nfunction getOptions(args: Args) {\n const result = (args.scope ?? []).map(name => `--scope=${name}`);\n if (args.bail === false) {\n result.push('--no-bail');\n }\n if (args.parallel === true) {\n result.push(isCI() ? `--concurrency=${os.availableParallelism()}` : '--parallel');\n } else if (typeof args.parallel === 'number') {\n result.push(`--concurrency=${args.parallel}`);\n }\n if (args.stream) {\n result.push('--stream');\n }\n return result;\n}\n"],"names":["lernaExec","args","lernaArguments","getOptions","cmd","split","flatMap","arg","log","info","join","execa","stdio","env","FORCE_COLOR","result","scope","map","name","bail","push","parallel","isCI","os","availableParallelism","stream"],"mappings":";;;;+BAgBgBA;;;eAAAA;;;8DAhBmB;+DACpB;uBAEK;sBACC;;;;;;AAYd,SAASA,UAAUC,IAAU;QAMxBA;IALR,MAAMC,iBAAiB;QACnB;WACGC,WAAWF;QACd;WACGA,KAAKG,GAAG,CAACC,KAAK,CAAC;WACf,AAACJ,CAAAA,CAAAA,SAAAA,IAAI,CAAC,KAAK,cAAVA,oBAAAA,SAAc,EAAE,AAAD,EAAGK,OAAO,CAACC,CAAAA,MAAOA,IAAIF,KAAK,CAAC;KAClD;QACkCJ;IAAnCO,UAAG,CAACC,IAAI,CAAC,CAAC,QAAQ,EAAE;QAACR,KAAKG,GAAG;WAAMH,CAAAA,UAAAA,IAAI,CAAC,KAAK,cAAVA,qBAAAA,UAAc,EAAE;KAAE,CAACS,IAAI,CAAC,MAAM;QAEtDT;IADX,OAAOU,IAAAA,cAAK,EAAC,SAAST,gBAAgB;QAClCU,OAAOX,CAAAA,cAAAA,KAAKW,KAAK,cAAVX,yBAAAA,cAAc;QACrBY,KAAK;YACD,gEAAgE;YAChEC,aAAa;QACjB;IACJ;AACJ;AAEA,SAASX,WAAWF,IAAU;QACVA;IAAhB,MAAMc,SAAS,AAACd,CAAAA,CAAAA,cAAAA,KAAKe,KAAK,cAAVf,yBAAAA,cAAc,EAAE,AAAD,EAAGgB,GAAG,CAACC,CAAAA,OAAQ,CAAC,QAAQ,EAAEA,MAAM;IAC/D,IAAIjB,KAAKkB,IAAI,KAAK,OAAO;QACrBJ,OAAOK,IAAI,CAAC;IAChB;IACA,IAAInB,KAAKoB,QAAQ,KAAK,MAAM;QACxBN,OAAOK,IAAI,CAACE,IAAAA,UAAI,MAAK,CAAC,cAAc,EAAEC,eAAE,CAACC,oBAAoB,IAAI,GAAG;IACxE,OAAO,IAAI,OAAOvB,KAAKoB,QAAQ,KAAK,UAAU;QAC1CN,OAAOK,IAAI,CAAC,CAAC,cAAc,EAAEnB,KAAKoB,QAAQ,EAAE;IAChD;IACA,IAAIpB,KAAKwB,MAAM,EAAE;QACbV,OAAOK,IAAI,CAAC;IAChB;IACA,OAAOL;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-node-options.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/set-node-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"set-node-options.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/set-node-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAwB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAMtC;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,WAqBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/cli/utils/set-node-options.ts"],"sourcesContent":["import os from 'os';\nimport { CommandName,
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/utils/set-node-options.ts"],"sourcesContent":["import os from 'os';\nimport { CommandName, getConfigurationSafe } from '../../utils';\nimport { Command } from '../commands';\n\nconst MAX_OLD_SPACE_SIZE_OPTION = 'max_old_space_size';\nconst DEFAULT_MAX_OLD_SPACE_SIZE_MB = 8192;\nconst MIN_REMAINING_MEMORY_MB = 512;\n\n/**\n * Apply global defaults and custom CLI configuration to process.env.NODE_OPTIONS\n * @param command - the command being executed\n * @returns whether process's NODE_OPTIONS were changed\n */\nexport function setNodeOptions(commandName: CommandName, command: Command) {\n const cliConfig = getConfigurationSafe();\n const cmdConfig = cliConfig[commandName];\n\n const cliNodeOptions = cliConfig.NODE_OPTIONS ?? [];\n const cmdNodeOptions = cmdConfig?.NODE_OPTIONS ?? [];\n const oldNodeOptions = process.env.NODE_OPTIONS ?? '';\n\n const mergedOptions = [...cmdNodeOptions, ...cliNodeOptions]\n .reduce((result, option) => {\n return result.includes(option) ? result : `${result} ${option}`;\n }, oldNodeOptions)\n .trim();\n\n const newNodeOptions = ensureMaxOldSpaceSize(mergedOptions, command.greedy);\n if (newNodeOptions !== oldNodeOptions) {\n process.env.NODE_OPTIONS = newNodeOptions;\n return true;\n }\n\n return false;\n}\n\nfunction ensureMaxOldSpaceSize(nodeOptions: string, greedy?: boolean) {\n if (!greedy || nodeOptions.includes(MAX_OLD_SPACE_SIZE_OPTION)) {\n return nodeOptions;\n }\n\n return `--${MAX_OLD_SPACE_SIZE_OPTION}=${getMaxOldSpaceSize()} ${nodeOptions}`.trim();\n}\n\nfunction getMaxOldSpaceSize() {\n const totalMB = os.totalmem() / (1024 * 1024);\n return Math.min(DEFAULT_MAX_OLD_SPACE_SIZE_MB, Math.floor(totalMB - MIN_REMAINING_MEMORY_MB));\n}\n"],"names":["setNodeOptions","MAX_OLD_SPACE_SIZE_OPTION","DEFAULT_MAX_OLD_SPACE_SIZE_MB","MIN_REMAINING_MEMORY_MB","commandName","command","cliConfig","getConfigurationSafe","cmdConfig","cliNodeOptions","NODE_OPTIONS","cmdNodeOptions","process","oldNodeOptions","env","mergedOptions","reduce","result","option","includes","trim","newNodeOptions","ensureMaxOldSpaceSize","greedy","nodeOptions","getMaxOldSpaceSize","totalMB","os","totalmem","Math","min","floor"],"mappings":";;;;+BAagBA;;;eAAAA;;;2DAbD;uBACmC;;;;;;AAGlD,MAAMC,4BAA4B;AAClC,MAAMC,gCAAgC;AACtC,MAAMC,0BAA0B;AAOzB,SAASH,eAAeI,WAAwB,EAAEC,OAAgB;IACrE,MAAMC,YAAYC,IAAAA,2BAAoB;IACtC,MAAMC,YAAYF,SAAS,CAACF,YAAY;QAEjBE;IAAvB,MAAMG,iBAAiBH,CAAAA,0BAAAA,UAAUI,YAAY,cAAtBJ,qCAAAA,0BAA0B,EAAE;QAC5BE;IAAvB,MAAMG,iBAAiBH,CAAAA,0BAAAA,sBAAAA,gCAAAA,UAAWE,YAAY,cAAvBF,qCAAAA,0BAA2B,EAAE;QAC7BI;IAAvB,MAAMC,iBAAiBD,CAAAA,4BAAAA,QAAQE,GAAG,CAACJ,YAAY,cAAxBE,uCAAAA,4BAA4B;IAEnD,MAAMG,gBAAgB;WAAIJ;WAAmBF;KAAe,CACvDO,MAAM,CAAC,CAACC,QAAQC;QACb,OAAOD,OAAOE,QAAQ,CAACD,UAAUD,SAAS,GAAGA,OAAO,CAAC,EAAEC,QAAQ;IACnE,GAAGL,gBACFO,IAAI;IAET,MAAMC,iBAAiBC,sBAAsBP,eAAeV,QAAQkB,MAAM;IAC1E,IAAIF,mBAAmBR,gBAAgB;QACnCD,QAAQE,GAAG,CAACJ,YAAY,GAAGW;QAC3B,OAAO;IACX;IAEA,OAAO;AACX;AAEA,SAASC,sBAAsBE,WAAmB,EAAED,MAAgB;IAChE,IAAI,CAACA,UAAUC,YAAYL,QAAQ,CAAClB,4BAA4B;QAC5D,OAAOuB;IACX;IAEA,OAAO,CAAC,EAAE,EAAEvB,0BAA0B,CAAC,EAAEwB,qBAAqB,CAAC,EAAED,aAAa,CAACJ,IAAI;AACvF;AAEA,SAASK;IACL,MAAMC,UAAUC,WAAE,CAACC,QAAQ,KAAM,CAAA,OAAO,IAAG;IAC3C,OAAOC,KAAKC,GAAG,CAAC5B,+BAA+B2B,KAAKE,KAAK,CAACL,UAAUvB;AACxE"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
_export_star(require("./webpack"), exports);
|
|
6
|
-
_export_star(require("./jest"), exports);
|
|
7
6
|
_export_star(require("./utils/get-packages"), exports);
|
|
8
7
|
function _export_star(from, to) {
|
|
9
8
|
Object.keys(from).forEach(function(k) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './webpack';\nexport * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './webpack';\nexport * from './utils/get-packages';\n"],"names":[],"mappings":";;;;qBAAc;qBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-branch-configs.d.ts","sourceRoot":"","sources":["../../src/utils/get-branch-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"get-branch-configs.d.ts","sourceRoot":"","sources":["../../src/utils/get-branch-configs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAW9F,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAK9E"}
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "getBranchesConfigs", {
|
|
|
8
8
|
return getBranchesConfigs;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const
|
|
11
|
+
const _getconfiguration = require("./get-configuration");
|
|
12
12
|
function getDefaultConfigs() {
|
|
13
13
|
return {
|
|
14
14
|
develop: {
|
|
@@ -26,7 +26,7 @@ function getDefaultConfigs() {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function getBranchesConfigs() {
|
|
29
|
-
const packageConfigs = (0,
|
|
29
|
+
const packageConfigs = (0, _getconfiguration.getWebComponentBranchConfigs)();
|
|
30
30
|
const defaultConfigs = getDefaultConfigs();
|
|
31
31
|
return packageConfigs !== null && packageConfigs !== void 0 ? packageConfigs : defaultConfigs;
|
|
32
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-branch-configs.ts"],"sourcesContent":["import { getWebComponentBranchConfigs, WebComponentBranchConfigs } from './
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-branch-configs.ts"],"sourcesContent":["import { getWebComponentBranchConfigs, WebComponentBranchConfigs } from './get-configuration';\n\nfunction getDefaultConfigs(): Record<string, WebComponentBranchConfigs> {\n return {\n develop: { publishTag: 'dev' },\n dev: { publishTag: 'dev' },\n next: { publishTag: 'next' },\n master: { publishTag: 'prod' },\n };\n}\n\nexport function getBranchesConfigs(): Record<string, WebComponentBranchConfigs> {\n const packageConfigs = getWebComponentBranchConfigs();\n const defaultConfigs = getDefaultConfigs();\n\n return packageConfigs ?? defaultConfigs;\n}\n"],"names":["getBranchesConfigs","getDefaultConfigs","develop","publishTag","dev","next","master","packageConfigs","getWebComponentBranchConfigs","defaultConfigs"],"mappings":";;;;+BAWgBA;;;eAAAA;;;kCAXwD;AAExE,SAASC;IACL,OAAO;QACHC,SAAS;YAAEC,YAAY;QAAM;QAC7BC,KAAK;YAAED,YAAY;QAAM;QACzBE,MAAM;YAAEF,YAAY;QAAO;QAC3BG,QAAQ;YAAEH,YAAY;QAAO;IACjC;AACJ;AAEO,SAASH;IACZ,MAAMO,iBAAiBC,IAAAA,8CAA4B;IACnD,MAAMC,iBAAiBR;IAEvB,OAAOM,2BAAAA,4BAAAA,iBAAkBE;AAC7B"}
|
|
@@ -2,6 +2,7 @@ import { Config } from '@jest/types';
|
|
|
2
2
|
import { swcDir } from '@swc/cli';
|
|
3
3
|
import { ESLint } from 'eslint';
|
|
4
4
|
import { LinterOptions } from 'stylelint';
|
|
5
|
+
import { ViteUserConfig } from 'vitest/config';
|
|
5
6
|
import { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
|
|
6
7
|
import { ReviewConfiguration } from '../cli/commands/review';
|
|
7
8
|
export declare const allowedWebpackDevServerOptions: readonly ["headers", "port", "proxy", "static"];
|
|
@@ -57,6 +58,7 @@ export declare enum CommandName {
|
|
|
57
58
|
'task' = "task",
|
|
58
59
|
'upload-sourcemaps' = "upload-sourcemaps"
|
|
59
60
|
}
|
|
61
|
+
export type VitestConfiguration = ViteUserConfig['test'];
|
|
60
62
|
export interface WebComponentBranchConfigs {
|
|
61
63
|
publishTag?: string;
|
|
62
64
|
uploadSourcemaps?: boolean;
|
|
@@ -70,6 +72,7 @@ interface WebComponentOptions {
|
|
|
70
72
|
branches?: Record<string, WebComponentBranchConfigs>;
|
|
71
73
|
}
|
|
72
74
|
type Configuration = {
|
|
75
|
+
'jest'?: JestConfiguration;
|
|
73
76
|
'legacy'?: boolean;
|
|
74
77
|
'lint'?: {
|
|
75
78
|
eslint: ESLintConfiguration;
|
|
@@ -78,18 +81,21 @@ type Configuration = {
|
|
|
78
81
|
'review'?: ReviewConfiguration;
|
|
79
82
|
'swc-compile-package'?: Parameters<typeof swcDir>[0];
|
|
80
83
|
'test'?: JestConfiguration;
|
|
84
|
+
'testRunner'?: string;
|
|
85
|
+
'vitest'?: VitestConfiguration;
|
|
81
86
|
'web-component'?: boolean | string | WebComponentOptions;
|
|
82
87
|
'webpack'?: false | WebpackConfiguration;
|
|
83
88
|
} & {
|
|
84
|
-
[key in CommandName]
|
|
89
|
+
[key in CommandName]?: NodeConfiguration;
|
|
85
90
|
} & NodeConfiguration;
|
|
86
91
|
type LocationOrJson = string | Record<string, any>;
|
|
87
92
|
export declare function getConfiguration(locationOrJson?: LocationOrJson): Configuration;
|
|
88
93
|
export declare function getConfigurationSafe(locationOrJson?: LocationOrJson): Configuration;
|
|
89
94
|
export declare function getESLintConfiguration(): ESLintConfiguration;
|
|
90
|
-
export declare function getJestConfiguration(): JestConfiguration
|
|
95
|
+
export declare function getJestConfiguration(): JestConfiguration;
|
|
91
96
|
export declare function getReviewConfiguration(): ReviewConfiguration & NodeConfiguration;
|
|
92
97
|
export declare function getStylelintConfiguration(): StylelintConfiguration;
|
|
98
|
+
export declare function getVitestConfiguration(): import("vitest/node").InlineConfig;
|
|
93
99
|
export declare function getWebpackConfiguration(locationOrJson?: LocationOrJson): WebpackConfiguration;
|
|
94
100
|
export declare function getWebComponentConfiguration(locationOrJson?: LocationOrJson): WebComponentOptions | undefined;
|
|
95
101
|
export declare function getWebComponentBranchConfigs(locationOrJson?: LocationOrJson): Record<string, WebComponentBranchConfigs> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,IAAI,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AAEpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAK7D,eAAO,MAAM,8BAA8B,iDAAkD,CAAC;AAE9F,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,WAAW,CAAC,EAAE,GAAG,WAAW,GAAG,KAAK,CAAC;AAErF,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;CAAG;AAEpC,MAAM,WAAW,aAAa;IAC1B,GAAG,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACjC,EAAE,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;CAClC;AAED,MAAM,WAAW,oBACb,SAAQ,IAAI,CACR,IAAI,CAAC,6BAA6B,EAAE,WAAW,CAAC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G,mBAAmB,CAAC;IACzD,SAAS,CAAC,EAAE,KAAK,GAAG,oBAAoB,CAAC;CAC5C,GAAG;KACC,GAAG,IAAI,WAAW,CAAC,CAAC,EAAE,iBAAiB;CAC3C,GAAG,iBAAiB,CAAC;AAEtB,KAAK,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEnD,wBAAgB,gBAAgB,CAAC,cAAc,GAAE,cAAqB,GAAG,aAAa,CAMrF;AAED,wBAAgB,oBAAoB,CAAC,cAAc,GAAE,cAAqB,GAAG,aAAa,CAMzF;AAED,wBAAgB,sBAAsB,wBAErC;AAED,wBAAgB,oBAAoB,sBAGnC;AAED,wBAAgB,sBAAsB,4CAErC;AAED,wBAAgB,yBAAyB,2BAExC;AAED,wBAAgB,sBAAsB,uCAErC;AAED,wBAAgB,uBAAuB,CAAC,cAAc,CAAC,EAAE,cAAc,wBAGtE;AAED,wBAAgB,4BAA4B,CACxC,cAAc,GAAE,cAAqB,GACtC,mBAAmB,GAAG,SAAS,CAsBjC;AAED,wBAAgB,4BAA4B,CAAC,cAAc,GAAE,cAAqB,yDAIjF;AAED,wBAAgB,iBAAiB,YAShC;AAED,wBAAgB,iCAAiC,+BAEhD;AAED,wBAAgB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,WAEvD;AAED,wBAAgB,kBAAkB,YAEjC;AAED,wBAAgB,mBAAmB,YAGlC;AAED,wBAAgB,0BAA0B,YAEzC;AAED,wBAAgB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,WAEvD;AAED,wBAAgB,YAAY,YAE3B;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,cAAc,CAAC,cAAc,GAAE,cAAqB,WAEnE"}
|
|
@@ -36,6 +36,9 @@ _export(exports, {
|
|
|
36
36
|
get getSwcCompilePackageConfiguration () {
|
|
37
37
|
return getSwcCompilePackageConfiguration;
|
|
38
38
|
},
|
|
39
|
+
get getVitestConfiguration () {
|
|
40
|
+
return getVitestConfiguration;
|
|
41
|
+
},
|
|
39
42
|
get getWebComponentBranchConfigs () {
|
|
40
43
|
return getWebComponentBranchConfigs;
|
|
41
44
|
},
|
|
@@ -127,8 +130,9 @@ function getESLintConfiguration() {
|
|
|
127
130
|
return (_getConfiguration_lint_eslint = (_getConfiguration_lint = getConfiguration().lint) === null || _getConfiguration_lint === void 0 ? void 0 : _getConfiguration_lint.eslint) !== null && _getConfiguration_lint_eslint !== void 0 ? _getConfiguration_lint_eslint : {};
|
|
128
131
|
}
|
|
129
132
|
function getJestConfiguration() {
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
const configuration = getConfiguration();
|
|
134
|
+
var _configuration_jest, _ref;
|
|
135
|
+
return (_ref = (_configuration_jest = configuration.jest) !== null && _configuration_jest !== void 0 ? _configuration_jest : configuration.test) !== null && _ref !== void 0 ? _ref : {};
|
|
132
136
|
}
|
|
133
137
|
function getReviewConfiguration() {
|
|
134
138
|
var _getConfiguration_review;
|
|
@@ -139,6 +143,10 @@ function getStylelintConfiguration() {
|
|
|
139
143
|
var _getConfiguration_lint_stylelint;
|
|
140
144
|
return (_getConfiguration_lint_stylelint = (_getConfiguration_lint = getConfiguration().lint) === null || _getConfiguration_lint === void 0 ? void 0 : _getConfiguration_lint.stylelint) !== null && _getConfiguration_lint_stylelint !== void 0 ? _getConfiguration_lint_stylelint : {};
|
|
141
145
|
}
|
|
146
|
+
function getVitestConfiguration() {
|
|
147
|
+
var _getConfiguration_vitest;
|
|
148
|
+
return (_getConfiguration_vitest = getConfiguration().vitest) !== null && _getConfiguration_vitest !== void 0 ? _getConfiguration_vitest : {};
|
|
149
|
+
}
|
|
142
150
|
function getWebpackConfiguration(locationOrJson) {
|
|
143
151
|
const { webpack } = getConfiguration(locationOrJson);
|
|
144
152
|
return typeof webpack === 'object' ? webpack : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import { Config } from '@jest/types';\nimport { swcDir } from '@swc/cli';\nimport { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport { LinterOptions } from 'stylelint';\nimport { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\n\nimport { ReviewConfiguration } from '../cli/commands/review';\nimport { log } from './log';\nimport { getFolders } from './get-folders';\nimport { readJson, readJsonSafe } from './read-json';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration\n extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n > {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport type JestConfiguration = Omit<Config.Argv, '_' | '$0'>;\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-publish' = 'mfe-publish',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]: NodeConfiguration;\n} & NodeConfiguration;\n\ntype LocationOrJson = string | Record<string, any>;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n return getConfiguration().test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).webpack !== false;\n}\n\nexport function isCustomStyleRules() {\n return getWebpackConfiguration()['custom-style-rules'] === true;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return getWebpackConfiguration()['expose-shared-dependencies'] === true;\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isCustomStyleRules","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","test","review","stylelint","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","webpackConfiguration","devServer","legacy","legacyRoot"],"mappings":";;;;;;;;;;;QA4DYA;eAAAA;;QA/CCC;eAAAA;;QAkGGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAoDAC;eAAAA;;QAjBAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAqCAC;eAAAA;;QAeAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;;2DA7ND;6DACE;qBAKG;4BACO;0BACY;;;;;;AAEhC,MAAMnB,iCAAiC;IAAC;IAAW;IAAQ;IAAS;CAAS;AA+C7E,IAAA,AAAKD,qCAAAA;;;;;;;;;;;;;;;;;;;;WAAAA;;AAmDL,SAASE,iBAAiBmB,iBAAiC,IAAI;IAClE,MAAMC,OACF,OAAOD,mBAAmB,WACpBE,IAAAA,kBAAQ,EAACC,aAAI,CAACC,IAAI,CAACJ,gBAAgB,mBACnCA;QACHC;IAAP,OAAOA,CAAAA,YAAAA,iBAAAA,2BAAAA,KAAMI,GAAG,cAATJ,uBAAAA,YAAa,CAAC;AACzB;AAEO,SAASnB,qBAAqBkB,iBAAiC,IAAI;IACtE,MAAMC,OACF,OAAOD,mBAAmB,WACpBM,IAAAA,sBAAY,EAACH,aAAI,CAACC,IAAI,CAACJ,gBAAgB,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AO,CAAC,CAAC;QAErE,OAAOQ;IACX;AACJ;AAEO,SAASjC,6BAA6BY,iBAAiC,IAAI;IAC9E,MAAMa,SAASxB,6BAA6BW;IAE5C,OAAOa,mBAAAA,6BAAAA,OAAQS,QAAQ;AAC3B;AAEO,SAAS/B;IACZ,IAAIgC;IACJ,IAAI;QACAA,SAASC,IAAAA,sBAAU,IAAGD,MAAM;IAChC,EAAE,UAAM;QACJ,OAAO;IACX;IACA,MAAME,eAAetB,aAAI,CAACC,IAAI,CAACmB,QAAQ;IACvC,OAAOP,WAAE,CAACC,UAAU,CAACQ;AACzB;AAEO,SAAStC;QACLN;IAAP,OAAOA,CAAAA,sCAAAA,kBAAkB,CAAC,sBAAsB,cAAzCA,iDAAAA,sCAA6C,CAAC;AACzD;AAEO,SAASW,SAASQ,cAA+B;IACpD,OAAOnB,iBAAiBmB,gBAAgBY,OAAO,KAAK;AACxD;AAEO,SAASnB;IACZ,OAAOH,yBAAyB,CAAC,qBAAqB,KAAK;AAC/D;AAEO,SAASI;IACZ,MAAMgC,uBAAuBpC;IAC7B,OAAOoC,qBAAqBC,SAAS,KAAK;AAC9C;AAEO,SAAShC;IACZ,OAAOL,yBAAyB,CAAC,6BAA6B,KAAK;AACvE;AAEO,SAASM,SAASI,cAA+B;IACpD,OAAOnB,iBAAiBmB,gBAAgB4B,MAAM,KAAK;AACvD;AAEO,SAAS/B;QACLR;IAAP,OAAOA,EAAAA,gCAAAA,4CAAAA,oDAAAA,8BAAgCwC,UAAU,MAAK;AAC1D;AAEO,SAAS/B;IACZ,OAAOR,yBAAyB,CAAC,sBAAsB,KAAK;AAChE;AAEO,SAASS,eAAeC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAACX,6BAA6BW;AAC1C"}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import { Config } from '@jest/types';\nimport { swcDir } from '@swc/cli';\nimport { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport { LinterOptions } from 'stylelint';\nimport { ViteUserConfig } from 'vitest/config';\nimport { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\n\nimport { ReviewConfiguration } from '../cli/commands/review';\nimport { log } from './log';\nimport { getFolders } from './get-folders';\nimport { readJson, readJsonSafe } from './read-json';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration\n extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n > {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport type JestConfiguration = Omit<Config.Argv, '_' | '$0'>;\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-publish' = 'mfe-publish',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type VitestConfiguration = ViteUserConfig['test'];\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'jest'?: JestConfiguration;\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration; // for backward-compatibility\n 'testRunner'?: string;\n 'vitest'?: VitestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]?: NodeConfiguration;\n} & NodeConfiguration;\n\ntype LocationOrJson = string | Record<string, any>;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n const configuration = getConfiguration();\n return configuration.jest ?? configuration.test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getVitestConfiguration() {\n return getConfiguration().vitest ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).webpack !== false;\n}\n\nexport function isCustomStyleRules() {\n return getWebpackConfiguration()['custom-style-rules'] === true;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return getWebpackConfiguration()['expose-shared-dependencies'] === true;\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getVitestConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isCustomStyleRules","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","configuration","jest","test","review","stylelint","vitest","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","webpackConfiguration","devServer","legacy","legacyRoot"],"mappings":";;;;;;;;;;;QA6DYA;eAAAA;;QA/CCC;eAAAA;;QAuGGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAwDAC;eAAAA;;QApDAC;eAAAA;;QAmCAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAqCAC;eAAAA;;QAeAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;;2DAxOD;6DACE;qBAMG;4BACO;0BACY;;;;;;AAEhC,MAAMpB,iCAAiC;IAAC;IAAW;IAAQ;IAAS;CAAS;AA+C7E,IAAA,AAAKD,qCAAAA;;;;;;;;;;;;;;;;;;;;WAAAA;;AAwDL,SAASE,iBAAiBoB,iBAAiC,IAAI;IAClE,MAAMC,OACF,OAAOD,mBAAmB,WACpBE,IAAAA,kBAAQ,EAACC,aAAI,CAACC,IAAI,CAACJ,gBAAgB,mBACnCA;QACHC;IAAP,OAAOA,CAAAA,YAAAA,iBAAAA,2BAAAA,KAAMI,GAAG,cAATJ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,EAAAA,gCAAAA,4CAAAA,oDAAAA,8BAAgC2C,UAAU,MAAK;AAC1D;AAEO,SAASlC;IACZ,OAAOR,yBAAyB,CAAC,sBAAsB,KAAK;AAChE;AAEO,SAASS,eAAeC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAACX,6BAA6BW;AAC1C"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Config } from '@jest/types';
|
|
2
|
-
import { JestConfiguration } from './get-configuration';
|
|
3
|
-
/**
|
|
4
|
-
* Get Jest clean config for running tests. This config could be used to export Jest configuration into the
|
|
5
|
-
* Jest config files.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getJestConfig: () => JestConfiguration;
|
|
8
2
|
/**
|
|
9
3
|
* Get Jest config for running it using jest CLI (see jest runCLI function)
|
|
10
4
|
*/
|
|
11
|
-
export declare
|
|
5
|
+
export declare function getJestConfigCLI(args: Config.Argv): Config.Argv;
|
|
12
6
|
//# sourceMappingURL=get-jest-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-jest-config.d.ts","sourceRoot":"","sources":["../../src/utils/get-jest-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-jest-config.d.ts","sourceRoot":"","sources":["../../src/utils/get-jest-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAwCrC;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAc/D"}
|