@elliemae/pui-cli 7.23.0 → 7.24.0

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.
Files changed (53) hide show
  1. package/dist/cjs/cli.js +4 -0
  2. package/dist/cjs/commands/build.js +4 -0
  3. package/dist/cjs/commands/codemod.js +4 -0
  4. package/dist/cjs/commands/gendoc.js +4 -0
  5. package/dist/cjs/commands/lint.js +4 -0
  6. package/dist/cjs/commands/pack.js +4 -0
  7. package/dist/cjs/commands/start.js +4 -0
  8. package/dist/cjs/commands/storybook.js +4 -0
  9. package/dist/cjs/commands/test.js +5 -0
  10. package/dist/cjs/commands/tscheck.js +4 -0
  11. package/dist/cjs/commands/utils.js +4 -0
  12. package/dist/cjs/commands/version.js +4 -0
  13. package/dist/cjs/commands/vitest.js +5 -0
  14. package/dist/cjs/lint-config/lint-staged.config.js +4 -0
  15. package/dist/cjs/monorepo/set-registry-version.js +4 -0
  16. package/dist/cjs/monorepo/set-workspace-version.js +4 -0
  17. package/dist/cjs/pui-config.js +4 -0
  18. package/dist/cjs/server/csp.js +10 -1
  19. package/dist/cjs/server/index.js +4 -0
  20. package/dist/cjs/server/logger.js +6 -0
  21. package/dist/cjs/server/middlewares.js +4 -0
  22. package/dist/cjs/server/utils.js +4 -0
  23. package/dist/cjs/testing/mocks/matchMedia.js +2 -0
  24. package/dist/cjs/testing/mocks/svg.js +4 -0
  25. package/dist/cjs/testing/setup-react-env.js +4 -0
  26. package/dist/cjs/testing/setup-test-env.js +4 -0
  27. package/dist/cjs/testing/setup-tests.js +4 -0
  28. package/dist/cjs/testing/vitest.config.js +9 -0
  29. package/dist/cjs/transpile/esbuild.js +4 -0
  30. package/dist/cjs/transpile/react-shim.js +4 -0
  31. package/dist/cjs/update-notifier.js +4 -0
  32. package/dist/cjs/webpack/helpers.js +5 -0
  33. package/dist/cjs/webpack/webpack.base.babel.js +30 -0
  34. package/dist/cjs/webpack/webpack.dev.babel.js +10 -0
  35. package/dist/cjs/webpack/webpack.lib.base.babel.js +14 -0
  36. package/dist/cjs/webpack/webpack.lib.dev.babel.js +15 -1
  37. package/dist/cjs/webpack/webpack.lib.prod.babel.js +8 -1
  38. package/dist/cjs/webpack/webpack.prod.babel.js +5 -0
  39. package/dist/cjs/webpack/webpack.storybook.js +4 -0
  40. package/dist/esm/commands/test.js +1 -0
  41. package/dist/esm/commands/vitest.js +1 -0
  42. package/dist/esm/server/csp.js +6 -1
  43. package/dist/esm/server/logger.js +2 -0
  44. package/dist/esm/testing/mocks/matchMedia.js +2 -0
  45. package/dist/esm/testing/vitest.config.js +5 -0
  46. package/dist/esm/webpack/helpers.js +1 -0
  47. package/dist/esm/webpack/webpack.base.babel.js +26 -0
  48. package/dist/esm/webpack/webpack.dev.babel.js +6 -0
  49. package/dist/esm/webpack/webpack.lib.base.babel.js +10 -0
  50. package/dist/esm/webpack/webpack.lib.dev.babel.js +11 -1
  51. package/dist/esm/webpack/webpack.lib.prod.babel.js +4 -1
  52. package/dist/esm/webpack/webpack.prod.babel.js +1 -0
  53. package/package.json +26 -26
package/dist/cjs/cli.js CHANGED
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
22
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
23
  mod
20
24
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -38,6 +42,7 @@ const debugTest = async () => {
38
42
  );
39
43
  };
