@storybook/addon-vitest 0.0.0-pr-32717-sha-8803ec2c → 0.0.0-pr-32859-sha-0ff3fd82
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/_node-chunks/chunk-5QWKJDTA.js +2574 -0
- package/dist/_node-chunks/{chunk-J3TMKAGQ.js → chunk-6M6GHGXN.js} +18 -6
- package/dist/_node-chunks/{chunk-RC52X23D.js → chunk-BNGDH3FQ.js} +7 -7
- package/dist/_node-chunks/{chunk-WODMNDRC.js → chunk-GIBMIESY.js} +6 -6
- package/dist/_node-chunks/chunk-KMLD65EU.js +98 -0
- package/dist/_node-chunks/{chunk-HTINZ3Y3.js → chunk-OAIA5C7K.js} +7 -7
- package/dist/_node-chunks/chunk-QNH3623B.js +37 -0
- package/dist/_node-chunks/{chunk-UGJMNNQB.js → chunk-YKP4ELDV.js} +7 -7
- package/dist/manager.js +1 -1
- package/dist/node/coverage-reporter.js +8 -8
- package/dist/node/vitest.js +14 -25
- package/dist/postinstall.js +449 -199
- package/dist/preset.js +15 -2239
- package/dist/vitest-plugin/global-setup.js +7 -7
- package/dist/vitest-plugin/index.js +9 -9
- package/dist/vitest-plugin/setup-file.js +1 -1
- package/package.json +4 -2
- package/dist/_node-chunks/chunk-NXAZJQMW.js +0 -40
- package/dist/_node-chunks/chunk-X5TW6UQ6.js +0 -348
- package/dist/_node-chunks/chunk-ZUDGK5GP.js +0 -60
- /package/dist/_browser-chunks/{chunk-RPDOPHZX.js → chunk-CAYLRBRX.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_svf4gveizge from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_svf4gveizge from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_svf4gveizge from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_svf4gveizge.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_svf4gveizge.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_svf4gveizge.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__name,
|
|
15
15
|
__require,
|
|
16
16
|
__toESM
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-GIBMIESY.js";
|
|
18
18
|
|
|
19
19
|
// ../../node_modules/tree-kill/index.js
|
|
20
20
|
var require_tree_kill = __commonJS({
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_svf4gveizge from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_svf4gveizge from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_svf4gveizge from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_svf4gveizge.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_svf4gveizge.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_svf4gveizge.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_picocolors
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-YKP4ELDV.js";
|
|
15
15
|
import {
|
|
16
16
|
join,
|
|
17
17
|
normalize,
|
|
18
18
|
relative,
|
|
19
19
|
resolve,
|
|
20
20
|
sep
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-OAIA5C7K.js";
|
|
22
22
|
import {
|
|
23
23
|
__commonJS,
|
|
24
24
|
__name,
|
|
25
25
|
__require,
|
|
26
26
|
__toESM
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-GIBMIESY.js";
|
|
28
28
|
|
|
29
29
|
// ../../node_modules/braces/lib/utils.js
|
|
30
30
|
var require_utils = __commonJS({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-vitest",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-32859-sha-0ff3fd82",
|
|
4
4
|
"description": "Storybook Vitest addon: Blazing fast component testing using stories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@storybook/global": "^5.0.0",
|
|
76
76
|
"@storybook/icons": "^1.6.0",
|
|
77
|
+
"prompts": "^2.4.0",
|
|
77
78
|
"ts-dedent": "^2.2.0"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"@types/semver": "^7",
|
|
84
85
|
"@vitest/browser-playwright": "^4.0.1",
|
|
85
86
|
"@vitest/runner": "^4.0.1",
|
|
87
|
+
"boxen": "^8.0.1",
|
|
86
88
|
"empathic": "^2.0.0",
|
|
87
89
|
"es-toolkit": "^1.36.0",
|
|
88
90
|
"execa": "^8.0.1",
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
"@vitest/browser": "^3.0.0 || ^4.0.0",
|
|
106
108
|
"@vitest/browser-playwright": "^4.0.0",
|
|
107
109
|
"@vitest/runner": "^3.0.0 || ^4.0.0",
|
|
108
|
-
"storybook": "^0.0.0-pr-
|
|
110
|
+
"storybook": "^0.0.0-pr-32859-sha-0ff3fd82",
|
|
109
111
|
"vitest": "^3.0.0 || ^4.0.0"
|
|
110
112
|
},
|
|
111
113
|
"peerDependenciesMeta": {
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_d1dfhbqh9bc from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_d1dfhbqh9bc from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_d1dfhbqh9bc.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_d1dfhbqh9bc.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
ADDON_ID
|
|
14
|
-
} from "./chunk-J3TMKAGQ.js";
|
|
15
|
-
import {
|
|
16
|
-
require_picocolors
|
|
17
|
-
} from "./chunk-UGJMNNQB.js";
|
|
18
|
-
import {
|
|
19
|
-
__name,
|
|
20
|
-
__toESM
|
|
21
|
-
} from "./chunk-WODMNDRC.js";
|
|
22
|
-
|
|
23
|
-
// src/logger.ts
|
|
24
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
25
|
-
import { logger } from "storybook/internal/node-logger";
|
|
26
|
-
var log = /* @__PURE__ */ __name((message) => {
|
|
27
|
-
logger.log(
|
|
28
|
-
`${import_picocolors.default.magenta(ADDON_ID)}: ${message.toString().replaceAll(/(│\n|│ )/g, "").trim()}`
|
|
29
|
-
);
|
|
30
|
-
}, "log");
|
|
31
|
-
|
|
32
|
-
// ../../node_modules/es-toolkit/dist/function/noop.mjs
|
|
33
|
-
function noop() {
|
|
34
|
-
}
|
|
35
|
-
__name(noop, "noop");
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
noop,
|
|
39
|
-
log
|
|
40
|
-
};
|
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_d1dfhbqh9bc from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_d1dfhbqh9bc from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_d1dfhbqh9bc.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_d1dfhbqh9bc.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
dirname,
|
|
14
|
-
join
|
|
15
|
-
} from "./chunk-HTINZ3Y3.js";
|
|
16
|
-
import {
|
|
17
|
-
__name
|
|
18
|
-
} from "./chunk-WODMNDRC.js";
|
|
19
|
-
|
|
20
|
-
// ../../core/src/shared/utils/module.ts
|
|
21
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
22
|
-
|
|
23
|
-
// ../../node_modules/exsolve/dist/index.mjs
|
|
24
|
-
import assert from "node:assert";
|
|
25
|
-
import v8 from "node:v8";
|
|
26
|
-
import { format, inspect } from "node:util";
|
|
27
|
-
var own$1 = {}.hasOwnProperty;
|
|
28
|
-
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
29
|
-
var kTypes = /* @__PURE__ */ new Set([
|
|
30
|
-
"string",
|
|
31
|
-
"function",
|
|
32
|
-
"number",
|
|
33
|
-
"object",
|
|
34
|
-
// Accept 'Function' and 'Object' as alternative to the lower cased version.
|
|
35
|
-
"Function",
|
|
36
|
-
"Object",
|
|
37
|
-
"boolean",
|
|
38
|
-
"bigint",
|
|
39
|
-
"symbol"
|
|
40
|
-
]);
|
|
41
|
-
var messages = /* @__PURE__ */ new Map();
|
|
42
|
-
var nodeInternalPrefix = "__node_internal_";
|
|
43
|
-
var userStackTraceLimit;
|
|
44
|
-
function formatList(array, type = "and") {
|
|
45
|
-
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
46
|
-
}
|
|
47
|
-
__name(formatList, "formatList");
|
|
48
|
-
function createError(sym, value, constructor) {
|
|
49
|
-
messages.set(sym, value);
|
|
50
|
-
return makeNodeErrorWithCode(constructor, sym);
|
|
51
|
-
}
|
|
52
|
-
__name(createError, "createError");
|
|
53
|
-
function makeNodeErrorWithCode(Base, key) {
|
|
54
|
-
return /* @__PURE__ */ __name(function NodeError(...parameters) {
|
|
55
|
-
const limit = Error.stackTraceLimit;
|
|
56
|
-
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
|
|
57
|
-
const error = new Base();
|
|
58
|
-
if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
|
|
59
|
-
const message = getMessage(key, parameters, error);
|
|
60
|
-
Object.defineProperties(error, {
|
|
61
|
-
// Note: no need to implement `kIsNodeError` symbol, would be hard,
|
|
62
|
-
// probably.
|
|
63
|
-
message: {
|
|
64
|
-
value: message,
|
|
65
|
-
enumerable: false,
|
|
66
|
-
writable: true,
|
|
67
|
-
configurable: true
|
|
68
|
-
},
|
|
69
|
-
toString: {
|
|
70
|
-
/** @this {Error} */
|
|
71
|
-
value() {
|
|
72
|
-
return `${this.name} [${key}]: ${this.message}`;
|
|
73
|
-
},
|
|
74
|
-
enumerable: false,
|
|
75
|
-
writable: true,
|
|
76
|
-
configurable: true
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
captureLargerStackTrace(error);
|
|
80
|
-
error.code = key;
|
|
81
|
-
return error;
|
|
82
|
-
}, "NodeError");
|
|
83
|
-
}
|
|
84
|
-
__name(makeNodeErrorWithCode, "makeNodeErrorWithCode");
|
|
85
|
-
function isErrorStackTraceLimitWritable() {
|
|
86
|
-
try {
|
|
87
|
-
if (v8.startupSnapshot.isBuildingSnapshot()) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
|
-
} catch {
|
|
91
|
-
}
|
|
92
|
-
const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
93
|
-
if (desc === void 0) {
|
|
94
|
-
return Object.isExtensible(Error);
|
|
95
|
-
}
|
|
96
|
-
return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
97
|
-
}
|
|
98
|
-
__name(isErrorStackTraceLimitWritable, "isErrorStackTraceLimitWritable");
|
|
99
|
-
function hideStackFrames(wrappedFunction) {
|
|
100
|
-
const hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
101
|
-
Object.defineProperty(wrappedFunction, "name", { value: hidden });
|
|
102
|
-
return wrappedFunction;
|
|
103
|
-
}
|
|
104
|
-
__name(hideStackFrames, "hideStackFrames");
|
|
105
|
-
var captureLargerStackTrace = hideStackFrames(function(error) {
|
|
106
|
-
const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
107
|
-
if (stackTraceLimitIsWritable) {
|
|
108
|
-
userStackTraceLimit = Error.stackTraceLimit;
|
|
109
|
-
Error.stackTraceLimit = Number.POSITIVE_INFINITY;
|
|
110
|
-
}
|
|
111
|
-
Error.captureStackTrace(error);
|
|
112
|
-
if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
|
|
113
|
-
return error;
|
|
114
|
-
});
|
|
115
|
-
function getMessage(key, parameters, self) {
|
|
116
|
-
const message = messages.get(key);
|
|
117
|
-
assert(message !== void 0, "expected `message` to be found");
|
|
118
|
-
if (typeof message === "function") {
|
|
119
|
-
assert(
|
|
120
|
-
message.length <= parameters.length,
|
|
121
|
-
// Default options do not count.
|
|
122
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`
|
|
123
|
-
);
|
|
124
|
-
return Reflect.apply(message, self, parameters);
|
|
125
|
-
}
|
|
126
|
-
const regex = /%[dfijoOs]/g;
|
|
127
|
-
let expectedLength = 0;
|
|
128
|
-
while (regex.exec(message) !== null) expectedLength++;
|
|
129
|
-
assert(
|
|
130
|
-
expectedLength === parameters.length,
|
|
131
|
-
`Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`
|
|
132
|
-
);
|
|
133
|
-
if (parameters.length === 0) return message;
|
|
134
|
-
parameters.unshift(message);
|
|
135
|
-
return Reflect.apply(format, null, parameters);
|
|
136
|
-
}
|
|
137
|
-
__name(getMessage, "getMessage");
|
|
138
|
-
function determineSpecificType(value) {
|
|
139
|
-
if (value === null || value === void 0) {
|
|
140
|
-
return String(value);
|
|
141
|
-
}
|
|
142
|
-
if (typeof value === "function" && value.name) {
|
|
143
|
-
return `function ${value.name}`;
|
|
144
|
-
}
|
|
145
|
-
if (typeof value === "object") {
|
|
146
|
-
if (value.constructor && value.constructor.name) {
|
|
147
|
-
return `an instance of ${value.constructor.name}`;
|
|
148
|
-
}
|
|
149
|
-
return `${inspect(value, { depth: -1 })}`;
|
|
150
|
-
}
|
|
151
|
-
let inspected = inspect(value, { colors: false });
|
|
152
|
-
if (inspected.length > 28) {
|
|
153
|
-
inspected = `${inspected.slice(0, 25)}...`;
|
|
154
|
-
}
|
|
155
|
-
return `type ${typeof value} (${inspected})`;
|
|
156
|
-
}
|
|
157
|
-
__name(determineSpecificType, "determineSpecificType");
|
|
158
|
-
createError(
|
|
159
|
-
"ERR_INVALID_ARG_TYPE",
|
|
160
|
-
(name, expected, actual) => {
|
|
161
|
-
assert(typeof name === "string", "'name' must be a string");
|
|
162
|
-
if (!Array.isArray(expected)) {
|
|
163
|
-
expected = [expected];
|
|
164
|
-
}
|
|
165
|
-
let message = "The ";
|
|
166
|
-
if (name.endsWith(" argument")) {
|
|
167
|
-
message += `${name} `;
|
|
168
|
-
} else {
|
|
169
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
170
|
-
message += `"${name}" ${type} `;
|
|
171
|
-
}
|
|
172
|
-
message += "must be ";
|
|
173
|
-
const types = [];
|
|
174
|
-
const instances = [];
|
|
175
|
-
const other = [];
|
|
176
|
-
for (const value of expected) {
|
|
177
|
-
assert(
|
|
178
|
-
typeof value === "string",
|
|
179
|
-
"All expected entries have to be of type string"
|
|
180
|
-
);
|
|
181
|
-
if (kTypes.has(value)) {
|
|
182
|
-
types.push(value.toLowerCase());
|
|
183
|
-
} else if (classRegExp.exec(value) === null) {
|
|
184
|
-
assert(
|
|
185
|
-
value !== "object",
|
|
186
|
-
'The value "object" should be written as "Object"'
|
|
187
|
-
);
|
|
188
|
-
other.push(value);
|
|
189
|
-
} else {
|
|
190
|
-
instances.push(value);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (instances.length > 0) {
|
|
194
|
-
const pos = types.indexOf("object");
|
|
195
|
-
if (pos !== -1) {
|
|
196
|
-
types.slice(pos, 1);
|
|
197
|
-
instances.push("Object");
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (types.length > 0) {
|
|
201
|
-
message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(
|
|
202
|
-
types,
|
|
203
|
-
"or"
|
|
204
|
-
)}`;
|
|
205
|
-
if (instances.length > 0 || other.length > 0) message += " or ";
|
|
206
|
-
}
|
|
207
|
-
if (instances.length > 0) {
|
|
208
|
-
message += `an instance of ${formatList(instances, "or")}`;
|
|
209
|
-
if (other.length > 0) message += " or ";
|
|
210
|
-
}
|
|
211
|
-
if (other.length > 0) {
|
|
212
|
-
if (other.length > 1) {
|
|
213
|
-
message += `one of ${formatList(other, "or")}`;
|
|
214
|
-
} else {
|
|
215
|
-
if (other[0]?.toLowerCase() !== other[0]) message += "an ";
|
|
216
|
-
message += `${other[0]}`;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
message += `. Received ${determineSpecificType(actual)}`;
|
|
220
|
-
return message;
|
|
221
|
-
},
|
|
222
|
-
TypeError
|
|
223
|
-
);
|
|
224
|
-
var ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
225
|
-
"ERR_INVALID_MODULE_SPECIFIER",
|
|
226
|
-
/**
|
|
227
|
-
* @param {string} request
|
|
228
|
-
* @param {string} reason
|
|
229
|
-
* @param {string} [base]
|
|
230
|
-
*/
|
|
231
|
-
(request, reason, base) => {
|
|
232
|
-
return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`;
|
|
233
|
-
},
|
|
234
|
-
TypeError
|
|
235
|
-
);
|
|
236
|
-
var ERR_INVALID_PACKAGE_CONFIG = createError(
|
|
237
|
-
"ERR_INVALID_PACKAGE_CONFIG",
|
|
238
|
-
(path, base, message) => {
|
|
239
|
-
return `Invalid package config ${path}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`;
|
|
240
|
-
},
|
|
241
|
-
Error
|
|
242
|
-
);
|
|
243
|
-
var ERR_INVALID_PACKAGE_TARGET = createError(
|
|
244
|
-
"ERR_INVALID_PACKAGE_TARGET",
|
|
245
|
-
(packagePath, key, target, isImport = false, base) => {
|
|
246
|
-
const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
247
|
-
if (key === ".") {
|
|
248
|
-
assert(isImport === false);
|
|
249
|
-
return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
250
|
-
}
|
|
251
|
-
return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(
|
|
252
|
-
target
|
|
253
|
-
)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
254
|
-
},
|
|
255
|
-
Error
|
|
256
|
-
);
|
|
257
|
-
var ERR_MODULE_NOT_FOUND = createError(
|
|
258
|
-
"ERR_MODULE_NOT_FOUND",
|
|
259
|
-
(path, base, exactUrl = false) => {
|
|
260
|
-
return `Cannot find ${exactUrl ? "module" : "package"} '${path}' imported from ${base}`;
|
|
261
|
-
},
|
|
262
|
-
Error
|
|
263
|
-
);
|
|
264
|
-
createError(
|
|
265
|
-
"ERR_NETWORK_IMPORT_DISALLOWED",
|
|
266
|
-
"import of '%s' by %s is not supported: %s",
|
|
267
|
-
Error
|
|
268
|
-
);
|
|
269
|
-
var ERR_PACKAGE_IMPORT_NOT_DEFINED = createError(
|
|
270
|
-
"ERR_PACKAGE_IMPORT_NOT_DEFINED",
|
|
271
|
-
(specifier, packagePath, base) => {
|
|
272
|
-
return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`;
|
|
273
|
-
},
|
|
274
|
-
TypeError
|
|
275
|
-
);
|
|
276
|
-
var ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
277
|
-
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
278
|
-
/**
|
|
279
|
-
* @param {string} packagePath
|
|
280
|
-
* @param {string} subpath
|
|
281
|
-
* @param {string} [base]
|
|
282
|
-
*/
|
|
283
|
-
(packagePath, subpath, base) => {
|
|
284
|
-
if (subpath === ".")
|
|
285
|
-
return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
286
|
-
return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`;
|
|
287
|
-
},
|
|
288
|
-
Error
|
|
289
|
-
);
|
|
290
|
-
var ERR_UNSUPPORTED_DIR_IMPORT = createError(
|
|
291
|
-
"ERR_UNSUPPORTED_DIR_IMPORT",
|
|
292
|
-
"Directory import '%s' is not supported resolving ES modules imported from %s",
|
|
293
|
-
Error
|
|
294
|
-
);
|
|
295
|
-
var ERR_UNSUPPORTED_RESOLVE_REQUEST = createError(
|
|
296
|
-
"ERR_UNSUPPORTED_RESOLVE_REQUEST",
|
|
297
|
-
'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.',
|
|
298
|
-
TypeError
|
|
299
|
-
);
|
|
300
|
-
var ERR_UNKNOWN_FILE_EXTENSION = createError(
|
|
301
|
-
"ERR_UNKNOWN_FILE_EXTENSION",
|
|
302
|
-
(extension, path) => {
|
|
303
|
-
return `Unknown file extension "${extension}" for ${path}`;
|
|
304
|
-
},
|
|
305
|
-
TypeError
|
|
306
|
-
);
|
|
307
|
-
createError(
|
|
308
|
-
"ERR_INVALID_ARG_VALUE",
|
|
309
|
-
(name, value, reason = "is invalid") => {
|
|
310
|
-
let inspected = inspect(value);
|
|
311
|
-
if (inspected.length > 128) {
|
|
312
|
-
inspected = `${inspected.slice(0, 128)}...`;
|
|
313
|
-
}
|
|
314
|
-
const type = name.includes(".") ? "property" : "argument";
|
|
315
|
-
return `The ${type} '${name}' ${reason}. Received ${inspected}`;
|
|
316
|
-
},
|
|
317
|
-
TypeError
|
|
318
|
-
// Note: extra classes have been shaken out.
|
|
319
|
-
// , RangeError
|
|
320
|
-
);
|
|
321
|
-
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
322
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
323
|
-
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
324
|
-
var own = {}.hasOwnProperty;
|
|
325
|
-
var isWindows = (() => process.platform === "win32")();
|
|
326
|
-
var globalCache = (() => (
|
|
327
|
-
// eslint-disable-next-line unicorn/no-unreadable-iife
|
|
328
|
-
globalThis["__EXSOLVE_CACHE__"] ||= /* @__PURE__ */ new Map()
|
|
329
|
-
))();
|
|
330
|
-
|
|
331
|
-
// ../../core/src/shared/utils/module.ts
|
|
332
|
-
var importMetaResolve = /* @__PURE__ */ __name((...args) => {
|
|
333
|
-
if (typeof import.meta.resolve !== "function" && process.env.VITEST === "true") {
|
|
334
|
-
console.warn(
|
|
335
|
-
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
336
|
-
);
|
|
337
|
-
return pathToFileURL(args[0]).href;
|
|
338
|
-
}
|
|
339
|
-
return import.meta.resolve(...args);
|
|
340
|
-
}, "importMetaResolve");
|
|
341
|
-
var resolvePackageDir = /* @__PURE__ */ __name((pkg, parent) => {
|
|
342
|
-
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
343
|
-
}, "resolvePackageDir");
|
|
344
|
-
|
|
345
|
-
export {
|
|
346
|
-
importMetaResolve,
|
|
347
|
-
resolvePackageDir
|
|
348
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_d1dfhbqh9bc from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_d1dfhbqh9bc from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_d1dfhbqh9bc.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_d1dfhbqh9bc.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_d1dfhbqh9bc.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-WODMNDRC.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/empathic/find.mjs
|
|
17
|
-
import { join as join2 } from "node:path";
|
|
18
|
-
import { existsSync, statSync } from "node:fs";
|
|
19
|
-
|
|
20
|
-
// ../../node_modules/empathic/walk.mjs
|
|
21
|
-
import { dirname } from "node:path";
|
|
22
|
-
|
|
23
|
-
// ../../node_modules/empathic/resolve.mjs
|
|
24
|
-
import { isAbsolute, join, resolve } from "node:path";
|
|
25
|
-
function absolute(input, root) {
|
|
26
|
-
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
27
|
-
}
|
|
28
|
-
__name(absolute, "absolute");
|
|
29
|
-
|
|
30
|
-
// ../../node_modules/empathic/walk.mjs
|
|
31
|
-
function up(base, options) {
|
|
32
|
-
let { last, cwd } = options || {};
|
|
33
|
-
let tmp = absolute(base, cwd);
|
|
34
|
-
let root = absolute(last || "/", cwd);
|
|
35
|
-
let prev, arr = [];
|
|
36
|
-
while (prev !== root) {
|
|
37
|
-
arr.push(tmp);
|
|
38
|
-
tmp = dirname(prev = tmp);
|
|
39
|
-
if (tmp === prev) break;
|
|
40
|
-
}
|
|
41
|
-
return arr;
|
|
42
|
-
}
|
|
43
|
-
__name(up, "up");
|
|
44
|
-
|
|
45
|
-
// ../../node_modules/empathic/find.mjs
|
|
46
|
-
function any(names, options) {
|
|
47
|
-
let dir, start = options && options.cwd || "";
|
|
48
|
-
let j = 0, len = names.length, tmp;
|
|
49
|
-
for (dir of up(start, options)) {
|
|
50
|
-
for (j = 0; j < len; j++) {
|
|
51
|
-
tmp = join2(dir, names[j]);
|
|
52
|
-
if (existsSync(tmp)) return tmp;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
__name(any, "any");
|
|
57
|
-
|
|
58
|
-
export {
|
|
59
|
-
any
|
|
60
|
-
};
|
|
File without changes
|