storybook 10.1.3 → 10.1.5
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-2XZMBGTA.js → chunk-7S2XPX5M.js} +1 -1
- package/dist/_browser-chunks/{chunk-SS2NHR7W.js → chunk-GPBRNGY5.js} +1 -1
- package/dist/{_node-chunks/chunk-U6IY6QQN.js → _browser-chunks/chunk-JVRDBUUP.js} +20 -13
- package/dist/_browser-chunks/{chunk-GFY5R5EY.js → chunk-V5NV5R37.js} +1 -1
- package/dist/_node-chunks/{builder-manager-N4D23FLX.js → builder-manager-ZXJBDRXR.js} +12 -12
- package/dist/_node-chunks/{camelcase-EXGV75P2.js → camelcase-WRTIKEO6.js} +7 -7
- package/dist/_node-chunks/{chunk-A7QREOLM.js → chunk-255LKCUD.js} +6 -6
- package/dist/_node-chunks/chunk-3GJDB3VJ.js +18 -0
- package/dist/_node-chunks/{chunk-CD52AW7X.js → chunk-3N5PBWO5.js} +9 -9
- package/dist/_node-chunks/{chunk-TCNV3SSR.js → chunk-52EAUB7R.js} +7 -7
- package/dist/_node-chunks/{chunk-4FES3Z32.js → chunk-56BVIMJO.js} +7 -7
- package/dist/_node-chunks/{chunk-IHWETTDK.js → chunk-5H7WLGZC.js} +7 -7
- package/dist/_node-chunks/{chunk-RIFAW6Y4.js → chunk-AJ7QOTOZ.js} +43 -27
- package/dist/{_browser-chunks/chunk-FQ7SLVLR.js → _node-chunks/chunk-B2EXFXPG.js} +32 -1
- package/dist/_node-chunks/{chunk-3PAK6HOZ.js → chunk-C3CWELCD.js} +7 -7
- package/dist/_node-chunks/{chunk-EE622TFR.js → chunk-CUUCEXYW.js} +6 -6
- package/dist/_node-chunks/chunk-EBMWZDZG.js +23 -0
- package/dist/_node-chunks/{chunk-PDCQDYS4.js → chunk-FCQVKOY4.js} +72 -11
- package/dist/_node-chunks/{chunk-2S4J6WRI.js → chunk-FD76ZM2X.js} +8 -8
- package/dist/_node-chunks/{chunk-J33WT6V7.js → chunk-GJ5FSAL5.js} +6 -6
- package/dist/_node-chunks/{chunk-RCCMX64R.js → chunk-GUCJOBT7.js} +6 -6
- package/dist/_node-chunks/{chunk-EY7WWLFP.js → chunk-HNDTWAF5.js} +7 -7
- package/dist/_node-chunks/{chunk-W77J252D.js → chunk-ITMM32VP.js} +9 -9
- package/dist/_node-chunks/{chunk-KQCVPCQD.js → chunk-KYHFIXVV.js} +6 -6
- package/dist/_node-chunks/{chunk-O5HLDMLW.js → chunk-PL7KUITS.js} +12 -12
- package/dist/_node-chunks/{chunk-TTAIHANB.js → chunk-QCZPELNP.js} +7 -7
- package/dist/_node-chunks/{chunk-745ARPQW.js → chunk-RZ3SV46Y.js} +40 -24
- package/dist/_node-chunks/{chunk-V6NSKAAJ.js → chunk-SNGQFKE7.js} +7 -7
- package/dist/_node-chunks/{chunk-4K33EHJJ.js → chunk-VGBOM5PD.js} +21 -17
- package/dist/_node-chunks/chunk-VRODUWUT.js +61 -0
- package/dist/_node-chunks/{chunk-NAZXVKZR.js → chunk-WUVM2V22.js} +6 -6
- package/dist/_node-chunks/{chunk-YF6BQNR6.js → chunk-WYREEMWZ.js} +6 -6
- package/dist/_node-chunks/{chunk-OBA5XT44.js → chunk-XPWMJEXT.js} +7 -7
- package/dist/_node-chunks/{chunk-DUT2G4P5.js → chunk-ZIG3SZMN.js} +8 -8
- package/dist/_node-chunks/{dist-BV4S5XPY.js → dist-XHCP6OFU.js} +9 -9
- package/dist/_node-chunks/{globby-MMDNVX5S.js → globby-YHL6UTMA.js} +9 -9
- package/dist/_node-chunks/{lib-ZNCEKZ43.js → lib-RWWG7TOS.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-KXIBNMFG.js → mdx-N42X6CFJ-ZALEYAPJ.js} +8 -8
- package/dist/_node-chunks/{p-limit-RIAILNZP.js → p-limit-LLBQLQ7I.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.js +18 -18
- package/dist/common/index.d.ts +25 -18
- package/dist/common/index.js +19 -19
- package/dist/core-server/index.d.ts +68 -1
- package/dist/core-server/index.js +33 -33
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf/index.js +1 -1
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +21 -2
- package/dist/manager-api/index.js +4 -4
- package/dist/manager-errors.d.ts +24 -0
- package/dist/manager-errors.js +2 -2
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +21 -2
- package/dist/preview-api/index.js +1 -1
- package/dist/preview-errors.d.ts +24 -0
- package/dist/preview-errors.js +2 -2
- package/dist/server-errors.d.ts +59 -3
- package/dist/server-errors.js +22 -11
- package/dist/telemetry/index.js +23 -23
- package/package.json +1 -1
- package/dist/_node-chunks/chunk-6WT5T7D6.js +0 -23
- package/dist/_node-chunks/chunk-ABYOUG2G.js +0 -18
- package/dist/_node-chunks/chunk-UQA3ZWVX.js +0 -61
|
@@ -2232,7 +2232,7 @@ var DocsContext = class {
|
|
|
2232
2232
|
}
|
|
2233
2233
|
resolveModuleExport(moduleExportOrType) {
|
|
2234
2234
|
let csfFile = this.exportsToCSFFile.get(moduleExportOrType);
|
|
2235
|
-
if (csfFile)
|
|
2235
|
+
if (!csfFile && moduleExportOrType && typeof moduleExportOrType == "object" && "default" in moduleExportOrType && (csfFile = this.exportsToCSFFile.get(moduleExportOrType.default)), csfFile)
|
|
2236
2236
|
return { type: "meta", csfFile };
|
|
2237
2237
|
let story = this.exportToStory.get(
|
|
2238
2238
|
isStory3(moduleExportOrType) ? moduleExportOrType.input : moduleExportOrType
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_f2mg11kr5cs from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_f2mg11kr5cs from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_f2mg11kr5cs from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_f2mg11kr5cs.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_f2mg11kr5cs.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_f2mg11kr5cs.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
// src/storybook-error.ts
|
|
14
2
|
function parseErrorCode({
|
|
15
3
|
code,
|
|
@@ -43,7 +31,26 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
43
31
|
* user.
|
|
44
32
|
*/
|
|
45
33
|
this.isHandledError = !1;
|
|
46
|
-
|
|
34
|
+
/**
|
|
35
|
+
* A collection of sub errors which relate to a parent error.
|
|
36
|
+
*
|
|
37
|
+
* Sub-errors are used to represent multiple related errors that occurred together. When a
|
|
38
|
+
* StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
|
|
39
|
+
* are sent as separate telemetry events. This allows for better error tracking and debugging.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
*
|
|
43
|
+
* ```ts
|
|
44
|
+
* const error1 = new SomeError();
|
|
45
|
+
* const error2 = new AnotherError();
|
|
46
|
+
* const parentError = new ParentError({
|
|
47
|
+
* // ... other props
|
|
48
|
+
* subErrors: [error1, error2],
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
this.subErrors = [];
|
|
53
|
+
this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? [];
|
|
47
54
|
}
|
|
48
55
|
get fullErrorCode() {
|
|
49
56
|
return parseErrorCode({ code: this.code, category: this.category });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorybookError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JVRDBUUP.js";
|
|
4
4
|
|
|
5
5
|
// src/manager-errors.ts
|
|
6
6
|
var Category = /* @__PURE__ */ ((Category2) => (Category2.MANAGER_UNCAUGHT = "MANAGER_UNCAUGHT", Category2.MANAGER_UI = "MANAGER_UI", Category2.MANAGER_API = "MANAGER_API", Category2.MANAGER_CLIENT_LOGGER = "MANAGER_CLIENT-LOGGER", Category2.MANAGER_CHANNELS = "MANAGER_CHANNELS", Category2.MANAGER_CORE_EVENTS = "MANAGER_CORE-EVENTS", Category2.MANAGER_ROUTER = "MANAGER_ROUTER", Category2.MANAGER_THEMING = "MANAGER_THEMING", Category2))(Category || {}), ProviderDoesNotExtendBaseProviderError = class extends StorybookError {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,26 +13,26 @@ import {
|
|
|
13
13
|
BROWSER_TARGETS,
|
|
14
14
|
NODE_TARGET,
|
|
15
15
|
SUPPORTED_FEATURES
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KYHFIXVV.js";
|
|
17
17
|
import {
|
|
18
18
|
require_build
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5H7WLGZC.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveModulePath,
|
|
22
22
|
resolvePackageDir
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-SNGQFKE7.js";
|
|
24
24
|
import {
|
|
25
25
|
join,
|
|
26
26
|
parse
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CUUCEXYW.js";
|
|
28
28
|
import {
|
|
29
29
|
slash
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WUVM2V22.js";
|
|
31
31
|
import {
|
|
32
32
|
__commonJS,
|
|
33
33
|
__require,
|
|
34
34
|
__toESM
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WYREEMWZ.js";
|
|
36
36
|
|
|
37
37
|
// ../node_modules/ejs/lib/utils.js
|
|
38
38
|
var require_utils = __commonJS({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.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-WYREEMWZ.js";
|
|
13
13
|
|
|
14
14
|
// ../node_modules/camelcase/index.js
|
|
15
15
|
var UPPERCASE = /[\p{Lu}]/u, LOWERCASE = /[\p{Ll}]/u, LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu, IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u, SEPARATORS = /[_.\- ]+/, LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source), SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"), NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"), preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// package.json
|
|
14
|
+
var version = "10.1.5";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
version
|
|
18
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,15 +12,15 @@ var require = CJS_COMPAT_NODE_MODULE_f2mg11kr5cs.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
require_lib,
|
|
14
14
|
require_src
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-C3CWELCD.js";
|
|
16
16
|
import {
|
|
17
17
|
require_picocolors
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-56BVIMJO.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__require,
|
|
22
22
|
__toESM
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WYREEMWZ.js";
|
|
24
24
|
|
|
25
25
|
// ../node_modules/@babel/types/lib/utils/shallowEqual.js
|
|
26
26
|
var require_shallowEqual = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_f2mg11kr5cs.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__toESM
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WYREEMWZ.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/balanced-match/index.js
|
|
18
18
|
var require_balanced_match = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.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-WYREEMWZ.js";
|
|
15
15
|
|
|
16
16
|
// ../node_modules/picocolors/picocolors.js
|
|
17
17
|
var require_picocolors = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_f2mg11kr5cs.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WYREEMWZ.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/totalist/sync/index.js
|
|
18
18
|
var require_sync = __commonJS({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.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 "./chunk-
|
|
14
|
+
} from "./chunk-3GJDB3VJ.js";
|
|
15
15
|
import {
|
|
16
16
|
createFileSystemCache,
|
|
17
17
|
execa,
|
|
@@ -19,25 +19,25 @@ import {
|
|
|
19
19
|
getProjectRoot,
|
|
20
20
|
resolvePathInStorybookCache,
|
|
21
21
|
up
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-RZ3SV46Y.js";
|
|
23
23
|
import {
|
|
24
24
|
getSessionId,
|
|
25
25
|
nanoid,
|
|
26
26
|
set
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GUCJOBT7.js";
|
|
28
28
|
import {
|
|
29
29
|
globalSettings
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ITMM32VP.js";
|
|
31
31
|
import {
|
|
32
32
|
resolvePackageDir
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SNGQFKE7.js";
|
|
34
34
|
import {
|
|
35
35
|
slash
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WUVM2V22.js";
|
|
37
37
|
import {
|
|
38
38
|
__commonJS,
|
|
39
39
|
__toESM
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WYREEMWZ.js";
|
|
41
41
|
|
|
42
42
|
// ../node_modules/fetch-retry/index.js
|
|
43
43
|
var require_fetch_retry = __commonJS({
|
|
@@ -76,22 +76,22 @@ var require_fetch_retry = __commonJS({
|
|
|
76
76
|
retryOn = init.retryOn;
|
|
77
77
|
else
|
|
78
78
|
throw new ArgumentError("retryOn property expects an array or function");
|
|
79
|
-
return new Promise(function(
|
|
79
|
+
return new Promise(function(resolve2, reject) {
|
|
80
80
|
var wrappedFetch = function(attempt) {
|
|
81
81
|
var _input = typeof Request < "u" && input instanceof Request ? input.clone() : input;
|
|
82
82
|
fetch2(_input, init).then(function(response) {
|
|
83
83
|
if (Array.isArray(retryOn) && retryOn.indexOf(response.status) === -1)
|
|
84
|
-
|
|
84
|
+
resolve2(response);
|
|
85
85
|
else if (typeof retryOn == "function")
|
|
86
86
|
try {
|
|
87
87
|
return Promise.resolve(retryOn(attempt, null, response)).then(function(retryOnResponse) {
|
|
88
|
-
retryOnResponse ? retry2(attempt, null, response) :
|
|
88
|
+
retryOnResponse ? retry2(attempt, null, response) : resolve2(response);
|
|
89
89
|
}).catch(reject);
|
|
90
90
|
} catch (error) {
|
|
91
91
|
reject(error);
|
|
92
92
|
}
|
|
93
93
|
else
|
|
94
|
-
attempt < retries ? retry2(attempt, null, response) :
|
|
94
|
+
attempt < retries ? retry2(attempt, null, response) : resolve2(response);
|
|
95
95
|
}).catch(function(error) {
|
|
96
96
|
if (typeof retryOn == "function")
|
|
97
97
|
try {
|
|
@@ -174,8 +174,10 @@ function sanitizeError(error, pathSeparator = path.sep) {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
// src/telemetry/storybook-metadata.ts
|
|
177
|
+
import { createHash } from "node:crypto";
|
|
178
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
177
179
|
import { readFile } from "node:fs/promises";
|
|
178
|
-
import { dirname } from "node:path";
|
|
180
|
+
import { dirname, resolve } from "node:path";
|
|
179
181
|
import {
|
|
180
182
|
getStorybookConfiguration,
|
|
181
183
|
getStorybookInfo as getStorybookInfo2,
|
|
@@ -183,6 +185,7 @@ import {
|
|
|
183
185
|
loadMainConfig,
|
|
184
186
|
versions
|
|
185
187
|
} from "storybook/internal/common";
|
|
188
|
+
import { getInterpretedFile } from "storybook/internal/common";
|
|
186
189
|
import { readConfig } from "storybook/internal/csf-tools";
|
|
187
190
|
|
|
188
191
|
// src/telemetry/get-application-file-count.ts
|
|
@@ -753,21 +756,34 @@ async function getPackageJsonDetails() {
|
|
|
753
756
|
packageJson: {}
|
|
754
757
|
};
|
|
755
758
|
}
|
|
756
|
-
var
|
|
757
|
-
|
|
758
|
-
|
|
759
|
+
var metadataCache = /* @__PURE__ */ new Map();
|
|
760
|
+
async function hashMainConfig(configDir) {
|
|
761
|
+
try {
|
|
762
|
+
let mainPath = getInterpretedFile(resolve(configDir, "main"));
|
|
763
|
+
if (!mainPath || !existsSync2(mainPath))
|
|
764
|
+
return "missing";
|
|
765
|
+
let content = await readFile(mainPath);
|
|
766
|
+
return createHash("sha256").update(new Uint8Array(content)).digest("hex");
|
|
767
|
+
} catch {
|
|
768
|
+
return "unknown";
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
var getStorybookMetadata = async (_configDir) => {
|
|
759
772
|
let { packageJson, packageJsonPath } = await getPackageJsonDetails(), configDir = (_configDir || getStorybookConfiguration(
|
|
760
773
|
String(packageJson?.scripts?.storybook || ""),
|
|
761
774
|
"-c",
|
|
762
775
|
"--config-dir"
|
|
763
|
-
)) ?? ".storybook",
|
|
764
|
-
|
|
765
|
-
|
|
776
|
+
)) ?? ".storybook", contentHash = await hashMainConfig(configDir), cacheKey = `${configDir}::${contentHash}`, cached = metadataCache.get(cacheKey);
|
|
777
|
+
if (cached)
|
|
778
|
+
return cached;
|
|
779
|
+
let mainConfig = await loadMainConfig({ configDir }).catch(() => {
|
|
780
|
+
}), computed = await computeStorybookMetadata({
|
|
766
781
|
mainConfig,
|
|
767
782
|
packageJson,
|
|
768
783
|
packageJsonPath,
|
|
769
784
|
configDir
|
|
770
|
-
})
|
|
785
|
+
});
|
|
786
|
+
return metadataCache.set(cacheKey, computed), computed;
|
|
771
787
|
};
|
|
772
788
|
|
|
773
789
|
// src/telemetry/telemetry.ts
|
|
@@ -783,9 +799,9 @@ import { getProjectRoot as getProjectRoot3 } from "storybook/internal/common";
|
|
|
783
799
|
import { execSync } from "child_process";
|
|
784
800
|
|
|
785
801
|
// src/telemetry/one-way-hash.ts
|
|
786
|
-
import { createHash } from "crypto";
|
|
802
|
+
import { createHash as createHash2 } from "crypto";
|
|
787
803
|
var oneWayHash = (payload) => {
|
|
788
|
-
let hash =
|
|
804
|
+
let hash = createHash2("sha256");
|
|
789
805
|
return hash.update("storybook-telemetry-salt"), hash.update(payload), hash.digest("hex");
|
|
790
806
|
};
|
|
791
807
|
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
1
13
|
// src/storybook-error.ts
|
|
2
14
|
function parseErrorCode({
|
|
3
15
|
code,
|
|
@@ -31,7 +43,26 @@ var StorybookError = class _StorybookError extends Error {
|
|
|
31
43
|
* user.
|
|
32
44
|
*/
|
|
33
45
|
this.isHandledError = !1;
|
|
34
|
-
|
|
46
|
+
/**
|
|
47
|
+
* A collection of sub errors which relate to a parent error.
|
|
48
|
+
*
|
|
49
|
+
* Sub-errors are used to represent multiple related errors that occurred together. When a
|
|
50
|
+
* StorybookError with sub-errors is sent to telemetry, both the parent error and each sub-error
|
|
51
|
+
* are sent as separate telemetry events. This allows for better error tracking and debugging.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* const error1 = new SomeError();
|
|
57
|
+
* const error2 = new AnotherError();
|
|
58
|
+
* const parentError = new ParentError({
|
|
59
|
+
* // ... other props
|
|
60
|
+
* subErrors: [error1, error2],
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
this.subErrors = [];
|
|
65
|
+
this.category = props.category, this.documentation = props.documentation ?? !1, this.code = props.code, this.isHandledError = props.isHandledError ?? !1, this.name = props.name, this.subErrors = props.subErrors ?? [];
|
|
35
66
|
}
|
|
36
67
|
get fullErrorCode() {
|
|
37
68
|
return parseErrorCode({ code: this.code, category: this.category });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,7 +12,7 @@ var require = CJS_COMPAT_NODE_MODULE_f2mg11kr5cs.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
__commonJS,
|
|
14
14
|
__require
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WYREEMWZ.js";
|
|
16
16
|
|
|
17
17
|
// ../node_modules/ms/index.js
|
|
18
18
|
var require_ms = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_16w7d0j2rs7 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_16w7d0j2rs7 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_16w7d0j2rs7 from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_16w7d0j2rs7.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_16w7d0j2rs7.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_16w7d0j2rs7.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
any
|
|
14
|
+
} from "./chunk-255LKCUD.js";
|
|
15
|
+
|
|
16
|
+
// src/cli/detect.ts
|
|
17
|
+
async function detectPnp() {
|
|
18
|
+
return !!any([".pnp.js", ".pnp.cjs"]);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
detectPnp
|
|
23
|
+
};
|