@elliemae/pui-cli 6.0.0-beta.4 → 6.0.0-beta.8

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/lib/esbuild.js CHANGED
@@ -13,12 +13,14 @@ const commonConfig = {
13
13
  const outDir = 'dist';
14
14
 
15
15
  const build = async ({ srcPath, commonJS }) => {
16
- const entryPoints = await fg([
16
+ const inputFiles = [
17
17
  `${srcPath}/**/*.{js,jsx,ts,tsx}`,
18
18
  `!${srcPath}/**/*.test.{js,jsx,ts,tsx}`,
19
19
  `!${srcPath}/**/*.stories.{js,jsx,ts,tsx}`,
20
- ]);
20
+ `!${srcPath}/**/*.endpoint.{js,jsx,ts,tsx}`,
21
+ ];
21
22
  if (!commonJS) {
23
+ const entryPoints = await fg(inputFiles);
22
24
  await esbuild.build({
23
25
  entryPoints,
24
26
  ...commonConfig,
@@ -26,8 +28,11 @@ const build = async ({ srcPath, commonJS }) => {
26
28
  format: 'esm',
27
29
  });
28
30
  } else {
31
+ const commonJSEntryPoints = await fg(
32
+ inputFiles.concat([`${srcPath}/**/*.cjs`]),
33
+ );
29
34
  await esbuild.build({
30
- entryPoints,
35
+ entryPoints: commonJSEntryPoints,
31
36
  ...commonConfig,
32
37
  outdir: `${outDir}/cjs`,
33
38
  format: 'cjs',
@@ -13,8 +13,11 @@ const { loadRoutes } = require('./util');
13
13
  const { getAssetPath } = require('../webpack/helpers');
14
14
 
15
15
  const pino = expressPinoLogger({
16
- prettyPrint: {
17
- levelFirst: true,
16
+ transport: {
17
+ target: 'pino-pretty',
18
+ options: {
19
+ colorize: true,
20
+ },
18
21
  },
19
22
  });
20
23
  pino.logger.level = 'warn';
@@ -7,7 +7,6 @@ const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack
7
7
  const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
8
8
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
9
9
  const { WebpackManifestPlugin } = require('webpack-manifest-plugin');
10
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
11
10
  const { ProvidePlugin } = require('webpack');
12
11
 
13
12
  const {
@@ -19,10 +18,8 @@ const {
19
18
  getMediaPath,
20
19
  } = require('./helpers');
21
20
  const { ESBUILD_TARGET } = require('../esbuild');
22
- const { isTypeScriptEnabled } = require('../typescript/util');
23
21
 
24
22
  // get the application configuration
25
- const devMode = process.env.NODE_ENV !== 'production';
26
23
  const minicssLoader = {
27
24
  loader: MiniCssExtractPlugin.loader,
28
25
  options: {},
@@ -70,21 +67,29 @@ const plugins = [
70
67
  {
71
68
  from: 'node_modules/@elliemae/pui-user-monitoring/dist/public/js',
72
69
  to: 'js',
70
+ toType: 'dir',
71
+ info: { minimized: true },
73
72
  },
74
73
  {
75
- from: 'node_modules/@elliemae/pui-app-loader/dist/public/js/emuiAppLoader*.js',
76
- to: 'js/[name][ext]',
74
+ from: 'node_modules/@elliemae/pui-app-loader/dist/public/js',
75
+ to: 'js',
76
+ toType: 'dir',
77
77
  noErrorOnMissing: true,
78
+ info: { minimized: true },
78
79
  },
79
80
  {
80
- from: 'node_modules/@elliemae/encw-loader/dist/public/js/emuiEncwLoader*.js',
81
- to: 'js/[name][ext]',
81
+ from: 'node_modules/@elliemae/encw-loader/dist/public/js',
82
+ to: 'js',
83
+ toType: 'dir',
82
84
  noErrorOnMissing: true,
85
+ info: { minimized: true },
83
86
  },
84
87
  {
85
- from: 'node_modules/@elliemae/pui-diagnostics/dist/public/js/emuiDiagnostics*.js',
86
- to: 'js/[name][ext]',
88
+ from: 'node_modules/@elliemae/pui-diagnostics/dist/public/js',
89
+ to: 'js',
90
+ toType: 'dir',
87
91
  noErrorOnMissing: true,
92
+ info: { minimized: true },
88
93
  },
89
94
  {
90
95
  from: 'public',
@@ -102,17 +107,6 @@ const plugins = [
102
107
  new WebpackManifestPlugin(),
103
108
  ];
104
109
 
105
- if (isTypeScriptEnabled()) {
106
- plugins.push(
107
- new ForkTsCheckerWebpackPlugin({
108
- async: devMode,
109
- eslint: {
110
- files: './app/**/*.{ts,js,tsx,jsx}',
111
- },
112
- }),
113
- );
114
- }
115
-
116
110
  module.exports = (options) => ({
117
111
  mode: options.mode,
118
112
  entry: options.entry,
@@ -10,7 +10,6 @@ const PostcssPresetEnv = require('postcss-preset-env');
10
10
  const DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');
11
11
  const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
12
12
  const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
13
- const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
14
13
 
15
14
  const {
16
15
  excludeNodeModulesExcept,
@@ -22,9 +21,7 @@ const {
22
21
  getMediaPath,
23
22
  } = require('./helpers');
24
23
  const { ESBUILD_TARGET } = require('../esbuild');
25
- const { isTypeScriptEnabled } = require('../typescript/util');
26
24
 
27
- const devMode = process.env.NODE_ENV !== 'production';
28
25
  const minicssLoader = {
29
26
  loader: MiniCssExtractPlugin.loader,
30
27
  options: {},
@@ -63,17 +60,6 @@ const plugins = [
63
60
  new MomentLocalesPlugin(),
64
61
  ];
65
62
 
66
- if (isTypeScriptEnabled()) {
67
- plugins.push(
68
- new ForkTsCheckerWebpackPlugin({
69
- async: devMode,
70
- eslint: {
71
- files: './lib/**/*.{ts,js,tsx,jsx}',
72
- },
73
- }),
74
- );
75
- }
76
-
77
63
  module.exports = (options) => ({
78
64
  mode: options.mode,
79
65
  entry: [path.join(process.cwd(), 'lib/index')],
@@ -72,7 +72,13 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
72
72
  filename: '[path][base].gz',
73
73
  algorithm: 'gzip',
74
74
  test: /\.js$|\.css$$/,
75
- exclude: [/\/adrum-ext/, /\/emuiUserMonitoring/],
75
+ exclude: [
76
+ /\/adrum-ext/,
77
+ /\/emuiUserMonitoring/,
78
+ /\/emuiDiagnostics/,
79
+ /\/emuiAppLoader/,
80
+ /\/encwLoader/,
81
+ ],
76
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
77
83
  minRatio: Number.MAX_SAFE_INTEGER,
78
84
  }),
@@ -3,15 +3,12 @@ const webpack = require('webpack');
3
3
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
4
  const CopyWebpackPlugin = require('copy-webpack-plugin');
5
5
  const CompressionPlugin = require('compression-webpack-plugin');
6
- const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
7
6
  const {
8
7
  getAppConfig,
9
8
  isApp,
10
9
  getAlias,
11
10
  excludeNodeModulesExcept,
12
11
  modulesToTranspile,
13
- resolveExtensions,
14
- mainFields,
15
12
  getMediaPath,
16
13
  } = require('./helpers');
17
14
  const { ESBUILD_TARGET } = require('../esbuild');
@@ -157,9 +154,6 @@ exports.webpackFinal = async (config, { configType }) => {
157
154
 
158
155
  config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
159
156
  config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
160
- config.resolve.plugins = (config.resolve.plugins || []).concat([
161
- new TsconfigPathsPlugin({ extensions: resolveExtensions, mainFields }),
162
- ]);
163
157
 
164
158
  config.externals = config.externals || {};
165
159
  config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.4",
3
+ "version": "6.0.0-beta.8",
4
4
  "private": false,
5
5
  "description": "EllieMae Platform UI CLI",
6
6
  "sideEffects": false,
@@ -73,11 +73,9 @@
73
73
  "@storybook/addon-a11y": "~6.3.12",
74
74
  "@storybook/addon-actions": "~6.3.12",
75
75
  "@storybook/addon-backgrounds": "~6.3.12",
76
- "@storybook/addon-console": "~1.2.3",
77
76
  "@storybook/addon-controls": "~6.3.12",
78
77
  "@storybook/addon-docs": "~6.3.12",
79
78
  "@storybook/addon-events": "~6.2.9",
80
- "@storybook/addon-knobs": "~6.3.1",
81
79
  "@storybook/addon-links": "~6.3.12",
82
80
  "@storybook/addon-storysource": "~6.3.12",
83
81
  "@storybook/addon-toolbars": "~6.3.12",
@@ -98,6 +96,7 @@
98
96
  "@types/testing-library__jest-dom": "~5.14.1",
99
97
  "@typescript-eslint/eslint-plugin": "~5.4.0",
100
98
  "@typescript-eslint/parser": "~5.4.0",
99
+ "@vitejs/plugin-react": "~1.1.0",
101
100
  "autoprefixer": "~10.4.0",
102
101
  "axe-core": "~4.3.5",
103
102
  "babel-loader": "~8.2.3",
@@ -132,7 +131,8 @@
132
131
  "dotenv": "~10.0.0",
133
132
  "dotenv-webpack": "~7.0.3",
134
133
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
135
- "esbuild": "~0.13.15",
134
+ "esbuild": "~0.14.0",
135
+ "esbuild-jest": "~0.5.0",
136
136
  "esbuild-loader": "~2.16.0",
137
137
  "eslint": "~8.3.0",
138
138
  "eslint-config-airbnb": "~18.2.1",
@@ -190,14 +190,14 @@
190
190
  "pino-pretty": "~7.2.0",
191
191
  "pinst": "~2.1.6",
192
192
  "plop": "~2.7.6",
193
- "postcss": "~8.4.1",
193
+ "postcss": "~8.4.3",
194
194
  "postcss-jsx": "~0.36.4",
195
195
  "postcss-html": "~1.3.0",
196
196
  "postcss-markdown": "~1.2.0",
197
197
  "postcss-syntax": "~0.36.2",
198
- "postcss-loader": "~6.2.0",
198
+ "postcss-loader": "~6.2.1",
199
199
  "postcss-preset-env": "~7.0.1",
200
- "prettier": "~2.4.1",
200
+ "prettier": "~2.5.0",
201
201
  "pug": "~3.0.2",
202
202
  "pug-loader": "~2.4.0",
203
203
  "raf": "~3.4.1",
@@ -212,6 +212,7 @@
212
212
  "semantic-release": "~18.0.1",
213
213
  "shelljs": "~0.8.4",
214
214
  "slackify-markdown": "~4.3.0",
215
+ "storybook-builder-vite": "~0.1.10",
215
216
  "storybook-react-router": "~1.0.8",
216
217
  "storybook-addon-turbo-build": "~1.0.1",
217
218
  "style-loader": "~3.3.1",
@@ -233,7 +234,8 @@
233
234
  "update-notifier": "~5.1.0",
234
235
  "url-loader": "~4.1.1",
235
236
  "uuid": "~8.3.2",
236
- "webpack": "~5.64.3",
237
+ "vite": "~2.6.14",
238
+ "webpack": "~5.64.4",
237
239
  "webpack-bundle-analyzer": "~4.5.0",
238
240
  "webpack-cli": "~4.9.1",
239
241
  "webpack-dev-middleware": "~5.2.2",