@elliemae/pui-cli 7.0.0-alpha.1 → 7.0.0-alpha.12
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/{lib/babel/babel.config.js → dist/cjs/babel.config.cjs} +2 -6
- package/dist/cjs/cli.js +49 -0
- package/dist/cjs/commands/build.js +72 -0
- package/dist/cjs/commands/codemod.js +51 -0
- package/dist/cjs/commands/gendoc.js +52 -0
- package/dist/cjs/commands/lint.js +86 -0
- package/dist/cjs/commands/pack.js +88 -0
- package/dist/cjs/commands/start.js +61 -0
- package/dist/cjs/commands/storybook.js +63 -0
- package/dist/cjs/commands/test.js +86 -0
- package/dist/cjs/commands/tscheck.js +85 -0
- package/dist/cjs/commands/utils.js +137 -0
- package/dist/cjs/commands/version.js +71 -0
- package/dist/cjs/commands/vitest.js +87 -0
- package/{lib/dummy.ts → dist/cjs/dummy.js} +0 -0
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/index.js +41 -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 +37 -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 +57 -0
- package/dist/cjs/monorepo/set-registry-version.js +43 -0
- package/dist/cjs/monorepo/set-workspace-version.js +44 -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 +40 -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 +88 -0
- package/dist/cjs/server/index.js +30 -0
- package/dist/cjs/server/logger.js +50 -0
- package/dist/cjs/server/middlewares.js +68 -0
- package/dist/cjs/server/utils.js +32 -0
- package/{lib/testing/jest.config.js → dist/cjs/testing/jest.config.cjs} +6 -9
- package/{lib/testing/jest.node.config.js → dist/cjs/testing/jest.node.config.cjs} +1 -1
- package/dist/cjs/testing/mocks/axios.js +37 -0
- package/dist/cjs/testing/mocks/cssModule.js +23 -0
- package/dist/cjs/testing/mocks/html.js +23 -0
- package/dist/cjs/testing/mocks/image.js +23 -0
- package/dist/cjs/testing/mocks/matchMedia.js +43 -0
- package/dist/cjs/testing/mocks/pui-app-loader.js +24 -0
- package/dist/cjs/testing/mocks/pui-diagnostics.js +68 -0
- package/dist/cjs/testing/mocks/pui-user-monitoring.js +30 -0
- package/dist/cjs/testing/mocks/retry-axios.js +27 -0
- package/dist/cjs/testing/mocks/svg.js +29 -0
- package/dist/cjs/testing/mocks/webpack-hmr.js +24 -0
- package/{lib/testing/resolver.js → dist/cjs/testing/resolver.cjs} +0 -0
- package/dist/cjs/testing/setup-react-env.js +18 -0
- package/dist/cjs/testing/setup-tests.js +63 -0
- package/dist/cjs/testing/vitest.config.js +34 -0
- package/{lib/testing/vitest.setup.ts → dist/cjs/testing/vitest.setup.js} +0 -0
- package/{lib → dist/cjs}/transpile/.swcrc +0 -0
- package/dist/cjs/transpile/esbuild.js +139 -0
- package/dist/cjs/transpile/react-shim.js +26 -0
- package/{lib/transpile/swcrc.config.js → dist/cjs/transpile/swcrc.config.cjs} +1 -1
- 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 +33 -0
- package/dist/cjs/utils.cjs +23 -0
- package/dist/cjs/webpack/helpers.js +216 -0
- package/dist/cjs/webpack/webpack.base.babel.js +262 -0
- package/dist/cjs/webpack/webpack.dev.babel.js +140 -0
- package/dist/cjs/webpack/webpack.lib.base.babel.js +217 -0
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +67 -0
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +92 -0
- package/dist/cjs/webpack/webpack.prod.babel.js +139 -0
- package/dist/cjs/webpack/webpack.storybook.js +122 -0
- package/dist/esm/babel.config.cjs +97 -0
- package/dist/esm/cli.js +33 -0
- package/dist/esm/commands/build.js +56 -0
- package/dist/esm/commands/codemod.js +29 -0
- package/dist/esm/commands/gendoc.js +29 -0
- package/dist/esm/commands/lint.js +64 -0
- package/dist/esm/commands/pack.js +65 -0
- package/dist/esm/commands/start.js +38 -0
- package/dist/esm/commands/storybook.js +41 -0
- package/dist/esm/commands/test.js +64 -0
- package/dist/esm/commands/tscheck.js +65 -0
- package/dist/esm/commands/utils.js +120 -0
- package/dist/esm/commands/version.js +49 -0
- package/dist/esm/commands/vitest.js +64 -0
- package/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 +15 -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 +21 -0
- package/dist/esm/monorepo/set-workspace-version.js +22 -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 +66 -0
- package/dist/esm/server/index.js +18 -0
- package/dist/esm/server/logger.js +28 -0
- package/dist/esm/server/middlewares.js +46 -0
- package/dist/esm/server/utils.js +10 -0
- package/dist/esm/testing/jest.config.cjs +102 -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-tests.js +48 -0
- package/dist/esm/testing/vitest.config.js +15 -0
- package/dist/esm/testing/vitest.setup.js +0 -0
- package/dist/esm/transpile/.swcrc +11 -0
- package/dist/esm/transpile/esbuild.js +118 -0
- package/dist/esm/transpile/react-shim.js +4 -0
- package/dist/esm/transpile/swcrc.config.cjs +13 -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 +196 -0
- package/dist/esm/webpack/webpack.base.babel.js +248 -0
- package/dist/esm/webpack/webpack.dev.babel.js +121 -0
- package/dist/esm/webpack/webpack.lib.base.babel.js +208 -0
- package/dist/esm/webpack/webpack.lib.dev.babel.js +45 -0
- package/dist/esm/webpack/webpack.lib.prod.babel.js +70 -0
- package/dist/esm/webpack/webpack.prod.babel.js +122 -0
- package/dist/esm/webpack/webpack.storybook.js +102 -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 +35 -0
- package/dist/types/commands/tscheck.d.ts +14 -0
- package/dist/types/commands/utils.d.ts +14 -0
- package/dist/types/commands/version.d.ts +30 -0
- package/dist/types/commands/vitest.d.ts +35 -0
- package/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 +38 -0
- package/dist/types/testing/jest.node.config.d.cts +38 -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-tests.d.ts +1 -0
- package/dist/types/testing/vitest.config.d.ts +2 -0
- package/dist/types/testing/vitest.setup.d.ts +0 -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/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 +107 -0
- package/dist/types/webpack/webpack.lib.dev.babel.d.ts +91 -0
- package/dist/types/webpack/webpack.lib.prod.babel.d.ts +91 -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 +62 -53
- 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/esbuild.js +0 -116
- 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 -137
- 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,122 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
3
|
+
import { GenerateSW } from "workbox-webpack-plugin";
|
|
4
|
+
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
5
|
+
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
6
|
+
import { ESBuildMinifyPlugin } from "esbuild-loader";
|
|
7
|
+
import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
|
|
8
|
+
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
9
|
+
import { baseConfig } from "./webpack.base.babel.js";
|
|
10
|
+
import {
|
|
11
|
+
isAppLoaderEnabled,
|
|
12
|
+
getPaths,
|
|
13
|
+
isGoogleTagManagerEnabled,
|
|
14
|
+
getCompressionPlugins
|
|
15
|
+
} from "./helpers.js";
|
|
16
|
+
const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
17
|
+
const { buildPath } = getPaths(latestVersion);
|
|
18
|
+
return {
|
|
19
|
+
mode: "production",
|
|
20
|
+
entry: {
|
|
21
|
+
app: path.join(process.cwd(), "app/index")
|
|
22
|
+
},
|
|
23
|
+
output: {
|
|
24
|
+
path: buildPath,
|
|
25
|
+
publicPath: "auto",
|
|
26
|
+
filename: "latest/js/[name].[contenthash].js",
|
|
27
|
+
chunkFilename: "latest/js/[name].[contenthash].chunk.js",
|
|
28
|
+
assetModuleFilename: "latest/assets/[name].[hash][ext][query]"
|
|
29
|
+
},
|
|
30
|
+
optimization: {
|
|
31
|
+
moduleIds: "deterministic",
|
|
32
|
+
minimizer: [
|
|
33
|
+
new ESBuildMinifyPlugin({
|
|
34
|
+
target: browserslistToEsbuild(),
|
|
35
|
+
css: true
|
|
36
|
+
})
|
|
37
|
+
],
|
|
38
|
+
runtimeChunk: true,
|
|
39
|
+
splitChunks: {
|
|
40
|
+
chunks: "all",
|
|
41
|
+
cacheGroups: {
|
|
42
|
+
emui: {
|
|
43
|
+
name: "emui",
|
|
44
|
+
test: /[\\/]node_modules[\\/](@elliemae)[\\/]/,
|
|
45
|
+
priority: 1
|
|
46
|
+
},
|
|
47
|
+
vendors: {
|
|
48
|
+
name: "vendors",
|
|
49
|
+
test: /[\\/]node_modules[\\/]/
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
plugins: [
|
|
55
|
+
...getCompressionPlugins(),
|
|
56
|
+
new BundleAnalyzerPlugin({
|
|
57
|
+
analyzerMode: "static",
|
|
58
|
+
reportFilename: path.join(process.cwd(), "reports/bundle-stats.html"),
|
|
59
|
+
openAnalyzer: false
|
|
60
|
+
}),
|
|
61
|
+
new GenerateSW({
|
|
62
|
+
swDest: "sw.js",
|
|
63
|
+
clientsClaim: true,
|
|
64
|
+
skipWaiting: true
|
|
65
|
+
})
|
|
66
|
+
],
|
|
67
|
+
devtool: "source-map",
|
|
68
|
+
performance: {
|
|
69
|
+
assetFilter: (assetFilename) => !/(\.map$)|(^(main\.|favicon\.))/.test(assetFilename)
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
const {
|
|
74
|
+
userMonScriptPath,
|
|
75
|
+
globalScriptPath,
|
|
76
|
+
appLoaderScriptPath,
|
|
77
|
+
diagnosticsScriptPath,
|
|
78
|
+
encwLoaderScriptPath,
|
|
79
|
+
basePath
|
|
80
|
+
} = getPaths();
|
|
81
|
+
const htmlWebpackPlugin = new HtmlWebpackPlugin({
|
|
82
|
+
inject: !isAppLoaderEnabled(),
|
|
83
|
+
template: !isAppLoaderEnabled() ? "app/index.html" : "app/index-app-loader.html",
|
|
84
|
+
minify: {
|
|
85
|
+
removeComments: true,
|
|
86
|
+
collapseWhitespace: true,
|
|
87
|
+
removeRedundantAttributes: true,
|
|
88
|
+
useShortDoctype: true,
|
|
89
|
+
removeEmptyAttributes: true,
|
|
90
|
+
removeStyleLinkTypeAttributes: true,
|
|
91
|
+
keepClosingSlash: true,
|
|
92
|
+
minifyJS: true,
|
|
93
|
+
minifyCSS: true,
|
|
94
|
+
minifyURLs: true
|
|
95
|
+
},
|
|
96
|
+
emui: {
|
|
97
|
+
appVersion: "latest",
|
|
98
|
+
basePath,
|
|
99
|
+
globalScriptPath,
|
|
100
|
+
userMonScriptPath,
|
|
101
|
+
appLoaderScriptPath,
|
|
102
|
+
diagnosticsScriptPath,
|
|
103
|
+
encwLoaderScriptPath,
|
|
104
|
+
googleTagManager: isGoogleTagManagerEnabled()
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const config = baseConfig(getProdConfig());
|
|
108
|
+
config.plugins.push(htmlWebpackPlugin);
|
|
109
|
+
const addSMPPlugin = (webpackConfig) => {
|
|
110
|
+
const smpConfig = new SpeedMeasurePlugin({
|
|
111
|
+
disable: !process.env.MEASURE
|
|
112
|
+
}).wrap(webpackConfig);
|
|
113
|
+
smpConfig.plugins.push(new MiniCssExtractPlugin({
|
|
114
|
+
filename: "latest/css/[name].[contenthash].css",
|
|
115
|
+
chunkFilename: "latest/css/[name].[contenthash].chunk.css"
|
|
116
|
+
}));
|
|
117
|
+
return smpConfig;
|
|
118
|
+
};
|
|
119
|
+
var webpack_prod_babel_default = addSMPPlugin(config);
|
|
120
|
+
export {
|
|
121
|
+
webpack_prod_babel_default as default
|
|
122
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import webpack from "webpack";
|
|
21
|
+
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
22
|
+
import CopyWebpackPlugin from "copy-webpack-plugin";
|
|
23
|
+
import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
|
|
24
|
+
import { getAlias, getCompressionPlugins } from "./helpers.js";
|
|
25
|
+
import { isApp } from "../utils.cjs";
|
|
26
|
+
const IS_APP = isApp();
|
|
27
|
+
const CWD = process.cwd();
|
|
28
|
+
const getAdditionalPlugins = () => [
|
|
29
|
+
new webpack.EnvironmentPlugin({
|
|
30
|
+
IS_APP,
|
|
31
|
+
CWD
|
|
32
|
+
}),
|
|
33
|
+
new MiniCssExtractPlugin({
|
|
34
|
+
filename: "[name].[contenthash].css",
|
|
35
|
+
chunkFilename: "[name].[contenthash].chunk.css"
|
|
36
|
+
}),
|
|
37
|
+
new CopyWebpackPlugin({
|
|
38
|
+
patterns: [
|
|
39
|
+
{
|
|
40
|
+
from: "lib/app.config.json",
|
|
41
|
+
to: "app.config.json",
|
|
42
|
+
noErrorOnMissing: true
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
from: "app/app.config.json",
|
|
46
|
+
to: "app.config.json",
|
|
47
|
+
noErrorOnMissing: true
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
from: "public",
|
|
51
|
+
noErrorOnMissing: true
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
})
|
|
55
|
+
];
|
|
56
|
+
const getModuleRules = () => [
|
|
57
|
+
{
|
|
58
|
+
type: "asset",
|
|
59
|
+
resourceQuery: /url/
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
test: /\.svg$/i,
|
|
63
|
+
issuer: /\.[jt]sx?$/,
|
|
64
|
+
resourceQuery: /^((?!url).)*$/,
|
|
65
|
+
use: ["@svgr/webpack"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
resourceQuery: /resource/,
|
|
69
|
+
type: "asset/resource"
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
const webpackFinal = async (config, { configType }) => {
|
|
73
|
+
const isProd = configType === "PRODUCTION";
|
|
74
|
+
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.(".svg"));
|
|
75
|
+
fileLoaderRule.exclude = /\.svg$/i;
|
|
76
|
+
config.module.rules.unshift(...getModuleRules());
|
|
77
|
+
config.plugins.push(...getAdditionalPlugins());
|
|
78
|
+
if (isProd) {
|
|
79
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
80
|
+
}
|
|
81
|
+
config.resolve.alias = __spreadValues(__spreadValues({}, config.resolve.alias), getAlias());
|
|
82
|
+
config.resolve.fallback = __spreadProps(__spreadValues({}, config.resolve.fallback), { crypto: false });
|
|
83
|
+
config.resolve.extensions.push(".svg");
|
|
84
|
+
config.resolve.plugins = [
|
|
85
|
+
...config.resolve.plugins || [],
|
|
86
|
+
new ResolveTypeScriptPlugin({})
|
|
87
|
+
];
|
|
88
|
+
config.externals = config.externals || {};
|
|
89
|
+
config.externals["@elliemae/pui-user-monitoring"] = "emuiUserMonitoring";
|
|
90
|
+
config.externals["@elliemae/pui-app-loader"] = "emuiAppLoader";
|
|
91
|
+
config.externals["@elliemae/pui-diagnostics"] = "emuiDiagnostics";
|
|
92
|
+
return config;
|
|
93
|
+
};
|
|
94
|
+
const managerWebpack = async (config) => {
|
|
95
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
96
|
+
config.resolve.alias = __spreadValues(__spreadValues({}, config.resolve.alias), getAlias());
|
|
97
|
+
return config;
|
|
98
|
+
};
|
|
99
|
+
export {
|
|
100
|
+
managerWebpack,
|
|
101
|
+
webpackFinal
|
|
102
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export { config as babelConfig };
|
|
2
|
+
declare namespace config {
|
|
3
|
+
const ignore: RegExp[];
|
|
4
|
+
const sourceType: string;
|
|
5
|
+
const presets: (string | (string | {
|
|
6
|
+
modules: string | boolean;
|
|
7
|
+
targets: {
|
|
8
|
+
node: string;
|
|
9
|
+
};
|
|
10
|
+
} | {
|
|
11
|
+
modules: string | boolean;
|
|
12
|
+
useBuiltIns: string;
|
|
13
|
+
corejs: {
|
|
14
|
+
version: string;
|
|
15
|
+
proposals: boolean;
|
|
16
|
+
};
|
|
17
|
+
})[] | (string | {
|
|
18
|
+
runtime: string;
|
|
19
|
+
})[])[];
|
|
20
|
+
const plugins: (string | (string | {
|
|
21
|
+
alias: {
|
|
22
|
+
'@': string;
|
|
23
|
+
};
|
|
24
|
+
stripExtensions: never[];
|
|
25
|
+
})[] | (string | {
|
|
26
|
+
displayName: boolean;
|
|
27
|
+
})[] | (string | {
|
|
28
|
+
regenerator: boolean;
|
|
29
|
+
})[])[];
|
|
30
|
+
namespace env {
|
|
31
|
+
namespace development {
|
|
32
|
+
const plugins_1: (string | (string | {
|
|
33
|
+
displayName: boolean;
|
|
34
|
+
})[])[];
|
|
35
|
+
export { plugins_1 as plugins };
|
|
36
|
+
}
|
|
37
|
+
namespace production {
|
|
38
|
+
const plugins_2: (string | (string | {
|
|
39
|
+
displayName: boolean;
|
|
40
|
+
pure: boolean;
|
|
41
|
+
})[] | (string | {
|
|
42
|
+
exclude: string[];
|
|
43
|
+
})[])[];
|
|
44
|
+
export { plugins_2 as plugins };
|
|
45
|
+
}
|
|
46
|
+
namespace test {
|
|
47
|
+
const plugins_3: (string | (string | {
|
|
48
|
+
displayName: boolean;
|
|
49
|
+
})[] | (string | {
|
|
50
|
+
requireDirective: boolean;
|
|
51
|
+
identifiers: {
|
|
52
|
+
start: string;
|
|
53
|
+
end: string;
|
|
54
|
+
}[];
|
|
55
|
+
})[])[];
|
|
56
|
+
export { plugins_3 as plugins };
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export namespace buildCmd {
|
|
2
|
+
function handler({ service }: {
|
|
3
|
+
service?: boolean | undefined;
|
|
4
|
+
}): Promise<void>;
|
|
5
|
+
const command: string;
|
|
6
|
+
const describe: string;
|
|
7
|
+
namespace builder {
|
|
8
|
+
namespace service {
|
|
9
|
+
export const type: string;
|
|
10
|
+
const _default: boolean;
|
|
11
|
+
export { _default as default };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export namespace lintCmd {
|
|
2
|
+
function handler(argv: any): Promise<0 | -1>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace css {
|
|
7
|
+
export const alias: string;
|
|
8
|
+
export const type: string;
|
|
9
|
+
const _default: boolean;
|
|
10
|
+
export { _default as default };
|
|
11
|
+
}
|
|
12
|
+
namespace js {
|
|
13
|
+
const alias_1: string;
|
|
14
|
+
export { alias_1 as alias };
|
|
15
|
+
const type_1: string;
|
|
16
|
+
export { type_1 as type };
|
|
17
|
+
const _default_1: boolean;
|
|
18
|
+
export { _default_1 as default };
|
|
19
|
+
}
|
|
20
|
+
namespace fix {
|
|
21
|
+
const alias_2: string;
|
|
22
|
+
export { alias_2 as alias };
|
|
23
|
+
const type_2: string;
|
|
24
|
+
export { type_2 as type };
|
|
25
|
+
const _default_2: boolean;
|
|
26
|
+
export { _default_2 as default };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export namespace packCmd {
|
|
2
|
+
function handler(argv: any): Promise<void>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace production {
|
|
7
|
+
export const alias: string;
|
|
8
|
+
export const type: string;
|
|
9
|
+
const _default: boolean;
|
|
10
|
+
export { _default as default };
|
|
11
|
+
}
|
|
12
|
+
namespace target {
|
|
13
|
+
const alias_1: string;
|
|
14
|
+
export { alias_1 as alias };
|
|
15
|
+
const type_1: string;
|
|
16
|
+
export { type_1 as type };
|
|
17
|
+
export const description: string;
|
|
18
|
+
}
|
|
19
|
+
namespace srcPath {
|
|
20
|
+
const type_2: string;
|
|
21
|
+
export { type_2 as type };
|
|
22
|
+
const _default_1: string;
|
|
23
|
+
export { _default_1 as default };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export namespace startCmd {
|
|
2
|
+
function handler(argv: any): Promise<void>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace prod {
|
|
7
|
+
export const alias: string;
|
|
8
|
+
const _default: boolean;
|
|
9
|
+
export { _default as default };
|
|
10
|
+
export const type: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export namespace storybookCmd {
|
|
2
|
+
function handler(argv: any): Promise<void>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace build {
|
|
7
|
+
export const alias: string;
|
|
8
|
+
export const type: string;
|
|
9
|
+
const _default: boolean;
|
|
10
|
+
export { _default as default };
|
|
11
|
+
}
|
|
12
|
+
namespace docs {
|
|
13
|
+
const type_1: string;
|
|
14
|
+
export { type_1 as type };
|
|
15
|
+
const _default_1: boolean;
|
|
16
|
+
export { _default_1 as default };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export namespace testCmd {
|
|
2
|
+
function handler(argv: any): Promise<0 | -1>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace fix {
|
|
7
|
+
const alias: string;
|
|
8
|
+
const type: string;
|
|
9
|
+
}
|
|
10
|
+
namespace watch {
|
|
11
|
+
const alias_1: string;
|
|
12
|
+
export { alias_1 as alias };
|
|
13
|
+
const type_1: string;
|
|
14
|
+
export { type_1 as type };
|
|
15
|
+
}
|
|
16
|
+
namespace passWithNoTests {
|
|
17
|
+
const alias_2: string;
|
|
18
|
+
export { alias_2 as alias };
|
|
19
|
+
const type_2: string;
|
|
20
|
+
export { type_2 as type };
|
|
21
|
+
}
|
|
22
|
+
namespace findReleatedTests {
|
|
23
|
+
const alias_3: string;
|
|
24
|
+
export { alias_3 as alias };
|
|
25
|
+
const type_3: string;
|
|
26
|
+
export { type_3 as type };
|
|
27
|
+
}
|
|
28
|
+
namespace silent {
|
|
29
|
+
const alias_4: string;
|
|
30
|
+
export { alias_4 as alias };
|
|
31
|
+
const type_4: string;
|
|
32
|
+
export { type_4 as type };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export namespace tscheckCmd {
|
|
2
|
+
function handler({ files }: {
|
|
3
|
+
files: any;
|
|
4
|
+
}): Promise<void>;
|
|
5
|
+
const command: string;
|
|
6
|
+
const describe: string;
|
|
7
|
+
namespace builder {
|
|
8
|
+
namespace files {
|
|
9
|
+
export const type: string;
|
|
10
|
+
const _default: never[];
|
|
11
|
+
export { _default as default };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function exec(command: any, options?: {
|
|
2
|
+
stdio: string;
|
|
3
|
+
}): Promise<import("execa").ExecaReturnValue<string> & import("execa").ExecaReturnValue<Buffer>>;
|
|
4
|
+
export const logInfo: {
|
|
5
|
+
(...data: any[]): void;
|
|
6
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
7
|
+
};
|
|
8
|
+
export function logSuccess(...args: any[]): void;
|
|
9
|
+
export const logError: {
|
|
10
|
+
(...data: any[]): void;
|
|
11
|
+
(message?: any, ...optionalParams: any[]): void;
|
|
12
|
+
};
|
|
13
|
+
export function writeAppInfo(): Promise<void>;
|
|
14
|
+
export function copyBuildAssetsToVersionedFolder(): Promise<void>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export namespace versionCmd {
|
|
2
|
+
function handler(argv: any): Promise<void>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace deleteTags {
|
|
7
|
+
export const type: string;
|
|
8
|
+
const _default: boolean;
|
|
9
|
+
export { _default as default };
|
|
10
|
+
}
|
|
11
|
+
namespace useRegistry {
|
|
12
|
+
const type_1: string;
|
|
13
|
+
export { type_1 as type };
|
|
14
|
+
const _default_1: boolean;
|
|
15
|
+
export { _default_1 as default };
|
|
16
|
+
}
|
|
17
|
+
namespace useWorkspace {
|
|
18
|
+
const type_2: string;
|
|
19
|
+
export { type_2 as type };
|
|
20
|
+
const _default_2: boolean;
|
|
21
|
+
export { _default_2 as default };
|
|
22
|
+
}
|
|
23
|
+
namespace lernaOptions {
|
|
24
|
+
const type_3: string;
|
|
25
|
+
export { type_3 as type };
|
|
26
|
+
const _default_3: boolean;
|
|
27
|
+
export { _default_3 as default };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export namespace vitestCmd {
|
|
2
|
+
function handler(argv: any): Promise<0 | -1>;
|
|
3
|
+
const command: string;
|
|
4
|
+
const describe: string;
|
|
5
|
+
namespace builder {
|
|
6
|
+
namespace fix {
|
|
7
|
+
const alias: string;
|
|
8
|
+
const type: string;
|
|
9
|
+
}
|
|
10
|
+
namespace watch {
|
|
11
|
+
const alias_1: string;
|
|
12
|
+
export { alias_1 as alias };
|
|
13
|
+
const type_1: string;
|
|
14
|
+
export { type_1 as type };
|
|
15
|
+
}
|
|
16
|
+
namespace passWithNoTests {
|
|
17
|
+
const alias_2: string;
|
|
18
|
+
export { alias_2 as alias };
|
|
19
|
+
const type_2: string;
|
|
20
|
+
export { type_2 as type };
|
|
21
|
+
}
|
|
22
|
+
namespace related {
|
|
23
|
+
const alias_3: string;
|
|
24
|
+
export { alias_3 as alias };
|
|
25
|
+
const type_3: string;
|
|
26
|
+
export { type_3 as type };
|
|
27
|
+
}
|
|
28
|
+
namespace silent {
|
|
29
|
+
const alias_4: string;
|
|
30
|
+
export { alias_4 as alias };
|
|
31
|
+
const type_4: string;
|
|
32
|
+
export { type_4 as type };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { babelConfig } from "./babel.config.cjs";
|
|
2
|
+
import { esConfig as eslintBaseConfig } from "./lint-config/eslint/non-react.cjs";
|
|
3
|
+
import { esReactConfig as eslintConfig } 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 { loadRoutes } from "./server/app-routes.cjs";
|
|
10
|
+
export { babelConfig, eslintBaseConfig, eslintConfig, stylelintConfig, prettierConfig, commitlintConfig, jestConfig, jestNodeConfig, loadRoutes };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { babelConfig } from "./babel.config.cjs";
|
|
2
|
+
export { esConfig as eslintBaseConfig } from "./lint-config/eslint/non-react.cjs";
|
|
3
|
+
export { esReactConfig as eslintConfig } from "./lint-config/eslint/react.cjs";
|
|
4
|
+
export { stylelintConfig } from "./lint-config/stylelint.config.cjs";
|
|
5
|
+
export { prettierConfig } from "./lint-config/prettier.config.cjs";
|
|
6
|
+
export { commitlintConfig } from "./lint-config/commitlint.config.cjs";
|
|
7
|
+
export { jestConfig } from "./testing/jest.config.cjs";
|
|
8
|
+
export { jestNodeConfig } from "./testing/jest.node.config.cjs";
|
|
9
|
+
export { lintStagedConfig } from "./lint-config/lint-staged.config.js";
|
|
10
|
+
export { loadRoutes } from "./server/app-routes.cjs";
|