@elliemae/pui-cli 5.3.0 → 5.4.3
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.
|
@@ -10,7 +10,7 @@ const nodeEnvPreset = {
|
|
|
10
10
|
const webEnvPreset = {
|
|
11
11
|
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
12
12
|
useBuiltIns: 'usage',
|
|
13
|
-
corejs: { version: '3.
|
|
13
|
+
corejs: { version: '3.18', proposals: true },
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const presetEnvOptions =
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const { exit } = require('yargs');
|
|
2
|
-
const {
|
|
2
|
+
const {
|
|
3
|
+
exec,
|
|
4
|
+
logInfo,
|
|
5
|
+
logError,
|
|
6
|
+
logSuccess,
|
|
7
|
+
writeAppInfo,
|
|
8
|
+
} = require('./utils');
|
|
3
9
|
|
|
4
10
|
const { name } = require('../../package.json');
|
|
5
11
|
|
|
@@ -9,6 +15,7 @@ async function buildWebApp() {
|
|
|
9
15
|
await exec(
|
|
10
16
|
`cross-env NODE_ENV=production webpack --config node_modules/${name}/lib/webpack/webpack.prod.babel.js --color`,
|
|
11
17
|
);
|
|
18
|
+
await writeAppInfo();
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
async function buildService() {
|
|
@@ -1,11 +1,84 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
const execa = require('execa');
|
|
3
3
|
const chalk = require('chalk');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { readFile, writeFile } = require('fs/promises');
|
|
6
|
+
const { getPaths } = require('../webpack/helpers');
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
const browsersMapping = {
|
|
9
|
+
and_chr: 'Chrome for Android',
|
|
10
|
+
chrome: 'Google Chrome',
|
|
11
|
+
edge: 'Microsoft Edge',
|
|
12
|
+
firefox: 'Mozilla Firefox',
|
|
13
|
+
ios_saf: 'iOS Safari',
|
|
14
|
+
safari: 'Safari',
|
|
15
|
+
samsung: 'Samsung Internet',
|
|
7
16
|
};
|
|
8
17
|
|
|
18
|
+
const exec = async (command, options = { stdio: 'inherit' }) =>
|
|
19
|
+
execa.command(command, options);
|
|
20
|
+
exports.exec = exec;
|
|
21
|
+
|
|
9
22
|
exports.logInfo = console.log;
|
|
10
23
|
exports.logSuccess = (...args) => console.log(chalk.green(...args));
|
|
11
24
|
exports.logError = console.error;
|
|
25
|
+
|
|
26
|
+
const readPackageLock = async () => {
|
|
27
|
+
const appPkgLockFile = path.join(process.cwd(), 'package-lock.json');
|
|
28
|
+
const pkgLockJSON = await readFile(appPkgLockFile, 'utf8');
|
|
29
|
+
const { dependencies } = JSON.parse(pkgLockJSON);
|
|
30
|
+
return (moduleName) => dependencies[moduleName]?.version || '';
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const getSupportedBrowsers = async () => {
|
|
34
|
+
const { stdout } = await exec('npx --no-install browserslist', {
|
|
35
|
+
stdout: 'pipe',
|
|
36
|
+
});
|
|
37
|
+
const browserVersions = (stdout && stdout.split('\n')) || [];
|
|
38
|
+
return browserVersions.reduce((acc, nameVersion) => {
|
|
39
|
+
const [name, version] = nameVersion.split(' ');
|
|
40
|
+
const versionRange = version.split('-');
|
|
41
|
+
acc[browsersMapping[name]] = (versionRange && versionRange[0]) || version;
|
|
42
|
+
return acc;
|
|
43
|
+
}, {});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const getModulesInfo = async () => {
|
|
47
|
+
try {
|
|
48
|
+
const getModuleVersion = await readPackageLock();
|
|
49
|
+
return {
|
|
50
|
+
react: getModuleVersion('react'),
|
|
51
|
+
'react-dom': getModuleVersion('react-dom'),
|
|
52
|
+
'app-react-dependencies': getModuleVersion(
|
|
53
|
+
'@elliemae/app-react-dependencies',
|
|
54
|
+
),
|
|
55
|
+
'app-sdk': getModuleVersion('@elliemae/pui-app-sdk'),
|
|
56
|
+
cli: getModuleVersion('@elliemae/pui-cli'),
|
|
57
|
+
dimsum: getModuleVersion('@elliemae/ds-system'),
|
|
58
|
+
};
|
|
59
|
+
} catch (err) {
|
|
60
|
+
console.warn(err);
|
|
61
|
+
return {};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.writeAppInfo = async () => {
|
|
66
|
+
const appInfo = {
|
|
67
|
+
timestamp: new Date().toISOString(),
|
|
68
|
+
modules: await getModulesInfo(),
|
|
69
|
+
browserSupport: await getSupportedBrowsers(),
|
|
70
|
+
screenReaderSupport: [
|
|
71
|
+
'JAWS with Chrome',
|
|
72
|
+
'NVDA with Chrome',
|
|
73
|
+
'VoiceOver with Safari',
|
|
74
|
+
'iOS VoiceOver',
|
|
75
|
+
'Android Talkback',
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
const infoJSON = JSON.stringify(appInfo, null, 2);
|
|
79
|
+
const { buildPath: versionedPath } = getPaths();
|
|
80
|
+
[
|
|
81
|
+
path.join(versionedPath, 'info.json'),
|
|
82
|
+
path.join(process.cwd(), 'build', 'public', 'info.json'),
|
|
83
|
+
].forEach(async (infoPath) => writeFile(infoPath, infoJSON));
|
|
84
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "5.3
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "EllieMae Platform UI CLI",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -88,15 +88,15 @@
|
|
|
88
88
|
"@storybook/theming": "~6.3.8",
|
|
89
89
|
"@svgr/webpack": "~5.5.0",
|
|
90
90
|
"@testing-library/jest-dom": "~5.14.1",
|
|
91
|
-
"@testing-library/react": "~12.1.
|
|
91
|
+
"@testing-library/react": "~12.1.1",
|
|
92
92
|
"@testing-library/react-hooks": "~7.0.2",
|
|
93
93
|
"@types/jest": "~27.0.2",
|
|
94
|
-
"@types/node": "~16.
|
|
94
|
+
"@types/node": "~16.10.1",
|
|
95
95
|
"@types/rimraf": "~3.0.2",
|
|
96
96
|
"@types/testing-library__jest-dom": "~5.14.1",
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "~4.
|
|
98
|
-
"@typescript-eslint/parser": "~4.
|
|
99
|
-
"autoprefixer": "~10.3.
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "~4.32.0",
|
|
98
|
+
"@typescript-eslint/parser": "~4.32.0",
|
|
99
|
+
"autoprefixer": "~10.3.6",
|
|
100
100
|
"axe-core": "~4.3.3",
|
|
101
101
|
"babel-eslint": "~10.1.0",
|
|
102
102
|
"babel-loader": "~8.2.2",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"imports-loader": "~3.0.0",
|
|
172
172
|
"ip": "~1.1.5",
|
|
173
173
|
"jest-axe": "~5.0.1",
|
|
174
|
-
"jest-cli": "~27.2.
|
|
174
|
+
"jest-cli": "~27.2.2",
|
|
175
175
|
"jest-sonar-reporter": "~2.0.0",
|
|
176
176
|
"jest-styled-components": "~7.0.5",
|
|
177
177
|
"jscodeshift": "~0.13.0",
|
|
@@ -183,14 +183,14 @@
|
|
|
183
183
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
184
184
|
"msw": "~0.35.0",
|
|
185
185
|
"node-plop": "~0.26.2",
|
|
186
|
-
"nodemon": "~2.0.
|
|
186
|
+
"nodemon": "~2.0.13",
|
|
187
187
|
"npm-check-updates": "~11.8.5",
|
|
188
188
|
"null-loader": "~4.0.1",
|
|
189
189
|
"pino": "~6.13.3",
|
|
190
190
|
"pino-pretty": "~7.0.1",
|
|
191
191
|
"pinst": "~2.1.6",
|
|
192
192
|
"plop": "~2.7.4",
|
|
193
|
-
"postcss": "~8.3.
|
|
193
|
+
"postcss": "~8.3.8",
|
|
194
194
|
"postcss-loader": "~6.1.1",
|
|
195
195
|
"postcss-preset-env": "~6.7.0",
|
|
196
196
|
"prettier": "~2.4.1",
|
|
@@ -218,10 +218,11 @@
|
|
|
218
218
|
"stylelint-processor-styled-components": "~1.10.0",
|
|
219
219
|
"stylelint-webpack-plugin": "~3.0.1",
|
|
220
220
|
"svg-url-loader": "~7.1.1",
|
|
221
|
-
"svgo": "~2.
|
|
221
|
+
"svgo": "~2.7.0",
|
|
222
222
|
"terser-webpack-plugin": "~5.2.4",
|
|
223
223
|
"ts-node": "~10.2.1",
|
|
224
224
|
"tsc-alias": "~1.3.9",
|
|
225
|
+
"tsc-files": "~1.1.2",
|
|
225
226
|
"tsconfig-paths": "~3.11.0",
|
|
226
227
|
"tsconfig-paths-webpack-plugin": "~3.5.1",
|
|
227
228
|
"type-fest": "~2.3.4",
|
|
@@ -229,10 +230,10 @@
|
|
|
229
230
|
"update-notifier": "~5.1.0",
|
|
230
231
|
"url-loader": "~4.1.1",
|
|
231
232
|
"uuid": "~8.3.2",
|
|
232
|
-
"webpack": "~5.
|
|
233
|
+
"webpack": "~5.54.0",
|
|
233
234
|
"webpack-bundle-analyzer": "~4.4.2",
|
|
234
235
|
"webpack-cli": "~4.8.0",
|
|
235
|
-
"webpack-dev-middleware": "~5.1
|
|
236
|
+
"webpack-dev-middleware": "~5.2.1",
|
|
236
237
|
"webpack-hot-middleware": "~2.25.1",
|
|
237
238
|
"webpack-manifest-plugin": "~4.0.2",
|
|
238
239
|
"webpack-merge": "~5.8.0",
|
|
@@ -240,7 +241,7 @@
|
|
|
240
241
|
"webpack-strip-block": "~0.3.0",
|
|
241
242
|
"whatwg-fetch": "~3.6.2",
|
|
242
243
|
"workbox-webpack-plugin": "~6.3.0",
|
|
243
|
-
"yargs": "~17.2.
|
|
244
|
+
"yargs": "~17.2.1"
|
|
244
245
|
},
|
|
245
246
|
"devDependencies": {
|
|
246
247
|
"redux": "~4.1.1",
|