@pandacss/studio 0.0.0-dev-20230613163214
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/LICENSE.md +21 -0
- package/astro.config.ts +14 -0
- package/dist/studio.d.ts +13 -0
- package/dist/studio.js +2089 -0
- package/dist/studio.mjs +2087 -0
- package/index.ts +1 -0
- package/package.json +59 -0
- package/panda.config.ts +110 -0
- package/public/favicon.svg +13 -0
- package/src/components/analyzer/category-utilities.tsx +146 -0
- package/src/components/analyzer/data-combobox.tsx +125 -0
- package/src/components/analyzer/data-table.tsx +43 -0
- package/src/components/analyzer/external-icon.tsx +8 -0
- package/src/components/analyzer/file-details.tsx +101 -0
- package/src/components/analyzer/get-report-infos-from.ts +80 -0
- package/src/components/analyzer/quick-tooltip.tsx +15 -0
- package/src/components/analyzer/report-item-columns.tsx +52 -0
- package/src/components/analyzer/report-item-link.tsx +98 -0
- package/src/components/analyzer/section.tsx +24 -0
- package/src/components/analyzer/sort-icon.tsx +7 -0
- package/src/components/analyzer/text-with-count.tsx +28 -0
- package/src/components/analyzer/token-search-combobox.tsx +39 -0
- package/src/components/analyzer/truncated-text.tsx +26 -0
- package/src/components/analyzer/utility-details.tsx +312 -0
- package/src/components/color-constrast.tsx +131 -0
- package/src/components/color-item.tsx +37 -0
- package/src/components/color-wrapper.tsx +25 -0
- package/src/components/colors.tsx +96 -0
- package/src/components/empty-state.tsx +19 -0
- package/src/components/font-family.tsx +55 -0
- package/src/components/font-tokens.tsx +69 -0
- package/src/components/head.astro +35 -0
- package/src/components/icons.tsx +207 -0
- package/src/components/input.tsx +27 -0
- package/src/components/layer-styles.tsx +38 -0
- package/src/components/logo.tsx +34 -0
- package/src/components/nav-item.tsx +39 -0
- package/src/components/overview.tsx +65 -0
- package/src/components/radii.tsx +34 -0
- package/src/components/semantic-color.tsx +27 -0
- package/src/components/side-nav-item.astro +25 -0
- package/src/components/side-nav.astro +30 -0
- package/src/components/sizes.tsx +53 -0
- package/src/components/text-styles.tsx +33 -0
- package/src/components/theme-toggle.astro +56 -0
- package/src/components/token-analyzer.tsx +390 -0
- package/src/components/token-content.tsx +5 -0
- package/src/components/token-group.tsx +6 -0
- package/src/components/typography-playground.tsx +83 -0
- package/src/env.d.ts +1 -0
- package/src/icons/moon.tsx +15 -0
- package/src/icons/sun.tsx +19 -0
- package/src/layouts/Layout.astro +19 -0
- package/src/layouts/Sidebar.astro +35 -0
- package/src/lib/analysis-data.ts +17 -0
- package/src/lib/color-contrast-checker.ts +218 -0
- package/src/lib/color.ts +40 -0
- package/src/lib/constants.ts +140 -0
- package/src/lib/create-context.ts +27 -0
- package/src/lib/get-report-item.tsx +41 -0
- package/src/lib/group-in.ts +35 -0
- package/src/lib/panda.context.ts +23 -0
- package/src/lib/pick.ts +24 -0
- package/src/lib/sizes-sort.ts +10 -0
- package/src/lib/truncate.tsx +7 -0
- package/src/lib/use-color-docs.ts +101 -0
- package/src/pages/colors.astro +11 -0
- package/src/pages/font-sizes.astro +15 -0
- package/src/pages/font-weights.astro +15 -0
- package/src/pages/fonts.astro +11 -0
- package/src/pages/index.astro +8 -0
- package/src/pages/layer-styles.astro +11 -0
- package/src/pages/letter-spacings.astro +20 -0
- package/src/pages/line-heights.astro +21 -0
- package/src/pages/playground/contrast-checker.astro +11 -0
- package/src/pages/playground/typography.astro +11 -0
- package/src/pages/radii.astro +11 -0
- package/src/pages/sizes.astro +14 -0
- package/src/pages/spacing.astro +14 -0
- package/src/pages/text-styles.astro +11 -0
- package/src/pages/token-analyzer/file.astro +11 -0
- package/src/pages/token-analyzer/index.astro +11 -0
- package/src/pages/token-analyzer/utility.astro +11 -0
- package/styled-system/chunks/..__core____tests____composition.test.css +2 -0
- package/styled-system/chunks/src__components__analyzer__category-utilities.css +97 -0
- package/styled-system/chunks/src__components__analyzer__data-combobox.css +77 -0
- package/styled-system/chunks/src__components__analyzer__data-table.css +37 -0
- package/styled-system/chunks/src__components__analyzer__file-details.css +103 -0
- package/styled-system/chunks/src__components__analyzer__quick-tooltip.css +2 -0
- package/styled-system/chunks/src__components__analyzer__report-item-columns.css +29 -0
- package/styled-system/chunks/src__components__analyzer__report-item-link.css +109 -0
- package/styled-system/chunks/src__components__analyzer__section.css +29 -0
- package/styled-system/chunks/src__components__analyzer__text-with-count.css +33 -0
- package/styled-system/chunks/src__components__analyzer__truncated-text.css +13 -0
- package/styled-system/chunks/src__components__analyzer__utility-details.css +125 -0
- package/styled-system/chunks/src__components__color-constrast.css +114 -0
- package/styled-system/chunks/src__components__color-item.css +21 -0
- package/styled-system/chunks/src__components__color-wrapper.css +73 -0
- package/styled-system/chunks/src__components__colors.css +97 -0
- package/styled-system/chunks/src__components__empty-state.css +45 -0
- package/styled-system/chunks/src__components__font-family.css +85 -0
- package/styled-system/chunks/src__components__font-tokens.css +61 -0
- package/styled-system/chunks/src__components__input.css +68 -0
- package/styled-system/chunks/src__components__layer-styles.css +66 -0
- package/styled-system/chunks/src__components__nav-item.css +73 -0
- package/styled-system/chunks/src__components__overview.css +125 -0
- package/styled-system/chunks/src__components__radii.css +49 -0
- package/styled-system/chunks/src__components__semantic-color.css +45 -0
- package/styled-system/chunks/src__components__side-nav-item.css +33 -0
- package/styled-system/chunks/src__components__side-nav.css +49 -0
- package/styled-system/chunks/src__components__sizes.css +41 -0
- package/styled-system/chunks/src__components__text-styles.css +31 -0
- package/styled-system/chunks/src__components__theme-toggle.css +63 -0
- package/styled-system/chunks/src__components__token-analyzer.css +227 -0
- package/styled-system/chunks/src__components__token-content.css +13 -0
- package/styled-system/chunks/src__components__token-group.css +21 -0
- package/styled-system/chunks/src__components__token-search-combobox.css +2 -0
- package/styled-system/chunks/src__components__typography-playground.css +61 -0
- package/styled-system/chunks/src__layouts__Layout.css +2 -0
- package/styled-system/chunks/src__layouts__Sidebar.css +113 -0
- package/styled-system/chunks/src__pages__colors.css +2 -0
- package/styled-system/chunks/src__pages__font-sizes.css +2 -0
- package/styled-system/chunks/src__pages__font-weights.css +2 -0
- package/styled-system/chunks/src__pages__fonts.css +2 -0
- package/styled-system/chunks/src__pages__index.css +2 -0
- package/styled-system/chunks/src__pages__layer-styles.css +2 -0
- package/styled-system/chunks/src__pages__letter-spacings.css +2 -0
- package/styled-system/chunks/src__pages__line-heights.css +2 -0
- package/styled-system/chunks/src__pages__playground__contrast-checker.css +2 -0
- package/styled-system/chunks/src__pages__playground__typography.css +2 -0
- package/styled-system/chunks/src__pages__radii.css +2 -0
- package/styled-system/chunks/src__pages__sizes.css +2 -0
- package/styled-system/chunks/src__pages__spacing.css +2 -0
- package/styled-system/chunks/src__pages__text-styles.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__file.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__index.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__utility.css +2 -0
- package/styled-system/css/conditions.mjs +147 -0
- package/styled-system/css/css.d.ts +2 -0
- package/styled-system/css/css.mjs +391 -0
- package/styled-system/css/cva.d.ts +5 -0
- package/styled-system/css/cva.mjs +63 -0
- package/styled-system/css/cx.d.ts +4 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +3 -0
- package/styled-system/css/index.mjs +3 -0
- package/styled-system/global.css +61 -0
- package/styled-system/helpers.mjs +251 -0
- package/styled-system/jsx/absolute-center.d.ts +8 -0
- package/styled-system/jsx/absolute-center.mjs +9 -0
- package/styled-system/jsx/aspect-ratio.d.ts +8 -0
- package/styled-system/jsx/aspect-ratio.mjs +9 -0
- package/styled-system/jsx/box.d.ts +8 -0
- package/styled-system/jsx/box.mjs +8 -0
- package/styled-system/jsx/center.d.ts +8 -0
- package/styled-system/jsx/center.mjs +9 -0
- package/styled-system/jsx/circle.d.ts +8 -0
- package/styled-system/jsx/circle.mjs +9 -0
- package/styled-system/jsx/container.d.ts +8 -0
- package/styled-system/jsx/container.mjs +8 -0
- package/styled-system/jsx/divider.d.ts +8 -0
- package/styled-system/jsx/divider.mjs +9 -0
- package/styled-system/jsx/factory.d.ts +2 -0
- package/styled-system/jsx/factory.mjs +59 -0
- package/styled-system/jsx/flex.d.ts +8 -0
- package/styled-system/jsx/flex.mjs +9 -0
- package/styled-system/jsx/float.d.ts +8 -0
- package/styled-system/jsx/float.mjs +9 -0
- package/styled-system/jsx/grid-item.d.ts +8 -0
- package/styled-system/jsx/grid-item.mjs +9 -0
- package/styled-system/jsx/grid.d.ts +8 -0
- package/styled-system/jsx/grid.mjs +9 -0
- package/styled-system/jsx/hstack.d.ts +8 -0
- package/styled-system/jsx/hstack.mjs +9 -0
- package/styled-system/jsx/index.d.ts +20 -0
- package/styled-system/jsx/index.mjs +19 -0
- package/styled-system/jsx/is-valid-prop.mjs +1010 -0
- package/styled-system/jsx/spacer.d.ts +8 -0
- package/styled-system/jsx/spacer.mjs +9 -0
- package/styled-system/jsx/square.d.ts +8 -0
- package/styled-system/jsx/square.mjs +9 -0
- package/styled-system/jsx/stack.d.ts +8 -0
- package/styled-system/jsx/stack.mjs +9 -0
- package/styled-system/jsx/styled-link.d.ts +8 -0
- package/styled-system/jsx/styled-link.mjs +8 -0
- package/styled-system/jsx/vstack.d.ts +8 -0
- package/styled-system/jsx/vstack.mjs +9 -0
- package/styled-system/jsx/wrap.d.ts +8 -0
- package/styled-system/jsx/wrap.mjs +9 -0
- package/styled-system/patterns/absolute-center.d.ts +14 -0
- package/styled-system/patterns/absolute-center.mjs +23 -0
- package/styled-system/patterns/aspect-ratio.d.ts +14 -0
- package/styled-system/patterns/aspect-ratio.mjs +25 -0
- package/styled-system/patterns/box.d.ts +14 -0
- package/styled-system/patterns/box.mjs +12 -0
- package/styled-system/patterns/center.d.ts +14 -0
- package/styled-system/patterns/center.mjs +18 -0
- package/styled-system/patterns/circle.d.ts +14 -0
- package/styled-system/patterns/circle.mjs +22 -0
- package/styled-system/patterns/container.d.ts +14 -0
- package/styled-system/patterns/container.mjs +18 -0
- package/styled-system/patterns/divider.d.ts +16 -0
- package/styled-system/patterns/divider.mjs +21 -0
- package/styled-system/patterns/flex.d.ts +20 -0
- package/styled-system/patterns/flex.mjs +23 -0
- package/styled-system/patterns/float.d.ts +17 -0
- package/styled-system/patterns/float.mjs +45 -0
- package/styled-system/patterns/grid-item.d.ts +19 -0
- package/styled-system/patterns/grid-item.mjs +20 -0
- package/styled-system/patterns/grid.d.ts +18 -0
- package/styled-system/patterns/grid.mjs +25 -0
- package/styled-system/patterns/hstack.d.ts +15 -0
- package/styled-system/patterns/hstack.mjs +20 -0
- package/styled-system/patterns/index.d.ts +18 -0
- package/styled-system/patterns/index.mjs +18 -0
- package/styled-system/patterns/spacer.d.ts +14 -0
- package/styled-system/patterns/spacer.mjs +18 -0
- package/styled-system/patterns/square.d.ts +14 -0
- package/styled-system/patterns/square.mjs +21 -0
- package/styled-system/patterns/stack.d.ts +17 -0
- package/styled-system/patterns/stack.mjs +20 -0
- package/styled-system/patterns/styled-link.d.ts +14 -0
- package/styled-system/patterns/styled-link.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +15 -0
- package/styled-system/patterns/vstack.mjs +20 -0
- package/styled-system/patterns/wrap.d.ts +18 -0
- package/styled-system/patterns/wrap.mjs +22 -0
- package/styled-system/reset.css +190 -0
- package/styled-system/static.css +5 -0
- package/styled-system/styles.css +938 -0
- package/styled-system/tokens/index.css +374 -0
- package/styled-system/tokens/index.d.ts +8 -0
- package/styled-system/tokens/index.mjs +1590 -0
- package/styled-system/tokens/keyframes.css +30 -0
- package/styled-system/tokens/tokens.d.ts +56 -0
- package/styled-system/types/composition.d.ts +110 -0
- package/styled-system/types/conditions.d.ts +135 -0
- package/styled-system/types/csstype.d.ts +20748 -0
- package/styled-system/types/global.d.ts +15 -0
- package/styled-system/types/helpers.d.ts +1 -0
- package/styled-system/types/index.d.ts +3 -0
- package/styled-system/types/jsx.d.ts +27 -0
- package/styled-system/types/parts.d.ts +5 -0
- package/styled-system/types/pattern.d.ts +52 -0
- package/styled-system/types/prop-type.d.ts +300 -0
- package/styled-system/types/recipe.d.ts +79 -0
- package/styled-system/types/selectors.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +688 -0
- package/styled-system/types/system-types.d.ts +76 -0
- package/virtual-panda.ts +72 -0
package/dist/studio.js
ADDED
|
@@ -0,0 +1,2089 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function __init() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
27
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
28
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
29
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
30
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
32
|
+
mod
|
|
33
|
+
));
|
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
|
+
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@6.7.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js
|
|
37
|
+
var init_cjs_shims = __esm({
|
|
38
|
+
"../../node_modules/.pnpm/tsup@6.7.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
43
|
+
var require_windows = __commonJS({
|
|
44
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
|
|
45
|
+
init_cjs_shims();
|
|
46
|
+
module2.exports = isexe;
|
|
47
|
+
isexe.sync = sync;
|
|
48
|
+
var fs = require("fs");
|
|
49
|
+
function checkPathExt(path3, options) {
|
|
50
|
+
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
51
|
+
if (!pathext) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
pathext = pathext.split(";");
|
|
55
|
+
if (pathext.indexOf("") !== -1) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
for (var i = 0; i < pathext.length; i++) {
|
|
59
|
+
var p = pathext[i].toLowerCase();
|
|
60
|
+
if (p && path3.substr(-p.length).toLowerCase() === p) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
function checkStat(stat, path3, options) {
|
|
67
|
+
if (!stat.isSymbolicLink() && !stat.isFile()) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
return checkPathExt(path3, options);
|
|
71
|
+
}
|
|
72
|
+
function isexe(path3, options, cb) {
|
|
73
|
+
fs.stat(path3, function(er, stat) {
|
|
74
|
+
cb(er, er ? false : checkStat(stat, path3, options));
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function sync(path3, options) {
|
|
78
|
+
return checkStat(fs.statSync(path3), path3, options);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
84
|
+
var require_mode = __commonJS({
|
|
85
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
|
|
86
|
+
init_cjs_shims();
|
|
87
|
+
module2.exports = isexe;
|
|
88
|
+
isexe.sync = sync;
|
|
89
|
+
var fs = require("fs");
|
|
90
|
+
function isexe(path3, options, cb) {
|
|
91
|
+
fs.stat(path3, function(er, stat) {
|
|
92
|
+
cb(er, er ? false : checkStat(stat, options));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function sync(path3, options) {
|
|
96
|
+
return checkStat(fs.statSync(path3), options);
|
|
97
|
+
}
|
|
98
|
+
function checkStat(stat, options) {
|
|
99
|
+
return stat.isFile() && checkMode(stat, options);
|
|
100
|
+
}
|
|
101
|
+
function checkMode(stat, options) {
|
|
102
|
+
var mod = stat.mode;
|
|
103
|
+
var uid = stat.uid;
|
|
104
|
+
var gid = stat.gid;
|
|
105
|
+
var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
|
|
106
|
+
var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
|
|
107
|
+
var u = parseInt("100", 8);
|
|
108
|
+
var g = parseInt("010", 8);
|
|
109
|
+
var o = parseInt("001", 8);
|
|
110
|
+
var ug = u | g;
|
|
111
|
+
var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
|
|
112
|
+
return ret;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
118
|
+
var require_isexe = __commonJS({
|
|
119
|
+
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
|
|
120
|
+
init_cjs_shims();
|
|
121
|
+
var fs = require("fs");
|
|
122
|
+
var core;
|
|
123
|
+
if (process.platform === "win32" || global.TESTING_WINDOWS) {
|
|
124
|
+
core = require_windows();
|
|
125
|
+
} else {
|
|
126
|
+
core = require_mode();
|
|
127
|
+
}
|
|
128
|
+
module2.exports = isexe;
|
|
129
|
+
isexe.sync = sync;
|
|
130
|
+
function isexe(path3, options, cb) {
|
|
131
|
+
if (typeof options === "function") {
|
|
132
|
+
cb = options;
|
|
133
|
+
options = {};
|
|
134
|
+
}
|
|
135
|
+
if (!cb) {
|
|
136
|
+
if (typeof Promise !== "function") {
|
|
137
|
+
throw new TypeError("callback not provided");
|
|
138
|
+
}
|
|
139
|
+
return new Promise(function(resolve, reject) {
|
|
140
|
+
isexe(path3, options || {}, function(er, is) {
|
|
141
|
+
if (er) {
|
|
142
|
+
reject(er);
|
|
143
|
+
} else {
|
|
144
|
+
resolve(is);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
core(path3, options || {}, function(er, is) {
|
|
150
|
+
if (er) {
|
|
151
|
+
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
152
|
+
er = null;
|
|
153
|
+
is = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
cb(er, is);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function sync(path3, options) {
|
|
160
|
+
try {
|
|
161
|
+
return core.sync(path3, options || {});
|
|
162
|
+
} catch (er) {
|
|
163
|
+
if (options && options.ignoreErrors || er.code === "EACCES") {
|
|
164
|
+
return false;
|
|
165
|
+
} else {
|
|
166
|
+
throw er;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
174
|
+
var require_which = __commonJS({
|
|
175
|
+
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module2) {
|
|
176
|
+
init_cjs_shims();
|
|
177
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
178
|
+
var path3 = require("path");
|
|
179
|
+
var COLON = isWindows ? ";" : ":";
|
|
180
|
+
var isexe = require_isexe();
|
|
181
|
+
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
182
|
+
var getPathInfo = (cmd, opt) => {
|
|
183
|
+
const colon = opt.colon || COLON;
|
|
184
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
|
|
185
|
+
// windows always checks the cwd first
|
|
186
|
+
...isWindows ? [process.cwd()] : [],
|
|
187
|
+
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
188
|
+
"").split(colon)
|
|
189
|
+
];
|
|
190
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
191
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
192
|
+
if (isWindows) {
|
|
193
|
+
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
194
|
+
pathExt.unshift("");
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
pathEnv,
|
|
198
|
+
pathExt,
|
|
199
|
+
pathExtExe
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
var which = (cmd, opt, cb) => {
|
|
203
|
+
if (typeof opt === "function") {
|
|
204
|
+
cb = opt;
|
|
205
|
+
opt = {};
|
|
206
|
+
}
|
|
207
|
+
if (!opt)
|
|
208
|
+
opt = {};
|
|
209
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
210
|
+
const found = [];
|
|
211
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
212
|
+
if (i === pathEnv.length)
|
|
213
|
+
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
214
|
+
const ppRaw = pathEnv[i];
|
|
215
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
216
|
+
const pCmd = path3.join(pathPart, cmd);
|
|
217
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
218
|
+
resolve(subStep(p, i, 0));
|
|
219
|
+
});
|
|
220
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
221
|
+
if (ii === pathExt.length)
|
|
222
|
+
return resolve(step(i + 1));
|
|
223
|
+
const ext = pathExt[ii];
|
|
224
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
225
|
+
if (!er && is) {
|
|
226
|
+
if (opt.all)
|
|
227
|
+
found.push(p + ext);
|
|
228
|
+
else
|
|
229
|
+
return resolve(p + ext);
|
|
230
|
+
}
|
|
231
|
+
return resolve(subStep(p, i, ii + 1));
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
235
|
+
};
|
|
236
|
+
var whichSync = (cmd, opt) => {
|
|
237
|
+
opt = opt || {};
|
|
238
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
239
|
+
const found = [];
|
|
240
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
241
|
+
const ppRaw = pathEnv[i];
|
|
242
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
243
|
+
const pCmd = path3.join(pathPart, cmd);
|
|
244
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
245
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
246
|
+
const cur = p + pathExt[j];
|
|
247
|
+
try {
|
|
248
|
+
const is = isexe.sync(cur, { pathExt: pathExtExe });
|
|
249
|
+
if (is) {
|
|
250
|
+
if (opt.all)
|
|
251
|
+
found.push(cur);
|
|
252
|
+
else
|
|
253
|
+
return cur;
|
|
254
|
+
}
|
|
255
|
+
} catch (ex) {
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (opt.all && found.length)
|
|
260
|
+
return found;
|
|
261
|
+
if (opt.nothrow)
|
|
262
|
+
return null;
|
|
263
|
+
throw getNotFoundError(cmd);
|
|
264
|
+
};
|
|
265
|
+
module2.exports = which;
|
|
266
|
+
which.sync = whichSync;
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
// ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
271
|
+
var require_path_key = __commonJS({
|
|
272
|
+
"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module2) {
|
|
273
|
+
"use strict";
|
|
274
|
+
init_cjs_shims();
|
|
275
|
+
var pathKey2 = (options = {}) => {
|
|
276
|
+
const environment = options.env || process.env;
|
|
277
|
+
const platform = options.platform || process.platform;
|
|
278
|
+
if (platform !== "win32") {
|
|
279
|
+
return "PATH";
|
|
280
|
+
}
|
|
281
|
+
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
282
|
+
};
|
|
283
|
+
module2.exports = pathKey2;
|
|
284
|
+
module2.exports.default = pathKey2;
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
289
|
+
var require_resolveCommand = __commonJS({
|
|
290
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module2) {
|
|
291
|
+
"use strict";
|
|
292
|
+
init_cjs_shims();
|
|
293
|
+
var path3 = require("path");
|
|
294
|
+
var which = require_which();
|
|
295
|
+
var getPathKey = require_path_key();
|
|
296
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
297
|
+
const env = parsed.options.env || process.env;
|
|
298
|
+
const cwd = process.cwd();
|
|
299
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
300
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
301
|
+
if (shouldSwitchCwd) {
|
|
302
|
+
try {
|
|
303
|
+
process.chdir(parsed.options.cwd);
|
|
304
|
+
} catch (err) {
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
let resolved;
|
|
308
|
+
try {
|
|
309
|
+
resolved = which.sync(parsed.command, {
|
|
310
|
+
path: env[getPathKey({ env })],
|
|
311
|
+
pathExt: withoutPathExt ? path3.delimiter : void 0
|
|
312
|
+
});
|
|
313
|
+
} catch (e) {
|
|
314
|
+
} finally {
|
|
315
|
+
if (shouldSwitchCwd) {
|
|
316
|
+
process.chdir(cwd);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (resolved) {
|
|
320
|
+
resolved = path3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
321
|
+
}
|
|
322
|
+
return resolved;
|
|
323
|
+
}
|
|
324
|
+
function resolveCommand(parsed) {
|
|
325
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
326
|
+
}
|
|
327
|
+
module2.exports = resolveCommand;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js
|
|
332
|
+
var require_escape = __commonJS({
|
|
333
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js"(exports, module2) {
|
|
334
|
+
"use strict";
|
|
335
|
+
init_cjs_shims();
|
|
336
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
337
|
+
function escapeCommand(arg) {
|
|
338
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
339
|
+
return arg;
|
|
340
|
+
}
|
|
341
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
342
|
+
arg = `${arg}`;
|
|
343
|
+
arg = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
344
|
+
arg = arg.replace(/(\\*)$/, "$1$1");
|
|
345
|
+
arg = `"${arg}"`;
|
|
346
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
347
|
+
if (doubleEscapeMetaChars) {
|
|
348
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
349
|
+
}
|
|
350
|
+
return arg;
|
|
351
|
+
}
|
|
352
|
+
module2.exports.command = escapeCommand;
|
|
353
|
+
module2.exports.argument = escapeArgument;
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
358
|
+
var require_shebang_regex = __commonJS({
|
|
359
|
+
"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module2) {
|
|
360
|
+
"use strict";
|
|
361
|
+
init_cjs_shims();
|
|
362
|
+
module2.exports = /^#!(.*)/;
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
// ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
367
|
+
var require_shebang_command = __commonJS({
|
|
368
|
+
"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module2) {
|
|
369
|
+
"use strict";
|
|
370
|
+
init_cjs_shims();
|
|
371
|
+
var shebangRegex = require_shebang_regex();
|
|
372
|
+
module2.exports = (string = "") => {
|
|
373
|
+
const match = string.match(shebangRegex);
|
|
374
|
+
if (!match) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
const [path3, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
378
|
+
const binary = path3.split("/").pop();
|
|
379
|
+
if (binary === "env") {
|
|
380
|
+
return argument;
|
|
381
|
+
}
|
|
382
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js
|
|
388
|
+
var require_readShebang = __commonJS({
|
|
389
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
|
|
390
|
+
"use strict";
|
|
391
|
+
init_cjs_shims();
|
|
392
|
+
var fs = require("fs");
|
|
393
|
+
var shebangCommand = require_shebang_command();
|
|
394
|
+
function readShebang(command) {
|
|
395
|
+
const size = 150;
|
|
396
|
+
const buffer = Buffer.alloc(size);
|
|
397
|
+
let fd;
|
|
398
|
+
try {
|
|
399
|
+
fd = fs.openSync(command, "r");
|
|
400
|
+
fs.readSync(fd, buffer, 0, size, 0);
|
|
401
|
+
fs.closeSync(fd);
|
|
402
|
+
} catch (e) {
|
|
403
|
+
}
|
|
404
|
+
return shebangCommand(buffer.toString());
|
|
405
|
+
}
|
|
406
|
+
module2.exports = readShebang;
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js
|
|
411
|
+
var require_parse = __commonJS({
|
|
412
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js"(exports, module2) {
|
|
413
|
+
"use strict";
|
|
414
|
+
init_cjs_shims();
|
|
415
|
+
var path3 = require("path");
|
|
416
|
+
var resolveCommand = require_resolveCommand();
|
|
417
|
+
var escape = require_escape();
|
|
418
|
+
var readShebang = require_readShebang();
|
|
419
|
+
var isWin = process.platform === "win32";
|
|
420
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
421
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
422
|
+
function detectShebang(parsed) {
|
|
423
|
+
parsed.file = resolveCommand(parsed);
|
|
424
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
425
|
+
if (shebang) {
|
|
426
|
+
parsed.args.unshift(parsed.file);
|
|
427
|
+
parsed.command = shebang;
|
|
428
|
+
return resolveCommand(parsed);
|
|
429
|
+
}
|
|
430
|
+
return parsed.file;
|
|
431
|
+
}
|
|
432
|
+
function parseNonShell(parsed) {
|
|
433
|
+
if (!isWin) {
|
|
434
|
+
return parsed;
|
|
435
|
+
}
|
|
436
|
+
const commandFile = detectShebang(parsed);
|
|
437
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
438
|
+
if (parsed.options.forceShell || needsShell) {
|
|
439
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
440
|
+
parsed.command = path3.normalize(parsed.command);
|
|
441
|
+
parsed.command = escape.command(parsed.command);
|
|
442
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
443
|
+
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
444
|
+
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
|
|
445
|
+
parsed.command = process.env.comspec || "cmd.exe";
|
|
446
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
447
|
+
}
|
|
448
|
+
return parsed;
|
|
449
|
+
}
|
|
450
|
+
function parse(command, args, options) {
|
|
451
|
+
if (args && !Array.isArray(args)) {
|
|
452
|
+
options = args;
|
|
453
|
+
args = null;
|
|
454
|
+
}
|
|
455
|
+
args = args ? args.slice(0) : [];
|
|
456
|
+
options = Object.assign({}, options);
|
|
457
|
+
const parsed = {
|
|
458
|
+
command,
|
|
459
|
+
args,
|
|
460
|
+
options,
|
|
461
|
+
file: void 0,
|
|
462
|
+
original: {
|
|
463
|
+
command,
|
|
464
|
+
args
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
468
|
+
}
|
|
469
|
+
module2.exports = parse;
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js
|
|
474
|
+
var require_enoent = __commonJS({
|
|
475
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js"(exports, module2) {
|
|
476
|
+
"use strict";
|
|
477
|
+
init_cjs_shims();
|
|
478
|
+
var isWin = process.platform === "win32";
|
|
479
|
+
function notFoundError(original, syscall) {
|
|
480
|
+
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
481
|
+
code: "ENOENT",
|
|
482
|
+
errno: "ENOENT",
|
|
483
|
+
syscall: `${syscall} ${original.command}`,
|
|
484
|
+
path: original.command,
|
|
485
|
+
spawnargs: original.args
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function hookChildProcess(cp, parsed) {
|
|
489
|
+
if (!isWin) {
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
const originalEmit = cp.emit;
|
|
493
|
+
cp.emit = function(name, arg1) {
|
|
494
|
+
if (name === "exit") {
|
|
495
|
+
const err = verifyENOENT(arg1, parsed, "spawn");
|
|
496
|
+
if (err) {
|
|
497
|
+
return originalEmit.call(cp, "error", err);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return originalEmit.apply(cp, arguments);
|
|
501
|
+
};
|
|
502
|
+
}
|
|
503
|
+
function verifyENOENT(status, parsed) {
|
|
504
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
505
|
+
return notFoundError(parsed.original, "spawn");
|
|
506
|
+
}
|
|
507
|
+
return null;
|
|
508
|
+
}
|
|
509
|
+
function verifyENOENTSync(status, parsed) {
|
|
510
|
+
if (isWin && status === 1 && !parsed.file) {
|
|
511
|
+
return notFoundError(parsed.original, "spawnSync");
|
|
512
|
+
}
|
|
513
|
+
return null;
|
|
514
|
+
}
|
|
515
|
+
module2.exports = {
|
|
516
|
+
hookChildProcess,
|
|
517
|
+
verifyENOENT,
|
|
518
|
+
verifyENOENTSync,
|
|
519
|
+
notFoundError
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
// ../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js
|
|
525
|
+
var require_cross_spawn = __commonJS({
|
|
526
|
+
"../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js"(exports, module2) {
|
|
527
|
+
"use strict";
|
|
528
|
+
init_cjs_shims();
|
|
529
|
+
var cp = require("child_process");
|
|
530
|
+
var parse = require_parse();
|
|
531
|
+
var enoent = require_enoent();
|
|
532
|
+
function spawn(command, args, options) {
|
|
533
|
+
const parsed = parse(command, args, options);
|
|
534
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
535
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
536
|
+
return spawned;
|
|
537
|
+
}
|
|
538
|
+
function spawnSync(command, args, options) {
|
|
539
|
+
const parsed = parse(command, args, options);
|
|
540
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
541
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
542
|
+
return result;
|
|
543
|
+
}
|
|
544
|
+
module2.exports = spawn;
|
|
545
|
+
module2.exports.spawn = spawn;
|
|
546
|
+
module2.exports.sync = spawnSync;
|
|
547
|
+
module2.exports._parse = parse;
|
|
548
|
+
module2.exports._enoent = enoent;
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
|
|
552
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
553
|
+
var require_signals = __commonJS({
|
|
554
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) {
|
|
555
|
+
init_cjs_shims();
|
|
556
|
+
module2.exports = [
|
|
557
|
+
"SIGABRT",
|
|
558
|
+
"SIGALRM",
|
|
559
|
+
"SIGHUP",
|
|
560
|
+
"SIGINT",
|
|
561
|
+
"SIGTERM"
|
|
562
|
+
];
|
|
563
|
+
if (process.platform !== "win32") {
|
|
564
|
+
module2.exports.push(
|
|
565
|
+
"SIGVTALRM",
|
|
566
|
+
"SIGXCPU",
|
|
567
|
+
"SIGXFSZ",
|
|
568
|
+
"SIGUSR2",
|
|
569
|
+
"SIGTRAP",
|
|
570
|
+
"SIGSYS",
|
|
571
|
+
"SIGQUIT",
|
|
572
|
+
"SIGIOT"
|
|
573
|
+
// should detect profiler and enable/disable accordingly.
|
|
574
|
+
// see #21
|
|
575
|
+
// 'SIGPROF'
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
if (process.platform === "linux") {
|
|
579
|
+
module2.exports.push(
|
|
580
|
+
"SIGIO",
|
|
581
|
+
"SIGPOLL",
|
|
582
|
+
"SIGPWR",
|
|
583
|
+
"SIGSTKFLT",
|
|
584
|
+
"SIGUNUSED"
|
|
585
|
+
);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
|
|
591
|
+
var require_signal_exit = __commonJS({
|
|
592
|
+
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
|
|
593
|
+
init_cjs_shims();
|
|
594
|
+
var process5 = global.process;
|
|
595
|
+
var processOk = function(process6) {
|
|
596
|
+
return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function";
|
|
597
|
+
};
|
|
598
|
+
if (!processOk(process5)) {
|
|
599
|
+
module2.exports = function() {
|
|
600
|
+
return function() {
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
} else {
|
|
604
|
+
assert = require("assert");
|
|
605
|
+
signals = require_signals();
|
|
606
|
+
isWin = /^win/i.test(process5.platform);
|
|
607
|
+
EE = require("events");
|
|
608
|
+
if (typeof EE !== "function") {
|
|
609
|
+
EE = EE.EventEmitter;
|
|
610
|
+
}
|
|
611
|
+
if (process5.__signal_exit_emitter__) {
|
|
612
|
+
emitter = process5.__signal_exit_emitter__;
|
|
613
|
+
} else {
|
|
614
|
+
emitter = process5.__signal_exit_emitter__ = new EE();
|
|
615
|
+
emitter.count = 0;
|
|
616
|
+
emitter.emitted = {};
|
|
617
|
+
}
|
|
618
|
+
if (!emitter.infinite) {
|
|
619
|
+
emitter.setMaxListeners(Infinity);
|
|
620
|
+
emitter.infinite = true;
|
|
621
|
+
}
|
|
622
|
+
module2.exports = function(cb, opts) {
|
|
623
|
+
if (!processOk(global.process)) {
|
|
624
|
+
return function() {
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
628
|
+
if (loaded === false) {
|
|
629
|
+
load();
|
|
630
|
+
}
|
|
631
|
+
var ev = "exit";
|
|
632
|
+
if (opts && opts.alwaysLast) {
|
|
633
|
+
ev = "afterexit";
|
|
634
|
+
}
|
|
635
|
+
var remove = function() {
|
|
636
|
+
emitter.removeListener(ev, cb);
|
|
637
|
+
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
|
|
638
|
+
unload();
|
|
639
|
+
}
|
|
640
|
+
};
|
|
641
|
+
emitter.on(ev, cb);
|
|
642
|
+
return remove;
|
|
643
|
+
};
|
|
644
|
+
unload = function unload2() {
|
|
645
|
+
if (!loaded || !processOk(global.process)) {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
648
|
+
loaded = false;
|
|
649
|
+
signals.forEach(function(sig) {
|
|
650
|
+
try {
|
|
651
|
+
process5.removeListener(sig, sigListeners[sig]);
|
|
652
|
+
} catch (er) {
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
process5.emit = originalProcessEmit;
|
|
656
|
+
process5.reallyExit = originalProcessReallyExit;
|
|
657
|
+
emitter.count -= 1;
|
|
658
|
+
};
|
|
659
|
+
module2.exports.unload = unload;
|
|
660
|
+
emit = function emit2(event, code, signal) {
|
|
661
|
+
if (emitter.emitted[event]) {
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
664
|
+
emitter.emitted[event] = true;
|
|
665
|
+
emitter.emit(event, code, signal);
|
|
666
|
+
};
|
|
667
|
+
sigListeners = {};
|
|
668
|
+
signals.forEach(function(sig) {
|
|
669
|
+
sigListeners[sig] = function listener() {
|
|
670
|
+
if (!processOk(global.process)) {
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
var listeners = process5.listeners(sig);
|
|
674
|
+
if (listeners.length === emitter.count) {
|
|
675
|
+
unload();
|
|
676
|
+
emit("exit", null, sig);
|
|
677
|
+
emit("afterexit", null, sig);
|
|
678
|
+
if (isWin && sig === "SIGHUP") {
|
|
679
|
+
sig = "SIGINT";
|
|
680
|
+
}
|
|
681
|
+
process5.kill(process5.pid, sig);
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
});
|
|
685
|
+
module2.exports.signals = function() {
|
|
686
|
+
return signals;
|
|
687
|
+
};
|
|
688
|
+
loaded = false;
|
|
689
|
+
load = function load2() {
|
|
690
|
+
if (loaded || !processOk(global.process)) {
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
loaded = true;
|
|
694
|
+
emitter.count += 1;
|
|
695
|
+
signals = signals.filter(function(sig) {
|
|
696
|
+
try {
|
|
697
|
+
process5.on(sig, sigListeners[sig]);
|
|
698
|
+
return true;
|
|
699
|
+
} catch (er) {
|
|
700
|
+
return false;
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
process5.emit = processEmit;
|
|
704
|
+
process5.reallyExit = processReallyExit;
|
|
705
|
+
};
|
|
706
|
+
module2.exports.load = load;
|
|
707
|
+
originalProcessReallyExit = process5.reallyExit;
|
|
708
|
+
processReallyExit = function processReallyExit2(code) {
|
|
709
|
+
if (!processOk(global.process)) {
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
process5.exitCode = code || /* istanbul ignore next */
|
|
713
|
+
0;
|
|
714
|
+
emit("exit", process5.exitCode, null);
|
|
715
|
+
emit("afterexit", process5.exitCode, null);
|
|
716
|
+
originalProcessReallyExit.call(process5, process5.exitCode);
|
|
717
|
+
};
|
|
718
|
+
originalProcessEmit = process5.emit;
|
|
719
|
+
processEmit = function processEmit2(ev, arg) {
|
|
720
|
+
if (ev === "exit" && processOk(global.process)) {
|
|
721
|
+
if (arg !== void 0) {
|
|
722
|
+
process5.exitCode = arg;
|
|
723
|
+
}
|
|
724
|
+
var ret = originalProcessEmit.apply(this, arguments);
|
|
725
|
+
emit("exit", process5.exitCode, null);
|
|
726
|
+
emit("afterexit", process5.exitCode, null);
|
|
727
|
+
return ret;
|
|
728
|
+
} else {
|
|
729
|
+
return originalProcessEmit.apply(this, arguments);
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
var assert;
|
|
734
|
+
var signals;
|
|
735
|
+
var isWin;
|
|
736
|
+
var EE;
|
|
737
|
+
var emitter;
|
|
738
|
+
var unload;
|
|
739
|
+
var emit;
|
|
740
|
+
var sigListeners;
|
|
741
|
+
var loaded;
|
|
742
|
+
var load;
|
|
743
|
+
var originalProcessReallyExit;
|
|
744
|
+
var processReallyExit;
|
|
745
|
+
var originalProcessEmit;
|
|
746
|
+
var processEmit;
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
|
|
750
|
+
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js
|
|
751
|
+
var require_buffer_stream = __commonJS({
|
|
752
|
+
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports, module2) {
|
|
753
|
+
"use strict";
|
|
754
|
+
init_cjs_shims();
|
|
755
|
+
var { PassThrough: PassThroughStream } = require("stream");
|
|
756
|
+
module2.exports = (options) => {
|
|
757
|
+
options = { ...options };
|
|
758
|
+
const { array } = options;
|
|
759
|
+
let { encoding } = options;
|
|
760
|
+
const isBuffer = encoding === "buffer";
|
|
761
|
+
let objectMode = false;
|
|
762
|
+
if (array) {
|
|
763
|
+
objectMode = !(encoding || isBuffer);
|
|
764
|
+
} else {
|
|
765
|
+
encoding = encoding || "utf8";
|
|
766
|
+
}
|
|
767
|
+
if (isBuffer) {
|
|
768
|
+
encoding = null;
|
|
769
|
+
}
|
|
770
|
+
const stream = new PassThroughStream({ objectMode });
|
|
771
|
+
if (encoding) {
|
|
772
|
+
stream.setEncoding(encoding);
|
|
773
|
+
}
|
|
774
|
+
let length = 0;
|
|
775
|
+
const chunks = [];
|
|
776
|
+
stream.on("data", (chunk) => {
|
|
777
|
+
chunks.push(chunk);
|
|
778
|
+
if (objectMode) {
|
|
779
|
+
length = chunks.length;
|
|
780
|
+
} else {
|
|
781
|
+
length += chunk.length;
|
|
782
|
+
}
|
|
783
|
+
});
|
|
784
|
+
stream.getBufferedValue = () => {
|
|
785
|
+
if (array) {
|
|
786
|
+
return chunks;
|
|
787
|
+
}
|
|
788
|
+
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
789
|
+
};
|
|
790
|
+
stream.getBufferedLength = () => length;
|
|
791
|
+
return stream;
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
// ../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js
|
|
797
|
+
var require_get_stream = __commonJS({
|
|
798
|
+
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module2) {
|
|
799
|
+
"use strict";
|
|
800
|
+
init_cjs_shims();
|
|
801
|
+
var { constants: BufferConstants } = require("buffer");
|
|
802
|
+
var stream = require("stream");
|
|
803
|
+
var { promisify } = require("util");
|
|
804
|
+
var bufferStream = require_buffer_stream();
|
|
805
|
+
var streamPipelinePromisified = promisify(stream.pipeline);
|
|
806
|
+
var MaxBufferError = class extends Error {
|
|
807
|
+
constructor() {
|
|
808
|
+
super("maxBuffer exceeded");
|
|
809
|
+
this.name = "MaxBufferError";
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
async function getStream2(inputStream, options) {
|
|
813
|
+
if (!inputStream) {
|
|
814
|
+
throw new Error("Expected a stream");
|
|
815
|
+
}
|
|
816
|
+
options = {
|
|
817
|
+
maxBuffer: Infinity,
|
|
818
|
+
...options
|
|
819
|
+
};
|
|
820
|
+
const { maxBuffer } = options;
|
|
821
|
+
const stream2 = bufferStream(options);
|
|
822
|
+
await new Promise((resolve, reject) => {
|
|
823
|
+
const rejectPromise = (error) => {
|
|
824
|
+
if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
825
|
+
error.bufferedData = stream2.getBufferedValue();
|
|
826
|
+
}
|
|
827
|
+
reject(error);
|
|
828
|
+
};
|
|
829
|
+
(async () => {
|
|
830
|
+
try {
|
|
831
|
+
await streamPipelinePromisified(inputStream, stream2);
|
|
832
|
+
resolve();
|
|
833
|
+
} catch (error) {
|
|
834
|
+
rejectPromise(error);
|
|
835
|
+
}
|
|
836
|
+
})();
|
|
837
|
+
stream2.on("data", () => {
|
|
838
|
+
if (stream2.getBufferedLength() > maxBuffer) {
|
|
839
|
+
rejectPromise(new MaxBufferError());
|
|
840
|
+
}
|
|
841
|
+
});
|
|
842
|
+
});
|
|
843
|
+
return stream2.getBufferedValue();
|
|
844
|
+
}
|
|
845
|
+
module2.exports = getStream2;
|
|
846
|
+
module2.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" });
|
|
847
|
+
module2.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: true });
|
|
848
|
+
module2.exports.MaxBufferError = MaxBufferError;
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
|
|
853
|
+
var require_merge_stream = __commonJS({
|
|
854
|
+
"../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module2) {
|
|
855
|
+
"use strict";
|
|
856
|
+
init_cjs_shims();
|
|
857
|
+
var { PassThrough } = require("stream");
|
|
858
|
+
module2.exports = function() {
|
|
859
|
+
var sources = [];
|
|
860
|
+
var output = new PassThrough({ objectMode: true });
|
|
861
|
+
output.setMaxListeners(0);
|
|
862
|
+
output.add = add;
|
|
863
|
+
output.isEmpty = isEmpty;
|
|
864
|
+
output.on("unpipe", remove);
|
|
865
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
866
|
+
return output;
|
|
867
|
+
function add(source) {
|
|
868
|
+
if (Array.isArray(source)) {
|
|
869
|
+
source.forEach(add);
|
|
870
|
+
return this;
|
|
871
|
+
}
|
|
872
|
+
sources.push(source);
|
|
873
|
+
source.once("end", remove.bind(null, source));
|
|
874
|
+
source.once("error", output.emit.bind(output, "error"));
|
|
875
|
+
source.pipe(output, { end: false });
|
|
876
|
+
return this;
|
|
877
|
+
}
|
|
878
|
+
function isEmpty() {
|
|
879
|
+
return sources.length == 0;
|
|
880
|
+
}
|
|
881
|
+
function remove(source) {
|
|
882
|
+
sources = sources.filter(function(it) {
|
|
883
|
+
return it !== source;
|
|
884
|
+
});
|
|
885
|
+
if (!sources.length && output.readable) {
|
|
886
|
+
output.end();
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
// scripts/studio.ts
|
|
894
|
+
var studio_exports = {};
|
|
895
|
+
__export(studio_exports, {
|
|
896
|
+
buildStudio: () => buildStudio,
|
|
897
|
+
previewStudio: () => previewStudio,
|
|
898
|
+
printUrls: () => printUrls,
|
|
899
|
+
serveStudio: () => serveStudio
|
|
900
|
+
});
|
|
901
|
+
module.exports = __toCommonJS(studio_exports);
|
|
902
|
+
init_cjs_shims();
|
|
903
|
+
var import_logger = require("@pandacss/logger");
|
|
904
|
+
|
|
905
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/index.js
|
|
906
|
+
init_cjs_shims();
|
|
907
|
+
var import_node_buffer2 = require("buffer");
|
|
908
|
+
var import_node_path2 = __toESM(require("path"), 1);
|
|
909
|
+
var import_node_child_process3 = __toESM(require("child_process"), 1);
|
|
910
|
+
var import_node_process3 = __toESM(require("process"), 1);
|
|
911
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
912
|
+
|
|
913
|
+
// ../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
|
|
914
|
+
init_cjs_shims();
|
|
915
|
+
function stripFinalNewline(input) {
|
|
916
|
+
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
917
|
+
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
918
|
+
if (input[input.length - 1] === LF) {
|
|
919
|
+
input = input.slice(0, -1);
|
|
920
|
+
}
|
|
921
|
+
if (input[input.length - 1] === CR) {
|
|
922
|
+
input = input.slice(0, -1);
|
|
923
|
+
}
|
|
924
|
+
return input;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// ../../node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js
|
|
928
|
+
init_cjs_shims();
|
|
929
|
+
var import_node_process = __toESM(require("process"), 1);
|
|
930
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
931
|
+
var import_node_url = __toESM(require("url"), 1);
|
|
932
|
+
|
|
933
|
+
// ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
934
|
+
init_cjs_shims();
|
|
935
|
+
function pathKey(options = {}) {
|
|
936
|
+
const {
|
|
937
|
+
env = process.env,
|
|
938
|
+
platform = process.platform
|
|
939
|
+
} = options;
|
|
940
|
+
if (platform !== "win32") {
|
|
941
|
+
return "PATH";
|
|
942
|
+
}
|
|
943
|
+
return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
// ../../node_modules/.pnpm/npm-run-path@5.1.0/node_modules/npm-run-path/index.js
|
|
947
|
+
function npmRunPath(options = {}) {
|
|
948
|
+
const {
|
|
949
|
+
cwd = import_node_process.default.cwd(),
|
|
950
|
+
path: path_ = import_node_process.default.env[pathKey()],
|
|
951
|
+
execPath = import_node_process.default.execPath
|
|
952
|
+
} = options;
|
|
953
|
+
let previous;
|
|
954
|
+
const cwdString = cwd instanceof URL ? import_node_url.default.fileURLToPath(cwd) : cwd;
|
|
955
|
+
let cwdPath = import_node_path.default.resolve(cwdString);
|
|
956
|
+
const result = [];
|
|
957
|
+
while (previous !== cwdPath) {
|
|
958
|
+
result.push(import_node_path.default.join(cwdPath, "node_modules/.bin"));
|
|
959
|
+
previous = cwdPath;
|
|
960
|
+
cwdPath = import_node_path.default.resolve(cwdPath, "..");
|
|
961
|
+
}
|
|
962
|
+
result.push(import_node_path.default.resolve(cwdString, execPath, ".."));
|
|
963
|
+
return [...result, path_].join(import_node_path.default.delimiter);
|
|
964
|
+
}
|
|
965
|
+
function npmRunPathEnv({ env = import_node_process.default.env, ...options } = {}) {
|
|
966
|
+
env = { ...env };
|
|
967
|
+
const path3 = pathKey({ env });
|
|
968
|
+
options.path = env[path3];
|
|
969
|
+
env[path3] = npmRunPath(options);
|
|
970
|
+
return env;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// ../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js
|
|
974
|
+
init_cjs_shims();
|
|
975
|
+
|
|
976
|
+
// ../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js
|
|
977
|
+
init_cjs_shims();
|
|
978
|
+
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
979
|
+
if (property === "length" || property === "prototype") {
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
if (property === "arguments" || property === "caller") {
|
|
983
|
+
return;
|
|
984
|
+
}
|
|
985
|
+
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
986
|
+
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
987
|
+
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
990
|
+
Object.defineProperty(to, property, fromDescriptor);
|
|
991
|
+
};
|
|
992
|
+
var canCopyProperty = function(toDescriptor, fromDescriptor) {
|
|
993
|
+
return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
|
|
994
|
+
};
|
|
995
|
+
var changePrototype = (to, from) => {
|
|
996
|
+
const fromPrototype = Object.getPrototypeOf(from);
|
|
997
|
+
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
Object.setPrototypeOf(to, fromPrototype);
|
|
1001
|
+
};
|
|
1002
|
+
var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
|
|
1003
|
+
${fromBody}`;
|
|
1004
|
+
var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
|
|
1005
|
+
var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
|
|
1006
|
+
var changeToString = (to, from, name) => {
|
|
1007
|
+
const withName = name === "" ? "" : `with ${name.trim()}() `;
|
|
1008
|
+
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
1009
|
+
Object.defineProperty(newToString, "name", toStringName);
|
|
1010
|
+
Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString });
|
|
1011
|
+
};
|
|
1012
|
+
function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
1013
|
+
const { name } = to;
|
|
1014
|
+
for (const property of Reflect.ownKeys(from)) {
|
|
1015
|
+
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
1016
|
+
}
|
|
1017
|
+
changePrototype(to, from);
|
|
1018
|
+
changeToString(to, from, name);
|
|
1019
|
+
return to;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// ../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js
|
|
1023
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
1024
|
+
var onetime = (function_, options = {}) => {
|
|
1025
|
+
if (typeof function_ !== "function") {
|
|
1026
|
+
throw new TypeError("Expected a function");
|
|
1027
|
+
}
|
|
1028
|
+
let returnValue;
|
|
1029
|
+
let callCount = 0;
|
|
1030
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
1031
|
+
const onetime2 = function(...arguments_) {
|
|
1032
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
1033
|
+
if (callCount === 1) {
|
|
1034
|
+
returnValue = function_.apply(this, arguments_);
|
|
1035
|
+
function_ = null;
|
|
1036
|
+
} else if (options.throw === true) {
|
|
1037
|
+
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
1038
|
+
}
|
|
1039
|
+
return returnValue;
|
|
1040
|
+
};
|
|
1041
|
+
mimicFunction(onetime2, function_);
|
|
1042
|
+
calledFunctions.set(onetime2, callCount);
|
|
1043
|
+
return onetime2;
|
|
1044
|
+
};
|
|
1045
|
+
onetime.callCount = (function_) => {
|
|
1046
|
+
if (!calledFunctions.has(function_)) {
|
|
1047
|
+
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
1048
|
+
}
|
|
1049
|
+
return calledFunctions.get(function_);
|
|
1050
|
+
};
|
|
1051
|
+
var onetime_default = onetime;
|
|
1052
|
+
|
|
1053
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/error.js
|
|
1054
|
+
init_cjs_shims();
|
|
1055
|
+
|
|
1056
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
|
|
1057
|
+
init_cjs_shims();
|
|
1058
|
+
var import_node_os2 = require("os");
|
|
1059
|
+
|
|
1060
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js
|
|
1061
|
+
init_cjs_shims();
|
|
1062
|
+
var getRealtimeSignals = () => {
|
|
1063
|
+
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
1064
|
+
return Array.from({ length }, getRealtimeSignal);
|
|
1065
|
+
};
|
|
1066
|
+
var getRealtimeSignal = (value, index) => ({
|
|
1067
|
+
name: `SIGRT${index + 1}`,
|
|
1068
|
+
number: SIGRTMIN + index,
|
|
1069
|
+
action: "terminate",
|
|
1070
|
+
description: "Application-specific signal (realtime)",
|
|
1071
|
+
standard: "posix"
|
|
1072
|
+
});
|
|
1073
|
+
var SIGRTMIN = 34;
|
|
1074
|
+
var SIGRTMAX = 64;
|
|
1075
|
+
|
|
1076
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js
|
|
1077
|
+
init_cjs_shims();
|
|
1078
|
+
var import_node_os = require("os");
|
|
1079
|
+
|
|
1080
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js
|
|
1081
|
+
init_cjs_shims();
|
|
1082
|
+
var SIGNALS = [
|
|
1083
|
+
{
|
|
1084
|
+
name: "SIGHUP",
|
|
1085
|
+
number: 1,
|
|
1086
|
+
action: "terminate",
|
|
1087
|
+
description: "Terminal closed",
|
|
1088
|
+
standard: "posix"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: "SIGINT",
|
|
1092
|
+
number: 2,
|
|
1093
|
+
action: "terminate",
|
|
1094
|
+
description: "User interruption with CTRL-C",
|
|
1095
|
+
standard: "ansi"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
name: "SIGQUIT",
|
|
1099
|
+
number: 3,
|
|
1100
|
+
action: "core",
|
|
1101
|
+
description: "User interruption with CTRL-\\",
|
|
1102
|
+
standard: "posix"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
name: "SIGILL",
|
|
1106
|
+
number: 4,
|
|
1107
|
+
action: "core",
|
|
1108
|
+
description: "Invalid machine instruction",
|
|
1109
|
+
standard: "ansi"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
name: "SIGTRAP",
|
|
1113
|
+
number: 5,
|
|
1114
|
+
action: "core",
|
|
1115
|
+
description: "Debugger breakpoint",
|
|
1116
|
+
standard: "posix"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
name: "SIGABRT",
|
|
1120
|
+
number: 6,
|
|
1121
|
+
action: "core",
|
|
1122
|
+
description: "Aborted",
|
|
1123
|
+
standard: "ansi"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
name: "SIGIOT",
|
|
1127
|
+
number: 6,
|
|
1128
|
+
action: "core",
|
|
1129
|
+
description: "Aborted",
|
|
1130
|
+
standard: "bsd"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
name: "SIGBUS",
|
|
1134
|
+
number: 7,
|
|
1135
|
+
action: "core",
|
|
1136
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
1137
|
+
standard: "bsd"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
name: "SIGEMT",
|
|
1141
|
+
number: 7,
|
|
1142
|
+
action: "terminate",
|
|
1143
|
+
description: "Command should be emulated but is not implemented",
|
|
1144
|
+
standard: "other"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
name: "SIGFPE",
|
|
1148
|
+
number: 8,
|
|
1149
|
+
action: "core",
|
|
1150
|
+
description: "Floating point arithmetic error",
|
|
1151
|
+
standard: "ansi"
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
name: "SIGKILL",
|
|
1155
|
+
number: 9,
|
|
1156
|
+
action: "terminate",
|
|
1157
|
+
description: "Forced termination",
|
|
1158
|
+
standard: "posix",
|
|
1159
|
+
forced: true
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
name: "SIGUSR1",
|
|
1163
|
+
number: 10,
|
|
1164
|
+
action: "terminate",
|
|
1165
|
+
description: "Application-specific signal",
|
|
1166
|
+
standard: "posix"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
name: "SIGSEGV",
|
|
1170
|
+
number: 11,
|
|
1171
|
+
action: "core",
|
|
1172
|
+
description: "Segmentation fault",
|
|
1173
|
+
standard: "ansi"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: "SIGUSR2",
|
|
1177
|
+
number: 12,
|
|
1178
|
+
action: "terminate",
|
|
1179
|
+
description: "Application-specific signal",
|
|
1180
|
+
standard: "posix"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
name: "SIGPIPE",
|
|
1184
|
+
number: 13,
|
|
1185
|
+
action: "terminate",
|
|
1186
|
+
description: "Broken pipe or socket",
|
|
1187
|
+
standard: "posix"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
name: "SIGALRM",
|
|
1191
|
+
number: 14,
|
|
1192
|
+
action: "terminate",
|
|
1193
|
+
description: "Timeout or timer",
|
|
1194
|
+
standard: "posix"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
name: "SIGTERM",
|
|
1198
|
+
number: 15,
|
|
1199
|
+
action: "terminate",
|
|
1200
|
+
description: "Termination",
|
|
1201
|
+
standard: "ansi"
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
name: "SIGSTKFLT",
|
|
1205
|
+
number: 16,
|
|
1206
|
+
action: "terminate",
|
|
1207
|
+
description: "Stack is empty or overflowed",
|
|
1208
|
+
standard: "other"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
name: "SIGCHLD",
|
|
1212
|
+
number: 17,
|
|
1213
|
+
action: "ignore",
|
|
1214
|
+
description: "Child process terminated, paused or unpaused",
|
|
1215
|
+
standard: "posix"
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
name: "SIGCLD",
|
|
1219
|
+
number: 17,
|
|
1220
|
+
action: "ignore",
|
|
1221
|
+
description: "Child process terminated, paused or unpaused",
|
|
1222
|
+
standard: "other"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
name: "SIGCONT",
|
|
1226
|
+
number: 18,
|
|
1227
|
+
action: "unpause",
|
|
1228
|
+
description: "Unpaused",
|
|
1229
|
+
standard: "posix",
|
|
1230
|
+
forced: true
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: "SIGSTOP",
|
|
1234
|
+
number: 19,
|
|
1235
|
+
action: "pause",
|
|
1236
|
+
description: "Paused",
|
|
1237
|
+
standard: "posix",
|
|
1238
|
+
forced: true
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
name: "SIGTSTP",
|
|
1242
|
+
number: 20,
|
|
1243
|
+
action: "pause",
|
|
1244
|
+
description: 'Paused using CTRL-Z or "suspend"',
|
|
1245
|
+
standard: "posix"
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
name: "SIGTTIN",
|
|
1249
|
+
number: 21,
|
|
1250
|
+
action: "pause",
|
|
1251
|
+
description: "Background process cannot read terminal input",
|
|
1252
|
+
standard: "posix"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
name: "SIGBREAK",
|
|
1256
|
+
number: 21,
|
|
1257
|
+
action: "terminate",
|
|
1258
|
+
description: "User interruption with CTRL-BREAK",
|
|
1259
|
+
standard: "other"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
name: "SIGTTOU",
|
|
1263
|
+
number: 22,
|
|
1264
|
+
action: "pause",
|
|
1265
|
+
description: "Background process cannot write to terminal output",
|
|
1266
|
+
standard: "posix"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
name: "SIGURG",
|
|
1270
|
+
number: 23,
|
|
1271
|
+
action: "ignore",
|
|
1272
|
+
description: "Socket received out-of-band data",
|
|
1273
|
+
standard: "bsd"
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
name: "SIGXCPU",
|
|
1277
|
+
number: 24,
|
|
1278
|
+
action: "core",
|
|
1279
|
+
description: "Process timed out",
|
|
1280
|
+
standard: "bsd"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
name: "SIGXFSZ",
|
|
1284
|
+
number: 25,
|
|
1285
|
+
action: "core",
|
|
1286
|
+
description: "File too big",
|
|
1287
|
+
standard: "bsd"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
name: "SIGVTALRM",
|
|
1291
|
+
number: 26,
|
|
1292
|
+
action: "terminate",
|
|
1293
|
+
description: "Timeout or timer",
|
|
1294
|
+
standard: "bsd"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
name: "SIGPROF",
|
|
1298
|
+
number: 27,
|
|
1299
|
+
action: "terminate",
|
|
1300
|
+
description: "Timeout or timer",
|
|
1301
|
+
standard: "bsd"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
name: "SIGWINCH",
|
|
1305
|
+
number: 28,
|
|
1306
|
+
action: "ignore",
|
|
1307
|
+
description: "Terminal window size changed",
|
|
1308
|
+
standard: "bsd"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: "SIGIO",
|
|
1312
|
+
number: 29,
|
|
1313
|
+
action: "terminate",
|
|
1314
|
+
description: "I/O is available",
|
|
1315
|
+
standard: "other"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
name: "SIGPOLL",
|
|
1319
|
+
number: 29,
|
|
1320
|
+
action: "terminate",
|
|
1321
|
+
description: "Watched event",
|
|
1322
|
+
standard: "other"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
name: "SIGINFO",
|
|
1326
|
+
number: 29,
|
|
1327
|
+
action: "ignore",
|
|
1328
|
+
description: "Request for process information",
|
|
1329
|
+
standard: "other"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
name: "SIGPWR",
|
|
1333
|
+
number: 30,
|
|
1334
|
+
action: "terminate",
|
|
1335
|
+
description: "Device running out of power",
|
|
1336
|
+
standard: "systemv"
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
name: "SIGSYS",
|
|
1340
|
+
number: 31,
|
|
1341
|
+
action: "core",
|
|
1342
|
+
description: "Invalid system call",
|
|
1343
|
+
standard: "other"
|
|
1344
|
+
},
|
|
1345
|
+
{
|
|
1346
|
+
name: "SIGUNUSED",
|
|
1347
|
+
number: 31,
|
|
1348
|
+
action: "terminate",
|
|
1349
|
+
description: "Invalid system call",
|
|
1350
|
+
standard: "other"
|
|
1351
|
+
}
|
|
1352
|
+
];
|
|
1353
|
+
|
|
1354
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js
|
|
1355
|
+
var getSignals = () => {
|
|
1356
|
+
const realtimeSignals = getRealtimeSignals();
|
|
1357
|
+
const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
1358
|
+
return signals;
|
|
1359
|
+
};
|
|
1360
|
+
var normalizeSignal = ({
|
|
1361
|
+
name,
|
|
1362
|
+
number: defaultNumber,
|
|
1363
|
+
description,
|
|
1364
|
+
action,
|
|
1365
|
+
forced = false,
|
|
1366
|
+
standard
|
|
1367
|
+
}) => {
|
|
1368
|
+
const {
|
|
1369
|
+
signals: { [name]: constantSignal }
|
|
1370
|
+
} = import_node_os.constants;
|
|
1371
|
+
const supported = constantSignal !== void 0;
|
|
1372
|
+
const number = supported ? constantSignal : defaultNumber;
|
|
1373
|
+
return { name, number, description, supported, action, forced, standard };
|
|
1374
|
+
};
|
|
1375
|
+
|
|
1376
|
+
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
|
|
1377
|
+
var getSignalsByName = () => {
|
|
1378
|
+
const signals = getSignals();
|
|
1379
|
+
return Object.fromEntries(signals.map(getSignalByName));
|
|
1380
|
+
};
|
|
1381
|
+
var getSignalByName = ({
|
|
1382
|
+
name,
|
|
1383
|
+
number,
|
|
1384
|
+
description,
|
|
1385
|
+
supported,
|
|
1386
|
+
action,
|
|
1387
|
+
forced,
|
|
1388
|
+
standard
|
|
1389
|
+
}) => [name, { name, number, description, supported, action, forced, standard }];
|
|
1390
|
+
var signalsByName = getSignalsByName();
|
|
1391
|
+
var getSignalsByNumber = () => {
|
|
1392
|
+
const signals = getSignals();
|
|
1393
|
+
const length = SIGRTMAX + 1;
|
|
1394
|
+
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
|
|
1395
|
+
return Object.assign({}, ...signalsA);
|
|
1396
|
+
};
|
|
1397
|
+
var getSignalByNumber = (number, signals) => {
|
|
1398
|
+
const signal = findSignalByNumber(number, signals);
|
|
1399
|
+
if (signal === void 0) {
|
|
1400
|
+
return {};
|
|
1401
|
+
}
|
|
1402
|
+
const { name, description, supported, action, forced, standard } = signal;
|
|
1403
|
+
return {
|
|
1404
|
+
[number]: {
|
|
1405
|
+
name,
|
|
1406
|
+
number,
|
|
1407
|
+
description,
|
|
1408
|
+
supported,
|
|
1409
|
+
action,
|
|
1410
|
+
forced,
|
|
1411
|
+
standard
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
};
|
|
1415
|
+
var findSignalByNumber = (number, signals) => {
|
|
1416
|
+
const signal = signals.find(({ name }) => import_node_os2.constants.signals[name] === number);
|
|
1417
|
+
if (signal !== void 0) {
|
|
1418
|
+
return signal;
|
|
1419
|
+
}
|
|
1420
|
+
return signals.find((signalA) => signalA.number === number);
|
|
1421
|
+
};
|
|
1422
|
+
var signalsByNumber = getSignalsByNumber();
|
|
1423
|
+
|
|
1424
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/error.js
|
|
1425
|
+
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
1426
|
+
if (timedOut) {
|
|
1427
|
+
return `timed out after ${timeout} milliseconds`;
|
|
1428
|
+
}
|
|
1429
|
+
if (isCanceled) {
|
|
1430
|
+
return "was canceled";
|
|
1431
|
+
}
|
|
1432
|
+
if (errorCode !== void 0) {
|
|
1433
|
+
return `failed with ${errorCode}`;
|
|
1434
|
+
}
|
|
1435
|
+
if (signal !== void 0) {
|
|
1436
|
+
return `was killed with ${signal} (${signalDescription})`;
|
|
1437
|
+
}
|
|
1438
|
+
if (exitCode !== void 0) {
|
|
1439
|
+
return `failed with exit code ${exitCode}`;
|
|
1440
|
+
}
|
|
1441
|
+
return "failed";
|
|
1442
|
+
};
|
|
1443
|
+
var makeError = ({
|
|
1444
|
+
stdout,
|
|
1445
|
+
stderr,
|
|
1446
|
+
all,
|
|
1447
|
+
error,
|
|
1448
|
+
signal,
|
|
1449
|
+
exitCode,
|
|
1450
|
+
command,
|
|
1451
|
+
escapedCommand,
|
|
1452
|
+
timedOut,
|
|
1453
|
+
isCanceled,
|
|
1454
|
+
killed,
|
|
1455
|
+
parsed: { options: { timeout } }
|
|
1456
|
+
}) => {
|
|
1457
|
+
exitCode = exitCode === null ? void 0 : exitCode;
|
|
1458
|
+
signal = signal === null ? void 0 : signal;
|
|
1459
|
+
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
1460
|
+
const errorCode = error && error.code;
|
|
1461
|
+
const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
|
|
1462
|
+
const execaMessage = `Command ${prefix}: ${command}`;
|
|
1463
|
+
const isError = Object.prototype.toString.call(error) === "[object Error]";
|
|
1464
|
+
const shortMessage = isError ? `${execaMessage}
|
|
1465
|
+
${error.message}` : execaMessage;
|
|
1466
|
+
const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
|
|
1467
|
+
if (isError) {
|
|
1468
|
+
error.originalMessage = error.message;
|
|
1469
|
+
error.message = message;
|
|
1470
|
+
} else {
|
|
1471
|
+
error = new Error(message);
|
|
1472
|
+
}
|
|
1473
|
+
error.shortMessage = shortMessage;
|
|
1474
|
+
error.command = command;
|
|
1475
|
+
error.escapedCommand = escapedCommand;
|
|
1476
|
+
error.exitCode = exitCode;
|
|
1477
|
+
error.signal = signal;
|
|
1478
|
+
error.signalDescription = signalDescription;
|
|
1479
|
+
error.stdout = stdout;
|
|
1480
|
+
error.stderr = stderr;
|
|
1481
|
+
if (all !== void 0) {
|
|
1482
|
+
error.all = all;
|
|
1483
|
+
}
|
|
1484
|
+
if ("bufferedData" in error) {
|
|
1485
|
+
delete error.bufferedData;
|
|
1486
|
+
}
|
|
1487
|
+
error.failed = true;
|
|
1488
|
+
error.timedOut = Boolean(timedOut);
|
|
1489
|
+
error.isCanceled = isCanceled;
|
|
1490
|
+
error.killed = killed && !timedOut;
|
|
1491
|
+
return error;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/stdio.js
|
|
1495
|
+
init_cjs_shims();
|
|
1496
|
+
var aliases = ["stdin", "stdout", "stderr"];
|
|
1497
|
+
var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
|
|
1498
|
+
var normalizeStdio = (options) => {
|
|
1499
|
+
if (!options) {
|
|
1500
|
+
return;
|
|
1501
|
+
}
|
|
1502
|
+
const { stdio } = options;
|
|
1503
|
+
if (stdio === void 0) {
|
|
1504
|
+
return aliases.map((alias) => options[alias]);
|
|
1505
|
+
}
|
|
1506
|
+
if (hasAlias(options)) {
|
|
1507
|
+
throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
1508
|
+
}
|
|
1509
|
+
if (typeof stdio === "string") {
|
|
1510
|
+
return stdio;
|
|
1511
|
+
}
|
|
1512
|
+
if (!Array.isArray(stdio)) {
|
|
1513
|
+
throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
1514
|
+
}
|
|
1515
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
1516
|
+
return Array.from({ length }, (value, index) => stdio[index]);
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/kill.js
|
|
1520
|
+
init_cjs_shims();
|
|
1521
|
+
var import_node_os3 = __toESM(require("os"), 1);
|
|
1522
|
+
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
1523
|
+
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
1524
|
+
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
1525
|
+
const killResult = kill(signal);
|
|
1526
|
+
setKillTimeout(kill, signal, options, killResult);
|
|
1527
|
+
return killResult;
|
|
1528
|
+
};
|
|
1529
|
+
var setKillTimeout = (kill, signal, options, killResult) => {
|
|
1530
|
+
if (!shouldForceKill(signal, options, killResult)) {
|
|
1531
|
+
return;
|
|
1532
|
+
}
|
|
1533
|
+
const timeout = getForceKillAfterTimeout(options);
|
|
1534
|
+
const t = setTimeout(() => {
|
|
1535
|
+
kill("SIGKILL");
|
|
1536
|
+
}, timeout);
|
|
1537
|
+
if (t.unref) {
|
|
1538
|
+
t.unref();
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
1542
|
+
var isSigterm = (signal) => signal === import_node_os3.default.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
1543
|
+
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
1544
|
+
if (forceKillAfterTimeout === true) {
|
|
1545
|
+
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
1546
|
+
}
|
|
1547
|
+
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
|
|
1548
|
+
throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
1549
|
+
}
|
|
1550
|
+
return forceKillAfterTimeout;
|
|
1551
|
+
};
|
|
1552
|
+
var spawnedCancel = (spawned, context) => {
|
|
1553
|
+
const killResult = spawned.kill();
|
|
1554
|
+
if (killResult) {
|
|
1555
|
+
context.isCanceled = true;
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
var timeoutKill = (spawned, signal, reject) => {
|
|
1559
|
+
spawned.kill(signal);
|
|
1560
|
+
reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
|
|
1561
|
+
};
|
|
1562
|
+
var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
1563
|
+
if (timeout === 0 || timeout === void 0) {
|
|
1564
|
+
return spawnedPromise;
|
|
1565
|
+
}
|
|
1566
|
+
let timeoutId;
|
|
1567
|
+
const timeoutPromise = new Promise((resolve, reject) => {
|
|
1568
|
+
timeoutId = setTimeout(() => {
|
|
1569
|
+
timeoutKill(spawned, killSignal, reject);
|
|
1570
|
+
}, timeout);
|
|
1571
|
+
});
|
|
1572
|
+
const safeSpawnedPromise = spawnedPromise.finally(() => {
|
|
1573
|
+
clearTimeout(timeoutId);
|
|
1574
|
+
});
|
|
1575
|
+
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
1576
|
+
};
|
|
1577
|
+
var validateTimeout = ({ timeout }) => {
|
|
1578
|
+
if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
|
|
1579
|
+
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
|
|
1583
|
+
if (!cleanup || detached) {
|
|
1584
|
+
return timedPromise;
|
|
1585
|
+
}
|
|
1586
|
+
const removeExitHandler = (0, import_signal_exit.default)(() => {
|
|
1587
|
+
spawned.kill();
|
|
1588
|
+
});
|
|
1589
|
+
return timedPromise.finally(() => {
|
|
1590
|
+
removeExitHandler();
|
|
1591
|
+
});
|
|
1592
|
+
};
|
|
1593
|
+
|
|
1594
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/pipe.js
|
|
1595
|
+
init_cjs_shims();
|
|
1596
|
+
var import_node_fs = require("fs");
|
|
1597
|
+
var import_node_child_process = require("child_process");
|
|
1598
|
+
|
|
1599
|
+
// ../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
|
|
1600
|
+
init_cjs_shims();
|
|
1601
|
+
function isStream(stream) {
|
|
1602
|
+
return stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
1603
|
+
}
|
|
1604
|
+
function isWritableStream(stream) {
|
|
1605
|
+
return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/pipe.js
|
|
1609
|
+
var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function";
|
|
1610
|
+
var pipeToTarget = (spawned, streamName, target) => {
|
|
1611
|
+
if (typeof target === "string") {
|
|
1612
|
+
spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target));
|
|
1613
|
+
return spawned;
|
|
1614
|
+
}
|
|
1615
|
+
if (isWritableStream(target)) {
|
|
1616
|
+
spawned[streamName].pipe(target);
|
|
1617
|
+
return spawned;
|
|
1618
|
+
}
|
|
1619
|
+
if (!isExecaChildProcess(target)) {
|
|
1620
|
+
throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
|
|
1621
|
+
}
|
|
1622
|
+
if (!isWritableStream(target.stdin)) {
|
|
1623
|
+
throw new TypeError("The target child process's stdin must be available.");
|
|
1624
|
+
}
|
|
1625
|
+
spawned[streamName].pipe(target.stdin);
|
|
1626
|
+
return target;
|
|
1627
|
+
};
|
|
1628
|
+
var addPipeMethods = (spawned) => {
|
|
1629
|
+
if (spawned.stdout !== null) {
|
|
1630
|
+
spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout");
|
|
1631
|
+
}
|
|
1632
|
+
if (spawned.stderr !== null) {
|
|
1633
|
+
spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr");
|
|
1634
|
+
}
|
|
1635
|
+
if (spawned.all !== void 0) {
|
|
1636
|
+
spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all");
|
|
1637
|
+
}
|
|
1638
|
+
};
|
|
1639
|
+
|
|
1640
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/stream.js
|
|
1641
|
+
init_cjs_shims();
|
|
1642
|
+
var import_node_fs2 = require("fs");
|
|
1643
|
+
var import_get_stream = __toESM(require_get_stream(), 1);
|
|
1644
|
+
var import_merge_stream = __toESM(require_merge_stream(), 1);
|
|
1645
|
+
var validateInputOptions = (input) => {
|
|
1646
|
+
if (input !== void 0) {
|
|
1647
|
+
throw new TypeError("The `input` and `inputFile` options cannot be both set.");
|
|
1648
|
+
}
|
|
1649
|
+
};
|
|
1650
|
+
var getInputSync = ({ input, inputFile }) => {
|
|
1651
|
+
if (typeof inputFile !== "string") {
|
|
1652
|
+
return input;
|
|
1653
|
+
}
|
|
1654
|
+
validateInputOptions(input);
|
|
1655
|
+
return (0, import_node_fs2.readFileSync)(inputFile);
|
|
1656
|
+
};
|
|
1657
|
+
var handleInputSync = (options) => {
|
|
1658
|
+
const input = getInputSync(options);
|
|
1659
|
+
if (isStream(input)) {
|
|
1660
|
+
throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
1661
|
+
}
|
|
1662
|
+
return input;
|
|
1663
|
+
};
|
|
1664
|
+
var getInput = ({ input, inputFile }) => {
|
|
1665
|
+
if (typeof inputFile !== "string") {
|
|
1666
|
+
return input;
|
|
1667
|
+
}
|
|
1668
|
+
validateInputOptions(input);
|
|
1669
|
+
return (0, import_node_fs2.createReadStream)(inputFile);
|
|
1670
|
+
};
|
|
1671
|
+
var handleInput = (spawned, options) => {
|
|
1672
|
+
const input = getInput(options);
|
|
1673
|
+
if (input === void 0) {
|
|
1674
|
+
return;
|
|
1675
|
+
}
|
|
1676
|
+
if (isStream(input)) {
|
|
1677
|
+
input.pipe(spawned.stdin);
|
|
1678
|
+
} else {
|
|
1679
|
+
spawned.stdin.end(input);
|
|
1680
|
+
}
|
|
1681
|
+
};
|
|
1682
|
+
var makeAllStream = (spawned, { all }) => {
|
|
1683
|
+
if (!all || !spawned.stdout && !spawned.stderr) {
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
const mixed = (0, import_merge_stream.default)();
|
|
1687
|
+
if (spawned.stdout) {
|
|
1688
|
+
mixed.add(spawned.stdout);
|
|
1689
|
+
}
|
|
1690
|
+
if (spawned.stderr) {
|
|
1691
|
+
mixed.add(spawned.stderr);
|
|
1692
|
+
}
|
|
1693
|
+
return mixed;
|
|
1694
|
+
};
|
|
1695
|
+
var getBufferedData = async (stream, streamPromise) => {
|
|
1696
|
+
if (!stream || streamPromise === void 0) {
|
|
1697
|
+
return;
|
|
1698
|
+
}
|
|
1699
|
+
stream.destroy();
|
|
1700
|
+
try {
|
|
1701
|
+
return await streamPromise;
|
|
1702
|
+
} catch (error) {
|
|
1703
|
+
return error.bufferedData;
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
1707
|
+
if (!stream || !buffer) {
|
|
1708
|
+
return;
|
|
1709
|
+
}
|
|
1710
|
+
if (encoding) {
|
|
1711
|
+
return (0, import_get_stream.default)(stream, { encoding, maxBuffer });
|
|
1712
|
+
}
|
|
1713
|
+
return import_get_stream.default.buffer(stream, { maxBuffer });
|
|
1714
|
+
};
|
|
1715
|
+
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
1716
|
+
const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
|
|
1717
|
+
const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
|
|
1718
|
+
const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
|
|
1719
|
+
try {
|
|
1720
|
+
return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
|
|
1721
|
+
} catch (error) {
|
|
1722
|
+
return Promise.all([
|
|
1723
|
+
{ error, signal: error.signal, timedOut: error.timedOut },
|
|
1724
|
+
getBufferedData(stdout, stdoutPromise),
|
|
1725
|
+
getBufferedData(stderr, stderrPromise),
|
|
1726
|
+
getBufferedData(all, allPromise)
|
|
1727
|
+
]);
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/promise.js
|
|
1732
|
+
init_cjs_shims();
|
|
1733
|
+
var nativePromisePrototype = (async () => {
|
|
1734
|
+
})().constructor.prototype;
|
|
1735
|
+
var descriptors = ["then", "catch", "finally"].map((property) => [
|
|
1736
|
+
property,
|
|
1737
|
+
Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
|
|
1738
|
+
]);
|
|
1739
|
+
var mergePromise = (spawned, promise) => {
|
|
1740
|
+
for (const [property, descriptor] of descriptors) {
|
|
1741
|
+
const value = typeof promise === "function" ? (...args) => Reflect.apply(descriptor.value, promise(), args) : descriptor.value.bind(promise);
|
|
1742
|
+
Reflect.defineProperty(spawned, property, { ...descriptor, value });
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => {
|
|
1746
|
+
spawned.on("exit", (exitCode, signal) => {
|
|
1747
|
+
resolve({ exitCode, signal });
|
|
1748
|
+
});
|
|
1749
|
+
spawned.on("error", (error) => {
|
|
1750
|
+
reject(error);
|
|
1751
|
+
});
|
|
1752
|
+
if (spawned.stdin) {
|
|
1753
|
+
spawned.stdin.on("error", (error) => {
|
|
1754
|
+
reject(error);
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
|
|
1759
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/command.js
|
|
1760
|
+
init_cjs_shims();
|
|
1761
|
+
var import_node_buffer = require("buffer");
|
|
1762
|
+
var import_node_child_process2 = require("child_process");
|
|
1763
|
+
var normalizeArgs = (file, args = []) => {
|
|
1764
|
+
if (!Array.isArray(args)) {
|
|
1765
|
+
return [file];
|
|
1766
|
+
}
|
|
1767
|
+
return [file, ...args];
|
|
1768
|
+
};
|
|
1769
|
+
var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
|
|
1770
|
+
var DOUBLE_QUOTES_REGEXP = /"/g;
|
|
1771
|
+
var escapeArg = (arg) => {
|
|
1772
|
+
if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
|
|
1773
|
+
return arg;
|
|
1774
|
+
}
|
|
1775
|
+
return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
|
|
1776
|
+
};
|
|
1777
|
+
var joinCommand = (file, args) => normalizeArgs(file, args).join(" ");
|
|
1778
|
+
var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
|
|
1779
|
+
var SPACES_REGEXP = / +/g;
|
|
1780
|
+
var parseExpression = (expression) => {
|
|
1781
|
+
const typeOfExpression = typeof expression;
|
|
1782
|
+
if (typeOfExpression === "string") {
|
|
1783
|
+
return expression;
|
|
1784
|
+
}
|
|
1785
|
+
if (typeOfExpression === "number") {
|
|
1786
|
+
return String(expression);
|
|
1787
|
+
}
|
|
1788
|
+
if (typeOfExpression === "object" && expression !== null && !(expression instanceof import_node_child_process2.ChildProcess) && "stdout" in expression) {
|
|
1789
|
+
const typeOfStdout = typeof expression.stdout;
|
|
1790
|
+
if (typeOfStdout === "string") {
|
|
1791
|
+
return expression.stdout;
|
|
1792
|
+
}
|
|
1793
|
+
if (import_node_buffer.Buffer.isBuffer(expression.stdout)) {
|
|
1794
|
+
return expression.stdout.toString();
|
|
1795
|
+
}
|
|
1796
|
+
throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`);
|
|
1797
|
+
}
|
|
1798
|
+
throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`);
|
|
1799
|
+
};
|
|
1800
|
+
var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
|
|
1801
|
+
...tokens.slice(0, -1),
|
|
1802
|
+
`${tokens[tokens.length - 1]}${nextTokens[0]}`,
|
|
1803
|
+
...nextTokens.slice(1)
|
|
1804
|
+
];
|
|
1805
|
+
var parseTemplate = ({ templates, expressions, tokens, index, template }) => {
|
|
1806
|
+
const templateString = template ?? templates.raw[index];
|
|
1807
|
+
const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);
|
|
1808
|
+
const newTokens = concatTokens(
|
|
1809
|
+
tokens,
|
|
1810
|
+
templateTokens,
|
|
1811
|
+
templateString.startsWith(" ")
|
|
1812
|
+
);
|
|
1813
|
+
if (index === expressions.length) {
|
|
1814
|
+
return newTokens;
|
|
1815
|
+
}
|
|
1816
|
+
const expression = expressions[index];
|
|
1817
|
+
const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)];
|
|
1818
|
+
return concatTokens(
|
|
1819
|
+
newTokens,
|
|
1820
|
+
expressionTokens,
|
|
1821
|
+
templateString.endsWith(" ")
|
|
1822
|
+
);
|
|
1823
|
+
};
|
|
1824
|
+
var parseTemplates = (templates, expressions) => {
|
|
1825
|
+
let tokens = [];
|
|
1826
|
+
for (const [index, template] of templates.entries()) {
|
|
1827
|
+
tokens = parseTemplate({ templates, expressions, tokens, index, template });
|
|
1828
|
+
}
|
|
1829
|
+
return tokens;
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/lib/verbose.js
|
|
1833
|
+
init_cjs_shims();
|
|
1834
|
+
var import_node_util = require("util");
|
|
1835
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
1836
|
+
var verboseDefault = (0, import_node_util.debuglog)("execa").enabled;
|
|
1837
|
+
var padField = (field, padding) => String(field).padStart(padding, "0");
|
|
1838
|
+
var getTimestamp = () => {
|
|
1839
|
+
const date = /* @__PURE__ */ new Date();
|
|
1840
|
+
return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;
|
|
1841
|
+
};
|
|
1842
|
+
var logCommand = (escapedCommand, { verbose }) => {
|
|
1843
|
+
if (!verbose) {
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
import_node_process2.default.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
|
1847
|
+
`);
|
|
1848
|
+
};
|
|
1849
|
+
|
|
1850
|
+
// ../../node_modules/.pnpm/execa@7.1.1/node_modules/execa/index.js
|
|
1851
|
+
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
1852
|
+
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
1853
|
+
const env = extendEnv ? { ...import_node_process3.default.env, ...envOption } : envOption;
|
|
1854
|
+
if (preferLocal) {
|
|
1855
|
+
return npmRunPathEnv({ env, cwd: localDir, execPath });
|
|
1856
|
+
}
|
|
1857
|
+
return env;
|
|
1858
|
+
};
|
|
1859
|
+
var handleArguments = (file, args, options = {}) => {
|
|
1860
|
+
const parsed = import_cross_spawn.default._parse(file, args, options);
|
|
1861
|
+
file = parsed.command;
|
|
1862
|
+
args = parsed.args;
|
|
1863
|
+
options = parsed.options;
|
|
1864
|
+
options = {
|
|
1865
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
1866
|
+
buffer: true,
|
|
1867
|
+
stripFinalNewline: true,
|
|
1868
|
+
extendEnv: true,
|
|
1869
|
+
preferLocal: false,
|
|
1870
|
+
localDir: options.cwd || import_node_process3.default.cwd(),
|
|
1871
|
+
execPath: import_node_process3.default.execPath,
|
|
1872
|
+
encoding: "utf8",
|
|
1873
|
+
reject: true,
|
|
1874
|
+
cleanup: true,
|
|
1875
|
+
all: false,
|
|
1876
|
+
windowsHide: true,
|
|
1877
|
+
verbose: verboseDefault,
|
|
1878
|
+
...options
|
|
1879
|
+
};
|
|
1880
|
+
options.env = getEnv(options);
|
|
1881
|
+
options.stdio = normalizeStdio(options);
|
|
1882
|
+
if (import_node_process3.default.platform === "win32" && import_node_path2.default.basename(file, ".exe") === "cmd") {
|
|
1883
|
+
args.unshift("/q");
|
|
1884
|
+
}
|
|
1885
|
+
return { file, args, options, parsed };
|
|
1886
|
+
};
|
|
1887
|
+
var handleOutput = (options, value, error) => {
|
|
1888
|
+
if (typeof value !== "string" && !import_node_buffer2.Buffer.isBuffer(value)) {
|
|
1889
|
+
return error === void 0 ? void 0 : "";
|
|
1890
|
+
}
|
|
1891
|
+
if (options.stripFinalNewline) {
|
|
1892
|
+
return stripFinalNewline(value);
|
|
1893
|
+
}
|
|
1894
|
+
return value;
|
|
1895
|
+
};
|
|
1896
|
+
function execa(file, args, options) {
|
|
1897
|
+
const parsed = handleArguments(file, args, options);
|
|
1898
|
+
const command = joinCommand(file, args);
|
|
1899
|
+
const escapedCommand = getEscapedCommand(file, args);
|
|
1900
|
+
logCommand(escapedCommand, parsed.options);
|
|
1901
|
+
validateTimeout(parsed.options);
|
|
1902
|
+
let spawned;
|
|
1903
|
+
try {
|
|
1904
|
+
spawned = import_node_child_process3.default.spawn(parsed.file, parsed.args, parsed.options);
|
|
1905
|
+
} catch (error) {
|
|
1906
|
+
const dummySpawned = new import_node_child_process3.default.ChildProcess();
|
|
1907
|
+
const errorPromise = Promise.reject(makeError({
|
|
1908
|
+
error,
|
|
1909
|
+
stdout: "",
|
|
1910
|
+
stderr: "",
|
|
1911
|
+
all: "",
|
|
1912
|
+
command,
|
|
1913
|
+
escapedCommand,
|
|
1914
|
+
parsed,
|
|
1915
|
+
timedOut: false,
|
|
1916
|
+
isCanceled: false,
|
|
1917
|
+
killed: false
|
|
1918
|
+
}));
|
|
1919
|
+
mergePromise(dummySpawned, errorPromise);
|
|
1920
|
+
return dummySpawned;
|
|
1921
|
+
}
|
|
1922
|
+
const spawnedPromise = getSpawnedPromise(spawned);
|
|
1923
|
+
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
1924
|
+
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
1925
|
+
const context = { isCanceled: false };
|
|
1926
|
+
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
1927
|
+
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
1928
|
+
const handlePromise = async () => {
|
|
1929
|
+
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
1930
|
+
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
1931
|
+
const stderr = handleOutput(parsed.options, stderrResult);
|
|
1932
|
+
const all = handleOutput(parsed.options, allResult);
|
|
1933
|
+
if (error || exitCode !== 0 || signal !== null) {
|
|
1934
|
+
const returnedError = makeError({
|
|
1935
|
+
error,
|
|
1936
|
+
exitCode,
|
|
1937
|
+
signal,
|
|
1938
|
+
stdout,
|
|
1939
|
+
stderr,
|
|
1940
|
+
all,
|
|
1941
|
+
command,
|
|
1942
|
+
escapedCommand,
|
|
1943
|
+
parsed,
|
|
1944
|
+
timedOut,
|
|
1945
|
+
isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),
|
|
1946
|
+
killed: spawned.killed
|
|
1947
|
+
});
|
|
1948
|
+
if (!parsed.options.reject) {
|
|
1949
|
+
return returnedError;
|
|
1950
|
+
}
|
|
1951
|
+
throw returnedError;
|
|
1952
|
+
}
|
|
1953
|
+
return {
|
|
1954
|
+
command,
|
|
1955
|
+
escapedCommand,
|
|
1956
|
+
exitCode: 0,
|
|
1957
|
+
stdout,
|
|
1958
|
+
stderr,
|
|
1959
|
+
all,
|
|
1960
|
+
failed: false,
|
|
1961
|
+
timedOut: false,
|
|
1962
|
+
isCanceled: false,
|
|
1963
|
+
killed: false
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
const handlePromiseOnce = onetime_default(handlePromise);
|
|
1967
|
+
handleInput(spawned, parsed.options);
|
|
1968
|
+
spawned.all = makeAllStream(spawned, parsed.options);
|
|
1969
|
+
addPipeMethods(spawned);
|
|
1970
|
+
mergePromise(spawned, handlePromiseOnce);
|
|
1971
|
+
return spawned;
|
|
1972
|
+
}
|
|
1973
|
+
function execaSync(file, args, options) {
|
|
1974
|
+
const parsed = handleArguments(file, args, options);
|
|
1975
|
+
const command = joinCommand(file, args);
|
|
1976
|
+
const escapedCommand = getEscapedCommand(file, args);
|
|
1977
|
+
logCommand(escapedCommand, parsed.options);
|
|
1978
|
+
const input = handleInputSync(parsed.options);
|
|
1979
|
+
let result;
|
|
1980
|
+
try {
|
|
1981
|
+
result = import_node_child_process3.default.spawnSync(parsed.file, parsed.args, { ...parsed.options, input });
|
|
1982
|
+
} catch (error) {
|
|
1983
|
+
throw makeError({
|
|
1984
|
+
error,
|
|
1985
|
+
stdout: "",
|
|
1986
|
+
stderr: "",
|
|
1987
|
+
all: "",
|
|
1988
|
+
command,
|
|
1989
|
+
escapedCommand,
|
|
1990
|
+
parsed,
|
|
1991
|
+
timedOut: false,
|
|
1992
|
+
isCanceled: false,
|
|
1993
|
+
killed: false
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
1997
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
1998
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
1999
|
+
const error = makeError({
|
|
2000
|
+
stdout,
|
|
2001
|
+
stderr,
|
|
2002
|
+
error: result.error,
|
|
2003
|
+
signal: result.signal,
|
|
2004
|
+
exitCode: result.status,
|
|
2005
|
+
command,
|
|
2006
|
+
escapedCommand,
|
|
2007
|
+
parsed,
|
|
2008
|
+
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
2009
|
+
isCanceled: false,
|
|
2010
|
+
killed: result.signal !== null
|
|
2011
|
+
});
|
|
2012
|
+
if (!parsed.options.reject) {
|
|
2013
|
+
return error;
|
|
2014
|
+
}
|
|
2015
|
+
throw error;
|
|
2016
|
+
}
|
|
2017
|
+
return {
|
|
2018
|
+
command,
|
|
2019
|
+
escapedCommand,
|
|
2020
|
+
exitCode: 0,
|
|
2021
|
+
stdout,
|
|
2022
|
+
stderr,
|
|
2023
|
+
failed: false,
|
|
2024
|
+
timedOut: false,
|
|
2025
|
+
isCanceled: false,
|
|
2026
|
+
killed: false
|
|
2027
|
+
};
|
|
2028
|
+
}
|
|
2029
|
+
var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
|
|
2030
|
+
var normalizeScriptOptions = (options = {}) => ({
|
|
2031
|
+
preferLocal: true,
|
|
2032
|
+
...normalizeScriptStdin(options),
|
|
2033
|
+
...options
|
|
2034
|
+
});
|
|
2035
|
+
function create$(options) {
|
|
2036
|
+
function $2(templatesOrOptions, ...expressions) {
|
|
2037
|
+
if (!Array.isArray(templatesOrOptions)) {
|
|
2038
|
+
return create$({ ...options, ...templatesOrOptions });
|
|
2039
|
+
}
|
|
2040
|
+
const [file, ...args] = parseTemplates(templatesOrOptions, expressions);
|
|
2041
|
+
return execa(file, args, normalizeScriptOptions(options));
|
|
2042
|
+
}
|
|
2043
|
+
$2.sync = (templates, ...expressions) => {
|
|
2044
|
+
if (!Array.isArray(templates)) {
|
|
2045
|
+
throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
|
|
2046
|
+
}
|
|
2047
|
+
const [file, ...args] = parseTemplates(templates, expressions);
|
|
2048
|
+
return execaSync(file, args, normalizeScriptOptions(options));
|
|
2049
|
+
};
|
|
2050
|
+
return $2;
|
|
2051
|
+
}
|
|
2052
|
+
var $ = create$();
|
|
2053
|
+
|
|
2054
|
+
// scripts/studio.ts
|
|
2055
|
+
var import_path = require("path");
|
|
2056
|
+
var astroBin = (0, import_path.join)(__dirname, "../node_modules/.bin/astro");
|
|
2057
|
+
var appPath = (0, import_path.join)(__dirname, "..");
|
|
2058
|
+
async function buildStudio({ outDir }) {
|
|
2059
|
+
process.env.ASTRO_OUT_DIR = outDir;
|
|
2060
|
+
const { stdout } = await execa(astroBin, ["build", "--root", appPath]);
|
|
2061
|
+
import_logger.logger.log(stdout);
|
|
2062
|
+
}
|
|
2063
|
+
async function serveStudio() {
|
|
2064
|
+
const result = execa(astroBin, ["dev", "--root", appPath], {
|
|
2065
|
+
stdio: "inherit"
|
|
2066
|
+
});
|
|
2067
|
+
result.stdout?.pipe(process.stdout);
|
|
2068
|
+
result.stderr?.pipe(process.stderr);
|
|
2069
|
+
}
|
|
2070
|
+
async function previewStudio({ outDir }) {
|
|
2071
|
+
process.env.ASTRO_OUT_DIR = outDir;
|
|
2072
|
+
const result = execa(astroBin, ["preview", "--root", appPath], {
|
|
2073
|
+
stdio: "inherit"
|
|
2074
|
+
});
|
|
2075
|
+
result.stdout?.pipe(process.stdout);
|
|
2076
|
+
result.stderr?.pipe(process.stderr);
|
|
2077
|
+
}
|
|
2078
|
+
function printUrls(options) {
|
|
2079
|
+
const protocol = options.https ? "https" : "http";
|
|
2080
|
+
const localUrl = `${protocol}://${options.host}:${options.port}`;
|
|
2081
|
+
import_logger.logger.log(` ${import_logger.colors.cyan("\u279C")} ${import_logger.colors.bold("Previewed at")}: ${import_logger.colors.reset(import_logger.colors.green(localUrl))} `);
|
|
2082
|
+
}
|
|
2083
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2084
|
+
0 && (module.exports = {
|
|
2085
|
+
buildStudio,
|
|
2086
|
+
previewStudio,
|
|
2087
|
+
printUrls,
|
|
2088
|
+
serveStudio
|
|
2089
|
+
});
|