@elliemae/pui-cli 7.0.0-alpha.3 → 7.0.0-alpha.32

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 (279) hide show
  1. package/dist/cjs/{babel/babel.config.cjs → babel.config.cjs} +2 -6
  2. package/dist/cjs/cli.js +19 -13
  3. package/dist/cjs/{cli-commands → commands}/build.js +11 -2
  4. package/dist/cjs/{cli-commands → commands}/codemod.js +5 -1
  5. package/dist/cjs/{cli-commands → commands}/gendoc.js +7 -6
  6. package/dist/cjs/{cli-commands → commands}/lint.js +13 -4
  7. package/dist/cjs/{cli-commands → commands}/pack.js +15 -5
  8. package/dist/cjs/{cli-commands → commands}/start.js +18 -3
  9. package/dist/cjs/{cli-commands → commands}/storybook.js +11 -3
  10. package/dist/cjs/{cli-commands → commands}/test.js +20 -6
  11. package/dist/cjs/commands/tscheck.js +82 -0
  12. package/dist/cjs/{cli-commands → commands}/utils.js +29 -10
  13. package/dist/cjs/{cli-commands → commands}/version.js +8 -2
  14. package/dist/cjs/{cli-commands → commands}/vitest.js +12 -3
  15. package/dist/cjs/docs/assets/highlight.css +78 -0
  16. package/dist/cjs/docs/assets/icons.css +1043 -0
  17. package/dist/cjs/docs/assets/icons.png +0 -0
  18. package/dist/cjs/docs/assets/icons@2x.png +0 -0
  19. package/dist/cjs/docs/assets/main.js +1304 -0
  20. package/dist/cjs/docs/assets/search.js +2 -0
  21. package/dist/cjs/docs/assets/style.css +1414 -0
  22. package/dist/cjs/docs/assets/widgets.png +0 -0
  23. package/dist/cjs/docs/assets/widgets@2x.png +0 -0
  24. package/dist/cjs/docs/index.html +94 -0
  25. package/dist/cjs/docs/modules.html +1 -0
  26. package/dist/cjs/dummy.js +1 -0
  27. package/dist/cjs/index.cjs +25 -0
  28. package/dist/cjs/index.js +10 -9
  29. package/dist/cjs/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
  30. package/dist/cjs/{lint → lint-config}/commitlint.config.cjs +0 -0
  31. package/dist/cjs/{lint → lint-config}/eslint/common.cjs +5 -5
  32. package/dist/cjs/{lint → lint-config}/eslint/non-react.cjs +0 -0
  33. package/dist/cjs/{lint → lint-config}/eslint/react.cjs +0 -0
  34. package/dist/cjs/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
  35. package/dist/cjs/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
  36. package/dist/cjs/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
  37. package/dist/cjs/{lint → lint-config}/lint-staged.config.js +6 -7
  38. package/dist/cjs/{lint → lint-config}/prettier.config.cjs +0 -0
  39. package/dist/{esm/lint → cjs/lint-config}/stylelint.config.cjs +1 -1
  40. package/dist/cjs/monorepo/delete-merged-tags.js +1 -0
  41. package/dist/cjs/monorepo/set-registry-version.js +14 -8
  42. package/dist/cjs/monorepo/set-workspace-version.js +21 -9
  43. package/dist/cjs/monorepo/utils.cjs +30 -0
  44. package/dist/cjs/{pui-config/index.js → pui-config.js} +5 -1
  45. package/dist/cjs/{release/release.config.cjs → release.config.cjs} +0 -0
  46. package/dist/cjs/server/app-routes.cjs +42 -0
  47. package/dist/cjs/server/csp.js +25 -19
  48. package/dist/cjs/server/index.js +11 -6
  49. package/dist/cjs/server/logger.js +12 -4
  50. package/dist/cjs/server/{middlewares/index.js → middlewares.js} +26 -8
  51. package/dist/cjs/{typescript/util.js → server/utils.js} +19 -8
  52. package/dist/cjs/testing/jest.config.cjs +11 -14
  53. package/dist/cjs/{scripts/helpers/get-npm-config.js → testing/mocks/axios.js} +20 -9
  54. package/dist/cjs/{scripts/helpers/checkmark.js → testing/mocks/cssModule.js} +6 -14
  55. package/dist/cjs/testing/mocks/html.js +24 -0
  56. package/dist/cjs/testing/mocks/image.js +24 -0
  57. package/dist/cjs/testing/mocks/matchMedia.js +44 -0
  58. package/dist/cjs/{typescript/tsc-files/utils.js → testing/mocks/pui-app-loader.js} +6 -12
  59. package/dist/cjs/testing/mocks/pui-diagnostics.js +69 -0
  60. package/dist/cjs/testing/mocks/pui-user-monitoring.js +31 -0
  61. package/dist/cjs/testing/mocks/retry-axios.js +28 -0
  62. package/dist/cjs/{scripts/helpers/xmark.js → testing/mocks/svg.js} +13 -11
  63. package/dist/cjs/testing/mocks/webpack-hmr.js +25 -0
  64. package/dist/cjs/testing/setup-react-env.js +5 -1
  65. package/dist/cjs/testing/setup-test-env.js +23 -0
  66. package/dist/cjs/testing/setup-tests.js +11 -5
  67. package/dist/cjs/testing/vitest.config.js +20 -7
  68. package/dist/cjs/transpile/.swcrc +11 -0
  69. package/dist/cjs/transpile/esbuild.js +33 -37
  70. package/dist/cjs/transpile/react-shim.js +5 -1
  71. package/dist/cjs/typedoc.cjs +12 -0
  72. package/dist/cjs/{scripts/update-notifier.js → update-notifier.js} +7 -3
  73. package/dist/cjs/utils.cjs +3 -0
  74. package/dist/cjs/webpack/helpers.js +78 -57
  75. package/dist/cjs/webpack/webpack.base.babel.js +15 -21
  76. package/dist/cjs/webpack/webpack.dev.babel.js +16 -8
  77. package/dist/cjs/webpack/webpack.lib.base.babel.js +22 -27
  78. package/dist/cjs/webpack/webpack.lib.dev.babel.js +34 -9
  79. package/dist/cjs/webpack/webpack.lib.prod.babel.js +33 -22
  80. package/dist/cjs/webpack/webpack.prod.babel.js +13 -7
  81. package/dist/cjs/webpack/webpack.storybook.js +111 -0
  82. package/dist/esm/{babel/babel.config.cjs → babel.config.cjs} +2 -6
  83. package/dist/esm/cli.js +13 -11
  84. package/dist/esm/{cli-commands → commands}/build.js +6 -1
  85. package/dist/esm/{cli-commands → commands}/codemod.js +0 -0
  86. package/dist/esm/{cli-commands → commands}/gendoc.js +2 -5
  87. package/dist/esm/{cli-commands → commands}/lint.js +7 -2
  88. package/dist/esm/{cli-commands → commands}/pack.js +9 -3
  89. package/dist/esm/{cli-commands → commands}/start.js +14 -3
  90. package/dist/esm/{cli-commands → commands}/storybook.js +6 -2
  91. package/dist/esm/{cli-commands → commands}/test.js +15 -5
  92. package/dist/esm/commands/tscheck.js +56 -0
  93. package/dist/esm/{cli-commands → commands}/utils.js +32 -10
  94. package/dist/esm/{cli-commands → commands}/version.js +3 -1
  95. package/dist/esm/{cli-commands → commands}/vitest.js +7 -2
  96. package/dist/esm/docs/assets/highlight.css +78 -0
  97. package/dist/esm/docs/assets/icons.css +1043 -0
  98. package/dist/esm/docs/assets/icons.png +0 -0
  99. package/dist/esm/docs/assets/icons@2x.png +0 -0
  100. package/dist/esm/docs/assets/main.js +1303 -0
  101. package/dist/esm/docs/assets/search.js +1 -0
  102. package/dist/esm/docs/assets/style.css +1414 -0
  103. package/dist/esm/docs/assets/widgets.png +0 -0
  104. package/dist/esm/docs/assets/widgets@2x.png +0 -0
  105. package/dist/esm/docs/index.html +94 -0
  106. package/dist/esm/docs/modules.html +1 -0
  107. package/dist/esm/index.cjs +25 -0
  108. package/dist/esm/index.js +8 -8
  109. package/dist/esm/{docgen/jsdoc.conf.json → jsdoc.conf.json} +0 -0
  110. package/dist/esm/{lint → lint-config}/commitlint.config.cjs +0 -0
  111. package/dist/esm/{lint → lint-config}/eslint/common.cjs +5 -5
  112. package/dist/esm/{lint → lint-config}/eslint/non-react.cjs +0 -0
  113. package/dist/esm/{lint → lint-config}/eslint/react.cjs +0 -0
  114. package/dist/esm/{lint → lint-config}/eslint/typescript/common.cjs +0 -0
  115. package/dist/esm/{lint → lint-config}/eslint/typescript/non-react.cjs +0 -0
  116. package/dist/esm/{lint → lint-config}/eslint/typescript/react.cjs +0 -0
  117. package/dist/esm/{lint → lint-config}/lint-staged.config.js +1 -5
  118. package/dist/esm/{lint → lint-config}/prettier.config.cjs +0 -0
  119. package/dist/{cjs/lint → esm/lint-config}/stylelint.config.cjs +1 -1
  120. package/dist/esm/monorepo/set-registry-version.js +9 -7
  121. package/dist/esm/monorepo/set-workspace-version.js +16 -8
  122. package/dist/esm/monorepo/utils.cjs +30 -0
  123. package/dist/esm/{pui-config/index.js → pui-config.js} +0 -0
  124. package/dist/esm/{release/release.config.cjs → release.config.cjs} +0 -0
  125. package/dist/esm/server/app-routes.cjs +42 -0
  126. package/dist/esm/server/csp.js +20 -18
  127. package/dist/esm/server/index.js +3 -2
  128. package/dist/esm/server/logger.js +7 -3
  129. package/dist/esm/server/middlewares.js +49 -0
  130. package/dist/esm/server/utils.js +13 -0
  131. package/dist/esm/testing/jest.config.cjs +11 -14
  132. package/dist/{cjs/testing/mocks/axios.cjs → esm/testing/mocks/axios.js} +8 -5
  133. package/dist/esm/testing/mocks/cssModule.js +4 -0
  134. package/dist/esm/testing/mocks/html.js +4 -0
  135. package/dist/esm/testing/mocks/image.js +4 -0
  136. package/dist/esm/testing/mocks/matchMedia.js +24 -0
  137. package/dist/esm/testing/mocks/pui-app-loader.js +5 -0
  138. package/dist/esm/testing/mocks/pui-diagnostics.js +49 -0
  139. package/dist/esm/testing/mocks/pui-user-monitoring.js +11 -0
  140. package/dist/esm/testing/mocks/retry-axios.js +8 -0
  141. package/dist/esm/testing/mocks/svg.js +7 -0
  142. package/dist/esm/testing/mocks/webpack-hmr.js +5 -0
  143. package/dist/esm/testing/setup-test-env.js +4 -0
  144. package/dist/esm/testing/setup-tests.js +5 -3
  145. package/dist/esm/testing/vitest.config.js +13 -5
  146. package/dist/esm/transpile/.swcrc +11 -0
  147. package/dist/esm/transpile/esbuild.js +28 -38
  148. package/dist/esm/typedoc.cjs +12 -0
  149. package/dist/esm/{scripts/update-notifier.js → update-notifier.js} +2 -2
  150. package/dist/esm/utils.cjs +3 -0
  151. package/dist/esm/webpack/helpers.js +73 -58
  152. package/dist/esm/webpack/webpack.base.babel.js +11 -23
  153. package/dist/esm/webpack/webpack.dev.babel.js +9 -6
  154. package/dist/esm/webpack/webpack.lib.base.babel.js +17 -33
  155. package/dist/esm/webpack/webpack.lib.dev.babel.js +29 -8
  156. package/dist/esm/webpack/webpack.lib.prod.babel.js +27 -20
  157. package/dist/esm/webpack/webpack.prod.babel.js +8 -6
  158. package/dist/esm/webpack/webpack.storybook.js +85 -0
  159. package/dist/types/{babel/babel.config.d.cts → babel.config.d.cts} +0 -0
  160. package/dist/types/{cli-commands → commands}/build.d.ts +0 -0
  161. package/dist/types/{cli-commands → commands}/codemod.d.ts +0 -0
  162. package/dist/types/{cli-commands → commands}/gendoc.d.ts +0 -0
  163. package/dist/types/{cli-commands → commands}/lint.d.ts +0 -0
  164. package/dist/types/{cli-commands → commands}/pack.d.ts +0 -0
  165. package/dist/types/{cli-commands → commands}/start.d.ts +0 -0
  166. package/dist/types/{cli-commands → commands}/storybook.d.ts +0 -0
  167. package/dist/types/{cli-commands → commands}/test.d.ts +10 -6
  168. package/dist/types/commands/tscheck.d.ts +14 -0
  169. package/dist/types/{cli-commands → commands}/utils.d.ts +2 -0
  170. package/dist/types/{cli-commands → commands}/version.d.ts +0 -0
  171. package/dist/types/{cli-commands → commands}/vitest.d.ts +0 -0
  172. package/dist/{cjs/testing/vitest.setup.js → types/docs/assets/main.d.ts} +0 -0
  173. package/dist/{esm/testing/vitest.setup.js → types/docs/assets/search.d.ts} +0 -0
  174. package/dist/types/index.d.cts +10 -0
  175. package/dist/types/index.d.ts +8 -8
  176. package/dist/types/{lint → lint-config}/commitlint.config.d.cts +0 -0
  177. package/dist/types/{lint → lint-config}/eslint/common.d.cts +15 -12
  178. package/dist/types/{lint → lint-config}/eslint/non-react.d.cts +6 -1
  179. package/dist/types/{lint → lint-config}/eslint/react.d.cts +6 -1
  180. package/dist/types/{lint → lint-config}/eslint/typescript/common.d.cts +2 -2
  181. package/dist/types/{lint → lint-config}/eslint/typescript/non-react.d.cts +1 -1
  182. package/dist/types/{lint → lint-config}/eslint/typescript/react.d.cts +1 -1
  183. package/dist/types/{lint → lint-config}/lint-staged.config.d.ts +0 -0
  184. package/dist/types/{lint → lint-config}/prettier.config.d.cts +0 -0
  185. package/dist/types/{lint → lint-config}/stylelint.config.d.cts +1 -0
  186. package/dist/types/monorepo/utils.d.cts +1 -0
  187. package/dist/types/{pui-config/index.d.ts → pui-config.d.ts} +0 -0
  188. package/dist/types/{release/release.config.d.cts → release.config.d.cts} +0 -0
  189. package/dist/types/server/app-routes.d.cts +1 -0
  190. package/dist/types/server/{middlewares/index.d.ts → middlewares.d.ts} +1 -1
  191. package/dist/types/server/{util/index.d.ts → utils.d.ts} +0 -1
  192. package/dist/types/testing/jest.config.d.cts +3 -3
  193. package/dist/types/testing/jest.node.config.d.cts +4 -4
  194. package/dist/types/testing/mocks/axios.d.ts +17 -0
  195. package/dist/types/testing/mocks/cssModule.d.ts +2 -0
  196. package/dist/types/testing/mocks/html.d.ts +2 -0
  197. package/dist/types/testing/mocks/image.d.ts +2 -0
  198. package/dist/types/testing/mocks/matchMedia.d.ts +1 -0
  199. package/dist/types/testing/mocks/{pui-app-loader.d.cts → pui-app-loader.d.ts} +0 -0
  200. package/dist/types/testing/mocks/{pui-diagnostics.d.cts → pui-diagnostics.d.ts} +0 -0
  201. package/dist/types/testing/mocks/{pui-user-monitoring.d.cts → pui-user-monitoring.d.ts} +0 -0
  202. package/dist/types/testing/mocks/{retry-axios.d.cts → retry-axios.d.ts} +0 -0
  203. package/dist/types/testing/mocks/{svg.d.cts → svg.d.ts} +1 -1
  204. package/dist/types/testing/mocks/{webpack-hmr.d.cts → webpack-hmr.d.ts} +0 -0
  205. package/dist/types/testing/setup-test-env.d.ts +2 -0
  206. package/dist/types/testing/vitest.config.d.ts +1 -1
  207. package/dist/types/transpile/swcrc.config.d.cts +1 -1
  208. package/dist/types/typedoc.d.cts +3 -0
  209. package/dist/types/update-notifier.d.ts +1 -0
  210. package/dist/types/utils.d.cts +2 -1
  211. package/dist/types/webpack/helpers.d.ts +1 -1
  212. package/dist/types/webpack/webpack.dev.babel.d.ts +2 -1
  213. package/dist/types/webpack/webpack.lib.base.babel.d.ts +1 -0
  214. package/dist/types/webpack/webpack.lib.dev.babel.d.ts +20 -3
  215. package/dist/types/webpack/webpack.lib.prod.babel.d.ts +20 -3
  216. package/dist/types/webpack/webpack.prod.babel.d.ts +1 -1
  217. package/dist/types/webpack/{webpack.storybook.d.cts → webpack.storybook.d.ts} +0 -0
  218. package/package.json +130 -124
  219. package/dist/cjs/cli-commands/tsc.js +0 -103
  220. package/dist/cjs/monorepo/utils.js +0 -34
  221. package/dist/cjs/scripts/helpers/progress.js +0 -35
  222. package/dist/cjs/scripts/npmcheckversion.js +0 -8
  223. package/dist/cjs/server/middlewares/addProdMiddlewares.js +0 -44
  224. package/dist/cjs/server/util/index.js +0 -68
  225. package/dist/cjs/testing/mocks/cssModule.cjs +0 -1
  226. package/dist/cjs/testing/mocks/html.cjs +0 -1
  227. package/dist/cjs/testing/mocks/image.cjs +0 -1
  228. package/dist/cjs/testing/mocks/matchMedia.cjs +0 -24
  229. package/dist/cjs/testing/mocks/pui-app-loader.cjs +0 -1
  230. package/dist/cjs/testing/mocks/pui-diagnostics.cjs +0 -28
  231. package/dist/cjs/testing/mocks/pui-user-monitoring.cjs +0 -3
  232. package/dist/cjs/testing/mocks/retry-axios.cjs +0 -3
  233. package/dist/cjs/testing/mocks/svg.cjs +0 -5
  234. package/dist/cjs/testing/mocks/webpack-hmr.cjs +0 -1
  235. package/dist/cjs/typescript/tsc-files/index.js +0 -68
  236. package/dist/cjs/webpack/webpack.storybook.cjs +0 -87
  237. package/dist/esm/cli-commands/tsc.js +0 -83
  238. package/dist/esm/monorepo/utils.js +0 -12
  239. package/dist/esm/scripts/helpers/checkmark.js +0 -10
  240. package/dist/esm/scripts/helpers/get-npm-config.js +0 -5
  241. package/dist/esm/scripts/helpers/progress.js +0 -13
  242. package/dist/esm/scripts/helpers/xmark.js +0 -9
  243. package/dist/esm/scripts/npmcheckversion.js +0 -8
  244. package/dist/esm/server/middlewares/addProdMiddlewares.js +0 -22
  245. package/dist/esm/server/middlewares/index.js +0 -35
  246. package/dist/esm/server/util/index.js +0 -46
  247. package/dist/esm/testing/mocks/axios.cjs +0 -15
  248. package/dist/esm/testing/mocks/cssModule.cjs +0 -1
  249. package/dist/esm/testing/mocks/html.cjs +0 -1
  250. package/dist/esm/testing/mocks/image.cjs +0 -1
  251. package/dist/esm/testing/mocks/matchMedia.cjs +0 -24
  252. package/dist/esm/testing/mocks/pui-app-loader.cjs +0 -1
  253. package/dist/esm/testing/mocks/pui-diagnostics.cjs +0 -28
  254. package/dist/esm/testing/mocks/pui-user-monitoring.cjs +0 -3
  255. package/dist/esm/testing/mocks/retry-axios.cjs +0 -3
  256. package/dist/esm/testing/mocks/svg.cjs +0 -5
  257. package/dist/esm/testing/mocks/webpack-hmr.cjs +0 -1
  258. package/dist/esm/typescript/tsc-files/index.js +0 -55
  259. package/dist/esm/typescript/tsc-files/utils.js +0 -12
  260. package/dist/esm/typescript/util.js +0 -6
  261. package/dist/esm/webpack/webpack.storybook.cjs +0 -87
  262. package/dist/types/cli-commands/tsc.d.ts +0 -20
  263. package/dist/types/monorepo/utils.d.ts +0 -1
  264. package/dist/types/scripts/helpers/checkmark.d.ts +0 -7
  265. package/dist/types/scripts/helpers/get-npm-config.d.ts +0 -2
  266. package/dist/types/scripts/helpers/progress.d.ts +0 -7
  267. package/dist/types/scripts/helpers/xmark.d.ts +0 -6
  268. package/dist/types/scripts/npmcheckversion.d.ts +0 -1
  269. package/dist/types/scripts/update-notifier.d.ts +0 -2
  270. package/dist/types/server/middlewares/addProdMiddlewares.d.ts +0 -1
  271. package/dist/types/testing/mocks/axios.d.cts +0 -14
  272. package/dist/types/testing/mocks/cssModule.d.cts +0 -2
  273. package/dist/types/testing/mocks/html.d.cts +0 -2
  274. package/dist/types/testing/mocks/image.d.cts +0 -2
  275. package/dist/types/testing/mocks/matchMedia.d.cts +0 -2
  276. package/dist/types/testing/vitest.setup.d.ts +0 -0
  277. package/dist/types/typescript/tsc-files/index.d.ts +0 -1
  278. package/dist/types/typescript/tsc-files/utils.d.ts +0 -3
  279. package/dist/types/typescript/util.d.ts +0 -1