40
44
  const testCmd = {
45
+ // eslint-disable-next-line max-statements
41
46
  handler: async (argv) => {
42
47
  let commandOptions = "--coverage --maxWorkers=50%";
43
48
  if (argv.fix)
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -33,6 +37,7 @@ const test = async (commandOptions) => {
33
37
  await (0, import_utils.exec)(`vitest ${commandOptions}`);
34
38
  };
35
39
  const vitestCmd = {
40
+ // eslint-disable-next-line max-statements
36
41
  handler: async (argv) => {
37
42
  let commandOptions = "--coverage";
38
43
  if (argv.fix)
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,6 +36,7 @@ var import_node_fs = __toESM(require("node:fs"), 1);
32
36
  var import_node_path = __toESM(require("node:path"), 1);
33
37
  var import_helmet_csp = __toESM(require("helmet-csp"), 1);
34
38
  var import_crypto = __toESM(require("crypto"), 1);
39
+ const CSP_REPORT_URI = "/diagnostics/v1/csp";
35
40
  const sources = [
36
41
  "'self'",
37
42
  "http://localhost:*",
@@ -86,9 +91,13 @@ const csp = (app) => {
86
91
  scriptSrcAttr: ["'none'"],
87
92
  styleSrc: sources.concat(["'unsafe-inline'"]),
88
93
  upgradeInsecureRequests: [],
89
- reportUri: "/v1/csp"
94
+ reportUri: CSP_REPORT_URI
90
95
  },
91
96
  reportOnly: true
92
97
  })
93
98
  );
99
+ app.use(CSP_REPORT_URI, (req, res) => {
100
+ console.log("CSP Violation: ", req.body);
101
+ res.status(204).end();
102
+ });
94
103
  };
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
22
  mod
19
23
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -31,9 +35,11 @@ var import_chalk = __toESM(require("chalk"), 1);
31
35
  var import_ip = __toESM(require("ip"), 1);
32
36
  const divider = import_chalk.default.gray("\n-----------------------------------");
33
37
  const logger = {
38
+ // Called whenever there's an error on the server we want to print
34
39
  error: (err) => {
35
40
  console.error(import_chalk.default.red(err));
36
41
  },
42
+ // Called when express.js app starts on given port w/o errors
37
43
  appStarted: (port, host, tunnelStarted) => {
38
44
  console.log(`Server started ! ${import_chalk.default.green("\u2713")}`);
39
45
  if (tunnelStarted) {
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,7 +29,9 @@ const addMatchMedia = () => {
29
29
  media: query,
30
30
  onchange: null,
31
31
  addListener: jest.fn(),
32
+ // Deprecated
32
33
  removeListener: jest.fn(),
34
+ // Deprecated
33
35
  addEventListener: jest.fn(),
34
36
  removeEventListener: jest.fn(),
35
37
  dispatchEvent: jest.fn()
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
22
  mod
19
23
  ));
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
22
  mod
19
23
  ));
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
22
  mod
19
23
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -42,6 +46,11 @@ const vitestConfig = (0, import_config.defineConfig)({
42
46
  setupFiles: [import_node_path.default.resolve(__dirname, "./setup-test-env.js")],
43
47
  include: ["./{app,lib}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
44
48
  exclude: [...import_config.configDefaults.exclude, ".idea", ".git", ".cache", "e2e"],
49
+ // watchIgnore: [
50
+ // '.*\\/node_modules\\/.*',
51
+ // '.*\\/build\\/.*',
52
+ // '.*\\/dist\\/.*',
53
+ // ],
45
54
  coverage: {
46
55
  reportsDirectory: "./reports/coverage"
47
56
  },
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -205,6 +209,7 @@ const getCompressionPlugins = (isLibrary = false) => {
205
209
  const commonConfig = {
206
210
  test: /\.(js|css)$/,
207
211
  exclude: !isLibrary ? excludeList : [],
212
+ // 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
208
213
  minRatio: Infinity
209
214
  };
210
215
  return [
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -74,6 +78,12 @@ const plugins = [
74
78
  toType: "dir",
75
79
  info: { minimized: true }
76
80
  },
81
+ // {
82
+ // from: 'node_modules/@elliemae/pui-user-monitoring/dist/umd/*.js',
83
+ // to: './latest/js/[name].[contenthash][ext]',
84
+ // noErrorOnMissing: true,
85
+ // info: { minimized: true },
86
+ // },
77
87
  {
78
88
  from: "node_modules/@elliemae/pui-app-loader/dist/public/js",
79
89
  to: "./latest/js",
@@ -81,6 +91,12 @@ const plugins = [
81
91
  noErrorOnMissing: true,
82
92
  info: { minimized: true }
83
93
  },
94
+ // {
95
+ // from: 'node_modules/@elliemae/pui-app-loader/dist/umd/*.js',
96
+ // to: './latest/js/[name].[contenthash][ext]',
97
+ // noErrorOnMissing: true,
98
+ // info: { minimized: true },
99
+ // },
84
100
  {
85
101
  from: "node_modules/@elliemae/encw-loader/dist/public/js",
86
102
  to: "./latest/js",
@@ -88,6 +104,12 @@ const plugins = [
88
104
  noErrorOnMissing: true,
89
105
  info: { minimized: true }
90
106
  },
107
+ // {
108
+ // from: 'node_modules/@elliemae/encw-loader/dist/umd/*.js',
109
+ // to: './latest/js/[name].[contenthash][ext]',
110
+ // noErrorOnMissing: true,
111
+ // info: { minimized: true },
112
+ // },
91
113
  {
92
114
  from: "node_modules/@elliemae/pui-diagnostics/dist/public/js",
93
115
  to: "./latest/js",
@@ -95,6 +117,12 @@ const plugins = [
95
117
  noErrorOnMissing: true,
96
118
  info: { minimized: true }
97
119
  },
120
+ // {
121
+ // from: 'node_modules/@elliemae/pui-diagnostics/dist/umd/*.js',
122
+ // to: './latest/js/[name].[contenthash][ext]',
123
+ // noErrorOnMissing: true,
124
+ // info: { minimized: true },
125
+ // },
98
126
  {
99
127
  from: "public",
100
128
  to: "./latest",
@@ -128,6 +156,7 @@ const plugins = [
128
156
  favicons: {
129
157
  developerName: "ICE MT",
130
158
  developerURL: null,
159
+ // prevent retrieving from the nearest package.json
131
160
  icons: {
132
161
  coast: false,
133
162
  yandex: false
@@ -144,6 +173,7 @@ const baseConfig = (options) => ({
144
173
  publicPath: "auto",
145
174
  ...options.output
146
175
  },
176
+ // Merge with env dependent settings
147
177
  optimization: options.optimization,
148
178
  module: {
149
179
  rules: [
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -62,9 +66,11 @@ const devConfig = {
62
66
  config: [__filename]
63
67
  }
64
68
  },
69
+ // Add hot reloading in development
65
70
  entry: {
66
71
  app: import_node_path.default.join(process.cwd(), "app/index")
67
72
  },
73
+ // Don't use hashes in dev mode for better performance
68
74
  output: {
69
75
  path: buildPath,
70
76
  publicPath: "auto",
@@ -91,9 +97,11 @@ const devConfig = {
91
97
  resolve: {
92
98
  alias: {}
93
99
  },
100
+ // Add development plugins
94
101
  plugins: [
95
102
  new import_html_webpack_plugin.default({
96
103
  inject: !(0, import_helpers.isAppLoaderEnabled)(),
104
+ // Inject all files that are generated by webpack, e.g. bundle.js
97
105
  template: !(0, import_helpers.isAppLoaderEnabled)() ? "app/index.html" : "app/index-app-loader.html",
98
106
  emui: {
99
107
  appVersion,
@@ -107,7 +115,9 @@ const devConfig = {
107
115
  }),
108
116
  new import_circular_dependency_plugin.default({
109
117
  exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
118
+ // exclude node_modules
110
119
  failOnError: false
120
+ // show a warning when there is a circular dependency
111
121
  }),
112
122
  new import_mini_css_extract_plugin.default({
113
123
  filename: "[name].css",
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -62,11 +66,13 @@ const plugins = [
62
66
  new import_webpack.default.DefinePlugin({
63
67
  APP_CONFIG: (0, import_utils.getAppConfig)(true)
64
68
  }),
69
+ /* eslint-disable indent */
65
70
  ...copyPluginPatterns.length > 0 ? [
66
71
  new import_copy_webpack_plugin.default({
67
72
  patterns: copyPluginPatterns
68
73
  })
69
74
  ] : [],
75
+ /* eslint-enable indent */
70
76
  new import_duplicate_package_checker_webpack_plugin.default(),
71
77
  new import_webpack.default.optimize.LimitChunkCountPlugin({
72
78
  maxChunks: 1
@@ -84,11 +90,13 @@ const baseConfig = (options) => ({
84
90
  libraryTarget: "umd",
85
91
  ...options.output
86
92
  },
93
+ // Merge with env dependent settings
87
94
  optimization: options.optimization,
88
95
  module: {
89
96
  rules: [
90
97
  {
91
98
  test: /^(?!.*\.exec\.js$).*\.jsx?$/,
99
+ // Transform all .js and .jsx files with Babel
92
100
  exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
93
101
  resolve: {
94
102
  fullySpecified: false
@@ -103,6 +111,7 @@ const baseConfig = (options) => ({
103
111
  },
104
112
  {
105
113
  test: /^(?!.*\.exec\.js$).*\.tsx?$/,
114
+ // Transform all .js and .jsx files with Babel
106
115
  exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile),
107
116
  resolve: {
108
117
  fullySpecified: false
@@ -160,6 +169,11 @@ const baseConfig = (options) => ({
160
169
  exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
161
170
  type: "asset"
162
171
  },
172
+ // {
173
+ // test: /(?<!\/iframe)\.html$/,
174
+ // exclude: excludeNodeModulesExcept(['@elliemae/*']),
175
+ // use: 'html-loader',
176
+ // },
163
177
  {
164
178
  test: /\.(mp4|webm)$/,
165
179
  exclude: (0, import_helpers.excludeNodeModulesExcept)(["@elliemae/*"]),
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -49,6 +53,11 @@ const getHtmlWebpackPlugins = () => {
49
53
  };
50
54
  var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig)({
51
55
  mode: "development",
56
+ // output: {
57
+ // filename: `js/${libraryName}.js`,
58
+ // chunkFilename: `js/${libraryName}.chunk.js`,
59
+ // assetModuleFilename: '[name][ext][query]',
60
+ // },
52
61
  optimization: {
53
62
  splitChunks: {
54
63
  chunks: "all"
@@ -61,9 +70,14 @@ var webpack_lib_dev_babel_default = (0, import_webpack_lib_base_babel.baseConfig
61
70
  ...getHtmlWebpackPlugins(),
62
71
  new import_circular_dependency_plugin.default({
63
72
  exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
73
+ // exclude node_modules
64
74
  failOnError: false
75
+ // show a warning when there is a circular dependency
76
+ }),
77
+ new import_mini_css_extract_plugin.default({
78
+ // filename: `css/${libraryName}.css`,
79
+ // chunkFilename: `css/${libraryName}.chunk.css`,
65
80
  }),
66
- new import_mini_css_extract_plugin.default({}),
67
81
  new import_webpack.default.ProgressPlugin()
68
82
  ],
69
83
  devtool: "eval-source-map",
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -79,7 +83,10 @@ const prodConfig = {
79
83
  },
80
84
  plugins: [
81
85
  ...getHtmlWebpackPlugins(),
82
- new import_mini_css_extract_plugin.default({}),
86
+ new import_mini_css_extract_plugin.default({
87
+ // filename: `css/${libraryName}.[contenthash].css`,
88
+ // chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
89
+ }),
83
90
  ...(0, import_helpers.getCompressionPlugins)(true),
84
91
  new import_webpack_bundle_analyzer.BundleAnalyzerPlugin({
85
92
  analyzerMode: "static",
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -44,6 +48,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
44
48
  entry: {
45
49
  app: import_node_path.default.join(process.cwd(), "app/index")
46
50
  },
51
+ // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
47
52
  output: {
48
53
  path: buildPath,
49
54
  publicPath: "auto",
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -9,6 +9,7 @@ const debugTest = async () => {
9
9
  );
10
10
  };
11
11
  const testCmd = {
12
+ // eslint-disable-next-line max-statements
12
13
  handler: async (argv) => {
13
14
  let commandOptions = "--coverage --maxWorkers=50%";
14
15
  if (argv.fix)
@@ -4,6 +4,7 @@ const test = async (commandOptions) => {
4
4
  await exec(`vitest ${commandOptions}`);
5
5
  };
6
6
  const vitestCmd = {
7
+ // eslint-disable-next-line max-statements
7
8
  handler: async (argv) => {
8
9
  let commandOptions = "--coverage";
9
10
  if (argv.fix)
@@ -2,6 +2,7 @@ import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import cspPolicy from "helmet-csp";
4
4
  import crypto from "crypto";
5
+ const CSP_REPORT_URI = "/diagnostics/v1/csp";
5
6
  const sources = [
6
7
  "'self'",
7
8
  "http://localhost:*",
@@ -56,11 +57,15 @@ const csp = (app) => {
56
57
  scriptSrcAttr: ["'none'"],
57
58
  styleSrc: sources.concat(["'unsafe-inline'"]),
58
59
  upgradeInsecureRequests: [],
59
- reportUri: "/v1/csp"
60
+ reportUri: CSP_REPORT_URI
60
61
  },
61
62
  reportOnly: true
62
63
  })
63
64
  );
65
+ app.use(CSP_REPORT_URI, (req, res) => {
66
+ console.log("CSP Violation: ", req.body);
67
+ res.status(204).end();
68
+ });
64
69
  };
65
70
  export {
66
71
  csp,
@@ -2,9 +2,11 @@ import chalk from "chalk";
2
2
  import ip from "ip";
3
3
  const divider = chalk.gray("\n-----------------------------------");
4
4
  const logger = {
5
+ // Called whenever there's an error on the server we want to print
5
6
  error: (err) => {
6
7
  console.error(chalk.red(err));
7
8
  },
9
+ // Called when express.js app starts on given port w/o errors
8
10
  appStarted: (port, host, tunnelStarted) => {
9
11
  console.log(`Server started ! ${chalk.green("\u2713")}`);
10
12
  if (tunnelStarted) {
@@ -6,7 +6,9 @@ const addMatchMedia = () => {
6
6
  media: query,
7
7
  onchange: null,
8
8
  addListener: jest.fn(),
9
+ // Deprecated
9
10
  removeListener: jest.fn(),
11
+ // Deprecated
10
12
  addEventListener: jest.fn(),
11
13
  removeEventListener: jest.fn(),
12
14
  dispatchEvent: jest.fn()
@@ -12,6 +12,11 @@ const vitestConfig = defineConfig({
12
12
  setupFiles: [path.resolve(__dirname, "./setup-test-env.js")],
13
13
  include: ["./{app,lib}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
14
14
  exclude: [...configDefaults.exclude, ".idea", ".git", ".cache", "e2e"],
15
+ // watchIgnore: [
16
+ // '.*\\/node_modules\\/.*',
17
+ // '.*\\/build\\/.*',
18
+ // '.*\\/dist\\/.*',
19
+ // ],
15
20
  coverage: {
16
21
  reportsDirectory: "./reports/coverage"
17
22
  },
@@ -161,6 +161,7 @@ const getCompressionPlugins = (isLibrary = false) => {
161
161
  const commonConfig = {
162
162
  test: /\.(js|css)$/,
163
163
  exclude: !isLibrary ? excludeList : [],
164
+ // 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
164
165
  minRatio: Infinity
165
166
  };
166
167
  return [
@@ -51,6 +51,12 @@ const plugins = [
51
51
  toType: "dir",
52
52
  info: { minimized: true }
53
53
  },
54
+ // {
55
+ // from: 'node_modules/@elliemae/pui-user-monitoring/dist/umd/*.js',
56
+ // to: './latest/js/[name].[contenthash][ext]',
57
+ // noErrorOnMissing: true,
58
+ // info: { minimized: true },
59
+ // },
54
60
  {
55
61
  from: "node_modules/@elliemae/pui-app-loader/dist/public/js",
56
62
  to: "./latest/js",
@@ -58,6 +64,12 @@ const plugins = [
58
64
  noErrorOnMissing: true,
59
65
  info: { minimized: true }
60
66
  },
67
+ // {
68
+ // from: 'node_modules/@elliemae/pui-app-loader/dist/umd/*.js',
69
+ // to: './latest/js/[name].[contenthash][ext]',
70
+ // noErrorOnMissing: true,
71
+ // info: { minimized: true },
72
+ // },
61
73
  {
62
74
  from: "node_modules/@elliemae/encw-loader/dist/public/js",
63
75
  to: "./latest/js",
@@ -65,6 +77,12 @@ const plugins = [
65
77
  noErrorOnMissing: true,
66
78
  info: { minimized: true }
67
79
  },
80
+ // {
81
+ // from: 'node_modules/@elliemae/encw-loader/dist/umd/*.js',
82
+ // to: './latest/js/[name].[contenthash][ext]',
83
+ // noErrorOnMissing: true,
84
+ // info: { minimized: true },
85
+ // },
68
86
  {
69
87
  from: "node_modules/@elliemae/pui-diagnostics/dist/public/js",
70
88
  to: "./latest/js",
@@ -72,6 +90,12 @@ const plugins = [
72
90
  noErrorOnMissing: true,
73
91
  info: { minimized: true }
74
92
  },
93
+ // {
94
+ // from: 'node_modules/@elliemae/pui-diagnostics/dist/umd/*.js',
95
+ // to: './latest/js/[name].[contenthash][ext]',
96
+ // noErrorOnMissing: true,
97
+ // info: { minimized: true },
98
+ // },
75
99
  {
76
100
  from: "public",
77
101
  to: "./latest",
@@ -105,6 +129,7 @@ const plugins = [
105
129
  favicons: {
106
130
  developerName: "ICE MT",
107
131
  developerURL: null,
132
+ // prevent retrieving from the nearest package.json
108
133
  icons: {
109
134
  coast: false,
110
135
  yandex: false
@@ -121,6 +146,7 @@ const baseConfig = (options) => ({
121
146
  publicPath: "auto",
122
147
  ...options.output
123
148
  },
149
+ // Merge with env dependent settings
124
150
  optimization: options.optimization,
125
151
  module: {
126
152
  rules: [
@@ -36,9 +36,11 @@ const devConfig = {
36
36
  config: [__filename]
37
37
  }
38
38
  },
39
+ // Add hot reloading in development
39
40
  entry: {
40
41
  app: path.join(process.cwd(), "app/index")
41
42
  },
43
+ // Don't use hashes in dev mode for better performance
42
44
  output: {
43
45
  path: buildPath,
44
46
  publicPath: "auto",
@@ -65,9 +67,11 @@ const devConfig = {
65
67
  resolve: {
66
68
  alias: {}
67
69
  },
70
+ // Add development plugins
68
71
  plugins: [
69
72
  new HtmlWebpackPlugin({
70
73
  inject: !isAppLoaderEnabled(),
74
+ // Inject all files that are generated by webpack, e.g. bundle.js
71
75
  template: !isAppLoaderEnabled() ? "app/index.html" : "app/index-app-loader.html",
72
76
  emui: {
73
77
  appVersion,
@@ -81,7 +85,9 @@ const devConfig = {
81
85
  }),
82
86
  new CircularDependencyPlugin({
83
87
  exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
88
+ // exclude node_modules
84
89
  failOnError: false
90
+ // show a warning when there is a circular dependency
85
91
  }),
86
92
  new MiniCssExtractPlugin({
87
93
  filename: "[name].css",
@@ -39,11 +39,13 @@ const plugins = [
39
39
  new webpack.DefinePlugin({
40
40
  APP_CONFIG: getAppConfig(true)
41
41
  }),
42
+ /* eslint-disable indent */
42
43
  ...copyPluginPatterns.length > 0 ? [
43
44
  new CopyWebpackPlugin({
44
45
  patterns: copyPluginPatterns
45
46
  })
46
47
  ] : [],
48
+ /* eslint-enable indent */
47
49
  new DuplicatePackageCheckerPlugin(),
48
50
  new webpack.optimize.LimitChunkCountPlugin({
49
51
  maxChunks: 1
@@ -61,11 +63,13 @@ const baseConfig = (options) => ({
61
63
  libraryTarget: "umd",
62
64
  ...options.output
63
65
  },
66
+ // Merge with env dependent settings
64
67
  optimization: options.optimization,
65
68
  module: {
66
69
  rules: [
67
70
  {
68
71
  test: /^(?!.*\.exec\.js$).*\.jsx?$/,
72
+ // Transform all .js and .jsx files with Babel
69
73
  exclude: excludeNodeModulesExcept(modulesToTranspile),
70
74
  resolve: {
71
75
  fullySpecified: false
@@ -80,6 +84,7 @@ const baseConfig = (options) => ({
80
84
  },
81
85
  {
82
86
  test: /^(?!.*\.exec\.js$).*\.tsx?$/,
87
+ // Transform all .js and .jsx files with Babel
83
88
  exclude: excludeNodeModulesExcept(modulesToTranspile),
84
89
  resolve: {
85
90
  fullySpecified: false
@@ -137,6 +142,11 @@ const baseConfig = (options) => ({
137
142
  exclude: excludeNodeModulesExcept(["@elliemae/*"]),
138
143
  type: "asset"
139
144
  },
145
+ // {
146
+ // test: /(?<!\/iframe)\.html$/,
147
+ // exclude: excludeNodeModulesExcept(['@elliemae/*']),
148
+ // use: 'html-loader',
149
+ // },
140
150
  {
141
151
  test: /\.(mp4|webm)$/,
142
152
  exclude: excludeNodeModulesExcept(["@elliemae/*"]),
@@ -20,6 +20,11 @@ const getHtmlWebpackPlugins = () => {
20
20
  };
21
21
  var webpack_lib_dev_babel_default = baseConfig({
22
22
  mode: "development",
23
+ // output: {
24
+ // filename: `js/${libraryName}.js`,
25
+ // chunkFilename: `js/${libraryName}.chunk.js`,
26
+ // assetModuleFilename: '[name][ext][query]',
27
+ // },
23
28
  optimization: {
24
29
  splitChunks: {
25
30
  chunks: "all"
@@ -32,9 +37,14 @@ var webpack_lib_dev_babel_default = baseConfig({
32
37
  ...getHtmlWebpackPlugins(),
33
38
  new CircularDependencyPlugin({
34
39
  exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
40
+ // exclude node_modules
35
41
  failOnError: false
42
+ // show a warning when there is a circular dependency
43
+ }),
44
+ new MiniCssExtractPlugin({
45
+ // filename: `css/${libraryName}.css`,
46
+ // chunkFilename: `css/${libraryName}.chunk.css`,
36
47
  }),
37
- new MiniCssExtractPlugin({}),
38
48
  new webpack.ProgressPlugin()
39
49
  ],
40
50
  devtool: "eval-source-map",
@@ -54,7 +54,10 @@ const prodConfig = {
54
54
  },
55
55
  plugins: [
56
56
  ...getHtmlWebpackPlugins(),
57
- new MiniCssExtractPlugin({}),
57
+ new MiniCssExtractPlugin({
58
+ // filename: `css/${libraryName}.[contenthash].css`,
59
+ // chunkFilename: `css/${libraryName}.[contenthash].chunk.css`,
60
+ }),
58
61
  ...getCompressionPlugins(true),
59
62
  new BundleAnalyzerPlugin({
60
63
  analyzerMode: "static",
@@ -20,6 +20,7 @@ const getProdConfig = ({ latestVersion = true } = {}) => {
20
20
  entry: {
21
21
  app: path.join(process.cwd(), "app/index")
22
22
  },
23
+ // Utilize long-term caching by adding content hashes (not compilation hashes) to compiled assets
23
24
  output: {
24
25
  path: buildPath,
25
26
  publicPath: "auto",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "7.23.0",
3
+ "version": "7.24.0",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@axe-core/react": "~4.5.2",
66
66
  "@babel/cli": "~7.20.7",
67
- "@babel/core": "~7.20.7",
67
+ "@babel/core": "~7.20.12",
68
68
  "@babel/eslint-parser": "~7.19.1",
69
69
  "@babel/node": "~7.20.7",
70
70
  "@babel/plugin-proposal-class-properties": "~7.18.6",
@@ -79,13 +79,13 @@
79
79
  "@babel/preset-react": "~7.18.6",
80
80
  "@babel/preset-typescript": "~7.18.6",
81
81
  "@babel/runtime": "~7.20.7",
82
- "@commitlint/cli": "~17.3.0",
83
- "@commitlint/config-conventional": "~17.3.0",
82
+ "@commitlint/cli": "~17.4.1",
83
+ "@commitlint/config-conventional": "~17.4.0",
84
84
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.6.0",
85
85
  "@faker-js/faker": "7.6.0",
86
- "@nrwl/cli": "15.4.4",
87
- "@nrwl/tao": "15.4.4",
88
- "@nrwl/workspace": "15.4.4",
86
+ "@nrwl/cli": "15.4.5",
87
+ "@nrwl/tao": "15.4.5",
88
+ "@nrwl/workspace": "15.4.5",
89
89
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.10",
90
90
  "@semantic-release/changelog": "~6.0.2",
91
91
  "@semantic-release/exec": "~6.0.3",
@@ -96,7 +96,7 @@
96
96
  "@storybook/addon-interactions": "~6.5.15",
97
97
  "@storybook/addon-links": "~6.5.15",
98
98
  "@storybook/addon-storysource": "~6.5.15",
99
- "@storybook/builder-vite": "~0.2.6",
99
+ "@storybook/builder-vite": "~0.2.7",
100
100
  "@storybook/builder-webpack5": "~6.5.15",
101
101
  "@storybook/manager-webpack5": "~6.5.15",
102
102
  "@storybook/react": "~6.5.15",
@@ -104,7 +104,7 @@
104
104
  "@stylelint/postcss-css-in-js": "~0.38.0",
105
105
  "@svgr/webpack": "~6.5.1",
106
106
  "@swc/cli": "~0.1.59",
107
- "@swc/core": "~1.3.24",
107
+ "@swc/core": "~1.3.25",
108
108
  "@swc/jest": "~0.2.24",
109
109
  "@testing-library/jest-dom": "~5.16.5",
110
110
  "@testing-library/react": "~13.4.0",
@@ -117,17 +117,17 @@
117
117
  "@types/supertest": "~2.0.12",
118
118
  "@types/uuid": "~9.0.0",
119
119
  "@types/testing-library__jest-dom": "~5.14.5",
120
- "@typescript-eslint/eslint-plugin": "~5.48.0",
121
- "@typescript-eslint/parser": "~5.48.0",
122
- "@vitejs/plugin-react": "~3.0.0",
123
- "@vitest/coverage-c8": "~0.26.3",
120
+ "@typescript-eslint/eslint-plugin": "~5.48.1",
121
+ "@typescript-eslint/parser": "~5.48.1",
122
+ "@vitejs/plugin-react": "~3.0.1",
123
+ "@vitest/coverage-c8": "~0.27.0",
124
124
  "autoprefixer": "~10.4.13",
125
- "axe-core": "~4.6.1",
125
+ "axe-core": "~4.6.2",
126
126
  "babel-plugin-date-fns": "~2.0.0",
127
127
  "babel-plugin-dynamic-import-node": "~2.3.3",
128
128
  "babel-plugin-import-remove-resource-query": "~1.0.0",
129
129
  "babel-plugin-lodash": "~3.3.4",
130
- "babel-plugin-module-resolver": "~4.1.0",
130
+ "babel-plugin-module-resolver": "~5.0.0",
131
131
  "babel-plugin-source-map-support": "~2.2.0",
132
132
  "babel-plugin-styled-components": "~2.0.7",
133
133
  "babel-plugin-transform-react-remove-prop-types": "~0.4.24",
@@ -146,12 +146,12 @@
146
146
  "css-loader": "~6.7.3",
147
147
  "css-minimizer-webpack-plugin": "~4.2.2",
148
148
  "depcheck": "~1.4.3",
149
- "docdash": "~2.0.0",
149
+ "docdash": "~2.0.1",
150
150
  "dotenv": "~16.0.3",
151
151
  "dotenv-webpack": "~8.0.1",
152
152
  "duplicate-package-checker-webpack-plugin": "~3.0.0",
153
153
  "enhanced-resolve": "5.12.0",
154
- "esbuild": "~0.16.13",
154
+ "esbuild": "~0.16.16",
155
155
  "esbuild-loader": "~2.20.0",
156
156
  "esbuild-plugin-svgr": "~1.0.1",
157
157
  "eslint": "~8.31.0",
@@ -166,15 +166,15 @@
166
166
  "eslint-plugin-compat": "~4.0.2",
167
167
  "eslint-plugin-eslint-comments": "~3.2.0",
168
168
  "eslint-plugin-import": "~2.26.0",
169
- "eslint-plugin-jest": "~27.2.0",
169
+ "eslint-plugin-jest": "~27.2.1",
170
170
  "eslint-plugin-jsdoc": "~39.6.4",
171
- "eslint-plugin-jsx-a11y": "~6.6.1",
171
+ "eslint-plugin-jsx-a11y": "~6.7.0",
172
172
  "eslint-plugin-mdx": "~2.0.5",
173
173
  "eslint-plugin-prettier": "~4.2.1",
174
174
  "eslint-plugin-react": "~7.31.11",
175
175
  "eslint-plugin-react-hooks": "~4.6.0",
176
176
  "eslint-plugin-redux-saga": "~1.3.2",
177
- "eslint-plugin-storybook": "~0.6.8",
177
+ "eslint-plugin-storybook": "~0.6.10",
178
178
  "eslint-plugin-testing-library": "~5.9.1",
179
179
  "eslint-plugin-wdio": "~8.0.14",
180
180
  "execa": "~6.1.0",
@@ -186,7 +186,7 @@
186
186
  "fast-glob": "~3.2.12",
187
187
  "find-up": "~6.3.0",
188
188
  "find-up-cli": "~5.0.0",
189
- "happy-dom": "~8.1.1",
189
+ "happy-dom": "~8.1.3",
190
190
  "helmet-csp": "~3.4.0",
191
191
  "html-loader": "~4.2.0",
192
192
  "html-webpack-plugin": "~5.5.0",
@@ -203,7 +203,7 @@
203
203
  "jest-watch-typeahead": "~2.2.1",
204
204
  "jscodeshift": "~0.14.0",
205
205
  "jsdoc": "~4.0.0",
206
- "lerna": "~6.3.0",
206
+ "lerna": "~6.4.0",
207
207
  "lint-staged": "~13.1.0",
208
208
  "mini-css-extract-plugin": "~2.7.2",
209
209
  "minimist": "~1.2.7",
@@ -218,14 +218,14 @@
218
218
  "pino": "~8.8.0",
219
219
  "pino-pretty": "~9.1.1",
220
220
  "plop": "~3.1.1",
221
- "postcss": "~8.4.20",
221
+ "postcss": "~8.4.21",
222
222
  "postcss-html": "~1.5.0",
223
223
  "postcss-jsx": "~0.36.4",
224
224
  "postcss-loader": "~7.0.2",
225
225
  "postcss-markdown": "~1.2.0",
226
226
  "postcss-preset-env": "~7.8.3",
227
227
  "postcss-syntax": "~0.36.2",
228
- "prettier": "~2.8.1",
228
+ "prettier": "~2.8.2",
229
229
  "pug": "~3.0.2",
230
230
  "pug-loader": "~2.4.0",
231
231
  "raf": "~3.4.1",
@@ -249,13 +249,13 @@
249
249
  "swc-loader": "~0.2.3",
250
250
  "ts-node": "~10.9.1",
251
251
  "tsc-alias": "~1.8.2",
252
- "typedoc": "~0.23.23",
252
+ "typedoc": "~0.23.24",
253
253
  "typescript": "~4.9.4",
254
254
  "update-notifier": "~6.0.2",
255
255
  "url-loader": "~4.1.1",
256
256
  "uuid": "~9.0.0",
257
257
  "vite": "~4.0.4",
258
- "vitest": "~0.26.3",
258
+ "vitest": "~0.27.0",
259
259
  "vite-tsconfig-paths": "~4.0.3",
260
260
  "webpack": "~5.75.0",
261
261
  "webpack-bundle-analyzer": "~4.7.0",