@elliemae/pui-cli 6.13.0-beta.2 → 6.13.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.
@@ -1,22 +1,17 @@
1
- const path = require('path');
2
1
  const { exit } = require('yargs');
3
2
  const { exec, logError, logSuccess } = require('./utils');
4
3
 
4
+ const { name } = require('../../package.json');
5
+
5
6
  async function startProdServer() {
6
7
  await exec(
7
- `cross-env NODE_ENV=production ts-node ${path.resolve(
8
- __dirname,
9
- '../server',
10
- )} --color always`,
8
+ `cross-env NODE_ENV=production ts-node node_modules/${name}/lib/server --color always`,
11
9
  );
12
10
  }
13
11
 
14
12
  async function startDevServer() {
15
13
  await exec(
16
- `cross-env NODE_ENV=development webpack serve --config ${path.resolve(
17
- __dirname,
18
- '../webpack/webpack.dev.babel.js',
19
- )}`,
14
+ `cross-env NODE_ENV=development ts-node node_modules/${name}/lib/server --color always`,
20
15
  );
21
16
  }
22
17
 
@@ -28,19 +28,19 @@ const getNodeModulesPath = (fileName) => {
28
28
 
29
29
  const jestConfig = {
30
30
  collectCoverageFrom: [
31
- 'app/**/*.{js, ts, jsx, tsx}',
32
- 'lib/**/*.{js, ts, jsx, tsx}',
33
- '!app/**/*.test.{js, ts, jsx, tsx}',
34
- '!lib/**/*.test.{js, ts, jsx, tsx}',
35
- '!app/**/*.stories.{js, ts, jsx, tsx}',
36
- '!lib/**/*.stories.{js, ts, jsx, tsx}',
37
- '!app/**/*.endpoint.{js, ts, jsx, tsx}',
38
- '!lib/**/*.endpoint.{js, ts, jsx, tsx}',
39
- '!app/*/RbGenerated*/*.{js, ts, jsx, tsx}',
40
- '!app/index.{js, ts, jsx, tsx}',
41
- '!app/global-styles.{js, ts, jsx, tsx}',
42
- '!app/**/loadable.{js, ts, jsx, tsx}',
43
- '!lib/**/loadable.{js, ts, jsx, tsx}',
31
+ 'app/**/*.{js,ts,jsx,tsx}',
32
+ 'lib/**/*.{js,ts,jsx,tsx}',
33
+ '!app/**/*.test.{js,ts,jsx,tsx}',
34
+ '!lib/**/*.test.{js,ts,jsx,tsx}',
35
+ '!app/**/*.stories.{js,ts,jsx,tsx}',
36
+ '!lib/**/*.stories.{js,ts,jsx,tsx}',
37
+ '!app/**/*.endpoint.{js,ts,jsx,tsx}',
38
+ '!lib/**/*.endpoint.{js,ts,jsx,tsx}',
39
+ '!app/*/RbGenerated*/*.{js,ts,jsx,tsx}',
40
+ '!app/index.{js,ts,jsx,tsx}',
41
+ '!app/global-styles.{js,ts,jsx,tsx}',
42
+ '!app/**/loadable.{js,ts,jsx,tsx}',
43
+ '!lib/**/loadable.{js,ts,jsx,tsx}',
44
44
  ],
45
45
  coverageThreshold: {
46
46
  // Todo: enable the coverage threshold later
@@ -4,7 +4,7 @@ import path from 'path';
4
4
 
5
5
  export default defineConfig({
6
6
  test: {
7
- global: true,
7
+ globals: true,
8
8
  root: process.cwd(),
9
9
  exclude: ['node_modules', 'dist', '.idea', '.git', '.cache', 'e2e'],
10
10
  setupFiles: [path.resolve(__dirname, './vitest.setup.ts')],
@@ -150,6 +150,7 @@ const getENCWLoaderFileName = () => {
150
150
  )[0];
151
151
  };
152
152
 
153
+ // base path for index page
153
154
  const getAssetPath = () => (process.env.ASSET_PATH || '/').replace(/\/?$/, '/');
154
155
 
155
156
  const getAppVersion = () => {
@@ -160,7 +161,7 @@ const getAppVersion = () => {
160
161
 
161
162
  const getPaths = (latestVersion = true) => {
162
163
  const version = latestVersion ? LATEST_VERSION : getAppVersion();
163
- const publicPath = `${version}/`;
164
+ const publicPath = `${getAssetPath()}${version}/`;
164
165
  const timeStampQuery =
165
166
  process.env.PUI_PIPELINE !== 'true' ? `?timeStamp=${Date.now()}` : '';
166
167
  return {
@@ -29,13 +29,13 @@ const finalCSSLoader = (mode) =>
29
29
  mode !== 'production' ? { loader: 'style-loader' } : minicssLoader;
30
30
 
31
31
  const postcssPlugins = [PostcssPresetEnv({ autoprefixer: { grid: true } })];
32
- const { buildPath } = getPaths();
32
+ const { buildPath, publicPath } = getPaths();
33
33
 
34
34
  const plugins = [
35
35
  new webpack.EnvironmentPlugin({
36
36
  NODE_ENV: 'development',
37
37
  ASSET_PATH: '/',
38
- // PUBLIC_PATH: publicPath,
38
+ PUBLIC_PATH: publicPath,
39
39
  CI: 'false',
40
40
  }),
41
41
  new webpack.DefinePlugin({
@@ -126,7 +126,7 @@ module.exports = (options) => ({
126
126
  output: {
127
127
  clean: true,
128
128
  path: buildPath,
129
- publicPath: 'auto',
129
+ publicPath,
130
130
  ...options.output,
131
131
  }, // Merge with env dependent settings
132
132
  optimization: options.optimization,
@@ -9,6 +9,7 @@ const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
9
9
  const smp = new SpeedMeasurePlugin({ disable: !process.env.MEASURE });
10
10
 
11
11
  const {
12
+ getAssetPath,
12
13
  isAppLoaderEnabled,
13
14
  getPaths,
14
15
  isGoogleTagManagerEnabled,
@@ -17,6 +18,7 @@ const baseConfigFactory = require('./webpack.base.babel');
17
18
 
18
19
  const {
19
20
  appVersion,
21
+ publicPath,
20
22
  userMonScriptPath,
21
23
  globalScriptPath,
22
24
  appLoaderScriptPath,
@@ -80,6 +82,8 @@ const devConfig = {
80
82
  : 'app/index-app-loader.html',
81
83
  emui: {
82
84
  appVersion,
85
+ assetPath: publicPath,
86
+ basePath: getAssetPath(),
83
87
  globalScriptPath,
84
88
  userMonScriptPath,
85
89
  appLoaderScriptPath,
@@ -103,8 +107,6 @@ const devConfig = {
103
107
  performance: {
104
108
  hints: false,
105
109
  },
106
-
107
- devServer: {},
108
110
  };
109
111
 
110
112
  const config = smp.wrap(baseConfigFactory(devConfig));
@@ -26,7 +26,6 @@ module.exports = require('./webpack.lib.base.babel')({
26
26
 
27
27
  plugins: [
28
28
  new HtmlWebpackPlugin({
29
- scriptLoading: 'module',
30
29
  inject: true, // Inject all files that are generated by webpack, e.g. bundle.js
31
30
  template: 'lib/index.pug',
32
31
  filename: 'index.html',
@@ -36,7 +36,6 @@ module.exports = require('./webpack.lib.base.babel')({
36
36
 
37
37
  plugins: [
38
38
  new HtmlWebpackPlugin({
39
- scriptLoading: 'module',
40
39
  template: 'lib/index.pug',
41
40
  filename: 'index.html',
42
41
  libraryName,
@@ -10,6 +10,7 @@ const browserslistToEsbuild = require('browserslist-to-esbuild');
10
10
 
11
11
  const baseConfigFactory = require('./webpack.base.babel');
12
12
  const {
13
+ getAssetPath,
13
14
  isAppLoaderEnabled,
14
15
  LATEST_VERSION,
15
16
  getPaths,
@@ -19,7 +20,7 @@ const {
19
20
  } = require('./helpers');
20
21
 
21
22
  const getProdConfig = ({ latestVersion = true } = {}) => {
22
- const { buildPath } = getPaths(latestVersion);
23
+ const { buildPath, publicPath } = getPaths(latestVersion);
23
24
 
24
25
  return {
25
26
  mode: 'production',
@@ -31,7 +32,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
31
32
  // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
32
33
  output: {
33
34
  path: buildPath,
34
- publicPath: 'auto',
35
+ publicPath,
35
36
  filename: 'js/[name].[contenthash].js',
36
37
  chunkFilename: 'js/[name].[contenthash].chunk.js',
37
38
  assetModuleFilename: 'assets/[name].[hash][ext][query]',
@@ -93,6 +94,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
93
94
  };
94
95
 
95
96
  const {
97
+ publicPath,
96
98
  userMonScriptPath,
97
99
  globalScriptPath,
98
100
  appLoaderScriptPath,
@@ -119,6 +121,8 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
119
121
  },
120
122
  emui: {
121
123
  appVersion: 'latest',
124
+ assetPath: publicPath,
125
+ basePath: getAssetPath(),
122
126
  globalScriptPath,
123
127
  userMonScriptPath,
124
128
  appLoaderScriptPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.13.0-beta.2",
3
+ "version": "6.13.1",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@babel/cli": "~7.17.6",
51
- "@babel/core": "~7.17.7",
51
+ "@babel/core": "~7.17.8",
52
52
  "@babel/eslint-parser": "~7.17.0",
53
53
  "@babel/node": "~7.16.8",
54
54
  "@babel/plugin-proposal-class-properties": "~7.16.7",
@@ -62,14 +62,14 @@
62
62
  "@babel/preset-env": "~7.16.11",
63
63
  "@babel/preset-react": "~7.16.7",
64
64
  "@babel/preset-typescript": "~7.16.7",
65
- "@babel/runtime": "~7.17.7",
65
+ "@babel/runtime": "~7.17.8",
66
66
  "@commitlint/cli": "~16.2.3",
67
67
  "@commitlint/config-conventional": "~16.2.1",
68
68
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.3.0",
69
- "@faker-js/faker": "6.0.0",
70
- "@nrwl/cli": "13.9.2",
71
- "@nrwl/tao": "13.9.2",
72
- "@nrwl/workspace": "13.9.2",
69
+ "@faker-js/faker": "6.1.1",
70
+ "@nrwl/cli": "13.9.5",
71
+ "@nrwl/tao": "13.9.5",
72
+ "@nrwl/workspace": "13.9.5",
73
73
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.4",
74
74
  "@semantic-release/changelog": "~6.0.1",
75
75
  "@semantic-release/exec": "~6.0.3",
@@ -86,21 +86,21 @@
86
86
  "@storybook/theming": "~6.4.19",
87
87
  "@stylelint/postcss-css-in-js": "~0.37.2",
88
88
  "@svgr/webpack": "~6.2.1",
89
- "@swc/cli": "~0.1.55",
90
- "@swc/core": "~1.2.156",
89
+ "@swc/cli": "~0.1.57",
90
+ "@swc/core": "~1.2.161",
91
91
  "@swc/jest": "~0.2.20",
92
- "@testing-library/jest-dom": "~5.16.2",
93
- "@testing-library/react": "~12.1.4",
92
+ "@testing-library/jest-dom": "~5.16.3",
93
+ "@testing-library/react": "~13.0.0",
94
94
  "@testing-library/react-hooks": "~7.0.2",
95
95
  "@types/jest": "~27.4.1",
96
- "@types/node": "~17.0.21",
96
+ "@types/node": "~17.0.23",
97
97
  "@types/rimraf": "~3.0.2",
98
98
  "@types/testing-library__jest-dom": "~5.14.3",
99
- "@typescript-eslint/eslint-plugin": "~5.15.0",
100
- "@typescript-eslint/parser": "~5.15.0",
99
+ "@typescript-eslint/eslint-plugin": "~5.17.0",
100
+ "@typescript-eslint/parser": "~5.17.0",
101
101
  "autoprefixer": "~10.4.4",
102
102
  "axe-core": "~4.4.1",
103
- "babel-loader": "~8.2.3",
103
+ "babel-loader": "~8.2.4",
104
104
  "babel-plugin-add-import-extension": "1.5.1",
105
105
  "babel-plugin-date-fns": "~2.0.0",
106
106
  "babel-plugin-dynamic-import-node": "~2.3.3",
@@ -115,7 +115,7 @@
115
115
  "body-parser": "~1.19.2",
116
116
  "browserslist": "~4.20.2",
117
117
  "browserslist-to-esbuild": "~1.1.1",
118
- "canvas": "~2.9.0",
118
+ "canvas": "~2.9.1",
119
119
  "chalk": "~4.1.2",
120
120
  "circular-dependency-plugin": "~5.2.2",
121
121
  "compression": "~1.7.4",
@@ -131,32 +131,32 @@
131
131
  "dotenv-webpack": "~7.1.0",
132
132
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
133
133
  "enhanced-resolve": "~5.9.2",
134
- "esbuild": "~0.14.27",
134
+ "esbuild": "~0.14.29",
135
135
  "esbuild-loader": "~2.18.0",
136
136
  "esbuild-plugin-svgr": "~1.0.0",
137
- "eslint": "~8.11.0",
137
+ "eslint": "~8.12.0",
138
138
  "eslint-config-airbnb": "~19.0.4",
139
139
  "eslint-config-airbnb-base": "~15.0.0",
140
- "eslint-config-airbnb-typescript": "~16.1.2",
140
+ "eslint-config-airbnb-typescript": "~16.1.4",
141
141
  "eslint-config-prettier": "~8.5.0",
142
142
  "eslint-config-react-app": "~7.0.0",
143
143
  "eslint-import-resolver-babel-module": "~5.3.1",
144
- "eslint-import-resolver-typescript": "~2.5.0",
144
+ "eslint-import-resolver-typescript": "~2.7.0",
145
145
  "eslint-import-resolver-webpack": "~0.13.2",
146
146
  "eslint-plugin-compat": "~4.0.2",
147
147
  "eslint-plugin-eslint-comments": "~3.2.0",
148
148
  "eslint-plugin-import": "~2.25.4",
149
- "eslint-plugin-jest": "~26.1.1",
150
- "eslint-plugin-jsdoc": "~38.0.4",
149
+ "eslint-plugin-jest": "~26.1.3",
150
+ "eslint-plugin-jsdoc": "~38.1.4",
151
151
  "eslint-plugin-jsx-a11y": "~6.5.1",
152
- "eslint-plugin-mdx": "~1.16.0",
152
+ "eslint-plugin-mdx": "~1.17.0",
153
153
  "eslint-plugin-prettier": "~4.0.0",
154
154
  "eslint-plugin-react": "~7.29.4",
155
- "eslint-plugin-react-hooks": "~4.3.0",
155
+ "eslint-plugin-react-hooks": "~4.4.0",
156
156
  "eslint-plugin-redux-saga": "~1.3.2",
157
157
  "eslint-plugin-storybook": "~0.5.7",
158
- "eslint-plugin-testing-library": "~5.1.0",
159
- "eslint-plugin-wdio": "~7.4.2",
158
+ "eslint-plugin-testing-library": "~5.2.0",
159
+ "eslint-plugin-wdio": "~7.19.0",
160
160
  "execa": "~5.1.1",
161
161
  "express": "~4.17.3",
162
162
  "express-pino-logger": "~7.0.0",
@@ -165,7 +165,7 @@
165
165
  "favicons-webpack-plugin": "~5.0.2",
166
166
  "fast-glob": "~3.2.11",
167
167
  "find-up": "~5.0.0",
168
- "happy-dom": "~2.49.0",
168
+ "happy-dom": "~2.53.0",
169
169
  "helmet-csp": "~3.4.0",
170
170
  "html-webpack-plugin": "~5.5.0",
171
171
  "http-server": "~14.1.0",
@@ -180,9 +180,9 @@
180
180
  "jscodeshift": "~0.13.1",
181
181
  "jsdoc": "~3.6.10",
182
182
  "lerna": "~4.0.0",
183
- "lint-staged": "~12.3.6",
183
+ "lint-staged": "~12.3.7",
184
184
  "mini-css-extract-plugin": "~2.6.0",
185
- "minimist": "~1.2.5",
185
+ "minimist": "~1.2.6",
186
186
  "moment": "~2.29.1",
187
187
  "moment-locales-webpack-plugin": "~1.2.0",
188
188
  "msw": "~0.39.2",
@@ -190,10 +190,10 @@
190
190
  "node-plop": "~0.30.0",
191
191
  "nodemon": "~2.0.15",
192
192
  "normalize-path": "~3.0.0",
193
- "npm-check-updates": "12.5.3",
193
+ "npm-check-updates": "12.5.4",
194
194
  "null-loader": "~4.0.1",
195
- "pino": "~7.8.1",
196
- "pino-pretty": "~7.5.3",
195
+ "pino": "~7.9.2",
196
+ "pino-pretty": "~7.6.0",
197
197
  "pinst": "~3.0.0",
198
198
  "plop": "~3.0.5",
199
199
  "postcss": "~8.4.12",
@@ -201,16 +201,16 @@
201
201
  "postcss-jsx": "~0.36.4",
202
202
  "postcss-loader": "~6.2.1",
203
203
  "postcss-markdown": "~1.2.0",
204
- "postcss-preset-env": "~7.4.2",
204
+ "postcss-preset-env": "~7.4.3",
205
205
  "postcss-syntax": "~0.36.2",
206
- "prettier": "~2.6.0",
206
+ "prettier": "~2.6.1",
207
207
  "pug": "~3.0.2",
208
208
  "pug-loader": "~2.4.0",
209
209
  "raf": "~3.4.1",
210
210
  "react-axe": "~3.5.4",
211
211
  "react-docgen": "~5.4.0",
212
212
  "react-refresh": "~0.11.0",
213
- "react-test-renderer": "~17.0.2",
213
+ "react-test-renderer": "~18.0.0",
214
214
  "resize-observer-polyfill": "~1.5.1",
215
215
  "resolve-typescript-plugin": "~1.1.5",
216
216
  "rimraf": "~3.0.2",
@@ -218,39 +218,38 @@
218
218
  "slackify-markdown": "~4.3.1",
219
219
  "speed-measure-webpack-plugin": "~1.5.0",
220
220
  "storybook-addon-turbo-build": "~1.1.0",
221
- "storybook-builder-vite": "~0.1.20",
221
+ "storybook-builder-vite": "~0.1.22",
222
222
  "storybook-react-router": "~1.0.8",
223
223
  "style-loader": "~3.3.1",
224
- "stylelint": "~14.6.0",
224
+ "stylelint": "~14.6.1",
225
225
  "stylelint-config-recommended": "~7.0.0",
226
226
  "stylelint-config-styled-components": "~0.1.1",
227
227
  "swc-loader": "~0.1.15",
228
228
  "terser-webpack-plugin": "~5.3.1",
229
229
  "ts-node": "~10.7.0",
230
- "tsc-alias": "~1.6.4",
231
- "typescript": "~4.6.2",
230
+ "tsc-alias": "~1.6.5",
231
+ "typescript": "~4.6.3",
232
232
  "update-notifier": "~5.1.0",
233
233
  "url-loader": "~4.1.1",
234
234
  "uuid": "~8.3.2",
235
- "vite": "~2.8.6",
236
- "vitest": "~0.6.3",
235
+ "vite": "~2.9.1",
236
+ "vitest": "~0.8.1",
237
237
  "webpack": "~5.65.0",
238
238
  "webpack-bundle-analyzer": "~4.5.0",
239
239
  "webpack-cli": "~4.9.2",
240
240
  "webpack-dev-middleware": "~5.3.1",
241
- "webpack-dev-server": "~4.7.4",
242
241
  "webpack-hot-middleware": "~2.25.1",
243
242
  "webpack-manifest-plugin": "~5.0.0",
244
243
  "webpack-merge": "~5.8.0",
245
244
  "whatwg-fetch": "~3.6.2",
246
- "workbox-webpack-plugin": "~6.5.1",
247
- "yargs": "~17.3.1"
245
+ "workbox-webpack-plugin": "~6.5.2",
246
+ "yargs": "~17.4.0"
248
247
  },
249
248
  "devDependencies": {
250
249
  "react": "~17.0.2",
251
250
  "react-dom": "~17.0.2",
252
251
  "redux": "~4.1.2",
253
252
  "redux-saga": "~1.1.3",
254
- "styled-components": "~5.3.3"
253
+ "styled-components": "~5.3.5"
255
254
  }
256
255
  }