@elliemae/pui-cli 7.23.0 → 7.25.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 (54) 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 +12 -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 -1
  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 +11 -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 +8 -1
  43. package/dist/esm/server/logger.js +2 -0
  44. package/dist/esm/server/middlewares.js +0 -1
  45. package/dist/esm/testing/mocks/matchMedia.js +2 -0
  46. package/dist/esm/testing/vitest.config.js +5 -0
  47. package/dist/esm/webpack/helpers.js +1 -0
  48. package/dist/esm/webpack/webpack.base.babel.js +26 -0
  49. package/dist/esm/webpack/webpack.dev.babel.js +7 -0
  50. package/dist/esm/webpack/webpack.lib.base.babel.js +10 -0
  51. package/dist/esm/webpack/webpack.lib.dev.babel.js +11 -1
  52. package/dist/esm/webpack/webpack.lib.prod.babel.js +4 -1
  53. package/dist/esm/webpack/webpack.prod.babel.js +1 -0
  54. package/package.json +33 -33
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
  ));
@@ -30,8 +34,10 @@ __export(csp_exports, {
30
34
  module.exports = __toCommonJS(csp_exports);
31
35
  var import_node_fs = __toESM(require("node:fs"), 1);
32
36
  var import_node_path = __toESM(require("node:path"), 1);
37
+ var import_express = __toESM(require("express"), 1);
33
38
  var import_helmet_csp = __toESM(require("helmet-csp"), 1);
34
39
  var import_crypto = __toESM(require("crypto"), 1);
40
+ const CSP_REPORT_URI = "/diagnostics/v1/csp";
35
41
  const sources = [
36
42
  "'self'",
37
43
  "http://localhost:*",
@@ -86,9 +92,14 @@ const csp = (app) => {
86
92
  scriptSrcAttr: ["'none'"],
87
93
  styleSrc: sources.concat(["'unsafe-inline'"]),
88
94
  upgradeInsecureRequests: [],
89
- reportUri: "/v1/csp"
95
+ reportUri: CSP_REPORT_URI
90
96
  },
91
97
  reportOnly: true
92
98
  })
93
99
  );
100
+ app.use(CSP_REPORT_URI, import_express.default.json({ type: "application/csp-report" }));
101
+ app.use(CSP_REPORT_URI, (req, res) => {
102
+ console.log("CSP Violation: ", req.body);
103
+ res.status(204).end();
104
+ });
94
105
  };
@@ -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
  ));
@@ -53,7 +57,6 @@ const setupDefaultMiddlewares = (app) => {
53
57
  app.use(import_express.default.urlencoded({ extended: false }));
54
58
  app.use(import_express.default.text({ type: "text/plain" }));
55
59
  app.use(import_express.default.json({ type: "application/json" }));
56
- app.use(import_express.default.json({ type: "application/csp-report" }));
57
60
  };
58
61
  const setupAdditionalMiddlewars = (app, options = {}) => {
59
62
  const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
@@ -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,12 +97,15 @@ 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,
108
+ basePath,
100
109
  globalScriptPath,
101
110
  userMonScriptPath,
102
111
  appLoaderScriptPath,
@@ -107,7 +116,9 @@ const devConfig = {
107
116
  }),
108
117
  new import_circular_dependency_plugin.default({
109
118
  exclude: /a\.(js|ts|jsx|tsx)|node_modules/,
119
+ // exclude node_modules
110
120
  failOnError: false
121
+ // show a warning when there is a circular dependency
111
122
  }),
112
123
  new import_mini_css_extract_plugin.default({
113
124
  filename: "[name].css",