@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
@@ -1,15 +1,18 @@
1
- module.exports = {
1
+ var axios_default = {
2
2
  defaults: {},
3
3
  interceptors: {
4
4
  request: {
5
- use: jest.fn(),
5
+ use: jest.fn()
6
6
  },
7
7
  response: {
8
- use: jest.fn(),
9
- },
8
+ use: jest.fn()
9
+ }
10
10
  },
11
11
  create: jest.fn().mockReturnThis(),
12
12
  get: jest.fn().mockResolvedValue({ data: {} }),
13
13
  post: jest.fn().mockResolvedValue({ data: {} }),
14
- put: jest.fn().mockResolvedValue({ data: {} }),
14
+ put: jest.fn().mockResolvedValue({ data: {} })
15
+ };
16
+ export {
17
+ axios_default as default
15
18
  };
@@ -0,0 +1,4 @@
1
+ var cssModule_default = "CSS_MODULE";
2
+ export {
3
+ cssModule_default as default
4
+ };
@@ -0,0 +1,4 @@
1
+ var html_default = "HTML_MODULE";
2
+ export {
3
+ html_default as default
4
+ };
@@ -0,0 +1,4 @@
1
+ var image_default = "IMAGE_MOCK";
2
+ export {
3
+ image_default as default
4
+ };
@@ -0,0 +1,24 @@
1
+ const addMatchMedia = () => {
2
+ Object.defineProperty(window, "matchMedia", {
3
+ writable: true,
4
+ value: jest.fn().mockImplementation((query) => ({
5
+ matches: false,
6
+ media: query,
7
+ onchange: null,
8
+ addListener: jest.fn(),
9
+ removeListener: jest.fn(),
10
+ addEventListener: jest.fn(),
11
+ removeEventListener: jest.fn(),
12
+ dispatchEvent: jest.fn()
13
+ }))
14
+ });
15
+ Object.defineProperty(window, "getComputedStyle", {
16
+ value: () => ({
17
+ getPropertyValue: () => {
18
+ }
19
+ })
20
+ });
21
+ };
22
+ export {
23
+ addMatchMedia
24
+ };
@@ -0,0 +1,5 @@
1
+ const load = () => {
2
+ };
3
+ export {
4
+ load
5
+ };
@@ -0,0 +1,49 @@
1
+ const logger = () => ({
2
+ setLogLevel() {
3
+ },
4
+ setOptions() {
5
+ },
6
+ info() {
7
+ },
8
+ warn() {
9
+ },
10
+ error() {
11
+ },
12
+ trace() {
13
+ },
14
+ debug() {
15
+ },
16
+ audit() {
17
+ },
18
+ fatal() {
19
+ }
20
+ });
21
+ const LogLevel = {
22
+ info: "info",
23
+ debug: "debug",
24
+ trace: "trace",
25
+ warn: "warn",
26
+ error: "error",
27
+ audit: "audit",
28
+ fatal: "fatal"
29
+ };
30
+ const Console = () => ({
31
+ log: () => {
32
+ }
33
+ });
34
+ const http = () => ({
35
+ log() {
36
+ }
37
+ });
38
+ const webvitals = () => {
39
+ };
40
+ const logUnhandledErrors = () => {
41
+ };
42
+ export {
43
+ Console,
44
+ LogLevel,
45
+ http,
46
+ logUnhandledErrors,
47
+ logger,
48
+ webvitals
49
+ };
@@ -0,0 +1,11 @@
1
+ const setCustomUserData = () => {
2
+ };
3
+ const setCustomVirtualPageName = () => {
4
+ };
5
+ const startVirtualPageMonitoringWithAutoEnd = () => {
6
+ };
7
+ export {
8
+ setCustomUserData,
9
+ setCustomVirtualPageName,
10
+ startVirtualPageMonitoringWithAutoEnd
11
+ };
@@ -0,0 +1,8 @@
1
+ const attach = jest.fn();
2
+ const detach = jest.fn();
3
+ const getConfig = jest.fn();
4
+ export {
5
+ attach,
6
+ detach,
7
+ getConfig
8
+ };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ var svg_default = "SvgrURL";
3
+ const ReactComponent = "div";
4
+ export {
5
+ ReactComponent,
6
+ svg_default as default
7
+ };
@@ -0,0 +1,5 @@
1
+ const enableHotReloading = () => {
2
+ };
3
+ export {
4
+ enableHotReloading
5
+ };
@@ -3,8 +3,8 @@ import "regenerator-runtime/runtime";
3
3
  import "@testing-library/jest-dom/extend-expect";
4
4
  import jestAxe from "jest-axe";
5
5
  import ResizeObserver from "resize-observer-polyfill";
6
- import addMatchMedia from "./mocks/matchMedia.cjs";
7
- import { logger } from "./mocks/pui-diagnostics.cjs";
6
+ import { addMatchMedia } from "./mocks/matchMedia.js";
7
+ import { logger } from "./mocks/pui-diagnostics.js";
8
8
  const originalError = console.error;
