@elliemae/pui-cli 9.0.0-alpha.1 → 9.0.0-alpha.11
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 +43 -0
- package/app.tsconfig.json +1 -1
- package/build/docs/404.html +16 -0
- package/build/docs/api/functions/loadRoutes/index.html +22 -0
- package/build/docs/api/index.html +22 -0
- package/build/docs/api/type-aliases/LIB_NAME/index.html +17 -0
- package/build/docs/api/variables/babelConfig/index.html +40 -0
- package/build/docs/api/variables/commitlintConfig/index.html +20 -0
- package/build/docs/api/variables/eslintBaseConfig/index.html +132 -0
- package/build/docs/api/variables/eslintConfig/index.html +180 -0
- package/build/docs/api/variables/eslintFlatBaseConfig/index.html +18 -0
- package/build/docs/api/variables/eslintFlatBaseConfigStrict/index.html +18 -0
- package/build/docs/api/variables/eslintFlatConfig/index.html +18 -0
- package/build/docs/api/variables/eslintFlatConfigStrict/index.html +18 -0
- package/build/docs/api/variables/jestConfig/index.html +98 -0
- package/build/docs/api/variables/jestNodeConfig/index.html +98 -0
- package/build/docs/api/variables/lintStagedConfig/index.html +24 -0
- package/build/docs/api/variables/prettierConfig/index.html +30 -0
- package/build/docs/api/variables/stylelintConfig/index.html +17 -0
- package/build/docs/api/variables/vitestConfig/index.html +17 -0
- package/build/docs/assets/css/styles.74603f39.css +1 -0
- package/build/docs/assets/js/04ee7372.eaa386ed.js +1 -0
- package/build/docs/assets/js/0551d4dd.ebb18f4f.js +1 -0
- package/build/docs/assets/js/0a1d0315.fc8f91a7.js +1 -0
- package/build/docs/assets/js/1126.fa547e9c.js +1 -0
- package/build/docs/assets/js/1127.f28430e6.js +1 -0
- package/build/docs/assets/js/1298.fb0939c9.js +1 -0
- package/build/docs/assets/js/13097d8d.af480dfd.js +1 -0
- package/build/docs/assets/js/1617.b2623271.js +1 -0
- package/build/docs/assets/js/16b7bc88.c3779e27.js +1 -0
- package/build/docs/assets/js/1700.4f7a9007.js +1 -0
- package/build/docs/assets/js/17896441.84339068.js +1 -0
- package/build/docs/assets/js/1b9df811.aaa95da1.js +1 -0
- package/build/docs/assets/js/213.e69351b3.js +1 -0
- package/build/docs/assets/js/2297.e63290f4.js +1 -0
- package/build/docs/assets/js/232a0286.33b2782b.js +1 -0
- package/build/docs/assets/js/2399.cc5803e0.js +1 -0
- package/build/docs/assets/js/242.73516ab6.js +1 -0
- package/build/docs/assets/js/247.e1522e52.js +1 -0
- package/build/docs/assets/js/2673.da75a556.js +1 -0
- package/build/docs/assets/js/2805.f0505f8c.js +1 -0
- package/build/docs/assets/js/3395.eb3dad5b.js +1 -0
- package/build/docs/assets/js/3499.2d5c6821.js +1 -0
- package/build/docs/assets/js/3552.9272c0d9.js +1 -0
- package/build/docs/assets/js/3720.8e7f36d4.js +2 -0
- package/build/docs/assets/js/3720.8e7f36d4.js.LICENSE.txt +9 -0
- package/build/docs/assets/js/37d86055.47211796.js +1 -0
- package/build/docs/assets/js/3992.0ac29b2f.js +2 -0
- package/build/docs/assets/js/3992.0ac29b2f.js.LICENSE.txt +1 -0
- package/build/docs/assets/js/4069.301f1115.js +1 -0
- package/build/docs/assets/js/4134.553b3645.js +1 -0
- package/build/docs/assets/js/4257.9afce6ac.js +1 -0
- package/build/docs/assets/js/4772.6294b364.js +1 -0
- package/build/docs/assets/js/4884.9dbe23e5.js +1 -0
- package/build/docs/assets/js/4fb6949f.369cc1b9.js +1 -0
- package/build/docs/assets/js/5196.98f7e06a.js +1 -0
- package/build/docs/assets/js/5248.ee436cea.js +1 -0
- package/build/docs/assets/js/5428.71752e9a.js +1 -0
- package/build/docs/assets/js/5964.0728ed91.js +1 -0
- package/build/docs/assets/js/5968.5f4ccba7.js +1 -0
- package/build/docs/assets/js/5befad71.5f19afb5.js +1 -0
- package/build/docs/assets/js/5d5f1db0.c5aa5afa.js +1 -0
- package/build/docs/assets/js/5e8c322a.ef3b894b.js +1 -0
- package/build/docs/assets/js/5e95c892.f550b901.js +1 -0
- package/build/docs/assets/js/5fb3c522.da5628e8.js +1 -0
- package/build/docs/assets/js/6486.68ae0007.js +1 -0
- package/build/docs/assets/js/6704.2615a5c6.js +1 -0
- package/build/docs/assets/js/6bd11e52.08b95209.js +1 -0
- package/build/docs/assets/js/6e96545e.30c1b801.js +1 -0
- package/build/docs/assets/js/7080.efd5ba6c.js +1 -0
- package/build/docs/assets/js/71f6d02b.cfd98385.js +1 -0
- package/build/docs/assets/js/7201.e90ba636.js +1 -0
- package/build/docs/assets/js/7344.95656e38.js +1 -0
- package/build/docs/assets/js/7516.b6668d60.js +1 -0
- package/build/docs/assets/js/7525.a8d0db87.js +1 -0
- package/build/docs/assets/js/7540.7a4353cf.js +1 -0
- package/build/docs/assets/js/7985.8c6943d6.js +1 -0
- package/build/docs/assets/js/8049.8ba75278.js +1 -0
- package/build/docs/assets/js/80e87108.f9507b95.js +1 -0
- package/build/docs/assets/js/8152.f2bebb2f.js +1 -0
- package/build/docs/assets/js/821.8d4e2a80.js +1 -0
- package/build/docs/assets/js/8290.a4f7a2ca.js +1 -0
- package/build/docs/assets/js/8355.864847a1.js +1 -0
- package/build/docs/assets/js/8389.26a9caca.js +1 -0
- package/build/docs/assets/js/8585.3cb09ff7.js +1 -0
- package/build/docs/assets/js/8788.03856709.js +1 -0
- package/build/docs/assets/js/9178.50ac2954.js +1 -0
- package/build/docs/assets/js/9210.1ac21da8.js +1 -0
- package/build/docs/assets/js/9354.37ad86f9.js +1 -0
- package/build/docs/assets/js/936.c151b43f.js +1 -0
- package/build/docs/assets/js/9574.b172d607.js +1 -0
- package/build/docs/assets/js/97.70eddfb5.js +1 -0
- package/build/docs/assets/js/9852.f77caf52.js +1 -0
- package/build/docs/assets/js/9953.f6278635.js +1 -0
- package/build/docs/assets/js/a7bd4aaa.30ffad02.js +1 -0
- package/build/docs/assets/js/a94703ab.f1796514.js +1 -0
- package/build/docs/assets/js/aba21aa0.3bbcf0cc.js +1 -0
- package/build/docs/assets/js/b7b585d8.6d53e73f.js +1 -0
- package/build/docs/assets/js/b8ac1d98.62684003.js +1 -0
- package/build/docs/assets/js/bde5209a.f5bca8b2.js +1 -0
- package/build/docs/assets/js/c377a04b.0f8625c6.js +1 -0
- package/build/docs/assets/js/dfd75424.51c4e2cb.js +1 -0
- package/build/docs/assets/js/e5f79924.c793a74d.js +1 -0
- package/build/docs/assets/js/f736c962.dbd0d004.js +1 -0
- package/build/docs/assets/js/main.7f815b7e.js +2 -0
- package/build/docs/assets/js/main.7f815b7e.js.LICENSE.txt +51 -0
- package/build/docs/assets/js/runtime~main.f7c5bef0.js +1 -0
- package/build/docs/eslint-rules-migration/index.html +135 -0
- package/build/docs/img/favicon.ico +0 -0
- package/build/docs/img/logo.jpeg +0 -0
- package/build/docs/img/logo.svg +22 -0
- package/build/docs/img/readme.md +1 -0
- package/build/docs/index.html +179 -0
- package/build/docs/pui-cli-9-migration/index.html +180 -0
- package/build/docs/readme.md +1 -0
- package/build/docs/sitemap.xml +1 -0
- package/build/docs/ssl-certificate-setup/index.html +284 -0
- package/build/docs/stylelint-migration/index.html +57 -0
- package/build/docs/usage-guide/index.html +439 -0
- package/dist/cjs/cli.js +3 -13
- package/dist/cjs/commands/build.js +1 -2
- package/dist/cjs/commands/buildcdn.js +1 -2
- package/dist/cjs/commands/codemod.js +1 -12
- package/dist/cjs/commands/gendoc.js +1 -2
- package/dist/cjs/commands/lint.js +11 -9
- package/dist/cjs/commands/pack.js +1 -2
- package/dist/cjs/commands/skills.js +206 -0
- package/dist/cjs/commands/start.js +1 -2
- package/dist/cjs/commands/storybook.js +1 -12
- package/dist/cjs/commands/test.js +1 -13
- package/dist/cjs/commands/tscheck.js +1 -2
- package/dist/cjs/commands/utils.js +16 -12
- package/dist/cjs/commands/version.js +1 -12
- package/dist/cjs/commands/vitest.js +1 -13
- package/dist/cjs/index.cjs +13 -1
- package/dist/cjs/index.js +8 -2
- package/dist/cjs/lint-config/eslint/common.cjs +1 -1
- package/dist/cjs/lint-config/eslint/flat/common.mjs +169 -0
- package/dist/cjs/lint-config/eslint/flat/compat.mjs +27 -0
- package/dist/cjs/lint-config/eslint/flat/index.mjs +21 -0
- package/dist/cjs/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/dist/cjs/lint-config/eslint/flat/non-react.mjs +6 -0
- package/dist/cjs/lint-config/eslint/flat/presets.mjs +96 -0
- package/dist/cjs/lint-config/eslint/flat/react-export.mjs +7 -0
- package/dist/cjs/lint-config/eslint/flat/react.mjs +59 -0
- package/dist/cjs/lint-config/eslint/flat/rules.mjs +185 -0
- package/dist/cjs/lint-config/eslint/typescript/non-react.cjs +1 -1
- package/dist/cjs/lint-config/eslint/typescript/react.cjs +1 -1
- package/dist/cjs/lint-config/stylelint/config.mjs +27 -0
- package/dist/cjs/lint-config/stylelint/export.mjs +1 -0
- package/dist/cjs/lint-config/stylelint.config.cjs +3 -19
- package/dist/cjs/monorepo/utils.cjs +16 -8
- package/dist/cjs/monorepo/utils.js +5 -8
- package/dist/cjs/{release.config.cjs → release.config.mjs} +3 -2
- package/dist/cjs/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
- package/dist/cjs/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/dist/cjs/testing/jest.config.cjs +4 -4
- package/dist/cjs/testing/resolver.cjs +1 -1
- package/dist/cjs/testing/setup-react-env.js +1 -1
- package/dist/cjs/testing/vitest.config.js +2 -1
- package/dist/cjs/transpile/esbuild.js +1 -1
- package/dist/cjs/webpack/csp-plugin.js +2 -4
- package/dist/cjs/webpack/prop-types-shim.js +0 -1
- package/dist/cjs/webpack/webpack.lib.base.babel.js +0 -8
- package/dist/esm/cli.js +3 -13
- package/dist/esm/commands/build.js +1 -2
- package/dist/esm/commands/buildcdn.js +1 -2
- package/dist/esm/commands/codemod.js +1 -2
- package/dist/esm/commands/gendoc.js +1 -2
- package/dist/esm/commands/lint.js +11 -9
- package/dist/esm/commands/pack.js +1 -2
- package/dist/esm/commands/skills.js +175 -0
- package/dist/esm/commands/start.js +1 -2
- package/dist/esm/commands/storybook.js +1 -2
- package/dist/esm/commands/test.js +1 -3
- package/dist/esm/commands/tscheck.js +1 -2
- package/dist/esm/commands/utils.js +17 -13
- package/dist/esm/commands/version.js +1 -2
- package/dist/esm/commands/vitest.js +1 -3
- package/dist/esm/index.cjs +13 -1
- package/dist/esm/index.js +13 -1
- package/dist/esm/lint-config/eslint/common.cjs +1 -1
- package/dist/esm/lint-config/eslint/flat/common.mjs +169 -0
- package/dist/esm/lint-config/eslint/flat/compat.mjs +27 -0
- package/dist/esm/lint-config/eslint/flat/index.mjs +21 -0
- package/dist/esm/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/dist/esm/lint-config/eslint/flat/non-react.mjs +6 -0
- package/dist/esm/lint-config/eslint/flat/presets.mjs +96 -0
- package/dist/esm/lint-config/eslint/flat/react-export.mjs +7 -0
- package/dist/esm/lint-config/eslint/flat/react.mjs +59 -0
- package/dist/esm/lint-config/eslint/flat/rules.mjs +185 -0
- package/dist/esm/lint-config/eslint/typescript/non-react.cjs +1 -1
- package/dist/esm/lint-config/eslint/typescript/react.cjs +1 -1
- package/dist/esm/lint-config/stylelint/config.mjs +27 -0
- package/dist/esm/lint-config/stylelint/export.mjs +1 -0
- package/dist/esm/lint-config/stylelint.config.cjs +3 -19
- package/dist/esm/monorepo/utils.cjs +16 -8
- package/dist/esm/monorepo/utils.js +5 -8
- package/dist/esm/{release.config.cjs → release.config.mjs} +3 -2
- package/dist/esm/{semantic-release-plugin.cjs → semantic-release-plugin.mjs} +3 -3
- package/dist/esm/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/dist/esm/testing/jest.config.cjs +4 -4
- package/dist/esm/testing/resolver.cjs +1 -1
- package/dist/esm/testing/setup-react-env.js +1 -1
- package/dist/esm/testing/vitest.config.js +2 -1
- package/dist/esm/transpile/esbuild.js +1 -1
- package/dist/esm/webpack/csp-plugin.js +2 -4
- package/dist/esm/webpack/prop-types-shim.js +0 -1
- package/dist/esm/webpack/webpack.lib.base.babel.js +0 -8
- package/dist/types/lib/commands/build.d.ts +1 -1
- package/dist/types/lib/commands/buildcdn.d.ts +1 -1
- package/dist/types/lib/commands/codemod.d.ts +1 -1
- package/dist/types/lib/commands/gendoc.d.ts +1 -1
- package/dist/types/lib/commands/lint.d.ts +1 -1
- package/dist/types/lib/commands/pack.d.ts +1 -1
- package/dist/types/lib/commands/skills.d.ts +11 -0
- package/dist/types/lib/commands/start.d.ts +1 -1
- package/dist/types/lib/commands/storybook.d.ts +1 -1
- package/dist/types/lib/commands/test.d.ts +1 -1
- package/dist/types/lib/commands/tscheck.d.ts +1 -1
- package/dist/types/lib/commands/utils.d.ts +43 -2
- package/dist/types/lib/commands/version.d.ts +1 -1
- package/dist/types/lib/commands/vitest.d.ts +1 -1
- package/dist/types/lib/index.d.cts +6 -2
- package/dist/types/lib/index.d.ts +5 -1
- package/dist/types/lib/lint-config/eslint/flat/common.d.mts +6 -0
- package/dist/types/lib/lint-config/eslint/flat/compat.d.mts +9 -0
- package/dist/types/lib/lint-config/eslint/flat/index.d.mts +6 -0
- package/dist/types/lib/lint-config/eslint/flat/non-react-export.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/non-react.d.mts +3 -0
- package/dist/types/lib/lint-config/eslint/flat/presets.d.mts +34 -0
- package/dist/types/lib/lint-config/eslint/flat/react-export.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/react.d.mts +4 -0
- package/dist/types/lib/lint-config/eslint/flat/rules.d.mts +361 -0
- package/dist/types/lib/lint-config/stylelint/config.d.mts +3 -0
- package/dist/types/lib/lint-config/stylelint/export.d.mts +1 -0
- package/dist/types/lib/lint-config/stylelint.config.d.cts +2 -10
- package/dist/types/lib/release.config.d.mts +10 -0
- package/dist/types/lib/semantic-release-plugin.d.mts +4 -0
- package/dist/types/lib/server/appRoutes.d.ts +1 -1
- package/dist/types/lib/server/csp.d.ts +1 -1
- package/dist/types/lib/server/middlewares.d.ts +1 -1
- package/dist/types/lib/webpack/csp-plugin.d.ts +3 -3
- package/dist/types/lib/webpack/helpers.d.ts +1 -1
- package/dist/types/lib/webpack/interceptor-middleware.d.ts +2 -2
- package/dist/types/lib/webpack/webpack.base.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.lib.base.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.lib.prod.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.prod.babel.d.ts +1 -1
- package/dist/types/lib/webpack/webpack.storybook.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/lib/lint-config/commitlint.config.cjs +1 -0
- package/lib/lint-config/eslint/common.cjs +164 -0
- package/lib/lint-config/eslint/flat/common.mjs +169 -0
- package/lib/lint-config/eslint/flat/compat.mjs +27 -0
- package/lib/lint-config/eslint/flat/index.mjs +21 -0
- package/lib/lint-config/eslint/flat/non-react-export.mjs +10 -0
- package/lib/lint-config/eslint/flat/non-react.mjs +6 -0
- package/lib/lint-config/eslint/flat/presets.mjs +96 -0
- package/lib/lint-config/eslint/flat/react-export.mjs +7 -0
- package/lib/lint-config/eslint/flat/react.mjs +59 -0
- package/lib/lint-config/eslint/flat/rules.mjs +185 -0
- package/lib/lint-config/eslint/non-react.cjs +14 -0
- package/lib/lint-config/eslint/react.cjs +26 -0
- package/lib/lint-config/eslint/typescript/common.cjs +49 -0
- package/lib/lint-config/eslint/typescript/non-react.cjs +12 -0
- package/lib/lint-config/eslint/typescript/react.cjs +19 -0
- package/lib/lint-config/lint-staged.config.js +15 -0
- package/lib/lint-config/prettier.config.cjs +8 -0
- package/lib/lint-config/stylelint/config.mjs +27 -0
- package/lib/lint-config/stylelint/export.mjs +1 -0
- package/lib/lint-config/stylelint.config.cjs +3 -0
- package/lib/release.config.mjs +28 -0
- package/lib/semantic-release-plugin.mjs +30 -0
- package/lib/skills/migrate-to-pui-cli-9/SKILL.md +309 -0
- package/library.tsconfig.json +1 -1
- package/package.json +95 -90
- package/dist/types/lib/release.config.d.cts +0 -7
- package/dist/types/lib/semantic-release-plugin.d.cts +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @type {import('stylelint').Config} */
|
|
2
|
+
export const stylelintConfig = {
|
|
3
|
+
ignoreFiles: [
|
|
4
|
+
'/dist/**/*',
|
|
5
|
+
'/coverage/**/*',
|
|
6
|
+
'/build/**/*',
|
|
7
|
+
'/reports/**/*',
|
|
8
|
+
'/temp/**/*',
|
|
9
|
+
'/docs/**/*',
|
|
10
|
+
'/demo/**/*',
|
|
11
|
+
'/node_modules/**/*',
|
|
12
|
+
'/vendor/**/*',
|
|
13
|
+
],
|
|
14
|
+
customSyntax: 'postcss-styled-syntax',
|
|
15
|
+
extends: ['stylelint-config-recommended'],
|
|
16
|
+
rules: {
|
|
17
|
+
'selector-type-no-unknown': null,
|
|
18
|
+
'function-no-unknown': null,
|
|
19
|
+
// Formerly from stylelint-config-styled-components (unmaintained; references
|
|
20
|
+
// removed rules like no-missing-end-of-source-newline in Stylelint 17).
|
|
21
|
+
'value-no-vendor-prefix': true,
|
|
22
|
+
'property-no-vendor-prefix': true,
|
|
23
|
+
'no-empty-source': null,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default stylelintConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { stylelintConfig, default } from './config.mjs';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"/coverage/**/*",
|
|
5
|
-
"/build/**/*",
|
|
6
|
-
"/reports/**/*",
|
|
7
|
-
"/temp/**/*",
|
|
8
|
-
"/docs/**/*",
|
|
9
|
-
"/demo/**/*",
|
|
10
|
-
"/node_modules/**/*",
|
|
11
|
-
"/vendor/**/*",
|
|
12
|
-
],
|
|
13
|
-
customSyntax: "postcss-styled-syntax",
|
|
14
|
-
extends: [
|
|
15
|
-
"stylelint-config-recommended",
|
|
16
|
-
"stylelint-config-styled-components",
|
|
17
|
-
],
|
|
18
|
-
rules: { "selector-type-no-unknown": null, "function-no-unknown": null },
|
|
19
|
-
};
|
|
1
|
+
const { stylelintConfig } = require('./stylelint/export.mjs');
|
|
2
|
+
|
|
3
|
+
exports.stylelintConfig = stylelintConfig;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
-
const {
|
|
2
|
+
const { execFileSync } = require('child_process');
|
|
3
3
|
|
|
4
4
|
const WORKSPACE_DIR_ENV_VAR = 'NPM_CONFIG_WORKSPACE_DIR';
|
|
5
5
|
const WORKSPACE_MANIFEST_FILENAME = 'pnpm-workspace.yaml';
|
|
6
6
|
|
|
7
|
+
const findUpCli = path.join(
|
|
8
|
+
path.dirname(require.resolve('find-up-cli/package.json')),
|
|
9
|
+
'cli.js',
|
|
10
|
+
);
|
|
11
|
+
|
|
7
12
|
const getPNPMWorkspaceLocation = (cwd) => {
|
|
8
|
-
let location = null;
|
|
9
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
10
13
|
for (const fileName of [WORKSPACE_MANIFEST_FILENAME, 'pnpm-workspace.yml']) {
|
|
11
14
|
try {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
const location = execFileSync(
|
|
16
|
+
process.execPath,
|
|
17
|
+
[findUpCli, fileName, `--cwd=${cwd}`],
|
|
18
|
+
{ encoding: 'utf8' },
|
|
19
|
+
).trim();
|
|
20
|
+
if (location) {
|
|
21
|
+
return location;
|
|
22
|
+
}
|
|
23
|
+
} catch {
|
|
16
24
|
// ignore
|
|
17
25
|
}
|
|
18
26
|
}
|
|
19
|
-
return
|
|
27
|
+
return null;
|
|
20
28
|
};
|
|
21
29
|
|
|
22
30
|
exports.findMonoRepoRoot = (cwd = process.cwd()) => {
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import {
|
|
2
|
+
import { findUpSync } from "find-up";
|
|
3
3
|
const WORKSPACE_DIR_ENV_VAR = "NPM_CONFIG_WORKSPACE_DIR";
|
|
4
4
|
const WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml";
|
|
5
5
|
const getPNPMWorkspaceLocation = (cwd) => {
|
|
6
|
-
let location = null;
|
|
7
6
|
for (const fileName of [WORKSPACE_MANIFEST_FILENAME, "pnpm-workspace.yml"]) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
location
|
|
11
|
-
break;
|
|
12
|
-
} catch (err) {
|
|
7
|
+
const location = findUpSync(fileName, { cwd });
|
|
8
|
+
if (location) {
|
|
9
|
+
return location;
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
return
|
|
12
|
+
return null;
|
|
16
13
|
};
|
|
17
14
|
const findMonoRepoRoot = (cwd = process.cwd()) => {
|
|
18
15
|
const workspaceManifestDirEnvVar = process.env[WORKSPACE_DIR_ENV_VAR] ?? process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @type {import('semantic-release').GlobalConfig} */
|
|
2
|
+
export default {
|
|
2
3
|
branches: [
|
|
3
4
|
'+([0-9])?(.{+([0-9]),x}).x',
|
|
4
5
|
'master',
|
|
@@ -21,7 +22,7 @@ module.exports = {
|
|
|
21
22
|
},
|
|
22
23
|
],
|
|
23
24
|
'@semantic-release/npm',
|
|
24
|
-
'./semantic-release-plugin.
|
|
25
|
+
'./semantic-release-plugin.mjs',
|
|
25
26
|
'@semantic-release/github',
|
|
26
27
|
],
|
|
27
28
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Semantic Release plugin to write publish info and set dist tag
|
|
6
6
|
* @see https://semantic-release.gitbook.io/semantic-release/developer-guide/plugin
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
export default {
|
|
9
9
|
success: async (pluginConfig, context) => {
|
|
10
10
|
const { nextRelease, logger } = context;
|
|
11
11
|
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-to-pui-cli-9
|
|
3
|
+
description: >-
|
|
4
|
+
Migrate a PUI app or library to pui-cli 9 (Node 24, pnpm 11, ESLint 10 flat config, Stylelint 17,
|
|
5
|
+
Husky 9, Vitest 4, semantic-release 25, Lerna 9, Nx 22). Use when upgrading @elliemae/pui-cli,
|
|
6
|
+
migrating from .eslintrc.cjs to eslint.config.mjs, release.config.cjs to release.config.mjs,
|
|
7
|
+
upgrading Husky 8 hooks, fixing Vitest 4 / coverage-v8 breakages, migrating monorepo nx.json from
|
|
8
|
+
@nrwl/workspace to nx 22, or adopting shared configs from pui-cli. App/library production builds
|
|
9
|
+
stay on Webpack.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Migrate to pui-cli 9
|
|
13
|
+
|
|
14
|
+
Upgrades a PUI repo from pui-cli 8 (ESLint 8 + `.eslintrc.cjs`) to pui-cli 9
|
|
15
|
+
(ESLint 10 + `eslint.config.mjs` + Node 24 + pnpm 11). Production bundling remains Webpack;
|
|
16
|
+
Vitest 4 uses Vite only as the test runner when you run `pui-cli vitest`.
|
|
17
|
+
|
|
18
|
+
## Pre-flight: Toolchain
|
|
19
|
+
|
|
20
|
+
| Requirement | Version |
|
|
21
|
+
| ------------------- | --------------------------------- |
|
|
22
|
+
| Node.js | **24** (see repo `.node-version`) |
|
|
23
|
+
| pnpm | **11** |
|
|
24
|
+
| `@elliemae/pui-cli` | **9.x** (alpha/beta until GA) |
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
fnm use 24 # or nvm/volta equivalent
|
|
28
|
+
corepack enable
|
|
29
|
+
pnpm install
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Migration steps (phased PRs recommended)
|
|
33
|
+
|
|
34
|
+
### Phase 1 — Toolchain only
|
|
35
|
+
|
|
36
|
+
1. Update `.node-version` to `24` if needed.
|
|
37
|
+
2. Ensure CI Jenkins/docker images use Node 24.
|
|
38
|
+
3. Upgrade pnpm to 11 (`packageManager` field in root `package.json`).
|
|
39
|
+
4. Run `pnpm install`, `pnpm test`, `pnpm run build` — fix any Node/pnpm breakages only.
|
|
40
|
+
|
|
41
|
+
### Phase 2 — Bump pui-cli
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pnpm add -D @elliemae/pui-cli@9
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Re-run install and smoke-test build/test without ESLint changes yet if the bump is large.
|
|
48
|
+
|
|
49
|
+
### Phase 3 — ESLint 10 flat config
|
|
50
|
+
|
|
51
|
+
**React apps and libraries:**
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
// eslint.config.mjs
|
|
55
|
+
import { eslintFlatConfig } from '@elliemae/pui-cli/eslint';
|
|
56
|
+
|
|
57
|
+
export default eslintFlatConfig;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Node / TS services (non-React):**
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
// eslint.config.mjs
|
|
64
|
+
import { eslintFlatBaseConfig } from '@elliemae/pui-cli/eslint';
|
|
65
|
+
|
|
66
|
+
export default eslintFlatBaseConfig;
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then:
|
|
70
|
+
|
|
71
|
+
1. Delete `.eslintrc.cjs` and `.eslintignore` (ignores are in the shared config).
|
|
72
|
+
2. Run `pnpm exec pui-cli lint --fix`.
|
|
73
|
+
3. Run `pnpm exec pui-cli lint` until **zero errors** (warnings may remain).
|
|
74
|
+
|
|
75
|
+
**Strict mode** (only after default config is clean):
|
|
76
|
+
|
|
77
|
+
```js
|
|
78
|
+
import { eslintFlatConfigStrict } from '@elliemae/pui-cli/eslint';
|
|
79
|
+
export default eslintFlatConfigStrict;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Phase 4 — Repo-specific overrides (if needed)
|
|
83
|
+
|
|
84
|
+
Add overrides **after** importing the shared config only when lint debt blocks the migration:
|
|
85
|
+
|
|
86
|
+
```js
|
|
87
|
+
import { eslintFlatConfig } from '@elliemae/pui-cli/eslint';
|
|
88
|
+
|
|
89
|
+
export default [
|
|
90
|
+
...eslintFlatConfig,
|
|
91
|
+
{
|
|
92
|
+
rules: {
|
|
93
|
+
// Temporary: legacy had ~100 no-explicit-any warnings via @typescript-eslint v5
|
|
94
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
];
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Remove overrides in a follow-up debt PR. Do not copy Airbnb or legacy `.eslintrc` rules.
|
|
101
|
+
|
|
102
|
+
### Phase 5 — Husky 9 (if `.husky/` exists)
|
|
103
|
+
|
|
104
|
+
Skip this phase if the repo has no git hooks. Most PUI apps/libs copied hooks from pui-cli boilerplate and still use Husky 8.
|
|
105
|
+
|
|
106
|
+
1. Upgrade and remove deprecated package:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm add -D husky@9
|
|
110
|
+
pnpm remove husky-init # if present
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
2. Update `package.json` `prepare` script:
|
|
114
|
+
|
|
115
|
+
```diff
|
|
116
|
+
- "prepare": "[ -n \"$CI\" ] || husky install"
|
|
117
|
+
+ "prepare": "[ -n \"$CI\" ] || husky"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. Simplify each hook in `.husky/` — remove the shebang and `husky.sh` source. Keep only the command(s):
|
|
121
|
+
|
|
122
|
+
**`.husky/pre-commit`** (typical PUI repo):
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
pnpm -s dlx lint-staged
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**`.husky/commit-msg`** (if commitlint is enabled):
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
pnpm exec commitlint --edit $1
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```diff
|
|
135
|
+
- #!/bin/sh
|
|
136
|
+
- . "$(dirname "$0")/_/husky.sh"
|
|
137
|
+
-
|
|
138
|
+
pnpm -s dlx lint-staged
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
4. Delete `.husky/.gitignore` if present (Husky 9 regenerates `.husky/_` on install).
|
|
142
|
+
|
|
143
|
+
5. Run `pnpm prepare`, then verify hooks with a test commit.
|
|
144
|
+
|
|
145
|
+
**Environment variable changes (Husky 9):**
|
|
146
|
+
|
|
147
|
+
| Husky 8 | Husky 9 |
|
|
148
|
+
| ----------------------------------------- | ------------- |
|
|
149
|
+
| `HUSKY_SKIP_HOOKS` / `HUSKY_SKIP_INSTALL` | `HUSKY=0` |
|
|
150
|
+
| `HUSKY_GIT_PARAMS` in commit-msg hooks | `$1`, `$2`, … |
|
|
151
|
+
|
|
152
|
+
Reference hooks: [pui-cli/.husky](https://git.elliemae.io/platform-ui/pui-cli/tree/master/.husky)
|
|
153
|
+
|
|
154
|
+
### Phase 6 — Stylelint 17 (if CSS / styled-components)
|
|
155
|
+
|
|
156
|
+
1. Simplify `stylelint.config.cjs` — remove `stylelint-config-styled-components` workarounds.
|
|
157
|
+
2. Optional ESM: `stylelint.config.mjs` importing `@elliemae/pui-cli/stylelint`.
|
|
158
|
+
3. Run `pnpm exec pui-cli lint` (CSS pass).
|
|
159
|
+
|
|
160
|
+
See [stylelint-migration.md](https://docs.pui.mortgagetech.q1.ice.com/cli/stylelint-migration) in pui-cli docs.
|
|
161
|
+
|
|
162
|
+
### Phase 7 — Vitest 4 (if using `pui-cli vitest`)
|
|
163
|
+
|
|
164
|
+
Skip if the repo uses Jest (`pui-cli test`) only.
|
|
165
|
+
|
|
166
|
+
1. Align devDependencies with pui-cli 9 (Vitest 4 stack):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pnpm add -D vitest@4 @vitest/coverage-v8@4 vite@8 @vitejs/plugin-react@6 vite-tsconfig-paths@6
|
|
170
|
+
pnpm remove @vitest/coverage-c8 @types/uuid # when upgrading uuid to 14+
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
2. Prefer extending shared config:
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
177
|
+
import { vitestConfig } from '@elliemae/pui-cli/vitest';
|
|
178
|
+
|
|
179
|
+
export default mergeConfig(
|
|
180
|
+
vitestConfig,
|
|
181
|
+
defineConfig({
|
|
182
|
+
test: {
|
|
183
|
+
/* overrides */
|
|
184
|
+
},
|
|
185
|
+
}),
|
|
186
|
+
);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
3. Update custom Vitest 1.x options:
|
|
190
|
+
|
|
191
|
+
| Old | New |
|
|
192
|
+
| ------------------------- | ---------------------------- |
|
|
193
|
+
| `test.deps.optimizer.web` | `test.deps.optimizer.client` |
|
|
194
|
+
| `@vitest/coverage-c8` | `@vitest/coverage-v8` |
|
|
195
|
+
|
|
196
|
+
4. If `tsconfig.json` extends `@elliemae/pui-cli/app.tsconfig.json` or `library.tsconfig.json`, ensure pui-cli 9 is installed — shared tsconfigs use `moduleResolution: "bundler"`. Custom tsconfigs importing `vitest/config` may need the same.
|
|
197
|
+
|
|
198
|
+
5. Smoke-test: `pnpm exec pui-cli vitest --passWithNoTests`
|
|
199
|
+
|
|
200
|
+
### Phase 8 — semantic-release 25 (libraries that publish to npm)
|
|
201
|
+
|
|
202
|
+
Skip if the repo does not run `semantic-release` (most apps). Libraries with `release.config.cjs` extending `@elliemae/pui-cli/releaseConfig` must migrate — pui-cli 9 exports an ESM shareable config; semantic-release 25 loads ESM `extends` via dynamic `import()`.
|
|
203
|
+
|
|
204
|
+
1. Upgrade local pins if present:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
pnpm add -D semantic-release@25 @semantic-release/changelog@6 @semantic-release/exec@7 @semantic-release/git@10
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
2. Replace `release.config.cjs` with `release.config.mjs`:
|
|
211
|
+
|
|
212
|
+
```javascript
|
|
213
|
+
/** @type {import('semantic-release').GlobalConfig} */
|
|
214
|
+
export default {
|
|
215
|
+
extends: '@elliemae/pui-cli/releaseConfig',
|
|
216
|
+
};
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
3. Delete `release.config.cjs`.
|
|
220
|
+
|
|
221
|
+
4. Custom plugins: use relative `.mjs` paths with `export default`, or keep `.cjs` plugins by path.
|
|
222
|
+
|
|
223
|
+
5. Dry-run: `pnpm exec semantic-release --dry-run`
|
|
224
|
+
|
|
225
|
+
### Phase 9 — Lerna 9 and Nx 22 (monorepos only)
|
|
226
|
+
|
|
227
|
+
Skip for single-package apps/libs. Applies to repos with `lerna.json`, `nx.json`, and `libs/*` workspaces.
|
|
228
|
+
|
|
229
|
+
1. After `@elliemae/pui-cli@9` is installed, confirm CLIs:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pnpm install
|
|
233
|
+
pnpm exec nx --version # 22.x
|
|
234
|
+
pnpm exec lerna --version # 9.x
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
2. Remove legacy pins if present (`@nrwl/cli`, `@nrwl/tao`, `@nrwl/workspace`, direct `lerna`/`nx`).
|
|
238
|
+
|
|
239
|
+
3. Migrate `nx.json`:
|
|
240
|
+
- `extends`: `@nrwl/workspace/presets/npm.json` → `nx/presets/npm.json`
|
|
241
|
+
- Add `$schema`: `./node_modules/nx/schemas/nx-schema.json`
|
|
242
|
+
- Replace `targetDependencies` with `targetDefaults.<target>.dependsOn` (use `^target` for dependency projects)
|
|
243
|
+
- Remove `tasksRunnerOptions`; move cacheable targets to `"cache": true` in `targetDefaults`
|
|
244
|
+
- Optional: `pnpm exec nx migrate latest && pnpm exec nx migrate --run-migrations`
|
|
245
|
+
|
|
246
|
+
4. Lerna 9: stop using `lerna bootstrap` / `lerna add` / `lerna link` — use pnpm workspaces. Keep existing `lerna.json` unless it referenced removed commands. `pui-cli version` unchanged.
|
|
247
|
+
|
|
248
|
+
5. Smoke-test:
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
pnpm exec nx run-many --target=build --all --parallel
|
|
252
|
+
pnpm exec nx affected --target=lint --uncommitted
|
|
253
|
+
pnpm exec pui-cli lint
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
See [pui-cli 9 migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/pui-cli-9-migration) — **Lerna 9 and Nx 22** section for the full `nx.json` template.
|
|
257
|
+
|
|
258
|
+
### Phase 10 — Verify
|
|
259
|
+
|
|
260
|
+
- [ ] `pnpm exec pui-cli lint` — 0 errors
|
|
261
|
+
- [ ] `pnpm exec pui-cli tscheck --files`
|
|
262
|
+
- [ ] `pnpm test` (or `pui-cli vitest` if applicable)
|
|
263
|
+
- [ ] `pnpm run build` (or `pui-cli build`) — Webpack, unchanged
|
|
264
|
+
- [ ] Pre-commit / lint-staged passes (after Husky 9 migration if applicable)
|
|
265
|
+
- [ ] Monorepos: `nx run-many --target=build --all` and `pui-cli version --help`
|
|
266
|
+
- [ ] CI green on the target branch
|
|
267
|
+
|
|
268
|
+
## Common lint fixes after upgrade
|
|
269
|
+
|
|
270
|
+
| Symptom | Fix |
|
|
271
|
+
| ------------------------------------ | ----------------------------------------------------------------------------------- |
|
|
272
|
+
| `import-x/no-unresolved` | Use `import type` for type-only imports |
|
|
273
|
+
| `@typescript-eslint/no-explicit-any` | Type the value or add targeted override (warn) during transition |
|
|
274
|
+
| `@typescript-eslint/no-unused-vars` | Remove or prefix with `_` |
|
|
275
|
+
| Stale `eslint-disable` comments | Remove disables for rules no longer in config |
|
|
276
|
+
| Test/fixture files flagged | Shared config includes `lib/**/tests/**` globs — ensure pui-cli 9.0.0+ |
|
|
277
|
+
| `.d.ts` files | pui-cli turns off `no-explicit-any` for `**/*.d.ts` |
|
|
278
|
+
| Cannot find module `vite` in tscheck | Set `moduleResolution: "bundler"` or extend pui-cli 9 tsconfig |
|
|
279
|
+
| Vitest `optimizer.web` unknown | Rename to `test.deps.optimizer.client` (Vitest 4) |
|
|
280
|
+
| Coverage fails after upgrade | Remove `@vitest/coverage-c8`; use `@vitest/coverage-v8@4` |
|
|
281
|
+
| `release.config.cjs` extends fails | Migrate to `release.config.mjs`; requires semantic-release 22+ (pui-cli 9 ships 25) |
|
|
282
|
+
| `nx` fails after pui-cli 9 bump | Migrate `nx.json` off `@nrwl/*`; use `targetDefaults` not `targetDependencies` |
|
|
283
|
+
| `lerna bootstrap` / `add` / `link` | Removed in lerna 9 — use `pnpm` workspaces and `pnpm add --filter` |
|
|
284
|
+
| Stale `@nrwl/workspace` in lockfile | Remove direct `@nrwl/*` pins; rely on pui-cli's `nx` + `@nx/workspace` |
|
|
285
|
+
|
|
286
|
+
Full rule comparison: [eslint-rules-migration.md](https://docs.pui.mortgagetech.q1.ice.com/cli/eslint-rules-migration) (also at `docs/eslint-rules-migration.md` in pui-cli).
|
|
287
|
+
|
|
288
|
+
## Install this skill in Cursor
|
|
289
|
+
|
|
290
|
+
From the consumer repo (after `@elliemae/pui-cli` is installed):
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
pnpm exec pui-cli skills install migrate-to-pui-cli-9 --target all
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Skills are copied to `.cursor/skills/`, `.claude/skills/`, and `.github/skills/` for Cursor, Claude Code, and GitHub Copilot.
|
|
297
|
+
|
|
298
|
+
## What NOT to change
|
|
299
|
+
|
|
300
|
+
- Application business logic — migration is tooling/config only
|
|
301
|
+
- Webpack/babel production build config — pui-cli 9 does not migrate apps to Vite for bundling
|
|
302
|
+
- Prettier / commitlint configs unless pui-cli 9 bumps those presets
|
|
303
|
+
|
|
304
|
+
## Additional resources
|
|
305
|
+
|
|
306
|
+
- [pui-cli 9 migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/pui-cli-9-migration)
|
|
307
|
+
- [ESLint rules migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/eslint-rules-migration)
|
|
308
|
+
- [Stylelint migration guide](https://docs.pui.mortgagetech.q1.ice.com/cli/stylelint-migration)
|
|
309
|
+
- Reference one-liner: `pui-react-boilerplate/eslint.config.mjs`
|
|
@@ -6,11 +6,11 @@ const { findMonoRepoRoot } = require('../monorepo/utils.cjs');
|
|
|
6
6
|
|
|
7
7
|
let isReactModule = true;
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
require('react');
|
|
11
11
|
require('styled-components');
|
|
12
|
-
|
|
13
|
-
} catch
|
|
12
|
+
|
|
13
|
+
} catch {
|
|
14
14
|
isReactModule = false;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -89,7 +89,7 @@ const jestConfig = {
|
|
|
89
89
|
'^.+\\.[jt]sx?$': ['@swc/jest', swcrcConfig],
|
|
90
90
|
},
|
|
91
91
|
transformIgnorePatterns: [
|
|
92
|
-
// eslint-disable-next-line
|
|
92
|
+
// eslint-disable-next-line no-useless-escape
|
|
93
93
|
'/node_modules/(?!(\@elliemae\/pui-cli|lodash-es|react-select|react-dates|d3|internmap|delaunator|robust-predicates))/',
|
|
94
94
|
],
|
|
95
95
|
globals: {
|
|
@@ -32,7 +32,7 @@ module.exports = (request, options) => {
|
|
|
32
32
|
}
|
|
33
33
|
const resolution = resolutions.find(({ matcher }) => matcher.test(request));
|
|
34
34
|
if (resolution) {
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
for (const extension of resolution.extensions) {
|
|
37
37
|
try {
|
|
38
38
|
return resolver(
|
|
@@ -14,11 +14,12 @@ const vitestConfig = defineConfig({
|
|
|
14
14
|
include: ["./{app,lib}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
15
15
|
exclude: [...configDefaults.exclude, ".idea", ".git", ".cache", "e2e"],
|
|
16
16
|
coverage: {
|
|
17
|
+
provider: "v8",
|
|
17
18
|
reportsDirectory: "./reports/coverage"
|
|
18
19
|
},
|
|
19
20
|
deps: {
|
|
20
21
|
optimizer: {
|
|
21
|
-
|
|
22
|
+
client: {
|
|
22
23
|
include: ["app.config.json", "@elliemae/pui-app-sdk"]
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -30,7 +30,7 @@ const copyFiles = async ({ srcdir, outdir }) => {
|
|
|
30
30
|
const files = await fg([
|
|
31
31
|
`${srcdir}/**/*.*`,
|
|
32
32
|
`${srcdir}/**/.swcrc`,
|
|
33
|
-
`!${srcdir}/**/*.{js,jsx,ts,tsx
|
|
33
|
+
`!${srcdir}/**/*.{js,jsx,ts,tsx}`
|
|
34
34
|
]);
|
|
35
35
|
await Promise.all(
|
|
36
36
|
files.map(async (srcFilePath) => {
|
|
@@ -5,14 +5,12 @@ const defaultOptions = {
|
|
|
5
5
|
};
|
|
6
6
|
class CspPlugin {
|
|
7
7
|
#options = defaultOptions;
|
|
8
|
-
#htmlWebpackPlugin;
|
|
9
8
|
/**
|
|
10
9
|
*
|
|
11
|
-
* @param
|
|
10
|
+
* @param _htmlWebpackPlugin
|
|
12
11
|
* @param {object} options Additional options for this module.
|
|
13
12
|
*/
|
|
14
|
-
constructor(
|
|
15
|
-
this.#htmlWebpackPlugin = htmlWebpackPlugin;
|
|
13
|
+
constructor(_htmlWebpackPlugin, options) {
|
|
16
14
|
this.#options = { ...this.#options, ...options ?? {} };
|
|
17
15
|
}
|
|
18
16
|
/**
|
|
@@ -41,13 +41,11 @@ const plugins = [
|
|
|
41
41
|
new webpack.DefinePlugin({
|
|
42
42
|
APP_CONFIG: getAppConfig()
|
|
43
43
|
}),
|
|
44
|
-
/* eslint-disable indent */
|
|
45
44
|
...copyPluginPatterns.length > 0 ? [
|
|
46
45
|
new CopyWebpackPlugin({
|
|
47
46
|
patterns: copyPluginPatterns
|
|
48
47
|
})
|
|
49
48
|
] : [],
|
|
50
|
-
/* eslint-enable indent */
|
|
51
49
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
52
50
|
maxChunks: 1
|
|
53
51
|
}),
|
|
@@ -69,7 +67,6 @@ const baseConfig = (options) => ({
|
|
|
69
67
|
// Merge with env dependent settings
|
|
70
68
|
optimization: options.optimization,
|
|
71
69
|
module: {
|
|
72
|
-
/* eslint-disable indent */
|
|
73
70
|
...process.env.KEEP_IMPORT_META === "true" ? {
|
|
74
71
|
parser: {
|
|
75
72
|
javascript: {
|
|
@@ -77,7 +74,6 @@ const baseConfig = (options) => ({
|
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
76
|
} : {},
|
|
80
|
-
/* eslint-enable indent */
|
|
81
77
|
rules: [
|
|
82
78
|
{
|
|
83
79
|
test: /^(?!.*\.exec\.js$).*\.jsx?$/,
|
|
@@ -90,13 +86,11 @@ const baseConfig = (options) => ({
|
|
|
90
86
|
loader: "esbuild-loader",
|
|
91
87
|
options: {
|
|
92
88
|
target: browserslistToEsbuild(),
|
|
93
|
-
/* eslint-disable indent */
|
|
94
89
|
...process.env.KEEP_IMPORT_META === "true" ? {
|
|
95
90
|
supported: {
|
|
96
91
|
"import-meta": true
|
|
97
92
|
}
|
|
98
93
|
} : {}
|
|
99
|
-
/* eslint-enable indent */
|
|
100
94
|
}
|
|
101
95
|
}
|
|
102
96
|
},
|
|
@@ -111,13 +105,11 @@ const baseConfig = (options) => ({
|
|
|
111
105
|
loader: "esbuild-loader",
|
|
112
106
|
options: {
|
|
113
107
|
target: browserslistToEsbuild(),
|
|
114
|
-
/* eslint-disable indent */
|
|
115
108
|
...process.env.KEEP_IMPORT_META === "true" ? {
|
|
116
109
|
supported: {
|
|
117
110
|
"import-meta": true
|
|
118
111
|
}
|
|
119
112
|
} : {}
|
|
120
|
-
/* eslint-enable indent */
|
|
121
113
|
}
|
|
122
114
|
}
|
|
123
115
|
},
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommandModule } from 'yargs';
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
2
|
export declare const buildCDNCmd: CommandModule<Record<string, never>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CommandModule } from 'yargs';
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
2
|
export declare const gendocCmd: CommandModule<Record<string, never>, Record<string, never>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CommandModule } from 'yargs';
|
|
2
|
+
type SkillTarget = 'cursor' | 'claude' | 'copilot';
|
|
3
|
+
type TargetOption = SkillTarget | 'all';
|
|
4
|
+
type Arguments = {
|
|
5
|
+
action: 'install' | 'list';
|
|
6
|
+
name?: string;
|
|
7
|
+
force?: boolean;
|
|
8
|
+
target?: TargetOption | TargetOption[];
|
|
9
|
+
};
|
|
10
|
+
export declare const skillsCmd: CommandModule<Record<string, never>, Arguments>;
|
|
11
|
+
export {};
|