@elliemae/pui-cli 7.0.0-alpha.6 → 7.0.0-alpha.9

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 (199) hide show
  1. package/dist/cjs/{babel/babel.config.cjs → babel.config.cjs} +1 -1
  2. package/dist/cjs/cli.js +14 -12
  3. package/dist/cjs/{cli-commands → commands}/build.js +0 -0
  4. package/dist/cjs/{cli-commands → commands}/codemod.js +0 -0
  5. package/dist/cjs/{cli-commands → commands}/gendoc.js +1 -1
  6. package/dist/cjs/{cli-commands → commands}/lint.js +2 -2
  7. package/dist/cjs/{cli-commands → commands}/pack.js +2 -2
  8. package/dist/cjs/{cli-commands → commands}/start.js +0 -0
  9. package/dist/cjs/{cli-commands → commands}/storybook.js +0 -0
  10. package/dist/cjs/{cli-commands → commands}/test.js +0 -0
  11. package/dist/cjs/{cli-commands/tsc.js → commands/tscheck.js} +26 -44
  12. package/dist/cjs/{cli-commands → commands}/utils.js +0 -0
  13. package/dist/cjs/{cli-commands → commands}/version.js +0 -0
  14. package/dist/cjs/{cli-commands → commands}/vitest.js +0 -0
  15. package/dist/cjs/index.cjs +6 -6
  16. package/dist/cjs/index.js +9 -9
  17. package/dist/cjs/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
  18. package/dist/cjs/{lint → lint-config}/commitlint.config.cjs +0 -0
  19. package/dist/cjs/{lint → lint-config}/eslint/common.cjs +0 -0
  20. package/dist/cjs/{lint → lint-config}/eslint/non-react.cjs +0 -0
  21. package/dist/cjs/{lint → lint-config}/eslint/react.cjs +0 -0
  22. package/dist/cjs/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
  23. package/dist/cjs/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
  24. package/dist/cjs/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
  25. package/dist/cjs/{lint → lint-config}/lint-staged.config.js +1 -6
  26. package/dist/cjs/{lint → lint-config}/prettier.config.cjs +0 -0
  27. package/dist/cjs/{lint → lint-config}/stylelint.config.cjs +0 -0
  28. package/dist/cjs/{pui-config/index.js → pui-config.js} +0 -0
  29. package/dist/cjs/{release/release.config.cjs → release.config.cjs} +0 -0
  30. package/dist/cjs/server/{util/app-routes.cjs → app-routes.cjs} +0 -0
  31. package/dist/cjs/server/index.js +5 -5
  32. package/dist/cjs/server/{middlewares/index.js → middlewares.js} +18 -7
  33. package/dist/cjs/server/{util/index.js → utils.js} +12 -12
  34. package/dist/cjs/testing/jest.config.cjs +8 -8
  35. package/dist/cjs/{scripts/helpers/get-npm-config.js → testing/mocks/axios.js} +19 -9
  36. package/dist/cjs/{scripts/helpers/checkmark.js → testing/mocks/cssModule.js} +5 -14
  37. package/dist/cjs/testing/mocks/html.js +23 -0
  38. package/dist/cjs/testing/mocks/image.js +23 -0
  39. package/dist/cjs/testing/mocks/matchMedia.js +43 -0
  40. package/dist/cjs/{typescript/tsc-files/utils.js → testing/mocks/pui-app-loader.js} +5 -12
  41. package/dist/cjs/testing/mocks/pui-diagnostics.js +68 -0
  42. package/dist/cjs/testing/mocks/pui-user-monitoring.js +30 -0
  43. package/dist/cjs/testing/mocks/retry-axios.js +27 -0
  44. package/dist/cjs/{scripts/helpers/xmark.js → testing/mocks/svg.js} +8 -10
  45. package/dist/cjs/testing/mocks/webpack-hmr.js +24 -0
  46. package/dist/cjs/testing/setup-tests.js +3 -3
  47. package/dist/cjs/{scripts/update-notifier.js → update-notifier.js} +2 -2
  48. package/dist/cjs/utils.cjs +3 -0
  49. package/dist/cjs/webpack/webpack.dev.babel.js +3 -3
  50. package/dist/cjs/webpack/webpack.prod.babel.js +2 -2
  51. package/dist/esm/{babel/babel.config.cjs → babel.config.cjs} +1 -1
  52. package/dist/esm/cli.js +13 -11
  53. package/dist/esm/{cli-commands → commands}/build.js +0 -0
  54. package/dist/esm/{cli-commands → commands}/codemod.js +0 -0
  55. package/dist/esm/{cli-commands → commands}/gendoc.js +1 -1
  56. package/dist/esm/{cli-commands → commands}/lint.js +1 -1
  57. package/dist/esm/{cli-commands → commands}/pack.js +1 -1
  58. package/dist/esm/{cli-commands → commands}/start.js +0 -0
  59. package/dist/esm/{cli-commands → commands}/storybook.js +0 -0
  60. package/dist/esm/{cli-commands → commands}/test.js +0 -0
  61. package/dist/esm/commands/tscheck.js +65 -0
  62. package/dist/esm/{cli-commands → commands}/utils.js +0 -0
  63. package/dist/esm/{cli-commands → commands}/version.js +0 -0
  64. package/dist/esm/{cli-commands → commands}/vitest.js +0 -0
  65. package/dist/esm/index.cjs +6 -6
  66. package/dist/esm/index.js +8 -8
  67. package/dist/esm/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
  68. package/dist/esm/{lint → lint-config}/commitlint.config.cjs +0 -0
  69. package/dist/esm/{lint → lint-config}/eslint/common.cjs +0 -0
  70. package/dist/esm/{lint → lint-config}/eslint/non-react.cjs +0 -0
  71. package/dist/esm/{lint → lint-config}/eslint/react.cjs +0 -0
  72. package/dist/esm/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
  73. package/dist/esm/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
  74. package/dist/esm/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
  75. package/dist/esm/{lint → lint-config}/lint-staged.config.js +1 -5
  76. package/dist/esm/{lint → lint-config}/prettier.config.cjs +0 -0
  77. package/dist/esm/{lint → lint-config}/stylelint.config.cjs +0 -0
  78. package/dist/esm/{pui-config/index.js → pui-config.js} +0 -0
  79. package/dist/esm/{release/release.config.cjs → release.config.cjs} +0 -0
  80. package/dist/esm/server/{util/app-routes.cjs → app-routes.cjs} +0 -0
  81. package/dist/esm/server/index.js +2 -2
  82. package/dist/esm/server/middlewares.js +46 -0
  83. package/dist/esm/server/{util/index.js → utils.js} +2 -2
  84. package/dist/esm/testing/jest.config.cjs +8 -8
  85. package/dist/{cjs/testing/mocks/axios.cjs → esm/testing/mocks/axios.js} +8 -5
  86. package/dist/esm/testing/mocks/cssModule.js +4 -0
  87. package/dist/esm/testing/mocks/html.js +4 -0
  88. package/dist/esm/testing/mocks/image.js +4 -0
  89. package/dist/esm/testing/mocks/matchMedia.js +24 -0
  90. package/dist/esm/testing/mocks/pui-app-loader.js +5 -0
  91. package/dist/esm/testing/mocks/pui-diagnostics.js +49 -0
  92. package/dist/esm/testing/mocks/pui-user-monitoring.js +11 -0
  93. package/dist/esm/testing/mocks/retry-axios.js +8 -0
  94. package/dist/esm/testing/mocks/svg.js +7 -0
  95. package/dist/esm/testing/mocks/webpack-hmr.js +5 -0
  96. package/dist/esm/testing/setup-tests.js +2 -2
  97. package/dist/esm/{scripts/update-notifier.js → update-notifier.js} +2 -2
  98. package/dist/esm/utils.cjs +3 -0
  99. package/dist/esm/webpack/webpack.dev.babel.js +2 -2
  100. package/dist/esm/webpack/webpack.prod.babel.js +2 -2
  101. package/dist/types/{babel/babel.config.d.cts → babel.config.d.cts} +0 -0
  102. package/dist/types/{cli-commands → commands}/build.d.ts +0 -0
  103. package/dist/types/{cli-commands → commands}/codemod.d.ts +0 -0
  104. package/dist/types/{cli-commands → commands}/gendoc.d.ts +0 -0
  105. package/dist/types/{cli-commands → commands}/lint.d.ts +0 -0
  106. package/dist/types/{cli-commands → commands}/pack.d.ts +0 -0
  107. package/dist/types/{cli-commands → commands}/start.d.ts +0 -0
  108. package/dist/types/{cli-commands → commands}/storybook.d.ts +0 -0
  109. package/dist/types/{cli-commands → commands}/test.d.ts +0 -0
  110. package/dist/types/commands/tscheck.d.ts +14 -0
  111. package/dist/types/{cli-commands → commands}/utils.d.ts +0 -0
  112. package/dist/types/{cli-commands → commands}/version.d.ts +0 -0
  113. package/dist/types/{cli-commands → commands}/vitest.d.ts +0 -0
  114. package/dist/types/index.d.cts +6 -6
  115. package/dist/types/index.d.ts +8 -8
  116. package/dist/types/{lint → lint-config}/commitlint.config.d.cts +0 -0
  117. package/dist/types/{lint → lint-config}/eslint/common.d.cts +0 -0
  118. package/dist/types/{lint → lint-config}/eslint/non-react.d.cts +0 -0
  119. package/dist/types/{lint → lint-config}/eslint/react.d.cts +0 -0
  120. package/dist/types/{lint → lint-config}/eslint/typescript/common.d.cts +0 -0
  121. package/dist/types/{lint → lint-config}/eslint/typescript/non-react.d.cts +0 -0
  122. package/dist/types/{lint → lint-config}/eslint/typescript/react.d.cts +0 -0
  123. package/dist/types/{lint → lint-config}/lint-staged.config.d.ts +0 -0
  124. package/dist/types/{lint → lint-config}/prettier.config.d.cts +0 -0
  125. package/dist/types/{lint → lint-config}/stylelint.config.d.cts +0 -0
  126. package/dist/types/{pui-config/index.d.ts → pui-config.d.ts} +0 -0
  127. package/dist/types/{release/release.config.d.cts → release.config.d.cts} +0 -0
  128. package/dist/types/server/{util/app-routes.d.cts → app-routes.d.cts} +0 -0
  129. package/dist/types/server/{middlewares/index.d.ts → middlewares.d.ts} +1 -1
  130. package/dist/types/server/{util/index.d.ts → utils.d.ts} +0 -0
  131. package/dist/types/testing/jest.config.d.cts +1 -1
  132. package/dist/types/testing/jest.node.config.d.cts +1 -1
  133. package/dist/types/testing/mocks/axios.d.ts +17 -0
  134. package/dist/types/testing/mocks/cssModule.d.ts +2 -0
  135. package/dist/types/testing/mocks/html.d.ts +2 -0
  136. package/dist/types/testing/mocks/image.d.ts +2 -0
  137. package/dist/types/testing/mocks/matchMedia.d.ts +1 -0
  138. package/dist/types/testing/mocks/{pui-app-loader.d.cts → pui-app-loader.d.ts} +0 -0
  139. package/dist/types/testing/mocks/{pui-diagnostics.d.cts → pui-diagnostics.d.ts} +0 -0
  140. package/dist/types/testing/mocks/{pui-user-monitoring.d.cts → pui-user-monitoring.d.ts} +0 -0
  141. package/dist/types/testing/mocks/{retry-axios.d.cts → retry-axios.d.ts} +0 -0
  142. package/dist/types/testing/mocks/{svg.d.cts → svg.d.ts} +0 -0
  143. package/dist/types/testing/mocks/{webpack-hmr.d.cts → webpack-hmr.d.ts} +0 -0
  144. package/dist/types/update-notifier.d.ts +1 -0
  145. package/dist/types/utils.d.cts +1 -0
  146. package/package.json +8 -4
  147. package/dist/cjs/scripts/helpers/progress.js +0 -35
  148. package/dist/cjs/scripts/npmcheckversion.js +0 -8
  149. package/dist/cjs/server/middlewares/addProdMiddlewares.js +0 -44
  150. package/dist/cjs/testing/mocks/cssModule.cjs +0 -1
  151. package/dist/cjs/testing/mocks/html.cjs +0 -1
  152. package/dist/cjs/testing/mocks/image.cjs +0 -1
  153. package/dist/cjs/testing/mocks/matchMedia.cjs +0 -24
  154. package/dist/cjs/testing/mocks/pui-app-loader.cjs +0 -1
  155. package/dist/cjs/testing/mocks/pui-diagnostics.cjs +0 -28
  156. package/dist/cjs/testing/mocks/pui-user-monitoring.cjs +0 -3
  157. package/dist/cjs/testing/mocks/retry-axios.cjs +0 -3
  158. package/dist/cjs/testing/mocks/svg.cjs +0 -5
  159. package/dist/cjs/testing/mocks/webpack-hmr.cjs +0 -1
  160. package/dist/cjs/typescript/tsc-files/index.js +0 -68
  161. package/dist/cjs/typescript/util.js +0 -28
  162. package/dist/esm/cli-commands/tsc.js +0 -83
  163. package/dist/esm/scripts/helpers/checkmark.js +0 -10
  164. package/dist/esm/scripts/helpers/get-npm-config.js +0 -5
  165. package/dist/esm/scripts/helpers/progress.js +0 -13
  166. package/dist/esm/scripts/helpers/xmark.js +0 -9
  167. package/dist/esm/scripts/npmcheckversion.js +0 -8
  168. package/dist/esm/server/middlewares/addProdMiddlewares.js +0 -22
  169. package/dist/esm/server/middlewares/index.js +0 -35
  170. package/dist/esm/testing/mocks/axios.cjs +0 -15
  171. package/dist/esm/testing/mocks/cssModule.cjs +0 -1
  172. package/dist/esm/testing/mocks/html.cjs +0 -1
  173. package/dist/esm/testing/mocks/image.cjs +0 -1
  174. package/dist/esm/testing/mocks/matchMedia.cjs +0 -24
  175. package/dist/esm/testing/mocks/pui-app-loader.cjs +0 -1
  176. package/dist/esm/testing/mocks/pui-diagnostics.cjs +0 -28
  177. package/dist/esm/testing/mocks/pui-user-monitoring.cjs +0 -3
  178. package/dist/esm/testing/mocks/retry-axios.cjs +0 -3
  179. package/dist/esm/testing/mocks/svg.cjs +0 -5
  180. package/dist/esm/testing/mocks/webpack-hmr.cjs +0 -1
  181. package/dist/esm/typescript/tsc-files/index.js +0 -55
  182. package/dist/esm/typescript/tsc-files/utils.js +0 -12
  183. package/dist/esm/typescript/util.js +0 -6
  184. package/dist/types/cli-commands/tsc.d.ts +0 -20
  185. package/dist/types/scripts/helpers/checkmark.d.ts +0 -7
  186. package/dist/types/scripts/helpers/get-npm-config.d.ts +0 -2
  187. package/dist/types/scripts/helpers/progress.d.ts +0 -7
  188. package/dist/types/scripts/helpers/xmark.d.ts +0 -6
  189. package/dist/types/scripts/npmcheckversion.d.ts +0 -1
  190. package/dist/types/scripts/update-notifier.d.ts +0 -2
  191. package/dist/types/server/middlewares/addProdMiddlewares.d.ts +0 -1
  192. package/dist/types/testing/mocks/axios.d.cts +0 -14
  193. package/dist/types/testing/mocks/cssModule.d.cts +0 -2
  194. package/dist/types/testing/mocks/html.d.cts +0 -2
  195. package/dist/types/testing/mocks/image.d.cts +0 -2
  196. package/dist/types/testing/mocks/matchMedia.d.cts +0 -2
  197. package/dist/types/typescript/tsc-files/index.d.ts +0 -1
  198. package/dist/types/typescript/tsc-files/utils.d.ts +0 -3
  199. package/dist/types/typescript/util.d.ts +0 -1
