@elliemae/pui-cli 7.0.0-beta.3 → 7.0.0-beta.6

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.
@@ -6,18 +6,18 @@ const { getPaths } = require('../../webpack/helpers');
6
6
  const paths = getPaths();
7
7
 
8
8
  module.exports = function addProdMiddlewares(app, options = {}) {
9
- const { buildPath = paths.buildPath, mountPath = paths.mountPath } = options;
9
+ const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
10
10
  // compression middleware compresses your server responses which makes them
11
11
  // smaller (applies also to assets). You can read more about that technique
12
12
  // and other good practices on official Express.js docs http://mxs.is/googmy
13
13
  app.use(compression());
14
14
 
15
- app.get(mountPath, (req, res) => {
15
+ app.get(basePath, (req, res) => {
16
16
  sendFileWithCSPNonce({ buildPath, res });
17
17
  });
18
18
 
19
19
  app.use(
20
- mountPath,
20
+ basePath,
21
21
  expressStaticGzip(buildPath, {
22
22
  index: false,
23
23
  enableBrotli: true,
@@ -4,7 +4,7 @@ const { getAppConfig, getPaths } = require('../webpack/helpers');
4
4
  const swcrcConfig = require('../transpile/swcrc.config.js');
5
5
  const { findMonoRepoRoot } = require('../monorepo/utils');
6
6
 
7
- const { mountPath } = getPaths();
7
+ const { basePath } = getPaths();
8
8
 
9
9
  let isReactModule = true;
10
10
  try {
@@ -91,7 +91,7 @@ const jestConfig = {
91
91
  APP_CONFIG: getAppConfig(),
92
92
  __webpack_public_path__: '/',
93
93
  },
94
- testURL: `http://localhost:3111${mountPath}`,
94
+ testURL: `http://localhost:3111${basePath}`,
95
95
  testEnvironment: 'jsdom',
96
96
  };
97
97
 
@@ -164,7 +164,7 @@ const getPaths = (latestVersion = true) => {
164
164
  return {
165
165
  appVersion: version,
166
166
  buildPath: path.resolve(process.cwd(), `build/public/`),
167
- mountPath: (process.env.MOUNT_PATH || '/').replace(/\/?$/, '/'),
167
+ basePath: (process.env.BASE_PATH || '/').replace(/\/?$/, '/'),
168
168
  publicPath,
169
169
  userMonScriptPath: `latest/js/${getUserMonitoringFileName()}`,
170
170
  appLoaderScriptPath: `latest/js/${getAppLoaderFileName()}`,
@@ -13,7 +13,6 @@ const browserslistToEsbuild = require('browserslist-to-esbuild');
13
13
 
14
14
  const {
15
15
  excludeNodeModulesExcept,
16
- getAppConfig,
17
16
  modulesToTranspile,
18
17
  getAlias,
19
18
  getPaths,
@@ -34,13 +33,8 @@ const { buildPath } = getPaths();
34
33
  const plugins = [
35
34
  new webpack.EnvironmentPlugin({
36
35
  NODE_ENV: 'development',
37
- ASSET_PATH: '/',
38
- // PUBLIC_PATH: publicPath,
39
36
  CI: 'false',
40
37
  }),
41
- new webpack.DefinePlugin({
42
- APP_CONFIG: getAppConfig(),
43
- }),
44
38
  new ProvidePlugin({
45
39
  React: 'react',
46
40
  }),
@@ -91,6 +91,7 @@ const {
91
91
  appLoaderScriptPath,
92
92
  diagnosticsScriptPath,
93
93
  encwLoaderScriptPath,
94
+ basePath,
94
95
  } = getPaths();
95
96
  const htmlWebpackPlugin = new HtmlWebpackPlugin({
96
97
  inject: !isAppLoaderEnabled(),
@@ -111,6 +112,7 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
111
112
  },
112
113
  emui: {
113
114
  appVersion: 'latest',
115
+ basePath,
114
116
  globalScriptPath,
115
117
  userMonScriptPath,
116
118
  appLoaderScriptPath,
@@ -1,21 +1,13 @@
1
- const { DefinePlugin, EnvironmentPlugin } = require('webpack');
1
+ const { EnvironmentPlugin } = require('webpack');
2
2
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
3
  const CopyWebpackPlugin = require('copy-webpack-plugin');
4
4
  const ResolveTypeScriptPlugin = require('resolve-typescript-plugin');
5
- const {
6
- getAppConfig,
7
- isApp,
8
- getAlias,
9
- getCompressionPlugins,
10
- } = require('./helpers');
5
+ const { isApp, getAlias, getCompressionPlugins } = require('./helpers');
11
6
 
12
7
  const IS_APP = isApp();
13
8
  const CWD = process.cwd();
14
9
 
15
10
  const getAdditionalPlugins = () => [
16
- new DefinePlugin({
17
- APP_CONFIG: getAppConfig(),
18
- }),
19
11
  new EnvironmentPlugin({
20
12
  IS_APP,
21
13
  CWD,
@@ -55,6 +47,10 @@ const getModuleRules = () => [
55
47
  resourceQuery: /^((?!url).)*$/,
56
48
  use: ['@svgr/webpack'],
57
49
  },
50
+ {
51
+ resourceQuery: /resource/,
52
+ type: 'asset/resource',
53
+ },
58
54
  ];
59
55
 
60
56
  exports.webpackFinal = async (config, { configType }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "7.0.0-beta.3",
3
+ "version": "7.0.0-beta.6",
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,7 +62,7 @@
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",
@@ -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.158",
90
+ "@swc/core": "~1.2.159",
91
91
  "@swc/jest": "~0.2.20",
92
92
  "@testing-library/jest-dom": "~5.16.2",
93
93
  "@testing-library/react": "~12.1.4",
@@ -147,7 +147,7 @@
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.4",
150
+ "eslint-plugin-jsdoc": "~38.0.6",
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",
@@ -156,7 +156,7 @@
156
156
  "eslint-plugin-redux-saga": "~1.3.2",
157
157
  "eslint-plugin-storybook": "~0.5.7",
158
158
  "eslint-plugin-testing-library": "~5.1.0",
159
- "eslint-plugin-wdio": "~7.4.2",
159
+ "eslint-plugin-wdio": "~7.18.1",
160
160
  "execa": "~5.1.1",
161
161
  "express": "~4.17.3",
162
162
  "express-pino-logger": "~7.0.0",
@@ -233,7 +233,7 @@
233
233
  "url-loader": "~4.1.1",
234
234
  "uuid": "~8.3.2",
235
235
  "vite": "~2.8.6",
236
- "vitest": "~0.7.4",
236
+ "vitest": "~0.7.6",
237
237
  "webpack": "~5.70.0",
238
238
  "webpack-bundle-analyzer": "~4.5.0",
239
239
  "webpack-cli": "~4.9.2",