@vercel/introspection 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/express.mjs +1868 -284
- package/dist/hono.mjs +1868 -284
- package/dist/index.mjs +1909 -317
- package/dist/loaders/cjs.cjs +1868 -284
- package/package.json +4 -4
package/dist/loaders/cjs.cjs
CHANGED
|
@@ -287,7 +287,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
287
287
|
this.head = this.tail = null;
|
|
288
288
|
this.length = 0;
|
|
289
289
|
};
|
|
290
|
-
BufferList.prototype.join = function
|
|
290
|
+
BufferList.prototype.join = function join5(s) {
|
|
291
291
|
if (this.length === 0) return "";
|
|
292
292
|
var p = this.head;
|
|
293
293
|
var ret = "" + p.data;
|
|
@@ -2009,47 +2009,47 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2009
2009
|
}
|
|
2010
2010
|
var chdir;
|
|
2011
2011
|
module2.exports = patch;
|
|
2012
|
-
function patch(
|
|
2013
|
-
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(
|
|
2014
|
-
if (!
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
if (
|
|
2034
|
-
|
|
2012
|
+
function patch(fs7) {
|
|
2013
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs7);
|
|
2014
|
+
if (!fs7.lutimes) patchLutimes(fs7);
|
|
2015
|
+
fs7.chown = chownFix(fs7.chown);
|
|
2016
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
2017
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
2018
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
2019
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
2020
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
2021
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
2022
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
2023
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
2024
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
2025
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
2026
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
2027
|
+
fs7.stat = statFix(fs7.stat);
|
|
2028
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
2029
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
2030
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
2031
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
2032
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
2033
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
2034
|
+
fs7.lchmod = function(path7, mode, cb) {
|
|
2035
2035
|
if (cb) process.nextTick(cb);
|
|
2036
2036
|
};
|
|
2037
|
-
|
|
2037
|
+
fs7.lchmodSync = function() {};
|
|
2038
2038
|
}
|
|
2039
|
-
if (
|
|
2040
|
-
|
|
2039
|
+
if (fs7.chown && !fs7.lchown) {
|
|
2040
|
+
fs7.lchown = function(path7, uid, gid, cb) {
|
|
2041
2041
|
if (cb) process.nextTick(cb);
|
|
2042
2042
|
};
|
|
2043
|
-
|
|
2043
|
+
fs7.lchownSync = function() {};
|
|
2044
2044
|
}
|
|
2045
|
-
if (platform === "win32")
|
|
2045
|
+
if (platform === "win32") fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
|
|
2046
2046
|
function rename2(from, to, cb) {
|
|
2047
2047
|
var start = Date.now();
|
|
2048
2048
|
var backoff = 0;
|
|
2049
2049
|
fs$rename(from, to, function CB(er) {
|
|
2050
2050
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
2051
2051
|
setTimeout(function() {
|
|
2052
|
-
|
|
2052
|
+
fs7.stat(to, function(stater, st) {
|
|
2053
2053
|
if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);
|
|
2054
2054
|
else cb(er);
|
|
2055
2055
|
});
|
|
@@ -2062,8 +2062,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2062
2062
|
}
|
|
2063
2063
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename2, fs$rename);
|
|
2064
2064
|
return rename2;
|
|
2065
|
-
}(
|
|
2066
|
-
|
|
2065
|
+
}(fs7.rename);
|
|
2066
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
|
|
2067
2067
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
2068
2068
|
var callback;
|
|
2069
2069
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -2071,21 +2071,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2071
2071
|
callback = function(er, _, __) {
|
|
2072
2072
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
2073
2073
|
eagCounter++;
|
|
2074
|
-
return fs$read.call(
|
|
2074
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2075
2075
|
}
|
|
2076
2076
|
callback_.apply(this, arguments);
|
|
2077
2077
|
};
|
|
2078
2078
|
}
|
|
2079
|
-
return fs$read.call(
|
|
2079
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2080
2080
|
}
|
|
2081
2081
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
2082
2082
|
return read;
|
|
2083
|
-
}(
|
|
2084
|
-
|
|
2083
|
+
}(fs7.read);
|
|
2084
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : function(fs$readSync) {
|
|
2085
2085
|
return function(fd, buffer, offset, length, position) {
|
|
2086
2086
|
var eagCounter = 0;
|
|
2087
2087
|
while (true) try {
|
|
2088
|
-
return fs$readSync.call(
|
|
2088
|
+
return fs$readSync.call(fs7, fd, buffer, offset, length, position);
|
|
2089
2089
|
} catch (er) {
|
|
2090
2090
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
2091
2091
|
eagCounter++;
|
|
@@ -2094,78 +2094,78 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2094
2094
|
throw er;
|
|
2095
2095
|
}
|
|
2096
2096
|
};
|
|
2097
|
-
}(
|
|
2098
|
-
function patchLchmod(
|
|
2099
|
-
|
|
2100
|
-
|
|
2097
|
+
}(fs7.readSync);
|
|
2098
|
+
function patchLchmod(fs8) {
|
|
2099
|
+
fs8.lchmod = function(path7, mode, callback) {
|
|
2100
|
+
fs8.open(path7, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
2101
2101
|
if (err) {
|
|
2102
2102
|
if (callback) callback(err);
|
|
2103
2103
|
return;
|
|
2104
2104
|
}
|
|
2105
|
-
|
|
2106
|
-
|
|
2105
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
2106
|
+
fs8.close(fd, function(err22) {
|
|
2107
2107
|
if (callback) callback(err2 || err22);
|
|
2108
2108
|
});
|
|
2109
2109
|
});
|
|
2110
2110
|
});
|
|
2111
2111
|
};
|
|
2112
|
-
|
|
2113
|
-
var fd =
|
|
2112
|
+
fs8.lchmodSync = function(path7, mode) {
|
|
2113
|
+
var fd = fs8.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
2114
2114
|
var threw = true;
|
|
2115
2115
|
var ret;
|
|
2116
2116
|
try {
|
|
2117
|
-
ret =
|
|
2117
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
2118
2118
|
threw = false;
|
|
2119
2119
|
} finally {
|
|
2120
2120
|
if (threw) try {
|
|
2121
|
-
|
|
2121
|
+
fs8.closeSync(fd);
|
|
2122
2122
|
} catch (er) {}
|
|
2123
|
-
else
|
|
2123
|
+
else fs8.closeSync(fd);
|
|
2124
2124
|
}
|
|
2125
2125
|
return ret;
|
|
2126
2126
|
};
|
|
2127
2127
|
}
|
|
2128
|
-
function patchLutimes(
|
|
2129
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
2130
|
-
|
|
2131
|
-
|
|
2128
|
+
function patchLutimes(fs8) {
|
|
2129
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
2130
|
+
fs8.lutimes = function(path7, at, mt, cb) {
|
|
2131
|
+
fs8.open(path7, constants.O_SYMLINK, function(er, fd) {
|
|
2132
2132
|
if (er) {
|
|
2133
2133
|
if (cb) cb(er);
|
|
2134
2134
|
return;
|
|
2135
2135
|
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2136
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
2137
|
+
fs8.close(fd, function(er22) {
|
|
2138
2138
|
if (cb) cb(er2 || er22);
|
|
2139
2139
|
});
|
|
2140
2140
|
});
|
|
2141
2141
|
});
|
|
2142
2142
|
};
|
|
2143
|
-
|
|
2144
|
-
var fd =
|
|
2143
|
+
fs8.lutimesSync = function(path7, at, mt) {
|
|
2144
|
+
var fd = fs8.openSync(path7, constants.O_SYMLINK);
|
|
2145
2145
|
var ret;
|
|
2146
2146
|
var threw = true;
|
|
2147
2147
|
try {
|
|
2148
|
-
ret =
|
|
2148
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
2149
2149
|
threw = false;
|
|
2150
2150
|
} finally {
|
|
2151
2151
|
if (threw) try {
|
|
2152
|
-
|
|
2152
|
+
fs8.closeSync(fd);
|
|
2153
2153
|
} catch (er) {}
|
|
2154
|
-
else
|
|
2154
|
+
else fs8.closeSync(fd);
|
|
2155
2155
|
}
|
|
2156
2156
|
return ret;
|
|
2157
2157
|
};
|
|
2158
|
-
} else if (
|
|
2159
|
-
|
|
2158
|
+
} else if (fs8.futimes) {
|
|
2159
|
+
fs8.lutimes = function(_a, _b, _c, cb) {
|
|
2160
2160
|
if (cb) process.nextTick(cb);
|
|
2161
2161
|
};
|
|
2162
|
-
|
|
2162
|
+
fs8.lutimesSync = function() {};
|
|
2163
2163
|
}
|
|
2164
2164
|
}
|
|
2165
2165
|
function chmodFix(orig) {
|
|
2166
2166
|
if (!orig) return orig;
|
|
2167
2167
|
return function(target, mode, cb) {
|
|
2168
|
-
return orig.call(
|
|
2168
|
+
return orig.call(fs7, target, mode, function(er) {
|
|
2169
2169
|
if (chownErOk(er)) er = null;
|
|
2170
2170
|
if (cb) cb.apply(this, arguments);
|
|
2171
2171
|
});
|
|
@@ -2175,7 +2175,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2175
2175
|
if (!orig) return orig;
|
|
2176
2176
|
return function(target, mode) {
|
|
2177
2177
|
try {
|
|
2178
|
-
return orig.call(
|
|
2178
|
+
return orig.call(fs7, target, mode);
|
|
2179
2179
|
} catch (er) {
|
|
2180
2180
|
if (!chownErOk(er)) throw er;
|
|
2181
2181
|
}
|
|
@@ -2184,7 +2184,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2184
2184
|
function chownFix(orig) {
|
|
2185
2185
|
if (!orig) return orig;
|
|
2186
2186
|
return function(target, uid, gid, cb) {
|
|
2187
|
-
return orig.call(
|
|
2187
|
+
return orig.call(fs7, target, uid, gid, function(er) {
|
|
2188
2188
|
if (chownErOk(er)) er = null;
|
|
2189
2189
|
if (cb) cb.apply(this, arguments);
|
|
2190
2190
|
});
|
|
@@ -2194,7 +2194,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2194
2194
|
if (!orig) return orig;
|
|
2195
2195
|
return function(target, uid, gid) {
|
|
2196
2196
|
try {
|
|
2197
|
-
return orig.call(
|
|
2197
|
+
return orig.call(fs7, target, uid, gid);
|
|
2198
2198
|
} catch (er) {
|
|
2199
2199
|
if (!chownErOk(er)) throw er;
|
|
2200
2200
|
}
|
|
@@ -2214,13 +2214,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2214
2214
|
}
|
|
2215
2215
|
if (cb) cb.apply(this, arguments);
|
|
2216
2216
|
}
|
|
2217
|
-
return options ? orig.call(
|
|
2217
|
+
return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback);
|
|
2218
2218
|
};
|
|
2219
2219
|
}
|
|
2220
2220
|
function statFixSync(orig) {
|
|
2221
2221
|
if (!orig) return orig;
|
|
2222
2222
|
return function(target, options) {
|
|
2223
|
-
var stats = options ? orig.call(
|
|
2223
|
+
var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target);
|
|
2224
2224
|
if (stats) {
|
|
2225
2225
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
2226
2226
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -2241,7 +2241,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2241
2241
|
var require_legacy_streams = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
2242
2242
|
var Stream = require("stream").Stream;
|
|
2243
2243
|
module2.exports = legacy;
|
|
2244
|
-
function legacy(
|
|
2244
|
+
function legacy(fs7) {
|
|
2245
2245
|
return {
|
|
2246
2246
|
ReadStream,
|
|
2247
2247
|
WriteStream
|
|
@@ -2277,7 +2277,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2277
2277
|
});
|
|
2278
2278
|
return;
|
|
2279
2279
|
}
|
|
2280
|
-
|
|
2280
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
2281
2281
|
if (err) {
|
|
2282
2282
|
self2.emit("error", err);
|
|
2283
2283
|
self2.readable = false;
|
|
@@ -2312,7 +2312,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2312
2312
|
this.busy = false;
|
|
2313
2313
|
this._queue = [];
|
|
2314
2314
|
if (this.fd === null) {
|
|
2315
|
-
this._open =
|
|
2315
|
+
this._open = fs7.open;
|
|
2316
2316
|
this._queue.push([
|
|
2317
2317
|
this._open,
|
|
2318
2318
|
this.path,
|
|
@@ -2341,7 +2341,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2341
2341
|
}
|
|
2342
2342
|
} });
|
|
2343
2343
|
var require_graceful_fs = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
2344
|
-
var
|
|
2344
|
+
var fs7 = require("fs");
|
|
2345
2345
|
var polyfills = require_polyfills();
|
|
2346
2346
|
var legacy = require_legacy_streams();
|
|
2347
2347
|
var clone = require_clone();
|
|
@@ -2368,46 +2368,46 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2368
2368
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
2369
2369
|
console.error(m);
|
|
2370
2370
|
};
|
|
2371
|
-
if (!
|
|
2371
|
+
if (!fs7[gracefulQueue]) {
|
|
2372
2372
|
queue = global[gracefulQueue] || [];
|
|
2373
|
-
publishQueue(
|
|
2374
|
-
|
|
2373
|
+
publishQueue(fs7, queue);
|
|
2374
|
+
fs7.close = function(fs$close) {
|
|
2375
2375
|
function close(fd, cb) {
|
|
2376
|
-
return fs$close.call(
|
|
2376
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
2377
2377
|
if (!err) resetQueue();
|
|
2378
2378
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
2381
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
2382
2382
|
return close;
|
|
2383
|
-
}(
|
|
2384
|
-
|
|
2383
|
+
}(fs7.close);
|
|
2384
|
+
fs7.closeSync = function(fs$closeSync) {
|
|
2385
2385
|
function closeSync(fd) {
|
|
2386
|
-
fs$closeSync.apply(
|
|
2386
|
+
fs$closeSync.apply(fs7, arguments);
|
|
2387
2387
|
resetQueue();
|
|
2388
2388
|
}
|
|
2389
2389
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
2390
2390
|
return closeSync;
|
|
2391
|
-
}(
|
|
2391
|
+
}(fs7.closeSync);
|
|
2392
2392
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
2393
|
-
debug2(
|
|
2394
|
-
require("assert").equal(
|
|
2393
|
+
debug2(fs7[gracefulQueue]);
|
|
2394
|
+
require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
2395
2395
|
});
|
|
2396
2396
|
}
|
|
2397
2397
|
var queue;
|
|
2398
|
-
if (!global[gracefulQueue]) publishQueue(global,
|
|
2399
|
-
module2.exports = patch(clone(
|
|
2400
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
2401
|
-
module2.exports = patch(
|
|
2402
|
-
|
|
2403
|
-
}
|
|
2404
|
-
function patch(
|
|
2405
|
-
polyfills(
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
var fs$readFile =
|
|
2410
|
-
|
|
2398
|
+
if (!global[gracefulQueue]) publishQueue(global, fs7[gracefulQueue]);
|
|
2399
|
+
module2.exports = patch(clone(fs7));
|
|
2400
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
2401
|
+
module2.exports = patch(fs7);
|
|
2402
|
+
fs7.__patched = true;
|
|
2403
|
+
}
|
|
2404
|
+
function patch(fs8) {
|
|
2405
|
+
polyfills(fs8);
|
|
2406
|
+
fs8.gracefulify = patch;
|
|
2407
|
+
fs8.createReadStream = createReadStream;
|
|
2408
|
+
fs8.createWriteStream = createWriteStream;
|
|
2409
|
+
var fs$readFile = fs8.readFile;
|
|
2410
|
+
fs8.readFile = readFile4;
|
|
2411
2411
|
function readFile4(path7, options, cb) {
|
|
2412
2412
|
if (typeof options === "function") cb = options, options = null;
|
|
2413
2413
|
return go$readFile(path7, options, cb);
|
|
@@ -2428,8 +2428,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2428
2428
|
});
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
|
-
var fs$writeFile =
|
|
2432
|
-
|
|
2431
|
+
var fs$writeFile = fs8.writeFile;
|
|
2432
|
+
fs8.writeFile = writeFile;
|
|
2433
2433
|
function writeFile(path7, data, options, cb) {
|
|
2434
2434
|
if (typeof options === "function") cb = options, options = null;
|
|
2435
2435
|
return go$writeFile(path7, data, options, cb);
|
|
@@ -2451,8 +2451,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2451
2451
|
});
|
|
2452
2452
|
}
|
|
2453
2453
|
}
|
|
2454
|
-
var fs$appendFile =
|
|
2455
|
-
if (fs$appendFile)
|
|
2454
|
+
var fs$appendFile = fs8.appendFile;
|
|
2455
|
+
if (fs$appendFile) fs8.appendFile = appendFile;
|
|
2456
2456
|
function appendFile(path7, data, options, cb) {
|
|
2457
2457
|
if (typeof options === "function") cb = options, options = null;
|
|
2458
2458
|
return go$appendFile(path7, data, options, cb);
|
|
@@ -2474,8 +2474,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2474
2474
|
});
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
|
-
var fs$copyFile =
|
|
2478
|
-
if (fs$copyFile)
|
|
2477
|
+
var fs$copyFile = fs8.copyFile;
|
|
2478
|
+
if (fs$copyFile) fs8.copyFile = copyFile;
|
|
2479
2479
|
function copyFile(src, dest, flags, cb) {
|
|
2480
2480
|
if (typeof flags === "function") {
|
|
2481
2481
|
cb = flags;
|
|
@@ -2500,8 +2500,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2500
2500
|
});
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
|
-
var fs$readdir =
|
|
2504
|
-
|
|
2503
|
+
var fs$readdir = fs8.readdir;
|
|
2504
|
+
fs8.readdir = readdir;
|
|
2505
2505
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
2506
2506
|
function readdir(path7, options, cb) {
|
|
2507
2507
|
if (typeof options === "function") cb = options, options = null;
|
|
@@ -2532,21 +2532,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
2534
2534
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
2535
|
-
var legStreams = legacy(
|
|
2535
|
+
var legStreams = legacy(fs8);
|
|
2536
2536
|
ReadStream = legStreams.ReadStream;
|
|
2537
2537
|
WriteStream = legStreams.WriteStream;
|
|
2538
2538
|
}
|
|
2539
|
-
var fs$ReadStream =
|
|
2539
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
2540
2540
|
if (fs$ReadStream) {
|
|
2541
2541
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
2542
2542
|
ReadStream.prototype.open = ReadStream$open;
|
|
2543
2543
|
}
|
|
2544
|
-
var fs$WriteStream =
|
|
2544
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
2545
2545
|
if (fs$WriteStream) {
|
|
2546
2546
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
2547
2547
|
WriteStream.prototype.open = WriteStream$open;
|
|
2548
2548
|
}
|
|
2549
|
-
Object.defineProperty(
|
|
2549
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
2550
2550
|
get: function() {
|
|
2551
2551
|
return ReadStream;
|
|
2552
2552
|
},
|
|
@@ -2556,7 +2556,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2556
2556
|
enumerable: true,
|
|
2557
2557
|
configurable: true
|
|
2558
2558
|
});
|
|
2559
|
-
Object.defineProperty(
|
|
2559
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
2560
2560
|
get: function() {
|
|
2561
2561
|
return WriteStream;
|
|
2562
2562
|
},
|
|
@@ -2567,7 +2567,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2567
2567
|
configurable: true
|
|
2568
2568
|
});
|
|
2569
2569
|
var FileReadStream = ReadStream;
|
|
2570
|
-
Object.defineProperty(
|
|
2570
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
2571
2571
|
get: function() {
|
|
2572
2572
|
return FileReadStream;
|
|
2573
2573
|
},
|
|
@@ -2578,7 +2578,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2578
2578
|
configurable: true
|
|
2579
2579
|
});
|
|
2580
2580
|
var FileWriteStream = WriteStream;
|
|
2581
|
-
Object.defineProperty(
|
|
2581
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
2582
2582
|
get: function() {
|
|
2583
2583
|
return FileWriteStream;
|
|
2584
2584
|
},
|
|
@@ -2622,13 +2622,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
function createReadStream(path7, options) {
|
|
2625
|
-
return new
|
|
2625
|
+
return new fs8.ReadStream(path7, options);
|
|
2626
2626
|
}
|
|
2627
2627
|
function createWriteStream(path7, options) {
|
|
2628
|
-
return new
|
|
2628
|
+
return new fs8.WriteStream(path7, options);
|
|
2629
2629
|
}
|
|
2630
|
-
var fs$open =
|
|
2631
|
-
|
|
2630
|
+
var fs$open = fs8.open;
|
|
2631
|
+
fs8.open = open;
|
|
2632
2632
|
function open(path7, flags, mode, cb) {
|
|
2633
2633
|
if (typeof mode === "function") cb = mode, mode = null;
|
|
2634
2634
|
return go$open(path7, flags, mode, cb);
|
|
@@ -2650,27 +2650,27 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2650
2650
|
});
|
|
2651
2651
|
}
|
|
2652
2652
|
}
|
|
2653
|
-
return
|
|
2653
|
+
return fs8;
|
|
2654
2654
|
}
|
|
2655
2655
|
function enqueue(elem) {
|
|
2656
2656
|
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
2657
|
-
|
|
2657
|
+
fs7[gracefulQueue].push(elem);
|
|
2658
2658
|
retry2();
|
|
2659
2659
|
}
|
|
2660
2660
|
var retryTimer;
|
|
2661
2661
|
function resetQueue() {
|
|
2662
2662
|
var now = Date.now();
|
|
2663
|
-
for (var i = 0; i <
|
|
2664
|
-
|
|
2665
|
-
|
|
2663
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) if (fs7[gracefulQueue][i].length > 2) {
|
|
2664
|
+
fs7[gracefulQueue][i][3] = now;
|
|
2665
|
+
fs7[gracefulQueue][i][4] = now;
|
|
2666
2666
|
}
|
|
2667
2667
|
retry2();
|
|
2668
2668
|
}
|
|
2669
2669
|
function retry2() {
|
|
2670
2670
|
clearTimeout(retryTimer);
|
|
2671
2671
|
retryTimer = void 0;
|
|
2672
|
-
if (
|
|
2673
|
-
var elem =
|
|
2672
|
+
if (fs7[gracefulQueue].length === 0) return;
|
|
2673
|
+
var elem = fs7[gracefulQueue].shift();
|
|
2674
2674
|
var fn = elem[0];
|
|
2675
2675
|
var args = elem[1];
|
|
2676
2676
|
var err = elem[2];
|
|
@@ -2689,14 +2689,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2689
2689
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
2690
2690
|
debug2("RETRY", fn.name, args);
|
|
2691
2691
|
fn.apply(null, args.concat([startTime]));
|
|
2692
|
-
} else
|
|
2692
|
+
} else fs7[gracefulQueue].push(elem);
|
|
2693
2693
|
}
|
|
2694
2694
|
if (retryTimer === void 0) retryTimer = setTimeout(retry2, 0);
|
|
2695
2695
|
}
|
|
2696
2696
|
} });
|
|
2697
2697
|
var require_fs = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
2698
2698
|
var u = require_universalify().fromCallback;
|
|
2699
|
-
var
|
|
2699
|
+
var fs7 = require_graceful_fs();
|
|
2700
2700
|
var api = [
|
|
2701
2701
|
"access",
|
|
2702
2702
|
"appendFile",
|
|
@@ -2733,23 +2733,23 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2733
2733
|
"utimes",
|
|
2734
2734
|
"writeFile"
|
|
2735
2735
|
].filter((key) => {
|
|
2736
|
-
return typeof
|
|
2736
|
+
return typeof fs7[key] === "function";
|
|
2737
2737
|
});
|
|
2738
|
-
Object.assign(exports2,
|
|
2738
|
+
Object.assign(exports2, fs7);
|
|
2739
2739
|
api.forEach((method) => {
|
|
2740
|
-
exports2[method] = u(
|
|
2740
|
+
exports2[method] = u(fs7[method]);
|
|
2741
2741
|
});
|
|
2742
|
-
exports2.realpath.native = u(
|
|
2742
|
+
exports2.realpath.native = u(fs7.realpath.native);
|
|
2743
2743
|
exports2.exists = function(filename, callback) {
|
|
2744
|
-
if (typeof callback === "function") return
|
|
2744
|
+
if (typeof callback === "function") return fs7.exists(filename, callback);
|
|
2745
2745
|
return new Promise((resolve) => {
|
|
2746
|
-
return
|
|
2746
|
+
return fs7.exists(filename, resolve);
|
|
2747
2747
|
});
|
|
2748
2748
|
};
|
|
2749
2749
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
2750
|
-
if (typeof callback === "function") return
|
|
2750
|
+
if (typeof callback === "function") return fs7.read(fd, buffer, offset, length, position, callback);
|
|
2751
2751
|
return new Promise((resolve, reject) => {
|
|
2752
|
-
|
|
2752
|
+
fs7.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
2753
2753
|
if (err) return reject(err);
|
|
2754
2754
|
resolve({
|
|
2755
2755
|
bytesRead,
|
|
@@ -2759,9 +2759,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2759
2759
|
});
|
|
2760
2760
|
};
|
|
2761
2761
|
exports2.write = function(fd, buffer, ...args) {
|
|
2762
|
-
if (typeof args[args.length - 1] === "function") return
|
|
2762
|
+
if (typeof args[args.length - 1] === "function") return fs7.write(fd, buffer, ...args);
|
|
2763
2763
|
return new Promise((resolve, reject) => {
|
|
2764
|
-
|
|
2764
|
+
fs7.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
2765
2765
|
if (err) return reject(err);
|
|
2766
2766
|
resolve({
|
|
2767
2767
|
bytesWritten,
|
|
@@ -2770,10 +2770,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2770
2770
|
});
|
|
2771
2771
|
});
|
|
2772
2772
|
};
|
|
2773
|
-
if (typeof
|
|
2774
|
-
if (typeof args[args.length - 1] === "function") return
|
|
2773
|
+
if (typeof fs7.writev === "function") exports2.writev = function(fd, buffers, ...args) {
|
|
2774
|
+
if (typeof args[args.length - 1] === "function") return fs7.writev(fd, buffers, ...args);
|
|
2775
2775
|
return new Promise((resolve, reject) => {
|
|
2776
|
-
|
|
2776
|
+
fs7.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
2777
2777
|
if (err) return reject(err);
|
|
2778
2778
|
resolve({
|
|
2779
2779
|
bytesWritten,
|
|
@@ -2796,7 +2796,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2796
2796
|
};
|
|
2797
2797
|
} });
|
|
2798
2798
|
var require_make_dir = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
2799
|
-
var
|
|
2799
|
+
var fs7 = require_fs();
|
|
2800
2800
|
var { checkPath } = require_utils();
|
|
2801
2801
|
var getMode = (options) => {
|
|
2802
2802
|
const defaults = { mode: 511 };
|
|
@@ -2808,14 +2808,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2808
2808
|
};
|
|
2809
2809
|
module2.exports.makeDir = async (dir, options) => {
|
|
2810
2810
|
checkPath(dir);
|
|
2811
|
-
return
|
|
2811
|
+
return fs7.mkdir(dir, {
|
|
2812
2812
|
mode: getMode(options),
|
|
2813
2813
|
recursive: true
|
|
2814
2814
|
});
|
|
2815
2815
|
};
|
|
2816
2816
|
module2.exports.makeDirSync = (dir, options) => {
|
|
2817
2817
|
checkPath(dir);
|
|
2818
|
-
return
|
|
2818
|
+
return fs7.mkdirSync(dir, {
|
|
2819
2819
|
mode: getMode(options),
|
|
2820
2820
|
recursive: true
|
|
2821
2821
|
});
|
|
@@ -2835,21 +2835,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2835
2835
|
};
|
|
2836
2836
|
} });
|
|
2837
2837
|
var require_utimes = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
2838
|
-
var
|
|
2838
|
+
var fs7 = require_graceful_fs();
|
|
2839
2839
|
function utimesMillis(path7, atime, mtime2, callback) {
|
|
2840
|
-
|
|
2840
|
+
fs7.open(path7, "r+", (err, fd) => {
|
|
2841
2841
|
if (err) return callback(err);
|
|
2842
|
-
|
|
2843
|
-
|
|
2842
|
+
fs7.futimes(fd, atime, mtime2, (futimesErr) => {
|
|
2843
|
+
fs7.close(fd, (closeErr) => {
|
|
2844
2844
|
if (callback) callback(futimesErr || closeErr);
|
|
2845
2845
|
});
|
|
2846
2846
|
});
|
|
2847
2847
|
});
|
|
2848
2848
|
}
|
|
2849
2849
|
function utimesMillisSync(path7, atime, mtime2) {
|
|
2850
|
-
const fd =
|
|
2851
|
-
|
|
2852
|
-
return
|
|
2850
|
+
const fd = fs7.openSync(path7, "r+");
|
|
2851
|
+
fs7.futimesSync(fd, atime, mtime2);
|
|
2852
|
+
return fs7.closeSync(fd);
|
|
2853
2853
|
}
|
|
2854
2854
|
module2.exports = {
|
|
2855
2855
|
utimesMillis,
|
|
@@ -2857,11 +2857,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2857
2857
|
};
|
|
2858
2858
|
} });
|
|
2859
2859
|
var require_stat = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
2860
|
-
var
|
|
2860
|
+
var fs7 = require_fs();
|
|
2861
2861
|
var path7 = require("path");
|
|
2862
2862
|
var util = require("util");
|
|
2863
2863
|
function getStats(src, dest, opts) {
|
|
2864
|
-
const statFunc = opts.dereference ? (file) =>
|
|
2864
|
+
const statFunc = opts.dereference ? (file) => fs7.stat(file, { bigint: true }) : (file) => fs7.lstat(file, { bigint: true });
|
|
2865
2865
|
return Promise.all([statFunc(src), statFunc(dest).catch((err) => {
|
|
2866
2866
|
if (err.code === "ENOENT") return null;
|
|
2867
2867
|
throw err;
|
|
@@ -2872,7 +2872,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2872
2872
|
}
|
|
2873
2873
|
function getStatsSync(src, dest, opts) {
|
|
2874
2874
|
let destStat;
|
|
2875
|
-
const statFunc = opts.dereference ? (file) =>
|
|
2875
|
+
const statFunc = opts.dereference ? (file) => fs7.statSync(file, { bigint: true }) : (file) => fs7.lstatSync(file, { bigint: true });
|
|
2876
2876
|
const srcStat = statFunc(src);
|
|
2877
2877
|
try {
|
|
2878
2878
|
destStat = statFunc(dest);
|
|
@@ -2939,7 +2939,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2939
2939
|
const srcParent = path7.resolve(path7.dirname(src));
|
|
2940
2940
|
const destParent = path7.resolve(path7.dirname(dest));
|
|
2941
2941
|
if (destParent === srcParent || destParent === path7.parse(destParent).root) return cb();
|
|
2942
|
-
|
|
2942
|
+
fs7.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
2943
2943
|
if (err) {
|
|
2944
2944
|
if (err.code === "ENOENT") return cb();
|
|
2945
2945
|
return cb(err);
|
|
@@ -2954,7 +2954,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2954
2954
|
if (destParent === srcParent || destParent === path7.parse(destParent).root) return;
|
|
2955
2955
|
let destStat;
|
|
2956
2956
|
try {
|
|
2957
|
-
destStat =
|
|
2957
|
+
destStat = fs7.statSync(destParent, { bigint: true });
|
|
2958
2958
|
} catch (err) {
|
|
2959
2959
|
if (err.code === "ENOENT") return;
|
|
2960
2960
|
throw err;
|
|
@@ -2983,7 +2983,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2983
2983
|
};
|
|
2984
2984
|
} });
|
|
2985
2985
|
var require_copy_sync = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports2, module2) {
|
|
2986
|
-
var
|
|
2986
|
+
var fs7 = require_graceful_fs();
|
|
2987
2987
|
var path7 = require("path");
|
|
2988
2988
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
2989
2989
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
@@ -3003,7 +3003,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3003
3003
|
function handleFilterAndCopy(destStat, src, dest, opts) {
|
|
3004
3004
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
3005
3005
|
const destParent = path7.dirname(dest);
|
|
3006
|
-
if (!
|
|
3006
|
+
if (!fs7.existsSync(destParent)) mkdirsSync(destParent);
|
|
3007
3007
|
return getStats(destStat, src, dest, opts);
|
|
3008
3008
|
}
|
|
3009
3009
|
function startCopy(destStat, src, dest, opts) {
|
|
@@ -3011,7 +3011,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3011
3011
|
return getStats(destStat, src, dest, opts);
|
|
3012
3012
|
}
|
|
3013
3013
|
function getStats(destStat, src, dest, opts) {
|
|
3014
|
-
const srcStat = (opts.dereference ?
|
|
3014
|
+
const srcStat = (opts.dereference ? fs7.statSync : fs7.lstatSync)(src);
|
|
3015
3015
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
3016
3016
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
3017
3017
|
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
|
@@ -3025,12 +3025,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3025
3025
|
}
|
|
3026
3026
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
3027
3027
|
if (opts.overwrite) {
|
|
3028
|
-
|
|
3028
|
+
fs7.unlinkSync(dest);
|
|
3029
3029
|
return copyFile(srcStat, src, dest, opts);
|
|
3030
3030
|
} else if (opts.errorOnExist) throw new Error(`'${dest}' already exists`);
|
|
3031
3031
|
}
|
|
3032
3032
|
function copyFile(srcStat, src, dest, opts) {
|
|
3033
|
-
|
|
3033
|
+
fs7.copyFileSync(src, dest);
|
|
3034
3034
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
3035
3035
|
return setDestMode(dest, srcStat.mode);
|
|
3036
3036
|
}
|
|
@@ -3045,10 +3045,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3045
3045
|
return setDestMode(dest, srcMode | 128);
|
|
3046
3046
|
}
|
|
3047
3047
|
function setDestMode(dest, srcMode) {
|
|
3048
|
-
return
|
|
3048
|
+
return fs7.chmodSync(dest, srcMode);
|
|
3049
3049
|
}
|
|
3050
3050
|
function setDestTimestamps(src, dest) {
|
|
3051
|
-
const updatedSrcStat =
|
|
3051
|
+
const updatedSrcStat = fs7.statSync(src);
|
|
3052
3052
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
3053
3053
|
}
|
|
3054
3054
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -3056,12 +3056,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3056
3056
|
return copyDir(src, dest, opts);
|
|
3057
3057
|
}
|
|
3058
3058
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
3059
|
-
|
|
3059
|
+
fs7.mkdirSync(dest);
|
|
3060
3060
|
copyDir(src, dest, opts);
|
|
3061
3061
|
return setDestMode(dest, srcMode);
|
|
3062
3062
|
}
|
|
3063
3063
|
function copyDir(src, dest, opts) {
|
|
3064
|
-
|
|
3064
|
+
fs7.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
3065
3065
|
}
|
|
3066
3066
|
function copyDirItem(item, src, dest, opts) {
|
|
3067
3067
|
const srcItem = path7.join(src, item);
|
|
@@ -3070,26 +3070,26 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3070
3070
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
3071
3071
|
}
|
|
3072
3072
|
function onLink(destStat, src, dest, opts) {
|
|
3073
|
-
let resolvedSrc =
|
|
3073
|
+
let resolvedSrc = fs7.readlinkSync(src);
|
|
3074
3074
|
if (opts.dereference) resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3075
|
-
if (!destStat) return
|
|
3075
|
+
if (!destStat) return fs7.symlinkSync(resolvedSrc, dest);
|
|
3076
3076
|
else {
|
|
3077
3077
|
let resolvedDest;
|
|
3078
3078
|
try {
|
|
3079
|
-
resolvedDest =
|
|
3079
|
+
resolvedDest = fs7.readlinkSync(dest);
|
|
3080
3080
|
} catch (err) {
|
|
3081
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
3081
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs7.symlinkSync(resolvedSrc, dest);
|
|
3082
3082
|
throw err;
|
|
3083
3083
|
}
|
|
3084
3084
|
if (opts.dereference) resolvedDest = path7.resolve(process.cwd(), resolvedDest);
|
|
3085
3085
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
3086
|
-
if (
|
|
3086
|
+
if (fs7.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
3087
3087
|
return copyLink(resolvedSrc, dest);
|
|
3088
3088
|
}
|
|
3089
3089
|
}
|
|
3090
3090
|
function copyLink(resolvedSrc, dest) {
|
|
3091
|
-
|
|
3092
|
-
return
|
|
3091
|
+
fs7.unlinkSync(dest);
|
|
3092
|
+
return fs7.symlinkSync(resolvedSrc, dest);
|
|
3093
3093
|
}
|
|
3094
3094
|
module2.exports = copySync;
|
|
3095
3095
|
} });
|
|
@@ -3098,17 +3098,17 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3098
3098
|
} });
|
|
3099
3099
|
var require_path_exists = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
3100
3100
|
var u = require_universalify().fromPromise;
|
|
3101
|
-
var
|
|
3101
|
+
var fs7 = require_fs();
|
|
3102
3102
|
function pathExists(path7) {
|
|
3103
|
-
return
|
|
3103
|
+
return fs7.access(path7).then(() => true).catch(() => false);
|
|
3104
3104
|
}
|
|
3105
3105
|
module2.exports = {
|
|
3106
3106
|
pathExists: u(pathExists),
|
|
3107
|
-
pathExistsSync:
|
|
3107
|
+
pathExistsSync: fs7.existsSync
|
|
3108
3108
|
};
|
|
3109
3109
|
} });
|
|
3110
3110
|
var require_copy = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
3111
|
-
var
|
|
3111
|
+
var fs7 = require_graceful_fs();
|
|
3112
3112
|
var path7 = require("path");
|
|
3113
3113
|
var mkdirs = require_mkdirs().mkdirs;
|
|
3114
3114
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -3158,7 +3158,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3158
3158
|
return getStats(destStat, src, dest, opts, cb);
|
|
3159
3159
|
}
|
|
3160
3160
|
function getStats(destStat, src, dest, opts, cb) {
|
|
3161
|
-
(opts.dereference ?
|
|
3161
|
+
(opts.dereference ? fs7.stat : fs7.lstat)(src, (err, srcStat) => {
|
|
3162
3162
|
if (err) return cb(err);
|
|
3163
3163
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb);
|
|
3164
3164
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb);
|
|
@@ -3173,7 +3173,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3173
3173
|
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
3174
3174
|
}
|
|
3175
3175
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
3176
|
-
if (opts.overwrite)
|
|
3176
|
+
if (opts.overwrite) fs7.unlink(dest, (err) => {
|
|
3177
3177
|
if (err) return cb(err);
|
|
3178
3178
|
return copyFile(srcStat, src, dest, opts, cb);
|
|
3179
3179
|
});
|
|
@@ -3181,7 +3181,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3181
3181
|
else return cb();
|
|
3182
3182
|
}
|
|
3183
3183
|
function copyFile(srcStat, src, dest, opts, cb) {
|
|
3184
|
-
|
|
3184
|
+
fs7.copyFile(src, dest, (err) => {
|
|
3185
3185
|
if (err) return cb(err);
|
|
3186
3186
|
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
3187
3187
|
return setDestMode(dest, srcStat.mode, cb);
|
|
@@ -3207,10 +3207,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3207
3207
|
});
|
|
3208
3208
|
}
|
|
3209
3209
|
function setDestMode(dest, srcMode, cb) {
|
|
3210
|
-
return
|
|
3210
|
+
return fs7.chmod(dest, srcMode, cb);
|
|
3211
3211
|
}
|
|
3212
3212
|
function setDestTimestamps(src, dest, cb) {
|
|
3213
|
-
|
|
3213
|
+
fs7.stat(src, (err, updatedSrcStat) => {
|
|
3214
3214
|
if (err) return cb(err);
|
|
3215
3215
|
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
3216
3216
|
});
|
|
@@ -3220,7 +3220,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3220
3220
|
return copyDir(src, dest, opts, cb);
|
|
3221
3221
|
}
|
|
3222
3222
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
3223
|
-
|
|
3223
|
+
fs7.mkdir(dest, (err) => {
|
|
3224
3224
|
if (err) return cb(err);
|
|
3225
3225
|
copyDir(src, dest, opts, (err2) => {
|
|
3226
3226
|
if (err2) return cb(err2);
|
|
@@ -3229,7 +3229,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3229
3229
|
});
|
|
3230
3230
|
}
|
|
3231
3231
|
function copyDir(src, dest, opts, cb) {
|
|
3232
|
-
|
|
3232
|
+
fs7.readdir(src, (err, items) => {
|
|
3233
3233
|
if (err) return cb(err);
|
|
3234
3234
|
return copyDirItems(items, src, dest, opts, cb);
|
|
3235
3235
|
});
|
|
@@ -3252,13 +3252,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3252
3252
|
});
|
|
3253
3253
|
}
|
|
3254
3254
|
function onLink(destStat, src, dest, opts, cb) {
|
|
3255
|
-
|
|
3255
|
+
fs7.readlink(src, (err, resolvedSrc) => {
|
|
3256
3256
|
if (err) return cb(err);
|
|
3257
3257
|
if (opts.dereference) resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3258
|
-
if (!destStat) return
|
|
3259
|
-
else
|
|
3258
|
+
if (!destStat) return fs7.symlink(resolvedSrc, dest, cb);
|
|
3259
|
+
else fs7.readlink(dest, (err2, resolvedDest) => {
|
|
3260
3260
|
if (err2) {
|
|
3261
|
-
if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return
|
|
3261
|
+
if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs7.symlink(resolvedSrc, dest, cb);
|
|
3262
3262
|
return cb(err2);
|
|
3263
3263
|
}
|
|
3264
3264
|
if (opts.dereference) resolvedDest = path7.resolve(process.cwd(), resolvedDest);
|
|
@@ -3269,9 +3269,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3269
3269
|
});
|
|
3270
3270
|
}
|
|
3271
3271
|
function copyLink(resolvedSrc, dest, cb) {
|
|
3272
|
-
|
|
3272
|
+
fs7.unlink(dest, (err) => {
|
|
3273
3273
|
if (err) return cb(err);
|
|
3274
|
-
return
|
|
3274
|
+
return fs7.symlink(resolvedSrc, dest, cb);
|
|
3275
3275
|
});
|
|
3276
3276
|
}
|
|
3277
3277
|
module2.exports = copy;
|
|
@@ -3281,7 +3281,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3281
3281
|
module2.exports = { copy: u(require_copy()) };
|
|
3282
3282
|
} });
|
|
3283
3283
|
var require_rimraf = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/rimraf.js"(exports2, module2) {
|
|
3284
|
-
var
|
|
3284
|
+
var fs7 = require_graceful_fs();
|
|
3285
3285
|
var path7 = require("path");
|
|
3286
3286
|
var assert7 = require("assert");
|
|
3287
3287
|
var isWindows = process.platform === "win32";
|
|
@@ -3294,9 +3294,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3294
3294
|
"rmdir",
|
|
3295
3295
|
"readdir"
|
|
3296
3296
|
].forEach((m) => {
|
|
3297
|
-
options[m] = options[m] ||
|
|
3297
|
+
options[m] = options[m] || fs7[m];
|
|
3298
3298
|
m = m + "Sync";
|
|
3299
|
-
options[m] = options[m] ||
|
|
3299
|
+
options[m] = options[m] || fs7[m];
|
|
3300
3300
|
});
|
|
3301
3301
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
3302
3302
|
}
|
|
@@ -3454,18 +3454,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3454
3454
|
rimraf.sync = rimrafSync;
|
|
3455
3455
|
} });
|
|
3456
3456
|
var require_remove = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
3457
|
-
var
|
|
3457
|
+
var fs7 = require_graceful_fs();
|
|
3458
3458
|
var u = require_universalify().fromCallback;
|
|
3459
3459
|
var rimraf = require_rimraf();
|
|
3460
3460
|
function remove2(path7, callback) {
|
|
3461
|
-
if (
|
|
3461
|
+
if (fs7.rm) return fs7.rm(path7, {
|
|
3462
3462
|
recursive: true,
|
|
3463
3463
|
force: true
|
|
3464
3464
|
}, callback);
|
|
3465
3465
|
rimraf(path7, callback);
|
|
3466
3466
|
}
|
|
3467
3467
|
function removeSync(path7) {
|
|
3468
|
-
if (
|
|
3468
|
+
if (fs7.rmSync) return fs7.rmSync(path7, {
|
|
3469
3469
|
recursive: true,
|
|
3470
3470
|
force: true
|
|
3471
3471
|
});
|
|
@@ -3478,14 +3478,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3478
3478
|
} });
|
|
3479
3479
|
var require_empty = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
3480
3480
|
var u = require_universalify().fromPromise;
|
|
3481
|
-
var
|
|
3481
|
+
var fs7 = require_fs();
|
|
3482
3482
|
var path7 = require("path");
|
|
3483
3483
|
var mkdir = require_mkdirs();
|
|
3484
3484
|
var remove2 = require_remove();
|
|
3485
3485
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
3486
3486
|
let items;
|
|
3487
3487
|
try {
|
|
3488
|
-
items = await
|
|
3488
|
+
items = await fs7.readdir(dir);
|
|
3489
3489
|
} catch {
|
|
3490
3490
|
return mkdir.mkdirs(dir);
|
|
3491
3491
|
}
|
|
@@ -3494,7 +3494,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3494
3494
|
function emptyDirSync(dir) {
|
|
3495
3495
|
let items;
|
|
3496
3496
|
try {
|
|
3497
|
-
items =
|
|
3497
|
+
items = fs7.readdirSync(dir);
|
|
3498
3498
|
} catch {
|
|
3499
3499
|
return mkdir.mkdirsSync(dir);
|
|
3500
3500
|
}
|
|
@@ -3513,19 +3513,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3513
3513
|
var require_file = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
3514
3514
|
var u = require_universalify().fromCallback;
|
|
3515
3515
|
var path7 = require("path");
|
|
3516
|
-
var
|
|
3516
|
+
var fs7 = require_graceful_fs();
|
|
3517
3517
|
var mkdir = require_mkdirs();
|
|
3518
3518
|
function createFile(file, callback) {
|
|
3519
3519
|
function makeFile() {
|
|
3520
|
-
|
|
3520
|
+
fs7.writeFile(file, "", (err) => {
|
|
3521
3521
|
if (err) return callback(err);
|
|
3522
3522
|
callback();
|
|
3523
3523
|
});
|
|
3524
3524
|
}
|
|
3525
|
-
|
|
3525
|
+
fs7.stat(file, (err, stats) => {
|
|
3526
3526
|
if (!err && stats.isFile()) return callback();
|
|
3527
3527
|
const dir = path7.dirname(file);
|
|
3528
|
-
|
|
3528
|
+
fs7.stat(dir, (err2, stats2) => {
|
|
3529
3529
|
if (err2) {
|
|
3530
3530
|
if (err2.code === "ENOENT") return mkdir.mkdirs(dir, (err3) => {
|
|
3531
3531
|
if (err3) return callback(err3);
|
|
@@ -3534,7 +3534,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3534
3534
|
return callback(err2);
|
|
3535
3535
|
}
|
|
3536
3536
|
if (stats2.isDirectory()) makeFile();
|
|
3537
|
-
else
|
|
3537
|
+
else fs7.readdir(dir, (err3) => {
|
|
3538
3538
|
if (err3) return callback(err3);
|
|
3539
3539
|
});
|
|
3540
3540
|
});
|
|
@@ -3543,17 +3543,17 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3543
3543
|
function createFileSync(file) {
|
|
3544
3544
|
let stats;
|
|
3545
3545
|
try {
|
|
3546
|
-
stats =
|
|
3546
|
+
stats = fs7.statSync(file);
|
|
3547
3547
|
} catch {}
|
|
3548
3548
|
if (stats && stats.isFile()) return;
|
|
3549
3549
|
const dir = path7.dirname(file);
|
|
3550
3550
|
try {
|
|
3551
|
-
if (!
|
|
3551
|
+
if (!fs7.statSync(dir).isDirectory()) fs7.readdirSync(dir);
|
|
3552
3552
|
} catch (err) {
|
|
3553
3553
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
3554
3554
|
else throw err;
|
|
3555
3555
|
}
|
|
3556
|
-
|
|
3556
|
+
fs7.writeFileSync(file, "");
|
|
3557
3557
|
}
|
|
3558
3558
|
module2.exports = {
|
|
3559
3559
|
createFile: u(createFile),
|
|
@@ -3563,19 +3563,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3563
3563
|
var require_link = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
3564
3564
|
var u = require_universalify().fromCallback;
|
|
3565
3565
|
var path7 = require("path");
|
|
3566
|
-
var
|
|
3566
|
+
var fs7 = require_graceful_fs();
|
|
3567
3567
|
var mkdir = require_mkdirs();
|
|
3568
3568
|
var pathExists = require_path_exists().pathExists;
|
|
3569
3569
|
var { areIdentical } = require_stat();
|
|
3570
3570
|
function createLink(srcpath, dstpath, callback) {
|
|
3571
3571
|
function makeLink(srcpath2, dstpath2) {
|
|
3572
|
-
|
|
3572
|
+
fs7.link(srcpath2, dstpath2, (err) => {
|
|
3573
3573
|
if (err) return callback(err);
|
|
3574
3574
|
callback(null);
|
|
3575
3575
|
});
|
|
3576
3576
|
}
|
|
3577
|
-
|
|
3578
|
-
|
|
3577
|
+
fs7.lstat(dstpath, (_, dstStat) => {
|
|
3578
|
+
fs7.lstat(srcpath, (err, srcStat) => {
|
|
3579
3579
|
if (err) {
|
|
3580
3580
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
3581
3581
|
return callback(err);
|
|
@@ -3596,19 +3596,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3596
3596
|
function createLinkSync(srcpath, dstpath) {
|
|
3597
3597
|
let dstStat;
|
|
3598
3598
|
try {
|
|
3599
|
-
dstStat =
|
|
3599
|
+
dstStat = fs7.lstatSync(dstpath);
|
|
3600
3600
|
} catch {}
|
|
3601
3601
|
try {
|
|
3602
|
-
const srcStat =
|
|
3602
|
+
const srcStat = fs7.lstatSync(srcpath);
|
|
3603
3603
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
3604
3604
|
} catch (err) {
|
|
3605
3605
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
3606
3606
|
throw err;
|
|
3607
3607
|
}
|
|
3608
3608
|
const dir = path7.dirname(dstpath);
|
|
3609
|
-
if (
|
|
3609
|
+
if (fs7.existsSync(dir)) return fs7.linkSync(srcpath, dstpath);
|
|
3610
3610
|
mkdir.mkdirsSync(dir);
|
|
3611
|
-
return
|
|
3611
|
+
return fs7.linkSync(srcpath, dstpath);
|
|
3612
3612
|
}
|
|
3613
3613
|
module2.exports = {
|
|
3614
3614
|
createLink: u(createLink),
|
|
@@ -3617,10 +3617,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3617
3617
|
} });
|
|
3618
3618
|
var require_symlink_paths = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
3619
3619
|
var path7 = require("path");
|
|
3620
|
-
var
|
|
3620
|
+
var fs7 = require_graceful_fs();
|
|
3621
3621
|
var pathExists = require_path_exists().pathExists;
|
|
3622
3622
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
3623
|
-
if (path7.isAbsolute(srcpath)) return
|
|
3623
|
+
if (path7.isAbsolute(srcpath)) return fs7.lstat(srcpath, (err) => {
|
|
3624
3624
|
if (err) {
|
|
3625
3625
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
3626
3626
|
return callback(err);
|
|
@@ -3639,7 +3639,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3639
3639
|
toCwd: relativeToDst,
|
|
3640
3640
|
toDst: srcpath
|
|
3641
3641
|
});
|
|
3642
|
-
else return
|
|
3642
|
+
else return fs7.lstat(srcpath, (err2) => {
|
|
3643
3643
|
if (err2) {
|
|
3644
3644
|
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
3645
3645
|
return callback(err2);
|
|
@@ -3655,7 +3655,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3655
3655
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
3656
3656
|
let exists;
|
|
3657
3657
|
if (path7.isAbsolute(srcpath)) {
|
|
3658
|
-
exists =
|
|
3658
|
+
exists = fs7.existsSync(srcpath);
|
|
3659
3659
|
if (!exists) throw new Error("absolute srcpath does not exist");
|
|
3660
3660
|
return {
|
|
3661
3661
|
toCwd: srcpath,
|
|
@@ -3664,13 +3664,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3664
3664
|
} else {
|
|
3665
3665
|
const dstdir = path7.dirname(dstpath);
|
|
3666
3666
|
const relativeToDst = path7.join(dstdir, srcpath);
|
|
3667
|
-
exists =
|
|
3667
|
+
exists = fs7.existsSync(relativeToDst);
|
|
3668
3668
|
if (exists) return {
|
|
3669
3669
|
toCwd: relativeToDst,
|
|
3670
3670
|
toDst: srcpath
|
|
3671
3671
|
};
|
|
3672
3672
|
else {
|
|
3673
|
-
exists =
|
|
3673
|
+
exists = fs7.existsSync(srcpath);
|
|
3674
3674
|
if (!exists) throw new Error("relative srcpath does not exist");
|
|
3675
3675
|
return {
|
|
3676
3676
|
toCwd: srcpath,
|
|
@@ -3685,12 +3685,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3685
3685
|
};
|
|
3686
3686
|
} });
|
|
3687
3687
|
var require_symlink_type = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
3688
|
-
var
|
|
3688
|
+
var fs7 = require_graceful_fs();
|
|
3689
3689
|
function symlinkType(srcpath, type, callback) {
|
|
3690
3690
|
callback = typeof type === "function" ? type : callback;
|
|
3691
3691
|
type = typeof type === "function" ? false : type;
|
|
3692
3692
|
if (type) return callback(null, type);
|
|
3693
|
-
|
|
3693
|
+
fs7.lstat(srcpath, (err, stats) => {
|
|
3694
3694
|
if (err) return callback(null, "file");
|
|
3695
3695
|
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
3696
3696
|
callback(null, type);
|
|
@@ -3700,7 +3700,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3700
3700
|
let stats;
|
|
3701
3701
|
if (type) return type;
|
|
3702
3702
|
try {
|
|
3703
|
-
stats =
|
|
3703
|
+
stats = fs7.lstatSync(srcpath);
|
|
3704
3704
|
} catch {
|
|
3705
3705
|
return "file";
|
|
3706
3706
|
}
|
|
@@ -3714,7 +3714,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3714
3714
|
var require_symlink = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
3715
3715
|
var u = require_universalify().fromCallback;
|
|
3716
3716
|
var path7 = require("path");
|
|
3717
|
-
var
|
|
3717
|
+
var fs7 = require_fs();
|
|
3718
3718
|
var _mkdirs = require_mkdirs();
|
|
3719
3719
|
var mkdirs = _mkdirs.mkdirs;
|
|
3720
3720
|
var mkdirsSync = _mkdirs.mkdirsSync;
|
|
@@ -3729,8 +3729,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3729
3729
|
function createSymlink(srcpath, dstpath, type, callback) {
|
|
3730
3730
|
callback = typeof type === "function" ? type : callback;
|
|
3731
3731
|
type = typeof type === "function" ? false : type;
|
|
3732
|
-
|
|
3733
|
-
if (!err && stats.isSymbolicLink()) Promise.all([
|
|
3732
|
+
fs7.lstat(dstpath, (err, stats) => {
|
|
3733
|
+
if (!err && stats.isSymbolicLink()) Promise.all([fs7.stat(srcpath), fs7.stat(dstpath)]).then(([srcStat, dstStat]) => {
|
|
3734
3734
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
3735
3735
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
3736
3736
|
});
|
|
@@ -3746,10 +3746,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3746
3746
|
const dir = path7.dirname(dstpath);
|
|
3747
3747
|
pathExists(dir, (err3, dirExists) => {
|
|
3748
3748
|
if (err3) return callback(err3);
|
|
3749
|
-
if (dirExists) return
|
|
3749
|
+
if (dirExists) return fs7.symlink(srcpath, dstpath, type2, callback);
|
|
3750
3750
|
mkdirs(dir, (err4) => {
|
|
3751
3751
|
if (err4) return callback(err4);
|
|
3752
|
-
|
|
3752
|
+
fs7.symlink(srcpath, dstpath, type2, callback);
|
|
3753
3753
|
});
|
|
3754
3754
|
});
|
|
3755
3755
|
});
|
|
@@ -3758,18 +3758,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3758
3758
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
3759
3759
|
let stats;
|
|
3760
3760
|
try {
|
|
3761
|
-
stats =
|
|
3761
|
+
stats = fs7.lstatSync(dstpath);
|
|
3762
3762
|
} catch {}
|
|
3763
3763
|
if (stats && stats.isSymbolicLink()) {
|
|
3764
|
-
if (areIdentical(
|
|
3764
|
+
if (areIdentical(fs7.statSync(srcpath), fs7.statSync(dstpath))) return;
|
|
3765
3765
|
}
|
|
3766
3766
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
3767
3767
|
srcpath = relative.toDst;
|
|
3768
3768
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
3769
3769
|
const dir = path7.dirname(dstpath);
|
|
3770
|
-
if (
|
|
3770
|
+
if (fs7.existsSync(dir)) return fs7.symlinkSync(srcpath, dstpath, type);
|
|
3771
3771
|
mkdirsSync(dir);
|
|
3772
|
-
return
|
|
3772
|
+
return fs7.symlinkSync(srcpath, dstpath, type);
|
|
3773
3773
|
}
|
|
3774
3774
|
module2.exports = {
|
|
3775
3775
|
createSymlink: u(createSymlink),
|
|
@@ -3820,9 +3820,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3820
3820
|
var { stringify, stripBom } = require_utils2();
|
|
3821
3821
|
async function _readFile(file, options = {}) {
|
|
3822
3822
|
if (typeof options === "string") options = { encoding: options };
|
|
3823
|
-
const
|
|
3823
|
+
const fs7 = options.fs || _fs;
|
|
3824
3824
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
3825
|
-
let data = await universalify.fromCallback(
|
|
3825
|
+
let data = await universalify.fromCallback(fs7.readFile)(file, options);
|
|
3826
3826
|
data = stripBom(data);
|
|
3827
3827
|
let obj;
|
|
3828
3828
|
try {
|
|
@@ -3838,10 +3838,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3838
3838
|
var readFile4 = universalify.fromPromise(_readFile);
|
|
3839
3839
|
function readFileSync(file, options = {}) {
|
|
3840
3840
|
if (typeof options === "string") options = { encoding: options };
|
|
3841
|
-
const
|
|
3841
|
+
const fs7 = options.fs || _fs;
|
|
3842
3842
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
3843
3843
|
try {
|
|
3844
|
-
let content =
|
|
3844
|
+
let content = fs7.readFileSync(file, options);
|
|
3845
3845
|
content = stripBom(content);
|
|
3846
3846
|
return JSON.parse(content, options.reviver);
|
|
3847
3847
|
} catch (err) {
|
|
@@ -3852,15 +3852,15 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3852
3852
|
}
|
|
3853
3853
|
}
|
|
3854
3854
|
async function _writeFile(file, obj, options = {}) {
|
|
3855
|
-
const
|
|
3855
|
+
const fs7 = options.fs || _fs;
|
|
3856
3856
|
const str = stringify(obj, options);
|
|
3857
|
-
await universalify.fromCallback(
|
|
3857
|
+
await universalify.fromCallback(fs7.writeFile)(file, str, options);
|
|
3858
3858
|
}
|
|
3859
3859
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
3860
3860
|
function writeFileSync(file, obj, options = {}) {
|
|
3861
|
-
const
|
|
3861
|
+
const fs7 = options.fs || _fs;
|
|
3862
3862
|
const str = stringify(obj, options);
|
|
3863
|
-
return
|
|
3863
|
+
return fs7.writeFileSync(file, str, options);
|
|
3864
3864
|
}
|
|
3865
3865
|
module2.exports = {
|
|
3866
3866
|
readFile: readFile4,
|
|
@@ -3880,7 +3880,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3880
3880
|
} });
|
|
3881
3881
|
var require_output = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/output/index.js"(exports2, module2) {
|
|
3882
3882
|
var u = require_universalify().fromCallback;
|
|
3883
|
-
var
|
|
3883
|
+
var fs7 = require_graceful_fs();
|
|
3884
3884
|
var path7 = require("path");
|
|
3885
3885
|
var mkdir = require_mkdirs();
|
|
3886
3886
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -3892,18 +3892,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3892
3892
|
const dir = path7.dirname(file);
|
|
3893
3893
|
pathExists(dir, (err, itDoes) => {
|
|
3894
3894
|
if (err) return callback(err);
|
|
3895
|
-
if (itDoes) return
|
|
3895
|
+
if (itDoes) return fs7.writeFile(file, data, encoding, callback);
|
|
3896
3896
|
mkdir.mkdirs(dir, (err2) => {
|
|
3897
3897
|
if (err2) return callback(err2);
|
|
3898
|
-
|
|
3898
|
+
fs7.writeFile(file, data, encoding, callback);
|
|
3899
3899
|
});
|
|
3900
3900
|
});
|
|
3901
3901
|
}
|
|
3902
3902
|
function outputFileSync(file, ...args) {
|
|
3903
3903
|
const dir = path7.dirname(file);
|
|
3904
|
-
if (
|
|
3904
|
+
if (fs7.existsSync(dir)) return fs7.writeFileSync(file, ...args);
|
|
3905
3905
|
mkdir.mkdirsSync(dir);
|
|
3906
|
-
|
|
3906
|
+
fs7.writeFileSync(file, ...args);
|
|
3907
3907
|
}
|
|
3908
3908
|
module2.exports = {
|
|
3909
3909
|
outputFile: u(outputFile),
|
|
@@ -3940,7 +3940,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3940
3940
|
module2.exports = jsonFile;
|
|
3941
3941
|
} });
|
|
3942
3942
|
var require_move_sync = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports2, module2) {
|
|
3943
|
-
var
|
|
3943
|
+
var fs7 = require_graceful_fs();
|
|
3944
3944
|
var path7 = require("path");
|
|
3945
3945
|
var copySync = require_copy_sync2().copySync;
|
|
3946
3946
|
var removeSync = require_remove().removeSync;
|
|
@@ -3964,12 +3964,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3964
3964
|
removeSync(dest);
|
|
3965
3965
|
return rename2(src, dest, overwrite);
|
|
3966
3966
|
}
|
|
3967
|
-
if (
|
|
3967
|
+
if (fs7.existsSync(dest)) throw new Error("dest already exists.");
|
|
3968
3968
|
return rename2(src, dest, overwrite);
|
|
3969
3969
|
}
|
|
3970
3970
|
function rename2(src, dest, overwrite) {
|
|
3971
3971
|
try {
|
|
3972
|
-
|
|
3972
|
+
fs7.renameSync(src, dest);
|
|
3973
3973
|
} catch (err) {
|
|
3974
3974
|
if (err.code !== "EXDEV") throw err;
|
|
3975
3975
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -3988,7 +3988,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3988
3988
|
module2.exports = { moveSync: require_move_sync() };
|
|
3989
3989
|
} });
|
|
3990
3990
|
var require_move = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
3991
|
-
var
|
|
3991
|
+
var fs7 = require_graceful_fs();
|
|
3992
3992
|
var path7 = require("path");
|
|
3993
3993
|
var copy = require_copy2().copy;
|
|
3994
3994
|
var remove2 = require_remove().remove;
|
|
@@ -4031,7 +4031,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
4031
4031
|
});
|
|
4032
4032
|
}
|
|
4033
4033
|
function rename2(src, dest, overwrite, cb) {
|
|
4034
|
-
|
|
4034
|
+
fs7.rename(src, dest, (err) => {
|
|
4035
4035
|
if (!err) return cb();
|
|
4036
4036
|
if (err.code !== "EXDEV") return cb(err);
|
|
4037
4037
|
return moveAcrossDevice(src, dest, overwrite, cb);
|
|
@@ -42882,7 +42882,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
42882
42882
|
module2.exports = crc32;
|
|
42883
42883
|
} });
|
|
42884
42884
|
var require_yazl = __commonJS({ "../../node_modules/.pnpm/yazl@2.5.1/node_modules/yazl/index.js"(exports2) {
|
|
42885
|
-
var
|
|
42885
|
+
var fs7 = require("fs");
|
|
42886
42886
|
var Transform = require("stream").Transform;
|
|
42887
42887
|
var PassThrough = require("stream").PassThrough;
|
|
42888
42888
|
var zlib = require("zlib");
|
|
@@ -42906,14 +42906,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
42906
42906
|
if (options == null) options = {};
|
|
42907
42907
|
var entry = new Entry(metadataPath, false, options);
|
|
42908
42908
|
self2.entries.push(entry);
|
|
42909
|
-
|
|
42909
|
+
fs7.stat(realPath, function(err, stats) {
|
|
42910
42910
|
if (err) return self2.emit("error", err);
|
|
42911
42911
|
if (!stats.isFile()) return self2.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
|
|
42912
42912
|
entry.uncompressedSize = stats.size;
|
|
42913
42913
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
42914
42914
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
42915
42915
|
entry.setFileDataPumpFunction(function() {
|
|
42916
|
-
var readStream =
|
|
42916
|
+
var readStream = fs7.createReadStream(realPath);
|
|
42917
42917
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
42918
42918
|
readStream.on("error", function(err2) {
|
|
42919
42919
|
self2.emit("error", err2);
|
|
@@ -44248,7 +44248,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44248
44248
|
var require_old = __commonJS({ "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
|
|
44249
44249
|
var pathModule = require("path");
|
|
44250
44250
|
var isWindows = process.platform === "win32";
|
|
44251
|
-
var
|
|
44251
|
+
var fs7 = require("fs");
|
|
44252
44252
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
44253
44253
|
function rethrow() {
|
|
44254
44254
|
var callback;
|
|
@@ -44301,7 +44301,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44301
44301
|
base = m[0];
|
|
44302
44302
|
previous = "";
|
|
44303
44303
|
if (isWindows && !knownHard[base]) {
|
|
44304
|
-
|
|
44304
|
+
fs7.lstatSync(base);
|
|
44305
44305
|
knownHard[base] = true;
|
|
44306
44306
|
}
|
|
44307
44307
|
}
|
|
@@ -44316,7 +44316,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44316
44316
|
var resolvedLink;
|
|
44317
44317
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) resolvedLink = cache[base];
|
|
44318
44318
|
else {
|
|
44319
|
-
var stat =
|
|
44319
|
+
var stat = fs7.lstatSync(base);
|
|
44320
44320
|
if (!stat.isSymbolicLink()) {
|
|
44321
44321
|
knownHard[base] = true;
|
|
44322
44322
|
if (cache) cache[base] = base;
|
|
@@ -44328,8 +44328,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44328
44328
|
if (seenLinks.hasOwnProperty(id)) linkTarget = seenLinks[id];
|
|
44329
44329
|
}
|
|
44330
44330
|
if (linkTarget === null) {
|
|
44331
|
-
|
|
44332
|
-
linkTarget =
|
|
44331
|
+
fs7.statSync(base);
|
|
44332
|
+
linkTarget = fs7.readlinkSync(base);
|
|
44333
44333
|
}
|
|
44334
44334
|
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
44335
44335
|
if (cache) cache[base] = resolvedLink;
|
|
@@ -44360,7 +44360,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44360
44360
|
current = m[0];
|
|
44361
44361
|
base = m[0];
|
|
44362
44362
|
previous = "";
|
|
44363
|
-
if (isWindows && !knownHard[base])
|
|
44363
|
+
if (isWindows && !knownHard[base]) fs7.lstat(base, function(err) {
|
|
44364
44364
|
if (err) return cb(err);
|
|
44365
44365
|
knownHard[base] = true;
|
|
44366
44366
|
LOOP();
|
|
@@ -44380,7 +44380,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44380
44380
|
pos = nextPartRe.lastIndex;
|
|
44381
44381
|
if (knownHard[base] || cache && cache[base] === base) return process.nextTick(LOOP);
|
|
44382
44382
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) return gotResolvedLink(cache[base]);
|
|
44383
|
-
return
|
|
44383
|
+
return fs7.lstat(base, gotStat);
|
|
44384
44384
|
}
|
|
44385
44385
|
function gotStat(err, stat) {
|
|
44386
44386
|
if (err) return cb(err);
|
|
@@ -44393,9 +44393,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44393
44393
|
var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
|
|
44394
44394
|
if (seenLinks.hasOwnProperty(id)) return gotTarget(null, seenLinks[id], base);
|
|
44395
44395
|
}
|
|
44396
|
-
|
|
44396
|
+
fs7.stat(base, function(err2) {
|
|
44397
44397
|
if (err2) return cb(err2);
|
|
44398
|
-
|
|
44398
|
+
fs7.readlink(base, function(err3, target) {
|
|
44399
44399
|
if (!isWindows) seenLinks[id] = target;
|
|
44400
44400
|
gotTarget(err3, target);
|
|
44401
44401
|
});
|
|
@@ -44420,9 +44420,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44420
44420
|
realpath.realpathSync = realpathSync;
|
|
44421
44421
|
realpath.monkeypatch = monkeypatch;
|
|
44422
44422
|
realpath.unmonkeypatch = unmonkeypatch;
|
|
44423
|
-
var
|
|
44424
|
-
var origRealpath =
|
|
44425
|
-
var origRealpathSync =
|
|
44423
|
+
var fs7 = require("fs");
|
|
44424
|
+
var origRealpath = fs7.realpath;
|
|
44425
|
+
var origRealpathSync = fs7.realpathSync;
|
|
44426
44426
|
var version = process.version;
|
|
44427
44427
|
var ok = /^v[0-5]\./.test(version);
|
|
44428
44428
|
var old = require_old();
|
|
@@ -44450,12 +44450,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44450
44450
|
}
|
|
44451
44451
|
}
|
|
44452
44452
|
function monkeypatch() {
|
|
44453
|
-
|
|
44454
|
-
|
|
44453
|
+
fs7.realpath = realpath;
|
|
44454
|
+
fs7.realpathSync = realpathSync;
|
|
44455
44455
|
}
|
|
44456
44456
|
function unmonkeypatch() {
|
|
44457
|
-
|
|
44458
|
-
|
|
44457
|
+
fs7.realpath = origRealpath;
|
|
44458
|
+
fs7.realpathSync = origRealpathSync;
|
|
44459
44459
|
}
|
|
44460
44460
|
} });
|
|
44461
44461
|
var require_path = __commonJS({ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports2, module2) {
|
|
@@ -45072,7 +45072,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45072
45072
|
function ownProp(obj, field) {
|
|
45073
45073
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
45074
45074
|
}
|
|
45075
|
-
var
|
|
45075
|
+
var fs7 = require("fs");
|
|
45076
45076
|
var path7 = require("path");
|
|
45077
45077
|
var minimatch2 = require_minimatch2();
|
|
45078
45078
|
var isAbsolute = require("path").isAbsolute;
|
|
@@ -45117,7 +45117,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45117
45117
|
self2.stat = !!options.stat;
|
|
45118
45118
|
self2.noprocess = !!options.noprocess;
|
|
45119
45119
|
self2.absolute = !!options.absolute;
|
|
45120
|
-
self2.fs = options.fs ||
|
|
45120
|
+
self2.fs = options.fs || fs7;
|
|
45121
45121
|
self2.maxLength = options.maxLength || Infinity;
|
|
45122
45122
|
self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
|
45123
45123
|
self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
|
@@ -45980,7 +45980,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45980
45980
|
var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
45981
45981
|
module2.exports = isexe;
|
|
45982
45982
|
isexe.sync = sync;
|
|
45983
|
-
var
|
|
45983
|
+
var fs7 = require("fs");
|
|
45984
45984
|
function checkPathExt(path7, options) {
|
|
45985
45985
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
45986
45986
|
if (!pathext) return true;
|
|
@@ -45997,25 +45997,25 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45997
45997
|
return checkPathExt(path7, options);
|
|
45998
45998
|
}
|
|
45999
45999
|
function isexe(path7, options, cb) {
|
|
46000
|
-
|
|
46000
|
+
fs7.stat(path7, function(er, stat) {
|
|
46001
46001
|
cb(er, er ? false : checkStat(stat, path7, options));
|
|
46002
46002
|
});
|
|
46003
46003
|
}
|
|
46004
46004
|
function sync(path7, options) {
|
|
46005
|
-
return checkStat(
|
|
46005
|
+
return checkStat(fs7.statSync(path7), path7, options);
|
|
46006
46006
|
}
|
|
46007
46007
|
} });
|
|
46008
46008
|
var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
|
|
46009
46009
|
module2.exports = isexe;
|
|
46010
46010
|
isexe.sync = sync;
|
|
46011
|
-
var
|
|
46011
|
+
var fs7 = require("fs");
|
|
46012
46012
|
function isexe(path7, options, cb) {
|
|
46013
|
-
|
|
46013
|
+
fs7.stat(path7, function(er, stat) {
|
|
46014
46014
|
cb(er, er ? false : checkStat(stat, options));
|
|
46015
46015
|
});
|
|
46016
46016
|
}
|
|
46017
46017
|
function sync(path7, options) {
|
|
46018
|
-
return checkStat(
|
|
46018
|
+
return checkStat(fs7.statSync(path7), options);
|
|
46019
46019
|
}
|
|
46020
46020
|
function checkStat(stat, options) {
|
|
46021
46021
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -46034,7 +46034,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46034
46034
|
}
|
|
46035
46035
|
} });
|
|
46036
46036
|
var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
46037
|
-
var
|
|
46037
|
+
var fs7 = require("fs");
|
|
46038
46038
|
var core;
|
|
46039
46039
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
46040
46040
|
else core = require_mode();
|
|
@@ -46227,7 +46227,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46227
46227
|
};
|
|
46228
46228
|
} });
|
|
46229
46229
|
var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
46230
|
-
var
|
|
46230
|
+
var fs7 = require("fs");
|
|
46231
46231
|
var shebangCommand = require_shebang_command();
|
|
46232
46232
|
function readShebang(command) {
|
|
46233
46233
|
const size = 150;
|
|
@@ -46239,9 +46239,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46239
46239
|
}
|
|
46240
46240
|
let fd;
|
|
46241
46241
|
try {
|
|
46242
|
-
fd =
|
|
46243
|
-
|
|
46244
|
-
|
|
46242
|
+
fd = fs7.openSync(command, "r");
|
|
46243
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
46244
|
+
fs7.closeSync(fd);
|
|
46245
46245
|
} catch (e) {}
|
|
46246
46246
|
return shebangCommand(buffer.toString());
|
|
46247
46247
|
}
|
|
@@ -47081,7 +47081,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47081
47081
|
var escape = require_escape();
|
|
47082
47082
|
var readShebang = require_readShebang();
|
|
47083
47083
|
var semver = require_semver();
|
|
47084
|
-
var
|
|
47084
|
+
var isWin3 = process.platform === "win32";
|
|
47085
47085
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
47086
47086
|
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
47087
47087
|
var supportsShellOption = niceTry(() => semver.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
|
|
@@ -47096,7 +47096,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47096
47096
|
return parsed.file;
|
|
47097
47097
|
}
|
|
47098
47098
|
function parseNonShell(parsed) {
|
|
47099
|
-
if (!
|
|
47099
|
+
if (!isWin3) return parsed;
|
|
47100
47100
|
const commandFile = detectShebang(parsed);
|
|
47101
47101
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
47102
47102
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -47118,7 +47118,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47118
47118
|
function parseShell(parsed) {
|
|
47119
47119
|
if (supportsShellOption) return parsed;
|
|
47120
47120
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
47121
|
-
if (
|
|
47121
|
+
if (isWin3) {
|
|
47122
47122
|
parsed.command = typeof parsed.options.shell === "string" ? parsed.options.shell : process.env.comspec || "cmd.exe";
|
|
47123
47123
|
parsed.args = [
|
|
47124
47124
|
"/d",
|
|
@@ -47157,7 +47157,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47157
47157
|
module2.exports = parse3;
|
|
47158
47158
|
} });
|
|
47159
47159
|
var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
47160
|
-
var
|
|
47160
|
+
var isWin3 = process.platform === "win32";
|
|
47161
47161
|
function notFoundError(original, syscall) {
|
|
47162
47162
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
47163
47163
|
code: "ENOENT",
|
|
@@ -47168,7 +47168,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47168
47168
|
});
|
|
47169
47169
|
}
|
|
47170
47170
|
function hookChildProcess(cp, parsed) {
|
|
47171
|
-
if (!
|
|
47171
|
+
if (!isWin3) return;
|
|
47172
47172
|
const originalEmit = cp.emit;
|
|
47173
47173
|
cp.emit = function(name, arg1) {
|
|
47174
47174
|
if (name === "exit") {
|
|
@@ -47179,11 +47179,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47179
47179
|
};
|
|
47180
47180
|
}
|
|
47181
47181
|
function verifyENOENT(status, parsed) {
|
|
47182
|
-
if (
|
|
47182
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
|
|
47183
47183
|
return null;
|
|
47184
47184
|
}
|
|
47185
47185
|
function verifyENOENTSync(status, parsed) {
|
|
47186
|
-
if (
|
|
47186
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
|
|
47187
47187
|
return null;
|
|
47188
47188
|
}
|
|
47189
47189
|
module2.exports = {
|
|
@@ -52814,6 +52814,1547 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52814
52814
|
}
|
|
52815
52815
|
module2.exports = (options) => new IgnoreBase(options);
|
|
52816
52816
|
} });
|
|
52817
|
+
var require_which2 = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
52818
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
52819
|
+
var path7 = require("path");
|
|
52820
|
+
var COLON = isWindows ? ";" : ":";
|
|
52821
|
+
var isexe = require_isexe();
|
|
52822
|
+
var getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
52823
|
+
var getPathInfo = (cmd, opt) => {
|
|
52824
|
+
const colon = opt.colon || COLON;
|
|
52825
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
|
|
52826
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
52827
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
52828
|
+
if (isWindows) {
|
|
52829
|
+
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift("");
|
|
52830
|
+
}
|
|
52831
|
+
return {
|
|
52832
|
+
pathEnv,
|
|
52833
|
+
pathExt,
|
|
52834
|
+
pathExtExe
|
|
52835
|
+
};
|
|
52836
|
+
};
|
|
52837
|
+
var which = (cmd, opt, cb) => {
|
|
52838
|
+
if (typeof opt === "function") {
|
|
52839
|
+
cb = opt;
|
|
52840
|
+
opt = {};
|
|
52841
|
+
}
|
|
52842
|
+
if (!opt) opt = {};
|
|
52843
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
52844
|
+
const found = [];
|
|
52845
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
52846
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
52847
|
+
const ppRaw = pathEnv[i];
|
|
52848
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
52849
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
52850
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
52851
|
+
});
|
|
52852
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
52853
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
52854
|
+
const ext = pathExt[ii];
|
|
52855
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
52856
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
52857
|
+
else return resolve(p + ext);
|
|
52858
|
+
return resolve(subStep(p, i, ii + 1));
|
|
52859
|
+
});
|
|
52860
|
+
});
|
|
52861
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
52862
|
+
};
|
|
52863
|
+
var whichSync = (cmd, opt) => {
|
|
52864
|
+
opt = opt || {};
|
|
52865
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
52866
|
+
const found = [];
|
|
52867
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
52868
|
+
const ppRaw = pathEnv[i];
|
|
52869
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
52870
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
52871
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
52872
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
52873
|
+
const cur = p + pathExt[j];
|
|
52874
|
+
try {
|
|
52875
|
+
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
52876
|
+
else return cur;
|
|
52877
|
+
} catch (ex) {}
|
|
52878
|
+
}
|
|
52879
|
+
}
|
|
52880
|
+
if (opt.all && found.length) return found;
|
|
52881
|
+
if (opt.nothrow) return null;
|
|
52882
|
+
throw getNotFoundError(cmd);
|
|
52883
|
+
};
|
|
52884
|
+
module2.exports = which;
|
|
52885
|
+
which.sync = whichSync;
|
|
52886
|
+
} });
|
|
52887
|
+
var require_path_key2 = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
|
|
52888
|
+
var pathKey = (options = {}) => {
|
|
52889
|
+
const environment = options.env || process.env;
|
|
52890
|
+
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
52891
|
+
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
52892
|
+
};
|
|
52893
|
+
module2.exports = pathKey;
|
|
52894
|
+
module2.exports.default = pathKey;
|
|
52895
|
+
} });
|
|
52896
|
+
var require_resolveCommand2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
52897
|
+
var path7 = require("path");
|
|
52898
|
+
var which = require_which2();
|
|
52899
|
+
var getPathKey = require_path_key2();
|
|
52900
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
52901
|
+
const env = parsed.options.env || process.env;
|
|
52902
|
+
const cwd = process.cwd();
|
|
52903
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
52904
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
52905
|
+
if (shouldSwitchCwd) try {
|
|
52906
|
+
process.chdir(parsed.options.cwd);
|
|
52907
|
+
} catch (err) {}
|
|
52908
|
+
let resolved;
|
|
52909
|
+
try {
|
|
52910
|
+
resolved = which.sync(parsed.command, {
|
|
52911
|
+
path: env[getPathKey({ env })],
|
|
52912
|
+
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
52913
|
+
});
|
|
52914
|
+
} catch (e) {} finally {
|
|
52915
|
+
if (shouldSwitchCwd) process.chdir(cwd);
|
|
52916
|
+
}
|
|
52917
|
+
if (resolved) resolved = path7.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
52918
|
+
return resolved;
|
|
52919
|
+
}
|
|
52920
|
+
function resolveCommand(parsed) {
|
|
52921
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
52922
|
+
}
|
|
52923
|
+
module2.exports = resolveCommand;
|
|
52924
|
+
} });
|
|
52925
|
+
var require_escape2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
|
|
52926
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
52927
|
+
function escapeCommand(arg) {
|
|
52928
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52929
|
+
return arg;
|
|
52930
|
+
}
|
|
52931
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
52932
|
+
arg = `${arg}`;
|
|
52933
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
52934
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
52935
|
+
arg = `"${arg}"`;
|
|
52936
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52937
|
+
if (doubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52938
|
+
return arg;
|
|
52939
|
+
}
|
|
52940
|
+
module2.exports.command = escapeCommand;
|
|
52941
|
+
module2.exports.argument = escapeArgument;
|
|
52942
|
+
} });
|
|
52943
|
+
var require_shebang_regex2 = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
|
|
52944
|
+
module2.exports = /^#!(.*)/;
|
|
52945
|
+
} });
|
|
52946
|
+
var require_shebang_command2 = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
|
|
52947
|
+
var shebangRegex = require_shebang_regex2();
|
|
52948
|
+
module2.exports = (string = "") => {
|
|
52949
|
+
const match = string.match(shebangRegex);
|
|
52950
|
+
if (!match) return null;
|
|
52951
|
+
const [path7, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
52952
|
+
const binary = path7.split("/").pop();
|
|
52953
|
+
if (binary === "env") return argument;
|
|
52954
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
52955
|
+
};
|
|
52956
|
+
} });
|
|
52957
|
+
var require_readShebang2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
52958
|
+
var fs7 = require("fs");
|
|
52959
|
+
var shebangCommand = require_shebang_command2();
|
|
52960
|
+
function readShebang(command) {
|
|
52961
|
+
const size = 150;
|
|
52962
|
+
const buffer = Buffer.alloc(size);
|
|
52963
|
+
let fd;
|
|
52964
|
+
try {
|
|
52965
|
+
fd = fs7.openSync(command, "r");
|
|
52966
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
52967
|
+
fs7.closeSync(fd);
|
|
52968
|
+
} catch (e) {}
|
|
52969
|
+
return shebangCommand(buffer.toString());
|
|
52970
|
+
}
|
|
52971
|
+
module2.exports = readShebang;
|
|
52972
|
+
} });
|
|
52973
|
+
var require_parse4 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
52974
|
+
var path7 = require("path");
|
|
52975
|
+
var resolveCommand = require_resolveCommand2();
|
|
52976
|
+
var escape = require_escape2();
|
|
52977
|
+
var readShebang = require_readShebang2();
|
|
52978
|
+
var isWin3 = process.platform === "win32";
|
|
52979
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
52980
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
52981
|
+
function detectShebang(parsed) {
|
|
52982
|
+
parsed.file = resolveCommand(parsed);
|
|
52983
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
52984
|
+
if (shebang) {
|
|
52985
|
+
parsed.args.unshift(parsed.file);
|
|
52986
|
+
parsed.command = shebang;
|
|
52987
|
+
return resolveCommand(parsed);
|
|
52988
|
+
}
|
|
52989
|
+
return parsed.file;
|
|
52990
|
+
}
|
|
52991
|
+
function parseNonShell(parsed) {
|
|
52992
|
+
if (!isWin3) return parsed;
|
|
52993
|
+
const commandFile = detectShebang(parsed);
|
|
52994
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
52995
|
+
if (parsed.options.forceShell || needsShell) {
|
|
52996
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
52997
|
+
parsed.command = path7.normalize(parsed.command);
|
|
52998
|
+
parsed.command = escape.command(parsed.command);
|
|
52999
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
53000
|
+
parsed.args = [
|
|
53001
|
+
"/d",
|
|
53002
|
+
"/s",
|
|
53003
|
+
"/c",
|
|
53004
|
+
`"${[parsed.command].concat(parsed.args).join(" ")}"`
|
|
53005
|
+
];
|
|
53006
|
+
parsed.command = process.env.comspec || "cmd.exe";
|
|
53007
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
53008
|
+
}
|
|
53009
|
+
return parsed;
|
|
53010
|
+
}
|
|
53011
|
+
function parse3(command, args, options) {
|
|
53012
|
+
if (args && !Array.isArray(args)) {
|
|
53013
|
+
options = args;
|
|
53014
|
+
args = null;
|
|
53015
|
+
}
|
|
53016
|
+
args = args ? args.slice(0) : [];
|
|
53017
|
+
options = Object.assign({}, options);
|
|
53018
|
+
const parsed = {
|
|
53019
|
+
command,
|
|
53020
|
+
args,
|
|
53021
|
+
options,
|
|
53022
|
+
file: void 0,
|
|
53023
|
+
original: {
|
|
53024
|
+
command,
|
|
53025
|
+
args
|
|
53026
|
+
}
|
|
53027
|
+
};
|
|
53028
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
53029
|
+
}
|
|
53030
|
+
module2.exports = parse3;
|
|
53031
|
+
} });
|
|
53032
|
+
var require_enoent2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
53033
|
+
var isWin3 = process.platform === "win32";
|
|
53034
|
+
function notFoundError(original, syscall) {
|
|
53035
|
+
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
53036
|
+
code: "ENOENT",
|
|
53037
|
+
errno: "ENOENT",
|
|
53038
|
+
syscall: `${syscall} ${original.command}`,
|
|
53039
|
+
path: original.command,
|
|
53040
|
+
spawnargs: original.args
|
|
53041
|
+
});
|
|
53042
|
+
}
|
|
53043
|
+
function hookChildProcess(cp, parsed) {
|
|
53044
|
+
if (!isWin3) return;
|
|
53045
|
+
const originalEmit = cp.emit;
|
|
53046
|
+
cp.emit = function(name, arg1) {
|
|
53047
|
+
if (name === "exit") {
|
|
53048
|
+
const err = verifyENOENT(arg1, parsed);
|
|
53049
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
53050
|
+
}
|
|
53051
|
+
return originalEmit.apply(cp, arguments);
|
|
53052
|
+
};
|
|
53053
|
+
}
|
|
53054
|
+
function verifyENOENT(status, parsed) {
|
|
53055
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
|
|
53056
|
+
return null;
|
|
53057
|
+
}
|
|
53058
|
+
function verifyENOENTSync(status, parsed) {
|
|
53059
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
|
|
53060
|
+
return null;
|
|
53061
|
+
}
|
|
53062
|
+
module2.exports = {
|
|
53063
|
+
hookChildProcess,
|
|
53064
|
+
verifyENOENT,
|
|
53065
|
+
verifyENOENTSync,
|
|
53066
|
+
notFoundError
|
|
53067
|
+
};
|
|
53068
|
+
} });
|
|
53069
|
+
var require_cross_spawn2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
|
|
53070
|
+
var cp = require("child_process");
|
|
53071
|
+
var parse3 = require_parse4();
|
|
53072
|
+
var enoent = require_enoent2();
|
|
53073
|
+
function spawn2(command, args, options) {
|
|
53074
|
+
const parsed = parse3(command, args, options);
|
|
53075
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
53076
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
53077
|
+
return spawned;
|
|
53078
|
+
}
|
|
53079
|
+
function spawnSync(command, args, options) {
|
|
53080
|
+
const parsed = parse3(command, args, options);
|
|
53081
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
53082
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
53083
|
+
return result;
|
|
53084
|
+
}
|
|
53085
|
+
module2.exports = spawn2;
|
|
53086
|
+
module2.exports.spawn = spawn2;
|
|
53087
|
+
module2.exports.sync = spawnSync;
|
|
53088
|
+
module2.exports._parse = parse3;
|
|
53089
|
+
module2.exports._enoent = enoent;
|
|
53090
|
+
} });
|
|
53091
|
+
var require_strip_final_newline = __commonJS({ "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) {
|
|
53092
|
+
module2.exports = (input) => {
|
|
53093
|
+
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
53094
|
+
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
53095
|
+
if (input[input.length - 1] === LF) input = input.slice(0, input.length - 1);
|
|
53096
|
+
if (input[input.length - 1] === CR) input = input.slice(0, input.length - 1);
|
|
53097
|
+
return input;
|
|
53098
|
+
};
|
|
53099
|
+
} });
|
|
53100
|
+
var require_npm_run_path = __commonJS({ "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
53101
|
+
var path7 = require("path");
|
|
53102
|
+
var pathKey = require_path_key2();
|
|
53103
|
+
var npmRunPath = (options) => {
|
|
53104
|
+
options = {
|
|
53105
|
+
cwd: process.cwd(),
|
|
53106
|
+
path: process.env[pathKey()],
|
|
53107
|
+
execPath: process.execPath,
|
|
53108
|
+
...options
|
|
53109
|
+
};
|
|
53110
|
+
let previous;
|
|
53111
|
+
let cwdPath = path7.resolve(options.cwd);
|
|
53112
|
+
const result = [];
|
|
53113
|
+
while (previous !== cwdPath) {
|
|
53114
|
+
result.push(path7.join(cwdPath, "node_modules/.bin"));
|
|
53115
|
+
previous = cwdPath;
|
|
53116
|
+
cwdPath = path7.resolve(cwdPath, "..");
|
|
53117
|
+
}
|
|
53118
|
+
const execPathDir = path7.resolve(options.cwd, options.execPath, "..");
|
|
53119
|
+
result.push(execPathDir);
|
|
53120
|
+
return result.concat(options.path).join(path7.delimiter);
|
|
53121
|
+
};
|
|
53122
|
+
module2.exports = npmRunPath;
|
|
53123
|
+
module2.exports.default = npmRunPath;
|
|
53124
|
+
module2.exports.env = (options) => {
|
|
53125
|
+
options = {
|
|
53126
|
+
env: process.env,
|
|
53127
|
+
...options
|
|
53128
|
+
};
|
|
53129
|
+
const env = { ...options.env };
|
|
53130
|
+
const path8 = pathKey({ env });
|
|
53131
|
+
options.path = env[path8];
|
|
53132
|
+
env[path8] = module2.exports(options);
|
|
53133
|
+
return env;
|
|
53134
|
+
};
|
|
53135
|
+
} });
|
|
53136
|
+
var require_mimic_fn = __commonJS({ "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) {
|
|
53137
|
+
var mimicFn = (to, from) => {
|
|
53138
|
+
for (const prop of Reflect.ownKeys(from)) Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
53139
|
+
return to;
|
|
53140
|
+
};
|
|
53141
|
+
module2.exports = mimicFn;
|
|
53142
|
+
module2.exports.default = mimicFn;
|
|
53143
|
+
} });
|
|
53144
|
+
var require_onetime = __commonJS({ "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) {
|
|
53145
|
+
var mimicFn = require_mimic_fn();
|
|
53146
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
53147
|
+
var onetime = (function_, options = {}) => {
|
|
53148
|
+
if (typeof function_ !== "function") throw new TypeError("Expected a function");
|
|
53149
|
+
let returnValue;
|
|
53150
|
+
let callCount = 0;
|
|
53151
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
53152
|
+
const onetime2 = function(...arguments_) {
|
|
53153
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
53154
|
+
if (callCount === 1) {
|
|
53155
|
+
returnValue = function_.apply(this, arguments_);
|
|
53156
|
+
function_ = null;
|
|
53157
|
+
} else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
53158
|
+
return returnValue;
|
|
53159
|
+
};
|
|
53160
|
+
mimicFn(onetime2, function_);
|
|
53161
|
+
calledFunctions.set(onetime2, callCount);
|
|
53162
|
+
return onetime2;
|
|
53163
|
+
};
|
|
53164
|
+
module2.exports = onetime;
|
|
53165
|
+
module2.exports.default = onetime;
|
|
53166
|
+
module2.exports.callCount = (function_) => {
|
|
53167
|
+
if (!calledFunctions.has(function_)) throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
53168
|
+
return calledFunctions.get(function_);
|
|
53169
|
+
};
|
|
53170
|
+
} });
|
|
53171
|
+
var require_core2 = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/core.js"(exports2) {
|
|
53172
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53173
|
+
exports2.SIGNALS = void 0;
|
|
53174
|
+
exports2.SIGNALS = [
|
|
53175
|
+
{
|
|
53176
|
+
name: "SIGHUP",
|
|
53177
|
+
number: 1,
|
|
53178
|
+
action: "terminate",
|
|
53179
|
+
description: "Terminal closed",
|
|
53180
|
+
standard: "posix"
|
|
53181
|
+
},
|
|
53182
|
+
{
|
|
53183
|
+
name: "SIGINT",
|
|
53184
|
+
number: 2,
|
|
53185
|
+
action: "terminate",
|
|
53186
|
+
description: "User interruption with CTRL-C",
|
|
53187
|
+
standard: "ansi"
|
|
53188
|
+
},
|
|
53189
|
+
{
|
|
53190
|
+
name: "SIGQUIT",
|
|
53191
|
+
number: 3,
|
|
53192
|
+
action: "core",
|
|
53193
|
+
description: "User interruption with CTRL-\\",
|
|
53194
|
+
standard: "posix"
|
|
53195
|
+
},
|
|
53196
|
+
{
|
|
53197
|
+
name: "SIGILL",
|
|
53198
|
+
number: 4,
|
|
53199
|
+
action: "core",
|
|
53200
|
+
description: "Invalid machine instruction",
|
|
53201
|
+
standard: "ansi"
|
|
53202
|
+
},
|
|
53203
|
+
{
|
|
53204
|
+
name: "SIGTRAP",
|
|
53205
|
+
number: 5,
|
|
53206
|
+
action: "core",
|
|
53207
|
+
description: "Debugger breakpoint",
|
|
53208
|
+
standard: "posix"
|
|
53209
|
+
},
|
|
53210
|
+
{
|
|
53211
|
+
name: "SIGABRT",
|
|
53212
|
+
number: 6,
|
|
53213
|
+
action: "core",
|
|
53214
|
+
description: "Aborted",
|
|
53215
|
+
standard: "ansi"
|
|
53216
|
+
},
|
|
53217
|
+
{
|
|
53218
|
+
name: "SIGIOT",
|
|
53219
|
+
number: 6,
|
|
53220
|
+
action: "core",
|
|
53221
|
+
description: "Aborted",
|
|
53222
|
+
standard: "bsd"
|
|
53223
|
+
},
|
|
53224
|
+
{
|
|
53225
|
+
name: "SIGBUS",
|
|
53226
|
+
number: 7,
|
|
53227
|
+
action: "core",
|
|
53228
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
53229
|
+
standard: "bsd"
|
|
53230
|
+
},
|
|
53231
|
+
{
|
|
53232
|
+
name: "SIGEMT",
|
|
53233
|
+
number: 7,
|
|
53234
|
+
action: "terminate",
|
|
53235
|
+
description: "Command should be emulated but is not implemented",
|
|
53236
|
+
standard: "other"
|
|
53237
|
+
},
|
|
53238
|
+
{
|
|
53239
|
+
name: "SIGFPE",
|
|
53240
|
+
number: 8,
|
|
53241
|
+
action: "core",
|
|
53242
|
+
description: "Floating point arithmetic error",
|
|
53243
|
+
standard: "ansi"
|
|
53244
|
+
},
|
|
53245
|
+
{
|
|
53246
|
+
name: "SIGKILL",
|
|
53247
|
+
number: 9,
|
|
53248
|
+
action: "terminate",
|
|
53249
|
+
description: "Forced termination",
|
|
53250
|
+
standard: "posix",
|
|
53251
|
+
forced: true
|
|
53252
|
+
},
|
|
53253
|
+
{
|
|
53254
|
+
name: "SIGUSR1",
|
|
53255
|
+
number: 10,
|
|
53256
|
+
action: "terminate",
|
|
53257
|
+
description: "Application-specific signal",
|
|
53258
|
+
standard: "posix"
|
|
53259
|
+
},
|
|
53260
|
+
{
|
|
53261
|
+
name: "SIGSEGV",
|
|
53262
|
+
number: 11,
|
|
53263
|
+
action: "core",
|
|
53264
|
+
description: "Segmentation fault",
|
|
53265
|
+
standard: "ansi"
|
|
53266
|
+
},
|
|
53267
|
+
{
|
|
53268
|
+
name: "SIGUSR2",
|
|
53269
|
+
number: 12,
|
|
53270
|
+
action: "terminate",
|
|
53271
|
+
description: "Application-specific signal",
|
|
53272
|
+
standard: "posix"
|
|
53273
|
+
},
|
|
53274
|
+
{
|
|
53275
|
+
name: "SIGPIPE",
|
|
53276
|
+
number: 13,
|
|
53277
|
+
action: "terminate",
|
|
53278
|
+
description: "Broken pipe or socket",
|
|
53279
|
+
standard: "posix"
|
|
53280
|
+
},
|
|
53281
|
+
{
|
|
53282
|
+
name: "SIGALRM",
|
|
53283
|
+
number: 14,
|
|
53284
|
+
action: "terminate",
|
|
53285
|
+
description: "Timeout or timer",
|
|
53286
|
+
standard: "posix"
|
|
53287
|
+
},
|
|
53288
|
+
{
|
|
53289
|
+
name: "SIGTERM",
|
|
53290
|
+
number: 15,
|
|
53291
|
+
action: "terminate",
|
|
53292
|
+
description: "Termination",
|
|
53293
|
+
standard: "ansi"
|
|
53294
|
+
},
|
|
53295
|
+
{
|
|
53296
|
+
name: "SIGSTKFLT",
|
|
53297
|
+
number: 16,
|
|
53298
|
+
action: "terminate",
|
|
53299
|
+
description: "Stack is empty or overflowed",
|
|
53300
|
+
standard: "other"
|
|
53301
|
+
},
|
|
53302
|
+
{
|
|
53303
|
+
name: "SIGCHLD",
|
|
53304
|
+
number: 17,
|
|
53305
|
+
action: "ignore",
|
|
53306
|
+
description: "Child process terminated, paused or unpaused",
|
|
53307
|
+
standard: "posix"
|
|
53308
|
+
},
|
|
53309
|
+
{
|
|
53310
|
+
name: "SIGCLD",
|
|
53311
|
+
number: 17,
|
|
53312
|
+
action: "ignore",
|
|
53313
|
+
description: "Child process terminated, paused or unpaused",
|
|
53314
|
+
standard: "other"
|
|
53315
|
+
},
|
|
53316
|
+
{
|
|
53317
|
+
name: "SIGCONT",
|
|
53318
|
+
number: 18,
|
|
53319
|
+
action: "unpause",
|
|
53320
|
+
description: "Unpaused",
|
|
53321
|
+
standard: "posix",
|
|
53322
|
+
forced: true
|
|
53323
|
+
},
|
|
53324
|
+
{
|
|
53325
|
+
name: "SIGSTOP",
|
|
53326
|
+
number: 19,
|
|
53327
|
+
action: "pause",
|
|
53328
|
+
description: "Paused",
|
|
53329
|
+
standard: "posix",
|
|
53330
|
+
forced: true
|
|
53331
|
+
},
|
|
53332
|
+
{
|
|
53333
|
+
name: "SIGTSTP",
|
|
53334
|
+
number: 20,
|
|
53335
|
+
action: "pause",
|
|
53336
|
+
description: "Paused using CTRL-Z or \"suspend\"",
|
|
53337
|
+
standard: "posix"
|
|
53338
|
+
},
|
|
53339
|
+
{
|
|
53340
|
+
name: "SIGTTIN",
|
|
53341
|
+
number: 21,
|
|
53342
|
+
action: "pause",
|
|
53343
|
+
description: "Background process cannot read terminal input",
|
|
53344
|
+
standard: "posix"
|
|
53345
|
+
},
|
|
53346
|
+
{
|
|
53347
|
+
name: "SIGBREAK",
|
|
53348
|
+
number: 21,
|
|
53349
|
+
action: "terminate",
|
|
53350
|
+
description: "User interruption with CTRL-BREAK",
|
|
53351
|
+
standard: "other"
|
|
53352
|
+
},
|
|
53353
|
+
{
|
|
53354
|
+
name: "SIGTTOU",
|
|
53355
|
+
number: 22,
|
|
53356
|
+
action: "pause",
|
|
53357
|
+
description: "Background process cannot write to terminal output",
|
|
53358
|
+
standard: "posix"
|
|
53359
|
+
},
|
|
53360
|
+
{
|
|
53361
|
+
name: "SIGURG",
|
|
53362
|
+
number: 23,
|
|
53363
|
+
action: "ignore",
|
|
53364
|
+
description: "Socket received out-of-band data",
|
|
53365
|
+
standard: "bsd"
|
|
53366
|
+
},
|
|
53367
|
+
{
|
|
53368
|
+
name: "SIGXCPU",
|
|
53369
|
+
number: 24,
|
|
53370
|
+
action: "core",
|
|
53371
|
+
description: "Process timed out",
|
|
53372
|
+
standard: "bsd"
|
|
53373
|
+
},
|
|
53374
|
+
{
|
|
53375
|
+
name: "SIGXFSZ",
|
|
53376
|
+
number: 25,
|
|
53377
|
+
action: "core",
|
|
53378
|
+
description: "File too big",
|
|
53379
|
+
standard: "bsd"
|
|
53380
|
+
},
|
|
53381
|
+
{
|
|
53382
|
+
name: "SIGVTALRM",
|
|
53383
|
+
number: 26,
|
|
53384
|
+
action: "terminate",
|
|
53385
|
+
description: "Timeout or timer",
|
|
53386
|
+
standard: "bsd"
|
|
53387
|
+
},
|
|
53388
|
+
{
|
|
53389
|
+
name: "SIGPROF",
|
|
53390
|
+
number: 27,
|
|
53391
|
+
action: "terminate",
|
|
53392
|
+
description: "Timeout or timer",
|
|
53393
|
+
standard: "bsd"
|
|
53394
|
+
},
|
|
53395
|
+
{
|
|
53396
|
+
name: "SIGWINCH",
|
|
53397
|
+
number: 28,
|
|
53398
|
+
action: "ignore",
|
|
53399
|
+
description: "Terminal window size changed",
|
|
53400
|
+
standard: "bsd"
|
|
53401
|
+
},
|
|
53402
|
+
{
|
|
53403
|
+
name: "SIGIO",
|
|
53404
|
+
number: 29,
|
|
53405
|
+
action: "terminate",
|
|
53406
|
+
description: "I/O is available",
|
|
53407
|
+
standard: "other"
|
|
53408
|
+
},
|
|
53409
|
+
{
|
|
53410
|
+
name: "SIGPOLL",
|
|
53411
|
+
number: 29,
|
|
53412
|
+
action: "terminate",
|
|
53413
|
+
description: "Watched event",
|
|
53414
|
+
standard: "other"
|
|
53415
|
+
},
|
|
53416
|
+
{
|
|
53417
|
+
name: "SIGINFO",
|
|
53418
|
+
number: 29,
|
|
53419
|
+
action: "ignore",
|
|
53420
|
+
description: "Request for process information",
|
|
53421
|
+
standard: "other"
|
|
53422
|
+
},
|
|
53423
|
+
{
|
|
53424
|
+
name: "SIGPWR",
|
|
53425
|
+
number: 30,
|
|
53426
|
+
action: "terminate",
|
|
53427
|
+
description: "Device running out of power",
|
|
53428
|
+
standard: "systemv"
|
|
53429
|
+
},
|
|
53430
|
+
{
|
|
53431
|
+
name: "SIGSYS",
|
|
53432
|
+
number: 31,
|
|
53433
|
+
action: "core",
|
|
53434
|
+
description: "Invalid system call",
|
|
53435
|
+
standard: "other"
|
|
53436
|
+
},
|
|
53437
|
+
{
|
|
53438
|
+
name: "SIGUNUSED",
|
|
53439
|
+
number: 31,
|
|
53440
|
+
action: "terminate",
|
|
53441
|
+
description: "Invalid system call",
|
|
53442
|
+
standard: "other"
|
|
53443
|
+
}
|
|
53444
|
+
];
|
|
53445
|
+
} });
|
|
53446
|
+
var require_realtime = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/realtime.js"(exports2) {
|
|
53447
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53448
|
+
exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0;
|
|
53449
|
+
var getRealtimeSignals = function() {
|
|
53450
|
+
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
53451
|
+
return Array.from({ length }, getRealtimeSignal);
|
|
53452
|
+
};
|
|
53453
|
+
exports2.getRealtimeSignals = getRealtimeSignals;
|
|
53454
|
+
var getRealtimeSignal = function(value, index) {
|
|
53455
|
+
return {
|
|
53456
|
+
name: `SIGRT${index + 1}`,
|
|
53457
|
+
number: SIGRTMIN + index,
|
|
53458
|
+
action: "terminate",
|
|
53459
|
+
description: "Application-specific signal (realtime)",
|
|
53460
|
+
standard: "posix"
|
|
53461
|
+
};
|
|
53462
|
+
};
|
|
53463
|
+
var SIGRTMIN = 34;
|
|
53464
|
+
var SIGRTMAX = 64;
|
|
53465
|
+
exports2.SIGRTMAX = SIGRTMAX;
|
|
53466
|
+
} });
|
|
53467
|
+
var require_signals = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/signals.js"(exports2) {
|
|
53468
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53469
|
+
exports2.getSignals = void 0;
|
|
53470
|
+
var _os = require("os");
|
|
53471
|
+
var _core = require_core2();
|
|
53472
|
+
var _realtime = require_realtime();
|
|
53473
|
+
var getSignals = function() {
|
|
53474
|
+
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
|
|
53475
|
+
return [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
53476
|
+
};
|
|
53477
|
+
exports2.getSignals = getSignals;
|
|
53478
|
+
var normalizeSignal = function({ name, number: defaultNumber, description, action, forced = false, standard }) {
|
|
53479
|
+
const { signals: { [name]: constantSignal } } = _os.constants;
|
|
53480
|
+
const supported = constantSignal !== void 0;
|
|
53481
|
+
return {
|
|
53482
|
+
name,
|
|
53483
|
+
number: supported ? constantSignal : defaultNumber,
|
|
53484
|
+
description,
|
|
53485
|
+
supported,
|
|
53486
|
+
action,
|
|
53487
|
+
forced,
|
|
53488
|
+
standard
|
|
53489
|
+
};
|
|
53490
|
+
};
|
|
53491
|
+
} });
|
|
53492
|
+
var require_main = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
53493
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53494
|
+
exports2.signalsByNumber = exports2.signalsByName = void 0;
|
|
53495
|
+
var _os = require("os");
|
|
53496
|
+
var _signals = require_signals();
|
|
53497
|
+
var _realtime = require_realtime();
|
|
53498
|
+
var getSignalsByName = function() {
|
|
53499
|
+
return (0, _signals.getSignals)().reduce(getSignalByName, {});
|
|
53500
|
+
};
|
|
53501
|
+
var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) {
|
|
53502
|
+
return {
|
|
53503
|
+
...signalByNameMemo,
|
|
53504
|
+
[name]: {
|
|
53505
|
+
name,
|
|
53506
|
+
number,
|
|
53507
|
+
description,
|
|
53508
|
+
supported,
|
|
53509
|
+
action,
|
|
53510
|
+
forced,
|
|
53511
|
+
standard
|
|
53512
|
+
}
|
|
53513
|
+
};
|
|
53514
|
+
};
|
|
53515
|
+
exports2.signalsByName = getSignalsByName();
|
|
53516
|
+
var getSignalsByNumber = function() {
|
|
53517
|
+
const signals = (0, _signals.getSignals)();
|
|
53518
|
+
const length = _realtime.SIGRTMAX + 1;
|
|
53519
|
+
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
|
|
53520
|
+
return Object.assign({}, ...signalsA);
|
|
53521
|
+
};
|
|
53522
|
+
var getSignalByNumber = function(number, signals) {
|
|
53523
|
+
const signal = findSignalByNumber(number, signals);
|
|
53524
|
+
if (signal === void 0) return {};
|
|
53525
|
+
const { name, description, supported, action, forced, standard } = signal;
|
|
53526
|
+
return { [number]: {
|
|
53527
|
+
name,
|
|
53528
|
+
number,
|
|
53529
|
+
description,
|
|
53530
|
+
supported,
|
|
53531
|
+
action,
|
|
53532
|
+
forced,
|
|
53533
|
+
standard
|
|
53534
|
+
} };
|
|
53535
|
+
};
|
|
53536
|
+
var findSignalByNumber = function(number, signals) {
|
|
53537
|
+
const signal = signals.find(({ name }) => _os.constants.signals[name] === number);
|
|
53538
|
+
if (signal !== void 0) return signal;
|
|
53539
|
+
return signals.find((signalA) => signalA.number === number);
|
|
53540
|
+
};
|
|
53541
|
+
exports2.signalsByNumber = getSignalsByNumber();
|
|
53542
|
+
} });
|
|
53543
|
+
var require_error = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
53544
|
+
var { signalsByName } = require_main();
|
|
53545
|
+
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
53546
|
+
if (timedOut) return `timed out after ${timeout} milliseconds`;
|
|
53547
|
+
if (isCanceled) return "was canceled";
|
|
53548
|
+
if (errorCode !== void 0) return `failed with ${errorCode}`;
|
|
53549
|
+
if (signal !== void 0) return `was killed with ${signal} (${signalDescription})`;
|
|
53550
|
+
if (exitCode !== void 0) return `failed with exit code ${exitCode}`;
|
|
53551
|
+
return "failed";
|
|
53552
|
+
};
|
|
53553
|
+
var makeError = ({ stdout, stderr, all, error, signal, exitCode, command, timedOut, isCanceled, killed, parsed: { options: { timeout } } }) => {
|
|
53554
|
+
exitCode = exitCode === null ? void 0 : exitCode;
|
|
53555
|
+
signal = signal === null ? void 0 : signal;
|
|
53556
|
+
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
53557
|
+
const message = `Command ${getErrorPrefix({
|
|
53558
|
+
timedOut,
|
|
53559
|
+
timeout,
|
|
53560
|
+
errorCode: error && error.code,
|
|
53561
|
+
signal,
|
|
53562
|
+
signalDescription,
|
|
53563
|
+
exitCode,
|
|
53564
|
+
isCanceled
|
|
53565
|
+
})}: ${command}`;
|
|
53566
|
+
if (error instanceof Error) {
|
|
53567
|
+
error.originalMessage = error.message;
|
|
53568
|
+
error.message = `${message}
|
|
53569
|
+
${error.message}`;
|
|
53570
|
+
} else error = new Error(message);
|
|
53571
|
+
error.command = command;
|
|
53572
|
+
error.exitCode = exitCode;
|
|
53573
|
+
error.signal = signal;
|
|
53574
|
+
error.signalDescription = signalDescription;
|
|
53575
|
+
error.stdout = stdout;
|
|
53576
|
+
error.stderr = stderr;
|
|
53577
|
+
if (all !== void 0) error.all = all;
|
|
53578
|
+
if ("bufferedData" in error) delete error.bufferedData;
|
|
53579
|
+
error.failed = true;
|
|
53580
|
+
error.timedOut = Boolean(timedOut);
|
|
53581
|
+
error.isCanceled = isCanceled;
|
|
53582
|
+
error.killed = killed && !timedOut;
|
|
53583
|
+
return error;
|
|
53584
|
+
};
|
|
53585
|
+
module2.exports = makeError;
|
|
53586
|
+
} });
|
|
53587
|
+
var require_stdio = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stdio.js"(exports2, module2) {
|
|
53588
|
+
var aliases = [
|
|
53589
|
+
"stdin",
|
|
53590
|
+
"stdout",
|
|
53591
|
+
"stderr"
|
|
53592
|
+
];
|
|
53593
|
+
var hasAlias = (opts) => aliases.some((alias) => opts[alias] !== void 0);
|
|
53594
|
+
var normalizeStdio = (opts) => {
|
|
53595
|
+
if (!opts) return;
|
|
53596
|
+
const { stdio } = opts;
|
|
53597
|
+
if (stdio === void 0) return aliases.map((alias) => opts[alias]);
|
|
53598
|
+
if (hasAlias(opts)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
53599
|
+
if (typeof stdio === "string") return stdio;
|
|
53600
|
+
if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
53601
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
53602
|
+
return Array.from({ length }, (value, index) => stdio[index]);
|
|
53603
|
+
};
|
|
53604
|
+
module2.exports = normalizeStdio;
|
|
53605
|
+
module2.exports.node = (opts) => {
|
|
53606
|
+
const stdio = normalizeStdio(opts);
|
|
53607
|
+
if (stdio === "ipc") return "ipc";
|
|
53608
|
+
if (stdio === void 0 || typeof stdio === "string") return [
|
|
53609
|
+
stdio,
|
|
53610
|
+
stdio,
|
|
53611
|
+
stdio,
|
|
53612
|
+
"ipc"
|
|
53613
|
+
];
|
|
53614
|
+
if (stdio.includes("ipc")) return stdio;
|
|
53615
|
+
return [...stdio, "ipc"];
|
|
53616
|
+
};
|
|
53617
|
+
} });
|
|
53618
|
+
var require_signals2 = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
|
|
53619
|
+
module2.exports = [
|
|
53620
|
+
"SIGABRT",
|
|
53621
|
+
"SIGALRM",
|
|
53622
|
+
"SIGHUP",
|
|
53623
|
+
"SIGINT",
|
|
53624
|
+
"SIGTERM"
|
|
53625
|
+
];
|
|
53626
|
+
if (process.platform !== "win32") module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
53627
|
+
if (process.platform === "linux") module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
|
|
53628
|
+
} });
|
|
53629
|
+
var require_signal_exit = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
|
|
53630
|
+
var process2 = global.process;
|
|
53631
|
+
var processOk = function(process3) {
|
|
53632
|
+
return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
|
|
53633
|
+
};
|
|
53634
|
+
if (!processOk(process2)) module2.exports = function() {
|
|
53635
|
+
return function() {};
|
|
53636
|
+
};
|
|
53637
|
+
else {
|
|
53638
|
+
assert7 = require("assert");
|
|
53639
|
+
signals = require_signals2();
|
|
53640
|
+
isWin3 = /^win/i.test(process2.platform);
|
|
53641
|
+
EE = require("events");
|
|
53642
|
+
if (typeof EE !== "function") EE = EE.EventEmitter;
|
|
53643
|
+
if (process2.__signal_exit_emitter__) emitter = process2.__signal_exit_emitter__;
|
|
53644
|
+
else {
|
|
53645
|
+
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
53646
|
+
emitter.count = 0;
|
|
53647
|
+
emitter.emitted = {};
|
|
53648
|
+
}
|
|
53649
|
+
if (!emitter.infinite) {
|
|
53650
|
+
emitter.setMaxListeners(Infinity);
|
|
53651
|
+
emitter.infinite = true;
|
|
53652
|
+
}
|
|
53653
|
+
module2.exports = function(cb, opts) {
|
|
53654
|
+
if (!processOk(global.process)) return function() {};
|
|
53655
|
+
assert7.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
53656
|
+
if (loaded === false) load();
|
|
53657
|
+
var ev = "exit";
|
|
53658
|
+
if (opts && opts.alwaysLast) ev = "afterexit";
|
|
53659
|
+
var remove2 = function() {
|
|
53660
|
+
emitter.removeListener(ev, cb);
|
|
53661
|
+
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) unload();
|
|
53662
|
+
};
|
|
53663
|
+
emitter.on(ev, cb);
|
|
53664
|
+
return remove2;
|
|
53665
|
+
};
|
|
53666
|
+
unload = function unload2() {
|
|
53667
|
+
if (!loaded || !processOk(global.process)) return;
|
|
53668
|
+
loaded = false;
|
|
53669
|
+
signals.forEach(function(sig) {
|
|
53670
|
+
try {
|
|
53671
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
53672
|
+
} catch (er) {}
|
|
53673
|
+
});
|
|
53674
|
+
process2.emit = originalProcessEmit;
|
|
53675
|
+
process2.reallyExit = originalProcessReallyExit;
|
|
53676
|
+
emitter.count -= 1;
|
|
53677
|
+
};
|
|
53678
|
+
module2.exports.unload = unload;
|
|
53679
|
+
emit = function emit2(event, code, signal) {
|
|
53680
|
+
if (emitter.emitted[event]) return;
|
|
53681
|
+
emitter.emitted[event] = true;
|
|
53682
|
+
emitter.emit(event, code, signal);
|
|
53683
|
+
};
|
|
53684
|
+
sigListeners = {};
|
|
53685
|
+
signals.forEach(function(sig) {
|
|
53686
|
+
sigListeners[sig] = function listener() {
|
|
53687
|
+
if (!processOk(global.process)) return;
|
|
53688
|
+
if (process2.listeners(sig).length === emitter.count) {
|
|
53689
|
+
unload();
|
|
53690
|
+
emit("exit", null, sig);
|
|
53691
|
+
emit("afterexit", null, sig);
|
|
53692
|
+
if (isWin3 && sig === "SIGHUP") sig = "SIGINT";
|
|
53693
|
+
process2.kill(process2.pid, sig);
|
|
53694
|
+
}
|
|
53695
|
+
};
|
|
53696
|
+
});
|
|
53697
|
+
module2.exports.signals = function() {
|
|
53698
|
+
return signals;
|
|
53699
|
+
};
|
|
53700
|
+
loaded = false;
|
|
53701
|
+
load = function load2() {
|
|
53702
|
+
if (loaded || !processOk(global.process)) return;
|
|
53703
|
+
loaded = true;
|
|
53704
|
+
emitter.count += 1;
|
|
53705
|
+
signals = signals.filter(function(sig) {
|
|
53706
|
+
try {
|
|
53707
|
+
process2.on(sig, sigListeners[sig]);
|
|
53708
|
+
return true;
|
|
53709
|
+
} catch (er) {
|
|
53710
|
+
return false;
|
|
53711
|
+
}
|
|
53712
|
+
});
|
|
53713
|
+
process2.emit = processEmit;
|
|
53714
|
+
process2.reallyExit = processReallyExit;
|
|
53715
|
+
};
|
|
53716
|
+
module2.exports.load = load;
|
|
53717
|
+
originalProcessReallyExit = process2.reallyExit;
|
|
53718
|
+
processReallyExit = function processReallyExit2(code) {
|
|
53719
|
+
if (!processOk(global.process)) return;
|
|
53720
|
+
process2.exitCode = code || 0;
|
|
53721
|
+
emit("exit", process2.exitCode, null);
|
|
53722
|
+
emit("afterexit", process2.exitCode, null);
|
|
53723
|
+
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
53724
|
+
};
|
|
53725
|
+
originalProcessEmit = process2.emit;
|
|
53726
|
+
processEmit = function processEmit2(ev, arg) {
|
|
53727
|
+
if (ev === "exit" && processOk(global.process)) {
|
|
53728
|
+
if (arg !== void 0) process2.exitCode = arg;
|
|
53729
|
+
var ret = originalProcessEmit.apply(this, arguments);
|
|
53730
|
+
emit("exit", process2.exitCode, null);
|
|
53731
|
+
emit("afterexit", process2.exitCode, null);
|
|
53732
|
+
return ret;
|
|
53733
|
+
} else return originalProcessEmit.apply(this, arguments);
|
|
53734
|
+
};
|
|
53735
|
+
}
|
|
53736
|
+
var assert7;
|
|
53737
|
+
var signals;
|
|
53738
|
+
var isWin3;
|
|
53739
|
+
var EE;
|
|
53740
|
+
var emitter;
|
|
53741
|
+
var unload;
|
|
53742
|
+
var emit;
|
|
53743
|
+
var sigListeners;
|
|
53744
|
+
var loaded;
|
|
53745
|
+
var load;
|
|
53746
|
+
var originalProcessReallyExit;
|
|
53747
|
+
var processReallyExit;
|
|
53748
|
+
var originalProcessEmit;
|
|
53749
|
+
var processEmit;
|
|
53750
|
+
} });
|
|
53751
|
+
var require_p_finally = __commonJS({ "../../node_modules/.pnpm/p-finally@2.0.1/node_modules/p-finally/index.js"(exports2, module2) {
|
|
53752
|
+
module2.exports = async (promise, onFinally = () => {}) => {
|
|
53753
|
+
let value;
|
|
53754
|
+
try {
|
|
53755
|
+
value = await promise;
|
|
53756
|
+
} catch (error) {
|
|
53757
|
+
await onFinally();
|
|
53758
|
+
throw error;
|
|
53759
|
+
}
|
|
53760
|
+
await onFinally();
|
|
53761
|
+
return value;
|
|
53762
|
+
};
|
|
53763
|
+
} });
|
|
53764
|
+
var require_kill = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
53765
|
+
var os = require("os");
|
|
53766
|
+
var onExit = require_signal_exit();
|
|
53767
|
+
var pFinally = require_p_finally();
|
|
53768
|
+
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
53769
|
+
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
53770
|
+
const killResult = kill(signal);
|
|
53771
|
+
setKillTimeout(kill, signal, options, killResult);
|
|
53772
|
+
return killResult;
|
|
53773
|
+
};
|
|
53774
|
+
var setKillTimeout = (kill, signal, options, killResult) => {
|
|
53775
|
+
if (!shouldForceKill(signal, options, killResult)) return;
|
|
53776
|
+
const timeout = getForceKillAfterTimeout(options);
|
|
53777
|
+
setTimeout(() => {
|
|
53778
|
+
kill("SIGKILL");
|
|
53779
|
+
}, timeout).unref();
|
|
53780
|
+
};
|
|
53781
|
+
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
|
|
53782
|
+
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
53783
|
+
};
|
|
53784
|
+
var isSigterm = (signal) => {
|
|
53785
|
+
return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
53786
|
+
};
|
|
53787
|
+
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
53788
|
+
if (forceKillAfterTimeout === true) return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
53789
|
+
if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
53790
|
+
return forceKillAfterTimeout;
|
|
53791
|
+
};
|
|
53792
|
+
var spawnedCancel = (spawned, context) => {
|
|
53793
|
+
if (spawned.kill()) context.isCanceled = true;
|
|
53794
|
+
};
|
|
53795
|
+
var timeoutKill = (spawned, signal, reject) => {
|
|
53796
|
+
spawned.kill(signal);
|
|
53797
|
+
reject(Object.assign(/* @__PURE__ */ new Error("Timed out"), {
|
|
53798
|
+
timedOut: true,
|
|
53799
|
+
signal
|
|
53800
|
+
}));
|
|
53801
|
+
};
|
|
53802
|
+
var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
53803
|
+
if (timeout === 0 || timeout === void 0) return spawnedPromise;
|
|
53804
|
+
if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
53805
|
+
let timeoutId;
|
|
53806
|
+
const timeoutPromise = new Promise((resolve, reject) => {
|
|
53807
|
+
timeoutId = setTimeout(() => {
|
|
53808
|
+
timeoutKill(spawned, killSignal, reject);
|
|
53809
|
+
}, timeout);
|
|
53810
|
+
});
|
|
53811
|
+
const safeSpawnedPromise = pFinally(spawnedPromise, () => {
|
|
53812
|
+
clearTimeout(timeoutId);
|
|
53813
|
+
});
|
|
53814
|
+
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
53815
|
+
};
|
|
53816
|
+
var setExitHandler = (spawned, { cleanup, detached }, timedPromise) => {
|
|
53817
|
+
if (!cleanup || detached) return timedPromise;
|
|
53818
|
+
return pFinally(timedPromise, onExit(() => {
|
|
53819
|
+
spawned.kill();
|
|
53820
|
+
}));
|
|
53821
|
+
};
|
|
53822
|
+
module2.exports = {
|
|
53823
|
+
spawnedKill,
|
|
53824
|
+
spawnedCancel,
|
|
53825
|
+
setupTimeout,
|
|
53826
|
+
setExitHandler
|
|
53827
|
+
};
|
|
53828
|
+
} });
|
|
53829
|
+
var require_is_stream = __commonJS({ "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
|
|
53830
|
+
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
53831
|
+
isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
53832
|
+
isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
|
|
53833
|
+
isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream);
|
|
53834
|
+
isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function";
|
|
53835
|
+
module2.exports = isStream;
|
|
53836
|
+
} });
|
|
53837
|
+
var require_pump = __commonJS({ "../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports2, module2) {
|
|
53838
|
+
var once = require_once();
|
|
53839
|
+
var eos2 = require_end_of_stream();
|
|
53840
|
+
var fs7;
|
|
53841
|
+
try {
|
|
53842
|
+
fs7 = require("fs");
|
|
53843
|
+
} catch (e) {}
|
|
53844
|
+
var noop = function() {};
|
|
53845
|
+
var ancient = /^v?\.0/.test(process.version);
|
|
53846
|
+
var isFn = function(fn) {
|
|
53847
|
+
return typeof fn === "function";
|
|
53848
|
+
};
|
|
53849
|
+
var isFS = function(stream) {
|
|
53850
|
+
if (!ancient) return false;
|
|
53851
|
+
if (!fs7) return false;
|
|
53852
|
+
return (stream instanceof (fs7.ReadStream || noop) || stream instanceof (fs7.WriteStream || noop)) && isFn(stream.close);
|
|
53853
|
+
};
|
|
53854
|
+
var isRequest = function(stream) {
|
|
53855
|
+
return stream.setHeader && isFn(stream.abort);
|
|
53856
|
+
};
|
|
53857
|
+
var destroyer = function(stream, reading, writing, callback) {
|
|
53858
|
+
callback = once(callback);
|
|
53859
|
+
var closed = false;
|
|
53860
|
+
stream.on("close", function() {
|
|
53861
|
+
closed = true;
|
|
53862
|
+
});
|
|
53863
|
+
eos2(stream, {
|
|
53864
|
+
readable: reading,
|
|
53865
|
+
writable: writing
|
|
53866
|
+
}, function(err) {
|
|
53867
|
+
if (err) return callback(err);
|
|
53868
|
+
closed = true;
|
|
53869
|
+
callback();
|
|
53870
|
+
});
|
|
53871
|
+
var destroyed = false;
|
|
53872
|
+
return function(err) {
|
|
53873
|
+
if (closed) return;
|
|
53874
|
+
if (destroyed) return;
|
|
53875
|
+
destroyed = true;
|
|
53876
|
+
if (isFS(stream)) return stream.close(noop);
|
|
53877
|
+
if (isRequest(stream)) return stream.abort();
|
|
53878
|
+
if (isFn(stream.destroy)) return stream.destroy();
|
|
53879
|
+
callback(err || /* @__PURE__ */ new Error("stream was destroyed"));
|
|
53880
|
+
};
|
|
53881
|
+
};
|
|
53882
|
+
var call = function(fn) {
|
|
53883
|
+
fn();
|
|
53884
|
+
};
|
|
53885
|
+
var pipe = function(from, to) {
|
|
53886
|
+
return from.pipe(to);
|
|
53887
|
+
};
|
|
53888
|
+
var pump = function() {
|
|
53889
|
+
var streams = Array.prototype.slice.call(arguments);
|
|
53890
|
+
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
|
|
53891
|
+
if (Array.isArray(streams[0])) streams = streams[0];
|
|
53892
|
+
if (streams.length < 2) throw new Error("pump requires two streams per minimum");
|
|
53893
|
+
var error;
|
|
53894
|
+
var destroys = streams.map(function(stream, i) {
|
|
53895
|
+
var reading = i < streams.length - 1;
|
|
53896
|
+
return destroyer(stream, reading, i > 0, function(err) {
|
|
53897
|
+
if (!error) error = err;
|
|
53898
|
+
if (err) destroys.forEach(call);
|
|
53899
|
+
if (reading) return;
|
|
53900
|
+
destroys.forEach(call);
|
|
53901
|
+
callback(error);
|
|
53902
|
+
});
|
|
53903
|
+
});
|
|
53904
|
+
return streams.reduce(pipe);
|
|
53905
|
+
};
|
|
53906
|
+
module2.exports = pump;
|
|
53907
|
+
} });
|
|
53908
|
+
var require_buffer_stream = __commonJS({ "../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/buffer-stream.js"(exports2, module2) {
|
|
53909
|
+
var { PassThrough: PassThroughStream } = require("stream");
|
|
53910
|
+
module2.exports = (options) => {
|
|
53911
|
+
options = { ...options };
|
|
53912
|
+
const { array } = options;
|
|
53913
|
+
let { encoding } = options;
|
|
53914
|
+
const isBuffer = encoding === "buffer";
|
|
53915
|
+
let objectMode = false;
|
|
53916
|
+
if (array) objectMode = !(encoding || isBuffer);
|
|
53917
|
+
else encoding = encoding || "utf8";
|
|
53918
|
+
if (isBuffer) encoding = null;
|
|
53919
|
+
const stream = new PassThroughStream({ objectMode });
|
|
53920
|
+
if (encoding) stream.setEncoding(encoding);
|
|
53921
|
+
let length = 0;
|
|
53922
|
+
const chunks = [];
|
|
53923
|
+
stream.on("data", (chunk) => {
|
|
53924
|
+
chunks.push(chunk);
|
|
53925
|
+
if (objectMode) length = chunks.length;
|
|
53926
|
+
else length += chunk.length;
|
|
53927
|
+
});
|
|
53928
|
+
stream.getBufferedValue = () => {
|
|
53929
|
+
if (array) return chunks;
|
|
53930
|
+
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
53931
|
+
};
|
|
53932
|
+
stream.getBufferedLength = () => length;
|
|
53933
|
+
return stream;
|
|
53934
|
+
};
|
|
53935
|
+
} });
|
|
53936
|
+
var require_get_stream = __commonJS({ "../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/index.js"(exports2, module2) {
|
|
53937
|
+
var { constants: BufferConstants } = require("buffer");
|
|
53938
|
+
var pump = require_pump();
|
|
53939
|
+
var bufferStream = require_buffer_stream();
|
|
53940
|
+
var MaxBufferError = class extends Error {
|
|
53941
|
+
constructor() {
|
|
53942
|
+
super("maxBuffer exceeded");
|
|
53943
|
+
this.name = "MaxBufferError";
|
|
53944
|
+
}
|
|
53945
|
+
};
|
|
53946
|
+
async function getStream(inputStream, options) {
|
|
53947
|
+
if (!inputStream) return Promise.reject(/* @__PURE__ */ new Error("Expected a stream"));
|
|
53948
|
+
options = {
|
|
53949
|
+
maxBuffer: Infinity,
|
|
53950
|
+
...options
|
|
53951
|
+
};
|
|
53952
|
+
const { maxBuffer } = options;
|
|
53953
|
+
let stream;
|
|
53954
|
+
await new Promise((resolve, reject) => {
|
|
53955
|
+
const rejectPromise = (error) => {
|
|
53956
|
+
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) error.bufferedData = stream.getBufferedValue();
|
|
53957
|
+
reject(error);
|
|
53958
|
+
};
|
|
53959
|
+
stream = pump(inputStream, bufferStream(options), (error) => {
|
|
53960
|
+
if (error) {
|
|
53961
|
+
rejectPromise(error);
|
|
53962
|
+
return;
|
|
53963
|
+
}
|
|
53964
|
+
resolve();
|
|
53965
|
+
});
|
|
53966
|
+
stream.on("data", () => {
|
|
53967
|
+
if (stream.getBufferedLength() > maxBuffer) rejectPromise(new MaxBufferError());
|
|
53968
|
+
});
|
|
53969
|
+
});
|
|
53970
|
+
return stream.getBufferedValue();
|
|
53971
|
+
}
|
|
53972
|
+
module2.exports = getStream;
|
|
53973
|
+
module2.exports.default = getStream;
|
|
53974
|
+
module2.exports.buffer = (stream, options) => getStream(stream, {
|
|
53975
|
+
...options,
|
|
53976
|
+
encoding: "buffer"
|
|
53977
|
+
});
|
|
53978
|
+
module2.exports.array = (stream, options) => getStream(stream, {
|
|
53979
|
+
...options,
|
|
53980
|
+
array: true
|
|
53981
|
+
});
|
|
53982
|
+
module2.exports.MaxBufferError = MaxBufferError;
|
|
53983
|
+
} });
|
|
53984
|
+
var require_merge_stream = __commonJS({ "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
|
|
53985
|
+
var { PassThrough } = require("stream");
|
|
53986
|
+
module2.exports = function() {
|
|
53987
|
+
var sources = [];
|
|
53988
|
+
var output = new PassThrough({ objectMode: true });
|
|
53989
|
+
output.setMaxListeners(0);
|
|
53990
|
+
output.add = add;
|
|
53991
|
+
output.isEmpty = isEmpty;
|
|
53992
|
+
output.on("unpipe", remove2);
|
|
53993
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
53994
|
+
return output;
|
|
53995
|
+
function add(source) {
|
|
53996
|
+
if (Array.isArray(source)) {
|
|
53997
|
+
source.forEach(add);
|
|
53998
|
+
return this;
|
|
53999
|
+
}
|
|
54000
|
+
sources.push(source);
|
|
54001
|
+
source.once("end", remove2.bind(null, source));
|
|
54002
|
+
source.once("error", output.emit.bind(output, "error"));
|
|
54003
|
+
source.pipe(output, { end: false });
|
|
54004
|
+
return this;
|
|
54005
|
+
}
|
|
54006
|
+
function isEmpty() {
|
|
54007
|
+
return sources.length == 0;
|
|
54008
|
+
}
|
|
54009
|
+
function remove2(source) {
|
|
54010
|
+
sources = sources.filter(function(it) {
|
|
54011
|
+
return it !== source;
|
|
54012
|
+
});
|
|
54013
|
+
if (!sources.length && output.readable) output.end();
|
|
54014
|
+
}
|
|
54015
|
+
};
|
|
54016
|
+
} });
|
|
54017
|
+
var require_stream2 = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stream.js"(exports2, module2) {
|
|
54018
|
+
var isStream = require_is_stream();
|
|
54019
|
+
var getStream = require_get_stream();
|
|
54020
|
+
var mergeStream = require_merge_stream();
|
|
54021
|
+
var handleInput = (spawned, input) => {
|
|
54022
|
+
if (input === void 0 || spawned.stdin === void 0) return;
|
|
54023
|
+
if (isStream(input)) input.pipe(spawned.stdin);
|
|
54024
|
+
else spawned.stdin.end(input);
|
|
54025
|
+
};
|
|
54026
|
+
var makeAllStream = (spawned, { all }) => {
|
|
54027
|
+
if (!all || !spawned.stdout && !spawned.stderr) return;
|
|
54028
|
+
const mixed = mergeStream();
|
|
54029
|
+
if (spawned.stdout) mixed.add(spawned.stdout);
|
|
54030
|
+
if (spawned.stderr) mixed.add(spawned.stderr);
|
|
54031
|
+
return mixed;
|
|
54032
|
+
};
|
|
54033
|
+
var getBufferedData = async (stream, streamPromise) => {
|
|
54034
|
+
if (!stream) return;
|
|
54035
|
+
stream.destroy();
|
|
54036
|
+
try {
|
|
54037
|
+
return await streamPromise;
|
|
54038
|
+
} catch (error) {
|
|
54039
|
+
return error.bufferedData;
|
|
54040
|
+
}
|
|
54041
|
+
};
|
|
54042
|
+
var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
54043
|
+
if (!stream || !buffer) return;
|
|
54044
|
+
if (encoding) return getStream(stream, {
|
|
54045
|
+
encoding,
|
|
54046
|
+
maxBuffer
|
|
54047
|
+
});
|
|
54048
|
+
return getStream.buffer(stream, { maxBuffer });
|
|
54049
|
+
};
|
|
54050
|
+
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
54051
|
+
const stdoutPromise = getStreamPromise(stdout, {
|
|
54052
|
+
encoding,
|
|
54053
|
+
buffer,
|
|
54054
|
+
maxBuffer
|
|
54055
|
+
});
|
|
54056
|
+
const stderrPromise = getStreamPromise(stderr, {
|
|
54057
|
+
encoding,
|
|
54058
|
+
buffer,
|
|
54059
|
+
maxBuffer
|
|
54060
|
+
});
|
|
54061
|
+
const allPromise = getStreamPromise(all, {
|
|
54062
|
+
encoding,
|
|
54063
|
+
buffer,
|
|
54064
|
+
maxBuffer: maxBuffer * 2
|
|
54065
|
+
});
|
|
54066
|
+
try {
|
|
54067
|
+
return await Promise.all([
|
|
54068
|
+
processDone,
|
|
54069
|
+
stdoutPromise,
|
|
54070
|
+
stderrPromise,
|
|
54071
|
+
allPromise
|
|
54072
|
+
]);
|
|
54073
|
+
} catch (error) {
|
|
54074
|
+
return Promise.all([
|
|
54075
|
+
{
|
|
54076
|
+
error,
|
|
54077
|
+
signal: error.signal,
|
|
54078
|
+
timedOut: error.timedOut
|
|
54079
|
+
},
|
|
54080
|
+
getBufferedData(stdout, stdoutPromise),
|
|
54081
|
+
getBufferedData(stderr, stderrPromise),
|
|
54082
|
+
getBufferedData(all, allPromise)
|
|
54083
|
+
]);
|
|
54084
|
+
}
|
|
54085
|
+
};
|
|
54086
|
+
var validateInputSync = ({ input }) => {
|
|
54087
|
+
if (isStream(input)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
54088
|
+
};
|
|
54089
|
+
module2.exports = {
|
|
54090
|
+
handleInput,
|
|
54091
|
+
makeAllStream,
|
|
54092
|
+
getSpawnedResult,
|
|
54093
|
+
validateInputSync
|
|
54094
|
+
};
|
|
54095
|
+
} });
|
|
54096
|
+
var require_promise = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/promise.js"(exports2, module2) {
|
|
54097
|
+
var mergePromiseProperty = (spawned, promise, property) => {
|
|
54098
|
+
const value = typeof promise === "function" ? (...args) => promise()[property](...args) : promise[property].bind(promise);
|
|
54099
|
+
Object.defineProperty(spawned, property, {
|
|
54100
|
+
value,
|
|
54101
|
+
writable: true,
|
|
54102
|
+
enumerable: false,
|
|
54103
|
+
configurable: true
|
|
54104
|
+
});
|
|
54105
|
+
};
|
|
54106
|
+
var mergePromise = (spawned, promise) => {
|
|
54107
|
+
mergePromiseProperty(spawned, promise, "then");
|
|
54108
|
+
mergePromiseProperty(spawned, promise, "catch");
|
|
54109
|
+
if (Promise.prototype.finally) mergePromiseProperty(spawned, promise, "finally");
|
|
54110
|
+
return spawned;
|
|
54111
|
+
};
|
|
54112
|
+
var getSpawnedPromise = (spawned) => {
|
|
54113
|
+
return new Promise((resolve, reject) => {
|
|
54114
|
+
spawned.on("exit", (exitCode, signal) => {
|
|
54115
|
+
resolve({
|
|
54116
|
+
exitCode,
|
|
54117
|
+
signal
|
|
54118
|
+
});
|
|
54119
|
+
});
|
|
54120
|
+
spawned.on("error", (error) => {
|
|
54121
|
+
reject(error);
|
|
54122
|
+
});
|
|
54123
|
+
if (spawned.stdin) spawned.stdin.on("error", (error) => {
|
|
54124
|
+
reject(error);
|
|
54125
|
+
});
|
|
54126
|
+
});
|
|
54127
|
+
};
|
|
54128
|
+
module2.exports = {
|
|
54129
|
+
mergePromise,
|
|
54130
|
+
getSpawnedPromise
|
|
54131
|
+
};
|
|
54132
|
+
} });
|
|
54133
|
+
var require_command = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/command.js"(exports2, module2) {
|
|
54134
|
+
var SPACES_REGEXP = / +/g;
|
|
54135
|
+
var joinCommand = (file, args = []) => {
|
|
54136
|
+
if (!Array.isArray(args)) return file;
|
|
54137
|
+
return [file, ...args].join(" ");
|
|
54138
|
+
};
|
|
54139
|
+
var handleEscaping = (tokens, token, index) => {
|
|
54140
|
+
if (index === 0) return [token];
|
|
54141
|
+
const previousToken = tokens[tokens.length - 1];
|
|
54142
|
+
if (previousToken.endsWith("\\")) return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
|
|
54143
|
+
return [...tokens, token];
|
|
54144
|
+
};
|
|
54145
|
+
var parseCommand = (command) => {
|
|
54146
|
+
return command.trim().split(SPACES_REGEXP).reduce(handleEscaping, []);
|
|
54147
|
+
};
|
|
54148
|
+
module2.exports = {
|
|
54149
|
+
joinCommand,
|
|
54150
|
+
parseCommand
|
|
54151
|
+
};
|
|
54152
|
+
} });
|
|
54153
|
+
var require_execa = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/index.js"(exports2, module2) {
|
|
54154
|
+
var path7 = require("path");
|
|
54155
|
+
var childProcess = require("child_process");
|
|
54156
|
+
var crossSpawn = require_cross_spawn2();
|
|
54157
|
+
var stripFinalNewline = require_strip_final_newline();
|
|
54158
|
+
var npmRunPath = require_npm_run_path();
|
|
54159
|
+
var onetime = require_onetime();
|
|
54160
|
+
var makeError = require_error();
|
|
54161
|
+
var normalizeStdio = require_stdio();
|
|
54162
|
+
var { spawnedKill, spawnedCancel, setupTimeout, setExitHandler } = require_kill();
|
|
54163
|
+
var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream2();
|
|
54164
|
+
var { mergePromise, getSpawnedPromise } = require_promise();
|
|
54165
|
+
var { joinCommand, parseCommand } = require_command();
|
|
54166
|
+
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
54167
|
+
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
54168
|
+
const env = extendEnv ? {
|
|
54169
|
+
...process.env,
|
|
54170
|
+
...envOption
|
|
54171
|
+
} : envOption;
|
|
54172
|
+
if (preferLocal) return npmRunPath.env({
|
|
54173
|
+
env,
|
|
54174
|
+
cwd: localDir,
|
|
54175
|
+
execPath
|
|
54176
|
+
});
|
|
54177
|
+
return env;
|
|
54178
|
+
};
|
|
54179
|
+
var handleArgs = (file, args, options = {}) => {
|
|
54180
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
54181
|
+
file = parsed.command;
|
|
54182
|
+
args = parsed.args;
|
|
54183
|
+
options = parsed.options;
|
|
54184
|
+
options = {
|
|
54185
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
54186
|
+
buffer: true,
|
|
54187
|
+
stripFinalNewline: true,
|
|
54188
|
+
extendEnv: true,
|
|
54189
|
+
preferLocal: false,
|
|
54190
|
+
localDir: options.cwd || process.cwd(),
|
|
54191
|
+
execPath: process.execPath,
|
|
54192
|
+
encoding: "utf8",
|
|
54193
|
+
reject: true,
|
|
54194
|
+
cleanup: true,
|
|
54195
|
+
all: false,
|
|
54196
|
+
...options,
|
|
54197
|
+
windowsHide: true
|
|
54198
|
+
};
|
|
54199
|
+
options.env = getEnv(options);
|
|
54200
|
+
options.stdio = normalizeStdio(options);
|
|
54201
|
+
if (process.platform === "win32" && path7.basename(file, ".exe") === "cmd") args.unshift("/q");
|
|
54202
|
+
return {
|
|
54203
|
+
file,
|
|
54204
|
+
args,
|
|
54205
|
+
options,
|
|
54206
|
+
parsed
|
|
54207
|
+
};
|
|
54208
|
+
};
|
|
54209
|
+
var handleOutput = (options, value, error) => {
|
|
54210
|
+
if (typeof value !== "string" && !Buffer.isBuffer(value)) return error === void 0 ? void 0 : "";
|
|
54211
|
+
if (options.stripFinalNewline) return stripFinalNewline(value);
|
|
54212
|
+
return value;
|
|
54213
|
+
};
|
|
54214
|
+
var execa2 = (file, args, options) => {
|
|
54215
|
+
const parsed = handleArgs(file, args, options);
|
|
54216
|
+
const command = joinCommand(file, args);
|
|
54217
|
+
let spawned;
|
|
54218
|
+
try {
|
|
54219
|
+
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
|
54220
|
+
} catch (error) {
|
|
54221
|
+
return mergePromise(new childProcess.ChildProcess(), Promise.reject(makeError({
|
|
54222
|
+
error,
|
|
54223
|
+
stdout: "",
|
|
54224
|
+
stderr: "",
|
|
54225
|
+
all: "",
|
|
54226
|
+
command,
|
|
54227
|
+
parsed,
|
|
54228
|
+
timedOut: false,
|
|
54229
|
+
isCanceled: false,
|
|
54230
|
+
killed: false
|
|
54231
|
+
})));
|
|
54232
|
+
}
|
|
54233
|
+
const spawnedPromise = getSpawnedPromise(spawned);
|
|
54234
|
+
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
54235
|
+
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
54236
|
+
const context = { isCanceled: false };
|
|
54237
|
+
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
54238
|
+
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
54239
|
+
const handlePromise = async () => {
|
|
54240
|
+
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
54241
|
+
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
54242
|
+
const stderr = handleOutput(parsed.options, stderrResult);
|
|
54243
|
+
const all = handleOutput(parsed.options, allResult);
|
|
54244
|
+
if (error || exitCode !== 0 || signal !== null) {
|
|
54245
|
+
const returnedError = makeError({
|
|
54246
|
+
error,
|
|
54247
|
+
exitCode,
|
|
54248
|
+
signal,
|
|
54249
|
+
stdout,
|
|
54250
|
+
stderr,
|
|
54251
|
+
all,
|
|
54252
|
+
command,
|
|
54253
|
+
parsed,
|
|
54254
|
+
timedOut,
|
|
54255
|
+
isCanceled: context.isCanceled,
|
|
54256
|
+
killed: spawned.killed
|
|
54257
|
+
});
|
|
54258
|
+
if (!parsed.options.reject) return returnedError;
|
|
54259
|
+
throw returnedError;
|
|
54260
|
+
}
|
|
54261
|
+
return {
|
|
54262
|
+
command,
|
|
54263
|
+
exitCode: 0,
|
|
54264
|
+
stdout,
|
|
54265
|
+
stderr,
|
|
54266
|
+
all,
|
|
54267
|
+
failed: false,
|
|
54268
|
+
timedOut: false,
|
|
54269
|
+
isCanceled: false,
|
|
54270
|
+
killed: false
|
|
54271
|
+
};
|
|
54272
|
+
};
|
|
54273
|
+
const handlePromiseOnce = onetime(handlePromise);
|
|
54274
|
+
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
|
|
54275
|
+
handleInput(spawned, parsed.options.input);
|
|
54276
|
+
spawned.all = makeAllStream(spawned, parsed.options);
|
|
54277
|
+
return mergePromise(spawned, handlePromiseOnce);
|
|
54278
|
+
};
|
|
54279
|
+
module2.exports = execa2;
|
|
54280
|
+
module2.exports.sync = (file, args, options) => {
|
|
54281
|
+
const parsed = handleArgs(file, args, options);
|
|
54282
|
+
const command = joinCommand(file, args);
|
|
54283
|
+
validateInputSync(parsed.options);
|
|
54284
|
+
let result;
|
|
54285
|
+
try {
|
|
54286
|
+
result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
|
|
54287
|
+
} catch (error) {
|
|
54288
|
+
throw makeError({
|
|
54289
|
+
error,
|
|
54290
|
+
stdout: "",
|
|
54291
|
+
stderr: "",
|
|
54292
|
+
all: "",
|
|
54293
|
+
command,
|
|
54294
|
+
parsed,
|
|
54295
|
+
timedOut: false,
|
|
54296
|
+
isCanceled: false,
|
|
54297
|
+
killed: false
|
|
54298
|
+
});
|
|
54299
|
+
}
|
|
54300
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
54301
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
54302
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
54303
|
+
const error = makeError({
|
|
54304
|
+
stdout,
|
|
54305
|
+
stderr,
|
|
54306
|
+
error: result.error,
|
|
54307
|
+
signal: result.signal,
|
|
54308
|
+
exitCode: result.status,
|
|
54309
|
+
command,
|
|
54310
|
+
parsed,
|
|
54311
|
+
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
54312
|
+
isCanceled: false,
|
|
54313
|
+
killed: result.signal !== null
|
|
54314
|
+
});
|
|
54315
|
+
if (!parsed.options.reject) return error;
|
|
54316
|
+
throw error;
|
|
54317
|
+
}
|
|
54318
|
+
return {
|
|
54319
|
+
command,
|
|
54320
|
+
exitCode: 0,
|
|
54321
|
+
stdout,
|
|
54322
|
+
stderr,
|
|
54323
|
+
failed: false,
|
|
54324
|
+
timedOut: false,
|
|
54325
|
+
isCanceled: false,
|
|
54326
|
+
killed: false
|
|
54327
|
+
};
|
|
54328
|
+
};
|
|
54329
|
+
module2.exports.command = (command, options) => {
|
|
54330
|
+
const [file, ...args] = parseCommand(command);
|
|
54331
|
+
return execa2(file, args, options);
|
|
54332
|
+
};
|
|
54333
|
+
module2.exports.commandSync = (command, options) => {
|
|
54334
|
+
const [file, ...args] = parseCommand(command);
|
|
54335
|
+
return execa2.sync(file, args, options);
|
|
54336
|
+
};
|
|
54337
|
+
module2.exports.node = (scriptPath, args, options = {}) => {
|
|
54338
|
+
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
54339
|
+
options = args;
|
|
54340
|
+
args = [];
|
|
54341
|
+
}
|
|
54342
|
+
const stdio = normalizeStdio.node(options);
|
|
54343
|
+
const { nodePath = process.execPath, nodeOptions = process.execArgv } = options;
|
|
54344
|
+
return execa2(nodePath, [
|
|
54345
|
+
...nodeOptions,
|
|
54346
|
+
scriptPath,
|
|
54347
|
+
...Array.isArray(args) ? args : []
|
|
54348
|
+
], {
|
|
54349
|
+
...options,
|
|
54350
|
+
stdin: void 0,
|
|
54351
|
+
stdout: void 0,
|
|
54352
|
+
stderr: void 0,
|
|
54353
|
+
stdio,
|
|
54354
|
+
shell: false
|
|
54355
|
+
});
|
|
54356
|
+
};
|
|
54357
|
+
} });
|
|
52817
54358
|
var src_exports = {};
|
|
52818
54359
|
__export(src_exports, {
|
|
52819
54360
|
BACKEND_FRAMEWORKS: () => BACKEND_FRAMEWORKS,
|
|
@@ -52872,6 +54413,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52872
54413
|
isDirectory: () => isDirectory,
|
|
52873
54414
|
isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
|
|
52874
54415
|
isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled,
|
|
54416
|
+
isPythonEntrypoint: () => isPythonEntrypoint,
|
|
52875
54417
|
isSymbolicLink: () => isSymbolicLink,
|
|
52876
54418
|
normalizePath: () => normalizePath,
|
|
52877
54419
|
readConfigFile: () => readConfigFile,
|
|
@@ -52882,6 +54424,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52882
54424
|
runPackageJsonScript: () => runPackageJsonScript,
|
|
52883
54425
|
runPipInstall: () => runPipInstall,
|
|
52884
54426
|
runShellScript: () => runShellScript,
|
|
54427
|
+
runStdlibPyScript: () => runStdlibPyScript,
|
|
52885
54428
|
scanParentDirs: () => scanParentDirs,
|
|
52886
54429
|
shouldServe: () => shouldServe,
|
|
52887
54430
|
shouldUseExperimentalBackends: () => shouldUseExperimentalBackends,
|
|
@@ -54980,6 +56523,47 @@ ${entrypointsForMessage}`);
|
|
|
54980
56523
|
function shouldUseExperimentalBackends(framework) {
|
|
54981
56524
|
return isExperimentalBackendsEnabled() && isBackendFramework(framework);
|
|
54982
56525
|
}
|
|
56526
|
+
var import_fs3 = __toESM(require("fs"));
|
|
56527
|
+
var import_path10 = require("path");
|
|
56528
|
+
var import_execa = __toESM(require_execa());
|
|
56529
|
+
var isWin2 = process.platform === "win32";
|
|
56530
|
+
async function runStdlibPyScript(options) {
|
|
56531
|
+
const { scriptName, pythonPath, args = [], cwd } = options;
|
|
56532
|
+
const scriptPath = (0, import_path10.join)(__dirname, "..", "lib", "python", `${scriptName}.py`);
|
|
56533
|
+
if (!import_fs3.default.existsSync(scriptPath)) throw new Error(`Python script not found: ${scriptPath}`);
|
|
56534
|
+
const pythonCmd = pythonPath ?? (isWin2 ? "python" : "python3");
|
|
56535
|
+
debug$2(`Running stdlib Python script: ${pythonCmd} ${scriptPath} ${args.join(" ")}`);
|
|
56536
|
+
try {
|
|
56537
|
+
const result = await (0, import_execa.default)(pythonCmd, [scriptPath, ...args], { cwd });
|
|
56538
|
+
return {
|
|
56539
|
+
exitCode: 0,
|
|
56540
|
+
stdout: result.stdout,
|
|
56541
|
+
stderr: result.stderr
|
|
56542
|
+
};
|
|
56543
|
+
} catch (err) {
|
|
56544
|
+
const execaErr = err;
|
|
56545
|
+
return {
|
|
56546
|
+
exitCode: execaErr.exitCode ?? 1,
|
|
56547
|
+
stdout: execaErr.stdout ?? "",
|
|
56548
|
+
stderr: execaErr.stderr ?? ""
|
|
56549
|
+
};
|
|
56550
|
+
}
|
|
56551
|
+
}
|
|
56552
|
+
async function isPythonEntrypoint(file) {
|
|
56553
|
+
try {
|
|
56554
|
+
const fsPath = file.fsPath;
|
|
56555
|
+
if (!fsPath) return false;
|
|
56556
|
+
const content = await import_fs3.default.promises.readFile(fsPath, "utf-8");
|
|
56557
|
+
if (!content.includes("app") && !content.includes("handler") && !content.includes("Handler")) return false;
|
|
56558
|
+
return (await runStdlibPyScript({
|
|
56559
|
+
scriptName: "ast_parser",
|
|
56560
|
+
args: [fsPath]
|
|
56561
|
+
})).exitCode === 0;
|
|
56562
|
+
} catch (err) {
|
|
56563
|
+
debug$2(`Failed to check Python entrypoint: ${err}`);
|
|
56564
|
+
return false;
|
|
56565
|
+
}
|
|
56566
|
+
}
|
|
54983
56567
|
}) });
|
|
54984
56568
|
|
|
54985
56569
|
//#endregion
|