vercel 50.12.0 → 50.12.2
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/index.js +765 -661
- package/package.json +19 -19
package/dist/index.js
CHANGED
|
@@ -151,8 +151,8 @@ var require_universalify = __commonJS2({
|
|
|
151
151
|
if (typeof args2[args2.length - 1] === "function")
|
|
152
152
|
fn2.apply(this, args2);
|
|
153
153
|
else {
|
|
154
|
-
return new Promise((
|
|
155
|
-
args2.push((err, res) => err != null ? reject(err) :
|
|
154
|
+
return new Promise((resolve15, reject) => {
|
|
155
|
+
args2.push((err, res) => err != null ? reject(err) : resolve15(res));
|
|
156
156
|
fn2.apply(this, args2);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
@@ -872,7 +872,7 @@ var require_graceful_fs = __commonJS2({
|
|
|
872
872
|
}
|
|
873
873
|
function ReadStream$open() {
|
|
874
874
|
var that = this;
|
|
875
|
-
|
|
875
|
+
open9(that.path, that.flags, that.mode, function(err, fd) {
|
|
876
876
|
if (err) {
|
|
877
877
|
if (that.autoClose)
|
|
878
878
|
that.destroy();
|
|
@@ -892,7 +892,7 @@ var require_graceful_fs = __commonJS2({
|
|
|
892
892
|
}
|
|
893
893
|
function WriteStream$open() {
|
|
894
894
|
var that = this;
|
|
895
|
-
|
|
895
|
+
open9(that.path, that.flags, that.mode, function(err, fd) {
|
|
896
896
|
if (err) {
|
|
897
897
|
that.destroy();
|
|
898
898
|
that.emit("error", err);
|
|
@@ -909,8 +909,8 @@ var require_graceful_fs = __commonJS2({
|
|
|
909
909
|
return new fs16.WriteStream(path12, options);
|
|
910
910
|
}
|
|
911
911
|
var fs$open = fs16.open;
|
|
912
|
-
fs16.open =
|
|
913
|
-
function
|
|
912
|
+
fs16.open = open9;
|
|
913
|
+
function open9(path12, flags, mode, cb) {
|
|
914
914
|
if (typeof mode === "function")
|
|
915
915
|
cb = mode, mode = null;
|
|
916
916
|
return go$open(path12, flags, mode, cb);
|
|
@@ -1033,19 +1033,19 @@ var require_fs = __commonJS2({
|
|
|
1033
1033
|
if (typeof callback === "function") {
|
|
1034
1034
|
return fs15.exists(filename, callback);
|
|
1035
1035
|
}
|
|
1036
|
-
return new Promise((
|
|
1037
|
-
return fs15.exists(filename,
|
|
1036
|
+
return new Promise((resolve15) => {
|
|
1037
|
+
return fs15.exists(filename, resolve15);
|
|
1038
1038
|
});
|
|
1039
1039
|
};
|
|
1040
1040
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
1041
1041
|
if (typeof callback === "function") {
|
|
1042
1042
|
return fs15.read(fd, buffer, offset, length, position, callback);
|
|
1043
1043
|
}
|
|
1044
|
-
return new Promise((
|
|
1044
|
+
return new Promise((resolve15, reject) => {
|
|
1045
1045
|
fs15.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
1046
1046
|
if (err)
|
|
1047
1047
|
return reject(err);
|
|
1048
|
-
|
|
1048
|
+
resolve15({ bytesRead, buffer: buffer2 });
|
|
1049
1049
|
});
|
|
1050
1050
|
});
|
|
1051
1051
|
};
|
|
@@ -1053,11 +1053,11 @@ var require_fs = __commonJS2({
|
|
|
1053
1053
|
if (typeof args2[args2.length - 1] === "function") {
|
|
1054
1054
|
return fs15.write(fd, buffer, ...args2);
|
|
1055
1055
|
}
|
|
1056
|
-
return new Promise((
|
|
1056
|
+
return new Promise((resolve15, reject) => {
|
|
1057
1057
|
fs15.write(fd, buffer, ...args2, (err, bytesWritten, buffer2) => {
|
|
1058
1058
|
if (err)
|
|
1059
1059
|
return reject(err);
|
|
1060
|
-
|
|
1060
|
+
resolve15({ bytesWritten, buffer: buffer2 });
|
|
1061
1061
|
});
|
|
1062
1062
|
});
|
|
1063
1063
|
};
|
|
@@ -1066,11 +1066,11 @@ var require_fs = __commonJS2({
|
|
|
1066
1066
|
if (typeof args2[args2.length - 1] === "function") {
|
|
1067
1067
|
return fs15.writev(fd, buffers, ...args2);
|
|
1068
1068
|
}
|
|
1069
|
-
return new Promise((
|
|
1069
|
+
return new Promise((resolve15, reject) => {
|
|
1070
1070
|
fs15.writev(fd, buffers, ...args2, (err, bytesWritten, buffers2) => {
|
|
1071
1071
|
if (err)
|
|
1072
1072
|
return reject(err);
|
|
1073
|
-
|
|
1073
|
+
resolve15({ bytesWritten, buffers: buffers2 });
|
|
1074
1074
|
});
|
|
1075
1075
|
});
|
|
1076
1076
|
};
|
|
@@ -4233,18 +4233,18 @@ var require_source = __commonJS2({
|
|
|
4233
4233
|
}
|
|
4234
4234
|
}
|
|
4235
4235
|
});
|
|
4236
|
-
var createStyler = (
|
|
4236
|
+
var createStyler = (open9, close2, parent) => {
|
|
4237
4237
|
let openAll;
|
|
4238
4238
|
let closeAll;
|
|
4239
4239
|
if (parent === void 0) {
|
|
4240
|
-
openAll =
|
|
4240
|
+
openAll = open9;
|
|
4241
4241
|
closeAll = close2;
|
|
4242
4242
|
} else {
|
|
4243
|
-
openAll = parent.openAll +
|
|
4243
|
+
openAll = parent.openAll + open9;
|
|
4244
4244
|
closeAll = close2 + parent.closeAll;
|
|
4245
4245
|
}
|
|
4246
4246
|
return {
|
|
4247
|
-
open:
|
|
4247
|
+
open: open9,
|
|
4248
4248
|
close: close2,
|
|
4249
4249
|
openAll,
|
|
4250
4250
|
closeAll,
|
|
@@ -7334,9 +7334,9 @@ var require_chalk = __commonJS2({
|
|
|
7334
7334
|
get() {
|
|
7335
7335
|
const level = this.level;
|
|
7336
7336
|
return function() {
|
|
7337
|
-
const
|
|
7337
|
+
const open9 = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
|
|
7338
7338
|
const codes = {
|
|
7339
|
-
open:
|
|
7339
|
+
open: open9,
|
|
7340
7340
|
close: ansiStyles.color.close,
|
|
7341
7341
|
closeRe: ansiStyles.color.closeRe
|
|
7342
7342
|
};
|
|
@@ -7355,9 +7355,9 @@ var require_chalk = __commonJS2({
|
|
|
7355
7355
|
get() {
|
|
7356
7356
|
const level = this.level;
|
|
7357
7357
|
return function() {
|
|
7358
|
-
const
|
|
7358
|
+
const open9 = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
|
|
7359
7359
|
const codes = {
|
|
7360
|
-
open:
|
|
7360
|
+
open: open9,
|
|
7361
7361
|
close: ansiStyles.bgColor.close,
|
|
7362
7362
|
closeRe: ansiStyles.bgColor.closeRe
|
|
7363
7363
|
};
|
|
@@ -12362,7 +12362,7 @@ var require_path = __commonJS2({
|
|
|
12362
12362
|
const parts = splitPathRe.exec(truncated);
|
|
12363
12363
|
return parts ? parts.slice(1) : [];
|
|
12364
12364
|
}
|
|
12365
|
-
function
|
|
12365
|
+
function resolve15(...args2) {
|
|
12366
12366
|
let resolvedPath = "";
|
|
12367
12367
|
let resolvedAbsolute = false;
|
|
12368
12368
|
for (let i = args2.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
@@ -12398,8 +12398,8 @@ var require_path = __commonJS2({
|
|
|
12398
12398
|
return arr.slice(start, end - start + 1);
|
|
12399
12399
|
}
|
|
12400
12400
|
function relative8(from, to) {
|
|
12401
|
-
from =
|
|
12402
|
-
to =
|
|
12401
|
+
from = resolve15(from).slice(1);
|
|
12402
|
+
to = resolve15(to).slice(1);
|
|
12403
12403
|
const fromParts = trim(from.split("/"));
|
|
12404
12404
|
const toParts = trim(to.split("/"));
|
|
12405
12405
|
const length = Math.min(fromParts.length, toParts.length);
|
|
@@ -12435,7 +12435,7 @@ var require_path = __commonJS2({
|
|
|
12435
12435
|
function isAbsolute2(path12) {
|
|
12436
12436
|
return path12.charAt(0) === "/";
|
|
12437
12437
|
}
|
|
12438
|
-
function
|
|
12438
|
+
function join27(...args2) {
|
|
12439
12439
|
return normalizePath6(args2.join("/"));
|
|
12440
12440
|
}
|
|
12441
12441
|
function dirname9(path12) {
|
|
@@ -12460,10 +12460,10 @@ var require_path = __commonJS2({
|
|
|
12460
12460
|
exports2.basename = basename11;
|
|
12461
12461
|
exports2.dirname = dirname9;
|
|
12462
12462
|
exports2.isAbsolute = isAbsolute2;
|
|
12463
|
-
exports2.join =
|
|
12463
|
+
exports2.join = join27;
|
|
12464
12464
|
exports2.normalizePath = normalizePath6;
|
|
12465
12465
|
exports2.relative = relative8;
|
|
12466
|
-
exports2.resolve =
|
|
12466
|
+
exports2.resolve = resolve15;
|
|
12467
12467
|
}
|
|
12468
12468
|
});
|
|
12469
12469
|
|
|
@@ -12482,8 +12482,8 @@ var require_syncpromise = __commonJS2({
|
|
|
12482
12482
|
States2[States2["REJECTED"] = REJECTED] = "REJECTED";
|
|
12483
12483
|
})(States || (States = {}));
|
|
12484
12484
|
function resolvedSyncPromise(value) {
|
|
12485
|
-
return new SyncPromise((
|
|
12486
|
-
|
|
12485
|
+
return new SyncPromise((resolve15) => {
|
|
12486
|
+
resolve15(value);
|
|
12487
12487
|
});
|
|
12488
12488
|
}
|
|
12489
12489
|
function rejectedSyncPromise(reason) {
|
|
@@ -12507,15 +12507,15 @@ var require_syncpromise = __commonJS2({
|
|
|
12507
12507
|
}
|
|
12508
12508
|
/** JSDoc */
|
|
12509
12509
|
then(onfulfilled, onrejected) {
|
|
12510
|
-
return new _SyncPromise((
|
|
12510
|
+
return new _SyncPromise((resolve15, reject) => {
|
|
12511
12511
|
this._handlers.push([
|
|
12512
12512
|
false,
|
|
12513
12513
|
(result) => {
|
|
12514
12514
|
if (!onfulfilled) {
|
|
12515
|
-
|
|
12515
|
+
resolve15(result);
|
|
12516
12516
|
} else {
|
|
12517
12517
|
try {
|
|
12518
|
-
|
|
12518
|
+
resolve15(onfulfilled(result));
|
|
12519
12519
|
} catch (e2) {
|
|
12520
12520
|
reject(e2);
|
|
12521
12521
|
}
|
|
@@ -12526,7 +12526,7 @@ var require_syncpromise = __commonJS2({
|
|
|
12526
12526
|
reject(reason);
|
|
12527
12527
|
} else {
|
|
12528
12528
|
try {
|
|
12529
|
-
|
|
12529
|
+
resolve15(onrejected(reason));
|
|
12530
12530
|
} catch (e2) {
|
|
12531
12531
|
reject(e2);
|
|
12532
12532
|
}
|
|
@@ -12542,7 +12542,7 @@ var require_syncpromise = __commonJS2({
|
|
|
12542
12542
|
}
|
|
12543
12543
|
/** JSDoc */
|
|
12544
12544
|
finally(onfinally) {
|
|
12545
|
-
return new _SyncPromise((
|
|
12545
|
+
return new _SyncPromise((resolve15, reject) => {
|
|
12546
12546
|
let val;
|
|
12547
12547
|
let isRejected;
|
|
12548
12548
|
return this.then(
|
|
@@ -12565,7 +12565,7 @@ var require_syncpromise = __commonJS2({
|
|
|
12565
12565
|
reject(val);
|
|
12566
12566
|
return;
|
|
12567
12567
|
}
|
|
12568
|
-
|
|
12568
|
+
resolve15(val);
|
|
12569
12569
|
});
|
|
12570
12570
|
});
|
|
12571
12571
|
}
|
|
@@ -12655,21 +12655,21 @@ var require_promisebuffer = __commonJS2({
|
|
|
12655
12655
|
return task;
|
|
12656
12656
|
}
|
|
12657
12657
|
function drain(timeout) {
|
|
12658
|
-
return new syncpromise.SyncPromise((
|
|
12658
|
+
return new syncpromise.SyncPromise((resolve15, reject) => {
|
|
12659
12659
|
let counter = buffer.length;
|
|
12660
12660
|
if (!counter) {
|
|
12661
|
-
return
|
|
12661
|
+
return resolve15(true);
|
|
12662
12662
|
}
|
|
12663
12663
|
const capturedSetTimeout = setTimeout(() => {
|
|
12664
12664
|
if (timeout && timeout > 0) {
|
|
12665
|
-
|
|
12665
|
+
resolve15(false);
|
|
12666
12666
|
}
|
|
12667
12667
|
}, timeout);
|
|
12668
12668
|
buffer.forEach((item) => {
|
|
12669
12669
|
void syncpromise.resolvedSyncPromise(item).then(() => {
|
|
12670
12670
|
if (!--counter) {
|
|
12671
12671
|
clearTimeout(capturedSetTimeout);
|
|
12672
|
-
|
|
12672
|
+
resolve15(true);
|
|
12673
12673
|
}
|
|
12674
12674
|
}, reject);
|
|
12675
12675
|
});
|
|
@@ -14172,17 +14172,17 @@ var require_eventProcessors = __commonJS2({
|
|
|
14172
14172
|
getGlobalEventProcessors().push(callback);
|
|
14173
14173
|
}
|
|
14174
14174
|
function notifyEventProcessors(processors, event, hint, index = 0) {
|
|
14175
|
-
return new utils.SyncPromise((
|
|
14175
|
+
return new utils.SyncPromise((resolve15, reject) => {
|
|
14176
14176
|
const processor = processors[index];
|
|
14177
14177
|
if (event === null || typeof processor !== "function") {
|
|
14178
|
-
|
|
14178
|
+
resolve15(event);
|
|
14179
14179
|
} else {
|
|
14180
14180
|
const result = processor({ ...event }, hint);
|
|
14181
14181
|
debugBuild.DEBUG_BUILD && processor.id && result === null && utils.logger.log(`Event processor "${processor.id}" dropped event`);
|
|
14182
14182
|
if (utils.isThenable(result)) {
|
|
14183
|
-
void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(
|
|
14183
|
+
void result.then((final) => notifyEventProcessors(processors, final, hint, index + 1).then(resolve15)).then(null, reject);
|
|
14184
14184
|
} else {
|
|
14185
|
-
void notifyEventProcessors(processors, result, hint, index + 1).then(
|
|
14185
|
+
void notifyEventProcessors(processors, result, hint, index + 1).then(resolve15).then(null, reject);
|
|
14186
14186
|
}
|
|
14187
14187
|
}
|
|
14188
14188
|
});
|
|
@@ -18781,18 +18781,18 @@ var require_baseclient = __commonJS2({
|
|
|
18781
18781
|
* `false` otherwise
|
|
18782
18782
|
*/
|
|
18783
18783
|
_isClientDoneProcessing(timeout) {
|
|
18784
|
-
return new utils.SyncPromise((
|
|
18784
|
+
return new utils.SyncPromise((resolve15) => {
|
|
18785
18785
|
let ticked = 0;
|
|
18786
18786
|
const tick = 1;
|
|
18787
18787
|
const interval = setInterval(() => {
|
|
18788
18788
|
if (this._numProcessing == 0) {
|
|
18789
18789
|
clearInterval(interval);
|
|
18790
|
-
|
|
18790
|
+
resolve15(true);
|
|
18791
18791
|
} else {
|
|
18792
18792
|
ticked += tick;
|
|
18793
18793
|
if (timeout && ticked >= timeout) {
|
|
18794
18794
|
clearInterval(interval);
|
|
18795
|
-
|
|
18795
|
+
resolve15(false);
|
|
18796
18796
|
}
|
|
18797
18797
|
}
|
|
18798
18798
|
}, tick);
|
|
@@ -24446,7 +24446,7 @@ var require_parse_proxy_response = __commonJS2({
|
|
|
24446
24446
|
utils.logger.log("[https-proxy-agent:parse-proxy-response]", ...args2);
|
|
24447
24447
|
}
|
|
24448
24448
|
function parseProxyResponse(socket) {
|
|
24449
|
-
return new Promise((
|
|
24449
|
+
return new Promise((resolve15, reject) => {
|
|
24450
24450
|
let buffersLength = 0;
|
|
24451
24451
|
const buffers = [];
|
|
24452
24452
|
function read() {
|
|
@@ -24512,7 +24512,7 @@ var require_parse_proxy_response = __commonJS2({
|
|
|
24512
24512
|
}
|
|
24513
24513
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
24514
24514
|
cleanup();
|
|
24515
|
-
|
|
24515
|
+
resolve15({
|
|
24516
24516
|
connect: {
|
|
24517
24517
|
statusCode,
|
|
24518
24518
|
statusText,
|
|
@@ -24713,7 +24713,7 @@ var require_http = __commonJS2({
|
|
|
24713
24713
|
function createRequestExecutor(options, httpModule, agent) {
|
|
24714
24714
|
const { hostname: hostname3, pathname, port, protocol, search } = new url3.URL(options.url);
|
|
24715
24715
|
return function makeRequest(request) {
|
|
24716
|
-
return new Promise((
|
|
24716
|
+
return new Promise((resolve15, reject) => {
|
|
24717
24717
|
let body = streamFromBody(request.body);
|
|
24718
24718
|
const headers = { ...options.headers };
|
|
24719
24719
|
if (request.body.length > GZIP_THRESHOLD) {
|
|
@@ -24739,7 +24739,7 @@ var require_http = __commonJS2({
|
|
|
24739
24739
|
res.setEncoding("utf8");
|
|
24740
24740
|
const retryAfterHeader = _nullishCoalesce(res.headers["retry-after"], () => null);
|
|
24741
24741
|
const rateLimitsHeader = _nullishCoalesce(res.headers["x-sentry-rate-limits"], () => null);
|
|
24742
|
-
|
|
24742
|
+
resolve15({
|
|
24743
24743
|
statusCode: res.statusCode,
|
|
24744
24744
|
headers: {
|
|
24745
24745
|
"retry-after": retryAfterHeader,
|
|
@@ -25100,13 +25100,13 @@ var require_context = __commonJS2({
|
|
|
25100
25100
|
version: `10.${Number(os4.release().split(".")[0]) - 4}`
|
|
25101
25101
|
};
|
|
25102
25102
|
try {
|
|
25103
|
-
const output2 = await new Promise((
|
|
25103
|
+
const output2 = await new Promise((resolve15, reject) => {
|
|
25104
25104
|
child_process.execFile("/usr/bin/sw_vers", (error3, stdout) => {
|
|
25105
25105
|
if (error3) {
|
|
25106
25106
|
reject(error3);
|
|
25107
25107
|
return;
|
|
25108
25108
|
}
|
|
25109
|
-
|
|
25109
|
+
resolve15(stdout);
|
|
25110
25110
|
});
|
|
25111
25111
|
});
|
|
25112
25112
|
darwinInfo.name = matchFirst(/^ProductName:\s+(.*)$/m, output2);
|
|
@@ -25217,12 +25217,12 @@ var require_contextlines = __commonJS2({
|
|
|
25217
25217
|
var DEFAULT_LINES_OF_CONTEXT = 7;
|
|
25218
25218
|
var INTEGRATION_NAME = "ContextLines";
|
|
25219
25219
|
function readTextFileAsync(path12) {
|
|
25220
|
-
return new Promise((
|
|
25220
|
+
return new Promise((resolve15, reject) => {
|
|
25221
25221
|
fs15.readFile(path12, "utf8", (err, data) => {
|
|
25222
25222
|
if (err)
|
|
25223
25223
|
reject(err);
|
|
25224
25224
|
else
|
|
25225
|
-
|
|
25225
|
+
resolve15(data);
|
|
25226
25226
|
});
|
|
25227
25227
|
});
|
|
25228
25228
|
}
|
|
@@ -28084,8 +28084,8 @@ var require_localforage = __commonJS2({
|
|
|
28084
28084
|
}
|
|
28085
28085
|
return out;
|
|
28086
28086
|
}
|
|
28087
|
-
Promise2.resolve =
|
|
28088
|
-
function
|
|
28087
|
+
Promise2.resolve = resolve15;
|
|
28088
|
+
function resolve15(value) {
|
|
28089
28089
|
if (value instanceof this) {
|
|
28090
28090
|
return value;
|
|
28091
28091
|
}
|
|
@@ -28285,19 +28285,19 @@ var require_localforage = __commonJS2({
|
|
|
28285
28285
|
return buf;
|
|
28286
28286
|
}
|
|
28287
28287
|
function _checkBlobSupportWithoutCaching(idb2) {
|
|
28288
|
-
return new Promise$1(function(
|
|
28288
|
+
return new Promise$1(function(resolve15) {
|
|
28289
28289
|
var txn = idb2.transaction(DETECT_BLOB_SUPPORT_STORE, READ_WRITE);
|
|
28290
28290
|
var blob5 = createBlob([""]);
|
|
28291
28291
|
txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob5, "key");
|
|
28292
28292
|
txn.onabort = function(e2) {
|
|
28293
28293
|
e2.preventDefault();
|
|
28294
28294
|
e2.stopPropagation();
|
|
28295
|
-
|
|
28295
|
+
resolve15(false);
|
|
28296
28296
|
};
|
|
28297
28297
|
txn.oncomplete = function() {
|
|
28298
28298
|
var matchedChrome = navigator.userAgent.match(/Chrome\/(\d+)/);
|
|
28299
28299
|
var matchedEdge = navigator.userAgent.match(/Edge\//);
|
|
28300
|
-
|
|
28300
|
+
resolve15(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);
|
|
28301
28301
|
};
|
|
28302
28302
|
})["catch"](function() {
|
|
28303
28303
|
return false;
|
|
@@ -28315,8 +28315,8 @@ var require_localforage = __commonJS2({
|
|
|
28315
28315
|
function _deferReadiness(dbInfo) {
|
|
28316
28316
|
var dbContext = dbContexts[dbInfo.name];
|
|
28317
28317
|
var deferredOperation = {};
|
|
28318
|
-
deferredOperation.promise = new Promise$1(function(
|
|
28319
|
-
deferredOperation.resolve =
|
|
28318
|
+
deferredOperation.promise = new Promise$1(function(resolve15, reject) {
|
|
28319
|
+
deferredOperation.resolve = resolve15;
|
|
28320
28320
|
deferredOperation.reject = reject;
|
|
28321
28321
|
});
|
|
28322
28322
|
dbContext.deferredOperations.push(deferredOperation);
|
|
@@ -28345,14 +28345,14 @@ var require_localforage = __commonJS2({
|
|
|
28345
28345
|
}
|
|
28346
28346
|
}
|
|
28347
28347
|
function _getConnection(dbInfo, upgradeNeeded) {
|
|
28348
|
-
return new Promise$1(function(
|
|
28348
|
+
return new Promise$1(function(resolve15, reject) {
|
|
28349
28349
|
dbContexts[dbInfo.name] = dbContexts[dbInfo.name] || createDbContext();
|
|
28350
28350
|
if (dbInfo.db) {
|
|
28351
28351
|
if (upgradeNeeded) {
|
|
28352
28352
|
_deferReadiness(dbInfo);
|
|
28353
28353
|
dbInfo.db.close();
|
|
28354
28354
|
} else {
|
|
28355
|
-
return
|
|
28355
|
+
return resolve15(dbInfo.db);
|
|
28356
28356
|
}
|
|
28357
28357
|
}
|
|
28358
28358
|
var dbArgs = [dbInfo.name];
|
|
@@ -28386,7 +28386,7 @@ var require_localforage = __commonJS2({
|
|
|
28386
28386
|
db.onversionchange = function(e2) {
|
|
28387
28387
|
e2.target.close();
|
|
28388
28388
|
};
|
|
28389
|
-
|
|
28389
|
+
resolve15(db);
|
|
28390
28390
|
_advanceReadiness(dbInfo);
|
|
28391
28391
|
};
|
|
28392
28392
|
});
|
|
@@ -28422,12 +28422,12 @@ var require_localforage = __commonJS2({
|
|
|
28422
28422
|
return false;
|
|
28423
28423
|
}
|
|
28424
28424
|
function _encodeBlob(blob5) {
|
|
28425
|
-
return new Promise$1(function(
|
|
28425
|
+
return new Promise$1(function(resolve15, reject) {
|
|
28426
28426
|
var reader = new FileReader();
|
|
28427
28427
|
reader.onerror = reject;
|
|
28428
28428
|
reader.onloadend = function(e2) {
|
|
28429
28429
|
var base64 = btoa(e2.target.result || "");
|
|
28430
|
-
|
|
28430
|
+
resolve15({
|
|
28431
28431
|
__local_forage_encoded_blob: true,
|
|
28432
28432
|
data: base64,
|
|
28433
28433
|
type: blob5.type
|
|
@@ -28574,7 +28574,7 @@ var require_localforage = __commonJS2({
|
|
|
28574
28574
|
function getItem(key2, callback) {
|
|
28575
28575
|
var self2 = this;
|
|
28576
28576
|
key2 = normalizeKey(key2);
|
|
28577
|
-
var promise = new Promise$1(function(
|
|
28577
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28578
28578
|
self2.ready().then(function() {
|
|
28579
28579
|
createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) {
|
|
28580
28580
|
if (err) {
|
|
@@ -28591,7 +28591,7 @@ var require_localforage = __commonJS2({
|
|
|
28591
28591
|
if (_isEncodedBlob(value)) {
|
|
28592
28592
|
value = _decodeBlob(value);
|
|
28593
28593
|
}
|
|
28594
|
-
|
|
28594
|
+
resolve15(value);
|
|
28595
28595
|
};
|
|
28596
28596
|
req.onerror = function() {
|
|
28597
28597
|
reject(req.error);
|
|
@@ -28607,7 +28607,7 @@ var require_localforage = __commonJS2({
|
|
|
28607
28607
|
}
|
|
28608
28608
|
function iterate(iterator, callback) {
|
|
28609
28609
|
var self2 = this;
|
|
28610
|
-
var promise = new Promise$1(function(
|
|
28610
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28611
28611
|
self2.ready().then(function() {
|
|
28612
28612
|
createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) {
|
|
28613
28613
|
if (err) {
|
|
@@ -28626,12 +28626,12 @@ var require_localforage = __commonJS2({
|
|
|
28626
28626
|
}
|
|
28627
28627
|
var result = iterator(value, cursor.key, iterationNumber++);
|
|
28628
28628
|
if (result !== void 0) {
|
|
28629
|
-
|
|
28629
|
+
resolve15(result);
|
|
28630
28630
|
} else {
|
|
28631
28631
|
cursor["continue"]();
|
|
28632
28632
|
}
|
|
28633
28633
|
} else {
|
|
28634
|
-
|
|
28634
|
+
resolve15();
|
|
28635
28635
|
}
|
|
28636
28636
|
};
|
|
28637
28637
|
req.onerror = function() {
|
|
@@ -28649,7 +28649,7 @@ var require_localforage = __commonJS2({
|
|
|
28649
28649
|
function setItem(key2, value, callback) {
|
|
28650
28650
|
var self2 = this;
|
|
28651
28651
|
key2 = normalizeKey(key2);
|
|
28652
|
-
var promise = new Promise$1(function(
|
|
28652
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28653
28653
|
var dbInfo;
|
|
28654
28654
|
self2.ready().then(function() {
|
|
28655
28655
|
dbInfo = self2._dbInfo;
|
|
@@ -28677,7 +28677,7 @@ var require_localforage = __commonJS2({
|
|
|
28677
28677
|
if (value2 === void 0) {
|
|
28678
28678
|
value2 = null;
|
|
28679
28679
|
}
|
|
28680
|
-
|
|
28680
|
+
resolve15(value2);
|
|
28681
28681
|
};
|
|
28682
28682
|
transaction.onabort = transaction.onerror = function() {
|
|
28683
28683
|
var err2 = req.error ? req.error : req.transaction.error;
|
|
@@ -28695,7 +28695,7 @@ var require_localforage = __commonJS2({
|
|
|
28695
28695
|
function removeItem(key2, callback) {
|
|
28696
28696
|
var self2 = this;
|
|
28697
28697
|
key2 = normalizeKey(key2);
|
|
28698
|
-
var promise = new Promise$1(function(
|
|
28698
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28699
28699
|
self2.ready().then(function() {
|
|
28700
28700
|
createTransaction(self2._dbInfo, READ_WRITE, function(err, transaction) {
|
|
28701
28701
|
if (err) {
|
|
@@ -28705,7 +28705,7 @@ var require_localforage = __commonJS2({
|
|
|
28705
28705
|
var store2 = transaction.objectStore(self2._dbInfo.storeName);
|
|
28706
28706
|
var req = store2["delete"](key2);
|
|
28707
28707
|
transaction.oncomplete = function() {
|
|
28708
|
-
|
|
28708
|
+
resolve15();
|
|
28709
28709
|
};
|
|
28710
28710
|
transaction.onerror = function() {
|
|
28711
28711
|
reject(req.error);
|
|
@@ -28725,7 +28725,7 @@ var require_localforage = __commonJS2({
|
|
|
28725
28725
|
}
|
|
28726
28726
|
function clear(callback) {
|
|
28727
28727
|
var self2 = this;
|
|
28728
|
-
var promise = new Promise$1(function(
|
|
28728
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28729
28729
|
self2.ready().then(function() {
|
|
28730
28730
|
createTransaction(self2._dbInfo, READ_WRITE, function(err, transaction) {
|
|
28731
28731
|
if (err) {
|
|
@@ -28735,7 +28735,7 @@ var require_localforage = __commonJS2({
|
|
|
28735
28735
|
var store2 = transaction.objectStore(self2._dbInfo.storeName);
|
|
28736
28736
|
var req = store2.clear();
|
|
28737
28737
|
transaction.oncomplete = function() {
|
|
28738
|
-
|
|
28738
|
+
resolve15();
|
|
28739
28739
|
};
|
|
28740
28740
|
transaction.onabort = transaction.onerror = function() {
|
|
28741
28741
|
var err2 = req.error ? req.error : req.transaction.error;
|
|
@@ -28752,7 +28752,7 @@ var require_localforage = __commonJS2({
|
|
|
28752
28752
|
}
|
|
28753
28753
|
function length(callback) {
|
|
28754
28754
|
var self2 = this;
|
|
28755
|
-
var promise = new Promise$1(function(
|
|
28755
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28756
28756
|
self2.ready().then(function() {
|
|
28757
28757
|
createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) {
|
|
28758
28758
|
if (err) {
|
|
@@ -28762,7 +28762,7 @@ var require_localforage = __commonJS2({
|
|
|
28762
28762
|
var store2 = transaction.objectStore(self2._dbInfo.storeName);
|
|
28763
28763
|
var req = store2.count();
|
|
28764
28764
|
req.onsuccess = function() {
|
|
28765
|
-
|
|
28765
|
+
resolve15(req.result);
|
|
28766
28766
|
};
|
|
28767
28767
|
req.onerror = function() {
|
|
28768
28768
|
reject(req.error);
|
|
@@ -28778,9 +28778,9 @@ var require_localforage = __commonJS2({
|
|
|
28778
28778
|
}
|
|
28779
28779
|
function key(n, callback) {
|
|
28780
28780
|
var self2 = this;
|
|
28781
|
-
var promise = new Promise$1(function(
|
|
28781
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28782
28782
|
if (n < 0) {
|
|
28783
|
-
|
|
28783
|
+
resolve15(null);
|
|
28784
28784
|
return;
|
|
28785
28785
|
}
|
|
28786
28786
|
self2.ready().then(function() {
|
|
@@ -28795,17 +28795,17 @@ var require_localforage = __commonJS2({
|
|
|
28795
28795
|
req.onsuccess = function() {
|
|
28796
28796
|
var cursor = req.result;
|
|
28797
28797
|
if (!cursor) {
|
|
28798
|
-
|
|
28798
|
+
resolve15(null);
|
|
28799
28799
|
return;
|
|
28800
28800
|
}
|
|
28801
28801
|
if (n === 0) {
|
|
28802
|
-
|
|
28802
|
+
resolve15(cursor.key);
|
|
28803
28803
|
} else {
|
|
28804
28804
|
if (!advanced) {
|
|
28805
28805
|
advanced = true;
|
|
28806
28806
|
cursor.advance(n);
|
|
28807
28807
|
} else {
|
|
28808
|
-
|
|
28808
|
+
resolve15(cursor.key);
|
|
28809
28809
|
}
|
|
28810
28810
|
}
|
|
28811
28811
|
};
|
|
@@ -28823,7 +28823,7 @@ var require_localforage = __commonJS2({
|
|
|
28823
28823
|
}
|
|
28824
28824
|
function keys(callback) {
|
|
28825
28825
|
var self2 = this;
|
|
28826
|
-
var promise = new Promise$1(function(
|
|
28826
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
28827
28827
|
self2.ready().then(function() {
|
|
28828
28828
|
createTransaction(self2._dbInfo, READ_ONLY, function(err, transaction) {
|
|
28829
28829
|
if (err) {
|
|
@@ -28836,7 +28836,7 @@ var require_localforage = __commonJS2({
|
|
|
28836
28836
|
req.onsuccess = function() {
|
|
28837
28837
|
var cursor = req.result;
|
|
28838
28838
|
if (!cursor) {
|
|
28839
|
-
|
|
28839
|
+
resolve15(keys2);
|
|
28840
28840
|
return;
|
|
28841
28841
|
}
|
|
28842
28842
|
keys2.push(cursor.key);
|
|
@@ -28887,7 +28887,7 @@ var require_localforage = __commonJS2({
|
|
|
28887
28887
|
var forage = forages[i];
|
|
28888
28888
|
forage._dbInfo.db = null;
|
|
28889
28889
|
}
|
|
28890
|
-
var dropDBPromise = new Promise$1(function(
|
|
28890
|
+
var dropDBPromise = new Promise$1(function(resolve15, reject) {
|
|
28891
28891
|
var req = idb.deleteDatabase(options.name);
|
|
28892
28892
|
req.onerror = function() {
|
|
28893
28893
|
var db2 = req.result;
|
|
@@ -28904,7 +28904,7 @@ var require_localforage = __commonJS2({
|
|
|
28904
28904
|
if (db2) {
|
|
28905
28905
|
db2.close();
|
|
28906
28906
|
}
|
|
28907
|
-
|
|
28907
|
+
resolve15(db2);
|
|
28908
28908
|
};
|
|
28909
28909
|
});
|
|
28910
28910
|
return dropDBPromise.then(function(db2) {
|
|
@@ -28934,7 +28934,7 @@ var require_localforage = __commonJS2({
|
|
|
28934
28934
|
forage._dbInfo.db = null;
|
|
28935
28935
|
forage._dbInfo.version = newVersion;
|
|
28936
28936
|
}
|
|
28937
|
-
var dropObjectPromise = new Promise$1(function(
|
|
28937
|
+
var dropObjectPromise = new Promise$1(function(resolve15, reject) {
|
|
28938
28938
|
var req = idb.open(options.name, newVersion);
|
|
28939
28939
|
req.onerror = function(err) {
|
|
28940
28940
|
var db2 = req.result;
|
|
@@ -28948,7 +28948,7 @@ var require_localforage = __commonJS2({
|
|
|
28948
28948
|
req.onsuccess = function() {
|
|
28949
28949
|
var db2 = req.result;
|
|
28950
28950
|
db2.close();
|
|
28951
|
-
|
|
28951
|
+
resolve15(db2);
|
|
28952
28952
|
};
|
|
28953
28953
|
});
|
|
28954
28954
|
return dropObjectPromise.then(function(db2) {
|
|
@@ -29157,7 +29157,7 @@ var require_localforage = __commonJS2({
|
|
|
29157
29157
|
dbInfo[i] = typeof options[i] !== "string" ? options[i].toString() : options[i];
|
|
29158
29158
|
}
|
|
29159
29159
|
}
|
|
29160
|
-
var dbInfoPromise = new Promise$1(function(
|
|
29160
|
+
var dbInfoPromise = new Promise$1(function(resolve15, reject) {
|
|
29161
29161
|
try {
|
|
29162
29162
|
dbInfo.db = openDatabase(dbInfo.name, String(dbInfo.version), dbInfo.description, dbInfo.size);
|
|
29163
29163
|
} catch (e2) {
|
|
@@ -29166,7 +29166,7 @@ var require_localforage = __commonJS2({
|
|
|
29166
29166
|
dbInfo.db.transaction(function(t) {
|
|
29167
29167
|
createDbTable(t, dbInfo, function() {
|
|
29168
29168
|
self2._dbInfo = dbInfo;
|
|
29169
|
-
|
|
29169
|
+
resolve15();
|
|
29170
29170
|
}, function(t2, error3) {
|
|
29171
29171
|
reject(error3);
|
|
29172
29172
|
});
|
|
@@ -29195,7 +29195,7 @@ var require_localforage = __commonJS2({
|
|
|
29195
29195
|
function getItem$1(key2, callback) {
|
|
29196
29196
|
var self2 = this;
|
|
29197
29197
|
key2 = normalizeKey(key2);
|
|
29198
|
-
var promise = new Promise$1(function(
|
|
29198
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29199
29199
|
self2.ready().then(function() {
|
|
29200
29200
|
var dbInfo = self2._dbInfo;
|
|
29201
29201
|
dbInfo.db.transaction(function(t) {
|
|
@@ -29204,7 +29204,7 @@ var require_localforage = __commonJS2({
|
|
|
29204
29204
|
if (result) {
|
|
29205
29205
|
result = dbInfo.serializer.deserialize(result);
|
|
29206
29206
|
}
|
|
29207
|
-
|
|
29207
|
+
resolve15(result);
|
|
29208
29208
|
}, function(t2, error3) {
|
|
29209
29209
|
reject(error3);
|
|
29210
29210
|
});
|
|
@@ -29216,7 +29216,7 @@ var require_localforage = __commonJS2({
|
|
|
29216
29216
|
}
|
|
29217
29217
|
function iterate$1(iterator, callback) {
|
|
29218
29218
|
var self2 = this;
|
|
29219
|
-
var promise = new Promise$1(function(
|
|
29219
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29220
29220
|
self2.ready().then(function() {
|
|
29221
29221
|
var dbInfo = self2._dbInfo;
|
|
29222
29222
|
dbInfo.db.transaction(function(t) {
|
|
@@ -29231,11 +29231,11 @@ var require_localforage = __commonJS2({
|
|
|
29231
29231
|
}
|
|
29232
29232
|
result = iterator(result, item.key, i + 1);
|
|
29233
29233
|
if (result !== void 0) {
|
|
29234
|
-
|
|
29234
|
+
resolve15(result);
|
|
29235
29235
|
return;
|
|
29236
29236
|
}
|
|
29237
29237
|
}
|
|
29238
|
-
|
|
29238
|
+
resolve15();
|
|
29239
29239
|
}, function(t2, error3) {
|
|
29240
29240
|
reject(error3);
|
|
29241
29241
|
});
|
|
@@ -29248,7 +29248,7 @@ var require_localforage = __commonJS2({
|
|
|
29248
29248
|
function _setItem(key2, value, callback, retriesLeft) {
|
|
29249
29249
|
var self2 = this;
|
|
29250
29250
|
key2 = normalizeKey(key2);
|
|
29251
|
-
var promise = new Promise$1(function(
|
|
29251
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29252
29252
|
self2.ready().then(function() {
|
|
29253
29253
|
if (value === void 0) {
|
|
29254
29254
|
value = null;
|
|
@@ -29261,14 +29261,14 @@ var require_localforage = __commonJS2({
|
|
|
29261
29261
|
} else {
|
|
29262
29262
|
dbInfo.db.transaction(function(t) {
|
|
29263
29263
|
tryExecuteSql(t, dbInfo, "INSERT OR REPLACE INTO " + dbInfo.storeName + " (key, value) VALUES (?, ?)", [key2, value2], function() {
|
|
29264
|
-
|
|
29264
|
+
resolve15(originalValue);
|
|
29265
29265
|
}, function(t2, error4) {
|
|
29266
29266
|
reject(error4);
|
|
29267
29267
|
});
|
|
29268
29268
|
}, function(sqlError) {
|
|
29269
29269
|
if (sqlError.code === sqlError.QUOTA_ERR) {
|
|
29270
29270
|
if (retriesLeft > 0) {
|
|
29271
|
-
|
|
29271
|
+
resolve15(_setItem.apply(self2, [key2, originalValue, callback, retriesLeft - 1]));
|
|
29272
29272
|
return;
|
|
29273
29273
|
}
|
|
29274
29274
|
reject(sqlError);
|
|
@@ -29287,12 +29287,12 @@ var require_localforage = __commonJS2({
|
|
|
29287
29287
|
function removeItem$1(key2, callback) {
|
|
29288
29288
|
var self2 = this;
|
|
29289
29289
|
key2 = normalizeKey(key2);
|
|
29290
|
-
var promise = new Promise$1(function(
|
|
29290
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29291
29291
|
self2.ready().then(function() {
|
|
29292
29292
|
var dbInfo = self2._dbInfo;
|
|
29293
29293
|
dbInfo.db.transaction(function(t) {
|
|
29294
29294
|
tryExecuteSql(t, dbInfo, "DELETE FROM " + dbInfo.storeName + " WHERE key = ?", [key2], function() {
|
|
29295
|
-
|
|
29295
|
+
resolve15();
|
|
29296
29296
|
}, function(t2, error3) {
|
|
29297
29297
|
reject(error3);
|
|
29298
29298
|
});
|
|
@@ -29304,12 +29304,12 @@ var require_localforage = __commonJS2({
|
|
|
29304
29304
|
}
|
|
29305
29305
|
function clear$1(callback) {
|
|
29306
29306
|
var self2 = this;
|
|
29307
|
-
var promise = new Promise$1(function(
|
|
29307
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29308
29308
|
self2.ready().then(function() {
|
|
29309
29309
|
var dbInfo = self2._dbInfo;
|
|
29310
29310
|
dbInfo.db.transaction(function(t) {
|
|
29311
29311
|
tryExecuteSql(t, dbInfo, "DELETE FROM " + dbInfo.storeName, [], function() {
|
|
29312
|
-
|
|
29312
|
+
resolve15();
|
|
29313
29313
|
}, function(t2, error3) {
|
|
29314
29314
|
reject(error3);
|
|
29315
29315
|
});
|
|
@@ -29321,13 +29321,13 @@ var require_localforage = __commonJS2({
|
|
|
29321
29321
|
}
|
|
29322
29322
|
function length$1(callback) {
|
|
29323
29323
|
var self2 = this;
|
|
29324
|
-
var promise = new Promise$1(function(
|
|
29324
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29325
29325
|
self2.ready().then(function() {
|
|
29326
29326
|
var dbInfo = self2._dbInfo;
|
|
29327
29327
|
dbInfo.db.transaction(function(t) {
|
|
29328
29328
|
tryExecuteSql(t, dbInfo, "SELECT COUNT(key) as c FROM " + dbInfo.storeName, [], function(t2, results) {
|
|
29329
29329
|
var result = results.rows.item(0).c;
|
|
29330
|
-
|
|
29330
|
+
resolve15(result);
|
|
29331
29331
|
}, function(t2, error3) {
|
|
29332
29332
|
reject(error3);
|
|
29333
29333
|
});
|
|
@@ -29339,13 +29339,13 @@ var require_localforage = __commonJS2({
|
|
|
29339
29339
|
}
|
|
29340
29340
|
function key$1(n, callback) {
|
|
29341
29341
|
var self2 = this;
|
|
29342
|
-
var promise = new Promise$1(function(
|
|
29342
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29343
29343
|
self2.ready().then(function() {
|
|
29344
29344
|
var dbInfo = self2._dbInfo;
|
|
29345
29345
|
dbInfo.db.transaction(function(t) {
|
|
29346
29346
|
tryExecuteSql(t, dbInfo, "SELECT key FROM " + dbInfo.storeName + " WHERE id = ? LIMIT 1", [n + 1], function(t2, results) {
|
|
29347
29347
|
var result = results.rows.length ? results.rows.item(0).key : null;
|
|
29348
|
-
|
|
29348
|
+
resolve15(result);
|
|
29349
29349
|
}, function(t2, error3) {
|
|
29350
29350
|
reject(error3);
|
|
29351
29351
|
});
|
|
@@ -29357,7 +29357,7 @@ var require_localforage = __commonJS2({
|
|
|
29357
29357
|
}
|
|
29358
29358
|
function keys$1(callback) {
|
|
29359
29359
|
var self2 = this;
|
|
29360
|
-
var promise = new Promise$1(function(
|
|
29360
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29361
29361
|
self2.ready().then(function() {
|
|
29362
29362
|
var dbInfo = self2._dbInfo;
|
|
29363
29363
|
dbInfo.db.transaction(function(t) {
|
|
@@ -29366,7 +29366,7 @@ var require_localforage = __commonJS2({
|
|
|
29366
29366
|
for (var i = 0; i < results.rows.length; i++) {
|
|
29367
29367
|
keys2.push(results.rows.item(i).key);
|
|
29368
29368
|
}
|
|
29369
|
-
|
|
29369
|
+
resolve15(keys2);
|
|
29370
29370
|
}, function(t2, error3) {
|
|
29371
29371
|
reject(error3);
|
|
29372
29372
|
});
|
|
@@ -29377,14 +29377,14 @@ var require_localforage = __commonJS2({
|
|
|
29377
29377
|
return promise;
|
|
29378
29378
|
}
|
|
29379
29379
|
function getAllStoreNames(db) {
|
|
29380
|
-
return new Promise$1(function(
|
|
29380
|
+
return new Promise$1(function(resolve15, reject) {
|
|
29381
29381
|
db.transaction(function(t) {
|
|
29382
29382
|
t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'", [], function(t2, results) {
|
|
29383
29383
|
var storeNames = [];
|
|
29384
29384
|
for (var i = 0; i < results.rows.length; i++) {
|
|
29385
29385
|
storeNames.push(results.rows.item(i).name);
|
|
29386
29386
|
}
|
|
29387
|
-
|
|
29387
|
+
resolve15({
|
|
29388
29388
|
db,
|
|
29389
29389
|
storeNames
|
|
29390
29390
|
});
|
|
@@ -29409,7 +29409,7 @@ var require_localforage = __commonJS2({
|
|
|
29409
29409
|
if (!options.name) {
|
|
29410
29410
|
promise = Promise$1.reject("Invalid arguments");
|
|
29411
29411
|
} else {
|
|
29412
|
-
promise = new Promise$1(function(
|
|
29412
|
+
promise = new Promise$1(function(resolve15) {
|
|
29413
29413
|
var db;
|
|
29414
29414
|
if (options.name === currentConfig.name) {
|
|
29415
29415
|
db = self2._dbInfo.db;
|
|
@@ -29417,20 +29417,20 @@ var require_localforage = __commonJS2({
|
|
|
29417
29417
|
db = openDatabase(options.name, "", "", 0);
|
|
29418
29418
|
}
|
|
29419
29419
|
if (!options.storeName) {
|
|
29420
|
-
|
|
29420
|
+
resolve15(getAllStoreNames(db));
|
|
29421
29421
|
} else {
|
|
29422
|
-
|
|
29422
|
+
resolve15({
|
|
29423
29423
|
db,
|
|
29424
29424
|
storeNames: [options.storeName]
|
|
29425
29425
|
});
|
|
29426
29426
|
}
|
|
29427
29427
|
}).then(function(operationInfo) {
|
|
29428
|
-
return new Promise$1(function(
|
|
29428
|
+
return new Promise$1(function(resolve15, reject) {
|
|
29429
29429
|
operationInfo.db.transaction(function(t) {
|
|
29430
29430
|
function dropTable(storeName) {
|
|
29431
|
-
return new Promise$1(function(
|
|
29431
|
+
return new Promise$1(function(resolve16, reject2) {
|
|
29432
29432
|
t.executeSql("DROP TABLE IF EXISTS " + storeName, [], function() {
|
|
29433
|
-
|
|
29433
|
+
resolve16();
|
|
29434
29434
|
}, function(t2, error3) {
|
|
29435
29435
|
reject2(error3);
|
|
29436
29436
|
});
|
|
@@ -29441,7 +29441,7 @@ var require_localforage = __commonJS2({
|
|
|
29441
29441
|
operations.push(dropTable(operationInfo.storeNames[i]));
|
|
29442
29442
|
}
|
|
29443
29443
|
Promise$1.all(operations).then(function() {
|
|
29444
|
-
|
|
29444
|
+
resolve15();
|
|
29445
29445
|
})["catch"](function(e2) {
|
|
29446
29446
|
reject(e2);
|
|
29447
29447
|
});
|
|
@@ -29627,7 +29627,7 @@ var require_localforage = __commonJS2({
|
|
|
29627
29627
|
value = null;
|
|
29628
29628
|
}
|
|
29629
29629
|
var originalValue = value;
|
|
29630
|
-
return new Promise$1(function(
|
|
29630
|
+
return new Promise$1(function(resolve15, reject) {
|
|
29631
29631
|
var dbInfo = self2._dbInfo;
|
|
29632
29632
|
dbInfo.serializer.serialize(value, function(value2, error3) {
|
|
29633
29633
|
if (error3) {
|
|
@@ -29635,7 +29635,7 @@ var require_localforage = __commonJS2({
|
|
|
29635
29635
|
} else {
|
|
29636
29636
|
try {
|
|
29637
29637
|
localStorage.setItem(dbInfo.keyPrefix + key2, value2);
|
|
29638
|
-
|
|
29638
|
+
resolve15(originalValue);
|
|
29639
29639
|
} catch (e2) {
|
|
29640
29640
|
if (e2.name === "QuotaExceededError" || e2.name === "NS_ERROR_DOM_QUOTA_REACHED") {
|
|
29641
29641
|
reject(e2);
|
|
@@ -29662,11 +29662,11 @@ var require_localforage = __commonJS2({
|
|
|
29662
29662
|
if (!options.name) {
|
|
29663
29663
|
promise = Promise$1.reject("Invalid arguments");
|
|
29664
29664
|
} else {
|
|
29665
|
-
promise = new Promise$1(function(
|
|
29665
|
+
promise = new Promise$1(function(resolve15) {
|
|
29666
29666
|
if (!options.storeName) {
|
|
29667
|
-
|
|
29667
|
+
resolve15(options.name + "/");
|
|
29668
29668
|
} else {
|
|
29669
|
-
|
|
29669
|
+
resolve15(_getKeyPrefix(options, self2._defaultConfig));
|
|
29670
29670
|
}
|
|
29671
29671
|
}).then(function(keyPrefix) {
|
|
29672
29672
|
for (var i = localStorage.length - 1; i >= 0; i--) {
|
|
@@ -29804,7 +29804,7 @@ var require_localforage = __commonJS2({
|
|
|
29804
29804
|
}
|
|
29805
29805
|
};
|
|
29806
29806
|
LocalForage2.prototype.defineDriver = function defineDriver(driverObject, callback, errorCallback) {
|
|
29807
|
-
var promise = new Promise$1(function(
|
|
29807
|
+
var promise = new Promise$1(function(resolve15, reject) {
|
|
29808
29808
|
try {
|
|
29809
29809
|
var driverName = driverObject._driver;
|
|
29810
29810
|
var complianceError = new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");
|
|
@@ -29844,7 +29844,7 @@ var require_localforage = __commonJS2({
|
|
|
29844
29844
|
}
|
|
29845
29845
|
DefinedDrivers[driverName] = driverObject;
|
|
29846
29846
|
DriverSupport[driverName] = support;
|
|
29847
|
-
|
|
29847
|
+
resolve15();
|
|
29848
29848
|
};
|
|
29849
29849
|
if ("_support" in driverObject) {
|
|
29850
29850
|
if (driverObject._support && typeof driverObject._support === "function") {
|
|
@@ -37365,18 +37365,18 @@ var require_source2 = __commonJS2({
|
|
|
37365
37365
|
}
|
|
37366
37366
|
}
|
|
37367
37367
|
});
|
|
37368
|
-
var createStyler = (
|
|
37368
|
+
var createStyler = (open9, close2, parent) => {
|
|
37369
37369
|
let openAll;
|
|
37370
37370
|
let closeAll;
|
|
37371
37371
|
if (parent === void 0) {
|
|
37372
|
-
openAll =
|
|
37372
|
+
openAll = open9;
|
|
37373
37373
|
closeAll = close2;
|
|
37374
37374
|
} else {
|
|
37375
|
-
openAll = parent.openAll +
|
|
37375
|
+
openAll = parent.openAll + open9;
|
|
37376
37376
|
closeAll = close2 + parent.closeAll;
|
|
37377
37377
|
}
|
|
37378
37378
|
return {
|
|
37379
|
-
open:
|
|
37379
|
+
open: open9,
|
|
37380
37380
|
close: close2,
|
|
37381
37381
|
openAll,
|
|
37382
37382
|
closeAll,
|
|
@@ -37977,13 +37977,13 @@ var init_inquirer = __esm({
|
|
|
37977
37977
|
});
|
|
37978
37978
|
}
|
|
37979
37979
|
static withResolver() {
|
|
37980
|
-
let
|
|
37980
|
+
let resolve15;
|
|
37981
37981
|
let reject;
|
|
37982
37982
|
const promise = new _CancelablePromise((res, rej) => {
|
|
37983
|
-
|
|
37983
|
+
resolve15 = res;
|
|
37984
37984
|
reject = rej;
|
|
37985
37985
|
});
|
|
37986
|
-
return { promise, resolve:
|
|
37986
|
+
return { promise, resolve: resolve15, reject };
|
|
37987
37987
|
}
|
|
37988
37988
|
};
|
|
37989
37989
|
}
|
|
@@ -38510,7 +38510,7 @@ function createPrompt(view) {
|
|
|
38510
38510
|
const screen = new ScreenManager(rl);
|
|
38511
38511
|
let cancel = () => {
|
|
38512
38512
|
};
|
|
38513
|
-
const answer = new CancelablePromise((
|
|
38513
|
+
const answer = new CancelablePromise((resolve15, reject) => {
|
|
38514
38514
|
withHooks(rl, (store2) => {
|
|
38515
38515
|
function checkCursorPos() {
|
|
38516
38516
|
screen.checkCursorPos();
|
|
@@ -38543,7 +38543,7 @@ function createPrompt(view) {
|
|
|
38543
38543
|
function done(value) {
|
|
38544
38544
|
setImmediate(() => {
|
|
38545
38545
|
onExit2();
|
|
38546
|
-
|
|
38546
|
+
resolve15(value);
|
|
38547
38547
|
});
|
|
38548
38548
|
}
|
|
38549
38549
|
function workLoop(resolvedConfig) {
|
|
@@ -39658,11 +39658,11 @@ var require_yoctocolors_cjs = __commonJS2({
|
|
|
39658
39658
|
"../../node_modules/.pnpm/yoctocolors-cjs@2.1.3/node_modules/yoctocolors-cjs/index.js"(exports2, module2) {
|
|
39659
39659
|
var tty = __require("tty");
|
|
39660
39660
|
var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
39661
|
-
var format7 = (
|
|
39661
|
+
var format7 = (open9, close2) => {
|
|
39662
39662
|
if (!hasColors) {
|
|
39663
39663
|
return (input) => input;
|
|
39664
39664
|
}
|
|
39665
|
-
const openCode = `\x1B[${
|
|
39665
|
+
const openCode = `\x1B[${open9}m`;
|
|
39666
39666
|
const closeCode = `\x1B[${close2}m`;
|
|
39667
39667
|
return (input) => {
|
|
39668
39668
|
const string = input + "";
|
|
@@ -40085,13 +40085,13 @@ var init_promise_polyfill = __esm({
|
|
|
40085
40085
|
// Available starting from Node 22
|
|
40086
40086
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
|
|
40087
40087
|
static withResolver() {
|
|
40088
|
-
let
|
|
40088
|
+
let resolve15;
|
|
40089
40089
|
let reject;
|
|
40090
40090
|
const promise = new Promise((res, rej) => {
|
|
40091
|
-
|
|
40091
|
+
resolve15 = res;
|
|
40092
40092
|
reject = rej;
|
|
40093
40093
|
});
|
|
40094
|
-
return { promise, resolve:
|
|
40094
|
+
return { promise, resolve: resolve15, reject };
|
|
40095
40095
|
}
|
|
40096
40096
|
};
|
|
40097
40097
|
}
|
|
@@ -40112,7 +40112,7 @@ function createPrompt2(view) {
|
|
|
40112
40112
|
output: output2
|
|
40113
40113
|
});
|
|
40114
40114
|
const screen = new ScreenManager2(rl);
|
|
40115
|
-
const { promise, resolve:
|
|
40115
|
+
const { promise, resolve: resolve15, reject } = PromisePolyfill.withResolver();
|
|
40116
40116
|
const cancel = () => reject(new CancelPromptError2());
|
|
40117
40117
|
if (signal) {
|
|
40118
40118
|
const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
|
|
@@ -40136,7 +40136,7 @@ function createPrompt2(view) {
|
|
|
40136
40136
|
cycle(() => {
|
|
40137
40137
|
try {
|
|
40138
40138
|
const nextView = view(config2, (value) => {
|
|
40139
|
-
setImmediate(() =>
|
|
40139
|
+
setImmediate(() => resolve15(value));
|
|
40140
40140
|
});
|
|
40141
40141
|
const [content, bottomContent] = typeof nextView === "string" ? [nextView] : nextView;
|
|
40142
40142
|
screen.render(content, bottomContent);
|
|
@@ -40712,7 +40712,7 @@ var require_dist5 = __commonJS2({
|
|
|
40712
40712
|
var retrier = require_retry2();
|
|
40713
40713
|
module2.exports = function(fn2, opts) {
|
|
40714
40714
|
opts = opts || {};
|
|
40715
|
-
return new Promise(function(
|
|
40715
|
+
return new Promise(function(resolve15, reject) {
|
|
40716
40716
|
var op = retrier.operation(opts);
|
|
40717
40717
|
var bail = function bail2(err) {
|
|
40718
40718
|
return reject(err || new Error("Aborted"));
|
|
@@ -40734,7 +40734,7 @@ var require_dist5 = __commonJS2({
|
|
|
40734
40734
|
} catch (err) {
|
|
40735
40735
|
return onError(err);
|
|
40736
40736
|
}
|
|
40737
|
-
Promise.resolve(val).then(
|
|
40737
|
+
Promise.resolve(val).then(resolve15, onError);
|
|
40738
40738
|
});
|
|
40739
40739
|
});
|
|
40740
40740
|
};
|
|
@@ -42809,7 +42809,7 @@ var require_lib7 = __commonJS2({
|
|
|
42809
42809
|
let accum = [];
|
|
42810
42810
|
let accumBytes = 0;
|
|
42811
42811
|
let abort = false;
|
|
42812
|
-
return new Body.Promise(function(
|
|
42812
|
+
return new Body.Promise(function(resolve15, reject) {
|
|
42813
42813
|
let resTimeout;
|
|
42814
42814
|
if (_this4.timeout) {
|
|
42815
42815
|
resTimeout = setTimeout(function() {
|
|
@@ -42843,7 +42843,7 @@ var require_lib7 = __commonJS2({
|
|
|
42843
42843
|
}
|
|
42844
42844
|
clearTimeout(resTimeout);
|
|
42845
42845
|
try {
|
|
42846
|
-
|
|
42846
|
+
resolve15(Buffer.concat(accum, accumBytes));
|
|
42847
42847
|
} catch (err) {
|
|
42848
42848
|
reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
|
|
42849
42849
|
}
|
|
@@ -43518,7 +43518,7 @@ var require_lib7 = __commonJS2({
|
|
|
43518
43518
|
throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
|
|
43519
43519
|
}
|
|
43520
43520
|
Body.Promise = fetch6.Promise;
|
|
43521
|
-
return new fetch6.Promise(function(
|
|
43521
|
+
return new fetch6.Promise(function(resolve15, reject) {
|
|
43522
43522
|
const request = new Request2(url3, opts);
|
|
43523
43523
|
const options = getNodeRequestOptions(request);
|
|
43524
43524
|
const send = (options.protocol === "https:" ? https : http3).request;
|
|
@@ -43630,7 +43630,7 @@ var require_lib7 = __commonJS2({
|
|
|
43630
43630
|
requestOpts.body = void 0;
|
|
43631
43631
|
requestOpts.headers.delete("content-length");
|
|
43632
43632
|
}
|
|
43633
|
-
|
|
43633
|
+
resolve15(fetch6(new Request2(locationURL, requestOpts)));
|
|
43634
43634
|
finalize();
|
|
43635
43635
|
return;
|
|
43636
43636
|
}
|
|
@@ -43652,7 +43652,7 @@ var require_lib7 = __commonJS2({
|
|
|
43652
43652
|
const codings = headers.get("Content-Encoding");
|
|
43653
43653
|
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
43654
43654
|
response = new Response2(body, response_options);
|
|
43655
|
-
|
|
43655
|
+
resolve15(response);
|
|
43656
43656
|
return;
|
|
43657
43657
|
}
|
|
43658
43658
|
const zlibOptions = {
|
|
@@ -43662,7 +43662,7 @@ var require_lib7 = __commonJS2({
|
|
|
43662
43662
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
43663
43663
|
body = body.pipe(zlib.createGunzip(zlibOptions));
|
|
43664
43664
|
response = new Response2(body, response_options);
|
|
43665
|
-
|
|
43665
|
+
resolve15(response);
|
|
43666
43666
|
return;
|
|
43667
43667
|
}
|
|
43668
43668
|
if (codings == "deflate" || codings == "x-deflate") {
|
|
@@ -43674,18 +43674,18 @@ var require_lib7 = __commonJS2({
|
|
|
43674
43674
|
body = body.pipe(zlib.createInflateRaw());
|
|
43675
43675
|
}
|
|
43676
43676
|
response = new Response2(body, response_options);
|
|
43677
|
-
|
|
43677
|
+
resolve15(response);
|
|
43678
43678
|
});
|
|
43679
43679
|
return;
|
|
43680
43680
|
}
|
|
43681
43681
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
43682
43682
|
body = body.pipe(zlib.createBrotliDecompress());
|
|
43683
43683
|
response = new Response2(body, response_options);
|
|
43684
|
-
|
|
43684
|
+
resolve15(response);
|
|
43685
43685
|
return;
|
|
43686
43686
|
}
|
|
43687
43687
|
response = new Response2(body, response_options);
|
|
43688
|
-
|
|
43688
|
+
resolve15(response);
|
|
43689
43689
|
});
|
|
43690
43690
|
writeToStream(req, request);
|
|
43691
43691
|
});
|
|
@@ -46117,7 +46117,7 @@ var init_telemetry = __esm({
|
|
|
46117
46117
|
VERCEL_TELEMETRY_DISABLED: "1"
|
|
46118
46118
|
});
|
|
46119
46119
|
if (outputDebugEnabled) {
|
|
46120
|
-
return new Promise((
|
|
46120
|
+
return new Promise((resolve15) => {
|
|
46121
46121
|
const childProcess = spawn2(nodeBinaryPath, script, {
|
|
46122
46122
|
env,
|
|
46123
46123
|
stdio: ["ignore", "pipe", "pipe"]
|
|
@@ -46135,7 +46135,7 @@ var init_telemetry = __esm({
|
|
|
46135
46135
|
output_manager_default.debug(`Telemetry subprocess exited with code ${code2}`);
|
|
46136
46136
|
childProcess.unref();
|
|
46137
46137
|
timeout.unref();
|
|
46138
|
-
|
|
46138
|
+
resolve15();
|
|
46139
46139
|
});
|
|
46140
46140
|
});
|
|
46141
46141
|
} else {
|
|
@@ -46408,21 +46408,21 @@ var require_open = __commonJS2({
|
|
|
46408
46408
|
}
|
|
46409
46409
|
const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
|
|
46410
46410
|
if (options.wait) {
|
|
46411
|
-
return new Promise((
|
|
46411
|
+
return new Promise((resolve15, reject) => {
|
|
46412
46412
|
subprocess.once("error", reject);
|
|
46413
46413
|
subprocess.once("close", (exitCode2) => {
|
|
46414
46414
|
if (options.allowNonzeroExitCode && exitCode2 > 0) {
|
|
46415
46415
|
reject(new Error(`Exited with code ${exitCode2}`));
|
|
46416
46416
|
return;
|
|
46417
46417
|
}
|
|
46418
|
-
|
|
46418
|
+
resolve15(subprocess);
|
|
46419
46419
|
});
|
|
46420
46420
|
});
|
|
46421
46421
|
}
|
|
46422
46422
|
subprocess.unref();
|
|
46423
46423
|
return subprocess;
|
|
46424
46424
|
};
|
|
46425
|
-
var
|
|
46425
|
+
var open9 = (target, options) => {
|
|
46426
46426
|
if (typeof target !== "string") {
|
|
46427
46427
|
throw new TypeError("Expected a `target`");
|
|
46428
46428
|
}
|
|
@@ -46491,9 +46491,9 @@ var require_open = __commonJS2({
|
|
|
46491
46491
|
}, {
|
|
46492
46492
|
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
46493
46493
|
}));
|
|
46494
|
-
|
|
46495
|
-
|
|
46496
|
-
module2.exports =
|
|
46494
|
+
open9.apps = apps;
|
|
46495
|
+
open9.openApp = openApp;
|
|
46496
|
+
module2.exports = open9;
|
|
46497
46497
|
}
|
|
46498
46498
|
});
|
|
46499
46499
|
|
|
@@ -46944,7 +46944,7 @@ async function login(client2, telemetry2) {
|
|
|
46944
46944
|
return 1;
|
|
46945
46945
|
}
|
|
46946
46946
|
async function wait2(intervalMs) {
|
|
46947
|
-
await new Promise((
|
|
46947
|
+
await new Promise((resolve15) => setTimeout(resolve15, intervalMs));
|
|
46948
46948
|
}
|
|
46949
46949
|
var import_chalk17, open, import_ansi_escapes7;
|
|
46950
46950
|
var init_future = __esm({
|
|
@@ -47043,11 +47043,11 @@ var require_dist6 = __commonJS2({
|
|
|
47043
47043
|
"use strict";
|
|
47044
47044
|
var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
47045
47045
|
function adopt(value) {
|
|
47046
|
-
return value instanceof P ? value : new P(function(
|
|
47047
|
-
|
|
47046
|
+
return value instanceof P ? value : new P(function(resolve15) {
|
|
47047
|
+
resolve15(value);
|
|
47048
47048
|
});
|
|
47049
47049
|
}
|
|
47050
|
-
return new (P || (P = Promise))(function(
|
|
47050
|
+
return new (P || (P = Promise))(function(resolve15, reject) {
|
|
47051
47051
|
function fulfilled(value) {
|
|
47052
47052
|
try {
|
|
47053
47053
|
step(generator.next(value));
|
|
@@ -47063,7 +47063,7 @@ var require_dist6 = __commonJS2({
|
|
|
47063
47063
|
}
|
|
47064
47064
|
}
|
|
47065
47065
|
function step(result) {
|
|
47066
|
-
result.done ?
|
|
47066
|
+
result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
47067
47067
|
}
|
|
47068
47068
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47069
47069
|
});
|
|
@@ -47215,11 +47215,11 @@ async function getVerificationToken(client2, url3, provider) {
|
|
|
47215
47215
|
output_manager_default.spinner(`Waiting for ${provider} authentication to be completed`);
|
|
47216
47216
|
try {
|
|
47217
47217
|
const [query] = await Promise.all([
|
|
47218
|
-
new Promise((
|
|
47218
|
+
new Promise((resolve15, reject) => {
|
|
47219
47219
|
server.once("request", (req, res) => {
|
|
47220
47220
|
res.setHeader("connection", "close");
|
|
47221
47221
|
const query2 = new URL3(req.url || "/", "http://localhost").searchParams;
|
|
47222
|
-
|
|
47222
|
+
resolve15(query2);
|
|
47223
47223
|
const location = new URL3(
|
|
47224
47224
|
"https://vercel.com/notifications/cli-login-"
|
|
47225
47225
|
);
|
|
@@ -48138,7 +48138,7 @@ var require_pify = __commonJS2({
|
|
|
48138
48138
|
for (var i = 0; i < arguments.length; i++) {
|
|
48139
48139
|
args2[i] = arguments[i];
|
|
48140
48140
|
}
|
|
48141
|
-
return new P(function(
|
|
48141
|
+
return new P(function(resolve15, reject) {
|
|
48142
48142
|
args2.push(function(err, result) {
|
|
48143
48143
|
if (err) {
|
|
48144
48144
|
reject(err);
|
|
@@ -48147,9 +48147,9 @@ var require_pify = __commonJS2({
|
|
|
48147
48147
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
48148
48148
|
results[i2 - 1] = arguments[i2];
|
|
48149
48149
|
}
|
|
48150
|
-
|
|
48150
|
+
resolve15(results);
|
|
48151
48151
|
} else {
|
|
48152
|
-
|
|
48152
|
+
resolve15(result);
|
|
48153
48153
|
}
|
|
48154
48154
|
});
|
|
48155
48155
|
fn2.apply(that, args2);
|
|
@@ -48348,28 +48348,28 @@ var require_write_file_atomic = __commonJS2({
|
|
|
48348
48348
|
var tmpfile;
|
|
48349
48349
|
var removeOnExitHandler = onExit2(cleanupOnExit(() => tmpfile));
|
|
48350
48350
|
var absoluteName = path12.resolve(filename);
|
|
48351
|
-
new Promise2(function serializeSameFile(
|
|
48351
|
+
new Promise2(function serializeSameFile(resolve15) {
|
|
48352
48352
|
if (!activeFiles[absoluteName])
|
|
48353
48353
|
activeFiles[absoluteName] = [];
|
|
48354
|
-
activeFiles[absoluteName].push(
|
|
48354
|
+
activeFiles[absoluteName].push(resolve15);
|
|
48355
48355
|
if (activeFiles[absoluteName].length === 1)
|
|
48356
|
-
|
|
48356
|
+
resolve15();
|
|
48357
48357
|
}).then(function getRealPath() {
|
|
48358
|
-
return new Promise2(function(
|
|
48358
|
+
return new Promise2(function(resolve15) {
|
|
48359
48359
|
fs15.realpath(filename, function(_, realname) {
|
|
48360
48360
|
truename = realname || filename;
|
|
48361
48361
|
tmpfile = getTmpname(truename);
|
|
48362
|
-
|
|
48362
|
+
resolve15();
|
|
48363
48363
|
});
|
|
48364
48364
|
});
|
|
48365
48365
|
}).then(function stat2() {
|
|
48366
|
-
return new Promise2(function stat3(
|
|
48366
|
+
return new Promise2(function stat3(resolve15) {
|
|
48367
48367
|
if (options.mode && options.chown)
|
|
48368
|
-
|
|
48368
|
+
resolve15();
|
|
48369
48369
|
else {
|
|
48370
48370
|
fs15.stat(truename, function(err, stats) {
|
|
48371
48371
|
if (err || !stats)
|
|
48372
|
-
|
|
48372
|
+
resolve15();
|
|
48373
48373
|
else {
|
|
48374
48374
|
options = Object.assign({}, options);
|
|
48375
48375
|
if (options.mode == null) {
|
|
@@ -48378,91 +48378,91 @@ var require_write_file_atomic = __commonJS2({
|
|
|
48378
48378
|
if (options.chown == null && process.getuid) {
|
|
48379
48379
|
options.chown = { uid: stats.uid, gid: stats.gid };
|
|
48380
48380
|
}
|
|
48381
|
-
|
|
48381
|
+
resolve15();
|
|
48382
48382
|
}
|
|
48383
48383
|
});
|
|
48384
48384
|
}
|
|
48385
48385
|
});
|
|
48386
48386
|
}).then(function thenWriteFile() {
|
|
48387
|
-
return new Promise2(function(
|
|
48387
|
+
return new Promise2(function(resolve15, reject) {
|
|
48388
48388
|
fs15.open(tmpfile, "w", options.mode, function(err, _fd) {
|
|
48389
48389
|
fd = _fd;
|
|
48390
48390
|
if (err)
|
|
48391
48391
|
reject(err);
|
|
48392
48392
|
else
|
|
48393
|
-
|
|
48393
|
+
resolve15();
|
|
48394
48394
|
});
|
|
48395
48395
|
});
|
|
48396
48396
|
}).then(function write() {
|
|
48397
|
-
return new Promise2(function(
|
|
48397
|
+
return new Promise2(function(resolve15, reject) {
|
|
48398
48398
|
if (Buffer.isBuffer(data)) {
|
|
48399
48399
|
fs15.write(fd, data, 0, data.length, 0, function(err) {
|
|
48400
48400
|
if (err)
|
|
48401
48401
|
reject(err);
|
|
48402
48402
|
else
|
|
48403
|
-
|
|
48403
|
+
resolve15();
|
|
48404
48404
|
});
|
|
48405
48405
|
} else if (data != null) {
|
|
48406
48406
|
fs15.write(fd, String(data), 0, String(options.encoding || "utf8"), function(err) {
|
|
48407
48407
|
if (err)
|
|
48408
48408
|
reject(err);
|
|
48409
48409
|
else
|
|
48410
|
-
|
|
48410
|
+
resolve15();
|
|
48411
48411
|
});
|
|
48412
48412
|
} else
|
|
48413
|
-
|
|
48413
|
+
resolve15();
|
|
48414
48414
|
});
|
|
48415
48415
|
}).then(function syncAndClose() {
|
|
48416
|
-
return new Promise2(function(
|
|
48416
|
+
return new Promise2(function(resolve15, reject) {
|
|
48417
48417
|
if (options.fsync !== false) {
|
|
48418
48418
|
fs15.fsync(fd, function(err) {
|
|
48419
48419
|
if (err)
|
|
48420
48420
|
fs15.close(fd, () => reject(err));
|
|
48421
48421
|
else
|
|
48422
|
-
fs15.close(fd,
|
|
48422
|
+
fs15.close(fd, resolve15);
|
|
48423
48423
|
});
|
|
48424
48424
|
} else {
|
|
48425
|
-
fs15.close(fd,
|
|
48425
|
+
fs15.close(fd, resolve15);
|
|
48426
48426
|
}
|
|
48427
48427
|
});
|
|
48428
48428
|
}).then(function chown() {
|
|
48429
48429
|
fd = null;
|
|
48430
48430
|
if (options.chown) {
|
|
48431
|
-
return new Promise2(function(
|
|
48431
|
+
return new Promise2(function(resolve15, reject) {
|
|
48432
48432
|
fs15.chown(tmpfile, options.chown.uid, options.chown.gid, function(err) {
|
|
48433
48433
|
if (err)
|
|
48434
48434
|
reject(err);
|
|
48435
48435
|
else
|
|
48436
|
-
|
|
48436
|
+
resolve15();
|
|
48437
48437
|
});
|
|
48438
48438
|
});
|
|
48439
48439
|
}
|
|
48440
48440
|
}).then(function chmod() {
|
|
48441
48441
|
if (options.mode) {
|
|
48442
|
-
return new Promise2(function(
|
|
48442
|
+
return new Promise2(function(resolve15, reject) {
|
|
48443
48443
|
fs15.chmod(tmpfile, options.mode, function(err) {
|
|
48444
48444
|
if (err)
|
|
48445
48445
|
reject(err);
|
|
48446
48446
|
else
|
|
48447
|
-
|
|
48447
|
+
resolve15();
|
|
48448
48448
|
});
|
|
48449
48449
|
});
|
|
48450
48450
|
}
|
|
48451
48451
|
}).then(function rename() {
|
|
48452
|
-
return new Promise2(function(
|
|
48452
|
+
return new Promise2(function(resolve15, reject) {
|
|
48453
48453
|
fs15.rename(tmpfile, truename, function(err) {
|
|
48454
48454
|
if (err)
|
|
48455
48455
|
reject(err);
|
|
48456
48456
|
else
|
|
48457
|
-
|
|
48457
|
+
resolve15();
|
|
48458
48458
|
});
|
|
48459
48459
|
});
|
|
48460
48460
|
}).then(function success() {
|
|
48461
48461
|
removeOnExitHandler();
|
|
48462
48462
|
callback();
|
|
48463
48463
|
}, function fail(err) {
|
|
48464
|
-
return new Promise2((
|
|
48465
|
-
return fd ? fs15.close(fd,
|
|
48464
|
+
return new Promise2((resolve15) => {
|
|
48465
|
+
return fd ? fs15.close(fd, resolve15) : resolve15();
|
|
48466
48466
|
}).then(() => {
|
|
48467
48467
|
removeOnExitHandler();
|
|
48468
48468
|
fs15.unlink(tmpfile, function() {
|
|
@@ -48594,7 +48594,7 @@ var require_pify2 = __commonJS2({
|
|
|
48594
48594
|
for (let i = 0; i < arguments.length; i++) {
|
|
48595
48595
|
args2[i] = arguments[i];
|
|
48596
48596
|
}
|
|
48597
|
-
return new P((
|
|
48597
|
+
return new P((resolve15, reject) => {
|
|
48598
48598
|
if (opts.errorFirst) {
|
|
48599
48599
|
args2.push(function(err, result) {
|
|
48600
48600
|
if (opts.multiArgs) {
|
|
@@ -48606,12 +48606,12 @@ var require_pify2 = __commonJS2({
|
|
|
48606
48606
|
results.unshift(err);
|
|
48607
48607
|
reject(results);
|
|
48608
48608
|
} else {
|
|
48609
|
-
|
|
48609
|
+
resolve15(results);
|
|
48610
48610
|
}
|
|
48611
48611
|
} else if (err) {
|
|
48612
48612
|
reject(err);
|
|
48613
48613
|
} else {
|
|
48614
|
-
|
|
48614
|
+
resolve15(result);
|
|
48615
48615
|
}
|
|
48616
48616
|
});
|
|
48617
48617
|
} else {
|
|
@@ -48621,9 +48621,9 @@ var require_pify2 = __commonJS2({
|
|
|
48621
48621
|
for (let i = 0; i < arguments.length; i++) {
|
|
48622
48622
|
results[i] = arguments[i];
|
|
48623
48623
|
}
|
|
48624
|
-
|
|
48624
|
+
resolve15(results);
|
|
48625
48625
|
} else {
|
|
48626
|
-
|
|
48626
|
+
resolve15(result);
|
|
48627
48627
|
}
|
|
48628
48628
|
});
|
|
48629
48629
|
}
|
|
@@ -48890,11 +48890,11 @@ var require_universalify2 = __commonJS2({
|
|
|
48890
48890
|
if (typeof arguments[arguments.length - 1] === "function")
|
|
48891
48891
|
fn2.apply(this, arguments);
|
|
48892
48892
|
else {
|
|
48893
|
-
return new Promise((
|
|
48893
|
+
return new Promise((resolve15, reject) => {
|
|
48894
48894
|
arguments[arguments.length] = (err, res) => {
|
|
48895
48895
|
if (err)
|
|
48896
48896
|
return reject(err);
|
|
48897
|
-
|
|
48897
|
+
resolve15(res);
|
|
48898
48898
|
};
|
|
48899
48899
|
arguments.length++;
|
|
48900
48900
|
fn2.apply(this, arguments);
|
|
@@ -48969,19 +48969,19 @@ var require_fs2 = __commonJS2({
|
|
|
48969
48969
|
if (typeof callback === "function") {
|
|
48970
48970
|
return fs15.exists(filename, callback);
|
|
48971
48971
|
}
|
|
48972
|
-
return new Promise((
|
|
48973
|
-
return fs15.exists(filename,
|
|
48972
|
+
return new Promise((resolve15) => {
|
|
48973
|
+
return fs15.exists(filename, resolve15);
|
|
48974
48974
|
});
|
|
48975
48975
|
};
|
|
48976
48976
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
48977
48977
|
if (typeof callback === "function") {
|
|
48978
48978
|
return fs15.read(fd, buffer, offset, length, position, callback);
|
|
48979
48979
|
}
|
|
48980
|
-
return new Promise((
|
|
48980
|
+
return new Promise((resolve15, reject) => {
|
|
48981
48981
|
fs15.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
48982
48982
|
if (err)
|
|
48983
48983
|
return reject(err);
|
|
48984
|
-
|
|
48984
|
+
resolve15({ bytesRead, buffer: buffer2 });
|
|
48985
48985
|
});
|
|
48986
48986
|
});
|
|
48987
48987
|
};
|
|
@@ -48989,11 +48989,11 @@ var require_fs2 = __commonJS2({
|
|
|
48989
48989
|
if (typeof args2[args2.length - 1] === "function") {
|
|
48990
48990
|
return fs15.write(fd, buffer, ...args2);
|
|
48991
48991
|
}
|
|
48992
|
-
return new Promise((
|
|
48992
|
+
return new Promise((resolve15, reject) => {
|
|
48993
48993
|
fs15.write(fd, buffer, ...args2, (err, bytesWritten, buffer2) => {
|
|
48994
48994
|
if (err)
|
|
48995
48995
|
return reject(err);
|
|
48996
|
-
|
|
48996
|
+
resolve15({ bytesWritten, buffer: buffer2 });
|
|
48997
48997
|
});
|
|
48998
48998
|
});
|
|
48999
48999
|
};
|
|
@@ -51005,12 +51005,12 @@ var require_lib9 = __commonJS2({
|
|
|
51005
51005
|
if (token !== void 0) {
|
|
51006
51006
|
return token;
|
|
51007
51007
|
}
|
|
51008
|
-
return new Promise((
|
|
51008
|
+
return new Promise((resolve15, reject) => {
|
|
51009
51009
|
if (this.pauseFn && !this.paused) {
|
|
51010
51010
|
this.paused = true;
|
|
51011
51011
|
this.pauseFn();
|
|
51012
51012
|
}
|
|
51013
|
-
this.waiting.push({ resolve:
|
|
51013
|
+
this.waiting.push({ resolve: resolve15, reject });
|
|
51014
51014
|
});
|
|
51015
51015
|
}
|
|
51016
51016
|
release(token) {
|
|
@@ -51357,7 +51357,7 @@ var require_lib10 = __commonJS2({
|
|
|
51357
51357
|
"../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js"(exports2, module2) {
|
|
51358
51358
|
var retrier = require_retry4();
|
|
51359
51359
|
function retry6(fn2, opts) {
|
|
51360
|
-
function run2(
|
|
51360
|
+
function run2(resolve15, reject) {
|
|
51361
51361
|
var options = opts || {};
|
|
51362
51362
|
var op = retrier.operation(options);
|
|
51363
51363
|
function bail(err) {
|
|
@@ -51382,7 +51382,7 @@ var require_lib10 = __commonJS2({
|
|
|
51382
51382
|
onError(err, num);
|
|
51383
51383
|
return;
|
|
51384
51384
|
}
|
|
51385
|
-
Promise.resolve(val).then(
|
|
51385
|
+
Promise.resolve(val).then(resolve15).catch(function catchIt(err) {
|
|
51386
51386
|
onError(err, num);
|
|
51387
51387
|
});
|
|
51388
51388
|
}
|
|
@@ -51690,7 +51690,7 @@ var require_package = __commonJS2({
|
|
|
51690
51690
|
"../client/package.json"(exports2, module2) {
|
|
51691
51691
|
module2.exports = {
|
|
51692
51692
|
name: "@vercel/client",
|
|
51693
|
-
version: "17.2.
|
|
51693
|
+
version: "17.2.35",
|
|
51694
51694
|
main: "dist/index.js",
|
|
51695
51695
|
typings: "dist/index.d.ts",
|
|
51696
51696
|
homepage: "https://vercel.com",
|
|
@@ -52596,14 +52596,14 @@ var require_readdir_recursive = __commonJS2({
|
|
|
52596
52596
|
function readdir2(path12, ignores) {
|
|
52597
52597
|
ignores = ignores.map(toMatcherFunction);
|
|
52598
52598
|
let list10 = [];
|
|
52599
|
-
return new Promise(function(
|
|
52599
|
+
return new Promise(function(resolve15, reject) {
|
|
52600
52600
|
import_fs11.default.readdir(path12, function(err, files) {
|
|
52601
52601
|
if (err) {
|
|
52602
52602
|
return reject(err);
|
|
52603
52603
|
}
|
|
52604
52604
|
let pending = files.length;
|
|
52605
52605
|
if (!pending) {
|
|
52606
|
-
return
|
|
52606
|
+
return resolve15(list10);
|
|
52607
52607
|
}
|
|
52608
52608
|
files.forEach(function(file) {
|
|
52609
52609
|
const filePath = import_path46.default.join(path12, file);
|
|
@@ -52615,7 +52615,7 @@ var require_readdir_recursive = __commonJS2({
|
|
|
52615
52615
|
if (matches) {
|
|
52616
52616
|
pending -= 1;
|
|
52617
52617
|
if (!pending) {
|
|
52618
|
-
return
|
|
52618
|
+
return resolve15(list10);
|
|
52619
52619
|
}
|
|
52620
52620
|
return null;
|
|
52621
52621
|
}
|
|
@@ -52627,14 +52627,14 @@ var require_readdir_recursive = __commonJS2({
|
|
|
52627
52627
|
list10 = list10.concat(res);
|
|
52628
52628
|
pending -= 1;
|
|
52629
52629
|
if (!pending) {
|
|
52630
|
-
return
|
|
52630
|
+
return resolve15(list10);
|
|
52631
52631
|
}
|
|
52632
52632
|
}).catch(reject);
|
|
52633
52633
|
} else {
|
|
52634
52634
|
list10.push(filePath);
|
|
52635
52635
|
pending -= 1;
|
|
52636
52636
|
if (!pending) {
|
|
52637
|
-
return
|
|
52637
|
+
return resolve15(list10);
|
|
52638
52638
|
}
|
|
52639
52639
|
}
|
|
52640
52640
|
});
|
|
@@ -54509,9 +54509,9 @@ var require_is_glob = __commonJS2({
|
|
|
54509
54509
|
}
|
|
54510
54510
|
}
|
|
54511
54511
|
if (str[index] === "\\") {
|
|
54512
|
-
var
|
|
54512
|
+
var open9 = str[index + 1];
|
|
54513
54513
|
index += 2;
|
|
54514
|
-
var close2 = chars2[
|
|
54514
|
+
var close2 = chars2[open9];
|
|
54515
54515
|
if (close2) {
|
|
54516
54516
|
var n = str.indexOf(close2, index);
|
|
54517
54517
|
if (n !== -1) {
|
|
@@ -54537,9 +54537,9 @@ var require_is_glob = __commonJS2({
|
|
|
54537
54537
|
return true;
|
|
54538
54538
|
}
|
|
54539
54539
|
if (str[index] === "\\") {
|
|
54540
|
-
var
|
|
54540
|
+
var open9 = str[index + 1];
|
|
54541
54541
|
index += 2;
|
|
54542
|
-
var close2 = chars2[
|
|
54542
|
+
var close2 = chars2[open9];
|
|
54543
54543
|
if (close2) {
|
|
54544
54544
|
var n = str.indexOf(close2, index);
|
|
54545
54545
|
if (n !== -1) {
|
|
@@ -55527,7 +55527,7 @@ var require_parse2 = __commonJS2({
|
|
|
55527
55527
|
continue;
|
|
55528
55528
|
}
|
|
55529
55529
|
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
55530
|
-
const
|
|
55530
|
+
const open9 = value;
|
|
55531
55531
|
let next;
|
|
55532
55532
|
if (options.keepQuotes !== true) {
|
|
55533
55533
|
value = "";
|
|
@@ -55537,7 +55537,7 @@ var require_parse2 = __commonJS2({
|
|
|
55537
55537
|
value += next + advance();
|
|
55538
55538
|
continue;
|
|
55539
55539
|
}
|
|
55540
|
-
if (next ===
|
|
55540
|
+
if (next === open9) {
|
|
55541
55541
|
if (options.keepQuotes === true)
|
|
55542
55542
|
value += next;
|
|
55543
55543
|
break;
|
|
@@ -55581,8 +55581,8 @@ var require_parse2 = __commonJS2({
|
|
|
55581
55581
|
if (value === CHAR_COMMA2 && depth > 0) {
|
|
55582
55582
|
if (block.ranges > 0) {
|
|
55583
55583
|
block.ranges = 0;
|
|
55584
|
-
const
|
|
55585
|
-
block.nodes = [
|
|
55584
|
+
const open9 = block.nodes.shift();
|
|
55585
|
+
block.nodes = [open9, { type: "text", value: stringify2(block) }];
|
|
55586
55586
|
}
|
|
55587
55587
|
push({ type: "comma", value });
|
|
55588
55588
|
block.commas++;
|
|
@@ -56685,15 +56685,15 @@ var require_parse3 = __commonJS2({
|
|
|
56685
56685
|
}
|
|
56686
56686
|
if (value === "{" && opts.nobrace !== true) {
|
|
56687
56687
|
increment("braces");
|
|
56688
|
-
const
|
|
56688
|
+
const open9 = {
|
|
56689
56689
|
type: "brace",
|
|
56690
56690
|
value,
|
|
56691
56691
|
output: "(",
|
|
56692
56692
|
outputIndex: state.output.length,
|
|
56693
56693
|
tokensIndex: state.tokens.length
|
|
56694
56694
|
};
|
|
56695
|
-
braces.push(
|
|
56696
|
-
push(
|
|
56695
|
+
braces.push(open9);
|
|
56696
|
+
push(open9);
|
|
56697
56697
|
continue;
|
|
56698
56698
|
}
|
|
56699
56699
|
if (value === "}") {
|
|
@@ -58630,42 +58630,42 @@ var require_queue = __commonJS2({
|
|
|
58630
58630
|
queue.drained = drained;
|
|
58631
58631
|
return queue;
|
|
58632
58632
|
function push(value) {
|
|
58633
|
-
var p = new Promise(function(
|
|
58633
|
+
var p = new Promise(function(resolve15, reject) {
|
|
58634
58634
|
pushCb(value, function(err, result) {
|
|
58635
58635
|
if (err) {
|
|
58636
58636
|
reject(err);
|
|
58637
58637
|
return;
|
|
58638
58638
|
}
|
|
58639
|
-
|
|
58639
|
+
resolve15(result);
|
|
58640
58640
|
});
|
|
58641
58641
|
});
|
|
58642
58642
|
p.catch(noop);
|
|
58643
58643
|
return p;
|
|
58644
58644
|
}
|
|
58645
58645
|
function unshift(value) {
|
|
58646
|
-
var p = new Promise(function(
|
|
58646
|
+
var p = new Promise(function(resolve15, reject) {
|
|
58647
58647
|
unshiftCb(value, function(err, result) {
|
|
58648
58648
|
if (err) {
|
|
58649
58649
|
reject(err);
|
|
58650
58650
|
return;
|
|
58651
58651
|
}
|
|
58652
|
-
|
|
58652
|
+
resolve15(result);
|
|
58653
58653
|
});
|
|
58654
58654
|
});
|
|
58655
58655
|
p.catch(noop);
|
|
58656
58656
|
return p;
|
|
58657
58657
|
}
|
|
58658
58658
|
function drained() {
|
|
58659
|
-
var p = new Promise(function(
|
|
58659
|
+
var p = new Promise(function(resolve15) {
|
|
58660
58660
|
process.nextTick(function() {
|
|
58661
58661
|
if (queue.idle()) {
|
|
58662
|
-
|
|
58662
|
+
resolve15();
|
|
58663
58663
|
} else {
|
|
58664
58664
|
var previousDrain = queue.drain;
|
|
58665
58665
|
queue.drain = function() {
|
|
58666
58666
|
if (typeof previousDrain === "function")
|
|
58667
58667
|
previousDrain();
|
|
58668
|
-
|
|
58668
|
+
resolve15();
|
|
58669
58669
|
queue.drain = previousDrain;
|
|
58670
58670
|
};
|
|
58671
58671
|
}
|
|
@@ -59151,9 +59151,9 @@ var require_stream3 = __commonJS2({
|
|
|
59151
59151
|
});
|
|
59152
59152
|
}
|
|
59153
59153
|
_getStat(filepath) {
|
|
59154
|
-
return new Promise((
|
|
59154
|
+
return new Promise((resolve15, reject) => {
|
|
59155
59155
|
this._stat(filepath, this._fsStatSettings, (error3, stats) => {
|
|
59156
|
-
return error3 === null ?
|
|
59156
|
+
return error3 === null ? resolve15(stats) : reject(error3);
|
|
59157
59157
|
});
|
|
59158
59158
|
});
|
|
59159
59159
|
}
|
|
@@ -59177,10 +59177,10 @@ var require_async6 = __commonJS2({
|
|
|
59177
59177
|
this._readerStream = new stream_1.default(this._settings);
|
|
59178
59178
|
}
|
|
59179
59179
|
dynamic(root, options) {
|
|
59180
|
-
return new Promise((
|
|
59180
|
+
return new Promise((resolve15, reject) => {
|
|
59181
59181
|
this._walkAsync(root, options, (error3, entries) => {
|
|
59182
59182
|
if (error3 === null) {
|
|
59183
|
-
|
|
59183
|
+
resolve15(entries);
|
|
59184
59184
|
} else {
|
|
59185
59185
|
reject(error3);
|
|
59186
59186
|
}
|
|
@@ -59190,10 +59190,10 @@ var require_async6 = __commonJS2({
|
|
|
59190
59190
|
async static(patterns, options) {
|
|
59191
59191
|
const entries = [];
|
|
59192
59192
|
const stream = this._readerStream.static(patterns, options);
|
|
59193
|
-
return new Promise((
|
|
59193
|
+
return new Promise((resolve15, reject) => {
|
|
59194
59194
|
stream.once("error", reject);
|
|
59195
59195
|
stream.on("data", (entry) => entries.push(entry));
|
|
59196
|
-
stream.once("end", () =>
|
|
59196
|
+
stream.once("end", () => resolve15(entries));
|
|
59197
59197
|
});
|
|
59198
59198
|
}
|
|
59199
59199
|
};
|
|
@@ -59888,14 +59888,14 @@ var require_utils13 = __commonJS2({
|
|
|
59888
59888
|
});
|
|
59889
59889
|
module2.exports = __toCommonJS4(utils_exports);
|
|
59890
59890
|
var import_node_fs3 = __toESM4(__require("fs"), 1);
|
|
59891
|
-
var
|
|
59891
|
+
var import_node_path7 = __require("path");
|
|
59892
59892
|
var CONFIGURATION_FILENAMES = [
|
|
59893
59893
|
"microfrontends.jsonc",
|
|
59894
59894
|
"microfrontends.json"
|
|
59895
59895
|
];
|
|
59896
59896
|
function findConfig({ dir }) {
|
|
59897
59897
|
for (const filename of CONFIGURATION_FILENAMES) {
|
|
59898
|
-
const maybeConfig = (0,
|
|
59898
|
+
const maybeConfig = (0, import_node_path7.join)(dir, filename);
|
|
59899
59899
|
if (import_node_fs3.default.existsSync(maybeConfig)) {
|
|
59900
59900
|
return maybeConfig;
|
|
59901
59901
|
}
|
|
@@ -61775,7 +61775,7 @@ var require_BufferList = __commonJS2({
|
|
|
61775
61775
|
this.head = this.tail = null;
|
|
61776
61776
|
this.length = 0;
|
|
61777
61777
|
};
|
|
61778
|
-
BufferList.prototype.join = function
|
|
61778
|
+
BufferList.prototype.join = function join27(s) {
|
|
61779
61779
|
if (this.length === 0)
|
|
61780
61780
|
return "";
|
|
61781
61781
|
var p = this.head;
|
|
@@ -66488,7 +66488,7 @@ var require_uri_all = __commonJS2({
|
|
|
66488
66488
|
target.fragment = relative8.fragment;
|
|
66489
66489
|
return target;
|
|
66490
66490
|
}
|
|
66491
|
-
function
|
|
66491
|
+
function resolve15(baseURI, relativeURI, options) {
|
|
66492
66492
|
var schemelessOptions = assign2({ scheme: "null" }, options);
|
|
66493
66493
|
return serialize(resolveComponents(parse11(baseURI, schemelessOptions), parse11(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
66494
66494
|
}
|
|
@@ -66756,7 +66756,7 @@ var require_uri_all = __commonJS2({
|
|
|
66756
66756
|
exports3.removeDotSegments = removeDotSegments;
|
|
66757
66757
|
exports3.serialize = serialize;
|
|
66758
66758
|
exports3.resolveComponents = resolveComponents;
|
|
66759
|
-
exports3.resolve =
|
|
66759
|
+
exports3.resolve = resolve15;
|
|
66760
66760
|
exports3.normalize = normalize4;
|
|
66761
66761
|
exports3.equal = equal;
|
|
66762
66762
|
exports3.escapeComponent = escapeComponent;
|
|
@@ -67142,20 +67142,20 @@ var require_resolve = __commonJS2({
|
|
|
67142
67142
|
var util = require_util4();
|
|
67143
67143
|
var SchemaObject = require_schema_obj();
|
|
67144
67144
|
var traverse = require_json_schema_traverse();
|
|
67145
|
-
module2.exports =
|
|
67146
|
-
|
|
67147
|
-
|
|
67148
|
-
|
|
67149
|
-
|
|
67150
|
-
|
|
67151
|
-
|
|
67152
|
-
function
|
|
67145
|
+
module2.exports = resolve15;
|
|
67146
|
+
resolve15.normalizeId = normalizeId;
|
|
67147
|
+
resolve15.fullPath = getFullPath;
|
|
67148
|
+
resolve15.url = resolveUrl;
|
|
67149
|
+
resolve15.ids = resolveIds;
|
|
67150
|
+
resolve15.inlineRef = inlineRef;
|
|
67151
|
+
resolve15.schema = resolveSchema;
|
|
67152
|
+
function resolve15(compile, root, ref) {
|
|
67153
67153
|
var refVal = this._refs[ref];
|
|
67154
67154
|
if (typeof refVal == "string") {
|
|
67155
67155
|
if (this._refs[refVal])
|
|
67156
67156
|
refVal = this._refs[refVal];
|
|
67157
67157
|
else
|
|
67158
|
-
return
|
|
67158
|
+
return resolve15.call(this, compile, root, refVal);
|
|
67159
67159
|
}
|
|
67160
67160
|
refVal = refVal || this._schemas[ref];
|
|
67161
67161
|
if (refVal instanceof SchemaObject) {
|
|
@@ -67381,7 +67381,7 @@ var require_resolve = __commonJS2({
|
|
|
67381
67381
|
var require_error_classes = __commonJS2({
|
|
67382
67382
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/error_classes.js"(exports2, module2) {
|
|
67383
67383
|
"use strict";
|
|
67384
|
-
var
|
|
67384
|
+
var resolve15 = require_resolve();
|
|
67385
67385
|
module2.exports = {
|
|
67386
67386
|
Validation: errorSubclass(ValidationError3),
|
|
67387
67387
|
MissingRef: errorSubclass(MissingRefError)
|
|
@@ -67396,8 +67396,8 @@ var require_error_classes = __commonJS2({
|
|
|
67396
67396
|
};
|
|
67397
67397
|
function MissingRefError(baseId, ref, message2) {
|
|
67398
67398
|
this.message = message2 || MissingRefError.message(baseId, ref);
|
|
67399
|
-
this.missingRef =
|
|
67400
|
-
this.missingSchema =
|
|
67399
|
+
this.missingRef = resolve15.url(baseId, ref);
|
|
67400
|
+
this.missingSchema = resolve15.normalizeId(resolve15.fullPath(this.missingRef));
|
|
67401
67401
|
}
|
|
67402
67402
|
function errorSubclass(Subclass) {
|
|
67403
67403
|
Subclass.prototype = Object.create(Error.prototype);
|
|
@@ -67956,7 +67956,7 @@ var require_validate = __commonJS2({
|
|
|
67956
67956
|
var require_compile2 = __commonJS2({
|
|
67957
67957
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/compile/index.js"(exports2, module2) {
|
|
67958
67958
|
"use strict";
|
|
67959
|
-
var
|
|
67959
|
+
var resolve15 = require_resolve();
|
|
67960
67960
|
var util = require_util4();
|
|
67961
67961
|
var errorClasses = require_error_classes();
|
|
67962
67962
|
var stableStringify = require_fast_json_stable_stringify();
|
|
@@ -68016,7 +68016,7 @@ var require_compile2 = __commonJS2({
|
|
|
68016
68016
|
RULES,
|
|
68017
68017
|
validate: validateGenerator,
|
|
68018
68018
|
util,
|
|
68019
|
-
resolve:
|
|
68019
|
+
resolve: resolve15,
|
|
68020
68020
|
resolveRef,
|
|
68021
68021
|
usePattern,
|
|
68022
68022
|
useDefault,
|
|
@@ -68078,7 +68078,7 @@ var require_compile2 = __commonJS2({
|
|
|
68078
68078
|
return validate2;
|
|
68079
68079
|
}
|
|
68080
68080
|
function resolveRef(baseId2, ref, isRoot) {
|
|
68081
|
-
ref =
|
|
68081
|
+
ref = resolve15.url(baseId2, ref);
|
|
68082
68082
|
var refIndex = refs[ref];
|
|
68083
68083
|
var _refVal, refCode;
|
|
68084
68084
|
if (refIndex !== void 0) {
|
|
@@ -68095,11 +68095,11 @@ var require_compile2 = __commonJS2({
|
|
|
68095
68095
|
}
|
|
68096
68096
|
}
|
|
68097
68097
|
refCode = addLocalRef(ref);
|
|
68098
|
-
var v2 =
|
|
68098
|
+
var v2 = resolve15.call(self2, localCompile, root, ref);
|
|
68099
68099
|
if (v2 === void 0) {
|
|
68100
68100
|
var localSchema = localRefs && localRefs[ref];
|
|
68101
68101
|
if (localSchema) {
|
|
68102
|
-
v2 =
|
|
68102
|
+
v2 = resolve15.inlineRef(localSchema, opts.inlineRefs) ? localSchema : compile.call(self2, localSchema, root, localRefs, baseId2);
|
|
68103
68103
|
}
|
|
68104
68104
|
}
|
|
68105
68105
|
if (v2 === void 0) {
|
|
@@ -71734,7 +71734,7 @@ var require_ajv = __commonJS2({
|
|
|
71734
71734
|
"../../node_modules/.pnpm/ajv@6.12.3/node_modules/ajv/lib/ajv.js"(exports2, module2) {
|
|
71735
71735
|
"use strict";
|
|
71736
71736
|
var compileSchema = require_compile2();
|
|
71737
|
-
var
|
|
71737
|
+
var resolve15 = require_resolve();
|
|
71738
71738
|
var Cache = require_cache2();
|
|
71739
71739
|
var SchemaObject = require_schema_obj();
|
|
71740
71740
|
var stableStringify = require_fast_json_stable_stringify();
|
|
@@ -71826,7 +71826,7 @@ var require_ajv = __commonJS2({
|
|
|
71826
71826
|
var id = this._getId(schema);
|
|
71827
71827
|
if (id !== void 0 && typeof id != "string")
|
|
71828
71828
|
throw new Error("schema id must be string");
|
|
71829
|
-
key =
|
|
71829
|
+
key = resolve15.normalizeId(key || id);
|
|
71830
71830
|
checkUnique(this, key);
|
|
71831
71831
|
this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);
|
|
71832
71832
|
return this;
|
|
@@ -71872,7 +71872,7 @@ var require_ajv = __commonJS2({
|
|
|
71872
71872
|
}
|
|
71873
71873
|
}
|
|
71874
71874
|
function _getSchemaFragment(self2, ref) {
|
|
71875
|
-
var res =
|
|
71875
|
+
var res = resolve15.schema.call(self2, { schema: {} }, ref);
|
|
71876
71876
|
if (res) {
|
|
71877
71877
|
var schema = res.schema, root = res.root, baseId = res.baseId;
|
|
71878
71878
|
var v = compileSchema.call(self2, schema, root, void 0, baseId);
|
|
@@ -71888,7 +71888,7 @@ var require_ajv = __commonJS2({
|
|
|
71888
71888
|
}
|
|
71889
71889
|
}
|
|
71890
71890
|
function _getSchemaObj(self2, keyRef) {
|
|
71891
|
-
keyRef =
|
|
71891
|
+
keyRef = resolve15.normalizeId(keyRef);
|
|
71892
71892
|
return self2._schemas[keyRef] || self2._refs[keyRef] || self2._fragments[keyRef];
|
|
71893
71893
|
}
|
|
71894
71894
|
function removeSchema(schemaKeyRef) {
|
|
@@ -71916,7 +71916,7 @@ var require_ajv = __commonJS2({
|
|
|
71916
71916
|
this._cache.del(cacheKey);
|
|
71917
71917
|
var id = this._getId(schemaKeyRef);
|
|
71918
71918
|
if (id) {
|
|
71919
|
-
id =
|
|
71919
|
+
id = resolve15.normalizeId(id);
|
|
71920
71920
|
delete this._schemas[id];
|
|
71921
71921
|
delete this._refs[id];
|
|
71922
71922
|
}
|
|
@@ -71941,14 +71941,14 @@ var require_ajv = __commonJS2({
|
|
|
71941
71941
|
if (cached)
|
|
71942
71942
|
return cached;
|
|
71943
71943
|
shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;
|
|
71944
|
-
var id =
|
|
71944
|
+
var id = resolve15.normalizeId(this._getId(schema));
|
|
71945
71945
|
if (id && shouldAddSchema)
|
|
71946
71946
|
checkUnique(this, id);
|
|
71947
71947
|
var willValidate = this._opts.validateSchema !== false && !skipValidation;
|
|
71948
71948
|
var recursiveMeta;
|
|
71949
|
-
if (willValidate && !(recursiveMeta = id && id ==
|
|
71949
|
+
if (willValidate && !(recursiveMeta = id && id == resolve15.normalizeId(schema.$schema)))
|
|
71950
71950
|
this.validateSchema(schema, true);
|
|
71951
|
-
var localRefs =
|
|
71951
|
+
var localRefs = resolve15.ids.call(this, schema);
|
|
71952
71952
|
var schemaObj = new SchemaObject({
|
|
71953
71953
|
id,
|
|
71954
71954
|
schema,
|
|
@@ -73921,20 +73921,20 @@ ${dirtyResult.reason}`
|
|
|
73921
73921
|
};
|
|
73922
73922
|
}
|
|
73923
73923
|
function getLastCommit(directory) {
|
|
73924
|
-
return new Promise((
|
|
73924
|
+
return new Promise((resolve15, reject) => {
|
|
73925
73925
|
import_git_last_commit.default.getLastCommit(
|
|
73926
73926
|
(err, commit) => {
|
|
73927
73927
|
if (err) {
|
|
73928
73928
|
return reject((0, import_error_utils3.normalizeError)(err));
|
|
73929
73929
|
}
|
|
73930
|
-
|
|
73930
|
+
resolve15(commit);
|
|
73931
73931
|
},
|
|
73932
73932
|
{ dst: directory }
|
|
73933
73933
|
);
|
|
73934
73934
|
});
|
|
73935
73935
|
}
|
|
73936
73936
|
function isDirty(directory) {
|
|
73937
|
-
return new Promise((
|
|
73937
|
+
return new Promise((resolve15, reject) => {
|
|
73938
73938
|
exec(
|
|
73939
73939
|
"git --no-optional-locks status -s",
|
|
73940
73940
|
{ cwd: directory },
|
|
@@ -73945,7 +73945,7 @@ function isDirty(directory) {
|
|
|
73945
73945
|
if (stderr !== void 0 && stderr.trim().length > 0) {
|
|
73946
73946
|
return reject(new Error(stderr));
|
|
73947
73947
|
}
|
|
73948
|
-
|
|
73948
|
+
resolve15(stdout.trim().length > 0);
|
|
73949
73949
|
}
|
|
73950
73950
|
);
|
|
73951
73951
|
});
|
|
@@ -78605,20 +78605,20 @@ var require_parse_async = __commonJS2({
|
|
|
78605
78605
|
const index = 0;
|
|
78606
78606
|
const blocksize = opts.blocksize || 40960;
|
|
78607
78607
|
const parser = new TOMLParser();
|
|
78608
|
-
return new Promise((
|
|
78609
|
-
setImmediate(parseAsyncNext, index, blocksize,
|
|
78608
|
+
return new Promise((resolve15, reject) => {
|
|
78609
|
+
setImmediate(parseAsyncNext, index, blocksize, resolve15, reject);
|
|
78610
78610
|
});
|
|
78611
|
-
function parseAsyncNext(index2, blocksize2,
|
|
78611
|
+
function parseAsyncNext(index2, blocksize2, resolve15, reject) {
|
|
78612
78612
|
if (index2 >= str.length) {
|
|
78613
78613
|
try {
|
|
78614
|
-
return
|
|
78614
|
+
return resolve15(parser.finish());
|
|
78615
78615
|
} catch (err) {
|
|
78616
78616
|
return reject(prettyError(err, str));
|
|
78617
78617
|
}
|
|
78618
78618
|
}
|
|
78619
78619
|
try {
|
|
78620
78620
|
parser.parse(str.slice(index2, index2 + blocksize2));
|
|
78621
|
-
setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2,
|
|
78621
|
+
setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2, resolve15, reject);
|
|
78622
78622
|
} catch (err) {
|
|
78623
78623
|
reject(prettyError(err, str));
|
|
78624
78624
|
}
|
|
@@ -78644,7 +78644,7 @@ var require_parse_stream = __commonJS2({
|
|
|
78644
78644
|
function parseReadable(stm) {
|
|
78645
78645
|
const parser = new TOMLParser();
|
|
78646
78646
|
stm.setEncoding("utf8");
|
|
78647
|
-
return new Promise((
|
|
78647
|
+
return new Promise((resolve15, reject) => {
|
|
78648
78648
|
let readable;
|
|
78649
78649
|
let ended = false;
|
|
78650
78650
|
let errored = false;
|
|
@@ -78653,7 +78653,7 @@ var require_parse_stream = __commonJS2({
|
|
|
78653
78653
|
if (readable)
|
|
78654
78654
|
return;
|
|
78655
78655
|
try {
|
|
78656
|
-
|
|
78656
|
+
resolve15(parser.finish());
|
|
78657
78657
|
} catch (err) {
|
|
78658
78658
|
reject(err);
|
|
78659
78659
|
}
|
|
@@ -82981,6 +82981,62 @@ var require_frameworks = __commonJS2({
|
|
|
82981
82981
|
}
|
|
82982
82982
|
]
|
|
82983
82983
|
},
|
|
82984
|
+
{
|
|
82985
|
+
name: "Go",
|
|
82986
|
+
slug: "go",
|
|
82987
|
+
experimental: true,
|
|
82988
|
+
runtimeFramework: true,
|
|
82989
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/go.svg",
|
|
82990
|
+
tagline: "An open-source programming language supported by Google.",
|
|
82991
|
+
description: "A generic Go application deployed as a serverless function.",
|
|
82992
|
+
website: "https://go.dev",
|
|
82993
|
+
useRuntime: { src: "index.go", use: "@vercel/go" },
|
|
82994
|
+
ignoreRuntimes: ["@vercel/go"],
|
|
82995
|
+
detectors: {
|
|
82996
|
+
every: [
|
|
82997
|
+
{
|
|
82998
|
+
path: "go.mod"
|
|
82999
|
+
}
|
|
83000
|
+
],
|
|
83001
|
+
some: [
|
|
83002
|
+
{
|
|
83003
|
+
path: "main.go"
|
|
83004
|
+
},
|
|
83005
|
+
{
|
|
83006
|
+
path: "cmd/api/main.go"
|
|
83007
|
+
},
|
|
83008
|
+
{
|
|
83009
|
+
path: "cmd/server/main.go"
|
|
83010
|
+
}
|
|
83011
|
+
]
|
|
83012
|
+
},
|
|
83013
|
+
settings: {
|
|
83014
|
+
installCommand: {
|
|
83015
|
+
placeholder: "`go mod download`"
|
|
83016
|
+
},
|
|
83017
|
+
buildCommand: {
|
|
83018
|
+
placeholder: "None",
|
|
83019
|
+
value: null
|
|
83020
|
+
},
|
|
83021
|
+
devCommand: {
|
|
83022
|
+
placeholder: "`go run .` or `go run ./cmd/api`",
|
|
83023
|
+
value: null
|
|
83024
|
+
},
|
|
83025
|
+
outputDirectory: {
|
|
83026
|
+
value: "N/A"
|
|
83027
|
+
}
|
|
83028
|
+
},
|
|
83029
|
+
getOutputDirName: async () => "public",
|
|
83030
|
+
defaultRoutes: [
|
|
83031
|
+
{
|
|
83032
|
+
handle: "filesystem"
|
|
83033
|
+
},
|
|
83034
|
+
{
|
|
83035
|
+
src: "/(.*)",
|
|
83036
|
+
dest: "/"
|
|
83037
|
+
}
|
|
83038
|
+
]
|
|
83039
|
+
},
|
|
82984
83040
|
{
|
|
82985
83041
|
name: "Services",
|
|
82986
83042
|
slug: "services",
|
|
@@ -86472,7 +86528,7 @@ var require_detect_builders = __commonJS2({
|
|
|
86472
86528
|
builders.push(...apiBuilders);
|
|
86473
86529
|
}
|
|
86474
86530
|
if (frontendBuilder) {
|
|
86475
|
-
if (frontendBuilder?.use === "@vercel/express" || frontendBuilder?.use === "@vercel/hono" || frontendBuilder?.use === "@vercel/python") {
|
|
86531
|
+
if (frontendBuilder?.use === "@vercel/express" || frontendBuilder?.use === "@vercel/hono" || frontendBuilder?.use === "@vercel/python" || frontendBuilder?.use === "@vercel/go") {
|
|
86476
86532
|
builders.push({
|
|
86477
86533
|
src: "public/**/*",
|
|
86478
86534
|
use: "@vercel/static",
|
|
@@ -93083,7 +93139,7 @@ var require_get_workspace_package_paths = __commonJS2({
|
|
|
93083
93139
|
async function getPackagePaths(packages, fs15) {
|
|
93084
93140
|
return (await Promise.all(
|
|
93085
93141
|
packages.map(
|
|
93086
|
-
(packageGlob) => new Promise((
|
|
93142
|
+
(packageGlob) => new Promise((resolve15, reject) => {
|
|
93087
93143
|
(0, import_glob.default)(
|
|
93088
93144
|
normalizePath6(posixPath.join(packageGlob, "package.json")),
|
|
93089
93145
|
{
|
|
@@ -93094,7 +93150,7 @@ var require_get_workspace_package_paths = __commonJS2({
|
|
|
93094
93150
|
if (err)
|
|
93095
93151
|
reject(err);
|
|
93096
93152
|
else
|
|
93097
|
-
|
|
93153
|
+
resolve15(matches);
|
|
93098
93154
|
}
|
|
93099
93155
|
);
|
|
93100
93156
|
})
|
|
@@ -94087,15 +94143,16 @@ var init_connect_git_provider = __esm({
|
|
|
94087
94143
|
|
|
94088
94144
|
// src/util/git-helpers.ts
|
|
94089
94145
|
import { execSync } from "child_process";
|
|
94090
|
-
|
|
94146
|
+
import { join as join4, resolve as resolve2 } from "path";
|
|
94147
|
+
function getGitRootDirectory(opts) {
|
|
94091
94148
|
const { cwd, unsafe } = { ...DEFAULT_GIT_EXEC_OPTS, ...opts };
|
|
94092
94149
|
try {
|
|
94093
|
-
const
|
|
94150
|
+
const gitRoot = execSync("git rev-parse --show-toplevel", {
|
|
94094
94151
|
cwd,
|
|
94095
94152
|
encoding: "utf8",
|
|
94096
94153
|
stdio: ["ignore", "pipe", "ignore"]
|
|
94097
94154
|
});
|
|
94098
|
-
return
|
|
94155
|
+
return gitRoot.trim();
|
|
94099
94156
|
} catch (error3) {
|
|
94100
94157
|
if (unsafe) {
|
|
94101
94158
|
throw error3;
|
|
@@ -94103,14 +94160,30 @@ function getGitDirectory(opts) {
|
|
|
94103
94160
|
return null;
|
|
94104
94161
|
}
|
|
94105
94162
|
}
|
|
94106
|
-
function
|
|
94107
|
-
const
|
|
94108
|
-
|
|
94109
|
-
|
|
94163
|
+
function getGitCommonDirectory(opts) {
|
|
94164
|
+
const { cwd, unsafe } = { ...DEFAULT_GIT_EXEC_OPTS, ...opts };
|
|
94165
|
+
try {
|
|
94166
|
+
const gitCommonDir = execSync("git rev-parse --git-common-dir", {
|
|
94167
|
+
cwd,
|
|
94168
|
+
encoding: "utf8",
|
|
94169
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
94170
|
+
});
|
|
94171
|
+
return gitCommonDir.trim();
|
|
94172
|
+
} catch (error3) {
|
|
94173
|
+
if (unsafe) {
|
|
94174
|
+
throw error3;
|
|
94175
|
+
}
|
|
94176
|
+
return null;
|
|
94177
|
+
}
|
|
94178
|
+
}
|
|
94179
|
+
function getGitConfigPath(opts) {
|
|
94180
|
+
const { cwd } = { ...DEFAULT_GIT_EXEC_OPTS, ...opts };
|
|
94181
|
+
const gitCommonDir = getGitCommonDirectory(opts);
|
|
94182
|
+
if (gitCommonDir === null) {
|
|
94183
|
+
return null;
|
|
94110
94184
|
}
|
|
94111
|
-
const
|
|
94112
|
-
|
|
94113
|
-
return isGitWorktree || isGitSubmodule;
|
|
94185
|
+
const absoluteGitCommonDir = resolve2(cwd, gitCommonDir);
|
|
94186
|
+
return join4(absoluteGitCommonDir, "config");
|
|
94114
94187
|
}
|
|
94115
94188
|
var DEFAULT_GIT_EXEC_OPTS;
|
|
94116
94189
|
var init_git_helpers = __esm({
|
|
@@ -94124,13 +94197,13 @@ var init_git_helpers = __esm({
|
|
|
94124
94197
|
|
|
94125
94198
|
// src/util/link/repo.ts
|
|
94126
94199
|
import { homedir as homedir3 } from "os";
|
|
94127
|
-
import { basename, join as
|
|
94200
|
+
import { basename, join as join5, normalize } from "path";
|
|
94128
94201
|
import { normalizePath, traverseUpDirectories } from "@vercel/build-utils";
|
|
94129
94202
|
async function getRepoLink(client2, cwd) {
|
|
94130
|
-
const rootPath = await findRepoRoot(
|
|
94203
|
+
const rootPath = await findRepoRoot(cwd);
|
|
94131
94204
|
if (!rootPath)
|
|
94132
94205
|
return void 0;
|
|
94133
|
-
const repoConfigPath =
|
|
94206
|
+
const repoConfigPath = join5(rootPath, VERCEL_DIR, VERCEL_DIR_REPO);
|
|
94134
94207
|
const repoConfig = await (0, import_fs_extra4.readJSON)(repoConfigPath).catch(
|
|
94135
94208
|
(err) => {
|
|
94136
94209
|
if (err.code !== "ENOENT")
|
|
@@ -94169,7 +94242,8 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
94169
94242
|
yes
|
|
94170
94243
|
);
|
|
94171
94244
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
94172
|
-
const
|
|
94245
|
+
const gitConfigPath = getGitConfigPath({ cwd: rootPath }) ?? join5(rootPath, ".git/config");
|
|
94246
|
+
const remoteUrls = await getRemoteUrls(gitConfigPath);
|
|
94173
94247
|
if (!remoteUrls) {
|
|
94174
94248
|
throw new Error("Could not determine Git remote URLs");
|
|
94175
94249
|
}
|
|
@@ -94350,17 +94424,16 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
94350
94424
|
rootPath
|
|
94351
94425
|
};
|
|
94352
94426
|
}
|
|
94353
|
-
async function findRepoRoot(
|
|
94427
|
+
async function findRepoRoot(start) {
|
|
94354
94428
|
const { debug: debug2 } = output_manager_default;
|
|
94355
|
-
const REPO_JSON_PATH =
|
|
94356
|
-
const GIT_PATH = isGitWorktreeOrSubmodule({ cwd: client2.cwd }) ? normalize(".git") : normalize(".git/config");
|
|
94429
|
+
const REPO_JSON_PATH = join5(VERCEL_DIR, VERCEL_DIR_REPO);
|
|
94357
94430
|
for (const current of traverseUpDirectories({ start })) {
|
|
94358
94431
|
if (current === home) {
|
|
94359
94432
|
debug2("Arrived at home directory");
|
|
94360
94433
|
break;
|
|
94361
94434
|
}
|
|
94362
|
-
const repoConfigPath =
|
|
94363
|
-
|
|
94435
|
+
const repoConfigPath = join5(current, REPO_JSON_PATH);
|
|
94436
|
+
const stat2 = await (0, import_fs_extra4.lstat)(repoConfigPath).catch((err) => {
|
|
94364
94437
|
if (err.code !== "ENOENT")
|
|
94365
94438
|
throw err;
|
|
94366
94439
|
});
|
|
@@ -94368,13 +94441,26 @@ async function findRepoRoot(client2, start) {
|
|
|
94368
94441
|
debug2(`Found "${REPO_JSON_PATH}" - detected "${current}" as repo root`);
|
|
94369
94442
|
return current;
|
|
94370
94443
|
}
|
|
94371
|
-
|
|
94372
|
-
|
|
94444
|
+
}
|
|
94445
|
+
const gitRoot = getGitRootDirectory({ cwd: start });
|
|
94446
|
+
if (gitRoot) {
|
|
94447
|
+
debug2(
|
|
94448
|
+
`Found git root via "git rev-parse --show-toplevel" - detected "${gitRoot}" as repo root`
|
|
94449
|
+
);
|
|
94450
|
+
return gitRoot;
|
|
94451
|
+
}
|
|
94452
|
+
for (const current of traverseUpDirectories({ start })) {
|
|
94453
|
+
if (current === home) {
|
|
94454
|
+
debug2("Arrived at home directory");
|
|
94455
|
+
break;
|
|
94456
|
+
}
|
|
94457
|
+
const gitPath = join5(current, ".git");
|
|
94458
|
+
const stat2 = await (0, import_fs_extra4.lstat)(gitPath).catch((err) => {
|
|
94373
94459
|
if (err.code !== "ENOENT")
|
|
94374
94460
|
throw err;
|
|
94375
94461
|
});
|
|
94376
94462
|
if (stat2) {
|
|
94377
|
-
debug2(`Found "
|
|
94463
|
+
debug2(`Found ".git" - detected "${current}" as repo root`);
|
|
94378
94464
|
return current;
|
|
94379
94465
|
}
|
|
94380
94466
|
}
|
|
@@ -94729,7 +94815,7 @@ var init_parse_target = __esm({
|
|
|
94729
94815
|
|
|
94730
94816
|
// src/commands/env/pull.ts
|
|
94731
94817
|
import { closeSync, openSync, readSync } from "fs";
|
|
94732
|
-
import { resolve as
|
|
94818
|
+
import { resolve as resolve3 } from "path";
|
|
94733
94819
|
function readHeadSync(path12, length) {
|
|
94734
94820
|
const buffer = Buffer.alloc(length);
|
|
94735
94821
|
const fd = openSync(path12, "r");
|
|
@@ -94807,7 +94893,7 @@ async function pull(client2, argv, source = "vercel-cli:env:pull") {
|
|
|
94807
94893
|
return 0;
|
|
94808
94894
|
}
|
|
94809
94895
|
async function envPullCommandLogic(client2, filename, skipConfirmation, environment, link4, gitBranch, cwd, source) {
|
|
94810
|
-
const fullPath =
|
|
94896
|
+
const fullPath = resolve3(cwd, filename);
|
|
94811
94897
|
const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
|
|
94812
94898
|
const exists = typeof head !== "undefined";
|
|
94813
94899
|
if (head === CONTENTS_PREFIX) {
|
|
@@ -94915,11 +95001,11 @@ __export3(link_exports, {
|
|
|
94915
95001
|
writeReadme: () => writeReadme
|
|
94916
95002
|
});
|
|
94917
95003
|
import fs3 from "fs";
|
|
94918
|
-
import { join as
|
|
95004
|
+
import { join as join6, relative as relative2 } from "path";
|
|
94919
95005
|
import { promisify } from "util";
|
|
94920
95006
|
import { NowBuildError as NowBuildError2, getPlatformEnv } from "@vercel/build-utils";
|
|
94921
95007
|
function getVercelDirectory(cwd) {
|
|
94922
|
-
const possibleDirs = [
|
|
95008
|
+
const possibleDirs = [join6(cwd, VERCEL_DIR), join6(cwd, VERCEL_DIR_FALLBACK)];
|
|
94923
95009
|
const existingDirs = possibleDirs.filter((d) => isDirectory(d));
|
|
94924
95010
|
if (existingDirs.length > 1) {
|
|
94925
95011
|
throw new NowBuildError2({
|
|
@@ -94967,7 +95053,7 @@ async function getProjectLinkFromRepoLink(client2, path12) {
|
|
|
94967
95053
|
}
|
|
94968
95054
|
async function getLinkFromDir(dir) {
|
|
94969
95055
|
try {
|
|
94970
|
-
const json = await readFile3(
|
|
95056
|
+
const json = await readFile3(join6(dir, VERCEL_DIR_PROJECT), "utf8");
|
|
94971
95057
|
const ajv2 = new import_ajv.default();
|
|
94972
95058
|
const link4 = JSON.parse(json);
|
|
94973
95059
|
if (!ajv2.validate(linkSchema, link4)) {
|
|
@@ -95081,8 +95167,8 @@ async function getLinkedProject(client2, path12 = client2.cwd) {
|
|
|
95081
95167
|
}
|
|
95082
95168
|
async function writeReadme(path12) {
|
|
95083
95169
|
await writeFile2(
|
|
95084
|
-
|
|
95085
|
-
await readFile3(
|
|
95170
|
+
join6(path12, VERCEL_DIR, VERCEL_DIR_README),
|
|
95171
|
+
await readFile3(join6(__dirname, "VERCEL_DIR_README.txt"), "utf8")
|
|
95086
95172
|
);
|
|
95087
95173
|
}
|
|
95088
95174
|
async function linkFolderToProject(client2, path12, projectLink, projectName, orgSlug, successEmoji = "link", autoConfirm = false, shouldPullEnv = true) {
|
|
@@ -95090,7 +95176,7 @@ async function linkFolderToProject(client2, path12, projectLink, projectName, or
|
|
|
95090
95176
|
return;
|
|
95091
95177
|
}
|
|
95092
95178
|
try {
|
|
95093
|
-
await (0, import_fs_extra7.ensureDir)(
|
|
95179
|
+
await (0, import_fs_extra7.ensureDir)(join6(path12, VERCEL_DIR));
|
|
95094
95180
|
} catch (err) {
|
|
95095
95181
|
if ((0, import_error_utils5.isErrnoException)(err) && err.code === "ENOTDIR") {
|
|
95096
95182
|
return;
|
|
@@ -95098,7 +95184,7 @@ async function linkFolderToProject(client2, path12, projectLink, projectName, or
|
|
|
95098
95184
|
throw err;
|
|
95099
95185
|
}
|
|
95100
95186
|
await writeFile2(
|
|
95101
|
-
|
|
95187
|
+
join6(path12, VERCEL_DIR, VERCEL_DIR_PROJECT),
|
|
95102
95188
|
JSON.stringify({
|
|
95103
95189
|
...projectLink,
|
|
95104
95190
|
projectName
|
|
@@ -95287,7 +95373,7 @@ __export3(compile_vercel_config_exports, {
|
|
|
95287
95373
|
normalizeConfig: () => normalizeConfig
|
|
95288
95374
|
});
|
|
95289
95375
|
import { mkdir, writeFile as writeFile3, unlink, access } from "fs/promises";
|
|
95290
|
-
import { join as
|
|
95376
|
+
import { join as join7, basename as basename2 } from "path";
|
|
95291
95377
|
import { fork } from "child_process";
|
|
95292
95378
|
import { NowBuildError as NowBuildError3 } from "@vercel/build-utils";
|
|
95293
95379
|
function toRouteFormat(item) {
|
|
@@ -95363,7 +95449,7 @@ async function fileExists(filePath) {
|
|
|
95363
95449
|
async function findAllVercelConfigFiles(workPath) {
|
|
95364
95450
|
const foundFiles = [];
|
|
95365
95451
|
for (const ext of VERCEL_CONFIG_EXTENSIONS) {
|
|
95366
|
-
const configPath =
|
|
95452
|
+
const configPath = join7(workPath, `vercel.${ext}`);
|
|
95367
95453
|
if (await fileExists(configPath)) {
|
|
95368
95454
|
foundFiles.push(configPath);
|
|
95369
95455
|
}
|
|
@@ -95372,7 +95458,7 @@ async function findAllVercelConfigFiles(workPath) {
|
|
|
95372
95458
|
}
|
|
95373
95459
|
async function findSourceVercelConfigFile(workPath) {
|
|
95374
95460
|
for (const ext of VERCEL_CONFIG_EXTENSIONS) {
|
|
95375
|
-
const configPath =
|
|
95461
|
+
const configPath = join7(workPath, `vercel.${ext}`);
|
|
95376
95462
|
if (await fileExists(configPath)) {
|
|
95377
95463
|
return basename2(configPath);
|
|
95378
95464
|
}
|
|
@@ -95414,16 +95500,16 @@ function parseConfigLoaderError(stderr) {
|
|
|
95414
95500
|
return stderr.trim();
|
|
95415
95501
|
}
|
|
95416
95502
|
async function compileVercelConfig(workPath) {
|
|
95417
|
-
const vercelJsonPath =
|
|
95418
|
-
const nowJsonPath =
|
|
95503
|
+
const vercelJsonPath = join7(workPath, "vercel.json");
|
|
95504
|
+
const nowJsonPath = join7(workPath, "now.json");
|
|
95419
95505
|
const hasVercelJson = await fileExists(vercelJsonPath);
|
|
95420
95506
|
const hasNowJson = await fileExists(nowJsonPath);
|
|
95421
95507
|
if (hasVercelJson && hasNowJson) {
|
|
95422
95508
|
throw new ConflictingConfigFiles([vercelJsonPath, nowJsonPath]);
|
|
95423
95509
|
}
|
|
95424
95510
|
const vercelConfigPath = await findVercelConfigFile(workPath);
|
|
95425
|
-
const vercelDir =
|
|
95426
|
-
const compiledConfigPath =
|
|
95511
|
+
const vercelDir = join7(workPath, VERCEL_DIR);
|
|
95512
|
+
const compiledConfigPath = join7(vercelDir, "vercel.json");
|
|
95427
95513
|
if (vercelConfigPath && hasNowJson) {
|
|
95428
95514
|
throw new ConflictingConfigFiles(
|
|
95429
95515
|
[vercelConfigPath, nowJsonPath],
|
|
@@ -95463,10 +95549,10 @@ async function compileVercelConfig(workPath) {
|
|
|
95463
95549
|
wasCompiled: false
|
|
95464
95550
|
};
|
|
95465
95551
|
}
|
|
95466
|
-
(0, import_dotenv.config)({ path:
|
|
95467
|
-
(0, import_dotenv.config)({ path:
|
|
95468
|
-
const tempOutPath =
|
|
95469
|
-
const loaderPath =
|
|
95552
|
+
(0, import_dotenv.config)({ path: join7(workPath, ".env") });
|
|
95553
|
+
(0, import_dotenv.config)({ path: join7(workPath, ".env.local") });
|
|
95554
|
+
const tempOutPath = join7(vercelDir, "vercel-temp.mjs");
|
|
95555
|
+
const loaderPath = join7(vercelDir, "vercel-loader.mjs");
|
|
95470
95556
|
try {
|
|
95471
95557
|
const { build: build2 } = await import("esbuild");
|
|
95472
95558
|
await mkdir(vercelDir, { recursive: true });
|
|
@@ -95487,7 +95573,7 @@ async function compileVercelConfig(workPath) {
|
|
|
95487
95573
|
process.send(config);
|
|
95488
95574
|
`;
|
|
95489
95575
|
await writeFile3(loaderPath, loaderScript, "utf-8");
|
|
95490
|
-
const config2 = await new Promise((
|
|
95576
|
+
const config2 = await new Promise((resolve15, reject) => {
|
|
95491
95577
|
const child = fork(loaderPath, [tempOutPath], {
|
|
95492
95578
|
stdio: ["pipe", "pipe", "pipe", "ipc"]
|
|
95493
95579
|
});
|
|
@@ -95510,7 +95596,7 @@ async function compileVercelConfig(workPath) {
|
|
|
95510
95596
|
child.on("message", (message2) => {
|
|
95511
95597
|
clearTimeout(timeout);
|
|
95512
95598
|
child.kill();
|
|
95513
|
-
|
|
95599
|
+
resolve15(message2);
|
|
95514
95600
|
});
|
|
95515
95601
|
child.on("error", (err) => {
|
|
95516
95602
|
clearTimeout(timeout);
|
|
@@ -95570,9 +95656,9 @@ async function compileVercelConfig(workPath) {
|
|
|
95570
95656
|
}
|
|
95571
95657
|
}
|
|
95572
95658
|
async function getVercelConfigPath(workPath) {
|
|
95573
|
-
const vercelJsonPath =
|
|
95574
|
-
const nowJsonPath =
|
|
95575
|
-
const compiledConfigPath =
|
|
95659
|
+
const vercelJsonPath = join7(workPath, "vercel.json");
|
|
95660
|
+
const nowJsonPath = join7(workPath, "now.json");
|
|
95661
|
+
const compiledConfigPath = join7(workPath, VERCEL_DIR, "vercel.json");
|
|
95576
95662
|
if (await fileExists(vercelJsonPath)) {
|
|
95577
95663
|
return vercelJsonPath;
|
|
95578
95664
|
}
|
|
@@ -95604,7 +95690,7 @@ var init_compile_vercel_config = __esm({
|
|
|
95604
95690
|
});
|
|
95605
95691
|
|
|
95606
95692
|
// src/util/config/files.ts
|
|
95607
|
-
import { join as
|
|
95693
|
+
import { join as join8, basename as basename3, dirname as dirname2 } from "path";
|
|
95608
95694
|
import { accessSync, constants } from "fs";
|
|
95609
95695
|
function getConfigFilePath() {
|
|
95610
95696
|
return CONFIG_FILE_PATH;
|
|
@@ -95653,7 +95739,7 @@ function readLocalConfig(prefix = process.cwd()) {
|
|
|
95653
95739
|
const workPath = dirname2(dirname2(target));
|
|
95654
95740
|
let sourceFile = null;
|
|
95655
95741
|
for (const ext of VERCEL_CONFIG_EXTENSIONS) {
|
|
95656
|
-
const configPath =
|
|
95742
|
+
const configPath = join8(workPath, `vercel.${ext}`);
|
|
95657
95743
|
try {
|
|
95658
95744
|
accessSync(configPath, constants.F_OK);
|
|
95659
95745
|
sourceFile = basename3(configPath);
|
|
@@ -95683,8 +95769,8 @@ var init_files = __esm({
|
|
|
95683
95769
|
init_compile_vercel_config();
|
|
95684
95770
|
init_output_manager();
|
|
95685
95771
|
VERCEL_DIR2 = global_path_default();
|
|
95686
|
-
CONFIG_FILE_PATH =
|
|
95687
|
-
AUTH_CONFIG_FILE_PATH =
|
|
95772
|
+
CONFIG_FILE_PATH = join8(VERCEL_DIR2, "config.json");
|
|
95773
|
+
AUTH_CONFIG_FILE_PATH = join8(VERCEL_DIR2, "auth.json");
|
|
95688
95774
|
readConfigFile = () => {
|
|
95689
95775
|
const config2 = import_load_json_file.default.sync(CONFIG_FILE_PATH);
|
|
95690
95776
|
return config2;
|
|
@@ -95771,8 +95857,8 @@ var init_promise = __esm({
|
|
|
95771
95857
|
|
|
95772
95858
|
// src/util/sleep.ts
|
|
95773
95859
|
function sleep(ms36) {
|
|
95774
|
-
return new Promise((
|
|
95775
|
-
setTimeout(
|
|
95860
|
+
return new Promise((resolve15) => {
|
|
95861
|
+
setTimeout(resolve15, ms36);
|
|
95776
95862
|
});
|
|
95777
95863
|
}
|
|
95778
95864
|
var init_sleep = __esm({
|
|
@@ -96163,12 +96249,12 @@ var init_read_json_file = __esm({
|
|
|
96163
96249
|
});
|
|
96164
96250
|
|
|
96165
96251
|
// src/util/get-update-command.ts
|
|
96166
|
-
import { sep, dirname as dirname3, join as
|
|
96252
|
+
import { sep, dirname as dirname3, join as join9, resolve as resolve4 } from "path";
|
|
96167
96253
|
import { scanParentDirs } from "@vercel/build-utils";
|
|
96168
96254
|
async function getConfigPrefix() {
|
|
96169
96255
|
const paths = [
|
|
96170
96256
|
process.env.npm_config_userconfig || process.env.NPM_CONFIG_USERCONFIG,
|
|
96171
|
-
|
|
96257
|
+
join9(process.env.HOME || "/", ".npmrc"),
|
|
96172
96258
|
process.env.npm_config_globalconfig || process.env.NPM_CONFIG_GLOBALCONFIG
|
|
96173
96259
|
].filter(Boolean);
|
|
96174
96260
|
for (const configPath of paths) {
|
|
@@ -96192,7 +96278,7 @@ async function isGlobal() {
|
|
|
96192
96278
|
}
|
|
96193
96279
|
const isWindows = process.platform === "win32";
|
|
96194
96280
|
const defaultPath = isWindows ? process.env.APPDATA : "/usr/local/lib";
|
|
96195
|
-
const installPath = await (0, import_fs_extra9.realpath)(
|
|
96281
|
+
const installPath = await (0, import_fs_extra9.realpath)(resolve4(__dirname));
|
|
96196
96282
|
if (installPath.includes(["", "yarn", "global", "node_modules", ""].join(sep))) {
|
|
96197
96283
|
return true;
|
|
96198
96284
|
}
|
|
@@ -96247,7 +96333,7 @@ async function executeUpgrade() {
|
|
|
96247
96333
|
const [command, ...args2] = updateCommand.split(" ");
|
|
96248
96334
|
output_manager_default.log(`Upgrading Vercel CLI...`);
|
|
96249
96335
|
output_manager_default.debug(`Executing: ${updateCommand}`);
|
|
96250
|
-
return new Promise((
|
|
96336
|
+
return new Promise((resolve15) => {
|
|
96251
96337
|
const stdout = [];
|
|
96252
96338
|
const stderr = [];
|
|
96253
96339
|
const upgradeProcess = spawn3(command, args2, {
|
|
@@ -96263,7 +96349,7 @@ async function executeUpgrade() {
|
|
|
96263
96349
|
upgradeProcess.on("error", (err) => {
|
|
96264
96350
|
output_manager_default.error(`Failed to execute upgrade command: ${err.message}`);
|
|
96265
96351
|
output_manager_default.log(`You can try running the command manually: ${updateCommand}`);
|
|
96266
|
-
|
|
96352
|
+
resolve15(1);
|
|
96267
96353
|
});
|
|
96268
96354
|
upgradeProcess.on("close", (code2) => {
|
|
96269
96355
|
if (code2 === 0) {
|
|
@@ -96282,7 +96368,7 @@ async function executeUpgrade() {
|
|
|
96282
96368
|
`You can try running the command manually: ${updateCommand}`
|
|
96283
96369
|
);
|
|
96284
96370
|
}
|
|
96285
|
-
|
|
96371
|
+
resolve15(code2 ?? 1);
|
|
96286
96372
|
});
|
|
96287
96373
|
});
|
|
96288
96374
|
}
|
|
@@ -97376,8 +97462,8 @@ var require_helpers = __commonJS2({
|
|
|
97376
97462
|
function req(url3, opts = {}) {
|
|
97377
97463
|
const href = typeof url3 === "string" ? url3 : url3.href;
|
|
97378
97464
|
const req2 = (href.startsWith("https:") ? https : http3).request(url3, opts);
|
|
97379
|
-
const promise = new Promise((
|
|
97380
|
-
req2.once("response",
|
|
97465
|
+
const promise = new Promise((resolve15, reject) => {
|
|
97466
|
+
req2.once("response", resolve15).once("error", reject).end();
|
|
97381
97467
|
});
|
|
97382
97468
|
req2.then = promise.then.bind(promise);
|
|
97383
97469
|
return req2;
|
|
@@ -100028,7 +100114,7 @@ var require_netUtils = __commonJS2({
|
|
|
100028
100114
|
}
|
|
100029
100115
|
exports2.describeAddress = describeAddress;
|
|
100030
100116
|
function upgradeSocket(socket, options) {
|
|
100031
|
-
return new Promise((
|
|
100117
|
+
return new Promise((resolve15, reject) => {
|
|
100032
100118
|
const tlsOptions = Object.assign({}, options, {
|
|
100033
100119
|
socket
|
|
100034
100120
|
});
|
|
@@ -100038,7 +100124,7 @@ var require_netUtils = __commonJS2({
|
|
|
100038
100124
|
reject(tlsSocket.authorizationError);
|
|
100039
100125
|
} else {
|
|
100040
100126
|
tlsSocket.removeAllListeners("error");
|
|
100041
|
-
|
|
100127
|
+
resolve15(tlsSocket);
|
|
100042
100128
|
}
|
|
100043
100129
|
}).once("error", (error3) => {
|
|
100044
100130
|
reject(error3);
|
|
@@ -100119,7 +100205,7 @@ var require_transfer = __commonJS2({
|
|
|
100119
100205
|
}
|
|
100120
100206
|
exports2.parsePasvResponse = parsePasvResponse;
|
|
100121
100207
|
function connectForPassiveTransfer(host, port, ftp) {
|
|
100122
|
-
return new Promise((
|
|
100208
|
+
return new Promise((resolve15, reject) => {
|
|
100123
100209
|
let socket = ftp._newSocket();
|
|
100124
100210
|
const handleConnErr = function(err) {
|
|
100125
100211
|
err.message = "Can't open data connection in passive mode: " + err.message;
|
|
@@ -100147,7 +100233,7 @@ var require_transfer = __commonJS2({
|
|
|
100147
100233
|
socket.removeListener("error", handleConnErr);
|
|
100148
100234
|
socket.removeListener("timeout", handleTimeout);
|
|
100149
100235
|
ftp.dataSocket = socket;
|
|
100150
|
-
|
|
100236
|
+
resolve15();
|
|
100151
100237
|
});
|
|
100152
100238
|
});
|
|
100153
100239
|
}
|
|
@@ -102540,7 +102626,7 @@ var require_util6 = __commonJS2({
|
|
|
102540
102626
|
return path12;
|
|
102541
102627
|
}
|
|
102542
102628
|
exports2.normalize = normalize4;
|
|
102543
|
-
function
|
|
102629
|
+
function join27(aRoot, aPath) {
|
|
102544
102630
|
if (aRoot === "") {
|
|
102545
102631
|
aRoot = ".";
|
|
102546
102632
|
}
|
|
@@ -102572,7 +102658,7 @@ var require_util6 = __commonJS2({
|
|
|
102572
102658
|
}
|
|
102573
102659
|
return joined;
|
|
102574
102660
|
}
|
|
102575
|
-
exports2.join =
|
|
102661
|
+
exports2.join = join27;
|
|
102576
102662
|
exports2.isAbsolute = function(aPath) {
|
|
102577
102663
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
102578
102664
|
};
|
|
@@ -102745,7 +102831,7 @@ var require_util6 = __commonJS2({
|
|
|
102745
102831
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
102746
102832
|
}
|
|
102747
102833
|
}
|
|
102748
|
-
sourceURL =
|
|
102834
|
+
sourceURL = join27(urlGenerate(parsed), sourceURL);
|
|
102749
102835
|
}
|
|
102750
102836
|
return normalize4(sourceURL);
|
|
102751
102837
|
}
|
|
@@ -104548,7 +104634,7 @@ var require_escodegen = __commonJS2({
|
|
|
104548
104634
|
function noEmptySpace() {
|
|
104549
104635
|
return space ? space : " ";
|
|
104550
104636
|
}
|
|
104551
|
-
function
|
|
104637
|
+
function join27(left, right) {
|
|
104552
104638
|
var leftSource, rightSource, leftCharCode, rightCharCode;
|
|
104553
104639
|
leftSource = toSourceNodeWhenNeeded(left).toString();
|
|
104554
104640
|
if (leftSource.length === 0) {
|
|
@@ -104879,8 +104965,8 @@ var require_escodegen = __commonJS2({
|
|
|
104879
104965
|
} else {
|
|
104880
104966
|
result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
|
|
104881
104967
|
}
|
|
104882
|
-
result =
|
|
104883
|
-
result = [
|
|
104968
|
+
result = join27(result, operator);
|
|
104969
|
+
result = [join27(
|
|
104884
104970
|
result,
|
|
104885
104971
|
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
|
|
104886
104972
|
), ")"];
|
|
@@ -105023,11 +105109,11 @@ var require_escodegen = __commonJS2({
|
|
|
105023
105109
|
var result, fragment;
|
|
105024
105110
|
result = ["class"];
|
|
105025
105111
|
if (stmt.id) {
|
|
105026
|
-
result =
|
|
105112
|
+
result = join27(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
|
|
105027
105113
|
}
|
|
105028
105114
|
if (stmt.superClass) {
|
|
105029
|
-
fragment =
|
|
105030
|
-
result =
|
|
105115
|
+
fragment = join27("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
|
|
105116
|
+
result = join27(result, fragment);
|
|
105031
105117
|
}
|
|
105032
105118
|
result.push(space);
|
|
105033
105119
|
result.push(this.generateStatement(stmt.body, S_TFFT));
|
|
@@ -105040,9 +105126,9 @@ var require_escodegen = __commonJS2({
|
|
|
105040
105126
|
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
105041
105127
|
},
|
|
105042
105128
|
DoWhileStatement: function(stmt, flags) {
|
|
105043
|
-
var result =
|
|
105129
|
+
var result = join27("do", this.maybeBlock(stmt.body, S_TFFF));
|
|
105044
105130
|
result = this.maybeBlockSuffix(stmt.body, result);
|
|
105045
|
-
return
|
|
105131
|
+
return join27(result, [
|
|
105046
105132
|
"while" + space + "(",
|
|
105047
105133
|
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
105048
105134
|
")" + this.semicolon(flags)
|
|
@@ -105078,11 +105164,11 @@ var require_escodegen = __commonJS2({
|
|
|
105078
105164
|
ExportDefaultDeclaration: function(stmt, flags) {
|
|
105079
105165
|
var result = ["export"], bodyFlags;
|
|
105080
105166
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
105081
|
-
result =
|
|
105167
|
+
result = join27(result, "default");
|
|
105082
105168
|
if (isStatement(stmt.declaration)) {
|
|
105083
|
-
result =
|
|
105169
|
+
result = join27(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
105084
105170
|
} else {
|
|
105085
|
-
result =
|
|
105171
|
+
result = join27(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
|
105086
105172
|
}
|
|
105087
105173
|
return result;
|
|
105088
105174
|
},
|
|
@@ -105090,15 +105176,15 @@ var require_escodegen = __commonJS2({
|
|
|
105090
105176
|
var result = ["export"], bodyFlags, that = this;
|
|
105091
105177
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
105092
105178
|
if (stmt.declaration) {
|
|
105093
|
-
return
|
|
105179
|
+
return join27(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
105094
105180
|
}
|
|
105095
105181
|
if (stmt.specifiers) {
|
|
105096
105182
|
if (stmt.specifiers.length === 0) {
|
|
105097
|
-
result =
|
|
105183
|
+
result = join27(result, "{" + space + "}");
|
|
105098
105184
|
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
|
105099
|
-
result =
|
|
105185
|
+
result = join27(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
|
105100
105186
|
} else {
|
|
105101
|
-
result =
|
|
105187
|
+
result = join27(result, "{");
|
|
105102
105188
|
withIndent(function(indent2) {
|
|
105103
105189
|
var i, iz;
|
|
105104
105190
|
result.push(newline);
|
|
@@ -105116,7 +105202,7 @@ var require_escodegen = __commonJS2({
|
|
|
105116
105202
|
result.push(base + "}");
|
|
105117
105203
|
}
|
|
105118
105204
|
if (stmt.source) {
|
|
105119
|
-
result =
|
|
105205
|
+
result = join27(result, [
|
|
105120
105206
|
"from" + space,
|
|
105121
105207
|
// ModuleSpecifier
|
|
105122
105208
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -105204,7 +105290,7 @@ var require_escodegen = __commonJS2({
|
|
|
105204
105290
|
];
|
|
105205
105291
|
cursor = 0;
|
|
105206
105292
|
if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
|
|
105207
|
-
result =
|
|
105293
|
+
result = join27(result, [
|
|
105208
105294
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
105209
105295
|
]);
|
|
105210
105296
|
++cursor;
|
|
@@ -105214,7 +105300,7 @@ var require_escodegen = __commonJS2({
|
|
|
105214
105300
|
result.push(",");
|
|
105215
105301
|
}
|
|
105216
105302
|
if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
|
|
105217
|
-
result =
|
|
105303
|
+
result = join27(result, [
|
|
105218
105304
|
space,
|
|
105219
105305
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
105220
105306
|
]);
|
|
@@ -105243,7 +105329,7 @@ var require_escodegen = __commonJS2({
|
|
|
105243
105329
|
}
|
|
105244
105330
|
}
|
|
105245
105331
|
}
|
|
105246
|
-
result =
|
|
105332
|
+
result = join27(result, [
|
|
105247
105333
|
"from" + space,
|
|
105248
105334
|
// ModuleSpecifier
|
|
105249
105335
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -105297,7 +105383,7 @@ var require_escodegen = __commonJS2({
|
|
|
105297
105383
|
return result;
|
|
105298
105384
|
},
|
|
105299
105385
|
ThrowStatement: function(stmt, flags) {
|
|
105300
|
-
return [
|
|
105386
|
+
return [join27(
|
|
105301
105387
|
"throw",
|
|
105302
105388
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
105303
105389
|
), this.semicolon(flags)];
|
|
@@ -105308,7 +105394,7 @@ var require_escodegen = __commonJS2({
|
|
|
105308
105394
|
result = this.maybeBlockSuffix(stmt.block, result);
|
|
105309
105395
|
if (stmt.handlers) {
|
|
105310
105396
|
for (i = 0, iz = stmt.handlers.length; i < iz; ++i) {
|
|
105311
|
-
result =
|
|
105397
|
+
result = join27(result, this.generateStatement(stmt.handlers[i], S_TFFF));
|
|
105312
105398
|
if (stmt.finalizer || i + 1 !== iz) {
|
|
105313
105399
|
result = this.maybeBlockSuffix(stmt.handlers[i].body, result);
|
|
105314
105400
|
}
|
|
@@ -105316,7 +105402,7 @@ var require_escodegen = __commonJS2({
|
|
|
105316
105402
|
} else {
|
|
105317
105403
|
guardedHandlers = stmt.guardedHandlers || [];
|
|
105318
105404
|
for (i = 0, iz = guardedHandlers.length; i < iz; ++i) {
|
|
105319
|
-
result =
|
|
105405
|
+
result = join27(result, this.generateStatement(guardedHandlers[i], S_TFFF));
|
|
105320
105406
|
if (stmt.finalizer || i + 1 !== iz) {
|
|
105321
105407
|
result = this.maybeBlockSuffix(guardedHandlers[i].body, result);
|
|
105322
105408
|
}
|
|
@@ -105324,13 +105410,13 @@ var require_escodegen = __commonJS2({
|
|
|
105324
105410
|
if (stmt.handler) {
|
|
105325
105411
|
if (Array.isArray(stmt.handler)) {
|
|
105326
105412
|
for (i = 0, iz = stmt.handler.length; i < iz; ++i) {
|
|
105327
|
-
result =
|
|
105413
|
+
result = join27(result, this.generateStatement(stmt.handler[i], S_TFFF));
|
|
105328
105414
|
if (stmt.finalizer || i + 1 !== iz) {
|
|
105329
105415
|
result = this.maybeBlockSuffix(stmt.handler[i].body, result);
|
|
105330
105416
|
}
|
|
105331
105417
|
}
|
|
105332
105418
|
} else {
|
|
105333
|
-
result =
|
|
105419
|
+
result = join27(result, this.generateStatement(stmt.handler, S_TFFF));
|
|
105334
105420
|
if (stmt.finalizer) {
|
|
105335
105421
|
result = this.maybeBlockSuffix(stmt.handler.body, result);
|
|
105336
105422
|
}
|
|
@@ -105338,7 +105424,7 @@ var require_escodegen = __commonJS2({
|
|
|
105338
105424
|
}
|
|
105339
105425
|
}
|
|
105340
105426
|
if (stmt.finalizer) {
|
|
105341
|
-
result =
|
|
105427
|
+
result = join27(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
|
105342
105428
|
}
|
|
105343
105429
|
return result;
|
|
105344
105430
|
},
|
|
@@ -105372,7 +105458,7 @@ var require_escodegen = __commonJS2({
|
|
|
105372
105458
|
withIndent(function() {
|
|
105373
105459
|
if (stmt.test) {
|
|
105374
105460
|
result = [
|
|
105375
|
-
|
|
105461
|
+
join27("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
105376
105462
|
":"
|
|
105377
105463
|
];
|
|
105378
105464
|
} else {
|
|
@@ -105420,9 +105506,9 @@ var require_escodegen = __commonJS2({
|
|
|
105420
105506
|
result.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
|
105421
105507
|
result = this.maybeBlockSuffix(stmt.consequent, result);
|
|
105422
105508
|
if (stmt.alternate.type === Syntax.IfStatement) {
|
|
105423
|
-
result =
|
|
105509
|
+
result = join27(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
|
|
105424
105510
|
} else {
|
|
105425
|
-
result =
|
|
105511
|
+
result = join27(result, join27("else", this.maybeBlock(stmt.alternate, bodyFlags)));
|
|
105426
105512
|
}
|
|
105427
105513
|
} else {
|
|
105428
105514
|
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
|
@@ -105523,7 +105609,7 @@ var require_escodegen = __commonJS2({
|
|
|
105523
105609
|
},
|
|
105524
105610
|
ReturnStatement: function(stmt, flags) {
|
|
105525
105611
|
if (stmt.argument) {
|
|
105526
|
-
return [
|
|
105612
|
+
return [join27(
|
|
105527
105613
|
"return",
|
|
105528
105614
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
105529
105615
|
), this.semicolon(flags)];
|
|
@@ -105612,14 +105698,14 @@ var require_escodegen = __commonJS2({
|
|
|
105612
105698
|
if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
|
105613
105699
|
result = [fragment, noEmptySpace(), expr.operator];
|
|
105614
105700
|
} else {
|
|
105615
|
-
result =
|
|
105701
|
+
result = join27(fragment, expr.operator);
|
|
105616
105702
|
}
|
|
105617
105703
|
fragment = this.generateExpression(expr.right, rightPrecedence, flags);
|
|
105618
105704
|
if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
|
|
105619
105705
|
result.push(noEmptySpace());
|
|
105620
105706
|
result.push(fragment);
|
|
105621
105707
|
} else {
|
|
105622
|
-
result =
|
|
105708
|
+
result = join27(result, fragment);
|
|
105623
105709
|
}
|
|
105624
105710
|
if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
|
|
105625
105711
|
return ["(", result, ")"];
|
|
@@ -105659,7 +105745,7 @@ var require_escodegen = __commonJS2({
|
|
|
105659
105745
|
var result, length, i, iz, itemFlags;
|
|
105660
105746
|
length = expr["arguments"].length;
|
|
105661
105747
|
itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
|
|
105662
|
-
result =
|
|
105748
|
+
result = join27(
|
|
105663
105749
|
"new",
|
|
105664
105750
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
105665
105751
|
);
|
|
@@ -105709,11 +105795,11 @@ var require_escodegen = __commonJS2({
|
|
|
105709
105795
|
var result, fragment, rightCharCode, leftSource, leftCharCode;
|
|
105710
105796
|
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
|
105711
105797
|
if (space === "") {
|
|
105712
|
-
result =
|
|
105798
|
+
result = join27(expr.operator, fragment);
|
|
105713
105799
|
} else {
|
|
105714
105800
|
result = [expr.operator];
|
|
105715
105801
|
if (expr.operator.length > 2) {
|
|
105716
|
-
result =
|
|
105802
|
+
result = join27(result, fragment);
|
|
105717
105803
|
} else {
|
|
105718
105804
|
leftSource = toSourceNodeWhenNeeded(result).toString();
|
|
105719
105805
|
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
|
@@ -105736,7 +105822,7 @@ var require_escodegen = __commonJS2({
|
|
|
105736
105822
|
result = "yield";
|
|
105737
105823
|
}
|
|
105738
105824
|
if (expr.argument) {
|
|
105739
|
-
result =
|
|
105825
|
+
result = join27(
|
|
105740
105826
|
result,
|
|
105741
105827
|
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
105742
105828
|
);
|
|
@@ -105744,7 +105830,7 @@ var require_escodegen = __commonJS2({
|
|
|
105744
105830
|
return parenthesize(result, Precedence.Yield, precedence);
|
|
105745
105831
|
},
|
|
105746
105832
|
AwaitExpression: function(expr, precedence, flags) {
|
|
105747
|
-
var result =
|
|
105833
|
+
var result = join27(
|
|
105748
105834
|
expr.all ? "await*" : "await",
|
|
105749
105835
|
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
105750
105836
|
);
|
|
@@ -105827,11 +105913,11 @@ var require_escodegen = __commonJS2({
|
|
|
105827
105913
|
var result, fragment;
|
|
105828
105914
|
result = ["class"];
|
|
105829
105915
|
if (expr.id) {
|
|
105830
|
-
result =
|
|
105916
|
+
result = join27(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
|
105831
105917
|
}
|
|
105832
105918
|
if (expr.superClass) {
|
|
105833
|
-
fragment =
|
|
105834
|
-
result =
|
|
105919
|
+
fragment = join27("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
|
|
105920
|
+
result = join27(result, fragment);
|
|
105835
105921
|
}
|
|
105836
105922
|
result.push(space);
|
|
105837
105923
|
result.push(this.generateStatement(expr.body, S_TFFT));
|
|
@@ -105846,7 +105932,7 @@ var require_escodegen = __commonJS2({
|
|
|
105846
105932
|
}
|
|
105847
105933
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
105848
105934
|
fragment = [
|
|
105849
|
-
|
|
105935
|
+
join27(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
105850
105936
|
this.generateFunctionBody(expr.value)
|
|
105851
105937
|
];
|
|
105852
105938
|
} else {
|
|
@@ -105856,7 +105942,7 @@ var require_escodegen = __commonJS2({
|
|
|
105856
105942
|
this.generateFunctionBody(expr.value)
|
|
105857
105943
|
];
|
|
105858
105944
|
}
|
|
105859
|
-
return
|
|
105945
|
+
return join27(result, fragment);
|
|
105860
105946
|
},
|
|
105861
105947
|
Property: function(expr, precedence, flags) {
|
|
105862
105948
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
@@ -106051,7 +106137,7 @@ var require_escodegen = __commonJS2({
|
|
|
106051
106137
|
for (i = 0, iz = expr.blocks.length; i < iz; ++i) {
|
|
106052
106138
|
fragment = that.generateExpression(expr.blocks[i], Precedence.Sequence, E_TTT);
|
|
106053
106139
|
if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
106054
|
-
result =
|
|
106140
|
+
result = join27(result, fragment);
|
|
106055
106141
|
} else {
|
|
106056
106142
|
result.push(fragment);
|
|
106057
106143
|
}
|
|
@@ -106059,13 +106145,13 @@ var require_escodegen = __commonJS2({
|
|
|
106059
106145
|
});
|
|
106060
106146
|
}
|
|
106061
106147
|
if (expr.filter) {
|
|
106062
|
-
result =
|
|
106148
|
+
result = join27(result, "if" + space);
|
|
106063
106149
|
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
|
106064
|
-
result =
|
|
106150
|
+
result = join27(result, ["(", fragment, ")"]);
|
|
106065
106151
|
}
|
|
106066
106152
|
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
106067
106153
|
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
106068
|
-
result =
|
|
106154
|
+
result = join27(result, fragment);
|
|
106069
106155
|
}
|
|
106070
106156
|
result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
|
|
106071
106157
|
return result;
|
|
@@ -106081,8 +106167,8 @@ var require_escodegen = __commonJS2({
|
|
|
106081
106167
|
} else {
|
|
106082
106168
|
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
|
106083
106169
|
}
|
|
106084
|
-
fragment =
|
|
106085
|
-
fragment =
|
|
106170
|
+
fragment = join27(fragment, expr.of ? "of" : "in");
|
|
106171
|
+
fragment = join27(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
|
106086
106172
|
return ["for" + space + "(", fragment, ")"];
|
|
106087
106173
|
},
|
|
106088
106174
|
SpreadElement: function(expr, precedence, flags) {
|
|
@@ -112632,11 +112718,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
112632
112718
|
}
|
|
112633
112719
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
112634
112720
|
function adopt(value) {
|
|
112635
|
-
return value instanceof P ? value : new P(function(
|
|
112636
|
-
|
|
112721
|
+
return value instanceof P ? value : new P(function(resolve15) {
|
|
112722
|
+
resolve15(value);
|
|
112637
112723
|
});
|
|
112638
112724
|
}
|
|
112639
|
-
return new (P || (P = Promise))(function(
|
|
112725
|
+
return new (P || (P = Promise))(function(resolve15, reject) {
|
|
112640
112726
|
function fulfilled(value) {
|
|
112641
112727
|
try {
|
|
112642
112728
|
step(generator.next(value));
|
|
@@ -112652,7 +112738,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
112652
112738
|
}
|
|
112653
112739
|
}
|
|
112654
112740
|
function step(result) {
|
|
112655
|
-
result.done ?
|
|
112741
|
+
result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
112656
112742
|
}
|
|
112657
112743
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
112658
112744
|
});
|
|
@@ -112866,14 +112952,14 @@ function __asyncValues(o) {
|
|
|
112866
112952
|
}, i);
|
|
112867
112953
|
function verb(n) {
|
|
112868
112954
|
i[n] = o[n] && function(v) {
|
|
112869
|
-
return new Promise(function(
|
|
112870
|
-
v = o[n](v), settle(
|
|
112955
|
+
return new Promise(function(resolve15, reject) {
|
|
112956
|
+
v = o[n](v), settle(resolve15, reject, v.done, v.value);
|
|
112871
112957
|
});
|
|
112872
112958
|
};
|
|
112873
112959
|
}
|
|
112874
|
-
function settle(
|
|
112960
|
+
function settle(resolve15, reject, d, v) {
|
|
112875
112961
|
Promise.resolve(v).then(function(v2) {
|
|
112876
|
-
|
|
112962
|
+
resolve15({ value: v2, done: d });
|
|
112877
112963
|
}, reject);
|
|
112878
112964
|
}
|
|
112879
112965
|
}
|
|
@@ -116457,12 +116543,12 @@ var require_util7 = __commonJS2({
|
|
|
116457
116543
|
exports2.isGMT = exports2.dnsLookup = void 0;
|
|
116458
116544
|
var dns_1 = __require("dns");
|
|
116459
116545
|
function dnsLookup(host, opts) {
|
|
116460
|
-
return new Promise((
|
|
116546
|
+
return new Promise((resolve15, reject) => {
|
|
116461
116547
|
(0, dns_1.lookup)(host, opts, (err, res) => {
|
|
116462
116548
|
if (err) {
|
|
116463
116549
|
reject(err);
|
|
116464
116550
|
} else {
|
|
116465
|
-
|
|
116551
|
+
resolve15(res);
|
|
116466
116552
|
}
|
|
116467
116553
|
});
|
|
116468
116554
|
});
|
|
@@ -116827,10 +116913,10 @@ var require_myIpAddress = __commonJS2({
|
|
|
116827
116913
|
var ip_1 = require_ip();
|
|
116828
116914
|
var net_1 = __importDefault2(__require("net"));
|
|
116829
116915
|
async function myIpAddress() {
|
|
116830
|
-
return new Promise((
|
|
116916
|
+
return new Promise((resolve15, reject) => {
|
|
116831
116917
|
const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
|
|
116832
116918
|
const onError = () => {
|
|
116833
|
-
|
|
116919
|
+
resolve15(ip_1.ip.address());
|
|
116834
116920
|
};
|
|
116835
116921
|
socket.once("error", onError);
|
|
116836
116922
|
socket.once("connect", () => {
|
|
@@ -116838,9 +116924,9 @@ var require_myIpAddress = __commonJS2({
|
|
|
116838
116924
|
const addr = socket.address();
|
|
116839
116925
|
socket.destroy();
|
|
116840
116926
|
if (typeof addr === "string") {
|
|
116841
|
-
|
|
116927
|
+
resolve15(addr);
|
|
116842
116928
|
} else if (addr.address) {
|
|
116843
|
-
|
|
116929
|
+
resolve15(addr.address);
|
|
116844
116930
|
} else {
|
|
116845
116931
|
reject(new Error("Expected a `string`"));
|
|
116846
116932
|
}
|
|
@@ -117418,8 +117504,8 @@ var require_deferred_promise = __commonJS2({
|
|
|
117418
117504
|
this.context = args2.context;
|
|
117419
117505
|
this.owner = args2.context.runtime;
|
|
117420
117506
|
this.handle = args2.promiseHandle;
|
|
117421
|
-
this.settled = new Promise((
|
|
117422
|
-
this.onSettled =
|
|
117507
|
+
this.settled = new Promise((resolve15) => {
|
|
117508
|
+
this.onSettled = resolve15;
|
|
117423
117509
|
});
|
|
117424
117510
|
this.resolveHandle = args2.resolveHandle;
|
|
117425
117511
|
this.rejectHandle = args2.rejectHandle;
|
|
@@ -117941,13 +118027,13 @@ var require_context2 = __commonJS2({
|
|
|
117941
118027
|
if (vmResolveResult.error) {
|
|
117942
118028
|
return Promise.resolve(vmResolveResult);
|
|
117943
118029
|
}
|
|
117944
|
-
return new Promise((
|
|
118030
|
+
return new Promise((resolve15) => {
|
|
117945
118031
|
lifetime_1.Scope.withScope((scope) => {
|
|
117946
118032
|
const resolveHandle = scope.manage(this.newFunction("resolve", (value) => {
|
|
117947
|
-
|
|
118033
|
+
resolve15({ value: value && value.dup() });
|
|
117948
118034
|
}));
|
|
117949
118035
|
const rejectHandle = scope.manage(this.newFunction("reject", (error3) => {
|
|
117950
|
-
|
|
118036
|
+
resolve15({ error: error3 && error3.dup() });
|
|
117951
118037
|
}));
|
|
117952
118038
|
const promiseHandle = scope.manage(vmResolveResult.value);
|
|
117953
118039
|
const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
|
|
@@ -124703,11 +124789,11 @@ var require_socksclient = __commonJS2({
|
|
|
124703
124789
|
"use strict";
|
|
124704
124790
|
var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
124705
124791
|
function adopt(value) {
|
|
124706
|
-
return value instanceof P ? value : new P(function(
|
|
124707
|
-
|
|
124792
|
+
return value instanceof P ? value : new P(function(resolve15) {
|
|
124793
|
+
resolve15(value);
|
|
124708
124794
|
});
|
|
124709
124795
|
}
|
|
124710
|
-
return new (P || (P = Promise))(function(
|
|
124796
|
+
return new (P || (P = Promise))(function(resolve15, reject) {
|
|
124711
124797
|
function fulfilled(value) {
|
|
124712
124798
|
try {
|
|
124713
124799
|
step(generator.next(value));
|
|
@@ -124723,7 +124809,7 @@ var require_socksclient = __commonJS2({
|
|
|
124723
124809
|
}
|
|
124724
124810
|
}
|
|
124725
124811
|
function step(result) {
|
|
124726
|
-
result.done ?
|
|
124812
|
+
result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
124727
124813
|
}
|
|
124728
124814
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
124729
124815
|
});
|
|
@@ -124757,13 +124843,13 @@ var require_socksclient = __commonJS2({
|
|
|
124757
124843
|
* @returns { Promise }
|
|
124758
124844
|
*/
|
|
124759
124845
|
static createConnection(options, callback) {
|
|
124760
|
-
return new Promise((
|
|
124846
|
+
return new Promise((resolve15, reject) => {
|
|
124761
124847
|
try {
|
|
124762
124848
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
124763
124849
|
} catch (err) {
|
|
124764
124850
|
if (typeof callback === "function") {
|
|
124765
124851
|
callback(err);
|
|
124766
|
-
return
|
|
124852
|
+
return resolve15(err);
|
|
124767
124853
|
} else {
|
|
124768
124854
|
return reject(err);
|
|
124769
124855
|
}
|
|
@@ -124774,16 +124860,16 @@ var require_socksclient = __commonJS2({
|
|
|
124774
124860
|
client2.removeAllListeners();
|
|
124775
124861
|
if (typeof callback === "function") {
|
|
124776
124862
|
callback(null, info);
|
|
124777
|
-
|
|
124863
|
+
resolve15(info);
|
|
124778
124864
|
} else {
|
|
124779
|
-
|
|
124865
|
+
resolve15(info);
|
|
124780
124866
|
}
|
|
124781
124867
|
});
|
|
124782
124868
|
client2.once("error", (err) => {
|
|
124783
124869
|
client2.removeAllListeners();
|
|
124784
124870
|
if (typeof callback === "function") {
|
|
124785
124871
|
callback(err);
|
|
124786
|
-
|
|
124872
|
+
resolve15(err);
|
|
124787
124873
|
} else {
|
|
124788
124874
|
reject(err);
|
|
124789
124875
|
}
|
|
@@ -124800,13 +124886,13 @@ var require_socksclient = __commonJS2({
|
|
|
124800
124886
|
* @returns { Promise }
|
|
124801
124887
|
*/
|
|
124802
124888
|
static createConnectionChain(options, callback) {
|
|
124803
|
-
return new Promise((
|
|
124889
|
+
return new Promise((resolve15, reject) => __awaiter2(this, void 0, void 0, function* () {
|
|
124804
124890
|
try {
|
|
124805
124891
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
124806
124892
|
} catch (err) {
|
|
124807
124893
|
if (typeof callback === "function") {
|
|
124808
124894
|
callback(err);
|
|
124809
|
-
return
|
|
124895
|
+
return resolve15(err);
|
|
124810
124896
|
} else {
|
|
124811
124897
|
return reject(err);
|
|
124812
124898
|
}
|
|
@@ -124832,14 +124918,14 @@ var require_socksclient = __commonJS2({
|
|
|
124832
124918
|
}
|
|
124833
124919
|
if (typeof callback === "function") {
|
|
124834
124920
|
callback(null, { socket: sock });
|
|
124835
|
-
|
|
124921
|
+
resolve15({ socket: sock });
|
|
124836
124922
|
} else {
|
|
124837
|
-
|
|
124923
|
+
resolve15({ socket: sock });
|
|
124838
124924
|
}
|
|
124839
124925
|
} catch (err) {
|
|
124840
124926
|
if (typeof callback === "function") {
|
|
124841
124927
|
callback(err);
|
|
124842
|
-
|
|
124928
|
+
resolve15(err);
|
|
124843
124929
|
} else {
|
|
124844
124930
|
reject(err);
|
|
124845
124931
|
}
|
|
@@ -125530,12 +125616,12 @@ var require_dist15 = __commonJS2({
|
|
|
125530
125616
|
let { host } = opts;
|
|
125531
125617
|
const { port, lookup: lookupFn = dns2.lookup } = opts;
|
|
125532
125618
|
if (shouldLookup) {
|
|
125533
|
-
host = await new Promise((
|
|
125619
|
+
host = await new Promise((resolve15, reject) => {
|
|
125534
125620
|
lookupFn(host, {}, (err, res) => {
|
|
125535
125621
|
if (err) {
|
|
125536
125622
|
reject(err);
|
|
125537
125623
|
} else {
|
|
125538
|
-
|
|
125624
|
+
resolve15(res);
|
|
125539
125625
|
}
|
|
125540
125626
|
});
|
|
125541
125627
|
});
|
|
@@ -125613,7 +125699,7 @@ var require_parse_proxy_response2 = __commonJS2({
|
|
|
125613
125699
|
var debug_1 = __importDefault2(require_src2());
|
|
125614
125700
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
125615
125701
|
function parseProxyResponse(socket) {
|
|
125616
|
-
return new Promise((
|
|
125702
|
+
return new Promise((resolve15, reject) => {
|
|
125617
125703
|
let buffersLength = 0;
|
|
125618
125704
|
const buffers = [];
|
|
125619
125705
|
function read() {
|
|
@@ -125679,7 +125765,7 @@ var require_parse_proxy_response2 = __commonJS2({
|
|
|
125679
125765
|
}
|
|
125680
125766
|
debug2("got proxy server response: %o %o", firstLine, headers);
|
|
125681
125767
|
cleanup();
|
|
125682
|
-
|
|
125768
|
+
resolve15({
|
|
125683
125769
|
connect: {
|
|
125684
125770
|
statusCode,
|
|
125685
125771
|
statusText,
|
|
@@ -126463,12 +126549,12 @@ var require_isexe = __commonJS2({
|
|
|
126463
126549
|
if (typeof Promise !== "function") {
|
|
126464
126550
|
throw new TypeError("callback not provided");
|
|
126465
126551
|
}
|
|
126466
|
-
return new Promise(function(
|
|
126552
|
+
return new Promise(function(resolve15, reject) {
|
|
126467
126553
|
isexe(path12, options || {}, function(er, is) {
|
|
126468
126554
|
if (er) {
|
|
126469
126555
|
reject(er);
|
|
126470
126556
|
} else {
|
|
126471
|
-
|
|
126557
|
+
resolve15(is);
|
|
126472
126558
|
}
|
|
126473
126559
|
});
|
|
126474
126560
|
});
|
|
@@ -126501,7 +126587,7 @@ var require_isexe = __commonJS2({
|
|
|
126501
126587
|
var require_lib12 = __commonJS2({
|
|
126502
126588
|
"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports2, module2) {
|
|
126503
126589
|
var isexe = require_isexe();
|
|
126504
|
-
var { join:
|
|
126590
|
+
var { join: join27, delimiter: delimiter3, sep: sep3, posix: posix2 } = __require("path");
|
|
126505
126591
|
var isWindows = process.platform === "win32";
|
|
126506
126592
|
var rSlash = new RegExp(`[${posix2.sep}${sep3 === posix2.sep ? "" : sep3}]`.replace(/(\\)/g, "\\$1"));
|
|
126507
126593
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
@@ -126530,7 +126616,7 @@ var require_lib12 = __commonJS2({
|
|
|
126530
126616
|
var getPathPart = (raw, cmd2) => {
|
|
126531
126617
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
126532
126618
|
const prefix = !pathPart && rRel.test(cmd2) ? cmd2.slice(0, 2) : "";
|
|
126533
|
-
return prefix +
|
|
126619
|
+
return prefix + join27(pathPart, cmd2);
|
|
126534
126620
|
};
|
|
126535
126621
|
var which2 = async (cmd2, opt = {}) => {
|
|
126536
126622
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd2, opt);
|
|
@@ -126622,27 +126708,27 @@ var require_which = __commonJS2({
|
|
|
126622
126708
|
opt = {};
|
|
126623
126709
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd2, opt);
|
|
126624
126710
|
const found = [];
|
|
126625
|
-
const step = (i) => new Promise((
|
|
126711
|
+
const step = (i) => new Promise((resolve15, reject) => {
|
|
126626
126712
|
if (i === pathEnv.length)
|
|
126627
|
-
return opt.all && found.length ?
|
|
126713
|
+
return opt.all && found.length ? resolve15(found) : reject(getNotFoundError(cmd2));
|
|
126628
126714
|
const ppRaw = pathEnv[i];
|
|
126629
126715
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
126630
126716
|
const pCmd = path12.join(pathPart, cmd2);
|
|
126631
126717
|
const p = !pathPart && /^\.[\\\/]/.test(cmd2) ? cmd2.slice(0, 2) + pCmd : pCmd;
|
|
126632
|
-
|
|
126718
|
+
resolve15(subStep(p, i, 0));
|
|
126633
126719
|
});
|
|
126634
|
-
const subStep = (p, i, ii) => new Promise((
|
|
126720
|
+
const subStep = (p, i, ii) => new Promise((resolve15, reject) => {
|
|
126635
126721
|
if (ii === pathExt.length)
|
|
126636
|
-
return
|
|
126722
|
+
return resolve15(step(i + 1));
|
|
126637
126723
|
const ext = pathExt[ii];
|
|
126638
126724
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
126639
126725
|
if (!er && is) {
|
|
126640
126726
|
if (opt.all)
|
|
126641
126727
|
found.push(p + ext);
|
|
126642
126728
|
else
|
|
126643
|
-
return
|
|
126729
|
+
return resolve15(p + ext);
|
|
126644
126730
|
}
|
|
126645
|
-
return
|
|
126731
|
+
return resolve15(subStep(p, i, ii + 1));
|
|
126646
126732
|
});
|
|
126647
126733
|
});
|
|
126648
126734
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -127651,7 +127737,7 @@ var require_kill = __commonJS2({
|
|
|
127651
127737
|
throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
|
|
127652
127738
|
}
|
|
127653
127739
|
let timeoutId;
|
|
127654
|
-
const timeoutPromise = new Promise((
|
|
127740
|
+
const timeoutPromise = new Promise((resolve15, reject) => {
|
|
127655
127741
|
timeoutId = setTimeout(() => {
|
|
127656
127742
|
timeoutKill(spawned, killSignal, reject);
|
|
127657
127743
|
}, timeout);
|
|
@@ -127848,7 +127934,7 @@ var require_get_stream = __commonJS2({
|
|
|
127848
127934
|
};
|
|
127849
127935
|
const { maxBuffer } = options;
|
|
127850
127936
|
let stream;
|
|
127851
|
-
await new Promise((
|
|
127937
|
+
await new Promise((resolve15, reject) => {
|
|
127852
127938
|
const rejectPromise = (error3) => {
|
|
127853
127939
|
if (error3 && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
127854
127940
|
error3.bufferedData = stream.getBufferedValue();
|
|
@@ -127860,7 +127946,7 @@ var require_get_stream = __commonJS2({
|
|
|
127860
127946
|
rejectPromise(error3);
|
|
127861
127947
|
return;
|
|
127862
127948
|
}
|
|
127863
|
-
|
|
127949
|
+
resolve15();
|
|
127864
127950
|
});
|
|
127865
127951
|
stream.on("data", () => {
|
|
127866
127952
|
if (stream.getBufferedLength() > maxBuffer) {
|
|
@@ -128019,9 +128105,9 @@ var require_promise = __commonJS2({
|
|
|
128019
128105
|
return spawned;
|
|
128020
128106
|
};
|
|
128021
128107
|
var getSpawnedPromise = (spawned) => {
|
|
128022
|
-
return new Promise((
|
|
128108
|
+
return new Promise((resolve15, reject) => {
|
|
128023
128109
|
spawned.on("exit", (exitCode2, signal) => {
|
|
128024
|
-
|
|
128110
|
+
resolve15({ exitCode: exitCode2, signal });
|
|
128025
128111
|
});
|
|
128026
128112
|
spawned.on("error", (error3) => {
|
|
128027
128113
|
reject(error3);
|
|
@@ -132376,7 +132462,7 @@ var init_api = __esm({
|
|
|
132376
132462
|
|
|
132377
132463
|
// src/commands/api/request-builder.ts
|
|
132378
132464
|
import { readFile as readFile5 } from "fs/promises";
|
|
132379
|
-
import { resolve as
|
|
132465
|
+
import { resolve as resolve5 } from "path";
|
|
132380
132466
|
async function buildRequest(endpoint, flags) {
|
|
132381
132467
|
const headers = {};
|
|
132382
132468
|
let body;
|
|
@@ -132407,7 +132493,7 @@ async function buildRequest(endpoint, flags) {
|
|
|
132407
132493
|
if (inputPath === "-") {
|
|
132408
132494
|
body = await readStdin();
|
|
132409
132495
|
} else {
|
|
132410
|
-
body = await readFile5(
|
|
132496
|
+
body = await readFile5(resolve5(inputPath), "utf-8");
|
|
132411
132497
|
}
|
|
132412
132498
|
if (typeof body === "string") {
|
|
132413
132499
|
try {
|
|
@@ -132440,7 +132526,7 @@ async function parseField(field, typed) {
|
|
|
132440
132526
|
if (filePath === "-") {
|
|
132441
132527
|
value = await readStdin();
|
|
132442
132528
|
} else {
|
|
132443
|
-
value = await readFile5(
|
|
132529
|
+
value = await readFile5(resolve5(filePath), "utf-8");
|
|
132444
132530
|
}
|
|
132445
132531
|
if (typeof value === "string") {
|
|
132446
132532
|
try {
|
|
@@ -132523,7 +132609,7 @@ var init_constants2 = __esm({
|
|
|
132523
132609
|
});
|
|
132524
132610
|
|
|
132525
132611
|
// src/util/openapi/openapi-cache.ts
|
|
132526
|
-
import { join as
|
|
132612
|
+
import { join as join10 } from "path";
|
|
132527
132613
|
import { readFile as readFile6, writeFile as writeFile4, mkdir as mkdir2 } from "fs/promises";
|
|
132528
132614
|
var OpenApiCache;
|
|
132529
132615
|
var init_openapi_cache = __esm({
|
|
@@ -132535,7 +132621,7 @@ var init_openapi_cache = __esm({
|
|
|
132535
132621
|
OpenApiCache = class {
|
|
132536
132622
|
constructor() {
|
|
132537
132623
|
this.spec = null;
|
|
132538
|
-
this.cachePath =
|
|
132624
|
+
this.cachePath = join10(global_path_default(), CACHE_FILE);
|
|
132539
132625
|
}
|
|
132540
132626
|
/**
|
|
132541
132627
|
* Check if the spec has been loaded
|
|
@@ -132667,7 +132753,7 @@ var init_openapi_cache = __esm({
|
|
|
132667
132753
|
fetchedAt: Date.now(),
|
|
132668
132754
|
spec
|
|
132669
132755
|
};
|
|
132670
|
-
const dir =
|
|
132756
|
+
const dir = join10(this.cachePath, "..");
|
|
132671
132757
|
await mkdir2(dir, { recursive: true });
|
|
132672
132758
|
await writeFile4(this.cachePath, JSON.stringify(cached));
|
|
132673
132759
|
output_manager_default.debug("Saved OpenAPI spec to cache");
|
|
@@ -134275,8 +134361,8 @@ var init_bisect = __esm({
|
|
|
134275
134361
|
});
|
|
134276
134362
|
}
|
|
134277
134363
|
}
|
|
134278
|
-
trackCliFlagOpen(
|
|
134279
|
-
if (
|
|
134364
|
+
trackCliFlagOpen(open9) {
|
|
134365
|
+
if (open9) {
|
|
134280
134366
|
this.trackCliFlag("open");
|
|
134281
134367
|
}
|
|
134282
134368
|
}
|
|
@@ -134289,7 +134375,7 @@ var bisect_exports = {};
|
|
|
134289
134375
|
__export3(bisect_exports, {
|
|
134290
134376
|
default: () => bisect
|
|
134291
134377
|
});
|
|
134292
|
-
import { resolve as
|
|
134378
|
+
import { resolve as resolve6 } from "path";
|
|
134293
134379
|
import { URLSearchParams as URLSearchParams4, parse as parse6 } from "url";
|
|
134294
134380
|
async function bisect(client2) {
|
|
134295
134381
|
let parsedArgs = null;
|
|
@@ -134329,7 +134415,7 @@ async function bisect(client2) {
|
|
|
134329
134415
|
let run2 = parsedArgs.flags["--run"] || "";
|
|
134330
134416
|
const openEnabled = parsedArgs.flags["--open"] || false;
|
|
134331
134417
|
if (run2) {
|
|
134332
|
-
run2 =
|
|
134418
|
+
run2 = resolve6(run2);
|
|
134333
134419
|
}
|
|
134334
134420
|
bad = normalizeURL(bad);
|
|
134335
134421
|
let parsed = parse6(bad);
|
|
@@ -137945,7 +138031,7 @@ var init_list_item = __esm({
|
|
|
137945
138031
|
});
|
|
137946
138032
|
|
|
137947
138033
|
// src/util/blob/token.ts
|
|
137948
|
-
import { resolve as
|
|
138034
|
+
import { resolve as resolve7 } from "path";
|
|
137949
138035
|
async function getBlobRWToken(client2, argv) {
|
|
137950
138036
|
const flagsSpecification = getFlagsSpecification(blobCommand.options);
|
|
137951
138037
|
try {
|
|
@@ -137962,7 +138048,7 @@ async function getBlobRWToken(client2, argv) {
|
|
|
137962
138048
|
return { token: process.env.BLOB_READ_WRITE_TOKEN, success: true };
|
|
137963
138049
|
}
|
|
137964
138050
|
const filename = ".env.local";
|
|
137965
|
-
const fullPath =
|
|
138051
|
+
const fullPath = resolve7(client2.cwd, filename);
|
|
137966
138052
|
try {
|
|
137967
138053
|
const env = await createEnvObject(fullPath);
|
|
137968
138054
|
if (env?.BLOB_READ_WRITE_TOKEN) {
|
|
@@ -138270,8 +138356,8 @@ var require_dist21 = __commonJS2({
|
|
|
138270
138356
|
result.push(path12);
|
|
138271
138357
|
path12 = "";
|
|
138272
138358
|
}
|
|
138273
|
-
var
|
|
138274
|
-
if (
|
|
138359
|
+
var open9 = tryConsume("OPEN");
|
|
138360
|
+
if (open9) {
|
|
138275
138361
|
var prefix = consumeText();
|
|
138276
138362
|
var name_1 = tryConsume("NAME") || "";
|
|
138277
138363
|
var pattern_1 = tryConsume("PATTERN") || "";
|
|
@@ -138658,8 +138744,8 @@ var require_dist22 = __commonJS2({
|
|
|
138658
138744
|
result.push(path12);
|
|
138659
138745
|
path12 = "";
|
|
138660
138746
|
}
|
|
138661
|
-
var
|
|
138662
|
-
if (
|
|
138747
|
+
var open9 = tryConsume("OPEN");
|
|
138748
|
+
if (open9) {
|
|
138663
138749
|
var prefix = consumeText();
|
|
138664
138750
|
var name_1 = tryConsume("NAME") || "";
|
|
138665
138751
|
var pattern_1 = tryConsume("PATTERN") || "";
|
|
@@ -140562,7 +140648,7 @@ var require_dist23 = __commonJS2({
|
|
|
140562
140648
|
});
|
|
140563
140649
|
|
|
140564
140650
|
// src/util/build/corepack.ts
|
|
140565
|
-
import { delimiter, join as
|
|
140651
|
+
import { delimiter, join as join11 } from "path";
|
|
140566
140652
|
import { spawnAsync } from "@vercel/build-utils";
|
|
140567
140653
|
async function initCorepack({
|
|
140568
140654
|
repoRootPath
|
|
@@ -140571,7 +140657,7 @@ async function initCorepack({
|
|
|
140571
140657
|
return null;
|
|
140572
140658
|
}
|
|
140573
140659
|
const pkg = await readJSONFile(
|
|
140574
|
-
|
|
140660
|
+
join11(repoRootPath, "package.json")
|
|
140575
140661
|
);
|
|
140576
140662
|
if (pkg instanceof CantParseJSONFile) {
|
|
140577
140663
|
output_manager_default.warn(
|
|
@@ -140586,9 +140672,9 @@ async function initCorepack({
|
|
|
140586
140672
|
output_manager_default.log(
|
|
140587
140673
|
`Detected ENABLE_EXPERIMENTAL_COREPACK=1 and "${pkg.packageManager}" in package.json`
|
|
140588
140674
|
);
|
|
140589
|
-
const corepackRootDir =
|
|
140590
|
-
const corepackHomeDir =
|
|
140591
|
-
const corepackShimDir =
|
|
140675
|
+
const corepackRootDir = join11(repoRootPath, VERCEL_DIR, "cache", "corepack");
|
|
140676
|
+
const corepackHomeDir = join11(corepackRootDir, "home");
|
|
140677
|
+
const corepackShimDir = join11(corepackRootDir, "shim");
|
|
140592
140678
|
await import_fs_extra10.default.mkdirp(corepackHomeDir);
|
|
140593
140679
|
await import_fs_extra10.default.mkdirp(corepackShimDir);
|
|
140594
140680
|
process.env.COREPACK_HOME = corepackHomeDir;
|
|
@@ -141217,7 +141303,7 @@ var require_npa = __commonJS2({
|
|
|
141217
141303
|
"../../node_modules/.pnpm/npm-package-arg@6.1.0/node_modules/npm-package-arg/npa.js"(exports2, module2) {
|
|
141218
141304
|
"use strict";
|
|
141219
141305
|
module2.exports = npa3;
|
|
141220
|
-
module2.exports.resolve =
|
|
141306
|
+
module2.exports.resolve = resolve15;
|
|
141221
141307
|
module2.exports.Result = Result;
|
|
141222
141308
|
var url3;
|
|
141223
141309
|
var HostedGit;
|
|
@@ -141260,10 +141346,10 @@ var require_npa = __commonJS2({
|
|
|
141260
141346
|
spec = arg2;
|
|
141261
141347
|
}
|
|
141262
141348
|
}
|
|
141263
|
-
return
|
|
141349
|
+
return resolve15(name, spec, where, arg2);
|
|
141264
141350
|
}
|
|
141265
141351
|
var isFilespec = isWindows ? /^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/ : /^(?:[.]|~[/]|[/]|[a-zA-Z]:)/;
|
|
141266
|
-
function
|
|
141352
|
+
function resolve15(name, spec, where, arg2) {
|
|
141267
141353
|
const res = new Result({
|
|
141268
141354
|
raw: arg2,
|
|
141269
141355
|
name,
|
|
@@ -141538,10 +141624,10 @@ var init_static_builder = __esm({
|
|
|
141538
141624
|
|
|
141539
141625
|
// src/util/build/import-builders.ts
|
|
141540
141626
|
import { URL as URL7 } from "url";
|
|
141541
|
-
import { dirname as dirname5, join as
|
|
141627
|
+
import { dirname as dirname5, join as join12 } from "path";
|
|
141542
141628
|
import { createRequire } from "module";
|
|
141543
141629
|
async function importBuilders(builderSpecs, cwd) {
|
|
141544
|
-
const buildersDir =
|
|
141630
|
+
const buildersDir = join12(cwd, VERCEL_DIR, "builders");
|
|
141545
141631
|
let importResult = await resolveBuilders(buildersDir, builderSpecs);
|
|
141546
141632
|
if ("buildersToAdd" in importResult) {
|
|
141547
141633
|
const installResult = await installBuilders(
|
|
@@ -141583,7 +141669,7 @@ async function resolveBuilders(buildersDir, builderSpecs, resolvedSpecs) {
|
|
|
141583
141669
|
let pkgPath;
|
|
141584
141670
|
let builderPkg;
|
|
141585
141671
|
try {
|
|
141586
|
-
pkgPath =
|
|
141672
|
+
pkgPath = join12(buildersDir, "node_modules", name, "package.json");
|
|
141587
141673
|
builderPkg = await (0, import_fs_extra11.readJSON)(pkgPath);
|
|
141588
141674
|
} catch (error3) {
|
|
141589
141675
|
if (!(0, import_error_utils14.isErrnoException)(error3)) {
|
|
@@ -141619,7 +141705,7 @@ async function resolveBuilders(buildersDir, builderSpecs, resolvedSpecs) {
|
|
|
141619
141705
|
buildersToAdd.add(spec);
|
|
141620
141706
|
continue;
|
|
141621
141707
|
}
|
|
141622
|
-
const path12 =
|
|
141708
|
+
const path12 = join12(dirname5(pkgPath), builderPkg.main || "index.js");
|
|
141623
141709
|
const builder = require_(path12);
|
|
141624
141710
|
builders.set(spec, {
|
|
141625
141711
|
builder,
|
|
@@ -141648,7 +141734,7 @@ async function resolveBuilders(buildersDir, builderSpecs, resolvedSpecs) {
|
|
|
141648
141734
|
}
|
|
141649
141735
|
async function installBuilders(buildersDir, buildersToAdd) {
|
|
141650
141736
|
const resolvedSpecs = /* @__PURE__ */ new Map();
|
|
141651
|
-
const buildersPkgPath =
|
|
141737
|
+
const buildersPkgPath = join12(buildersDir, "package.json");
|
|
141652
141738
|
try {
|
|
141653
141739
|
const emptyPkgJson = {
|
|
141654
141740
|
private: true,
|
|
@@ -141700,10 +141786,10 @@ async function installBuilders(buildersDir, buildersToAdd) {
|
|
|
141700
141786
|
}
|
|
141701
141787
|
throw err;
|
|
141702
141788
|
}
|
|
141703
|
-
const nowScopePath =
|
|
141789
|
+
const nowScopePath = join12(buildersDir, "node_modules/@now");
|
|
141704
141790
|
await (0, import_fs_extra11.mkdirp)(nowScopePath);
|
|
141705
141791
|
try {
|
|
141706
|
-
await (0, import_fs_extra11.symlink)("../@vercel/build-utils",
|
|
141792
|
+
await (0, import_fs_extra11.symlink)("../@vercel/build-utils", join12(nowScopePath, "build-utils"));
|
|
141707
141793
|
} catch (err) {
|
|
141708
141794
|
if (!(0, import_error_utils14.isErrnoException)(err) || err.code !== "EEXIST") {
|
|
141709
141795
|
throw err;
|
|
@@ -149820,13 +149906,13 @@ var require_promisepipe = __commonJS2({
|
|
|
149820
149906
|
}
|
|
149821
149907
|
const isReadable = stream.readable || typeof stream._read === "function";
|
|
149822
149908
|
function on(evt) {
|
|
149823
|
-
function executor(
|
|
149909
|
+
function executor(resolve15, reject) {
|
|
149824
149910
|
const fn2 = evt === "error" ? (err) => reject(new StreamError(err, stream)) : () => {
|
|
149825
149911
|
if (isReadable && evt === "finish" && !state.error) {
|
|
149826
149912
|
return;
|
|
149827
149913
|
}
|
|
149828
149914
|
cleanupEventHandlers(stream, fn2);
|
|
149829
|
-
|
|
149915
|
+
resolve15(stream);
|
|
149830
149916
|
};
|
|
149831
149917
|
stream.on(evt, fn2);
|
|
149832
149918
|
}
|
|
@@ -149873,7 +149959,7 @@ var require_promisepipe = __commonJS2({
|
|
|
149873
149959
|
});
|
|
149874
149960
|
|
|
149875
149961
|
// src/util/build/merge.ts
|
|
149876
|
-
import { join as
|
|
149962
|
+
import { join as join13, relative as relative4 } from "path";
|
|
149877
149963
|
async function merge(source, destination, ignoreFilter, sourceRoot) {
|
|
149878
149964
|
const root = sourceRoot || source;
|
|
149879
149965
|
if (ignoreFilter) {
|
|
@@ -149903,7 +149989,7 @@ async function merge(source, destination, ignoreFilter, sourceRoot) {
|
|
|
149903
149989
|
} else {
|
|
149904
149990
|
await Promise.all(
|
|
149905
149991
|
contents.map(
|
|
149906
|
-
(name) => merge(
|
|
149992
|
+
(name) => merge(join13(source, name), join13(destination, name), ignoreFilter, root)
|
|
149907
149993
|
)
|
|
149908
149994
|
);
|
|
149909
149995
|
await (0, import_fs_extra12.rmdir)(source);
|
|
@@ -150565,7 +150651,7 @@ var require_yauzl = __commonJS2({
|
|
|
150565
150651
|
var Transform2 = __require("stream").Transform;
|
|
150566
150652
|
var PassThrough = __require("stream").PassThrough;
|
|
150567
150653
|
var Writable = __require("stream").Writable;
|
|
150568
|
-
exports2.open =
|
|
150654
|
+
exports2.open = open9;
|
|
150569
150655
|
exports2.fromFd = fromFd;
|
|
150570
150656
|
exports2.fromBuffer = fromBuffer;
|
|
150571
150657
|
exports2.fromRandomAccessReader = fromRandomAccessReader;
|
|
@@ -150574,7 +150660,7 @@ var require_yauzl = __commonJS2({
|
|
|
150574
150660
|
exports2.ZipFile = ZipFile;
|
|
150575
150661
|
exports2.Entry = Entry;
|
|
150576
150662
|
exports2.RandomAccessReader = RandomAccessReader;
|
|
150577
|
-
function
|
|
150663
|
+
function open9(path12, options, callback) {
|
|
150578
150664
|
if (typeof options === "function") {
|
|
150579
150665
|
callback = options;
|
|
150580
150666
|
options = null;
|
|
@@ -151597,18 +151683,18 @@ var require_promisify = __commonJS2({
|
|
|
151597
151683
|
const fromBuffer = fnName == "fromBuffer";
|
|
151598
151684
|
cloner.patch(yauzl, fnName, (original) => {
|
|
151599
151685
|
return function(path12, totalSize, options) {
|
|
151600
|
-
return new Promise2((
|
|
151686
|
+
return new Promise2((resolve15, reject) => {
|
|
151601
151687
|
options = Object.assign({}, options, { lazyEntries: true, autoClose: false });
|
|
151602
151688
|
original(path12, totalSize, options, (err, zipFile) => {
|
|
151603
151689
|
if (err)
|
|
151604
151690
|
return reject(err);
|
|
151605
|
-
opened(zipFile,
|
|
151691
|
+
opened(zipFile, resolve15, fromBuffer, yauzl);
|
|
151606
151692
|
});
|
|
151607
151693
|
});
|
|
151608
151694
|
};
|
|
151609
151695
|
});
|
|
151610
151696
|
}
|
|
151611
|
-
function opened(zipFile,
|
|
151697
|
+
function opened(zipFile, resolve15, fromBuffer, yauzl) {
|
|
151612
151698
|
if (fromBuffer) {
|
|
151613
151699
|
zipFile.reader.unref = yauzl.RandomAccessReader.prototype.unref;
|
|
151614
151700
|
zipFile.reader.close = (cb) => cb();
|
|
@@ -151619,7 +151705,7 @@ var require_promisify = __commonJS2({
|
|
|
151619
151705
|
zipFile.intercept("end", emittedEnd);
|
|
151620
151706
|
zipFile.intercept("close", emittedClose);
|
|
151621
151707
|
zipFile.intercept("error", emittedError);
|
|
151622
|
-
|
|
151708
|
+
resolve15(zipFile);
|
|
151623
151709
|
}
|
|
151624
151710
|
function emittedError(err) {
|
|
151625
151711
|
const state = getState(this);
|
|
@@ -151638,14 +151724,14 @@ var require_promisify = __commonJS2({
|
|
|
151638
151724
|
function promisifyClose(ZipFile, Promise2) {
|
|
151639
151725
|
const close2 = ZipFile.prototype.close;
|
|
151640
151726
|
ZipFile.prototype.close = function() {
|
|
151641
|
-
return new Promise2((
|
|
151727
|
+
return new Promise2((resolve15, reject) => {
|
|
151642
151728
|
if (getError(this))
|
|
151643
151729
|
return rejectWithStoredError(this, reject);
|
|
151644
151730
|
if (!this.isOpen)
|
|
151645
|
-
return
|
|
151731
|
+
return resolve15();
|
|
151646
151732
|
if (getState(this))
|
|
151647
151733
|
return reject(new Error("Previous operation has not completed yet"));
|
|
151648
|
-
setState(this, { action: "close", resolve:
|
|
151734
|
+
setState(this, { action: "close", resolve: resolve15, reject });
|
|
151649
151735
|
close2.call(this);
|
|
151650
151736
|
});
|
|
151651
151737
|
};
|
|
@@ -151660,14 +151746,14 @@ var require_promisify = __commonJS2({
|
|
|
151660
151746
|
function promisifyReadEntry(ZipFile, Promise2) {
|
|
151661
151747
|
const readEntry = ZipFile.prototype.readEntry;
|
|
151662
151748
|
ZipFile.prototype.readEntry = function() {
|
|
151663
|
-
return new Promise2((
|
|
151749
|
+
return new Promise2((resolve15, reject) => {
|
|
151664
151750
|
if (getError(this))
|
|
151665
151751
|
return rejectWithStoredError(this, reject);
|
|
151666
151752
|
if (!this.isOpen)
|
|
151667
151753
|
return reject(new Error("ZipFile is not open"));
|
|
151668
151754
|
if (getState(this))
|
|
151669
151755
|
return reject(new Error("Previous operation has not completed yet"));
|
|
151670
|
-
setState(this, { action: "read", resolve:
|
|
151756
|
+
setState(this, { action: "read", resolve: resolve15, reject });
|
|
151671
151757
|
readEntry.call(this);
|
|
151672
151758
|
});
|
|
151673
151759
|
};
|
|
@@ -151713,11 +151799,11 @@ var require_promisify = __commonJS2({
|
|
|
151713
151799
|
function addWalkEntriesMethod(ZipFile, Promise2) {
|
|
151714
151800
|
ZipFile.prototype.walkEntries = function(callback, numEntries) {
|
|
151715
151801
|
callback = wrapFunctionToReturnPromise(callback, Promise2);
|
|
151716
|
-
return new Promise2((
|
|
151802
|
+
return new Promise2((resolve15, reject) => {
|
|
151717
151803
|
walkNextEntry(this, callback, numEntries, 0, (err) => {
|
|
151718
151804
|
if (err)
|
|
151719
151805
|
return reject(err);
|
|
151720
|
-
|
|
151806
|
+
resolve15();
|
|
151721
151807
|
});
|
|
151722
151808
|
});
|
|
151723
151809
|
};
|
|
@@ -151738,13 +151824,13 @@ var require_promisify = __commonJS2({
|
|
|
151738
151824
|
function promisifyOpenReadStream(ZipFile, Promise2) {
|
|
151739
151825
|
const openReadStream = ZipFile.prototype.openReadStream;
|
|
151740
151826
|
ZipFile.prototype.openReadStream = function(entry, options) {
|
|
151741
|
-
return new Promise2((
|
|
151827
|
+
return new Promise2((resolve15, reject) => {
|
|
151742
151828
|
if (getError(this))
|
|
151743
151829
|
return rejectWithStoredError(this, reject);
|
|
151744
151830
|
openReadStream.call(this, entry, options || {}, (err, stream) => {
|
|
151745
151831
|
if (err)
|
|
151746
151832
|
return reject(err);
|
|
151747
|
-
|
|
151833
|
+
resolve15(stream);
|
|
151748
151834
|
});
|
|
151749
151835
|
});
|
|
151750
151836
|
};
|
|
@@ -151760,7 +151846,7 @@ var require_promisify = __commonJS2({
|
|
|
151760
151846
|
return result;
|
|
151761
151847
|
return Promise2.resolve(result);
|
|
151762
151848
|
} catch (err) {
|
|
151763
|
-
return new Promise2((
|
|
151849
|
+
return new Promise2((resolve15, reject) => {
|
|
151764
151850
|
reject(err);
|
|
151765
151851
|
});
|
|
151766
151852
|
}
|
|
@@ -151894,9 +151980,9 @@ import {
|
|
|
151894
151980
|
basename as basename6,
|
|
151895
151981
|
dirname as dirname6,
|
|
151896
151982
|
extname,
|
|
151897
|
-
join as
|
|
151983
|
+
join as join14,
|
|
151898
151984
|
relative as relative5,
|
|
151899
|
-
resolve as
|
|
151985
|
+
resolve as resolve8,
|
|
151900
151986
|
posix
|
|
151901
151987
|
} from "path";
|
|
151902
151988
|
import {
|
|
@@ -152016,7 +152102,7 @@ async function writeBuildResultV2(args2) {
|
|
|
152016
152102
|
if (fallback) {
|
|
152017
152103
|
const ext = getFileExtension(fallback);
|
|
152018
152104
|
const fallbackName = `${normalizedPath}.prerender-fallback${ext}`;
|
|
152019
|
-
const fallbackPath =
|
|
152105
|
+
const fallbackPath = join14(outputDir, "functions", fallbackName);
|
|
152020
152106
|
let usedHardLink = false;
|
|
152021
152107
|
if ("fsPath" in fallback) {
|
|
152022
152108
|
try {
|
|
@@ -152037,7 +152123,7 @@ async function writeBuildResultV2(args2) {
|
|
|
152037
152123
|
fsPath: basename6(fallbackName)
|
|
152038
152124
|
});
|
|
152039
152125
|
}
|
|
152040
|
-
const prerenderConfigPath =
|
|
152126
|
+
const prerenderConfigPath = join14(
|
|
152041
152127
|
outputDir,
|
|
152042
152128
|
"functions",
|
|
152043
152129
|
`${normalizedPath}.prerender-config.json`
|
|
@@ -152084,7 +152170,7 @@ async function writeBuildResultV3(args2) {
|
|
|
152084
152170
|
workPath
|
|
152085
152171
|
} = args2;
|
|
152086
152172
|
const { output: output2 } = buildResult;
|
|
152087
|
-
const routesJsonPath =
|
|
152173
|
+
const routesJsonPath = join14(workPath, ".vercel", "routes.json");
|
|
152088
152174
|
if (isBackendBuilder(build2) || build2.use === "@vercel/python") {
|
|
152089
152175
|
if ((0, import_fs_extra13.existsSync)(routesJsonPath)) {
|
|
152090
152176
|
try {
|
|
@@ -152187,7 +152273,7 @@ async function writeStaticFile(outputDir, file, path12, overrides, cleanUrls = f
|
|
|
152187
152273
|
if (override) {
|
|
152188
152274
|
overrides[fsPath] = override;
|
|
152189
152275
|
}
|
|
152190
|
-
const dest =
|
|
152276
|
+
const dest = join14(outputDir, "static", fsPath);
|
|
152191
152277
|
await import_fs_extra13.default.mkdirp(dirname6(dest));
|
|
152192
152278
|
if ("fsPath" in file) {
|
|
152193
152279
|
try {
|
|
@@ -152202,14 +152288,14 @@ async function writeFunctionSymlink(outputDir, dest, fn2, existingFunctions) {
|
|
|
152202
152288
|
if (!existingPath)
|
|
152203
152289
|
return false;
|
|
152204
152290
|
const destDir = dirname6(dest);
|
|
152205
|
-
const targetDest =
|
|
152291
|
+
const targetDest = join14(outputDir, "functions", `${existingPath}.func`);
|
|
152206
152292
|
const target = relative5(destDir, targetDest);
|
|
152207
152293
|
await import_fs_extra13.default.mkdirp(destDir);
|
|
152208
152294
|
await import_fs_extra13.default.symlink(target, dest);
|
|
152209
152295
|
return true;
|
|
152210
152296
|
}
|
|
152211
152297
|
async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path12, existingFunctions, standalone = false) {
|
|
152212
|
-
const dest =
|
|
152298
|
+
const dest = join14(outputDir, "functions", `${path12}.func`);
|
|
152213
152299
|
if (existingFunctions) {
|
|
152214
152300
|
if (await writeFunctionSymlink(
|
|
152215
152301
|
outputDir,
|
|
@@ -152223,7 +152309,7 @@ async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path12,
|
|
|
152223
152309
|
}
|
|
152224
152310
|
await import_fs_extra13.default.mkdirp(dest);
|
|
152225
152311
|
const ops = [];
|
|
152226
|
-
const sharedDest =
|
|
152312
|
+
const sharedDest = join14(outputDir, "shared");
|
|
152227
152313
|
const { files, filePathMap, shared } = filesWithoutFsRefs(
|
|
152228
152314
|
edgeFunction.files,
|
|
152229
152315
|
repoRootPath,
|
|
@@ -152242,7 +152328,7 @@ async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path12,
|
|
|
152242
152328
|
files: void 0,
|
|
152243
152329
|
type: void 0
|
|
152244
152330
|
};
|
|
152245
|
-
const configPath =
|
|
152331
|
+
const configPath = join14(dest, ".vc-config.json");
|
|
152246
152332
|
ops.push(
|
|
152247
152333
|
import_fs_extra13.default.writeJSON(configPath, config2, {
|
|
152248
152334
|
spaces: 2
|
|
@@ -152251,7 +152337,7 @@ async function writeEdgeFunction(repoRootPath, outputDir, edgeFunction, path12,
|
|
|
152251
152337
|
await Promise.all(ops);
|
|
152252
152338
|
}
|
|
152253
152339
|
async function writeLambda(repoRootPath, outputDir, lambda, path12, functionConfiguration, existingFunctions, standalone = false) {
|
|
152254
|
-
const dest =
|
|
152340
|
+
const dest = join14(outputDir, "functions", `${path12}.func`);
|
|
152255
152341
|
if (existingFunctions) {
|
|
152256
152342
|
if (await writeFunctionSymlink(outputDir, dest, lambda, existingFunctions)) {
|
|
152257
152343
|
return;
|
|
@@ -152262,7 +152348,7 @@ async function writeLambda(repoRootPath, outputDir, lambda, path12, functionConf
|
|
|
152262
152348
|
const ops = [];
|
|
152263
152349
|
let filePathMap;
|
|
152264
152350
|
if (lambda.files) {
|
|
152265
|
-
const sharedDest =
|
|
152351
|
+
const sharedDest = join14(outputDir, "shared");
|
|
152266
152352
|
const f = filesWithoutFsRefs(
|
|
152267
152353
|
lambda.files,
|
|
152268
152354
|
repoRootPath,
|
|
@@ -152297,7 +152383,7 @@ async function writeLambda(repoRootPath, outputDir, lambda, path12, functionConf
|
|
|
152297
152383
|
files: void 0,
|
|
152298
152384
|
zipBuffer: void 0
|
|
152299
152385
|
};
|
|
152300
|
-
const configPath =
|
|
152386
|
+
const configPath = join14(dest, ".vc-config.json");
|
|
152301
152387
|
ops.push(
|
|
152302
152388
|
import_fs_extra13.default.writeJSON(configPath, config2, {
|
|
152303
152389
|
spaces: 2
|
|
@@ -152305,11 +152391,11 @@ async function writeLambda(repoRootPath, outputDir, lambda, path12, functionConf
|
|
|
152305
152391
|
);
|
|
152306
152392
|
await Promise.all(ops);
|
|
152307
152393
|
for await (const dir of findDirs(".vercel", dest)) {
|
|
152308
|
-
const absDir =
|
|
152394
|
+
const absDir = join14(dest, dir);
|
|
152309
152395
|
const entries = await import_fs_extra13.default.readdir(absDir);
|
|
152310
152396
|
if (entries.includes("cache")) {
|
|
152311
152397
|
await Promise.all(
|
|
152312
|
-
entries.filter((e2) => e2 !== "cache").map((entry) => import_fs_extra13.default.remove(
|
|
152398
|
+
entries.filter((e2) => e2 !== "cache").map((entry) => import_fs_extra13.default.remove(join14(absDir, entry)))
|
|
152313
152399
|
);
|
|
152314
152400
|
} else {
|
|
152315
152401
|
await import_fs_extra13.default.remove(absDir);
|
|
@@ -152317,11 +152403,11 @@ async function writeLambda(repoRootPath, outputDir, lambda, path12, functionConf
|
|
|
152317
152403
|
}
|
|
152318
152404
|
}
|
|
152319
152405
|
async function mergeBuilderOutput(outputDir, buildResult, workPath) {
|
|
152320
|
-
const absOutputDir =
|
|
152406
|
+
const absOutputDir = resolve8(outputDir);
|
|
152321
152407
|
const { ig } = await (0, import_client3.getVercelIgnore)(workPath);
|
|
152322
152408
|
const filter = ig.createFilter();
|
|
152323
152409
|
if (absOutputDir === buildResult.buildOutputPath) {
|
|
152324
|
-
const staticDir =
|
|
152410
|
+
const staticDir = join14(outputDir, "static");
|
|
152325
152411
|
try {
|
|
152326
152412
|
await cleanIgnoredFiles(staticDir, staticDir, filter);
|
|
152327
152413
|
} catch (err) {
|
|
@@ -152343,7 +152429,7 @@ async function cleanIgnoredFiles(dir, staticRoot, filter) {
|
|
|
152343
152429
|
const entries = await import_fs_extra13.default.readdir(dir);
|
|
152344
152430
|
await Promise.all(
|
|
152345
152431
|
entries.map(async (entry) => {
|
|
152346
|
-
const entryPath =
|
|
152432
|
+
const entryPath = join14(dir, entry);
|
|
152347
152433
|
const stat2 = await import_fs_extra13.default.stat(entryPath);
|
|
152348
152434
|
const relativePath = relative5(staticRoot, entryPath);
|
|
152349
152435
|
if (stat2.isDirectory()) {
|
|
@@ -152383,7 +152469,7 @@ async function* findDirs(name, dir, root = dir) {
|
|
|
152383
152469
|
paths = [];
|
|
152384
152470
|
}
|
|
152385
152471
|
for (const path12 of paths) {
|
|
152386
|
-
const abs =
|
|
152472
|
+
const abs = join14(dir, path12);
|
|
152387
152473
|
let stat2;
|
|
152388
152474
|
try {
|
|
152389
152475
|
stat2 = await import_fs_extra13.default.lstat(abs);
|
|
@@ -152412,7 +152498,7 @@ function filesWithoutFsRefs(files, repoRootPath, sharedDest, standalone) {
|
|
|
152412
152498
|
if (standalone && sharedDest) {
|
|
152413
152499
|
shared[path12] = file;
|
|
152414
152500
|
filePathMap[normalizePath2(path12)] = normalizePath2(
|
|
152415
|
-
relative5(repoRootPath,
|
|
152501
|
+
relative5(repoRootPath, join14(sharedDest, path12))
|
|
152416
152502
|
);
|
|
152417
152503
|
} else {
|
|
152418
152504
|
filePathMap[normalizePath2(path12)] = normalizePath2(
|
|
@@ -152438,7 +152524,7 @@ var init_write_build_result = __esm({
|
|
|
152438
152524
|
import_client3 = __toESM3(require_dist7(), 1);
|
|
152439
152525
|
init_output_manager();
|
|
152440
152526
|
({ normalize: normalize2 } = posix);
|
|
152441
|
-
OUTPUT_DIR =
|
|
152527
|
+
OUTPUT_DIR = join14(VERCEL_DIR, "output");
|
|
152442
152528
|
}
|
|
152443
152529
|
});
|
|
152444
152530
|
|
|
@@ -152461,7 +152547,7 @@ var init_unique_strings = __esm({
|
|
|
152461
152547
|
});
|
|
152462
152548
|
|
|
152463
152549
|
// src/util/get-files.ts
|
|
152464
|
-
import { resolve as
|
|
152550
|
+
import { resolve as resolve9 } from "path";
|
|
152465
152551
|
function flatten(arr, res = []) {
|
|
152466
152552
|
for (const cur of arr) {
|
|
152467
152553
|
if (Array.isArray(cur)) {
|
|
@@ -152476,7 +152562,7 @@ async function staticFiles(path12, { src }) {
|
|
|
152476
152562
|
const { debug: debug2, time } = output_manager_default;
|
|
152477
152563
|
let files = [];
|
|
152478
152564
|
const source = src || ".";
|
|
152479
|
-
const search =
|
|
152565
|
+
const search = resolve9(path12, source);
|
|
152480
152566
|
const { ig } = await (0, import_client4.getVercelIgnore)(path12);
|
|
152481
152567
|
const filter = ig.createFilter();
|
|
152482
152568
|
const prefixLength = path12.length + 1;
|
|
@@ -152548,13 +152634,13 @@ var init_get_files = __esm({
|
|
|
152548
152634
|
if (path12[0] === "/") {
|
|
152549
152635
|
return path12;
|
|
152550
152636
|
}
|
|
152551
|
-
return
|
|
152637
|
+
return resolve9(parent, path12);
|
|
152552
152638
|
};
|
|
152553
152639
|
}
|
|
152554
152640
|
});
|
|
152555
152641
|
|
|
152556
152642
|
// src/util/projects/project-settings.ts
|
|
152557
|
-
import { join as
|
|
152643
|
+
import { join as join15 } from "path";
|
|
152558
152644
|
async function writeProjectSettings(cwd, project, org, isRepoLinked) {
|
|
152559
152645
|
let analyticsId;
|
|
152560
152646
|
if (project.analytics?.id && (!project.analytics.disabledAt || project.analytics.enabledAt && project.analytics.enabledAt > project.analytics.disabledAt)) {
|
|
@@ -152577,7 +152663,7 @@ async function writeProjectSettings(cwd, project, org, isRepoLinked) {
|
|
|
152577
152663
|
analyticsId
|
|
152578
152664
|
}
|
|
152579
152665
|
};
|
|
152580
|
-
const path12 =
|
|
152666
|
+
const path12 = join15(cwd, VERCEL_DIR, VERCEL_DIR_PROJECT);
|
|
152581
152667
|
return await (0, import_fs_extra15.outputJSON)(path12, projectLinkAndSettings, {
|
|
152582
152668
|
spaces: 2
|
|
152583
152669
|
});
|
|
@@ -152585,7 +152671,7 @@ async function writeProjectSettings(cwd, project, org, isRepoLinked) {
|
|
|
152585
152671
|
async function readProjectSettings(vercelDir) {
|
|
152586
152672
|
try {
|
|
152587
152673
|
return JSON.parse(
|
|
152588
|
-
await (0, import_fs_extra15.readFile)(
|
|
152674
|
+
await (0, import_fs_extra15.readFile)(join15(vercelDir, VERCEL_DIR_PROJECT), "utf8")
|
|
152589
152675
|
);
|
|
152590
152676
|
} catch (err) {
|
|
152591
152677
|
if ((0, import_error_utils16.isErrnoException)(err) && err.code && ["ENOENT", "ENOTDIR"].includes(err.code)) {
|
|
@@ -153623,7 +153709,7 @@ var init_display_services = __esm({
|
|
|
153623
153709
|
});
|
|
153624
153710
|
|
|
153625
153711
|
// src/util/link/setup-and-link.ts
|
|
153626
|
-
import { join as
|
|
153712
|
+
import { join as join16, basename as basename7 } from "path";
|
|
153627
153713
|
async function setupAndLink(client2, path12, {
|
|
153628
153714
|
autoConfirm = false,
|
|
153629
153715
|
forceDelete = false,
|
|
@@ -153649,8 +153735,8 @@ async function setupAndLink(client2, path12, {
|
|
|
153649
153735
|
}
|
|
153650
153736
|
if (forceDelete) {
|
|
153651
153737
|
const vercelDir = getVercelDirectory(path12);
|
|
153652
|
-
(0, import_fs_extra17.remove)(
|
|
153653
|
-
(0, import_fs_extra17.remove)(
|
|
153738
|
+
(0, import_fs_extra17.remove)(join16(vercelDir, VERCEL_DIR_README));
|
|
153739
|
+
(0, import_fs_extra17.remove)(join16(vercelDir, VERCEL_DIR_PROJECT));
|
|
153654
153740
|
}
|
|
153655
153741
|
if (!isTTY3 && !autoConfirm) {
|
|
153656
153742
|
return { status: "error", exitCode: 1, reason: "HEADLESS" };
|
|
@@ -153708,11 +153794,11 @@ async function setupAndLink(client2, path12, {
|
|
|
153708
153794
|
);
|
|
153709
153795
|
return { status: "linked", org, project };
|
|
153710
153796
|
}
|
|
153711
|
-
if (rootDirectory && !await validateRootDirectory(path12,
|
|
153797
|
+
if (rootDirectory && !await validateRootDirectory(path12, join16(path12, rootDirectory))) {
|
|
153712
153798
|
return { status: "error", exitCode: 1, reason: "INVALID_ROOT_DIRECTORY" };
|
|
153713
153799
|
}
|
|
153714
153800
|
config2.currentTeam = org.type === "team" ? org.id : void 0;
|
|
153715
|
-
const pathWithRootDirectory = rootDirectory ?
|
|
153801
|
+
const pathWithRootDirectory = rootDirectory ? join16(path12, rootDirectory) : path12;
|
|
153716
153802
|
const localConfig = await readConfig(pathWithRootDirectory);
|
|
153717
153803
|
if (localConfig instanceof CantParseJSONFile) {
|
|
153718
153804
|
output_manager_default.prettyError(localConfig);
|
|
@@ -153799,7 +153885,7 @@ async function setupAndLink(client2, path12, {
|
|
|
153799
153885
|
}
|
|
153800
153886
|
async function connectGitRepository(client2, path12, project, autoConfirm, org) {
|
|
153801
153887
|
try {
|
|
153802
|
-
const gitConfig = await parseGitConfig(
|
|
153888
|
+
const gitConfig = await parseGitConfig(join16(path12, ".git/config"));
|
|
153803
153889
|
if (!gitConfig) {
|
|
153804
153890
|
return;
|
|
153805
153891
|
}
|
|
@@ -153951,12 +154037,12 @@ __export3(pull_exports, {
|
|
|
153951
154037
|
parseEnvironment: () => parseEnvironment,
|
|
153952
154038
|
pullCommandLogic: () => pullCommandLogic
|
|
153953
154039
|
});
|
|
153954
|
-
import { join as
|
|
154040
|
+
import { join as join17 } from "path";
|
|
153955
154041
|
async function pullAllEnvFiles(environment, client2, link4, flags, cwd) {
|
|
153956
154042
|
const environmentFile = `.env.${environment}.local`;
|
|
153957
154043
|
await envPullCommandLogic(
|
|
153958
154044
|
client2,
|
|
153959
|
-
|
|
154045
|
+
join17(".vercel", environmentFile),
|
|
153960
154046
|
!!flags["--yes"],
|
|
153961
154047
|
environment,
|
|
153962
154048
|
link4,
|
|
@@ -154022,7 +154108,7 @@ async function pullCommandLogic(client2, cwd, autoConfirm, environment, flags) {
|
|
|
154022
154108
|
const { project, org, repoRoot } = link4;
|
|
154023
154109
|
let currentDirectory;
|
|
154024
154110
|
if (repoRoot) {
|
|
154025
|
-
currentDirectory =
|
|
154111
|
+
currentDirectory = join17(repoRoot, project.rootDirectory || "");
|
|
154026
154112
|
} else {
|
|
154027
154113
|
currentDirectory = cwd;
|
|
154028
154114
|
}
|
|
@@ -154045,7 +154131,7 @@ async function pullCommandLogic(client2, cwd, autoConfirm, environment, flags) {
|
|
|
154045
154131
|
output_manager_default.print(
|
|
154046
154132
|
`${prependEmoji(
|
|
154047
154133
|
`Downloaded project settings to ${import_chalk57.default.bold(
|
|
154048
|
-
humanizePath(
|
|
154134
|
+
humanizePath(join17(currentDirectory, VERCEL_DIR, VERCEL_DIR_PROJECT))
|
|
154049
154135
|
)} ${import_chalk57.default.gray(settingsStamp())}`,
|
|
154050
154136
|
emoji("success")
|
|
154051
154137
|
)}
|
|
@@ -154082,12 +154168,13 @@ var build_exports = {};
|
|
|
154082
154168
|
__export3(build_exports, {
|
|
154083
154169
|
default: () => main3
|
|
154084
154170
|
});
|
|
154085
|
-
import { join as
|
|
154171
|
+
import { join as join18, normalize as normalize3, relative as relative6, resolve as resolve10, sep as sep2 } from "path";
|
|
154086
154172
|
import {
|
|
154087
154173
|
download as download2,
|
|
154088
154174
|
FileFsRef as FileFsRef2,
|
|
154089
154175
|
getDiscontinuedNodeVersions,
|
|
154090
154176
|
getInstalledPackageVersion,
|
|
154177
|
+
getServiceUrlEnvVars,
|
|
154091
154178
|
normalizePath as normalizePath3,
|
|
154092
154179
|
NowBuildError as NowBuildError6,
|
|
154093
154180
|
runNpmInstall,
|
|
@@ -154165,7 +154252,7 @@ async function main3(client2) {
|
|
|
154165
154252
|
if (link4?.repoRoot) {
|
|
154166
154253
|
cwd = client2.cwd = link4.repoRoot;
|
|
154167
154254
|
}
|
|
154168
|
-
const vercelDir =
|
|
154255
|
+
const vercelDir = join18(cwd, projectRootDirectory, VERCEL_DIR);
|
|
154169
154256
|
let project = await readProjectSettings(vercelDir);
|
|
154170
154257
|
const isTTY3 = process.stdin.isTTY;
|
|
154171
154258
|
while (!project?.settings) {
|
|
@@ -154192,7 +154279,7 @@ async function main3(client2) {
|
|
|
154192
154279
|
return 0;
|
|
154193
154280
|
}
|
|
154194
154281
|
const { argv: originalArgv } = client2;
|
|
154195
|
-
client2.cwd =
|
|
154282
|
+
client2.cwd = join18(cwd, projectRootDirectory);
|
|
154196
154283
|
client2.argv = [
|
|
154197
154284
|
...originalArgv.slice(0, 2),
|
|
154198
154285
|
"pull",
|
|
@@ -154213,8 +154300,8 @@ async function main3(client2) {
|
|
|
154213
154300
|
client2.argv = originalArgv;
|
|
154214
154301
|
project = await readProjectSettings(vercelDir);
|
|
154215
154302
|
}
|
|
154216
|
-
const defaultOutputDir =
|
|
154217
|
-
const outputDir = parsedArgs.flags["--output"] ?
|
|
154303
|
+
const defaultOutputDir = join18(cwd, projectRootDirectory, OUTPUT_DIR);
|
|
154304
|
+
const outputDir = parsedArgs.flags["--output"] ? resolve10(parsedArgs.flags["--output"]) : defaultOutputDir;
|
|
154218
154305
|
await Promise.all([
|
|
154219
154306
|
import_fs_extra18.default.remove(outputDir),
|
|
154220
154307
|
// Also delete `.vercel/output`, in case the script is targeting Build Output API directly
|
|
@@ -154232,7 +154319,7 @@ async function main3(client2) {
|
|
|
154232
154319
|
}
|
|
154233
154320
|
const envToUnset = /* @__PURE__ */ new Set(["VERCEL", "NOW_BUILDER"]);
|
|
154234
154321
|
try {
|
|
154235
|
-
const envPath =
|
|
154322
|
+
const envPath = join18(
|
|
154236
154323
|
cwd,
|
|
154237
154324
|
projectRootDirectory,
|
|
154238
154325
|
VERCEL_DIR,
|
|
@@ -154269,8 +154356,8 @@ async function main3(client2) {
|
|
|
154269
154356
|
} catch (err) {
|
|
154270
154357
|
output_manager_default.prettyError(err);
|
|
154271
154358
|
buildsJson.error = toEnumerableError(err);
|
|
154272
|
-
const buildsJsonPath =
|
|
154273
|
-
const configJsonPath =
|
|
154359
|
+
const buildsJsonPath = join18(outputDir, "builds.json");
|
|
154360
|
+
const configJsonPath = join18(outputDir, "config.json");
|
|
154274
154361
|
await import_fs_extra18.default.outputJSON(buildsJsonPath, buildsJson, {
|
|
154275
154362
|
spaces: 2
|
|
154276
154363
|
});
|
|
@@ -154278,10 +154365,10 @@ async function main3(client2) {
|
|
|
154278
154365
|
return 1;
|
|
154279
154366
|
} finally {
|
|
154280
154367
|
try {
|
|
154281
|
-
const diagnosticsOutputPath =
|
|
154368
|
+
const diagnosticsOutputPath = join18(outputDir, "diagnostics");
|
|
154282
154369
|
await mkdir4(diagnosticsOutputPath, { recursive: true });
|
|
154283
154370
|
await writeFile5(
|
|
154284
|
-
|
|
154371
|
+
join18(diagnosticsOutputPath, "cli_traces.json"),
|
|
154285
154372
|
JSON.stringify(reporter.events)
|
|
154286
154373
|
);
|
|
154287
154374
|
} catch (err) {
|
|
@@ -154298,7 +154385,7 @@ async function main3(client2) {
|
|
|
154298
154385
|
async function doBuild(client2, project, buildsJson, cwd, outputDir, span, standalone = false) {
|
|
154299
154386
|
const { localConfigPath } = client2;
|
|
154300
154387
|
const VALID_DEPLOYMENT_ID_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
|
154301
|
-
const workPath =
|
|
154388
|
+
const workPath = join18(cwd, project.settings.rootDirectory || ".");
|
|
154302
154389
|
const sourceConfigFile = await findSourceVercelConfigFile(workPath);
|
|
154303
154390
|
let corepackShimDir;
|
|
154304
154391
|
if (sourceConfigFile) {
|
|
@@ -154329,11 +154416,11 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154329
154416
|
process.env.VERCEL_INSTALL_COMPLETED = "1";
|
|
154330
154417
|
}
|
|
154331
154418
|
const compileResult = await compileVercelConfig(workPath);
|
|
154332
|
-
const vercelConfigPath = localConfigPath || compileResult.configPath ||
|
|
154419
|
+
const vercelConfigPath = localConfigPath || compileResult.configPath || join18(workPath, "vercel.json");
|
|
154333
154420
|
const [pkg, vercelConfig, nowConfig, hasInstrumentation] = await Promise.all([
|
|
154334
|
-
readJSONFile(
|
|
154421
|
+
readJSONFile(join18(workPath, "package.json")),
|
|
154335
154422
|
readJSONFile(vercelConfigPath),
|
|
154336
|
-
readJSONFile(
|
|
154423
|
+
readJSONFile(join18(workPath, "now.json")),
|
|
154337
154424
|
(0, import_fs_detectors5.detectInstrumentation)(new import_fs_detectors5.LocalFileSystemDetector(workPath))
|
|
154338
154425
|
]);
|
|
154339
154426
|
if (pkg instanceof CantParseJSONFile)
|
|
@@ -154368,7 +154455,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154368
154455
|
const errorPages = typeof localConfig.customErrorPage === "string" ? [localConfig.customErrorPage] : Object.values(localConfig.customErrorPage);
|
|
154369
154456
|
for (const page of errorPages) {
|
|
154370
154457
|
if (page) {
|
|
154371
|
-
const src =
|
|
154458
|
+
const src = join18(workPath, page);
|
|
154372
154459
|
if (!(0, import_fs_extra18.existsSync)(src)) {
|
|
154373
154460
|
throw new NowBuildError6({
|
|
154374
154461
|
code: "CUSTOM_ERROR_PAGE_NOT_FOUND",
|
|
@@ -154430,6 +154517,18 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154430
154517
|
builds = [{ src: "**", use: "@vercel/static" }];
|
|
154431
154518
|
}
|
|
154432
154519
|
detectedServices = detectedBuilders.services;
|
|
154520
|
+
if (detectedServices && detectedServices.length > 0) {
|
|
154521
|
+
const serviceUrlEnvVars = getServiceUrlEnvVars({
|
|
154522
|
+
services: detectedServices,
|
|
154523
|
+
frameworkList: import_frameworks6.frameworkList,
|
|
154524
|
+
currentEnv: process.env,
|
|
154525
|
+
deploymentUrl: process.env.VERCEL_URL
|
|
154526
|
+
});
|
|
154527
|
+
for (const [key, value] of Object.entries(serviceUrlEnvVars)) {
|
|
154528
|
+
process.env[key] = value;
|
|
154529
|
+
output_manager_default.debug(`Injected service URL env var: ${key}=${value}`);
|
|
154530
|
+
}
|
|
154531
|
+
}
|
|
154433
154532
|
zeroConfigRoutes.push(...detectedBuilders.redirectRoutes || []);
|
|
154434
154533
|
zeroConfigRoutes.push(
|
|
154435
154534
|
...(0, import_routing_utils2.appendRoutesToPhase)({
|
|
@@ -154449,7 +154548,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154449
154548
|
const buildersWithPkgs = await importBuilders(builderSpecs, cwd);
|
|
154450
154549
|
const filesMap = {};
|
|
154451
154550
|
for (const path12 of files) {
|
|
154452
|
-
const fsPath =
|
|
154551
|
+
const fsPath = join18(workPath, path12);
|
|
154453
154552
|
const { mode } = await import_fs_extra18.default.stat(fsPath);
|
|
154454
154553
|
filesMap[path12] = new FileFsRef2({ mode, fsPath });
|
|
154455
154554
|
}
|
|
@@ -154576,7 +154675,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154576
154675
|
}
|
|
154577
154676
|
}
|
|
154578
154677
|
if ("output" in buildResult && buildResult.output && (isBackendBuilder2(build2) || build2.use === "@vercel/python")) {
|
|
154579
|
-
const routesJsonPath =
|
|
154678
|
+
const routesJsonPath = join18(workPath, ".vercel", "routes.json");
|
|
154580
154679
|
if ((0, import_fs_extra18.existsSync)(routesJsonPath)) {
|
|
154581
154680
|
try {
|
|
154582
154681
|
const routesJson = await readJSONFile(routesJsonPath);
|
|
@@ -154654,7 +154753,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154654
154753
|
throw err;
|
|
154655
154754
|
} finally {
|
|
154656
154755
|
ops.push(
|
|
154657
|
-
download2(diagnostics,
|
|
154756
|
+
download2(diagnostics, join18(outputDir, "diagnostics")).then(
|
|
154658
154757
|
() => void 0,
|
|
154659
154758
|
(err) => err
|
|
154660
154759
|
)
|
|
@@ -154692,7 +154791,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154692
154791
|
if (needBuildsJsonOverride) {
|
|
154693
154792
|
await writeBuildJson(buildsJson, outputDir);
|
|
154694
154793
|
}
|
|
154695
|
-
const configPath =
|
|
154794
|
+
const configPath = join18(outputDir, "config.json");
|
|
154696
154795
|
const existingConfig = await readJSONFile(configPath);
|
|
154697
154796
|
if (existingConfig instanceof CantParseJSONFile) {
|
|
154698
154797
|
throw existingConfig;
|
|
@@ -154783,7 +154882,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
154783
154882
|
...detectedServices && detectedServices.length > 0 && { services: detectedServices },
|
|
154784
154883
|
...mergedDeploymentId && { deploymentId: mergedDeploymentId }
|
|
154785
154884
|
};
|
|
154786
|
-
await import_fs_extra18.default.writeJSON(
|
|
154885
|
+
await import_fs_extra18.default.writeJSON(join18(outputDir, "config.json"), config2, { spaces: 2 });
|
|
154787
154886
|
await writeFlagsJSON(buildResults.values(), outputDir);
|
|
154788
154887
|
const relOutputDir = relative6(cwd, outputDir);
|
|
154789
154888
|
output_manager_default.print(
|
|
@@ -154893,7 +154992,7 @@ async function mergeDeploymentId(existingDeploymentId, buildResults, workPath) {
|
|
|
154893
154992
|
}
|
|
154894
154993
|
}
|
|
154895
154994
|
try {
|
|
154896
|
-
const routesManifestPath =
|
|
154995
|
+
const routesManifestPath = join18(workPath, ".next", "routes-manifest.json");
|
|
154897
154996
|
if (await import_fs_extra18.default.pathExists(routesManifestPath)) {
|
|
154898
154997
|
const routesManifest = await readJSONFile(
|
|
154899
154998
|
routesManifestPath
|
|
@@ -154909,7 +155008,7 @@ async function mergeDeploymentId(existingDeploymentId, buildResults, workPath) {
|
|
|
154909
155008
|
return void 0;
|
|
154910
155009
|
}
|
|
154911
155010
|
async function writeFlagsJSON(buildResults, outputDir) {
|
|
154912
|
-
const flagsFilePath =
|
|
155011
|
+
const flagsFilePath = join18(outputDir, "flags.json");
|
|
154913
155012
|
let hasFlags = true;
|
|
154914
155013
|
const flags = await import_fs_extra18.default.readJSON(flagsFilePath).catch((error3) => {
|
|
154915
155014
|
if (error3.code === "ENOENT") {
|
|
@@ -154937,7 +155036,7 @@ async function writeFlagsJSON(buildResults, outputDir) {
|
|
|
154937
155036
|
}
|
|
154938
155037
|
}
|
|
154939
155038
|
async function writeBuildJson(buildsJson, outputDir) {
|
|
154940
|
-
await import_fs_extra18.default.writeJSON(
|
|
155039
|
+
await import_fs_extra18.default.writeJSON(join18(outputDir, "builds.json"), buildsJson, { spaces: 2 });
|
|
154941
155040
|
}
|
|
154942
155041
|
async function getFrameworkRoutes(framework, dirPrefix) {
|
|
154943
155042
|
let routes2 = [];
|
|
@@ -155536,13 +155635,13 @@ var init_cache2 = __esm({
|
|
|
155536
155635
|
|
|
155537
155636
|
// src/util/certs/create-cert-from-file.ts
|
|
155538
155637
|
import { readFileSync } from "fs";
|
|
155539
|
-
import { resolve as
|
|
155638
|
+
import { resolve as resolve11 } from "path";
|
|
155540
155639
|
async function createCertFromFile(client2, keyPath, certPath, caPath) {
|
|
155541
155640
|
output_manager_default.spinner("Adding your custom certificate");
|
|
155542
155641
|
try {
|
|
155543
|
-
const cert = readFileSync(
|
|
155544
|
-
const key = readFileSync(
|
|
155545
|
-
const ca = readFileSync(
|
|
155642
|
+
const cert = readFileSync(resolve11(certPath), "utf8");
|
|
155643
|
+
const key = readFileSync(resolve11(keyPath), "utf8");
|
|
155644
|
+
const ca = readFileSync(resolve11(caPath), "utf8");
|
|
155546
155645
|
const certificate = await client2.fetch("/v3/certs", {
|
|
155547
155646
|
method: "PUT",
|
|
155548
155647
|
body: {
|
|
@@ -156332,7 +156431,7 @@ async function getCertsToDelete(client2, contextName, id) {
|
|
|
156332
156431
|
return [cert];
|
|
156333
156432
|
}
|
|
156334
156433
|
function readConfirmation(client2, msg, certs) {
|
|
156335
|
-
return new Promise((
|
|
156434
|
+
return new Promise((resolve15) => {
|
|
156336
156435
|
output_manager_default.log(msg);
|
|
156337
156436
|
output_manager_default.print(
|
|
156338
156437
|
`${table(certs.map(formatCertRow), {
|
|
@@ -156346,7 +156445,7 @@ function readConfirmation(client2, msg, certs) {
|
|
|
156346
156445
|
);
|
|
156347
156446
|
client2.stdin.on("data", (d) => {
|
|
156348
156447
|
process.stdin.pause();
|
|
156349
|
-
|
|
156448
|
+
resolve15(d.toString().trim().toLowerCase() === "y");
|
|
156350
156449
|
}).resume();
|
|
156351
156450
|
});
|
|
156352
156451
|
}
|
|
@@ -156896,7 +156995,7 @@ async function curl(client2) {
|
|
|
156896
156995
|
}
|
|
156897
156996
|
curlFlags.unshift("--url", fullUrl);
|
|
156898
156997
|
output_manager_default.debug(`Executing: curl ${curlFlags.map(requoteArgs).join(" ")}`);
|
|
156899
|
-
return new Promise((
|
|
156998
|
+
return new Promise((resolve15) => {
|
|
156900
156999
|
const curlProcess = spawn4("curl", curlFlags, {
|
|
156901
157000
|
stdio: "inherit",
|
|
156902
157001
|
shell: false
|
|
@@ -156904,14 +157003,14 @@ async function curl(client2) {
|
|
|
156904
157003
|
curlProcess.on("error", (err) => {
|
|
156905
157004
|
if ("code" in err && err.code === "ENOENT") {
|
|
156906
157005
|
output_manager_default.error("curl command not found. Please install curl.");
|
|
156907
|
-
|
|
157006
|
+
resolve15(1);
|
|
156908
157007
|
} else {
|
|
156909
157008
|
output_manager_default.error(`Failed to execute curl: ${err.message}`);
|
|
156910
|
-
|
|
157009
|
+
resolve15(1);
|
|
156911
157010
|
}
|
|
156912
157011
|
});
|
|
156913
157012
|
curlProcess.on("close", (code2) => {
|
|
156914
|
-
|
|
157013
|
+
resolve15(code2 ?? 1);
|
|
156915
157014
|
});
|
|
156916
157015
|
});
|
|
156917
157016
|
}
|
|
@@ -157152,7 +157251,7 @@ async function printEvents(client2, urlOrDeploymentId, { mode, onEvent, quiet, f
|
|
|
157152
157251
|
});
|
|
157153
157252
|
if (eventsRes.ok) {
|
|
157154
157253
|
const readable = eventsRes.body;
|
|
157155
|
-
return new Promise((
|
|
157254
|
+
return new Promise((resolve15, reject) => {
|
|
157156
157255
|
const stream = readable.pipe(import_jsonlines.default.parse());
|
|
157157
157256
|
let poller;
|
|
157158
157257
|
if (mode === "deploy") {
|
|
@@ -157186,7 +157285,7 @@ async function printEvents(client2, urlOrDeploymentId, { mode, onEvent, quiet, f
|
|
|
157186
157285
|
if (err2) {
|
|
157187
157286
|
reject(err2);
|
|
157188
157287
|
} else {
|
|
157189
|
-
|
|
157288
|
+
resolve15();
|
|
157190
157289
|
}
|
|
157191
157290
|
}
|
|
157192
157291
|
let latestLogDate = 0;
|
|
@@ -157232,7 +157331,7 @@ async function printEvents(client2, urlOrDeploymentId, { mode, onEvent, quiet, f
|
|
|
157232
157331
|
onEvent,
|
|
157233
157332
|
quiet,
|
|
157234
157333
|
findOpts: retryFindOpts
|
|
157235
|
-
}).then(
|
|
157334
|
+
}).then(resolve15, reject);
|
|
157236
157335
|
}, 2e3);
|
|
157237
157336
|
};
|
|
157238
157337
|
stream.on("end", finish);
|
|
@@ -157346,7 +157445,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
|
157346
157445
|
}
|
|
157347
157446
|
}
|
|
157348
157447
|
});
|
|
157349
|
-
return new Promise((
|
|
157448
|
+
return new Promise((resolve15, reject) => {
|
|
157350
157449
|
const stream = response.body.pipe(parse11 ? import_jsonlines2.default.parse() : (0, import_split2.default)());
|
|
157351
157450
|
let finished = false;
|
|
157352
157451
|
let errored = false;
|
|
@@ -157359,7 +157458,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
|
157359
157458
|
if (err) {
|
|
157360
157459
|
reject(err);
|
|
157361
157460
|
} else {
|
|
157362
|
-
|
|
157461
|
+
resolve15(abortController.signal.aborted ? 1 : 0);
|
|
157363
157462
|
}
|
|
157364
157463
|
}
|
|
157365
157464
|
const handleData = (data) => {
|
|
@@ -157388,7 +157487,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
|
157388
157487
|
if (abortController.signal.aborted)
|
|
157389
157488
|
return;
|
|
157390
157489
|
displayRuntimeLogs(client2, options, abortController).then(
|
|
157391
|
-
|
|
157490
|
+
resolve15,
|
|
157392
157491
|
reject
|
|
157393
157492
|
);
|
|
157394
157493
|
}, 2e3);
|
|
@@ -158257,10 +158356,10 @@ var init_get_deployment_checks = __esm({
|
|
|
158257
158356
|
});
|
|
158258
158357
|
|
|
158259
158358
|
// src/util/deploy/get-prebuilt-json.ts
|
|
158260
|
-
import { join as
|
|
158359
|
+
import { join as join19 } from "path";
|
|
158261
158360
|
async function getPrebuiltJson(directory) {
|
|
158262
158361
|
try {
|
|
158263
|
-
return await import_fs_extra19.default.readJSON(
|
|
158362
|
+
return await import_fs_extra19.default.readJSON(join19(directory, "builds.json"));
|
|
158264
158363
|
} catch (error3) {
|
|
158265
158364
|
}
|
|
158266
158365
|
return null;
|
|
@@ -158599,7 +158698,7 @@ import {
|
|
|
158599
158698
|
getSupportedNodeVersion,
|
|
158600
158699
|
scanParentDirs as scanParentDirs3
|
|
158601
158700
|
} from "@vercel/build-utils";
|
|
158602
|
-
import { join as
|
|
158701
|
+
import { join as join20, resolve as resolve12 } from "path";
|
|
158603
158702
|
import { determineAgent } from "@vercel/detect-agent";
|
|
158604
158703
|
function handleCreateDeployError(error3, localConfig) {
|
|
158605
158704
|
if (error3 instanceof InvalidDomain) {
|
|
@@ -158761,7 +158860,7 @@ var init_deploy2 = __esm({
|
|
|
158761
158860
|
}
|
|
158762
158861
|
let paths;
|
|
158763
158862
|
if (parsedArguments.args.length > 0) {
|
|
158764
|
-
paths = parsedArguments.args.map((item) =>
|
|
158863
|
+
paths = parsedArguments.args.map((item) => resolve12(client2.cwd, item));
|
|
158765
158864
|
telemetryClient.trackCliArgumentProjectPath(paths[0]);
|
|
158766
158865
|
} else {
|
|
158767
158866
|
paths = [client2.cwd];
|
|
@@ -158862,9 +158961,9 @@ var init_deploy2 = __esm({
|
|
|
158862
158961
|
}
|
|
158863
158962
|
let vercelOutputDir;
|
|
158864
158963
|
if (parsedArguments.flags["--prebuilt"]) {
|
|
158865
|
-
vercelOutputDir =
|
|
158964
|
+
vercelOutputDir = join20(cwd, ".vercel/output");
|
|
158866
158965
|
if (link4.repoRoot && link4.project.rootDirectory) {
|
|
158867
|
-
vercelOutputDir =
|
|
158966
|
+
vercelOutputDir = join20(cwd, link4.project.rootDirectory, ".vercel/output");
|
|
158868
158967
|
}
|
|
158869
158968
|
const prebuiltExists = await import_fs_extra20.default.pathExists(vercelOutputDir);
|
|
158870
158969
|
if (!prebuiltExists) {
|
|
@@ -158908,13 +159007,13 @@ var init_deploy2 = __esm({
|
|
|
158908
159007
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
158909
159008
|
if (rootDirectory && await validateRootDirectory(
|
|
158910
159009
|
cwd,
|
|
158911
|
-
|
|
159010
|
+
join20(cwd, rootDirectory),
|
|
158912
159011
|
project ? `To change your Project Settings, go to https://vercel.com/${org?.slug}/${project.name}/settings` : ""
|
|
158913
159012
|
) === false) {
|
|
158914
159013
|
return 1;
|
|
158915
159014
|
}
|
|
158916
159015
|
if (rootDirectory) {
|
|
158917
|
-
const rootDirectoryPath =
|
|
159016
|
+
const rootDirectoryPath = join20(cwd, rootDirectory);
|
|
158918
159017
|
await compileVercelConfig(rootDirectoryPath);
|
|
158919
159018
|
const rootDirectoryConfig = readLocalConfig(rootDirectoryPath);
|
|
158920
159019
|
if (rootDirectoryConfig) {
|
|
@@ -159051,7 +159150,7 @@ var init_deploy2 = __esm({
|
|
|
159051
159150
|
};
|
|
159052
159151
|
}
|
|
159053
159152
|
const { packageJson } = await scanParentDirs3(
|
|
159054
|
-
|
|
159153
|
+
join20(cwd, project?.rootDirectory ?? ""),
|
|
159055
159154
|
true,
|
|
159056
159155
|
cwd
|
|
159057
159156
|
);
|
|
@@ -163589,11 +163688,11 @@ var require_raw_body = __commonJS2({
|
|
|
163589
163688
|
if (done) {
|
|
163590
163689
|
return readStream(stream, encoding, length, limit, done);
|
|
163591
163690
|
}
|
|
163592
|
-
return new Promise(function executor(
|
|
163691
|
+
return new Promise(function executor(resolve15, reject) {
|
|
163593
163692
|
readStream(stream, encoding, length, limit, function onRead(err, buf) {
|
|
163594
163693
|
if (err)
|
|
163595
163694
|
return reject(err);
|
|
163596
|
-
|
|
163695
|
+
resolve15(buf);
|
|
163597
163696
|
});
|
|
163598
163697
|
});
|
|
163599
163698
|
}
|
|
@@ -174882,7 +174981,7 @@ var require_src4 = __commonJS2({
|
|
|
174882
174981
|
var directoryTemplate2 = require_directory();
|
|
174883
174982
|
var errorTemplate = require_error4();
|
|
174884
174983
|
var etags = /* @__PURE__ */ new Map();
|
|
174885
|
-
var calculateSha = (handlers, absolutePath) => new Promise((
|
|
174984
|
+
var calculateSha = (handlers, absolutePath) => new Promise((resolve15, reject) => {
|
|
174886
174985
|
const hash = createHash("sha1");
|
|
174887
174986
|
hash.update(path12.extname(absolutePath));
|
|
174888
174987
|
hash.update("-");
|
|
@@ -174891,7 +174990,7 @@ var require_src4 = __commonJS2({
|
|
|
174891
174990
|
rs.on("data", (buf) => hash.update(buf));
|
|
174892
174991
|
rs.on("end", () => {
|
|
174893
174992
|
const sha = hash.digest("hex");
|
|
174894
|
-
|
|
174993
|
+
resolve15(sha);
|
|
174895
174994
|
});
|
|
174896
174995
|
});
|
|
174897
174996
|
var sourceMatches = (source, requestPath, allowSegments) => {
|
|
@@ -175425,7 +175524,7 @@ var require_dist24 = __commonJS2({
|
|
|
175425
175524
|
(function(once3) {
|
|
175426
175525
|
function spread(emitter, name) {
|
|
175427
175526
|
let c = null;
|
|
175428
|
-
const p = new Promise((
|
|
175527
|
+
const p = new Promise((resolve15, reject) => {
|
|
175429
175528
|
function cancel() {
|
|
175430
175529
|
emitter.removeListener(name, onEvent);
|
|
175431
175530
|
emitter.removeListener("error", onError);
|
|
@@ -175433,7 +175532,7 @@ var require_dist24 = __commonJS2({
|
|
|
175433
175532
|
}
|
|
175434
175533
|
function onEvent(...args2) {
|
|
175435
175534
|
cancel();
|
|
175436
|
-
|
|
175535
|
+
resolve15(args2);
|
|
175437
175536
|
}
|
|
175438
175537
|
function onError(err) {
|
|
175439
175538
|
cancel();
|
|
@@ -175471,14 +175570,14 @@ var require_get_port = __commonJS2({
|
|
|
175471
175570
|
};
|
|
175472
175571
|
var releaseOldLockedPortsIntervalMs = 1e3 * 15;
|
|
175473
175572
|
var interval;
|
|
175474
|
-
var getAvailablePort = (options) => new Promise((
|
|
175573
|
+
var getAvailablePort = (options) => new Promise((resolve15, reject) => {
|
|
175475
175574
|
const server = net.createServer();
|
|
175476
175575
|
server.unref();
|
|
175477
175576
|
server.on("error", reject);
|
|
175478
175577
|
server.listen(options, () => {
|
|
175479
175578
|
const { port } = server.address();
|
|
175480
175579
|
server.close(() => {
|
|
175481
|
-
|
|
175580
|
+
resolve15(port);
|
|
175482
175581
|
});
|
|
175483
175582
|
});
|
|
175484
175583
|
});
|
|
@@ -175550,7 +175649,7 @@ var require_is_port_reachable = __commonJS2({
|
|
|
175550
175649
|
"use strict";
|
|
175551
175650
|
var net = __require("net");
|
|
175552
175651
|
module2.exports = async (port, { timeout = 1e3, host } = {}) => {
|
|
175553
|
-
const promise = new Promise((
|
|
175652
|
+
const promise = new Promise((resolve15, reject) => {
|
|
175554
175653
|
const socket = new net.Socket();
|
|
175555
175654
|
const onError = () => {
|
|
175556
175655
|
socket.destroy();
|
|
@@ -175561,7 +175660,7 @@ var require_is_port_reachable = __commonJS2({
|
|
|
175561
175660
|
socket.once("timeout", onError);
|
|
175562
175661
|
socket.connect(port, host, () => {
|
|
175563
175662
|
socket.end();
|
|
175564
|
-
|
|
175663
|
+
resolve15();
|
|
175565
175664
|
});
|
|
175566
175665
|
});
|
|
175567
175666
|
try {
|
|
@@ -175576,7 +175675,7 @@ var require_is_port_reachable = __commonJS2({
|
|
|
175576
175675
|
|
|
175577
175676
|
// src/util/dev/port-utils.ts
|
|
175578
175677
|
function sleep2(ms36) {
|
|
175579
|
-
return new Promise((
|
|
175678
|
+
return new Promise((resolve15) => setTimeout(resolve15, ms36));
|
|
175580
175679
|
}
|
|
175581
175680
|
async function getReachableHostOnPort(port) {
|
|
175582
175681
|
const optsIpv4 = { host: "127.0.0.1" };
|
|
@@ -176096,7 +176195,7 @@ var init_tree_kill = __esm({
|
|
|
176096
176195
|
});
|
|
176097
176196
|
|
|
176098
176197
|
// src/util/dev/builder.ts
|
|
176099
|
-
import { delimiter as delimiter2, dirname as dirname7, join as
|
|
176198
|
+
import { delimiter as delimiter2, dirname as dirname7, join as join21 } from "path";
|
|
176100
176199
|
import { fork as fork2 } from "child_process";
|
|
176101
176200
|
import { createFunction } from "@vercel/fun";
|
|
176102
176201
|
import {
|
|
@@ -176109,7 +176208,7 @@ import {
|
|
|
176109
176208
|
} from "@vercel/build-utils";
|
|
176110
176209
|
async function createBuildProcess(match, envConfigs, workPath) {
|
|
176111
176210
|
output_manager_default.debug(`Creating build process for "${match.entrypoint}"`);
|
|
176112
|
-
const builderWorkerPath =
|
|
176211
|
+
const builderWorkerPath = join21(__dirname, "builder-worker.cjs");
|
|
176113
176212
|
const PATH = `${dirname7(process.execPath)}${delimiter2}${process.env.PATH}`;
|
|
176114
176213
|
const env = {
|
|
176115
176214
|
...process.env,
|
|
@@ -176128,12 +176227,12 @@ async function createBuildProcess(match, envConfigs, workPath) {
|
|
|
176128
176227
|
);
|
|
176129
176228
|
match.buildProcess = void 0;
|
|
176130
176229
|
});
|
|
176131
|
-
return new Promise((
|
|
176230
|
+
return new Promise((resolve15, reject) => {
|
|
176132
176231
|
buildProcess.once("message", (data) => {
|
|
176133
176232
|
if (data !== null && typeof data === "object" && data.type !== "ready") {
|
|
176134
176233
|
reject(new Error('Did not get "ready" event from builder'));
|
|
176135
176234
|
} else {
|
|
176136
|
-
|
|
176235
|
+
resolve15(buildProcess);
|
|
176137
176236
|
}
|
|
176138
176237
|
});
|
|
176139
176238
|
});
|
|
@@ -176185,12 +176284,12 @@ async function executeBuild(vercelConfig, devServer, files, match, requestPath,
|
|
|
176185
176284
|
requirePath,
|
|
176186
176285
|
buildOptions
|
|
176187
176286
|
});
|
|
176188
|
-
buildResultOrOutputs = await new Promise((
|
|
176287
|
+
buildResultOrOutputs = await new Promise((resolve15, reject) => {
|
|
176189
176288
|
function onMessage({ type, result: result2, error: error3 }) {
|
|
176190
176289
|
cleanup();
|
|
176191
176290
|
if (type === "buildResult") {
|
|
176192
176291
|
if (result2) {
|
|
176193
|
-
|
|
176292
|
+
resolve15(result2);
|
|
176194
176293
|
} else if (error3) {
|
|
176195
176294
|
reject(Object.assign(new Error(), error3));
|
|
176196
176295
|
}
|
|
@@ -176396,7 +176495,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
176396
176495
|
mapToEntrypoint.set(extensionless, src);
|
|
176397
176496
|
src = extensionless;
|
|
176398
176497
|
}
|
|
176399
|
-
const files = fileList.filter((name) => name === src || (0, import_minimatch3.default)(name, src, { dot: true })).map((name) =>
|
|
176498
|
+
const files = fileList.filter((name) => name === src || (0, import_minimatch3.default)(name, src, { dot: true })).map((name) => join21(cwd, name));
|
|
176400
176499
|
if (files.length === 0) {
|
|
176401
176500
|
noMatches.push(buildConfig);
|
|
176402
176501
|
}
|
|
@@ -177136,7 +177235,7 @@ import url2, { URL as URL8 } from "url";
|
|
|
177136
177235
|
import http2 from "http";
|
|
177137
177236
|
import { randomBytes } from "crypto";
|
|
177138
177237
|
import { watch } from "chokidar";
|
|
177139
|
-
import path9, { isAbsolute, basename as basename9, dirname as dirname8, extname as extname2, join as
|
|
177238
|
+
import path9, { isAbsolute, basename as basename9, dirname as dirname8, extname as extname2, join as join22 } from "path";
|
|
177140
177239
|
import {
|
|
177141
177240
|
cloneEnv as cloneEnv3,
|
|
177142
177241
|
getNodeBinPaths as getNodeBinPaths2,
|
|
@@ -177175,12 +177274,12 @@ function serveStaticFile(req, res, cwd, opts) {
|
|
|
177175
177274
|
});
|
|
177176
177275
|
}
|
|
177177
177276
|
function close(server) {
|
|
177178
|
-
return new Promise((
|
|
177277
|
+
return new Promise((resolve15, reject) => {
|
|
177179
177278
|
server.close((err) => {
|
|
177180
177279
|
if (err) {
|
|
177181
177280
|
reject(err);
|
|
177182
177281
|
} else {
|
|
177183
|
-
|
|
177282
|
+
resolve15();
|
|
177184
177283
|
}
|
|
177185
177284
|
});
|
|
177186
177285
|
});
|
|
@@ -178085,7 +178184,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
178085
178184
|
this.stopping = false;
|
|
178086
178185
|
this.buildMatches = /* @__PURE__ */ new Map();
|
|
178087
178186
|
this.inProgressBuilds = /* @__PURE__ */ new Map();
|
|
178088
|
-
this.devCacheDir =
|
|
178187
|
+
this.devCacheDir = join22(getVercelDirectory(cwd), "cache");
|
|
178089
178188
|
this.vercelConfigWarning = false;
|
|
178090
178189
|
this.getVercelConfigPromise = null;
|
|
178091
178190
|
this.blockingBuildsPromise = null;
|
|
@@ -178313,7 +178412,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
178313
178412
|
);
|
|
178314
178413
|
}
|
|
178315
178414
|
async getLocalEnv(fileName, base) {
|
|
178316
|
-
const filePath =
|
|
178415
|
+
const filePath = join22(this.cwd, fileName);
|
|
178317
178416
|
let env = {};
|
|
178318
178417
|
try {
|
|
178319
178418
|
const dotenv2 = await import_fs_extra21.default.readFile(filePath, "utf8");
|
|
@@ -178383,7 +178482,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
178383
178482
|
if (vercelConfig.customErrorPage) {
|
|
178384
178483
|
const errorPages = typeof vercelConfig.customErrorPage === "string" ? [vercelConfig.customErrorPage] : Object.values(vercelConfig.customErrorPage);
|
|
178385
178484
|
for (const page of errorPages) {
|
|
178386
|
-
if (page && !import_fs_extra21.default.existsSync(
|
|
178485
|
+
if (page && !import_fs_extra21.default.existsSync(join22(this.cwd, page))) {
|
|
178387
178486
|
output_manager_default.warn(
|
|
178388
178487
|
`The custom error page "${page}" was not found in "${this.cwd}". This will cause deployment to fail on Vercel.`
|
|
178389
178488
|
);
|
|
@@ -178518,7 +178617,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
178518
178617
|
abs = filePath;
|
|
178519
178618
|
} else {
|
|
178520
178619
|
rel = filePath;
|
|
178521
|
-
abs =
|
|
178620
|
+
abs = join22(this.cwd, filePath);
|
|
178522
178621
|
}
|
|
178523
178622
|
output_manager_default.debug(`Reading \`${rel}\` file`);
|
|
178524
178623
|
try {
|
|
@@ -179260,10 +179359,10 @@ var init_refresh_oidc_token = __esm({
|
|
|
179260
179359
|
});
|
|
179261
179360
|
|
|
179262
179361
|
// src/commands/dev/dev.ts
|
|
179263
|
-
import { resolve as
|
|
179362
|
+
import { resolve as resolve13, join as join23 } from "path";
|
|
179264
179363
|
async function dev(client2, opts, args2, telemetry2) {
|
|
179265
179364
|
const [dir = "."] = args2;
|
|
179266
|
-
let cwd =
|
|
179365
|
+
let cwd = resolve13(dir);
|
|
179267
179366
|
const listen4 = parseListen(opts["--listen"] || "3000");
|
|
179268
179367
|
let link4 = await getLinkedProject(client2, cwd);
|
|
179269
179368
|
if (link4.status === "not_linked" && !process.env.__VERCEL_SKIP_DEV_CMD) {
|
|
@@ -179298,7 +179397,7 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
179298
179397
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
179299
179398
|
projectSettings = project;
|
|
179300
179399
|
if (project.rootDirectory) {
|
|
179301
|
-
cwd =
|
|
179400
|
+
cwd = join23(cwd, project.rootDirectory);
|
|
179302
179401
|
}
|
|
179303
179402
|
envValues = (await pullEnvRecords(client2, project.id, "vercel-cli:dev")).env;
|
|
179304
179403
|
}
|
|
@@ -179347,7 +179446,7 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
179347
179446
|
devServer.stop();
|
|
179348
179447
|
});
|
|
179349
179448
|
if (!devServer.devCommand) {
|
|
179350
|
-
const outputDir =
|
|
179449
|
+
const outputDir = join23(cwd, OUTPUT_DIR);
|
|
179351
179450
|
if (await import_fs_extra22.default.pathExists(outputDir)) {
|
|
179352
179451
|
output_manager_default.log(`Removing ${OUTPUT_DIR}`);
|
|
179353
179452
|
await import_fs_extra22.default.remove(outputDir);
|
|
@@ -179929,12 +180028,12 @@ var init_add4 = __esm({
|
|
|
179929
180028
|
|
|
179930
180029
|
// src/util/dns/import-zonefile.ts
|
|
179931
180030
|
import { readFileSync as readFileSync2 } from "fs";
|
|
179932
|
-
import { resolve as
|
|
180031
|
+
import { resolve as resolve14 } from "path";
|
|
179933
180032
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
179934
180033
|
output_manager_default.spinner(
|
|
179935
180034
|
`Importing Zone file for domain ${domain} under ${import_chalk79.default.bold(contextName)}`
|
|
179936
180035
|
);
|
|
179937
|
-
const zonefile = readFileSync2(
|
|
180036
|
+
const zonefile = readFileSync2(resolve14(zonefilePath), "utf8");
|
|
179938
180037
|
try {
|
|
179939
180038
|
const res = await client2.fetch(
|
|
179940
180039
|
`/v3/domains/${encodeURIComponent(domain)}/records`,
|
|
@@ -180498,7 +180597,7 @@ async function rm3(client2, argv) {
|
|
|
180498
180597
|
return 0;
|
|
180499
180598
|
}
|
|
180500
180599
|
function readConfirmation2(client2, msg, domainName, record) {
|
|
180501
|
-
return new Promise((
|
|
180600
|
+
return new Promise((resolve15) => {
|
|
180502
180601
|
output_manager_default.log(msg);
|
|
180503
180602
|
output_manager_default.print(
|
|
180504
180603
|
`${table([getDeleteTableRow(domainName, record)], {
|
|
@@ -180512,7 +180611,7 @@ function readConfirmation2(client2, msg, domainName, record) {
|
|
|
180512
180611
|
);
|
|
180513
180612
|
client2.stdin.on("data", (d) => {
|
|
180514
180613
|
process.stdin.pause();
|
|
180515
|
-
|
|
180614
|
+
resolve15(d.toString().trim().toLowerCase() === "y");
|
|
180516
180615
|
}).resume();
|
|
180517
180616
|
});
|
|
180518
180617
|
}
|
|
@@ -182702,13 +182801,13 @@ var init_add_env_record = __esm({
|
|
|
182702
182801
|
|
|
182703
182802
|
// src/util/input/read-standard-input.ts
|
|
182704
182803
|
async function readStandardInput(stdin) {
|
|
182705
|
-
return new Promise((
|
|
182706
|
-
setTimeout(() =>
|
|
182804
|
+
return new Promise((resolve15) => {
|
|
182805
|
+
setTimeout(() => resolve15(""), 500);
|
|
182707
182806
|
if (stdin.isTTY) {
|
|
182708
|
-
|
|
182807
|
+
resolve15("");
|
|
182709
182808
|
} else {
|
|
182710
182809
|
stdin.setEncoding("utf8");
|
|
182711
|
-
stdin.once("data",
|
|
182810
|
+
stdin.once("data", resolve15);
|
|
182712
182811
|
}
|
|
182713
182812
|
});
|
|
182714
182813
|
}
|
|
@@ -184306,7 +184405,7 @@ var init_connect = __esm({
|
|
|
184306
184405
|
});
|
|
184307
184406
|
|
|
184308
184407
|
// src/commands/git/connect.ts
|
|
184309
|
-
import { join as
|
|
184408
|
+
import { join as join24 } from "path";
|
|
184310
184409
|
async function connect(client2, argv) {
|
|
184311
184410
|
let parsedArgs;
|
|
184312
184411
|
const flagsSpecification = getFlagsSpecification(connectSubcommand.options);
|
|
@@ -184349,7 +184448,7 @@ async function connect(client2, argv) {
|
|
|
184349
184448
|
const { project, org } = linkedProject;
|
|
184350
184449
|
const gitProviderLink = project.link;
|
|
184351
184450
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
|
184352
|
-
const gitConfigPath =
|
|
184451
|
+
const gitConfigPath = join24(cwd, ".git/config");
|
|
184353
184452
|
const gitConfig = await parseGitConfig(gitConfigPath);
|
|
184354
184453
|
if (repoArg) {
|
|
184355
184454
|
const parsedUrlArg = parseRepoUrl(repoArg);
|
|
@@ -184995,7 +185094,7 @@ async function httpstat(client2) {
|
|
|
184995
185094
|
output_manager_default.debug(
|
|
184996
185095
|
`Executing: httpstat ${httpstatFlags.map(requoteArgs).join(" ")}`
|
|
184997
185096
|
);
|
|
184998
|
-
return new Promise((
|
|
185097
|
+
return new Promise((resolve15) => {
|
|
184999
185098
|
const httpstatProcess = spawn5("httpstat", httpstatFlags, {
|
|
185000
185099
|
stdio: "inherit",
|
|
185001
185100
|
shell: false
|
|
@@ -185012,14 +185111,14 @@ async function httpstat(client2) {
|
|
|
185012
185111
|
output_manager_default.log(
|
|
185013
185112
|
"Or visit: https://github.com/reorx/httpstat for more details"
|
|
185014
185113
|
);
|
|
185015
|
-
|
|
185114
|
+
resolve15(1);
|
|
185016
185115
|
} else {
|
|
185017
185116
|
output_manager_default.error(`Failed to execute httpstat: ${err.message}`);
|
|
185018
|
-
|
|
185117
|
+
resolve15(1);
|
|
185019
185118
|
}
|
|
185020
185119
|
});
|
|
185021
185120
|
httpstatProcess.on("close", (code2) => {
|
|
185022
|
-
|
|
185121
|
+
resolve15(code2 ?? 1);
|
|
185023
185122
|
});
|
|
185024
185123
|
});
|
|
185025
185124
|
}
|
|
@@ -185105,11 +185204,11 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
|
185105
185204
|
if (res.status !== 200) {
|
|
185106
185205
|
throw new Error(`Could not get ${name}.tar.gz`);
|
|
185107
185206
|
}
|
|
185108
|
-
await new Promise((
|
|
185207
|
+
await new Promise((resolve15, reject) => {
|
|
185109
185208
|
const extractor = import_tar_fs.default.extract(folder);
|
|
185110
185209
|
res.body.on("error", reject);
|
|
185111
185210
|
extractor.on("error", reject);
|
|
185112
|
-
extractor.on("finish",
|
|
185211
|
+
extractor.on("finish", resolve15);
|
|
185113
185212
|
res.body.pipe(extractor);
|
|
185114
185213
|
});
|
|
185115
185214
|
const successLog = `Initialized "${import_chalk103.default.bold(
|
|
@@ -186665,14 +186764,18 @@ async function getOptionalLinkedProject2(client2) {
|
|
|
186665
186764
|
}
|
|
186666
186765
|
return { status: "success", project: linkedProject.project };
|
|
186667
186766
|
}
|
|
186668
|
-
function provisionResourceViaWebUI(teamId, integrationId, productId, projectId) {
|
|
186767
|
+
function provisionResourceViaWebUI(teamId, integrationId, productId, projectId, resourceName) {
|
|
186669
186768
|
const url3 = new URL("/api/marketplace/cli", "https://vercel.com");
|
|
186670
186769
|
url3.searchParams.set("teamId", teamId);
|
|
186671
186770
|
url3.searchParams.set("integrationId", integrationId);
|
|
186672
186771
|
url3.searchParams.set("productId", productId);
|
|
186772
|
+
url3.searchParams.set("source", "cli");
|
|
186673
186773
|
if (projectId) {
|
|
186674
186774
|
url3.searchParams.set("projectId", projectId);
|
|
186675
186775
|
}
|
|
186776
|
+
if (resourceName) {
|
|
186777
|
+
url3.searchParams.set("defaultResourceName", resourceName);
|
|
186778
|
+
}
|
|
186676
186779
|
url3.searchParams.set("cmd", "add");
|
|
186677
186780
|
output_manager_default.print("Opening the Vercel Dashboard to continue the installation...");
|
|
186678
186781
|
(0, import_open4.default)(url3.href);
|
|
@@ -186719,7 +186822,8 @@ async function provisionResourceViaCLI(client2, teamId, integration, installatio
|
|
|
186719
186822
|
teamId,
|
|
186720
186823
|
integration.id,
|
|
186721
186824
|
product.id,
|
|
186722
|
-
projectLink?.project?.id
|
|
186825
|
+
projectLink?.project?.id,
|
|
186826
|
+
name
|
|
186723
186827
|
);
|
|
186724
186828
|
}
|
|
186725
186829
|
return 0;
|
|
@@ -186910,6 +187014,7 @@ function handleManualVerificationAction(teamId, authorizationId) {
|
|
|
186910
187014
|
const url3 = new URL("/api/marketplace/cli", "https://vercel.com");
|
|
186911
187015
|
url3.searchParams.set("teamId", teamId);
|
|
186912
187016
|
url3.searchParams.set("authorizationId", authorizationId);
|
|
187017
|
+
url3.searchParams.set("source", "cli");
|
|
186913
187018
|
url3.searchParams.set("cmd", "authorize");
|
|
186914
187019
|
output_manager_default.print("Opening the Vercel Dashboard to continue the installation...");
|
|
186915
187020
|
(0, import_open4.default)(url3.href);
|
|
@@ -190760,7 +190865,7 @@ var init_logout2 = __esm({
|
|
|
190760
190865
|
});
|
|
190761
190866
|
|
|
190762
190867
|
// src/commands/microfrontends/pull.ts
|
|
190763
|
-
import { join as
|
|
190868
|
+
import { join as join25 } from "path";
|
|
190764
190869
|
async function pull2(client2) {
|
|
190765
190870
|
const link4 = await ensureLink("microfrontends", client2, client2.cwd);
|
|
190766
190871
|
if (typeof link4 === "number") {
|
|
@@ -190769,7 +190874,7 @@ async function pull2(client2) {
|
|
|
190769
190874
|
const { project, org, repoRoot } = link4;
|
|
190770
190875
|
let currentDirectory;
|
|
190771
190876
|
if (repoRoot) {
|
|
190772
|
-
currentDirectory =
|
|
190877
|
+
currentDirectory = join25(repoRoot, project.rootDirectory || "");
|
|
190773
190878
|
} else {
|
|
190774
190879
|
currentDirectory = client2.cwd;
|
|
190775
190880
|
}
|
|
@@ -190817,7 +190922,7 @@ async function pull2(client2) {
|
|
|
190817
190922
|
)
|
|
190818
190923
|
};
|
|
190819
190924
|
output_manager_default.stopSpinner();
|
|
190820
|
-
const path12 =
|
|
190925
|
+
const path12 = join25(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS);
|
|
190821
190926
|
await (0, import_fs_extra23.outputJSON)(path12, sanitizedConfig, {
|
|
190822
190927
|
spaces: 2
|
|
190823
190928
|
});
|
|
@@ -190826,7 +190931,7 @@ async function pull2(client2) {
|
|
|
190826
190931
|
`${prependEmoji(
|
|
190827
190932
|
`Downloaded microfrontends configuration to ${import_chalk118.default.bold(
|
|
190828
190933
|
humanizePath(
|
|
190829
|
-
|
|
190934
|
+
join25(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
|
190830
190935
|
)
|
|
190831
190936
|
)} ${import_chalk118.default.gray(microfrontendsStamp())}`,
|
|
190832
190937
|
emoji("success")
|
|
@@ -194552,7 +194657,7 @@ async function remove6(client2) {
|
|
|
194552
194657
|
return 0;
|
|
194553
194658
|
}
|
|
194554
194659
|
function readConfirmation4(deployments, projects) {
|
|
194555
|
-
return new Promise((
|
|
194660
|
+
return new Promise((resolve15) => {
|
|
194556
194661
|
if (deployments.length > 0) {
|
|
194557
194662
|
output_manager_default.log(
|
|
194558
194663
|
`The following ${(0, import_pluralize15.default)(
|
|
@@ -194598,7 +194703,7 @@ function readConfirmation4(deployments, projects) {
|
|
|
194598
194703
|
);
|
|
194599
194704
|
process.stdin.on("data", (d) => {
|
|
194600
194705
|
process.stdin.pause();
|
|
194601
|
-
|
|
194706
|
+
resolve15(d.toString().trim());
|
|
194602
194707
|
}).resume();
|
|
194603
194708
|
});
|
|
194604
194709
|
}
|
|
@@ -197791,7 +197896,7 @@ var import_error_utils37 = __toESM3(require_dist2(), 1);
|
|
|
197791
197896
|
var import_fs_extra24 = __toESM3(require_lib(), 1);
|
|
197792
197897
|
var import_chalk150 = __toESM3(require_source(), 1);
|
|
197793
197898
|
var import_epipebomb = __toESM3(require_epipebomb(), 1);
|
|
197794
|
-
import { join as
|
|
197899
|
+
import { join as join26 } from "path";
|
|
197795
197900
|
import { existsSync as existsSync5 } from "fs";
|
|
197796
197901
|
|
|
197797
197902
|
// src/util/get-latest-version/index.ts
|
|
@@ -198734,7 +198839,6 @@ function checkGuidanceStatus({ config: config2 }) {
|
|
|
198734
198839
|
}
|
|
198735
198840
|
|
|
198736
198841
|
// src/index.ts
|
|
198737
|
-
var import_open9 = __toESM3(require_open(), 1);
|
|
198738
198842
|
import { determineAgent as determineAgent4 } from "@vercel/detect-agent";
|
|
198739
198843
|
try {
|
|
198740
198844
|
process.cwd();
|
|
@@ -198991,7 +199095,7 @@ var main19 = async () => {
|
|
|
198991
199095
|
let subcommand = void 0;
|
|
198992
199096
|
let userSuppliedSubCommand = "";
|
|
198993
199097
|
if (targetOrSubcommand) {
|
|
198994
|
-
const targetPath =
|
|
199098
|
+
const targetPath = join26(cwd, targetOrSubcommand);
|
|
198995
199099
|
const targetPathExists = existsSync5(targetPath);
|
|
198996
199100
|
const subcommandExists = GLOBAL_COMMANDS.has(targetOrSubcommand) || commands.has(targetOrSubcommand);
|
|
198997
199101
|
if (targetPathExists && subcommandExists && !parsedArgs.flags["--cwd"] && !process.env.NOW_BUILDER) {
|
|
@@ -199050,6 +199154,9 @@ var main19 = async () => {
|
|
|
199050
199154
|
return 1;
|
|
199051
199155
|
}
|
|
199052
199156
|
}
|
|
199157
|
+
if (typeof parsedArgs.flags["--token"] !== "string" && process.env.VERCEL_TOKEN) {
|
|
199158
|
+
parsedArgs.flags["--token"] = process.env.VERCEL_TOKEN;
|
|
199159
|
+
}
|
|
199053
199160
|
if (typeof parsedArgs.flags["--token"] === "string" && subcommand === "switch") {
|
|
199054
199161
|
output_manager_default.prettyError({
|
|
199055
199162
|
message: `This command doesn't work with ${param(
|
|
@@ -199450,21 +199557,18 @@ Update available for Vercel CLI (${import_chalk150.default.gray(
|
|
|
199450
199557
|
)} \u2192 ${import_chalk150.default.green(`v${latest}`)})${errorMsg}
|
|
199451
199558
|
`
|
|
199452
199559
|
);
|
|
199453
|
-
|
|
199454
|
-
|
|
199455
|
-
|
|
199456
|
-
|
|
199457
|
-
|
|
199458
|
-
|
|
199459
|
-
|
|
199460
|
-
|
|
199461
|
-
|
|
199462
|
-
if (action === "upgrade") {
|
|
199560
|
+
output_manager_default.print(
|
|
199561
|
+
`Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
|
199562
|
+
`
|
|
199563
|
+
);
|
|
199564
|
+
const shouldUpgrade = await client.input.confirm(
|
|
199565
|
+
"Would you like to upgrade now?",
|
|
199566
|
+
true
|
|
199567
|
+
);
|
|
199568
|
+
if (shouldUpgrade) {
|
|
199463
199569
|
const upgradeExitCode = await executeUpgrade();
|
|
199464
199570
|
process.exitCode = upgradeExitCode;
|
|
199465
199571
|
return;
|
|
199466
|
-
} else if (action === "changelog") {
|
|
199467
|
-
await (0, import_open9.default)(changelog);
|
|
199468
199572
|
}
|
|
199469
199573
|
} else {
|
|
199470
199574
|
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk150.default.magenta(
|