@elliemae/pui-cli 7.23.0 → 7.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cli.js +4 -0
- package/dist/cjs/commands/build.js +4 -0
- package/dist/cjs/commands/codemod.js +4 -0
- package/dist/cjs/commands/gendoc.js +4 -0
- package/dist/cjs/commands/lint.js +4 -0
- package/dist/cjs/commands/pack.js +4 -0
- package/dist/cjs/commands/start.js +4 -0
- package/dist/cjs/commands/storybook.js +4 -0
- package/dist/cjs/commands/test.js +5 -0
- package/dist/cjs/commands/tscheck.js +4 -0
- package/dist/cjs/commands/utils.js +4 -0
- package/dist/cjs/commands/version.js +4 -0
- package/dist/cjs/commands/vitest.js +5 -0
- package/dist/cjs/lint-config/lint-staged.config.js +4 -0
- package/dist/cjs/monorepo/set-registry-version.js +4 -0
- package/dist/cjs/monorepo/set-workspace-version.js +4 -0
- package/dist/cjs/pui-config.js +4 -0
- package/dist/cjs/server/csp.js +12 -1
- package/dist/cjs/server/index.js +4 -0
- package/dist/cjs/server/logger.js +6 -0
- package/dist/cjs/server/middlewares.js +4 -1
- package/dist/cjs/server/utils.js +4 -0
- package/dist/cjs/testing/mocks/matchMedia.js +2 -0
- package/dist/cjs/testing/mocks/svg.js +4 -0
- package/dist/cjs/testing/setup-react-env.js +4 -0
- package/dist/cjs/testing/setup-test-env.js +4 -0
- package/dist/cjs/testing/setup-tests.js +4 -0
- package/dist/cjs/testing/vitest.config.js +9 -0
- package/dist/cjs/transpile/esbuild.js +4 -0
- package/dist/cjs/transpile/react-shim.js +4 -0
- package/dist/cjs/update-notifier.js +4 -0
- package/dist/cjs/webpack/helpers.js +5 -0
- package/dist/cjs/webpack/webpack.base.babel.js +30 -0
- package/dist/cjs/webpack/webpack.dev.babel.js +11 -0
- package/dist/cjs/webpack/webpack.lib.base.babel.js +14 -0
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +15 -1
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +8 -1
- package/dist/cjs/webpack/webpack.prod.babel.js +5 -0
- package/dist/cjs/webpack/webpack.storybook.js +4 -0
- package/dist/esm/commands/test.js +1 -0
- package/dist/esm/commands/vitest.js +1 -0
- package/dist/esm/server/csp.js +8 -1
- package/dist/esm/server/logger.js +2 -0
- package/dist/esm/server/middlewares.js +0 -1
- package/dist/esm/testing/mocks/matchMedia.js +2 -0
- package/dist/esm/testing/vitest.config.js +5 -0
- package/dist/esm/webpack/helpers.js +1 -0
- package/dist/esm/webpack/webpack.base.babel.js +26 -0
- package/dist/esm/webpack/webpack.dev.babel.js +7 -0
- package/dist/esm/webpack/webpack.lib.base.babel.js +10 -0
- package/dist/esm/webpack/webpack.lib.dev.babel.js +11 -1
- package/dist/esm/webpack/webpack.lib.prod.babel.js +4 -1
- package/dist/esm/webpack/webpack.prod.babel.js +1 -0
- package/package.json +33 -33
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -62,11 +66,13 @@ const plugins = [
|
|
|
62
66
|
new import_webpack.default.DefinePlugin({
|
|
63
67
|
APP_CONFIG: (0, import_utils.getAppConfig)(true)
|
|
64
68
|
}),
|
|
69
|
+
/* eslint-disable indent */
|
|
65
70
|
...copyPluginPatterns.length > 0 ? [
|
|
66
71
|
new import_copy_webpack_plugin.default({
|
|
67
72
|
patterns: copyPluginPatterns
|
|
68
73
|
})
|
|
69
74
|
] : [],
|
|
75
|
+
/* eslint-enable indent */
|
|
70
76
|
new import_duplicate_package_checker_webpack_plugin.default(),
|
|
71
77
|
new import_webpack.default.optimize.LimitChunkCountPlugin({
|
|
72
78
|
maxChunks: 1
|
|
@@ -84,11 +90,13 @@ const baseConfig = (options) => ({
|
|
|
84
90
|
libraryTarget: "umd",
|
|
85
91
|
...options.output
|
|
86
92
|
},
|
|
93
|
+
// Merge with env dependent settings
|
|
87
94
|
optimization: options.optimization,
|
|
88
95
|
module: {
|
|
89
96
|
rules: [
|
|
90
97
|
{
|
|
91
98
|
test: /^(?!.*\.exec\.js$).*\.jsx?$/,
|
|
99
|
+
// Transform all .js and .jsx files with Babel
|
|
92
100
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
|
|
93
101
|
resolve: {
|
|
94
102
|
fullySpecified: false
|
|
@@ -103,6 +111,7 @@ const baseConfig = (options) => ({
|
|
|
103
111
|
},
|
|
104
112
|
{
|
|
105
113
|
test: /^(?!.*\.exec\.js$).*\.tsx?$/,
|
|
114
|
+
// Transform all .js and .jsx files with Babel
|
|
106
115
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
|
|
107
116
|
resolve: {
|
|
108
117
|
fullySpecified: false
|
|
@@ -160,6 +169,11 @@ const baseConfig = (options) => ({
|
|
|
160
169
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
|
|
161
170
|
type: "asset"
|
|
162
171
|
},
|
|
172
|
+
// {
|
|
173
|
+
// test: /(?<!\/iframe)\.html$/,
|
|
174
|
+
// exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
175
|
+
// use: 'html-loader',
|
|
176
|
+
// },
|
|
163
177
|
{
|
|
164
178
|
test: /\.(mp4|webm)$/,
|
|
165
179
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -49,6 +53,11 @@ const getHtmlWebpackPlugins = () => {
|
|
|
49
53
|
};
|
|
50
54
|
var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig)({
|
|
51
55
|
mode: "development",
|
|
56
|
+
// output: {
|
|
57
|
+
// filename: `js/${libraryName}.js`,
|
|
58
|
+
// chunkFilename: `js/${libraryName}.chunk.js`,
|
|
59
|
+
// assetModuleFilename: '[name][ext][query]',
|
|
60
|
+
// },
|
|
52
61
|
optimization: {
|
|
53
62
|
splitChunks: {
|
|
54
63
|
chunks: "all"
|
|
@@ -61,9 +70,14 @@ var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig
|
|
|
61
70
|
...getHtmlWebpackPlugins(),
|
|
62
71
|
new import_circular_dependency_plugin.default({
|
|
63
72
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
73
|
+
// exclude node_modules
|
|
64
74
|
failOnError: false
|
|
75
|
+
// show a warning when there is a circular dependency
|
|
76
|
+
}),
|
|
77
|
+
new import_mini_css_extract_plugin.default({
|
|
78
|
+
// filename: `css/${libraryName}.css`,
|
|
79
|
+
// chunkFilename: `css/${libraryName}.chunk.css`,
|
|
65
80
|
}),
|
|
66
|
-
new import_mini_css_extract_plugin.default({}),
|
|
67
81
|
new import_webpack.default.ProgressPlugin()
|
|
68
82
|
],
|
|
69
83
|
devtool: "eval-source-map",
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -79,7 +83,10 @@ const prodConfig = {
|
|
|
79
83
|
},
|
|
80
84
|
plugins: [
|
|
81
85
|
...getHtmlWebpackPlugins(),
|
|
82
|
-
new import_mini_css_extract_plugin.default({
|
|
86
|
+
new import_mini_css_extract_plugin.default({
|
|
87
|
+
// filename: `css/${libraryName}.[contenthash].css`,
|
|
88
|
+
// chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
|
|
89
|
+
}),
|
|
83
90
|
...(0, import_helpers.getCompressionPlugins)(true),
|
|
84
91
|
new import_webpack_bundle_analyzer.BundleAnalyzerPlugin({
|
|
85
92
|
analyzerMode: "static",
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
|
@@ -44,6 +48,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
|
44
48
|
entry: {
|
|
45
49
|
app: import_node_path.default.join(process.cwd(), "app/index")
|
|
46
50
|
},
|
|
51
|
+
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
|
|
47
52
|
output: {
|
|
48
53
|
path: buildPath,
|
|
49
54
|
publicPath: "auto",
|
|
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
25
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
26
|
mod
|
|
23
27
|
));
|
package/dist/esm/server/csp.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
|
+
import express from "express";
|
|
3
4
|
import cspPolicy from "helmet-csp";
|
|
4
5
|
import crypto from "crypto";
|
|
6
|
+
const CSP_REPORT_URI = "/diagnostics/v1/csp";
|
|
5
7
|
const sources = [
|
|
6
8
|
"'self'",
|
|
7
9
|
"http://localhost:*",
|
|
@@ -56,11 +58,16 @@ const csp = (app) => {
|
|
|
56
58
|
scriptSrcAttr: ["'none'"],
|
|
57
59
|
styleSrc: sources.concat(["'unsafe-inline'"]),
|
|
58
60
|
upgradeInsecureRequests: [],
|
|
59
|
-
reportUri:
|
|
61
|
+
reportUri: CSP_REPORT_URI
|
|
60
62
|
},
|
|
61
63
|
reportOnly: true
|
|
62
64
|
})
|
|
63
65
|
);
|
|
66
|
+
app.use(CSP_REPORT_URI, express.json({ type: "application/csp-report" }));
|
|
67
|
+
app.use(CSP_REPORT_URI, (req, res) => {
|
|
68
|
+
console.log("CSP Violation: ", req.body);
|
|
69
|
+
res.status(204).end();
|
|
70
|
+
});
|
|
64
71
|
};
|
|
65
72
|
export {
|
|
66
73
|
csp,
|
|
@@ -2,9 +2,11 @@ import chalk from "chalk";
|
|
|
2
2
|
import ip from "ip";
|
|
3
3
|
const divider = chalk.gray("\n-----------------------------------");
|
|
4
4
|
const logger = {
|
|
5
|
+
// Called whenever there's an error on the server we want to print
|
|
5
6
|
error: (err) => {
|
|
6
7
|
console.error(chalk.red(err));
|
|
7
8
|
},
|
|
9
|
+
// Called when express.js app starts on given port w/o errors
|
|
8
10
|
appStarted: (port, host, tunnelStarted) => {
|
|
9
11
|
console.log(`Server started ! ${chalk.green("\u2713")}`);
|
|
10
12
|
if (tunnelStarted) {
|
|
@@ -23,7 +23,6 @@ const setupDefaultMiddlewares = (app) => {
|
|
|
23
23
|
app.use(express.urlencoded({ extended: false }));
|
|
24
24
|
app.use(express.text({ type: "text/plain" }));
|
|
25
25
|
app.use(express.json({ type: "application/json" }));
|
|
26
|
-
app.use(express.json({ type: "application/csp-report" }));
|
|
27
26
|
};
|
|
28
27
|
const setupAdditionalMiddlewars = (app, options = {}) => {
|
|
29
28
|
const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
|
|
@@ -12,6 +12,11 @@ const vitestConfig = defineConfig({
|
|
|
12
12
|
setupFiles: [path.resolve(__dirname, "./setup-test-env.js")],
|
|
13
13
|
include: ["./{app,lib}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
14
14
|
exclude: [...configDefaults.exclude, ".idea", ".git", ".cache", "e2e"],
|
|
15
|
+
// watchIgnore: [
|
|
16
|
+
// '.*\\/node_modules\\/.*',
|
|
17
|
+
// '.*\\/build\\/.*',
|
|
18
|
+
// '.*\\/dist\\/.*',
|
|
19
|
+
// ],
|
|
15
20
|
coverage: {
|
|
16
21
|
reportsDirectory: "./reports/coverage"
|
|
17
22
|
},
|
|
@@ -161,6 +161,7 @@ const getCompressionPlugins = (isLibrary = false) => {
|
|
|
161
161
|
const commonConfig = {
|
|
162
162
|
test: /\.(js|css)$/,
|
|
163
163
|
exclude: !isLibrary ? excludeList : [],
|
|
164
|
+
// we are compressing all files since in aws cloudfront edge lambda, we don't want to whitelist files that are not compressed due to below limits
|
|
164
165
|
minRatio: Infinity
|
|
165
166
|
};
|
|
166
167
|
return [
|
|
@@ -51,6 +51,12 @@ const plugins = [
|
|
|
51
51
|
toType: "dir",
|
|
52
52
|
info: { minimized: true }
|
|
53
53
|
},
|
|
54
|
+
// {
|
|
55
|
+
// from: 'node_modules/@elliemae/pui-user-monitoring/dist/umd/*.js',
|
|
56
|
+
// to: './latest/js/[name].[contenthash][ext]',
|
|
57
|
+
// noErrorOnMissing: true,
|
|
58
|
+
// info: { minimized: true },
|
|
59
|
+
// },
|
|
54
60
|
{
|
|
55
61
|
from: "node_modules/@elliemae/pui-app-loader/dist/public/js",
|
|
56
62
|
to: "./latest/js",
|
|
@@ -58,6 +64,12 @@ const plugins = [
|
|
|
58
64
|
noErrorOnMissing: true,
|
|
59
65
|
info: { minimized: true }
|
|
60
66
|
},
|
|
67
|
+
// {
|
|
68
|
+
// from: 'node_modules/@elliemae/pui-app-loader/dist/umd/*.js',
|
|
69
|
+
// to: './latest/js/[name].[contenthash][ext]',
|
|
70
|
+
// noErrorOnMissing: true,
|
|
71
|
+
// info: { minimized: true },
|
|
72
|
+
// },
|
|
61
73
|
{
|
|
62
74
|
from: "node_modules/@elliemae/encw-loader/dist/public/js",
|
|
63
75
|
to: "./latest/js",
|
|
@@ -65,6 +77,12 @@ const plugins = [
|
|
|
65
77
|
noErrorOnMissing: true,
|
|
66
78
|
info: { minimized: true }
|
|
67
79
|
},
|
|
80
|
+
// {
|
|
81
|
+
// from: 'node_modules/@elliemae/encw-loader/dist/umd/*.js',
|
|
82
|
+
// to: './latest/js/[name].[contenthash][ext]',
|
|
83
|
+
// noErrorOnMissing: true,
|
|
84
|
+
// info: { minimized: true },
|
|
85
|
+
// },
|
|
68
86
|
{
|
|
69
87
|
from: "node_modules/@elliemae/pui-diagnostics/dist/public/js",
|
|
70
88
|
to: "./latest/js",
|
|
@@ -72,6 +90,12 @@ const plugins = [
|
|
|
72
90
|
noErrorOnMissing: true,
|
|
73
91
|
info: { minimized: true }
|
|
74
92
|
},
|
|
93
|
+
// {
|
|
94
|
+
// from: 'node_modules/@elliemae/pui-diagnostics/dist/umd/*.js',
|
|
95
|
+
// to: './latest/js/[name].[contenthash][ext]',
|
|
96
|
+
// noErrorOnMissing: true,
|
|
97
|
+
// info: { minimized: true },
|
|
98
|
+
// },
|
|
75
99
|
{
|
|
76
100
|
from: "public",
|
|
77
101
|
to: "./latest",
|
|
@@ -105,6 +129,7 @@ const plugins = [
|
|
|
105
129
|
favicons: {
|
|
106
130
|
developerName: "ICE MT",
|
|
107
131
|
developerURL: null,
|
|
132
|
+
// prevent retrieving from the nearest package.json
|
|
108
133
|
icons: {
|
|
109
134
|
coast: false,
|
|
110
135
|
yandex: false
|
|
@@ -121,6 +146,7 @@ const baseConfig = (options) => ({
|
|
|
121
146
|
publicPath: "auto",
|
|
122
147
|
...options.output
|
|
123
148
|
},
|
|
149
|
+
// Merge with env dependent settings
|
|
124
150
|
optimization: options.optimization,
|
|
125
151
|
module: {
|
|
126
152
|
rules: [
|
|
@@ -36,9 +36,11 @@ const devConfig = {
|
|
|
36
36
|
config: [__filename]
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
// Add hot reloading in development
|
|
39
40
|
entry: {
|
|
40
41
|
app: path.join(process.cwd(), "app/index")
|
|
41
42
|
},
|
|
43
|
+
// Don't use hashes in dev mode for better performance
|
|
42
44
|
output: {
|
|
43
45
|
path: buildPath,
|
|
44
46
|
publicPath: "auto",
|
|
@@ -65,12 +67,15 @@ const devConfig = {
|
|
|
65
67
|
resolve: {
|
|
66
68
|
alias: {}
|
|
67
69
|
},
|
|
70
|
+
// Add development plugins
|
|
68
71
|
plugins: [
|
|
69
72
|
new HtmlWebpackPlugin({
|
|
70
73
|
inject: !isAppLoaderEnabled(),
|
|
74
|
+
// Inject all files that are generated by webpack, e.g. bundle.js
|
|
71
75
|
template: !isAppLoaderEnabled() ? "app/index.html" : "app/index-app-loader.html",
|
|
72
76
|
emui: {
|
|
73
77
|
appVersion,
|
|
78
|
+
basePath,
|
|
74
79
|
globalScriptPath,
|
|
75
80
|
userMonScriptPath,
|
|
76
81
|
appLoaderScriptPath,
|
|
@@ -81,7 +86,9 @@ const devConfig = {
|
|
|
81
86
|
}),
|
|
82
87
|
new CircularDependencyPlugin({
|
|
83
88
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
89
|
+
// exclude node_modules
|
|
84
90
|
failOnError: false
|
|
91
|
+
// show a warning when there is a circular dependency
|
|
85
92
|
}),
|
|
86
93
|
new MiniCssExtractPlugin({
|
|
87
94
|
filename: "[name].css",
|
|
@@ -39,11 +39,13 @@ const plugins = [
|
|
|
39
39
|
new webpack.DefinePlugin({
|
|
40
40
|
APP_CONFIG: getAppConfig(true)
|
|
41
41
|
}),
|
|
42
|
+
/* eslint-disable indent */
|
|
42
43
|
...copyPluginPatterns.length > 0 ? [
|
|
43
44
|
new CopyWebpackPlugin({
|
|
44
45
|
patterns: copyPluginPatterns
|
|
45
46
|
})
|
|
46
47
|
] : [],
|
|
48
|
+
/* eslint-enable indent */
|
|
47
49
|
new DuplicatePackageCheckerPlugin(),
|
|
48
50
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
49
51
|
maxChunks: 1
|
|
@@ -61,11 +63,13 @@ const baseConfig = (options) => ({
|
|
|
61
63
|
libraryTarget: "umd",
|
|
62
64
|
...options.output
|
|
63
65
|
},
|
|
66
|
+
// Merge with env dependent settings
|
|
64
67
|
optimization: options.optimization,
|
|
65
68
|
module: {
|
|
66
69
|
rules: [
|
|
67
70
|
{
|
|
68
71
|
test: /^(?!.*\.exec\.js$).*\.jsx?$/,
|
|
72
|
+
// Transform all .js and .jsx files with Babel
|
|
69
73
|
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
70
74
|
resolve: {
|
|
71
75
|
fullySpecified: false
|
|
@@ -80,6 +84,7 @@ const baseConfig = (options) => ({
|
|
|
80
84
|
},
|
|
81
85
|
{
|
|
82
86
|
test: /^(?!.*\.exec\.js$).*\.tsx?$/,
|
|
87
|
+
// Transform all .js and .jsx files with Babel
|
|
83
88
|
exclude: excludeNodeModulesExcept(modulesToTranspile),
|
|
84
89
|
resolve: {
|
|
85
90
|
fullySpecified: false
|
|
@@ -137,6 +142,11 @@ const baseConfig = (options) => ({
|
|
|
137
142
|
exclude: excludeNodeModulesExcept(["@elliemae/*"]),
|
|
138
143
|
type: "asset"
|
|
139
144
|
},
|
|
145
|
+
// {
|
|
146
|
+
// test: /(?<!\/iframe)\.html$/,
|
|
147
|
+
// exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
148
|
+
// use: 'html-loader',
|
|
149
|
+
// },
|
|
140
150
|
{
|
|
141
151
|
test: /\.(mp4|webm)$/,
|
|
142
152
|
exclude: excludeNodeModulesExcept(["@elliemae/*"]),
|
|
@@ -20,6 +20,11 @@ const getHtmlWebpackPlugins = () => {
|
|
|
20
20
|
};
|
|
21
21
|
var webpack_lib_dev_babel_default = baseConfig({
|
|
22
22
|
mode: "development",
|
|
23
|
+
// output: {
|
|
24
|
+
// filename: `js/${libraryName}.js`,
|
|
25
|
+
// chunkFilename: `js/${libraryName}.chunk.js`,
|
|
26
|
+
// assetModuleFilename: '[name][ext][query]',
|
|
27
|
+
// },
|
|
23
28
|
optimization: {
|
|
24
29
|
splitChunks: {
|
|
25
30
|
chunks: "all"
|
|
@@ -32,9 +37,14 @@ var webpack_lib_dev_babel_default = baseConfig({
|
|
|
32
37
|
...getHtmlWebpackPlugins(),
|
|
33
38
|
new CircularDependencyPlugin({
|
|
34
39
|
exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
|
|
40
|
+
// exclude node_modules
|
|
35
41
|
failOnError: false
|
|
42
|
+
// show a warning when there is a circular dependency
|
|
43
|
+
}),
|
|
44
|
+
new MiniCssExtractPlugin({
|
|
45
|
+
// filename: `css/${libraryName}.css`,
|
|
46
|
+
// chunkFilename: `css/${libraryName}.chunk.css`,
|
|
36
47
|
}),
|
|
37
|
-
new MiniCssExtractPlugin({}),
|
|
38
48
|
new webpack.ProgressPlugin()
|
|
39
49
|
],
|
|
40
50
|
devtool: "eval-source-map",
|
|
@@ -54,7 +54,10 @@ const prodConfig = {
|
|
|
54
54
|
},
|
|
55
55
|
plugins: [
|
|
56
56
|
...getHtmlWebpackPlugins(),
|
|
57
|
-
new MiniCssExtractPlugin({
|
|
57
|
+
new MiniCssExtractPlugin({
|
|
58
|
+
// filename: `css/${libraryName}.[contenthash].css`,
|
|
59
|
+
// chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
|
|
60
|
+
}),
|
|
58
61
|
...getCompressionPlugins(true),
|
|
59
62
|
new BundleAnalyzerPlugin({
|
|
60
63
|
analyzerMode: "static",
|
|
@@ -20,6 +20,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
|
|
|
20
20
|
entry: {
|
|
21
21
|
app: path.join(process.cwd(), "app/index")
|
|
22
22
|
},
|
|
23
|
+
// Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
|
|
23
24
|
output: {
|
|
24
25
|
path: buildPath,
|
|
25
26
|
publicPath: "auto",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.25.0",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@axe-core/react": "~4.5.2",
|
|
66
66
|
"@babel/cli": "~7.20.7",
|
|
67
|
-
"@babel/core": "~7.20.
|
|
67
|
+
"@babel/core": "~7.20.12",
|
|
68
68
|
"@babel/eslint-parser": "~7.19.1",
|
|
69
69
|
"@babel/node": "~7.20.7",
|
|
70
70
|
"@babel/plugin-proposal-class-properties": "~7.18.6",
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"@babel/preset-react": "~7.18.6",
|
|
80
80
|
"@babel/preset-typescript": "~7.18.6",
|
|
81
81
|
"@babel/runtime": "~7.20.7",
|
|
82
|
-
"@commitlint/cli": "~17.
|
|
83
|
-
"@commitlint/config-conventional": "~17.
|
|
82
|
+
"@commitlint/cli": "~17.4.2",
|
|
83
|
+
"@commitlint/config-conventional": "~17.4.2",
|
|
84
84
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.6.0",
|
|
85
85
|
"@faker-js/faker": "7.6.0",
|
|
86
|
-
"@nrwl/cli": "15.
|
|
87
|
-
"@nrwl/tao": "15.
|
|
88
|
-
"@nrwl/workspace": "15.
|
|
86
|
+
"@nrwl/cli": "15.5.1",
|
|
87
|
+
"@nrwl/tao": "15.5.1",
|
|
88
|
+
"@nrwl/workspace": "15.5.1",
|
|
89
89
|
"@pmmmwh/react-refresh-webpack-plugin": "~0.5.10",
|
|
90
90
|
"@semantic-release/changelog": "~6.0.2",
|
|
91
91
|
"@semantic-release/exec": "~6.0.3",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@storybook/addon-interactions": "~6.5.15",
|
|
97
97
|
"@storybook/addon-links": "~6.5.15",
|
|
98
98
|
"@storybook/addon-storysource": "~6.5.15",
|
|
99
|
-
"@storybook/builder-vite": "~0.
|
|
99
|
+
"@storybook/builder-vite": "~0.3.0",
|
|
100
100
|
"@storybook/builder-webpack5": "~6.5.15",
|
|
101
101
|
"@storybook/manager-webpack5": "~6.5.15",
|
|
102
102
|
"@storybook/react": "~6.5.15",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@stylelint/postcss-css-in-js": "~0.38.0",
|
|
105
105
|
"@svgr/webpack": "~6.5.1",
|
|
106
106
|
"@swc/cli": "~0.1.59",
|
|
107
|
-
"@swc/core": "~1.3.
|
|
107
|
+
"@swc/core": "~1.3.27",
|
|
108
108
|
"@swc/jest": "~0.2.24",
|
|
109
109
|
"@testing-library/jest-dom": "~5.16.5",
|
|
110
110
|
"@testing-library/react": "~13.4.0",
|
|
@@ -117,17 +117,17 @@
|
|
|
117
117
|
"@types/supertest": "~2.0.12",
|
|
118
118
|
"@types/uuid": "~9.0.0",
|
|
119
119
|
"@types/testing-library__jest-dom": "~5.14.5",
|
|
120
|
-
"@typescript-eslint/eslint-plugin": "~5.48.
|
|
121
|
-
"@typescript-eslint/parser": "~5.48.
|
|
122
|
-
"@vitejs/plugin-react": "~3.0.
|
|
123
|
-
"@vitest/coverage-c8": "~0.
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "~5.48.2",
|
|
121
|
+
"@typescript-eslint/parser": "~5.48.2",
|
|
122
|
+
"@vitejs/plugin-react": "~3.0.1",
|
|
123
|
+
"@vitest/coverage-c8": "~0.27.2",
|
|
124
124
|
"autoprefixer": "~10.4.13",
|
|
125
|
-
"axe-core": "~4.6.
|
|
125
|
+
"axe-core": "~4.6.2",
|
|
126
126
|
"babel-plugin-date-fns": "~2.0.0",
|
|
127
127
|
"babel-plugin-dynamic-import-node": "~2.3.3",
|
|
128
128
|
"babel-plugin-import-remove-resource-query": "~1.0.0",
|
|
129
129
|
"babel-plugin-lodash": "~3.3.4",
|
|
130
|
-
"babel-plugin-module-resolver": "~
|
|
130
|
+
"babel-plugin-module-resolver": "~5.0.0",
|
|
131
131
|
"babel-plugin-source-map-support": "~2.2.0",
|
|
132
132
|
"babel-plugin-styled-components": "~2.0.7",
|
|
133
133
|
"babel-plugin-transform-react-remove-prop-types": "~0.4.24",
|
|
@@ -146,35 +146,35 @@
|
|
|
146
146
|
"css-loader": "~6.7.3",
|
|
147
147
|
"css-minimizer-webpack-plugin": "~4.2.2",
|
|
148
148
|
"depcheck": "~1.4.3",
|
|
149
|
-
"docdash": "~2.0.
|
|
149
|
+
"docdash": "~2.0.1",
|
|
150
150
|
"dotenv": "~16.0.3",
|
|
151
151
|
"dotenv-webpack": "~8.0.1",
|
|
152
152
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
153
153
|
"enhanced-resolve": "5.12.0",
|
|
154
|
-
"esbuild": "~0.
|
|
155
|
-
"esbuild-loader": "~2.
|
|
154
|
+
"esbuild": "~0.17.2",
|
|
155
|
+
"esbuild-loader": "~2.21.0",
|
|
156
156
|
"esbuild-plugin-svgr": "~1.0.1",
|
|
157
|
-
"eslint": "~8.
|
|
157
|
+
"eslint": "~8.32.0",
|
|
158
158
|
"eslint-config-airbnb": "~19.0.4",
|
|
159
159
|
"eslint-config-airbnb-base": "~15.0.0",
|
|
160
160
|
"eslint-config-airbnb-typescript": "~17.0.0",
|
|
161
161
|
"eslint-config-prettier": "~8.6.0",
|
|
162
162
|
"eslint-config-react-app": "~7.0.1",
|
|
163
|
-
"eslint-import-resolver-babel-module": "~5.3.
|
|
164
|
-
"eslint-import-resolver-typescript": "~3.5.
|
|
163
|
+
"eslint-import-resolver-babel-module": "~5.3.2",
|
|
164
|
+
"eslint-import-resolver-typescript": "~3.5.3",
|
|
165
165
|
"eslint-import-resolver-webpack": "~0.13.2",
|
|
166
166
|
"eslint-plugin-compat": "~4.0.2",
|
|
167
167
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
168
|
-
"eslint-plugin-import": "~2.
|
|
169
|
-
"eslint-plugin-jest": "~27.2.
|
|
168
|
+
"eslint-plugin-import": "~2.27.5",
|
|
169
|
+
"eslint-plugin-jest": "~27.2.1",
|
|
170
170
|
"eslint-plugin-jsdoc": "~39.6.4",
|
|
171
|
-
"eslint-plugin-jsx-a11y": "~6.
|
|
171
|
+
"eslint-plugin-jsx-a11y": "~6.7.1",
|
|
172
172
|
"eslint-plugin-mdx": "~2.0.5",
|
|
173
173
|
"eslint-plugin-prettier": "~4.2.1",
|
|
174
|
-
"eslint-plugin-react": "~7.
|
|
174
|
+
"eslint-plugin-react": "~7.32.1",
|
|
175
175
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
176
176
|
"eslint-plugin-redux-saga": "~1.3.2",
|
|
177
|
-
"eslint-plugin-storybook": "~0.6.
|
|
177
|
+
"eslint-plugin-storybook": "~0.6.10",
|
|
178
178
|
"eslint-plugin-testing-library": "~5.9.1",
|
|
179
179
|
"eslint-plugin-wdio": "~8.0.14",
|
|
180
180
|
"execa": "~6.1.0",
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"fast-glob": "~3.2.12",
|
|
187
187
|
"find-up": "~6.3.0",
|
|
188
188
|
"find-up-cli": "~5.0.0",
|
|
189
|
-
"happy-dom": "~8.1.
|
|
189
|
+
"happy-dom": "~8.1.4",
|
|
190
190
|
"helmet-csp": "~3.4.0",
|
|
191
191
|
"html-loader": "~4.2.0",
|
|
192
192
|
"html-webpack-plugin": "~5.5.0",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"jest-watch-typeahead": "~2.2.1",
|
|
204
204
|
"jscodeshift": "~0.14.0",
|
|
205
205
|
"jsdoc": "~4.0.0",
|
|
206
|
-
"lerna": "~6.
|
|
206
|
+
"lerna": "~6.4.1",
|
|
207
207
|
"lint-staged": "~13.1.0",
|
|
208
208
|
"mini-css-extract-plugin": "~2.7.2",
|
|
209
209
|
"minimist": "~1.2.7",
|
|
@@ -218,14 +218,14 @@
|
|
|
218
218
|
"pino": "~8.8.0",
|
|
219
219
|
"pino-pretty": "~9.1.1",
|
|
220
220
|
"plop": "~3.1.1",
|
|
221
|
-
"postcss": "~8.4.
|
|
221
|
+
"postcss": "~8.4.21",
|
|
222
222
|
"postcss-html": "~1.5.0",
|
|
223
223
|
"postcss-jsx": "~0.36.4",
|
|
224
224
|
"postcss-loader": "~7.0.2",
|
|
225
225
|
"postcss-markdown": "~1.2.0",
|
|
226
226
|
"postcss-preset-env": "~7.8.3",
|
|
227
227
|
"postcss-syntax": "~0.36.2",
|
|
228
|
-
"prettier": "~2.8.
|
|
228
|
+
"prettier": "~2.8.3",
|
|
229
229
|
"pug": "~3.0.2",
|
|
230
230
|
"pug-loader": "~2.4.0",
|
|
231
231
|
"raf": "~3.4.1",
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
"react-test-renderer": "~18.2.0",
|
|
235
235
|
"resize-observer-polyfill": "~1.5.1",
|
|
236
236
|
"resolve-typescript-plugin": "~2.0.0",
|
|
237
|
-
"rimraf": "~
|
|
237
|
+
"rimraf": "~4.1.0",
|
|
238
238
|
"semantic-release": "~19.0.5",
|
|
239
239
|
"slackify-markdown": "~4.3.1",
|
|
240
240
|
"speed-measure-webpack-plugin": "~1.5.0",
|
|
@@ -249,13 +249,13 @@
|
|
|
249
249
|
"swc-loader": "~0.2.3",
|
|
250
250
|
"ts-node": "~10.9.1",
|
|
251
251
|
"tsc-alias": "~1.8.2",
|
|
252
|
-
"typedoc": "~0.23.
|
|
252
|
+
"typedoc": "~0.23.24",
|
|
253
253
|
"typescript": "~4.9.4",
|
|
254
254
|
"update-notifier": "~6.0.2",
|
|
255
255
|
"url-loader": "~4.1.1",
|
|
256
256
|
"uuid": "~9.0.0",
|
|
257
257
|
"vite": "~4.0.4",
|
|
258
|
-
"vitest": "~0.
|
|
258
|
+
"vitest": "~0.27.2",
|
|
259
259
|
"vite-tsconfig-paths": "~4.0.3",
|
|
260
260
|
"webpack": "~5.75.0",
|
|
261
261
|
"webpack-bundle-analyzer": "~4.7.0",
|