@elliemae/pui-cli 7.0.0-alpha.3 → 7.0.0-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{babel/babel.config.cjs → babel.config.cjs} +2 -6
- package/dist/cjs/cli.js +19 -13
- package/dist/cjs/{cli-commands → commands}/build.js +11 -2
- package/dist/cjs/{cli-commands → commands}/codemod.js +5 -1
- package/dist/cjs/{cli-commands → commands}/gendoc.js +7 -6
- package/dist/cjs/{cli-commands → commands}/lint.js +13 -4
- package/dist/cjs/{cli-commands → commands}/pack.js +15 -5
- package/dist/cjs/{cli-commands → commands}/start.js +17 -3
- package/dist/cjs/{cli-commands → commands}/storybook.js +11 -3
- package/dist/cjs/{cli-commands → commands}/test.js +20 -6
- package/dist/cjs/commands/tscheck.js +82 -0
- package/dist/cjs/{cli-commands → commands}/utils.js +18 -10
- package/dist/cjs/{cli-commands → commands}/version.js +8 -2
- package/dist/cjs/{cli-commands → commands}/vitest.js +12 -3
- package/dist/cjs/docs/assets/highlight.css +78 -0
- package/dist/cjs/docs/assets/icons.css +1043 -0
- package/dist/cjs/docs/assets/icons.png +0 -0
- package/dist/cjs/docs/assets/icons@2x.png +0 -0
- package/dist/cjs/docs/assets/main.js +1304 -0
- package/dist/cjs/docs/assets/search.js +2 -0
- package/dist/cjs/docs/assets/style.css +1414 -0
- package/dist/cjs/docs/assets/widgets.png +0 -0
- package/dist/cjs/docs/assets/widgets@2x.png +0 -0
- package/dist/cjs/docs/index.html +94 -0
- package/dist/cjs/docs/modules.html +1 -0
- package/dist/cjs/dummy.js +1 -0
- package/dist/cjs/index.cjs +25 -0
- package/dist/cjs/index.js +10 -9
- package/dist/cjs/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
- package/dist/cjs/{lint → lint-config}/commitlint.config.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/eslint/common.cjs +5 -5
- package/dist/cjs/{lint → lint-config}/eslint/non-react.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/eslint/react.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
- package/dist/cjs/{lint → lint-config}/lint-staged.config.js +6 -7
- package/dist/cjs/{lint → lint-config}/prettier.config.cjs +0 -0
- package/dist/{esm/lint → cjs/lint-config}/stylelint.config.cjs +1 -1
- package/dist/cjs/monorepo/delete-merged-tags.js +1 -0
- package/dist/cjs/monorepo/set-registry-version.js +14 -8
- package/dist/cjs/monorepo/set-workspace-version.js +21 -9
- package/dist/cjs/monorepo/utils.cjs +30 -0
- package/dist/cjs/{pui-config/index.js → pui-config.js} +5 -1
- package/dist/cjs/{release/release.config.cjs → release.config.cjs} +0 -0
- package/dist/cjs/server/app-routes.cjs +42 -0
- package/dist/cjs/server/csp.js +25 -19
- package/dist/cjs/server/index.js +11 -6
- package/dist/cjs/server/logger.js +12 -4
- package/dist/cjs/server/{middlewares/index.js → middlewares.js} +26 -8
- package/dist/cjs/{typescript/util.js → server/utils.js} +19 -8
- package/dist/cjs/testing/jest.config.cjs +11 -14
- package/dist/cjs/{scripts/helpers/get-npm-config.js → testing/mocks/axios.js} +20 -9
- package/dist/cjs/{scripts/helpers/checkmark.js → testing/mocks/cssModule.js} +6 -14
- 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/{typescript/tsc-files/utils.js → testing/mocks/pui-app-loader.js} +6 -12
- 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/{scripts/helpers/xmark.js → testing/mocks/svg.js} +13 -11
- package/dist/cjs/testing/mocks/webpack-hmr.js +25 -0
- package/dist/cjs/testing/setup-react-env.js +5 -1
- package/dist/cjs/testing/setup-test-env.js +23 -0
- package/dist/cjs/testing/setup-tests.js +11 -5
- package/dist/cjs/testing/vitest.config.js +20 -7
- package/dist/cjs/transpile/.swcrc +11 -0
- package/dist/cjs/transpile/esbuild.js +33 -37
- package/dist/cjs/transpile/react-shim.js +5 -1
- package/dist/cjs/typedoc.cjs +12 -0
- package/dist/cjs/{scripts/update-notifier.js → update-notifier.js} +7 -3
- package/dist/cjs/utils.cjs +3 -0
- package/dist/cjs/webpack/helpers.js +78 -57
- package/dist/cjs/webpack/webpack.base.babel.js +15 -21
- package/dist/cjs/webpack/webpack.dev.babel.js +15 -7
- package/dist/cjs/webpack/webpack.lib.base.babel.js +20 -26
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +19 -7
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +33 -22
- package/dist/cjs/webpack/webpack.prod.babel.js +13 -7
- package/dist/cjs/webpack/webpack.storybook.js +111 -0
- package/dist/esm/{babel/babel.config.cjs → babel.config.cjs} +2 -6
- package/dist/esm/cli.js +13 -11
- package/dist/esm/{cli-commands → commands}/build.js +6 -1
- package/dist/esm/{cli-commands → commands}/codemod.js +0 -0
- package/dist/esm/{cli-commands → commands}/gendoc.js +2 -5
- package/dist/esm/{cli-commands → commands}/lint.js +7 -2
- package/dist/esm/{cli-commands → commands}/pack.js +9 -3
- package/dist/esm/{cli-commands → commands}/start.js +12 -2
- package/dist/esm/{cli-commands → commands}/storybook.js +6 -2
- package/dist/esm/{cli-commands → commands}/test.js +15 -5
- package/dist/esm/commands/tscheck.js +56 -0
- package/dist/esm/{cli-commands → commands}/utils.js +13 -9
- package/dist/esm/{cli-commands → commands}/version.js +3 -1
- package/dist/esm/{cli-commands → commands}/vitest.js +7 -2
- package/dist/esm/docs/assets/highlight.css +78 -0
- package/dist/esm/docs/assets/icons.css +1043 -0
- package/dist/esm/docs/assets/icons.png +0 -0
- package/dist/esm/docs/assets/icons@2x.png +0 -0
- package/dist/esm/docs/assets/main.js +1303 -0
- package/dist/esm/docs/assets/search.js +1 -0
- package/dist/esm/docs/assets/style.css +1414 -0
- package/dist/esm/docs/assets/widgets.png +0 -0
- package/dist/esm/docs/assets/widgets@2x.png +0 -0
- package/dist/esm/docs/index.html +94 -0
- package/dist/esm/docs/modules.html +1 -0
- package/dist/esm/index.cjs +25 -0
- package/dist/esm/index.js +8 -8
- package/dist/esm/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
- package/dist/esm/{lint → lint-config}/commitlint.config.cjs +0 -0
- package/dist/esm/{lint → lint-config}/eslint/common.cjs +5 -5
- package/dist/esm/{lint → lint-config}/eslint/non-react.cjs +0 -0
- package/dist/esm/{lint → lint-config}/eslint/react.cjs +0 -0
- package/dist/esm/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
- package/dist/esm/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
- package/dist/esm/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
- package/dist/esm/{lint → lint-config}/lint-staged.config.js +1 -5
- package/dist/esm/{lint → lint-config}/prettier.config.cjs +0 -0
- package/dist/{cjs/lint → esm/lint-config}/stylelint.config.cjs +1 -1
- package/dist/esm/monorepo/set-registry-version.js +9 -7
- package/dist/esm/monorepo/set-workspace-version.js +16 -8
- package/dist/esm/monorepo/utils.cjs +30 -0
- package/dist/esm/{pui-config/index.js → pui-config.js} +0 -0
- package/dist/esm/{release/release.config.cjs → release.config.cjs} +0 -0
- package/dist/esm/server/app-routes.cjs +42 -0
- package/dist/esm/server/csp.js +20 -18
- package/dist/esm/server/index.js +3 -2
- package/dist/esm/server/logger.js +7 -3
- package/dist/esm/server/middlewares.js +49 -0
- package/dist/esm/server/utils.js +13 -0
- package/dist/esm/testing/jest.config.cjs +11 -14
- package/dist/{cjs/testing/mocks/axios.cjs → 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/setup-test-env.js +4 -0
- package/dist/esm/testing/setup-tests.js +5 -3
- package/dist/esm/testing/vitest.config.js +13 -5
- package/dist/esm/transpile/.swcrc +11 -0
- package/dist/esm/transpile/esbuild.js +28 -38
- package/dist/esm/typedoc.cjs +12 -0
- package/dist/esm/{scripts/update-notifier.js → update-notifier.js} +2 -2
- package/dist/esm/utils.cjs +3 -0
- package/dist/esm/webpack/helpers.js +73 -58
- package/dist/esm/webpack/webpack.base.babel.js +11 -23
- package/dist/esm/webpack/webpack.dev.babel.js +8 -5
- package/dist/esm/webpack/webpack.lib.base.babel.js +15 -32
- package/dist/esm/webpack/webpack.lib.dev.babel.js +14 -6
- package/dist/esm/webpack/webpack.lib.prod.babel.js +27 -20
- package/dist/esm/webpack/webpack.prod.babel.js +8 -6
- package/dist/esm/webpack/webpack.storybook.js +85 -0
- package/dist/types/{babel/babel.config.d.cts → babel.config.d.cts} +0 -0
- package/dist/types/{cli-commands → commands}/build.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/codemod.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/gendoc.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/lint.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/pack.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/start.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/storybook.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/test.d.ts +10 -6
- package/dist/types/commands/tscheck.d.ts +14 -0
- package/dist/types/{cli-commands → commands}/utils.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/version.d.ts +0 -0
- package/dist/types/{cli-commands → commands}/vitest.d.ts +0 -0
- package/dist/{cjs/testing/vitest.setup.js → types/docs/assets/main.d.ts} +0 -0
- package/dist/{esm/testing/vitest.setup.js → types/docs/assets/search.d.ts} +0 -0
- package/dist/types/index.d.cts +10 -0
- package/dist/types/index.d.ts +8 -8
- package/dist/types/{lint → lint-config}/commitlint.config.d.cts +0 -0
- package/dist/types/{lint → lint-config}/eslint/common.d.cts +15 -12
- package/dist/types/{lint → lint-config}/eslint/non-react.d.cts +6 -1
- package/dist/types/{lint → lint-config}/eslint/react.d.cts +6 -1
- package/dist/types/{lint → lint-config}/eslint/typescript/common.d.cts +2 -2
- package/dist/types/{lint → lint-config}/eslint/typescript/non-react.d.cts +1 -1
- package/dist/types/{lint → lint-config}/eslint/typescript/react.d.cts +1 -1
- package/dist/types/{lint → lint-config}/lint-staged.config.d.ts +0 -0
- package/dist/types/{lint → lint-config}/prettier.config.d.cts +0 -0
- package/dist/types/{lint → lint-config}/stylelint.config.d.cts +1 -0
- package/dist/types/monorepo/utils.d.cts +1 -0
- package/dist/types/{pui-config/index.d.ts → pui-config.d.ts} +0 -0
- package/dist/types/{release/release.config.d.cts → release.config.d.cts} +0 -0
- package/dist/types/server/app-routes.d.cts +1 -0
- package/dist/types/server/{middlewares/index.d.ts → middlewares.d.ts} +1 -1
- package/dist/types/server/{util/index.d.ts → utils.d.ts} +0 -1
- package/dist/types/testing/jest.config.d.cts +3 -3
- package/dist/types/testing/jest.node.config.d.cts +4 -4
- 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.cts → pui-app-loader.d.ts} +0 -0
- package/dist/types/testing/mocks/{pui-diagnostics.d.cts → pui-diagnostics.d.ts} +0 -0
- package/dist/types/testing/mocks/{pui-user-monitoring.d.cts → pui-user-monitoring.d.ts} +0 -0
- package/dist/types/testing/mocks/{retry-axios.d.cts → retry-axios.d.ts} +0 -0
- package/dist/types/testing/mocks/{svg.d.cts → svg.d.ts} +1 -1
- package/dist/types/testing/mocks/{webpack-hmr.d.cts → webpack-hmr.d.ts} +0 -0
- package/dist/types/testing/setup-test-env.d.ts +2 -0
- package/dist/types/testing/vitest.config.d.ts +1 -1
- package/dist/types/transpile/swcrc.config.d.cts +1 -1
- package/dist/types/typedoc.d.cts +3 -0
- package/dist/types/update-notifier.d.ts +1 -0
- package/dist/types/utils.d.cts +2 -1
- package/dist/types/webpack/helpers.d.ts +1 -1
- package/dist/types/webpack/webpack.dev.babel.d.ts +2 -1
- package/dist/types/webpack/webpack.lib.dev.babel.d.ts +1 -1
- package/dist/types/webpack/webpack.lib.prod.babel.d.ts +20 -4
- package/dist/types/webpack/webpack.prod.babel.d.ts +1 -1
- package/dist/types/webpack/{webpack.storybook.d.cts → webpack.storybook.d.ts} +0 -0
- package/package.json +129 -123
- package/dist/cjs/cli-commands/tsc.js +0 -103
- package/dist/cjs/monorepo/utils.js +0 -34
- package/dist/cjs/scripts/helpers/progress.js +0 -35
- package/dist/cjs/scripts/npmcheckversion.js +0 -8
- package/dist/cjs/server/middlewares/addProdMiddlewares.js +0 -44
- package/dist/cjs/server/util/index.js +0 -68
- package/dist/cjs/testing/mocks/cssModule.cjs +0 -1
- package/dist/cjs/testing/mocks/html.cjs +0 -1
- package/dist/cjs/testing/mocks/image.cjs +0 -1
- package/dist/cjs/testing/mocks/matchMedia.cjs +0 -24
- package/dist/cjs/testing/mocks/pui-app-loader.cjs +0 -1
- package/dist/cjs/testing/mocks/pui-diagnostics.cjs +0 -28
- package/dist/cjs/testing/mocks/pui-user-monitoring.cjs +0 -3
- package/dist/cjs/testing/mocks/retry-axios.cjs +0 -3
- package/dist/cjs/testing/mocks/svg.cjs +0 -5
- package/dist/cjs/testing/mocks/webpack-hmr.cjs +0 -1
- package/dist/cjs/typescript/tsc-files/index.js +0 -68
- package/dist/cjs/webpack/webpack.storybook.cjs +0 -87
- package/dist/esm/cli-commands/tsc.js +0 -83
- package/dist/esm/monorepo/utils.js +0 -12
- package/dist/esm/scripts/helpers/checkmark.js +0 -10
- package/dist/esm/scripts/helpers/get-npm-config.js +0 -5
- package/dist/esm/scripts/helpers/progress.js +0 -13
- package/dist/esm/scripts/helpers/xmark.js +0 -9
- package/dist/esm/scripts/npmcheckversion.js +0 -8
- package/dist/esm/server/middlewares/addProdMiddlewares.js +0 -22
- package/dist/esm/server/middlewares/index.js +0 -35
- package/dist/esm/server/util/index.js +0 -46
- package/dist/esm/testing/mocks/axios.cjs +0 -15
- package/dist/esm/testing/mocks/cssModule.cjs +0 -1
- package/dist/esm/testing/mocks/html.cjs +0 -1
- package/dist/esm/testing/mocks/image.cjs +0 -1
- package/dist/esm/testing/mocks/matchMedia.cjs +0 -24
- package/dist/esm/testing/mocks/pui-app-loader.cjs +0 -1
- package/dist/esm/testing/mocks/pui-diagnostics.cjs +0 -28
- package/dist/esm/testing/mocks/pui-user-monitoring.cjs +0 -3
- package/dist/esm/testing/mocks/retry-axios.cjs +0 -3
- package/dist/esm/testing/mocks/svg.cjs +0 -5
- package/dist/esm/testing/mocks/webpack-hmr.cjs +0 -1
- package/dist/esm/typescript/tsc-files/index.js +0 -55
- package/dist/esm/typescript/tsc-files/utils.js +0 -12
- package/dist/esm/typescript/util.js +0 -6
- package/dist/esm/webpack/webpack.storybook.cjs +0 -87
- package/dist/types/cli-commands/tsc.d.ts +0 -20
- package/dist/types/monorepo/utils.d.ts +0 -1
- package/dist/types/scripts/helpers/checkmark.d.ts +0 -7
- package/dist/types/scripts/helpers/get-npm-config.d.ts +0 -2
- package/dist/types/scripts/helpers/progress.d.ts +0 -7
- package/dist/types/scripts/helpers/xmark.d.ts +0 -6
- package/dist/types/scripts/npmcheckversion.d.ts +0 -1
- package/dist/types/scripts/update-notifier.d.ts +0 -2
- package/dist/types/server/middlewares/addProdMiddlewares.d.ts +0 -1
- package/dist/types/testing/mocks/axios.d.cts +0 -14
- package/dist/types/testing/mocks/cssModule.d.cts +0 -2
- package/dist/types/testing/mocks/html.d.cts +0 -2
- package/dist/types/testing/mocks/image.d.cts +0 -2
- package/dist/types/testing/mocks/matchMedia.d.cts +0 -2
- package/dist/types/testing/vitest.setup.d.ts +0 -0
- package/dist/types/typescript/tsc-files/index.d.ts +0 -1
- package/dist/types/typescript/tsc-files/utils.d.ts +0 -3
- package/dist/types/typescript/util.d.ts +0 -1
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
+
import fg from "fast-glob";
|
|
2
3
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
3
4
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
4
5
|
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
5
6
|
import { ESBuildMinifyPlugin } from "esbuild-loader";
|
|
6
7
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
7
8
|
import { getLibraryName, getCompressionPlugins } from "./helpers.js";
|
|
8
|
-
import { baseConfig } from "./webpack.base.babel.js";
|
|
9
|
-
const libraryName = getLibraryName();
|
|
9
|
+
import { baseConfig } from "./webpack.lib.base.babel.js";
|
|
10
|
+
const libraryName = process.env.LIBRARY_FILE_NAME || getLibraryName();
|
|
11
|
+
const getHtmlWebpackPlugins = () => {
|
|
12
|
+
const htmlTemplateFiles = fg.sync([path.join(process.cwd(), "lib/*.html")]);
|
|
13
|
+
return htmlTemplateFiles.map(
|
|
14
|
+
(htmlTemplateFile) => new HtmlWebpackPlugin({
|
|
15
|
+
template: htmlTemplateFile,
|
|
16
|
+
filename: path.basename(htmlTemplateFile),
|
|
17
|
+
libraryName,
|
|
18
|
+
inject: true,
|
|
19
|
+
minify: {
|
|
20
|
+
removeComments: true,
|
|
21
|
+
collapseWhitespace: true,
|
|
22
|
+
removeRedundantAttributes: true,
|
|
23
|
+
useShortDoctype: true,
|
|
24
|
+
removeEmptyAttributes: true,
|
|
25
|
+
removeStyleLinkTypeAttributes: true,
|
|
26
|
+
keepClosingSlash: true,
|
|
27
|
+
minifyJS: true,
|
|
28
|
+
minifyCSS: true,
|
|
29
|
+
minifyURLs: true
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
};
|
|
10
34
|
var webpack_lib_prod_babel_default = baseConfig({
|
|
11
35
|
mode: "production",
|
|
12
36
|
output: {
|
|
@@ -31,24 +55,7 @@ var webpack_lib_prod_babel_default = baseConfig({
|
|
|
31
55
|
}
|
|
32
56
|
},
|
|
33
57
|
plugins: [
|
|
34
|
-
|
|
35
|
-
template: "lib/index.pug",
|
|
36
|
-
filename: "index.html",
|
|
37
|
-
libraryName,
|
|
38
|
-
minify: {
|
|
39
|
-
removeComments: true,
|
|
40
|
-
collapseWhitespace: true,
|
|
41
|
-
removeRedundantAttributes: true,
|
|
42
|
-
useShortDoctype: true,
|
|
43
|
-
removeEmptyAttributes: true,
|
|
44
|
-
removeStyleLinkTypeAttributes: true,
|
|
45
|
-
keepClosingSlash: true,
|
|
46
|
-
minifyJS: true,
|
|
47
|
-
minifyCSS: true,
|
|
48
|
-
minifyURLs: true
|
|
49
|
-
},
|
|
50
|
-
inject: true
|
|
51
|
-
}),
|
|
58
|
+
...getHtmlWebpackPlugins(),
|
|
52
59
|
new MiniCssExtractPlugin({
|
|
53
60
|
filename: `css/${libraryName}.[contenthash].css`,
|
|
54
61
|
chunkFilename: `css/${libraryName}.[contenthash].chunk.css`
|
|
@@ -6,7 +6,7 @@ import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
|
|
|
6
6
|
import { ESBuildMinifyPlugin } from "esbuild-loader";
|
|
7
7
|
import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
|
|
8
8
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
9
|
-
import
|
|
9
|
+
import { baseConfig } from "./webpack.base.babel.js";
|
|
10
10
|
import {
|
|
11
11
|
isAppLoaderEnabled,
|
|
12
12
|
getPaths,
|
|
@@ -104,16 +104,18 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
|
|
|
104
104
|
googleTagManager: isGoogleTagManagerEnabled()
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
const config =
|
|
107
|
+
const config = baseConfig(getProdConfig());
|
|
108
108
|
config.plugins.push(htmlWebpackPlugin);
|
|
109
109
|
const addSMPPlugin = (webpackConfig) => {
|
|
110
110
|
const smpConfig = new SpeedMeasurePlugin({
|
|
111
111
|
disable: !process.env.MEASURE
|
|
112
112
|
}).wrap(webpackConfig);
|
|
113
|
-
smpConfig.plugins.push(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
smpConfig.plugins.push(
|
|
114
|
+
new MiniCssExtractPlugin({
|
|
115
|
+
filename: "latest/css/[name].[contenthash].css",
|
|
116
|
+
chunkFilename: "latest/css/[name].[contenthash].chunk.css"
|
|
117
|
+
})
|
|
118
|
+
);
|
|
117
119
|
return smpConfig;
|
|
118
120
|
};
|
|
119
121
|
var webpack_prod_babel_default = addSMPPlugin(config);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import webpack from "webpack";
|
|
2
|
+
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
3
|
+
import CopyWebpackPlugin from "copy-webpack-plugin";
|
|
4
|
+
import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
|
|
5
|
+
import { getAlias, getCompressionPlugins } from "./helpers.js";
|
|
6
|
+
import { isApp } from "../utils.cjs";
|
|
7
|
+
const IS_APP = isApp();
|
|
8
|
+
const CWD = process.cwd();
|
|
9
|
+
const getAdditionalPlugins = () => [
|
|
10
|
+
new webpack.EnvironmentPlugin({
|
|
11
|
+
IS_APP,
|
|
12
|
+
CWD
|
|
13
|
+
}),
|
|
14
|
+
new MiniCssExtractPlugin({
|
|
15
|
+
filename: "[name].[contenthash].css",
|
|
16
|
+
chunkFilename: "[name].[contenthash].chunk.css"
|
|
17
|
+
}),
|
|
18
|
+
new CopyWebpackPlugin({
|
|
19
|
+
patterns: [
|
|
20
|
+
{
|
|
21
|
+
from: "lib/app.config.json",
|
|
22
|
+
to: "app.config.json",
|
|
23
|
+
noErrorOnMissing: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
from: "app/app.config.json",
|
|
27
|
+
to: "app.config.json",
|
|
28
|
+
noErrorOnMissing: true
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
from: "public",
|
|
32
|
+
noErrorOnMissing: true
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
];
|
|
37
|
+
const getModuleRules = () => [
|
|
38
|
+
{
|
|
39
|
+
type: "asset",
|
|
40
|
+
resourceQuery: /url/
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
test: /\.svg$/i,
|
|
44
|
+
issuer: /\.[jt]sx?$/,
|
|
45
|
+
resourceQuery: /^((?!url).)*$/,
|
|
46
|
+
use: ["@svgr/webpack"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
resourceQuery: /resource/,
|
|
50
|
+
type: "asset/resource"
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
const webpackFinal = async (config, { configType }) => {
|
|
54
|
+
const isProd = configType === "PRODUCTION";
|
|
55
|
+
const fileLoaderRule = config.module.rules.find(
|
|
56
|
+
(rule) => rule.test?.test?.(".svg")
|
|
57
|
+
);
|
|
58
|
+
fileLoaderRule.exclude = /\.svg$/i;
|
|
59
|
+
config.module.rules.unshift(...getModuleRules());
|
|
60
|
+
config.plugins.push(...getAdditionalPlugins());
|
|
61
|
+
if (isProd) {
|
|
62
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
63
|
+
}
|
|
64
|
+
config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
|
|
65
|
+
config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
|
|
66
|
+
config.resolve.extensions.push(".svg");
|
|
67
|
+
config.resolve.plugins = [
|
|
68
|
+
...config.resolve.plugins || [],
|
|
69
|
+
new ResolveTypeScriptPlugin({})
|
|
70
|
+
];
|
|
71
|
+
config.externals = config.externals || {};
|
|
72
|
+
config.externals["@elliemae/pui-user-monitoring"] = "emuiUserMonitoring";
|
|
73
|
+
config.externals["@elliemae/pui-app-loader"] = "emuiAppLoader";
|
|
74
|
+
config.externals["@elliemae/pui-diagnostics"] = "emuiDiagnostics";
|
|
75
|
+
return config;
|
|
76
|
+
};
|
|
77
|
+
const managerWebpack = async (config) => {
|
|
78
|
+
config.plugins = config.plugins.concat(getCompressionPlugins());
|
|
79
|
+
config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
|
|
80
|
+
return config;
|
|
81
|
+
};
|
|
82
|
+
export {
|
|
83
|
+
managerWebpack,
|
|
84
|
+
webpackFinal
|
|
85
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,23 +13,27 @@ export namespace testCmd {
|
|
|
13
13
|
const type_1: string;
|
|
14
14
|
export { type_1 as type };
|
|
15
15
|
}
|
|
16
|
+
namespace debug {
|
|
17
|
+
const type_2: string;
|
|
18
|
+
export { type_2 as type };
|
|
19
|
+
}
|
|
16
20
|
namespace passWithNoTests {
|
|
17
21
|
const alias_2: string;
|
|
18
22
|
export { alias_2 as alias };
|
|
19
|
-
const
|
|
20
|
-
export {
|
|
23
|
+
const type_3: string;
|
|
24
|
+
export { type_3 as type };
|
|
21
25
|
}
|
|
22
26
|
namespace findReleatedTests {
|
|
23
27
|
const alias_3: string;
|
|
24
28
|
export { alias_3 as alias };
|
|
25
|
-
const
|
|
26
|
-
export {
|
|
29
|
+
const type_4: string;
|
|
30
|
+
export { type_4 as type };
|
|
27
31
|
}
|
|
28
32
|
namespace silent {
|
|
29
33
|
const alias_4: string;
|
|
30
34
|
export { alias_4 as alias };
|
|
31
|
-
const
|
|
32
|
-
export {
|
|
35
|
+
const type_5: string;
|
|
36
|
+
export { type_5 as type };
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -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
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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 };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { babelConfig } from "./babel
|
|
2
|
-
export { esConfig as eslintBaseConfig } from "./lint/eslint/non-react.cjs";
|
|
3
|
-
export { esReactConfig as eslintConfig } from "./lint/eslint/react.cjs";
|
|
4
|
-
export { stylelintConfig } from "./lint/stylelint.config.cjs";
|
|
5
|
-
export { prettierConfig } from "./lint/prettier.config.cjs";
|
|
6
|
-
export { commitlintConfig } from "./lint/commitlint.config.cjs";
|
|
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
7
|
export { jestConfig } from "./testing/jest.config.cjs";
|
|
8
8
|
export { jestNodeConfig } from "./testing/jest.node.config.cjs";
|
|
9
|
-
export { lintStagedConfig } from "./lint/lint-staged.config.js";
|
|
10
|
-
export { loadRoutes } from "./server/
|
|
9
|
+
export { lintStagedConfig } from "./lint-config/lint-staged.config.js";
|
|
10
|
+
export { loadRoutes } from "./server/app-routes.cjs";
|
|
File without changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export const baseExtends: string[];
|
|
2
|
+
export const baseOverrides: {
|
|
3
3
|
files: string[];
|
|
4
4
|
rules: {
|
|
5
5
|
'jest/valid-expect': string;
|
|
@@ -20,16 +20,19 @@ export namespace baseConfig {
|
|
|
20
20
|
const jsx: boolean;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
export const settings: {
|
|
24
|
+
react: {
|
|
25
|
+
version: string;
|
|
26
|
+
};
|
|
27
|
+
jest: {
|
|
28
|
+
version: number;
|
|
29
|
+
};
|
|
30
|
+
'import/resolver': {
|
|
31
|
+
node: {
|
|
32
|
+
extensions: string[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
33
36
|
export const ignorePatterns: string[];
|
|
34
37
|
}
|
|
35
38
|
export const basePlugins: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const esConfig: {
|
|
2
2
|
extends: string[];
|
|
3
3
|
rules: {
|
|
4
4
|
'prettier/prettier': (string | typeof import("../prettier.config.cjs"))[];
|
|
@@ -83,6 +83,11 @@ export var esConfig: {
|
|
|
83
83
|
jest: {
|
|
84
84
|
version: number;
|
|
85
85
|
};
|
|
86
|
+
'import/resolver': {
|
|
87
|
+
node: {
|
|
88
|
+
extensions: string[];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
86
91
|
};
|
|
87
92
|
ignorePatterns: string[];
|
|
88
93
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const esReactConfig: {
|
|
2
2
|
extends: string[];
|
|
3
3
|
rules: {
|
|
4
4
|
'jsx-a11y/aria-props': number;
|
|
@@ -113,6 +113,11 @@ export var esReactConfig: {
|
|
|
113
113
|
jest: {
|
|
114
114
|
version: number;
|
|
115
115
|
};
|
|
116
|
+
'import/resolver': {
|
|
117
|
+
node: {
|
|
118
|
+
extensions: string[];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
116
121
|
};
|
|
117
122
|
ignorePatterns: string[];
|
|
118
123
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export const tsBaseExtends: string[];
|
|
2
|
+
export const tsBaseRules: {
|
|
3
3
|
'@typescript-eslint/explicit-module-boundary-types': string;
|
|
4
4
|
'@typescript-eslint/explicit-function-return-type': string;
|
|
5
5
|
'@typescript-eslint/no-use-before-define': (string | {
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function findMonoRepoRoot(cwd?: string): string | null;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function loadRoutes(app: any): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export function setupDefaultMiddlewares(app: any): void;
|
|
2
|
-
export function setupAdditionalMiddlewars(app: any, options
|
|
2
|
+
export function setupAdditionalMiddlewars(app: any, options?: {}): any;
|
|
@@ -8,9 +8,8 @@ export namespace jestConfig {
|
|
|
8
8
|
'.*\\webpack-hmr(.[t|j]s)?$': any;
|
|
9
9
|
'.*\\.(css|scss)$': any;
|
|
10
10
|
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': any;
|
|
11
|
-
'.*\\.svg
|
|
12
|
-
'.*\\.(
|
|
13
|
-
'.*index.html\\?resource$': any;
|
|
11
|
+
'.*\\.svg(?:\\?[a-zA-Z]+)?$': any;
|
|
12
|
+
'.*\\.html(?:\\?[a-zA-Z]+)?$': any;
|
|
14
13
|
'@elliemae/pui-user-monitoring': any;
|
|
15
14
|
'@elliemae/pui-app-loader': any;
|
|
16
15
|
'@elliemae/pui-diagnostics': any;
|
|
@@ -36,4 +35,5 @@ export namespace jestConfig {
|
|
|
36
35
|
const url: string;
|
|
37
36
|
}
|
|
38
37
|
const testEnvironment: string;
|
|
38
|
+
const watchPlugins: string[];
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const jestNodeConfig: {
|
|
2
2
|
testEnvironment: string;
|
|
3
3
|
transformIgnorePatterns: never[];
|
|
4
4
|
setupFiles: never[];
|
|
@@ -12,9 +12,8 @@ export var jestNodeConfig: {
|
|
|
12
12
|
'.*\\webpack-hmr(.[t|j]s)?$': any;
|
|
13
13
|
'.*\\.(css|scss)$': any;
|
|
14
14
|
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': any;
|
|
15
|
-
'.*\\.svg
|
|
16
|
-
'.*\\.(
|
|
17
|
-
'.*index.html\\?resource$': any;
|
|
15
|
+
'.*\\.svg(?:\\?[a-zA-Z]+)?$': any;
|
|
16
|
+
'.*\\.html(?:\\?[a-zA-Z]+)?$': any;
|
|
18
17
|
'@elliemae/pui-user-monitoring': any;
|
|
19
18
|
'@elliemae/pui-app-loader': any;
|
|
20
19
|
'@elliemae/pui-diagnostics': any;
|
|
@@ -36,4 +35,5 @@ export var jestNodeConfig: {
|
|
|
36
35
|
testEnvironmentOptions: {
|
|
37
36
|
url: string;
|
|
38
37
|
};
|
|
38
|
+
watchPlugins: string[];
|
|
39
39
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
const defaults: {};
|
|
3
|
+
namespace interceptors {
|
|
4
|
+
namespace request {
|
|
5
|
+
const use: jest.Mock<any, any>;
|
|
6
|
+
}
|
|
7
|
+
namespace response {
|
|
8
|
+
const use_1: jest.Mock<any, any>;
|
|
9
|
+
export { use_1 as use };
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
const create: jest.Mock<any, any>;
|
|
13
|
+
const get: jest.Mock<any, any>;
|
|
14
|
+
const post: jest.Mock<any, any>;
|
|
15
|
+
const put: jest.Mock<any, any>;
|
|
16
|
+
}
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function addMatchMedia(): void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("
|
|
1
|
+
declare const _default: import("vitest/dist/config").UserConfigExport;
|
|
2
2
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const swcrcConfig: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function notifyUpdates(): Promise<void>;
|
package/dist/types/utils.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
export const LATEST_VERSION: "latest";
|
|
3
3
|
export function excludeNodeModulesExcept(modules: any): (modulePath: any) => boolean;
|
|
4
|
-
export function getLibraryName():
|
|
4
|
+
export function getLibraryName(): string;
|
|
5
5
|
export function mapToFolder(dependencies: any, folder: any): any;
|
|
6
6
|
export function getAlias(): any;
|
|
7
7
|
export const modulesToTranspile: string[];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export default config;
|
|
2
|
+
declare const config: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const _default: {
|
|
2
2
|
mode: any;
|
|
3
|
-
entry:
|
|
3
|
+
entry: string[];
|
|
4
4
|
output: any;
|
|
5
5
|
optimization: any;
|
|
6
6
|
module: {
|
|
@@ -48,8 +48,16 @@ declare var _default: {
|
|
|
48
48
|
resourceQuery?: undefined;
|
|
49
49
|
} | {
|
|
50
50
|
test: RegExp;
|
|
51
|
-
|
|
51
|
+
exclude: RegExp;
|
|
52
|
+
use: string;
|
|
53
|
+
resolve?: undefined;
|
|
54
|
+
type?: undefined;
|
|
55
|
+
issuer?: undefined;
|
|
56
|
+
resourceQuery?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
test: RegExp;
|
|
52
59
|
exclude: (modulePath: any) => boolean;
|
|
60
|
+
type: string;
|
|
53
61
|
resolve?: undefined;
|
|
54
62
|
use?: undefined;
|
|
55
63
|
issuer?: undefined;
|
|
@@ -62,6 +70,14 @@ declare var _default: {
|
|
|
62
70
|
use: string[];
|
|
63
71
|
resolve?: undefined;
|
|
64
72
|
type?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
test: RegExp;
|
|
75
|
+
exclude: (modulePath: any) => boolean;
|
|
76
|
+
use: string;
|
|
77
|
+
resolve?: undefined;
|
|
78
|
+
type?: undefined;
|
|
79
|
+
issuer?: undefined;
|
|
80
|
+
resourceQuery?: undefined;
|
|
65
81
|
} | {
|
|
66
82
|
resourceQuery: RegExp;
|
|
67
83
|
type: string;
|
|
@@ -78,6 +94,7 @@ declare var _default: {
|
|
|
78
94
|
extensions: string[];
|
|
79
95
|
mainFields: string[];
|
|
80
96
|
alias: any;
|
|
97
|
+
plugins: import("resolve-typescript-plugin")[];
|
|
81
98
|
};
|
|
82
99
|
externals: {
|
|
83
100
|
'@elliemae/pui-user-monitoring': string;
|
|
@@ -86,6 +103,5 @@ declare var _default: {
|
|
|
86
103
|
};
|
|
87
104
|
devtool: any;
|
|
88
105
|
performance: any;
|
|
89
|
-
devServer: any;
|
|
90
106
|
};
|
|
91
107
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|