create-storybook 11.0.0-alpha.9 → 11.0.0-beta.0
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/{chunk-DZ2TV55Q.js → chunk-JTGCUODS.js} +6 -6
- package/dist/_node-chunks/{chunk-QRZTVA3L.js → chunk-TOLGY54H.js} +137 -114
- package/dist/_node-chunks/{chunk-6PSSOFAG.js → chunk-YQMBFEC2.js} +6 -6
- package/dist/_node-chunks/{postinstallAddon-WVLNMT75.js → postinstallAddon-55RPTQIL.js} +8 -8
- package/dist/_node-chunks/{run-OGO3Y2EZ.js → run-Q3TIIWZ2.js} +10 -10
- package/dist/_node-chunks/{vitest.config.4.template-WSWV7BOD.js → vitest.config.4.template-5DE2N6RZ.js} +7 -7
- package/dist/bin/index.js +7 -7
- package/dist/index.js +9 -9
- package/package.json +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,11 +12,11 @@ var require = CJS_COMPAT_NODE_MODULE_r89nykcteng.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
relative,
|
|
14
14
|
resolve
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JTGCUODS.js";
|
|
16
16
|
import {
|
|
17
17
|
__commonJS,
|
|
18
18
|
__toESM
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YQMBFEC2.js";
|
|
20
20
|
|
|
21
21
|
// ../../../node_modules/ts-dedent/dist/index.js
|
|
22
22
|
var require_dist = __commonJS({
|
|
@@ -128,7 +128,7 @@ var require_picocolors = __commonJS({
|
|
|
128
128
|
// src/initiate.ts
|
|
129
129
|
import { resolve as resolve6 } from "node:path";
|
|
130
130
|
import {
|
|
131
|
-
ProjectType as
|
|
131
|
+
ProjectType as ProjectType23,
|
|
132
132
|
installSkills,
|
|
133
133
|
supportsSkills,
|
|
134
134
|
supportsAiSetup
|
|
@@ -687,6 +687,11 @@ var ProjectTypeService = class {
|
|
|
687
687
|
/** Sorted configuration to match a Storybook preset template */
|
|
688
688
|
getSupportedTemplates() {
|
|
689
689
|
return [
|
|
690
|
+
{
|
|
691
|
+
preset: ProjectType2.ASTRO,
|
|
692
|
+
dependencies: ["astro"],
|
|
693
|
+
matcherFunction: ({ dependencies }) => dependencies?.every(Boolean) ?? !0
|
|
694
|
+
},
|
|
690
695
|
{
|
|
691
696
|
preset: ProjectType2.NUXT,
|
|
692
697
|
dependencies: ["nuxt"],
|
|
@@ -1842,7 +1847,7 @@ import {
|
|
|
1842
1847
|
staticKey
|
|
1843
1848
|
} from "storybook/internal/csf-tools";
|
|
1844
1849
|
async function getTemplatePath() {
|
|
1845
|
-
return import("./vitest.config.4.template-
|
|
1850
|
+
return import("./vitest.config.4.template-5DE2N6RZ.js");
|
|
1846
1851
|
}
|
|
1847
1852
|
var loadTemplate = async (name, replacements) => {
|
|
1848
1853
|
let template = (await getTemplatePath()).default;
|
|
@@ -2275,7 +2280,7 @@ var ADDON_INSTALLATION_INSTRUCTIONS = {
|
|
|
2275
2280
|
}
|
|
2276
2281
|
/** Configure test addons */
|
|
2277
2282
|
async configureAddons(configDir, addons) {
|
|
2278
|
-
let { postinstallAddon } = await import("./postinstallAddon-
|
|
2283
|
+
let { postinstallAddon } = await import("./postinstallAddon-55RPTQIL.js"), task = prompt7.taskLog({
|
|
2279
2284
|
id: "configure-addons",
|
|
2280
2285
|
title: "Configuring addons..."
|
|
2281
2286
|
}), addonResults = /* @__PURE__ */ new Map();
|
|
@@ -2695,15 +2700,32 @@ function promptForCompoDocs(telemetryService) {
|
|
|
2695
2700
|
);
|
|
2696
2701
|
}
|
|
2697
2702
|
|
|
2698
|
-
// src/generators/
|
|
2703
|
+
// src/generators/ASTRO/index.ts
|
|
2699
2704
|
import { ProjectType as ProjectType5 } from "storybook/internal/cli";
|
|
2700
2705
|
import { SupportedBuilder as SupportedBuilder3, SupportedFramework as SupportedFramework5, SupportedRenderer as SupportedRenderer3 } from "storybook/internal/types";
|
|
2706
|
+
var ASTRO_default = {
|
|
2707
|
+
metadata: {
|
|
2708
|
+
projectType: ProjectType5.ASTRO,
|
|
2709
|
+
renderer: SupportedRenderer3.ASTRO,
|
|
2710
|
+
framework: SupportedFramework5.ASTRO,
|
|
2711
|
+
builderOverride: SupportedBuilder3.VITE
|
|
2712
|
+
},
|
|
2713
|
+
configure: async () => ({
|
|
2714
|
+
// @storybook-astro/framework does not depend on the builder, and ships no example stories.
|
|
2715
|
+
extraPackages: ["@storybook/builder-vite"],
|
|
2716
|
+
addComponents: !1
|
|
2717
|
+
})
|
|
2718
|
+
};
|
|
2719
|
+
|
|
2720
|
+
// src/generators/EMBER/index.ts
|
|
2721
|
+
import { ProjectType as ProjectType6 } from "storybook/internal/cli";
|
|
2722
|
+
import { SupportedBuilder as SupportedBuilder4, SupportedFramework as SupportedFramework6, SupportedRenderer as SupportedRenderer4 } from "storybook/internal/types";
|
|
2701
2723
|
var EMBER_default = {
|
|
2702
2724
|
metadata: {
|
|
2703
|
-
projectType:
|
|
2704
|
-
renderer:
|
|
2705
|
-
framework:
|
|
2706
|
-
builderOverride:
|
|
2725
|
+
projectType: ProjectType6.EMBER,
|
|
2726
|
+
renderer: SupportedRenderer4.EMBER,
|
|
2727
|
+
framework: SupportedFramework6.EMBER,
|
|
2728
|
+
builderOverride: SupportedBuilder4.WEBPACK5
|
|
2707
2729
|
},
|
|
2708
2730
|
configure: async () => ({
|
|
2709
2731
|
staticDir: "dist"
|
|
@@ -2711,15 +2733,15 @@ var EMBER_default = {
|
|
|
2711
2733
|
};
|
|
2712
2734
|
|
|
2713
2735
|
// src/generators/HTML/index.ts
|
|
2714
|
-
import { ProjectType as
|
|
2715
|
-
import { SupportedBuilder as
|
|
2736
|
+
import { ProjectType as ProjectType7 } from "storybook/internal/cli";
|
|
2737
|
+
import { SupportedBuilder as SupportedBuilder5, SupportedRenderer as SupportedRenderer5 } from "storybook/internal/types";
|
|
2716
2738
|
var HTML_default = {
|
|
2717
2739
|
metadata: {
|
|
2718
|
-
projectType:
|
|
2719
|
-
renderer:
|
|
2740
|
+
projectType: ProjectType7.HTML,
|
|
2741
|
+
renderer: SupportedRenderer5.HTML
|
|
2720
2742
|
},
|
|
2721
2743
|
configure: async () => ({
|
|
2722
|
-
webpackCompiler: ({ builder }) => builder ===
|
|
2744
|
+
webpackCompiler: ({ builder }) => builder === SupportedBuilder5.WEBPACK5 ? "swc" : void 0
|
|
2723
2745
|
})
|
|
2724
2746
|
};
|
|
2725
2747
|
|
|
@@ -2728,10 +2750,10 @@ var import_ts_dedent12 = __toESM(require_dist(), 1);
|
|
|
2728
2750
|
import { existsSync as existsSync3 } from "node:fs";
|
|
2729
2751
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
2730
2752
|
import { join as join6 } from "node:path";
|
|
2731
|
-
import { ProjectType as
|
|
2753
|
+
import { ProjectType as ProjectType8 } from "storybook/internal/cli";
|
|
2732
2754
|
import { findFilesUp } from "storybook/internal/common";
|
|
2733
2755
|
import { logger as logger14, prompt as prompt10 } from "storybook/internal/node-logger";
|
|
2734
|
-
import { SupportedBuilder as
|
|
2756
|
+
import { SupportedBuilder as SupportedBuilder6, SupportedFramework as SupportedFramework7, SupportedRenderer as SupportedRenderer6 } from "storybook/internal/types";
|
|
2735
2757
|
var NEXT_CONFIG_FILES = [
|
|
2736
2758
|
"next.config.mjs",
|
|
2737
2759
|
"next.config.js",
|
|
@@ -2749,16 +2771,16 @@ var NEXT_CONFIG_FILES = [
|
|
|
2749
2771
|
"babel.config.cjs"
|
|
2750
2772
|
], NEXTJS_default = {
|
|
2751
2773
|
metadata: {
|
|
2752
|
-
projectType:
|
|
2753
|
-
renderer:
|
|
2754
|
-
framework: (builder) => builder ===
|
|
2774
|
+
projectType: ProjectType8.NEXTJS,
|
|
2775
|
+
renderer: SupportedRenderer6.REACT,
|
|
2776
|
+
framework: (builder) => builder === SupportedBuilder6.VITE ? SupportedFramework7.NEXTJS_VITE : SupportedFramework7.NEXTJS,
|
|
2755
2777
|
builderOverride: async ({ telemetryService }) => {
|
|
2756
2778
|
let nextConfigFile = findFilesUp(NEXT_CONFIG_FILES, process.cwd())[0];
|
|
2757
2779
|
if (!nextConfigFile)
|
|
2758
|
-
return
|
|
2780
|
+
return SupportedBuilder6.VITE;
|
|
2759
2781
|
let hasCustomWebpackConfig = (await readFile2(nextConfigFile, "utf-8")).includes("webpack"), babelConfigFile = findFilesUp(BABEL_CONFIG_FILES, process.cwd())[0];
|
|
2760
2782
|
if (!hasCustomWebpackConfig && !babelConfigFile)
|
|
2761
|
-
return
|
|
2783
|
+
return SupportedBuilder6.VITE;
|
|
2762
2784
|
{
|
|
2763
2785
|
let reason = hasCustomWebpackConfig && babelConfigFile ? "custom webpack config and babel config" : hasCustomWebpackConfig ? "custom webpack config" : "custom babel config";
|
|
2764
2786
|
return logger14.info(import_ts_dedent12.dedent`
|
|
@@ -2771,8 +2793,8 @@ var NEXT_CONFIG_FILES = [
|
|
|
2771
2793
|
{
|
|
2772
2794
|
message: "Which framework would you like to use?",
|
|
2773
2795
|
options: [
|
|
2774
|
-
{ label: "@storybook/nextjs-vite", value:
|
|
2775
|
-
{ label: "@storybook/nextjs (Webpack)", value:
|
|
2796
|
+
{ label: "@storybook/nextjs-vite", value: SupportedBuilder6.VITE },
|
|
2797
|
+
{ label: "@storybook/nextjs (Webpack)", value: SupportedBuilder6.WEBPACK5 }
|
|
2776
2798
|
]
|
|
2777
2799
|
},
|
|
2778
2800
|
createPromptCancelOptions(telemetryService, "nextjs-builder")
|
|
@@ -2784,7 +2806,7 @@ var NEXT_CONFIG_FILES = [
|
|
|
2784
2806
|
let staticDir;
|
|
2785
2807
|
existsSync3(join6(process.cwd(), "public")) && (staticDir = "public");
|
|
2786
2808
|
let extraPackages = [];
|
|
2787
|
-
return context.builder ===
|
|
2809
|
+
return context.builder === SupportedBuilder6.VITE && extraPackages.push("vite"), {
|
|
2788
2810
|
staticDir,
|
|
2789
2811
|
extraPackages
|
|
2790
2812
|
};
|
|
@@ -2792,20 +2814,20 @@ var NEXT_CONFIG_FILES = [
|
|
|
2792
2814
|
};
|
|
2793
2815
|
|
|
2794
2816
|
// src/generators/NUXT/index.ts
|
|
2795
|
-
import { ProjectType as
|
|
2817
|
+
import { ProjectType as ProjectType9 } from "storybook/internal/cli";
|
|
2796
2818
|
import { logger as logger15 } from "storybook/internal/node-logger";
|
|
2797
2819
|
import {
|
|
2798
2820
|
Feature as Feature6,
|
|
2799
|
-
SupportedBuilder as
|
|
2800
|
-
SupportedFramework as
|
|
2801
|
-
SupportedRenderer as
|
|
2821
|
+
SupportedBuilder as SupportedBuilder7,
|
|
2822
|
+
SupportedFramework as SupportedFramework8,
|
|
2823
|
+
SupportedRenderer as SupportedRenderer7
|
|
2802
2824
|
} from "storybook/internal/types";
|
|
2803
2825
|
var NUXT_default = {
|
|
2804
2826
|
metadata: {
|
|
2805
|
-
projectType:
|
|
2806
|
-
renderer:
|
|
2807
|
-
framework:
|
|
2808
|
-
builderOverride:
|
|
2827
|
+
projectType: ProjectType9.NUXT,
|
|
2828
|
+
renderer: SupportedRenderer7.VUE3,
|
|
2829
|
+
framework: SupportedFramework8.NUXT,
|
|
2830
|
+
builderOverride: SupportedBuilder7.VITE
|
|
2809
2831
|
},
|
|
2810
2832
|
configure: async (packageManager, context) => {
|
|
2811
2833
|
let extraStories = context.features.has(Feature6.DOCS) ? ["../components/**/*.mdx"] : [];
|
|
@@ -2825,49 +2847,49 @@ var NUXT_default = {
|
|
|
2825
2847
|
};
|
|
2826
2848
|
|
|
2827
2849
|
// src/generators/PREACT/index.ts
|
|
2828
|
-
import { ProjectType as
|
|
2829
|
-
import { SupportedBuilder as
|
|
2850
|
+
import { ProjectType as ProjectType10 } from "storybook/internal/cli";
|
|
2851
|
+
import { SupportedBuilder as SupportedBuilder8, SupportedRenderer as SupportedRenderer8 } from "storybook/internal/types";
|
|
2830
2852
|
var PREACT_default = {
|
|
2831
2853
|
metadata: {
|
|
2832
|
-
projectType:
|
|
2833
|
-
renderer:
|
|
2854
|
+
projectType: ProjectType10.PREACT,
|
|
2855
|
+
renderer: SupportedRenderer8.PREACT
|
|
2834
2856
|
},
|
|
2835
2857
|
configure: async () => ({
|
|
2836
|
-
webpackCompiler: ({ builder }) => builder ===
|
|
2858
|
+
webpackCompiler: ({ builder }) => builder === SupportedBuilder8.WEBPACK5 ? "swc" : void 0
|
|
2837
2859
|
})
|
|
2838
2860
|
};
|
|
2839
2861
|
|
|
2840
2862
|
// src/generators/QWIK/index.ts
|
|
2841
|
-
import { ProjectType as
|
|
2842
|
-
import { SupportedFramework as
|
|
2863
|
+
import { ProjectType as ProjectType11 } from "storybook/internal/cli";
|
|
2864
|
+
import { SupportedFramework as SupportedFramework9, SupportedRenderer as SupportedRenderer9 } from "storybook/internal/types";
|
|
2843
2865
|
var QWIK_default = {
|
|
2844
2866
|
metadata: {
|
|
2845
|
-
projectType:
|
|
2846
|
-
renderer:
|
|
2847
|
-
framework:
|
|
2867
|
+
projectType: ProjectType11.QWIK,
|
|
2868
|
+
renderer: SupportedRenderer9.QWIK,
|
|
2869
|
+
framework: SupportedFramework9.QWIK
|
|
2848
2870
|
},
|
|
2849
2871
|
configure: async () => ({})
|
|
2850
2872
|
};
|
|
2851
2873
|
|
|
2852
2874
|
// src/generators/REACT/index.ts
|
|
2853
|
-
import { ProjectType as
|
|
2854
|
-
import { SupportedBuilder as
|
|
2875
|
+
import { ProjectType as ProjectType12 } from "storybook/internal/cli";
|
|
2876
|
+
import { SupportedBuilder as SupportedBuilder9, SupportedRenderer as SupportedRenderer10 } from "storybook/internal/types";
|
|
2855
2877
|
var REACT_default = {
|
|
2856
2878
|
metadata: {
|
|
2857
|
-
projectType:
|
|
2858
|
-
renderer:
|
|
2879
|
+
projectType: ProjectType12.REACT,
|
|
2880
|
+
renderer: SupportedRenderer10.REACT
|
|
2859
2881
|
},
|
|
2860
2882
|
configure: async () => ({
|
|
2861
|
-
webpackCompiler: ({ builder }) => builder ===
|
|
2883
|
+
webpackCompiler: ({ builder }) => builder === SupportedBuilder9.WEBPACK5 ? "swc" : void 0
|
|
2862
2884
|
})
|
|
2863
2885
|
};
|
|
2864
2886
|
|
|
2865
2887
|
// src/generators/REACT_NATIVE/index.ts
|
|
2866
2888
|
import { join as join9 } from "node:path";
|
|
2867
|
-
import { ProjectType as
|
|
2889
|
+
import { ProjectType as ProjectType13, copyTemplateFiles as copyTemplateFiles2 } from "storybook/internal/cli";
|
|
2868
2890
|
import { executeCommand as executeCommand2, versions as versions3 } from "storybook/internal/common";
|
|
2869
2891
|
import { CLI_COLORS as CLI_COLORS5, logger as logger17, prompt as prompt12 } from "storybook/internal/node-logger";
|
|
2870
|
-
import { SupportedBuilder as
|
|
2892
|
+
import { SupportedBuilder as SupportedBuilder10, SupportedLanguage as SupportedLanguage5, SupportedRenderer as SupportedRenderer11 } from "storybook/internal/types";
|
|
2871
2893
|
|
|
2872
2894
|
// ../../core/src/shared/constants/config-folder.ts
|
|
2873
2895
|
var RN_STORYBOOK_DIR = ".rnstorybook", DOCUMENTED_PREVIEW_IMPORT = "#.storybook/preview";
|
|
@@ -3201,9 +3223,9 @@ var lastMetroCodemodResult, lastScriptDerivationResult, detectReactNativeEntrypo
|
|
|
3201
3223
|
}
|
|
3202
3224
|
}, REACT_NATIVE_default = {
|
|
3203
3225
|
metadata: {
|
|
3204
|
-
projectType:
|
|
3205
|
-
renderer:
|
|
3206
|
-
builderOverride:
|
|
3226
|
+
projectType: ProjectType13.REACT_NATIVE,
|
|
3227
|
+
renderer: SupportedRenderer11.REACT,
|
|
3228
|
+
builderOverride: SupportedBuilder10.WEBPACK5,
|
|
3207
3229
|
framework: null
|
|
3208
3230
|
},
|
|
3209
3231
|
configure: async (packageManager, context) => {
|
|
@@ -3244,7 +3266,7 @@ var lastMetroCodemodResult, lastScriptDerivationResult, detectReactNativeEntrypo
|
|
|
3244
3266
|
}
|
|
3245
3267
|
await copyTemplateFiles2({
|
|
3246
3268
|
packageManager,
|
|
3247
|
-
templateLocation:
|
|
3269
|
+
templateLocation: SupportedRenderer11.REACT_NATIVE,
|
|
3248
3270
|
language: SupportedLanguage5.TYPESCRIPT,
|
|
3249
3271
|
destination: RN_STORYBOOK_DIR,
|
|
3250
3272
|
features: context.features
|
|
@@ -3307,25 +3329,25 @@ var lastMetroCodemodResult, lastScriptDerivationResult, detectReactNativeEntrypo
|
|
|
3307
3329
|
|
|
3308
3330
|
// src/generators/REACT_NATIVE_AND_RNW/index.ts
|
|
3309
3331
|
import { join as join11 } from "node:path";
|
|
3310
|
-
import { ProjectType as
|
|
3332
|
+
import { ProjectType as ProjectType15 } from "storybook/internal/cli";
|
|
3311
3333
|
import {
|
|
3312
|
-
SupportedBuilder as
|
|
3313
|
-
SupportedFramework as
|
|
3334
|
+
SupportedBuilder as SupportedBuilder12,
|
|
3335
|
+
SupportedFramework as SupportedFramework11,
|
|
3314
3336
|
SupportedLanguage as SupportedLanguage6,
|
|
3315
|
-
SupportedRenderer as
|
|
3337
|
+
SupportedRenderer as SupportedRenderer13
|
|
3316
3338
|
} from "storybook/internal/types";
|
|
3317
3339
|
|
|
3318
3340
|
// src/generators/REACT_NATIVE_WEB/index.ts
|
|
3319
3341
|
import { readdir, rm as rm2 } from "node:fs/promises";
|
|
3320
3342
|
import { join as join10 } from "node:path";
|
|
3321
|
-
import { ProjectType as
|
|
3322
|
-
import { SupportedBuilder as
|
|
3343
|
+
import { ProjectType as ProjectType14, cliStoriesTargetPath } from "storybook/internal/cli";
|
|
3344
|
+
import { SupportedBuilder as SupportedBuilder11, SupportedFramework as SupportedFramework10, SupportedRenderer as SupportedRenderer12 } from "storybook/internal/types";
|
|
3323
3345
|
var REACT_NATIVE_WEB_default = {
|
|
3324
3346
|
metadata: {
|
|
3325
|
-
projectType:
|
|
3326
|
-
renderer:
|
|
3327
|
-
framework:
|
|
3328
|
-
builderOverride:
|
|
3347
|
+
projectType: ProjectType14.REACT_NATIVE_WEB,
|
|
3348
|
+
renderer: SupportedRenderer12.REACT,
|
|
3349
|
+
framework: SupportedFramework10.REACT_NATIVE_WEB_VITE,
|
|
3350
|
+
builderOverride: SupportedBuilder11.VITE
|
|
3329
3351
|
},
|
|
3330
3352
|
configure: async () => ({
|
|
3331
3353
|
extraPackages: ["vite", "react-native-web"]
|
|
@@ -3342,10 +3364,10 @@ var REACT_NATIVE_WEB_default = {
|
|
|
3342
3364
|
// src/generators/REACT_NATIVE_AND_RNW/index.ts
|
|
3343
3365
|
var REACT_NATIVE_AND_RNW_default = {
|
|
3344
3366
|
metadata: {
|
|
3345
|
-
projectType:
|
|
3346
|
-
renderer:
|
|
3347
|
-
framework:
|
|
3348
|
-
builderOverride:
|
|
3367
|
+
projectType: ProjectType15.REACT_NATIVE_AND_RNW,
|
|
3368
|
+
renderer: SupportedRenderer13.REACT,
|
|
3369
|
+
framework: SupportedFramework11.REACT_NATIVE_WEB_VITE,
|
|
3370
|
+
builderOverride: SupportedBuilder12.VITE
|
|
3349
3371
|
},
|
|
3350
3372
|
configure: async (packageManager, context) => {
|
|
3351
3373
|
await REACT_NATIVE_default.configure(packageManager, context);
|
|
@@ -3369,13 +3391,13 @@ var REACT_NATIVE_AND_RNW_default = {
|
|
|
3369
3391
|
};
|
|
3370
3392
|
|
|
3371
3393
|
// src/generators/SERVER/index.ts
|
|
3372
|
-
import { ProjectType as
|
|
3373
|
-
import { SupportedBuilder as
|
|
3394
|
+
import { ProjectType as ProjectType16 } from "storybook/internal/cli";
|
|
3395
|
+
import { SupportedBuilder as SupportedBuilder13, SupportedRenderer as SupportedRenderer14 } from "storybook/internal/types";
|
|
3374
3396
|
var SERVER_default = {
|
|
3375
3397
|
metadata: {
|
|
3376
|
-
projectType:
|
|
3377
|
-
renderer:
|
|
3378
|
-
builderOverride:
|
|
3398
|
+
projectType: ProjectType16.SERVER,
|
|
3399
|
+
renderer: SupportedRenderer14.SERVER,
|
|
3400
|
+
builderOverride: SupportedBuilder13.WEBPACK5
|
|
3379
3401
|
},
|
|
3380
3402
|
configure: async () => ({
|
|
3381
3403
|
webpackCompiler: () => "swc",
|
|
@@ -3384,14 +3406,14 @@ var SERVER_default = {
|
|
|
3384
3406
|
};
|
|
3385
3407
|
|
|
3386
3408
|
// src/generators/SOLID/index.ts
|
|
3387
|
-
import { ProjectType as
|
|
3388
|
-
import { SupportedBuilder as
|
|
3409
|
+
import { ProjectType as ProjectType17 } from "storybook/internal/cli";
|
|
3410
|
+
import { SupportedBuilder as SupportedBuilder14, SupportedFramework as SupportedFramework12, SupportedRenderer as SupportedRenderer15 } from "storybook/internal/types";
|
|
3389
3411
|
var SOLID_default = {
|
|
3390
3412
|
metadata: {
|
|
3391
|
-
projectType:
|
|
3392
|
-
renderer:
|
|
3393
|
-
framework:
|
|
3394
|
-
builderOverride:
|
|
3413
|
+
projectType: ProjectType17.SOLID,
|
|
3414
|
+
renderer: SupportedRenderer15.SOLID,
|
|
3415
|
+
framework: SupportedFramework12.SOLID,
|
|
3416
|
+
builderOverride: SupportedBuilder14.VITE
|
|
3395
3417
|
},
|
|
3396
3418
|
configure: async () => ({
|
|
3397
3419
|
addComponents: !0
|
|
@@ -3399,12 +3421,12 @@ var SOLID_default = {
|
|
|
3399
3421
|
};
|
|
3400
3422
|
|
|
3401
3423
|
// src/generators/SVELTE/index.ts
|
|
3402
|
-
import { ProjectType as
|
|
3403
|
-
import { SupportedRenderer as
|
|
3424
|
+
import { ProjectType as ProjectType18 } from "storybook/internal/cli";
|
|
3425
|
+
import { SupportedRenderer as SupportedRenderer16 } from "storybook/internal/types";
|
|
3404
3426
|
var SVELTE_default = {
|
|
3405
3427
|
metadata: {
|
|
3406
|
-
projectType:
|
|
3407
|
-
renderer:
|
|
3428
|
+
projectType: ProjectType18.SVELTE,
|
|
3429
|
+
renderer: SupportedRenderer16.SVELTE
|
|
3408
3430
|
},
|
|
3409
3431
|
configure: async () => ({
|
|
3410
3432
|
extensions: ["js", "ts", "svelte"]
|
|
@@ -3412,14 +3434,14 @@ var SVELTE_default = {
|
|
|
3412
3434
|
};
|
|
3413
3435
|
|
|
3414
3436
|
// src/generators/SVELTEKIT/index.ts
|
|
3415
|
-
import { ProjectType as
|
|
3416
|
-
import { SupportedBuilder as
|
|
3437
|
+
import { ProjectType as ProjectType19 } from "storybook/internal/cli";
|
|
3438
|
+
import { SupportedBuilder as SupportedBuilder15, SupportedFramework as SupportedFramework13, SupportedRenderer as SupportedRenderer17 } from "storybook/internal/types";
|
|
3417
3439
|
var SVELTEKIT_default = {
|
|
3418
3440
|
metadata: {
|
|
3419
|
-
projectType:
|
|
3420
|
-
renderer:
|
|
3421
|
-
framework:
|
|
3422
|
-
builderOverride:
|
|
3441
|
+
projectType: ProjectType19.SVELTEKIT,
|
|
3442
|
+
renderer: SupportedRenderer17.SVELTE,
|
|
3443
|
+
framework: SupportedFramework13.SVELTEKIT,
|
|
3444
|
+
builderOverride: SupportedBuilder15.VITE
|
|
3423
3445
|
},
|
|
3424
3446
|
configure: async () => ({
|
|
3425
3447
|
extensions: ["js", "ts", "svelte"]
|
|
@@ -3427,14 +3449,14 @@ var SVELTEKIT_default = {
|
|
|
3427
3449
|
};
|
|
3428
3450
|
|
|
3429
3451
|
// src/generators/TANSTACK/index.ts
|
|
3430
|
-
import { ProjectType as
|
|
3431
|
-
import { SupportedBuilder as
|
|
3452
|
+
import { ProjectType as ProjectType20 } from "storybook/internal/cli";
|
|
3453
|
+
import { SupportedBuilder as SupportedBuilder16, SupportedFramework as SupportedFramework14, SupportedRenderer as SupportedRenderer18 } from "storybook/internal/types";
|
|
3432
3454
|
var TANSTACK_default = {
|
|
3433
3455
|
metadata: {
|
|
3434
|
-
projectType:
|
|
3435
|
-
renderer:
|
|
3436
|
-
framework:
|
|
3437
|
-
builderOverride:
|
|
3456
|
+
projectType: ProjectType20.TANSTACK_REACT,
|
|
3457
|
+
renderer: SupportedRenderer18.REACT,
|
|
3458
|
+
framework: SupportedFramework14.TANSTACK_REACT,
|
|
3459
|
+
builderOverride: SupportedBuilder16.VITE
|
|
3438
3460
|
},
|
|
3439
3461
|
configure: async () => ({
|
|
3440
3462
|
extraPackages: ["@tanstack/react-query", "@tanstack/react-router"]
|
|
@@ -3442,30 +3464,30 @@ var TANSTACK_default = {
|
|
|
3442
3464
|
};
|
|
3443
3465
|
|
|
3444
3466
|
// src/generators/VUE3/index.ts
|
|
3445
|
-
import { ProjectType as
|
|
3446
|
-
import { SupportedBuilder as
|
|
3467
|
+
import { ProjectType as ProjectType21 } from "storybook/internal/cli";
|
|
3468
|
+
import { SupportedBuilder as SupportedBuilder17, SupportedRenderer as SupportedRenderer19 } from "storybook/internal/types";
|
|
3447
3469
|
var VUE3_default = {
|
|
3448
3470
|
metadata: {
|
|
3449
|
-
projectType:
|
|
3450
|
-
renderer:
|
|
3471
|
+
projectType: ProjectType21.VUE3,
|
|
3472
|
+
renderer: SupportedRenderer19.VUE3
|
|
3451
3473
|
},
|
|
3452
3474
|
configure: async () => ({
|
|
3453
|
-
extraPackages: async ({ builder }) => builder ===
|
|
3454
|
-
webpackCompiler: ({ builder }) => builder ===
|
|
3475
|
+
extraPackages: async ({ builder }) => builder === SupportedBuilder17.WEBPACK5 ? ["vue-loader@^17.0.0", "@vue/compiler-sfc@^3.2.0"] : [],
|
|
3476
|
+
webpackCompiler: ({ builder }) => builder === SupportedBuilder17.WEBPACK5 ? "swc" : void 0
|
|
3455
3477
|
})
|
|
3456
3478
|
};
|
|
3457
3479
|
|
|
3458
3480
|
// src/generators/WEB-COMPONENTS/index.ts
|
|
3459
|
-
import { ProjectType as
|
|
3460
|
-
import { SupportedBuilder as
|
|
3481
|
+
import { ProjectType as ProjectType22 } from "storybook/internal/cli";
|
|
3482
|
+
import { SupportedBuilder as SupportedBuilder18, SupportedRenderer as SupportedRenderer20 } from "storybook/internal/types";
|
|
3461
3483
|
var WEB_COMPONENTS_default = {
|
|
3462
3484
|
metadata: {
|
|
3463
|
-
projectType:
|
|
3464
|
-
renderer:
|
|
3485
|
+
projectType: ProjectType22.WEB_COMPONENTS,
|
|
3486
|
+
renderer: SupportedRenderer20.WEB_COMPONENTS
|
|
3465
3487
|
},
|
|
3466
3488
|
configure: async () => ({
|
|
3467
3489
|
extraPackages: ["lit"],
|
|
3468
|
-
webpackCompiler: ({ builder }) => builder ===
|
|
3490
|
+
webpackCompiler: ({ builder }) => builder === SupportedBuilder18.WEBPACK5 ? "swc" : void 0
|
|
3469
3491
|
})
|
|
3470
3492
|
};
|
|
3471
3493
|
|
|
@@ -3488,7 +3510,8 @@ var setOfGenerators = /* @__PURE__ */ new Set([
|
|
|
3488
3510
|
SOLID_default,
|
|
3489
3511
|
SERVER_default,
|
|
3490
3512
|
QWIK_default,
|
|
3491
|
-
TANSTACK_default
|
|
3513
|
+
TANSTACK_default,
|
|
3514
|
+
ASTRO_default
|
|
3492
3515
|
]);
|
|
3493
3516
|
function registerAllGenerators() {
|
|
3494
3517
|
setOfGenerators.forEach((generator) => {
|
|
@@ -3619,7 +3642,7 @@ async function runStorybookDev(result) {
|
|
|
3619
3642
|
if (storybookCommand)
|
|
3620
3643
|
try {
|
|
3621
3644
|
let parts = storybookCommand.split(" ");
|
|
3622
|
-
if (packageManager.type === "npm" && projectType !==
|
|
3645
|
+
if (packageManager.type === "npm" && projectType !== ProjectType23.ANGULAR && parts.push("--silent"), projectType !== ProjectType23.ANGULAR) {
|
|
3623
3646
|
(packageManager.type === PackageManagerName2.NPM || packageManager.type === PackageManagerName2.BUN) && parts.push("--");
|
|
3624
3647
|
let defaultPort = 6006, availablePort = await getServerPort(defaultPort);
|
|
3625
3648
|
availablePort !== defaultPort && parts.push("-p", `${availablePort}`), parts.push("--quiet");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.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-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-JTGCUODS.js";
|
|
13
|
+
import "./chunk-YQMBFEC2.js";
|
|
14
14
|
|
|
15
15
|
// ../cli-storybook/src/postinstallAddon.ts
|
|
16
16
|
import { spawnSync } from "node:child_process";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.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
|
initiate
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TOLGY54H.js";
|
|
15
|
+
import "./chunk-JTGCUODS.js";
|
|
16
16
|
import {
|
|
17
17
|
__commonJS,
|
|
18
18
|
__require,
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YQMBFEC2.js";
|
|
21
21
|
|
|
22
22
|
// ../../../node_modules/commander/lib/error.js
|
|
23
23
|
var require_error = __commonJS({
|
|
@@ -2620,7 +2620,7 @@ var import_index = __toESM(require_commander(), 1), {
|
|
|
2620
2620
|
} = import_index.default;
|
|
2621
2621
|
|
|
2622
2622
|
// package.json
|
|
2623
|
-
var version = "11.0.0-
|
|
2623
|
+
var version = "11.0.0-beta.0";
|
|
2624
2624
|
|
|
2625
2625
|
// ../../../node_modules/std-env/dist/index.mjs
|
|
2626
2626
|
var E = globalThis.process?.env || /* @__PURE__ */ Object.create(null), I = globalThis.process || { env: E }, O = I !== void 0 && I.env && I.env.NODE_ENV || void 0, n = [["claude", ["CLAUDECODE", "CLAUDE_CODE"]], ["replit", ["REPL_ID"]], ["gemini", ["GEMINI_CLI"]], ["codex", ["CODEX_SANDBOX", "CODEX_THREAD_ID"]], ["opencode", ["OPENCODE"]], ["pi", [_("PATH", /\.pi[\\/]agent/)]], ["auggie", ["AUGMENT_AGENT"]], ["goose", ["GOOSE_PROVIDER"]], ["junie", ["JUNIE_DATA", "JUNIE_SHIM_PATH"]], ["copilot", ["COPILOT_AGENT", "COPILOT_CLI"]], ["devin", [_("EDITOR", /devin/)]], ["cursor", ["CURSOR_AGENT"]], ["kiro", [_("TERM_PROGRAM", /kiro/, { noTTY: !0 })]]];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.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-YQMBFEC2.js";
|
|
13
13
|
|
|
14
14
|
// raw:../templates/vitest.config.4.template.ts
|
|
15
15
|
var vitest_config_4_template_default = `import path from 'node:path';
|
package/dist/bin/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -20,4 +20,4 @@ if (!isNodeVersionSupported(process.versions.node)) {
|
|
|
20
20
|
You are currently running Node.js ${process.version}.`
|
|
21
21
|
), logger.outro(""), process.exit(1);
|
|
22
22
|
}
|
|
23
|
-
await import("../_node-chunks/run-
|
|
23
|
+
await import("../_node-chunks/run-Q3TIIWZ2.js");
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_g3n3xs12qj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_g3n3xs12qj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_g3n3xs12qj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_g3n3xs12qj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_g3n3xs12qj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_g3n3xs12qj.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
|
doInitiate
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
15
|
-
import "./_node-chunks/chunk-
|
|
16
|
-
import "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-TOLGY54H.js";
|
|
15
|
+
import "./_node-chunks/chunk-JTGCUODS.js";
|
|
16
|
+
import "./_node-chunks/chunk-YQMBFEC2.js";
|
|
17
17
|
export {
|
|
18
18
|
doInitiate as initiate
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-storybook",
|
|
3
|
-
"version": "11.0.0-
|
|
3
|
+
"version": "11.0.0-beta.0",
|
|
4
4
|
"description": "Storybook installer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"semver": "^7.7.3",
|
|
42
|
-
"storybook": "11.0.0-
|
|
42
|
+
"storybook": "11.0.0-beta.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/prompts": "^2.0.9",
|