create-storybook 10.2.5 → 10.2.6
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-N6BXPTDC.js → chunk-5BPXECTR.js} +646 -99
- package/dist/_node-chunks/{chunk-QOLWOH5F.js → chunk-6GIN6MWS.js} +7 -7
- package/dist/_node-chunks/chunk-OQWKAX3X.js +92 -0
- package/dist/_node-chunks/{chunk-3TWRNY6R.js → chunk-THR72EAG.js} +6 -6
- package/dist/_node-chunks/{postinstallAddon-BBK7G674.js → postinstallAddon-SN6SHJQO.js} +11 -10
- package/dist/_node-chunks/{run-D3PZJRGD.js → run-IIT4V4GL.js} +11 -10
- package/dist/_node-chunks/vitest.config-7QH3VAVK.js +53 -0
- package/dist/_node-chunks/vitest.config.3.2-HJ3TVZJ4.js +53 -0
- package/dist/_node-chunks/vitest.config.4-IRNJJKM3.js +55 -0
- package/dist/_node-chunks/vitest.workspace-YTF65SM6.js +50 -0
- package/dist/bin/index.js +9 -9
- package/dist/index.js +10 -9
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.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
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-THR72EAG.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// ../../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
14
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
15
|
+
function normalizeWindowsPath(input = "") {
|
|
16
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
17
|
+
}
|
|
18
|
+
var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/, _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
|
|
19
|
+
var normalize = function(path2) {
|
|
20
|
+
if (path2.length === 0)
|
|
21
|
+
return ".";
|
|
22
|
+
path2 = normalizeWindowsPath(path2);
|
|
23
|
+
let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
|
|
24
|
+
return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
|
|
25
|
+
};
|
|
26
|
+
function cwd() {
|
|
27
|
+
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
28
|
+
}
|
|
29
|
+
var resolve = function(...arguments_) {
|
|
30
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
31
|
+
let resolvedPath = "", resolvedAbsolute = !1;
|
|
32
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
33
|
+
let path2 = index >= 0 ? arguments_[index] : cwd();
|
|
34
|
+
!path2 || path2.length === 0 || (resolvedPath = `${path2}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path2));
|
|
35
|
+
}
|
|
36
|
+
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
37
|
+
};
|
|
38
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
39
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
40
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
41
|
+
if (index < path2.length)
|
|
42
|
+
char = path2[index];
|
|
43
|
+
else {
|
|
44
|
+
if (char === "/")
|
|
45
|
+
break;
|
|
46
|
+
char = "/";
|
|
47
|
+
}
|
|
48
|
+
if (char === "/") {
|
|
49
|
+
if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
|
|
50
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
51
|
+
if (res.length > 2) {
|
|
52
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
53
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
54
|
+
continue;
|
|
55
|
+
} else if (res.length > 0) {
|
|
56
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
61
|
+
} else
|
|
62
|
+
res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
63
|
+
lastSlash = index, dots = 0;
|
|
64
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
65
|
+
}
|
|
66
|
+
return res;
|
|
67
|
+
}
|
|
68
|
+
var isAbsolute = function(p) {
|
|
69
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
70
|
+
};
|
|
71
|
+
var relative = function(from, to) {
|
|
72
|
+
let _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"), _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
|
|
73
|
+
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0])
|
|
74
|
+
return _to.join("/");
|
|
75
|
+
let _fromCopy = [..._from];
|
|
76
|
+
for (let segment of _fromCopy) {
|
|
77
|
+
if (_to[0] !== segment)
|
|
78
|
+
break;
|
|
79
|
+
_from.shift(), _to.shift();
|
|
80
|
+
}
|
|
81
|
+
return [..._from.map(() => ".."), ..._to].join("/");
|
|
82
|
+
}, dirname = function(p) {
|
|
83
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
84
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
normalize,
|
|
89
|
+
resolve,
|
|
90
|
+
relative,
|
|
91
|
+
dirname
|
|
92
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-OQWKAX3X.js";
|
|
13
|
+
import "./chunk-THR72EAG.js";
|
|
13
14
|
|
|
14
15
|
// ../cli-storybook/src/postinstallAddon.ts
|
|
15
16
|
import { createRequire as createRequire2 } from "node:module";
|
|
@@ -149,19 +150,19 @@ var importMetaResolve = (...args) => typeof import.meta.resolve != "function" &&
|
|
|
149
150
|
"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"
|
|
150
151
|
), pathToFileURL(args[0]).href) : import.meta.resolve(...args);
|
|
151
152
|
var isTypescriptLoaderRegistered = !1;
|
|
152
|
-
async function importModule(
|
|
153
|
+
async function importModule(path, { skipCache = !1 } = {}) {
|
|
153
154
|
if (!isTypescriptLoaderRegistered) {
|
|
154
155
|
let typescriptLoaderUrl = importMetaResolve("storybook/internal/bin/loader");
|
|
155
156
|
register(typescriptLoaderUrl, import.meta.url), isTypescriptLoaderRegistered = !0;
|
|
156
157
|
}
|
|
157
158
|
let mod;
|
|
158
159
|
try {
|
|
159
|
-
let resolvedPath = win32.isAbsolute(
|
|
160
|
+
let resolvedPath = win32.isAbsolute(path) ? pathToFileURL(path).href : path;
|
|
160
161
|
mod = await import(skipCache ? `${resolvedPath}?${Date.now()}` : resolvedPath);
|
|
161
162
|
} catch (importError) {
|
|
162
163
|
try {
|
|
163
164
|
let require3 = createRequire(import.meta.url);
|
|
164
|
-
skipCache && delete require3.cache[require3.resolve(
|
|
165
|
+
skipCache && delete require3.cache[require3.resolve(path)], mod = require3(path);
|
|
165
166
|
} catch {
|
|
166
167
|
throw importError;
|
|
167
168
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.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
|
initiate
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-5BPXECTR.js";
|
|
15
|
+
import "./chunk-6GIN6MWS.js";
|
|
16
|
+
import "./chunk-OQWKAX3X.js";
|
|
16
17
|
import {
|
|
17
18
|
__commonJS,
|
|
18
19
|
__require,
|
|
19
20
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-THR72EAG.js";
|
|
21
22
|
|
|
22
23
|
// ../../../node_modules/commander/lib/error.js
|
|
23
24
|
var require_error = __commonJS({
|
|
@@ -2620,7 +2621,7 @@ var import_index = __toESM(require_commander(), 1), {
|
|
|
2620
2621
|
} = import_index.default;
|
|
2621
2622
|
|
|
2622
2623
|
// package.json
|
|
2623
|
-
var version = "10.2.
|
|
2624
|
+
var version = "10.2.6";
|
|
2624
2625
|
|
|
2625
2626
|
// src/bin/run.ts
|
|
2626
2627
|
addToGlobalContext("cliVersion", version);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import "./chunk-THR72EAG.js";
|
|
13
|
+
|
|
14
|
+
// raw:../templates/vitest.config.template
|
|
15
|
+
var vitest_config_default = `import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { defineConfig } from 'vitest/config';
|
|
19
|
+
|
|
20
|
+
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
21
|
+
|
|
22
|
+
const dirname =
|
|
23
|
+
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
|
|
25
|
+
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
test: {
|
|
28
|
+
workspace: [
|
|
29
|
+
{
|
|
30
|
+
extends: true,
|
|
31
|
+
plugins: [
|
|
32
|
+
// The plugin will run tests for the stories defined in your Storybook config
|
|
33
|
+
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
34
|
+
storybookTest({ configDir: path.join(dirname, 'CONFIG_DIR') }),
|
|
35
|
+
],
|
|
36
|
+
test: {
|
|
37
|
+
name: 'storybook',
|
|
38
|
+
browser: {
|
|
39
|
+
enabled: true,
|
|
40
|
+
headless: true,
|
|
41
|
+
provider: 'playwright',
|
|
42
|
+
instances: [{ browser: 'chromium' }],
|
|
43
|
+
},
|
|
44
|
+
setupFiles: ['SETUP_FILE'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
`;
|
|
51
|
+
export {
|
|
52
|
+
vitest_config_default as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import "./chunk-THR72EAG.js";
|
|
13
|
+
|
|
14
|
+
// raw:../templates/vitest.config.3.2.template
|
|
15
|
+
var vitest_config_3_2_default = `import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { defineConfig } from 'vitest/config';
|
|
19
|
+
|
|
20
|
+
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
21
|
+
|
|
22
|
+
const dirname =
|
|
23
|
+
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
|
|
25
|
+
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
|
26
|
+
export default defineConfig({
|
|
27
|
+
test: {
|
|
28
|
+
projects: [
|
|
29
|
+
{
|
|
30
|
+
extends: true,
|
|
31
|
+
plugins: [
|
|
32
|
+
// The plugin will run tests for the stories defined in your Storybook config
|
|
33
|
+
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
34
|
+
storybookTest({ configDir: path.join(dirname, 'CONFIG_DIR') }),
|
|
35
|
+
],
|
|
36
|
+
test: {
|
|
37
|
+
name: 'storybook',
|
|
38
|
+
browser: {
|
|
39
|
+
enabled: true,
|
|
40
|
+
headless: true,
|
|
41
|
+
provider: 'playwright',
|
|
42
|
+
instances: [{ browser: 'chromium' }],
|
|
43
|
+
},
|
|
44
|
+
setupFiles: ['SETUP_FILE'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
`;
|
|
51
|
+
export {
|
|
52
|
+
vitest_config_3_2_default as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import "./chunk-THR72EAG.js";
|
|
13
|
+
|
|
14
|
+
// raw:../templates/vitest.config.4.template
|
|
15
|
+
var vitest_config_4_default = `import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { defineConfig } from 'vitest/config';
|
|
19
|
+
|
|
20
|
+
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
21
|
+
|
|
22
|
+
import { playwright } from '@vitest/browser-playwright';
|
|
23
|
+
|
|
24
|
+
const dirname =
|
|
25
|
+
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
26
|
+
|
|
27
|
+
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
test: {
|
|
30
|
+
projects: [
|
|
31
|
+
{
|
|
32
|
+
extends: true,
|
|
33
|
+
plugins: [
|
|
34
|
+
// The plugin will run tests for the stories defined in your Storybook config
|
|
35
|
+
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
36
|
+
storybookTest({ configDir: path.join(dirname, 'CONFIG_DIR') }),
|
|
37
|
+
],
|
|
38
|
+
test: {
|
|
39
|
+
name: 'storybook',
|
|
40
|
+
browser: {
|
|
41
|
+
enabled: true,
|
|
42
|
+
headless: true,
|
|
43
|
+
provider: playwright({}),
|
|
44
|
+
instances: [{ browser: 'chromium' }],
|
|
45
|
+
},
|
|
46
|
+
setupFiles: ['SETUP_FILE'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
`;
|
|
53
|
+
export {
|
|
54
|
+
vitest_config_4_default as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import "./chunk-THR72EAG.js";
|
|
13
|
+
|
|
14
|
+
// raw:../templates/vitest.workspace.template
|
|
15
|
+
var vitest_workspace_default = `import path from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
|
|
18
|
+
import { defineWorkspace } from 'vitest/config';
|
|
19
|
+
|
|
20
|
+
import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
|
|
21
|
+
|
|
22
|
+
const dirname =
|
|
23
|
+
typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
24
|
+
|
|
25
|
+
// More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
|
|
26
|
+
export default defineWorkspace([
|
|
27
|
+
'ROOT_CONFIG',
|
|
28
|
+
{
|
|
29
|
+
extends: 'EXTENDS_WORKSPACE',
|
|
30
|
+
plugins: [
|
|
31
|
+
// The plugin will run tests for the stories defined in your Storybook config
|
|
32
|
+
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
|
|
33
|
+
storybookTest({ configDir: path.join(dirname, 'CONFIG_DIR') }),
|
|
34
|
+
],
|
|
35
|
+
test: {
|
|
36
|
+
name: 'storybook',
|
|
37
|
+
browser: {
|
|
38
|
+
enabled: true,
|
|
39
|
+
headless: true,
|
|
40
|
+
provider: 'playwright',
|
|
41
|
+
instances: [{ browser: 'chromium' }],
|
|
42
|
+
},
|
|
43
|
+
setupFiles: ['SETUP_FILE'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
]);
|
|
47
|
+
`;
|
|
48
|
+
export {
|
|
49
|
+
vitest_workspace_default as default
|
|
50
|
+
};
|
package/dist/bin/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
12
12
|
// ------------------------------------------------------------
|
|
13
13
|
import {
|
|
14
14
|
require_dist
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-6GIN6MWS.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-THR72EAG.js";
|
|
19
19
|
|
|
20
20
|
// src/bin/index.ts
|
|
21
21
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -25,4 +25,4 @@ var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(
|
|
|
25
25
|
import_ts_dedent.dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
26
26
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
27
27
|
), process.exit(1));
|
|
28
|
-
import("../_node-chunks/run-
|
|
28
|
+
import("../_node-chunks/run-IIT4V4GL.js");
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_n3uavwb99b from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_n3uavwb99b from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_n3uavwb99b from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_n3uavwb99b.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_n3uavwb99b.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_n3uavwb99b.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
|
doInitiate
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
16
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-5BPXECTR.js";
|
|
15
|
+
import "./_node-chunks/chunk-6GIN6MWS.js";
|
|
16
|
+
import "./_node-chunks/chunk-OQWKAX3X.js";
|
|
17
|
+
import "./_node-chunks/chunk-THR72EAG.js";
|
|
17
18
|
export {
|
|
18
19
|
doInitiate as initiate
|
|
19
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-storybook",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.6",
|
|
4
4
|
"description": "Storybook installer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"semver": "^7.7.3",
|
|
42
|
-
"storybook": "10.2.
|
|
42
|
+
"storybook": "10.2.6"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/prompts": "^2.0.9",
|