storybook 10.0.0-beta.10 → 10.0.0-beta.11
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/{builder-manager-SJGIDEN6.js → builder-manager-VLFDK43H.js} +12 -12
- package/dist/_node-chunks/camelcase-RENSEFK6.js +18 -0
- package/dist/_node-chunks/{chunk-JUMUXWEV.js → chunk-4SPBIDJV.js} +7 -7
- package/dist/_node-chunks/{chunk-JMXKCRWR.js → chunk-4WZFG35Z.js} +7 -7
- package/dist/_node-chunks/{chunk-WFCPBKQJ.js → chunk-5K7G6NFK.js} +10 -10
- package/dist/_node-chunks/{chunk-TH5QVQRL.js → chunk-5NSMDC6F.js} +7 -7
- package/dist/_node-chunks/{chunk-KLVABNEU.js → chunk-5THWZTEL.js} +7 -7
- package/dist/_node-chunks/{chunk-C5V22GP7.js → chunk-7MUMULSR.js} +7 -7
- package/dist/_node-chunks/{chunk-R54K4KSM.js → chunk-7QAAJL75.js} +8 -8
- package/dist/_node-chunks/{chunk-OL6DY6BT.js → chunk-DVY3VWHZ.js} +21 -21
- package/dist/_node-chunks/{chunk-GUJVZUYI.js → chunk-EBLOP2C5.js} +7 -7
- package/dist/_node-chunks/{chunk-VOUNSD2E.js → chunk-EF56ZUQY.js} +7 -7
- package/dist/_node-chunks/{chunk-6CZW7AGN.js → chunk-ER2UQBIA.js} +7 -7
- package/dist/_node-chunks/chunk-GHICGP2P.js +18 -0
- package/dist/_node-chunks/{chunk-XHF3WWNP.js → chunk-GYBN5GXT.js} +8 -8
- package/dist/_node-chunks/{chunk-6XT5OLNL.js → chunk-H2YBWE3T.js} +12 -12
- package/dist/_node-chunks/{chunk-YHO6XR7U.js → chunk-HYMBYTGJ.js} +7 -7
- package/dist/_node-chunks/{chunk-SSN5PKIY.js → chunk-Q5IJJX3T.js} +6 -6
- package/dist/_node-chunks/{chunk-AHRH5RPR.js → chunk-QLRMR54O.js} +7 -7
- package/dist/_node-chunks/{chunk-UV3CZ3KS.js → chunk-QSNDRP62.js} +7 -7
- package/dist/_node-chunks/{chunk-IHPLRRAR.js → chunk-S2RQAF7K.js} +9 -9
- package/dist/_node-chunks/{chunk-QRTDDTZJ.js → chunk-SDZVOIZI.js} +9 -9
- package/dist/_node-chunks/{chunk-QQ3Z5KGJ.js → chunk-SGJZDMJW.js} +6 -6
- package/dist/_node-chunks/{chunk-UVUGJDAI.js → chunk-TJOIDMXP.js} +14 -14
- package/dist/_node-chunks/{chunk-AOH6ABSV.js → chunk-U2UIPLJI.js} +7 -7
- package/dist/_node-chunks/{chunk-XU45KXNQ.js → chunk-UAMXREF3.js} +8 -8
- package/dist/_node-chunks/{chunk-ONJV3K2L.js → chunk-UC6O5PNX.js} +8 -8
- package/dist/_node-chunks/{chunk-KGX33KXX.js → chunk-VFUP6Z4J.js} +7 -7
- package/dist/_node-chunks/{chunk-PTHTD4RO.js → chunk-XKPJCSPD.js} +8 -8
- package/dist/_node-chunks/{chunk-S2LZC6JK.js → chunk-XWCQWB3R.js} +7 -7
- package/dist/_node-chunks/{chunk-SXR2DITB.js → chunk-XYFEBEHY.js} +7 -7
- package/dist/_node-chunks/chunk-YAEIMHFX.js +62 -0
- package/dist/_node-chunks/{chunk-FIROF4DV.js → chunk-ZHBCPKYD.js} +7 -7
- package/dist/_node-chunks/{dist-IIC5PBL7.js → dist-A2RPEHEC.js} +9 -9
- package/dist/_node-chunks/{globby-CJACC3HJ.js → globby-3TWPXGQS.js} +9 -9
- package/dist/_node-chunks/{lib-ZY4TKSOR.js → lib-MUNM6ZJ6.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-3XNW3DFO.js → mdx-N42X6CFJ-QQDHJZQ3.js} +8 -8
- package/dist/_node-chunks/{p-limit-R2OFT5HE.js → p-limit-FEN55OV6.js} +7 -7
- package/dist/_node-chunks/{plugin-5XD5R2KD.js → plugin-ESAYNJ5V.js} +11 -11
- package/dist/_node-chunks/{plugin-WAWVQMVR.js → plugin-GDMP3JPR.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-SCRGJLIS.js → webpack-inject-mocker-runtime-plugin-5AKTLYIV.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-3VAXEGG2.js → webpack-mock-plugin-AWGZ65AQ.js} +9 -9
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +11 -11
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +77 -12
- package/dist/cli/index.js +21 -20
- package/dist/common/index.js +20 -20
- package/dist/core-server/index.js +34 -34
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +22 -22
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +1 -1
- package/dist/manager/runtime.js +8 -6
- package/dist/manager-api/index.js +1 -1
- package/dist/node-logger/index.js +14 -14
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +23 -23
- package/package.json +1 -1
- package/dist/_node-chunks/camelcase-VZHWABQV.js +0 -18
- package/dist/_node-chunks/chunk-SFJFSPRT.js +0 -62
- package/dist/_node-chunks/chunk-U34NWAU2.js +0 -18
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7QAAJL75.js";
|
|
15
|
+
import "./chunk-U2UIPLJI.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EBLOP2C5.js";
|
|
19
19
|
import {
|
|
20
20
|
__name,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q5IJJX3T.js";
|
|
23
23
|
|
|
24
24
|
// src/core-server/presets/vitePlugins/vite-inject-mocker/plugin.ts
|
|
25
25
|
import { readFileSync } from "node:fs";
|
|
@@ -41,7 +41,7 @@ __name(escapeRegex, "escapeRegex");
|
|
|
41
41
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
42
42
|
var entryPath = "/vite-inject-mocker-entry.js";
|
|
43
43
|
var entryCode = import_ts_dedent.dedent`
|
|
44
|
-
<script type="module" src="
|
|
44
|
+
<script type="module" src=".${entryPath}"></script>
|
|
45
45
|
`;
|
|
46
46
|
var server;
|
|
47
47
|
var viteInjectMockerRuntime = /* @__PURE__ */ __name((options) => {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
getAutomockCode
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4WZFG35Z.js";
|
|
15
15
|
import {
|
|
16
16
|
babelParser,
|
|
17
17
|
extractMockCalls,
|
|
18
18
|
getRealPath,
|
|
19
19
|
rewriteSbMockImportCalls
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-UAMXREF3.js";
|
|
21
21
|
import {
|
|
22
22
|
normalize
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-U2UIPLJI.js";
|
|
24
24
|
import {
|
|
25
25
|
__name
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Q5IJJX3T.js";
|
|
27
27
|
|
|
28
28
|
// src/core-server/presets/vitePlugins/vite-mock/plugin.ts
|
|
29
29
|
import { readFileSync } from "node:fs";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-7QAAJL75.js";
|
|
15
|
+
import "./chunk-U2UIPLJI.js";
|
|
16
16
|
import {
|
|
17
17
|
require_gen_mapping_umd,
|
|
18
18
|
require_trace_mapping_umd
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4SPBIDJV.js";
|
|
20
20
|
import {
|
|
21
21
|
__commonJS,
|
|
22
22
|
__name,
|
|
23
23
|
__require
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q5IJJX3T.js";
|
|
25
25
|
|
|
26
26
|
// ../node_modules/lodash/_freeGlobal.js
|
|
27
27
|
var require_freeGlobal = __commonJS({
|
package/dist/_node-chunks/{webpack-mock-plugin-3VAXEGG2.js → webpack-mock-plugin-AWGZ65AQ.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
getIsExternal,
|
|
16
16
|
resolveExternalModule,
|
|
17
17
|
resolveWithExtensions
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-UAMXREF3.js";
|
|
19
|
+
import "./chunk-U2UIPLJI.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-Q5IJJX3T.js";
|
|
23
23
|
|
|
24
24
|
// src/core-server/presets/webpack/plugins/webpack-mock-plugin.ts
|
|
25
25
|
import { createRequire } from "node:module";
|
package/dist/babel/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
recast,
|
|
23
23
|
traverse,
|
|
24
24
|
types
|
|
25
|
-
} from "../_node-chunks/chunk-
|
|
26
|
-
import "../_node-chunks/chunk-
|
|
27
|
-
import "../_node-chunks/chunk-
|
|
28
|
-
import "../_node-chunks/chunk-
|
|
29
|
-
import "../_node-chunks/chunk-
|
|
25
|
+
} from "../_node-chunks/chunk-5K7G6NFK.js";
|
|
26
|
+
import "../_node-chunks/chunk-4SPBIDJV.js";
|
|
27
|
+
import "../_node-chunks/chunk-EF56ZUQY.js";
|
|
28
|
+
import "../_node-chunks/chunk-ZHBCPKYD.js";
|
|
29
|
+
import "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
30
30
|
var export_transformSync = import_core.transformSync;
|
|
31
31
|
export {
|
|
32
32
|
BabelFileClass,
|
package/dist/bin/core.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
version
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-GHICGP2P.js";
|
|
15
15
|
import {
|
|
16
16
|
globalSettings
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-XKPJCSPD.js";
|
|
18
18
|
import {
|
|
19
19
|
require_dist
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-EBLOP2C5.js";
|
|
21
21
|
import {
|
|
22
22
|
require_picocolors
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
23
|
+
} from "../_node-chunks/chunk-ZHBCPKYD.js";
|
|
24
24
|
import {
|
|
25
25
|
__commonJS,
|
|
26
26
|
__name,
|
|
27
27
|
__require,
|
|
28
28
|
__toESM
|
|
29
|
-
} from "../_node-chunks/chunk-
|
|
29
|
+
} from "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
30
30
|
|
|
31
31
|
// ../node_modules/commander/lib/error.js
|
|
32
32
|
var require_error = __commonJS({
|
package/dist/bin/dispatcher.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
versions_default
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-YAEIMHFX.js";
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageDir
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-7QAAJL75.js";
|
|
19
19
|
import {
|
|
20
20
|
join
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-U2UIPLJI.js";
|
|
22
22
|
import {
|
|
23
23
|
require_dist
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-EBLOP2C5.js";
|
|
25
25
|
import {
|
|
26
26
|
__name,
|
|
27
27
|
__toESM
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
29
29
|
|
|
30
30
|
// src/bin/dispatcher.ts
|
|
31
31
|
import { spawn } from "node:child_process";
|
package/dist/bin/loader.js
CHANGED
|
@@ -1,42 +1,107 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
NODE_TARGET
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-SGJZDMJW.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
require_dist
|
|
17
|
+
} from "../_node-chunks/chunk-EBLOP2C5.js";
|
|
18
|
+
import {
|
|
19
|
+
__name,
|
|
20
|
+
__toESM
|
|
21
|
+
} from "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
18
22
|
|
|
19
23
|
// src/bin/loader.ts
|
|
24
|
+
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
25
|
+
import { existsSync } from "node:fs";
|
|
20
26
|
import { readFile } from "node:fs/promises";
|
|
27
|
+
import * as path from "node:path";
|
|
21
28
|
import { fileURLToPath } from "node:url";
|
|
29
|
+
import { deprecate } from "storybook/internal/node-logger";
|
|
22
30
|
import { transform } from "esbuild";
|
|
31
|
+
var supportedExtensions = [
|
|
32
|
+
".js",
|
|
33
|
+
".mjs",
|
|
34
|
+
".cjs",
|
|
35
|
+
".jsx",
|
|
36
|
+
".ts",
|
|
37
|
+
".mts",
|
|
38
|
+
".cts",
|
|
39
|
+
".tsx"
|
|
40
|
+
];
|
|
41
|
+
function resolveWithExtension(importPath, currentFilePath) {
|
|
42
|
+
if (path.extname(importPath)) {
|
|
43
|
+
return importPath;
|
|
44
|
+
}
|
|
45
|
+
deprecate(import_ts_dedent.dedent`One or more extensionless imports detected: "${importPath}" in file "${currentFilePath}".
|
|
46
|
+
For maximum compatibility, you should add an explicit file extension to this import.
|
|
47
|
+
Storybook will attempt to resolve it automatically, but this may change in the future.
|
|
48
|
+
If adding the extension results in an error from TypeScript, we recommend setting moduleResolution to "bundler" in tsconfig.json
|
|
49
|
+
or alternatively look into the allowImportingTsExtensions option.`);
|
|
50
|
+
const currentDir = path.dirname(currentFilePath);
|
|
51
|
+
const absolutePath = path.resolve(currentDir, importPath);
|
|
52
|
+
for (const ext of supportedExtensions) {
|
|
53
|
+
const candidatePath = `${absolutePath}${ext}`;
|
|
54
|
+
if (existsSync(candidatePath)) {
|
|
55
|
+
return `${importPath}${ext}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return importPath;
|
|
59
|
+
}
|
|
60
|
+
__name(resolveWithExtension, "resolveWithExtension");
|
|
61
|
+
function addExtensionsToRelativeImports(source, filePath) {
|
|
62
|
+
const patterns = [
|
|
63
|
+
// import/export ... from './path' or "../path" (including side-effect imports)
|
|
64
|
+
/(\b(?:import|export)\s+(?:[^'"]*?\s+from\s+)?['"])(\.[^'"]+)(['"])/g,
|
|
65
|
+
// import('./path') or import("../path") - dynamic imports with quotes (with closing paren, no concatenation)
|
|
66
|
+
/(\bimport\s*\(\s*['"])(\.[^'"]+)(['"]\s*\))/g,
|
|
67
|
+
// import(`./path`) - dynamic imports with backticks (with closing paren, no template interpolation)
|
|
68
|
+
/(\bimport\s*\(\s*`)(\.[^`$]+)(`\s*\))/g
|
|
69
|
+
];
|
|
70
|
+
let result = source;
|
|
71
|
+
for (const pattern of patterns) {
|
|
72
|
+
result = result.replace(pattern, (match, prefix, path2, suffix) => {
|
|
73
|
+
if (path2.startsWith("./") || path2.startsWith("../")) {
|
|
74
|
+
const resolvedPath = resolveWithExtension(path2, filePath);
|
|
75
|
+
return `${prefix}${resolvedPath}${suffix}`;
|
|
76
|
+
}
|
|
77
|
+
return match;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
__name(addExtensionsToRelativeImports, "addExtensionsToRelativeImports");
|
|
23
83
|
var load = /* @__PURE__ */ __name(async (url, context, nextLoad) => {
|
|
24
84
|
if (url.endsWith(".ts") || url.endsWith(".tsx") || url.endsWith(".mts") || url.endsWith(".cts") || url.endsWith(".mtsx") || url.endsWith(".ctsx")) {
|
|
25
|
-
const
|
|
85
|
+
const filePath = fileURLToPath(url);
|
|
86
|
+
const rawSource = await readFile(filePath, "utf-8");
|
|
26
87
|
const transformedSource = await transform(rawSource, {
|
|
27
88
|
loader: "ts",
|
|
28
89
|
target: NODE_TARGET,
|
|
29
90
|
format: "esm",
|
|
30
91
|
platform: "neutral"
|
|
31
92
|
});
|
|
93
|
+
const sourceWithExtensions = addExtensionsToRelativeImports(transformedSource.code, filePath);
|
|
32
94
|
return {
|
|
33
95
|
format: "module",
|
|
34
96
|
shortCircuit: true,
|
|
35
|
-
source:
|
|
97
|
+
source: sourceWithExtensions
|
|
36
98
|
};
|
|
37
99
|
}
|
|
38
100
|
return nextLoad(url, context);
|
|
39
101
|
}, "load");
|
|
40
102
|
export {
|
|
41
|
-
|
|
103
|
+
addExtensionsToRelativeImports,
|
|
104
|
+
load,
|
|
105
|
+
resolveWithExtension,
|
|
106
|
+
supportedExtensions
|
|
42
107
|
};
|
package/dist/cli/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.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
|
boxen
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-GYBN5GXT.js";
|
|
15
|
+
import "../_node-chunks/chunk-HYMBYTGJ.js";
|
|
16
16
|
import {
|
|
17
17
|
Settings,
|
|
18
18
|
_clearGlobalSettings,
|
|
19
19
|
globalSettings
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-XKPJCSPD.js";
|
|
21
21
|
import {
|
|
22
22
|
any,
|
|
23
23
|
up2 as up
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-7MUMULSR.js";
|
|
25
25
|
import {
|
|
26
26
|
invariant
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-VFUP6Z4J.js";
|
|
28
28
|
import {
|
|
29
29
|
resolvePackageDir
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
31
|
-
import "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-7QAAJL75.js";
|
|
31
|
+
import "../_node-chunks/chunk-U2UIPLJI.js";
|
|
32
32
|
import {
|
|
33
33
|
require_prompts
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-QSNDRP62.js";
|
|
35
35
|
import {
|
|
36
36
|
require_dist
|
|
37
|
-
} from "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-EBLOP2C5.js";
|
|
38
38
|
import {
|
|
39
39
|
babelParse,
|
|
40
40
|
recast,
|
|
41
41
|
traverse,
|
|
42
42
|
types
|
|
43
|
-
} from "../_node-chunks/chunk-
|
|
44
|
-
import "../_node-chunks/chunk-
|
|
45
|
-
import "../_node-chunks/chunk-
|
|
43
|
+
} from "../_node-chunks/chunk-5K7G6NFK.js";
|
|
44
|
+
import "../_node-chunks/chunk-4SPBIDJV.js";
|
|
45
|
+
import "../_node-chunks/chunk-EF56ZUQY.js";
|
|
46
46
|
import {
|
|
47
47
|
require_picocolors
|
|
48
|
-
} from "../_node-chunks/chunk-
|
|
48
|
+
} from "../_node-chunks/chunk-ZHBCPKYD.js";
|
|
49
49
|
import {
|
|
50
50
|
__commonJS,
|
|
51
51
|
__name,
|
|
52
52
|
__require,
|
|
53
53
|
__toESM
|
|
54
|
-
} from "../_node-chunks/chunk-
|
|
54
|
+
} from "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
55
55
|
|
|
56
56
|
// ../node_modules/wrappy/wrappy.js
|
|
57
57
|
var require_wrappy = __commonJS({
|
|
@@ -28106,6 +28106,7 @@ async function detectBuilder(packageManager, projectType) {
|
|
|
28106
28106
|
return "webpack5" /* Webpack5 */;
|
|
28107
28107
|
}
|
|
28108
28108
|
switch (projectType) {
|
|
28109
|
+
case "REACT_NATIVE_AND_RNW" /* REACT_NATIVE_AND_RNW */:
|
|
28109
28110
|
case "REACT_NATIVE_WEB" /* REACT_NATIVE_WEB */:
|
|
28110
28111
|
return "vite" /* Vite */;
|
|
28111
28112
|
case "REACT_SCRIPTS" /* REACT_SCRIPTS */:
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_91hxho9jtpf from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_91hxho9jtpf from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_91hxho9jtpf from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_91hxho9jtpf.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_91hxho9jtpf.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_91hxho9jtpf.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -83,11 +83,11 @@ import {
|
|
|
83
83
|
transformImportFiles,
|
|
84
84
|
validateConfigurationFiles,
|
|
85
85
|
validateFrameworkName
|
|
86
|
-
} from "../_node-chunks/chunk-
|
|
87
|
-
import "../_node-chunks/chunk-
|
|
86
|
+
} from "../_node-chunks/chunk-DVY3VWHZ.js";
|
|
87
|
+
import "../_node-chunks/chunk-5NSMDC6F.js";
|
|
88
88
|
import {
|
|
89
89
|
versions_default
|
|
90
|
-
} from "../_node-chunks/chunk-
|
|
90
|
+
} from "../_node-chunks/chunk-YAEIMHFX.js";
|
|
91
91
|
import {
|
|
92
92
|
findFilesUp,
|
|
93
93
|
getProjectRoot,
|
|
@@ -99,22 +99,22 @@ import {
|
|
|
99
99
|
optionalEnvToBoolean,
|
|
100
100
|
stringifyEnvs,
|
|
101
101
|
stringifyProcessEnvs
|
|
102
|
-
} from "../_node-chunks/chunk-
|
|
103
|
-
import "../_node-chunks/chunk-
|
|
104
|
-
import "../_node-chunks/chunk-
|
|
102
|
+
} from "../_node-chunks/chunk-S2RQAF7K.js";
|
|
103
|
+
import "../_node-chunks/chunk-7MUMULSR.js";
|
|
104
|
+
import "../_node-chunks/chunk-VFUP6Z4J.js";
|
|
105
105
|
import {
|
|
106
106
|
importMetaResolve,
|
|
107
107
|
importModule,
|
|
108
108
|
resolvePackageDir,
|
|
109
109
|
safeResolveModule
|
|
110
|
-
} from "../_node-chunks/chunk-
|
|
111
|
-
import "../_node-chunks/chunk-
|
|
112
|
-
import "../_node-chunks/chunk-
|
|
113
|
-
import "../_node-chunks/chunk-
|
|
114
|
-
import "../_node-chunks/chunk-
|
|
115
|
-
import "../_node-chunks/chunk-
|
|
116
|
-
import "../_node-chunks/chunk-
|
|
117
|
-
import "../_node-chunks/chunk-
|
|
110
|
+
} from "../_node-chunks/chunk-7QAAJL75.js";
|
|
111
|
+
import "../_node-chunks/chunk-U2UIPLJI.js";
|
|
112
|
+
import "../_node-chunks/chunk-QSNDRP62.js";
|
|
113
|
+
import "../_node-chunks/chunk-XWCQWB3R.js";
|
|
114
|
+
import "../_node-chunks/chunk-5THWZTEL.js";
|
|
115
|
+
import "../_node-chunks/chunk-EBLOP2C5.js";
|
|
116
|
+
import "../_node-chunks/chunk-ZHBCPKYD.js";
|
|
117
|
+
import "../_node-chunks/chunk-Q5IJJX3T.js";
|
|
118
118
|
export {
|
|
119
119
|
COMMON_ENV_VARS,
|
|
120
120
|
DEFAULT_FILES_PATTERN,
|