@elliemae/pui-cli 9.0.0-next.2 → 9.0.0-next.20
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/dist/cjs/commands/lint.js +26 -7
- package/dist/cjs/commands/start.js +1 -1
- package/dist/cjs/commands/storybook.js +2 -2
- package/dist/cjs/commands/test.js +2 -2
- package/dist/cjs/commands/utils.js +3 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/lint-config/eslint/common.cjs +3 -2
- package/dist/cjs/lint-config/eslint/typescript/common.cjs +3 -3
- package/dist/cjs/lint-config/stylelint.config.cjs +14 -13
- package/dist/cjs/monorepo/delete-merged-tags.js +1 -1
- package/dist/cjs/monorepo/set-registry-version.js +1 -1
- package/dist/cjs/monorepo/set-workspace-version.js +1 -1
- package/dist/cjs/pui-config.js +2 -2
- package/dist/cjs/server/csp.js +1 -1
- package/dist/cjs/server/utils.js +2 -2
- package/dist/cjs/testing/ExtendedJSDomEnv.cjs +38 -0
- package/dist/cjs/testing/extended/axe-core/getMessageAndPass.js +37 -0
- package/dist/cjs/testing/extended/axe-core/index.js +24 -0
- package/dist/cjs/testing/extended/axe-core/reporter.js +51 -0
- package/dist/cjs/testing/extended/axe-core/shouldIgnoreNodeViolation.js +31 -0
- package/dist/cjs/testing/extended/axe-core/toHaveNoViolations.js +43 -0
- package/dist/cjs/testing/jest.config.cjs +3 -1
- package/dist/cjs/testing/setup-test-env.js +1 -1
- package/dist/cjs/testing/setup-tests.js +25 -4
- package/dist/cjs/transpile/esbuild.js +4 -2
- package/dist/cjs/update-notifier.js +1 -1
- package/dist/cjs/utils.js +1 -1
- package/dist/cjs/webpack/helpers.js +18 -6
- package/dist/cjs/webpack/webpack.base.babel.js +27 -5
- package/dist/cjs/webpack/webpack.dev.babel.js +4 -3
- package/dist/cjs/webpack/webpack.lib.base.babel.js +13 -5
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +5 -11
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +4 -5
- package/dist/cjs/webpack/webpack.prod.babel.js +3 -2
- package/dist/cjs/webpack/webpack.storybook.js +10 -11
- package/dist/esm/commands/lint.js +27 -7
- package/dist/esm/commands/start.js +1 -1
- package/dist/esm/commands/storybook.js +2 -2
- package/dist/esm/commands/test.js +2 -2
- package/dist/esm/commands/utils.js +3 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/lint-config/eslint/common.cjs +3 -2
- package/dist/esm/lint-config/eslint/typescript/common.cjs +3 -3
- package/dist/esm/lint-config/stylelint.config.cjs +14 -13
- package/dist/esm/monorepo/delete-merged-tags.js +1 -1
- package/dist/esm/monorepo/set-registry-version.js +1 -1
- package/dist/esm/monorepo/set-workspace-version.js +1 -1
- package/dist/esm/server/csp.js +1 -1
- package/dist/esm/server/utils.js +2 -2
- package/dist/esm/testing/ExtendedJSDomEnv.cjs +38 -0
- package/dist/esm/testing/extended/axe-core/getMessageAndPass.js +17 -0
- package/dist/esm/testing/extended/axe-core/index.js +4 -0
- package/dist/esm/testing/extended/axe-core/reporter.js +31 -0
- package/dist/esm/testing/extended/axe-core/shouldIgnoreNodeViolation.js +11 -0
- package/dist/esm/testing/extended/axe-core/toHaveNoViolations.js +23 -0
- package/dist/esm/testing/jest.config.cjs +3 -1
- package/dist/esm/testing/setup-test-env.js +1 -1
- package/dist/esm/testing/setup-tests.js +25 -4
- package/dist/esm/transpile/esbuild.js +4 -2
- package/dist/esm/update-notifier.js +1 -1
- package/dist/esm/utils.js +1 -1
- package/dist/esm/webpack/helpers.js +18 -6
- package/dist/esm/webpack/webpack.base.babel.js +27 -5
- package/dist/esm/webpack/webpack.dev.babel.js +4 -3
- package/dist/esm/webpack/webpack.lib.base.babel.js +13 -5
- package/dist/esm/webpack/webpack.lib.dev.babel.js +6 -12
- package/dist/esm/webpack/webpack.lib.prod.babel.js +9 -6
- package/dist/esm/webpack/webpack.prod.babel.js +3 -2
- package/dist/esm/webpack/webpack.storybook.js +11 -12
- package/dist/types/babel.config.d.cts +7 -7
- package/dist/types/commands/build.d.ts +2 -2
- package/dist/types/commands/codemod.d.ts +2 -2
- package/dist/types/commands/lint.d.ts +3 -2
- package/dist/types/commands/pack.d.ts +2 -2
- package/dist/types/commands/start.d.ts +2 -2
- package/dist/types/commands/storybook.d.ts +2 -2
- package/dist/types/commands/test.d.ts +2 -2
- package/dist/types/commands/tscheck.d.ts +2 -2
- package/dist/types/commands/utils.d.ts +2 -1
- package/dist/types/commands/version.d.ts +2 -2
- package/dist/types/commands/vitest.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lint-config/commitlint.config.d.cts +1 -1
- package/dist/types/lint-config/eslint/common.d.cts +18 -12
- package/dist/types/lint-config/eslint/non-react.d.cts +8 -1
- package/dist/types/lint-config/eslint/react.d.cts +8 -1
- package/dist/types/lint-config/eslint/typescript/common.d.cts +6 -6
- package/dist/types/lint-config/eslint/typescript/non-react.d.cts +9 -2
- package/dist/types/lint-config/eslint/typescript/react.d.cts +9 -2
- package/dist/types/lint-config/lint-staged.config.d.ts +3 -3
- package/dist/types/lint-config/prettier.config.d.cts +6 -6
- package/dist/types/lint-config/stylelint.config.d.cts +6 -6
- package/dist/types/release.config.d.cts +2 -2
- package/dist/types/server/csp.d.ts +2 -2
- package/dist/types/testing/ExtendedJSDomEnv.d.cts +5 -0
- package/dist/types/testing/extended/axe-core/getMessageAndPass.d.ts +8 -0
- package/dist/types/testing/extended/axe-core/index.d.ts +1 -0
- package/dist/types/testing/extended/axe-core/reporter.d.ts +2 -0
- package/dist/types/testing/extended/axe-core/shouldIgnoreNodeViolation.d.ts +2 -0
- package/dist/types/testing/extended/axe-core/toHaveNoViolations.d.ts +12 -0
- package/dist/types/testing/jest.config.d.cts +24 -22
- package/dist/types/testing/jest.node.config.d.cts +2 -0
- package/dist/types/testing/mocks/axios.d.ts +7 -7
- package/dist/types/testing/mocks/pui-diagnostics.d.ts +13 -13
- package/dist/types/testing/vitest.config.d.ts +1 -1
- package/dist/types/tests/basic.test.d.ts +0 -0
- package/dist/types/transpile/esbuild.d.ts +3 -3
- package/dist/types/typedoc.d.cts +3 -3
- package/dist/types/webpack/helpers.d.ts +4 -1
- package/dist/types/webpack/webpack.storybook.d.ts +0 -1
- package/package.json +149 -138
|
@@ -32,10 +32,19 @@ __export(lint_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(lint_exports);
|
|
34
34
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
35
|
+
var import_node_util = require("node:util");
|
|
35
36
|
var import_yargs = __toESM(require("yargs"), 1);
|
|
36
37
|
var import_utils = require("./utils.js");
|
|
37
|
-
const lintCSS = async (
|
|
38
|
-
const fixIssues = fix ? "--fix" : "";
|
|
38
|
+
const lintCSS = async (args) => {
|
|
39
|
+
const fixIssues = args.fix ? "--fix" : "";
|
|
40
|
+
if (args.debug) {
|
|
41
|
+
const configPath = import_node_path.default.join(process.cwd(), "stylelint.config.cjs");
|
|
42
|
+
const config = await import(configPath);
|
|
43
|
+
(0, import_utils.logInfo)("stylelint version:");
|
|
44
|
+
await (0, import_utils.exec)(`stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} --version`);
|
|
45
|
+
(0, import_utils.logInfo)("stylelint config:");
|
|
46
|
+
(0, import_utils.logInfo)((0, import_node_util.inspect)(config, { depth: null }));
|
|
47
|
+
}
|
|
39
48
|
await (0, import_utils.exec)(
|
|
40
49
|
`stylelint ./{lib,app}/**/*.{js,jsx,ts,tsx} ${fixIssues} ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} --allow-empty-input --config ${import_node_path.default.join(
|
|
41
50
|
process.cwd(),
|
|
@@ -43,10 +52,11 @@ const lintCSS = async (fix = false) => {
|
|
|
43
52
|
)}`
|
|
44
53
|
);
|
|
45
54
|
};
|
|
46
|
-
const lintJS = async (
|
|
47
|
-
const fixIssues = fix ? "--fix" : "";
|
|
55
|
+
const lintJS = async (args) => {
|
|
56
|
+
const fixIssues = args.fix ? "--fix" : "";
|
|
57
|
+
const debugFlags = args.debug ? "--env-info --debug" : "";
|
|
48
58
|
await (0, import_utils.exec)(
|
|
49
|
-
`eslint ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} ${fixIssues}
|
|
59
|
+
`eslint ${!(0, import_utils.getCIEnv)() ? "--color" : "--no-color"} ${fixIssues} ${debugFlags} .`
|
|
50
60
|
);
|
|
51
61
|
};
|
|
52
62
|
const cmdArgs = {
|
|
@@ -64,6 +74,11 @@ const cmdArgs = {
|
|
|
64
74
|
boolean: true,
|
|
65
75
|
alias: "fix",
|
|
66
76
|
default: false
|
|
77
|
+
},
|
|
78
|
+
debug: {
|
|
79
|
+
boolean: true,
|
|
80
|
+
alias: "debug",
|
|
81
|
+
default: false
|
|
67
82
|
}
|
|
68
83
|
};
|
|
69
84
|
const lintCmd = {
|
|
@@ -73,10 +88,12 @@ const lintCmd = {
|
|
|
73
88
|
await (0, import_utils.exec)("tsc --noEmit --emitDeclarationOnly false");
|
|
74
89
|
try {
|
|
75
90
|
await (0, import_utils.exec)("rimraf ./reports/eslint.json");
|
|
76
|
-
await lintJS(argv
|
|
91
|
+
await lintJS({ ...argv });
|
|
77
92
|
(0, import_utils.logSuccess)("JS linting completed");
|
|
78
93
|
} catch (err) {
|
|
79
94
|
(0, import_utils.logError)("JS linting failed");
|
|
95
|
+
if (argv.debug)
|
|
96
|
+
(0, import_utils.logError)(err);
|
|
80
97
|
(0, import_yargs.default)().exit(-1, err);
|
|
81
98
|
return;
|
|
82
99
|
}
|
|
@@ -84,10 +101,12 @@ const lintCmd = {
|
|
|
84
101
|
if (argv.css) {
|
|
85
102
|
try {
|
|
86
103
|
await (0, import_utils.exec)("rimraf ./reports/stylelint.json");
|
|
87
|
-
await lintCSS(argv
|
|
104
|
+
await lintCSS({ ...argv });
|
|
88
105
|
(0, import_utils.logSuccess)("CSS linting completed");
|
|
89
106
|
} catch (err) {
|
|
90
107
|
(0, import_utils.logError)("CSS linting failed");
|
|
108
|
+
if (argv.debug)
|
|
109
|
+
(0, import_utils.logError)(err);
|
|
91
110
|
(0, import_yargs.default)().exit(-1, err);
|
|
92
111
|
}
|
|
93
112
|
}
|
|
@@ -39,7 +39,7 @@ const import_meta = {};
|
|
|
39
39
|
const __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
40
40
|
const startProdServer = async () => {
|
|
41
41
|
await (0, import_utils.exec)(
|
|
42
|
-
`cross-env NODE_ENV=production
|
|
42
|
+
`cross-env NODE_ENV=production tsx ${import_node_path.default.resolve(
|
|
43
43
|
__dirname,
|
|
44
44
|
"../server/index.js"
|
|
45
45
|
)} --color always`
|
|
@@ -36,12 +36,12 @@ var import_utils = require("./utils.js");
|
|
|
36
36
|
const buildStoryBook = async (outputDir = "demo", isDoc = false) => {
|
|
37
37
|
const additionalParams = isDoc ? `--docs -o ${outputDir}/docs` : `-o ${outputDir}`;
|
|
38
38
|
await (0, import_utils.exec)(
|
|
39
|
-
`cross-env NODE_ENV=production
|
|
39
|
+
`cross-env NODE_ENV=production storybook build --quiet ${additionalParams}`
|
|
40
40
|
);
|
|
41
41
|
};
|
|
42
42
|
const startStoryBook = async (isDoc = false) => {
|
|
43
43
|
await (0, import_utils.exec)(
|
|
44
|
-
`cross-env
|
|
44
|
+
`cross-env STORYBOOK_BUILD=true storybook dev ${isDoc ? "--docs" : ""} -p 11000 --quiet`
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
47
|
const cmdArgs = {
|
|
@@ -78,9 +78,9 @@ const testCmd = {
|
|
|
78
78
|
handler: async (argv) => {
|
|
79
79
|
let commandOptions = "--coverage --maxWorkers=50%";
|
|
80
80
|
if (argv.fix)
|
|
81
|
-
commandOptions
|
|
81
|
+
commandOptions += " -u";
|
|
82
82
|
else if (argv.watch)
|
|
83
|
-
commandOptions
|
|
83
|
+
commandOptions += " --watchAll";
|
|
84
84
|
if ((0, import_utils.getCIEnv)())
|
|
85
85
|
commandOptions += " --ci --no-colors";
|
|
86
86
|
if (argv.passWithNoTests)
|
|
@@ -37,6 +37,7 @@ __export(utils_exports, {
|
|
|
37
37
|
logError: () => logError,
|
|
38
38
|
logInfo: () => logInfo,
|
|
39
39
|
logSuccess: () => logSuccess,
|
|
40
|
+
logWarning: () => logWarning,
|
|
40
41
|
writeAppInfo: () => writeAppInfo
|
|
41
42
|
});
|
|
42
43
|
module.exports = __toCommonJS(utils_exports);
|
|
@@ -61,6 +62,7 @@ const browsersMapping = {
|
|
|
61
62
|
};
|
|
62
63
|
const exec = async (command, options = { stdio: "inherit" }) => (0, import_execa.execaCommand)(command, options);
|
|
63
64
|
const logInfo = console.log;
|
|
65
|
+
const logWarning = (...args) => console.log(import_chalk.default.yellow(...args));
|
|
64
66
|
const logSuccess = (...args) => console.log(import_chalk.default.green(...args));
|
|
65
67
|
const logError = console.error;
|
|
66
68
|
const readPackageLock = async () => {
|
|
@@ -82,7 +84,7 @@ const getSupportedBrowsers = async () => {
|
|
|
82
84
|
return browserVersions.reduce((acc, nameVersion) => {
|
|
83
85
|
const [name, version] = nameVersion.split(" ");
|
|
84
86
|
const versionRange = version.split("-");
|
|
85
|
-
acc[browsersMapping[name]] = versionRange
|
|
87
|
+
acc[browsersMapping[name]] = versionRange?.[0] ?? version;
|
|
86
88
|
return acc;
|
|
87
89
|
}, {});
|
|
88
90
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,7 +28,8 @@ __export(lib_exports, {
|
|
|
28
28
|
loadRoutes: () => import_appRoutes.loadRoutes,
|
|
29
29
|
prettierConfig: () => import_prettier_config.prettierConfig,
|
|
30
30
|
stylelintConfig: () => import_stylelint_config.stylelintConfig,
|
|
31
|
-
vitestConfig: () => import_vitest_config.vitestConfig
|
|
31
|
+
vitestConfig: () => import_vitest_config.vitestConfig,
|
|
32
|
+
webpackFinal: () => import_webpack_storybook.webpackFinal
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(lib_exports);
|
|
34
35
|
var import_babel_config = require("./babel.config.cjs");
|
|
@@ -42,3 +43,4 @@ var import_vitest_config = require("./testing/vitest.config.js");
|
|
|
42
43
|
var import_jest_node_config = require("./testing/jest.node.config.cjs");
|
|
43
44
|
var import_lint_staged_config = require("./lint-config/lint-staged.config.js");
|
|
44
45
|
var import_appRoutes = require("./server/appRoutes.js");
|
|
46
|
+
var import_webpack_storybook = require("./webpack/webpack.storybook.js");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable max-lines */
|
|
2
|
-
const
|
|
2
|
+
const { prettierConfig } = require("../prettier.config.cjs");
|
|
3
3
|
// const webpackConfig = require('../../webpack/webpack.prod.babel');
|
|
4
4
|
|
|
5
5
|
exports.baseExtends = [
|
|
@@ -26,7 +26,7 @@ exports.baseOverrides = [
|
|
|
26
26
|
];
|
|
27
27
|
|
|
28
28
|
const baseRules = {
|
|
29
|
-
"prettier/prettier": ["error",
|
|
29
|
+
"prettier/prettier": ["error", prettierConfig],
|
|
30
30
|
"arrow-body-style": [2, "as-needed"],
|
|
31
31
|
"class-methods-use-this": 0,
|
|
32
32
|
"import/imports-first": 0,
|
|
@@ -152,6 +152,7 @@ exports.baseConfig = {
|
|
|
152
152
|
},
|
|
153
153
|
ignorePatterns: [
|
|
154
154
|
"/build/**/*",
|
|
155
|
+
"/node_modules/**/*",
|
|
155
156
|
"/dist/**/*",
|
|
156
157
|
"/reports/**/*",
|
|
157
158
|
"/coverage/**/*",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const { baseExtends, basePlugins } = require('../common.cjs');
|
|
2
2
|
|
|
3
3
|
exports.tsBaseExtends = [
|
|
4
|
-
'plugin:@typescript-eslint/recommended',
|
|
5
4
|
'plugin:import/typescript',
|
|
6
|
-
'plugin:@typescript-eslint/recommended-
|
|
5
|
+
'plugin:@typescript-eslint/recommended-type-checked',
|
|
6
|
+
'plugin:@typescript-eslint/stylistic-type-checked',
|
|
7
7
|
].concat(baseExtends);
|
|
8
8
|
|
|
9
9
|
exports.tsBaseRules = {
|
|
@@ -34,7 +34,7 @@ exports.tsBaseConfig = {
|
|
|
34
34
|
plugins: ['@typescript-eslint'].concat(basePlugins),
|
|
35
35
|
parserOptions: {
|
|
36
36
|
tsconfigRootDir: process.cwd(),
|
|
37
|
-
project:
|
|
37
|
+
project: true,
|
|
38
38
|
},
|
|
39
39
|
settings: {
|
|
40
40
|
'import/resolver': {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
exports.stylelintConfig = {
|
|
2
2
|
ignoreFiles: [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
"/dist/**/*",
|
|
4
|
+
"/coverage/**/*",
|
|
5
|
+
"/build/**/*",
|
|
6
|
+
"/reports/**/*",
|
|
7
|
+
"/temp/**/*",
|
|
8
|
+
"/docs/**/*",
|
|
9
|
+
"/demo/**/*",
|
|
10
|
+
"/node_modules/**/*",
|
|
11
|
+
"/vendor/**/*",
|
|
12
12
|
],
|
|
13
|
-
customSyntax:
|
|
13
|
+
customSyntax: "@stylelint/postcss-css-in-js",
|
|
14
|
+
// customSyntax: "postcss-styled-components", // '@stylelint/postcss-css-in-js' is deprecated, this may be a replacement?
|
|
14
15
|
extends: [
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
"stylelint-config-recommended",
|
|
17
|
+
"stylelint-config-styled-components",
|
|
17
18
|
],
|
|
18
|
-
rules: {
|
|
19
|
+
rules: { "selector-type-no-unknown": null, "function-no-unknown": null },
|
|
19
20
|
};
|
|
@@ -26,7 +26,7 @@ const cwd = process.cwd();
|
|
|
26
26
|
const execaOptions = { cwd, stdio: "inherit" };
|
|
27
27
|
const semVerRegEx = /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
28
28
|
const isSemVersion = (tagName) => semVerRegEx.test(tagName);
|
|
29
|
-
const branchName = (process.env.BRANCH_NAME
|
|
29
|
+
const branchName = (process.env.BRANCH_NAME ?? "master").toLowerCase();
|
|
30
30
|
const branchTags = {
|
|
31
31
|
master: /^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/,
|
|
32
32
|
next: /^v.*-next\.(0|[1-9]\d*)/,
|
|
@@ -35,7 +35,7 @@ var import_promises = require("node:fs/promises");
|
|
|
35
35
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
36
36
|
var import_normalize_path = __toESM(require("normalize-path"), 1);
|
|
37
37
|
var import_utils = require("./utils.js");
|
|
38
|
-
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)()
|
|
38
|
+
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)() ?? "");
|
|
39
39
|
const setRegistryVersion = async () => {
|
|
40
40
|
const files = await (0, import_fast_glob.default)([
|
|
41
41
|
`${monorepoRoot}/libs/*/package.json`,
|
|
@@ -35,7 +35,7 @@ var import_promises = require("node:fs/promises");
|
|
|
35
35
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
36
36
|
var import_normalize_path = __toESM(require("normalize-path"), 1);
|
|
37
37
|
var import_utils = require("./utils.js");
|
|
38
|
-
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)()
|
|
38
|
+
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)() ?? "");
|
|
39
39
|
const setWorkspaceVersion = async () => {
|
|
40
40
|
const files = await (0, import_fast_glob.default)([
|
|
41
41
|
`${monorepoRoot}/libs/*/package.json`,
|
package/dist/cjs/pui-config.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(pui_config_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(pui_config_exports);
|
|
34
34
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
35
35
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
36
|
-
var
|
|
36
|
+
var import_merge = __toESM(require("lodash/merge"), 1);
|
|
37
37
|
const baseConfig = {
|
|
38
38
|
esBuild: {
|
|
39
39
|
target: "es2020"
|
|
@@ -44,5 +44,5 @@ const getPUIConfig = () => {
|
|
|
44
44
|
if (!import_node_fs.default.existsSync(configPath))
|
|
45
45
|
return baseConfig;
|
|
46
46
|
const config = JSON.parse(import_node_fs.default.readFileSync(configPath, "utf8"));
|
|
47
|
-
return (0,
|
|
47
|
+
return (0, import_merge.default)(baseConfig, config);
|
|
48
48
|
};
|
package/dist/cjs/server/csp.js
CHANGED
|
@@ -34,9 +34,9 @@ __export(csp_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(csp_exports);
|
|
35
35
|
var import_node_fs = __toESM(require("node:fs"), 1);
|
|
36
36
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
37
|
+
var import_crypto = __toESM(require("crypto"), 1);
|
|
37
38
|
var import_express = __toESM(require("express"), 1);
|
|
38
39
|
var import_helmet_csp = __toESM(require("helmet-csp"), 1);
|
|
39
|
-
var import_crypto = __toESM(require("crypto"), 1);
|
|
40
40
|
const CSP_REPORT_URI = "/diagnostics/v1/csp";
|
|
41
41
|
const sources = [
|
|
42
42
|
"'self'",
|
package/dist/cjs/server/utils.js
CHANGED
|
@@ -37,7 +37,7 @@ var import_minimist = __toESM(require("minimist"), 1);
|
|
|
37
37
|
const argv = (0, import_minimist.default)(process.argv.slice(2));
|
|
38
38
|
const getCWD = () => process.cwd();
|
|
39
39
|
const port = parseInt(
|
|
40
|
-
argv.port
|
|
40
|
+
argv.port ?? process.env.port ?? process.env.PORT ?? "3000",
|
|
41
41
|
10
|
|
42
42
|
);
|
|
43
|
-
const host = argv.host
|
|
43
|
+
const host = argv.host ?? process.env.HOST ?? "localhost";
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
// fix: 'TypeError: Failed to parse URL from latest/app.config.json' relative urls not supported in nodejs native fetch, using whatwg-fetch instead
|
|
27
|
+
// // FIXME https://github.com/jsdom/jsdom/issues/1724
|
|
28
|
+
// if (fetch) this.global.fetch = fetch;
|
|
29
|
+
// if (Headers) this.global.Headers = Headers;
|
|
30
|
+
// if (Request) this.global.Request = Request;
|
|
31
|
+
// if (Response) this.global.Response = Response;
|
|
32
|
+
|
|
33
|
+
// // FIXME https://github.com/jsdom/jsdom/issues/1721
|
|
34
|
+
// if (URL) this.global.URL = URL;
|
|
35
|
+
// if (Blob) this.global.Blob = Blob;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
module.exports = FixJSDOMEnvironment;
|
|
@@ -0,0 +1,37 @@
|
|
|
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)
|
|
30
|
+
return { message: () => "", pass };
|
|
31
|
+
return {
|
|
32
|
+
message: () => `${(0, import_jest_matcher_utils.matcherHint)(".toHaveNoViolations")}
|
|
33
|
+
|
|
34
|
+
${formatedViolations}`,
|
|
35
|
+
pass
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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");
|
|
@@ -0,0 +1,51 @@
|
|
|
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)
|
|
30
|
+
return "";
|
|
31
|
+
const lineBreak = "\n\n";
|
|
32
|
+
const horizontalLine = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
33
|
+
return violToFormat.map((violation) => {
|
|
34
|
+
const errorBody = violation.nodes.map((node) => {
|
|
35
|
+
const selector = node.target.join(", ");
|
|
36
|
+
const expectedText = `Expected the HTML found at $('${selector}') to have no violations:${lineBreak}`;
|
|
37
|
+
let violationHelpUrl = "";
|
|
38
|
+
if (violation.helpUrl)
|
|
39
|
+
violationHelpUrl = `You can find more information on this issue here:
|
|
40
|
+
${colorBlue(
|
|
41
|
+
violation.helpUrl
|
|
42
|
+
)}`;
|
|
43
|
+
return `${expectedText + colorGrey(node.html) + lineBreak}Received:${lineBreak}${(0, import_jest_matcher_utils.printReceived)(
|
|
44
|
+
`${violation.help} (${violation.id})`
|
|
45
|
+
)}${lineBreak}${colorYellow(
|
|
46
|
+
node.failureSummary
|
|
47
|
+
)}${lineBreak}${violationHelpUrl}`;
|
|
48
|
+
}).join(lineBreak);
|
|
49
|
+
return errorBody;
|
|
50
|
+
}).join(lineBreak + horizontalLine + lineBreak);
|
|
51
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
);
|
|
@@ -0,0 +1,43 @@
|
|
|
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))
|
|
35
|
+
newNodes.push(node);
|
|
36
|
+
});
|
|
37
|
+
if (newNodes.length > 0) {
|
|
38
|
+
finalViolations.push({ ...violation, nodes: newNodes });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return { actual: violations, ...(0, import_getMessageAndPass.getMessageAndPass)(finalViolations) };
|
|
42
|
+
}
|
|
43
|
+
};
|
|
@@ -57,6 +57,8 @@ const jestConfig = {
|
|
|
57
57
|
coverageReporters: ['lcov', 'html', 'text-summary'],
|
|
58
58
|
moduleDirectories: ['node_modules', 'app', 'lib'],
|
|
59
59
|
moduleNameMapper: {
|
|
60
|
+
d3: '<rootDir>/node_modules/d3/dist/d3.min.js',
|
|
61
|
+
'^d3-(.*)$': '<rootDir>/node_modules/d3-$1/dist/d3-$1.min.js',
|
|
60
62
|
'.*\\webpack-hmr(.[t|j]s)?$': getMockFilePath('webpack-hmr.js'),
|
|
61
63
|
'.*\\.(css|scss)$': getMockFilePath('cssModule.js'),
|
|
62
64
|
'.*\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|ico)$':
|
|
@@ -92,7 +94,7 @@ const jestConfig = {
|
|
|
92
94
|
url: `http://localhost:3111${basePath}`,
|
|
93
95
|
resources: 'usable',
|
|
94
96
|
},
|
|
95
|
-
testEnvironment: '
|
|
97
|
+
testEnvironment: path.resolve(__dirname, './ExtendedJSDomEnv.cjs'),
|
|
96
98
|
watchPlugins: [
|
|
97
99
|
'jest-watch-typeahead/filename',
|
|
98
100
|
'jest-watch-typeahead/testname',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var import_vitest = require("vitest");
|
|
3
3
|
var import_jest_styled_components = require("jest-styled-components");
|
|
4
4
|
var import_react = require("@testing-library/react");
|
|
5
|
-
var
|
|
5
|
+
var import_jest_globals = require("@testing-library/jest-dom/jest-globals");
|
|
6
6
|
(0, import_vitest.afterEach)(() => {
|
|
7
7
|
(0, import_react.cleanup)();
|
|
8
8
|
});
|
|
@@ -21,11 +21,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
var import_stable = require("core-js/stable");
|
|
25
24
|
var import_runtime = require("regenerator-runtime/runtime");
|
|
26
|
-
var
|
|
27
|
-
var import_jest_axe = __toESM(require("jest-axe"), 1);
|
|
25
|
+
var import_jest_globals = require("@testing-library/jest-dom/jest-globals");
|
|
28
26
|
var import_resize_observer_polyfill = __toESM(require("resize-observer-polyfill"), 1);
|
|
27
|
+
var import_axe_core = require("./extended/axe-core");
|
|
29
28
|
var import_matchMedia = require("./mocks/matchMedia.js");
|
|
30
29
|
var import_pui_diagnostics = require("./mocks/pui-diagnostics.js");
|
|
31
30
|
const originalError = console.error;
|
|
@@ -48,7 +47,7 @@ console.error = (...args) => {
|
|
|
48
47
|
return originalError(...args);
|
|
49
48
|
};
|
|
50
49
|
if (expect)
|
|
51
|
-
expect.extend(
|
|
50
|
+
expect.extend(import_axe_core.toHaveNoViolations);
|
|
52
51
|
const addElementToBody = (element) => {
|
|
53
52
|
const documentEle = (window || {}).document;
|
|
54
53
|
if (!documentEle)
|
|
@@ -72,3 +71,25 @@ window.emui = {
|
|
|
72
71
|
logger: (0, import_pui_diagnostics.logger)(),
|
|
73
72
|
_BASE_PATH: new URL(document.baseURI).pathname
|
|
74
73
|
};
|
|
74
|
+
let showCorejsWarn = false;
|
|
75
|
+
afterAll(() => {
|
|
76
|
+
if (showCorejsWarn) {
|
|
77
|
+
console.warn(
|
|
78
|
+
`IMPORTANT: Try importing core-js/stable in your failed test files and retrying.
|
|
79
|
+
Some tests might have failed because of it`
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
const originalTest = global.test;
|
|
84
|
+
global.it = (name, fn, timeout = void 0) => {
|
|
85
|
+
const fnWrapper = async () => {
|
|
86
|
+
try {
|
|
87
|
+
await fn();
|
|
88
|
+
} catch (error) {
|
|
89
|
+
showCorejsWarn = true;
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
originalTest(name, fnWrapper, timeout);
|
|
94
|
+
};
|
|
95
|
+
global.it.skip = originalTest.skip;
|
|
@@ -34,10 +34,11 @@ __export(esbuild_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(esbuild_exports);
|
|
35
35
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
36
|
var import_node_url = require("node:url");
|
|
37
|
+
var import_promises = require("node:fs/promises");
|
|
37
38
|
var import_fast_glob = __toESM(require("fast-glob"), 1);
|
|
38
39
|
var import_esbuild = require("esbuild");
|
|
39
|
-
var import_promises = require("node:fs/promises");
|
|
40
40
|
var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"), 1);
|
|
41
|
+
var import_esbuild_plugin_lodash = __toESM(require("esbuild-plugin-lodash"), 1);
|
|
41
42
|
const import_meta = {};
|
|
42
43
|
const __dirname = import_node_path.default.dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
43
44
|
const TARGETS = {
|
|
@@ -116,7 +117,8 @@ const esBuild = async ({
|
|
|
116
117
|
...getCommonConfig({ injectReactShim }),
|
|
117
118
|
outdir: cjsOutdir,
|
|
118
119
|
format: ESBUILD_FORMAT.CJS,
|
|
119
|
-
target
|
|
120
|
+
target,
|
|
121
|
+
plugins: [(0, import_esbuild_plugin_lodash.default)()]
|
|
120
122
|
});
|
|
121
123
|
await copyFiles({ srcdir, outdir: cjsOutdir });
|
|
122
124
|
await createPackageJson({ outdir: cjsOutdir, type: NODE_MODULE_TYPES.CJS });
|
|
@@ -31,9 +31,9 @@ __export(update_notifier_exports, {
|
|
|
31
31
|
notifyUpdates: () => notifyUpdates
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(update_notifier_exports);
|
|
34
|
-
var import_update_notifier = __toESM(require("update-notifier"), 1);
|
|
35
34
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
36
35
|
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
36
|
+
var import_update_notifier = __toESM(require("update-notifier"), 1);
|
|
37
37
|
const notifyUpdates = async () => {
|
|
38
38
|
const pkgFile = await import_promises.default.readFile(import_node_path.default.join(process.cwd(), "./package.json"));
|
|
39
39
|
const pkg = JSON.parse(pkgFile);
|