9
9
  console.error = (...args) => {
10
10
  const ignoreList = [
@@ -1,11 +1,11 @@
1
1
  import updateNotifier from "update-notifier";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs/promises";
4
- var update_notifier_default = async () => {
4
+ const notifyUpdates = async () => {
5
5
  const pkgFile = await fs.readFile(path.join(process.cwd(), "./package.json"));
6
6
  const pkg = JSON.parse(pkgFile);
7
7
  updateNotifier({ pkg }).notify();
8
8
  };
9
9
  export {
10
- update_notifier_default as default
10
+ notifyUpdates
11
11
  };
@@ -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'));
@@ -6,8 +6,8 @@ import MiniCssExtractPlugin from "mini-css-extract-plugin";
6
6
  import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
7
7
  import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
8
8
  import expressStaticGzip from "express-static-gzip";
9
- import { setupDefaultMiddlewares } from "../server/middlewares/index.js";
10
- import { loadRoutes } from "../server/util/index.js";
9
+ import { setupDefaultMiddlewares } from "../server/middlewares.js";
10
+ import { loadRoutes } from "../server/utils.js";
11
11
  import {
12
12
  isAppLoaderEnabled,
13
13
  getPaths,
@@ -6,7 +6,7 @@ import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
6
6
  import { ESBuildMinifyPlugin } from "esbuild-loader";
7
7
  import SpeedMeasurePlugin from "speed-measure-webpack-plugin";
8
8
  import browserslistToEsbuild from "browserslist-to-esbuild";
9
- import baseConfigFactory from "./webpack.base.babel.js";
9
+ import { baseConfig } from "./webpack.base.babel.js";
10
10
  import {
11
11
  isAppLoaderEnabled,
12
12
  getPaths,
@@ -104,7 +104,7 @@ const htmlWebpackPlugin = new HtmlWebpackPlugin({
104
104
  googleTagManager: isGoogleTagManagerEnabled()
105
105
  }
106
106
  });
107
- const config = baseConfigFactory(getProdConfig());
107
+ const config = baseConfig(getProdConfig());
108
108
  config.plugins.push(htmlWebpackPlugin);
109
109
  const addSMPPlugin = (webpackConfig) => {
110
110
  const smpConfig = new SpeedMeasurePlugin({
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ export namespace tscheckCmd {
2
+ function handler({ files }: {
3
+ files: any;
4
+ }): Promise<void>;
5
+ const command: string;
6
+ const describe: string;
7
+ namespace builder {
8
+ namespace files {
9
+ export const type: string;
10
+ const _default: never[];
11
+ export { _default as default };
12
+ }
13
+ }
14
+ }
File without changes
@@ -1,9 +1,9 @@
1
- import { babelConfig } from "./babel/babel.config.cjs";
2
- import { esConfig as eslintBaseConfig } from "./lint/eslint/non-react.cjs";
3
- import { esReactConfig as eslintConfig } 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 as eslintBaseConfig } from "./lint-config/eslint/non-react.cjs";
3
+ import { esReactConfig as eslintConfig } 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
9
  export { babelConfig, eslintBaseConfig, eslintConfig, stylelintConfig, prettierConfig, commitlintConfig, jestConfig, jestNodeConfig };
@@ -1,10 +1,10 @@
1
- export { babelConfig } from "./babel/babel.config.cjs";
2
- export { esConfig as eslintBaseConfig } from "./lint/eslint/non-react.cjs";
3
- export { esReactConfig as eslintConfig } from "./lint/eslint/react.cjs";
4
- export { stylelintConfig } from "./lint/stylelint.config.cjs";
5
- export { prettierConfig } from "./lint/prettier.config.cjs";
6
- export { commitlintConfig } from "./lint/commitlint.config.cjs";
1
+ export { babelConfig } from "./babel.config.cjs";
2
+ export { esConfig as eslintBaseConfig } from "./lint-config/eslint/non-react.cjs";
3
+ export { esReactConfig as eslintConfig } from "./lint-config/eslint/react.cjs";
4
+ export { stylelintConfig } from "./lint-config/stylelint.config.cjs";
5
+ export { prettierConfig } from "./lint-config/prettier.config.cjs";
6
+ export { commitlintConfig } from "./lint-config/commitlint.config.cjs";
7
7
  export { jestConfig } from "./testing/jest.config.cjs";
8
8
  export { jestNodeConfig } from "./testing/jest.node.config.cjs";
9
- export { lintStagedConfig } from "./lint/lint-staged.config.js";
10
- export { loadRoutes } from "./server/util/index.js";
9
+ export { lintStagedConfig } from "./lint-config/lint-staged.config.js";
10
+ export { loadRoutes } from "./server/utils.js";
@@ -1,2 +1,2 @@
1
1
  export function setupDefaultMiddlewares(app: any): void;
2
- export function setupAdditionalMiddlewars(app: any, options: any): any;
2
+ export function setupAdditionalMiddlewars(app: any, options?: {}): any;
@@ -9,7 +9,7 @@ export namespace jestConfig {
9
9
  '.*\\.(css|scss)$': any;
10
10
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': any;
11
11
  '.*\\.svg(?:\\?[a-zA-Z]+)?$': any;
12
- '.*\\.html$(?:\\?[a-zA-Z]+)?$': any;
12
+ '.*\\.html(?:\\?[a-zA-Z]+)?$': any;
13
13
  '@elliemae/pui-user-monitoring': any;
14
14
  '@elliemae/pui-app-loader': any;
15
15
  '@elliemae/pui-diagnostics': any;
@@ -13,7 +13,7 @@ export var jestNodeConfig: {
13
13
  '.*\\.(css|scss)$': any;
14
14
  '.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$': any;
15
15
  '.*\\.svg(?:\\?[a-zA-Z]+)?$': any;
16
- '.*\\.html$(?:\\?[a-zA-Z]+)?$': any;
16
+ '.*\\.html(?:\\?[a-zA-Z]+)?$': any;
17
17
  '@elliemae/pui-user-monitoring': any;
18
18
  '@elliemae/pui-app-loader': any;
19
19
  '@elliemae/pui-diagnostics': any;
@@ -0,0 +1,17 @@
1
+ declare namespace _default {
2
+ const defaults: {};
3
+ namespace interceptors {
4
+ namespace request {
5
+ const use: jest.Mock<any, any>;
6
+ }
7
+ namespace response {
8
+ const use_1: jest.Mock<any, any>;
9
+ export { use_1 as use };
10
+ }
11
+ }
12
+ const create: jest.Mock<any, any>;
13
+ const get: jest.Mock<any, any>;
14
+ const post: jest.Mock<any, any>;
15
+ const put: jest.Mock<any, any>;
16
+ }
17
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare var _default: "CSS_MODULE";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare var _default: "HTML_MODULE";
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare var _default: "IMAGE_MOCK";
2
+ export default _default;
@@ -0,0 +1 @@
1
+ export function addMatchMedia(): void;
File without changes
@@ -0,0 +1 @@
1
+ export function notifyUpdates(): Promise<void>;
@@ -1,3 +1,4 @@
1
1
  export var basePath: string;
2
2
  export function getAppConfig(): Buffer | "{}";
3
+ export function isTypeScriptEnabled(): boolean;
3
4
  export function isApp(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "7.0.0-alpha.6",
3
+ "version": "7.0.0-alpha.9",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -14,6 +14,9 @@
14
14
  ".": {
15
15
  "import": "./dist/esm/index.js",
16
16
  "require": "./dist/cjs/index.cjs"
17
+ },
18
+ "./releaseConfig": {
19
+ "require": "./dist/cjs/release.config.cjs"
17
20
  }
18
21
  },
19
22
  "files": [
@@ -44,6 +47,7 @@
44
47
  "storybook:docs:build": "exit 0",
45
48
  "test": "ts-node -r tsconfig-paths/register ./lib/cli test -p",
46
49
  "test:staged": "jest --coverage --passWithNoTests --bail --findRelatedTests",
50
+ "tscheck": "ts-node -r tsconfig-paths/register ./lib/cli tscheck --files",
47
51
  "setup": "rimraf node_modules && rimraf pnpm-lock.yaml && pnpm i",
48
52
  "upgrade": "ncu -u && npm run setup",
49
53
  "prepare": "[ -n \"$CI\" ] || husky install"
@@ -75,9 +79,9 @@
75
79
  "@commitlint/config-conventional": "~16.2.4",
76
80
  "@elliemae/browserslist-config-elliemae-latest-browsers": "~1.4.2",
77
81
  "@faker-js/faker": "6.3.1",
78
- "@nrwl/cli": "14.1.1",
79
- "@nrwl/tao": "14.1.1",
80
- "@nrwl/workspace": "14.1.1",
82
+ "@nrwl/cli": "14.1.2",
83
+ "@nrwl/tao": "14.1.2",
84
+ "@nrwl/workspace": "14.1.2",
81
85
  "@pmmmwh/react-refresh-webpack-plugin": "~0.5.5",
82
86
  "@semantic-release/changelog": "~6.0.1",
83
87
  "@semantic-release/exec": "~6.0.3",
@@ -1,35 +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 progress_exports = {};
22
- __export(progress_exports, {
23
- default: () => progress_default
24
- });
25
- module.exports = __toCommonJS(progress_exports);
26
- var import_readline = __toESM(require("readline"), 1);
27
- function progress_default(message, amountOfDots = 3) {
28
- let i = 0;
29
- return setInterval(() => {
30
- import_readline.default.cursorTo(process.stdout, 0);
31
- i = (i + 1) % (amountOfDots + 1);
32
- const dots = new Array(i + 1).join(".");
33
- process.stdout.write(message + dots);
34
- }, 500);
35
- }
@@ -1,8 +0,0 @@
1
- var import_child_process = require("child_process");
2
- (0, import_child_process.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,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 +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 = () => {};