@elliemae/pui-cli 6.11.0 → 6.13.0-beta.2

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,17 +1,22 @@
1
+ const path = require('path');
1
2
  const { exit } = require('yargs');
2
3
  const { exec, logError, logSuccess } = require('./utils');
3
4
 
4
- const { name } = require('../../package.json');
5
-
6
5
  async function startProdServer() {
7
6
  await exec(
8
- `cross-env NODE_ENV=production ts-node node_modules/${name}/lib/server --color always`,
7
+ `cross-env NODE_ENV=production ts-node ${path.resolve(
8
+ __dirname,
9
+ '../server',
10
+ )} --color always`,
9
11
  );
10
12
  }
11
13
 
12
14
  async function startDevServer() {
13
15
  await exec(
14
- `cross-env NODE_ENV=development ts-node node_modules/${name}/lib/server --color always`,
16
+ `cross-env NODE_ENV=development webpack serve --config ${path.resolve(
17
+ __dirname,
18
+ '../webpack/webpack.dev.babel.js',
19
+ )}`,
15
20
  );
16
21
  }
17
22
 
@@ -150,7 +150,6 @@ const getENCWLoaderFileName = () => {
150
150
  )[0];
151
151
  };
152
152
 
153
- // base path for index page
154
153
  const getAssetPath = () => (process.env.ASSET_PATH || '/').replace(/\/?$/, '/');
155
154
 
