@elliemae/pui-cli 7.0.0-beta.9 → 7.2.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/README.md +4 -0
- package/{lib/babel/babel.config.js → dist/cjs/babel.config.cjs} +3 -7
- package/dist/cjs/cli.js +53 -0
- package/dist/cjs/commands/build.js +81 -0
- package/dist/cjs/commands/codemod.js +55 -0
- package/dist/cjs/commands/gendoc.js +53 -0
- package/dist/cjs/commands/lint.js +95 -0
- package/dist/cjs/commands/pack.js +98 -0
- package/dist/cjs/commands/start.js +76 -0
- package/dist/cjs/commands/storybook.js +71 -0
- package/dist/cjs/commands/test.js +100 -0
- package/dist/cjs/commands/tscheck.js +82 -0
- package/dist/cjs/commands/utils.js +157 -0
- package/dist/cjs/commands/version.js +77 -0
- package/dist/cjs/commands/vitest.js +93 -0
- package/dist/cjs/dummy.js +1 -0
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/index.js +42 -0
- package/dist/cjs/jsdoc.conf.json +17 -0
- package/dist/cjs/lint-config/commitlint.config.cjs +1 -0
- package/{lib/lint/eslint/common.js → dist/cjs/lint-config/eslint/common.cjs} +5 -5
- package/{lib/lint/eslint/non-react.js → dist/cjs/lint-config/eslint/non-react.cjs} +2 -2
- package/{lib/lint/eslint/react.js → dist/cjs/lint-config/eslint/react.cjs} +2 -2
- package/{lib/lint/eslint/typescript/common.js → dist/cjs/lint-config/eslint/typescript/common.cjs} +1 -1
- package/{lib/lint/eslint/typescript/non-react.js → dist/cjs/lint-config/eslint/typescript/non-react.cjs} +2 -2
- package/{lib/lint/eslint/typescript/react.js → dist/cjs/lint-config/eslint/typescript/react.cjs} +2 -2
- package/dist/cjs/lint-config/lint-staged.config.js +40 -0
- package/{lib/lint/prettier.config.js → dist/cjs/lint-config/prettier.config.cjs} +1 -1
- package/{lib/lint/stylelint.config.js → dist/cjs/lint-config/stylelint.config.cjs} +2 -2
- package/dist/cjs/monorepo/delete-merged-tags.js +58 -0
- package/dist/cjs/monorepo/set-registry-version.js +49 -0
- package/dist/cjs/monorepo/set-workspace-version.js +56 -0
- package/{lib/monorepo/utils.js → dist/cjs/monorepo/utils.cjs} +17 -2
- package/dist/cjs/package.json +4 -0
- package/dist/cjs/pui-config.js +44 -0
- package/{lib/release/release.config.js → dist/cjs/release.config.cjs} +0 -0
- package/{lib/server/util/index.js → dist/cjs/server/app-routes.cjs} +5 -15
- package/dist/cjs/server/csp.js +94 -0
- package/dist/cjs/server/index.js +34 -0
- package/dist/cjs/server/logger.js +58 -0
- package/dist/cjs/server/middlewares.js +75 -0
- package/dist/cjs/server/utils.js +39 -0
- package/{lib/testing/jest.config.js → dist/cjs/testing/jest.config.cjs} +10 -10
- package/{lib/testing/jest.node.config.js → dist/cjs/testing/jest.node.config.cjs} +1 -1
- package/dist/cjs/testing/mocks/axios.js +38 -0
- package/dist/cjs/testing/mocks/cssModule.js +24 -0
- package/dist/cjs/testing/mocks/html.js +24 -0
- package/dist/cjs/testing/mocks/image.js +24 -0
- package/dist/cjs/testing/mocks/matchMedia.js +44 -0
- package/dist/cjs/testing/mocks/pui-app-loader.js +25 -0
- package/dist/cjs/testing/mocks/pui-diagnostics.js +69 -0
- package/dist/cjs/testing/mocks/pui-user-monitoring.js +31 -0
- package/dist/cjs/testing/mocks/retry-axios.js +28 -0
- package/dist/cjs/testing/mocks/svg.js +33 -0
- package/dist/cjs/testing/mocks/webpack-hmr.js +25 -0
- package/{lib/testing/resolver.js → dist/cjs/testing/resolver.cjs} +0 -0
- package/dist/cjs/testing/setup-react-env.js +22 -0
- package/dist/cjs/testing/setup-test-env.js +23 -0
- package/dist/cjs/testing/setup-tests.js +69 -0
- package/dist/cjs/testing/vitest.config.js +52 -0
- package/{lib → dist/cjs}/transpile/.swcrc +0 -0
- package/dist/cjs/transpile/esbuild.js +134 -0
- package/dist/cjs/transpile/react-shim.js +30 -0
- package/{lib/transpile/swcrc.config.js → dist/cjs/transpile/swcrc.config.cjs} +1 -1
- package/dist/cjs/typedoc.cjs +12 -0
- package/{lib → dist/cjs}/typescript/app.tsconfig.json +0 -0
- package/{lib → dist/cjs}/typescript/library.tsconfig.json +0 -0
- package/dist/cjs/update-notifier.js +37 -0
- package/dist/cjs/utils.cjs +23 -0
- package/dist/cjs/webpack/helpers.js +237 -0
- package/dist/cjs/webpack/webpack.base.babel.js +280 -0
- package/dist/cjs/webpack/webpack.dev.babel.js +144 -0
- package/dist/cjs/webpack/webpack.lib.base.babel.js +212 -0
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +93 -0
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +95 -0
- package/dist/cjs/webpack/webpack.prod.babel.js +145 -0
- package/dist/cjs/webpack/webpack.storybook.js +111 -0
- package/dist/esm/babel.config.cjs +97 -0
- package/dist/esm/cli.js +33 -0
- package/dist/esm/commands/build.js +61 -0
- package/dist/esm/commands/codemod.js +29 -0
- package/dist/esm/commands/gendoc.js +26 -0
- package/dist/esm/commands/lint.js +69 -0
- package/dist/esm/commands/pack.js +71 -0
- package/dist/esm/commands/start.js +49 -0
- package/dist/esm/commands/storybook.js +45 -0
- package/dist/esm/commands/test.js +74 -0
- package/dist/esm/commands/tscheck.js +56 -0
- package/dist/esm/commands/utils.js +143 -0
- package/dist/esm/commands/version.js +51 -0
- package/dist/esm/commands/vitest.js +66 -0
- package/{lib/dummy.ts → dist/esm/dummy.js} +0 -0
- package/dist/esm/index.cjs +25 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/jsdoc.conf.json +17 -0
- package/dist/esm/lint-config/commitlint.config.cjs +1 -0
- package/dist/esm/lint-config/eslint/common.cjs +160 -0
- package/dist/esm/lint-config/eslint/non-react.cjs +14 -0
- package/dist/esm/lint-config/eslint/react.cjs +26 -0
- package/dist/esm/lint-config/eslint/typescript/common.cjs +43 -0
- package/dist/esm/lint-config/eslint/typescript/non-react.cjs +12 -0
- package/dist/esm/lint-config/eslint/typescript/react.cjs +19 -0
- package/dist/esm/lint-config/lint-staged.config.js +14 -0
- package/dist/esm/lint-config/prettier.config.cjs +8 -0
- package/dist/esm/lint-config/stylelint.config.cjs +19 -0
- package/dist/esm/monorepo/delete-merged-tags.js +38 -0
- package/dist/esm/monorepo/set-registry-version.js +23 -0
- package/dist/esm/monorepo/set-workspace-version.js +30 -0
- package/dist/esm/monorepo/utils.cjs +30 -0
- package/dist/esm/package.json +4 -0
- package/dist/esm/pui-config.js +18 -0
- package/dist/esm/release.config.cjs +31 -0
- package/dist/esm/server/app-routes.cjs +42 -0
- package/dist/esm/server/csp.js +68 -0
- package/dist/esm/server/index.js +18 -0
- package/dist/esm/server/logger.js +32 -0
- package/dist/esm/server/middlewares.js +49 -0
- package/dist/esm/server/utils.js +13 -0
- package/dist/esm/testing/jest.config.cjs +103 -0
- package/dist/esm/testing/jest.node.config.cjs +8 -0
- package/{lib → dist/esm}/testing/mocks/axios.js +8 -5
- package/dist/esm/testing/mocks/cssModule.js +4 -0
- package/dist/esm/testing/mocks/html.js +4 -0
- package/dist/esm/testing/mocks/image.js +4 -0
- package/dist/esm/testing/mocks/matchMedia.js +24 -0
- package/dist/esm/testing/mocks/pui-app-loader.js +5 -0
- package/dist/esm/testing/mocks/pui-diagnostics.js +49 -0
- package/dist/esm/testing/mocks/pui-user-monitoring.js +11 -0
- package/dist/esm/testing/mocks/retry-axios.js +8 -0
- package/dist/esm/testing/mocks/svg.js +7 -0
- package/dist/esm/testing/mocks/webpack-hmr.js +5 -0
- package/dist/esm/testing/resolver.cjs +47 -0
- package/dist/esm/testing/setup-react-env.js +3 -0
- package/dist/esm/testing/setup-test-env.js +4 -0
- package/dist/esm/testing/setup-tests.js +50 -0
- package/dist/esm/testing/vitest.config.js +25 -0
- package/dist/esm/transpile/.swcrc +11 -0
- package/{lib → dist/esm}/transpile/esbuild.js +35 -44
- package/dist/esm/transpile/react-shim.js +4 -0
- package/dist/esm/transpile/swcrc.config.cjs +13 -0
- package/dist/esm/typedoc.cjs +12 -0
- package/dist/esm/typescript/app.tsconfig.json +23 -0
- package/dist/esm/typescript/library.tsconfig.json +23 -0
- package/dist/esm/update-notifier.js +11 -0
- package/dist/esm/utils.cjs +23 -0
- package/dist/esm/webpack/helpers.js +211 -0
- package/dist/esm/webpack/webpack.base.babel.js +260 -0
- package/dist/esm/webpack/webpack.dev.babel.js +121 -0
- package/dist/esm/webpack/webpack.lib.base.babel.js +192 -0
- package/dist/esm/webpack/webpack.lib.dev.babel.js +67 -0
- package/dist/esm/webpack/webpack.lib.prod.babel.js +69 -0
- package/dist/esm/webpack/webpack.prod.babel.js +124 -0
- package/dist/esm/webpack/webpack.storybook.js +85 -0
- package/dist/types/babel.config.d.cts +59 -0
- package/dist/types/cli.d.ts +2 -0
- package/dist/types/commands/build.d.ts +14 -0
- package/dist/types/commands/codemod.d.ts +6 -0
- package/dist/types/commands/gendoc.d.ts +6 -0
- package/dist/types/commands/lint.d.ts +29 -0
- package/dist/types/commands/pack.d.ts +26 -0
- package/dist/types/commands/start.d.ts +13 -0
- package/dist/types/commands/storybook.d.ts +19 -0
- package/dist/types/commands/test.d.ts +39 -0
- package/dist/types/commands/tscheck.d.ts +14 -0
- package/dist/types/commands/utils.d.ts +16 -0
- package/dist/types/commands/version.d.ts +30 -0
- package/dist/types/commands/vitest.d.ts +35 -0
- package/{lib/testing/vitest.setup.ts → dist/types/dummy.d.ts} +0 -0
- package/dist/types/index.d.cts +10 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/lint-config/commitlint.config.d.cts +4 -0
- package/dist/types/lint-config/eslint/common.d.cts +127 -0
- package/dist/types/lint-config/eslint/non-react.d.cts +93 -0
- package/dist/types/lint-config/eslint/react.d.cts +123 -0
- package/dist/types/lint-config/eslint/typescript/common.d.cts +37 -0
- package/dist/types/lint-config/eslint/typescript/non-react.d.cts +87 -0
- package/dist/types/lint-config/eslint/typescript/react.d.cts +118 -0
- package/dist/types/lint-config/lint-staged.config.d.ts +5 -0
- package/dist/types/lint-config/prettier.config.d.cts +8 -0
- package/dist/types/lint-config/stylelint.config.d.cts +11 -0
- package/dist/types/monorepo/delete-merged-tags.d.ts +1 -0
- package/dist/types/monorepo/set-registry-version.d.ts +1 -0
- package/dist/types/monorepo/set-workspace-version.d.ts +1 -0
- package/dist/types/monorepo/utils.d.cts +1 -0
- package/dist/types/pui-config.d.ts +1 -0
- package/dist/types/release.config.d.cts +9 -0
- package/dist/types/server/app-routes.d.cts +1 -0
- package/dist/types/server/csp.d.ts +10 -0
- package/dist/types/server/index.d.ts +1 -0
- package/dist/types/server/logger.d.ts +4 -0
- package/dist/types/server/middlewares.d.ts +2 -0
- package/dist/types/server/utils.d.ts +3 -0
- package/dist/types/testing/jest.config.d.cts +39 -0
- package/dist/types/testing/jest.node.config.d.cts +39 -0
- package/dist/types/testing/mocks/axios.d.ts +17 -0
- package/dist/types/testing/mocks/cssModule.d.ts +2 -0
- package/dist/types/testing/mocks/html.d.ts +2 -0
- package/dist/types/testing/mocks/image.d.ts +2 -0
- package/dist/types/testing/mocks/matchMedia.d.ts +1 -0
- package/dist/types/testing/mocks/pui-app-loader.d.ts +1 -0
- package/dist/types/testing/mocks/pui-diagnostics.d.ts +28 -0
- package/dist/types/testing/mocks/pui-user-monitoring.d.ts +3 -0
- package/dist/types/testing/mocks/retry-axios.d.ts +3 -0
- package/dist/types/testing/mocks/svg.d.ts +3 -0
- package/dist/types/testing/mocks/webpack-hmr.d.ts +1 -0
- package/dist/types/testing/resolver.d.cts +2 -0
- package/dist/types/testing/setup-react-env.d.ts +1 -0
- package/dist/types/testing/setup-test-env.d.ts +2 -0
- package/dist/types/testing/setup-tests.d.ts +1 -0
- package/dist/types/testing/vitest.config.d.ts +2 -0
- package/dist/types/transpile/esbuild.d.ts +13 -0
- package/dist/types/transpile/react-shim.d.ts +2 -0
- package/dist/types/transpile/swcrc.config.d.cts +1 -0
- package/dist/types/typedoc.d.cts +3 -0
- package/dist/types/update-notifier.d.ts +1 -0
- package/dist/types/utils.d.cts +4 -0
- package/dist/types/webpack/helpers.d.ts +28 -0
- package/dist/types/webpack/webpack.base.babel.d.ts +90 -0
- package/dist/types/webpack/webpack.dev.babel.d.ts +2 -0
- package/dist/types/webpack/webpack.lib.base.babel.d.ts +110 -0
- package/dist/types/webpack/webpack.lib.dev.babel.d.ts +110 -0
- package/dist/types/webpack/webpack.lib.prod.babel.d.ts +110 -0
- package/dist/types/webpack/webpack.prod.babel.d.ts +2 -0
- package/dist/types/webpack/webpack.storybook.d.ts +4 -0
- package/package.json +159 -144
- package/lib/cli-commands/build.js +0 -60
- package/lib/cli-commands/codemod.js +0 -31
- package/lib/cli-commands/gendoc.js +0 -36
- package/lib/cli-commands/lint.js +0 -75
- package/lib/cli-commands/pack.js +0 -67
- package/lib/cli-commands/start.js +0 -49
- package/lib/cli-commands/storybook.js +0 -53
- package/lib/cli-commands/test.js +0 -63
- package/lib/cli-commands/tsc.js +0 -103
- package/lib/cli-commands/utils.js +0 -135
- package/lib/cli-commands/version.js +0 -53
- package/lib/cli-commands/vitest.js +0 -66
- package/lib/cli.js +0 -33
- package/lib/docgen/jsdoc.config.js +0 -17
- package/lib/index.js +0 -25
- package/lib/lint/commitlint.config.js +0 -1
- package/lib/lint/lint-staged.config.js +0 -16
- package/lib/monorepo/delete-merged-tags.js +0 -48
- package/lib/monorepo/set-registry-version.js +0 -22
- package/lib/monorepo/set-workspace-version.js +0 -29
- package/lib/pui-config/index.js +0 -18
- package/lib/scripts/helpers/checkmark.js +0 -15
- package/lib/scripts/helpers/get-npm-config.js +0 -3
- package/lib/scripts/helpers/progress.js +0 -19
- package/lib/scripts/helpers/xmark.js +0 -13
- package/lib/scripts/npmcheckversion.js +0 -8
- package/lib/scripts/update-notifier.js +0 -7
- package/lib/server/csp.js +0 -74
- package/lib/server/index.js +0 -37
- package/lib/server/logger.js +0 -42
- package/lib/server/middlewares/addDevMiddlewares.js +0 -39
- package/lib/server/middlewares/addProdMiddlewares.js +0 -30
- package/lib/server/middlewares/index.js +0 -37
- package/lib/testing/mocks/cssModule.js +0 -1
- package/lib/testing/mocks/html.js +0 -1
- package/lib/testing/mocks/image.js +0 -1
- package/lib/testing/mocks/matchMedia.js +0 -24
- package/lib/testing/mocks/pui-app-loader.js +0 -1
- package/lib/testing/mocks/pui-diagnostics.js +0 -28
- package/lib/testing/mocks/pui-user-monitoring.js +0 -3
- package/lib/testing/mocks/retry-axios.js +0 -3
- package/lib/testing/mocks/svg.js +0 -5
- package/lib/testing/mocks/webpack-hmr.js +0 -1
- package/lib/testing/setup-react-env.js +0 -3
- package/lib/testing/setup-tests.js +0 -58
- package/lib/testing/vitest.config.ts +0 -16
- package/lib/transpile/react-shim.js +0 -2
- package/lib/typescript/tsc-files/index.js +0 -66
- package/lib/typescript/tsc-files/utils.js +0 -16
- package/lib/typescript/util.js +0 -5
- package/lib/webpack/helpers.js +0 -252
- package/lib/webpack/webpack.base.babel.js +0 -242
- package/lib/webpack/webpack.dev.babel.js +0 -139
- package/lib/webpack/webpack.lib.base.babel.js +0 -205
- package/lib/webpack/webpack.lib.dev.babel.js +0 -49
- package/lib/webpack/webpack.lib.prod.babel.js +0 -77
- package/lib/webpack/webpack.prod.babel.js +0 -142
- package/lib/webpack/webpack.storybook.js +0 -87
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import yargs from "yargs";
|
|
3
|
+
import { exec, logError, logSuccess } from "./utils.js";
|
|
4
|
+
import { isTypeScriptEnabled } from "../utils.cjs";
|
|
5
|
+
const { CI = false } = process.env;
|
|
6
|
+
const lintCSS = async (fix = false) => {
|
|
7
|
+
const fixIssues = fix ? "--fix" : "";
|
|
8
|
+
await exec(
|
|
9
|
+
`stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!CI ? "--color" : ""} --allow-empty-input --config ${path.join(
|
|
10
|
+
process.cwd(),
|
|
11
|
+
"stylelint.config.cjs"
|
|
12
|
+
)}`
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
const lintJS = async (fix = false) => {
|
|
16
|
+
const fixIssues = fix ? "--fix" : "";
|
|
17
|
+
await exec(`eslint ${!CI ? "--color" : ""} ${fixIssues} .`);
|
|
18
|
+
};
|
|
19
|
+
const lintCmd = {
|
|
20
|
+
handler: async (argv) => {
|
|
21
|
+
if (argv.js) {
|
|
22
|
+
if (isTypeScriptEnabled())
|
|
23
|
+
await exec("tsc --noEmit --emitDeclarationOnly false");
|
|
24
|
+
try {
|
|
25
|
+
await exec("rimraf ./reports/eslint.json");
|
|
26
|
+
await lintJS(argv.fix);
|
|
27
|
+
logSuccess("JS linting completed");
|
|
28
|
+
} catch (err) {
|
|
29
|
+
logError("JS linting failed");
|
|
30
|
+
yargs().exit(-1, err);
|
|
31
|
+
return -1;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (argv.css) {
|
|
35
|
+
try {
|
|
36
|
+
await exec("rimraf ./reports/stylelint.json");
|
|
37
|
+
await lintCSS(argv.fix);
|
|
38
|
+
logSuccess("CSS linting completed");
|
|
39
|
+
} catch (err) {
|
|
40
|
+
logError("CSS linting failed");
|
|
41
|
+
yargs().exit(-1, err);
|
|
42
|
+
return -1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return 0;
|
|
46
|
+
},
|
|
47
|
+
command: "lint [options]",
|
|
48
|
+
describe: "lints application code",
|
|
49
|
+
builder: {
|
|
50
|
+
css: {
|
|
51
|
+
alias: "css",
|
|
52
|
+
type: "boolean",
|
|
53
|
+
default: true
|
|
54
|
+
},
|
|
55
|
+
js: {
|
|
56
|
+
alias: "js",
|
|
57
|
+
type: "boolean",
|
|
58
|
+
default: true
|
|
59
|
+
},
|
|
60
|
+
fix: {
|
|
61
|
+
alias: "fix",
|
|
62
|
+
type: "boolean",
|
|
63
|
+
default: false
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
lintCmd
|
|
69
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import yargs from "yargs";
|
|
4
|
+
import { exec, logInfo, logError, logSuccess } from "./utils.js";
|
|
5
|
+
import { isTypeScriptEnabled } from "../utils.cjs";
|
|
6
|
+
import { esBuild } from "../transpile/esbuild.js";
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const compileTypeScript = async () => {
|
|
9
|
+
logInfo("Generating types...");
|
|
10
|
+
await exec("tsc --emitDeclarationOnly");
|
|
11
|
+
logInfo("Types generation completed...");
|
|
12
|
+
};
|
|
13
|
+
const webBuild = async (productionBuild) => {
|
|
14
|
+
logInfo("Building source files for browser environment...");
|
|
15
|
+
const devCmd = `${path.resolve(
|
|
16
|
+
__dirname,
|
|
17
|
+
"../webpack/webpack.lib.dev.babel.js"
|
|
18
|
+
)} --color`;
|
|
19
|
+
const prodCmd = `${path.resolve(
|
|
20
|
+
__dirname,
|
|
21
|
+
"../webpack/webpack.lib.prod.babel.js"
|
|
22
|
+
)} --color`;
|
|
23
|
+
await exec(`webpack --config ${productionBuild ? prodCmd : devCmd}`);
|
|
24
|
+
logInfo("Building source files for browser environment completed...");
|
|
25
|
+
};
|
|
26
|
+
const pack = async ({ production, target, srcPath }) => {
|
|
27
|
+
logInfo("Build in-progress...");
|
|
28
|
+
await exec("rimraf ./dist");
|
|
29
|
+
if (isTypeScriptEnabled()) {
|
|
30
|
+
await compileTypeScript();
|
|
31
|
+
}
|
|
32
|
+
if (target !== "node")
|
|
33
|
+
await webBuild(production);
|
|
34
|
+
if (target !== "web") {
|
|
35
|
+
logInfo("Building source files for nodejs environment...");
|
|
36
|
+
await esBuild({ srcdir: srcPath });
|
|
37
|
+
logInfo("Building source files for nodejs environment completed.");
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const packCmd = {
|
|
41
|
+
handler: async (argv) => {
|
|
42
|
+
try {
|
|
43
|
+
await pack(argv);
|
|
44
|
+
logSuccess("Build completed");
|
|
45
|
+
} catch (err) {
|
|
46
|
+
logError("Build failed", err);
|
|
47
|
+
yargs().exit(-1, err);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
command: "pack",
|
|
51
|
+
describe: "builds library",
|
|
52
|
+
builder: {
|
|
53
|
+
production: {
|
|
54
|
+
alias: "p",
|
|
55
|
+
type: "boolean",
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
target: {
|
|
59
|
+
alias: "t",
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "target environment where this library will be used. allowed values are web, node. by default libraries will be compiled for both web and nodejs environments"
|
|
62
|
+
},
|
|
63
|
+
srcPath: {
|
|
64
|
+
type: "string",
|
|
65
|
+
default: "./lib"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
packCmd
|
|
71
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import yargs from "yargs";
|
|
4
|
+
import { exec, logError, logSuccess, isApp } from "./utils.js";
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const startProdServer = async () => {
|
|
7
|
+
await exec(
|
|
8
|
+
`cross-env NODE_ENV=production ts-node ${path.resolve(
|
|
9
|
+
__dirname,
|
|
10
|
+
"../server"
|
|
11
|
+
)} --color always`
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
const startDevServer = async () => {
|
|
15
|
+
const configFile = `../webpack/${await isApp() ? "webpack.dev.babel.js" : "webpack.lib.dev.babel.js"}`;
|
|
16
|
+
await exec(
|
|
17
|
+
`cross-env NODE_ENV=development webpack serve --config ${path.resolve(
|
|
18
|
+
__dirname,
|
|
19
|
+
configFile
|
|
20
|
+
)}`
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
const startCmd = {
|
|
24
|
+
handler: async (argv) => {
|
|
25
|
+
try {
|
|
26
|
+
if (argv.prod) {
|
|
27
|
+
await startProdServer();
|
|
28
|
+
} else {
|
|
29
|
+
await startDevServer();
|
|
30
|
+
}
|
|
31
|
+
logSuccess("Server started");
|
|
32
|
+
} catch (err) {
|
|
33
|
+
logError("Server start failed", err);
|
|
34
|
+
yargs().exit(-1, err);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
command: "start [options]",
|
|
38
|
+
describe: "starts local web server to test the application",
|
|
39
|
+
builder: {
|
|
40
|
+
prod: {
|
|
41
|
+
alias: "p",
|
|
42
|
+
default: false,
|
|
43
|
+
type: "boolean"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
startCmd
|
|
49
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import yargs from "yargs";
|
|
2
|
+
import { exec, logInfo, logError, logSuccess } from "./utils.js";
|
|
3
|
+
const buildStoryBook = async (isDoc = false) => {
|
|
4
|
+
const additionalParams = isDoc ? "--docs -o demo/docs" : "-o demo";
|
|
5
|
+
await exec(
|
|
6
|
+
`cross-env NODE_ENV=production FORCE_COLOR=true build-storybook --quiet ${additionalParams}`
|
|
7
|
+
);
|
|
8
|
+
};
|
|
9
|
+
const startStoryBook = async (isDoc = false) => {
|
|
10
|
+
await exec(
|
|
11
|
+
`cross-env NODE_ENV=development STORYBOOK_BUILD=true FORCE_COLOR=true start-storybook ${isDoc && "--docs"} -p 11000 --quiet`
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
const storybookCmd = {
|
|
15
|
+
handler: async (argv) => {
|
|
16
|
+
try {
|
|
17
|
+
if (!argv.build) {
|
|
18
|
+
await startStoryBook(argv.docs);
|
|
19
|
+
logInfo("Storybook started");
|
|
20
|
+
} else {
|
|
21
|
+
await buildStoryBook(argv.docs);
|
|
22
|
+
logSuccess("Storybook build completed");
|
|
23
|
+
}
|
|
24
|
+
} catch (err) {
|
|
25
|
+
logError("Storybook execution failed", err);
|
|
26
|
+
yargs().exit(-1, err);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
command: "storybook [options]",
|
|
30
|
+
describe: "story book application code",
|
|
31
|
+
builder: {
|
|
32
|
+
build: {
|
|
33
|
+
alias: "b",
|
|
34
|
+
type: "boolean",
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
docs: {
|
|
38
|
+
type: "boolean",
|
|
39
|
+
default: false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
storybookCmd
|
|
45
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import yargs from "yargs";
|
|
2
|
+
import { exec, logError, logSuccess } from "./utils.js";
|
|
3
|
+
const { CI = false } = process.env;
|
|
4
|
+
const test = async (commandOptions) => {
|
|
5
|
+
await exec(`cross-env NODE_ENV=test jest ${commandOptions}`);
|
|
6
|
+
};
|
|
7
|
+
const debugTest = async () => {
|
|
8
|
+
await exec(
|
|
9
|
+
`node --inspect-brk ./node_modules/jest-cli/bin/jest.js --runInBand --watch`
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
const testCmd = {
|
|
13
|
+
handler: async (argv) => {
|
|
14
|
+
let commandOptions = "--coverage --maxWorkers=50%";
|
|
15
|
+
if (argv.fix)
|
|
16
|
+
commandOptions = "-u";
|
|
17
|
+
else if (argv.watch)
|
|
18
|
+
commandOptions = "--watchAll";
|
|
19
|
+
if (CI)
|
|
20
|
+
commandOptions += " --ci --no-colors";
|
|
21
|
+
if (argv.p)
|
|
22
|
+
commandOptions += " --passWithNoTests";
|
|
23
|
+
if (argv.r)
|
|
24
|
+
commandOptions += " --bail --findRelatedTests";
|
|
25
|
+
if (argv.s)
|
|
26
|
+
commandOptions += " --silent";
|
|
27
|
+
try {
|
|
28
|
+
if (CI) {
|
|
29
|
+
await exec("rimraf ./reports");
|
|
30
|
+
}
|
|
31
|
+
if (argv.debug) {
|
|
32
|
+
await debugTest();
|
|
33
|
+
} else {
|
|
34
|
+
await test(commandOptions);
|
|
35
|
+
}
|
|
36
|
+
logSuccess("Unit test execution completed");
|
|
37
|
+
} catch (err) {
|
|
38
|
+
logError("Unit test execution failed", err);
|
|
39
|
+
yargs().exit(-1, err);
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
return 0;
|
|
43
|
+
},
|
|
44
|
+
command: "test [options]",
|
|
45
|
+
describe: "unit tests application code",
|
|
46
|
+
builder: {
|
|
47
|
+
fix: {
|
|
48
|
+
alias: "f",
|
|
49
|
+
type: "boolean"
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
alias: "w",
|
|
53
|
+
type: "boolean"
|
|
54
|
+
},
|
|
55
|
+
debug: {
|
|
56
|
+
type: "boolean"
|
|
57
|
+
},
|
|
58
|
+
passWithNoTests: {
|
|
59
|
+
alias: "p",
|
|
60
|
+
type: "boolean"
|
|
61
|
+
},
|
|
62
|
+
findReleatedTests: {
|
|
63
|
+
alias: "r",
|
|
64
|
+
type: "boolean"
|
|
65
|
+
},
|
|
66
|
+
silent: {
|
|
67
|
+
alias: "s",
|
|
68
|
+
type: "boolean"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
testCmd
|
|
74
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import yargs from "yargs";
|
|
4
|
+
import { exec, logInfo, logError } from "./utils.js";
|
|
5
|
+
const randomChars = () => Math.random().toString(36).slice(2);
|
|
6
|
+
const validateTypescript = async (files = []) => {
|
|
7
|
+
const tsconfigPath = path.join(process.cwd(), "tsconfig.json");
|
|
8
|
+
const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath));
|
|
9
|
+
const tmpTsconfigPath = path.join(
|
|
10
|
+
process.cwd(),
|
|
11
|
+
`tsconfig.${randomChars()}.json`
|
|
12
|
+
);
|
|
13
|
+
const tmpTsconfig = {
|
|
14
|
+
...tsconfig,
|
|
15
|
+
compilerOptions: {
|
|
16
|
+
...tsconfig.compilerOptions,
|
|
17
|
+
skipLibCheck: true
|
|
18
|
+
},
|
|
19
|
+
files,
|
|
20
|
+
include: ["app", "lib"]
|
|
21
|
+
};
|
|
22
|
+
fs.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2));
|
|
23
|
+
const tscPath = path.resolve(
|
|
24
|
+
process.cwd(),
|
|
25
|
+
`./node_modules/.bin/tsc${process.platform === "win32" ? ".cmd" : ""}`
|
|
26
|
+
);
|
|
27
|
+
try {
|
|
28
|
+
await exec(
|
|
29
|
+
`${tscPath} -p ${tmpTsconfigPath} --noEmit --emitDeclarationOnly false`
|
|
30
|
+
);
|
|
31
|
+
} finally {
|
|
32
|
+
fs.unlinkSync(tmpTsconfigPath);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const tscheckCmd = {
|
|
36
|
+
handler: async ({ files }) => {
|
|
37
|
+
try {
|
|
38
|
+
await validateTypescript(files);
|
|
39
|
+
logInfo("Typescript validation completed");
|
|
40
|
+
} catch (err) {
|
|
41
|
+
logError("Typescript validation failed", err);
|
|
42
|
+
yargs().exit(-1, err);
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
command: "tscheck [options]",
|
|
46
|
+
describe: "validate typescript file(s)",
|
|
47
|
+
builder: {
|
|
48
|
+
files: {
|
|
49
|
+
type: "array",
|
|
50
|
+
default: []
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
tscheckCmd
|
|
56
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { constants } from "fs";
|
|
3
|
+
import {
|
|
4
|
+
readFile,
|
|
5
|
+
writeFile,
|
|
6
|
+
mkdir,
|
|
7
|
+
readdir,
|
|
8
|
+
copyFile,
|
|
9
|
+
access
|
|
10
|
+
} from "fs/promises";
|
|
11
|
+
import { execaCommand } from "execa";
|
|
12
|
+
import chalk from "chalk";
|
|
13
|
+
import {
|
|
14
|
+
getPaths,
|
|
15
|
+
isAppLoaderEnabled,
|
|
16
|
+
getAppVersion,
|
|
17
|
+
LATEST_VERSION
|
|
18
|
+
} from "../webpack/helpers.js";
|
|
19
|
+
const browsersMapping = {
|
|
20
|
+
and_chr: "Chrome for Android",
|
|
21
|
+
chrome: "Google Chrome",
|
|
22
|
+
edge: "Microsoft Edge",
|
|
23
|
+
firefox: "Mozilla Firefox",
|
|
24
|
+
ios_saf: "iOS Safari",
|
|
25
|
+
safari: "Safari",
|
|
26
|
+
samsung: "Samsung Internet"
|
|
27
|
+
};
|
|
28
|
+
const exec = async (command, options = { stdio: "inherit" }) => execaCommand(command, options);
|
|
29
|
+
const logInfo = console.log;
|
|
30
|
+
const logSuccess = (...args) => console.log(chalk.green(...args));
|
|
31
|
+
const logError = console.error;
|
|
32
|
+
const readPackageLock = async () => {
|
|
33
|
+
try {
|
|
34
|
+
const appPkgLockFile = path.join(process.cwd(), "package-lock.json");
|
|
35
|
+
const pkgLockJSON = await readFile(appPkgLockFile, "utf8");
|
|
36
|
+
const { dependencies } = JSON.parse(pkgLockJSON);
|
|
37
|
+
return (moduleName) => dependencies[moduleName]?.version || "";
|
|
38
|
+
} catch (err) {
|
|
39
|
+
console.warn("Package lock file not found");
|
|
40
|
+
return () => "";
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const getSupportedBrowsers = async () => {
|
|
44
|
+
const { stdout } = await exec("npx --no-install browserslist", {
|
|
45
|
+
stdout: "pipe"
|
|
46
|
+
});
|
|
47
|
+
const browserVersions = stdout && stdout.split("\n") || [];
|
|
48
|
+
return browserVersions.reduce((acc, nameVersion) => {
|
|
49
|
+
const [name, version] = nameVersion.split(" ");
|
|
50
|
+
const versionRange = version.split("-");
|
|
51
|
+
acc[browsersMapping[name]] = versionRange && versionRange[0] || version;
|
|
52
|
+
return acc;
|
|
53
|
+
}, {});
|
|
54
|
+
};
|
|
55
|
+
const getModulesInfo = async () => {
|
|
56
|
+
try {
|
|
57
|
+
const getModuleVersion = await readPackageLock();
|
|
58
|
+
return {
|
|
59
|
+
react: getModuleVersion("react"),
|
|
60
|
+
"react-dom": getModuleVersion("react-dom"),
|
|
61
|
+
"app-react-dependencies": getModuleVersion(
|
|
62
|
+
"@elliemae/app-react-dependencies"
|
|
63
|
+
),
|
|
64
|
+
"app-sdk": getModuleVersion("@elliemae/pui-app-sdk"),
|
|
65
|
+
cli: getModuleVersion("@elliemae/pui-cli"),
|
|
66
|
+
dimsum: getModuleVersion("@elliemae/ds-system")
|
|
67
|
+
};
|
|
68
|
+
} catch (err) {
|
|
69
|
+
console.warn(err);
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const writeAppInfo = async () => {
|
|
74
|
+
const appInfo = {
|
|
75
|
+
timestamp: new Date().toISOString(),
|
|
76
|
+
modules: await getModulesInfo(),
|
|
77
|
+
browserSupport: await getSupportedBrowsers(),
|
|
78
|
+
screenReaderSupport: [
|
|
79
|
+
"JAWS with Chrome",
|
|
80
|
+
"NVDA with Chrome",
|
|
81
|
+
"VoiceOver with Safari",
|
|
82
|
+
"iOS VoiceOver",
|
|
83
|
+
"Android Talkback"
|
|
84
|
+
]
|
|
85
|
+
};
|
|
86
|
+
const infoJSON = JSON.stringify(appInfo, null, 2);
|
|
87
|
+
const { buildPath: versionedPath } = getPaths();
|
|
88
|
+
[
|
|
89
|
+
path.join(versionedPath, "info.json"),
|
|
90
|
+
path.join(process.cwd(), "build", "public", "info.json")
|
|
91
|
+
].forEach(async (infoPath) => writeFile(infoPath, infoJSON));
|
|
92
|
+
};
|
|
93
|
+
const copyDir = async (src, dest) => {
|
|
94
|
+
const entries = await readdir(src, {
|
|
95
|
+
withFileTypes: true
|
|
96
|
+
});
|
|
97
|
+
await mkdir(dest);
|
|
98
|
+
return Promise.all(
|
|
99
|
+
entries.map((entry) => {
|
|
100
|
+
const srcPath = path.join(src, entry.name);
|
|
101
|
+
const destPath = path.join(dest, entry.name);
|
|
102
|
+
if (entry.isDirectory()) {
|
|
103
|
+
return copyDir(srcPath, destPath);
|
|
104
|
+
}
|
|
105
|
+
return copyFile(srcPath, destPath);
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
const updateManifestWithVersionInfo = async (dest) => {
|
|
110
|
+
const manifestFile = path.join(dest, "manifest.json");
|
|
111
|
+
let manifestData = await readFile(manifestFile, "utf8");
|
|
112
|
+
manifestData = manifestData.replace(/latest\//g, `${getAppVersion()}/`);
|
|
113
|
+
await writeFile(manifestFile, manifestData);
|
|
114
|
+
};
|
|
115
|
+
const copyBuildAssetsToVersionedFolder = async () => {
|
|
116
|
+
const appVersion = getAppVersion();
|
|
117
|
+
const isVersionedApp = isAppLoaderEnabled() && appVersion !== LATEST_VERSION;
|
|
118
|
+
if (!isVersionedApp)
|
|
119
|
+
return;
|
|
120
|
+
const src = path.resolve(process.cwd(), "build/public/latest");
|
|
121
|
+
const dest = path.resolve(process.cwd(), `build/public/${appVersion}`);
|
|
122
|
+
await copyDir(src, dest);
|
|
123
|
+
await updateManifestWithVersionInfo(dest);
|
|
124
|
+
};
|
|
125
|
+
const isPathExist = async (pathToCheck) => {
|
|
126
|
+
try {
|
|
127
|
+
await access(pathToCheck, constants.F_OK);
|
|
128
|
+
return true;
|
|
129
|
+
} catch (err) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const isApp = async () => isPathExist(path.join(process.cwd(), "app"));
|
|
134
|
+
export {
|
|
135
|
+
copyBuildAssetsToVersionedFolder,
|
|
136
|
+
exec,
|
|
137
|
+
isApp,
|
|
138
|
+
isPathExist,
|
|
139
|
+
logError,
|
|
140
|
+
logInfo,
|
|
141
|
+
logSuccess,
|
|
142
|
+
writeAppInfo
|
|
143
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import yargs from "yargs";
|
|
2
|
+
import { exec, logError } from "./utils.js";
|
|
3
|
+
import { setWorkspaceVersion } from "../monorepo/set-workspace-version.js";
|
|
4
|
+
import { setRegistryVersion } from "../monorepo/set-registry-version.js";
|
|
5
|
+
import { deleteMergedTags } from "../monorepo/delete-merged-tags.js";
|
|
6
|
+
const version = async (lernaOptions = "") => {
|
|
7
|
+
await exec(
|
|
8
|
+
`cross-env NODE_ENV=production lerna version --conventional-commits --exact --create-release github --force-publish --yes ${lernaOptions}`
|
|
9
|
+
);
|
|
10
|
+
};
|
|
11
|
+
const versionCmd = {
|
|
12
|
+
handler: async (argv) => {
|
|
13
|
+
try {
|
|
14
|
+
if (argv.deleteTags) {
|
|
15
|
+
await deleteMergedTags();
|
|
16
|
+
} else if (argv.useRegistry) {
|
|
17
|
+
await setRegistryVersion();
|
|
18
|
+
} else if (argv.useWorkspace) {
|
|
19
|
+
await setWorkspaceVersion();
|
|
20
|
+
} else {
|
|
21
|
+
await version(argv.lernaOptions);
|
|
22
|
+
}
|
|
23
|
+
} catch (err) {
|
|
24
|
+
logError("Monorepo versioning failed", err);
|
|
25
|
+
yargs().exit(-1, err);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
command: "version [options]",
|
|
29
|
+
describe: "version monorepo",
|
|
30
|
+
builder: {
|
|
31
|
+
deleteTags: {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
useRegistry: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
useWorkspace: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
lernaOptions: {
|
|
44
|
+
type: "string",
|
|
45
|
+
default: false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
versionCmd
|
|
51
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import yargs from "yargs";
|
|
4
|
+
import { exec, logError, logSuccess } from "./utils.js";
|
|
5
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const { CI = false } = process.env;
|
|
7
|
+
const configPath = path.resolve(__dirname, "../testing/vitest.config.js");
|
|
8
|
+
const test = async (commandOptions) => {
|
|
9
|
+
await exec(
|
|
10
|
+
`cross-env FORCE_COLOR=true vitest --config ${configPath} ${commandOptions}`
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
const vitestCmd = {
|
|
14
|
+
handler: async (argv) => {
|
|
15
|
+
let commandOptions = "--coverage";
|
|
16
|
+
if (argv.fix)
|
|
17
|
+
commandOptions = "-u";
|
|
18
|
+
else if (argv.watch)
|
|
19
|
+
commandOptions = "--watch";
|
|
20
|
+
if (argv.p)
|
|
21
|
+
commandOptions += " --passWithNoTests";
|
|
22
|
+
if (argv.r)
|
|
23
|
+
commandOptions += " --related";
|
|
24
|
+
if (argv.s)
|
|
25
|
+
commandOptions += " --silent";
|
|
26
|
+
try {
|
|
27
|
+
if (CI) {
|
|
28
|
+
await exec("rimraf ./reports");
|
|
29
|
+
}
|
|
30
|
+
await test(commandOptions);
|
|
31
|
+
logSuccess("Unit test execution completed");
|
|
32
|
+
} catch (err) {
|
|
33
|
+
logError("Unit test execution failed", err);
|
|
34
|
+
yargs().exit(-1, err);
|
|
35
|
+
return -1;
|
|
36
|
+
}
|
|
37
|
+
return 0;
|
|
38
|
+
},
|
|
39
|
+
command: "vitest [options]",
|
|
40
|
+
describe: "unit tests application code using vitest",
|
|
41
|
+
builder: {
|
|
42
|
+
fix: {
|
|
43
|
+
alias: "f",
|
|
44
|
+
type: "boolean"
|
|
45
|
+
},
|
|
46
|
+
watch: {
|
|
47
|
+
alias: "w",
|
|
48
|
+
type: "boolean"
|
|
49
|
+
},
|
|
50
|
+
passWithNoTests: {
|
|
51
|
+
alias: "p",
|
|
52
|
+
type: "boolean"
|
|
53
|
+
},
|
|
54
|
+
related: {
|
|
55
|
+
alias: "r",
|
|
56
|
+
type: "boolean"
|
|
57
|
+
},
|
|
58
|
+
silent: {
|
|
59
|
+
alias: "s",
|
|
60
|
+
type: "boolean"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
vitestCmd
|
|
66
|
+
};
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const { babelConfig } = require('./babel.config.cjs');
|
|
2
|
+
const {
|
|
3
|
+
esConfig: eslintBaseConfig,
|
|
4
|
+
} = require('./lint-config/eslint/non-react.cjs');
|
|
5
|
+
const {
|
|
6
|
+
esReactConfig: eslintConfig,
|
|
7
|
+
} = require('./lint-config/eslint/react.cjs');
|
|
8
|
+
const { stylelintConfig } = require('./lint-config/stylelint.config.cjs');
|
|
9
|
+
const { prettierConfig } = require('./lint-config/prettier.config.cjs');
|
|
10
|
+
const { commitlintConfig } = require('./lint-config/commitlint.config.cjs');
|
|
11
|
+
const { jestConfig } = require('./testing/jest.config.cjs');
|
|
12
|
+
const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
|
|
13
|
+
const { loadRoutes } = require('./server/app-routes.cjs');
|
|
14
|
+
|
|
15
|
+
module.exports = {
|
|
16
|
+
babelConfig,
|
|
17
|
+
eslintBaseConfig,
|
|
18
|
+
eslintConfig,
|
|
19
|
+
stylelintConfig,
|
|
20
|
+
prettierConfig,
|
|
21
|
+
commitlintConfig,
|
|
22
|
+
jestConfig,
|
|
23
|
+
jestNodeConfig,
|
|
24
|
+
loadRoutes,
|
|
25
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { babelConfig } from "./babel.config.cjs";
|
|
2
|
+
import { esConfig } from "./lint-config/eslint/non-react.cjs";
|
|
3
|
+
import { esReactConfig } from "./lint-config/eslint/react.cjs";
|
|
4
|
+
import { stylelintConfig } from "./lint-config/stylelint.config.cjs";
|
|
5
|
+
import { prettierConfig } from "./lint-config/prettier.config.cjs";
|
|
6
|
+
import { commitlintConfig } from "./lint-config/commitlint.config.cjs";
|
|
7
|
+
import { jestConfig } from "./testing/jest.config.cjs";
|
|
8
|
+
import { jestNodeConfig } from "./testing/jest.node.config.cjs";
|
|
9
|
+
import { lintStagedConfig } from "./lint-config/lint-staged.config.js";
|
|
10
|
+
import { loadRoutes } from "./server/app-routes.cjs";
|
|
11
|
+
export {
|
|
12
|
+
babelConfig,
|
|
13
|
+
commitlintConfig,
|
|
14
|
+
esConfig as eslintBaseConfig,
|
|
15
|
+
esReactConfig as eslintConfig,
|
|
16
|
+
jestConfig,
|
|
17
|
+
jestNodeConfig,
|
|
18
|
+
lintStagedConfig,
|
|
19
|
+
loadRoutes,
|
|
20
|
+
prettierConfig,
|
|
21
|
+
stylelintConfig
|
|
22
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"plugins": ["plugins/markdown"],
|
|
3
|
+
"opts": {
|
|
4
|
+
"template": "node_modules/docdash"
|
|
5
|
+
},
|
|
6
|
+
"docdash": {
|
|
7
|
+
"sort": true,
|
|
8
|
+
"search": true,
|
|
9
|
+
"collapse": true,
|
|
10
|
+
"wrap": true
|
|
11
|
+
},
|
|
12
|
+
"templates": {
|
|
13
|
+
"default": {
|
|
14
|
+
"includeDate": false
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|