storybook 9.0.0-alpha.13 → 9.0.0-alpha.15
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/actions/decorator.js +46 -47
- package/dist/actions/index.cjs +28 -29
- package/dist/actions/index.d.ts +0 -3
- package/dist/actions/index.js +27 -28
- package/dist/actions/preview.cjs +22 -23
- package/dist/actions/preview.js +18 -19
- package/dist/bin/index.cjs +67 -71
- package/dist/bin/index.js +56 -60
- package/dist/channels/index.cjs +1018 -948
- package/dist/channels/index.js +1194 -1161
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/cli/index.cjs +1860 -1871
- package/dist/cli/index.js +308 -319
- package/dist/common/index.cjs +43 -49
- package/dist/common/index.d.ts +0 -4
- package/dist/common/index.js +43 -49
- package/dist/components/index.cjs +6375 -12708
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +4647 -10782
- package/dist/core-server/index.cjs +13626 -13550
- package/dist/core-server/index.js +11863 -11787
- package/dist/core-server/presets/common-manager.js +3221 -3138
- package/dist/manager/globals-runtime.js +29817 -33554
- package/dist/manager-api/index.cjs +2518 -2330
- package/dist/manager-api/index.js +2432 -2234
- package/dist/preview/runtime.js +18415 -16011
- package/dist/preview-api/index.cjs +619 -603
- package/dist/preview-api/index.d.ts +386 -118
- package/dist/preview-api/index.js +542 -526
- package/dist/server-errors.cjs +132 -118
- package/dist/server-errors.d.ts +4 -2
- package/dist/server-errors.js +127 -113
- package/dist/test/preview.d.ts +6 -0
- package/dist/types/index.d.ts +1 -4
- package/package.json +2 -2
package/dist/server-errors.cjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var ue = Object.create;
|
|
3
3
|
var y = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
4
|
+
var le = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var me = Object.getOwnPropertyNames;
|
|
6
|
+
var de = Object.getPrototypeOf, be = Object.prototype.hasOwnProperty;
|
|
7
|
+
var r = (t, e) => y(t, "name", { value: e, configurable: !0 });
|
|
8
|
+
var q = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports), ge = (t, e) => {
|
|
9
9
|
for (var o in e)
|
|
10
10
|
y(t, o, { get: e[o], enumerable: !0 });
|
|
11
|
-
},
|
|
11
|
+
}, Q = (t, e, o, n) => {
|
|
12
12
|
if (e && typeof e == "object" || typeof e == "function")
|
|
13
|
-
for (let c of
|
|
14
|
-
!
|
|
13
|
+
for (let c of me(e))
|
|
14
|
+
!be.call(t, c) && c !== o && y(t, c, { get: () => e[c], enumerable: !(n = le(e, c)) || n.enumerable });
|
|
15
15
|
return t;
|
|
16
16
|
};
|
|
17
|
-
var
|
|
17
|
+
var Z = (t, e, o) => (o = t != null ? ue(de(t)) : {}, Q(
|
|
18
18
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
19
19
|
// file that has been converted to a CommonJS file using a Babel-
|
|
20
20
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
21
21
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
22
22
|
e || !t || !t.__esModule ? y(o, "default", { value: t, enumerable: !0 }) : o,
|
|
23
23
|
t
|
|
24
|
-
)),
|
|
24
|
+
)), pe = (t) => Q(y({}, "__esModule", { value: !0 }), t);
|
|
25
25
|
|
|
26
26
|
// ../node_modules/picocolors/picocolors.js
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
"--color") ||
|
|
27
|
+
var te = q((Re, k) => {
|
|
28
|
+
var x = process || {}, ee = x.argv || [], E = x.env || {}, ye = !(E.NO_COLOR || ee.includes("--no-color")) && (!!E.FORCE_COLOR || ee.includes(
|
|
29
|
+
"--color") || x.platform === "win32" || (x.stdout || {}).isTTY && E.TERM !== "dumb" || !!E.CI), he = /* @__PURE__ */ r((t, e, o = t) => (n) => {
|
|
30
30
|
let c = "" + n, u = c.indexOf(e, t.length);
|
|
31
|
-
return ~u ? t +
|
|
32
|
-
}, "formatter"),
|
|
31
|
+
return ~u ? t + Ee(c, e, o, u) + e : t + c + e;
|
|
32
|
+
}, "formatter"), Ee = /* @__PURE__ */ r((t, e, o, n) => {
|
|
33
33
|
let c = "", u = 0;
|
|
34
34
|
do
|
|
35
35
|
c += t.substring(u, n) + o, u = n + e.length, n = t.indexOf(e, u);
|
|
36
36
|
while (~n);
|
|
37
37
|
return c + t.substring(u);
|
|
38
|
-
}, "replaceClose"),
|
|
39
|
-
let e = t ?
|
|
38
|
+
}, "replaceClose"), oe = /* @__PURE__ */ r((t = ye) => {
|
|
39
|
+
let e = t ? he : () => String;
|
|
40
40
|
return {
|
|
41
41
|
isColorSupported: t,
|
|
42
42
|
reset: e("\x1B[0m", "\x1B[0m"),
|
|
@@ -82,25 +82,25 @@ var oe = z((xe, k) => {
|
|
|
82
82
|
bgWhiteBright: e("\x1B[107m", "\x1B[49m")
|
|
83
83
|
};
|
|
84
84
|
}, "createColors");
|
|
85
|
-
k.exports =
|
|
86
|
-
k.exports.createColors =
|
|
85
|
+
k.exports = oe();
|
|
86
|
+
k.exports.createColors = oe;
|
|
87
87
|
});
|
|
88
88
|
|
|
89
89
|
// ../node_modules/ts-dedent/dist/index.js
|
|
90
|
-
var
|
|
90
|
+
var se = q((h) => {
|
|
91
91
|
"use strict";
|
|
92
92
|
Object.defineProperty(h, "__esModule", { value: !0 });
|
|
93
93
|
h.dedent = void 0;
|
|
94
|
-
function
|
|
94
|
+
function re(t) {
|
|
95
95
|
for (var e = [], o = 1; o < arguments.length; o++)
|
|
96
96
|
e[o - 1] = arguments[o];
|
|
97
97
|
var n = Array.from(typeof t == "string" ? [t] : t);
|
|
98
98
|
n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
99
|
-
var c = n.reduce(function(m,
|
|
100
|
-
var p =
|
|
101
|
-
return p ? m.concat(p.map(function(
|
|
102
|
-
var
|
|
103
|
-
return (
|
|
99
|
+
var c = n.reduce(function(m, f) {
|
|
100
|
+
var p = f.match(/\n([\t ]+|(?!\s).)/g);
|
|
101
|
+
return p ? m.concat(p.map(function(R) {
|
|
102
|
+
var b, g;
|
|
103
|
+
return (g = (b = R.match(/[\t ]/g)) === null || b === void 0 ? void 0 : b.length) !== null && g !== void 0 ? g : 0;
|
|
104
104
|
})) : m;
|
|
105
105
|
}, []);
|
|
106
106
|
if (c.length) {
|
|
@@ -113,65 +113,66 @@ var re = z((h) => {
|
|
|
113
113
|
}
|
|
114
114
|
n[0] = n[0].replace(/^\r?\n/, "");
|
|
115
115
|
var d = n[0];
|
|
116
|
-
return e.forEach(function(m,
|
|
117
|
-
var p = d.match(/(?:^|\n)( *)$/),
|
|
116
|
+
return e.forEach(function(m, f) {
|
|
117
|
+
var p = d.match(/(?:^|\n)( *)$/), R = p ? p[1] : "", b = m;
|
|
118
118
|
typeof m == "string" && m.includes(`
|
|
119
|
-
`) && (
|
|
120
|
-
`).map(function(
|
|
121
|
-
return
|
|
119
|
+
`) && (b = String(m).split(`
|
|
120
|
+
`).map(function(g, ce) {
|
|
121
|
+
return ce === 0 ? g : "" + R + g;
|
|
122
122
|
}).join(`
|
|
123
|
-
`)), d +=
|
|
123
|
+
`)), d += b + n[f + 1];
|
|
124
124
|
}), d;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
h.dedent =
|
|
128
|
-
h.default =
|
|
126
|
+
r(re, "dedent");
|
|
127
|
+
h.dedent = re;
|
|
128
|
+
h.default = re;
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
// src/server-errors.ts
|
|
132
|
-
var
|
|
133
|
-
ge(
|
|
134
|
-
AngularLegacyBuildOptionsError: () =>
|
|
135
|
-
Category: () =>
|
|
132
|
+
var xe = {};
|
|
133
|
+
ge(xe, {
|
|
134
|
+
AngularLegacyBuildOptionsError: () => W,
|
|
135
|
+
Category: () => ie,
|
|
136
136
|
ConflictingStaticDirConfigError: () => w,
|
|
137
137
|
CouldNotEvaluateFrameworkError: () => C,
|
|
138
|
-
CriticalPresetLoadError: () =>
|
|
139
|
-
FindPackageVersionsError: () =>
|
|
140
|
-
GenerateNewProjectOnInitError: () =>
|
|
138
|
+
CriticalPresetLoadError: () => K,
|
|
139
|
+
FindPackageVersionsError: () => z,
|
|
140
|
+
GenerateNewProjectOnInitError: () => U,
|
|
141
141
|
GoogleFontsDownloadError: () => B,
|
|
142
142
|
GoogleFontsLoadingError: () => P,
|
|
143
143
|
InvalidFrameworkNameError: () => _,
|
|
144
144
|
InvalidStoriesEntryError: () => I,
|
|
145
145
|
MainFileESMOnlyImportError: () => V,
|
|
146
|
-
MainFileEvaluationError: () =>
|
|
146
|
+
MainFileEvaluationError: () => F,
|
|
147
147
|
MainFileMissingError: () => $,
|
|
148
|
-
MissingAngularJsonError: () =>
|
|
148
|
+
MissingAngularJsonError: () => v,
|
|
149
149
|
MissingBuilderError: () => L,
|
|
150
150
|
MissingFrameworkFieldError: () => A,
|
|
151
|
-
NoMatchingExportError: () =>
|
|
152
|
-
NoStatsForViteDevError: () =>
|
|
151
|
+
NoMatchingExportError: () => j,
|
|
152
|
+
NoStatsForViteDevError: () => X,
|
|
153
153
|
NxProjectDetectedError: () => O,
|
|
154
|
-
StatusTypeIdMismatchError: () =>
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
154
|
+
StatusTypeIdMismatchError: () => D,
|
|
155
|
+
SvelteViteWithSvelteKitError: () => N,
|
|
156
|
+
UpgradeStorybookInWrongWorkingDirectory: () => J,
|
|
157
|
+
UpgradeStorybookToLowerVersionError: () => G,
|
|
158
|
+
UpgradeStorybookToSameVersionError: () => Y,
|
|
159
|
+
UpgradeStorybookUnknownCurrentVersionError: () => H,
|
|
159
160
|
WebpackCompilationError: () => T,
|
|
160
|
-
WebpackInvocationError: () =>
|
|
161
|
-
WebpackMissingStatsError: () =>
|
|
161
|
+
WebpackInvocationError: () => S,
|
|
162
|
+
WebpackMissingStatsError: () => M
|
|
162
163
|
});
|
|
163
|
-
module.exports =
|
|
164
|
-
var l =
|
|
164
|
+
module.exports = pe(xe);
|
|
165
|
+
var l = Z(te(), 1), i = Z(se(), 1);
|
|
165
166
|
|
|
166
167
|
// src/storybook-error.ts
|
|
167
|
-
function
|
|
168
|
+
function ne({
|
|
168
169
|
code: t,
|
|
169
170
|
category: e
|
|
170
171
|
}) {
|
|
171
172
|
let o = String(t).padStart(4, "0");
|
|
172
173
|
return `SB_${e}_${o}`;
|
|
173
174
|
}
|
|
174
|
-
|
|
175
|
+
r(ne, "parseErrorCode");
|
|
175
176
|
var a = class t extends Error {
|
|
176
177
|
constructor(o) {
|
|
177
178
|
super(t.getFullMessage(o));
|
|
@@ -185,10 +186,10 @@ var a = class t extends Error {
|
|
|
185
186
|
this.category = o.category, this.documentation = o.documentation ?? !1, this.code = o.code;
|
|
186
187
|
}
|
|
187
188
|
static {
|
|
188
|
-
|
|
189
|
+
r(this, "StorybookError");
|
|
189
190
|
}
|
|
190
191
|
get fullErrorCode() {
|
|
191
|
-
return
|
|
192
|
+
return ne({ code: this.code, category: this.category });
|
|
192
193
|
}
|
|
193
194
|
/** Overrides the default `Error.name` property in the format: SB_<CATEGORY>_<CODE>. */
|
|
194
195
|
get name() {
|
|
@@ -203,7 +204,7 @@ var a = class t extends Error {
|
|
|
203
204
|
message: u
|
|
204
205
|
}) {
|
|
205
206
|
let d;
|
|
206
|
-
return o === !0 ? d = `https://storybook.js.org/error/${
|
|
207
|
+
return o === !0 ? d = `https://storybook.js.org/error/${ne({ code: n, category: c })}` : typeof o == "string" ? d = o : Array.isArray(o) &&
|
|
207
208
|
(d = `
|
|
208
209
|
${o.map((m) => ` - ${m}`).join(`
|
|
209
210
|
`)}`), `${u}${d != null ? `
|
|
@@ -214,20 +215,19 @@ More info: ${d}
|
|
|
214
215
|
};
|
|
215
216
|
|
|
216
217
|
// src/server-errors.ts
|
|
217
|
-
var
|
|
218
|
-
E",
|
|
219
|
-
"CORE-COMMON",
|
|
220
|
-
TE",
|
|
221
|
-
|
|
222
|
-
FRAMEWORK_HTML-VITE",
|
|
223
|
-
"FRAMEWORK_PREACT-VITE",
|
|
224
|
-
"FRAMEWORK_REACT-WEBPACK5",
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
218
|
+
var ie = /* @__PURE__ */ ((s) => (s.CLI = "CLI", s.CLI_INIT = "CLI_INIT", s.CLI_AUTOMIGRATE = "CLI_AUTOMIGRATE", s.CLI_UPGRADE = "CLI_UPGRAD\
|
|
219
|
+
E", s.CLI_ADD = "CLI_ADD", s.CODEMOD = "CODEMOD", s.CORE_SERVER = "CORE-SERVER", s.CSF_PLUGIN = "CSF-PLUGIN", s.CSF_TOOLS = "CSF-TOOLS", s.CORE_COMMON =
|
|
220
|
+
"CORE-COMMON", s.NODE_LOGGER = "NODE-LOGGER", s.TELEMETRY = "TELEMETRY", s.BUILDER_MANAGER = "BUILDER-MANAGER", s.BUILDER_VITE = "BUILDER-VI\
|
|
221
|
+
TE", s.BUILDER_WEBPACK5 = "BUILDER-WEBPACK5", s.SOURCE_LOADER = "SOURCE-LOADER", s.POSTINSTALL = "POSTINSTALL", s.DOCS_TOOLS = "DOCS-TOOLS",
|
|
222
|
+
s.CORE_WEBPACK = "CORE-WEBPACK", s.FRAMEWORK_ANGULAR = "FRAMEWORK_ANGULAR", s.FRAMEWORK_EMBER = "FRAMEWORK_EMBER", s.FRAMEWORK_HTML_VITE = "\
|
|
223
|
+
FRAMEWORK_HTML-VITE", s.FRAMEWORK_HTML_WEBPACK5 = "FRAMEWORK_HTML-WEBPACK5", s.FRAMEWORK_NEXTJS = "FRAMEWORK_NEXTJS", s.FRAMEWORK_PREACT_VITE =
|
|
224
|
+
"FRAMEWORK_PREACT-VITE", s.FRAMEWORK_PREACT_WEBPACK5 = "FRAMEWORK_PREACT-WEBPACK5", s.FRAMEWORK_REACT_VITE = "FRAMEWORK_REACT-VITE", s.FRAMEWORK_REACT_WEBPACK5 =
|
|
225
|
+
"FRAMEWORK_REACT-WEBPACK5", s.FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5", s.FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE", s.
|
|
226
|
+
FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT", s.FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE", s.FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
|
|
227
|
+
s.FRAMEWORK_VUE3_VITE = "FRAMEWORK_VUE3-VITE", s.FRAMEWORK_VUE3_WEBPACK5 = "FRAMEWORK_VUE3-WEBPACK5", s.FRAMEWORK_WEB_COMPONENTS_VITE = "FRA\
|
|
228
|
+
MEWORK_WEB-COMPONENTS-VITE", s.FRAMEWORK_WEB_COMPONENTS_WEBPACK5 = "FRAMEWORK_WEB-COMPONENTS-WEBPACK5", s))(ie || {}), O = class extends a {
|
|
229
229
|
static {
|
|
230
|
-
|
|
230
|
+
r(this, "NxProjectDetectedError");
|
|
231
231
|
}
|
|
232
232
|
constructor() {
|
|
233
233
|
super({
|
|
@@ -241,7 +241,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
241
241
|
}
|
|
242
242
|
}, A = class extends a {
|
|
243
243
|
static {
|
|
244
|
-
|
|
244
|
+
r(this, "MissingFrameworkFieldError");
|
|
245
245
|
}
|
|
246
246
|
constructor() {
|
|
247
247
|
super({
|
|
@@ -269,7 +269,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
269
269
|
this.data = o;
|
|
270
270
|
}
|
|
271
271
|
static {
|
|
272
|
-
|
|
272
|
+
r(this, "InvalidFrameworkNameError");
|
|
273
273
|
}
|
|
274
274
|
}, C = class extends a {
|
|
275
275
|
constructor(o) {
|
|
@@ -285,11 +285,11 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
285
285
|
this.data = o;
|
|
286
286
|
}
|
|
287
287
|
static {
|
|
288
|
-
|
|
288
|
+
r(this, "CouldNotEvaluateFrameworkError");
|
|
289
289
|
}
|
|
290
290
|
}, w = class extends a {
|
|
291
291
|
static {
|
|
292
|
-
|
|
292
|
+
r(this, "ConflictingStaticDirConfigError");
|
|
293
293
|
}
|
|
294
294
|
constructor() {
|
|
295
295
|
super({
|
|
@@ -306,7 +306,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
306
306
|
}
|
|
307
307
|
}, I = class extends a {
|
|
308
308
|
static {
|
|
309
|
-
|
|
309
|
+
r(this, "InvalidStoriesEntryError");
|
|
310
310
|
}
|
|
311
311
|
constructor() {
|
|
312
312
|
super({
|
|
@@ -320,9 +320,9 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
320
320
|
Please check your main configuration file and make sure it exports a 'stories' field that is not an empty array.`
|
|
321
321
|
});
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, M = class extends a {
|
|
324
324
|
static {
|
|
325
|
-
|
|
325
|
+
r(this, "WebpackMissingStatsError");
|
|
326
326
|
}
|
|
327
327
|
constructor() {
|
|
328
328
|
super({
|
|
@@ -337,7 +337,7 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
337
337
|
Storybook needs Webpack stats (including errors) in order to build correctly.`
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
},
|
|
340
|
+
}, S = class extends a {
|
|
341
341
|
constructor(o) {
|
|
342
342
|
super({
|
|
343
343
|
category: "BUILDER-WEBPACK5",
|
|
@@ -347,19 +347,19 @@ WEB-COMPONENTS-WEBPACK5", r))(ae || {}), O = class extends a {
|
|
|
347
347
|
this.data = o;
|
|
348
348
|
}
|
|
349
349
|
static {
|
|
350
|
-
|
|
350
|
+
r(this, "WebpackInvocationError");
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
function
|
|
353
|
+
function ae(t = "") {
|
|
354
354
|
return t.replace(/\u001B\[[0-9;]*m/g, "");
|
|
355
355
|
}
|
|
356
|
-
|
|
356
|
+
r(ae, "removeAnsiEscapeCodes");
|
|
357
357
|
var T = class extends a {
|
|
358
358
|
constructor(o) {
|
|
359
359
|
o.errors = o.errors.map((n) => ({
|
|
360
360
|
...n,
|
|
361
|
-
message:
|
|
362
|
-
stack:
|
|
361
|
+
message: ae(n.message),
|
|
362
|
+
stack: ae(n.stack),
|
|
363
363
|
name: n.name
|
|
364
364
|
}));
|
|
365
365
|
super({
|
|
@@ -374,9 +374,9 @@ var T = class extends a {
|
|
|
374
374
|
this.data = o;
|
|
375
375
|
}
|
|
376
376
|
static {
|
|
377
|
-
|
|
377
|
+
r(this, "WebpackCompilationError");
|
|
378
378
|
}
|
|
379
|
-
},
|
|
379
|
+
}, v = class extends a {
|
|
380
380
|
constructor(o) {
|
|
381
381
|
super({
|
|
382
382
|
category: "CLI_INIT",
|
|
@@ -389,11 +389,11 @@ var T = class extends a {
|
|
|
389
389
|
this.data = o;
|
|
390
390
|
}
|
|
391
391
|
static {
|
|
392
|
-
|
|
392
|
+
r(this, "MissingAngularJsonError");
|
|
393
393
|
}
|
|
394
|
-
},
|
|
394
|
+
}, W = class extends a {
|
|
395
395
|
static {
|
|
396
|
-
|
|
396
|
+
r(this, "AngularLegacyBuildOptionsError");
|
|
397
397
|
}
|
|
398
398
|
constructor() {
|
|
399
399
|
super({
|
|
@@ -410,7 +410,7 @@ var T = class extends a {
|
|
|
410
410
|
Please run 'npx storybook automigrate' to automatically fix your config.`
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
|
-
},
|
|
413
|
+
}, K = class extends a {
|
|
414
414
|
constructor(o) {
|
|
415
415
|
super({
|
|
416
416
|
category: "CORE-SERVER",
|
|
@@ -428,11 +428,11 @@ var T = class extends a {
|
|
|
428
428
|
this.data = o;
|
|
429
429
|
}
|
|
430
430
|
static {
|
|
431
|
-
|
|
431
|
+
r(this, "CriticalPresetLoadError");
|
|
432
432
|
}
|
|
433
433
|
}, L = class extends a {
|
|
434
434
|
static {
|
|
435
|
-
|
|
435
|
+
r(this, "MissingBuilderError");
|
|
436
436
|
}
|
|
437
437
|
constructor() {
|
|
438
438
|
super({
|
|
@@ -463,7 +463,7 @@ var T = class extends a {
|
|
|
463
463
|
this.data = o;
|
|
464
464
|
}
|
|
465
465
|
static {
|
|
466
|
-
|
|
466
|
+
r(this, "GoogleFontsDownloadError");
|
|
467
467
|
}
|
|
468
468
|
}, P = class extends a {
|
|
469
469
|
constructor(o) {
|
|
@@ -479,9 +479,23 @@ var T = class extends a {
|
|
|
479
479
|
this.data = o;
|
|
480
480
|
}
|
|
481
481
|
static {
|
|
482
|
-
|
|
482
|
+
r(this, "GoogleFontsLoadingError");
|
|
483
483
|
}
|
|
484
484
|
}, N = class extends a {
|
|
485
|
+
static {
|
|
486
|
+
r(this, "SvelteViteWithSvelteKitError");
|
|
487
|
+
}
|
|
488
|
+
constructor() {
|
|
489
|
+
super({
|
|
490
|
+
category: "FRAMEWORK_SVELTE-VITE",
|
|
491
|
+
code: 1,
|
|
492
|
+
documentation: "https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework",
|
|
493
|
+
message: i.dedent`
|
|
494
|
+
We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported.
|
|
495
|
+
Please use the @storybook/sveltekit framework instead.`
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
}, j = class extends a {
|
|
485
499
|
constructor(o) {
|
|
486
500
|
super({
|
|
487
501
|
category: "CORE-SERVER",
|
|
@@ -502,7 +516,7 @@ var T = class extends a {
|
|
|
502
516
|
this.data = o;
|
|
503
517
|
}
|
|
504
518
|
static {
|
|
505
|
-
|
|
519
|
+
r(this, "NoMatchingExportError");
|
|
506
520
|
}
|
|
507
521
|
}, V = class extends a {
|
|
508
522
|
constructor(o) {
|
|
@@ -539,7 +553,7 @@ var T = class extends a {
|
|
|
539
553
|
this.data = o;
|
|
540
554
|
}
|
|
541
555
|
static {
|
|
542
|
-
|
|
556
|
+
r(this, "MainFileESMOnlyImportError");
|
|
543
557
|
}
|
|
544
558
|
}, $ = class extends a {
|
|
545
559
|
constructor(o) {
|
|
@@ -567,9 +581,9 @@ var T = class extends a {
|
|
|
567
581
|
this.data = o;
|
|
568
582
|
}
|
|
569
583
|
static {
|
|
570
|
-
|
|
584
|
+
r(this, "MainFileMissingError");
|
|
571
585
|
}
|
|
572
|
-
},
|
|
586
|
+
}, F = class extends a {
|
|
573
587
|
constructor(o) {
|
|
574
588
|
let n = l.default.white(
|
|
575
589
|
(o.error.stack || o.error.message).replaceAll(process.cwd(), "")
|
|
@@ -586,9 +600,9 @@ var T = class extends a {
|
|
|
586
600
|
this.data = o;
|
|
587
601
|
}
|
|
588
602
|
static {
|
|
589
|
-
|
|
603
|
+
r(this, "MainFileEvaluationError");
|
|
590
604
|
}
|
|
591
|
-
},
|
|
605
|
+
}, D = class extends a {
|
|
592
606
|
constructor(o) {
|
|
593
607
|
super({
|
|
594
608
|
category: "CORE-SERVER",
|
|
@@ -602,9 +616,9 @@ var T = class extends a {
|
|
|
602
616
|
this.data = o;
|
|
603
617
|
}
|
|
604
618
|
static {
|
|
605
|
-
|
|
619
|
+
r(this, "StatusTypeIdMismatchError");
|
|
606
620
|
}
|
|
607
|
-
},
|
|
621
|
+
}, U = class extends a {
|
|
608
622
|
constructor(o) {
|
|
609
623
|
super({
|
|
610
624
|
category: "CLI_INIT",
|
|
@@ -618,9 +632,9 @@ var T = class extends a {
|
|
|
618
632
|
this.data = o;
|
|
619
633
|
}
|
|
620
634
|
static {
|
|
621
|
-
|
|
635
|
+
r(this, "GenerateNewProjectOnInitError");
|
|
622
636
|
}
|
|
623
|
-
},
|
|
637
|
+
}, G = class extends a {
|
|
624
638
|
constructor(o) {
|
|
625
639
|
super({
|
|
626
640
|
category: "CLI_UPGRADE",
|
|
@@ -640,9 +654,9 @@ var T = class extends a {
|
|
|
640
654
|
this.data = o;
|
|
641
655
|
}
|
|
642
656
|
static {
|
|
643
|
-
|
|
657
|
+
r(this, "UpgradeStorybookToLowerVersionError");
|
|
644
658
|
}
|
|
645
|
-
},
|
|
659
|
+
}, Y = class extends a {
|
|
646
660
|
constructor(o) {
|
|
647
661
|
super({
|
|
648
662
|
category: "CLI_UPGRADE",
|
|
@@ -665,11 +679,11 @@ var T = class extends a {
|
|
|
665
679
|
this.data = o;
|
|
666
680
|
}
|
|
667
681
|
static {
|
|
668
|
-
|
|
682
|
+
r(this, "UpgradeStorybookToSameVersionError");
|
|
669
683
|
}
|
|
670
|
-
},
|
|
684
|
+
}, H = class extends a {
|
|
671
685
|
static {
|
|
672
|
-
|
|
686
|
+
r(this, "UpgradeStorybookUnknownCurrentVersionError");
|
|
673
687
|
}
|
|
674
688
|
constructor() {
|
|
675
689
|
super({
|
|
@@ -682,9 +696,9 @@ var T = class extends a {
|
|
|
682
696
|
It might help if you specify your Storybook config directory with the --config-dir flag.`
|
|
683
697
|
});
|
|
684
698
|
}
|
|
685
|
-
},
|
|
699
|
+
}, J = class extends a {
|
|
686
700
|
static {
|
|
687
|
-
|
|
701
|
+
r(this, "UpgradeStorybookInWrongWorkingDirectory");
|
|
688
702
|
}
|
|
689
703
|
constructor() {
|
|
690
704
|
super({
|
|
@@ -696,9 +710,9 @@ var T = class extends a {
|
|
|
696
710
|
Did you mean to run it in a different directory? Make sure the directory you run this command in contains a package.json with your Storybook dependencies.`
|
|
697
711
|
});
|
|
698
712
|
}
|
|
699
|
-
},
|
|
713
|
+
}, X = class extends a {
|
|
700
714
|
static {
|
|
701
|
-
|
|
715
|
+
r(this, "NoStatsForViteDevError");
|
|
702
716
|
}
|
|
703
717
|
constructor() {
|
|
704
718
|
super({
|
|
@@ -710,7 +724,7 @@ var T = class extends a {
|
|
|
710
724
|
Please remove the \`--stats-json\` flag when running in dev mode.`
|
|
711
725
|
});
|
|
712
726
|
}
|
|
713
|
-
},
|
|
727
|
+
}, z = class extends a {
|
|
714
728
|
constructor(o) {
|
|
715
729
|
super({
|
|
716
730
|
category: "CLI",
|
|
@@ -722,6 +736,6 @@ var T = class extends a {
|
|
|
722
736
|
this.data = o;
|
|
723
737
|
}
|
|
724
738
|
static {
|
|
725
|
-
|
|
739
|
+
r(this, "FindPackageVersionsError");
|
|
726
740
|
}
|
|
727
741
|
};
|
package/dist/server-errors.d.ts
CHANGED
|
@@ -83,7 +83,6 @@ declare enum Category {
|
|
|
83
83
|
FRAMEWORK_REACT_WEBPACK5 = "FRAMEWORK_REACT-WEBPACK5",
|
|
84
84
|
FRAMEWORK_SERVER_WEBPACK5 = "FRAMEWORK_SERVER-WEBPACK5",
|
|
85
85
|
FRAMEWORK_SVELTE_VITE = "FRAMEWORK_SVELTE-VITE",
|
|
86
|
-
FRAMEWORK_SVELTE_WEBPACK5 = "FRAMEWORK_SVELTE-WEBPACK5",
|
|
87
86
|
FRAMEWORK_SVELTEKIT = "FRAMEWORK_SVELTEKIT",
|
|
88
87
|
FRAMEWORK_VUE_VITE = "FRAMEWORK_VUE-VITE",
|
|
89
88
|
FRAMEWORK_VUE_WEBPACK5 = "FRAMEWORK_VUE-WEBPACK5",
|
|
@@ -191,6 +190,9 @@ declare class GoogleFontsLoadingError extends StorybookError {
|
|
|
191
190
|
url: string;
|
|
192
191
|
});
|
|
193
192
|
}
|
|
193
|
+
declare class SvelteViteWithSvelteKitError extends StorybookError {
|
|
194
|
+
constructor();
|
|
195
|
+
}
|
|
194
196
|
declare class NoMatchingExportError extends StorybookError {
|
|
195
197
|
data: {
|
|
196
198
|
error: unknown | Error;
|
|
@@ -293,4 +295,4 @@ declare class FindPackageVersionsError extends StorybookError {
|
|
|
293
295
|
});
|
|
294
296
|
}
|
|
295
297
|
|
|
296
|
-
export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, StatusTypeIdMismatchError, UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
|
|
298
|
+
export { AngularLegacyBuildOptionsError, Category, ConflictingStaticDirConfigError, CouldNotEvaluateFrameworkError, CriticalPresetLoadError, FindPackageVersionsError, GenerateNewProjectOnInitError, GoogleFontsDownloadError, GoogleFontsLoadingError, InvalidFrameworkNameError, InvalidStoriesEntryError, MainFileESMOnlyImportError, MainFileEvaluationError, MainFileMissingError, MissingAngularJsonError, MissingBuilderError, MissingFrameworkFieldError, NoMatchingExportError, NoStatsForViteDevError, NxProjectDetectedError, StatusTypeIdMismatchError, SvelteViteWithSvelteKitError, UpgradeStorybookInWrongWorkingDirectory, UpgradeStorybookToLowerVersionError, UpgradeStorybookToSameVersionError, UpgradeStorybookUnknownCurrentVersionError, WebpackCompilationError, WebpackInvocationError, WebpackMissingStatsError };
|