156
155
  const getAppVersion = () => {
@@ -161,7 +160,7 @@ const getAppVersion = () => {
161
160
 
162
161
  const getPaths = (latestVersion = true) => {
163
162
  const version = latestVersion ? LATEST_VERSION : getAppVersion();
164
- const publicPath = `${getAssetPath()}${version}/`;
163
+ const publicPath = `${version}/`;
165
164
  const timeStampQuery =
166
165
  process.env.PUI_PIPELINE !== 'true' ? `?timeStamp=${Date.now()}` : '';
167
166
  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, publicPath } = getPaths();
32
+ const { buildPath } = 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,
129
+ publicPath: 'auto',
130
130
  ...options.output,
131
131
  }, // Merge with env dependent settings
132
132
  optimization: options.optimization,
@@ -9,7 +9,6 @@ const SpeedMeasurePlugin = require('speed-measure-webpack-plugin');
9
9
  const smp = new SpeedMeasurePlugin({ disable: !process.env.MEASURE });
10
10
 
11
11
  const {
12
- getAssetPath,
13
12
  isAppLoaderEnabled,
14
13
  getPaths,
15
14
  isGoogleTagManagerEnabled,
@@ -18,7 +17,6 @@ const baseConfigFactory = require('./webpack.base.babel');
18
17
 
19
18
  const {
20
19
  appVersion,
21
- publicPath,
22
20
  userMonScriptPath,
23
21
  globalScriptPath,
24
22
  appLoaderScriptPath,
@@ -76,15 +74,12 @@ const devConfig = {
76
74
  // Add development plugins
77
75
  plugins: [
78
76
  new HtmlWebpackPlugin({
79
- scriptLoading: 'module',
80
77
  inject: !isAppLoaderEnabled(), // Inject all files that are generated by webpack, e.g. bundle.js
81
78
  template: !isAppLoaderEnabled()
82
79
  ? 'app/index.html'
83
80
  : 'app/index-app-loader.html',
84
81
  emui: {
85
82
  appVersion,
86
- assetPath: publicPath,
87
- basePath: getAssetPath(),
88
83
  globalScriptPath,
89
84
  userMonScriptPath,
90
85
  appLoaderScriptPath,
@@ -108,6 +103,8 @@ const devConfig = {
108
103
  performance: {
109
104
  hints: false,
110
105
  },
106
+
107
+ devServer: {},
111
108
  };
112
109
 
113
110
  const config = smp.wrap(baseConfigFactory(devConfig));
@@ -10,7 +10,6 @@ const browserslistToEsbuild = require('browserslist-to-esbuild');
10
10
 
11
11
  const baseConfigFactory = require('./webpack.base.babel');
12
12
  const {
13
- getAssetPath,
14
13
  isAppLoaderEnabled,
15
14
  LATEST_VERSION,
16
15
  getPaths,
@@ -20,7 +19,7 @@ const {
20
19
  } = require('./helpers');
21
20
 
22
21
  const getProdConfig = ({ latestVersion = true } = {}) => {
23
- const { buildPath, publicPath } = getPaths(latestVersion);
22
+ const { buildPath } = getPaths(latestVersion);
24
23
 
25
24
  return {
26
25
  mode: 'production',
@@ -32,7 +31,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
32
31
  // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
33
32
  output: {
34
33
  path: buildPath,
35
- publicPath,
34
+ publicPath: 'auto',
36
35
  filename: 'js/[name].[contenthash].js',
37
36
  chunkFilename: 'js/[name].[contenthash].chunk.js',
38
37
  assetModuleFilename: 'assets/[name].[hash][ext][query]',
@@ -94,7 +93,6 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
94
93
  };
95
94
 
96
95
  const {
97
- publicPath,
98
96
  userMonScriptPath,
99
97
  globalScriptPath,
100
98
  appLoaderScriptPath,
@@ -102,7 +100,6 @@ const {
102
100
  encwLoaderScriptPath,
103
101
  } = getPaths();
104
102
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
105
- scriptLoading: 'module',
106
103
  filename: '../index.html',
107
104
  inject: !isAppLoaderEnabled(),
108
105
  template: !isAppLoaderEnabled()
@@ -122,8 +119,6 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
122
119
  },
123
120
  emui: {
124
121
  appVersion: 'latest',
125
- assetPath: publicPath,
126
- basePath: getAssetPath(),
127
122
  globalScriptPath,
128
123
  userMonScriptPath,
129
124
  appLoaderScriptPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.11.0",
3
+ "version": "6.13.0-beta.2",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -48,13 +48,13 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@babel/cli": "~7.17.6",
51
- "@babel/core": "~7.17.5",
51
+ "@babel/core": "~7.17.7",
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",
55
55
  "@babel/plugin-proposal-export-default-from": "~7.16.7",
56
56
  "@babel/plugin-syntax-dynamic-import": "~7.8.3",
57
- "@babel/plugin-transform-modules-commonjs": "~7.16.8",
57
+ "@babel/plugin-transform-modules-commonjs": "~7.17.7",
58
58
  "@babel/plugin-transform-react-constant-elements": "~7.17.6",
59
59
  "@babel/plugin-transform-react-inline-elements": "~7.16.7",
60
60
  "@babel/plugin-transform-react-jsx-source": "~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.2",
66
- "@commitlint/cli": "~16.2.1",
65
+ "@babel/runtime": "~7.17.7",
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-beta.0",
70
- "@nrwl/cli": "13.8.8",
71
- "@nrwl/tao": "13.8.8",
72
- "@nrwl/workspace": "13.8.8",
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",
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",
@@ -87,7 +87,7 @@
87
87
  "@stylelint/postcss-css-in-js": "~0.37.2",
88
88
  "@svgr/webpack": "~6.2.1",
89
89
  "@swc/cli": "~0.1.55",
90
- "@swc/core": "~1.2.153",
90
+ "@swc/core": "~1.2.156",
91
91
  "@swc/jest": "~0.2.20",
92
92
  "@testing-library/jest-dom": "~5.16.2",
93
93
  "@testing-library/react": "~12.1.4",
@@ -96,9 +96,9 @@
96
96
  "@types/node": "~17.0.21",
97
97
  "@types/rimraf": "~3.0.2",
98
98
  "@types/testing-library__jest-dom": "~5.14.3",
99
- "@typescript-eslint/eslint-plugin": "~5.14.0",
100
- "@typescript-eslint/parser": "~5.14.0",
101
- "autoprefixer": "~10.4.2",
99
+ "@typescript-eslint/eslint-plugin": "~5.15.0",
100
+ "@typescript-eslint/parser": "~5.15.0",
101
+ "autoprefixer": "~10.4.4",
102
102
  "axe-core": "~4.4.1",
103
103
  "babel-loader": "~8.2.3",
104
104
  "babel-plugin-add-import-extension": "1.5.1",
@@ -113,7 +113,7 @@
113
113
  "babel-plugin-transform-remove-console": "~6.9.4",
114
114
  "babel-plugin-transform-strip-block": "~0.0.5",
115
115
  "body-parser": "~1.19.2",
116
- "browserslist": "~4.20.0",
116
+ "browserslist": "~4.20.2",
117
117
  "browserslist-to-esbuild": "~1.1.1",
118
118
  "canvas": "~2.9.0",
119
119
  "chalk": "~4.1.2",
@@ -131,13 +131,13 @@
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.25",
134
+ "esbuild": "~0.14.27",
135
135
  "esbuild-loader": "~2.18.0",
136
136
  "esbuild-plugin-svgr": "~1.0.0",
137
- "eslint": "~8.10.0",
137
+ "eslint": "~8.11.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.1",
140
+ "eslint-config-airbnb-typescript": "~16.1.2",
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",
@@ -147,15 +147,15 @@
147
147
  "eslint-plugin-eslint-comments": "~3.2.0",
148
148
  "eslint-plugin-import": "~2.25.4",
149
149
  "eslint-plugin-jest": "~26.1.1",
150
- "eslint-plugin-jsdoc": "~38.0.0",
150
+ "eslint-plugin-jsdoc": "~38.0.4",
151
151
  "eslint-plugin-jsx-a11y": "~6.5.1",
152
152
  "eslint-plugin-mdx": "~1.16.0",
153
153
  "eslint-plugin-prettier": "~4.0.0",
154
- "eslint-plugin-react": "~7.29.3",
154
+ "eslint-plugin-react": "~7.29.4",
155
155
  "eslint-plugin-react-hooks": "~4.3.0",
156
156
  "eslint-plugin-redux-saga": "~1.3.2",
157
157
  "eslint-plugin-storybook": "~0.5.7",
158
- "eslint-plugin-testing-library": "~5.0.6",
158
+ "eslint-plugin-testing-library": "~5.1.0",
159
159
  "eslint-plugin-wdio": "~7.4.2",
160
160
  "execa": "~5.1.1",
161
161
  "express": "~4.17.3",
@@ -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.46.3",
168
+ "happy-dom": "~2.49.0",
169
169
  "helmet-csp": "~3.4.0",
170
170
  "html-webpack-plugin": "~5.5.0",
171
171
  "http-server": "~14.1.0",
@@ -180,12 +180,12 @@
180
180
  "jscodeshift": "~0.13.1",
181
181
  "jsdoc": "~3.6.10",
182
182
  "lerna": "~4.0.0",
183
- "lint-staged": "~12.3.5",
183
+ "lint-staged": "~12.3.6",
184
184
  "mini-css-extract-plugin": "~2.6.0",
185
185
  "minimist": "~1.2.5",
186
186
  "moment": "~2.29.1",
187
187
  "moment-locales-webpack-plugin": "~1.2.0",
188
- "msw": "~0.39.1",
188
+ "msw": "~0.39.2",
189
189
  "node-gyp": "~9.0.0",
190
190
  "node-plop": "~0.30.0",
191
191
  "nodemon": "~2.0.15",
@@ -196,14 +196,14 @@
196
196
  "pino-pretty": "~7.5.3",
197
197
  "pinst": "~3.0.0",
198
198
  "plop": "~3.0.5",
199
- "postcss": "~8.4.8",
199
+ "postcss": "~8.4.12",
200
200
  "postcss-html": "~1.3.0",
201
201
  "postcss-jsx": "~0.36.4",
202
202
  "postcss-loader": "~6.2.1",
203
203
  "postcss-markdown": "~1.2.0",
204
204
  "postcss-preset-env": "~7.4.2",
205
205
  "postcss-syntax": "~0.36.2",
206
- "prettier": "~2.5.1",
206
+ "prettier": "~2.6.0",
207
207
  "pug": "~3.0.2",
208
208
  "pug-loader": "~2.4.0",
209
209
  "raf": "~3.4.1",
@@ -217,11 +217,11 @@
217
217
  "semantic-release": "~19.0.2",
218
218
  "slackify-markdown": "~4.3.1",
219
219
  "speed-measure-webpack-plugin": "~1.5.0",
220
- "storybook-addon-turbo-build": "~1.0.1",
221
- "storybook-builder-vite": "~0.1.18",
220
+ "storybook-addon-turbo-build": "~1.1.0",
221
+ "storybook-builder-vite": "~0.1.20",
222
222
  "storybook-react-router": "~1.0.8",
223
223
  "style-loader": "~3.3.1",
224
- "stylelint": "~14.5.3",
224
+ "stylelint": "~14.6.0",
225
225
  "stylelint-config-recommended": "~7.0.0",
226
226
  "stylelint-config-styled-components": "~0.1.1",
227
227
  "swc-loader": "~0.1.15",
@@ -233,11 +233,12 @@
233
233
  "url-loader": "~4.1.1",
234
234
  "uuid": "~8.3.2",
235
235
  "vite": "~2.8.6",
236
- "vitest": "~0.6.0",
236
+ "vitest": "~0.6.3",
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",
241
242
  "webpack-hot-middleware": "~2.25.1",
242
243
  "webpack-manifest-plugin": "~5.0.0",
243
244
  "webpack-merge": "~5.8.0",