storybook 10.1.0-alpha.11 → 10.1.0-alpha.13
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/_browser-chunks/{chunk-74YHFU5B.js → chunk-2XZMBGTA.js} +1 -1
- package/dist/_browser-chunks/{chunk-EBHB6RPS.js → chunk-FQ7SLVLR.js} +6 -1
- package/dist/_browser-chunks/{chunk-X3DUQ5RA.js → chunk-GFY5R5EY.js} +1 -1
- package/dist/_node-chunks/{builder-manager-PMPHOSM2.js → builder-manager-DWDUVXZM.js} +27 -22
- package/dist/_node-chunks/{chunk-MJ3WOS6F.js → camelcase-EETCRTJX.js} +8 -8
- package/dist/_node-chunks/{chunk-UY26MQLT.js → chunk-2W4GZCLE.js} +7 -7
- package/dist/_node-chunks/chunk-447655DM.js +20 -0
- package/dist/_node-chunks/{chunk-GG2WQZSG.js → chunk-4EJUC2SD.js} +4998 -1685
- package/dist/_node-chunks/chunk-4ZJOH2UN.js +61 -0
- package/dist/_node-chunks/chunk-654SJIMS.js +23 -0
- package/dist/_node-chunks/{chunk-5QK5MSOI.js → chunk-7IAVT2FU.js} +7 -7
- package/dist/_node-chunks/{chunk-WLHMN7AP.js → chunk-7KFHRNOT.js} +7 -7
- package/dist/_node-chunks/{chunk-6ZOLETQK.js → chunk-AZIPBEBK.js} +6 -6
- package/dist/_node-chunks/{chunk-AKTRSR3O.js → chunk-B76FDKVB.js} +6 -6
- package/dist/_node-chunks/chunk-B7PGKETD.js +3781 -0
- package/dist/_node-chunks/{chunk-QECOQWRJ.js → chunk-CLUBH2LP.js} +55 -36
- package/dist/_node-chunks/{chunk-PHOZWZZO.js → chunk-CMYD2JNN.js} +7 -7
- package/dist/_node-chunks/{chunk-LR3QITDI.js → chunk-DIPKXLEP.js} +55 -32
- package/dist/_node-chunks/{chunk-4GZCFQFG.js → chunk-DPFYWXEA.js} +6 -6
- package/dist/_node-chunks/{chunk-LCZO45L7.js → chunk-FCVNHU2F.js} +7 -7
- package/dist/_node-chunks/{chunk-R6HWGZWD.js → chunk-JQ7RQS5Q.js} +6 -6
- package/dist/_node-chunks/chunk-LEL5OSY3.js +18 -0
- package/dist/_node-chunks/{chunk-BBOP3XCK.js → chunk-LPKSBF62.js} +6 -6
- package/dist/_node-chunks/chunk-LYEZOJ43.js +78 -0
- package/dist/_node-chunks/{chunk-ZZALGOA6.js → chunk-MIA5324I.js} +7 -7
- package/dist/_node-chunks/{chunk-SPQXMU2Q.js → chunk-MJM4TEMP.js} +14 -8
- package/dist/_node-chunks/{chunk-32NE3UE3.js → chunk-OVVZIUHS.js} +7 -7
- package/dist/_node-chunks/{chunk-ZZSRFAC6.js → chunk-RUUNVQ6W.js} +1108 -17
- package/dist/_node-chunks/{chunk-YHRFI6BE.js → chunk-URLNGLC2.js} +52 -72
- package/dist/_node-chunks/{chunk-XGVLB4UJ.js → chunk-WC2YEQHJ.js} +6 -6
- package/dist/_node-chunks/{chunk-JCRM2YVK.js → chunk-XKRVQL2G.js} +8 -8
- package/dist/_node-chunks/{chunk-TXZY6V6O.js → chunk-Z2OWEMX3.js} +8 -8
- package/dist/_node-chunks/{dist-4DWOCZUD.js → dist-22CLJ4BC.js} +9 -9
- package/dist/_node-chunks/{globby-AAARUKEU.js → globby-GR24TGSK.js} +9 -9
- package/dist/_node-chunks/{lib-HEUKGL62.js → lib-G2LGVRPC.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-DCVRPS6N.js → mdx-N42X6CFJ-W6P6IDDW.js} +8 -8
- package/dist/_node-chunks/{p-limit-F5ZKJ6WZ.js → p-limit-K4FZHG2F.js} +7 -7
- package/dist/babel/index.js +10 -11
- package/dist/bin/core.js +32 -26
- package/dist/bin/dispatcher.js +31 -20
- package/dist/bin/loader.js +10 -13
- package/dist/cli/index.d.ts +692 -133
- package/dist/cli/index.js +1005 -177
- package/dist/common/index.d.ts +139 -62
- package/dist/common/index.js +63 -49
- package/dist/core-server/index.d.ts +3 -2
- package/dist/core-server/index.js +96 -1413
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -65
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +32 -3
- package/dist/manager/runtime.js +1 -1
- package/dist/manager-api/index.d.ts +1 -1
- package/dist/manager-api/index.js +4 -4
- package/dist/manager-errors.d.ts +6 -0
- package/dist/manager-errors.js +2 -2
- package/dist/mocking-utils/index.d.ts +1126 -0
- package/dist/{_node-chunks/chunk-UGDPX5LE.js → mocking-utils/index.js} +441 -16
- package/dist/node-logger/index.d.ts +192 -24
- package/dist/node-logger/index.js +23 -3148
- package/dist/preview/runtime.js +31 -2
- package/dist/preview-api/index.d.ts +69 -68
- package/dist/preview-errors.d.ts +6 -0
- package/dist/preview-errors.js +2 -2
- package/dist/server-errors.d.ts +31 -1
- package/dist/server-errors.js +17 -10
- package/dist/telemetry/index.d.ts +23 -2
- package/dist/telemetry/index.js +25 -24
- package/dist/types/index.d.ts +71 -8
- package/dist/types/index.js +25 -1
- package/package.json +7 -9
- package/dist/_node-chunks/camelcase-K3IOOFQW.js +0 -18
- package/dist/_node-chunks/chunk-7I22Y76Z.js +0 -1047
- package/dist/_node-chunks/chunk-C2GQVDWI.js +0 -34
- package/dist/_node-chunks/chunk-GQJOWVVR.js +0 -3214
- package/dist/_node-chunks/chunk-KK4AT5F3.js +0 -1029
- package/dist/_node-chunks/chunk-L7MYXJUM.js +0 -1114
- package/dist/_node-chunks/chunk-LXG4DK35.js +0 -3171
- package/dist/_node-chunks/chunk-QH4V5YDB.js +0 -20
- package/dist/_node-chunks/chunk-WK3EMYK6.js +0 -61
- package/dist/_node-chunks/chunk-YK4KVMFW.js +0 -18
- package/dist/_node-chunks/chunk-ZZPBSYA5.js +0 -301
- package/dist/_node-chunks/plugin-7YY7JXCH.js +0 -123
- package/dist/_node-chunks/plugin-SZP3CW6W.js +0 -109
- package/dist/_node-chunks/webpack-inject-mocker-runtime-plugin-TGKNDPO6.js +0 -46623
- package/dist/_node-chunks/webpack-mock-plugin-LNTZZFBE.js +0 -92
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +0 -32
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +0 -28
package/dist/bin/dispatcher.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_h0pwn2pcb57 from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_h0pwn2pcb57 from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_h0pwn2pcb57 from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_h0pwn2pcb57.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h0pwn2pcb57.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.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-4ZJOH2UN.js";
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageDir
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-MJM4TEMP.js";
|
|
19
19
|
import {
|
|
20
20
|
join
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-LPKSBF62.js";
|
|
22
22
|
import {
|
|
23
23
|
require_dist
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-CMYD2JNN.js";
|
|
25
25
|
import {
|
|
26
26
|
__toESM
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-WC2YEQHJ.js";
|
|
28
28
|
|
|
29
29
|
// src/bin/dispatcher.ts
|
|
30
|
-
import { spawn } from "node:child_process";
|
|
31
30
|
import { pathToFileURL } from "node:url";
|
|
31
|
+
import { executeCommand, executeNodeCommand } from "storybook/internal/common";
|
|
32
32
|
import { logger } from "storybook/internal/node-logger";
|
|
33
33
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
34
34
|
var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(Number);
|
|
@@ -48,20 +48,31 @@ async function run() {
|
|
|
48
48
|
} : {
|
|
49
49
|
pkg: "@storybook/cli",
|
|
50
50
|
args
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
52
|
try {
|
|
53
53
|
let { default: targetCliPackageJson } = await import(`${targetCli.pkg}/package.json`, {
|
|
54
54
|
with: { type: "json" }
|
|
55
55
|
});
|
|
56
|
-
targetCliPackageJson.version === versions_default[targetCli.pkg]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
if (targetCliPackageJson.version === versions_default[targetCli.pkg]) {
|
|
57
|
+
executeNodeCommand({
|
|
58
|
+
scriptPath: join(resolvePackageDir(targetCli.pkg), "dist/bin/index.js"),
|
|
59
|
+
args: targetCli.args,
|
|
60
|
+
options: {
|
|
61
|
+
stdio: "inherit"
|
|
62
|
+
}
|
|
63
|
+
}).on("exit", (code) => {
|
|
64
|
+
process.exit(code ?? 1);
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
61
68
|
} catch {
|
|
62
69
|
}
|
|
63
|
-
|
|
64
|
-
|
|
70
|
+
executeCommand({
|
|
71
|
+
command: "npx",
|
|
72
|
+
args: ["--yes", `${targetCli.pkg}@${versions_default[targetCli.pkg]}`, ...targetCli.args],
|
|
73
|
+
stdio: "inherit"
|
|
74
|
+
}).on("exit", (code) => {
|
|
75
|
+
process.exit(code ?? 1);
|
|
65
76
|
});
|
|
66
77
|
}
|
|
67
78
|
run();
|
package/dist/bin/loader.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_h0pwn2pcb57 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_h0pwn2pcb57 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_h0pwn2pcb57 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_h0pwn2pcb57.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h0pwn2pcb57.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_h0pwn2pcb57.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-AZIPBEBK.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-CMYD2JNN.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-WC2YEQHJ.js";
|
|
21
21
|
|
|
22
22
|
// src/bin/loader.ts
|
|
23
23
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -41,10 +41,7 @@ function resolveWithExtension(importPath, currentFilePath) {
|
|
|
41
41
|
if (path.extname(importPath))
|
|
42
42
|
return importPath;
|
|
43
43
|
deprecate(import_ts_dedent.dedent`One or more extensionless imports detected: "${importPath}" in file "${currentFilePath}".
|
|
44
|
-
For maximum compatibility, you should add an explicit file extension to this import.
|
|
45
|
-
Storybook will attempt to resolve it automatically, but this may change in the future.
|
|
46
|
-
If adding the extension results in an error from TypeScript, we recommend setting moduleResolution to "bundler" in tsconfig.json
|
|
47
|
-
or alternatively look into the allowImportingTsExtensions option.`);
|
|
44
|
+
For maximum compatibility, you should add an explicit file extension to this import. Storybook will attempt to resolve it automatically, but this may change in the future. If adding the extension results in an error from TypeScript, we recommend setting moduleResolution to "bundler" in tsconfig.json or alternatively look into the allowImportingTsExtensions option.`);
|
|
48
45
|
let currentDir = path.dirname(currentFilePath), absolutePath = path.resolve(currentDir, importPath);
|
|
49
46
|
for (let ext of supportedExtensions) {
|
|
50
47
|
let candidatePath = `${absolutePath}${ext}`;
|