@@ -1,44 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
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
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var addProdMiddlewares_exports = {};
22
- __export(addProdMiddlewares_exports, {
23
- addProdMiddlewares: () => addProdMiddlewares
24
- });
25
- module.exports = __toCommonJS(addProdMiddlewares_exports);
26
- var import_compression = __toESM(require("compression"), 1);
27
- var import_express_static_gzip = __toESM(require("express-static-gzip"), 1);
28
- var import_csp = require("../csp.js");
29
- var import_helpers = require("../../webpack/helpers.js");
30
- const paths = (0, import_helpers.getPaths)();
31
- const addProdMiddlewares = (app, options = {}) => {
32
- const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
33
- app.use((0, import_compression.default)());
34
- app.get(basePath, (req, res) => {
35
- (0, import_csp.sendFileWithCSPNonce)({ buildPath, res });
36
- });
37
- app.use(basePath, (0, import_express_static_gzip.default)(buildPath, {
38
- index: false,
39
- enableBrotli: true,
40
- orderPreference: ["br"]
41
- }));
42
- app.use((0, import_express_static_gzip.default)("cdn"));
43
- app.get("*", (req, res) => (0, import_csp.sendFileWithCSPNonce)({ buildPath, res }));
44
- };
@@ -1,68 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
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
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var util_exports = {};
22
- __export(util_exports, {
23
- getCWD: () => getCWD,
24
- host: () => host,
25
- loadRoutes: () => loadRoutes,
26
- port: () => port
27
- });
28
- module.exports = __toCommonJS(util_exports);
29
- var import_fs = __toESM(require("fs"), 1);
30
- var import_path = __toESM(require("path"), 1);
31
- var import_minimist = __toESM(require("minimist"), 1);
32
- const argv = (0, import_minimist.default)(process.argv.slice(2));
33
- const getCWD = () => process.cwd();
34
- const allJS = /\.js$/;
35
- const serviceEndpoints = /\.endpoint\.js$/;
36
- const getFilesMatching = (filePattern) => {
37
- const getFiles = (dir) => {
38
- let routeFiles = [];
39
- if (!import_fs.default.existsSync(dir))
40
- return routeFiles;
41
- import_fs.default.readdirSync(dir).forEach((file) => {
42
- const fullPath = import_path.default.join(dir, file);
43
- if (import_fs.default.lstatSync(fullPath).isDirectory()) {
44
- routeFiles = routeFiles.concat(getFiles(fullPath));
45
- } else if (filePattern.test(fullPath))
46
- routeFiles.push(fullPath);
47
- });
48
- return routeFiles;
49
- };
50
- return getFiles;
51
- };
52
- const getServerRouteFiles = getFilesMatching(allJS);
53
- const getServiceEndpoints = getFilesMatching(serviceEndpoints);
54
- const loadRoutes = (app) => {
55
- const routeFiles = getServerRouteFiles(import_path.default.join(getCWD(), "server/routes"));
56
- routeFiles.push(...getServiceEndpoints(import_path.default.join(getCWD(), "app")));
57
- routeFiles.push(...getServiceEndpoints(import_path.default.join(getCWD(), "lib")));
58
- routeFiles.forEach(async (routeFile) => {
59
- const init = await import(routeFile);
60
- try {
61
- init(app);
62
- } catch (err) {
63
- console.error(`unable to load routes from ${routeFile}. ${err.message}`);
64
- }
65
- });
66
- };
67
- const port = parseInt(argv.port || process.env.port || process.env.PORT || "3000", 10);
68
- const host = argv.host || process.env.HOST;
@@ -1 +0,0 @@
1
- module.exports = 'CSS_MODULE';
@@ -1 +0,0 @@
1
- module.exports = 'HTML_MODULE';
@@ -1 +0,0 @@
1
- module.exports = 'IMAGE_MOCK';
@@ -1,24 +0,0 @@
1
- /**
2
- *
3
- */
4
- export default () => {
5
- Object.defineProperty(window, 'matchMedia', {
6
- writable: true,
7
- value: jest.fn().mockImplementation((query) => ({
8
- matches: false,
9
- media: query,
10
- onchange: null,
11
- addListener: jest.fn(), // Deprecated
12
- removeListener: jest.fn(), // Deprecated
13
- addEventListener: jest.fn(),
14
- removeEventListener: jest.fn(),
15
- dispatchEvent: jest.fn(),
16
- })),
17
- });
18
-
19
- Object.defineProperty(window, 'getComputedStyle', {
20
- value: () => ({
21
- getPropertyValue: () => {},
22
- }),
23
- });
24
- };
@@ -1 +0,0 @@
1
- export const load = () => {};
@@ -1,28 +0,0 @@
1
- export const logger = () => ({
2
- setLogLevel() {},
3
- setOptions() {},
4
- info() {},
5
- warn() {},
6
- error() {},
7
- trace() {},
8
- debug() {},
9
- audit() {},
10
- fatal() {},
11
- });
12
- export const LogLevel = {
13
- info: 'info',
14
- debug: 'debug',
15
- trace: 'trace',
16
- warn: 'warn',
17
- error: 'error',
18
- audit: 'audit',
19
- fatal: 'fatal',
20
- };
21
- export const Console = () => ({
22
- log: () => {},
23
- });
24
- export const http = () => ({
25
- log() {},
26
- });
27
- export const webvitals = () => {};
28
- export const logUnhandledErrors = () => {};
@@ -1,3 +0,0 @@
1
- export const setCustomUserData = () => {};
2
- export const setCustomVirtualPageName = () => {};
3
- export const startVirtualPageMonitoringWithAutoEnd = () => {};
@@ -1,3 +0,0 @@
1
- export const attach = jest.fn();
2
- export const detach = jest.fn();
3
- export const getConfig = jest.fn();
@@ -1,5 +0,0 @@
1
- // eslint-disable-next-line no-unused-vars
2
- import * as React from 'react';
3
-
4
- export default 'SvgrURL';
5
- export const ReactComponent = 'div';
@@ -1 +0,0 @@
1
- exports.enableHotReloading = () => {};
@@ -1,68 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
30
- return to;
31
- };
32
- 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));
33
- var import_execa = require("execa");
34
- var import_node_fs = __toESM(require("node:fs"), 1);
35
- var import_node_path = __toESM(require("node:path"), 1);
36
- var import_utils = require("./utils.js");
37
- const args = process.argv.slice(2);
38
- const argsProjectIndex = args.findIndex((arg) => ["-p", "--project"].includes(arg));
39
- const argsProjectValue = argsProjectIndex !== -1 ? args[argsProjectIndex + 1] : void 0;
40
- const files = args.filter((file) => /\.(ts|tsx)$/.test(file));
41
- if (files.length === 0) {
42
- process.exit(0);
43
- }
44
- const remainingArgsToForward = args.slice().filter((arg) => !files.includes(arg));
45
- if (argsProjectIndex !== -1) {
46
- remainingArgsToForward.splice(argsProjectIndex, 2);
47
- }
48
- const tsconfigPath = argsProjectValue || (0, import_utils.resolveFromRoot)("tsconfig.json");
49
- const tsconfigContent = import_node_fs.default.readFileSync(tsconfigPath).toString();
50
- let tsconfig = {};
51
- eval(`tsconfig = ${tsconfigContent}`);
52
- const tmpTsconfigPath = (0, import_utils.resolveFromRoot)(`tsconfig.${(0, import_utils.randomChars)()}.json`);
53
- const tmpTsconfig = __spreadProps(__spreadValues({}, tsconfig), {
54
- compilerOptions: __spreadProps(__spreadValues({}, tsconfig.compilerOptions), {
55
- skipLibCheck: true
56
- }),
57
- files,
58
- include: ["app", "lib"]
59
- });
60
- import_node_fs.default.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2));
61
- let status = 0;
62
- try {
63
- import_execa.execa.sync(import_node_path.default.resolve(process.cwd(), `./node_modules/.bin/tsc${process.platform === "win32" ? ".cmd" : ""}`), ["-p", tmpTsconfigPath, ...remainingArgsToForward], { stdio: "inherit" });
64
- } catch (ex) {
65
- status = ex.exitCode;
66
- }
67
- import_node_fs.default.unlinkSync(tmpTsconfigPath);
68
- process.exit(status);
@@ -1,87 +0,0 @@
1
- const { EnvironmentPlugin } = require('webpack');
2
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
- const CopyWebpackPlugin = require('copy-webpack-plugin');
4
- const ResolveTypeScriptPlugin = require('resolve-typescript-plugin');
5
- const { isApp, getAlias, getCompressionPlugins } = require('./helpers.js');
6
-
7
- const IS_APP = isApp();
8
- const CWD = process.cwd();
9
-
10
- const getAdditionalPlugins = () => [
11
- new EnvironmentPlugin({
12
- IS_APP,
13
- CWD,
14
- }),
15
- new MiniCssExtractPlugin({
16
- filename: '[name].[contenthash].css',
17
- chunkFilename: '[name].[contenthash].chunk.css',
18
- }),
19
- new CopyWebpackPlugin({
20
- patterns: [
21
- {
22
- from: 'lib/app.config.json',
23
- to: 'app.config.json',
24
- noErrorOnMissing: true,
25
- },
26
- {
27
- from: 'app/app.config.json',
28
- to: 'app.config.json',
29
- noErrorOnMissing: true,
30
- },
31
- {
32
- from: 'public',
33
- noErrorOnMissing: true,
34
- },
35
- ],
36
- }),
37
- ];
38
-
39
- const getModuleRules = () => [
40
- {
41
- type: 'asset',
42
- resourceQuery: /url/,
43
- },
44
- {
45
- test: /\.svg$/i,
46
- issuer: /\.[jt]sx?$/,
47
- resourceQuery: /^((?!url).)*$/,
48
- use: ['@svgr/webpack'],
49
- },
50
- {
51
- resourceQuery: /resource/,
52
- type: 'asset/resource',
53
- },
54
- ];
55
-
56
- exports.webpackFinal = async (config, { configType }) => {
57
- const isProd = configType === 'PRODUCTION';
58
- const fileLoaderRule = config.module.rules.find((rule) =>
59
- rule.test?.test?.('.svg'),
60
- );
61
- fileLoaderRule.exclude = /\.svg$/i;
62
- config.module.rules.unshift(...getModuleRules());
63
- config.plugins.push(...getAdditionalPlugins());
64
- if (isProd) {
65
- config.plugins = config.plugins.concat(getCompressionPlugins());
66
- }
67
-
68
- config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
69
- config.resolve.fallback = { ...config.resolve.fallback, crypto: false };
70
- config.resolve.extensions.push('.svg');
71
- config.resolve.plugins = [
72
- ...(config.resolve.plugins || []),
73
- new ResolveTypeScriptPlugin({}),
74
- ];
75
- config.externals = config.externals || {};
76
- config.externals['@elliemae/pui-user-monitoring'] = 'emuiUserMonitoring';
77
- config.externals['@elliemae/pui-app-loader'] = 'emuiAppLoader';
78
- config.externals['@elliemae/pui-diagnostics'] = 'emuiDiagnostics';
79
- return config;
80
- };
81
-
82
- // storybook manager webpack
83
- exports.managerWebpack = async (config) => {
84
- config.plugins = config.plugins.concat(getCompressionPlugins());
85
- config.resolve.alias = { ...config.resolve.alias, ...getAlias() };
86
- return config;
87
- };
@@ -1,83 +0,0 @@
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 yargs from "yargs";
22
- import { spawnSync } from "child_process";
23
- import fs from "fs";
24
- import { logInfo, logError } from "./utils.js";
25
- const randomChars = () => Math.random().toString(36).slice(2);
26
- const resolveFromRoot = (...paths) => path.join(process.cwd(), ...paths);
27
- const validateTypescript = async () => {
28
- const args = process.argv.slice(2);
29
- const argsProjectIndex = args.findIndex((arg) => ["-p", "--project"].includes(arg));
30
- const argsProjectValue = argsProjectIndex !== -1 ? args[argsProjectIndex + 1] : void 0;
31
- const files = args.filter((file) => /\.(ts|tsx)$/.test(file));
32
- if (files.length === 0) {
33
- process.exit(0);
34
- }
35
- const remainingArgsToForward = args.slice().filter((arg) => !files.includes(arg));
36
- if (argsProjectIndex !== -1) {
37
- remainingArgsToForward.splice(argsProjectIndex, 2);
38
- }
39
- const tsconfigPath = argsProjectValue || resolveFromRoot("tsconfig.json");
40
- const tsconfigContent = fs.readFileSync(tsconfigPath).toString();
41
- let tsconfig = {};
42
- eval(`tsconfig = ${tsconfigContent}`);
43
- const tmpTsconfigPath = resolveFromRoot(`tsconfig.${randomChars()}.json`);
44
- const tmpTsconfig = __spreadProps(__spreadValues({}, tsconfig), {
45
- compilerOptions: __spreadProps(__spreadValues({}, tsconfig.compilerOptions), {
46
- skipLibCheck: true
47
- }),
48
- files,
49
- include: ["shared/typings"]
50
- });
51
- fs.writeFileSync(tmpTsconfigPath, JSON.stringify(tmpTsconfig, null, 2));
52
- const { status } = spawnSync("tsc", ["-p", tmpTsconfigPath, ...remainingArgsToForward], { stdio: "inherit" });
53
- fs.unlinkSync(tmpTsconfigPath);
54
- process.exit(status);
55
- };
56
- const tscCmd = {
57
- handler: async (argv) => {
58
- try {
59
- await validateTypescript(argv.p);
60
- logInfo("Typescript validation started");
61
- } catch (err) {
62
- logError("Typescript validation failed", err);
63
- yargs().exit(-1, err);
64
- }
65
- },
66
- command: "tsc [options]",
67
- describe: "validate typescript code",
68
- builder: {
69
- project: {
70
- alias: "p",
71
- type: "boolean",
72
- default: false
73
- },
74
- docs: {
75
- type: "boolean",
76
- default: false
77
- }
78
- }
79
- };
80
- export {
81
- tscCmd,
82
- validateTypescript
83
- };
@@ -1,12 +0,0 @@
1
- import path from "node:path";
2
- import { findUpSync } from "find-up";
3
- const WORKSPACE_DIR_ENV_VAR = "NPM_CONFIG_WORKSPACE_DIR";
4
- const WORKSPACE_MANIFEST_FILENAME = "pnpm-workspace.yaml";
5
- const findMonoRepoRoot = (cwd = process.cwd()) => {
6
- const workspaceManifestDirEnvVar = process.env[WORKSPACE_DIR_ENV_VAR] ?? process.env[WORKSPACE_DIR_ENV_VAR.toLowerCase()];
7
- const workspaceManifestLocation = workspaceManifestDirEnvVar ? path.join(workspaceManifestDirEnvVar, "pnpm-workspace.yaml") : findUpSync([WORKSPACE_MANIFEST_FILENAME, "pnpm-workspace.yml"], { cwd });
8
- return workspaceManifestLocation && path.dirname(workspaceManifestLocation);
9
- };
10
- export {
11
- findMonoRepoRoot
12
- };
@@ -1,10 +0,0 @@
1
- import chalk from "chalk";
2
- function checkmark_default(callback, message = "") {
3
- process.stdout.write("\n\n");
4
- process.stdout.write(chalk.green(" \u2713"));
5
- if (callback)
6
- callback(message);
7
- }
8
- export {
9
- checkmark_default as default
10
- };
@@ -1,5 +0,0 @@
1
- import fs from "node:fs";
2
- var get_npm_config_default = JSON.parse(fs.readFileSync("package.json", "utf8"));
3
- export {
4
- get_npm_config_default as default
5
- };
@@ -1,13 +0,0 @@
1
- import readline from "readline";
2
- function progress_default(message, amountOfDots = 3) {
3
- let i = 0;
4
- return setInterval(() => {
5
- readline.cursorTo(process.stdout, 0);
6
- i = (i + 1) % (amountOfDots + 1);
7
- const dots = new Array(i + 1).join(".");
8
- process.stdout.write(message + dots);
9
- }, 500);
10
- }
11
- export {
12
- progress_default as default
13
- };
@@ -1,9 +0,0 @@
1
- import chalk from "chalk";
2
- function xmark_default(callback) {
3
- process.stdout.write(chalk.red(" \u2718"));
4
- if (callback)
5
- callback();
6
- }
7
- export {
8
- xmark_default as default
9
- };
@@ -1,8 +0,0 @@
1
- import { exec } from "child_process";
2
- exec("npm -v", (err, stdout) => {
3
- if (err)
4
- throw err;
5
- if (parseFloat(stdout) < 5) {
6
- throw new Error(`[ERROR] You need npm version @>=5 but you have ${stdout}`);
7
- }
8
- });
@@ -1,22 +0,0 @@
1
- import compression from "compression";
2
- import expressStaticGzip from "express-static-gzip";
3
- import { sendFileWithCSPNonce } from "../csp.js";
4
- import { getPaths } from "../../webpack/helpers.js";
5
- const paths = getPaths();
6
- const addProdMiddlewares = (app, options = {}) => {
7
- const { buildPath = paths.buildPath, basePath = paths.basePath } = options;
8
- app.use(compression());
9
- app.get(basePath, (req, res) => {
10
- sendFileWithCSPNonce({ buildPath, res });
11
- });
12
- app.use(basePath, expressStaticGzip(buildPath, {
13
- index: false,
14
- enableBrotli: true,
15
- orderPreference: ["br"]
16
- }));
17
- app.use(expressStaticGzip("cdn"));
18
- app.get("*", (req, res) => sendFileWithCSPNonce({ buildPath, res }));
19
- };
20
- export {
21
- addProdMiddlewares
22
- };
@@ -1,35 +0,0 @@
1
- import express from "express";
2
- import cors from "cors";
3
- import expressPinoLogger from "express-pino-logger";
4
- import { csp } from "../csp.js";
5
- import { addProdMiddlewares } from "./addProdMiddlewares.js";
6
- const setupDefaultMiddlewares = (app) => {
7
- const pino = expressPinoLogger({
8
- transport: {
9
- target: "pino-pretty",
10
- options: {
11
- colorize: true
12
- }
13
- }
14
- });
15
- pino.logger.level = "warn";
16
- app.use(pino);
17
- app.use(cors());
18
- app.options("*", cors());
19
- csp(app);
20
- app.use(express.urlencoded({ extended: false }));
21
- app.use(express.text({ type: "text/plain" }));
22
- app.use(express.json({ type: "application/json" }));
23
- app.use(express.json({ type: "application/csp-report" }));
24
- };
25
- const setupAdditionalMiddlewars = (app, options) => {
26
- const isProd = false;
27
- if (isProd) {
28
- addProdMiddlewares(app, options);
29
- }
30
- return app;
31
- };
32
- export {
33
- setupAdditionalMiddlewars,
34
- setupDefaultMiddlewares
35
- };
@@ -1,46 +0,0 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import minimist from "minimist";
4
- const argv = minimist(process.argv.slice(2));
5
- const getCWD = () => process.cwd();
6
- const allJS = /\.js$/;
7
- const serviceEndpoints = /\.endpoint\.js$/;
8
- const getFilesMatching = (filePattern) => {
9
- const getFiles = (dir) => {
10
- let routeFiles = [];
11
- if (!fs.existsSync(dir))
12
- return routeFiles;
13
- fs.readdirSync(dir).forEach((file) => {
14
- const fullPath = path.join(dir, file);
15
- if (fs.lstatSync(fullPath).isDirectory()) {
16
- routeFiles = routeFiles.concat(getFiles(fullPath));
17
- } else if (filePattern.test(fullPath))
18
- routeFiles.push(fullPath);
19
- });
20
- return routeFiles;
21
- };
22
- return getFiles;
23
- };
24
- const getServerRouteFiles = getFilesMatching(allJS);
25
- const getServiceEndpoints = getFilesMatching(serviceEndpoints);
26
- const loadRoutes = (app) => {
27
- const routeFiles = getServerRouteFiles(path.join(getCWD(), "server/routes"));
28
- routeFiles.push(...getServiceEndpoints(path.join(getCWD(), "app")));
29
- routeFiles.push(...getServiceEndpoints(path.join(getCWD(), "lib")));
30
- routeFiles.forEach(async (routeFile) => {
31
- const init = await import(routeFile);
32
- try {
33
- init(app);
34
- } catch (err) {
35
- console.error(`unable to load routes from ${routeFile}. ${err.message}`);
36
- }
37
- });
38
- };
39
- const port = parseInt(argv.port || process.env.port || process.env.PORT || "3000", 10);
40
- const host = argv.host || process.env.HOST;
41
- export {
42
- getCWD,
43
- host,
44
- loadRoutes,
45
- port
46
- };
@@ -1,15 +0,0 @@
1
- module.exports = {
2
- defaults: {},
3
- interceptors: {
4
- request: {
5
- use: jest.fn(),
6
- },
7
- response: {
8
- use: jest.fn(),
9
- },
10
- },
11
- create: jest.fn().mockReturnThis(),
12
- get: jest.fn().mockResolvedValue({ data: {} }),
13
- post: jest.fn().mockResolvedValue({ data: {} }),
14
- put: jest.fn().mockResolvedValue({ data: {} }),
15
- };
@@ -1 +0,0 @@
1
- module.exports = 'CSS_MODULE';
@@ -1 +0,0 @@
1
- module.exports = 'HTML_MODULE';
@@ -1 +0,0 @@
1
- module.exports = 'IMAGE_MOCK';
@@ -1,24 +0,0 @@
1
- /**
2
- *
3
- */
4
- export default () => {
5
- Object.defineProperty(window, 'matchMedia', {
6
- writable: true,
7
- value: jest.fn().mockImplementation((query) => ({
8
- matches: false,
9
- media: query,
10
- onchange: null,
11
- addListener: jest.fn(), // Deprecated
12
- removeListener: jest.fn(), // Deprecated
13
- addEventListener: jest.fn(),
14
- removeEventListener: jest.fn(),
15
- dispatchEvent: jest.fn(),
16
- })),
17
- });
18
-
19
- Object.defineProperty(window, 'getComputedStyle', {
20
- value: () => ({
21
- getPropertyValue: () => {},
22
- }),
23
- });
24
- };
@@ -1 +0,0 @@
1
- export const load = () => {};