create-storybook 10.0.0-beta.2 → 10.0.0-beta.4
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-VG5HPX7P.js → chunk-CELW5TN7.js} +11 -6
- package/dist/_node-chunks/{chunk-SQD57AXM.js → chunk-THF6B443.js} +491 -453
- package/dist/_node-chunks/{run-DHV7GLTX.js → run-YL2NHMIB.js} +11 -11
- package/dist/bin/index.js +8 -8
- package/dist/index.js +8 -8
- package/package.json +4 -3
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0v69wlcypqha from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0v69wlcypqha from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0v69wlcypqha from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0v69wlcypqha.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0v69wlcypqha.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0v69wlcypqha.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
|
+
__export,
|
|
14
15
|
__name,
|
|
15
16
|
__require,
|
|
16
17
|
__toESM,
|
|
17
18
|
require_dist
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CELW5TN7.js";
|
|
19
20
|
|
|
20
21
|
// ../../node_modules/eastasianwidth/eastasianwidth.js
|
|
21
22
|
var require_eastasianwidth = __commonJS({
|
|
@@ -943,7 +944,7 @@ var require_prompt = __commonJS({
|
|
|
943
944
|
var require_text = __commonJS({
|
|
944
945
|
"../../node_modules/prompts/dist/elements/text.js"(exports, module) {
|
|
945
946
|
"use strict";
|
|
946
|
-
function asyncGeneratorStep(gen,
|
|
947
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
947
948
|
try {
|
|
948
949
|
var info = gen[key](arg);
|
|
949
950
|
var value = info.value;
|
|
@@ -952,7 +953,7 @@ var require_text = __commonJS({
|
|
|
952
953
|
return;
|
|
953
954
|
}
|
|
954
955
|
if (info.done) {
|
|
955
|
-
|
|
956
|
+
resolve4(value);
|
|
956
957
|
} else {
|
|
957
958
|
Promise.resolve(value).then(_next, _throw);
|
|
958
959
|
}
|
|
@@ -961,14 +962,14 @@ var require_text = __commonJS({
|
|
|
961
962
|
function _asyncToGenerator(fn) {
|
|
962
963
|
return function() {
|
|
963
964
|
var self2 = this, args = arguments;
|
|
964
|
-
return new Promise(function(
|
|
965
|
+
return new Promise(function(resolve4, reject) {
|
|
965
966
|
var gen = fn.apply(self2, args);
|
|
966
967
|
function _next(value) {
|
|
967
|
-
asyncGeneratorStep(gen,
|
|
968
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
968
969
|
}
|
|
969
970
|
__name(_next, "_next");
|
|
970
971
|
function _throw(err) {
|
|
971
|
-
asyncGeneratorStep(gen,
|
|
972
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
972
973
|
}
|
|
973
974
|
__name(_throw, "_throw");
|
|
974
975
|
_next(void 0);
|
|
@@ -1722,7 +1723,7 @@ var require_dateparts = __commonJS({
|
|
|
1722
1723
|
var require_date = __commonJS({
|
|
1723
1724
|
"../../node_modules/prompts/dist/elements/date.js"(exports, module) {
|
|
1724
1725
|
"use strict";
|
|
1725
|
-
function asyncGeneratorStep(gen,
|
|
1726
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
1726
1727
|
try {
|
|
1727
1728
|
var info = gen[key](arg);
|
|
1728
1729
|
var value = info.value;
|
|
@@ -1731,7 +1732,7 @@ var require_date = __commonJS({
|
|
|
1731
1732
|
return;
|
|
1732
1733
|
}
|
|
1733
1734
|
if (info.done) {
|
|
1734
|
-
|
|
1735
|
+
resolve4(value);
|
|
1735
1736
|
} else {
|
|
1736
1737
|
Promise.resolve(value).then(_next, _throw);
|
|
1737
1738
|
}
|
|
@@ -1740,14 +1741,14 @@ var require_date = __commonJS({
|
|
|
1740
1741
|
function _asyncToGenerator(fn) {
|
|
1741
1742
|
return function() {
|
|
1742
1743
|
var self2 = this, args = arguments;
|
|
1743
|
-
return new Promise(function(
|
|
1744
|
+
return new Promise(function(resolve4, reject) {
|
|
1744
1745
|
var gen = fn.apply(self2, args);
|
|
1745
1746
|
function _next(value) {
|
|
1746
|
-
asyncGeneratorStep(gen,
|
|
1747
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
1747
1748
|
}
|
|
1748
1749
|
__name(_next, "_next");
|
|
1749
1750
|
function _throw(err) {
|
|
1750
|
-
asyncGeneratorStep(gen,
|
|
1751
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
1751
1752
|
}
|
|
1752
1753
|
__name(_throw, "_throw");
|
|
1753
1754
|
_next(void 0);
|
|
@@ -1955,7 +1956,7 @@ ${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
|
|
|
1955
1956
|
var require_number = __commonJS({
|
|
1956
1957
|
"../../node_modules/prompts/dist/elements/number.js"(exports, module) {
|
|
1957
1958
|
"use strict";
|
|
1958
|
-
function asyncGeneratorStep(gen,
|
|
1959
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
1959
1960
|
try {
|
|
1960
1961
|
var info = gen[key](arg);
|
|
1961
1962
|
var value = info.value;
|
|
@@ -1964,7 +1965,7 @@ var require_number = __commonJS({
|
|
|
1964
1965
|
return;
|
|
1965
1966
|
}
|
|
1966
1967
|
if (info.done) {
|
|
1967
|
-
|
|
1968
|
+
resolve4(value);
|
|
1968
1969
|
} else {
|
|
1969
1970
|
Promise.resolve(value).then(_next, _throw);
|
|
1970
1971
|
}
|
|
@@ -1973,14 +1974,14 @@ var require_number = __commonJS({
|
|
|
1973
1974
|
function _asyncToGenerator(fn) {
|
|
1974
1975
|
return function() {
|
|
1975
1976
|
var self2 = this, args = arguments;
|
|
1976
|
-
return new Promise(function(
|
|
1977
|
+
return new Promise(function(resolve4, reject) {
|
|
1977
1978
|
var gen = fn.apply(self2, args);
|
|
1978
1979
|
function _next(value) {
|
|
1979
|
-
asyncGeneratorStep(gen,
|
|
1980
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
1980
1981
|
}
|
|
1981
1982
|
__name(_next, "_next");
|
|
1982
1983
|
function _throw(err) {
|
|
1983
|
-
asyncGeneratorStep(gen,
|
|
1984
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
1984
1985
|
}
|
|
1985
1986
|
__name(_throw, "_throw");
|
|
1986
1987
|
_next(void 0);
|
|
@@ -1999,7 +2000,7 @@ var require_number = __commonJS({
|
|
|
1999
2000
|
var clear = _require2.clear;
|
|
2000
2001
|
var lines = _require2.lines;
|
|
2001
2002
|
var isNumber = /[0-9]/;
|
|
2002
|
-
var isDef = /* @__PURE__ */ __name((
|
|
2003
|
+
var isDef = /* @__PURE__ */ __name((any2) => any2 !== void 0, "isDef");
|
|
2003
2004
|
var round = /* @__PURE__ */ __name((number, precision) => {
|
|
2004
2005
|
let factor = Math.pow(10, precision);
|
|
2005
2006
|
return Math.round(number * factor) / factor;
|
|
@@ -2411,7 +2412,7 @@ Instructions:
|
|
|
2411
2412
|
var require_autocomplete = __commonJS({
|
|
2412
2413
|
"../../node_modules/prompts/dist/elements/autocomplete.js"(exports, module) {
|
|
2413
2414
|
"use strict";
|
|
2414
|
-
function asyncGeneratorStep(gen,
|
|
2415
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
2415
2416
|
try {
|
|
2416
2417
|
var info = gen[key](arg);
|
|
2417
2418
|
var value = info.value;
|
|
@@ -2420,7 +2421,7 @@ var require_autocomplete = __commonJS({
|
|
|
2420
2421
|
return;
|
|
2421
2422
|
}
|
|
2422
2423
|
if (info.done) {
|
|
2423
|
-
|
|
2424
|
+
resolve4(value);
|
|
2424
2425
|
} else {
|
|
2425
2426
|
Promise.resolve(value).then(_next, _throw);
|
|
2426
2427
|
}
|
|
@@ -2429,14 +2430,14 @@ var require_autocomplete = __commonJS({
|
|
|
2429
2430
|
function _asyncToGenerator(fn) {
|
|
2430
2431
|
return function() {
|
|
2431
2432
|
var self2 = this, args = arguments;
|
|
2432
|
-
return new Promise(function(
|
|
2433
|
+
return new Promise(function(resolve4, reject) {
|
|
2433
2434
|
var gen = fn.apply(self2, args);
|
|
2434
2435
|
function _next(value) {
|
|
2435
|
-
asyncGeneratorStep(gen,
|
|
2436
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
2436
2437
|
}
|
|
2437
2438
|
__name(_next, "_next");
|
|
2438
2439
|
function _throw(err) {
|
|
2439
|
-
asyncGeneratorStep(gen,
|
|
2440
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
2440
2441
|
}
|
|
2441
2442
|
__name(_throw, "_throw");
|
|
2442
2443
|
_next(void 0);
|
|
@@ -3085,7 +3086,7 @@ var require_dist2 = __commonJS({
|
|
|
3085
3086
|
return arr2;
|
|
3086
3087
|
}
|
|
3087
3088
|
__name(_arrayLikeToArray, "_arrayLikeToArray");
|
|
3088
|
-
function asyncGeneratorStep(gen,
|
|
3089
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
3089
3090
|
try {
|
|
3090
3091
|
var info = gen[key](arg);
|
|
3091
3092
|
var value = info.value;
|
|
@@ -3094,7 +3095,7 @@ var require_dist2 = __commonJS({
|
|
|
3094
3095
|
return;
|
|
3095
3096
|
}
|
|
3096
3097
|
if (info.done) {
|
|
3097
|
-
|
|
3098
|
+
resolve4(value);
|
|
3098
3099
|
} else {
|
|
3099
3100
|
Promise.resolve(value).then(_next, _throw);
|
|
3100
3101
|
}
|
|
@@ -3103,14 +3104,14 @@ var require_dist2 = __commonJS({
|
|
|
3103
3104
|
function _asyncToGenerator(fn) {
|
|
3104
3105
|
return function() {
|
|
3105
3106
|
var self2 = this, args = arguments;
|
|
3106
|
-
return new Promise(function(
|
|
3107
|
+
return new Promise(function(resolve4, reject) {
|
|
3107
3108
|
var gen = fn.apply(self2, args);
|
|
3108
3109
|
function _next(value) {
|
|
3109
|
-
asyncGeneratorStep(gen,
|
|
3110
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
3110
3111
|
}
|
|
3111
3112
|
__name(_next, "_next");
|
|
3112
3113
|
function _throw(err) {
|
|
3113
|
-
asyncGeneratorStep(gen,
|
|
3114
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
3114
3115
|
}
|
|
3115
3116
|
__name(_throw, "_throw");
|
|
3116
3117
|
_next(void 0);
|
|
@@ -4410,7 +4411,7 @@ var require_number2 = __commonJS({
|
|
|
4410
4411
|
var { cursor, erase } = require_src();
|
|
4411
4412
|
var { style, figures, clear, lines } = require_util2();
|
|
4412
4413
|
var isNumber = /[0-9]/;
|
|
4413
|
-
var isDef = /* @__PURE__ */ __name((
|
|
4414
|
+
var isDef = /* @__PURE__ */ __name((any2) => any2 !== void 0, "isDef");
|
|
4414
4415
|
var round = /* @__PURE__ */ __name((number, precision) => {
|
|
4415
4416
|
let factor = Math.pow(10, precision);
|
|
4416
4417
|
return Math.round(number * factor) / factor;
|
|
@@ -6323,15 +6324,15 @@ var require_route = __commonJS({
|
|
|
6323
6324
|
}
|
|
6324
6325
|
__name(link, "link");
|
|
6325
6326
|
function wrapConversion(toModel, graph) {
|
|
6326
|
-
const
|
|
6327
|
+
const path = [graph[toModel].parent, toModel];
|
|
6327
6328
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
6328
6329
|
let cur = graph[toModel].parent;
|
|
6329
6330
|
while (graph[cur].parent) {
|
|
6330
|
-
|
|
6331
|
+
path.unshift(graph[cur].parent);
|
|
6331
6332
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
6332
6333
|
cur = graph[cur].parent;
|
|
6333
6334
|
}
|
|
6334
|
-
fn.conversion =
|
|
6335
|
+
fn.conversion = path;
|
|
6335
6336
|
return fn;
|
|
6336
6337
|
}
|
|
6337
6338
|
__name(wrapConversion, "wrapConversion");
|
|
@@ -6575,7 +6576,7 @@ var require_has_flag = __commonJS({
|
|
|
6575
6576
|
var require_supports_color = __commonJS({
|
|
6576
6577
|
"../../node_modules/supports-color/index.js"(exports, module) {
|
|
6577
6578
|
"use strict";
|
|
6578
|
-
var
|
|
6579
|
+
var os3 = __require("os");
|
|
6579
6580
|
var tty2 = __require("tty");
|
|
6580
6581
|
var hasFlag2 = require_has_flag();
|
|
6581
6582
|
var { env: env2 } = process;
|
|
@@ -6624,7 +6625,7 @@ var require_supports_color = __commonJS({
|
|
|
6624
6625
|
return min;
|
|
6625
6626
|
}
|
|
6626
6627
|
if (process.platform === "win32") {
|
|
6627
|
-
const osRelease =
|
|
6628
|
+
const osRelease = os3.release().split(".");
|
|
6628
6629
|
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
6629
6630
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
6630
6631
|
}
|
|
@@ -7108,11 +7109,11 @@ var require_signals = __commonJS({
|
|
|
7108
7109
|
// ../../node_modules/signal-exit/index.js
|
|
7109
7110
|
var require_signal_exit = __commonJS({
|
|
7110
7111
|
"../../node_modules/signal-exit/index.js"(exports, module) {
|
|
7111
|
-
var
|
|
7112
|
-
var processOk = /* @__PURE__ */ __name(function(
|
|
7113
|
-
return
|
|
7112
|
+
var process4 = global.process;
|
|
7113
|
+
var processOk = /* @__PURE__ */ __name(function(process5) {
|
|
7114
|
+
return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function";
|
|
7114
7115
|
}, "processOk");
|
|
7115
|
-
if (!processOk(
|
|
7116
|
+
if (!processOk(process4)) {
|
|
7116
7117
|
module.exports = function() {
|
|
7117
7118
|
return function() {
|
|
7118
7119
|
};
|
|
@@ -7120,15 +7121,15 @@ var require_signal_exit = __commonJS({
|
|
|
7120
7121
|
} else {
|
|
7121
7122
|
assert = __require("assert");
|
|
7122
7123
|
signals = require_signals();
|
|
7123
|
-
isWin = /^win/i.test(
|
|
7124
|
+
isWin = /^win/i.test(process4.platform);
|
|
7124
7125
|
EE = __require("events");
|
|
7125
7126
|
if (typeof EE !== "function") {
|
|
7126
7127
|
EE = EE.EventEmitter;
|
|
7127
7128
|
}
|
|
7128
|
-
if (
|
|
7129
|
-
emitter =
|
|
7129
|
+
if (process4.__signal_exit_emitter__) {
|
|
7130
|
+
emitter = process4.__signal_exit_emitter__;
|
|
7130
7131
|
} else {
|
|
7131
|
-
emitter =
|
|
7132
|
+
emitter = process4.__signal_exit_emitter__ = new EE();
|
|
7132
7133
|
emitter.count = 0;
|
|
7133
7134
|
emitter.emitted = {};
|
|
7134
7135
|
}
|
|
@@ -7165,12 +7166,12 @@ var require_signal_exit = __commonJS({
|
|
|
7165
7166
|
loaded = false;
|
|
7166
7167
|
signals.forEach(function(sig) {
|
|
7167
7168
|
try {
|
|
7168
|
-
|
|
7169
|
+
process4.removeListener(sig, sigListeners[sig]);
|
|
7169
7170
|
} catch (er) {
|
|
7170
7171
|
}
|
|
7171
7172
|
});
|
|
7172
|
-
|
|
7173
|
-
|
|
7173
|
+
process4.emit = originalProcessEmit;
|
|
7174
|
+
process4.reallyExit = originalProcessReallyExit;
|
|
7174
7175
|
emitter.count -= 1;
|
|
7175
7176
|
}, "unload");
|
|
7176
7177
|
module.exports.unload = unload;
|
|
@@ -7187,7 +7188,7 @@ var require_signal_exit = __commonJS({
|
|
|
7187
7188
|
if (!processOk(global.process)) {
|
|
7188
7189
|
return;
|
|
7189
7190
|
}
|
|
7190
|
-
var listeners =
|
|
7191
|
+
var listeners = process4.listeners(sig);
|
|
7191
7192
|
if (listeners.length === emitter.count) {
|
|
7192
7193
|
unload();
|
|
7193
7194
|
emit("exit", null, sig);
|
|
@@ -7195,7 +7196,7 @@ var require_signal_exit = __commonJS({
|
|
|
7195
7196
|
if (isWin && sig === "SIGHUP") {
|
|
7196
7197
|
sig = "SIGINT";
|
|
7197
7198
|
}
|
|
7198
|
-
|
|
7199
|
+
process4.kill(process4.pid, sig);
|
|
7199
7200
|
}
|
|
7200
7201
|
}, "listener");
|
|
7201
7202
|
});
|
|
@@ -7211,36 +7212,36 @@ var require_signal_exit = __commonJS({
|
|
|
7211
7212
|
emitter.count += 1;
|
|
7212
7213
|
signals = signals.filter(function(sig) {
|
|
7213
7214
|
try {
|
|
7214
|
-
|
|
7215
|
+
process4.on(sig, sigListeners[sig]);
|
|
7215
7216
|
return true;
|
|
7216
7217
|
} catch (er) {
|
|
7217
7218
|
return false;
|
|
7218
7219
|
}
|
|
7219
7220
|
});
|
|
7220
|
-
|
|
7221
|
-
|
|
7221
|
+
process4.emit = processEmit;
|
|
7222
|
+
process4.reallyExit = processReallyExit;
|
|
7222
7223
|
}, "load");
|
|
7223
7224
|
module.exports.load = load;
|
|
7224
|
-
originalProcessReallyExit =
|
|
7225
|
+
originalProcessReallyExit = process4.reallyExit;
|
|
7225
7226
|
processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code) {
|
|
7226
7227
|
if (!processOk(global.process)) {
|
|
7227
7228
|
return;
|
|
7228
7229
|
}
|
|
7229
|
-
|
|
7230
|
+
process4.exitCode = code || /* istanbul ignore next */
|
|
7230
7231
|
0;
|
|
7231
|
-
emit("exit",
|
|
7232
|
-
emit("afterexit",
|
|
7233
|
-
originalProcessReallyExit.call(
|
|
7232
|
+
emit("exit", process4.exitCode, null);
|
|
7233
|
+
emit("afterexit", process4.exitCode, null);
|
|
7234
|
+
originalProcessReallyExit.call(process4, process4.exitCode);
|
|
7234
7235
|
}, "processReallyExit");
|
|
7235
|
-
originalProcessEmit =
|
|
7236
|
+
originalProcessEmit = process4.emit;
|
|
7236
7237
|
processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg) {
|
|
7237
7238
|
if (ev === "exit" && processOk(global.process)) {
|
|
7238
7239
|
if (arg !== void 0) {
|
|
7239
|
-
|
|
7240
|
+
process4.exitCode = arg;
|
|
7240
7241
|
}
|
|
7241
7242
|
var ret = originalProcessEmit.apply(this, arguments);
|
|
7242
|
-
emit("exit",
|
|
7243
|
-
emit("afterexit",
|
|
7243
|
+
emit("exit", process4.exitCode, null);
|
|
7244
|
+
emit("afterexit", process4.exitCode, null);
|
|
7244
7245
|
return ret;
|
|
7245
7246
|
} else {
|
|
7246
7247
|
return originalProcessEmit.apply(this, arguments);
|
|
@@ -7312,9 +7313,9 @@ var require_cli_cursor = __commonJS({
|
|
|
7312
7313
|
}
|
|
7313
7314
|
});
|
|
7314
7315
|
|
|
7315
|
-
// ../../node_modules/
|
|
7316
|
+
// ../../node_modules/cli-spinners/spinners.json
|
|
7316
7317
|
var require_spinners = __commonJS({
|
|
7317
|
-
"../../node_modules/
|
|
7318
|
+
"../../node_modules/cli-spinners/spinners.json"(exports, module) {
|
|
7318
7319
|
module.exports = {
|
|
7319
7320
|
dots: {
|
|
7320
7321
|
interval: 80,
|
|
@@ -8940,9 +8941,9 @@ var require_spinners = __commonJS({
|
|
|
8940
8941
|
}
|
|
8941
8942
|
});
|
|
8942
8943
|
|
|
8943
|
-
// ../../node_modules/
|
|
8944
|
+
// ../../node_modules/cli-spinners/index.js
|
|
8944
8945
|
var require_cli_spinners = __commonJS({
|
|
8945
|
-
"../../node_modules/
|
|
8946
|
+
"../../node_modules/cli-spinners/index.js"(exports, module) {
|
|
8946
8947
|
"use strict";
|
|
8947
8948
|
var spinners = Object.assign({}, require_spinners());
|
|
8948
8949
|
var spinnersList = Object.keys(spinners);
|
|
@@ -9524,7 +9525,7 @@ var require_buffer_list = __commonJS({
|
|
|
9524
9525
|
}, "clear")
|
|
9525
9526
|
}, {
|
|
9526
9527
|
key: "join",
|
|
9527
|
-
value: /* @__PURE__ */ __name(function
|
|
9528
|
+
value: /* @__PURE__ */ __name(function join7(s) {
|
|
9528
9529
|
if (this.length === 0) return "";
|
|
9529
9530
|
var p = this.head;
|
|
9530
9531
|
var ret = "" + p.data;
|
|
@@ -10969,14 +10970,14 @@ var require_async_iterator = __commonJS({
|
|
|
10969
10970
|
}
|
|
10970
10971
|
__name(createIterResult, "createIterResult");
|
|
10971
10972
|
function readAndResolve(iter) {
|
|
10972
|
-
var
|
|
10973
|
-
if (
|
|
10973
|
+
var resolve4 = iter[kLastResolve];
|
|
10974
|
+
if (resolve4 !== null) {
|
|
10974
10975
|
var data = iter[kStream].read();
|
|
10975
10976
|
if (data !== null) {
|
|
10976
10977
|
iter[kLastPromise] = null;
|
|
10977
10978
|
iter[kLastResolve] = null;
|
|
10978
10979
|
iter[kLastReject] = null;
|
|
10979
|
-
|
|
10980
|
+
resolve4(createIterResult(data, false));
|
|
10980
10981
|
}
|
|
10981
10982
|
}
|
|
10982
10983
|
}
|
|
@@ -10986,13 +10987,13 @@ var require_async_iterator = __commonJS({
|
|
|
10986
10987
|
}
|
|
10987
10988
|
__name(onReadable, "onReadable");
|
|
10988
10989
|
function wrapForNext(lastPromise, iter) {
|
|
10989
|
-
return function(
|
|
10990
|
+
return function(resolve4, reject) {
|
|
10990
10991
|
lastPromise.then(function() {
|
|
10991
10992
|
if (iter[kEnded]) {
|
|
10992
|
-
|
|
10993
|
+
resolve4(createIterResult(void 0, true));
|
|
10993
10994
|
return;
|
|
10994
10995
|
}
|
|
10995
|
-
iter[kHandlePromise](
|
|
10996
|
+
iter[kHandlePromise](resolve4, reject);
|
|
10996
10997
|
}, reject);
|
|
10997
10998
|
};
|
|
10998
10999
|
}
|
|
@@ -11013,12 +11014,12 @@ var require_async_iterator = __commonJS({
|
|
|
11013
11014
|
return Promise.resolve(createIterResult(void 0, true));
|
|
11014
11015
|
}
|
|
11015
11016
|
if (this[kStream].destroyed) {
|
|
11016
|
-
return new Promise(function(
|
|
11017
|
+
return new Promise(function(resolve4, reject) {
|
|
11017
11018
|
process.nextTick(function() {
|
|
11018
11019
|
if (_this[kError]) {
|
|
11019
11020
|
reject(_this[kError]);
|
|
11020
11021
|
} else {
|
|
11021
|
-
|
|
11022
|
+
resolve4(createIterResult(void 0, true));
|
|
11022
11023
|
}
|
|
11023
11024
|
});
|
|
11024
11025
|
});
|
|
@@ -11041,13 +11042,13 @@ var require_async_iterator = __commonJS({
|
|
|
11041
11042
|
return this;
|
|
11042
11043
|
}), _defineProperty(_Object$setPrototypeO, "return", /* @__PURE__ */ __name(function _return() {
|
|
11043
11044
|
var _this2 = this;
|
|
11044
|
-
return new Promise(function(
|
|
11045
|
+
return new Promise(function(resolve4, reject) {
|
|
11045
11046
|
_this2[kStream].destroy(null, function(err) {
|
|
11046
11047
|
if (err) {
|
|
11047
11048
|
reject(err);
|
|
11048
11049
|
return;
|
|
11049
11050
|
}
|
|
11050
|
-
|
|
11051
|
+
resolve4(createIterResult(void 0, true));
|
|
11051
11052
|
});
|
|
11052
11053
|
});
|
|
11053
11054
|
}, "_return")), _Object$setPrototypeO), AsyncIteratorPrototype);
|
|
@@ -11069,15 +11070,15 @@ var require_async_iterator = __commonJS({
|
|
|
11069
11070
|
value: stream._readableState.endEmitted,
|
|
11070
11071
|
writable: true
|
|
11071
11072
|
}), _defineProperty(_Object$create, kHandlePromise, {
|
|
11072
|
-
value: /* @__PURE__ */ __name(function value(
|
|
11073
|
+
value: /* @__PURE__ */ __name(function value(resolve4, reject) {
|
|
11073
11074
|
var data = iterator[kStream].read();
|
|
11074
11075
|
if (data) {
|
|
11075
11076
|
iterator[kLastPromise] = null;
|
|
11076
11077
|
iterator[kLastResolve] = null;
|
|
11077
11078
|
iterator[kLastReject] = null;
|
|
11078
|
-
|
|
11079
|
+
resolve4(createIterResult(data, false));
|
|
11079
11080
|
} else {
|
|
11080
|
-
iterator[kLastResolve] =
|
|
11081
|
+
iterator[kLastResolve] = resolve4;
|
|
11081
11082
|
iterator[kLastReject] = reject;
|
|
11082
11083
|
}
|
|
11083
11084
|
}, "value"),
|
|
@@ -11096,12 +11097,12 @@ var require_async_iterator = __commonJS({
|
|
|
11096
11097
|
iterator[kError] = err;
|
|
11097
11098
|
return;
|
|
11098
11099
|
}
|
|
11099
|
-
var
|
|
11100
|
-
if (
|
|
11100
|
+
var resolve4 = iterator[kLastResolve];
|
|
11101
|
+
if (resolve4 !== null) {
|
|
11101
11102
|
iterator[kLastPromise] = null;
|
|
11102
11103
|
iterator[kLastResolve] = null;
|
|
11103
11104
|
iterator[kLastReject] = null;
|
|
11104
|
-
|
|
11105
|
+
resolve4(createIterResult(void 0, true));
|
|
11105
11106
|
}
|
|
11106
11107
|
iterator[kEnded] = true;
|
|
11107
11108
|
});
|
|
@@ -11116,7 +11117,7 @@ var require_async_iterator = __commonJS({
|
|
|
11116
11117
|
var require_from = __commonJS({
|
|
11117
11118
|
"../../node_modules/readable-stream/lib/internal/streams/from.js"(exports, module) {
|
|
11118
11119
|
"use strict";
|
|
11119
|
-
function asyncGeneratorStep(gen,
|
|
11120
|
+
function asyncGeneratorStep(gen, resolve4, reject, _next, _throw, key, arg) {
|
|
11120
11121
|
try {
|
|
11121
11122
|
var info = gen[key](arg);
|
|
11122
11123
|
var value = info.value;
|
|
@@ -11125,7 +11126,7 @@ var require_from = __commonJS({
|
|
|
11125
11126
|
return;
|
|
11126
11127
|
}
|
|
11127
11128
|
if (info.done) {
|
|
11128
|
-
|
|
11129
|
+
resolve4(value);
|
|
11129
11130
|
} else {
|
|
11130
11131
|
Promise.resolve(value).then(_next, _throw);
|
|
11131
11132
|
}
|
|
@@ -11134,14 +11135,14 @@ var require_from = __commonJS({
|
|
|
11134
11135
|
function _asyncToGenerator(fn) {
|
|
11135
11136
|
return function() {
|
|
11136
11137
|
var self2 = this, args = arguments;
|
|
11137
|
-
return new Promise(function(
|
|
11138
|
+
return new Promise(function(resolve4, reject) {
|
|
11138
11139
|
var gen = fn.apply(self2, args);
|
|
11139
11140
|
function _next(value) {
|
|
11140
|
-
asyncGeneratorStep(gen,
|
|
11141
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "next", value);
|
|
11141
11142
|
}
|
|
11142
11143
|
__name(_next, "_next");
|
|
11143
11144
|
function _throw(err) {
|
|
11144
|
-
asyncGeneratorStep(gen,
|
|
11145
|
+
asyncGeneratorStep(gen, resolve4, reject, _next, _throw, "throw", err);
|
|
11145
11146
|
}
|
|
11146
11147
|
__name(_throw, "_throw");
|
|
11147
11148
|
_next(void 0);
|
|
@@ -12960,8 +12961,8 @@ var require_windows = __commonJS({
|
|
|
12960
12961
|
"../../node_modules/isexe/windows.js"(exports, module) {
|
|
12961
12962
|
module.exports = isexe;
|
|
12962
12963
|
isexe.sync = sync;
|
|
12963
|
-
var
|
|
12964
|
-
function checkPathExt(
|
|
12964
|
+
var fs3 = __require("fs");
|
|
12965
|
+
function checkPathExt(path, options) {
|
|
12965
12966
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
12966
12967
|
if (!pathext) {
|
|
12967
12968
|
return true;
|
|
@@ -12972,28 +12973,28 @@ var require_windows = __commonJS({
|
|
|
12972
12973
|
}
|
|
12973
12974
|
for (var i = 0; i < pathext.length; i++) {
|
|
12974
12975
|
var p = pathext[i].toLowerCase();
|
|
12975
|
-
if (p &&
|
|
12976
|
+
if (p && path.substr(-p.length).toLowerCase() === p) {
|
|
12976
12977
|
return true;
|
|
12977
12978
|
}
|
|
12978
12979
|
}
|
|
12979
12980
|
return false;
|
|
12980
12981
|
}
|
|
12981
12982
|
__name(checkPathExt, "checkPathExt");
|
|
12982
|
-
function checkStat(stat2,
|
|
12983
|
+
function checkStat(stat2, path, options) {
|
|
12983
12984
|
if (!stat2.isSymbolicLink() && !stat2.isFile()) {
|
|
12984
12985
|
return false;
|
|
12985
12986
|
}
|
|
12986
|
-
return checkPathExt(
|
|
12987
|
+
return checkPathExt(path, options);
|
|
12987
12988
|
}
|
|
12988
12989
|
__name(checkStat, "checkStat");
|
|
12989
|
-
function isexe(
|
|
12990
|
-
|
|
12991
|
-
cb(er, er ? false : checkStat(stat2,
|
|
12990
|
+
function isexe(path, options, cb) {
|
|
12991
|
+
fs3.stat(path, function(er, stat2) {
|
|
12992
|
+
cb(er, er ? false : checkStat(stat2, path, options));
|
|
12992
12993
|
});
|
|
12993
12994
|
}
|
|
12994
12995
|
__name(isexe, "isexe");
|
|
12995
|
-
function sync(
|
|
12996
|
-
return checkStat(
|
|
12996
|
+
function sync(path, options) {
|
|
12997
|
+
return checkStat(fs3.statSync(path), path, options);
|
|
12997
12998
|
}
|
|
12998
12999
|
__name(sync, "sync");
|
|
12999
13000
|
}
|
|
@@ -13004,15 +13005,15 @@ var require_mode = __commonJS({
|
|
|
13004
13005
|
"../../node_modules/isexe/mode.js"(exports, module) {
|
|
13005
13006
|
module.exports = isexe;
|
|
13006
13007
|
isexe.sync = sync;
|
|
13007
|
-
var
|
|
13008
|
-
function isexe(
|
|
13009
|
-
|
|
13008
|
+
var fs3 = __require("fs");
|
|
13009
|
+
function isexe(path, options, cb) {
|
|
13010
|
+
fs3.stat(path, function(er, stat2) {
|
|
13010
13011
|
cb(er, er ? false : checkStat(stat2, options));
|
|
13011
13012
|
});
|
|
13012
13013
|
}
|
|
13013
13014
|
__name(isexe, "isexe");
|
|
13014
|
-
function sync(
|
|
13015
|
-
return checkStat(
|
|
13015
|
+
function sync(path, options) {
|
|
13016
|
+
return checkStat(fs3.statSync(path), options);
|
|
13016
13017
|
}
|
|
13017
13018
|
__name(sync, "sync");
|
|
13018
13019
|
function checkStat(stat2, options) {
|
|
@@ -13039,7 +13040,7 @@ var require_mode = __commonJS({
|
|
|
13039
13040
|
// ../../node_modules/isexe/index.js
|
|
13040
13041
|
var require_isexe = __commonJS({
|
|
13041
13042
|
"../../node_modules/isexe/index.js"(exports, module) {
|
|
13042
|
-
var
|
|
13043
|
+
var fs3 = __require("fs");
|
|
13043
13044
|
var core;
|
|
13044
13045
|
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
13045
13046
|
core = require_windows();
|
|
@@ -13048,7 +13049,7 @@ var require_isexe = __commonJS({
|
|
|
13048
13049
|
}
|
|
13049
13050
|
module.exports = isexe;
|
|
13050
13051
|
isexe.sync = sync;
|
|
13051
|
-
function isexe(
|
|
13052
|
+
function isexe(path, options, cb) {
|
|
13052
13053
|
if (typeof options === "function") {
|
|
13053
13054
|
cb = options;
|
|
13054
13055
|
options = {};
|
|
@@ -13057,17 +13058,17 @@ var require_isexe = __commonJS({
|
|
|
13057
13058
|
if (typeof Promise !== "function") {
|
|
13058
13059
|
throw new TypeError("callback not provided");
|
|
13059
13060
|
}
|
|
13060
|
-
return new Promise(function(
|
|
13061
|
-
isexe(
|
|
13061
|
+
return new Promise(function(resolve4, reject) {
|
|
13062
|
+
isexe(path, options || {}, function(er, is) {
|
|
13062
13063
|
if (er) {
|
|
13063
13064
|
reject(er);
|
|
13064
13065
|
} else {
|
|
13065
|
-
|
|
13066
|
+
resolve4(is);
|
|
13066
13067
|
}
|
|
13067
13068
|
});
|
|
13068
13069
|
});
|
|
13069
13070
|
}
|
|
13070
|
-
core(
|
|
13071
|
+
core(path, options || {}, function(er, is) {
|
|
13071
13072
|
if (er) {
|
|
13072
13073
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
13073
13074
|
er = null;
|
|
@@ -13078,9 +13079,9 @@ var require_isexe = __commonJS({
|
|
|
13078
13079
|
});
|
|
13079
13080
|
}
|
|
13080
13081
|
__name(isexe, "isexe");
|
|
13081
|
-
function sync(
|
|
13082
|
+
function sync(path, options) {
|
|
13082
13083
|
try {
|
|
13083
|
-
return core.sync(
|
|
13084
|
+
return core.sync(path, options || {});
|
|
13084
13085
|
} catch (er) {
|
|
13085
13086
|
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
13086
13087
|
return false;
|
|
@@ -13097,7 +13098,7 @@ var require_isexe = __commonJS({
|
|
|
13097
13098
|
var require_which = __commonJS({
|
|
13098
13099
|
"../../node_modules/which/which.js"(exports, module) {
|
|
13099
13100
|
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
13100
|
-
var
|
|
13101
|
+
var path = __require("path");
|
|
13101
13102
|
var COLON = isWindows ? ";" : ":";
|
|
13102
13103
|
var isexe = require_isexe();
|
|
13103
13104
|
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
@@ -13130,27 +13131,27 @@ var require_which = __commonJS({
|
|
|
13130
13131
|
opt = {};
|
|
13131
13132
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
13132
13133
|
const found = [];
|
|
13133
|
-
const step = /* @__PURE__ */ __name((i) => new Promise((
|
|
13134
|
+
const step = /* @__PURE__ */ __name((i) => new Promise((resolve4, reject) => {
|
|
13134
13135
|
if (i === pathEnv.length)
|
|
13135
|
-
return opt.all && found.length ?
|
|
13136
|
+
return opt.all && found.length ? resolve4(found) : reject(getNotFoundError(cmd));
|
|
13136
13137
|
const ppRaw = pathEnv[i];
|
|
13137
13138
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
13138
|
-
const pCmd =
|
|
13139
|
+
const pCmd = path.join(pathPart, cmd);
|
|
13139
13140
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
13140
|
-
|
|
13141
|
+
resolve4(subStep(p, i, 0));
|
|
13141
13142
|
}), "step");
|
|
13142
|
-
const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((
|
|
13143
|
+
const subStep = /* @__PURE__ */ __name((p, i, ii) => new Promise((resolve4, reject) => {
|
|
13143
13144
|
if (ii === pathExt.length)
|
|
13144
|
-
return
|
|
13145
|
+
return resolve4(step(i + 1));
|
|
13145
13146
|
const ext = pathExt[ii];
|
|
13146
13147
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
13147
13148
|
if (!er && is) {
|
|
13148
13149
|
if (opt.all)
|
|
13149
13150
|
found.push(p + ext);
|
|
13150
13151
|
else
|
|
13151
|
-
return
|
|
13152
|
+
return resolve4(p + ext);
|
|
13152
13153
|
}
|
|
13153
|
-
return
|
|
13154
|
+
return resolve4(subStep(p, i, ii + 1));
|
|
13154
13155
|
});
|
|
13155
13156
|
}), "subStep");
|
|
13156
13157
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -13162,7 +13163,7 @@ var require_which = __commonJS({
|
|
|
13162
13163
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
13163
13164
|
const ppRaw = pathEnv[i];
|
|
13164
13165
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
13165
|
-
const pCmd =
|
|
13166
|
+
const pCmd = path.join(pathPart, cmd);
|
|
13166
13167
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
13167
13168
|
for (let j = 0; j < pathExt.length; j++) {
|
|
13168
13169
|
const cur = p + pathExt[j];
|
|
@@ -13210,7 +13211,7 @@ var require_path_key = __commonJS({
|
|
|
13210
13211
|
var require_resolveCommand = __commonJS({
|
|
13211
13212
|
"../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
13212
13213
|
"use strict";
|
|
13213
|
-
var
|
|
13214
|
+
var path = __require("path");
|
|
13214
13215
|
var which = require_which();
|
|
13215
13216
|
var getPathKey = require_path_key();
|
|
13216
13217
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -13228,7 +13229,7 @@ var require_resolveCommand = __commonJS({
|
|
|
13228
13229
|
try {
|
|
13229
13230
|
resolved = which.sync(parsed.command, {
|
|
13230
13231
|
path: env2[getPathKey({ env: env2 })],
|
|
13231
|
-
pathExt: withoutPathExt ?
|
|
13232
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
13232
13233
|
});
|
|
13233
13234
|
} catch (e) {
|
|
13234
13235
|
} finally {
|
|
@@ -13237,7 +13238,7 @@ var require_resolveCommand = __commonJS({
|
|
|
13237
13238
|
}
|
|
13238
13239
|
}
|
|
13239
13240
|
if (resolved) {
|
|
13240
|
-
resolved =
|
|
13241
|
+
resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
13241
13242
|
}
|
|
13242
13243
|
return resolved;
|
|
13243
13244
|
}
|
|
@@ -13295,8 +13296,8 @@ var require_shebang_command = __commonJS({
|
|
|
13295
13296
|
if (!match) {
|
|
13296
13297
|
return null;
|
|
13297
13298
|
}
|
|
13298
|
-
const [
|
|
13299
|
-
const binary =
|
|
13299
|
+
const [path, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
13300
|
+
const binary = path.split("/").pop();
|
|
13300
13301
|
if (binary === "env") {
|
|
13301
13302
|
return argument;
|
|
13302
13303
|
}
|
|
@@ -13309,16 +13310,16 @@ var require_shebang_command = __commonJS({
|
|
|
13309
13310
|
var require_readShebang = __commonJS({
|
|
13310
13311
|
"../../node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
13311
13312
|
"use strict";
|
|
13312
|
-
var
|
|
13313
|
+
var fs3 = __require("fs");
|
|
13313
13314
|
var shebangCommand = require_shebang_command();
|
|
13314
13315
|
function readShebang(command) {
|
|
13315
13316
|
const size = 150;
|
|
13316
13317
|
const buffer = Buffer.alloc(size);
|
|
13317
13318
|
let fd;
|
|
13318
13319
|
try {
|
|
13319
|
-
fd =
|
|
13320
|
-
|
|
13321
|
-
|
|
13320
|
+
fd = fs3.openSync(command, "r");
|
|
13321
|
+
fs3.readSync(fd, buffer, 0, size, 0);
|
|
13322
|
+
fs3.closeSync(fd);
|
|
13322
13323
|
} catch (e) {
|
|
13323
13324
|
}
|
|
13324
13325
|
return shebangCommand(buffer.toString());
|
|
@@ -13332,7 +13333,7 @@ var require_readShebang = __commonJS({
|
|
|
13332
13333
|
var require_parse = __commonJS({
|
|
13333
13334
|
"../../node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
13334
13335
|
"use strict";
|
|
13335
|
-
var
|
|
13336
|
+
var path = __require("path");
|
|
13336
13337
|
var resolveCommand = require_resolveCommand();
|
|
13337
13338
|
var escape = require_escape();
|
|
13338
13339
|
var readShebang = require_readShebang();
|
|
@@ -13358,7 +13359,7 @@ var require_parse = __commonJS({
|
|
|
13358
13359
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
13359
13360
|
if (parsed.options.forceShell || needsShell) {
|
|
13360
13361
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
13361
|
-
parsed.command =
|
|
13362
|
+
parsed.command = path.normalize(parsed.command);
|
|
13362
13363
|
parsed.command = escape.command(parsed.command);
|
|
13363
13364
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
13364
13365
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
@@ -13498,7 +13499,7 @@ var require_strip_final_newline = __commonJS({
|
|
|
13498
13499
|
var require_npm_run_path = __commonJS({
|
|
13499
13500
|
"../../node_modules/npm-run-path/index.js"(exports, module) {
|
|
13500
13501
|
"use strict";
|
|
13501
|
-
var
|
|
13502
|
+
var path = __require("path");
|
|
13502
13503
|
var pathKey = require_path_key();
|
|
13503
13504
|
var npmRunPath = /* @__PURE__ */ __name((options) => {
|
|
13504
13505
|
options = {
|
|
@@ -13508,16 +13509,16 @@ var require_npm_run_path = __commonJS({
|
|
|
13508
13509
|
...options
|
|
13509
13510
|
};
|
|
13510
13511
|
let previous;
|
|
13511
|
-
let cwdPath =
|
|
13512
|
+
let cwdPath = path.resolve(options.cwd);
|
|
13512
13513
|
const result = [];
|
|
13513
13514
|
while (previous !== cwdPath) {
|
|
13514
|
-
result.push(
|
|
13515
|
+
result.push(path.join(cwdPath, "node_modules/.bin"));
|
|
13515
13516
|
previous = cwdPath;
|
|
13516
|
-
cwdPath =
|
|
13517
|
+
cwdPath = path.resolve(cwdPath, "..");
|
|
13517
13518
|
}
|
|
13518
|
-
const execPathDir =
|
|
13519
|
+
const execPathDir = path.resolve(options.cwd, options.execPath, "..");
|
|
13519
13520
|
result.push(execPathDir);
|
|
13520
|
-
return result.concat(options.path).join(
|
|
13521
|
+
return result.concat(options.path).join(path.delimiter);
|
|
13521
13522
|
}, "npmRunPath");
|
|
13522
13523
|
module.exports = npmRunPath;
|
|
13523
13524
|
module.exports.default = npmRunPath;
|
|
@@ -13527,9 +13528,9 @@ var require_npm_run_path = __commonJS({
|
|
|
13527
13528
|
...options
|
|
13528
13529
|
};
|
|
13529
13530
|
const env2 = { ...options.env };
|
|
13530
|
-
const
|
|
13531
|
-
options.path = env2[
|
|
13532
|
-
env2[
|
|
13531
|
+
const path2 = pathKey({ env: env2 });
|
|
13532
|
+
options.path = env2[path2];
|
|
13533
|
+
env2[path2] = module.exports(options);
|
|
13533
13534
|
return env2;
|
|
13534
13535
|
};
|
|
13535
13536
|
}
|
|
@@ -14056,7 +14057,7 @@ var require_stdio = __commonJS({
|
|
|
14056
14057
|
var require_kill = __commonJS({
|
|
14057
14058
|
"node_modules/execa/lib/kill.js"(exports, module) {
|
|
14058
14059
|
"use strict";
|
|
14059
|
-
var
|
|
14060
|
+
var os3 = __require("os");
|
|
14060
14061
|
var onExit = require_signal_exit();
|
|
14061
14062
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
14062
14063
|
var spawnedKill = /* @__PURE__ */ __name((kill, signal = "SIGTERM", options = {}) => {
|
|
@@ -14080,7 +14081,7 @@ var require_kill = __commonJS({
|
|
|
14080
14081
|
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
14081
14082
|
}, "shouldForceKill");
|
|
14082
14083
|
var isSigterm = /* @__PURE__ */ __name((signal) => {
|
|
14083
|
-
return signal ===
|
|
14084
|
+
return signal === os3.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
14084
14085
|
}, "isSigterm");
|
|
14085
14086
|
var getForceKillAfterTimeout = /* @__PURE__ */ __name(({ forceKillAfterTimeout = true }) => {
|
|
14086
14087
|
if (forceKillAfterTimeout === true) {
|
|
@@ -14106,7 +14107,7 @@ var require_kill = __commonJS({
|
|
|
14106
14107
|
return spawnedPromise;
|
|
14107
14108
|
}
|
|
14108
14109
|
let timeoutId;
|
|
14109
|
-
const timeoutPromise = new Promise((
|
|
14110
|
+
const timeoutPromise = new Promise((resolve4, reject) => {
|
|
14110
14111
|
timeoutId = setTimeout(() => {
|
|
14111
14112
|
timeoutKill(spawned, killSignal, reject);
|
|
14112
14113
|
}, timeout);
|
|
@@ -14228,7 +14229,7 @@ var require_get_stream = __commonJS({
|
|
|
14228
14229
|
};
|
|
14229
14230
|
const { maxBuffer } = options;
|
|
14230
14231
|
const stream2 = bufferStream(options);
|
|
14231
|
-
await new Promise((
|
|
14232
|
+
await new Promise((resolve4, reject) => {
|
|
14232
14233
|
const rejectPromise = /* @__PURE__ */ __name((error) => {
|
|
14233
14234
|
if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
14234
14235
|
error.bufferedData = stream2.getBufferedValue();
|
|
@@ -14238,7 +14239,7 @@ var require_get_stream = __commonJS({
|
|
|
14238
14239
|
(async () => {
|
|
14239
14240
|
try {
|
|
14240
14241
|
await streamPipelinePromisified(inputStream, stream2);
|
|
14241
|
-
|
|
14242
|
+
resolve4();
|
|
14242
14243
|
} catch (error) {
|
|
14243
14244
|
rejectPromise(error);
|
|
14244
14245
|
}
|
|
@@ -14399,9 +14400,9 @@ var require_promise = __commonJS({
|
|
|
14399
14400
|
return spawned;
|
|
14400
14401
|
}, "mergePromise");
|
|
14401
14402
|
var getSpawnedPromise = /* @__PURE__ */ __name((spawned) => {
|
|
14402
|
-
return new Promise((
|
|
14403
|
+
return new Promise((resolve4, reject) => {
|
|
14403
14404
|
spawned.on("exit", (exitCode, signal) => {
|
|
14404
|
-
|
|
14405
|
+
resolve4({ exitCode, signal });
|
|
14405
14406
|
});
|
|
14406
14407
|
spawned.on("error", (error) => {
|
|
14407
14408
|
reject(error);
|
|
@@ -14424,11 +14425,11 @@ var require_promise = __commonJS({
|
|
|
14424
14425
|
var require_command = __commonJS({
|
|
14425
14426
|
"node_modules/execa/lib/command.js"(exports, module) {
|
|
14426
14427
|
"use strict";
|
|
14427
|
-
var normalizeArgs = /* @__PURE__ */ __name((
|
|
14428
|
+
var normalizeArgs = /* @__PURE__ */ __name((file2, args = []) => {
|
|
14428
14429
|
if (!Array.isArray(args)) {
|
|
14429
|
-
return [
|
|
14430
|
+
return [file2];
|
|
14430
14431
|
}
|
|
14431
|
-
return [
|
|
14432
|
+
return [file2, ...args];
|
|
14432
14433
|
}, "normalizeArgs");
|
|
14433
14434
|
var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
14434
14435
|
var DOUBLE_QUOTES_REGEXP = /"/g;
|
|
@@ -14438,11 +14439,11 @@ var require_command = __commonJS({
|
|
|
14438
14439
|
}
|
|
14439
14440
|
return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
|
|
14440
14441
|
}, "escapeArg");
|
|
14441
|
-
var joinCommand = /* @__PURE__ */ __name((
|
|
14442
|
-
return normalizeArgs(
|
|
14442
|
+
var joinCommand = /* @__PURE__ */ __name((file2, args) => {
|
|
14443
|
+
return normalizeArgs(file2, args).join(" ");
|
|
14443
14444
|
}, "joinCommand");
|
|
14444
|
-
var getEscapedCommand = /* @__PURE__ */ __name((
|
|
14445
|
-
return normalizeArgs(
|
|
14445
|
+
var getEscapedCommand = /* @__PURE__ */ __name((file2, args) => {
|
|
14446
|
+
return normalizeArgs(file2, args).map((arg) => escapeArg(arg)).join(" ");
|
|
14446
14447
|
}, "getEscapedCommand");
|
|
14447
14448
|
var SPACES_REGEXP = / +/g;
|
|
14448
14449
|
var parseCommand = /* @__PURE__ */ __name((command) => {
|
|
@@ -14469,7 +14470,7 @@ var require_command = __commonJS({
|
|
|
14469
14470
|
var require_execa = __commonJS({
|
|
14470
14471
|
"node_modules/execa/index.js"(exports, module) {
|
|
14471
14472
|
"use strict";
|
|
14472
|
-
var
|
|
14473
|
+
var path = __require("path");
|
|
14473
14474
|
var childProcess = __require("child_process");
|
|
14474
14475
|
var crossSpawn = require_cross_spawn();
|
|
14475
14476
|
var stripFinalNewline = require_strip_final_newline();
|
|
@@ -14489,9 +14490,9 @@ var require_execa = __commonJS({
|
|
|
14489
14490
|
}
|
|
14490
14491
|
return env2;
|
|
14491
14492
|
}, "getEnv");
|
|
14492
|
-
var handleArguments = /* @__PURE__ */ __name((
|
|
14493
|
-
const parsed = crossSpawn._parse(
|
|
14494
|
-
|
|
14493
|
+
var handleArguments = /* @__PURE__ */ __name((file2, args, options = {}) => {
|
|
14494
|
+
const parsed = crossSpawn._parse(file2, args, options);
|
|
14495
|
+
file2 = parsed.command;
|
|
14495
14496
|
args = parsed.args;
|
|
14496
14497
|
options = parsed.options;
|
|
14497
14498
|
options = {
|
|
@@ -14511,10 +14512,10 @@ var require_execa = __commonJS({
|
|
|
14511
14512
|
};
|
|
14512
14513
|
options.env = getEnv(options);
|
|
14513
14514
|
options.stdio = normalizeStdio(options);
|
|
14514
|
-
if (process.platform === "win32" &&
|
|
14515
|
+
if (process.platform === "win32" && path.basename(file2, ".exe") === "cmd") {
|
|
14515
14516
|
args.unshift("/q");
|
|
14516
14517
|
}
|
|
14517
|
-
return { file, args, options, parsed };
|
|
14518
|
+
return { file: file2, args, options, parsed };
|
|
14518
14519
|
}, "handleArguments");
|
|
14519
14520
|
var handleOutput = /* @__PURE__ */ __name((options, value, error) => {
|
|
14520
14521
|
if (typeof value !== "string" && !Buffer.isBuffer(value)) {
|
|
@@ -14525,10 +14526,10 @@ var require_execa = __commonJS({
|
|
|
14525
14526
|
}
|
|
14526
14527
|
return value;
|
|
14527
14528
|
}, "handleOutput");
|
|
14528
|
-
var execa2 = /* @__PURE__ */ __name((
|
|
14529
|
-
const parsed = handleArguments(
|
|
14530
|
-
const command = joinCommand(
|
|
14531
|
-
const escapedCommand = getEscapedCommand(
|
|
14529
|
+
var execa2 = /* @__PURE__ */ __name((file2, args, options) => {
|
|
14530
|
+
const parsed = handleArguments(file2, args, options);
|
|
14531
|
+
const command = joinCommand(file2, args);
|
|
14532
|
+
const escapedCommand = getEscapedCommand(file2, args);
|
|
14532
14533
|
validateTimeout(parsed.options);
|
|
14533
14534
|
let spawned;
|
|
14534
14535
|
try {
|
|
@@ -14599,10 +14600,10 @@ var require_execa = __commonJS({
|
|
|
14599
14600
|
return mergePromise(spawned, handlePromiseOnce);
|
|
14600
14601
|
}, "execa");
|
|
14601
14602
|
module.exports = execa2;
|
|
14602
|
-
module.exports.sync = (
|
|
14603
|
-
const parsed = handleArguments(
|
|
14604
|
-
const command = joinCommand(
|
|
14605
|
-
const escapedCommand = getEscapedCommand(
|
|
14603
|
+
module.exports.sync = (file2, args, options) => {
|
|
14604
|
+
const parsed = handleArguments(file2, args, options);
|
|
14605
|
+
const command = joinCommand(file2, args);
|
|
14606
|
+
const escapedCommand = getEscapedCommand(file2, args);
|
|
14606
14607
|
validateInputSync(parsed.options);
|
|
14607
14608
|
let result;
|
|
14608
14609
|
try {
|
|
@@ -14655,12 +14656,12 @@ var require_execa = __commonJS({
|
|
|
14655
14656
|
};
|
|
14656
14657
|
};
|
|
14657
14658
|
module.exports.command = (command, options) => {
|
|
14658
|
-
const [
|
|
14659
|
-
return execa2(
|
|
14659
|
+
const [file2, ...args] = parseCommand(command);
|
|
14660
|
+
return execa2(file2, args, options);
|
|
14660
14661
|
};
|
|
14661
14662
|
module.exports.commandSync = (command, options) => {
|
|
14662
|
-
const [
|
|
14663
|
-
return execa2.sync(
|
|
14663
|
+
const [file2, ...args] = parseCommand(command);
|
|
14664
|
+
return execa2.sync(file2, args, options);
|
|
14664
14665
|
};
|
|
14665
14666
|
module.exports.node = (scriptPath, args, options = {}) => {
|
|
14666
14667
|
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
@@ -14694,8 +14695,8 @@ var require_execa = __commonJS({
|
|
|
14694
14695
|
});
|
|
14695
14696
|
|
|
14696
14697
|
// src/initiate.ts
|
|
14697
|
-
import { execSync } from "node:child_process";
|
|
14698
|
-
import
|
|
14698
|
+
import { execSync as execSync3 } from "node:child_process";
|
|
14699
|
+
import fs2 from "node:fs/promises";
|
|
14699
14700
|
import * as babel2 from "storybook/internal/babel";
|
|
14700
14701
|
import {
|
|
14701
14702
|
ProjectType as ProjectType2,
|
|
@@ -16062,264 +16063,225 @@ function boxen(text, options) {
|
|
|
16062
16063
|
}
|
|
16063
16064
|
__name(boxen, "boxen");
|
|
16064
16065
|
|
|
16065
|
-
// ../../node_modules/find
|
|
16066
|
-
|
|
16066
|
+
// ../../node_modules/empathic/find.mjs
|
|
16067
|
+
var find_exports = {};
|
|
16068
|
+
__export(find_exports, {
|
|
16069
|
+
any: () => any,
|
|
16070
|
+
dir: () => dir,
|
|
16071
|
+
file: () => file,
|
|
16072
|
+
up: () => up2
|
|
16073
|
+
});
|
|
16074
|
+
import { join as join2 } from "node:path";
|
|
16075
|
+
import { existsSync, statSync } from "node:fs";
|
|
16067
16076
|
|
|
16068
|
-
// ../../node_modules/
|
|
16069
|
-
import
|
|
16070
|
-
import path from "node:path";
|
|
16071
|
-
import fs, { promises as fsPromises } from "node:fs";
|
|
16072
|
-
import { fileURLToPath } from "node:url";
|
|
16077
|
+
// ../../node_modules/empathic/walk.mjs
|
|
16078
|
+
import { dirname } from "node:path";
|
|
16073
16079
|
|
|
16074
|
-
// ../../node_modules/
|
|
16075
|
-
|
|
16076
|
-
|
|
16077
|
-
|
|
16078
|
-
|
|
16079
|
-
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
}
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16097
|
-
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
|
|
16101
|
-
|
|
16102
|
-
|
|
16103
|
-
}
|
|
16104
|
-
this.#size++;
|
|
16105
|
-
}
|
|
16106
|
-
dequeue() {
|
|
16107
|
-
const current = this.#head;
|
|
16108
|
-
if (!current) {
|
|
16109
|
-
return;
|
|
16110
|
-
}
|
|
16111
|
-
this.#head = this.#head.next;
|
|
16112
|
-
this.#size--;
|
|
16113
|
-
return current.value;
|
|
16114
|
-
}
|
|
16115
|
-
peek() {
|
|
16116
|
-
if (!this.#head) {
|
|
16117
|
-
return;
|
|
16118
|
-
}
|
|
16119
|
-
return this.#head.value;
|
|
16120
|
-
}
|
|
16121
|
-
clear() {
|
|
16122
|
-
this.#head = void 0;
|
|
16123
|
-
this.#tail = void 0;
|
|
16124
|
-
this.#size = 0;
|
|
16125
|
-
}
|
|
16126
|
-
get size() {
|
|
16127
|
-
return this.#size;
|
|
16080
|
+
// ../../node_modules/empathic/resolve.mjs
|
|
16081
|
+
import { isAbsolute, join, resolve } from "node:path";
|
|
16082
|
+
function absolute(input, root) {
|
|
16083
|
+
return isAbsolute(input) ? input : resolve(root || ".", input);
|
|
16084
|
+
}
|
|
16085
|
+
__name(absolute, "absolute");
|
|
16086
|
+
|
|
16087
|
+
// ../../node_modules/empathic/walk.mjs
|
|
16088
|
+
function up(base, options) {
|
|
16089
|
+
let { last, cwd } = options || {};
|
|
16090
|
+
let tmp = absolute(base, cwd);
|
|
16091
|
+
let root = absolute(last || "/", cwd);
|
|
16092
|
+
let prev, arr = [];
|
|
16093
|
+
while (prev !== root) {
|
|
16094
|
+
arr.push(tmp);
|
|
16095
|
+
tmp = dirname(prev = tmp);
|
|
16096
|
+
if (tmp === prev) break;
|
|
16097
|
+
}
|
|
16098
|
+
return arr;
|
|
16099
|
+
}
|
|
16100
|
+
__name(up, "up");
|
|
16101
|
+
|
|
16102
|
+
// ../../node_modules/empathic/find.mjs
|
|
16103
|
+
function up2(name, options) {
|
|
16104
|
+
let dir2, tmp;
|
|
16105
|
+
let start = options && options.cwd || "";
|
|
16106
|
+
for (dir2 of up(start, options)) {
|
|
16107
|
+
tmp = join2(dir2, name);
|
|
16108
|
+
if (existsSync(tmp)) return tmp;
|
|
16128
16109
|
}
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16110
|
+
}
|
|
16111
|
+
__name(up2, "up");
|
|
16112
|
+
function any(names, options) {
|
|
16113
|
+
let dir2, start = options && options.cwd || "";
|
|
16114
|
+
let j = 0, len = names.length, tmp;
|
|
16115
|
+
for (dir2 of up(start, options)) {
|
|
16116
|
+
for (j = 0; j < len; j++) {
|
|
16117
|
+
tmp = join2(dir2, names[j]);
|
|
16118
|
+
if (existsSync(tmp)) return tmp;
|
|
16134
16119
|
}
|
|
16135
16120
|
}
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16121
|
+
}
|
|
16122
|
+
__name(any, "any");
|
|
16123
|
+
function file(name, options) {
|
|
16124
|
+
let dir2, tmp;
|
|
16125
|
+
let start = options && options.cwd || "";
|
|
16126
|
+
for (dir2 of up(start, options)) {
|
|
16127
|
+
try {
|
|
16128
|
+
tmp = join2(dir2, name);
|
|
16129
|
+
if (statSync(tmp).isFile()) return tmp;
|
|
16130
|
+
} catch {
|
|
16139
16131
|
}
|
|
16140
16132
|
}
|
|
16141
|
-
}
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
|
|
16147
|
-
}
|
|
16148
|
-
const queue = new Queue();
|
|
16149
|
-
let activeCount = 0;
|
|
16150
|
-
const next = /* @__PURE__ */ __name(() => {
|
|
16151
|
-
activeCount--;
|
|
16152
|
-
if (queue.size > 0) {
|
|
16153
|
-
queue.dequeue()();
|
|
16154
|
-
}
|
|
16155
|
-
}, "next");
|
|
16156
|
-
const run = /* @__PURE__ */ __name(async (fn, resolve3, args) => {
|
|
16157
|
-
activeCount++;
|
|
16158
|
-
const result = (async () => fn(...args))();
|
|
16159
|
-
resolve3(result);
|
|
16133
|
+
}
|
|
16134
|
+
__name(file, "file");
|
|
16135
|
+
function dir(name, options) {
|
|
16136
|
+
let dir2, tmp;
|
|
16137
|
+
let start = options && options.cwd || "";
|
|
16138
|
+
for (dir2 of up(start, options)) {
|
|
16160
16139
|
try {
|
|
16161
|
-
|
|
16140
|
+
tmp = join2(dir2, name);
|
|
16141
|
+
if (statSync(tmp).isDirectory()) return tmp;
|
|
16162
16142
|
} catch {
|
|
16163
16143
|
}
|
|
16164
|
-
|
|
16165
|
-
}, "run");
|
|
16166
|
-
const enqueue = /* @__PURE__ */ __name((fn, resolve3, args) => {
|
|
16167
|
-
queue.enqueue(run.bind(void 0, fn, resolve3, args));
|
|
16168
|
-
(async () => {
|
|
16169
|
-
await Promise.resolve();
|
|
16170
|
-
if (activeCount < concurrency && queue.size > 0) {
|
|
16171
|
-
queue.dequeue()();
|
|
16172
|
-
}
|
|
16173
|
-
})();
|
|
16174
|
-
}, "enqueue");
|
|
16175
|
-
const generator19 = /* @__PURE__ */ __name((fn, ...args) => new Promise((resolve3) => {
|
|
16176
|
-
enqueue(fn, resolve3, args);
|
|
16177
|
-
}), "generator");
|
|
16178
|
-
Object.defineProperties(generator19, {
|
|
16179
|
-
activeCount: {
|
|
16180
|
-
get: /* @__PURE__ */ __name(() => activeCount, "get")
|
|
16181
|
-
},
|
|
16182
|
-
pendingCount: {
|
|
16183
|
-
get: /* @__PURE__ */ __name(() => queue.size, "get")
|
|
16184
|
-
},
|
|
16185
|
-
clearQueue: {
|
|
16186
|
-
value: /* @__PURE__ */ __name(() => {
|
|
16187
|
-
queue.clear();
|
|
16188
|
-
}, "value")
|
|
16189
|
-
}
|
|
16190
|
-
});
|
|
16191
|
-
return generator19;
|
|
16144
|
+
}
|
|
16192
16145
|
}
|
|
16193
|
-
__name(
|
|
16146
|
+
__name(dir, "dir");
|
|
16194
16147
|
|
|
16195
|
-
//
|
|
16196
|
-
var
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
}
|
|
16204
|
-
};
|
|
16205
|
-
var testElement = /* @__PURE__ */ __name(async (element, tester) => tester(await element), "testElement");
|
|
16206
|
-
var finder = /* @__PURE__ */ __name(async (element) => {
|
|
16207
|
-
const values = await Promise.all(element);
|
|
16208
|
-
if (values[1] === true) {
|
|
16209
|
-
throw new EndError(values[0]);
|
|
16210
|
-
}
|
|
16211
|
-
return false;
|
|
16212
|
-
}, "finder");
|
|
16213
|
-
async function pLocate(iterable, tester, {
|
|
16214
|
-
concurrency = Number.POSITIVE_INFINITY,
|
|
16215
|
-
preserveOrder = true
|
|
16216
|
-
} = {}) {
|
|
16217
|
-
const limit = pLimit(concurrency);
|
|
16218
|
-
const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]);
|
|
16219
|
-
const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY);
|
|
16148
|
+
// src/initiate.ts
|
|
16149
|
+
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
16150
|
+
|
|
16151
|
+
// ../../node_modules/process-ancestry/dist/index.js
|
|
16152
|
+
import os2 from "os";
|
|
16153
|
+
import { execSync } from "child_process";
|
|
16154
|
+
import { execSync as execSync2 } from "child_process";
|
|
16155
|
+
function getProcessInfo(pid) {
|
|
16220
16156
|
try {
|
|
16221
|
-
|
|
16157
|
+
const output = execSync(`ps -p ${pid} -o pid=,ppid=,command=`, {
|
|
16158
|
+
encoding: "utf8",
|
|
16159
|
+
timeout: 5e3
|
|
16160
|
+
// 5 second timeout
|
|
16161
|
+
}).trim();
|
|
16162
|
+
if (!output) {
|
|
16163
|
+
return null;
|
|
16164
|
+
}
|
|
16165
|
+
const [pidStr, ppidStr, ...commandParts] = output.split(/\s+/);
|
|
16166
|
+
const parsedPid = pidStr ? parseInt(pidStr, 10) : NaN;
|
|
16167
|
+
const parsedPpid = ppidStr ? parseInt(ppidStr, 10) : NaN;
|
|
16168
|
+
if (isNaN(parsedPid) || isNaN(parsedPpid)) {
|
|
16169
|
+
return null;
|
|
16170
|
+
}
|
|
16171
|
+
return {
|
|
16172
|
+
pid: parsedPid,
|
|
16173
|
+
ppid: parsedPpid,
|
|
16174
|
+
command: commandParts.join(" ") || void 0
|
|
16175
|
+
};
|
|
16222
16176
|
} catch (error) {
|
|
16223
|
-
if (error instanceof
|
|
16224
|
-
|
|
16177
|
+
if (error instanceof Error && error.message.includes("timeout")) {
|
|
16178
|
+
console.warn(`Process lookup timed out for PID ${pid}`);
|
|
16225
16179
|
}
|
|
16226
|
-
|
|
16180
|
+
return null;
|
|
16227
16181
|
}
|
|
16228
16182
|
}
|
|
16229
|
-
__name(
|
|
16230
|
-
|
|
16231
|
-
|
|
16232
|
-
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16183
|
+
__name(getProcessInfo, "getProcessInfo");
|
|
16184
|
+
function getAncestryUnix(startPid) {
|
|
16185
|
+
const result = [];
|
|
16186
|
+
const visited = /* @__PURE__ */ new Set();
|
|
16187
|
+
let currentPid = startPid;
|
|
16188
|
+
let maxDepth = 1e3;
|
|
16189
|
+
while (currentPid && maxDepth > 0) {
|
|
16190
|
+
if (visited.has(currentPid)) {
|
|
16191
|
+
console.warn(`Detected cycle in process tree at PID ${currentPid}`);
|
|
16192
|
+
break;
|
|
16193
|
+
}
|
|
16194
|
+
visited.add(currentPid);
|
|
16195
|
+
const info = getProcessInfo(currentPid);
|
|
16196
|
+
if (!info || info.ppid === 0 || info.ppid === 1) break;
|
|
16197
|
+
result.push(info);
|
|
16198
|
+
currentPid = info.ppid;
|
|
16199
|
+
maxDepth--;
|
|
16200
|
+
}
|
|
16201
|
+
if (maxDepth === 0) {
|
|
16202
|
+
console.warn(`Reached maximum depth limit while traversing process tree from PID ${startPid}`);
|
|
16239
16203
|
}
|
|
16240
|
-
|
|
16204
|
+
return result;
|
|
16241
16205
|
}
|
|
16242
|
-
__name(
|
|
16243
|
-
|
|
16244
|
-
|
|
16245
|
-
|
|
16246
|
-
|
|
16247
|
-
|
|
16248
|
-
|
|
16249
|
-
|
|
16250
|
-
|
|
16251
|
-
}
|
|
16252
|
-
|
|
16253
|
-
|
|
16254
|
-
|
|
16255
|
-
return pLocate(paths, async (path_) => {
|
|
16256
|
-
try {
|
|
16257
|
-
const stat2 = await statFunction(path.resolve(cwd, path_));
|
|
16258
|
-
return matchType(type, stat2);
|
|
16259
|
-
} catch {
|
|
16260
|
-
return false;
|
|
16206
|
+
__name(getAncestryUnix, "getAncestryUnix");
|
|
16207
|
+
function getProcessInfo2(pid) {
|
|
16208
|
+
try {
|
|
16209
|
+
const output = execSync2(
|
|
16210
|
+
`wmic process where (ProcessId=${pid}) get ProcessId,ParentProcessId,CommandLine /format:csv`,
|
|
16211
|
+
{
|
|
16212
|
+
encoding: "utf8",
|
|
16213
|
+
timeout: 1e4
|
|
16214
|
+
// 10 second timeout (wmic can be slower)
|
|
16215
|
+
}
|
|
16216
|
+
);
|
|
16217
|
+
if (!output) {
|
|
16218
|
+
return null;
|
|
16261
16219
|
}
|
|
16262
|
-
|
|
16263
|
-
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
|
|
16268
|
-
|
|
16269
|
-
|
|
16270
|
-
}
|
|
16271
|
-
__name(toPath2, "toPath");
|
|
16272
|
-
|
|
16273
|
-
// ../../node_modules/find-up/index.js
|
|
16274
|
-
var findUpStop = Symbol("findUpStop");
|
|
16275
|
-
async function findUpMultiple(name, options = {}) {
|
|
16276
|
-
let directory = path2.resolve(toPath2(options.cwd) ?? "");
|
|
16277
|
-
const { root } = path2.parse(directory);
|
|
16278
|
-
const stopAt = path2.resolve(directory, toPath2(options.stopAt ?? root));
|
|
16279
|
-
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
16280
|
-
const paths = [name].flat();
|
|
16281
|
-
const runMatcher = /* @__PURE__ */ __name(async (locateOptions) => {
|
|
16282
|
-
if (typeof name !== "function") {
|
|
16283
|
-
return locatePath(paths, locateOptions);
|
|
16284
|
-
}
|
|
16285
|
-
const foundPath = await name(locateOptions.cwd);
|
|
16286
|
-
if (typeof foundPath === "string") {
|
|
16287
|
-
return locatePath([foundPath], locateOptions);
|
|
16288
|
-
}
|
|
16289
|
-
return foundPath;
|
|
16290
|
-
}, "runMatcher");
|
|
16291
|
-
const matches = [];
|
|
16292
|
-
while (true) {
|
|
16293
|
-
const foundPath = await runMatcher({ ...options, cwd: directory });
|
|
16294
|
-
if (foundPath === findUpStop) {
|
|
16295
|
-
break;
|
|
16220
|
+
const lines = output.split("\n").filter((line) => line.trim() && !line.startsWith("Node"));
|
|
16221
|
+
const fields = lines.pop()?.split(",");
|
|
16222
|
+
if (!fields || fields.length < 4) return null;
|
|
16223
|
+
const [_node, commandLine, parentPid, thisPid] = fields;
|
|
16224
|
+
const parsedPid = thisPid ? parseInt(thisPid.trim(), 10) : NaN;
|
|
16225
|
+
const parsedPpid = parentPid ? parseInt(parentPid.trim(), 10) : NaN;
|
|
16226
|
+
if (isNaN(parsedPid) || isNaN(parsedPpid)) {
|
|
16227
|
+
return null;
|
|
16296
16228
|
}
|
|
16297
|
-
|
|
16298
|
-
|
|
16229
|
+
return {
|
|
16230
|
+
pid: parsedPid,
|
|
16231
|
+
ppid: parsedPpid,
|
|
16232
|
+
command: commandLine?.trim() || void 0
|
|
16233
|
+
};
|
|
16234
|
+
} catch (error) {
|
|
16235
|
+
if (error instanceof Error && error.message.includes("timeout")) {
|
|
16236
|
+
console.warn(`Process lookup timed out for PID ${pid}`);
|
|
16299
16237
|
}
|
|
16300
|
-
|
|
16238
|
+
return null;
|
|
16239
|
+
}
|
|
16240
|
+
}
|
|
16241
|
+
__name(getProcessInfo2, "getProcessInfo2");
|
|
16242
|
+
function getAncestryWindows(startPid) {
|
|
16243
|
+
const result = [];
|
|
16244
|
+
const visited = /* @__PURE__ */ new Set();
|
|
16245
|
+
let currentPid = startPid;
|
|
16246
|
+
let maxDepth = 1e3;
|
|
16247
|
+
while (currentPid && maxDepth > 0) {
|
|
16248
|
+
if (visited.has(currentPid)) {
|
|
16249
|
+
console.warn(`Detected cycle in process tree at PID ${currentPid}`);
|
|
16301
16250
|
break;
|
|
16302
16251
|
}
|
|
16303
|
-
|
|
16252
|
+
visited.add(currentPid);
|
|
16253
|
+
const info = getProcessInfo2(currentPid);
|
|
16254
|
+
if (!info || info.ppid === 0 || info.ppid === 4) break;
|
|
16255
|
+
result.push(info);
|
|
16256
|
+
currentPid = info.ppid;
|
|
16257
|
+
maxDepth--;
|
|
16258
|
+
}
|
|
16259
|
+
if (maxDepth === 0) {
|
|
16260
|
+
console.warn(`Reached maximum depth limit while traversing process tree from PID ${startPid}`);
|
|
16304
16261
|
}
|
|
16305
|
-
return
|
|
16262
|
+
return result;
|
|
16306
16263
|
}
|
|
16307
|
-
__name(
|
|
16308
|
-
|
|
16309
|
-
|
|
16310
|
-
|
|
16264
|
+
__name(getAncestryWindows, "getAncestryWindows");
|
|
16265
|
+
function getProcessAncestry(pid = process.pid) {
|
|
16266
|
+
if (typeof pid !== "number" || !Number.isInteger(pid) || pid <= 0) {
|
|
16267
|
+
throw new Error("PID must be a positive integer");
|
|
16268
|
+
}
|
|
16269
|
+
if (os2.platform() === "win32") {
|
|
16270
|
+
return getAncestryWindows(pid);
|
|
16271
|
+
} else {
|
|
16272
|
+
return getAncestryUnix(pid);
|
|
16273
|
+
}
|
|
16311
16274
|
}
|
|
16312
|
-
__name(
|
|
16275
|
+
__name(getProcessAncestry, "getProcessAncestry");
|
|
16313
16276
|
|
|
16314
16277
|
// src/initiate.ts
|
|
16315
|
-
var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
16316
16278
|
var import_prompts2 = __toESM(require_prompts3(), 1);
|
|
16317
16279
|
var import_ts_dedent5 = __toESM(require_dist(), 1);
|
|
16318
16280
|
import { lt, prerelease } from "semver";
|
|
16319
16281
|
|
|
16320
16282
|
// src/generators/ANGULAR/index.ts
|
|
16321
|
-
import { dirname as
|
|
16322
|
-
import { fileURLToPath as
|
|
16283
|
+
import { dirname as dirname3, join as join4 } from "node:path";
|
|
16284
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
16323
16285
|
import {
|
|
16324
16286
|
AngularJSON,
|
|
16325
16287
|
CoreBuilder,
|
|
@@ -16332,8 +16294,8 @@ import { commandLog } from "storybook/internal/common";
|
|
|
16332
16294
|
// src/generators/baseGenerator.ts
|
|
16333
16295
|
var import_ora = __toESM(require_ora(), 1);
|
|
16334
16296
|
import { mkdir } from "node:fs/promises";
|
|
16335
|
-
import { dirname, join } from "node:path";
|
|
16336
|
-
import { fileURLToPath
|
|
16297
|
+
import { dirname as dirname2, join as join3 } from "node:path";
|
|
16298
|
+
import { fileURLToPath } from "node:url";
|
|
16337
16299
|
import {
|
|
16338
16300
|
ProjectType,
|
|
16339
16301
|
SupportedLanguage as SupportedLanguage2,
|
|
@@ -16374,11 +16336,11 @@ var import_ts_dedent2 = __toESM(require_dist(), 1);
|
|
|
16374
16336
|
// src/generators/configure.ts
|
|
16375
16337
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
|
16376
16338
|
import { stat, writeFile } from "node:fs/promises";
|
|
16377
|
-
import { resolve } from "node:path";
|
|
16339
|
+
import { resolve as resolve2 } from "node:path";
|
|
16378
16340
|
import { SupportedLanguage } from "storybook/internal/cli";
|
|
16379
16341
|
import { logger } from "storybook/internal/node-logger";
|
|
16380
|
-
var
|
|
16381
|
-
return stat(
|
|
16342
|
+
var pathExists = /* @__PURE__ */ __name(async (path) => {
|
|
16343
|
+
return stat(path).then(() => true).catch(() => false);
|
|
16382
16344
|
}, "pathExists");
|
|
16383
16345
|
async function configureMain({
|
|
16384
16346
|
addons,
|
|
@@ -16390,8 +16352,8 @@ async function configureMain({
|
|
|
16390
16352
|
features = [],
|
|
16391
16353
|
...custom
|
|
16392
16354
|
}) {
|
|
16393
|
-
const srcPath =
|
|
16394
|
-
const prefix2 = await
|
|
16355
|
+
const srcPath = resolve2(storybookConfigFolder, "../src");
|
|
16356
|
+
const prefix2 = await pathExists(srcPath) ? "../src" : "../stories";
|
|
16395
16357
|
const stories = features.includes("docs") ? [`${prefix2}/**/*.mdx`] : [];
|
|
16396
16358
|
stories.push(`${prefix2}/**/*.stories.@(${extensions.join("|")})`);
|
|
16397
16359
|
const config = {
|
|
@@ -16430,7 +16392,7 @@ async function configurePreview(options) {
|
|
|
16430
16392
|
const { prefix: frameworkPrefix = "" } = options.frameworkPreviewParts || {};
|
|
16431
16393
|
const isTypescript = options.language === SupportedLanguage.TYPESCRIPT;
|
|
16432
16394
|
const previewPath = `./${options.storybookConfigFolder}/preview.${isTypescript ? "ts" : "js"}`;
|
|
16433
|
-
if (await
|
|
16395
|
+
if (await pathExists(previewPath)) {
|
|
16434
16396
|
return;
|
|
16435
16397
|
}
|
|
16436
16398
|
const frameworkPackage = options.frameworkPackage;
|
|
@@ -16750,7 +16712,7 @@ async function baseGenerator(packageManager, npmOptions, { language, builder, pn
|
|
|
16750
16712
|
addons: shouldApplyRequireWrapperOnPackageNames ? addons.map((addon) => applyAddonGetAbsolutePathWrapper(addon)) : addons,
|
|
16751
16713
|
extensions,
|
|
16752
16714
|
language,
|
|
16753
|
-
...staticDir ? { staticDirs: [
|
|
16715
|
+
...staticDir ? { staticDirs: [join3("..", staticDir)] } : null,
|
|
16754
16716
|
...extraMain,
|
|
16755
16717
|
...type !== "framework" ? {
|
|
16756
16718
|
core: {
|
|
@@ -16783,8 +16745,8 @@ async function baseGenerator(packageManager, npmOptions, { language, builder, pn
|
|
|
16783
16745
|
packageManager,
|
|
16784
16746
|
language,
|
|
16785
16747
|
destination: componentsDestinationPath,
|
|
16786
|
-
commonAssetsDir:
|
|
16787
|
-
|
|
16748
|
+
commonAssetsDir: join3(
|
|
16749
|
+
dirname2(fileURLToPath(import.meta.resolve("create-storybook/package.json"))),
|
|
16788
16750
|
"rendererAssets",
|
|
16789
16751
|
"common"
|
|
16790
16752
|
),
|
|
@@ -16862,8 +16824,8 @@ var generator = /* @__PURE__ */ __name(async (packageManager, npmOptions, option
|
|
|
16862
16824
|
if (projectTypeValue !== "application" && projectTypeValue !== "library") {
|
|
16863
16825
|
projectTypeValue = "application";
|
|
16864
16826
|
}
|
|
16865
|
-
const templateDir =
|
|
16866
|
-
|
|
16827
|
+
const templateDir = join4(
|
|
16828
|
+
dirname3(fileURLToPath2(import.meta.resolve("create-storybook/package.json"))),
|
|
16867
16829
|
"templates",
|
|
16868
16830
|
"angular",
|
|
16869
16831
|
projectTypeValue
|
|
@@ -16902,12 +16864,12 @@ var generator3 = /* @__PURE__ */ __name(async (packageManager, npmOptions, optio
|
|
|
16902
16864
|
var HTML_default = generator3;
|
|
16903
16865
|
|
|
16904
16866
|
// src/generators/NEXTJS/index.ts
|
|
16905
|
-
import { existsSync } from "node:fs";
|
|
16906
|
-
import { join as
|
|
16867
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
16868
|
+
import { join as join5 } from "node:path";
|
|
16907
16869
|
import { CoreBuilder as CoreBuilder4 } from "storybook/internal/cli";
|
|
16908
16870
|
var generator4 = /* @__PURE__ */ __name(async (packageManager, npmOptions, options) => {
|
|
16909
16871
|
let staticDir;
|
|
16910
|
-
if (
|
|
16872
|
+
if (existsSync2(join5(process.cwd(), "public"))) {
|
|
16911
16873
|
staticDir = "public";
|
|
16912
16874
|
}
|
|
16913
16875
|
await baseGenerator(
|
|
@@ -17041,7 +17003,7 @@ var REACT_NATIVE_default = generator9;
|
|
|
17041
17003
|
|
|
17042
17004
|
// src/generators/REACT_NATIVE_WEB/index.ts
|
|
17043
17005
|
import { readdir, rm } from "node:fs/promises";
|
|
17044
|
-
import { join as
|
|
17006
|
+
import { join as join6 } from "node:path";
|
|
17045
17007
|
import { SupportedLanguage as SupportedLanguage5, cliStoriesTargetPath, detectLanguage as detectLanguage2 } from "storybook/internal/cli";
|
|
17046
17008
|
var generator10 = /* @__PURE__ */ __name(async (packageManager, npmOptions, options) => {
|
|
17047
17009
|
const language = await detectLanguage2(packageManager);
|
|
@@ -17059,19 +17021,19 @@ var generator10 = /* @__PURE__ */ __name(async (packageManager, npmOptions, opti
|
|
|
17059
17021
|
);
|
|
17060
17022
|
const targetPath = await cliStoriesTargetPath();
|
|
17061
17023
|
const cssFiles = (await readdir(targetPath)).filter((f) => f.endsWith(".css"));
|
|
17062
|
-
await Promise.all(cssFiles.map((f) => rm(
|
|
17024
|
+
await Promise.all(cssFiles.map((f) => rm(join6(targetPath, f))));
|
|
17063
17025
|
}, "generator");
|
|
17064
17026
|
var REACT_NATIVE_WEB_default = generator10;
|
|
17065
17027
|
|
|
17066
17028
|
// src/generators/REACT_SCRIPTS/index.ts
|
|
17067
17029
|
var import_ts_dedent3 = __toESM(require_dist(), 1);
|
|
17068
|
-
import { existsSync as
|
|
17069
|
-
import { resolve as
|
|
17070
|
-
import { fileURLToPath as
|
|
17030
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
17031
|
+
import { resolve as resolve3 } from "node:path";
|
|
17032
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
17071
17033
|
import { CoreBuilder as CoreBuilder7 } from "storybook/internal/cli";
|
|
17072
17034
|
import semver from "semver";
|
|
17073
17035
|
var generator11 = /* @__PURE__ */ __name(async (packageManager, npmOptions, options) => {
|
|
17074
|
-
const monorepoRootPath =
|
|
17036
|
+
const monorepoRootPath = fileURLToPath3(new URL("../../../../../../..", import.meta.url));
|
|
17075
17037
|
const extraMain = options.linkable ? {
|
|
17076
17038
|
webpackFinal: `%%(config) => {
|
|
17077
17039
|
// add monorepo root as a valid directory to import modules from
|
|
@@ -17111,7 +17073,7 @@ var generator11 = /* @__PURE__ */ __name(async (packageManager, npmOptions, opti
|
|
|
17111
17073
|
webpackCompiler: /* @__PURE__ */ __name(() => void 0, "webpackCompiler"),
|
|
17112
17074
|
extraAddons,
|
|
17113
17075
|
extraPackages,
|
|
17114
|
-
staticDir:
|
|
17076
|
+
staticDir: existsSync3(resolve3("./public")) ? "public" : void 0,
|
|
17115
17077
|
extraMain
|
|
17116
17078
|
}
|
|
17117
17079
|
);
|
|
@@ -17242,17 +17204,17 @@ var packageVersions = {
|
|
|
17242
17204
|
};
|
|
17243
17205
|
|
|
17244
17206
|
// src/ink/steps/checks/vitestConfigFiles.tsx
|
|
17245
|
-
import * as
|
|
17207
|
+
import * as fs from "node:fs/promises";
|
|
17246
17208
|
import * as babel from "storybook/internal/babel";
|
|
17247
17209
|
import { getProjectRoot } from "storybook/internal/common";
|
|
17248
|
-
var isCallExpression = /* @__PURE__ */ __name((
|
|
17249
|
-
var isObjectExpression = /* @__PURE__ */ __name((
|
|
17250
|
-
var isArrayExpression = /* @__PURE__ */ __name((
|
|
17251
|
-
var isStringLiteral = /* @__PURE__ */ __name((
|
|
17252
|
-
var isWorkspaceConfigArray = /* @__PURE__ */ __name((
|
|
17253
|
-
var isDefineWorkspaceExpression = /* @__PURE__ */ __name((
|
|
17254
|
-
var isDefineConfigExpression = /* @__PURE__ */ __name((
|
|
17255
|
-
var isSafeToExtendWorkspace = /* @__PURE__ */ __name((
|
|
17210
|
+
var isCallExpression = /* @__PURE__ */ __name((path) => path?.type === "CallExpression", "isCallExpression");
|
|
17211
|
+
var isObjectExpression = /* @__PURE__ */ __name((path) => path?.type === "ObjectExpression", "isObjectExpression");
|
|
17212
|
+
var isArrayExpression = /* @__PURE__ */ __name((path) => path?.type === "ArrayExpression", "isArrayExpression");
|
|
17213
|
+
var isStringLiteral = /* @__PURE__ */ __name((path) => path?.type === "StringLiteral", "isStringLiteral");
|
|
17214
|
+
var isWorkspaceConfigArray = /* @__PURE__ */ __name((path) => isArrayExpression(path) && path?.elements.every((el) => isStringLiteral(el) || isObjectExpression(el)), "isWorkspaceConfigArray");
|
|
17215
|
+
var isDefineWorkspaceExpression = /* @__PURE__ */ __name((path) => isCallExpression(path) && path.callee.name === "defineWorkspace" && isWorkspaceConfigArray(path.arguments[0]), "isDefineWorkspaceExpression");
|
|
17216
|
+
var isDefineConfigExpression = /* @__PURE__ */ __name((path) => isCallExpression(path) && path.callee.name === "defineConfig" && isObjectExpression(path.arguments[0]), "isDefineConfigExpression");
|
|
17217
|
+
var isSafeToExtendWorkspace = /* @__PURE__ */ __name((path) => isObjectExpression(path.arguments[0]) && path.arguments[0]?.properties.every(
|
|
17256
17218
|
(p) => p.key.name !== "test" || isObjectExpression(p.value) && p.value.properties.every(
|
|
17257
17219
|
({ key, value }) => key.name !== "workspace" || isArrayExpression(value)
|
|
17258
17220
|
)
|
|
@@ -17261,43 +17223,43 @@ var isValidWorkspaceConfigFile = /* @__PURE__ */ __name((fileContents) => {
|
|
|
17261
17223
|
let isValidWorkspaceConfig = false;
|
|
17262
17224
|
const parsedFile = babel.babelParse(fileContents);
|
|
17263
17225
|
babel.traverse(parsedFile, {
|
|
17264
|
-
ExportDefaultDeclaration(
|
|
17265
|
-
isValidWorkspaceConfig = isWorkspaceConfigArray(
|
|
17226
|
+
ExportDefaultDeclaration(path) {
|
|
17227
|
+
isValidWorkspaceConfig = isWorkspaceConfigArray(path.node.declaration) || isDefineWorkspaceExpression(path.node.declaration);
|
|
17266
17228
|
}
|
|
17267
17229
|
});
|
|
17268
17230
|
return isValidWorkspaceConfig;
|
|
17269
17231
|
}, "isValidWorkspaceConfigFile");
|
|
17270
17232
|
var vitestConfigFiles = {
|
|
17271
17233
|
condition: /* @__PURE__ */ __name(async (context, state) => {
|
|
17272
|
-
const deps = ["babel", "
|
|
17273
|
-
if (babel &&
|
|
17234
|
+
const deps = ["babel", "empathic", "fs"];
|
|
17235
|
+
if (babel && find_exports && fs) {
|
|
17274
17236
|
const reasons = [];
|
|
17275
17237
|
const projectRoot = getProjectRoot();
|
|
17276
|
-
const vitestWorkspaceFile =
|
|
17238
|
+
const vitestWorkspaceFile = any(
|
|
17277
17239
|
["ts", "js", "json"].flatMap((ex) => [`vitest.workspace.${ex}`, `vitest.projects.${ex}`]),
|
|
17278
|
-
{ cwd: state.directory,
|
|
17240
|
+
{ cwd: state.directory, last: projectRoot }
|
|
17279
17241
|
);
|
|
17280
17242
|
if (vitestWorkspaceFile?.endsWith(".json")) {
|
|
17281
17243
|
reasons.push(`Cannot auto-update JSON workspace file: ${vitestWorkspaceFile}`);
|
|
17282
17244
|
} else if (vitestWorkspaceFile) {
|
|
17283
|
-
const fileContents = await
|
|
17245
|
+
const fileContents = await fs.readFile(vitestWorkspaceFile, "utf8");
|
|
17284
17246
|
if (!isValidWorkspaceConfigFile(fileContents, babel)) {
|
|
17285
17247
|
reasons.push(`Found an invalid workspace config file: ${vitestWorkspaceFile}`);
|
|
17286
17248
|
}
|
|
17287
17249
|
}
|
|
17288
|
-
const vitestConfigFile =
|
|
17250
|
+
const vitestConfigFile = any(
|
|
17289
17251
|
["ts", "js", "tsx", "jsx", "cts", "cjs", "mts", "mjs"].map((ex) => `vitest.config.${ex}`),
|
|
17290
|
-
{ cwd: state.directory,
|
|
17252
|
+
{ cwd: state.directory, last: projectRoot }
|
|
17291
17253
|
);
|
|
17292
17254
|
if (vitestConfigFile?.endsWith(".cts") || vitestConfigFile?.endsWith(".cjs")) {
|
|
17293
17255
|
reasons.push(`Cannot auto-update CommonJS config file: ${vitestConfigFile}`);
|
|
17294
17256
|
} else if (vitestConfigFile) {
|
|
17295
17257
|
let isValidVitestConfig = false;
|
|
17296
|
-
const configContent = await
|
|
17258
|
+
const configContent = await fs.readFile(vitestConfigFile, "utf8");
|
|
17297
17259
|
const parsedConfig = babel.babelParse(configContent);
|
|
17298
17260
|
babel.traverse(parsedConfig, {
|
|
17299
|
-
ExportDefaultDeclaration(
|
|
17300
|
-
if (isDefineConfigExpression(
|
|
17261
|
+
ExportDefaultDeclaration(path) {
|
|
17262
|
+
if (isDefineConfigExpression(path.node.declaration) && isSafeToExtendWorkspace(path.node.declaration)) {
|
|
17301
17263
|
isValidVitestConfig = true;
|
|
17302
17264
|
}
|
|
17303
17265
|
}
|
|
@@ -17752,6 +17714,26 @@ var promptInstallType = /* @__PURE__ */ __name(async ({
|
|
|
17752
17714
|
}
|
|
17753
17715
|
return installType;
|
|
17754
17716
|
}, "promptInstallType");
|
|
17717
|
+
function getStorybookVersionFromAncestry(ancestry) {
|
|
17718
|
+
for (const ancestor of ancestry.toReversed()) {
|
|
17719
|
+
const match = ancestor.command?.match(/\s(?:create-storybook|storybook)@([^\s]+)/);
|
|
17720
|
+
if (match) {
|
|
17721
|
+
return match[1];
|
|
17722
|
+
}
|
|
17723
|
+
}
|
|
17724
|
+
return void 0;
|
|
17725
|
+
}
|
|
17726
|
+
__name(getStorybookVersionFromAncestry, "getStorybookVersionFromAncestry");
|
|
17727
|
+
function getCliIntegrationFromAncestry(ancestry) {
|
|
17728
|
+
for (const ancestor of ancestry.toReversed()) {
|
|
17729
|
+
const match = ancestor.command?.match(/\s(sv(@[^ ]+)? create|sv(@[^ ]+)? add)/i);
|
|
17730
|
+
if (match) {
|
|
17731
|
+
return match[1].includes("add") ? "sv add" : "sv create";
|
|
17732
|
+
}
|
|
17733
|
+
}
|
|
17734
|
+
return void 0;
|
|
17735
|
+
}
|
|
17736
|
+
__name(getCliIntegrationFromAncestry, "getCliIntegrationFromAncestry");
|
|
17755
17737
|
async function doInitiate(options) {
|
|
17756
17738
|
const { packageManager: pkgMgr } = options;
|
|
17757
17739
|
const isEmptyDirProject = options.force !== true && currentDirectoryIsEmpty();
|
|
@@ -17774,6 +17756,14 @@ async function doInitiate(options) {
|
|
|
17774
17756
|
const isPrerelease = prerelease(currentVersion);
|
|
17775
17757
|
const isOutdated = lt(currentVersion, latestVersion);
|
|
17776
17758
|
const borderColor = isOutdated ? "#FC521F" : "#F1618C";
|
|
17759
|
+
let versionSpecifier = void 0;
|
|
17760
|
+
let cliIntegration = void 0;
|
|
17761
|
+
try {
|
|
17762
|
+
const ancestry = getProcessAncestry();
|
|
17763
|
+
versionSpecifier = getStorybookVersionFromAncestry(ancestry);
|
|
17764
|
+
cliIntegration = getCliIntegrationFromAncestry(ancestry);
|
|
17765
|
+
} catch (err) {
|
|
17766
|
+
}
|
|
17777
17767
|
const messages = {
|
|
17778
17768
|
welcome: `Adding Storybook version ${import_picocolors2.default.bold(currentVersion)} to your project..`,
|
|
17779
17769
|
notLatest: import_picocolors2.default.red(import_ts_dedent5.dedent`
|
|
@@ -17919,7 +17909,7 @@ The project types currently supported by Storybook are:
|
|
|
17919
17909
|
}
|
|
17920
17910
|
}
|
|
17921
17911
|
const vitestConfigFilesData = await vitestConfigFiles.condition(
|
|
17922
|
-
{ babel: babel2,
|
|
17912
|
+
{ babel: babel2, empathic: find_exports, fs: fs2 },
|
|
17923
17913
|
{ directory: process.cwd() }
|
|
17924
17914
|
);
|
|
17925
17915
|
if (vitestConfigFilesData.type === "incompatible") {
|
|
@@ -17950,7 +17940,13 @@ The project types currently supported by Storybook are:
|
|
|
17950
17940
|
await packageManager.installDependencies();
|
|
17951
17941
|
}
|
|
17952
17942
|
if (!options.disableTelemetry) {
|
|
17953
|
-
await telemetry2("init", {
|
|
17943
|
+
await telemetry2("init", {
|
|
17944
|
+
projectType,
|
|
17945
|
+
features: telemetryFeatures,
|
|
17946
|
+
newUser,
|
|
17947
|
+
versionSpecifier,
|
|
17948
|
+
cliIntegration
|
|
17949
|
+
});
|
|
17954
17950
|
}
|
|
17955
17951
|
if ([ProjectType2.REACT_NATIVE, ProjectType2.REACT_NATIVE_AND_RNW].includes(projectType)) {
|
|
17956
17952
|
logger4.log(import_ts_dedent5.dedent`
|
|
@@ -17986,10 +17982,10 @@ The project types currently supported by Storybook are:
|
|
|
17986
17982
|
}
|
|
17987
17983
|
return { shouldRunDev: false };
|
|
17988
17984
|
}
|
|
17989
|
-
const foundGitIgnoreFile =
|
|
17985
|
+
const foundGitIgnoreFile = up2(".gitignore");
|
|
17990
17986
|
const rootDirectory = getProjectRoot2();
|
|
17991
17987
|
if (foundGitIgnoreFile && foundGitIgnoreFile.includes(rootDirectory)) {
|
|
17992
|
-
const contents = await
|
|
17988
|
+
const contents = await fs2.readFile(foundGitIgnoreFile, "utf-8");
|
|
17993
17989
|
const hasStorybookLog = contents.includes("*storybook.log");
|
|
17994
17990
|
const hasStorybookStatic = contents.includes("storybook-static");
|
|
17995
17991
|
const linesToAdd = [
|
|
@@ -17997,7 +17993,7 @@ The project types currently supported by Storybook are:
|
|
|
17997
17993
|
!hasStorybookStatic ? "storybook-static" : ""
|
|
17998
17994
|
].filter(Boolean).join("\n");
|
|
17999
17995
|
if (linesToAdd) {
|
|
18000
|
-
await
|
|
17996
|
+
await fs2.appendFile(foundGitIgnoreFile, `
|
|
18001
17997
|
${linesToAdd}
|
|
18002
17998
|
`);
|
|
18003
17999
|
}
|
|
@@ -18008,14 +18004,14 @@ ${linesToAdd}
|
|
|
18008
18004
|
logger4.log(
|
|
18009
18005
|
`> npx storybook@${versions2.storybook} add ${flags} @storybook/addon-a11y@${versions2["@storybook/addon-a11y"]}`
|
|
18010
18006
|
);
|
|
18011
|
-
|
|
18007
|
+
execSync3(
|
|
18012
18008
|
`npx storybook@${versions2.storybook} add ${flags} @storybook/addon-a11y@${versions2["@storybook/addon-a11y"]}`,
|
|
18013
18009
|
{ cwd: process.cwd(), stdio: "inherit" }
|
|
18014
18010
|
);
|
|
18015
18011
|
logger4.log(
|
|
18016
18012
|
`> npx storybook@${versions2.storybook} add ${flags} @storybook/addon-vitest@${versions2["@storybook/addon-vitest"]}`
|
|
18017
18013
|
);
|
|
18018
|
-
|
|
18014
|
+
execSync3(
|
|
18019
18015
|
`npx storybook@${versions2.storybook} add ${flags} @storybook/addon-vitest@${versions2["@storybook/addon-vitest"]}`,
|
|
18020
18016
|
{ cwd: process.cwd(), stdio: "inherit" }
|
|
18021
18017
|
);
|
|
@@ -18048,7 +18044,49 @@ ${linesToAdd}
|
|
|
18048
18044
|
};
|
|
18049
18045
|
}
|
|
18050
18046
|
__name(doInitiate, "doInitiate");
|
|
18047
|
+
async function initiate(options) {
|
|
18048
|
+
const initiateResult = await withTelemetry(
|
|
18049
|
+
"init",
|
|
18050
|
+
{
|
|
18051
|
+
cliOptions: options,
|
|
18052
|
+
printError: /* @__PURE__ */ __name((err) => !err.handled && logger4.error(err), "printError")
|
|
18053
|
+
},
|
|
18054
|
+
() => doInitiate(options)
|
|
18055
|
+
);
|
|
18056
|
+
if (initiateResult?.shouldRunDev) {
|
|
18057
|
+
const { projectType, packageManager, storybookCommand } = initiateResult;
|
|
18058
|
+
logger4.log("\nRunning Storybook");
|
|
18059
|
+
try {
|
|
18060
|
+
const supportsOnboarding = [
|
|
18061
|
+
ProjectType2.REACT_SCRIPTS,
|
|
18062
|
+
ProjectType2.REACT,
|
|
18063
|
+
ProjectType2.WEBPACK_REACT,
|
|
18064
|
+
ProjectType2.REACT_PROJECT,
|
|
18065
|
+
ProjectType2.NEXTJS,
|
|
18066
|
+
ProjectType2.VUE3,
|
|
18067
|
+
ProjectType2.ANGULAR
|
|
18068
|
+
].includes(projectType);
|
|
18069
|
+
const flags = [];
|
|
18070
|
+
if (packageManager.type === "npm" && projectType !== ProjectType2.ANGULAR) {
|
|
18071
|
+
flags.push("--");
|
|
18072
|
+
}
|
|
18073
|
+
if (supportsOnboarding && initiateResult.shouldOnboard) {
|
|
18074
|
+
flags.push("--initial-path=/onboarding");
|
|
18075
|
+
}
|
|
18076
|
+
flags.push("--quiet");
|
|
18077
|
+
packageManager.runPackageCommandSync(
|
|
18078
|
+
storybookCommand.replace(/^yarn /, ""),
|
|
18079
|
+
flags,
|
|
18080
|
+
void 0,
|
|
18081
|
+
"inherit"
|
|
18082
|
+
);
|
|
18083
|
+
} catch (e) {
|
|
18084
|
+
}
|
|
18085
|
+
}
|
|
18086
|
+
}
|
|
18087
|
+
__name(initiate, "initiate");
|
|
18051
18088
|
|
|
18052
18089
|
export {
|
|
18053
|
-
doInitiate
|
|
18090
|
+
doInitiate,
|
|
18091
|
+
initiate
|
|
18054
18092
|
};
|