@elliemae/pui-cli 8.42.0-alpha.7 → 8.42.1

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 (27) hide show
  1. package/dist/cjs/server/csp.js +2 -0
  2. package/dist/cjs/testing/jest.config.cjs +1 -1
  3. package/dist/cjs/testing/setup-tests.js +2 -2
  4. package/dist/esm/server/csp.js +2 -0
  5. package/dist/esm/testing/jest.config.cjs +1 -1
  6. package/dist/esm/testing/setup-tests.js +2 -2
  7. package/dist/types/tsconfig.tsbuildinfo +1 -1
  8. package/package.json +9 -9
  9. package/dist/cjs/testing/ExtendedJSDomEnv.cjs +0 -37
  10. package/dist/cjs/testing/extended/axe-core/getMessageAndPass.js +0 -36
  11. package/dist/cjs/testing/extended/axe-core/index.js +0 -24
  12. package/dist/cjs/testing/extended/axe-core/reporter.js +0 -50
  13. package/dist/cjs/testing/extended/axe-core/shouldIgnoreNodeViolation.js +0 -31
  14. package/dist/cjs/testing/extended/axe-core/toHaveNoViolations.js +0 -42
  15. package/dist/esm/testing/ExtendedJSDomEnv.cjs +0 -37
  16. package/dist/esm/testing/extended/axe-core/getMessageAndPass.js +0 -16
  17. package/dist/esm/testing/extended/axe-core/index.js +0 -4
  18. package/dist/esm/testing/extended/axe-core/reporter.js +0 -30
  19. package/dist/esm/testing/extended/axe-core/shouldIgnoreNodeViolation.js +0 -11
  20. package/dist/esm/testing/extended/axe-core/toHaveNoViolations.js +0 -22
  21. package/dist/types/lib/testing/ExtendedJSDomEnv.d.cts +0 -5
  22. package/dist/types/lib/testing/extended/axe-core/getMessageAndPass.d.ts +0 -8
  23. package/dist/types/lib/testing/extended/axe-core/index.d.ts +0 -1
  24. package/dist/types/lib/testing/extended/axe-core/reporter.d.ts +0 -2
  25. package/dist/types/lib/testing/extended/axe-core/shouldIgnoreNodeViolation.d.ts +0 -2
  26. package/dist/types/lib/testing/extended/axe-core/toHaveNoViolations.d.ts +0 -12
  27. package/dist/types/lib/tests/basic.test.d.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "8.42.0-alpha.7",
3
+ "version": "8.42.1",
4
4
  "description": "ICE MT UI Platform CLI",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/cjs/index.cjs",
@@ -73,7 +73,7 @@
73
73
  "indent": 4
74
74
  },
