storybook 10.0.0-beta.10 → 10.0.0-beta.12
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-OSSM4NWE.js} +12 -12
- package/dist/_node-chunks/camelcase-GGFG4KN6.js +18 -0
- package/dist/_node-chunks/{chunk-WFCPBKQJ.js → chunk-55DIS7QM.js} +10 -10
- package/dist/_node-chunks/{chunk-SXR2DITB.js → chunk-6TWKDGVL.js} +7 -7
- package/dist/_node-chunks/{chunk-AOH6ABSV.js → chunk-B5SKO5PI.js} +7 -7
- package/dist/_node-chunks/{chunk-AHRH5RPR.js → chunk-C5A5EHZD.js} +7 -7
- package/dist/_node-chunks/{chunk-PTHTD4RO.js → chunk-CMSO5CKP.js} +8 -8
- package/dist/_node-chunks/{chunk-SSN5PKIY.js → chunk-D6Y5ILYC.js} +6 -6
- package/dist/_node-chunks/{chunk-QQ3Z5KGJ.js → chunk-E37BDCHA.js} +6 -6
- package/dist/_node-chunks/{chunk-TH5QVQRL.js → chunk-FEYCLHUC.js} +7 -7
- package/dist/_node-chunks/{chunk-KLVABNEU.js → chunk-FHECLS7O.js} +7 -7
- package/dist/_node-chunks/{chunk-JMXKCRWR.js → chunk-FIQDWC46.js} +7 -7
- package/dist/_node-chunks/{chunk-6CZW7AGN.js → chunk-HMQ4V7Z5.js} +7 -7
- package/dist/_node-chunks/{chunk-YHO6XR7U.js → chunk-L66JUN4K.js} +7 -7
- package/dist/_node-chunks/{chunk-KGX33KXX.js → chunk-LGYIF62P.js} +7 -7
- package/dist/_node-chunks/{chunk-ONJV3K2L.js → chunk-LLYQYHE5.js} +8 -8
- package/dist/_node-chunks/{chunk-VOUNSD2E.js → chunk-LNJG27QP.js} +7 -7
- package/dist/_node-chunks/{chunk-R54K4KSM.js → chunk-O6PZSYDR.js} +14 -10
- package/dist/_node-chunks/{chunk-C5V22GP7.js → chunk-P4A5LSOL.js} +7 -7
- package/dist/_node-chunks/{chunk-S2LZC6JK.js → chunk-P52J67ZF.js} +7 -7
- package/dist/_node-chunks/{chunk-XU45KXNQ.js → chunk-PZKOFPBC.js} +8 -8
- package/dist/_node-chunks/chunk-Q3KIVM64.js +18 -0
- package/dist/_node-chunks/{chunk-6XT5OLNL.js → chunk-Q7TTM3CS.js} +12 -12
- package/dist/_node-chunks/{chunk-XHF3WWNP.js → chunk-QEKKJKST.js} +8 -8
- package/dist/_node-chunks/{chunk-UVUGJDAI.js → chunk-QVJTCLCM.js} +14 -14
- package/dist/_node-chunks/{chunk-GUJVZUYI.js → chunk-VILCWP7X.js} +7 -7
- package/dist/_node-chunks/{chunk-JUMUXWEV.js → chunk-VYLAKHZ4.js} +7 -7
- package/dist/_node-chunks/{chunk-UV3CZ3KS.js → chunk-WCTWPKT5.js} +7 -7
- package/dist/_node-chunks/chunk-WV6BPXST.js +62 -0
- package/dist/_node-chunks/{chunk-OL6DY6BT.js → chunk-X2GOBKPX.js} +24 -23
- package/dist/_node-chunks/{chunk-IHPLRRAR.js → chunk-XZM5EEGR.js} +9 -9
- package/dist/_node-chunks/{chunk-FIROF4DV.js → chunk-ZBLA36L3.js} +7 -7
- package/dist/_node-chunks/{chunk-QRTDDTZJ.js → chunk-ZC7MGMUM.js} +9 -9
- package/dist/_node-chunks/{dist-IIC5PBL7.js → dist-MU5GUPNX.js} +9 -9
- package/dist/_node-chunks/{globby-CJACC3HJ.js → globby-O76AC2B6.js} +9 -9
- package/dist/_node-chunks/{lib-ZY4TKSOR.js → lib-LNU5U5LQ.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-3XNW3DFO.js → mdx-N42X6CFJ-XEA2YCLC.js} +8 -8
- package/dist/_node-chunks/{p-limit-R2OFT5HE.js → p-limit-YQHFHRN5.js} +7 -7
- package/dist/_node-chunks/{plugin-WAWVQMVR.js → plugin-I6VO7Z4N.js} +10 -10
- package/dist/_node-chunks/{plugin-5XD5R2KD.js → plugin-W2OFPK2T.js} +11 -11
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-SCRGJLIS.js → webpack-inject-mocker-runtime-plugin-M3ZKBWSR.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-3VAXEGG2.js → webpack-mock-plugin-PU6SBAYY.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.d.ts +5 -2
- 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 +24 -21
- package/dist/manager/runtime.js +9 -7
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +24 -21
- package/dist/node-logger/index.js +18 -15
- 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,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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
|
__name
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D6Y5ILYC.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/yocto-queue/index.js
|
|
17
17
|
var Node = class {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-FIQDWC46.js";
|
|
15
15
|
import {
|
|
16
16
|
babelParser,
|
|
17
17
|
extractMockCalls,
|
|
18
18
|
getRealPath,
|
|
19
19
|
rewriteSbMockImportCalls
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-PZKOFPBC.js";
|
|
21
21
|
import {
|
|
22
22
|
normalize
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-B5SKO5PI.js";
|
|
24
24
|
import {
|
|
25
25
|
__name
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-D6Y5ILYC.js";
|
|
27
27
|
|
|
28
28
|
// src/core-server/presets/vitePlugins/vite-mock/plugin.ts
|
|
29
29
|
import { readFileSync } from "node:fs";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-O6PZSYDR.js";
|
|
15
|
+
import "./chunk-B5SKO5PI.js";
|
|
16
16
|
import {
|
|
17
17
|
require_dist
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VILCWP7X.js";
|
|
19
19
|
import {
|
|
20
20
|
__name,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D6Y5ILYC.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,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-O6PZSYDR.js";
|
|
15
|
+
import "./chunk-B5SKO5PI.js";
|
|
16
16
|
import {
|
|
17
17
|
require_gen_mapping_umd,
|
|
18
18
|
require_trace_mapping_umd
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VYLAKHZ4.js";
|
|
20
20
|
import {
|
|
21
21
|
__commonJS,
|
|
22
22
|
__name,
|
|
23
23
|
__require
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-D6Y5ILYC.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-PU6SBAYY.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-PZKOFPBC.js";
|
|
19
|
+
import "./chunk-B5SKO5PI.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-D6Y5ILYC.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_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-55DIS7QM.js";
|
|
26
|
+
import "../_node-chunks/chunk-VYLAKHZ4.js";
|
|
27
|
+
import "../_node-chunks/chunk-LNJG27QP.js";
|
|
28
|
+
import "../_node-chunks/chunk-ZBLA36L3.js";
|
|
29
|
+
import "../_node-chunks/chunk-D6Y5ILYC.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_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-Q3KIVM64.js";
|
|
15
15
|
import {
|
|
16
16
|
globalSettings
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-CMSO5CKP.js";
|
|
18
18
|
import {
|
|
19
19
|
require_dist
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-VILCWP7X.js";
|
|
21
21
|
import {
|
|
22
22
|
require_picocolors
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
23
|
+
} from "../_node-chunks/chunk-ZBLA36L3.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-D6Y5ILYC.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_ukdptlocs4k from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-WV6BPXST.js";
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageDir
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-O6PZSYDR.js";
|
|
19
19
|
import {
|
|
20
20
|
join
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-B5SKO5PI.js";
|
|
22
22
|
import {
|
|
23
23
|
require_dist
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-VILCWP7X.js";
|
|
25
25
|
import {
|
|
26
26
|
__name,
|
|
27
27
|
__toESM
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-D6Y5ILYC.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_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-E37BDCHA.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
16
|
+
require_dist
|
|
17
|
+
} from "../_node-chunks/chunk-VILCWP7X.js";
|
|
18
|
+
import {
|
|
19
|
+
__name,
|
|
20
|
+
__toESM
|
|
21
|
+
} from "../_node-chunks/chunk-D6Y5ILYC.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_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-QEKKJKST.js";
|
|
15
|
+
import "../_node-chunks/chunk-L66JUN4K.js";
|
|
16
16
|
import {
|
|
17
17
|
Settings,
|
|
18
18
|
_clearGlobalSettings,
|
|
19
19
|
globalSettings
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-CMSO5CKP.js";
|
|
21
21
|
import {
|
|
22
22
|
any,
|
|
23
23
|
up2 as up
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-P4A5LSOL.js";
|
|
25
25
|
import {
|
|
26
26
|
invariant
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-LGYIF62P.js";
|
|
28
28
|
import {
|
|
29
29
|
resolvePackageDir
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
31
|
-
import "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-O6PZSYDR.js";
|
|
31
|
+
import "../_node-chunks/chunk-B5SKO5PI.js";
|
|
32
32
|
import {
|
|
33
33
|
require_prompts
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-WCTWPKT5.js";
|
|
35
35
|
import {
|
|
36
36
|
require_dist
|
|
37
|
-
} from "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-VILCWP7X.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-55DIS7QM.js";
|
|
44
|
+
import "../_node-chunks/chunk-VYLAKHZ4.js";
|
|
45
|
+
import "../_node-chunks/chunk-LNJG27QP.js";
|
|
46
46
|
import {
|
|
47
47
|
require_picocolors
|
|
48
|
-
} from "../_node-chunks/chunk-
|
|
48
|
+
} from "../_node-chunks/chunk-ZBLA36L3.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-D6Y5ILYC.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.d.ts
CHANGED
|
@@ -1106,9 +1106,10 @@ declare function getInterpretedFile(pathToFile: string): string | undefined;
|
|
|
1106
1106
|
|
|
1107
1107
|
declare function serverRequire(filePath: string | string[]): Promise<any> | null;
|
|
1108
1108
|
|
|
1109
|
-
declare function loadMainConfig({ configDir, cwd, }: {
|
|
1109
|
+
declare function loadMainConfig({ configDir, cwd, skipCache, }: {
|
|
1110
1110
|
configDir: string;
|
|
1111
1111
|
cwd?: string;
|
|
1112
|
+
skipCache?: boolean;
|
|
1112
1113
|
}): Promise<StorybookConfig>;
|
|
1113
1114
|
|
|
1114
1115
|
declare function loadManagerOrAddonsFile({ configDir }: {
|
|
@@ -1272,7 +1273,9 @@ declare const resolvePackageDir: (pkg: Parameters<ImportMeta["resolve"]>[0], par
|
|
|
1272
1273
|
* // Returns the default export or the entire module
|
|
1273
1274
|
* ```
|
|
1274
1275
|
*/
|
|
1275
|
-
declare function importModule(path: string
|
|
1276
|
+
declare function importModule(path: string, { skipCache }?: {
|
|
1277
|
+
skipCache?: boolean;
|
|
1278
|
+
}): Promise<any>;
|
|
1276
1279
|
/**
|
|
1277
1280
|
* Safely resolves a module specifier to its absolute file path.
|
|
1278
1281
|
*
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ukdptlocs4k from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ukdptlocs4k from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ukdptlocs4k from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ukdptlocs4k.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ukdptlocs4k.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ukdptlocs4k.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-X2GOBKPX.js";
|
|
87
|
+
import "../_node-chunks/chunk-FEYCLHUC.js";
|
|
88
88
|
import {
|
|
89
89
|
versions_default
|
|
90
|
-
} from "../_node-chunks/chunk-
|
|
90
|
+
} from "../_node-chunks/chunk-WV6BPXST.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-XZM5EEGR.js";
|
|
103
|
+
import "../_node-chunks/chunk-P4A5LSOL.js";
|
|
104
|
+
import "../_node-chunks/chunk-LGYIF62P.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-O6PZSYDR.js";
|
|
111
|
+
import "../_node-chunks/chunk-B5SKO5PI.js";
|
|
112
|
+
import "../_node-chunks/chunk-WCTWPKT5.js";
|
|
113
|
+
import "../_node-chunks/chunk-P52J67ZF.js";
|
|
114
|
+
import "../_node-chunks/chunk-FHECLS7O.js";
|
|
115
|
+
import "../_node-chunks/chunk-VILCWP7X.js";
|
|
116
|
+
import "../_node-chunks/chunk-ZBLA36L3.js";
|
|
117
|
+
import "../_node-chunks/chunk-D6Y5ILYC.js";
|
|
118
118
|
export {
|
|
119
119
|
COMMON_ENV_VARS,
|
|
120
120
|
DEFAULT_FILES_PATTERN,
|