@vercel/introspection 0.0.7 → 0.0.9
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 +1953 -334
- package/dist/hono.mjs +1953 -334
- package/dist/index.mjs +2006 -371
- package/dist/loaders/cjs.cjs +1953 -334
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -261,7 +261,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
261
261
|
this.head = this.tail = null;
|
|
262
262
|
this.length = 0;
|
|
263
263
|
};
|
|
264
|
-
BufferList.prototype.join = function
|
|
264
|
+
BufferList.prototype.join = function join6(s) {
|
|
265
265
|
if (this.length === 0) return "";
|
|
266
266
|
var p = this.head;
|
|
267
267
|
var ret = "" + p.data;
|
|
@@ -1983,47 +1983,47 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
1983
1983
|
}
|
|
1984
1984
|
var chdir;
|
|
1985
1985
|
module2.exports = patch;
|
|
1986
|
-
function patch(
|
|
1987
|
-
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(
|
|
1988
|
-
if (!
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
if (
|
|
2008
|
-
|
|
1986
|
+
function patch(fs7) {
|
|
1987
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs7);
|
|
1988
|
+
if (!fs7.lutimes) patchLutimes(fs7);
|
|
1989
|
+
fs7.chown = chownFix(fs7.chown);
|
|
1990
|
+
fs7.fchown = chownFix(fs7.fchown);
|
|
1991
|
+
fs7.lchown = chownFix(fs7.lchown);
|
|
1992
|
+
fs7.chmod = chmodFix(fs7.chmod);
|
|
1993
|
+
fs7.fchmod = chmodFix(fs7.fchmod);
|
|
1994
|
+
fs7.lchmod = chmodFix(fs7.lchmod);
|
|
1995
|
+
fs7.chownSync = chownFixSync(fs7.chownSync);
|
|
1996
|
+
fs7.fchownSync = chownFixSync(fs7.fchownSync);
|
|
1997
|
+
fs7.lchownSync = chownFixSync(fs7.lchownSync);
|
|
1998
|
+
fs7.chmodSync = chmodFixSync(fs7.chmodSync);
|
|
1999
|
+
fs7.fchmodSync = chmodFixSync(fs7.fchmodSync);
|
|
2000
|
+
fs7.lchmodSync = chmodFixSync(fs7.lchmodSync);
|
|
2001
|
+
fs7.stat = statFix(fs7.stat);
|
|
2002
|
+
fs7.fstat = statFix(fs7.fstat);
|
|
2003
|
+
fs7.lstat = statFix(fs7.lstat);
|
|
2004
|
+
fs7.statSync = statFixSync(fs7.statSync);
|
|
2005
|
+
fs7.fstatSync = statFixSync(fs7.fstatSync);
|
|
2006
|
+
fs7.lstatSync = statFixSync(fs7.lstatSync);
|
|
2007
|
+
if (fs7.chmod && !fs7.lchmod) {
|
|
2008
|
+
fs7.lchmod = function(path7, mode, cb) {
|
|
2009
2009
|
if (cb) process.nextTick(cb);
|
|
2010
2010
|
};
|
|
2011
|
-
|
|
2011
|
+
fs7.lchmodSync = function() {};
|
|
2012
2012
|
}
|
|
2013
|
-
if (
|
|
2014
|
-
|
|
2013
|
+
if (fs7.chown && !fs7.lchown) {
|
|
2014
|
+
fs7.lchown = function(path7, uid, gid, cb) {
|
|
2015
2015
|
if (cb) process.nextTick(cb);
|
|
2016
2016
|
};
|
|
2017
|
-
|
|
2017
|
+
fs7.lchownSync = function() {};
|
|
2018
2018
|
}
|
|
2019
|
-
if (platform === "win32")
|
|
2019
|
+
if (platform === "win32") fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : function(fs$rename) {
|
|
2020
2020
|
function rename2(from, to, cb) {
|
|
2021
2021
|
var start = Date.now();
|
|
2022
2022
|
var backoff = 0;
|
|
2023
2023
|
fs$rename(from, to, function CB(er) {
|
|
2024
2024
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
2025
2025
|
setTimeout(function() {
|
|
2026
|
-
|
|
2026
|
+
fs7.stat(to, function(stater, st) {
|
|
2027
2027
|
if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);
|
|
2028
2028
|
else cb(er);
|
|
2029
2029
|
});
|
|
@@ -2036,8 +2036,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2036
2036
|
}
|
|
2037
2037
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename2, fs$rename);
|
|
2038
2038
|
return rename2;
|
|
2039
|
-
}(
|
|
2040
|
-
|
|
2039
|
+
}(fs7.rename);
|
|
2040
|
+
fs7.read = typeof fs7.read !== "function" ? fs7.read : function(fs$read) {
|
|
2041
2041
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
2042
2042
|
var callback;
|
|
2043
2043
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -2045,21 +2045,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2045
2045
|
callback = function(er, _, __) {
|
|
2046
2046
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
2047
2047
|
eagCounter++;
|
|
2048
|
-
return fs$read.call(
|
|
2048
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2049
2049
|
}
|
|
2050
2050
|
callback_.apply(this, arguments);
|
|
2051
2051
|
};
|
|
2052
2052
|
}
|
|
2053
|
-
return fs$read.call(
|
|
2053
|
+
return fs$read.call(fs7, fd, buffer, offset, length, position, callback);
|
|
2054
2054
|
}
|
|
2055
2055
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
2056
2056
|
return read;
|
|
2057
|
-
}(
|
|
2058
|
-
|
|
2057
|
+
}(fs7.read);
|
|
2058
|
+
fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : function(fs$readSync) {
|
|
2059
2059
|
return function(fd, buffer, offset, length, position) {
|
|
2060
2060
|
var eagCounter = 0;
|
|
2061
2061
|
while (true) try {
|
|
2062
|
-
return fs$readSync.call(
|
|
2062
|
+
return fs$readSync.call(fs7, fd, buffer, offset, length, position);
|
|
2063
2063
|
} catch (er) {
|
|
2064
2064
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
2065
2065
|
eagCounter++;
|
|
@@ -2068,78 +2068,78 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2068
2068
|
throw er;
|
|
2069
2069
|
}
|
|
2070
2070
|
};
|
|
2071
|
-
}(
|
|
2072
|
-
function patchLchmod(
|
|
2073
|
-
|
|
2074
|
-
|
|
2071
|
+
}(fs7.readSync);
|
|
2072
|
+
function patchLchmod(fs8) {
|
|
2073
|
+
fs8.lchmod = function(path7, mode, callback) {
|
|
2074
|
+
fs8.open(path7, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
|
|
2075
2075
|
if (err) {
|
|
2076
2076
|
if (callback) callback(err);
|
|
2077
2077
|
return;
|
|
2078
2078
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2079
|
+
fs8.fchmod(fd, mode, function(err2) {
|
|
2080
|
+
fs8.close(fd, function(err22) {
|
|
2081
2081
|
if (callback) callback(err2 || err22);
|
|
2082
2082
|
});
|
|
2083
2083
|
});
|
|
2084
2084
|
});
|
|
2085
2085
|
};
|
|
2086
|
-
|
|
2087
|
-
var fd =
|
|
2086
|
+
fs8.lchmodSync = function(path7, mode) {
|
|
2087
|
+
var fd = fs8.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
2088
2088
|
var threw = true;
|
|
2089
2089
|
var ret;
|
|
2090
2090
|
try {
|
|
2091
|
-
ret =
|
|
2091
|
+
ret = fs8.fchmodSync(fd, mode);
|
|
2092
2092
|
threw = false;
|
|
2093
2093
|
} finally {
|
|
2094
2094
|
if (threw) try {
|
|
2095
|
-
|
|
2095
|
+
fs8.closeSync(fd);
|
|
2096
2096
|
} catch (er) {}
|
|
2097
|
-
else
|
|
2097
|
+
else fs8.closeSync(fd);
|
|
2098
2098
|
}
|
|
2099
2099
|
return ret;
|
|
2100
2100
|
};
|
|
2101
2101
|
}
|
|
2102
|
-
function patchLutimes(
|
|
2103
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
2104
|
-
|
|
2105
|
-
|
|
2102
|
+
function patchLutimes(fs8) {
|
|
2103
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) {
|
|
2104
|
+
fs8.lutimes = function(path7, at, mt, cb) {
|
|
2105
|
+
fs8.open(path7, constants.O_SYMLINK, function(er, fd) {
|
|
2106
2106
|
if (er) {
|
|
2107
2107
|
if (cb) cb(er);
|
|
2108
2108
|
return;
|
|
2109
2109
|
}
|
|
2110
|
-
|
|
2111
|
-
|
|
2110
|
+
fs8.futimes(fd, at, mt, function(er2) {
|
|
2111
|
+
fs8.close(fd, function(er22) {
|
|
2112
2112
|
if (cb) cb(er2 || er22);
|
|
2113
2113
|
});
|
|
2114
2114
|
});
|
|
2115
2115
|
});
|
|
2116
2116
|
};
|
|
2117
|
-
|
|
2118
|
-
var fd =
|
|
2117
|
+
fs8.lutimesSync = function(path7, at, mt) {
|
|
2118
|
+
var fd = fs8.openSync(path7, constants.O_SYMLINK);
|
|
2119
2119
|
var ret;
|
|
2120
2120
|
var threw = true;
|
|
2121
2121
|
try {
|
|
2122
|
-
ret =
|
|
2122
|
+
ret = fs8.futimesSync(fd, at, mt);
|
|
2123
2123
|
threw = false;
|
|
2124
2124
|
} finally {
|
|
2125
2125
|
if (threw) try {
|
|
2126
|
-
|
|
2126
|
+
fs8.closeSync(fd);
|
|
2127
2127
|
} catch (er) {}
|
|
2128
|
-
else
|
|
2128
|
+
else fs8.closeSync(fd);
|
|
2129
2129
|
}
|
|
2130
2130
|
return ret;
|
|
2131
2131
|
};
|
|
2132
|
-
} else if (
|
|
2133
|
-
|
|
2132
|
+
} else if (fs8.futimes) {
|
|
2133
|
+
fs8.lutimes = function(_a, _b, _c, cb) {
|
|
2134
2134
|
if (cb) process.nextTick(cb);
|
|
2135
2135
|
};
|
|
2136
|
-
|
|
2136
|
+
fs8.lutimesSync = function() {};
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
function chmodFix(orig) {
|
|
2140
2140
|
if (!orig) return orig;
|
|
2141
2141
|
return function(target, mode, cb) {
|
|
2142
|
-
return orig.call(
|
|
2142
|
+
return orig.call(fs7, target, mode, function(er) {
|
|
2143
2143
|
if (chownErOk(er)) er = null;
|
|
2144
2144
|
if (cb) cb.apply(this, arguments);
|
|
2145
2145
|
});
|
|
@@ -2149,7 +2149,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2149
2149
|
if (!orig) return orig;
|
|
2150
2150
|
return function(target, mode) {
|
|
2151
2151
|
try {
|
|
2152
|
-
return orig.call(
|
|
2152
|
+
return orig.call(fs7, target, mode);
|
|
2153
2153
|
} catch (er) {
|
|
2154
2154
|
if (!chownErOk(er)) throw er;
|
|
2155
2155
|
}
|
|
@@ -2158,7 +2158,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2158
2158
|
function chownFix(orig) {
|
|
2159
2159
|
if (!orig) return orig;
|
|
2160
2160
|
return function(target, uid, gid, cb) {
|
|
2161
|
-
return orig.call(
|
|
2161
|
+
return orig.call(fs7, target, uid, gid, function(er) {
|
|
2162
2162
|
if (chownErOk(er)) er = null;
|
|
2163
2163
|
if (cb) cb.apply(this, arguments);
|
|
2164
2164
|
});
|
|
@@ -2168,7 +2168,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2168
2168
|
if (!orig) return orig;
|
|
2169
2169
|
return function(target, uid, gid) {
|
|
2170
2170
|
try {
|
|
2171
|
-
return orig.call(
|
|
2171
|
+
return orig.call(fs7, target, uid, gid);
|
|
2172
2172
|
} catch (er) {
|
|
2173
2173
|
if (!chownErOk(er)) throw er;
|
|
2174
2174
|
}
|
|
@@ -2188,13 +2188,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2188
2188
|
}
|
|
2189
2189
|
if (cb) cb.apply(this, arguments);
|
|
2190
2190
|
}
|
|
2191
|
-
return options ? orig.call(
|
|
2191
|
+
return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback);
|
|
2192
2192
|
};
|
|
2193
2193
|
}
|
|
2194
2194
|
function statFixSync(orig) {
|
|
2195
2195
|
if (!orig) return orig;
|
|
2196
2196
|
return function(target, options) {
|
|
2197
|
-
var stats = options ? orig.call(
|
|
2197
|
+
var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target);
|
|
2198
2198
|
if (stats) {
|
|
2199
2199
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
2200
2200
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -2215,7 +2215,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2215
2215
|
var require_legacy_streams = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
2216
2216
|
var Stream = __require("stream").Stream;
|
|
2217
2217
|
module2.exports = legacy;
|
|
2218
|
-
function legacy(
|
|
2218
|
+
function legacy(fs7) {
|
|
2219
2219
|
return {
|
|
2220
2220
|
ReadStream,
|
|
2221
2221
|
WriteStream
|
|
@@ -2251,7 +2251,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2251
2251
|
});
|
|
2252
2252
|
return;
|
|
2253
2253
|
}
|
|
2254
|
-
|
|
2254
|
+
fs7.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
2255
2255
|
if (err) {
|
|
2256
2256
|
self2.emit("error", err);
|
|
2257
2257
|
self2.readable = false;
|
|
@@ -2286,7 +2286,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2286
2286
|
this.busy = false;
|
|
2287
2287
|
this._queue = [];
|
|
2288
2288
|
if (this.fd === null) {
|
|
2289
|
-
this._open =
|
|
2289
|
+
this._open = fs7.open;
|
|
2290
2290
|
this._queue.push([
|
|
2291
2291
|
this._open,
|
|
2292
2292
|
this.path,
|
|
@@ -2315,7 +2315,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2315
2315
|
}
|
|
2316
2316
|
} });
|
|
2317
2317
|
var require_graceful_fs = __commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
2318
|
-
var
|
|
2318
|
+
var fs7 = __require("fs");
|
|
2319
2319
|
var polyfills = require_polyfills();
|
|
2320
2320
|
var legacy = require_legacy_streams();
|
|
2321
2321
|
var clone = require_clone();
|
|
@@ -2342,46 +2342,46 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2342
2342
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
2343
2343
|
console.error(m);
|
|
2344
2344
|
};
|
|
2345
|
-
if (!
|
|
2345
|
+
if (!fs7[gracefulQueue]) {
|
|
2346
2346
|
queue = global[gracefulQueue] || [];
|
|
2347
|
-
publishQueue(
|
|
2348
|
-
|
|
2347
|
+
publishQueue(fs7, queue);
|
|
2348
|
+
fs7.close = function(fs$close) {
|
|
2349
2349
|
function close(fd, cb) {
|
|
2350
|
-
return fs$close.call(
|
|
2350
|
+
return fs$close.call(fs7, fd, function(err) {
|
|
2351
2351
|
if (!err) resetQueue();
|
|
2352
2352
|
if (typeof cb === "function") cb.apply(this, arguments);
|
|
2353
2353
|
});
|
|
2354
2354
|
}
|
|
2355
2355
|
Object.defineProperty(close, previousSymbol, { value: fs$close });
|
|
2356
2356
|
return close;
|
|
2357
|
-
}(
|
|
2358
|
-
|
|
2357
|
+
}(fs7.close);
|
|
2358
|
+
fs7.closeSync = function(fs$closeSync) {
|
|
2359
2359
|
function closeSync(fd) {
|
|
2360
|
-
fs$closeSync.apply(
|
|
2360
|
+
fs$closeSync.apply(fs7, arguments);
|
|
2361
2361
|
resetQueue();
|
|
2362
2362
|
}
|
|
2363
2363
|
Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
|
|
2364
2364
|
return closeSync;
|
|
2365
|
-
}(
|
|
2365
|
+
}(fs7.closeSync);
|
|
2366
2366
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
|
|
2367
|
-
debug2(
|
|
2368
|
-
__require("assert").equal(
|
|
2367
|
+
debug2(fs7[gracefulQueue]);
|
|
2368
|
+
__require("assert").equal(fs7[gracefulQueue].length, 0);
|
|
2369
2369
|
});
|
|
2370
2370
|
}
|
|
2371
2371
|
var queue;
|
|
2372
|
-
if (!global[gracefulQueue]) publishQueue(global,
|
|
2373
|
-
module2.exports = patch(clone(
|
|
2374
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
2375
|
-
module2.exports = patch(
|
|
2376
|
-
|
|
2377
|
-
}
|
|
2378
|
-
function patch(
|
|
2379
|
-
polyfills(
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
var fs$readFile =
|
|
2384
|
-
|
|
2372
|
+
if (!global[gracefulQueue]) publishQueue(global, fs7[gracefulQueue]);
|
|
2373
|
+
module2.exports = patch(clone(fs7));
|
|
2374
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) {
|
|
2375
|
+
module2.exports = patch(fs7);
|
|
2376
|
+
fs7.__patched = true;
|
|
2377
|
+
}
|
|
2378
|
+
function patch(fs8) {
|
|
2379
|
+
polyfills(fs8);
|
|
2380
|
+
fs8.gracefulify = patch;
|
|
2381
|
+
fs8.createReadStream = createReadStream;
|
|
2382
|
+
fs8.createWriteStream = createWriteStream;
|
|
2383
|
+
var fs$readFile = fs8.readFile;
|
|
2384
|
+
fs8.readFile = readFile4;
|
|
2385
2385
|
function readFile4(path7, options, cb) {
|
|
2386
2386
|
if (typeof options === "function") cb = options, options = null;
|
|
2387
2387
|
return go$readFile(path7, options, cb);
|
|
@@ -2402,8 +2402,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2402
2402
|
});
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
var fs$writeFile =
|
|
2406
|
-
|
|
2405
|
+
var fs$writeFile = fs8.writeFile;
|
|
2406
|
+
fs8.writeFile = writeFile;
|
|
2407
2407
|
function writeFile(path7, data, options, cb) {
|
|
2408
2408
|
if (typeof options === "function") cb = options, options = null;
|
|
2409
2409
|
return go$writeFile(path7, data, options, cb);
|
|
@@ -2425,8 +2425,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2425
2425
|
});
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
var fs$appendFile =
|
|
2429
|
-
if (fs$appendFile)
|
|
2428
|
+
var fs$appendFile = fs8.appendFile;
|
|
2429
|
+
if (fs$appendFile) fs8.appendFile = appendFile;
|
|
2430
2430
|
function appendFile(path7, data, options, cb) {
|
|
2431
2431
|
if (typeof options === "function") cb = options, options = null;
|
|
2432
2432
|
return go$appendFile(path7, data, options, cb);
|
|
@@ -2448,8 +2448,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2448
2448
|
});
|
|
2449
2449
|
}
|
|
2450
2450
|
}
|
|
2451
|
-
var fs$copyFile =
|
|
2452
|
-
if (fs$copyFile)
|
|
2451
|
+
var fs$copyFile = fs8.copyFile;
|
|
2452
|
+
if (fs$copyFile) fs8.copyFile = copyFile;
|
|
2453
2453
|
function copyFile(src, dest, flags, cb) {
|
|
2454
2454
|
if (typeof flags === "function") {
|
|
2455
2455
|
cb = flags;
|
|
@@ -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$readdir =
|
|
2478
|
-
|
|
2477
|
+
var fs$readdir = fs8.readdir;
|
|
2478
|
+
fs8.readdir = readdir;
|
|
2479
2479
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
2480
2480
|
function readdir(path7, options, cb) {
|
|
2481
2481
|
if (typeof options === "function") cb = options, options = null;
|
|
@@ -2506,21 +2506,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
2508
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
2509
|
-
var legStreams = legacy(
|
|
2509
|
+
var legStreams = legacy(fs8);
|
|
2510
2510
|
ReadStream = legStreams.ReadStream;
|
|
2511
2511
|
WriteStream = legStreams.WriteStream;
|
|
2512
2512
|
}
|
|
2513
|
-
var fs$ReadStream =
|
|
2513
|
+
var fs$ReadStream = fs8.ReadStream;
|
|
2514
2514
|
if (fs$ReadStream) {
|
|
2515
2515
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
2516
2516
|
ReadStream.prototype.open = ReadStream$open;
|
|
2517
2517
|
}
|
|
2518
|
-
var fs$WriteStream =
|
|
2518
|
+
var fs$WriteStream = fs8.WriteStream;
|
|
2519
2519
|
if (fs$WriteStream) {
|
|
2520
2520
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
2521
2521
|
WriteStream.prototype.open = WriteStream$open;
|
|
2522
2522
|
}
|
|
2523
|
-
Object.defineProperty(
|
|
2523
|
+
Object.defineProperty(fs8, "ReadStream", {
|
|
2524
2524
|
get: function() {
|
|
2525
2525
|
return ReadStream;
|
|
2526
2526
|
},
|
|
@@ -2530,7 +2530,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2530
2530
|
enumerable: true,
|
|
2531
2531
|
configurable: true
|
|
2532
2532
|
});
|
|
2533
|
-
Object.defineProperty(
|
|
2533
|
+
Object.defineProperty(fs8, "WriteStream", {
|
|
2534
2534
|
get: function() {
|
|
2535
2535
|
return WriteStream;
|
|
2536
2536
|
},
|
|
@@ -2541,7 +2541,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2541
2541
|
configurable: true
|
|
2542
2542
|
});
|
|
2543
2543
|
var FileReadStream = ReadStream;
|
|
2544
|
-
Object.defineProperty(
|
|
2544
|
+
Object.defineProperty(fs8, "FileReadStream", {
|
|
2545
2545
|
get: function() {
|
|
2546
2546
|
return FileReadStream;
|
|
2547
2547
|
},
|
|
@@ -2552,7 +2552,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2552
2552
|
configurable: true
|
|
2553
2553
|
});
|
|
2554
2554
|
var FileWriteStream = WriteStream;
|
|
2555
|
-
Object.defineProperty(
|
|
2555
|
+
Object.defineProperty(fs8, "FileWriteStream", {
|
|
2556
2556
|
get: function() {
|
|
2557
2557
|
return FileWriteStream;
|
|
2558
2558
|
},
|
|
@@ -2596,13 +2596,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2596
2596
|
});
|
|
2597
2597
|
}
|
|
2598
2598
|
function createReadStream(path7, options) {
|
|
2599
|
-
return new
|
|
2599
|
+
return new fs8.ReadStream(path7, options);
|
|
2600
2600
|
}
|
|
2601
2601
|
function createWriteStream(path7, options) {
|
|
2602
|
-
return new
|
|
2602
|
+
return new fs8.WriteStream(path7, options);
|
|
2603
2603
|
}
|
|
2604
|
-
var fs$open =
|
|
2605
|
-
|
|
2604
|
+
var fs$open = fs8.open;
|
|
2605
|
+
fs8.open = open;
|
|
2606
2606
|
function open(path7, flags, mode, cb) {
|
|
2607
2607
|
if (typeof mode === "function") cb = mode, mode = null;
|
|
2608
2608
|
return go$open(path7, flags, mode, cb);
|
|
@@ -2624,27 +2624,27 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2624
2624
|
});
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
|
-
return
|
|
2627
|
+
return fs8;
|
|
2628
2628
|
}
|
|
2629
2629
|
function enqueue(elem) {
|
|
2630
2630
|
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
2631
|
-
|
|
2631
|
+
fs7[gracefulQueue].push(elem);
|
|
2632
2632
|
retry2();
|
|
2633
2633
|
}
|
|
2634
2634
|
var retryTimer;
|
|
2635
2635
|
function resetQueue() {
|
|
2636
2636
|
var now = Date.now();
|
|
2637
|
-
for (var i = 0; i <
|
|
2638
|
-
|
|
2639
|
-
|
|
2637
|
+
for (var i = 0; i < fs7[gracefulQueue].length; ++i) if (fs7[gracefulQueue][i].length > 2) {
|
|
2638
|
+
fs7[gracefulQueue][i][3] = now;
|
|
2639
|
+
fs7[gracefulQueue][i][4] = now;
|
|
2640
2640
|
}
|
|
2641
2641
|
retry2();
|
|
2642
2642
|
}
|
|
2643
2643
|
function retry2() {
|
|
2644
2644
|
clearTimeout(retryTimer);
|
|
2645
2645
|
retryTimer = void 0;
|
|
2646
|
-
if (
|
|
2647
|
-
var elem =
|
|
2646
|
+
if (fs7[gracefulQueue].length === 0) return;
|
|
2647
|
+
var elem = fs7[gracefulQueue].shift();
|
|
2648
2648
|
var fn = elem[0];
|
|
2649
2649
|
var args = elem[1];
|
|
2650
2650
|
var err = elem[2];
|
|
@@ -2663,14 +2663,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2663
2663
|
if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
|
|
2664
2664
|
debug2("RETRY", fn.name, args);
|
|
2665
2665
|
fn.apply(null, args.concat([startTime]));
|
|
2666
|
-
} else
|
|
2666
|
+
} else fs7[gracefulQueue].push(elem);
|
|
2667
2667
|
}
|
|
2668
2668
|
if (retryTimer === void 0) retryTimer = setTimeout(retry2, 0);
|
|
2669
2669
|
}
|
|
2670
2670
|
} });
|
|
2671
2671
|
var require_fs = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
2672
2672
|
var u = require_universalify().fromCallback;
|
|
2673
|
-
var
|
|
2673
|
+
var fs7 = require_graceful_fs();
|
|
2674
2674
|
var api = [
|
|
2675
2675
|
"access",
|
|
2676
2676
|
"appendFile",
|
|
@@ -2707,23 +2707,23 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2707
2707
|
"utimes",
|
|
2708
2708
|
"writeFile"
|
|
2709
2709
|
].filter((key) => {
|
|
2710
|
-
return typeof
|
|
2710
|
+
return typeof fs7[key] === "function";
|
|
2711
2711
|
});
|
|
2712
|
-
Object.assign(exports2,
|
|
2712
|
+
Object.assign(exports2, fs7);
|
|
2713
2713
|
api.forEach((method) => {
|
|
2714
|
-
exports2[method] = u(
|
|
2714
|
+
exports2[method] = u(fs7[method]);
|
|
2715
2715
|
});
|
|
2716
|
-
exports2.realpath.native = u(
|
|
2716
|
+
exports2.realpath.native = u(fs7.realpath.native);
|
|
2717
2717
|
exports2.exists = function(filename, callback) {
|
|
2718
|
-
if (typeof callback === "function") return
|
|
2718
|
+
if (typeof callback === "function") return fs7.exists(filename, callback);
|
|
2719
2719
|
return new Promise((resolve) => {
|
|
2720
|
-
return
|
|
2720
|
+
return fs7.exists(filename, resolve);
|
|
2721
2721
|
});
|
|
2722
2722
|
};
|
|
2723
2723
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
2724
|
-
if (typeof callback === "function") return
|
|
2724
|
+
if (typeof callback === "function") return fs7.read(fd, buffer, offset, length, position, callback);
|
|
2725
2725
|
return new Promise((resolve, reject) => {
|
|
2726
|
-
|
|
2726
|
+
fs7.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
2727
2727
|
if (err) return reject(err);
|
|
2728
2728
|
resolve({
|
|
2729
2729
|
bytesRead,
|
|
@@ -2733,9 +2733,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2733
2733
|
});
|
|
2734
2734
|
};
|
|
2735
2735
|
exports2.write = function(fd, buffer, ...args) {
|
|
2736
|
-
if (typeof args[args.length - 1] === "function") return
|
|
2736
|
+
if (typeof args[args.length - 1] === "function") return fs7.write(fd, buffer, ...args);
|
|
2737
2737
|
return new Promise((resolve, reject) => {
|
|
2738
|
-
|
|
2738
|
+
fs7.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
2739
2739
|
if (err) return reject(err);
|
|
2740
2740
|
resolve({
|
|
2741
2741
|
bytesWritten,
|
|
@@ -2744,10 +2744,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2744
2744
|
});
|
|
2745
2745
|
});
|
|
2746
2746
|
};
|
|
2747
|
-
if (typeof
|
|
2748
|
-
if (typeof args[args.length - 1] === "function") return
|
|
2747
|
+
if (typeof fs7.writev === "function") exports2.writev = function(fd, buffers, ...args) {
|
|
2748
|
+
if (typeof args[args.length - 1] === "function") return fs7.writev(fd, buffers, ...args);
|
|
2749
2749
|
return new Promise((resolve, reject) => {
|
|
2750
|
-
|
|
2750
|
+
fs7.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
2751
2751
|
if (err) return reject(err);
|
|
2752
2752
|
resolve({
|
|
2753
2753
|
bytesWritten,
|
|
@@ -2770,7 +2770,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2770
2770
|
};
|
|
2771
2771
|
} });
|
|
2772
2772
|
var require_make_dir = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
2773
|
-
var
|
|
2773
|
+
var fs7 = require_fs();
|
|
2774
2774
|
var { checkPath } = require_utils();
|
|
2775
2775
|
var getMode = (options) => {
|
|
2776
2776
|
const defaults = { mode: 511 };
|
|
@@ -2782,14 +2782,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2782
2782
|
};
|
|
2783
2783
|
module2.exports.makeDir = async (dir, options) => {
|
|
2784
2784
|
checkPath(dir);
|
|
2785
|
-
return
|
|
2785
|
+
return fs7.mkdir(dir, {
|
|
2786
2786
|
mode: getMode(options),
|
|
2787
2787
|
recursive: true
|
|
2788
2788
|
});
|
|
2789
2789
|
};
|
|
2790
2790
|
module2.exports.makeDirSync = (dir, options) => {
|
|
2791
2791
|
checkPath(dir);
|
|
2792
|
-
return
|
|
2792
|
+
return fs7.mkdirSync(dir, {
|
|
2793
2793
|
mode: getMode(options),
|
|
2794
2794
|
recursive: true
|
|
2795
2795
|
});
|
|
@@ -2809,21 +2809,21 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2809
2809
|
};
|
|
2810
2810
|
} });
|
|
2811
2811
|
var require_utimes = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
2812
|
-
var
|
|
2812
|
+
var fs7 = require_graceful_fs();
|
|
2813
2813
|
function utimesMillis(path7, atime, mtime2, callback) {
|
|
2814
|
-
|
|
2814
|
+
fs7.open(path7, "r+", (err, fd) => {
|
|
2815
2815
|
if (err) return callback(err);
|
|
2816
|
-
|
|
2817
|
-
|
|
2816
|
+
fs7.futimes(fd, atime, mtime2, (futimesErr) => {
|
|
2817
|
+
fs7.close(fd, (closeErr) => {
|
|
2818
2818
|
if (callback) callback(futimesErr || closeErr);
|
|
2819
2819
|
});
|
|
2820
2820
|
});
|
|
2821
2821
|
});
|
|
2822
2822
|
}
|
|
2823
2823
|
function utimesMillisSync(path7, atime, mtime2) {
|
|
2824
|
-
const fd =
|
|
2825
|
-
|
|
2826
|
-
return
|
|
2824
|
+
const fd = fs7.openSync(path7, "r+");
|
|
2825
|
+
fs7.futimesSync(fd, atime, mtime2);
|
|
2826
|
+
return fs7.closeSync(fd);
|
|
2827
2827
|
}
|
|
2828
2828
|
module2.exports = {
|
|
2829
2829
|
utimesMillis,
|
|
@@ -2831,11 +2831,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2831
2831
|
};
|
|
2832
2832
|
} });
|
|
2833
2833
|
var require_stat = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
2834
|
-
var
|
|
2834
|
+
var fs7 = require_fs();
|
|
2835
2835
|
var path7 = __require("path");
|
|
2836
2836
|
var util = __require("util");
|
|
2837
2837
|
function getStats(src, dest, opts) {
|
|
2838
|
-
const statFunc = opts.dereference ? (file) =>
|
|
2838
|
+
const statFunc = opts.dereference ? (file) => fs7.stat(file, { bigint: true }) : (file) => fs7.lstat(file, { bigint: true });
|
|
2839
2839
|
return Promise.all([statFunc(src), statFunc(dest).catch((err) => {
|
|
2840
2840
|
if (err.code === "ENOENT") return null;
|
|
2841
2841
|
throw err;
|
|
@@ -2846,7 +2846,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2846
2846
|
}
|
|
2847
2847
|
function getStatsSync(src, dest, opts) {
|
|
2848
2848
|
let destStat;
|
|
2849
|
-
const statFunc = opts.dereference ? (file) =>
|
|
2849
|
+
const statFunc = opts.dereference ? (file) => fs7.statSync(file, { bigint: true }) : (file) => fs7.lstatSync(file, { bigint: true });
|
|
2850
2850
|
const srcStat = statFunc(src);
|
|
2851
2851
|
try {
|
|
2852
2852
|
destStat = statFunc(dest);
|
|
@@ -2913,7 +2913,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2913
2913
|
const srcParent = path7.resolve(path7.dirname(src));
|
|
2914
2914
|
const destParent = path7.resolve(path7.dirname(dest));
|
|
2915
2915
|
if (destParent === srcParent || destParent === path7.parse(destParent).root) return cb();
|
|
2916
|
-
|
|
2916
|
+
fs7.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
2917
2917
|
if (err) {
|
|
2918
2918
|
if (err.code === "ENOENT") return cb();
|
|
2919
2919
|
return cb(err);
|
|
@@ -2928,7 +2928,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2928
2928
|
if (destParent === srcParent || destParent === path7.parse(destParent).root) return;
|
|
2929
2929
|
let destStat;
|
|
2930
2930
|
try {
|
|
2931
|
-
destStat =
|
|
2931
|
+
destStat = fs7.statSync(destParent, { bigint: true });
|
|
2932
2932
|
} catch (err) {
|
|
2933
2933
|
if (err.code === "ENOENT") return;
|
|
2934
2934
|
throw err;
|
|
@@ -2957,7 +2957,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2957
2957
|
};
|
|
2958
2958
|
} });
|
|
2959
2959
|
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) {
|
|
2960
|
-
var
|
|
2960
|
+
var fs7 = require_graceful_fs();
|
|
2961
2961
|
var path7 = __require("path");
|
|
2962
2962
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
2963
2963
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
@@ -2977,7 +2977,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2977
2977
|
function handleFilterAndCopy(destStat, src, dest, opts) {
|
|
2978
2978
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
2979
2979
|
const destParent = path7.dirname(dest);
|
|
2980
|
-
if (!
|
|
2980
|
+
if (!fs7.existsSync(destParent)) mkdirsSync(destParent);
|
|
2981
2981
|
return getStats(destStat, src, dest, opts);
|
|
2982
2982
|
}
|
|
2983
2983
|
function startCopy(destStat, src, dest, opts) {
|
|
@@ -2985,7 +2985,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2985
2985
|
return getStats(destStat, src, dest, opts);
|
|
2986
2986
|
}
|
|
2987
2987
|
function getStats(destStat, src, dest, opts) {
|
|
2988
|
-
const srcStat = (opts.dereference ?
|
|
2988
|
+
const srcStat = (opts.dereference ? fs7.statSync : fs7.lstatSync)(src);
|
|
2989
2989
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
2990
2990
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
2991
2991
|
else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
|
@@ -2999,12 +2999,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
2999
2999
|
}
|
|
3000
3000
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
3001
3001
|
if (opts.overwrite) {
|
|
3002
|
-
|
|
3002
|
+
fs7.unlinkSync(dest);
|
|
3003
3003
|
return copyFile(srcStat, src, dest, opts);
|
|
3004
3004
|
} else if (opts.errorOnExist) throw new Error(`'${dest}' already exists`);
|
|
3005
3005
|
}
|
|
3006
3006
|
function copyFile(srcStat, src, dest, opts) {
|
|
3007
|
-
|
|
3007
|
+
fs7.copyFileSync(src, dest);
|
|
3008
3008
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
3009
3009
|
return setDestMode(dest, srcStat.mode);
|
|
3010
3010
|
}
|
|
@@ -3019,10 +3019,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3019
3019
|
return setDestMode(dest, srcMode | 128);
|
|
3020
3020
|
}
|
|
3021
3021
|
function setDestMode(dest, srcMode) {
|
|
3022
|
-
return
|
|
3022
|
+
return fs7.chmodSync(dest, srcMode);
|
|
3023
3023
|
}
|
|
3024
3024
|
function setDestTimestamps(src, dest) {
|
|
3025
|
-
const updatedSrcStat =
|
|
3025
|
+
const updatedSrcStat = fs7.statSync(src);
|
|
3026
3026
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
3027
3027
|
}
|
|
3028
3028
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -3030,12 +3030,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3030
3030
|
return copyDir(src, dest, opts);
|
|
3031
3031
|
}
|
|
3032
3032
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
3033
|
-
|
|
3033
|
+
fs7.mkdirSync(dest);
|
|
3034
3034
|
copyDir(src, dest, opts);
|
|
3035
3035
|
return setDestMode(dest, srcMode);
|
|
3036
3036
|
}
|
|
3037
3037
|
function copyDir(src, dest, opts) {
|
|
3038
|
-
|
|
3038
|
+
fs7.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
3039
3039
|
}
|
|
3040
3040
|
function copyDirItem(item, src, dest, opts) {
|
|
3041
3041
|
const srcItem = path7.join(src, item);
|
|
@@ -3044,26 +3044,26 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3044
3044
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
3045
3045
|
}
|
|
3046
3046
|
function onLink(destStat, src, dest, opts) {
|
|
3047
|
-
let resolvedSrc =
|
|
3047
|
+
let resolvedSrc = fs7.readlinkSync(src);
|
|
3048
3048
|
if (opts.dereference) resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3049
|
-
if (!destStat) return
|
|
3049
|
+
if (!destStat) return fs7.symlinkSync(resolvedSrc, dest);
|
|
3050
3050
|
else {
|
|
3051
3051
|
let resolvedDest;
|
|
3052
3052
|
try {
|
|
3053
|
-
resolvedDest =
|
|
3053
|
+
resolvedDest = fs7.readlinkSync(dest);
|
|
3054
3054
|
} catch (err) {
|
|
3055
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
3055
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs7.symlinkSync(resolvedSrc, dest);
|
|
3056
3056
|
throw err;
|
|
3057
3057
|
}
|
|
3058
3058
|
if (opts.dereference) resolvedDest = path7.resolve(process.cwd(), resolvedDest);
|
|
3059
3059
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
3060
|
-
if (
|
|
3060
|
+
if (fs7.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
3061
3061
|
return copyLink(resolvedSrc, dest);
|
|
3062
3062
|
}
|
|
3063
3063
|
}
|
|
3064
3064
|
function copyLink(resolvedSrc, dest) {
|
|
3065
|
-
|
|
3066
|
-
return
|
|
3065
|
+
fs7.unlinkSync(dest);
|
|
3066
|
+
return fs7.symlinkSync(resolvedSrc, dest);
|
|
3067
3067
|
}
|
|
3068
3068
|
module2.exports = copySync;
|
|
3069
3069
|
} });
|
|
@@ -3072,17 +3072,17 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3072
3072
|
} });
|
|
3073
3073
|
var require_path_exists = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
3074
3074
|
var u = require_universalify().fromPromise;
|
|
3075
|
-
var
|
|
3075
|
+
var fs7 = require_fs();
|
|
3076
3076
|
function pathExists(path7) {
|
|
3077
|
-
return
|
|
3077
|
+
return fs7.access(path7).then(() => true).catch(() => false);
|
|
3078
3078
|
}
|
|
3079
3079
|
module2.exports = {
|
|
3080
3080
|
pathExists: u(pathExists),
|
|
3081
|
-
pathExistsSync:
|
|
3081
|
+
pathExistsSync: fs7.existsSync
|
|
3082
3082
|
};
|
|
3083
3083
|
} });
|
|
3084
3084
|
var require_copy = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
3085
|
-
var
|
|
3085
|
+
var fs7 = require_graceful_fs();
|
|
3086
3086
|
var path7 = __require("path");
|
|
3087
3087
|
var mkdirs = require_mkdirs().mkdirs;
|
|
3088
3088
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -3132,7 +3132,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3132
3132
|
return getStats(destStat, src, dest, opts, cb);
|
|
3133
3133
|
}
|
|
3134
3134
|
function getStats(destStat, src, dest, opts, cb) {
|
|
3135
|
-
(opts.dereference ?
|
|
3135
|
+
(opts.dereference ? fs7.stat : fs7.lstat)(src, (err, srcStat) => {
|
|
3136
3136
|
if (err) return cb(err);
|
|
3137
3137
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb);
|
|
3138
3138
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb);
|
|
@@ -3147,7 +3147,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3147
3147
|
return mayCopyFile(srcStat, src, dest, opts, cb);
|
|
3148
3148
|
}
|
|
3149
3149
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
3150
|
-
if (opts.overwrite)
|
|
3150
|
+
if (opts.overwrite) fs7.unlink(dest, (err) => {
|
|
3151
3151
|
if (err) return cb(err);
|
|
3152
3152
|
return copyFile(srcStat, src, dest, opts, cb);
|
|
3153
3153
|
});
|
|
@@ -3155,7 +3155,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3155
3155
|
else return cb();
|
|
3156
3156
|
}
|
|
3157
3157
|
function copyFile(srcStat, src, dest, opts, cb) {
|
|
3158
|
-
|
|
3158
|
+
fs7.copyFile(src, dest, (err) => {
|
|
3159
3159
|
if (err) return cb(err);
|
|
3160
3160
|
if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
|
|
3161
3161
|
return setDestMode(dest, srcStat.mode, cb);
|
|
@@ -3181,10 +3181,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3181
3181
|
});
|
|
3182
3182
|
}
|
|
3183
3183
|
function setDestMode(dest, srcMode, cb) {
|
|
3184
|
-
return
|
|
3184
|
+
return fs7.chmod(dest, srcMode, cb);
|
|
3185
3185
|
}
|
|
3186
3186
|
function setDestTimestamps(src, dest, cb) {
|
|
3187
|
-
|
|
3187
|
+
fs7.stat(src, (err, updatedSrcStat) => {
|
|
3188
3188
|
if (err) return cb(err);
|
|
3189
3189
|
return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
|
|
3190
3190
|
});
|
|
@@ -3194,7 +3194,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3194
3194
|
return copyDir(src, dest, opts, cb);
|
|
3195
3195
|
}
|
|
3196
3196
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
3197
|
-
|
|
3197
|
+
fs7.mkdir(dest, (err) => {
|
|
3198
3198
|
if (err) return cb(err);
|
|
3199
3199
|
copyDir(src, dest, opts, (err2) => {
|
|
3200
3200
|
if (err2) return cb(err2);
|
|
@@ -3203,7 +3203,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3203
3203
|
});
|
|
3204
3204
|
}
|
|
3205
3205
|
function copyDir(src, dest, opts, cb) {
|
|
3206
|
-
|
|
3206
|
+
fs7.readdir(src, (err, items) => {
|
|
3207
3207
|
if (err) return cb(err);
|
|
3208
3208
|
return copyDirItems(items, src, dest, opts, cb);
|
|
3209
3209
|
});
|
|
@@ -3226,13 +3226,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3226
3226
|
});
|
|
3227
3227
|
}
|
|
3228
3228
|
function onLink(destStat, src, dest, opts, cb) {
|
|
3229
|
-
|
|
3229
|
+
fs7.readlink(src, (err, resolvedSrc) => {
|
|
3230
3230
|
if (err) return cb(err);
|
|
3231
3231
|
if (opts.dereference) resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
|
|
3232
|
-
if (!destStat) return
|
|
3233
|
-
else
|
|
3232
|
+
if (!destStat) return fs7.symlink(resolvedSrc, dest, cb);
|
|
3233
|
+
else fs7.readlink(dest, (err2, resolvedDest) => {
|
|
3234
3234
|
if (err2) {
|
|
3235
|
-
if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return
|
|
3235
|
+
if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs7.symlink(resolvedSrc, dest, cb);
|
|
3236
3236
|
return cb(err2);
|
|
3237
3237
|
}
|
|
3238
3238
|
if (opts.dereference) resolvedDest = path7.resolve(process.cwd(), resolvedDest);
|
|
@@ -3243,9 +3243,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3243
3243
|
});
|
|
3244
3244
|
}
|
|
3245
3245
|
function copyLink(resolvedSrc, dest, cb) {
|
|
3246
|
-
|
|
3246
|
+
fs7.unlink(dest, (err) => {
|
|
3247
3247
|
if (err) return cb(err);
|
|
3248
|
-
return
|
|
3248
|
+
return fs7.symlink(resolvedSrc, dest, cb);
|
|
3249
3249
|
});
|
|
3250
3250
|
}
|
|
3251
3251
|
module2.exports = copy;
|
|
@@ -3255,7 +3255,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3255
3255
|
module2.exports = { copy: u(require_copy()) };
|
|
3256
3256
|
} });
|
|
3257
3257
|
var require_rimraf = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/rimraf.js"(exports2, module2) {
|
|
3258
|
-
var
|
|
3258
|
+
var fs7 = require_graceful_fs();
|
|
3259
3259
|
var path7 = __require("path");
|
|
3260
3260
|
var assert7 = __require("assert");
|
|
3261
3261
|
var isWindows = process.platform === "win32";
|
|
@@ -3268,9 +3268,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3268
3268
|
"rmdir",
|
|
3269
3269
|
"readdir"
|
|
3270
3270
|
].forEach((m) => {
|
|
3271
|
-
options[m] = options[m] ||
|
|
3271
|
+
options[m] = options[m] || fs7[m];
|
|
3272
3272
|
m = m + "Sync";
|
|
3273
|
-
options[m] = options[m] ||
|
|
3273
|
+
options[m] = options[m] || fs7[m];
|
|
3274
3274
|
});
|
|
3275
3275
|
options.maxBusyTries = options.maxBusyTries || 3;
|
|
3276
3276
|
}
|
|
@@ -3428,18 +3428,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3428
3428
|
rimraf.sync = rimrafSync;
|
|
3429
3429
|
} });
|
|
3430
3430
|
var require_remove = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
3431
|
-
var
|
|
3431
|
+
var fs7 = require_graceful_fs();
|
|
3432
3432
|
var u = require_universalify().fromCallback;
|
|
3433
3433
|
var rimraf = require_rimraf();
|
|
3434
3434
|
function remove2(path7, callback) {
|
|
3435
|
-
if (
|
|
3435
|
+
if (fs7.rm) return fs7.rm(path7, {
|
|
3436
3436
|
recursive: true,
|
|
3437
3437
|
force: true
|
|
3438
3438
|
}, callback);
|
|
3439
3439
|
rimraf(path7, callback);
|
|
3440
3440
|
}
|
|
3441
3441
|
function removeSync(path7) {
|
|
3442
|
-
if (
|
|
3442
|
+
if (fs7.rmSync) return fs7.rmSync(path7, {
|
|
3443
3443
|
recursive: true,
|
|
3444
3444
|
force: true
|
|
3445
3445
|
});
|
|
@@ -3452,14 +3452,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3452
3452
|
} });
|
|
3453
3453
|
var require_empty = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
3454
3454
|
var u = require_universalify().fromPromise;
|
|
3455
|
-
var
|
|
3455
|
+
var fs7 = require_fs();
|
|
3456
3456
|
var path7 = __require("path");
|
|
3457
3457
|
var mkdir = require_mkdirs();
|
|
3458
3458
|
var remove2 = require_remove();
|
|
3459
3459
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
3460
3460
|
let items;
|
|
3461
3461
|
try {
|
|
3462
|
-
items = await
|
|
3462
|
+
items = await fs7.readdir(dir);
|
|
3463
3463
|
} catch {
|
|
3464
3464
|
return mkdir.mkdirs(dir);
|
|
3465
3465
|
}
|
|
@@ -3468,7 +3468,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3468
3468
|
function emptyDirSync(dir) {
|
|
3469
3469
|
let items;
|
|
3470
3470
|
try {
|
|
3471
|
-
items =
|
|
3471
|
+
items = fs7.readdirSync(dir);
|
|
3472
3472
|
} catch {
|
|
3473
3473
|
return mkdir.mkdirsSync(dir);
|
|
3474
3474
|
}
|
|
@@ -3487,19 +3487,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3487
3487
|
var require_file = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
3488
3488
|
var u = require_universalify().fromCallback;
|
|
3489
3489
|
var path7 = __require("path");
|
|
3490
|
-
var
|
|
3490
|
+
var fs7 = require_graceful_fs();
|
|
3491
3491
|
var mkdir = require_mkdirs();
|
|
3492
3492
|
function createFile(file, callback) {
|
|
3493
3493
|
function makeFile() {
|
|
3494
|
-
|
|
3494
|
+
fs7.writeFile(file, "", (err) => {
|
|
3495
3495
|
if (err) return callback(err);
|
|
3496
3496
|
callback();
|
|
3497
3497
|
});
|
|
3498
3498
|
}
|
|
3499
|
-
|
|
3499
|
+
fs7.stat(file, (err, stats) => {
|
|
3500
3500
|
if (!err && stats.isFile()) return callback();
|
|
3501
3501
|
const dir = path7.dirname(file);
|
|
3502
|
-
|
|
3502
|
+
fs7.stat(dir, (err2, stats2) => {
|
|
3503
3503
|
if (err2) {
|
|
3504
3504
|
if (err2.code === "ENOENT") return mkdir.mkdirs(dir, (err3) => {
|
|
3505
3505
|
if (err3) return callback(err3);
|
|
@@ -3508,7 +3508,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3508
3508
|
return callback(err2);
|
|
3509
3509
|
}
|
|
3510
3510
|
if (stats2.isDirectory()) makeFile();
|
|
3511
|
-
else
|
|
3511
|
+
else fs7.readdir(dir, (err3) => {
|
|
3512
3512
|
if (err3) return callback(err3);
|
|
3513
3513
|
});
|
|
3514
3514
|
});
|
|
@@ -3517,17 +3517,17 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3517
3517
|
function createFileSync(file) {
|
|
3518
3518
|
let stats;
|
|
3519
3519
|
try {
|
|
3520
|
-
stats =
|
|
3520
|
+
stats = fs7.statSync(file);
|
|
3521
3521
|
} catch {}
|
|
3522
3522
|
if (stats && stats.isFile()) return;
|
|
3523
3523
|
const dir = path7.dirname(file);
|
|
3524
3524
|
try {
|
|
3525
|
-
if (!
|
|
3525
|
+
if (!fs7.statSync(dir).isDirectory()) fs7.readdirSync(dir);
|
|
3526
3526
|
} catch (err) {
|
|
3527
3527
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
3528
3528
|
else throw err;
|
|
3529
3529
|
}
|
|
3530
|
-
|
|
3530
|
+
fs7.writeFileSync(file, "");
|
|
3531
3531
|
}
|
|
3532
3532
|
module2.exports = {
|
|
3533
3533
|
createFile: u(createFile),
|
|
@@ -3537,19 +3537,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3537
3537
|
var require_link = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
3538
3538
|
var u = require_universalify().fromCallback;
|
|
3539
3539
|
var path7 = __require("path");
|
|
3540
|
-
var
|
|
3540
|
+
var fs7 = require_graceful_fs();
|
|
3541
3541
|
var mkdir = require_mkdirs();
|
|
3542
3542
|
var pathExists = require_path_exists().pathExists;
|
|
3543
3543
|
var { areIdentical } = require_stat();
|
|
3544
3544
|
function createLink(srcpath, dstpath, callback) {
|
|
3545
3545
|
function makeLink(srcpath2, dstpath2) {
|
|
3546
|
-
|
|
3546
|
+
fs7.link(srcpath2, dstpath2, (err) => {
|
|
3547
3547
|
if (err) return callback(err);
|
|
3548
3548
|
callback(null);
|
|
3549
3549
|
});
|
|
3550
3550
|
}
|
|
3551
|
-
|
|
3552
|
-
|
|
3551
|
+
fs7.lstat(dstpath, (_, dstStat) => {
|
|
3552
|
+
fs7.lstat(srcpath, (err, srcStat) => {
|
|
3553
3553
|
if (err) {
|
|
3554
3554
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
3555
3555
|
return callback(err);
|
|
@@ -3570,19 +3570,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3570
3570
|
function createLinkSync(srcpath, dstpath) {
|
|
3571
3571
|
let dstStat;
|
|
3572
3572
|
try {
|
|
3573
|
-
dstStat =
|
|
3573
|
+
dstStat = fs7.lstatSync(dstpath);
|
|
3574
3574
|
} catch {}
|
|
3575
3575
|
try {
|
|
3576
|
-
const srcStat =
|
|
3576
|
+
const srcStat = fs7.lstatSync(srcpath);
|
|
3577
3577
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
3578
3578
|
} catch (err) {
|
|
3579
3579
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
3580
3580
|
throw err;
|
|
3581
3581
|
}
|
|
3582
3582
|
const dir = path7.dirname(dstpath);
|
|
3583
|
-
if (
|
|
3583
|
+
if (fs7.existsSync(dir)) return fs7.linkSync(srcpath, dstpath);
|
|
3584
3584
|
mkdir.mkdirsSync(dir);
|
|
3585
|
-
return
|
|
3585
|
+
return fs7.linkSync(srcpath, dstpath);
|
|
3586
3586
|
}
|
|
3587
3587
|
module2.exports = {
|
|
3588
3588
|
createLink: u(createLink),
|
|
@@ -3591,10 +3591,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3591
3591
|
} });
|
|
3592
3592
|
var require_symlink_paths = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
3593
3593
|
var path7 = __require("path");
|
|
3594
|
-
var
|
|
3594
|
+
var fs7 = require_graceful_fs();
|
|
3595
3595
|
var pathExists = require_path_exists().pathExists;
|
|
3596
3596
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
3597
|
-
if (path7.isAbsolute(srcpath)) return
|
|
3597
|
+
if (path7.isAbsolute(srcpath)) return fs7.lstat(srcpath, (err) => {
|
|
3598
3598
|
if (err) {
|
|
3599
3599
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
3600
3600
|
return callback(err);
|
|
@@ -3613,7 +3613,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3613
3613
|
toCwd: relativeToDst,
|
|
3614
3614
|
toDst: srcpath
|
|
3615
3615
|
});
|
|
3616
|
-
else return
|
|
3616
|
+
else return fs7.lstat(srcpath, (err2) => {
|
|
3617
3617
|
if (err2) {
|
|
3618
3618
|
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
|
3619
3619
|
return callback(err2);
|
|
@@ -3629,7 +3629,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3629
3629
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
3630
3630
|
let exists;
|
|
3631
3631
|
if (path7.isAbsolute(srcpath)) {
|
|
3632
|
-
exists =
|
|
3632
|
+
exists = fs7.existsSync(srcpath);
|
|
3633
3633
|
if (!exists) throw new Error("absolute srcpath does not exist");
|
|
3634
3634
|
return {
|
|
3635
3635
|
toCwd: srcpath,
|
|
@@ -3638,13 +3638,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3638
3638
|
} else {
|
|
3639
3639
|
const dstdir = path7.dirname(dstpath);
|
|
3640
3640
|
const relativeToDst = path7.join(dstdir, srcpath);
|
|
3641
|
-
exists =
|
|
3641
|
+
exists = fs7.existsSync(relativeToDst);
|
|
3642
3642
|
if (exists) return {
|
|
3643
3643
|
toCwd: relativeToDst,
|
|
3644
3644
|
toDst: srcpath
|
|
3645
3645
|
};
|
|
3646
3646
|
else {
|
|
3647
|
-
exists =
|
|
3647
|
+
exists = fs7.existsSync(srcpath);
|
|
3648
3648
|
if (!exists) throw new Error("relative srcpath does not exist");
|
|
3649
3649
|
return {
|
|
3650
3650
|
toCwd: srcpath,
|
|
@@ -3659,12 +3659,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3659
3659
|
};
|
|
3660
3660
|
} });
|
|
3661
3661
|
var require_symlink_type = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
3662
|
-
var
|
|
3662
|
+
var fs7 = require_graceful_fs();
|
|
3663
3663
|
function symlinkType(srcpath, type, callback) {
|
|
3664
3664
|
callback = typeof type === "function" ? type : callback;
|
|
3665
3665
|
type = typeof type === "function" ? false : type;
|
|
3666
3666
|
if (type) return callback(null, type);
|
|
3667
|
-
|
|
3667
|
+
fs7.lstat(srcpath, (err, stats) => {
|
|
3668
3668
|
if (err) return callback(null, "file");
|
|
3669
3669
|
type = stats && stats.isDirectory() ? "dir" : "file";
|
|
3670
3670
|
callback(null, type);
|
|
@@ -3674,7 +3674,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3674
3674
|
let stats;
|
|
3675
3675
|
if (type) return type;
|
|
3676
3676
|
try {
|
|
3677
|
-
stats =
|
|
3677
|
+
stats = fs7.lstatSync(srcpath);
|
|
3678
3678
|
} catch {
|
|
3679
3679
|
return "file";
|
|
3680
3680
|
}
|
|
@@ -3688,7 +3688,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3688
3688
|
var require_symlink = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
3689
3689
|
var u = require_universalify().fromCallback;
|
|
3690
3690
|
var path7 = __require("path");
|
|
3691
|
-
var
|
|
3691
|
+
var fs7 = require_fs();
|
|
3692
3692
|
var _mkdirs = require_mkdirs();
|
|
3693
3693
|
var mkdirs = _mkdirs.mkdirs;
|
|
3694
3694
|
var mkdirsSync = _mkdirs.mkdirsSync;
|
|
@@ -3703,8 +3703,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3703
3703
|
function createSymlink(srcpath, dstpath, type, callback) {
|
|
3704
3704
|
callback = typeof type === "function" ? type : callback;
|
|
3705
3705
|
type = typeof type === "function" ? false : type;
|
|
3706
|
-
|
|
3707
|
-
if (!err && stats.isSymbolicLink()) Promise.all([
|
|
3706
|
+
fs7.lstat(dstpath, (err, stats) => {
|
|
3707
|
+
if (!err && stats.isSymbolicLink()) Promise.all([fs7.stat(srcpath), fs7.stat(dstpath)]).then(([srcStat, dstStat]) => {
|
|
3708
3708
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
3709
3709
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
3710
3710
|
});
|
|
@@ -3720,10 +3720,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3720
3720
|
const dir = path7.dirname(dstpath);
|
|
3721
3721
|
pathExists(dir, (err3, dirExists) => {
|
|
3722
3722
|
if (err3) return callback(err3);
|
|
3723
|
-
if (dirExists) return
|
|
3723
|
+
if (dirExists) return fs7.symlink(srcpath, dstpath, type2, callback);
|
|
3724
3724
|
mkdirs(dir, (err4) => {
|
|
3725
3725
|
if (err4) return callback(err4);
|
|
3726
|
-
|
|
3726
|
+
fs7.symlink(srcpath, dstpath, type2, callback);
|
|
3727
3727
|
});
|
|
3728
3728
|
});
|
|
3729
3729
|
});
|
|
@@ -3732,18 +3732,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3732
3732
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
3733
3733
|
let stats;
|
|
3734
3734
|
try {
|
|
3735
|
-
stats =
|
|
3735
|
+
stats = fs7.lstatSync(dstpath);
|
|
3736
3736
|
} catch {}
|
|
3737
3737
|
if (stats && stats.isSymbolicLink()) {
|
|
3738
|
-
if (areIdentical(
|
|
3738
|
+
if (areIdentical(fs7.statSync(srcpath), fs7.statSync(dstpath))) return;
|
|
3739
3739
|
}
|
|
3740
3740
|
const relative$1 = symlinkPathsSync(srcpath, dstpath);
|
|
3741
3741
|
srcpath = relative$1.toDst;
|
|
3742
3742
|
type = symlinkTypeSync(relative$1.toCwd, type);
|
|
3743
3743
|
const dir = path7.dirname(dstpath);
|
|
3744
|
-
if (
|
|
3744
|
+
if (fs7.existsSync(dir)) return fs7.symlinkSync(srcpath, dstpath, type);
|
|
3745
3745
|
mkdirsSync(dir);
|
|
3746
|
-
return
|
|
3746
|
+
return fs7.symlinkSync(srcpath, dstpath, type);
|
|
3747
3747
|
}
|
|
3748
3748
|
module2.exports = {
|
|
3749
3749
|
createSymlink: u(createSymlink),
|
|
@@ -3794,9 +3794,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3794
3794
|
var { stringify, stripBom } = require_utils2();
|
|
3795
3795
|
async function _readFile(file, options = {}) {
|
|
3796
3796
|
if (typeof options === "string") options = { encoding: options };
|
|
3797
|
-
const
|
|
3797
|
+
const fs7 = options.fs || _fs;
|
|
3798
3798
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
3799
|
-
let data = await universalify.fromCallback(
|
|
3799
|
+
let data = await universalify.fromCallback(fs7.readFile)(file, options);
|
|
3800
3800
|
data = stripBom(data);
|
|
3801
3801
|
let obj;
|
|
3802
3802
|
try {
|
|
@@ -3812,10 +3812,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3812
3812
|
var readFile4 = universalify.fromPromise(_readFile);
|
|
3813
3813
|
function readFileSync(file, options = {}) {
|
|
3814
3814
|
if (typeof options === "string") options = { encoding: options };
|
|
3815
|
-
const
|
|
3815
|
+
const fs7 = options.fs || _fs;
|
|
3816
3816
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
3817
3817
|
try {
|
|
3818
|
-
let content =
|
|
3818
|
+
let content = fs7.readFileSync(file, options);
|
|
3819
3819
|
content = stripBom(content);
|
|
3820
3820
|
return JSON.parse(content, options.reviver);
|
|
3821
3821
|
} catch (err) {
|
|
@@ -3826,15 +3826,15 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3826
3826
|
}
|
|
3827
3827
|
}
|
|
3828
3828
|
async function _writeFile(file, obj, options = {}) {
|
|
3829
|
-
const
|
|
3829
|
+
const fs7 = options.fs || _fs;
|
|
3830
3830
|
const str = stringify(obj, options);
|
|
3831
|
-
await universalify.fromCallback(
|
|
3831
|
+
await universalify.fromCallback(fs7.writeFile)(file, str, options);
|
|
3832
3832
|
}
|
|
3833
3833
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
3834
3834
|
function writeFileSync(file, obj, options = {}) {
|
|
3835
|
-
const
|
|
3835
|
+
const fs7 = options.fs || _fs;
|
|
3836
3836
|
const str = stringify(obj, options);
|
|
3837
|
-
return
|
|
3837
|
+
return fs7.writeFileSync(file, str, options);
|
|
3838
3838
|
}
|
|
3839
3839
|
module2.exports = {
|
|
3840
3840
|
readFile: readFile4,
|
|
@@ -3854,7 +3854,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3854
3854
|
} });
|
|
3855
3855
|
var require_output = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/output/index.js"(exports2, module2) {
|
|
3856
3856
|
var u = require_universalify().fromCallback;
|
|
3857
|
-
var
|
|
3857
|
+
var fs7 = require_graceful_fs();
|
|
3858
3858
|
var path7 = __require("path");
|
|
3859
3859
|
var mkdir = require_mkdirs();
|
|
3860
3860
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -3866,18 +3866,18 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3866
3866
|
const dir = path7.dirname(file);
|
|
3867
3867
|
pathExists(dir, (err, itDoes) => {
|
|
3868
3868
|
if (err) return callback(err);
|
|
3869
|
-
if (itDoes) return
|
|
3869
|
+
if (itDoes) return fs7.writeFile(file, data, encoding, callback);
|
|
3870
3870
|
mkdir.mkdirs(dir, (err2) => {
|
|
3871
3871
|
if (err2) return callback(err2);
|
|
3872
|
-
|
|
3872
|
+
fs7.writeFile(file, data, encoding, callback);
|
|
3873
3873
|
});
|
|
3874
3874
|
});
|
|
3875
3875
|
}
|
|
3876
3876
|
function outputFileSync(file, ...args) {
|
|
3877
3877
|
const dir = path7.dirname(file);
|
|
3878
|
-
if (
|
|
3878
|
+
if (fs7.existsSync(dir)) return fs7.writeFileSync(file, ...args);
|
|
3879
3879
|
mkdir.mkdirsSync(dir);
|
|
3880
|
-
|
|
3880
|
+
fs7.writeFileSync(file, ...args);
|
|
3881
3881
|
}
|
|
3882
3882
|
module2.exports = {
|
|
3883
3883
|
outputFile: u(outputFile),
|
|
@@ -3914,7 +3914,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3914
3914
|
module2.exports = jsonFile;
|
|
3915
3915
|
} });
|
|
3916
3916
|
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) {
|
|
3917
|
-
var
|
|
3917
|
+
var fs7 = require_graceful_fs();
|
|
3918
3918
|
var path7 = __require("path");
|
|
3919
3919
|
var copySync = require_copy_sync2().copySync;
|
|
3920
3920
|
var removeSync = require_remove().removeSync;
|
|
@@ -3938,12 +3938,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3938
3938
|
removeSync(dest);
|
|
3939
3939
|
return rename2(src, dest, overwrite);
|
|
3940
3940
|
}
|
|
3941
|
-
if (
|
|
3941
|
+
if (fs7.existsSync(dest)) throw new Error("dest already exists.");
|
|
3942
3942
|
return rename2(src, dest, overwrite);
|
|
3943
3943
|
}
|
|
3944
3944
|
function rename2(src, dest, overwrite) {
|
|
3945
3945
|
try {
|
|
3946
|
-
|
|
3946
|
+
fs7.renameSync(src, dest);
|
|
3947
3947
|
} catch (err) {
|
|
3948
3948
|
if (err.code !== "EXDEV") throw err;
|
|
3949
3949
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -3962,7 +3962,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
3962
3962
|
module2.exports = { moveSync: require_move_sync() };
|
|
3963
3963
|
} });
|
|
3964
3964
|
var require_move = __commonJS({ "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
3965
|
-
var
|
|
3965
|
+
var fs7 = require_graceful_fs();
|
|
3966
3966
|
var path7 = __require("path");
|
|
3967
3967
|
var copy = require_copy2().copy;
|
|
3968
3968
|
var remove2 = require_remove().remove;
|
|
@@ -4005,7 +4005,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
4005
4005
|
});
|
|
4006
4006
|
}
|
|
4007
4007
|
function rename2(src, dest, overwrite, cb) {
|
|
4008
|
-
|
|
4008
|
+
fs7.rename(src, dest, (err) => {
|
|
4009
4009
|
if (!err) return cb();
|
|
4010
4010
|
if (err.code !== "EXDEV") return cb(err);
|
|
4011
4011
|
return moveAcrossDevice(src, dest, overwrite, cb);
|
|
@@ -42856,7 +42856,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
42856
42856
|
module2.exports = crc32;
|
|
42857
42857
|
} });
|
|
42858
42858
|
var require_yazl = __commonJS({ "../../node_modules/.pnpm/yazl@2.5.1/node_modules/yazl/index.js"(exports2) {
|
|
42859
|
-
var
|
|
42859
|
+
var fs7 = __require("fs");
|
|
42860
42860
|
var Transform = __require("stream").Transform;
|
|
42861
42861
|
var PassThrough = __require("stream").PassThrough;
|
|
42862
42862
|
var zlib = __require("zlib");
|
|
@@ -42880,14 +42880,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
42880
42880
|
if (options == null) options = {};
|
|
42881
42881
|
var entry = new Entry(metadataPath, false, options);
|
|
42882
42882
|
self2.entries.push(entry);
|
|
42883
|
-
|
|
42883
|
+
fs7.stat(realPath, function(err, stats) {
|
|
42884
42884
|
if (err) return self2.emit("error", err);
|
|
42885
42885
|
if (!stats.isFile()) return self2.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
|
|
42886
42886
|
entry.uncompressedSize = stats.size;
|
|
42887
42887
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
42888
42888
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
42889
42889
|
entry.setFileDataPumpFunction(function() {
|
|
42890
|
-
var readStream =
|
|
42890
|
+
var readStream = fs7.createReadStream(realPath);
|
|
42891
42891
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
42892
42892
|
readStream.on("error", function(err2) {
|
|
42893
42893
|
self2.emit("error", err2);
|
|
@@ -44222,7 +44222,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44222
44222
|
var require_old = __commonJS({ "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) {
|
|
44223
44223
|
var pathModule = __require("path");
|
|
44224
44224
|
var isWindows = process.platform === "win32";
|
|
44225
|
-
var
|
|
44225
|
+
var fs7 = __require("fs");
|
|
44226
44226
|
var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
|
|
44227
44227
|
function rethrow() {
|
|
44228
44228
|
var callback;
|
|
@@ -44275,7 +44275,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44275
44275
|
base = m[0];
|
|
44276
44276
|
previous = "";
|
|
44277
44277
|
if (isWindows && !knownHard[base]) {
|
|
44278
|
-
|
|
44278
|
+
fs7.lstatSync(base);
|
|
44279
44279
|
knownHard[base] = true;
|
|
44280
44280
|
}
|
|
44281
44281
|
}
|
|
@@ -44290,7 +44290,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44290
44290
|
var resolvedLink;
|
|
44291
44291
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) resolvedLink = cache[base];
|
|
44292
44292
|
else {
|
|
44293
|
-
var stat =
|
|
44293
|
+
var stat = fs7.lstatSync(base);
|
|
44294
44294
|
if (!stat.isSymbolicLink()) {
|
|
44295
44295
|
knownHard[base] = true;
|
|
44296
44296
|
if (cache) cache[base] = base;
|
|
@@ -44302,8 +44302,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44302
44302
|
if (seenLinks.hasOwnProperty(id)) linkTarget = seenLinks[id];
|
|
44303
44303
|
}
|
|
44304
44304
|
if (linkTarget === null) {
|
|
44305
|
-
|
|
44306
|
-
linkTarget =
|
|
44305
|
+
fs7.statSync(base);
|
|
44306
|
+
linkTarget = fs7.readlinkSync(base);
|
|
44307
44307
|
}
|
|
44308
44308
|
resolvedLink = pathModule.resolve(previous, linkTarget);
|
|
44309
44309
|
if (cache) cache[base] = resolvedLink;
|
|
@@ -44334,7 +44334,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44334
44334
|
current = m[0];
|
|
44335
44335
|
base = m[0];
|
|
44336
44336
|
previous = "";
|
|
44337
|
-
if (isWindows && !knownHard[base])
|
|
44337
|
+
if (isWindows && !knownHard[base]) fs7.lstat(base, function(err) {
|
|
44338
44338
|
if (err) return cb(err);
|
|
44339
44339
|
knownHard[base] = true;
|
|
44340
44340
|
LOOP();
|
|
@@ -44354,7 +44354,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44354
44354
|
pos = nextPartRe.lastIndex;
|
|
44355
44355
|
if (knownHard[base] || cache && cache[base] === base) return process.nextTick(LOOP);
|
|
44356
44356
|
if (cache && Object.prototype.hasOwnProperty.call(cache, base)) return gotResolvedLink(cache[base]);
|
|
44357
|
-
return
|
|
44357
|
+
return fs7.lstat(base, gotStat);
|
|
44358
44358
|
}
|
|
44359
44359
|
function gotStat(err, stat) {
|
|
44360
44360
|
if (err) return cb(err);
|
|
@@ -44367,9 +44367,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44367
44367
|
var id = stat.dev.toString(32) + ":" + stat.ino.toString(32);
|
|
44368
44368
|
if (seenLinks.hasOwnProperty(id)) return gotTarget(null, seenLinks[id], base);
|
|
44369
44369
|
}
|
|
44370
|
-
|
|
44370
|
+
fs7.stat(base, function(err2) {
|
|
44371
44371
|
if (err2) return cb(err2);
|
|
44372
|
-
|
|
44372
|
+
fs7.readlink(base, function(err3, target) {
|
|
44373
44373
|
if (!isWindows) seenLinks[id] = target;
|
|
44374
44374
|
gotTarget(err3, target);
|
|
44375
44375
|
});
|
|
@@ -44394,9 +44394,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44394
44394
|
realpath.realpathSync = realpathSync;
|
|
44395
44395
|
realpath.monkeypatch = monkeypatch;
|
|
44396
44396
|
realpath.unmonkeypatch = unmonkeypatch;
|
|
44397
|
-
var
|
|
44398
|
-
var origRealpath =
|
|
44399
|
-
var origRealpathSync =
|
|
44397
|
+
var fs7 = __require("fs");
|
|
44398
|
+
var origRealpath = fs7.realpath;
|
|
44399
|
+
var origRealpathSync = fs7.realpathSync;
|
|
44400
44400
|
var version = process.version;
|
|
44401
44401
|
var ok = /^v[0-5]\./.test(version);
|
|
44402
44402
|
var old = require_old();
|
|
@@ -44424,12 +44424,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
44424
44424
|
}
|
|
44425
44425
|
}
|
|
44426
44426
|
function monkeypatch() {
|
|
44427
|
-
|
|
44428
|
-
|
|
44427
|
+
fs7.realpath = realpath;
|
|
44428
|
+
fs7.realpathSync = realpathSync;
|
|
44429
44429
|
}
|
|
44430
44430
|
function unmonkeypatch() {
|
|
44431
|
-
|
|
44432
|
-
|
|
44431
|
+
fs7.realpath = origRealpath;
|
|
44432
|
+
fs7.realpathSync = origRealpathSync;
|
|
44433
44433
|
}
|
|
44434
44434
|
} });
|
|
44435
44435
|
var require_path = __commonJS({ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports2, module2) {
|
|
@@ -45046,7 +45046,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45046
45046
|
function ownProp(obj, field) {
|
|
45047
45047
|
return Object.prototype.hasOwnProperty.call(obj, field);
|
|
45048
45048
|
}
|
|
45049
|
-
var
|
|
45049
|
+
var fs7 = __require("fs");
|
|
45050
45050
|
var path7 = __require("path");
|
|
45051
45051
|
var minimatch2 = require_minimatch2();
|
|
45052
45052
|
var isAbsolute$1 = __require("path").isAbsolute;
|
|
@@ -45091,7 +45091,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45091
45091
|
self2.stat = !!options.stat;
|
|
45092
45092
|
self2.noprocess = !!options.noprocess;
|
|
45093
45093
|
self2.absolute = !!options.absolute;
|
|
45094
|
-
self2.fs = options.fs ||
|
|
45094
|
+
self2.fs = options.fs || fs7;
|
|
45095
45095
|
self2.maxLength = options.maxLength || Infinity;
|
|
45096
45096
|
self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
|
45097
45097
|
self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
|
@@ -45954,7 +45954,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45954
45954
|
var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
|
|
45955
45955
|
module2.exports = isexe;
|
|
45956
45956
|
isexe.sync = sync;
|
|
45957
|
-
var
|
|
45957
|
+
var fs7 = __require("fs");
|
|
45958
45958
|
function checkPathExt(path7, options) {
|
|
45959
45959
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
45960
45960
|
if (!pathext) return true;
|
|
@@ -45971,25 +45971,25 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
45971
45971
|
return checkPathExt(path7, options);
|
|
45972
45972
|
}
|
|
45973
45973
|
function isexe(path7, options, cb) {
|
|
45974
|
-
|
|
45974
|
+
fs7.stat(path7, function(er, stat) {
|
|
45975
45975
|
cb(er, er ? false : checkStat(stat, path7, options));
|
|
45976
45976
|
});
|
|
45977
45977
|
}
|
|
45978
45978
|
function sync(path7, options) {
|
|
45979
|
-
return checkStat(
|
|
45979
|
+
return checkStat(fs7.statSync(path7), path7, options);
|
|
45980
45980
|
}
|
|
45981
45981
|
} });
|
|
45982
45982
|
var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
|
|
45983
45983
|
module2.exports = isexe;
|
|
45984
45984
|
isexe.sync = sync;
|
|
45985
|
-
var
|
|
45985
|
+
var fs7 = __require("fs");
|
|
45986
45986
|
function isexe(path7, options, cb) {
|
|
45987
|
-
|
|
45987
|
+
fs7.stat(path7, function(er, stat) {
|
|
45988
45988
|
cb(er, er ? false : checkStat(stat, options));
|
|
45989
45989
|
});
|
|
45990
45990
|
}
|
|
45991
45991
|
function sync(path7, options) {
|
|
45992
|
-
return checkStat(
|
|
45992
|
+
return checkStat(fs7.statSync(path7), options);
|
|
45993
45993
|
}
|
|
45994
45994
|
function checkStat(stat, options) {
|
|
45995
45995
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -46008,7 +46008,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46008
46008
|
}
|
|
46009
46009
|
} });
|
|
46010
46010
|
var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
|
|
46011
|
-
var
|
|
46011
|
+
var fs7 = __require("fs");
|
|
46012
46012
|
var core;
|
|
46013
46013
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
46014
46014
|
else core = require_mode();
|
|
@@ -46201,7 +46201,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46201
46201
|
};
|
|
46202
46202
|
} });
|
|
46203
46203
|
var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
46204
|
-
var
|
|
46204
|
+
var fs7 = __require("fs");
|
|
46205
46205
|
var shebangCommand = require_shebang_command();
|
|
46206
46206
|
function readShebang(command) {
|
|
46207
46207
|
const size = 150;
|
|
@@ -46213,9 +46213,9 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
46213
46213
|
}
|
|
46214
46214
|
let fd;
|
|
46215
46215
|
try {
|
|
46216
|
-
fd =
|
|
46217
|
-
|
|
46218
|
-
|
|
46216
|
+
fd = fs7.openSync(command, "r");
|
|
46217
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
46218
|
+
fs7.closeSync(fd);
|
|
46219
46219
|
} catch (e) {}
|
|
46220
46220
|
return shebangCommand(buffer.toString());
|
|
46221
46221
|
}
|
|
@@ -47055,7 +47055,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47055
47055
|
var escape = require_escape();
|
|
47056
47056
|
var readShebang = require_readShebang();
|
|
47057
47057
|
var semver = require_semver();
|
|
47058
|
-
var
|
|
47058
|
+
var isWin3 = process.platform === "win32";
|
|
47059
47059
|
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
47060
47060
|
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
47061
47061
|
var supportsShellOption = niceTry(() => semver.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
|
|
@@ -47070,7 +47070,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47070
47070
|
return parsed.file;
|
|
47071
47071
|
}
|
|
47072
47072
|
function parseNonShell(parsed) {
|
|
47073
|
-
if (!
|
|
47073
|
+
if (!isWin3) return parsed;
|
|
47074
47074
|
const commandFile = detectShebang(parsed);
|
|
47075
47075
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
47076
47076
|
if (parsed.options.forceShell || needsShell) {
|
|
@@ -47092,7 +47092,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47092
47092
|
function parseShell(parsed) {
|
|
47093
47093
|
if (supportsShellOption) return parsed;
|
|
47094
47094
|
const shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
47095
|
-
if (
|
|
47095
|
+
if (isWin3) {
|
|
47096
47096
|
parsed.command = typeof parsed.options.shell === "string" ? parsed.options.shell : process.env.comspec || "cmd.exe";
|
|
47097
47097
|
parsed.args = [
|
|
47098
47098
|
"/d",
|
|
@@ -47131,7 +47131,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47131
47131
|
module2.exports = parse3;
|
|
47132
47132
|
} });
|
|
47133
47133
|
var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
47134
|
-
var
|
|
47134
|
+
var isWin3 = process.platform === "win32";
|
|
47135
47135
|
function notFoundError(original, syscall) {
|
|
47136
47136
|
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
47137
47137
|
code: "ENOENT",
|
|
@@ -47142,7 +47142,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47142
47142
|
});
|
|
47143
47143
|
}
|
|
47144
47144
|
function hookChildProcess(cp, parsed) {
|
|
47145
|
-
if (!
|
|
47145
|
+
if (!isWin3) return;
|
|
47146
47146
|
const originalEmit = cp.emit;
|
|
47147
47147
|
cp.emit = function(name, arg1) {
|
|
47148
47148
|
if (name === "exit") {
|
|
@@ -47153,11 +47153,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
47153
47153
|
};
|
|
47154
47154
|
}
|
|
47155
47155
|
function verifyENOENT(status, parsed) {
|
|
47156
|
-
if (
|
|
47156
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
|
|
47157
47157
|
return null;
|
|
47158
47158
|
}
|
|
47159
47159
|
function verifyENOENTSync(status, parsed) {
|
|
47160
|
-
if (
|
|
47160
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
|
|
47161
47161
|
return null;
|
|
47162
47162
|
}
|
|
47163
47163
|
module2.exports = {
|
|
@@ -52788,6 +52788,1547 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52788
52788
|
}
|
|
52789
52789
|
module2.exports = (options) => new IgnoreBase(options);
|
|
52790
52790
|
} });
|
|
52791
|
+
var require_which2 = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
|
|
52792
|
+
var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
52793
|
+
var path7 = __require("path");
|
|
52794
|
+
var COLON = isWindows ? ";" : ":";
|
|
52795
|
+
var isexe = require_isexe();
|
|
52796
|
+
var getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
52797
|
+
var getPathInfo = (cmd, opt) => {
|
|
52798
|
+
const colon = opt.colon || COLON;
|
|
52799
|
+
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
|
|
52800
|
+
const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
52801
|
+
const pathExt = isWindows ? pathExtExe.split(colon) : [""];
|
|
52802
|
+
if (isWindows) {
|
|
52803
|
+
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") pathExt.unshift("");
|
|
52804
|
+
}
|
|
52805
|
+
return {
|
|
52806
|
+
pathEnv,
|
|
52807
|
+
pathExt,
|
|
52808
|
+
pathExtExe
|
|
52809
|
+
};
|
|
52810
|
+
};
|
|
52811
|
+
var which = (cmd, opt, cb) => {
|
|
52812
|
+
if (typeof opt === "function") {
|
|
52813
|
+
cb = opt;
|
|
52814
|
+
opt = {};
|
|
52815
|
+
}
|
|
52816
|
+
if (!opt) opt = {};
|
|
52817
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
52818
|
+
const found = [];
|
|
52819
|
+
const step = (i) => new Promise((resolve, reject) => {
|
|
52820
|
+
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
52821
|
+
const ppRaw = pathEnv[i];
|
|
52822
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
52823
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
52824
|
+
resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
|
|
52825
|
+
});
|
|
52826
|
+
const subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
52827
|
+
if (ii === pathExt.length) return resolve(step(i + 1));
|
|
52828
|
+
const ext = pathExt[ii];
|
|
52829
|
+
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
52830
|
+
if (!er && is) if (opt.all) found.push(p + ext);
|
|
52831
|
+
else return resolve(p + ext);
|
|
52832
|
+
return resolve(subStep(p, i, ii + 1));
|
|
52833
|
+
});
|
|
52834
|
+
});
|
|
52835
|
+
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
52836
|
+
};
|
|
52837
|
+
var whichSync = (cmd, opt) => {
|
|
52838
|
+
opt = opt || {};
|
|
52839
|
+
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
52840
|
+
const found = [];
|
|
52841
|
+
for (let i = 0; i < pathEnv.length; i++) {
|
|
52842
|
+
const ppRaw = pathEnv[i];
|
|
52843
|
+
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
52844
|
+
const pCmd = path7.join(pathPart, cmd);
|
|
52845
|
+
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
52846
|
+
for (let j = 0; j < pathExt.length; j++) {
|
|
52847
|
+
const cur = p + pathExt[j];
|
|
52848
|
+
try {
|
|
52849
|
+
if (isexe.sync(cur, { pathExt: pathExtExe })) if (opt.all) found.push(cur);
|
|
52850
|
+
else return cur;
|
|
52851
|
+
} catch (ex) {}
|
|
52852
|
+
}
|
|
52853
|
+
}
|
|
52854
|
+
if (opt.all && found.length) return found;
|
|
52855
|
+
if (opt.nothrow) return null;
|
|
52856
|
+
throw getNotFoundError(cmd);
|
|
52857
|
+
};
|
|
52858
|
+
module2.exports = which;
|
|
52859
|
+
which.sync = whichSync;
|
|
52860
|
+
} });
|
|
52861
|
+
var require_path_key2 = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports2, module2) {
|
|
52862
|
+
var pathKey = (options = {}) => {
|
|
52863
|
+
const environment = options.env || process.env;
|
|
52864
|
+
if ((options.platform || process.platform) !== "win32") return "PATH";
|
|
52865
|
+
return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
|
52866
|
+
};
|
|
52867
|
+
module2.exports = pathKey;
|
|
52868
|
+
module2.exports.default = pathKey;
|
|
52869
|
+
} });
|
|
52870
|
+
var require_resolveCommand2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
|
|
52871
|
+
var path7 = __require("path");
|
|
52872
|
+
var which = require_which2();
|
|
52873
|
+
var getPathKey = require_path_key2();
|
|
52874
|
+
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
52875
|
+
const env = parsed.options.env || process.env;
|
|
52876
|
+
const cwd = process.cwd();
|
|
52877
|
+
const hasCustomCwd = parsed.options.cwd != null;
|
|
52878
|
+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
52879
|
+
if (shouldSwitchCwd) try {
|
|
52880
|
+
process.chdir(parsed.options.cwd);
|
|
52881
|
+
} catch (err) {}
|
|
52882
|
+
let resolved;
|
|
52883
|
+
try {
|
|
52884
|
+
resolved = which.sync(parsed.command, {
|
|
52885
|
+
path: env[getPathKey({ env })],
|
|
52886
|
+
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
52887
|
+
});
|
|
52888
|
+
} catch (e) {} finally {
|
|
52889
|
+
if (shouldSwitchCwd) process.chdir(cwd);
|
|
52890
|
+
}
|
|
52891
|
+
if (resolved) resolved = path7.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
52892
|
+
return resolved;
|
|
52893
|
+
}
|
|
52894
|
+
function resolveCommand(parsed) {
|
|
52895
|
+
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
52896
|
+
}
|
|
52897
|
+
module2.exports = resolveCommand;
|
|
52898
|
+
} });
|
|
52899
|
+
var require_escape2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
|
|
52900
|
+
var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
52901
|
+
function escapeCommand(arg) {
|
|
52902
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52903
|
+
return arg;
|
|
52904
|
+
}
|
|
52905
|
+
function escapeArgument(arg, doubleEscapeMetaChars) {
|
|
52906
|
+
arg = `${arg}`;
|
|
52907
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
52908
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
52909
|
+
arg = `"${arg}"`;
|
|
52910
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52911
|
+
if (doubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
|
|
52912
|
+
return arg;
|
|
52913
|
+
}
|
|
52914
|
+
module2.exports.command = escapeCommand;
|
|
52915
|
+
module2.exports.argument = escapeArgument;
|
|
52916
|
+
} });
|
|
52917
|
+
var require_shebang_regex2 = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports2, module2) {
|
|
52918
|
+
module2.exports = /^#!(.*)/;
|
|
52919
|
+
} });
|
|
52920
|
+
var require_shebang_command2 = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports2, module2) {
|
|
52921
|
+
var shebangRegex = require_shebang_regex2();
|
|
52922
|
+
module2.exports = (string = "") => {
|
|
52923
|
+
const match = string.match(shebangRegex);
|
|
52924
|
+
if (!match) return null;
|
|
52925
|
+
const [path7, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
52926
|
+
const binary = path7.split("/").pop();
|
|
52927
|
+
if (binary === "env") return argument;
|
|
52928
|
+
return argument ? `${binary} ${argument}` : binary;
|
|
52929
|
+
};
|
|
52930
|
+
} });
|
|
52931
|
+
var require_readShebang2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
|
|
52932
|
+
var fs7 = __require("fs");
|
|
52933
|
+
var shebangCommand = require_shebang_command2();
|
|
52934
|
+
function readShebang(command) {
|
|
52935
|
+
const size = 150;
|
|
52936
|
+
const buffer = Buffer.alloc(size);
|
|
52937
|
+
let fd;
|
|
52938
|
+
try {
|
|
52939
|
+
fd = fs7.openSync(command, "r");
|
|
52940
|
+
fs7.readSync(fd, buffer, 0, size, 0);
|
|
52941
|
+
fs7.closeSync(fd);
|
|
52942
|
+
} catch (e) {}
|
|
52943
|
+
return shebangCommand(buffer.toString());
|
|
52944
|
+
}
|
|
52945
|
+
module2.exports = readShebang;
|
|
52946
|
+
} });
|
|
52947
|
+
var require_parse4 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
|
|
52948
|
+
var path7 = __require("path");
|
|
52949
|
+
var resolveCommand = require_resolveCommand2();
|
|
52950
|
+
var escape = require_escape2();
|
|
52951
|
+
var readShebang = require_readShebang2();
|
|
52952
|
+
var isWin3 = process.platform === "win32";
|
|
52953
|
+
var isExecutableRegExp = /\.(?:com|exe)$/i;
|
|
52954
|
+
var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
52955
|
+
function detectShebang(parsed) {
|
|
52956
|
+
parsed.file = resolveCommand(parsed);
|
|
52957
|
+
const shebang = parsed.file && readShebang(parsed.file);
|
|
52958
|
+
if (shebang) {
|
|
52959
|
+
parsed.args.unshift(parsed.file);
|
|
52960
|
+
parsed.command = shebang;
|
|
52961
|
+
return resolveCommand(parsed);
|
|
52962
|
+
}
|
|
52963
|
+
return parsed.file;
|
|
52964
|
+
}
|
|
52965
|
+
function parseNonShell(parsed) {
|
|
52966
|
+
if (!isWin3) return parsed;
|
|
52967
|
+
const commandFile = detectShebang(parsed);
|
|
52968
|
+
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
52969
|
+
if (parsed.options.forceShell || needsShell) {
|
|
52970
|
+
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
52971
|
+
parsed.command = path7.normalize(parsed.command);
|
|
52972
|
+
parsed.command = escape.command(parsed.command);
|
|
52973
|
+
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
52974
|
+
parsed.args = [
|
|
52975
|
+
"/d",
|
|
52976
|
+
"/s",
|
|
52977
|
+
"/c",
|
|
52978
|
+
`"${[parsed.command].concat(parsed.args).join(" ")}"`
|
|
52979
|
+
];
|
|
52980
|
+
parsed.command = process.env.comspec || "cmd.exe";
|
|
52981
|
+
parsed.options.windowsVerbatimArguments = true;
|
|
52982
|
+
}
|
|
52983
|
+
return parsed;
|
|
52984
|
+
}
|
|
52985
|
+
function parse3(command, args, options) {
|
|
52986
|
+
if (args && !Array.isArray(args)) {
|
|
52987
|
+
options = args;
|
|
52988
|
+
args = null;
|
|
52989
|
+
}
|
|
52990
|
+
args = args ? args.slice(0) : [];
|
|
52991
|
+
options = Object.assign({}, options);
|
|
52992
|
+
const parsed = {
|
|
52993
|
+
command,
|
|
52994
|
+
args,
|
|
52995
|
+
options,
|
|
52996
|
+
file: void 0,
|
|
52997
|
+
original: {
|
|
52998
|
+
command,
|
|
52999
|
+
args
|
|
53000
|
+
}
|
|
53001
|
+
};
|
|
53002
|
+
return options.shell ? parsed : parseNonShell(parsed);
|
|
53003
|
+
}
|
|
53004
|
+
module2.exports = parse3;
|
|
53005
|
+
} });
|
|
53006
|
+
var require_enoent2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
|
|
53007
|
+
var isWin3 = process.platform === "win32";
|
|
53008
|
+
function notFoundError(original, syscall) {
|
|
53009
|
+
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
53010
|
+
code: "ENOENT",
|
|
53011
|
+
errno: "ENOENT",
|
|
53012
|
+
syscall: `${syscall} ${original.command}`,
|
|
53013
|
+
path: original.command,
|
|
53014
|
+
spawnargs: original.args
|
|
53015
|
+
});
|
|
53016
|
+
}
|
|
53017
|
+
function hookChildProcess(cp, parsed) {
|
|
53018
|
+
if (!isWin3) return;
|
|
53019
|
+
const originalEmit = cp.emit;
|
|
53020
|
+
cp.emit = function(name, arg1) {
|
|
53021
|
+
if (name === "exit") {
|
|
53022
|
+
const err = verifyENOENT(arg1, parsed);
|
|
53023
|
+
if (err) return originalEmit.call(cp, "error", err);
|
|
53024
|
+
}
|
|
53025
|
+
return originalEmit.apply(cp, arguments);
|
|
53026
|
+
};
|
|
53027
|
+
}
|
|
53028
|
+
function verifyENOENT(status, parsed) {
|
|
53029
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawn");
|
|
53030
|
+
return null;
|
|
53031
|
+
}
|
|
53032
|
+
function verifyENOENTSync(status, parsed) {
|
|
53033
|
+
if (isWin3 && status === 1 && !parsed.file) return notFoundError(parsed.original, "spawnSync");
|
|
53034
|
+
return null;
|
|
53035
|
+
}
|
|
53036
|
+
module2.exports = {
|
|
53037
|
+
hookChildProcess,
|
|
53038
|
+
verifyENOENT,
|
|
53039
|
+
verifyENOENTSync,
|
|
53040
|
+
notFoundError
|
|
53041
|
+
};
|
|
53042
|
+
} });
|
|
53043
|
+
var require_cross_spawn2 = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports2, module2) {
|
|
53044
|
+
var cp = __require("child_process");
|
|
53045
|
+
var parse3 = require_parse4();
|
|
53046
|
+
var enoent = require_enoent2();
|
|
53047
|
+
function spawn2(command, args, options) {
|
|
53048
|
+
const parsed = parse3(command, args, options);
|
|
53049
|
+
const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
|
53050
|
+
enoent.hookChildProcess(spawned, parsed);
|
|
53051
|
+
return spawned;
|
|
53052
|
+
}
|
|
53053
|
+
function spawnSync(command, args, options) {
|
|
53054
|
+
const parsed = parse3(command, args, options);
|
|
53055
|
+
const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
|
|
53056
|
+
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
|
53057
|
+
return result;
|
|
53058
|
+
}
|
|
53059
|
+
module2.exports = spawn2;
|
|
53060
|
+
module2.exports.spawn = spawn2;
|
|
53061
|
+
module2.exports.sync = spawnSync;
|
|
53062
|
+
module2.exports._parse = parse3;
|
|
53063
|
+
module2.exports._enoent = enoent;
|
|
53064
|
+
} });
|
|
53065
|
+
var require_strip_final_newline = __commonJS({ "../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports2, module2) {
|
|
53066
|
+
module2.exports = (input) => {
|
|
53067
|
+
const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
|
|
53068
|
+
const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
|
|
53069
|
+
if (input[input.length - 1] === LF) input = input.slice(0, input.length - 1);
|
|
53070
|
+
if (input[input.length - 1] === CR) input = input.slice(0, input.length - 1);
|
|
53071
|
+
return input;
|
|
53072
|
+
};
|
|
53073
|
+
} });
|
|
53074
|
+
var require_npm_run_path = __commonJS({ "../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports2, module2) {
|
|
53075
|
+
var path7 = __require("path");
|
|
53076
|
+
var pathKey = require_path_key2();
|
|
53077
|
+
var npmRunPath = (options) => {
|
|
53078
|
+
options = {
|
|
53079
|
+
cwd: process.cwd(),
|
|
53080
|
+
path: process.env[pathKey()],
|
|
53081
|
+
execPath: process.execPath,
|
|
53082
|
+
...options
|
|
53083
|
+
};
|
|
53084
|
+
let previous;
|
|
53085
|
+
let cwdPath = path7.resolve(options.cwd);
|
|
53086
|
+
const result = [];
|
|
53087
|
+
while (previous !== cwdPath) {
|
|
53088
|
+
result.push(path7.join(cwdPath, "node_modules/.bin"));
|
|
53089
|
+
previous = cwdPath;
|
|
53090
|
+
cwdPath = path7.resolve(cwdPath, "..");
|
|
53091
|
+
}
|
|
53092
|
+
const execPathDir = path7.resolve(options.cwd, options.execPath, "..");
|
|
53093
|
+
result.push(execPathDir);
|
|
53094
|
+
return result.concat(options.path).join(path7.delimiter);
|
|
53095
|
+
};
|
|
53096
|
+
module2.exports = npmRunPath;
|
|
53097
|
+
module2.exports.default = npmRunPath;
|
|
53098
|
+
module2.exports.env = (options) => {
|
|
53099
|
+
options = {
|
|
53100
|
+
env: process.env,
|
|
53101
|
+
...options
|
|
53102
|
+
};
|
|
53103
|
+
const env = { ...options.env };
|
|
53104
|
+
const path8 = pathKey({ env });
|
|
53105
|
+
options.path = env[path8];
|
|
53106
|
+
env[path8] = module2.exports(options);
|
|
53107
|
+
return env;
|
|
53108
|
+
};
|
|
53109
|
+
} });
|
|
53110
|
+
var require_mimic_fn = __commonJS({ "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports2, module2) {
|
|
53111
|
+
var mimicFn = (to, from) => {
|
|
53112
|
+
for (const prop of Reflect.ownKeys(from)) Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
53113
|
+
return to;
|
|
53114
|
+
};
|
|
53115
|
+
module2.exports = mimicFn;
|
|
53116
|
+
module2.exports.default = mimicFn;
|
|
53117
|
+
} });
|
|
53118
|
+
var require_onetime = __commonJS({ "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports2, module2) {
|
|
53119
|
+
var mimicFn = require_mimic_fn();
|
|
53120
|
+
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
53121
|
+
var onetime = (function_, options = {}) => {
|
|
53122
|
+
if (typeof function_ !== "function") throw new TypeError("Expected a function");
|
|
53123
|
+
let returnValue;
|
|
53124
|
+
let callCount = 0;
|
|
53125
|
+
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
53126
|
+
const onetime2 = function(...arguments_) {
|
|
53127
|
+
calledFunctions.set(onetime2, ++callCount);
|
|
53128
|
+
if (callCount === 1) {
|
|
53129
|
+
returnValue = function_.apply(this, arguments_);
|
|
53130
|
+
function_ = null;
|
|
53131
|
+
} else if (options.throw === true) throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
53132
|
+
return returnValue;
|
|
53133
|
+
};
|
|
53134
|
+
mimicFn(onetime2, function_);
|
|
53135
|
+
calledFunctions.set(onetime2, callCount);
|
|
53136
|
+
return onetime2;
|
|
53137
|
+
};
|
|
53138
|
+
module2.exports = onetime;
|
|
53139
|
+
module2.exports.default = onetime;
|
|
53140
|
+
module2.exports.callCount = (function_) => {
|
|
53141
|
+
if (!calledFunctions.has(function_)) throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
53142
|
+
return calledFunctions.get(function_);
|
|
53143
|
+
};
|
|
53144
|
+
} });
|
|
53145
|
+
var require_core2 = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/core.js"(exports2) {
|
|
53146
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53147
|
+
exports2.SIGNALS = void 0;
|
|
53148
|
+
exports2.SIGNALS = [
|
|
53149
|
+
{
|
|
53150
|
+
name: "SIGHUP",
|
|
53151
|
+
number: 1,
|
|
53152
|
+
action: "terminate",
|
|
53153
|
+
description: "Terminal closed",
|
|
53154
|
+
standard: "posix"
|
|
53155
|
+
},
|
|
53156
|
+
{
|
|
53157
|
+
name: "SIGINT",
|
|
53158
|
+
number: 2,
|
|
53159
|
+
action: "terminate",
|
|
53160
|
+
description: "User interruption with CTRL-C",
|
|
53161
|
+
standard: "ansi"
|
|
53162
|
+
},
|
|
53163
|
+
{
|
|
53164
|
+
name: "SIGQUIT",
|
|
53165
|
+
number: 3,
|
|
53166
|
+
action: "core",
|
|
53167
|
+
description: "User interruption with CTRL-\\",
|
|
53168
|
+
standard: "posix"
|
|
53169
|
+
},
|
|
53170
|
+
{
|
|
53171
|
+
name: "SIGILL",
|
|
53172
|
+
number: 4,
|
|
53173
|
+
action: "core",
|
|
53174
|
+
description: "Invalid machine instruction",
|
|
53175
|
+
standard: "ansi"
|
|
53176
|
+
},
|
|
53177
|
+
{
|
|
53178
|
+
name: "SIGTRAP",
|
|
53179
|
+
number: 5,
|
|
53180
|
+
action: "core",
|
|
53181
|
+
description: "Debugger breakpoint",
|
|
53182
|
+
standard: "posix"
|
|
53183
|
+
},
|
|
53184
|
+
{
|
|
53185
|
+
name: "SIGABRT",
|
|
53186
|
+
number: 6,
|
|
53187
|
+
action: "core",
|
|
53188
|
+
description: "Aborted",
|
|
53189
|
+
standard: "ansi"
|
|
53190
|
+
},
|
|
53191
|
+
{
|
|
53192
|
+
name: "SIGIOT",
|
|
53193
|
+
number: 6,
|
|
53194
|
+
action: "core",
|
|
53195
|
+
description: "Aborted",
|
|
53196
|
+
standard: "bsd"
|
|
53197
|
+
},
|
|
53198
|
+
{
|
|
53199
|
+
name: "SIGBUS",
|
|
53200
|
+
number: 7,
|
|
53201
|
+
action: "core",
|
|
53202
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
53203
|
+
standard: "bsd"
|
|
53204
|
+
},
|
|
53205
|
+
{
|
|
53206
|
+
name: "SIGEMT",
|
|
53207
|
+
number: 7,
|
|
53208
|
+
action: "terminate",
|
|
53209
|
+
description: "Command should be emulated but is not implemented",
|
|
53210
|
+
standard: "other"
|
|
53211
|
+
},
|
|
53212
|
+
{
|
|
53213
|
+
name: "SIGFPE",
|
|
53214
|
+
number: 8,
|
|
53215
|
+
action: "core",
|
|
53216
|
+
description: "Floating point arithmetic error",
|
|
53217
|
+
standard: "ansi"
|
|
53218
|
+
},
|
|
53219
|
+
{
|
|
53220
|
+
name: "SIGKILL",
|
|
53221
|
+
number: 9,
|
|
53222
|
+
action: "terminate",
|
|
53223
|
+
description: "Forced termination",
|
|
53224
|
+
standard: "posix",
|
|
53225
|
+
forced: true
|
|
53226
|
+
},
|
|
53227
|
+
{
|
|
53228
|
+
name: "SIGUSR1",
|
|
53229
|
+
number: 10,
|
|
53230
|
+
action: "terminate",
|
|
53231
|
+
description: "Application-specific signal",
|
|
53232
|
+
standard: "posix"
|
|
53233
|
+
},
|
|
53234
|
+
{
|
|
53235
|
+
name: "SIGSEGV",
|
|
53236
|
+
number: 11,
|
|
53237
|
+
action: "core",
|
|
53238
|
+
description: "Segmentation fault",
|
|
53239
|
+
standard: "ansi"
|
|
53240
|
+
},
|
|
53241
|
+
{
|
|
53242
|
+
name: "SIGUSR2",
|
|
53243
|
+
number: 12,
|
|
53244
|
+
action: "terminate",
|
|
53245
|
+
description: "Application-specific signal",
|
|
53246
|
+
standard: "posix"
|
|
53247
|
+
},
|
|
53248
|
+
{
|
|
53249
|
+
name: "SIGPIPE",
|
|
53250
|
+
number: 13,
|
|
53251
|
+
action: "terminate",
|
|
53252
|
+
description: "Broken pipe or socket",
|
|
53253
|
+
standard: "posix"
|
|
53254
|
+
},
|
|
53255
|
+
{
|
|
53256
|
+
name: "SIGALRM",
|
|
53257
|
+
number: 14,
|
|
53258
|
+
action: "terminate",
|
|
53259
|
+
description: "Timeout or timer",
|
|
53260
|
+
standard: "posix"
|
|
53261
|
+
},
|
|
53262
|
+
{
|
|
53263
|
+
name: "SIGTERM",
|
|
53264
|
+
number: 15,
|
|
53265
|
+
action: "terminate",
|
|
53266
|
+
description: "Termination",
|
|
53267
|
+
standard: "ansi"
|
|
53268
|
+
},
|
|
53269
|
+
{
|
|
53270
|
+
name: "SIGSTKFLT",
|
|
53271
|
+
number: 16,
|
|
53272
|
+
action: "terminate",
|
|
53273
|
+
description: "Stack is empty or overflowed",
|
|
53274
|
+
standard: "other"
|
|
53275
|
+
},
|
|
53276
|
+
{
|
|
53277
|
+
name: "SIGCHLD",
|
|
53278
|
+
number: 17,
|
|
53279
|
+
action: "ignore",
|
|
53280
|
+
description: "Child process terminated, paused or unpaused",
|
|
53281
|
+
standard: "posix"
|
|
53282
|
+
},
|
|
53283
|
+
{
|
|
53284
|
+
name: "SIGCLD",
|
|
53285
|
+
number: 17,
|
|
53286
|
+
action: "ignore",
|
|
53287
|
+
description: "Child process terminated, paused or unpaused",
|
|
53288
|
+
standard: "other"
|
|
53289
|
+
},
|
|
53290
|
+
{
|
|
53291
|
+
name: "SIGCONT",
|
|
53292
|
+
number: 18,
|
|
53293
|
+
action: "unpause",
|
|
53294
|
+
description: "Unpaused",
|
|
53295
|
+
standard: "posix",
|
|
53296
|
+
forced: true
|
|
53297
|
+
},
|
|
53298
|
+
{
|
|
53299
|
+
name: "SIGSTOP",
|
|
53300
|
+
number: 19,
|
|
53301
|
+
action: "pause",
|
|
53302
|
+
description: "Paused",
|
|
53303
|
+
standard: "posix",
|
|
53304
|
+
forced: true
|
|
53305
|
+
},
|
|
53306
|
+
{
|
|
53307
|
+
name: "SIGTSTP",
|
|
53308
|
+
number: 20,
|
|
53309
|
+
action: "pause",
|
|
53310
|
+
description: "Paused using CTRL-Z or \"suspend\"",
|
|
53311
|
+
standard: "posix"
|
|
53312
|
+
},
|
|
53313
|
+
{
|
|
53314
|
+
name: "SIGTTIN",
|
|
53315
|
+
number: 21,
|
|
53316
|
+
action: "pause",
|
|
53317
|
+
description: "Background process cannot read terminal input",
|
|
53318
|
+
standard: "posix"
|
|
53319
|
+
},
|
|
53320
|
+
{
|
|
53321
|
+
name: "SIGBREAK",
|
|
53322
|
+
number: 21,
|
|
53323
|
+
action: "terminate",
|
|
53324
|
+
description: "User interruption with CTRL-BREAK",
|
|
53325
|
+
standard: "other"
|
|
53326
|
+
},
|
|
53327
|
+
{
|
|
53328
|
+
name: "SIGTTOU",
|
|
53329
|
+
number: 22,
|
|
53330
|
+
action: "pause",
|
|
53331
|
+
description: "Background process cannot write to terminal output",
|
|
53332
|
+
standard: "posix"
|
|
53333
|
+
},
|
|
53334
|
+
{
|
|
53335
|
+
name: "SIGURG",
|
|
53336
|
+
number: 23,
|
|
53337
|
+
action: "ignore",
|
|
53338
|
+
description: "Socket received out-of-band data",
|
|
53339
|
+
standard: "bsd"
|
|
53340
|
+
},
|
|
53341
|
+
{
|
|
53342
|
+
name: "SIGXCPU",
|
|
53343
|
+
number: 24,
|
|
53344
|
+
action: "core",
|
|
53345
|
+
description: "Process timed out",
|
|
53346
|
+
standard: "bsd"
|
|
53347
|
+
},
|
|
53348
|
+
{
|
|
53349
|
+
name: "SIGXFSZ",
|
|
53350
|
+
number: 25,
|
|
53351
|
+
action: "core",
|
|
53352
|
+
description: "File too big",
|
|
53353
|
+
standard: "bsd"
|
|
53354
|
+
},
|
|
53355
|
+
{
|
|
53356
|
+
name: "SIGVTALRM",
|
|
53357
|
+
number: 26,
|
|
53358
|
+
action: "terminate",
|
|
53359
|
+
description: "Timeout or timer",
|
|
53360
|
+
standard: "bsd"
|
|
53361
|
+
},
|
|
53362
|
+
{
|
|
53363
|
+
name: "SIGPROF",
|
|
53364
|
+
number: 27,
|
|
53365
|
+
action: "terminate",
|
|
53366
|
+
description: "Timeout or timer",
|
|
53367
|
+
standard: "bsd"
|
|
53368
|
+
},
|
|
53369
|
+
{
|
|
53370
|
+
name: "SIGWINCH",
|
|
53371
|
+
number: 28,
|
|
53372
|
+
action: "ignore",
|
|
53373
|
+
description: "Terminal window size changed",
|
|
53374
|
+
standard: "bsd"
|
|
53375
|
+
},
|
|
53376
|
+
{
|
|
53377
|
+
name: "SIGIO",
|
|
53378
|
+
number: 29,
|
|
53379
|
+
action: "terminate",
|
|
53380
|
+
description: "I/O is available",
|
|
53381
|
+
standard: "other"
|
|
53382
|
+
},
|
|
53383
|
+
{
|
|
53384
|
+
name: "SIGPOLL",
|
|
53385
|
+
number: 29,
|
|
53386
|
+
action: "terminate",
|
|
53387
|
+
description: "Watched event",
|
|
53388
|
+
standard: "other"
|
|
53389
|
+
},
|
|
53390
|
+
{
|
|
53391
|
+
name: "SIGINFO",
|
|
53392
|
+
number: 29,
|
|
53393
|
+
action: "ignore",
|
|
53394
|
+
description: "Request for process information",
|
|
53395
|
+
standard: "other"
|
|
53396
|
+
},
|
|
53397
|
+
{
|
|
53398
|
+
name: "SIGPWR",
|
|
53399
|
+
number: 30,
|
|
53400
|
+
action: "terminate",
|
|
53401
|
+
description: "Device running out of power",
|
|
53402
|
+
standard: "systemv"
|
|
53403
|
+
},
|
|
53404
|
+
{
|
|
53405
|
+
name: "SIGSYS",
|
|
53406
|
+
number: 31,
|
|
53407
|
+
action: "core",
|
|
53408
|
+
description: "Invalid system call",
|
|
53409
|
+
standard: "other"
|
|
53410
|
+
},
|
|
53411
|
+
{
|
|
53412
|
+
name: "SIGUNUSED",
|
|
53413
|
+
number: 31,
|
|
53414
|
+
action: "terminate",
|
|
53415
|
+
description: "Invalid system call",
|
|
53416
|
+
standard: "other"
|
|
53417
|
+
}
|
|
53418
|
+
];
|
|
53419
|
+
} });
|
|
53420
|
+
var require_realtime = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/realtime.js"(exports2) {
|
|
53421
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53422
|
+
exports2.SIGRTMAX = exports2.getRealtimeSignals = void 0;
|
|
53423
|
+
var getRealtimeSignals = function() {
|
|
53424
|
+
const length = SIGRTMAX - SIGRTMIN + 1;
|
|
53425
|
+
return Array.from({ length }, getRealtimeSignal);
|
|
53426
|
+
};
|
|
53427
|
+
exports2.getRealtimeSignals = getRealtimeSignals;
|
|
53428
|
+
var getRealtimeSignal = function(value, index) {
|
|
53429
|
+
return {
|
|
53430
|
+
name: `SIGRT${index + 1}`,
|
|
53431
|
+
number: SIGRTMIN + index,
|
|
53432
|
+
action: "terminate",
|
|
53433
|
+
description: "Application-specific signal (realtime)",
|
|
53434
|
+
standard: "posix"
|
|
53435
|
+
};
|
|
53436
|
+
};
|
|
53437
|
+
var SIGRTMIN = 34;
|
|
53438
|
+
var SIGRTMAX = 64;
|
|
53439
|
+
exports2.SIGRTMAX = SIGRTMAX;
|
|
53440
|
+
} });
|
|
53441
|
+
var require_signals = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/signals.js"(exports2) {
|
|
53442
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53443
|
+
exports2.getSignals = void 0;
|
|
53444
|
+
var _os = __require("os");
|
|
53445
|
+
var _core = require_core2();
|
|
53446
|
+
var _realtime = require_realtime();
|
|
53447
|
+
var getSignals = function() {
|
|
53448
|
+
const realtimeSignals = (0, _realtime.getRealtimeSignals)();
|
|
53449
|
+
return [..._core.SIGNALS, ...realtimeSignals].map(normalizeSignal);
|
|
53450
|
+
};
|
|
53451
|
+
exports2.getSignals = getSignals;
|
|
53452
|
+
var normalizeSignal = function({ name, number: defaultNumber, description, action, forced = false, standard }) {
|
|
53453
|
+
const { signals: { [name]: constantSignal } } = _os.constants;
|
|
53454
|
+
const supported = constantSignal !== void 0;
|
|
53455
|
+
return {
|
|
53456
|
+
name,
|
|
53457
|
+
number: supported ? constantSignal : defaultNumber,
|
|
53458
|
+
description,
|
|
53459
|
+
supported,
|
|
53460
|
+
action,
|
|
53461
|
+
forced,
|
|
53462
|
+
standard
|
|
53463
|
+
};
|
|
53464
|
+
};
|
|
53465
|
+
} });
|
|
53466
|
+
var require_main = __commonJS({ "../../node_modules/.pnpm/human-signals@1.1.1/node_modules/human-signals/build/src/main.js"(exports2) {
|
|
53467
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
53468
|
+
exports2.signalsByNumber = exports2.signalsByName = void 0;
|
|
53469
|
+
var _os = __require("os");
|
|
53470
|
+
var _signals = require_signals();
|
|
53471
|
+
var _realtime = require_realtime();
|
|
53472
|
+
var getSignalsByName = function() {
|
|
53473
|
+
return (0, _signals.getSignals)().reduce(getSignalByName, {});
|
|
53474
|
+
};
|
|
53475
|
+
var getSignalByName = function(signalByNameMemo, { name, number, description, supported, action, forced, standard }) {
|
|
53476
|
+
return {
|
|
53477
|
+
...signalByNameMemo,
|
|
53478
|
+
[name]: {
|
|
53479
|
+
name,
|
|
53480
|
+
number,
|
|
53481
|
+
description,
|
|
53482
|
+
supported,
|
|
53483
|
+
action,
|
|
53484
|
+
forced,
|
|
53485
|
+
standard
|
|
53486
|
+
}
|
|
53487
|
+
};
|
|
53488
|
+
};
|
|
53489
|
+
exports2.signalsByName = getSignalsByName();
|
|
53490
|
+
var getSignalsByNumber = function() {
|
|
53491
|
+
const signals = (0, _signals.getSignals)();
|
|
53492
|
+
const length = _realtime.SIGRTMAX + 1;
|
|
53493
|
+
const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
|
|
53494
|
+
return Object.assign({}, ...signalsA);
|
|
53495
|
+
};
|
|
53496
|
+
var getSignalByNumber = function(number, signals) {
|
|
53497
|
+
const signal = findSignalByNumber(number, signals);
|
|
53498
|
+
if (signal === void 0) return {};
|
|
53499
|
+
const { name, description, supported, action, forced, standard } = signal;
|
|
53500
|
+
return { [number]: {
|
|
53501
|
+
name,
|
|
53502
|
+
number,
|
|
53503
|
+
description,
|
|
53504
|
+
supported,
|
|
53505
|
+
action,
|
|
53506
|
+
forced,
|
|
53507
|
+
standard
|
|
53508
|
+
} };
|
|
53509
|
+
};
|
|
53510
|
+
var findSignalByNumber = function(number, signals) {
|
|
53511
|
+
const signal = signals.find(({ name }) => _os.constants.signals[name] === number);
|
|
53512
|
+
if (signal !== void 0) return signal;
|
|
53513
|
+
return signals.find((signalA) => signalA.number === number);
|
|
53514
|
+
};
|
|
53515
|
+
exports2.signalsByNumber = getSignalsByNumber();
|
|
53516
|
+
} });
|
|
53517
|
+
var require_error = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/error.js"(exports2, module2) {
|
|
53518
|
+
var { signalsByName } = require_main();
|
|
53519
|
+
var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
|
|
53520
|
+
if (timedOut) return `timed out after ${timeout} milliseconds`;
|
|
53521
|
+
if (isCanceled) return "was canceled";
|
|
53522
|
+
if (errorCode !== void 0) return `failed with ${errorCode}`;
|
|
53523
|
+
if (signal !== void 0) return `was killed with ${signal} (${signalDescription})`;
|
|
53524
|
+
if (exitCode !== void 0) return `failed with exit code ${exitCode}`;
|
|
53525
|
+
return "failed";
|
|
53526
|
+
};
|
|
53527
|
+
var makeError = ({ stdout, stderr, all, error, signal, exitCode, command, timedOut, isCanceled, killed, parsed: { options: { timeout } } }) => {
|
|
53528
|
+
exitCode = exitCode === null ? void 0 : exitCode;
|
|
53529
|
+
signal = signal === null ? void 0 : signal;
|
|
53530
|
+
const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
|
|
53531
|
+
const message = `Command ${getErrorPrefix({
|
|
53532
|
+
timedOut,
|
|
53533
|
+
timeout,
|
|
53534
|
+
errorCode: error && error.code,
|
|
53535
|
+
signal,
|
|
53536
|
+
signalDescription,
|
|
53537
|
+
exitCode,
|
|
53538
|
+
isCanceled
|
|
53539
|
+
})}: ${command}`;
|
|
53540
|
+
if (error instanceof Error) {
|
|
53541
|
+
error.originalMessage = error.message;
|
|
53542
|
+
error.message = `${message}
|
|
53543
|
+
${error.message}`;
|
|
53544
|
+
} else error = new Error(message);
|
|
53545
|
+
error.command = command;
|
|
53546
|
+
error.exitCode = exitCode;
|
|
53547
|
+
error.signal = signal;
|
|
53548
|
+
error.signalDescription = signalDescription;
|
|
53549
|
+
error.stdout = stdout;
|
|
53550
|
+
error.stderr = stderr;
|
|
53551
|
+
if (all !== void 0) error.all = all;
|
|
53552
|
+
if ("bufferedData" in error) delete error.bufferedData;
|
|
53553
|
+
error.failed = true;
|
|
53554
|
+
error.timedOut = Boolean(timedOut);
|
|
53555
|
+
error.isCanceled = isCanceled;
|
|
53556
|
+
error.killed = killed && !timedOut;
|
|
53557
|
+
return error;
|
|
53558
|
+
};
|
|
53559
|
+
module2.exports = makeError;
|
|
53560
|
+
} });
|
|
53561
|
+
var require_stdio = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stdio.js"(exports2, module2) {
|
|
53562
|
+
var aliases = [
|
|
53563
|
+
"stdin",
|
|
53564
|
+
"stdout",
|
|
53565
|
+
"stderr"
|
|
53566
|
+
];
|
|
53567
|
+
var hasAlias = (opts) => aliases.some((alias) => opts[alias] !== void 0);
|
|
53568
|
+
var normalizeStdio = (opts) => {
|
|
53569
|
+
if (!opts) return;
|
|
53570
|
+
const { stdio } = opts;
|
|
53571
|
+
if (stdio === void 0) return aliases.map((alias) => opts[alias]);
|
|
53572
|
+
if (hasAlias(opts)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
|
|
53573
|
+
if (typeof stdio === "string") return stdio;
|
|
53574
|
+
if (!Array.isArray(stdio)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
|
|
53575
|
+
const length = Math.max(stdio.length, aliases.length);
|
|
53576
|
+
return Array.from({ length }, (value, index) => stdio[index]);
|
|
53577
|
+
};
|
|
53578
|
+
module2.exports = normalizeStdio;
|
|
53579
|
+
module2.exports.node = (opts) => {
|
|
53580
|
+
const stdio = normalizeStdio(opts);
|
|
53581
|
+
if (stdio === "ipc") return "ipc";
|
|
53582
|
+
if (stdio === void 0 || typeof stdio === "string") return [
|
|
53583
|
+
stdio,
|
|
53584
|
+
stdio,
|
|
53585
|
+
stdio,
|
|
53586
|
+
"ipc"
|
|
53587
|
+
];
|
|
53588
|
+
if (stdio.includes("ipc")) return stdio;
|
|
53589
|
+
return [...stdio, "ipc"];
|
|
53590
|
+
};
|
|
53591
|
+
} });
|
|
53592
|
+
var require_signals2 = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
|
|
53593
|
+
module2.exports = [
|
|
53594
|
+
"SIGABRT",
|
|
53595
|
+
"SIGALRM",
|
|
53596
|
+
"SIGHUP",
|
|
53597
|
+
"SIGINT",
|
|
53598
|
+
"SIGTERM"
|
|
53599
|
+
];
|
|
53600
|
+
if (process.platform !== "win32") module2.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
53601
|
+
if (process.platform === "linux") module2.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
|
|
53602
|
+
} });
|
|
53603
|
+
var require_signal_exit = __commonJS({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
|
|
53604
|
+
var process2 = global.process;
|
|
53605
|
+
var processOk = function(process3) {
|
|
53606
|
+
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";
|
|
53607
|
+
};
|
|
53608
|
+
if (!processOk(process2)) module2.exports = function() {
|
|
53609
|
+
return function() {};
|
|
53610
|
+
};
|
|
53611
|
+
else {
|
|
53612
|
+
assert7 = __require("assert");
|
|
53613
|
+
signals = require_signals2();
|
|
53614
|
+
isWin3 = /^win/i.test(process2.platform);
|
|
53615
|
+
EE = __require("events");
|
|
53616
|
+
if (typeof EE !== "function") EE = EE.EventEmitter;
|
|
53617
|
+
if (process2.__signal_exit_emitter__) emitter = process2.__signal_exit_emitter__;
|
|
53618
|
+
else {
|
|
53619
|
+
emitter = process2.__signal_exit_emitter__ = new EE();
|
|
53620
|
+
emitter.count = 0;
|
|
53621
|
+
emitter.emitted = {};
|
|
53622
|
+
}
|
|
53623
|
+
if (!emitter.infinite) {
|
|
53624
|
+
emitter.setMaxListeners(Infinity);
|
|
53625
|
+
emitter.infinite = true;
|
|
53626
|
+
}
|
|
53627
|
+
module2.exports = function(cb, opts) {
|
|
53628
|
+
if (!processOk(global.process)) return function() {};
|
|
53629
|
+
assert7.equal(typeof cb, "function", "a callback must be provided for exit handler");
|
|
53630
|
+
if (loaded === false) load();
|
|
53631
|
+
var ev = "exit";
|
|
53632
|
+
if (opts && opts.alwaysLast) ev = "afterexit";
|
|
53633
|
+
var remove2 = function() {
|
|
53634
|
+
emitter.removeListener(ev, cb);
|
|
53635
|
+
if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) unload();
|
|
53636
|
+
};
|
|
53637
|
+
emitter.on(ev, cb);
|
|
53638
|
+
return remove2;
|
|
53639
|
+
};
|
|
53640
|
+
unload = function unload2() {
|
|
53641
|
+
if (!loaded || !processOk(global.process)) return;
|
|
53642
|
+
loaded = false;
|
|
53643
|
+
signals.forEach(function(sig) {
|
|
53644
|
+
try {
|
|
53645
|
+
process2.removeListener(sig, sigListeners[sig]);
|
|
53646
|
+
} catch (er) {}
|
|
53647
|
+
});
|
|
53648
|
+
process2.emit = originalProcessEmit;
|
|
53649
|
+
process2.reallyExit = originalProcessReallyExit;
|
|
53650
|
+
emitter.count -= 1;
|
|
53651
|
+
};
|
|
53652
|
+
module2.exports.unload = unload;
|
|
53653
|
+
emit = function emit2(event, code, signal) {
|
|
53654
|
+
if (emitter.emitted[event]) return;
|
|
53655
|
+
emitter.emitted[event] = true;
|
|
53656
|
+
emitter.emit(event, code, signal);
|
|
53657
|
+
};
|
|
53658
|
+
sigListeners = {};
|
|
53659
|
+
signals.forEach(function(sig) {
|
|
53660
|
+
sigListeners[sig] = function listener() {
|
|
53661
|
+
if (!processOk(global.process)) return;
|
|
53662
|
+
if (process2.listeners(sig).length === emitter.count) {
|
|
53663
|
+
unload();
|
|
53664
|
+
emit("exit", null, sig);
|
|
53665
|
+
emit("afterexit", null, sig);
|
|
53666
|
+
if (isWin3 && sig === "SIGHUP") sig = "SIGINT";
|
|
53667
|
+
process2.kill(process2.pid, sig);
|
|
53668
|
+
}
|
|
53669
|
+
};
|
|
53670
|
+
});
|
|
53671
|
+
module2.exports.signals = function() {
|
|
53672
|
+
return signals;
|
|
53673
|
+
};
|
|
53674
|
+
loaded = false;
|
|
53675
|
+
load = function load2() {
|
|
53676
|
+
if (loaded || !processOk(global.process)) return;
|
|
53677
|
+
loaded = true;
|
|
53678
|
+
emitter.count += 1;
|
|
53679
|
+
signals = signals.filter(function(sig) {
|
|
53680
|
+
try {
|
|
53681
|
+
process2.on(sig, sigListeners[sig]);
|
|
53682
|
+
return true;
|
|
53683
|
+
} catch (er) {
|
|
53684
|
+
return false;
|
|
53685
|
+
}
|
|
53686
|
+
});
|
|
53687
|
+
process2.emit = processEmit;
|
|
53688
|
+
process2.reallyExit = processReallyExit;
|
|
53689
|
+
};
|
|
53690
|
+
module2.exports.load = load;
|
|
53691
|
+
originalProcessReallyExit = process2.reallyExit;
|
|
53692
|
+
processReallyExit = function processReallyExit2(code) {
|
|
53693
|
+
if (!processOk(global.process)) return;
|
|
53694
|
+
process2.exitCode = code || 0;
|
|
53695
|
+
emit("exit", process2.exitCode, null);
|
|
53696
|
+
emit("afterexit", process2.exitCode, null);
|
|
53697
|
+
originalProcessReallyExit.call(process2, process2.exitCode);
|
|
53698
|
+
};
|
|
53699
|
+
originalProcessEmit = process2.emit;
|
|
53700
|
+
processEmit = function processEmit2(ev, arg) {
|
|
53701
|
+
if (ev === "exit" && processOk(global.process)) {
|
|
53702
|
+
if (arg !== void 0) process2.exitCode = arg;
|
|
53703
|
+
var ret = originalProcessEmit.apply(this, arguments);
|
|
53704
|
+
emit("exit", process2.exitCode, null);
|
|
53705
|
+
emit("afterexit", process2.exitCode, null);
|
|
53706
|
+
return ret;
|
|
53707
|
+
} else return originalProcessEmit.apply(this, arguments);
|
|
53708
|
+
};
|
|
53709
|
+
}
|
|
53710
|
+
var assert7;
|
|
53711
|
+
var signals;
|
|
53712
|
+
var isWin3;
|
|
53713
|
+
var EE;
|
|
53714
|
+
var emitter;
|
|
53715
|
+
var unload;
|
|
53716
|
+
var emit;
|
|
53717
|
+
var sigListeners;
|
|
53718
|
+
var loaded;
|
|
53719
|
+
var load;
|
|
53720
|
+
var originalProcessReallyExit;
|
|
53721
|
+
var processReallyExit;
|
|
53722
|
+
var originalProcessEmit;
|
|
53723
|
+
var processEmit;
|
|
53724
|
+
} });
|
|
53725
|
+
var require_p_finally = __commonJS({ "../../node_modules/.pnpm/p-finally@2.0.1/node_modules/p-finally/index.js"(exports2, module2) {
|
|
53726
|
+
module2.exports = async (promise, onFinally = () => {}) => {
|
|
53727
|
+
let value;
|
|
53728
|
+
try {
|
|
53729
|
+
value = await promise;
|
|
53730
|
+
} catch (error) {
|
|
53731
|
+
await onFinally();
|
|
53732
|
+
throw error;
|
|
53733
|
+
}
|
|
53734
|
+
await onFinally();
|
|
53735
|
+
return value;
|
|
53736
|
+
};
|
|
53737
|
+
} });
|
|
53738
|
+
var require_kill = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/kill.js"(exports2, module2) {
|
|
53739
|
+
var os = __require("os");
|
|
53740
|
+
var onExit = require_signal_exit();
|
|
53741
|
+
var pFinally = require_p_finally();
|
|
53742
|
+
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
|
|
53743
|
+
var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
53744
|
+
const killResult = kill(signal);
|
|
53745
|
+
setKillTimeout(kill, signal, options, killResult);
|
|
53746
|
+
return killResult;
|
|
53747
|
+
};
|
|
53748
|
+
var setKillTimeout = (kill, signal, options, killResult) => {
|
|
53749
|
+
if (!shouldForceKill(signal, options, killResult)) return;
|
|
53750
|
+
const timeout = getForceKillAfterTimeout(options);
|
|
53751
|
+
setTimeout(() => {
|
|
53752
|
+
kill("SIGKILL");
|
|
53753
|
+
}, timeout).unref();
|
|
53754
|
+
};
|
|
53755
|
+
var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => {
|
|
53756
|
+
return isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
|
|
53757
|
+
};
|
|
53758
|
+
var isSigterm = (signal) => {
|
|
53759
|
+
return signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
|
|
53760
|
+
};
|
|
53761
|
+
var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
|
|
53762
|
+
if (forceKillAfterTimeout === true) return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
53763
|
+
if (!Number.isInteger(forceKillAfterTimeout) || forceKillAfterTimeout < 0) throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
|
|
53764
|
+
return forceKillAfterTimeout;
|
|
53765
|
+
};
|
|
53766
|
+
var spawnedCancel = (spawned, context) => {
|
|
53767
|
+
if (spawned.kill()) context.isCanceled = true;
|
|
53768
|
+
};
|
|
53769
|
+
var timeoutKill = (spawned, signal, reject) => {
|
|
53770
|
+
spawned.kill(signal);
|
|
53771
|
+
reject(Object.assign(/* @__PURE__ */ new Error("Timed out"), {
|
|
53772
|
+
timedOut: true,
|
|
53773
|
+
signal
|
|
53774
|
+
}));
|
|
53775
|
+
};
|
|
53776
|
+
var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
|
|
53777
|
+
if (timeout === 0 || timeout === void 0) return spawnedPromise;
|
|
53778
|
+
if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
53779
|
+
let timeoutId;
|
|
53780
|
+
const timeoutPromise = new Promise((resolve, reject) => {
|
|
53781
|
+
timeoutId = setTimeout(() => {
|
|
53782
|
+
timeoutKill(spawned, killSignal, reject);
|
|
53783
|
+
}, timeout);
|
|
53784
|
+
});
|
|
53785
|
+
const safeSpawnedPromise = pFinally(spawnedPromise, () => {
|
|
53786
|
+
clearTimeout(timeoutId);
|
|
53787
|
+
});
|
|
53788
|
+
return Promise.race([timeoutPromise, safeSpawnedPromise]);
|
|
53789
|
+
};
|
|
53790
|
+
var setExitHandler = (spawned, { cleanup, detached }, timedPromise) => {
|
|
53791
|
+
if (!cleanup || detached) return timedPromise;
|
|
53792
|
+
return pFinally(timedPromise, onExit(() => {
|
|
53793
|
+
spawned.kill();
|
|
53794
|
+
}));
|
|
53795
|
+
};
|
|
53796
|
+
module2.exports = {
|
|
53797
|
+
spawnedKill,
|
|
53798
|
+
spawnedCancel,
|
|
53799
|
+
setupTimeout,
|
|
53800
|
+
setExitHandler
|
|
53801
|
+
};
|
|
53802
|
+
} });
|
|
53803
|
+
var require_is_stream = __commonJS({ "../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
|
|
53804
|
+
var isStream = (stream) => stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
|
|
53805
|
+
isStream.writable = (stream) => isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
|
|
53806
|
+
isStream.readable = (stream) => isStream(stream) && stream.readable !== false && typeof stream._read === "function" && typeof stream._readableState === "object";
|
|
53807
|
+
isStream.duplex = (stream) => isStream.writable(stream) && isStream.readable(stream);
|
|
53808
|
+
isStream.transform = (stream) => isStream.duplex(stream) && typeof stream._transform === "function";
|
|
53809
|
+
module2.exports = isStream;
|
|
53810
|
+
} });
|
|
53811
|
+
var require_pump = __commonJS({ "../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports2, module2) {
|
|
53812
|
+
var once = require_once();
|
|
53813
|
+
var eos2 = require_end_of_stream();
|
|
53814
|
+
var fs7;
|
|
53815
|
+
try {
|
|
53816
|
+
fs7 = __require("fs");
|
|
53817
|
+
} catch (e) {}
|
|
53818
|
+
var noop = function() {};
|
|
53819
|
+
var ancient = /^v?\.0/.test(process.version);
|
|
53820
|
+
var isFn = function(fn) {
|
|
53821
|
+
return typeof fn === "function";
|
|
53822
|
+
};
|
|
53823
|
+
var isFS = function(stream) {
|
|
53824
|
+
if (!ancient) return false;
|
|
53825
|
+
if (!fs7) return false;
|
|
53826
|
+
return (stream instanceof (fs7.ReadStream || noop) || stream instanceof (fs7.WriteStream || noop)) && isFn(stream.close);
|
|
53827
|
+
};
|
|
53828
|
+
var isRequest = function(stream) {
|
|
53829
|
+
return stream.setHeader && isFn(stream.abort);
|
|
53830
|
+
};
|
|
53831
|
+
var destroyer = function(stream, reading, writing, callback) {
|
|
53832
|
+
callback = once(callback);
|
|
53833
|
+
var closed = false;
|
|
53834
|
+
stream.on("close", function() {
|
|
53835
|
+
closed = true;
|
|
53836
|
+
});
|
|
53837
|
+
eos2(stream, {
|
|
53838
|
+
readable: reading,
|
|
53839
|
+
writable: writing
|
|
53840
|
+
}, function(err) {
|
|
53841
|
+
if (err) return callback(err);
|
|
53842
|
+
closed = true;
|
|
53843
|
+
callback();
|
|
53844
|
+
});
|
|
53845
|
+
var destroyed = false;
|
|
53846
|
+
return function(err) {
|
|
53847
|
+
if (closed) return;
|
|
53848
|
+
if (destroyed) return;
|
|
53849
|
+
destroyed = true;
|
|
53850
|
+
if (isFS(stream)) return stream.close(noop);
|
|
53851
|
+
if (isRequest(stream)) return stream.abort();
|
|
53852
|
+
if (isFn(stream.destroy)) return stream.destroy();
|
|
53853
|
+
callback(err || /* @__PURE__ */ new Error("stream was destroyed"));
|
|
53854
|
+
};
|
|
53855
|
+
};
|
|
53856
|
+
var call = function(fn) {
|
|
53857
|
+
fn();
|
|
53858
|
+
};
|
|
53859
|
+
var pipe = function(from, to) {
|
|
53860
|
+
return from.pipe(to);
|
|
53861
|
+
};
|
|
53862
|
+
var pump = function() {
|
|
53863
|
+
var streams = Array.prototype.slice.call(arguments);
|
|
53864
|
+
var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop;
|
|
53865
|
+
if (Array.isArray(streams[0])) streams = streams[0];
|
|
53866
|
+
if (streams.length < 2) throw new Error("pump requires two streams per minimum");
|
|
53867
|
+
var error;
|
|
53868
|
+
var destroys = streams.map(function(stream, i) {
|
|
53869
|
+
var reading = i < streams.length - 1;
|
|
53870
|
+
return destroyer(stream, reading, i > 0, function(err) {
|
|
53871
|
+
if (!error) error = err;
|
|
53872
|
+
if (err) destroys.forEach(call);
|
|
53873
|
+
if (reading) return;
|
|
53874
|
+
destroys.forEach(call);
|
|
53875
|
+
callback(error);
|
|
53876
|
+
});
|
|
53877
|
+
});
|
|
53878
|
+
return streams.reduce(pipe);
|
|
53879
|
+
};
|
|
53880
|
+
module2.exports = pump;
|
|
53881
|
+
} });
|
|
53882
|
+
var require_buffer_stream = __commonJS({ "../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/buffer-stream.js"(exports2, module2) {
|
|
53883
|
+
var { PassThrough: PassThroughStream } = __require("stream");
|
|
53884
|
+
module2.exports = (options) => {
|
|
53885
|
+
options = { ...options };
|
|
53886
|
+
const { array } = options;
|
|
53887
|
+
let { encoding } = options;
|
|
53888
|
+
const isBuffer = encoding === "buffer";
|
|
53889
|
+
let objectMode = false;
|
|
53890
|
+
if (array) objectMode = !(encoding || isBuffer);
|
|
53891
|
+
else encoding = encoding || "utf8";
|
|
53892
|
+
if (isBuffer) encoding = null;
|
|
53893
|
+
const stream = new PassThroughStream({ objectMode });
|
|
53894
|
+
if (encoding) stream.setEncoding(encoding);
|
|
53895
|
+
let length = 0;
|
|
53896
|
+
const chunks = [];
|
|
53897
|
+
stream.on("data", (chunk) => {
|
|
53898
|
+
chunks.push(chunk);
|
|
53899
|
+
if (objectMode) length = chunks.length;
|
|
53900
|
+
else length += chunk.length;
|
|
53901
|
+
});
|
|
53902
|
+
stream.getBufferedValue = () => {
|
|
53903
|
+
if (array) return chunks;
|
|
53904
|
+
return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
|
|
53905
|
+
};
|
|
53906
|
+
stream.getBufferedLength = () => length;
|
|
53907
|
+
return stream;
|
|
53908
|
+
};
|
|
53909
|
+
} });
|
|
53910
|
+
var require_get_stream = __commonJS({ "../../node_modules/.pnpm/get-stream@5.2.0/node_modules/get-stream/index.js"(exports2, module2) {
|
|
53911
|
+
var { constants: BufferConstants } = __require("buffer");
|
|
53912
|
+
var pump = require_pump();
|
|
53913
|
+
var bufferStream = require_buffer_stream();
|
|
53914
|
+
var MaxBufferError = class extends Error {
|
|
53915
|
+
constructor() {
|
|
53916
|
+
super("maxBuffer exceeded");
|
|
53917
|
+
this.name = "MaxBufferError";
|
|
53918
|
+
}
|
|
53919
|
+
};
|
|
53920
|
+
async function getStream(inputStream, options) {
|
|
53921
|
+
if (!inputStream) return Promise.reject(/* @__PURE__ */ new Error("Expected a stream"));
|
|
53922
|
+
options = {
|
|
53923
|
+
maxBuffer: Infinity,
|
|
53924
|
+
...options
|
|
53925
|
+
};
|
|
53926
|
+
const { maxBuffer } = options;
|
|
53927
|
+
let stream;
|
|
53928
|
+
await new Promise((resolve, reject) => {
|
|
53929
|
+
const rejectPromise = (error) => {
|
|
53930
|
+
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) error.bufferedData = stream.getBufferedValue();
|
|
53931
|
+
reject(error);
|
|
53932
|
+
};
|
|
53933
|
+
stream = pump(inputStream, bufferStream(options), (error) => {
|
|
53934
|
+
if (error) {
|
|
53935
|
+
rejectPromise(error);
|
|
53936
|
+
return;
|
|
53937
|
+
}
|
|
53938
|
+
resolve();
|
|
53939
|
+
});
|
|
53940
|
+
stream.on("data", () => {
|
|
53941
|
+
if (stream.getBufferedLength() > maxBuffer) rejectPromise(new MaxBufferError());
|
|
53942
|
+
});
|
|
53943
|
+
});
|
|
53944
|
+
return stream.getBufferedValue();
|
|
53945
|
+
}
|
|
53946
|
+
module2.exports = getStream;
|
|
53947
|
+
module2.exports.default = getStream;
|
|
53948
|
+
module2.exports.buffer = (stream, options) => getStream(stream, {
|
|
53949
|
+
...options,
|
|
53950
|
+
encoding: "buffer"
|
|
53951
|
+
});
|
|
53952
|
+
module2.exports.array = (stream, options) => getStream(stream, {
|
|
53953
|
+
...options,
|
|
53954
|
+
array: true
|
|
53955
|
+
});
|
|
53956
|
+
module2.exports.MaxBufferError = MaxBufferError;
|
|
53957
|
+
} });
|
|
53958
|
+
var require_merge_stream = __commonJS({ "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports2, module2) {
|
|
53959
|
+
var { PassThrough } = __require("stream");
|
|
53960
|
+
module2.exports = function() {
|
|
53961
|
+
var sources = [];
|
|
53962
|
+
var output = new PassThrough({ objectMode: true });
|
|
53963
|
+
output.setMaxListeners(0);
|
|
53964
|
+
output.add = add;
|
|
53965
|
+
output.isEmpty = isEmpty;
|
|
53966
|
+
output.on("unpipe", remove2);
|
|
53967
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
53968
|
+
return output;
|
|
53969
|
+
function add(source) {
|
|
53970
|
+
if (Array.isArray(source)) {
|
|
53971
|
+
source.forEach(add);
|
|
53972
|
+
return this;
|
|
53973
|
+
}
|
|
53974
|
+
sources.push(source);
|
|
53975
|
+
source.once("end", remove2.bind(null, source));
|
|
53976
|
+
source.once("error", output.emit.bind(output, "error"));
|
|
53977
|
+
source.pipe(output, { end: false });
|
|
53978
|
+
return this;
|
|
53979
|
+
}
|
|
53980
|
+
function isEmpty() {
|
|
53981
|
+
return sources.length == 0;
|
|
53982
|
+
}
|
|
53983
|
+
function remove2(source) {
|
|
53984
|
+
sources = sources.filter(function(it) {
|
|
53985
|
+
return it !== source;
|
|
53986
|
+
});
|
|
53987
|
+
if (!sources.length && output.readable) output.end();
|
|
53988
|
+
}
|
|
53989
|
+
};
|
|
53990
|
+
} });
|
|
53991
|
+
var require_stream2 = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/stream.js"(exports2, module2) {
|
|
53992
|
+
var isStream = require_is_stream();
|
|
53993
|
+
var getStream = require_get_stream();
|
|
53994
|
+
var mergeStream = require_merge_stream();
|
|
53995
|
+
var handleInput = (spawned, input) => {
|
|
53996
|
+
if (input === void 0 || spawned.stdin === void 0) return;
|
|
53997
|
+
if (isStream(input)) input.pipe(spawned.stdin);
|
|
53998
|
+
else spawned.stdin.end(input);
|
|
53999
|
+
};
|
|
54000
|
+
var makeAllStream = (spawned, { all }) => {
|
|
54001
|
+
if (!all || !spawned.stdout && !spawned.stderr) return;
|
|
54002
|
+
const mixed = mergeStream();
|
|
54003
|
+
if (spawned.stdout) mixed.add(spawned.stdout);
|
|
54004
|
+
if (spawned.stderr) mixed.add(spawned.stderr);
|
|
54005
|
+
return mixed;
|
|
54006
|
+
};
|
|
54007
|
+
var getBufferedData = async (stream, streamPromise) => {
|
|
54008
|
+
if (!stream) return;
|
|
54009
|
+
stream.destroy();
|
|
54010
|
+
try {
|
|
54011
|
+
return await streamPromise;
|
|
54012
|
+
} catch (error) {
|
|
54013
|
+
return error.bufferedData;
|
|
54014
|
+
}
|
|
54015
|
+
};
|
|
54016
|
+
var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
54017
|
+
if (!stream || !buffer) return;
|
|
54018
|
+
if (encoding) return getStream(stream, {
|
|
54019
|
+
encoding,
|
|
54020
|
+
maxBuffer
|
|
54021
|
+
});
|
|
54022
|
+
return getStream.buffer(stream, { maxBuffer });
|
|
54023
|
+
};
|
|
54024
|
+
var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
54025
|
+
const stdoutPromise = getStreamPromise(stdout, {
|
|
54026
|
+
encoding,
|
|
54027
|
+
buffer,
|
|
54028
|
+
maxBuffer
|
|
54029
|
+
});
|
|
54030
|
+
const stderrPromise = getStreamPromise(stderr, {
|
|
54031
|
+
encoding,
|
|
54032
|
+
buffer,
|
|
54033
|
+
maxBuffer
|
|
54034
|
+
});
|
|
54035
|
+
const allPromise = getStreamPromise(all, {
|
|
54036
|
+
encoding,
|
|
54037
|
+
buffer,
|
|
54038
|
+
maxBuffer: maxBuffer * 2
|
|
54039
|
+
});
|
|
54040
|
+
try {
|
|
54041
|
+
return await Promise.all([
|
|
54042
|
+
processDone,
|
|
54043
|
+
stdoutPromise,
|
|
54044
|
+
stderrPromise,
|
|
54045
|
+
allPromise
|
|
54046
|
+
]);
|
|
54047
|
+
} catch (error) {
|
|
54048
|
+
return Promise.all([
|
|
54049
|
+
{
|
|
54050
|
+
error,
|
|
54051
|
+
signal: error.signal,
|
|
54052
|
+
timedOut: error.timedOut
|
|
54053
|
+
},
|
|
54054
|
+
getBufferedData(stdout, stdoutPromise),
|
|
54055
|
+
getBufferedData(stderr, stderrPromise),
|
|
54056
|
+
getBufferedData(all, allPromise)
|
|
54057
|
+
]);
|
|
54058
|
+
}
|
|
54059
|
+
};
|
|
54060
|
+
var validateInputSync = ({ input }) => {
|
|
54061
|
+
if (isStream(input)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
54062
|
+
};
|
|
54063
|
+
module2.exports = {
|
|
54064
|
+
handleInput,
|
|
54065
|
+
makeAllStream,
|
|
54066
|
+
getSpawnedResult,
|
|
54067
|
+
validateInputSync
|
|
54068
|
+
};
|
|
54069
|
+
} });
|
|
54070
|
+
var require_promise = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/promise.js"(exports2, module2) {
|
|
54071
|
+
var mergePromiseProperty = (spawned, promise, property) => {
|
|
54072
|
+
const value = typeof promise === "function" ? (...args) => promise()[property](...args) : promise[property].bind(promise);
|
|
54073
|
+
Object.defineProperty(spawned, property, {
|
|
54074
|
+
value,
|
|
54075
|
+
writable: true,
|
|
54076
|
+
enumerable: false,
|
|
54077
|
+
configurable: true
|
|
54078
|
+
});
|
|
54079
|
+
};
|
|
54080
|
+
var mergePromise = (spawned, promise) => {
|
|
54081
|
+
mergePromiseProperty(spawned, promise, "then");
|
|
54082
|
+
mergePromiseProperty(spawned, promise, "catch");
|
|
54083
|
+
if (Promise.prototype.finally) mergePromiseProperty(spawned, promise, "finally");
|
|
54084
|
+
return spawned;
|
|
54085
|
+
};
|
|
54086
|
+
var getSpawnedPromise = (spawned) => {
|
|
54087
|
+
return new Promise((resolve, reject) => {
|
|
54088
|
+
spawned.on("exit", (exitCode, signal) => {
|
|
54089
|
+
resolve({
|
|
54090
|
+
exitCode,
|
|
54091
|
+
signal
|
|
54092
|
+
});
|
|
54093
|
+
});
|
|
54094
|
+
spawned.on("error", (error) => {
|
|
54095
|
+
reject(error);
|
|
54096
|
+
});
|
|
54097
|
+
if (spawned.stdin) spawned.stdin.on("error", (error) => {
|
|
54098
|
+
reject(error);
|
|
54099
|
+
});
|
|
54100
|
+
});
|
|
54101
|
+
};
|
|
54102
|
+
module2.exports = {
|
|
54103
|
+
mergePromise,
|
|
54104
|
+
getSpawnedPromise
|
|
54105
|
+
};
|
|
54106
|
+
} });
|
|
54107
|
+
var require_command = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/lib/command.js"(exports2, module2) {
|
|
54108
|
+
var SPACES_REGEXP = / +/g;
|
|
54109
|
+
var joinCommand = (file, args = []) => {
|
|
54110
|
+
if (!Array.isArray(args)) return file;
|
|
54111
|
+
return [file, ...args].join(" ");
|
|
54112
|
+
};
|
|
54113
|
+
var handleEscaping = (tokens, token, index) => {
|
|
54114
|
+
if (index === 0) return [token];
|
|
54115
|
+
const previousToken = tokens[tokens.length - 1];
|
|
54116
|
+
if (previousToken.endsWith("\\")) return [...tokens.slice(0, -1), `${previousToken.slice(0, -1)} ${token}`];
|
|
54117
|
+
return [...tokens, token];
|
|
54118
|
+
};
|
|
54119
|
+
var parseCommand = (command) => {
|
|
54120
|
+
return command.trim().split(SPACES_REGEXP).reduce(handleEscaping, []);
|
|
54121
|
+
};
|
|
54122
|
+
module2.exports = {
|
|
54123
|
+
joinCommand,
|
|
54124
|
+
parseCommand
|
|
54125
|
+
};
|
|
54126
|
+
} });
|
|
54127
|
+
var require_execa = __commonJS({ "../../node_modules/.pnpm/execa@3.2.0/node_modules/execa/index.js"(exports2, module2) {
|
|
54128
|
+
var path7 = __require("path");
|
|
54129
|
+
var childProcess = __require("child_process");
|
|
54130
|
+
var crossSpawn = require_cross_spawn2();
|
|
54131
|
+
var stripFinalNewline = require_strip_final_newline();
|
|
54132
|
+
var npmRunPath = require_npm_run_path();
|
|
54133
|
+
var onetime = require_onetime();
|
|
54134
|
+
var makeError = require_error();
|
|
54135
|
+
var normalizeStdio = require_stdio();
|
|
54136
|
+
var { spawnedKill, spawnedCancel, setupTimeout, setExitHandler } = require_kill();
|
|
54137
|
+
var { handleInput, getSpawnedResult, makeAllStream, validateInputSync } = require_stream2();
|
|
54138
|
+
var { mergePromise, getSpawnedPromise } = require_promise();
|
|
54139
|
+
var { joinCommand, parseCommand } = require_command();
|
|
54140
|
+
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
|
54141
|
+
var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
54142
|
+
const env = extendEnv ? {
|
|
54143
|
+
...process.env,
|
|
54144
|
+
...envOption
|
|
54145
|
+
} : envOption;
|
|
54146
|
+
if (preferLocal) return npmRunPath.env({
|
|
54147
|
+
env,
|
|
54148
|
+
cwd: localDir,
|
|
54149
|
+
execPath
|
|
54150
|
+
});
|
|
54151
|
+
return env;
|
|
54152
|
+
};
|
|
54153
|
+
var handleArgs = (file, args, options = {}) => {
|
|
54154
|
+
const parsed = crossSpawn._parse(file, args, options);
|
|
54155
|
+
file = parsed.command;
|
|
54156
|
+
args = parsed.args;
|
|
54157
|
+
options = parsed.options;
|
|
54158
|
+
options = {
|
|
54159
|
+
maxBuffer: DEFAULT_MAX_BUFFER,
|
|
54160
|
+
buffer: true,
|
|
54161
|
+
stripFinalNewline: true,
|
|
54162
|
+
extendEnv: true,
|
|
54163
|
+
preferLocal: false,
|
|
54164
|
+
localDir: options.cwd || process.cwd(),
|
|
54165
|
+
execPath: process.execPath,
|
|
54166
|
+
encoding: "utf8",
|
|
54167
|
+
reject: true,
|
|
54168
|
+
cleanup: true,
|
|
54169
|
+
all: false,
|
|
54170
|
+
...options,
|
|
54171
|
+
windowsHide: true
|
|
54172
|
+
};
|
|
54173
|
+
options.env = getEnv(options);
|
|
54174
|
+
options.stdio = normalizeStdio(options);
|
|
54175
|
+
if (process.platform === "win32" && path7.basename(file, ".exe") === "cmd") args.unshift("/q");
|
|
54176
|
+
return {
|
|
54177
|
+
file,
|
|
54178
|
+
args,
|
|
54179
|
+
options,
|
|
54180
|
+
parsed
|
|
54181
|
+
};
|
|
54182
|
+
};
|
|
54183
|
+
var handleOutput = (options, value, error) => {
|
|
54184
|
+
if (typeof value !== "string" && !Buffer.isBuffer(value)) return error === void 0 ? void 0 : "";
|
|
54185
|
+
if (options.stripFinalNewline) return stripFinalNewline(value);
|
|
54186
|
+
return value;
|
|
54187
|
+
};
|
|
54188
|
+
var execa2 = (file, args, options) => {
|
|
54189
|
+
const parsed = handleArgs(file, args, options);
|
|
54190
|
+
const command = joinCommand(file, args);
|
|
54191
|
+
let spawned;
|
|
54192
|
+
try {
|
|
54193
|
+
spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
|
|
54194
|
+
} catch (error) {
|
|
54195
|
+
return mergePromise(new childProcess.ChildProcess(), Promise.reject(makeError({
|
|
54196
|
+
error,
|
|
54197
|
+
stdout: "",
|
|
54198
|
+
stderr: "",
|
|
54199
|
+
all: "",
|
|
54200
|
+
command,
|
|
54201
|
+
parsed,
|
|
54202
|
+
timedOut: false,
|
|
54203
|
+
isCanceled: false,
|
|
54204
|
+
killed: false
|
|
54205
|
+
})));
|
|
54206
|
+
}
|
|
54207
|
+
const spawnedPromise = getSpawnedPromise(spawned);
|
|
54208
|
+
const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
|
|
54209
|
+
const processDone = setExitHandler(spawned, parsed.options, timedPromise);
|
|
54210
|
+
const context = { isCanceled: false };
|
|
54211
|
+
spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
|
|
54212
|
+
spawned.cancel = spawnedCancel.bind(null, spawned, context);
|
|
54213
|
+
const handlePromise = async () => {
|
|
54214
|
+
const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
|
|
54215
|
+
const stdout = handleOutput(parsed.options, stdoutResult);
|
|
54216
|
+
const stderr = handleOutput(parsed.options, stderrResult);
|
|
54217
|
+
const all = handleOutput(parsed.options, allResult);
|
|
54218
|
+
if (error || exitCode !== 0 || signal !== null) {
|
|
54219
|
+
const returnedError = makeError({
|
|
54220
|
+
error,
|
|
54221
|
+
exitCode,
|
|
54222
|
+
signal,
|
|
54223
|
+
stdout,
|
|
54224
|
+
stderr,
|
|
54225
|
+
all,
|
|
54226
|
+
command,
|
|
54227
|
+
parsed,
|
|
54228
|
+
timedOut,
|
|
54229
|
+
isCanceled: context.isCanceled,
|
|
54230
|
+
killed: spawned.killed
|
|
54231
|
+
});
|
|
54232
|
+
if (!parsed.options.reject) return returnedError;
|
|
54233
|
+
throw returnedError;
|
|
54234
|
+
}
|
|
54235
|
+
return {
|
|
54236
|
+
command,
|
|
54237
|
+
exitCode: 0,
|
|
54238
|
+
stdout,
|
|
54239
|
+
stderr,
|
|
54240
|
+
all,
|
|
54241
|
+
failed: false,
|
|
54242
|
+
timedOut: false,
|
|
54243
|
+
isCanceled: false,
|
|
54244
|
+
killed: false
|
|
54245
|
+
};
|
|
54246
|
+
};
|
|
54247
|
+
const handlePromiseOnce = onetime(handlePromise);
|
|
54248
|
+
crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
|
|
54249
|
+
handleInput(spawned, parsed.options.input);
|
|
54250
|
+
spawned.all = makeAllStream(spawned, parsed.options);
|
|
54251
|
+
return mergePromise(spawned, handlePromiseOnce);
|
|
54252
|
+
};
|
|
54253
|
+
module2.exports = execa2;
|
|
54254
|
+
module2.exports.sync = (file, args, options) => {
|
|
54255
|
+
const parsed = handleArgs(file, args, options);
|
|
54256
|
+
const command = joinCommand(file, args);
|
|
54257
|
+
validateInputSync(parsed.options);
|
|
54258
|
+
let result;
|
|
54259
|
+
try {
|
|
54260
|
+
result = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);
|
|
54261
|
+
} catch (error) {
|
|
54262
|
+
throw makeError({
|
|
54263
|
+
error,
|
|
54264
|
+
stdout: "",
|
|
54265
|
+
stderr: "",
|
|
54266
|
+
all: "",
|
|
54267
|
+
command,
|
|
54268
|
+
parsed,
|
|
54269
|
+
timedOut: false,
|
|
54270
|
+
isCanceled: false,
|
|
54271
|
+
killed: false
|
|
54272
|
+
});
|
|
54273
|
+
}
|
|
54274
|
+
const stdout = handleOutput(parsed.options, result.stdout, result.error);
|
|
54275
|
+
const stderr = handleOutput(parsed.options, result.stderr, result.error);
|
|
54276
|
+
if (result.error || result.status !== 0 || result.signal !== null) {
|
|
54277
|
+
const error = makeError({
|
|
54278
|
+
stdout,
|
|
54279
|
+
stderr,
|
|
54280
|
+
error: result.error,
|
|
54281
|
+
signal: result.signal,
|
|
54282
|
+
exitCode: result.status,
|
|
54283
|
+
command,
|
|
54284
|
+
parsed,
|
|
54285
|
+
timedOut: result.error && result.error.code === "ETIMEDOUT",
|
|
54286
|
+
isCanceled: false,
|
|
54287
|
+
killed: result.signal !== null
|
|
54288
|
+
});
|
|
54289
|
+
if (!parsed.options.reject) return error;
|
|
54290
|
+
throw error;
|
|
54291
|
+
}
|
|
54292
|
+
return {
|
|
54293
|
+
command,
|
|
54294
|
+
exitCode: 0,
|
|
54295
|
+
stdout,
|
|
54296
|
+
stderr,
|
|
54297
|
+
failed: false,
|
|
54298
|
+
timedOut: false,
|
|
54299
|
+
isCanceled: false,
|
|
54300
|
+
killed: false
|
|
54301
|
+
};
|
|
54302
|
+
};
|
|
54303
|
+
module2.exports.command = (command, options) => {
|
|
54304
|
+
const [file, ...args] = parseCommand(command);
|
|
54305
|
+
return execa2(file, args, options);
|
|
54306
|
+
};
|
|
54307
|
+
module2.exports.commandSync = (command, options) => {
|
|
54308
|
+
const [file, ...args] = parseCommand(command);
|
|
54309
|
+
return execa2.sync(file, args, options);
|
|
54310
|
+
};
|
|
54311
|
+
module2.exports.node = (scriptPath, args, options = {}) => {
|
|
54312
|
+
if (args && !Array.isArray(args) && typeof args === "object") {
|
|
54313
|
+
options = args;
|
|
54314
|
+
args = [];
|
|
54315
|
+
}
|
|
54316
|
+
const stdio = normalizeStdio.node(options);
|
|
54317
|
+
const { nodePath = process.execPath, nodeOptions = process.execArgv } = options;
|
|
54318
|
+
return execa2(nodePath, [
|
|
54319
|
+
...nodeOptions,
|
|
54320
|
+
scriptPath,
|
|
54321
|
+
...Array.isArray(args) ? args : []
|
|
54322
|
+
], {
|
|
54323
|
+
...options,
|
|
54324
|
+
stdin: void 0,
|
|
54325
|
+
stdout: void 0,
|
|
54326
|
+
stderr: void 0,
|
|
54327
|
+
stdio,
|
|
54328
|
+
shell: false
|
|
54329
|
+
});
|
|
54330
|
+
};
|
|
54331
|
+
} });
|
|
52791
54332
|
var src_exports = {};
|
|
52792
54333
|
__export(src_exports, {
|
|
52793
54334
|
BACKEND_FRAMEWORKS: () => BACKEND_FRAMEWORKS,
|
|
@@ -52809,7 +54350,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52809
54350
|
buildsSchema: () => buildsSchema,
|
|
52810
54351
|
cloneEnv: () => cloneEnv,
|
|
52811
54352
|
createLambda: () => createLambda,
|
|
52812
|
-
debug: () => debug,
|
|
54353
|
+
debug: () => debug$1,
|
|
52813
54354
|
defaultCachePathGlob: () => defaultCachePathGlob,
|
|
52814
54355
|
detectPackageManager: () => detectPackageManager,
|
|
52815
54356
|
download: () => download,
|
|
@@ -52825,13 +54366,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52825
54366
|
getLatestNodeVersion: () => getLatestNodeVersion,
|
|
52826
54367
|
getNodeBinPath: () => getNodeBinPath,
|
|
52827
54368
|
getNodeBinPaths: () => getNodeBinPaths,
|
|
52828
|
-
getNodeVersion: () => getNodeVersion,
|
|
52829
54369
|
getOsRelease: () => getOsRelease,
|
|
54370
|
+
getPackageJson: () => getPackageJson,
|
|
52830
54371
|
getPathForPackageManager: () => getPathForPackageManager,
|
|
52831
54372
|
getPlatformEnv: () => getPlatformEnv,
|
|
52832
54373
|
getPrefixedEnvVars: () => getPrefixedEnvVars,
|
|
52833
54374
|
getPrettyError: () => getPrettyError,
|
|
52834
54375
|
getProvidedRuntime: () => getProvidedRuntime,
|
|
54376
|
+
getRuntimeNodeVersion: () => getRuntimeNodeVersion,
|
|
52835
54377
|
getScriptName: () => getScriptName,
|
|
52836
54378
|
getSpawnOptions: () => getSpawnOptions,
|
|
52837
54379
|
getSupportedBunVersion: () => getSupportedBunVersion,
|
|
@@ -52846,16 +54388,19 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
52846
54388
|
isDirectory: () => isDirectory,
|
|
52847
54389
|
isExperimentalBackendsEnabled: () => isExperimentalBackendsEnabled,
|
|
52848
54390
|
isExperimentalBackendsWithoutIntrospectionEnabled: () => isExperimentalBackendsWithoutIntrospectionEnabled$1,
|
|
54391
|
+
isPythonEntrypoint: () => isPythonEntrypoint,
|
|
52849
54392
|
isSymbolicLink: () => isSymbolicLink,
|
|
52850
54393
|
normalizePath: () => normalizePath,
|
|
52851
54394
|
readConfigFile: () => readConfigFile,
|
|
52852
54395
|
rename: () => rename,
|
|
54396
|
+
resetCustomInstallCommandSet: () => resetCustomInstallCommandSet,
|
|
52853
54397
|
runBundleInstall: () => runBundleInstall,
|
|
52854
54398
|
runCustomInstallCommand: () => runCustomInstallCommand,
|
|
52855
54399
|
runNpmInstall: () => runNpmInstall,
|
|
52856
54400
|
runPackageJsonScript: () => runPackageJsonScript,
|
|
52857
54401
|
runPipInstall: () => runPipInstall,
|
|
52858
54402
|
runShellScript: () => runShellScript,
|
|
54403
|
+
runStdlibPyScript: () => runStdlibPyScript,
|
|
52859
54404
|
scanParentDirs: () => scanParentDirs,
|
|
52860
54405
|
shouldServe: () => shouldServe,
|
|
52861
54406
|
shouldUseExperimentalBackends: () => shouldUseExperimentalBackends,
|
|
@@ -53161,7 +54706,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53161
54706
|
}
|
|
53162
54707
|
return n;
|
|
53163
54708
|
};
|
|
53164
|
-
function debug(message, ...additional) {
|
|
54709
|
+
function debug$1(message, ...additional) {
|
|
53165
54710
|
if (getPlatformEnv("BUILDER_DEBUG")) console.log(message, ...additional);
|
|
53166
54711
|
else if (process.env.VERCEL_DEBUG_PREFIX) console.log(`${process.env.VERCEL_DEBUG_PREFIX}${message}`, ...additional);
|
|
53167
54712
|
}
|
|
@@ -53266,7 +54811,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53266
54811
|
async function download(files, basePath, meta) {
|
|
53267
54812
|
const { isDev = false, skipDownload = false, filesChanged = null, filesRemoved = null } = meta || {};
|
|
53268
54813
|
if (isDev || skipDownload) return files;
|
|
53269
|
-
debug("Downloading deployment source files...");
|
|
54814
|
+
debug$1("Downloading deployment source files...");
|
|
53270
54815
|
const start = Date.now();
|
|
53271
54816
|
const files2 = {};
|
|
53272
54817
|
const filenames = Object.keys(files);
|
|
@@ -53289,7 +54834,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53289
54834
|
files2[name] = await downloadFile(file, import_path2.default.join(basePath, name));
|
|
53290
54835
|
}));
|
|
53291
54836
|
const duration = Date.now() - start;
|
|
53292
|
-
debug(`Downloaded ${filenames.length} source files: ${duration}ms`);
|
|
54837
|
+
debug$1(`Downloaded ${filenames.length} source files: ${duration}ms`);
|
|
53293
54838
|
return files2;
|
|
53294
54839
|
}
|
|
53295
54840
|
function getDefaultLambdaArchitecture(architecture) {
|
|
@@ -53594,7 +55139,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53594
55139
|
}
|
|
53595
55140
|
var import_assert6 = __toESM(__require("assert"));
|
|
53596
55141
|
var import_fs_extra7 = __toESM(require_lib());
|
|
53597
|
-
var
|
|
55142
|
+
var import_path6 = __toESM(__require("path"));
|
|
53598
55143
|
var import_async_sema4 = __toESM(require_async_sema());
|
|
53599
55144
|
var import_cross_spawn = __toESM(require_cross_spawn());
|
|
53600
55145
|
var import_semver2 = __toESM(require_semver2());
|
|
@@ -53714,17 +55259,17 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53714
55259
|
return (0, import_semver.intersects)(o.range, engineRange) && (availableVersions?.length ? availableVersions.includes(o.major) : true);
|
|
53715
55260
|
}))) throw new NowBuildError({
|
|
53716
55261
|
code: "BUILD_UTILS_NODE_VERSION_INVALID",
|
|
53717
|
-
link: "
|
|
55262
|
+
link: "https://vercel.link/node-version",
|
|
53718
55263
|
message: `Found invalid Node.js Version: "${engineRange}". ${getHint(isAuto, availableVersions)}`
|
|
53719
55264
|
});
|
|
53720
55265
|
}
|
|
53721
55266
|
if (!selection) selection = getLatestNodeVersion(availableVersions);
|
|
53722
55267
|
if (selection.state === "discontinued") throw new NowBuildError({
|
|
53723
55268
|
code: "BUILD_UTILS_NODE_VERSION_DISCONTINUED",
|
|
53724
|
-
link: "
|
|
55269
|
+
link: "https://vercel.link/node-version",
|
|
53725
55270
|
message: `${`Node.js Version "${selection.range}" is discontinued and must be upgraded.`} ${getHint(isAuto)}`
|
|
53726
55271
|
});
|
|
53727
|
-
debug(`Selected Node.js ${selection.range}`);
|
|
55272
|
+
debug$1(`Selected Node.js ${selection.range}`);
|
|
53728
55273
|
if (selection.state === "deprecated") {
|
|
53729
55274
|
const d = selection.formattedDate;
|
|
53730
55275
|
if (d) console.warn(`Error: Node.js version ${selection.range} is deprecated. Deployments created on or after ${d} will fail to build. ${getHint(isAuto)}`);
|
|
@@ -53755,6 +55300,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53755
55300
|
var import_toml = __toESM(require_toml());
|
|
53756
55301
|
var import_fs_extra6 = __toESM(require_lib());
|
|
53757
55302
|
var import_error_utils = __toESM(require_dist());
|
|
55303
|
+
var import_path5 = __require("path");
|
|
53758
55304
|
async function readFileOrNull(file) {
|
|
53759
55305
|
try {
|
|
53760
55306
|
return await (0, import_fs_extra6.readFile)(file);
|
|
@@ -53781,6 +55327,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53781
55327
|
}
|
|
53782
55328
|
return null;
|
|
53783
55329
|
}
|
|
55330
|
+
async function getPackageJson(dir) {
|
|
55331
|
+
const packagePath = (0, import_path5.join)(dir, "package.json");
|
|
55332
|
+
try {
|
|
55333
|
+
return JSON.parse(await (0, import_fs_extra6.readFile)(packagePath, "utf8"));
|
|
55334
|
+
} catch (err) {
|
|
55335
|
+
return {};
|
|
55336
|
+
}
|
|
55337
|
+
}
|
|
53784
55338
|
var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
|
|
53785
55339
|
function cloneEnv(...envs) {
|
|
53786
55340
|
return envs.reduce((obj, env) => {
|
|
@@ -53838,12 +55392,12 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53838
55392
|
return true;
|
|
53839
55393
|
}
|
|
53840
55394
|
function* traverseUpDirectories({ start, base }) {
|
|
53841
|
-
let current =
|
|
53842
|
-
const normalizedRoot = base ?
|
|
55395
|
+
let current = import_path6.default.normalize(start);
|
|
55396
|
+
const normalizedRoot = base ? import_path6.default.normalize(base) : void 0;
|
|
53843
55397
|
while (current) {
|
|
53844
55398
|
yield current;
|
|
53845
55399
|
if (current === normalizedRoot) break;
|
|
53846
|
-
const next =
|
|
55400
|
+
const next = import_path6.default.join(current, "..");
|
|
53847
55401
|
current = next === current ? void 0 : next;
|
|
53848
55402
|
}
|
|
53849
55403
|
}
|
|
@@ -53853,24 +55407,24 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53853
55407
|
start,
|
|
53854
55408
|
base
|
|
53855
55409
|
})) {
|
|
53856
|
-
const packageJsonPath =
|
|
55410
|
+
const packageJsonPath = import_path6.default.join(dir, "package.json");
|
|
53857
55411
|
if (await import_fs_extra7.default.pathExists(packageJsonPath)) curRootPackageJsonPath = packageJsonPath;
|
|
53858
55412
|
}
|
|
53859
55413
|
return curRootPackageJsonPath ? {
|
|
53860
55414
|
packageJson: await import_fs_extra7.default.readJson(curRootPackageJsonPath),
|
|
53861
|
-
rootDir:
|
|
55415
|
+
rootDir: import_path6.default.dirname(curRootPackageJsonPath)
|
|
53862
55416
|
} : void 0;
|
|
53863
55417
|
}
|
|
53864
55418
|
async function getNodeBinPath({ cwd }) {
|
|
53865
55419
|
const { lockfilePath } = await scanParentDirs(cwd);
|
|
53866
|
-
const dir =
|
|
53867
|
-
return
|
|
55420
|
+
const dir = import_path6.default.dirname(lockfilePath || cwd);
|
|
55421
|
+
return import_path6.default.join(dir, "node_modules", ".bin");
|
|
53868
55422
|
}
|
|
53869
55423
|
function getNodeBinPaths({ start, base }) {
|
|
53870
55424
|
return Array.from(traverseUpDirectories({
|
|
53871
55425
|
start,
|
|
53872
55426
|
base
|
|
53873
|
-
})).map((dir) =>
|
|
55427
|
+
})).map((dir) => import_path6.default.join(dir, "node_modules/.bin"));
|
|
53874
55428
|
}
|
|
53875
55429
|
async function chmodPlusX(fsPath) {
|
|
53876
55430
|
const s = await import_fs_extra7.default.stat(fsPath);
|
|
@@ -53880,10 +55434,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53880
55434
|
await import_fs_extra7.default.chmod(fsPath, base8);
|
|
53881
55435
|
}
|
|
53882
55436
|
async function runShellScript(fsPath, args = [], spawnOpts) {
|
|
53883
|
-
(0, import_assert6.default)(
|
|
53884
|
-
const destPath =
|
|
55437
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(fsPath));
|
|
55438
|
+
const destPath = import_path6.default.dirname(fsPath);
|
|
53885
55439
|
await chmodPlusX(fsPath);
|
|
53886
|
-
const command = `./${
|
|
55440
|
+
const command = `./${import_path6.default.basename(fsPath)}`;
|
|
53887
55441
|
await spawnAsync(command, args, {
|
|
53888
55442
|
...spawnOpts,
|
|
53889
55443
|
cwd: destPath,
|
|
@@ -53896,7 +55450,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53896
55450
|
if (isBunVersion(nodeVersion)) return opts;
|
|
53897
55451
|
if (!meta.isDev) {
|
|
53898
55452
|
let found = false;
|
|
53899
|
-
const pathSegments = (opts.env.PATH || process.env.PATH || "").split(
|
|
55453
|
+
const pathSegments = (opts.env.PATH || process.env.PATH || "").split(import_path6.default.delimiter).map((segment) => {
|
|
53900
55454
|
if (/^\/node[0-9]+\/bin/.test(segment)) {
|
|
53901
55455
|
found = true;
|
|
53902
55456
|
return `/node${nodeVersion.major}/bin`;
|
|
@@ -53904,11 +55458,11 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53904
55458
|
return segment;
|
|
53905
55459
|
});
|
|
53906
55460
|
if (!found) pathSegments.unshift(`/node${nodeVersion.major}/bin`);
|
|
53907
|
-
opts.env.PATH = pathSegments.filter(Boolean).join(
|
|
55461
|
+
opts.env.PATH = pathSegments.filter(Boolean).join(import_path6.default.delimiter);
|
|
53908
55462
|
}
|
|
53909
55463
|
return opts;
|
|
53910
55464
|
}
|
|
53911
|
-
async function
|
|
55465
|
+
async function getRuntimeNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = getAvailableNodeVersions()) {
|
|
53912
55466
|
if (config.bunVersion) return getSupportedBunVersion(config.bunVersion);
|
|
53913
55467
|
const latestVersion = getLatestNodeVersion(availableVersions);
|
|
53914
55468
|
if (meta.isDev) {
|
|
@@ -53921,14 +55475,14 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
53921
55475
|
const supportedNodeVersion = await getSupportedNodeVersion(packageJsonVersion || configuredVersion, !packageJsonVersion, availableVersions);
|
|
53922
55476
|
if (packageJson?.engines?.node) {
|
|
53923
55477
|
const { node } = packageJson.engines;
|
|
53924
|
-
if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More:
|
|
53925
|
-
if ((0, import_semver2.coerce)(node)?.raw === node) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More:
|
|
53926
|
-
else if ((0, import_semver2.validRange)(node) && (0, import_semver2.intersects)(`${latestVersion.major + 1}.x`, node)) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More:
|
|
55478
|
+
if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: https://vercel.link/node-version`);
|
|
55479
|
+
if ((0, import_semver2.coerce)(node)?.raw === node) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: https://vercel.link/node-version`);
|
|
55480
|
+
else if ((0, import_semver2.validRange)(node) && (0, import_semver2.intersects)(`${latestVersion.major + 1}.x`, node)) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: https://vercel.link/node-version`);
|
|
53927
55481
|
}
|
|
53928
55482
|
return supportedNodeVersion;
|
|
53929
55483
|
}
|
|
53930
55484
|
async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
|
|
53931
|
-
(0, import_assert6.default)(
|
|
55485
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
53932
55486
|
const pkgJsonPath = await walkParentDirs({
|
|
53933
55487
|
base,
|
|
53934
55488
|
start: destPath,
|
|
@@ -54014,8 +55568,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54014
55568
|
}
|
|
54015
55569
|
async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
|
|
54016
55570
|
if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) return true;
|
|
54017
|
-
const turboJsonPath =
|
|
54018
|
-
const turboJsoncPath =
|
|
55571
|
+
const turboJsonPath = import_path6.default.join(rootDir, "turbo.json");
|
|
55572
|
+
const turboJsoncPath = import_path6.default.join(rootDir, "turbo.jsonc");
|
|
54019
55573
|
const [turboJsonExists, turboJsoncExists] = await Promise.all([import_fs_extra7.default.pathExists(turboJsonPath), import_fs_extra7.default.pathExists(turboJsoncPath)]);
|
|
54020
55574
|
let turboJson = null;
|
|
54021
55575
|
let turboConfigPath = null;
|
|
@@ -54024,7 +55578,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54024
55578
|
if (turboConfigPath) try {
|
|
54025
55579
|
turboJson = import_json5.default.parse(await import_fs_extra7.default.readFile(turboConfigPath, "utf8"));
|
|
54026
55580
|
} catch (err) {
|
|
54027
|
-
console.warn(`WARNING: Failed to parse ${
|
|
55581
|
+
console.warn(`WARNING: Failed to parse ${import_path6.default.basename(turboConfigPath)}`);
|
|
54028
55582
|
}
|
|
54029
55583
|
return turboJson !== null && typeof turboJson === "object" && "globalPassThroughEnv" in turboJson && Array.isArray(turboJson.globalPassThroughEnv) && turboJson.globalPassThroughEnv.includes("COREPACK_HOME");
|
|
54030
55584
|
}
|
|
@@ -54058,13 +55612,13 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54058
55612
|
return true;
|
|
54059
55613
|
}
|
|
54060
55614
|
async function walkParentDirs({ base, start, filename }) {
|
|
54061
|
-
(0, import_assert6.default)(
|
|
54062
|
-
(0, import_assert6.default)(
|
|
55615
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(base), "Expected \"base\" to be absolute path");
|
|
55616
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(start), "Expected \"start\" to be absolute path");
|
|
54063
55617
|
for (const dir of traverseUpDirectories({
|
|
54064
55618
|
start,
|
|
54065
55619
|
base
|
|
54066
55620
|
})) {
|
|
54067
|
-
const fullPath =
|
|
55621
|
+
const fullPath = import_path6.default.join(dir, filename);
|
|
54068
55622
|
if (await import_fs_extra7.default.pathExists(fullPath)) return fullPath;
|
|
54069
55623
|
}
|
|
54070
55624
|
return null;
|
|
@@ -54075,10 +55629,10 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54075
55629
|
start,
|
|
54076
55630
|
base
|
|
54077
55631
|
})) {
|
|
54078
|
-
const fullPaths = filenames.map((f) =>
|
|
55632
|
+
const fullPaths = filenames.map((f) => import_path6.default.join(dir, f));
|
|
54079
55633
|
const existResults = await Promise.all(fullPaths.map((f) => import_fs_extra7.default.pathExists(f)));
|
|
54080
55634
|
const foundOneOrMore = existResults.some((b) => b);
|
|
54081
|
-
const packageJsonPath =
|
|
55635
|
+
const packageJsonPath = import_path6.default.join(dir, "package.json");
|
|
54082
55636
|
const packageJson = await import_fs_extra7.default.readJSON(packageJsonPath).catch(() => null);
|
|
54083
55637
|
if (packageJson?.packageManager) packageManager = packageJson.packageManager;
|
|
54084
55638
|
if (foundOneOrMore) return {
|
|
@@ -54138,23 +55692,33 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54138
55692
|
};
|
|
54139
55693
|
}
|
|
54140
55694
|
var runNpmInstallSema = new import_async_sema4.default(1);
|
|
55695
|
+
var customInstallCommandSet;
|
|
55696
|
+
function resetCustomInstallCommandSet() {
|
|
55697
|
+
customInstallCommandSet = void 0;
|
|
55698
|
+
}
|
|
54141
55699
|
async function runNpmInstall(destPath, args = [], spawnOpts, meta, projectCreatedAt) {
|
|
54142
55700
|
if (meta?.isDev) {
|
|
54143
|
-
debug("Skipping dependency installation because dev mode is enabled");
|
|
55701
|
+
debug$1("Skipping dependency installation because dev mode is enabled");
|
|
54144
55702
|
return false;
|
|
54145
55703
|
}
|
|
54146
|
-
(0, import_assert6.default)(
|
|
55704
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
54147
55705
|
try {
|
|
54148
55706
|
await runNpmInstallSema.acquire();
|
|
54149
55707
|
const { cliType, packageJsonPath, packageJson, lockfileVersion, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
|
|
54150
55708
|
if (!packageJsonPath) {
|
|
54151
|
-
debug(`Skipping dependency installation because no package.json was found for ${destPath}`);
|
|
55709
|
+
debug$1(`Skipping dependency installation because no package.json was found for ${destPath}`);
|
|
54152
55710
|
return false;
|
|
54153
55711
|
}
|
|
54154
55712
|
const defaultInstall = args.length === 0;
|
|
54155
55713
|
if (meta && packageJsonPath && defaultInstall) {
|
|
54156
55714
|
const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(meta.runNpmInstallSet, packageJsonPath);
|
|
54157
55715
|
if (alreadyInstalled) return false;
|
|
55716
|
+
if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
|
|
55717
|
+
debug$1(`Skipping dependency installation for ${packageJsonPath} because VERCEL_INSTALL_COMPLETED is set`);
|
|
55718
|
+
runNpmInstallSet.add(packageJsonPath);
|
|
55719
|
+
meta.runNpmInstallSet = runNpmInstallSet;
|
|
55720
|
+
return false;
|
|
55721
|
+
}
|
|
54158
55722
|
meta.runNpmInstallSet = runNpmInstallSet;
|
|
54159
55723
|
}
|
|
54160
55724
|
if (cliType === "yarn") {
|
|
@@ -54168,7 +55732,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54168
55732
|
}
|
|
54169
55733
|
const installTime = Date.now();
|
|
54170
55734
|
console.log("Installing dependencies...");
|
|
54171
|
-
debug(`Installing to ${destPath}`);
|
|
55735
|
+
debug$1(`Installing to ${destPath}`);
|
|
54172
55736
|
const opts = {
|
|
54173
55737
|
cwd: destPath,
|
|
54174
55738
|
...spawnOpts
|
|
@@ -54190,7 +55754,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54190
55754
|
args,
|
|
54191
55755
|
opts
|
|
54192
55756
|
});
|
|
54193
|
-
debug(`Install complete [${Date.now() - installTime}ms]`);
|
|
55757
|
+
debug$1(`Install complete [${Date.now() - installTime}ms]`);
|
|
54194
55758
|
return true;
|
|
54195
55759
|
} finally {
|
|
54196
55760
|
runNpmInstallSema.release();
|
|
@@ -54206,15 +55770,15 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
|
|
|
54206
55770
|
packageJsonEngines,
|
|
54207
55771
|
projectCreatedAt
|
|
54208
55772
|
});
|
|
54209
|
-
if (corepackEnabled) debug(`Detected corepack use for "${packageJsonPackageManager}". Not overriding package manager version.`);
|
|
54210
|
-
else debug(`Detected ${detectedPackageManager}. Added "${newPath}" to path. Based on assumed package manager "${cliType}", lockfile "${detectedLockfile}", and lockfileVersion "${lockfileVersion}"`);
|
|
55773
|
+
if (corepackEnabled) debug$1(`Detected corepack use for "${packageJsonPackageManager}". Not overriding package manager version.`);
|
|
55774
|
+
else debug$1(`Detected ${detectedPackageManager}. Added "${newPath}" to path. Based on assumed package manager "${cliType}", lockfile "${detectedLockfile}", and lockfileVersion "${lockfileVersion}"`);
|
|
54211
55775
|
const newEnv = { ...env };
|
|
54212
55776
|
const alreadyInPath = (newPath2) => {
|
|
54213
|
-
return (env.PATH ?? "").split(
|
|
55777
|
+
return (env.PATH ?? "").split(import_path6.default.delimiter).includes(newPath2);
|
|
54214
55778
|
};
|
|
54215
55779
|
if (newPath && !alreadyInPath(newPath)) {
|
|
54216
55780
|
const oldPath = env.PATH + "";
|
|
54217
|
-
newEnv.PATH = `${newPath}${
|
|
55781
|
+
newEnv.PATH = `${newPath}${import_path6.default.delimiter}${oldPath}`;
|
|
54218
55782
|
if (detectedLockfile && detectedPackageManager) {
|
|
54219
55783
|
const detectedV9PnpmLockfile = detectedLockfile === "pnpm-lock.yaml" && lockfileVersion === 9;
|
|
54220
55784
|
if (detectedPackageManager === "pnpm@10.x" && packageJsonPackageManager) {
|
|
@@ -54381,7 +55945,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54381
55945
|
});
|
|
54382
55946
|
if (corepackEnabled) overrides = NO_OVERRIDE;
|
|
54383
55947
|
const alreadyInPath = (newPath) => {
|
|
54384
|
-
return (env.PATH ?? "").split(
|
|
55948
|
+
return (env.PATH ?? "").split(import_path6.default.delimiter).includes(newPath);
|
|
54385
55949
|
};
|
|
54386
55950
|
switch (true) {
|
|
54387
55951
|
case cliType === "yarn" && !env.YARN_NODE_LINKER: return {
|
|
@@ -54401,6 +55965,17 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54401
55965
|
}
|
|
54402
55966
|
}
|
|
54403
55967
|
async function runCustomInstallCommand({ destPath, installCommand, spawnOpts, projectCreatedAt }) {
|
|
55968
|
+
const normalizedPath = import_path6.default.normalize(destPath);
|
|
55969
|
+
const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(customInstallCommandSet, normalizedPath);
|
|
55970
|
+
customInstallCommandSet = runNpmInstallSet;
|
|
55971
|
+
if (alreadyInstalled) {
|
|
55972
|
+
debug$1(`Skipping custom install command for ${normalizedPath} because it was already run`);
|
|
55973
|
+
return false;
|
|
55974
|
+
}
|
|
55975
|
+
if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
|
|
55976
|
+
debug$1(`Skipping custom install command for ${normalizedPath} because VERCEL_INSTALL_COMPLETED is set`);
|
|
55977
|
+
return false;
|
|
55978
|
+
}
|
|
54404
55979
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
54405
55980
|
const { cliType, lockfileVersion, packageJson, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
|
|
54406
55981
|
const env = getEnvForPackageManager({
|
|
@@ -54412,19 +55987,20 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54412
55987
|
turboSupportsCorepackHome,
|
|
54413
55988
|
projectCreatedAt
|
|
54414
55989
|
});
|
|
54415
|
-
debug(`Running with $PATH:`, env?.PATH || "");
|
|
55990
|
+
debug$1(`Running with $PATH:`, env?.PATH || "");
|
|
54416
55991
|
await execCommand(installCommand, {
|
|
54417
55992
|
...spawnOpts,
|
|
54418
55993
|
env,
|
|
54419
55994
|
cwd: destPath
|
|
54420
55995
|
});
|
|
55996
|
+
return true;
|
|
54421
55997
|
}
|
|
54422
55998
|
async function runPackageJsonScript(destPath, scriptNames, spawnOpts, projectCreatedAt) {
|
|
54423
|
-
(0, import_assert6.default)(
|
|
55999
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
54424
56000
|
const { packageJson, cliType, lockfileVersion, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
|
|
54425
56001
|
const scriptName = getScriptName(packageJson, typeof scriptNames === "string" ? [scriptNames] : scriptNames);
|
|
54426
56002
|
if (!scriptName) return false;
|
|
54427
|
-
debug("Running user script...");
|
|
56003
|
+
debug$1("Running user script...");
|
|
54428
56004
|
const runScriptTime = Date.now();
|
|
54429
56005
|
const opts = {
|
|
54430
56006
|
cwd: destPath,
|
|
@@ -54446,15 +56022,15 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54446
56022
|
else opts.prettyCommand = `yarn run ${scriptName}`;
|
|
54447
56023
|
console.log(`Running "${opts.prettyCommand}"`);
|
|
54448
56024
|
await spawnAsync(cliType, ["run", scriptName], opts);
|
|
54449
|
-
debug(`Script complete [${Date.now() - runScriptTime}ms]`);
|
|
56025
|
+
debug$1(`Script complete [${Date.now() - runScriptTime}ms]`);
|
|
54450
56026
|
return true;
|
|
54451
56027
|
}
|
|
54452
56028
|
async function runBundleInstall(destPath, args = [], spawnOpts, meta) {
|
|
54453
56029
|
if (meta && meta.isDev) {
|
|
54454
|
-
debug("Skipping dependency installation because dev mode is enabled");
|
|
56030
|
+
debug$1("Skipping dependency installation because dev mode is enabled");
|
|
54455
56031
|
return;
|
|
54456
56032
|
}
|
|
54457
|
-
(0, import_assert6.default)(
|
|
56033
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
54458
56034
|
const opts = {
|
|
54459
56035
|
...spawnOpts,
|
|
54460
56036
|
cwd: destPath,
|
|
@@ -54464,10 +56040,10 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54464
56040
|
}
|
|
54465
56041
|
async function runPipInstall(destPath, args = [], spawnOpts, meta) {
|
|
54466
56042
|
if (meta && meta.isDev) {
|
|
54467
|
-
debug("Skipping dependency installation because dev mode is enabled");
|
|
56043
|
+
debug$1("Skipping dependency installation because dev mode is enabled");
|
|
54468
56044
|
return;
|
|
54469
56045
|
}
|
|
54470
|
-
(0, import_assert6.default)(
|
|
56046
|
+
(0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
|
|
54471
56047
|
const opts = {
|
|
54472
56048
|
...spawnOpts,
|
|
54473
56049
|
cwd: destPath,
|
|
@@ -54485,7 +56061,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54485
56061
|
}
|
|
54486
56062
|
}
|
|
54487
56063
|
var installDependencies = (0, import_util2.deprecate)(runNpmInstall, "installDependencies() is deprecated. Please use runNpmInstall() instead.");
|
|
54488
|
-
var
|
|
56064
|
+
var import_path7 = __toESM(__require("path"));
|
|
54489
56065
|
var import_fs_extra8 = __toESM(require_lib());
|
|
54490
56066
|
var import_ignore = __toESM(require_ignore());
|
|
54491
56067
|
function isCodedError(error) {
|
|
@@ -54503,8 +56079,8 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54503
56079
|
throw error;
|
|
54504
56080
|
}
|
|
54505
56081
|
};
|
|
54506
|
-
const vercelIgnorePath =
|
|
54507
|
-
const nowIgnorePath =
|
|
56082
|
+
const vercelIgnorePath = import_path7.default.join(downloadPath, rootDirectory || "", ".vercelignore");
|
|
56083
|
+
const nowIgnorePath = import_path7.default.join(downloadPath, rootDirectory || "", ".nowignore");
|
|
54508
56084
|
const ignoreContents = [];
|
|
54509
56085
|
try {
|
|
54510
56086
|
ignoreContents.push(...(await Promise.all([readFile4(vercelIgnorePath), readFile4(nowIgnorePath)])).filter(Boolean));
|
|
@@ -54542,18 +56118,18 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54542
56118
|
}
|
|
54543
56119
|
return newEnvs;
|
|
54544
56120
|
}
|
|
54545
|
-
var
|
|
56121
|
+
var import_path8 = __toESM(__require("path"));
|
|
54546
56122
|
var import_fs2 = __require("fs");
|
|
54547
56123
|
async function hardLinkDir(src, destDirs) {
|
|
54548
56124
|
if (destDirs.length === 0) return;
|
|
54549
|
-
destDirs = destDirs.filter((destDir) =>
|
|
56125
|
+
destDirs = destDirs.filter((destDir) => import_path8.default.relative(destDir, src) !== "");
|
|
54550
56126
|
const files = await import_fs2.promises.readdir(src);
|
|
54551
56127
|
await Promise.all(files.map(async (file) => {
|
|
54552
56128
|
if (file === "node_modules") return;
|
|
54553
|
-
const srcFile =
|
|
56129
|
+
const srcFile = import_path8.default.join(src, file);
|
|
54554
56130
|
if ((await import_fs2.promises.lstat(srcFile)).isDirectory()) {
|
|
54555
56131
|
await hardLinkDir(srcFile, await Promise.all(destDirs.map(async (destDir) => {
|
|
54556
|
-
const destSubdir =
|
|
56132
|
+
const destSubdir = import_path8.default.join(destDir, file);
|
|
54557
56133
|
try {
|
|
54558
56134
|
await import_fs2.promises.mkdir(destSubdir, { recursive: true });
|
|
54559
56135
|
} catch (err) {
|
|
@@ -54564,7 +56140,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54564
56140
|
return;
|
|
54565
56141
|
}
|
|
54566
56142
|
await Promise.all(destDirs.map(async (destDir) => {
|
|
54567
|
-
const destFile =
|
|
56143
|
+
const destFile = import_path8.default.join(destDir, file);
|
|
54568
56144
|
try {
|
|
54569
56145
|
await linkOrCopyFile(srcFile, destFile);
|
|
54570
56146
|
} catch (err) {
|
|
@@ -54579,7 +56155,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54579
56155
|
await linkOrCopy(srcFile, destFile);
|
|
54580
56156
|
} catch (err) {
|
|
54581
56157
|
if (err.code === "ENOENT") {
|
|
54582
|
-
await import_fs2.promises.mkdir(
|
|
56158
|
+
await import_fs2.promises.mkdir(import_path8.default.dirname(destFile), { recursive: true });
|
|
54583
56159
|
await linkOrCopy(srcFile, destFile);
|
|
54584
56160
|
return;
|
|
54585
56161
|
}
|
|
@@ -54594,10 +56170,10 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54594
56170
|
await import_fs2.promises.copyFile(srcFile, destFile);
|
|
54595
56171
|
}
|
|
54596
56172
|
}
|
|
54597
|
-
var
|
|
56173
|
+
var import_path9 = __require("path");
|
|
54598
56174
|
var import_promises = __require("fs/promises");
|
|
54599
56175
|
async function validateNpmrc(cwd) {
|
|
54600
|
-
if ((await (0, import_promises.readFile)((0,
|
|
56176
|
+
if ((await (0, import_promises.readFile)((0, import_path9.join)(cwd, ".npmrc"), "utf-8").catch((err) => {
|
|
54601
56177
|
if (err.code !== "ENOENT") throw err;
|
|
54602
56178
|
}))?.match(/(?<!#.*)use-node-version/)) throw new Error("Detected unsupported \"use-node-version\" in your \".npmrc\". Please use \"engines\" in your \"package.json\" instead.");
|
|
54603
56179
|
}
|
|
@@ -54638,12 +56214,12 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54638
56214
|
if (!os) return "provided.al2023";
|
|
54639
56215
|
return os.PRETTY_NAME === "Amazon Linux 2" ? "provided.al2" : "provided.al2023";
|
|
54640
56216
|
}
|
|
54641
|
-
var
|
|
56217
|
+
var import_path10 = __require("path");
|
|
54642
56218
|
var shouldServe = ({ entrypoint, files, requestPath }) => {
|
|
54643
56219
|
requestPath = requestPath.replace(/\/$/, "");
|
|
54644
56220
|
entrypoint = entrypoint.replace(/\\/, "/");
|
|
54645
56221
|
if (entrypoint === requestPath && hasProp(files, entrypoint)) return true;
|
|
54646
|
-
const { dir, name } = (0,
|
|
56222
|
+
const { dir, name } = (0, import_path10.parse)(entrypoint);
|
|
54647
56223
|
if (name === "index" && dir === requestPath && hasProp(files, entrypoint)) return true;
|
|
54648
56224
|
return false;
|
|
54649
56225
|
};
|
|
@@ -54809,7 +56385,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
|
|
|
54809
56385
|
const resolved = __require.resolve(`${packageName}/package.json`, { paths: path7 ? Array.isArray(path7) ? path7 : [path7] : [process.cwd()] });
|
|
54810
56386
|
return __require(resolved).version;
|
|
54811
56387
|
} catch (err) {
|
|
54812
|
-
debug(`Could not resolve package "${packageName}". Package is not installed.`, err);
|
|
56388
|
+
debug$1(`Could not resolve package "${packageName}". Package is not installed.`, err);
|
|
54813
56389
|
return;
|
|
54814
56390
|
}
|
|
54815
56391
|
}
|
|
@@ -54924,6 +56500,7 @@ ${entrypointsForMessage}`);
|
|
|
54924
56500
|
"express",
|
|
54925
56501
|
"hono",
|
|
54926
56502
|
"h3",
|
|
56503
|
+
"koa",
|
|
54927
56504
|
"nestjs",
|
|
54928
56505
|
"fastify",
|
|
54929
56506
|
"elysia"
|
|
@@ -54932,6 +56509,7 @@ ${entrypointsForMessage}`);
|
|
|
54932
56509
|
"@vercel/express",
|
|
54933
56510
|
"@vercel/hono",
|
|
54934
56511
|
"@vercel/h3",
|
|
56512
|
+
"@vercel/koa",
|
|
54935
56513
|
"@vercel/nestjs",
|
|
54936
56514
|
"@vercel/fastify",
|
|
54937
56515
|
"@vercel/elysia"
|
|
@@ -54954,6 +56532,47 @@ ${entrypointsForMessage}`);
|
|
|
54954
56532
|
function shouldUseExperimentalBackends(framework) {
|
|
54955
56533
|
return isExperimentalBackendsEnabled() && isBackendFramework(framework);
|
|
54956
56534
|
}
|
|
56535
|
+
var import_fs3 = __toESM(__require("fs"));
|
|
56536
|
+
var import_path11 = __require("path");
|
|
56537
|
+
var import_execa = __toESM(require_execa());
|
|
56538
|
+
var isWin2 = process.platform === "win32";
|
|
56539
|
+
async function runStdlibPyScript(options) {
|
|
56540
|
+
const { scriptName, pythonPath, args = [], cwd } = options;
|
|
56541
|
+
const scriptPath = (0, import_path11.join)(__dirname, "..", "lib", "python", `${scriptName}.py`);
|
|
56542
|
+
if (!import_fs3.default.existsSync(scriptPath)) throw new Error(`Python script not found: ${scriptPath}`);
|
|
56543
|
+
const pythonCmd = pythonPath ?? (isWin2 ? "python" : "python3");
|
|
56544
|
+
debug$1(`Running stdlib Python script: ${pythonCmd} ${scriptPath} ${args.join(" ")}`);
|
|
56545
|
+
try {
|
|
56546
|
+
const result = await (0, import_execa.default)(pythonCmd, [scriptPath, ...args], { cwd });
|
|
56547
|
+
return {
|
|
56548
|
+
exitCode: 0,
|
|
56549
|
+
stdout: result.stdout,
|
|
56550
|
+
stderr: result.stderr
|
|
56551
|
+
};
|
|
56552
|
+
} catch (err) {
|
|
56553
|
+
const execaErr = err;
|
|
56554
|
+
return {
|
|
56555
|
+
exitCode: execaErr.exitCode ?? 1,
|
|
56556
|
+
stdout: execaErr.stdout ?? "",
|
|
56557
|
+
stderr: execaErr.stderr ?? ""
|
|
56558
|
+
};
|
|
56559
|
+
}
|
|
56560
|
+
}
|
|
56561
|
+
async function isPythonEntrypoint(file) {
|
|
56562
|
+
try {
|
|
56563
|
+
const fsPath = file.fsPath;
|
|
56564
|
+
if (!fsPath) return false;
|
|
56565
|
+
const content = await import_fs3.default.promises.readFile(fsPath, "utf-8");
|
|
56566
|
+
if (!content.includes("app") && !content.includes("handler") && !content.includes("Handler")) return false;
|
|
56567
|
+
return (await runStdlibPyScript({
|
|
56568
|
+
scriptName: "ast_parser",
|
|
56569
|
+
args: [fsPath]
|
|
56570
|
+
})).exitCode === 0;
|
|
56571
|
+
} catch (err) {
|
|
56572
|
+
debug$1(`Failed to check Python entrypoint: ${err}`);
|
|
56573
|
+
return false;
|
|
56574
|
+
}
|
|
56575
|
+
}
|
|
54957
56576
|
}) });
|
|
54958
56577
|
|
|
54959
56578
|
//#endregion
|
|
@@ -54983,6 +56602,7 @@ const introspectApp = async (args) => {
|
|
|
54983
56602
|
let introspectionData;
|
|
54984
56603
|
await new Promise((resolvePromise) => {
|
|
54985
56604
|
try {
|
|
56605
|
+
(0, import_dist.debug)("Spawning introspection process");
|
|
54986
56606
|
const child = spawn("node", [
|
|
54987
56607
|
"-r",
|
|
54988
56608
|
cjsLoaderPath,
|
|
@@ -55004,26 +56624,33 @@ const introspectApp = async (args) => {
|
|
|
55004
56624
|
child.stdout?.on("data", (data) => {
|
|
55005
56625
|
try {
|
|
55006
56626
|
introspectionData = introspectionSchema.parse(JSON.parse(data.toString() || "{}"));
|
|
55007
|
-
|
|
56627
|
+
(0, import_dist.debug)(`Introspection data parsed successfully`);
|
|
56628
|
+
} catch (error) {
|
|
56629
|
+
(0, import_dist.debug)("Error parsing introspection data", error);
|
|
56630
|
+
}
|
|
55008
56631
|
});
|
|
55009
56632
|
const timeout = setTimeout(() => {
|
|
56633
|
+
(0, import_dist.debug)("Introspection timeout, killing process with SIGTERM");
|
|
55010
56634
|
child.kill("SIGTERM");
|
|
55011
|
-
},
|
|
56635
|
+
}, 8e3);
|
|
55012
56636
|
const timeout2 = setTimeout(() => {
|
|
56637
|
+
(0, import_dist.debug)("Introspection timeout, killing process with SIGKILL");
|
|
55013
56638
|
child.kill("SIGKILL");
|
|
55014
|
-
},
|
|
56639
|
+
}, 9e3);
|
|
55015
56640
|
child.on("error", (err) => {
|
|
55016
56641
|
clearTimeout(timeout);
|
|
55017
56642
|
clearTimeout(timeout2);
|
|
55018
|
-
|
|
56643
|
+
(0, import_dist.debug)(`Loader error: ${err.message}`);
|
|
55019
56644
|
resolvePromise(void 0);
|
|
55020
56645
|
});
|
|
55021
56646
|
child.on("close", () => {
|
|
55022
56647
|
clearTimeout(timeout);
|
|
55023
56648
|
clearTimeout(timeout2);
|
|
56649
|
+
(0, import_dist.debug)("Introspection process closed");
|
|
55024
56650
|
resolvePromise(void 0);
|
|
55025
56651
|
});
|
|
55026
56652
|
} catch (error) {
|
|
56653
|
+
(0, import_dist.debug)("Introspection error", error);
|
|
55027
56654
|
resolvePromise(void 0);
|
|
55028
56655
|
}
|
|
55029
56656
|
});
|
|
@@ -55053,23 +56680,31 @@ const defaultResult = (args) => {
|
|
|
55053
56680
|
};
|
|
55054
56681
|
};
|
|
55055
56682
|
const getFramework = (args) => {
|
|
55056
|
-
|
|
55057
|
-
|
|
55058
|
-
|
|
55059
|
-
|
|
55060
|
-
const
|
|
55061
|
-
|
|
55062
|
-
|
|
55063
|
-
|
|
55064
|
-
|
|
55065
|
-
|
|
55066
|
-
|
|
55067
|
-
|
|
56683
|
+
try {
|
|
56684
|
+
let version;
|
|
56685
|
+
if (args.framework) {
|
|
56686
|
+
const frameworkLibPath = require$1.resolve(`${args.framework}`, { paths: [args.dir] });
|
|
56687
|
+
const findNearestPackageJson = (dir) => {
|
|
56688
|
+
const packageJsonPath = join(dir, "package.json");
|
|
56689
|
+
if (existsSync(packageJsonPath)) return packageJsonPath;
|
|
56690
|
+
const parentDir = dirname(dir);
|
|
56691
|
+
if (parentDir === dir) return;
|
|
56692
|
+
return findNearestPackageJson(parentDir);
|
|
56693
|
+
};
|
|
56694
|
+
const nearestPackageJsonPath = findNearestPackageJson(frameworkLibPath);
|
|
56695
|
+
if (nearestPackageJsonPath) version = require$1(nearestPackageJsonPath).version;
|
|
56696
|
+
}
|
|
56697
|
+
return {
|
|
56698
|
+
slug: args.framework ?? "",
|
|
56699
|
+
version: version ?? ""
|
|
56700
|
+
};
|
|
56701
|
+
} catch (error) {
|
|
56702
|
+
(0, import_dist.debug)(`Error getting framework for ${args.framework}. Setting framework version to empty string.`, error);
|
|
56703
|
+
return {
|
|
56704
|
+
slug: args.framework ?? "",
|
|
56705
|
+
version: ""
|
|
56706
|
+
};
|
|
55068
56707
|
}
|
|
55069
|
-
return {
|
|
55070
|
-
slug: args.framework ?? "",
|
|
55071
|
-
version: version ?? ""
|
|
55072
|
-
};
|
|
55073
56708
|
};
|
|
55074
56709
|
|
|
55075
56710
|
//#endregion
|