75
75
  "dependencies": {
76
- "@axe-core/react": "~4.10.0",
76
+ "@axe-core/react": "~4.10.1",
77
77
  "@babel/cli": "~7.25.9",
78
78
  "@babel/core": "~7.26.0",
79
79
  "@babel/eslint-parser": "~7.25.9",
@@ -116,7 +116,7 @@
116
116
  "@stylelint/postcss-css-in-js": "~0.38.0",
117
117
  "@svgr/webpack": "~7.0.0",
118
118
  "@swc/cli": "~0.5.0",
119
- "@swc/core": "~1.7.42",
119
+ "@swc/core": "~1.9.2",
120
120
  "@swc/jest": "~0.2.37",
121
121
  "@testing-library/jest-dom": "~5.17.0",
122
122
  "@testing-library/react": "~14.3.1",
@@ -130,7 +130,7 @@
130
130
  "@types/jest": "~29.5.14",
131
131
  "@types/jest-axe": "~3.5.9",
132
132
  "@types/moment-locales-webpack-plugin": "~1.2.6",
133
- "@types/node": "~18.19.63",
133
+ "@types/node": "~18.19.64",
134
134
  "@types/normalize-path": "~3.0.2",
135
135
  "@types/postcss-preset-env": "~7.7.0",
136
136
  "@types/rimraf": "~3.0.2",
@@ -198,12 +198,12 @@
198
198
  "eslint-plugin-react": "~7.37.2",
199
199
  "eslint-plugin-react-hooks": "~4.6.2",
200
200
  "eslint-plugin-redux-saga": "~1.3.2",
201
- "eslint-plugin-storybook": "~0.10.2",
201
+ "eslint-plugin-storybook": "~0.11.0",
202
202
  "eslint-plugin-testing-library": "~5.11.1",
203
203
  "eslint-plugin-wdio": "~8.37.0",
204
204
  "execa": "~7.2.0",
205
205
  "express": "~4.21.1",
206
- "express-static-gzip": "~2.1.8",
206
+ "express-static-gzip": "~2.2.0",
207
207
  "fast-glob": "~3.3.2",
208
208
  "favicons": "~7.2.0",
209
209
  "favicons-webpack-plugin": "~6.0.1",
@@ -237,13 +237,13 @@
237
237
  "node-plop": "~0.32.0",
238
238
  "nodemon": "~2.0.22",
239
239
  "normalize-path": "~3.0.0",
240
- "npm-check-updates": "~17.1.9",
240
+ "npm-check-updates": "~17.1.11",
241
241
  "npm-run-all": "~4.1.5",
242
242
  "pino": "~8.21.0",
243
243
  "pino-http": "~8.6.1",
244
244
  "pino-pretty": "~10.3.1",
245
245
  "plop": "~3.1.2",
246
- "postcss": "8.4.47",
246
+ "postcss": "8.4.49",
247
247
  "postcss-html": "~1.7.0",
248
248
  "postcss-jsx": "~0.36.4",
249
249
  "postcss-loader": "~7.3.4",
@@ -281,7 +281,7 @@
281
281
  "update-notifier": "~6.0.2",
282
282
  "url-loader": "~4.1.1",
283
283
  "uuid": "~9.0.1",
284
- "vite": "~5.4.10",
284
+ "vite": "~5.4.11",
285
285
  "vite-tsconfig-paths": "~4.3.2",
286
286
  "vitest": "~1.6.0",
287
287
  "webpack": "~5.96.1",
@@ -1,37 +0,0 @@
1
- const { TestEnvironment } = require('jest-environment-jsdom');
2
-
3
- // ICE platform is meant to be run on node > 18
4
- // "jest-environment-jsdom": "~29.6.3" is instead meant to support node >16
5
- // features that are supported since node 17 & 18 are not supported in jsdom env
6
- // the limitation is not relevant for us since we are already running on node 18 anyway,
7
- // this "ExtendedJSDomEnv" is an extension of the
8
- // jest.config.cjs
9
- // {
10
- // ...
11
- // testEnvironment: 'jsdom'
12
- // ...
13
- // }
14
- // that actually uses node 18 features that are not supported in "jest-environment-jsdom": "~29.6.3"
15
-
16
- // https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
17
- class FixJSDOMEnvironment extends TestEnvironment {
18
- constructor(...args) {
19
- super(...args);
20
-
21
- // From here on we are using "node" (currently running version of it) to polyfill jsdom this.global
22
-
23
- // FIXME https://github.com/jsdom/jsdom/issues/3363
24
- if (structuredClone) this.global.structuredClone = structuredClone;
25
-
26
- // FIXME https://github.com/jsdom/jsdom/issues/1724
27
- if (fetch) this.global.fetch = fetch;
28
- if (Headers) this.global.Headers = Headers;
29
- if (Request) this.global.Request = Request;
30
- if (Response) this.global.Response = Response;
31
-
32
- // FIXME https://github.com/jsdom/jsdom/issues/1721
33
- if (URL) this.global.URL = URL;
34
- if (Blob) this.global.Blob = Blob;
35
- }
36
- }
37
- module.exports = FixJSDOMEnvironment;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var getMessageAndPass_exports = {};
20
- __export(getMessageAndPass_exports, {
21
- getMessageAndPass: () => getMessageAndPass
22
- });
23
- module.exports = __toCommonJS(getMessageAndPass_exports);
24
- var import_jest_matcher_utils = require("jest-matcher-utils");
25
- var import_reporter = require("./reporter.js");
26
- const getMessageAndPass = (violations) => {
27
- const formatedViolations = (0, import_reporter.reporter)(violations);
28
- const pass = formatedViolations.length === 0;
29
- if (pass) return { message: () => "", pass };
30
- return {
31
- message: () => `${(0, import_jest_matcher_utils.matcherHint)(".toHaveNoViolations")}
32
-
33
- ${formatedViolations}`,
34
- pass
35
- };
36
- };
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var axe_core_exports = {};
20
- __export(axe_core_exports, {
21
- toHaveNoViolations: () => import_toHaveNoViolations.toHaveNoViolations
22
- });
23
- module.exports = __toCommonJS(axe_core_exports);
24
- var import_toHaveNoViolations = require("./toHaveNoViolations.js");
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var reporter_exports = {};
20
- __export(reporter_exports, {
21
- reporter: () => reporter
22
- });
23
- module.exports = __toCommonJS(reporter_exports);
24
- var import_jest_matcher_utils = require("jest-matcher-utils");
25
- const colorYellow = (arg) => `\x1B[93m ${arg || ""} \x1B[0m`;
26
- const colorGrey = (arg) => `\x1B[90m ${arg || ""} \x1B[0m`;
27
- const colorBlue = (arg) => `\x1B[34m ${arg || ""} \x1B[0m`;
28
- const reporter = (violToFormat) => {
29
- if (violToFormat.length === 0) return "";
30
- const lineBreak = "\n\n";
31
- const horizontalLine = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
32
- return violToFormat.map((violation) => {
33
- const errorBody = violation.nodes.map((node) => {
34
- const selector = node.target.join(", ");
35
- const expectedText = `Expected the HTML found at $('${selector}') to have no violations:${lineBreak}`;
36
- let violationHelpUrl = "";
37
- if (violation.helpUrl)
38
- violationHelpUrl = `You can find more information on this issue here:
39
- ${colorBlue(
40
- violation.helpUrl
41
- )}`;
42
- return `${expectedText + colorGrey(node.html) + lineBreak}Received:${lineBreak}${(0, import_jest_matcher_utils.printReceived)(
43
- `${violation.help} (${violation.id})`
44
- )}${lineBreak}${colorYellow(
45
- node.failureSummary
46
- )}${lineBreak}${violationHelpUrl}`;
47
- }).join(lineBreak);
48
- return errorBody;
49
- }).join(lineBreak + horizontalLine + lineBreak);
50
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var shouldIgnoreNodeViolation_exports = {};
20
- __export(shouldIgnoreNodeViolation_exports, {
21
- shouldIgnoreNodeViolation: () => shouldIgnoreNodeViolation
22
- });
23
- module.exports = __toCommonJS(shouldIgnoreNodeViolation_exports);
24
- const dataAttributeRegexp = /(data-[\S]*)=["']([\S]*)["']/gm;
25
- const shouldIgnoreNodeViolation = (node, violation) => [...node.html.matchAll(dataAttributeRegexp)].map(([fullMatch, dataKey, dataValue]) => ({
26
- fullMatch,
27
- dataKey,
28
- dataValue
29
- })).some(
30
- ({ dataKey, dataValue }) => dataKey === `data-axe-ignore-${violation.id}` && dataValue === "true"
31
- );
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var toHaveNoViolations_exports = {};
20
- __export(toHaveNoViolations_exports, {
21
- toHaveNoViolations: () => toHaveNoViolations
22
- });
23
- module.exports = __toCommonJS(toHaveNoViolations_exports);
24
- var import_getMessageAndPass = require("./getMessageAndPass.js");
25
- var import_shouldIgnoreNodeViolation = require("./shouldIgnoreNodeViolation.js");
26
- const toHaveNoViolations = {
27
- toHaveNoViolations(results) {
28
- const { violations } = results;
29
- const finalViolations = [];
30
- violations.forEach((violation) => {
31
- const { nodes } = violation;
32
- const newNodes = [];
33
- nodes.forEach((node) => {
34
- if (!(0, import_shouldIgnoreNodeViolation.shouldIgnoreNodeViolation)(node, violation)) newNodes.push(node);
35
- });
36
- if (newNodes.length > 0) {
37
- finalViolations.push({ ...violation, nodes: newNodes });
38
- }
39
- });
40
- return { actual: violations, ...(0, import_getMessageAndPass.getMessageAndPass)(finalViolations) };
41
- }
42
- };
@@ -1,37 +0,0 @@
1
- const { TestEnvironment } = require('jest-environment-jsdom');
2
-
3
- // ICE platform is meant to be run on node > 18
4
- // "jest-environment-jsdom": "~29.6.3" is instead meant to support node >16
5
- // features that are supported since node 17 & 18 are not supported in jsdom env
6
- // the limitation is not relevant for us since we are already running on node 18 anyway,
7
- // this "ExtendedJSDomEnv" is an extension of the
8
- // jest.config.cjs
9
- // {
10
- // ...
11
- // testEnvironment: 'jsdom'
12
- // ...
13
- // }
14
- // that actually uses node 18 features that are not supported in "jest-environment-jsdom": "~29.6.3"
15
-
16
- // https://github.com/facebook/jest/blob/v29.4.3/website/versioned_docs/version-29.4/Configuration.md#testenvironment-string
17
- class FixJSDOMEnvironment extends TestEnvironment {
18
- constructor(...args) {
19
- super(...args);
20
-
21
- // From here on we are using "node" (currently running version of it) to polyfill jsdom this.global
22
-
23
- // FIXME https://github.com/jsdom/jsdom/issues/3363
24
- if (structuredClone) this.global.structuredClone = structuredClone;
25
-
26
- // FIXME https://github.com/jsdom/jsdom/issues/1724
27
- if (fetch) this.global.fetch = fetch;
28
- if (Headers) this.global.Headers = Headers;
29
- if (Request) this.global.Request = Request;
30
- if (Response) this.global.Response = Response;
31
-
32
- // FIXME https://github.com/jsdom/jsdom/issues/1721
33
- if (URL) this.global.URL = URL;
34
- if (Blob) this.global.Blob = Blob;
35
- }
36
- }
37
- module.exports = FixJSDOMEnvironment;
@@ -1,16 +0,0 @@
1
- import { matcherHint } from "jest-matcher-utils";
2
- import { reporter } from "./reporter.js";
3
- const getMessageAndPass = (violations) => {
4
- const formatedViolations = reporter(violations);
5
- const pass = formatedViolations.length === 0;
6
- if (pass) return { message: () => "", pass };
7
- return {
8
- message: () => `${matcherHint(".toHaveNoViolations")}
9
-
10
- ${formatedViolations}`,
11
- pass
12
- };
13
- };
14
- export {
15
- getMessageAndPass
16
- };
@@ -1,4 +0,0 @@
1
- import { toHaveNoViolations } from "./toHaveNoViolations.js";
2
- export {
3
- toHaveNoViolations
4
- };
@@ -1,30 +0,0 @@
1
- import { printReceived } from "jest-matcher-utils";
2
- const colorYellow = (arg) => `\x1B[93m ${arg || ""} \x1B[0m`;
3
- const colorGrey = (arg) => `\x1B[90m ${arg || ""} \x1B[0m`;
4
- const colorBlue = (arg) => `\x1B[34m ${arg || ""} \x1B[0m`;
5
- const reporter = (violToFormat) => {
6
- if (violToFormat.length === 0) return "";
7
- const lineBreak = "\n\n";
8
- const horizontalLine = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
9
- return violToFormat.map((violation) => {
10
- const errorBody = violation.nodes.map((node) => {
11
- const selector = node.target.join(", ");
12
- const expectedText = `Expected the HTML found at $('${selector}') to have no violations:${lineBreak}`;
13
- let violationHelpUrl = "";
14
- if (violation.helpUrl)
15
- violationHelpUrl = `You can find more information on this issue here:
16
- ${colorBlue(
17
- violation.helpUrl
18
- )}`;
19
- return `${expectedText + colorGrey(node.html) + lineBreak}Received:${lineBreak}${printReceived(
20
- `${violation.help} (${violation.id})`
21
- )}${lineBreak}${colorYellow(
22
- node.failureSummary
23
- )}${lineBreak}${violationHelpUrl}`;
24
- }).join(lineBreak);
25
- return errorBody;
26
- }).join(lineBreak + horizontalLine + lineBreak);
27
- };
28
- export {
29
- reporter
30
- };
@@ -1,11 +0,0 @@
1
- const dataAttributeRegexp = /(data-[\S]*)=["']([\S]*)["']/gm;
2
- const shouldIgnoreNodeViolation = (node, violation) => [...node.html.matchAll(dataAttributeRegexp)].map(([fullMatch, dataKey, dataValue]) => ({
3
- fullMatch,
4
- dataKey,
5
- dataValue
6
- })).some(
7
- ({ dataKey, dataValue }) => dataKey === `data-axe-ignore-${violation.id}` && dataValue === "true"
8
- );
9
- export {
10
- shouldIgnoreNodeViolation
11
- };
@@ -1,22 +0,0 @@
1
- import { getMessageAndPass } from "./getMessageAndPass.js";
2
- import { shouldIgnoreNodeViolation } from "./shouldIgnoreNodeViolation.js";
3
- const toHaveNoViolations = {
4
- toHaveNoViolations(results) {
5
- const { violations } = results;
6
- const finalViolations = [];
7
- violations.forEach((violation) => {
8
- const { nodes } = violation;
9
- const newNodes = [];
10
- nodes.forEach((node) => {
11
- if (!shouldIgnoreNodeViolation(node, violation)) newNodes.push(node);
12
- });
13
- if (newNodes.length > 0) {
14
- finalViolations.push({ ...violation, nodes: newNodes });
15
- }
16
- });
17
- return { actual: violations, ...getMessageAndPass(finalViolations) };
18
- }
19
- };
20
- export {
21
- toHaveNoViolations
22
- };
@@ -1,5 +0,0 @@
1
- export = FixJSDOMEnvironment;
2
- declare const FixJSDOMEnvironment_base: typeof import("jest-environment-jsdom").default;
3
- declare class FixJSDOMEnvironment extends FixJSDOMEnvironment_base {
4
- constructor(...args: any[]);
5
- }
@@ -1,8 +0,0 @@
1
- import type { Result } from 'axe-core';
2
- export declare const getMessageAndPass: (violations: Result[]) => {
3
- message: () => string;
4
- pass: true;
5
- } | {
6
- message: () => string;
7
- pass: false;
8
- };
@@ -1 +0,0 @@
1
- export { toHaveNoViolations } from './toHaveNoViolations.js';
@@ -1,2 +0,0 @@
1
- import type { Result } from 'axe-core';
2
- export declare const reporter: (violToFormat: Result[]) => string;
@@ -1,2 +0,0 @@
1
- import type { NodeResult, Result } from 'axe-core';
2
- export declare const shouldIgnoreNodeViolation: (node: NodeResult, violation: Result) => boolean;
@@ -1,12 +0,0 @@
1
- import type { AxeResults, Result } from 'axe-core';
2
- export declare const toHaveNoViolations: {
3
- toHaveNoViolations(results: AxeResults): {
4
- message: () => string;
5
- pass: true;
6
- actual: Result[];
7
- } | {
8
- message: () => string;
9
- pass: false;
10
- actual: Result[];
11
- };
12
- };
File without changes