@elliemae/pui-cli 5.17.3 → 5.20.1

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.
@@ -74,6 +74,7 @@ const jestConfig = {
74
74
  testRegex: '(app|lib).*/tests/.*\\.test\\.(js|ts)$',
75
75
  snapshotSerializers: [],
76
76
  testResultsProcessor: 'jest-sonar-reporter',
77
+ resolver: 'ts-jest-resolver',
77
78
  transformIgnorePatterns: [
78
79
  'node_modules/(?!(@elliemae/*|lodash-es/*)/)',
79
80
  'node_modules/@elliemae/em-platform-document-viewer',
@@ -1,6 +1,9 @@
1
+ /* eslint-disable max-lines */
1
2
  const path = require('path');
2
3
  const fs = require('fs');
3
4
  const _ = require('lodash');
5
+ const CompressionPlugin = require('compression-webpack-plugin');
6
+ const zlib = require('zlib');
4
7
 
5
8
  let pathSep = path.sep;
6
9
  if (pathSep === '\\')
@@ -122,7 +125,6 @@ const getAppLoaderFileName = () => {
122
125
 
123
126
  const getDiagnosticsFileName = () => {
124
127
  const libName = 'emuiDiagnostics';
125
- // eslint-disable-next-line max-lines
126
128
  const libPath = path.join(
127
129
  process.cwd(),
128
130
  'node_modules/@elliemae/pui-diagnostics/dist/public/js',
@@ -185,6 +187,38 @@ const isGoogleTagManagerEnabled = () => {
185
187
  return !!appConfig?.googleTagManager;
186
188
  };
187
189
 
190
+ const getCompressionPlugins = () => {
191
+ const commonConfig = {
192
+ test: /\.(js|css)$/,
193
+ exclude: [
194
+ /\/adrum-ext/,
195
+ /\/emuiUserMonitoring/,
196
+ /\/emuiDiagnostics/,
197
+ /\/emuiAppLoader/,
198
+ /\/encwLoader/,
199
+ ],
200
+ // 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
201
+ minRatio: Number.MAX_SAFE_INTEGER,
202
+ };
203
+ return [
204
+ new CompressionPlugin({
205
+ filename: '[path][base].gz',
206
+ algorithm: 'gzip',
207
+ ...commonConfig,
208
+ }),
209
+ new CompressionPlugin({
210
+ filename: '[path][base].br',
211
+ algorithm: 'brotliCompress',
212
+ ...commonConfig,
213
+ compressionOptions: {
214
+ params: {
215
+ [zlib.constants.BROTLI_PARAM_QUALITY]: 11,
216
+ },
217
+ },
218
+ }),
219
+ ];
220
+ };
221
+
188
222
  exports.excludeNodeModulesExcept = excludeNodeModulesExcept;
189
223
  exports.getLibraryName = getLibraryName;
190
224
  exports.getAppConfig = getAppConfig;
@@ -209,3 +243,4 @@ exports.resolveExtensions = [
209
243
  ];
210
244
  exports.mainFields = ['browser', 'module', 'main'];
211
245
  exports.isGoogleTagManagerEnabled = isGoogleTagManagerEnabled;
246
+ exports.getCompressionPlugins = getCompressionPlugins;
@@ -64,21 +64,29 @@ const plugins = [
64
64
  {
65
65
  from: 'node_modules/@elliemae/pui-user-monitoring/dist/public/js',
66
66
  to: 'js',
67
+ toType: 'dir',
68
+ info: { minimized: true },
67
69
  },
68
70
  {
69
- from: 'node_modules/@elliemae/pui-app-loader/dist/public/js/emuiAppLoader*.js',
70
- to: 'js/[name][ext]',
71
+ from: 'node_modules/@elliemae/pui-app-loader/dist/public/js',
72
+ to: 'js',
73
+ toType: 'dir',
71
74
  noErrorOnMissing: true,
75
+ info: { minimized: true },
72
76
  },
73
77
  {
74
- from: 'node_modules/@elliemae/encw-loader/dist/public/js/emuiEncwLoader*.js',
75
- to: 'js/[name][ext]',
78
+ from: 'node_modules/@elliemae/encw-loader/dist/public/js',
79
+ to: 'js',
80
+ toType: 'dir',
76
81
  noErrorOnMissing: true,
82
+ info: { minimized: true },
77
83
  },
78
84
  {
79
- from: 'node_modules/@elliemae/pui-diagnostics/dist/public/js/emuiDiagnostics*.js',
80
- to: 'js/[name][ext]',
85
+ from: 'node_modules/@elliemae/pui-diagnostics/dist/public/js',
86
+ to: 'js',
87
+ toType: 'dir',
81
88
  noErrorOnMissing: true,
89
+ info: { minimized: true },
82
90
  },
83
91
  {
84
92
  from: 'public',
@@ -11,6 +11,7 @@ const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack
11
11
  const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
12
12
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
13
13
  const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
14
+ const ResolveTypeScriptPlugin = require('resolve-typescript-plugin').default;
14
15
 
15
16
  const {
16
17
  excludeNodeModulesExcept,
@@ -231,6 +232,7 @@ module.exports = (options) => ({
231
232
  ...getAlias(),
232
233
  ...((options.resolve || {}).alias || {}),
233
234
  },
235
+ plugins: [new ResolveTypeScriptPlugin()],
234
236
  },
235
237
  externals: {
236
238
  '@elliemae/pui-user-monitoring': 'emuiUserMonitoring',
@@ -1,11 +1,10 @@
1
1
  const path = require('path');
2
2
  const TerserPlugin = require('terser-webpack-plugin');
3
- const CompressionPlugin = require('compression-webpack-plugin');
4
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
5
4
  const HtmlWebpackPlugin = require('html-webpack-plugin');
6
5
  const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
7
6
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
8
- const { getLibraryName } = require('./helpers');
7
+ const { getLibraryName, getCompressionPlugins } = require('./helpers');
9
8
 
10
9
  const libraryName = getLibraryName();
11
10
 
@@ -69,13 +68,7 @@ module.exports = require('./webpack.lib.base.babel')({
69
68
  chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
70
69
  }),
71
70
 
72
- new CompressionPlugin({
73
- filename: '[path][base].gz',
74
- algorithm: 'gzip',
75
- test: /\.js$|\.css$$/,
76
- // 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
77
- minRatio: Number.MAX_SAFE_INTEGER,
78
- }),
71
+ ...getCompressionPlugins(),
79
72
 
80
73
  new BundleAnalyzerPlugin({
81
74
  analyzerMode: 'static',
@@ -1,8 +1,8 @@
1
+ /* eslint-disable max-lines */
1
2
  const path = require('path');
2
3
  const HtmlWebpackPlugin = require('html-webpack-plugin');
3
4
  const { GenerateSW } = require('workbox-webpack-plugin');
4
5
  const TerserPlugin = require('terser-webpack-plugin');
5
- const CompressionPlugin = require('compression-webpack-plugin');
6
6
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
7
7
  const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
8
8
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
@@ -15,6 +15,7 @@ const {
15
15
  getPaths,
16
16
  getAppVersion,
17
17
  isGoogleTagManagerEnabled,
18
+ getCompressionPlugins,
18
19
  } = require('./helpers');
19
20
 
20
21
  const getProdConfig = ({ latestVersion = true } = {}) => {
@@ -74,14 +75,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
74
75
  chunkFilename: 'css/[name].[contenthash].chunk.css',
75
76
  }),
76
77
 
77
- new CompressionPlugin({
78
- filename: '[path][base].gz',
79
- algorithm: 'gzip',
80
- test: /\.js$|\.css$$/,
81
- exclude: [/\/adrum-ext/, /\/emuiUserMonitoring/],
82
- // 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
83
- minRatio: Number.MAX_SAFE_INTEGER,
84
- }),
78
+ ...getCompressionPlugins(),
85
79
 
86
80
  new BundleAnalyzerPlugin({
87
81
  analyzerMode: 'static',
@@ -120,7 +114,6 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
120
114
  ? 'app/index.html'
121
115
  : 'app/index-app-loader.html',
122
116
  minify: {
123
- // eslint-disable-next-line max-lines
124
117
  removeComments: true,
125
118
  collapseWhitespace: true,
126
119
  removeRedundantAttributes: true,
@@ -2,7 +2,6 @@
2
2
  const webpack = require('webpack');
3
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
4
  const CopyWebpackPlugin = require('copy-webpack-plugin');
5
- const CompressionPlugin = require('compression-webpack-plugin');
6
5
  const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
7
6
  const {
8
7
  getAppConfig,
@@ -13,6 +12,7 @@ const {
13
12
  resolveExtensions,
14
13
  mainFields,
15
14
  getMediaPath,
15
+ getCompressionPlugins,
16
16
  } = require('./helpers');
17
17
 
18
18
  const IS_APP = isApp();
@@ -50,14 +50,6 @@ const getAdditionalPlugins = () => [
50
50
  }),
51
51
  ];
52
52
 
53
- const compressionPlugin = new CompressionPlugin({
54
- filename: '[path][base].gz',
55
- algorithm: 'gzip',
56
- test: /\.js$|\.css$$/,
57
- // 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
58
- minRatio: Number.MAX_SAFE_INTEGER,
59
- });
60
-
61
53
  const getModulePreRules = () => [
62
54
  {
63
55
  test: /\.(jpe?g|png|gif|svg|ico)$/,
@@ -150,7 +142,7 @@ exports.webpackFinal = async (config, { configType }) => {
150
142
 
151
143
  config.plugins.push(...getAdditionalPlugins());
152
144
  if (isProd) {
153
- config.plugins.push(compressionPlugin);
145
+ config.plugins = config.plugins.concat(getCompressionPlugins());
154
146
  }
155
147
 
156
148
  config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
@@ -168,7 +160,7 @@ exports.webpackFinal = async (config, { configType }) => {
168
160
 
169
161
  // storybook manager webpack
170
162
  exports.managerWebpack = async (config) => {
171
- config.plugins.push(compressionPlugin);
163
+ config.plugins = config.plugins.concat(getCompressionPlugins());
172
164
  config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
173
165
  return config;
174
166
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "5.17.3",
3
+ "version": "5.20.1",
4
4
  "private": false,
5
5
  "description": "EllieMae Platform UI CLI",
6
6
  "sideEffects": false,
@@ -66,7 +66,7 @@
66
66
  "@commitlint/cli": "~15.0.0",
67
67
  "@commitlint/config-conventional": "~15.0.0",
68
68
  "@elliemae/browserslist-config-elliemae": "~1.2.1",
69
- "@pmmmwh/react-refresh-webpack-plugin": "~0.5.2",
69
+ "@pmmmwh/react-refresh-webpack-plugin": "~0.5.3",
70
70
  "@semantic-release/changelog": "~6.0.1",
71
71
  "@semantic-release/exec": "~6.0.2",
72
72
  "@semantic-release/git": "~10.0.1",
@@ -89,15 +89,15 @@
89
89
  "@storybook/theming": "~6.3.12",
90
90
  "@stylelint/postcss-css-in-js": "~0.37.2",
91
91
  "@svgr/webpack": "~5.5.0",
92
- "@testing-library/jest-dom": "~5.15.1",
92
+ "@testing-library/jest-dom": "~5.16.0",
93
93
  "@testing-library/react": "~12.1.2",
94
94
  "@testing-library/react-hooks": "~7.0.2",
95
95
  "@types/jest": "~27.0.3",
96
- "@types/node": "~16.11.10",
96
+ "@types/node": "~16.11.11",
97
97
  "@types/rimraf": "~3.0.2",
98
- "@types/testing-library__jest-dom": "~5.14.1",
99
- "@typescript-eslint/eslint-plugin": "~5.4.0",
100
- "@typescript-eslint/parser": "~5.4.0",
98
+ "@types/testing-library__jest-dom": "~5.14.2",
99
+ "@typescript-eslint/eslint-plugin": "~5.5.0",
100
+ "@typescript-eslint/parser": "~5.5.0",
101
101
  "autoprefixer": "~10.4.0",
102
102
  "axe-core": "~4.3.5",
103
103
  "babel-loader": "~8.2.3",
@@ -108,7 +108,7 @@
108
108
  "babel-plugin-lodash": "~3.3.4",
109
109
  "babel-plugin-module-resolver": "~4.1.0",
110
110
  "babel-plugin-source-map-support": "~2.1.3",
111
- "babel-plugin-styled-components": "~2.0.1",
111
+ "babel-plugin-styled-components": "~2.0.2",
112
112
  "babel-plugin-transform-react-remove-prop-types": "~0.4.24",
113
113
  "babel-plugin-transform-remove-console": "~6.9.4",
114
114
  "babel-plugin-transform-strip-block": "~0.0.4",
@@ -132,7 +132,7 @@
132
132
  "dotenv": "~10.0.0",
133
133
  "dotenv-webpack": "~7.0.3",
134
134
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
135
- "eslint": "~8.3.0",
135
+ "eslint": "~8.4.0",
136
136
  "eslint-config-airbnb": "~18.2.1",
137
137
  "eslint-config-airbnb-base": "~15.0.0",
138
138
  "eslint-config-airbnb-typescript": "~15.0.0",
@@ -145,20 +145,20 @@
145
145
  "eslint-plugin-eslint-comments": "~3.2.0",
146
146
  "eslint-plugin-import": "~2.25.3",
147
147
  "eslint-plugin-jest": "~25.3.0",
148
- "eslint-plugin-jsdoc": "~37.0.3",
148
+ "eslint-plugin-jsdoc": "~37.1.0",
149
149
  "eslint-plugin-jsx-a11y": "~6.5.1",
150
150
  "eslint-plugin-mdx": "~1.16.0",
151
151
  "eslint-plugin-prettier": "~4.0.0",
152
152
  "eslint-plugin-react": "~7.27.1",
153
153
  "eslint-plugin-react-hooks": "~4.3.0",
154
154
  "eslint-plugin-redux-saga": "~1.2.1",
155
- "eslint-plugin-testing-library": "~5.0.0",
155
+ "eslint-plugin-testing-library": "~5.0.1",
156
156
  "eslint-plugin-wdio": "~7.4.2",
157
157
  "execa": "~5.1.1",
158
158
  "express": "~4.17.1",
159
159
  "express-pino-logger": "~7.0.0",
160
160
  "file-loader": "~6.2.0",
161
- "fork-ts-checker-webpack-plugin": "~6.4.2",
161
+ "fork-ts-checker-webpack-plugin": "~6.5.0",
162
162
  "helmet-csp": "~3.4.0",
163
163
  "html-loader": "~3.0.1",
164
164
  "html-webpack-plugin": "~5.5.0",
@@ -169,7 +169,7 @@
169
169
  "imports-loader": "~3.1.1",
170
170
  "ip": "~1.1.5",
171
171
  "jest-axe": "~5.0.1",
172
- "jest-cli": "~27.3.1",
172
+ "jest-cli": "~27.4.3",
173
173
  "jest-sonar-reporter": "~2.0.0",
174
174
  "jest-styled-components": "~7.0.8",
175
175
  "jscodeshift": "~0.13.0",
@@ -179,23 +179,23 @@
179
179
  "minimist": "~1.2.5",
180
180
  "moment": "~2.29.1",
181
181
  "moment-locales-webpack-plugin": "~1.2.0",
182
- "msw": "~0.35.0",
183
- "node-plop": "~0.26.3",
182
+ "msw": "~0.36.0",
183
+ "node-plop": "~0.30.0",
184
184
  "nodemon": "~2.0.15",
185
185
  "npm-check-updates": "12.0.2",
186
186
  "null-loader": "~4.0.1",
187
- "pino": "~7.4.1",
187
+ "pino": "~7.5.1",
188
188
  "pino-pretty": "~7.2.0",
189
189
  "pinst": "~2.1.6",
190
- "plop": "~2.7.6",
191
- "postcss": "~8.4.0",
190
+ "plop": "~3.0.2",
191
+ "postcss": "~8.4.4",
192
192
  "postcss-jsx": "~0.36.4",
193
193
  "postcss-html": "~1.3.0",
194
194
  "postcss-markdown": "~1.2.0",
195
195
  "postcss-syntax": "~0.36.2",
196
- "postcss-loader": "~6.2.0",
196
+ "postcss-loader": "~6.2.1",
197
197
  "postcss-preset-env": "~7.0.1",
198
- "prettier": "~2.4.1",
198
+ "prettier": "~2.5.1",
199
199
  "pug": "~3.0.2",
200
200
  "pug-loader": "~2.4.0",
201
201
  "raf": "~3.4.1",
@@ -204,6 +204,7 @@
204
204
  "react-docgen": "~5.4.0",
205
205
  "react-refresh": "~0.11.0",
206
206
  "react-test-renderer": "~17.0.2",
207
+ "resolve-typescript-plugin": "~1.1.1",
207
208
  "resize-observer-polyfill": "~1.5.1",
208
209
  "rimraf": "~3.0.2",
209
210
  "script-loader": "~0.7.2",
@@ -220,17 +221,18 @@
220
221
  "svg-url-loader": "~7.1.1",
221
222
  "svgo": "~2.8.0",
222
223
  "terser-webpack-plugin": "~5.2.5",
224
+ "ts-jest-resolver": "~2.0.0",
223
225
  "ts-node": "~10.4.0",
224
- "tsc-alias": "~1.4.1",
226
+ "tsc-alias": "~1.4.2",
225
227
  "tsc-files": "~1.1.3",
226
228
  "tsconfig-paths": "~3.12.0",
227
229
  "tsconfig-paths-webpack-plugin": "~3.5.2",
228
- "type-fest": "~2.6.0",
230
+ "type-fest": "~2.8.0",
229
231
  "typescript": "~4.5.2",
230
232
  "update-notifier": "~5.1.0",
231
233
  "url-loader": "~4.1.1",
232
234
  "uuid": "~8.3.2",
233
- "webpack": "~5.64.3",
235
+ "webpack": "~5.64.4",
234
236
  "webpack-bundle-analyzer": "~4.5.0",
235
237
  "webpack-cli": "~4.9.1",
236
238
  "webpack-dev-middleware": "~5.2.2",
@@ -240,8 +242,8 @@
240
242
  "webpack-pwa-manifest": "~4.3.0",
241
243
  "webpack-strip-block": "~0.3.0",
242
244
  "whatwg-fetch": "~3.6.2",
243
- "workbox-webpack-plugin": "~6.4.1",
244
- "yargs": "~17.2.1"
245
+ "workbox-webpack-plugin": "~6.4.2",
246
+ "yargs": "~17.3.0"
245
247
  },
246
248
  "devDependencies": {
247
249
  "redux": "~4.1.2",