@@ -15,17 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var utils_exports = {};
19
- __export(utils_exports, {
20
- randomChars: () => randomChars,
21
- resolveFromModule: () => resolveFromModule,
22
- resolveFromRoot: () => resolveFromRoot
18
+ var pui_app_loader_exports = {};
19
+ __export(pui_app_loader_exports, {
20
+ load: () => load
23
21
  });
24
- module.exports = __toCommonJS(utils_exports);
25
- var import_node_path = require("node:path");
26
- const randomChars = () => Math.random().toString(36).slice(2);
27
- const resolveFromModule = (moduleName, ...paths) => {
28
- const modulePath = (0, import_node_path.dirname)(require.resolve(`${moduleName}/package.json`));
29
- return (0, import_node_path.join)(modulePath, ...paths);
22
+ module.exports = __toCommonJS(pui_app_loader_exports);
23
+ const load = () => {
30
24
  };
31
- const resolveFromRoot = (...paths) => (0, import_node_path.join)(process.cwd(), ...paths);
@@ -0,0 +1,68 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var pui_diagnostics_exports = {};
19
+ __export(pui_diagnostics_exports, {
20
+ Console: () => Console,
21
+ LogLevel: () => LogLevel,
22
+ http: () => http,
23
+ logUnhandledErrors: () => logUnhandledErrors,
24
+ logger: () => logger,
25
+ webvitals: () => webvitals
26
+ });
27
+ module.exports = __toCommonJS(pui_diagnostics_exports);
28
+ const logger = () => ({
29
+ setLogLevel() {
30
+ },
31
+ setOptions() {
32
+ },
33
+ info() {
34
+ },
35
+ warn() {
36
+ },
37
+ error() {
38
+ },
39
+ trace() {
40
+ },
41
+ debug() {
42
+ },
43
+ audit() {
44
+ },
45
+ fatal() {
46
+ }
47
+ });
48
+ const LogLevel = {
49
+ info: "info",
50
+ debug: "debug",
51
+ trace: "trace",
52
+ warn: "warn",
53
+ error: "error",
54
+ audit: "audit",
55
+ fatal: "fatal"
56
+ };
57
+ const Console = () => ({
58
+ log: () => {
59
+ }
60
+ });
61
+ const http = () => ({
62
+ log() {
63
+ }
64
+ });
65
+ const webvitals = () => {
66
+ };
67
+ const logUnhandledErrors = () => {
68
+ };
@@ -0,0 +1,30 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var pui_user_monitoring_exports = {};
19
+ __export(pui_user_monitoring_exports, {
20
+ setCustomUserData: () => setCustomUserData,
21
+ setCustomVirtualPageName: () => setCustomVirtualPageName,
22
+ startVirtualPageMonitoringWithAutoEnd: () => startVirtualPageMonitoringWithAutoEnd
23
+ });
24
+ module.exports = __toCommonJS(pui_user_monitoring_exports);
25
+ const setCustomUserData = () => {
26
+ };
27
+ const setCustomVirtualPageName = () => {
28
+ };
29
+ const startVirtualPageMonitoringWithAutoEnd = () => {
30
+ };
@@ -0,0 +1,27 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var retry_axios_exports = {};
19
+ __export(retry_axios_exports, {
20
+ attach: () => attach,
21
+ detach: () => detach,
22
+ getConfig: () => getConfig
23
+ });
24
+ module.exports = __toCommonJS(retry_axios_exports);
25
+ const attach = jest.fn();
26
+ const detach = jest.fn();
27
+ const getConfig = jest.fn();
@@ -18,14 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var xmark_exports = {};
22
- __export(xmark_exports, {
23
- default: () => xmark_default
21
+ var svg_exports = {};
22
+ __export(svg_exports, {
23
+ ReactComponent: () => ReactComponent,
24
+ default: () => svg_default
24
25
  });
25
- module.exports = __toCommonJS(xmark_exports);
26
- var import_chalk = __toESM(require("chalk"), 1);
27
- function xmark_default(callback) {
28
- process.stdout.write(import_chalk.default.red(" \u2718"));
29
- if (callback)
30
- callback();
31
- }
26
+ module.exports = __toCommonJS(svg_exports);
27
+ var React = __toESM(require("react"), 1);
28
+ var svg_default = "SvgrURL";
29
+ const ReactComponent = "div";
@@ -0,0 +1,24 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var webpack_hmr_exports = {};
19
+ __export(webpack_hmr_exports, {
20
+ enableHotReloading: () => enableHotReloading
21
+ });
22
+ module.exports = __toCommonJS(webpack_hmr_exports);
23
+ const enableHotReloading = () => {
24
+ };
@@ -18,8 +18,8 @@ var import_runtime = require("regenerator-runtime/runtime");
18
18
  var import_extend_expect = require("@testing-library/jest-dom/extend-expect");
19
19
  var import_jest_axe = __toESM(require("jest-axe"), 1);
20
20
  var import_resize_observer_polyfill = __toESM(require("resize-observer-polyfill"), 1);
21
- var import_matchMedia = __toESM(require("./mocks/matchMedia.cjs"), 1);
22
- var import_pui_diagnostics = require("./mocks/pui-diagnostics.cjs");
21
+ var import_matchMedia = require("./mocks/matchMedia.js");
22
+ var import_pui_diagnostics = require("./mocks/pui-diagnostics.js");
23
23
  const originalError = console.error;
24
24
  console.error = (...args) => {
25
25
  const ignoreList = [
@@ -57,7 +57,7 @@ const addRootElement = (id) => {
57
57
  rootEle.id = id;
58
58
  };
59
59
  addRootElement("root");
60
- (0, import_matchMedia.default)();
60
+ (0, import_matchMedia.addMatchMedia)();
61
61
  window.ResizeObserver = import_resize_observer_polyfill.default;
62
62
  window.emui = {};
63
63
  window.emui.logger = (0, import_pui_diagnostics.logger)();
@@ -20,13 +20,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
  var update_notifier_exports = {};
22
22
  __export(update_notifier_exports, {
23
- default: () => update_notifier_default
23
+ notifyUpdates: () => notifyUpdates
24
24
  });
25
25
  module.exports = __toCommonJS(update_notifier_exports);
26
26
  var import_update_notifier = __toESM(require("update-notifier"), 1);
27
27
  var import_node_path = __toESM(require("node:path"), 1);
28
28
  var import_promises = __toESM(require("node:fs/promises"), 1);
29
- var update_notifier_default = async () => {
29
+ const notifyUpdates = async () => {
30
30
  const pkgFile = await import_promises.default.readFile(import_node_path.default.join(process.cwd(), "./package.json"));
31
31
  const pkg = JSON.parse(pkgFile);
32
32
  (0, import_update_notifier.default)({ pkg }).notify();
@@ -18,3 +18,6 @@ exports.getAppConfig = () => {
18
18
  };
19
19
 
20
20
  exports.isApp = isApp;
21
+
22
+ exports.isTypeScriptEnabled = () =>
23
+ fs.existsSync(path.join(process.cwd(), 'tsconfig.json'));
@@ -31,8 +31,8 @@ var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"),
31
31
  var import_react_refresh_webpack_plugin = __toESM(require("@pmmmwh/react-refresh-webpack-plugin"), 1);
32
32
  var import_speed_measure_webpack_plugin = __toESM(require("speed-measure-webpack-plugin"), 1);
33
33
  var import_express_static_gzip = __toESM(require("express-static-gzip"), 1);
34
- var import_middlewares = require("../server/middlewares/index.js");
35
- var import_util = require("../server/util/index.js");
34
+ var import_middlewares = require("../server/middlewares.js");
35
+ var import_utils = require("../server/utils.js");
36
36
  var import_helpers = require("./helpers.js");
37
37
  var import_webpack_base_babel = require("./webpack.base.babel.js");
38
38
  const import_meta = {};
@@ -130,7 +130,7 @@ const devConfig = {
130
130
  setupMiddlewares: (middlewares, devServer) => {
131
131
  (0, import_middlewares.setupDefaultMiddlewares)(devServer.app);
132
132
  devServer.app.use((0, import_express_static_gzip.default)("cdn"));
133
- (0, import_util.loadRoutes)(devServer.app);
133
+ (0, import_utils.loadRoutes)(devServer.app);
134
134
  return middlewares;
135
135
  }
136
136
  }
@@ -31,7 +31,7 @@ var import_webpack_bundle_analyzer = require("webpack-bundle-analyzer");
31
31
  var import_esbuild_loader = require("esbuild-loader");
32
32
  var import_speed_measure_webpack_plugin = __toESM(require("speed-measure-webpack-plugin"), 1);
33
33
  var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"), 1);
34
- var import_webpack_base_babel = __toESM(require("./webpack.base.babel.js"), 1);
34
+ var import_webpack_base_babel = require("./webpack.base.babel.js");
35
35
  var import_helpers = require("./helpers.js");
36
36
  const getProdConfig = ({ latestVersion = true } = {}) => {
37
37
  const { buildPath } = (0, import_helpers.getPaths)(latestVersion);
@@ -124,7 +124,7 @@ const htmlWebpackPlugin = new import_html_webpack_plugin.default({
124
124
  googleTagManager: (0, import_helpers.isGoogleTagManagerEnabled)()
125
125
  }
126
126
  });
127
- const config = (0, import_webpack_base_babel.default)(getProdConfig());
127
+ const config = (0, import_webpack_base_babel.baseConfig)(getProdConfig());
128
128
  config.plugins.push(htmlWebpackPlugin);
129
129
  const addSMPPlugin = (webpackConfig) => {
130
130
  const smpConfig = new import_speed_measure_webpack_plugin.default({
@@ -1,4 +1,4 @@
1
- const { isApp } = require('../utils.cjs');
1
+ const { isApp } = require('./utils.cjs');
2
2
 
3
3
  const nodeEnvPreset = {
4
4
  modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
package/dist/esm/cli.js CHANGED
@@ -4,17 +4,18 @@ import { fileURLToPath } from "node:url";
4
4
  import yargs from "yargs";
5
5
  import { hideBin } from "yargs/helpers";
6
6
  import { config as envConfig } from "dotenv";
7
- import notifyUpdates from "./scripts/update-notifier.js";
8
- import { buildCmd } from "./cli-commands/build.js";
9
- import { packCmd } from "./cli-commands/pack.js";
10
- import { startCmd } from "./cli-commands/start.js";
11
- import { testCmd } from "./cli-commands/test.js";
12
- import { lintCmd } from "./cli-commands/lint.js";
13
- import { gendocCmd } from "./cli-commands/gendoc.js";
14
- import { codemodCmd } from "./cli-commands/codemod.js";
15
- import { storybookCmd } from "./cli-commands/storybook.js";
16
- import { vitestCmd } from "./cli-commands/vitest.js";
17
- import { versionCmd } from "./cli-commands/version.js";
7
+ import { notifyUpdates } from "./update-notifier.js";
8
+ import { buildCmd } from "./commands/build.js";
9
+ import { packCmd } from "./commands/pack.js";
10
+ import { startCmd } from "./commands/start.js";
11
+ import { testCmd } from "./commands/test.js";
12
+ import { lintCmd } from "./commands/lint.js";
13
+ import { gendocCmd } from "./commands/gendoc.js";
14
+ import { codemodCmd } from "./commands/codemod.js";
15
+ import { storybookCmd } from "./commands/storybook.js";
16
+ import { vitestCmd } from "./commands/vitest.js";
17
+ import { versionCmd } from "./commands/version.js";
18
+ import { tscheckCmd } from "./commands/tscheck.js";
18
19
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
19
20
  envConfig();
20
21
  process.env.PATH += path.delimiter + path.join(__dirname, "..", "node_modules", ".bin");
@@ -28,4 +29,5 @@ yargs(hideBin(process.argv)).command(codemodCmd).help().argv;
28
29
  yargs(hideBin(process.argv)).command(storybookCmd).help().argv;
29
30
  yargs(hideBin(process.argv)).command(vitestCmd).help().argv;
30
31
  yargs(hideBin(process.argv)).command(versionCmd).help().argv;
32
+ yargs(hideBin(process.argv)).command(tscheckCmd).help().argv;
31
33
  notifyUpdates();
File without changes
File without changes
@@ -8,7 +8,7 @@ const isApp = () => fs.existsSync(path.join(process.cwd(), "app"));
8
8
  const generateDocs = async () => {
9
9
  logInfo("Documentation Generation inprogress...");
10
10
  const srcPath = path.join(process.cwd(), isApp() ? "app" : "lib");
11
- await exec(`jsdoc ${srcPath} -r -c ${path.resolve(__dirname, "../docgen/jsdoc.conf.json")} -d docs`);
11
+ await exec(`jsdoc ${srcPath} -r -c ${path.resolve(__dirname, "../jsdoc.conf.json")} -d docs`);
12
12
  };
13
13
  const gendocCmd = {
14
14
  handler: async () => {
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
2
  import yargs from "yargs";
3
3
  import { exec, logError, logSuccess } from "./utils.js";
4
- import { isTypeScriptEnabled } from "../typescript/util.js";
4
+ import { isTypeScriptEnabled } from "../utils.cjs";
5
5
  const { CI = false } = process.env;
6
6
  const lintCSS = async (fix = false) => {
7
7
  const fixIssues = fix ? "--fix" : "";
@@ -2,7 +2,7 @@ import path from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import yargs from "yargs";
4
4
  import { exec, logInfo, logError, logSuccess } from "./utils.js";
5
- import { isTypeScriptEnabled } from "../typescript/util.js";
5
+ import { isTypeScriptEnabled } from "../utils.cjs";
6
6
  import { esBuild } from "../transpile/esbuild.js";
7
7
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
8
  const compileTypeScript = async () => {
File without changes
File without changes
File without changes
@@ -0,0 +1,65 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import path from "node:path";
21
+ import fs from "node:fs";
22
+ import yargs from "yargs";
23
+ import { exec, logInfo, logError } from "./utils.js";
24
+ const randomChars = () => Math.random().toString(36).slice(2);
25
+ const validateTypescript = async (files = []) => {
26
+ const tsconfigPath = path.join(process.cwd(), "tsconfig.json");
27
+ const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath));
28
+ const tmpTsconfigPath = path.join(process.cwd(), `tsconfig.${randomChars()}.json`);
29
+ const tmpTsconfig = __spreadProps(__spreadValues({}, tsconfig), {
30
+ compilerOptions: __spreadProps(__spreadValues({}, tsconfig.compilerOptions), {
31
+ skipLibCheck: true
32
+ }),
33
+ files,
34
+ include: ["app", "lib"]
35
+ });
36
+ fs.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2));
37
+ const tscPath = path.resolve(process.cwd(), `./node_modules/.bin/tsc${process.platform === "win32" ? ".cmd" : ""}`);
38
+ try {
39
+ await exec(`${tscPath} -p ${tmpTsconfigPath} --noEmit --emitDeclarationOnly false`);
40
+ } finally {
41
+ fs.unlinkSync(tmpTsconfigPath);
42
+ }
43
+ };
44
+ const tscheckCmd = {
45
+ handler: async ({ files }) => {
46
+ try {
47
+ await validateTypescript(files);
48
+ logInfo("Typescript validation completed");
49
+ } catch (err) {
50
+ logError("Typescript validation failed", err);
51
+ yargs().exit(-1, err);
52
+ }
53
+ },
54
+ command: "tscheck [options]",
55
+ describe: "validate typescript file(s)",
56
+ builder: {
57
+ files: {
58
+ type: "array",
59
+ default: []
60
+ }
61
+ }
62
+ };
63
+ export {
64
+ tscheckCmd
65
+ };
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
- const { babelConfig } = require('./babel/babel.config.cjs');
2
- const { esConfig: eslintBaseConfig } = require('./lint/eslint/non-react.cjs');
3
- const { esReactConfig: eslintConfig } = require('./lint/eslint/react.cjs');
4
- const { stylelintConfig } = require('./lint/stylelint.config.cjs');
5
- const { prettierConfig } = require('./lint/prettier.config.cjs');
6
- const { commitlintConfig } = require('./lint/commitlint.config.cjs');
1
+ const { babelConfig } = require('./babel.config.cjs');
2
+ const { esConfig: eslintBaseConfig } = require('./lint-config/eslint/non-react.cjs');
3
+ const { esReactConfig: eslintConfig } = require('./lint-config/eslint/react.cjs');
4
+ const { stylelintConfig } = require('./lint-config/stylelint.config.cjs');
5
+ const { prettierConfig } = require('./lint-config/prettier.config.cjs');
6
+ const { commitlintConfig } = require('./lint-config/commitlint.config.cjs');
7
7
  const { jestConfig } = require('./testing/jest.config.cjs');
8
8
  const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
9
9
 
package/dist/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { babelConfig } from "./babel/babel.config.cjs";
2
- import { esConfig } from "./lint/eslint/non-react.cjs";
3
- import { esReactConfig } from "./lint/eslint/react.cjs";
4
- import { stylelintConfig } from "./lint/stylelint.config.cjs";
5
- import { prettierConfig } from "./lint/prettier.config.cjs";
6
- import { commitlintConfig } from "./lint/commitlint.config.cjs";
1
+ import { babelConfig } from "./babel.config.cjs";
2
+ import { esConfig } from "./lint-config/eslint/non-react.cjs";
3
+ import { esReactConfig } from "./lint-config/eslint/react.cjs";
4
+ import { stylelintConfig } from "./lint-config/stylelint.config.cjs";
5
+ import { prettierConfig } from "./lint-config/prettier.config.cjs";
6
+ import { commitlintConfig } from "./lint-config/commitlint.config.cjs";
7
7
  import { jestConfig } from "./testing/jest.config.cjs";
8
8
  import { jestNodeConfig } from "./testing/jest.node.config.cjs";
9
- import { lintStagedConfig } from "./lint/lint-staged.config.js";
10
- import { loadRoutes } from "./server/util/index.js";
9
+ import { lintStagedConfig } from "./lint-config/lint-staged.config.js";
10
+ import { loadRoutes } from "./server/utils.js";
11
11
  export {
12
12
  babelConfig,
13
13
  commitlintConfig,
File without changes
File without changes
@@ -1,13 +1,9 @@
1
1
  import path from "node:path";
2
- import { fileURLToPath } from "node:url";
3
2
  import fs from "node:fs";
4
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
3
  const npmClient = fs.existsSync(path.join(process.cwd(), "pnpm-lock.yaml")) ? "pnpm" : "npm";
6
4
  const lintStagedConfig = {
7
5
  "*.{js,ts,jsx,tsx,md,mdx,html,css,json}": ["prettier --write"],
8
- "*.{ts,tsx}": [
9
- `node ${path.resolve(__dirname, "../typescript/tsc-files/index.js")} --noEmit --emitDeclarationOnly false`
10
- ],
6
+ "*.{ts,tsx}": [`${npmClient} run tscheck`],
11
7
  "*.{js,ts,jsx,tsx}": [
12
8
  `${npmClient} run lint:fix`,
13
9
  `${npmClient} run test:staged`,
File without changes
@@ -3,8 +3,8 @@ import { logger } from "./logger.js";
3
3
  import {
4
4
  setupDefaultMiddlewares,
5
5
  setupAdditionalMiddlewars
6
- } from "./middlewares/index.js";
7
- import { loadRoutes, port, host } from "./util/index.js";
6
+ } from "./middlewares.js";
7
+ import { loadRoutes, port, host } from "./utils.js";
8
8
  const app = express();
9
9
  setupDefaultMiddlewares(app);
10
10
  loadRoutes(app);
@@ -0,0 +1,46 @@
1
+ import express from "express";
2
+ import cors from "cors";
3
+ import compression from "compression";
4
+ import expressStaticGzip from "express-static-gzip";
5
+ import expressPinoLogger from "express-pino-logger";
6
+ import { csp, sendFileWithCSPNonce } from "./csp.js";
7
+ import { getPaths } from "../webpack/helpers.js";
8
+ const paths = getPaths();
9
+ const setupDefaultMiddlewares = (app) => {
10
+ const pino = expressPinoLogger({
11
+ transport: {
12
+ target: "pino-pretty",
13
+ options: {
14
+ colorize: true
15
+ }
16
+ }
17
+ });
18
+ pino.logger.level = "warn";
19
+ app.use(pino);
20
+ app.use(cors());
21
+ app.options("*", cors());
22
+ csp(app);
23
+ app.use(express.urlencoded({ extended: false }));
24
+ app.use(express.text({ type: "text/plain" }));
25
+ app.use(express.json({ type: "application/json" }));
26
+ app.use(express.json({ type: "application/csp-report" }));
27
+ };
28
+ const setupAdditionalMiddlewars = (app, options = {}) => {
29
+ const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
30
+ app.use(compression());
31
+ app.get(basePath, (req, res) => {
32
+ sendFileWithCSPNonce({ buildPath, res });
33
+ });
34
+ app.use(basePath, expressStaticGzip(buildPath, {
35
+ index: false,
36
+ enableBrotli: true,
37
+ orderPreference: ["br"]
38
+ }));
39
+ app.use(expressStaticGzip("cdn"));
40
+ app.get("*", (req, res) => sendFileWithCSPNonce({ buildPath, res }));
41
+ return app;
42
+ };
43
+ export {
44
+ setupAdditionalMiddlewars,
45
+ setupDefaultMiddlewares
46
+ };
@@ -1,5 +1,5 @@
1
- import fs from "fs";
2
- import path from "path";
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
3
  import minimist from "minimist";
4
4
  import { initRoute } from "./app-routes.cjs";
5
5
  const argv = minimist(process.argv.slice(2));
@@ -57,15 +57,15 @@ const jestConfig = {
57
57
  coverageReporters: ['lcov', 'html', 'text-summary'],
58
58
  moduleDirectories: ['node_modules', 'app', 'lib'],
59
59
  moduleNameMapper: {
60
- '.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.cjs'),
61
- '.*\\.(css|scss)$': getMockFilePath('cssModule.cjs'),
60
+ '.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.js'),
61
+ '.*\\.(css|scss)$': getMockFilePath('cssModule.js'),
62
62
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
63
- getMockFilePath('image.cjs'),
64
- '.*\\.svg(?:\\?[a-zA-Z]+)?$': getMockFilePath('svg.cjs'),
65
- '.*\\.html$(?:\\?[a-zA-Z]+)?$': getMockFilePath('html.cjs'),
66
- '@elliemae/pui-user-monitoring': getMockFilePath('pui-user-monitoring.cjs'),
67
- '@elliemae/pui-app-loader': getMockFilePath('pui-app-loader.cjs'),
68
- '@elliemae/pui-diagnostics': getMockFilePath('pui-diagnostics.cjs'),
63
+ getMockFilePath('image.js'),
64
+ '.*\\.svg(?:\\?[a-zA-Z]+)?$': getMockFilePath('svg.js'),
65
+ '.*\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('html.js'),
66
+ '@elliemae/pui-user-monitoring': getMockFilePath('pui-user-monitoring.js'),
67
+ '@elliemae/pui-app-loader': getMockFilePath('pui-app-loader.js'),
68
+ '@elliemae/pui-diagnostics': getMockFilePath('pui-diagnostics.js'),
69
69
  'react-spring/web': getNodeModulesPath('react-spring/web.cjs.js'),
70
70
  'react-spring/renderprops': getNodeModulesPath(
71
71
  'react-spring/renderprops.cjs.js',