create-storybook 10.1.2 → 10.1.3
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-E7NIVYO5.js → chunk-BWY7XSVN.js} +7 -7
- package/dist/_node-chunks/{chunk-XYKDNO37.js → chunk-O5ULZX32.js} +6 -6
- package/dist/_node-chunks/{chunk-HND2DVEV.js → chunk-YA4XLJ4S.js} +39 -23
- package/dist/_node-chunks/{postinstallAddon-CBMWPPCP.js → postinstallAddon-J7ZPHUWY.js} +7 -7
- package/dist/_node-chunks/{run-UTRPQGQK.js → run-4KTVK4VE.js} +15 -11
- package/dist/bin/index.js +9 -9
- package/dist/index.js +9 -9
- package/package.json +2 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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-O5ULZX32.js";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/ts-dedent/dist/index.js
|
|
17
17
|
var require_dist = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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
|
require_dist
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BWY7XSVN.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O5ULZX32.js";
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/picocolors/picocolors.js
|
|
21
21
|
var require_picocolors = __commonJS({
|
|
@@ -431,7 +431,7 @@ var TelemetryService = class {
|
|
|
431
431
|
}
|
|
432
432
|
/** Track a new user check step */
|
|
433
433
|
async trackNewUserCheck(newUser) {
|
|
434
|
-
this.runTelemetryIfEnabled("init-step", {
|
|
434
|
+
await this.runTelemetryIfEnabled("init-step", {
|
|
435
435
|
step: "new-user-check",
|
|
436
436
|
newUser
|
|
437
437
|
});
|
|
@@ -443,6 +443,13 @@ var TelemetryService = class {
|
|
|
443
443
|
installType
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
+
/** Track Playwright prompt decision (install | skip | aborted) */
|
|
447
|
+
async trackPlaywrightPromptDecision(result) {
|
|
448
|
+
await this.runTelemetryIfEnabled("init-step", {
|
|
449
|
+
step: "playwright-install",
|
|
450
|
+
result
|
|
451
|
+
});
|
|
452
|
+
}
|
|
446
453
|
/** Track the main init event with all metadata */
|
|
447
454
|
async trackInit(data) {
|
|
448
455
|
await this.runTelemetryIfEnabled("init", data);
|
|
@@ -1391,26 +1398,31 @@ import { ErrorCollector } from "storybook/internal/telemetry";
|
|
|
1391
1398
|
var ADDON_INSTALLATION_INSTRUCTIONS = {
|
|
1392
1399
|
"@storybook/addon-vitest": "https://storybook.js.org/docs/writing-tests/integrations/vitest-addon#manual-setup"
|
|
1393
1400
|
}, AddonConfigurationCommand = class {
|
|
1394
|
-
constructor(packageManager, addonVitestService = new AddonVitestService2(packageManager)) {
|
|
1401
|
+
constructor(packageManager, commandOptions, addonVitestService = new AddonVitestService2(packageManager), telemetryService = new TelemetryService(commandOptions.disableTelemetry)) {
|
|
1395
1402
|
this.packageManager = packageManager;
|
|
1403
|
+
this.commandOptions = commandOptions;
|
|
1396
1404
|
this.addonVitestService = addonVitestService;
|
|
1405
|
+
this.telemetryService = telemetryService;
|
|
1397
1406
|
}
|
|
1398
1407
|
/** Execute addon configuration */
|
|
1399
1408
|
async execute({
|
|
1400
|
-
options,
|
|
1401
1409
|
addons,
|
|
1402
1410
|
configDir,
|
|
1403
1411
|
dependencyInstallationResult
|
|
1404
1412
|
}) {
|
|
1405
|
-
if (!(dependencyInstallationResult.status === "success" && !
|
|
1413
|
+
if (!(dependencyInstallationResult.status === "success" && !this.commandOptions.skipInstall) && this.getAddonsWithInstructions(addons).length > 0)
|
|
1406
1414
|
return this.logManualAddonInstructions(addons), { status: "failed" };
|
|
1407
1415
|
if (!configDir || addons.length === 0)
|
|
1408
1416
|
return { status: "success" };
|
|
1409
1417
|
try {
|
|
1410
|
-
let { hasFailures, addonResults } = await this.configureAddons(configDir, addons
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1418
|
+
let { hasFailures, addonResults } = await this.configureAddons(configDir, addons);
|
|
1419
|
+
if (addonResults.has("@storybook/addon-vitest")) {
|
|
1420
|
+
let { result } = await this.addonVitestService.installPlaywright({
|
|
1421
|
+
yes: this.commandOptions.yes
|
|
1422
|
+
});
|
|
1423
|
+
await this.telemetryService.trackPlaywrightPromptDecision(result);
|
|
1424
|
+
}
|
|
1425
|
+
return { status: hasFailures ? "failed" : "success" };
|
|
1414
1426
|
} catch (e) {
|
|
1415
1427
|
return logger9.error("Unexpected error during addon configuration:"), logger9.error(e), { status: "failed" };
|
|
1416
1428
|
}
|
|
@@ -1433,8 +1445,8 @@ var ADDON_INSTALLATION_INSTRUCTIONS = {
|
|
|
1433
1445
|
`);
|
|
1434
1446
|
}
|
|
1435
1447
|
/** Configure test addons (a11y and vitest) */
|
|
1436
|
-
async configureAddons(configDir, addons
|
|
1437
|
-
let { postinstallAddon } = await import("./postinstallAddon-
|
|
1448
|
+
async configureAddons(configDir, addons) {
|
|
1449
|
+
let { postinstallAddon } = await import("./postinstallAddon-J7ZPHUWY.js"), task = prompt6.taskLog({
|
|
1438
1450
|
id: "configure-addons",
|
|
1439
1451
|
title: "Configuring addons..."
|
|
1440
1452
|
}), addonResults = /* @__PURE__ */ new Map();
|
|
@@ -1443,7 +1455,7 @@ var ADDON_INSTALLATION_INSTRUCTIONS = {
|
|
|
1443
1455
|
task.message(`Configuring ${addon}...`), await postinstallAddon(addon, {
|
|
1444
1456
|
packageManager: this.packageManager.type,
|
|
1445
1457
|
configDir,
|
|
1446
|
-
yes:
|
|
1458
|
+
yes: this.commandOptions.yes,
|
|
1447
1459
|
skipInstall: !0,
|
|
1448
1460
|
skipDependencyManagement: !0,
|
|
1449
1461
|
logger: logger9,
|
|
@@ -1463,8 +1475,9 @@ var ADDON_INSTALLATION_INSTRUCTIONS = {
|
|
|
1463
1475
|
}
|
|
1464
1476
|
}, executeAddonConfiguration = ({
|
|
1465
1477
|
packageManager,
|
|
1466
|
-
|
|
1467
|
-
|
|
1478
|
+
options,
|
|
1479
|
+
...rest
|
|
1480
|
+
}) => new AddonConfigurationCommand(packageManager, options).execute(rest);
|
|
1468
1481
|
|
|
1469
1482
|
// src/commands/DependencyInstallationCommand.ts
|
|
1470
1483
|
import { AddonVitestService as AddonVitestService3 } from "storybook/internal/cli";
|
|
@@ -1556,8 +1569,11 @@ ${linesToAdd}
|
|
|
1556
1569
|
logger11.warn(
|
|
1557
1570
|
"Storybook setup completed, but some non-blocking errors occurred. Please check the log file below for details."
|
|
1558
1571
|
), this.printNextSteps(storybookCommand);
|
|
1559
|
-
|
|
1560
|
-
|
|
1572
|
+
try {
|
|
1573
|
+
let logFile = await logTracker.writeToFile(this.logfile);
|
|
1574
|
+
logger11.warn(`Debug logs are written to: ${logFile}`);
|
|
1575
|
+
} catch {
|
|
1576
|
+
}
|
|
1561
1577
|
}
|
|
1562
1578
|
/** Print success message with feature summary */
|
|
1563
1579
|
printSuccessMessage(storybookCommand) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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-O5ULZX32.js";
|
|
13
13
|
|
|
14
14
|
// ../cli-storybook/src/postinstallAddon.ts
|
|
15
15
|
import { createRequire as createRequire2 } from "node:module";
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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-YA4XLJ4S.js";
|
|
15
|
+
import "./chunk-BWY7XSVN.js";
|
|
16
16
|
import {
|
|
17
17
|
__commonJS,
|
|
18
18
|
__require,
|
|
19
19
|
__toESM
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-O5ULZX32.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 = "10.1.
|
|
2623
|
+
var version = "10.1.3";
|
|
2624
2624
|
|
|
2625
2625
|
// src/bin/run.ts
|
|
2626
2626
|
addToGlobalContext("cliVersion", version);
|
|
@@ -2672,7 +2672,11 @@ var createStorybookProgram = program.name("Initialize Storybook into your projec
|
|
|
2672
2672
|
let options = self.opts();
|
|
2673
2673
|
options.debug && logger.setLogLevel("debug"), options.loglevel && logger.setLogLevel(options.loglevel), options.logfile && logTracker.enableLogWriting();
|
|
2674
2674
|
}).hook("postAction", async (command) => {
|
|
2675
|
-
logTracker.shouldWriteLogsToFile
|
|
2675
|
+
if (logTracker.shouldWriteLogsToFile)
|
|
2676
|
+
try {
|
|
2677
|
+
await logTracker.writeToFile(command.getOptionValue("logfile"));
|
|
2678
|
+
} catch {
|
|
2679
|
+
}
|
|
2676
2680
|
});
|
|
2677
2681
|
createStorybookProgram.action(async (options) => {
|
|
2678
2682
|
let isNeitherCiNorSandbox = !isCI() && !optionalEnvToBoolean(process.env.IN_STORYBOOK_SANDBOX);
|
package/dist/bin/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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
|
require_dist
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-BWY7XSVN.js";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-O5ULZX32.js";
|
|
19
19
|
|
|
20
20
|
// src/bin/index.ts
|
|
21
21
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
@@ -25,4 +25,4 @@ var [majorNodeVersion, minorNodeVersion] = process.versions.node.split(".").map(
|
|
|
25
25
|
import_ts_dedent.dedent`To run Storybook, you need Node.js version 20.19+ or 22.12+.
|
|
26
26
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
27
27
|
), process.exit(1));
|
|
28
|
-
import("../_node-chunks/run-
|
|
28
|
+
import("../_node-chunks/run-4KTVK4VE.js");
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_uj0sgqlmzl from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_uj0sgqlmzl from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_uj0sgqlmzl from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_uj0sgqlmzl.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_uj0sgqlmzl.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_uj0sgqlmzl.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-YA4XLJ4S.js";
|
|
15
|
+
import "./_node-chunks/chunk-BWY7XSVN.js";
|
|
16
|
+
import "./_node-chunks/chunk-O5ULZX32.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": "10.1.
|
|
3
|
+
"version": "10.1.3",
|
|
4
4
|
"description": "Storybook installer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"semver": "^7.6.2",
|
|
46
|
-
"storybook": "10.1.
|
|
46
|
+
"storybook": "10.1.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/prompts": "^2.0.9",
|