@elliemae/pui-cli 9.0.0-next.67 → 9.0.0-next.68
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.
- package/app.tsconfig.json +3 -4
- package/dist/cjs/commands/test.js +1 -1
- package/dist/cjs/lint-config/eslint.config.js +2 -2
- package/dist/cjs/release.config.js +2 -0
- package/dist/cjs/server/index.js +2 -2
- package/dist/cjs/testing/jest.config.cjs +2 -1
- package/dist/cjs/testing/{extended/axe-core/index.js → mocks/frame.js} +7 -5
- package/dist/cjs/testing/mocks/iframe.js +3 -1
- package/dist/cjs/testing/setup-tests.js +9 -2
- package/dist/cjs/testing/vitest.config.js +0 -1
- package/dist/cjs/webpack/csp-plugin.js +3 -1
- package/dist/cjs/webpack/webpack.base.babel.js +5 -2
- package/dist/cjs/webpack/webpack.lib.base.babel.js +3 -1
- package/dist/esm/commands/test.js +1 -1
- package/dist/esm/lint-config/eslint.config.js +2 -2
- package/dist/esm/release.config.js +2 -0
- package/dist/esm/server/index.js +2 -2
- package/dist/esm/testing/jest.config.cjs +2 -1
- package/dist/esm/testing/mocks/frame.js +6 -0
- package/dist/esm/testing/mocks/iframe.js +3 -1
- package/dist/esm/testing/setup-tests.js +9 -2
- package/dist/esm/testing/vitest.config.js +0 -1
- package/dist/esm/webpack/csp-plugin.js +3 -1
- package/dist/esm/webpack/webpack.base.babel.js +5 -2
- package/dist/esm/webpack/webpack.lib.base.babel.js +3 -1
- package/dist/types/docusaurus.config.d.ts +0 -1
- package/dist/types/eslint.config.d.ts +0 -1
- package/dist/types/lib/babel.config.d.cts +0 -1
- package/dist/types/lib/build/vite.config.d.ts +0 -1
- package/dist/types/lib/cli.d.ts +0 -1
- package/dist/types/lib/commands/build.d.ts +0 -1
- package/dist/types/lib/commands/buildcdn.d.ts +0 -1
- package/dist/types/lib/commands/codemod.d.ts +0 -1
- package/dist/types/lib/commands/gendoc.d.ts +0 -1
- package/dist/types/lib/commands/lint.d.ts +0 -1
- package/dist/types/lib/commands/pack.d.ts +0 -1
- package/dist/types/lib/commands/start.d.ts +0 -1
- package/dist/types/lib/commands/storybook.d.ts +0 -1
- package/dist/types/lib/commands/test.d.ts +0 -1
- package/dist/types/lib/commands/tscheck.d.ts +0 -1
- package/dist/types/lib/commands/utils.d.ts +0 -1
- package/dist/types/lib/commands/version.d.ts +0 -1
- package/dist/types/lib/commands/vitest.d.ts +0 -1
- package/dist/types/lib/index.d.cts +0 -1
- package/dist/types/lib/index.d.ts +0 -1
- package/dist/types/lib/lint-config/commitlint.config.d.ts +0 -1
- package/dist/types/lib/lint-config/eslint.config.d.ts +1 -2
- package/dist/types/lib/lint-config/lint-staged.config.d.ts +0 -1
- package/dist/types/lib/lint-config/prettier.config.d.ts +0 -1
- package/dist/types/lib/lint-config/stylelint.config.d.ts +0 -1
- package/dist/types/lib/monorepo/delete-merged-tags.d.ts +0 -1
- package/dist/types/lib/monorepo/set-registry-version.d.ts +0 -1
- package/dist/types/lib/monorepo/set-workspace-version.d.ts +0 -1
- package/dist/types/lib/monorepo/utils.d.cts +0 -1
- package/dist/types/lib/monorepo/utils.d.ts +0 -1
- package/dist/types/lib/pui-config.d.ts +0 -1
- package/dist/types/lib/release.config.d.ts +0 -1
- package/dist/types/lib/server/appRoutes.d.ts +0 -1
- package/dist/types/lib/server/cert.d.ts +1 -2
- package/dist/types/lib/server/csp.d.ts +0 -1
- package/dist/types/lib/server/index.d.ts +0 -1
- package/dist/types/lib/server/logger.d.ts +0 -1
- package/dist/types/lib/server/middlewares.d.ts +0 -1
- package/dist/types/lib/server/utils.d.ts +0 -1
- package/dist/types/lib/server/wsServer.d.ts +0 -1
- package/dist/types/lib/testing/jest.config.d.cts +2 -2
- package/dist/types/lib/testing/jest.node.config.d.cts +2 -2
- package/dist/types/lib/testing/jest.polyfills.d.cts +0 -1
- package/dist/types/lib/testing/mocks/axios.d.ts +0 -1
- package/dist/types/lib/testing/mocks/cssModule.d.ts +0 -1
- package/dist/types/lib/testing/mocks/frame.d.ts +3 -0
- package/dist/types/lib/testing/mocks/html.d.ts +0 -1
- package/dist/types/lib/testing/mocks/iframe.d.ts +1 -1
- package/dist/types/lib/testing/mocks/image.d.ts +0 -1
- package/dist/types/lib/testing/mocks/matchMedia.d.ts +0 -1
- package/dist/types/lib/testing/mocks/pui-app-loader.d.ts +0 -1
- package/dist/types/lib/testing/mocks/pui-diagnostics.d.ts +0 -1
- package/dist/types/lib/testing/mocks/pui-user-monitoring.d.ts +0 -1
- package/dist/types/lib/testing/mocks/retry-axios.d.ts +0 -1
- package/dist/types/lib/testing/mocks/svg.d.ts +0 -1
- package/dist/types/lib/testing/mocks/webpack-hmr.d.ts +0 -1
- package/dist/types/lib/testing/resolver.d.cts +0 -1
- package/dist/types/lib/testing/setup-react-env.d.ts +0 -1
- package/dist/types/lib/testing/setup-tests.d.ts +0 -1
- package/dist/types/lib/testing/vitest.config.d.ts +1 -2
- package/dist/types/lib/transpile/esbuild.d.ts +0 -1
- package/dist/types/lib/transpile/react-shim.d.ts +0 -1
- package/dist/types/lib/transpile/swcrc.config.d.cts +0 -1
- package/dist/types/lib/typedoc.d.cts +0 -1
- package/dist/types/lib/update-notifier.d.ts +0 -1
- package/dist/types/lib/utils.d.cts +1 -2
- package/dist/types/lib/utils.d.ts +1 -2
- package/dist/types/lib/webpack/csp-plugin.d.ts +3 -2
- package/dist/types/lib/webpack/csp.d.ts +0 -1
- package/dist/types/lib/webpack/helpers.d.ts +0 -1
- package/dist/types/lib/webpack/interceptor-middleware.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.base.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.dev.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.lib.base.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.lib.dev.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.lib.prod.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.prod.babel.d.ts +0 -1
- package/dist/types/lib/webpack/webpack.storybook.d.ts +0 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/library.tsconfig.json +6 -11
- package/package.json +141 -140
- package/dist/cjs/testing/ExtendedJSDomEnv.cjs +0 -46
- package/dist/cjs/testing/extended/axe-core/getMessageAndPass.js +0 -36
- package/dist/cjs/testing/extended/axe-core/reporter.js +0 -50
- package/dist/cjs/testing/extended/axe-core/shouldIgnoreNodeViolation.js +0 -31
- package/dist/cjs/testing/extended/axe-core/toHaveNoViolations.js +0 -42
- package/dist/esm/testing/ExtendedJSDomEnv.cjs +0 -46
- package/dist/esm/testing/extended/axe-core/getMessageAndPass.js +0 -16
- package/dist/esm/testing/extended/axe-core/index.js +0 -4
- package/dist/esm/testing/extended/axe-core/reporter.js +0 -30
- package/dist/esm/testing/extended/axe-core/shouldIgnoreNodeViolation.js +0 -11
- package/dist/esm/testing/extended/axe-core/toHaveNoViolations.js +0 -22
- package/dist/types/docusaurus.config.d.ts.map +0 -1
- package/dist/types/eslint.config.d.ts.map +0 -1
- package/dist/types/lib/babel.config.d.cts.map +0 -1
- package/dist/types/lib/build/vite.config.d.ts.map +0 -1
- package/dist/types/lib/cli.d.ts.map +0 -1
- package/dist/types/lib/commands/build.d.ts.map +0 -1
- package/dist/types/lib/commands/buildcdn.d.ts.map +0 -1
- package/dist/types/lib/commands/codemod.d.ts.map +0 -1
- package/dist/types/lib/commands/gendoc.d.ts.map +0 -1
- package/dist/types/lib/commands/lint.d.ts.map +0 -1
- package/dist/types/lib/commands/pack.d.ts.map +0 -1
- package/dist/types/lib/commands/start.d.ts.map +0 -1
- package/dist/types/lib/commands/storybook.d.ts.map +0 -1
- package/dist/types/lib/commands/test.d.ts.map +0 -1
- package/dist/types/lib/commands/tscheck.d.ts.map +0 -1
- package/dist/types/lib/commands/utils.d.ts.map +0 -1
- package/dist/types/lib/commands/version.d.ts.map +0 -1
- package/dist/types/lib/commands/vitest.d.ts.map +0 -1
- package/dist/types/lib/index.d.cts.map +0 -1
- package/dist/types/lib/index.d.ts.map +0 -1
- package/dist/types/lib/lint-config/commitlint.config.d.ts.map +0 -1
- package/dist/types/lib/lint-config/eslint.config.d.ts.map +0 -1
- package/dist/types/lib/lint-config/lint-staged.config.d.ts.map +0 -1
- package/dist/types/lib/lint-config/prettier.config.d.ts.map +0 -1
- package/dist/types/lib/lint-config/stylelint.config.d.ts.map +0 -1
- package/dist/types/lib/monorepo/delete-merged-tags.d.ts.map +0 -1
- package/dist/types/lib/monorepo/set-registry-version.d.ts.map +0 -1
- package/dist/types/lib/monorepo/set-workspace-version.d.ts.map +0 -1
- package/dist/types/lib/monorepo/utils.d.cts.map +0 -1
- package/dist/types/lib/monorepo/utils.d.ts.map +0 -1
- package/dist/types/lib/pui-config.d.ts.map +0 -1
- package/dist/types/lib/release.config.d.ts.map +0 -1
- package/dist/types/lib/server/appRoutes.d.ts.map +0 -1
- package/dist/types/lib/server/cert.d.ts.map +0 -1
- package/dist/types/lib/server/csp.d.ts.map +0 -1
- package/dist/types/lib/server/index.d.ts.map +0 -1
- package/dist/types/lib/server/logger.d.ts.map +0 -1
- package/dist/types/lib/server/middlewares.d.ts.map +0 -1
- package/dist/types/lib/server/utils.d.ts.map +0 -1
- package/dist/types/lib/server/wsServer.d.ts.map +0 -1
- package/dist/types/lib/testing/ExtendedJSDomEnv.d.cts +0 -6
- package/dist/types/lib/testing/ExtendedJSDomEnv.d.cts.map +0 -1
- package/dist/types/lib/testing/extended/axe-core/getMessageAndPass.d.ts +0 -9
- package/dist/types/lib/testing/extended/axe-core/getMessageAndPass.d.ts.map +0 -1
- package/dist/types/lib/testing/extended/axe-core/index.d.ts +0 -2
- package/dist/types/lib/testing/extended/axe-core/index.d.ts.map +0 -1
- package/dist/types/lib/testing/extended/axe-core/reporter.d.ts +0 -3
- package/dist/types/lib/testing/extended/axe-core/reporter.d.ts.map +0 -1
- package/dist/types/lib/testing/extended/axe-core/shouldIgnoreNodeViolation.d.ts +0 -3
- package/dist/types/lib/testing/extended/axe-core/shouldIgnoreNodeViolation.d.ts.map +0 -1
- package/dist/types/lib/testing/extended/axe-core/toHaveNoViolations.d.ts +0 -13
- package/dist/types/lib/testing/extended/axe-core/toHaveNoViolations.d.ts.map +0 -1
- package/dist/types/lib/testing/jest.config.d.cts.map +0 -1
- package/dist/types/lib/testing/jest.node.config.d.cts.map +0 -1
- package/dist/types/lib/testing/jest.polyfills.d.cts.map +0 -1
- package/dist/types/lib/testing/mocks/axios.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/cssModule.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/html.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/iframe.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/image.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/matchMedia.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/pui-app-loader.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/pui-diagnostics.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/pui-user-monitoring.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/retry-axios.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/svg.d.ts.map +0 -1
- package/dist/types/lib/testing/mocks/webpack-hmr.d.ts.map +0 -1
- package/dist/types/lib/testing/resolver.d.cts.map +0 -1
- package/dist/types/lib/testing/setup-react-env.d.ts.map +0 -1
- package/dist/types/lib/testing/setup-tests.d.ts.map +0 -1
- package/dist/types/lib/testing/vitest.config.d.ts.map +0 -1
- package/dist/types/lib/transpile/esbuild.d.ts.map +0 -1
- package/dist/types/lib/transpile/react-shim.d.ts.map +0 -1
- package/dist/types/lib/transpile/swcrc.config.d.cts.map +0 -1
- package/dist/types/lib/typedoc.d.cts.map +0 -1
- package/dist/types/lib/update-notifier.d.ts.map +0 -1
- package/dist/types/lib/utils.d.cts.map +0 -1
- package/dist/types/lib/utils.d.ts.map +0 -1
- package/dist/types/lib/webpack/csp-plugin.d.ts.map +0 -1
- package/dist/types/lib/webpack/csp.d.ts.map +0 -1
- package/dist/types/lib/webpack/helpers.d.ts.map +0 -1
- package/dist/types/lib/webpack/interceptor-middleware.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.base.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.dev.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.lib.base.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.lib.dev.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.lib.prod.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.prod.babel.d.ts.map +0 -1
- package/dist/types/lib/webpack/webpack.storybook.d.ts.map +0 -1
package/app.tsconfig.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"lib": ["dom", "dom.iterable", "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"target": "es2020",
|
|
3
|
+
"lib": ["dom", "dom.iterable", "ES2022"],
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"target": "ES2022",
|
|
7
6
|
"allowJs": true,
|
|
8
7
|
"allowSyntheticDefaultImports": true,
|
|
9
8
|
"esModuleInterop": true,
|
|
@@ -161,7 +161,7 @@ const typedTestCmd = {
|
|
|
161
161
|
},
|
|
162
162
|
command: "test [options]",
|
|
163
163
|
describe: "unit tests application code",
|
|
164
|
-
builder: (yargsRef) => yargsRef.options(cmdArgs).help()
|
|
164
|
+
builder: ((yargsRef) => yargsRef.options(cmdArgs).help())
|
|
165
165
|
// the way yargs types are defined this fails if we don't cast it explicitly
|
|
166
166
|
// this cast is safe, we are not overriding the builder
|
|
167
167
|
// just telling typescript that our implementation is compatible with the yargs type system
|
|
@@ -238,9 +238,9 @@ const reactConfig = {
|
|
|
238
238
|
...import_eslint_plugin_react_hooks.default.configs.recommended.rules
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
const
|
|
241
|
+
const gitignoreExists = (0, import_node_fs.existsSync)(gitignorePath);
|
|
242
242
|
const tseslintConfigArgs = [ignores];
|
|
243
|
-
if (
|
|
243
|
+
if (gitignoreExists) {
|
|
244
244
|
tseslintConfigArgs.push((0, import_compat.includeIgnoreFile)(gitignorePath));
|
|
245
245
|
}
|
|
246
246
|
tseslintConfigArgs.push(
|
|
@@ -25,9 +25,11 @@ var release_config_default = {
|
|
|
25
25
|
branches: [
|
|
26
26
|
"+([0-9])?(.{+([0-9]),x}).x",
|
|
27
27
|
"master",
|
|
28
|
+
"main",
|
|
28
29
|
"next-major",
|
|
29
30
|
{ name: "beta", prerelease: true },
|
|
30
31
|
{ name: "alpha", prerelease: true },
|
|
32
|
+
{ name: "rc", prerelease: true },
|
|
31
33
|
{ name: "hotfix", prerelease: true },
|
|
32
34
|
{ name: "next", prerelease: true }
|
|
33
35
|
],
|
package/dist/cjs/server/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var import_utils = require("./utils.js");
|
|
|
31
31
|
var import_utils2 = require("../utils.js");
|
|
32
32
|
var import_appRoutes = require("./appRoutes.js");
|
|
33
33
|
var import_wsServer = require("./wsServer.js");
|
|
34
|
-
void async function startServer() {
|
|
34
|
+
void (async function startServer() {
|
|
35
35
|
const app = (0, import_express.default)();
|
|
36
36
|
(0, import_middlewares.setupDefaultMiddlewares)(app);
|
|
37
37
|
await (0, import_appRoutes.loadRoutes)(app);
|
|
@@ -47,4 +47,4 @@ void async function startServer() {
|
|
|
47
47
|
port: import_utils.wsPort
|
|
48
48
|
});
|
|
49
49
|
app.locals.wsServer = wsServer;
|
|
50
|
-
}();
|
|
50
|
+
})();
|
|
@@ -63,6 +63,7 @@ const jestConfig = {
|
|
|
63
63
|
getMockFilePath('image.js'),
|
|
64
64
|
'.*\\.svg(?:\\?[a-zA-Z]+)?$': getMockFilePath('svg.js'),
|
|
65
65
|
'.*iframe\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('iframe.js'),
|
|
66
|
+
'.*frame\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('frame.js'),
|
|
66
67
|
'.*\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('html.js'),
|
|
67
68
|
'@elliemae/pui-user-monitoring': getMockFilePath('pui-user-monitoring.js'),
|
|
68
69
|
'@elliemae/pui-app-loader': getMockFilePath('pui-app-loader.js'),
|
|
@@ -95,7 +96,7 @@ const jestConfig = {
|
|
|
95
96
|
resources: 'usable',
|
|
96
97
|
customExportConditions: [''],
|
|
97
98
|
},
|
|
98
|
-
testEnvironment:
|
|
99
|
+
testEnvironment: 'jsdom',
|
|
99
100
|
watchPlugins: [
|
|
100
101
|
'jest-watch-typeahead/filename',
|
|
101
102
|
'jest-watch-typeahead/testname',
|
|
@@ -16,9 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
21
|
-
|
|
19
|
+
var frame_exports = {};
|
|
20
|
+
__export(frame_exports, {
|
|
21
|
+
default: () => frame_default,
|
|
22
|
+
filename: () => filename
|
|
22
23
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
|
|
24
|
+
module.exports = __toCommonJS(frame_exports);
|
|
25
|
+
const filename = "./frame.html";
|
|
26
|
+
var frame_default = "./frame.html";
|
|
@@ -18,7 +18,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var iframe_exports = {};
|
|
20
20
|
__export(iframe_exports, {
|
|
21
|
-
default: () => iframe_default
|
|
21
|
+
default: () => iframe_default,
|
|
22
|
+
filename: () => filename
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(iframe_exports);
|
|
25
|
+
const filename = "./iframe.html";
|
|
24
26
|
var iframe_default = "./iframe.html";
|
|
@@ -22,11 +22,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
var import_runtime = require("regenerator-runtime/runtime");
|
|
25
|
+
var import_node_crypto = require("node:crypto");
|
|
25
26
|
var import_jest_globals = require("@testing-library/jest-dom/jest-globals");
|
|
27
|
+
var import_jest_axe = __toESM(require("jest-axe"));
|
|
26
28
|
var import_resize_observer_polyfill = __toESM(require("resize-observer-polyfill"));
|
|
27
|
-
var import_axe_core = require("./extended/axe-core");
|
|
28
29
|
var import_matchMedia = require("./mocks/matchMedia.js");
|
|
29
30
|
var import_pui_diagnostics = require("./mocks/pui-diagnostics.js");
|
|
31
|
+
Object.defineProperty(globalThis, "crypto", {
|
|
32
|
+
value: import_node_crypto.webcrypto
|
|
33
|
+
});
|
|
30
34
|
const originalError = console.error;
|
|
31
35
|
console.error = (...args) => {
|
|
32
36
|
const ignoreList = [
|
|
@@ -46,7 +50,7 @@ console.error = (...args) => {
|
|
|
46
50
|
return false;
|
|
47
51
|
return originalError(...args);
|
|
48
52
|
};
|
|
49
|
-
if (expect) expect.extend(
|
|
53
|
+
if (expect) expect.extend(import_jest_axe.default.toHaveNoViolations);
|
|
50
54
|
const addElementToBody = (element) => {
|
|
51
55
|
const documentEle = (window || {}).document;
|
|
52
56
|
if (!documentEle) return null;
|
|
@@ -90,3 +94,6 @@ global.it = (name, fn, timeout = void 0) => {
|
|
|
90
94
|
};
|
|
91
95
|
global.it.skip = originalTest.skip;
|
|
92
96
|
global.it.only = originalTest.only;
|
|
97
|
+
if (!global.performance.getEntriesByType) {
|
|
98
|
+
global.performance.getEntriesByType = jest.fn(() => []);
|
|
99
|
+
}
|
|
@@ -35,7 +35,6 @@ var import_config = require("vitest/config");
|
|
|
35
35
|
var import_plugin_react = __toESM(require("@vitejs/plugin-react"));
|
|
36
36
|
var import_vite_tsconfig_paths = __toESM(require("vite-tsconfig-paths"));
|
|
37
37
|
const vitestConfig = (0, import_config.defineConfig)({
|
|
38
|
-
// @ts-expect-error - `react` and `tsconfigPaths` are not part of the default config
|
|
39
38
|
plugins: [(0, import_plugin_react.default)(), (0, import_vite_tsconfig_paths.default)()],
|
|
40
39
|
test: {
|
|
41
40
|
globals: true,
|
|
@@ -39,6 +39,8 @@ const defaultOptions = {
|
|
|
39
39
|
class CspPlugin {
|
|
40
40
|
#options = defaultOptions;
|
|
41
41
|
/**
|
|
42
|
+
*
|
|
43
|
+
* @param htmlWebpackPlugin
|
|
42
44
|
* @param {object} options Additional options for this module.
|
|
43
45
|
*/
|
|
44
46
|
constructor(options) {
|
|
@@ -46,7 +48,7 @@ class CspPlugin {
|
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
50
|
* Processes HtmlWebpackPlugin's html data by adding the CSP
|
|
49
|
-
* @param
|
|
51
|
+
* @param compilation
|
|
50
52
|
* @param htmlPluginData
|
|
51
53
|
* @param htmlPluginData.html
|
|
52
54
|
* @param compileCb
|
|
@@ -41,6 +41,7 @@ var import_moment_locales_webpack_plugin = __toESM(require("moment-locales-webpa
|
|
|
41
41
|
var import_webpack_manifest_plugin = require("webpack-manifest-plugin");
|
|
42
42
|
var import_favicons_webpack_plugin = __toESM(require("favicons-webpack-plugin"));
|
|
43
43
|
var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"));
|
|
44
|
+
var import_dotenv_webpack = __toESM(require("dotenv-webpack"));
|
|
44
45
|
var import_helpers = require("./helpers.js");
|
|
45
46
|
const minicssLoader = {
|
|
46
47
|
loader: import_mini_css_extract_plugin.default.loader,
|
|
@@ -54,6 +55,7 @@ const plugins = [
|
|
|
54
55
|
NODE_ENV: "development",
|
|
55
56
|
CI: "false"
|
|
56
57
|
}),
|
|
58
|
+
new import_dotenv_webpack.default(),
|
|
57
59
|
new import_webpack.default.ProvidePlugin({
|
|
58
60
|
React: "react"
|
|
59
61
|
}),
|
|
@@ -76,6 +78,7 @@ const plugins = [
|
|
|
76
78
|
from: "node_modules/@elliemae/pui-user-monitoring/dist/public/js",
|
|
77
79
|
to: "./latest/js",
|
|
78
80
|
toType: "dir",
|
|
81
|
+
noErrorOnMissing: true,
|
|
79
82
|
info: { minimized: true }
|
|
80
83
|
},
|
|
81
84
|
// {
|
|
@@ -252,11 +255,11 @@ const baseConfig = (options) => ({
|
|
|
252
255
|
type: "asset"
|
|
253
256
|
},
|
|
254
257
|
{
|
|
255
|
-
test: /
|
|
258
|
+
test: /i?frame.html$/i,
|
|
256
259
|
resourceQuery: /resource/,
|
|
257
260
|
type: "asset/resource",
|
|
258
261
|
generator: {
|
|
259
|
-
filename: "latest/[name].[
|
|
262
|
+
filename: "latest/[name].[ext]"
|
|
260
263
|
},
|
|
261
264
|
exclude: (0, import_helpers.excludeNodeModulesExcept)(import_helpers.modulesToTranspile)
|
|
262
265
|
},
|
|
@@ -40,6 +40,7 @@ var import_postcss_preset_env = __toESM(require("postcss-preset-env"));
|
|
|
40
40
|
var import_moment_locales_webpack_plugin = __toESM(require("moment-locales-webpack-plugin"));
|
|
41
41
|
var import_resolve_typescript_plugin = __toESM(require("resolve-typescript-plugin"));
|
|
42
42
|
var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"));
|
|
43
|
+
var import_dotenv_webpack = __toESM(require("dotenv-webpack"));
|
|
43
44
|
var import_helpers = require("./helpers.js");
|
|
44
45
|
var import_utils = require("../utils.js");
|
|
45
46
|
const minicssLoader = {
|
|
@@ -63,6 +64,7 @@ const plugins = [
|
|
|
63
64
|
ASSET_PATH: "/",
|
|
64
65
|
CI: "false"
|
|
65
66
|
}),
|
|
67
|
+
new import_dotenv_webpack.default(),
|
|
66
68
|
new import_webpack.default.DefinePlugin({
|
|
67
69
|
APP_CONFIG: (0, import_utils.getAppConfig)()
|
|
68
70
|
}),
|
|
@@ -176,7 +178,7 @@ const baseConfig = (options) => ({
|
|
|
176
178
|
type: "asset"
|
|
177
179
|
},
|
|
178
180
|
// {
|
|
179
|
-
// test: /(?<!\/
|
|
181
|
+
// test: /(?<!\/i?frame)\.html$/,
|
|
180
182
|
// exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
181
183
|
// use: 'html-loader',
|
|
182
184
|
// },
|
|
@@ -128,7 +128,7 @@ const typedTestCmd = {
|
|
|
128
128
|
},
|
|
129
129
|
command: "test [options]",
|
|
130
130
|
describe: "unit tests application code",
|
|
131
|
-
builder: (yargsRef) => yargsRef.options(cmdArgs).help()
|
|
131
|
+
builder: ((yargsRef) => yargsRef.options(cmdArgs).help())
|
|
132
132
|
// the way yargs types are defined this fails if we don't cast it explicitly
|
|
133
133
|
// this cast is safe, we are not overriding the builder
|
|
134
134
|
// just telling typescript that our implementation is compatible with the yargs type system
|
|
@@ -204,9 +204,9 @@ const reactConfig = {
|
|
|
204
204
|
...reactHookPlugin.configs.recommended.rules
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
-
const
|
|
207
|
+
const gitignoreExists = existsSync(gitignorePath);
|
|
208
208
|
const tseslintConfigArgs = [ignores];
|
|
209
|
-
if (
|
|
209
|
+
if (gitignoreExists) {
|
|
210
210
|
tseslintConfigArgs.push(includeIgnoreFile(gitignorePath));
|
|
211
211
|
}
|
|
212
212
|
tseslintConfigArgs.push(
|
|
@@ -2,9 +2,11 @@ var release_config_default = {
|
|
|
2
2
|
branches: [
|
|
3
3
|
"+([0-9])?(.{+([0-9]),x}).x",
|
|
4
4
|
"master",
|
|
5
|
+
"main",
|
|
5
6
|
"next-major",
|
|
6
7
|
{ name: "beta", prerelease: true },
|
|
7
8
|
{ name: "alpha", prerelease: true },
|
|
9
|
+
{ name: "rc", prerelease: true },
|
|
8
10
|
{ name: "hotfix", prerelease: true },
|
|
9
11
|
{ name: "next", prerelease: true }
|
|
10
12
|
],
|
package/dist/esm/server/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { port, wsPort, host } from "./utils.js";
|
|
|
11
11
|
import { isHttps } from "../utils.js";
|
|
12
12
|
import { loadRoutes } from "./appRoutes.js";
|
|
13
13
|
import { createWSServer } from "./wsServer.js";
|
|
14
|
-
void async function startServer() {
|
|
14
|
+
void (async function startServer() {
|
|
15
15
|
const app = express();
|
|
16
16
|
setupDefaultMiddlewares(app);
|
|
17
17
|
await loadRoutes(app);
|
|
@@ -27,4 +27,4 @@ void async function startServer() {
|
|
|
27
27
|
port: wsPort
|
|
28
28
|
});
|
|
29
29
|
app.locals.wsServer = wsServer;
|
|
30
|
-
}();
|
|
30
|
+
})();
|
|
@@ -63,6 +63,7 @@ const jestConfig = {
|
|
|
63
63
|
getMockFilePath('image.js'),
|
|
64
64
|
'.*\\.svg(?:\\?[a-zA-Z]+)?$': getMockFilePath('svg.js'),
|
|
65
65
|
'.*iframe\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('iframe.js'),
|
|
66
|
+
'.*frame\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('frame.js'),
|
|
66
67
|
'.*\\.html(?:\\?[a-zA-Z]+)?$': getMockFilePath('html.js'),
|
|
67
68
|
'@elliemae/pui-user-monitoring': getMockFilePath('pui-user-monitoring.js'),
|
|
68
69
|
'@elliemae/pui-app-loader': getMockFilePath('pui-app-loader.js'),
|
|
@@ -95,7 +96,7 @@ const jestConfig = {
|
|
|
95
96
|
resources: 'usable',
|
|
96
97
|
customExportConditions: [''],
|
|
97
98
|
},
|
|
98
|
-
testEnvironment:
|
|
99
|
+
testEnvironment: 'jsdom',
|
|
99
100
|
watchPlugins: [
|
|
100
101
|
'jest-watch-typeahead/filename',
|
|
101
102
|
'jest-watch-typeahead/testname',
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import "regenerator-runtime/runtime";
|
|
2
|
+
import { webcrypto } from "node:crypto";
|
|
2
3
|
import "@testing-library/jest-dom/jest-globals";
|
|
4
|
+
import jestAxe from "jest-axe";
|
|
3
5
|
import ResizeObserver from "resize-observer-polyfill";
|
|
4
|
-
import { toHaveNoViolations } from "./extended/axe-core";
|
|
5
6
|
import { addMatchMedia } from "./mocks/matchMedia.js";
|
|
6
7
|
import { logger } from "./mocks/pui-diagnostics.js";
|
|
8
|
+
Object.defineProperty(globalThis, "crypto", {
|
|
9
|
+
value: webcrypto
|
|
10
|
+
});
|
|
7
11
|
const originalError = console.error;
|
|
8
12
|
console.error = (...args) => {
|
|
9
13
|
const ignoreList = [
|
|
@@ -23,7 +27,7 @@ console.error = (...args) => {
|
|
|
23
27
|
return false;
|
|
24
28
|
return originalError(...args);
|
|
25
29
|
};
|
|
26
|
-
if (expect) expect.extend(toHaveNoViolations);
|
|
30
|
+
if (expect) expect.extend(jestAxe.toHaveNoViolations);
|
|
27
31
|
const addElementToBody = (element) => {
|
|
28
32
|
const documentEle = (window || {}).document;
|
|
29
33
|
if (!documentEle) return null;
|
|
@@ -67,3 +71,6 @@ global.it = (name, fn, timeout = void 0) => {
|
|
|
67
71
|
};
|
|
68
72
|
global.it.skip = originalTest.skip;
|
|
69
73
|
global.it.only = originalTest.only;
|
|
74
|
+
if (!global.performance.getEntriesByType) {
|
|
75
|
+
global.performance.getEntriesByType = jest.fn(() => []);
|
|
76
|
+
}
|
|
@@ -2,7 +2,6 @@ import { defineConfig, configDefaults } from "vitest/config";
|
|
|
2
2
|
import react from "@vitejs/plugin-react";
|
|
3
3
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
4
4
|
const vitestConfig = defineConfig({
|
|
5
|
-
// @ts-expect-error - `react` and `tsconfigPaths` are not part of the default config
|
|
6
5
|
plugins: [react(), tsconfigPaths()],
|
|
7
6
|
test: {
|
|
8
7
|
globals: true,
|
|
@@ -6,6 +6,8 @@ const defaultOptions = {
|
|
|
6
6
|
class CspPlugin {
|
|
7
7
|
#options = defaultOptions;
|
|
8
8
|
/**
|
|
9
|
+
*
|
|
10
|
+
* @param htmlWebpackPlugin
|
|
9
11
|
* @param {object} options Additional options for this module.
|
|
10
12
|
*/
|
|
11
13
|
constructor(options) {
|
|
@@ -13,7 +15,7 @@ class CspPlugin {
|
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Processes HtmlWebpackPlugin's html data by adding the CSP
|
|
16
|
-
* @param
|
|
18
|
+
* @param compilation
|
|
17
19
|
* @param htmlPluginData
|
|
18
20
|
* @param htmlPluginData.html
|
|
19
21
|
* @param compileCb
|
|
@@ -8,6 +8,7 @@ import MomentLocalesPlugin from "moment-locales-webpack-plugin";
|
|
|
8
8
|
import { WebpackManifestPlugin } from "webpack-manifest-plugin";
|
|
9
9
|
import FaviconsWebpackPlugin from "favicons-webpack-plugin";
|
|
10
10
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
11
|
+
import DotEnvWebpack from "dotenv-webpack";
|
|
11
12
|
import {
|
|
12
13
|
excludeNodeModulesExcept,
|
|
13
14
|
modulesToTranspile,
|
|
@@ -27,6 +28,7 @@ const plugins = [
|
|
|
27
28
|
NODE_ENV: "development",
|
|
28
29
|
CI: "false"
|
|
29
30
|
}),
|
|
31
|
+
new DotEnvWebpack(),
|
|
30
32
|
new webpack.ProvidePlugin({
|
|
31
33
|
React: "react"
|
|
32
34
|
}),
|
|
@@ -49,6 +51,7 @@ const plugins = [
|
|
|
49
51
|
from: "node_modules/@elliemae/pui-user-monitoring/dist/public/js",
|
|
50
52
|
to: "./latest/js",
|
|
51
53
|
toType: "dir",
|
|
54
|
+
noErrorOnMissing: true,
|
|
52
55
|
info: { minimized: true }
|
|
53
56
|
},
|
|
54
57
|
// {
|
|
@@ -225,11 +228,11 @@ const baseConfig = (options) => ({
|
|
|
225
228
|
type: "asset"
|
|
226
229
|
},
|
|
227
230
|
{
|
|
228
|
-
test: /
|
|
231
|
+
test: /i?frame.html$/i,
|
|
229
232
|
resourceQuery: /resource/,
|
|
230
233
|
type: "asset/resource",
|
|
231
234
|
generator: {
|
|
232
|
-
filename: "latest/[name].[
|
|
235
|
+
filename: "latest/[name].[ext]"
|
|
233
236
|
},
|
|
234
237
|
exclude: excludeNodeModulesExcept(modulesToTranspile)
|
|
235
238
|
},
|
|
@@ -7,6 +7,7 @@ import PostcssPresetEnv from "postcss-preset-env";
|
|
|
7
7
|
import MomentLocalesPlugin from "moment-locales-webpack-plugin";
|
|
8
8
|
import ResolveTypeScriptPlugin from "resolve-typescript-plugin";
|
|
9
9
|
import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
10
|
+
import DotEnvWebpack from "dotenv-webpack";
|
|
10
11
|
import {
|
|
11
12
|
excludeNodeModulesExcept,
|
|
12
13
|
getLibraryVariableName,
|
|
@@ -36,6 +37,7 @@ const plugins = [
|
|
|
36
37
|
ASSET_PATH: "/",
|
|
37
38
|
CI: "false"
|
|
38
39
|
}),
|
|
40
|
+
new DotEnvWebpack(),
|
|
39
41
|
new webpack.DefinePlugin({
|
|
40
42
|
APP_CONFIG: getAppConfig()
|
|
41
43
|
}),
|
|
@@ -149,7 +151,7 @@ const baseConfig = (options) => ({
|
|
|
149
151
|
type: "asset"
|
|
150
152
|
},
|
|
151
153
|
// {
|
|
152
|
-
// test: /(?<!\/
|
|
154
|
+
// test: /(?<!\/i?frame)\.html$/,
|
|
153
155
|
// exclude: excludeNodeModulesExcept(['@elliemae/*']),
|
|
154
156
|
// use: 'html-loader',
|
|
155
157
|
// },
|
package/dist/types/lib/cli.d.ts
CHANGED
|
@@ -37,4 +37,3 @@ export declare const isTypeScriptEnabled: () => boolean;
|
|
|
37
37
|
* @see {@link https://stackblitz.com/edit/node-gqcdb4?file=package.json stackblitz test}
|
|
38
38
|
*/
|
|
39
39
|
export declare const getUnspecifiedOptions: (options: Record<string, Record<string, unknown>>, command: string) => Record<string, string | boolean>;
|
|
40
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -10,4 +10,3 @@ export { jestConfig } from './testing/jest.config.cjs';
|
|
|
10
10
|
export { jestNodeConfig } from './testing/jest.node.config.cjs';
|
|
11
11
|
export { loadRoutes } from './server/appRoutes.js';
|
|
12
12
|
export { webpackFinal } from './webpack/webpack.storybook.js';
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export type { TSESLint } from "@typescript-eslint/utils";
|
|
2
|
-
declare const config: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
|
+
declare const config: import("@typescript-eslint/utils/dist/ts-eslint").FlatConfig.ConfigArray;
|
|
3
3
|
export { config };
|
|
4
|
-
//# sourceMappingURL=eslint.config.d.ts.map
|