vercel 39.1.0 → 39.1.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 +253 -218
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -97,7 +97,7 @@ var require_dist2 = __commonJS2({
|
|
97
97
|
errorToString: () => errorToString13,
|
98
98
|
isErrnoException: () => isErrnoException19,
|
99
99
|
isError: () => isError14,
|
100
|
-
isErrorLike: () =>
|
100
|
+
isErrorLike: () => isErrorLike2,
|
101
101
|
isObject: () => isObject2,
|
102
102
|
isSpawnError: () => isSpawnError2,
|
103
103
|
normalizeError: () => normalizeError3
|
@@ -111,9 +111,9 @@ var require_dist2 = __commonJS2({
|
|
111
111
|
var isErrnoException19 = (error3) => {
|
112
112
|
return isError14(error3) && "code" in error3;
|
113
113
|
};
|
114
|
-
var
|
114
|
+
var isErrorLike2 = (error3) => isObject2(error3) && "message" in error3;
|
115
115
|
var errorToString13 = (error3, fallback) => {
|
116
|
-
if (isError14(error3) ||
|
116
|
+
if (isError14(error3) || isErrorLike2(error3))
|
117
117
|
return error3.message;
|
118
118
|
if (typeof error3 === "string")
|
119
119
|
return error3;
|
@@ -123,7 +123,7 @@ var require_dist2 = __commonJS2({
|
|
123
123
|
if (isError14(error3))
|
124
124
|
return error3;
|
125
125
|
const errorMessage = errorToString13(error3);
|
126
|
-
return
|
126
|
+
return isErrorLike2(error3) ? Object.assign(new Error(errorMessage), error3) : new Error(errorMessage);
|
127
127
|
};
|
128
128
|
function isSpawnError2(v) {
|
129
129
|
return isErrnoException19(v) && "spawnargs" in v;
|
@@ -4159,7 +4159,7 @@ var require_source = __commonJS2({
|
|
4159
4159
|
const chalk116 = {};
|
4160
4160
|
applyOptions(chalk116, options);
|
4161
4161
|
chalk116.template = (...arguments_) => chalkTag(chalk116.template, ...arguments_);
|
4162
|
-
Object.setPrototypeOf(chalk116,
|
4162
|
+
Object.setPrototypeOf(chalk116, Chalk.prototype);
|
4163
4163
|
Object.setPrototypeOf(chalk116.template, chalk116);
|
4164
4164
|
chalk116.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
@@ -4167,7 +4167,7 @@ var require_source = __commonJS2({
|
|
4167
4167
|
chalk116.template.Instance = ChalkClass;
|
4168
4168
|
return chalk116.template;
|
4169
4169
|
};
|
4170
|
-
function
|
4170
|
+
function Chalk(options) {
|
4171
4171
|
return chalkFactory(options);
|
4172
4172
|
}
|
4173
4173
|
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
@@ -4294,10 +4294,10 @@ var require_source = __commonJS2({
|
|
4294
4294
|
}
|
4295
4295
|
return template(chalk116, parts.join(""));
|
4296
4296
|
};
|
4297
|
-
Object.defineProperties(
|
4298
|
-
var chalk115 =
|
4297
|
+
Object.defineProperties(Chalk.prototype, styles);
|
4298
|
+
var chalk115 = Chalk();
|
4299
4299
|
chalk115.supportsColor = stdoutColor;
|
4300
|
-
chalk115.stderr =
|
4300
|
+
chalk115.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
4301
4301
|
chalk115.stderr.supportsColor = stderrColor;
|
4302
4302
|
module2.exports = chalk115;
|
4303
4303
|
}
|
@@ -7283,17 +7283,17 @@ var require_chalk = __commonJS2({
|
|
7283
7283
|
obj.level = options.level === void 0 ? scLevel : options.level;
|
7284
7284
|
obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
|
7285
7285
|
}
|
7286
|
-
function
|
7287
|
-
if (!this || !(this instanceof
|
7286
|
+
function Chalk(options) {
|
7287
|
+
if (!this || !(this instanceof Chalk) || this.template) {
|
7288
7288
|
const chalk115 = {};
|
7289
7289
|
applyOptions(chalk115, options);
|
7290
7290
|
chalk115.template = function() {
|
7291
7291
|
const args2 = [].slice.call(arguments);
|
7292
7292
|
return chalkTag.apply(null, [chalk115.template].concat(args2));
|
7293
7293
|
};
|
7294
|
-
Object.setPrototypeOf(chalk115,
|
7294
|
+
Object.setPrototypeOf(chalk115, Chalk.prototype);
|
7295
7295
|
Object.setPrototypeOf(chalk115.template, chalk115);
|
7296
|
-
chalk115.template.constructor =
|
7296
|
+
chalk115.template.constructor = Chalk;
|
7297
7297
|
return chalk115.template;
|
7298
7298
|
}
|
7299
7299
|
applyOptions(this, options);
|
@@ -7425,8 +7425,8 @@ var require_chalk = __commonJS2({
|
|
7425
7425
|
}
|
7426
7426
|
return template(chalk115, parts.join(""));
|
7427
7427
|
}
|
7428
|
-
Object.defineProperties(
|
7429
|
-
module2.exports =
|
7428
|
+
Object.defineProperties(Chalk.prototype, styles);
|
7429
|
+
module2.exports = Chalk();
|
7430
7430
|
module2.exports.supportsColor = stdoutColor;
|
7431
7431
|
module2.exports.default = module2.exports;
|
7432
7432
|
}
|
@@ -13147,7 +13147,7 @@ var require_lru = __commonJS2({
|
|
13147
13147
|
}
|
13148
13148
|
}
|
13149
13149
|
exports3.LRUMap = LRUMap;
|
13150
|
-
function
|
13150
|
+
function Entry(key, value) {
|
13151
13151
|
this.key = key;
|
13152
13152
|
this.value = value;
|
13153
13153
|
this[NEWER] = void 0;
|
@@ -13178,7 +13178,7 @@ var require_lru = __commonJS2({
|
|
13178
13178
|
this._keymap.clear();
|
13179
13179
|
let it = entries[Symbol.iterator]();
|
13180
13180
|
for (let itv = it.next(); !itv.done; itv = it.next()) {
|
13181
|
-
let e2 = new
|
13181
|
+
let e2 = new Entry(itv.value[0], itv.value[1]);
|
13182
13182
|
this._keymap.set(e2.key, e2);
|
13183
13183
|
if (!entry) {
|
13184
13184
|
this.oldest = e2;
|
@@ -13208,7 +13208,7 @@ var require_lru = __commonJS2({
|
|
13208
13208
|
this._markEntryAsUsed(entry);
|
13209
13209
|
return this;
|
13210
13210
|
}
|
13211
|
-
this._keymap.set(key, entry = new
|
13211
|
+
this._keymap.set(key, entry = new Entry(key, value));
|
13212
13212
|
if (this.newest) {
|
13213
13213
|
this.newest[NEWER] = entry;
|
13214
13214
|
entry[OLDER] = this.newest;
|
@@ -20560,7 +20560,7 @@ var require_source2 = __commonJS2({
|
|
20560
20560
|
const chalk116 = {};
|
20561
20561
|
applyOptions(chalk116, options);
|
20562
20562
|
chalk116.template = (...arguments_) => chalkTag(chalk116.template, ...arguments_);
|
20563
|
-
Object.setPrototypeOf(chalk116,
|
20563
|
+
Object.setPrototypeOf(chalk116, Chalk.prototype);
|
20564
20564
|
Object.setPrototypeOf(chalk116.template, chalk116);
|
20565
20565
|
chalk116.template.constructor = () => {
|
20566
20566
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
@@ -20568,7 +20568,7 @@ var require_source2 = __commonJS2({
|
|
20568
20568
|
chalk116.template.Instance = ChalkClass;
|
20569
20569
|
return chalk116.template;
|
20570
20570
|
};
|
20571
|
-
function
|
20571
|
+
function Chalk(options) {
|
20572
20572
|
return chalkFactory(options);
|
20573
20573
|
}
|
20574
20574
|
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
@@ -20695,10 +20695,10 @@ var require_source2 = __commonJS2({
|
|
20695
20695
|
}
|
20696
20696
|
return template(chalk116, parts.join(""));
|
20697
20697
|
};
|
20698
|
-
Object.defineProperties(
|
20699
|
-
var chalk115 =
|
20698
|
+
Object.defineProperties(Chalk.prototype, styles);
|
20699
|
+
var chalk115 = Chalk();
|
20700
20700
|
chalk115.supportsColor = stdoutColor;
|
20701
|
-
chalk115.stderr =
|
20701
|
+
chalk115.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
20702
20702
|
chalk115.stderr.supportsColor = stderrColor;
|
20703
20703
|
module2.exports = chalk115;
|
20704
20704
|
}
|
@@ -26873,7 +26873,7 @@ var require_lib7 = __commonJS2({
|
|
26873
26873
|
}
|
26874
26874
|
var INTERNALS$1 = Symbol("Response internals");
|
26875
26875
|
var STATUS_CODES = http3.STATUS_CODES;
|
26876
|
-
var
|
26876
|
+
var Response2 = class _Response {
|
26877
26877
|
constructor() {
|
26878
26878
|
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
26879
26879
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
@@ -26931,8 +26931,8 @@ var require_lib7 = __commonJS2({
|
|
26931
26931
|
});
|
26932
26932
|
}
|
26933
26933
|
};
|
26934
|
-
Body.mixIn(
|
26935
|
-
Object.defineProperties(
|
26934
|
+
Body.mixIn(Response2.prototype);
|
26935
|
+
Object.defineProperties(Response2.prototype, {
|
26936
26936
|
url: { enumerable: true },
|
26937
26937
|
status: { enumerable: true },
|
26938
26938
|
ok: { enumerable: true },
|
@@ -26941,7 +26941,7 @@ var require_lib7 = __commonJS2({
|
|
26941
26941
|
headers: { enumerable: true },
|
26942
26942
|
clone: { enumerable: true }
|
26943
26943
|
});
|
26944
|
-
Object.defineProperty(
|
26944
|
+
Object.defineProperty(Response2.prototype, Symbol.toStringTag, {
|
26945
26945
|
value: "Response",
|
26946
26946
|
writable: false,
|
26947
26947
|
enumerable: false,
|
@@ -27254,7 +27254,7 @@ var require_lib7 = __commonJS2({
|
|
27254
27254
|
};
|
27255
27255
|
const codings = headers.get("Content-Encoding");
|
27256
27256
|
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
27257
|
-
response = new
|
27257
|
+
response = new Response2(body, response_options);
|
27258
27258
|
resolve12(response);
|
27259
27259
|
return;
|
27260
27260
|
}
|
@@ -27264,7 +27264,7 @@ var require_lib7 = __commonJS2({
|
|
27264
27264
|
};
|
27265
27265
|
if (codings == "gzip" || codings == "x-gzip") {
|
27266
27266
|
body = body.pipe(zlib.createGunzip(zlibOptions));
|
27267
|
-
response = new
|
27267
|
+
response = new Response2(body, response_options);
|
27268
27268
|
resolve12(response);
|
27269
27269
|
return;
|
27270
27270
|
}
|
@@ -27276,18 +27276,18 @@ var require_lib7 = __commonJS2({
|
|
27276
27276
|
} else {
|
27277
27277
|
body = body.pipe(zlib.createInflateRaw());
|
27278
27278
|
}
|
27279
|
-
response = new
|
27279
|
+
response = new Response2(body, response_options);
|
27280
27280
|
resolve12(response);
|
27281
27281
|
});
|
27282
27282
|
return;
|
27283
27283
|
}
|
27284
27284
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
27285
27285
|
body = body.pipe(zlib.createBrotliDecompress());
|
27286
|
-
response = new
|
27286
|
+
response = new Response2(body, response_options);
|
27287
27287
|
resolve12(response);
|
27288
27288
|
return;
|
27289
27289
|
}
|
27290
|
-
response = new
|
27290
|
+
response = new Response2(body, response_options);
|
27291
27291
|
resolve12(response);
|
27292
27292
|
});
|
27293
27293
|
writeToStream(req, request);
|
@@ -27302,7 +27302,7 @@ var require_lib7 = __commonJS2({
|
|
27302
27302
|
exports2.default = exports2;
|
27303
27303
|
exports2.Headers = Headers6;
|
27304
27304
|
exports2.Request = Request2;
|
27305
|
-
exports2.Response =
|
27305
|
+
exports2.Response = Response2;
|
27306
27306
|
exports2.FetchError = FetchError;
|
27307
27307
|
}
|
27308
27308
|
});
|
@@ -33587,7 +33587,7 @@ var require_package = __commonJS2({
|
|
33587
33587
|
"../client/package.json"(exports2, module2) {
|
33588
33588
|
module2.exports = {
|
33589
33589
|
name: "@vercel/client",
|
33590
|
-
version: "13.4.
|
33590
|
+
version: "13.4.19",
|
33591
33591
|
main: "dist/index.js",
|
33592
33592
|
typings: "dist/index.d.ts",
|
33593
33593
|
homepage: "https://vercel.com",
|
@@ -33616,7 +33616,7 @@ var require_package = __commonJS2({
|
|
33616
33616
|
"@types/jest": "27.4.1",
|
33617
33617
|
"@types/minimatch": "3.0.5",
|
33618
33618
|
"@types/ms": "0.7.30",
|
33619
|
-
"@types/node": "
|
33619
|
+
"@types/node": "16.18.119",
|
33620
33620
|
"@types/node-fetch": "2.5.4",
|
33621
33621
|
"@types/recursive-readdir": "2.2.0",
|
33622
33622
|
"@types/tar-fs": "1.16.1",
|
@@ -33624,7 +33624,7 @@ var require_package = __commonJS2({
|
|
33624
33624
|
typescript: "4.9.5"
|
33625
33625
|
},
|
33626
33626
|
dependencies: {
|
33627
|
-
"@vercel/build-utils": "8.
|
33627
|
+
"@vercel/build-utils": "8.6.0",
|
33628
33628
|
"@vercel/error-utils": "2.0.3",
|
33629
33629
|
"@vercel/routing-utils": "3.1.0",
|
33630
33630
|
"async-retry": "1.2.3",
|
@@ -34863,6 +34863,7 @@ var require_errors = __commonJS2({
|
|
34863
34863
|
constructor(err) {
|
34864
34864
|
super(err.message);
|
34865
34865
|
this.code = err.code;
|
34866
|
+
this.errorName = err.name;
|
34866
34867
|
this.name = "DeploymentError";
|
34867
34868
|
}
|
34868
34869
|
};
|
@@ -35390,7 +35391,7 @@ var require_upload = __commonJS2({
|
|
35390
35391
|
var import_http4 = __toESM4(require("http"));
|
35391
35392
|
var import_https = __toESM4(require("https"));
|
35392
35393
|
var import_stream = require("stream");
|
35393
|
-
var
|
35394
|
+
var import_node_events = __toESM4(require("events"));
|
35394
35395
|
var import_async_retry6 = __toESM4(require_lib10());
|
35395
35396
|
var import_async_sema = require_lib9();
|
35396
35397
|
var import_utils4 = require_utils4();
|
@@ -35438,6 +35439,8 @@ var require_upload = __commonJS2({
|
|
35438
35439
|
debug2("Building an upload list...");
|
35439
35440
|
const semaphore = new import_async_sema.Sema(50, { capacity: 50 });
|
35440
35441
|
const defaultAgent = apiUrl2?.startsWith("https://") ? new import_https.default.Agent({ keepAlive: true }) : new import_http4.default.Agent({ keepAlive: true });
|
35442
|
+
const abortController = new AbortController();
|
35443
|
+
import_node_events.default.setMaxListeners(50);
|
35441
35444
|
shas.forEach((sha, index) => {
|
35442
35445
|
const uploadProgress = uploads[index];
|
35443
35446
|
uploadList[sha] = (0, import_async_retry6.default)(
|
@@ -35487,7 +35490,9 @@ var require_upload = __commonJS2({
|
|
35487
35490
|
body,
|
35488
35491
|
teamId,
|
35489
35492
|
apiUrl: apiUrl2,
|
35490
|
-
userAgent
|
35493
|
+
userAgent,
|
35494
|
+
// @ts-expect-error: typescript is getting confused with the signal types from node (web & server) and node-fetch (server only)
|
35495
|
+
signal: abortController.signal
|
35491
35496
|
},
|
35492
35497
|
clientOptions.debug
|
35493
35498
|
);
|
@@ -35522,6 +35527,7 @@ ${e2}`);
|
|
35522
35527
|
throw err;
|
35523
35528
|
} else {
|
35524
35529
|
debug2("Other error, bailing: " + err.message);
|
35530
|
+
abortController.abort();
|
35525
35531
|
return bail(err);
|
35526
35532
|
}
|
35527
35533
|
}
|
@@ -35562,7 +35568,7 @@ ${e2}`);
|
|
35562
35568
|
yield { type: "error", payload: e2 };
|
35563
35569
|
}
|
35564
35570
|
}
|
35565
|
-
var UploadProgress = class extends
|
35571
|
+
var UploadProgress = class extends import_node_events.EventEmitter {
|
35566
35572
|
constructor(sha, file) {
|
35567
35573
|
super();
|
35568
35574
|
this.sha = sha;
|
@@ -39752,7 +39758,7 @@ var require_create_deployment = __commonJS2({
|
|
39752
39758
|
var import_upload = require_upload();
|
39753
39759
|
var import_utils4 = require_utils4();
|
39754
39760
|
var import_errors6 = require_errors();
|
39755
|
-
var
|
39761
|
+
var import_error_utils36 = require_dist2();
|
39756
39762
|
var import_build_utils19 = require("@vercel/build-utils");
|
39757
39763
|
var import_tar_fs2 = __toESM4(require_tar_fs());
|
39758
39764
|
var import_zlib = require("zlib");
|
@@ -39834,7 +39840,7 @@ var require_create_deployment = __commonJS2({
|
|
39834
39840
|
files = await (0, import_hashes.hashes)(fileList);
|
39835
39841
|
}
|
39836
39842
|
} catch (err) {
|
39837
|
-
if (clientOptions.prebuilt && (0,
|
39843
|
+
if (clientOptions.prebuilt && (0, import_error_utils36.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
|
39838
39844
|
const errPath = (0, import_path41.relative)(workPath, err.path);
|
39839
39845
|
err.message = `File does not exist: "${(0, import_path41.relative)(workPath, errPath)}"`;
|
39840
39846
|
if (errPath.split(import_path41.sep).includes("node_modules")) {
|
@@ -49204,7 +49210,7 @@ var require_Client = __commonJS2({
|
|
49204
49210
|
var fsUnlink = (0, util_1.promisify)(fs_1.unlink);
|
49205
49211
|
var LIST_COMMANDS_DEFAULT = ["LIST -a", "LIST"];
|
49206
49212
|
var LIST_COMMANDS_MLSD = ["MLSD", "LIST -a", "LIST"];
|
49207
|
-
var
|
49213
|
+
var Client2 = class {
|
49208
49214
|
/**
|
49209
49215
|
* Instantiate an FTP client.
|
49210
49216
|
*
|
@@ -49875,7 +49881,7 @@ var require_Client = __commonJS2({
|
|
49875
49881
|
return this.downloadToDir(localDirPath);
|
49876
49882
|
}
|
49877
49883
|
};
|
49878
|
-
exports2.Client =
|
49884
|
+
exports2.Client = Client2;
|
49879
49885
|
async function ensureLocalDirectory(path11) {
|
49880
49886
|
try {
|
49881
49887
|
await fsStat(path11);
|
@@ -72721,6 +72727,7 @@ var init_telemetry = __esm({
|
|
72721
72727
|
if (this.isDebug) {
|
72722
72728
|
output_manager_default.log(`${LogLabel} Flushing Events`);
|
72723
72729
|
for (const event of this.events) {
|
72730
|
+
event.teamId = this.teamId;
|
72724
72731
|
output_manager_default.log(JSON.stringify(event));
|
72725
72732
|
}
|
72726
72733
|
return;
|
@@ -72733,8 +72740,9 @@ var init_telemetry = __esm({
|
|
72733
72740
|
}
|
72734
72741
|
const events = this.events.map((event) => {
|
72735
72742
|
delete event.sessionId;
|
72736
|
-
|
72737
|
-
|
72743
|
+
delete event.teamId;
|
72744
|
+
const { eventTime, ...rest } = event;
|
72745
|
+
return { event_time: eventTime, team_id: this.teamId, ...rest };
|
72738
72746
|
});
|
72739
72747
|
const payload = {
|
72740
72748
|
headers: {
|
@@ -77677,6 +77685,14 @@ async function alias(client2) {
|
|
77677
77685
|
}
|
77678
77686
|
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
77679
77687
|
return rm(client2, args2);
|
77688
|
+
case "set":
|
77689
|
+
if (needHelp) {
|
77690
|
+
telemetry2.trackCliFlagHelp("alias", subcommandOriginal);
|
77691
|
+
printHelp(setSubcommand);
|
77692
|
+
return 2;
|
77693
|
+
}
|
77694
|
+
telemetry2.trackCliSubcommandSet(subcommandOriginal);
|
77695
|
+
return set(client2, args2);
|
77680
77696
|
default:
|
77681
77697
|
if (needHelp) {
|
77682
77698
|
telemetry2.trackCliFlagHelp("alias", subcommandOriginal);
|
@@ -84672,14 +84688,14 @@ var require_read_config_file = __commonJS2({
|
|
84672
84688
|
var import_js_yaml = __toESM4(require_js_yaml2());
|
84673
84689
|
var import_toml = __toESM4(require_toml());
|
84674
84690
|
var import_fs9 = require("fs");
|
84675
|
-
var
|
84691
|
+
var import_error_utils36 = require_dist2();
|
84676
84692
|
var { readFile: readFile6 } = import_fs9.promises;
|
84677
84693
|
async function readFileOrNull(file) {
|
84678
84694
|
try {
|
84679
84695
|
const data = await readFile6(file);
|
84680
84696
|
return data;
|
84681
84697
|
} catch (error3) {
|
84682
|
-
if (!(0,
|
84698
|
+
if (!(0, import_error_utils36.isErrnoException)(error3)) {
|
84683
84699
|
throw error3;
|
84684
84700
|
}
|
84685
84701
|
if (error3.code !== "ENOENT") {
|
@@ -89432,7 +89448,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
89432
89448
|
var import_promises = __toESM4(require("fs/promises"));
|
89433
89449
|
var import_path41 = require("path");
|
89434
89450
|
var import_filesystem = require_filesystem();
|
89435
|
-
var
|
89451
|
+
var import_error_utils36 = require_dist2();
|
89436
89452
|
var LocalFileSystemDetector5 = class _LocalFileSystemDetector extends import_filesystem.DetectorFilesystem {
|
89437
89453
|
constructor(rootPath) {
|
89438
89454
|
super();
|
@@ -89443,7 +89459,7 @@ var require_local_file_system_detector = __commonJS2({
|
|
89443
89459
|
await import_promises.default.stat(this.getFilePath(name));
|
89444
89460
|
return true;
|
89445
89461
|
} catch (err) {
|
89446
|
-
if ((0,
|
89462
|
+
if ((0, import_error_utils36.isErrnoException)(err) && err.code === "ENOENT") {
|
89447
89463
|
return false;
|
89448
89464
|
}
|
89449
89465
|
throw err;
|
@@ -106027,7 +106043,7 @@ async function disconnectGitProvider(client2, org, projectId) {
|
|
106027
106043
|
}
|
106028
106044
|
});
|
106029
106045
|
}
|
106030
|
-
async function connectGitProvider(client2,
|
106046
|
+
async function connectGitProvider(client2, projectId, type, repo) {
|
106031
106047
|
const fetchUrl = `/v9/projects/${projectId}/link`;
|
106032
106048
|
try {
|
106033
106049
|
return await client2.fetch(fetchUrl, {
|
@@ -106335,31 +106351,23 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
106335
106351
|
delete selection.newProject;
|
106336
106352
|
if (!selection.rootDirectory)
|
106337
106353
|
delete selection.rootDirectory;
|
106338
|
-
|
106339
|
-
|
106340
|
-
|
106341
|
-
|
106342
|
-
|
106343
|
-
|
106344
|
-
|
106345
|
-
|
106346
|
-
|
106347
|
-
|
106348
|
-
|
106349
|
-
|
106350
|
-
|
106351
|
-
`
|
106352
|
-
|
106353
|
-
|
106354
|
-
|
106355
|
-
)}`
|
106356
|
-
);
|
106357
|
-
} catch (err) {
|
106358
|
-
if (isAPIError(err) && err.code === "too_many_projects") {
|
106359
|
-
output_manager_default.prettyError(err);
|
106360
|
-
return;
|
106361
|
-
}
|
106362
|
-
}
|
106354
|
+
const project = selected[i] = await createProject(client2, {
|
106355
|
+
...selection,
|
106356
|
+
framework: selection.framework.slug
|
106357
|
+
});
|
106358
|
+
await connectGitProvider(
|
106359
|
+
client2,
|
106360
|
+
project.id,
|
106361
|
+
parsedRepoUrl.provider,
|
106362
|
+
`${parsedRepoUrl.org}/${parsedRepoUrl.repo}`
|
106363
|
+
);
|
106364
|
+
output_manager_default.log(
|
106365
|
+
`Created new Project: ${output_manager_default.link(
|
106366
|
+
orgAndName,
|
106367
|
+
`https://vercel.com/${orgAndName}`,
|
106368
|
+
{ fallback: false }
|
106369
|
+
)}`
|
106370
|
+
);
|
106363
106371
|
}
|
106364
106372
|
repoConfig = {
|
106365
106373
|
orgId: org.id,
|
@@ -106465,7 +106473,6 @@ var init_repo = __esm({
|
|
106465
106473
|
init_detect_projects();
|
106466
106474
|
init_repo_info_to_url();
|
106467
106475
|
init_connect_git_provider();
|
106468
|
-
init_errors_ts();
|
106469
106476
|
init_git_helpers();
|
106470
106477
|
init_output_manager();
|
106471
106478
|
home = (0, import_os6.homedir)();
|
@@ -116738,8 +116745,8 @@ var require_yauzl = __commonJS2({
|
|
116738
116745
|
exports2.fromRandomAccessReader = fromRandomAccessReader;
|
116739
116746
|
exports2.dosDateTimeToDate = dosDateTimeToDate;
|
116740
116747
|
exports2.validateFileName = validateFileName;
|
116741
|
-
exports2.ZipFile =
|
116742
|
-
exports2.Entry =
|
116748
|
+
exports2.ZipFile = ZipFile;
|
116749
|
+
exports2.Entry = Entry;
|
116743
116750
|
exports2.RandomAccessReader = RandomAccessReader;
|
116744
116751
|
function open5(path11, options, callback) {
|
116745
116752
|
if (typeof options === "function") {
|
@@ -116866,7 +116873,7 @@ var require_yauzl = __commonJS2({
|
|
116866
116873
|
}
|
116867
116874
|
var comment = decodeStrings ? decodeBuffer(eocdrBuffer, 22, eocdrBuffer.length, false) : eocdrBuffer.slice(22);
|
116868
116875
|
if (!(entryCount === 65535 || centralDirectoryOffset === 4294967295)) {
|
116869
|
-
return callback(null, new
|
116876
|
+
return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
116870
116877
|
}
|
116871
116878
|
var zip64EocdlBuffer = newBuffer(20);
|
116872
116879
|
var zip64EocdlOffset = bufferReadStart + i - zip64EocdlBuffer.length;
|
@@ -116886,7 +116893,7 @@ var require_yauzl = __commonJS2({
|
|
116886
116893
|
}
|
116887
116894
|
entryCount = readUInt64LE(zip64EocdrBuffer, 32);
|
116888
116895
|
centralDirectoryOffset = readUInt64LE(zip64EocdrBuffer, 48);
|
116889
|
-
return callback(null, new
|
116896
|
+
return callback(null, new ZipFile(reader, centralDirectoryOffset, totalSize, entryCount, comment, options.autoClose, options.lazyEntries, decodeStrings, options.validateEntrySizes, options.strictFileNames));
|
116890
116897
|
});
|
116891
116898
|
});
|
116892
116899
|
return;
|
@@ -116894,8 +116901,8 @@ var require_yauzl = __commonJS2({
|
|
116894
116901
|
callback(new Error("end of central directory record signature not found"));
|
116895
116902
|
});
|
116896
116903
|
}
|
116897
|
-
util.inherits(
|
116898
|
-
function
|
116904
|
+
util.inherits(ZipFile, EventEmitter2);
|
116905
|
+
function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
|
116899
116906
|
var self2 = this;
|
116900
116907
|
EventEmitter2.call(self2);
|
116901
116908
|
self2.reader = reader;
|
@@ -116920,7 +116927,7 @@ var require_yauzl = __commonJS2({
|
|
116920
116927
|
if (!self2.lazyEntries)
|
116921
116928
|
self2._readEntry();
|
116922
116929
|
}
|
116923
|
-
|
116930
|
+
ZipFile.prototype.close = function() {
|
116924
116931
|
if (!this.isOpen)
|
116925
116932
|
return;
|
116926
116933
|
this.isOpen = false;
|
@@ -116937,12 +116944,12 @@ var require_yauzl = __commonJS2({
|
|
116937
116944
|
self2.emittedError = true;
|
116938
116945
|
self2.emit("error", err);
|
116939
116946
|
}
|
116940
|
-
|
116947
|
+
ZipFile.prototype.readEntry = function() {
|
116941
116948
|
if (!this.lazyEntries)
|
116942
116949
|
throw new Error("readEntry() called without lazyEntries:true");
|
116943
116950
|
this._readEntry();
|
116944
116951
|
};
|
116945
|
-
|
116952
|
+
ZipFile.prototype._readEntry = function() {
|
116946
116953
|
var self2 = this;
|
116947
116954
|
if (self2.entryCount === self2.entriesRead) {
|
116948
116955
|
setImmediate(function() {
|
@@ -116962,7 +116969,7 @@ var require_yauzl = __commonJS2({
|
|
116962
116969
|
return emitErrorAndAutoClose(self2, err);
|
116963
116970
|
if (self2.emittedError)
|
116964
116971
|
return;
|
116965
|
-
var entry = new
|
116972
|
+
var entry = new Entry();
|
116966
116973
|
var signature = buffer.readUInt32LE(0);
|
116967
116974
|
if (signature !== 33639248)
|
116968
116975
|
return emitErrorAndAutoClose(self2, new Error("invalid central directory file header signature: 0x" + signature.toString(16)));
|
@@ -117093,7 +117100,7 @@ var require_yauzl = __commonJS2({
|
|
117093
117100
|
});
|
117094
117101
|
});
|
117095
117102
|
};
|
117096
|
-
|
117103
|
+
ZipFile.prototype.openReadStream = function(entry, options, callback) {
|
117097
117104
|
var self2 = this;
|
117098
117105
|
var relativeStart = 0;
|
117099
117106
|
var relativeEnd = entry.compressedSize;
|
@@ -117220,15 +117227,15 @@ var require_yauzl = __commonJS2({
|
|
117220
117227
|
}
|
117221
117228
|
});
|
117222
117229
|
};
|
117223
|
-
function
|
117230
|
+
function Entry() {
|
117224
117231
|
}
|
117225
|
-
|
117232
|
+
Entry.prototype.getLastModDate = function() {
|
117226
117233
|
return dosDateTimeToDate(this.lastModFileDate, this.lastModFileTime);
|
117227
117234
|
};
|
117228
|
-
|
117235
|
+
Entry.prototype.isEncrypted = function() {
|
117229
117236
|
return (this.generalPurposeBitFlag & 1) !== 0;
|
117230
117237
|
};
|
117231
|
-
|
117238
|
+
Entry.prototype.isCompressed = function() {
|
117232
117239
|
return this.compressionMethod === 8;
|
117233
117240
|
};
|
117234
117241
|
function dosDateTimeToDate(date, time) {
|
@@ -117627,7 +117634,7 @@ var require_lib14 = __commonJS2({
|
|
117627
117634
|
yauzl = Object.assign({}, yauzl);
|
117628
117635
|
if (options.subclassZipFile) {
|
117629
117636
|
const original = yauzl.ZipFile;
|
117630
|
-
yauzl.ZipFile = function
|
117637
|
+
yauzl.ZipFile = function ZipFile() {
|
117631
117638
|
original.apply(this, arguments);
|
117632
117639
|
};
|
117633
117640
|
util.inherits(yauzl.ZipFile, original);
|
@@ -117642,7 +117649,7 @@ var require_lib14 = __commonJS2({
|
|
117642
117649
|
}
|
117643
117650
|
if (options.subclassEntry) {
|
117644
117651
|
const original = yauzl.Entry;
|
117645
|
-
yauzl.Entry = function
|
117652
|
+
yauzl.Entry = function Entry() {
|
117646
117653
|
original.apply(this, arguments);
|
117647
117654
|
};
|
117648
117655
|
util.inherits(yauzl.Entry, original);
|
@@ -117685,7 +117692,7 @@ var require_lib14 = __commonJS2({
|
|
117685
117692
|
}
|
117686
117693
|
return yauzl[methodName];
|
117687
117694
|
}
|
117688
|
-
function zipFilePatcher(original,
|
117695
|
+
function zipFilePatcher(original, ZipFile) {
|
117689
117696
|
return function(path11, totalSize, options, callback) {
|
117690
117697
|
const { lazyEntries } = options, hasLazyEntries = options.hasOwnProperty("lazyEntries");
|
117691
117698
|
if (!lazyEntries)
|
@@ -117694,7 +117701,7 @@ var require_lib14 = __commonJS2({
|
|
117694
117701
|
if (err)
|
117695
117702
|
return callback(err);
|
117696
117703
|
const zipFileInternal = zipFile;
|
117697
|
-
zipFile = Object.assign(Object.create(
|
117704
|
+
zipFile = Object.assign(Object.create(ZipFile.prototype), zipFile);
|
117698
117705
|
zipFileInternal.emit = zipFile.emit.bind(zipFile);
|
117699
117706
|
if (!lazyEntries) {
|
117700
117707
|
if (hasLazyEntries) {
|
@@ -117710,13 +117717,13 @@ var require_lib14 = __commonJS2({
|
|
117710
117717
|
});
|
117711
117718
|
};
|
117712
117719
|
}
|
117713
|
-
function entryPatcher(original,
|
117720
|
+
function entryPatcher(original, Entry) {
|
117714
117721
|
return function(path11, totalSize, options, callback) {
|
117715
117722
|
return original.call(this, path11, totalSize, options, function(err, zipFile) {
|
117716
117723
|
if (err)
|
117717
117724
|
return callback(err);
|
117718
117725
|
zipFile.intercept("entry", function(entry, cb) {
|
117719
|
-
entry = Object.assign(Object.create(
|
117726
|
+
entry = Object.assign(Object.create(Entry.prototype), entry);
|
117720
117727
|
cb(null, entry);
|
117721
117728
|
});
|
117722
117729
|
callback(null, zipFile);
|
@@ -117747,18 +117754,18 @@ var require_promisify2 = __commonJS2({
|
|
117747
117754
|
var STATE = Symbol();
|
117748
117755
|
var STORED_ERROR = Symbol();
|
117749
117756
|
module2.exports = (yauzl, Promise2) => {
|
117750
|
-
const { ZipFile
|
117757
|
+
const { ZipFile, Entry } = yauzl;
|
117751
117758
|
promisifyMethod(yauzl, Promise2, "open");
|
117752
117759
|
promisifyMethod(yauzl, Promise2, "fromFd");
|
117753
117760
|
promisifyMethod(yauzl, Promise2, "fromBuffer");
|
117754
117761
|
promisifyMethod(yauzl, Promise2, "fromRandomAccessReader");
|
117755
|
-
promisifyClose(
|
117756
|
-
promisifyReadEntry(
|
117757
|
-
|
117758
|
-
addWalkEntriesMethod(
|
117759
|
-
promisifyOpenReadStream(
|
117760
|
-
|
117761
|
-
|
117762
|
+
promisifyClose(ZipFile, Promise2);
|
117763
|
+
promisifyReadEntry(ZipFile, Promise2);
|
117764
|
+
ZipFile.prototype.readEntries = readEntries;
|
117765
|
+
addWalkEntriesMethod(ZipFile, Promise2);
|
117766
|
+
promisifyOpenReadStream(ZipFile, Promise2);
|
117767
|
+
Entry.prototype.openReadStream = entryOpenReadStream;
|
117768
|
+
ZipFile.Entry = Entry;
|
117762
117769
|
};
|
117763
117770
|
function promisifyMethod(yauzl, Promise2, fnName) {
|
117764
117771
|
const fromBuffer = fnName == "fromBuffer";
|
@@ -117802,9 +117809,9 @@ var require_promisify2 = __commonJS2({
|
|
117802
117809
|
clearError(zipFile);
|
117803
117810
|
reject(err);
|
117804
117811
|
}
|
117805
|
-
function promisifyClose(
|
117806
|
-
const close2 =
|
117807
|
-
|
117812
|
+
function promisifyClose(ZipFile, Promise2) {
|
117813
|
+
const close2 = ZipFile.prototype.close;
|
117814
|
+
ZipFile.prototype.close = function() {
|
117808
117815
|
return new Promise2((resolve12, reject) => {
|
117809
117816
|
if (getError(this))
|
117810
117817
|
return rejectWithStoredError(this, reject);
|
@@ -117824,9 +117831,9 @@ var require_promisify2 = __commonJS2({
|
|
117824
117831
|
clearState(this);
|
117825
117832
|
state.resolve();
|
117826
117833
|
}
|
117827
|
-
function promisifyReadEntry(
|
117828
|
-
const readEntry =
|
117829
|
-
|
117834
|
+
function promisifyReadEntry(ZipFile, Promise2) {
|
117835
|
+
const readEntry = ZipFile.prototype.readEntry;
|
117836
|
+
ZipFile.prototype.readEntry = function() {
|
117830
117837
|
return new Promise2((resolve12, reject) => {
|
117831
117838
|
if (getError(this))
|
117832
117839
|
return rejectWithStoredError(this, reject);
|
@@ -117877,8 +117884,8 @@ var require_promisify2 = __commonJS2({
|
|
117877
117884
|
return entries;
|
117878
117885
|
});
|
117879
117886
|
}
|
117880
|
-
function addWalkEntriesMethod(
|
117881
|
-
|
117887
|
+
function addWalkEntriesMethod(ZipFile, Promise2) {
|
117888
|
+
ZipFile.prototype.walkEntries = function(callback, numEntries) {
|
117882
117889
|
callback = wrapFunctionToReturnPromise(callback, Promise2);
|
117883
117890
|
return new Promise2((resolve12, reject) => {
|
117884
117891
|
walkNextEntry(this, callback, numEntries, 0, (err) => {
|
@@ -117902,9 +117909,9 @@ var require_promisify2 = __commonJS2({
|
|
117902
117909
|
cb(err);
|
117903
117910
|
});
|
117904
117911
|
}
|
117905
|
-
function promisifyOpenReadStream(
|
117906
|
-
const openReadStream =
|
117907
|
-
|
117912
|
+
function promisifyOpenReadStream(ZipFile, Promise2) {
|
117913
|
+
const openReadStream = ZipFile.prototype.openReadStream;
|
117914
|
+
ZipFile.prototype.openReadStream = function(entry, options) {
|
117908
117915
|
return new Promise2((resolve12, reject) => {
|
117909
117916
|
if (getError(this))
|
117910
117917
|
return rejectWithStoredError(this, reject);
|
@@ -121062,7 +121069,7 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
|
|
121062
121069
|
).split("\n");
|
121063
121070
|
output_manager_default.print(`${header}
|
121064
121071
|
`);
|
121065
|
-
|
121072
|
+
client2.stdout.write(`${rows.join("\n")}
|
121066
121073
|
|
121067
121074
|
`);
|
121068
121075
|
output_manager_default.log(`To issue the certificate once the records are added, run:`);
|
@@ -124639,6 +124646,12 @@ async function processDeployment({
|
|
124639
124646
|
}
|
124640
124647
|
if (event.type === "error") {
|
124641
124648
|
stopSpinner();
|
124649
|
+
if (!archive) {
|
124650
|
+
const maybeError = handleErrorSolvableWithArchive(event.payload);
|
124651
|
+
if (maybeError) {
|
124652
|
+
throw maybeError;
|
124653
|
+
}
|
124654
|
+
}
|
124642
124655
|
const error3 = await now.handleDeploymentError(event.payload, {
|
124643
124656
|
env
|
124644
124657
|
});
|
@@ -124661,11 +124674,24 @@ async function processDeployment({
|
|
124661
124674
|
throw err;
|
124662
124675
|
}
|
124663
124676
|
}
|
124664
|
-
|
124677
|
+
function handleErrorSolvableWithArchive(error3) {
|
124678
|
+
if ((0, import_error_utils18.isErrorLike)(error3)) {
|
124679
|
+
const isUploadRateLimit = "errorName" in error3 && typeof error3.errorName === "string" && error3.errorName.startsWith("api-upload-");
|
124680
|
+
const isTooManyFilesLimit = "code" in error3 && error3.code === "too_many_files";
|
124681
|
+
if (isUploadRateLimit || isTooManyFilesLimit) {
|
124682
|
+
return new UploadErrorMissingArchive(
|
124683
|
+
`${error3.message}
|
124684
|
+
${archiveSuggestionText}`
|
124685
|
+
);
|
124686
|
+
}
|
124687
|
+
}
|
124688
|
+
}
|
124689
|
+
var import_client7, import_error_utils18, import_bytes3, import_chalk55, archiveSuggestionText, UploadErrorMissingArchive;
|
124665
124690
|
var init_process_deployment = __esm({
|
124666
124691
|
"src/util/deploy/process-deployment.ts"() {
|
124667
124692
|
"use strict";
|
124668
124693
|
import_client7 = __toESM3(require_dist13());
|
124694
|
+
import_error_utils18 = __toESM3(require_dist2());
|
124669
124695
|
import_bytes3 = __toESM3(require_bytes());
|
124670
124696
|
import_chalk55 = __toESM3(require_source());
|
124671
124697
|
init_emoji();
|
@@ -124673,6 +124699,13 @@ var init_process_deployment = __esm({
|
|
124673
124699
|
init_progress();
|
124674
124700
|
init_ua();
|
124675
124701
|
init_output_manager();
|
124702
|
+
archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
|
124703
|
+
UploadErrorMissingArchive = class extends Error {
|
124704
|
+
constructor() {
|
124705
|
+
super(...arguments);
|
124706
|
+
this.link = "https://vercel.com/docs/cli/deploy#archive";
|
124707
|
+
}
|
124708
|
+
};
|
124676
124709
|
}
|
124677
124710
|
});
|
124678
124711
|
|
@@ -124690,7 +124723,6 @@ var init_util = __esm({
|
|
124690
124723
|
import_chalk56 = __toESM3(require_source());
|
124691
124724
|
init_ua();
|
124692
124725
|
init_process_deployment();
|
124693
|
-
init_highlight();
|
124694
124726
|
init_error2();
|
124695
124727
|
init_stamp();
|
124696
124728
|
init_errors_ts();
|
@@ -124845,17 +124877,10 @@ var init_util = __esm({
|
|
124845
124877
|
}
|
124846
124878
|
if (error3.status >= 400 && error3.status < 500) {
|
124847
124879
|
const err = new Error();
|
124848
|
-
const { code: code2
|
124880
|
+
const { code: code2 } = error3;
|
124849
124881
|
if (code2 === "env_value_invalid_type") {
|
124850
124882
|
const { key } = error3;
|
124851
124883
|
err.message = `The env key ${key} has an invalid type: ${typeof env[key]}. Please supply a String or a Number (https://err.sh/vercel/env-value-invalid-type)`;
|
124852
|
-
} else if (code2 === "unreferenced_build_specifications") {
|
124853
|
-
const count = unreferencedBuildSpecs.length;
|
124854
|
-
const prefix = count === 1 ? "build" : "builds";
|
124855
|
-
err.message = `You defined ${count} ${prefix} that did not match any source files (please ensure they are NOT defined in ${highlight(
|
124856
|
-
".vercelignore"
|
124857
|
-
)}):
|
124858
|
-
- ${unreferencedBuildSpecs.map((item) => JSON.stringify(item)).join("\n- ")}`;
|
124859
124884
|
} else {
|
124860
124885
|
Object.assign(err, error3);
|
124861
124886
|
}
|
@@ -125461,13 +125486,13 @@ function handleCreateDeployError(error3, localConfig) {
|
|
125461
125486
|
}
|
125462
125487
|
return error3;
|
125463
125488
|
}
|
125464
|
-
var import_build_utils14, import_client11,
|
125489
|
+
var import_build_utils14, import_client11, import_error_utils19, import_bytes5, import_chalk58, import_fs_extra20, import_ms11, import_path31, deploy_default, addProcessEnv;
|
125465
125490
|
var init_deploy2 = __esm({
|
125466
125491
|
"src/commands/deploy/index.ts"() {
|
125467
125492
|
"use strict";
|
125468
125493
|
import_build_utils14 = require("@vercel/build-utils");
|
125469
125494
|
import_client11 = __toESM3(require_dist13());
|
125470
|
-
|
125495
|
+
import_error_utils19 = __toESM3(require_dist2());
|
125471
125496
|
import_bytes5 = __toESM3(require_bytes());
|
125472
125497
|
import_chalk58 = __toESM3(require_source());
|
125473
125498
|
import_fs_extra20 = __toESM3(require_lib());
|
@@ -125505,6 +125530,7 @@ var init_deploy2 = __esm({
|
|
125505
125530
|
init_deploy();
|
125506
125531
|
init_output_manager();
|
125507
125532
|
init_ensure_link();
|
125533
|
+
init_process_deployment();
|
125508
125534
|
deploy_default = async (client2) => {
|
125509
125535
|
const telemetryClient = new DeployTelemetryClient({
|
125510
125536
|
opts: {
|
@@ -125771,7 +125797,7 @@ var init_deploy2 = __esm({
|
|
125771
125797
|
await addProcessEnv(log2, deploymentEnv);
|
125772
125798
|
await addProcessEnv(log2, deploymentBuildEnv);
|
125773
125799
|
} catch (err) {
|
125774
|
-
error3((0,
|
125800
|
+
error3((0, import_error_utils19.errorToString)(err));
|
125775
125801
|
return 1;
|
125776
125802
|
}
|
125777
125803
|
const regionFlag = (parsedArguments.flags["--regions"] || "").split(",").map((s) => s.trim()).filter(Boolean);
|
@@ -125895,10 +125921,14 @@ var init_deploy2 = __esm({
|
|
125895
125921
|
return 1;
|
125896
125922
|
}
|
125897
125923
|
} catch (err) {
|
125898
|
-
if ((0,
|
125924
|
+
if ((0, import_error_utils19.isError)(err)) {
|
125899
125925
|
debug2(`Error: ${err}
|
125900
125926
|
${err.stack}`);
|
125901
125927
|
}
|
125928
|
+
if (err instanceof UploadErrorMissingArchive) {
|
125929
|
+
output_manager_default.prettyError(err);
|
125930
|
+
return 1;
|
125931
|
+
}
|
125902
125932
|
if (err instanceof NotDomainOwner) {
|
125903
125933
|
output_manager_default.error(err.message);
|
125904
125934
|
return 1;
|
@@ -142403,9 +142433,9 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
|
|
142403
142433
|
if (oldAsset && oldAsset.type === "Lambda" && oldAsset.fn) {
|
142404
142434
|
await oldAsset.fn.destroy();
|
142405
142435
|
}
|
142406
|
-
const
|
142436
|
+
const ZipFile = asset.zipBuffer || await asset.createZip();
|
142407
142437
|
asset.fn = await (0, import_fun.createFunction)({
|
142408
|
-
Code: { ZipFile
|
142438
|
+
Code: { ZipFile },
|
142409
142439
|
Handler: asset.handler,
|
142410
142440
|
Runtime: asset.runtime,
|
142411
142441
|
MemorySize: asset.memory || 3009,
|
@@ -143076,7 +143106,7 @@ function buildMatchEquals(a, b) {
|
|
143076
143106
|
return false;
|
143077
143107
|
return true;
|
143078
143108
|
}
|
143079
|
-
var import_url18, import_http3, import_fs_extra21, import_ms13, import_chalk59, import_node_fetch5, import_pluralize7, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path35, import_once, import_directory, import_get_port, import_is_port_reachable, import_fast_deep_equal, import_npm_package_arg2, import_json_parse_better_errors3, import_client12, import_routing_utils5, import_build_utils17, import_fs_detectors6, import_frameworks6,
|
143109
|
+
var import_url18, import_http3, import_fs_extra21, import_ms13, import_chalk59, import_node_fetch5, import_pluralize7, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path35, import_once, import_directory, import_get_port, import_is_port_reachable, import_fast_deep_equal, import_npm_package_arg2, import_json_parse_better_errors3, import_client12, import_routing_utils5, import_build_utils17, import_fs_detectors6, import_frameworks6, import_error_utils20, frontendRuntimeSet, DEV_SERVER_PORT_BIND_TIMEOUT, DevServer;
|
143080
143110
|
var init_server = __esm({
|
143081
143111
|
"src/util/dev/server.ts"() {
|
143082
143112
|
"use strict";
|
@@ -143130,7 +143160,7 @@ var init_server = __esm({
|
|
143130
143160
|
init_tree_kill();
|
143131
143161
|
init_headers();
|
143132
143162
|
init_parse_query_string();
|
143133
|
-
|
143163
|
+
import_error_utils20 = __toESM3(require_dist2());
|
143134
143164
|
init_is_url();
|
143135
143165
|
init_project_settings();
|
143136
143166
|
init_parse_listen();
|
@@ -143168,12 +143198,12 @@ var init_server = __esm({
|
|
143168
143198
|
await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
|
143169
143199
|
} catch (err) {
|
143170
143200
|
console.error(err);
|
143171
|
-
if ((0,
|
143201
|
+
if ((0, import_error_utils20.isError)(err) && typeof err.stack === "string") {
|
143172
143202
|
output_manager_default.debug(err.stack);
|
143173
143203
|
}
|
143174
143204
|
if (!res.finished) {
|
143175
143205
|
res.statusCode = 500;
|
143176
|
-
res.end((0,
|
143206
|
+
res.end((0, import_error_utils20.errorToString)(err));
|
143177
143207
|
}
|
143178
143208
|
}
|
143179
143209
|
};
|
@@ -143363,7 +143393,7 @@ var init_server = __esm({
|
|
143363
143393
|
}
|
143364
143394
|
}
|
143365
143395
|
} catch (err) {
|
143366
|
-
if ((0,
|
143396
|
+
if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
|
143367
143397
|
err.message = `Command not found: ${import_chalk59.default.cyan(
|
143368
143398
|
err.path,
|
143369
143399
|
...err.spawnargs
|
@@ -143620,7 +143650,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
143620
143650
|
}
|
143621
143651
|
});
|
143622
143652
|
} catch (err) {
|
143623
|
-
if ((0,
|
143653
|
+
if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
|
143624
143654
|
err.message = `Command not found: ${import_chalk59.default.cyan(
|
143625
143655
|
err.path,
|
143626
143656
|
...err.spawnargs
|
@@ -143933,7 +143963,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
143933
143963
|
fileChanged(name, changed, removed);
|
143934
143964
|
output_manager_default.debug(`File created: ${name}`);
|
143935
143965
|
} catch (err) {
|
143936
|
-
if ((0,
|
143966
|
+
if ((0, import_error_utils20.isErrnoException)(err) && err.code === "ENOENT") {
|
143937
143967
|
output_manager_default.debug(`File created, but has since been deleted: ${name}`);
|
143938
143968
|
fileRemoved(name, this.files, changed, removed);
|
143939
143969
|
} else {
|
@@ -143958,7 +143988,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
143958
143988
|
fileChanged(name, changed, removed);
|
143959
143989
|
output_manager_default.debug(`File modified: ${name}`);
|
143960
143990
|
} catch (err) {
|
143961
|
-
if ((0,
|
143991
|
+
if ((0, import_error_utils20.isErrnoException)(err) && err.code === "ENOENT") {
|
143962
143992
|
output_manager_default.debug(`File modified, but has since been deleted: ${name}`);
|
143963
143993
|
fileRemoved(name, this.files, changed, removed);
|
143964
143994
|
} else {
|
@@ -144043,7 +144073,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
144043
144073
|
env = (0, import_dotenv2.parse)(dotenv2);
|
144044
144074
|
env = this.injectSystemValuesInDotenv(env);
|
144045
144075
|
} catch (err) {
|
144046
|
-
if (!(0,
|
144076
|
+
if (!(0, import_error_utils20.isErrnoException)(err) || err.code !== "ENOENT") {
|
144047
144077
|
throw err;
|
144048
144078
|
}
|
144049
144079
|
}
|
@@ -144227,8 +144257,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
144227
144257
|
parsed[import_client12.fileNameSymbol] = rel;
|
144228
144258
|
return parsed;
|
144229
144259
|
} catch (err) {
|
144230
|
-
if ((0,
|
144231
|
-
if ((0,
|
144260
|
+
if ((0, import_error_utils20.isError)(err)) {
|
144261
|
+
if ((0, import_error_utils20.isErrnoException)(err) && err.code === "ENOENT") {
|
144232
144262
|
output_manager_default.debug(`No \`${rel}\` file present`);
|
144233
144263
|
} else if (err.name === "SyntaxError") {
|
144234
144264
|
output_manager_default.warn(
|
@@ -144327,7 +144357,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
144327
144357
|
try {
|
144328
144358
|
address = (await (0, import_async_listen3.listen)(this.server, ...listenSpec)).toString();
|
144329
144359
|
} catch (err) {
|
144330
|
-
if ((0,
|
144360
|
+
if ((0, import_error_utils20.isErrnoException)(err)) {
|
144331
144361
|
output_manager_default.debug(`Got listen error: ${err.code}`);
|
144332
144362
|
if (err.code === "EADDRINUSE") {
|
144333
144363
|
if (typeof listenSpec[0] === "number") {
|
@@ -144446,7 +144476,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
144446
144476
|
try {
|
144447
144477
|
await Promise.all(ops);
|
144448
144478
|
} catch (err) {
|
144449
|
-
if ((0,
|
144479
|
+
if ((0, import_error_utils20.isErrnoException)(err) && err.code === "ERR_SERVER_NOT_RUNNING") {
|
144450
144480
|
process.exit(exitCode2 || 0);
|
144451
144481
|
} else {
|
144452
144482
|
throw err;
|
@@ -144999,7 +145029,7 @@ async function main4(client2) {
|
|
144999
145029
|
try {
|
145000
145030
|
return await dev(client2, parsedArgs.flags, args2);
|
145001
145031
|
} catch (err) {
|
145002
|
-
if ((0,
|
145032
|
+
if ((0, import_error_utils21.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
145003
145033
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
145004
145034
|
if (matches && matches[1]) {
|
145005
145035
|
const hostname2 = matches[1];
|
@@ -145027,7 +145057,7 @@ ${errMeta}`;
|
|
145027
145057
|
}
|
145028
145058
|
return err.stack;
|
145029
145059
|
}
|
145030
|
-
var import_path37, import_chalk60,
|
145060
|
+
var import_path37, import_chalk60, import_error_utils21, COMMAND_CONFIG3;
|
145031
145061
|
var init_dev3 = __esm({
|
145032
145062
|
"src/commands/dev/index.ts"() {
|
145033
145063
|
"use strict";
|
@@ -145044,7 +145074,7 @@ var init_dev3 = __esm({
|
|
145044
145074
|
init_read_json_file();
|
145045
145075
|
init_pkg_name();
|
145046
145076
|
init_errors_ts();
|
145047
|
-
|
145077
|
+
import_error_utils21 = __toESM3(require_dist2());
|
145048
145078
|
init_help();
|
145049
145079
|
init_command6();
|
145050
145080
|
init_get_flags_specification();
|
@@ -146626,7 +146656,7 @@ async function buy(client2, argv) {
|
|
146626
146656
|
output_manager_default.error(
|
146627
146657
|
"An unexpected error occurred while purchasing your domain. Please try again later."
|
146628
146658
|
);
|
146629
|
-
output_manager_default.debug(`Server response: ${(0,
|
146659
|
+
output_manager_default.debug(`Server response: ${(0, import_error_utils22.errorToString)(err)}`);
|
146630
146660
|
return 1;
|
146631
146661
|
}
|
146632
146662
|
output_manager_default.stopSpinner();
|
@@ -146695,13 +146725,13 @@ async function buy(client2, argv) {
|
|
146695
146725
|
}
|
146696
146726
|
return 0;
|
146697
146727
|
}
|
146698
|
-
var import_chalk74, import_tldts6,
|
146728
|
+
var import_chalk74, import_tldts6, import_error_utils22;
|
146699
146729
|
var init_buy2 = __esm({
|
146700
146730
|
"src/commands/domains/buy.ts"() {
|
146701
146731
|
"use strict";
|
146702
146732
|
import_chalk74 = __toESM3(require_source());
|
146703
146733
|
import_tldts6 = __toESM3(require_cjs2());
|
146704
|
-
|
146734
|
+
import_error_utils22 = __toESM3(require_dist2());
|
146705
146735
|
init_errors_ts();
|
146706
146736
|
init_get_domain_price();
|
146707
146737
|
init_get_domain_status();
|
@@ -148232,16 +148262,16 @@ var init_read_standard_input = __esm({
|
|
148232
148262
|
|
148233
148263
|
// src/util/env/known-error.ts
|
148234
148264
|
function isKnownError(error3) {
|
148235
|
-
const code2 = (0,
|
148265
|
+
const code2 = (0, import_error_utils23.isErrnoException)(error3) ? error3.code : null;
|
148236
148266
|
if (!code2)
|
148237
148267
|
return false;
|
148238
148268
|
return knownErrorsCodes.has(code2.toUpperCase());
|
148239
148269
|
}
|
148240
|
-
var
|
148270
|
+
var import_error_utils23, knownErrorsCodes;
|
148241
148271
|
var init_known_error = __esm({
|
148242
148272
|
"src/util/env/known-error.ts"() {
|
148243
148273
|
"use strict";
|
148244
|
-
|
148274
|
+
import_error_utils23 = __toESM3(require_dist2());
|
148245
148275
|
knownErrorsCodes = /* @__PURE__ */ new Set([
|
148246
148276
|
"BAD_REQUEST",
|
148247
148277
|
"ENV_ALREADY_EXISTS",
|
@@ -148282,7 +148312,7 @@ async function getCustomEnvironments(client2, projectId) {
|
|
148282
148312
|
);
|
148283
148313
|
return res.environments;
|
148284
148314
|
} catch (error3) {
|
148285
|
-
if ((0,
|
148315
|
+
if ((0, import_error_utils24.isObject)(error3) && error3.status === 404) {
|
148286
148316
|
return [];
|
148287
148317
|
}
|
148288
148318
|
throw error3;
|
@@ -148295,11 +148325,11 @@ function pickCustomEnvironment(customEnvironments, customEnvironmentSlugOrId) {
|
|
148295
148325
|
({ slug, id }) => slug === customEnvironmentSlugOrId || id === customEnvironmentSlugOrId
|
148296
148326
|
);
|
148297
148327
|
}
|
148298
|
-
var
|
148328
|
+
var import_error_utils24;
|
148299
148329
|
var init_get_custom_environments = __esm({
|
148300
148330
|
"src/util/target/get-custom-environments.ts"() {
|
148301
148331
|
"use strict";
|
148302
|
-
|
148332
|
+
import_error_utils24 = __toESM3(require_dist2());
|
148303
148333
|
}
|
148304
148334
|
});
|
148305
148335
|
|
@@ -149354,7 +149384,6 @@ async function checkExistsAndConnect({
|
|
149354
149384
|
if (!gitProviderLink) {
|
149355
149385
|
const connect2 = await connectGitProvider(
|
149356
149386
|
client2,
|
149357
|
-
org,
|
149358
149387
|
project.id,
|
149359
149388
|
provider,
|
149360
149389
|
repoPath
|
@@ -149386,7 +149415,6 @@ async function checkExistsAndConnect({
|
|
149386
149415
|
await disconnectGitProvider(client2, org, project.id);
|
149387
149416
|
const connect2 = await connectGitProvider(
|
149388
149417
|
client2,
|
149389
|
-
org,
|
149390
149418
|
project.id,
|
149391
149419
|
provider,
|
149392
149420
|
repoPath
|
@@ -149603,9 +149631,10 @@ async function main7(client2) {
|
|
149603
149631
|
store: client2.telemetryEventStore
|
149604
149632
|
}
|
149605
149633
|
});
|
149606
|
-
|
149607
|
-
|
149608
|
-
|
149634
|
+
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
149635
|
+
parsedArgs.args.slice(1),
|
149636
|
+
COMMAND_CONFIG7
|
149637
|
+
);
|
149609
149638
|
if (parsedArgs.flags["--help"]) {
|
149610
149639
|
telemetry2.trackCliFlagHelp("git", subcommand);
|
149611
149640
|
output_manager_default.print(help2(gitCommand, { columns: client2.stderr.columns }));
|
@@ -149613,10 +149642,10 @@ async function main7(client2) {
|
|
149613
149642
|
}
|
149614
149643
|
switch (subcommand) {
|
149615
149644
|
case "connect":
|
149616
|
-
telemetry2.trackCliSubcommandConnect(
|
149645
|
+
telemetry2.trackCliSubcommandConnect(subcommandOriginal);
|
149617
149646
|
return connect(client2, args2);
|
149618
149647
|
case "disconnect":
|
149619
|
-
telemetry2.trackCliSubcommandDisconnect(
|
149648
|
+
telemetry2.trackCliSubcommandDisconnect(subcommandOriginal);
|
149620
149649
|
return disconnect(client2, args2);
|
149621
149650
|
default:
|
149622
149651
|
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG7));
|
@@ -149638,6 +149667,7 @@ var init_git2 = __esm({
|
|
149638
149667
|
init_get_flags_specification();
|
149639
149668
|
init_output_manager();
|
149640
149669
|
init_git();
|
149670
|
+
init_get_subcommand();
|
149641
149671
|
COMMAND_CONFIG7 = {
|
149642
149672
|
connect: ["connect"],
|
149643
149673
|
disconnect: ["disconnect"]
|
@@ -150001,13 +150031,13 @@ async function main8(client2) {
|
|
150001
150031
|
return await init(client2, parsedArgs.flags, args2, telemetry2);
|
150002
150032
|
} catch (err) {
|
150003
150033
|
output_manager_default.prettyError(err);
|
150004
|
-
if ((0,
|
150034
|
+
if ((0, import_error_utils25.isError)(err) && typeof err.stack === "string") {
|
150005
150035
|
output_manager_default.debug(err.stack);
|
150006
150036
|
}
|
150007
150037
|
return 1;
|
150008
150038
|
}
|
150009
150039
|
}
|
150010
|
-
var
|
150040
|
+
var import_error_utils25, COMMAND_CONFIG8;
|
150011
150041
|
var init_init3 = __esm({
|
150012
150042
|
"src/commands/init/index.ts"() {
|
150013
150043
|
"use strict";
|
@@ -150015,7 +150045,7 @@ var init_init3 = __esm({
|
|
150015
150045
|
init_get_subcommand();
|
150016
150046
|
init_handle_error();
|
150017
150047
|
init_init();
|
150018
|
-
|
150048
|
+
import_error_utils25 = __toESM3(require_dist2());
|
150019
150049
|
init_help();
|
150020
150050
|
init_command11();
|
150021
150051
|
init_get_flags_specification();
|
@@ -150434,7 +150464,7 @@ async function inspect3(client2) {
|
|
150434
150464
|
try {
|
150435
150465
|
({ contextName } = await getScope(client2));
|
150436
150466
|
} catch (err) {
|
150437
|
-
if ((0,
|
150467
|
+
if ((0, import_error_utils26.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
150438
150468
|
error3(err.message);
|
150439
150469
|
return 1;
|
150440
150470
|
}
|
@@ -150590,11 +150620,11 @@ function exitCode(state) {
|
|
150590
150620
|
}
|
150591
150621
|
return 0;
|
150592
150622
|
}
|
150593
|
-
var
|
150623
|
+
var import_error_utils26, import_chalk90, import_ms18, import_title5, import_url19;
|
150594
150624
|
var init_inspect4 = __esm({
|
150595
150625
|
"src/commands/inspect/index.ts"() {
|
150596
150626
|
"use strict";
|
150597
|
-
|
150627
|
+
import_error_utils26 = __toESM3(require_dist2());
|
150598
150628
|
import_chalk90 = __toESM3(require_source());
|
150599
150629
|
import_ms18 = __toESM3(require_ms2());
|
150600
150630
|
import_title5 = __toESM3(require_lib4());
|
@@ -152561,7 +152591,12 @@ async function link3(client2) {
|
|
152561
152591
|
}
|
152562
152592
|
if (parsedArgs.flags["--repo"]) {
|
152563
152593
|
output_manager_default.warn(`The ${cmd("--repo")} flag is in alpha, please report issues`);
|
152564
|
-
|
152594
|
+
try {
|
152595
|
+
await ensureRepoLink(client2, cwd, { yes, overwrite: true });
|
152596
|
+
} catch (err) {
|
152597
|
+
output_manager_default.prettyError(err);
|
152598
|
+
return 1;
|
152599
|
+
}
|
152565
152600
|
} else {
|
152566
152601
|
const link4 = await ensureLink("link", client2, cwd, {
|
152567
152602
|
autoConfirm: yes,
|
@@ -152752,7 +152787,7 @@ async function list3(client2) {
|
|
152752
152787
|
try {
|
152753
152788
|
({ contextName } = await getScope(client2));
|
152754
152789
|
} catch (err) {
|
152755
|
-
if ((0,
|
152790
|
+
if ((0, import_error_utils27.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
152756
152791
|
error3(err.message);
|
152757
152792
|
return 1;
|
152758
152793
|
}
|
@@ -152795,7 +152830,7 @@ async function list3(client2) {
|
|
152795
152830
|
try {
|
152796
152831
|
({ contextName } = await getScope(client2));
|
152797
152832
|
} catch (err) {
|
152798
|
-
if ((0,
|
152833
|
+
if ((0, import_error_utils27.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
152799
152834
|
error3(err.message);
|
152800
152835
|
return 1;
|
152801
152836
|
}
|
@@ -152940,7 +152975,7 @@ function filterUniqueApps() {
|
|
152940
152975
|
return true;
|
152941
152976
|
};
|
152942
152977
|
}
|
152943
|
-
var import_ms19, import_chalk97, import_title7,
|
152978
|
+
var import_ms19, import_chalk97, import_title7, import_error_utils27;
|
152944
152979
|
var init_list6 = __esm({
|
152945
152980
|
"src/commands/list/index.ts"() {
|
152946
152981
|
"use strict";
|
@@ -152960,7 +152995,7 @@ var init_list6 = __esm({
|
|
152960
152995
|
init_ensure_link();
|
152961
152996
|
init_get_scope();
|
152962
152997
|
init_errors_ts();
|
152963
|
-
|
152998
|
+
import_error_utils27 = __toESM3(require_dist2());
|
152964
152999
|
init_help();
|
152965
153000
|
init_command17();
|
152966
153001
|
init_parse_target();
|
@@ -153098,7 +153133,7 @@ async function logs(client2) {
|
|
153098
153133
|
try {
|
153099
153134
|
({ contextName } = await getScope(client2));
|
153100
153135
|
} catch (err) {
|
153101
|
-
if ((0,
|
153136
|
+
if ((0, import_error_utils28.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
153102
153137
|
error3(err.message);
|
153103
153138
|
return 1;
|
153104
153139
|
}
|
@@ -153152,11 +153187,11 @@ function printDisclaimer(deployment) {
|
|
153152
153187
|
`
|
153153
153188
|
);
|
153154
153189
|
}
|
153155
|
-
var
|
153190
|
+
var import_error_utils28, import_chalk98, import_format2, deprecatedFlags, dateTimeFormat2;
|
153156
153191
|
var init_logs3 = __esm({
|
153157
153192
|
"src/commands/logs/index.ts"() {
|
153158
153193
|
"use strict";
|
153159
|
-
|
153194
|
+
import_error_utils28 = __toESM3(require_dist2());
|
153160
153195
|
import_chalk98 = __toESM3(require_source());
|
153161
153196
|
import_format2 = __toESM3(require_format());
|
153162
153197
|
init_build_state();
|
@@ -153394,7 +153429,7 @@ async function main11(client2) {
|
|
153394
153429
|
writeToAuthConfigFile(authConfig);
|
153395
153430
|
output_manager_default.debug("Configuration has been deleted");
|
153396
153431
|
} catch (err) {
|
153397
|
-
output_manager_default.debug((0,
|
153432
|
+
output_manager_default.debug((0, import_error_utils29.errorToString)(err));
|
153398
153433
|
exitCode2 = 1;
|
153399
153434
|
}
|
153400
153435
|
if (exitCode2 === 0) {
|
@@ -153404,7 +153439,7 @@ async function main11(client2) {
|
|
153404
153439
|
}
|
153405
153440
|
return exitCode2;
|
153406
153441
|
}
|
153407
|
-
var
|
153442
|
+
var import_error_utils29;
|
153408
153443
|
var init_logout2 = __esm({
|
153409
153444
|
"src/commands/logout/index.ts"() {
|
153410
153445
|
"use strict";
|
@@ -153413,7 +153448,7 @@ var init_logout2 = __esm({
|
|
153413
153448
|
init_get_args();
|
153414
153449
|
init_pkg_name();
|
153415
153450
|
init_errors_ts();
|
153416
|
-
|
153451
|
+
import_error_utils29 = __toESM3(require_dist2());
|
153417
153452
|
init_help();
|
153418
153453
|
init_command19();
|
153419
153454
|
init_get_flags_specification();
|
@@ -154315,7 +154350,7 @@ var promote_exports = {};
|
|
154315
154350
|
__export3(promote_exports, {
|
154316
154351
|
default: () => promote_default
|
154317
154352
|
});
|
154318
|
-
var import_ms25,
|
154353
|
+
var import_ms25, import_error_utils30, promote_default;
|
154319
154354
|
var init_promote2 = __esm({
|
154320
154355
|
"src/commands/promote/index.ts"() {
|
154321
154356
|
"use strict";
|
@@ -154323,7 +154358,7 @@ var init_promote2 = __esm({
|
|
154323
154358
|
init_get_args();
|
154324
154359
|
init_get_project_by_cwd_or_link();
|
154325
154360
|
init_handle_error();
|
154326
|
-
|
154361
|
+
import_error_utils30 = __toESM3(require_dist2());
|
154327
154362
|
init_request_promote();
|
154328
154363
|
init_status();
|
154329
154364
|
init_command22();
|
@@ -154394,7 +154429,7 @@ var init_promote2 = __esm({
|
|
154394
154429
|
yes
|
154395
154430
|
});
|
154396
154431
|
} catch (err) {
|
154397
|
-
if ((0,
|
154432
|
+
if ((0, import_error_utils30.isErrnoException)(err)) {
|
154398
154433
|
if (err.code === "ERR_CANCELED") {
|
154399
154434
|
return 0;
|
154400
154435
|
}
|
@@ -154684,7 +154719,7 @@ async function redeploy(client2) {
|
|
154684
154719
|
return printDeploymentStatus(deployment, deployStamp, noWait);
|
154685
154720
|
} catch (err) {
|
154686
154721
|
output_manager_default.prettyError(err);
|
154687
|
-
if ((0,
|
154722
|
+
if ((0, import_error_utils31.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
154688
154723
|
output_manager_default.error(
|
154689
154724
|
`Use ${import_chalk108.default.bold("vc switch")} to change your current team`
|
154690
154725
|
);
|
@@ -154692,7 +154727,7 @@ async function redeploy(client2) {
|
|
154692
154727
|
return 1;
|
154693
154728
|
}
|
154694
154729
|
}
|
154695
|
-
var import_chalk108, import_client13,
|
154730
|
+
var import_chalk108, import_client13, import_error_utils31;
|
154696
154731
|
var init_redeploy2 = __esm({
|
154697
154732
|
"src/commands/redeploy/index.ts"() {
|
154698
154733
|
"use strict";
|
@@ -154704,7 +154739,7 @@ var init_redeploy2 = __esm({
|
|
154704
154739
|
init_get_deployment_by_id_or_url();
|
154705
154740
|
init_get_scope();
|
154706
154741
|
init_handle_error();
|
154707
|
-
|
154742
|
+
import_error_utils31 = __toESM3(require_dist2());
|
154708
154743
|
init_util();
|
154709
154744
|
init_print_deployment_status();
|
154710
154745
|
init_stamp();
|
@@ -155357,14 +155392,14 @@ var rollback_exports = {};
|
|
155357
155392
|
__export3(rollback_exports, {
|
155358
155393
|
default: () => rollback_default
|
155359
155394
|
});
|
155360
|
-
var
|
155395
|
+
var import_error_utils32, import_ms29, rollback_default;
|
155361
155396
|
var init_rollback2 = __esm({
|
155362
155397
|
"src/commands/rollback/index.ts"() {
|
155363
155398
|
"use strict";
|
155364
155399
|
init_get_args();
|
155365
155400
|
init_get_project_by_cwd_or_link();
|
155366
155401
|
init_handle_error();
|
155367
|
-
|
155402
|
+
import_error_utils32 = __toESM3(require_dist2());
|
155368
155403
|
import_ms29 = __toESM3(require_ms2());
|
155369
155404
|
init_request_rollback();
|
155370
155405
|
init_status2();
|
@@ -155433,7 +155468,7 @@ var init_rollback2 = __esm({
|
|
155433
155468
|
timeout
|
155434
155469
|
});
|
155435
155470
|
} catch (err) {
|
155436
|
-
if ((0,
|
155471
|
+
if ((0, import_error_utils32.isErrnoException)(err)) {
|
155437
155472
|
if (err.code === "ERR_CANCELED") {
|
155438
155473
|
return 0;
|
155439
155474
|
}
|
@@ -155906,7 +155941,7 @@ Please select a team scope using ${getCommandName(
|
|
155906
155941
|
validate: validateEmail2
|
155907
155942
|
});
|
155908
155943
|
} catch (err) {
|
155909
|
-
if (!(0,
|
155944
|
+
if (!(0, import_error_utils33.isError)(err) || err.message !== "USER_ABORT") {
|
155910
155945
|
throw err;
|
155911
155946
|
}
|
155912
155947
|
}
|
@@ -155936,7 +155971,7 @@ Please select a team scope using ${getCommandName(
|
|
155936
155971
|
} catch (err) {
|
155937
155972
|
output_manager_default.stopSpinner();
|
155938
155973
|
process.stderr.write(eraseLines(emails.length + 2));
|
155939
|
-
output_manager_default.error((0,
|
155974
|
+
output_manager_default.error((0, import_error_utils33.errorToString)(err));
|
155940
155975
|
hasError = true;
|
155941
155976
|
for (const email3 of emails) {
|
155942
155977
|
output_manager_default.log(`${import_chalk114.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
@@ -155957,7 +155992,7 @@ Please select a team scope using ${getCommandName(
|
|
155957
155992
|
}
|
155958
155993
|
return 0;
|
155959
155994
|
}
|
155960
|
-
var import_chalk114,
|
155995
|
+
var import_chalk114, import_error_utils33, validateEmail2, domains;
|
155961
155996
|
var init_invite2 = __esm({
|
155962
155997
|
"src/commands/teams/invite.ts"() {
|
155963
155998
|
"use strict";
|
@@ -155973,7 +156008,7 @@ var init_invite2 = __esm({
|
|
155973
156008
|
init_get_teams();
|
155974
156009
|
init_invite_user_to_team();
|
155975
156010
|
init_errors_ts();
|
155976
|
-
|
156011
|
+
import_error_utils33 = __toESM3(require_dist2());
|
155977
156012
|
init_invite();
|
155978
156013
|
init_output_manager();
|
155979
156014
|
init_get_args();
|
@@ -156049,7 +156084,7 @@ async function add7(client2) {
|
|
156049
156084
|
default: slug
|
156050
156085
|
});
|
156051
156086
|
} catch (err) {
|
156052
|
-
if ((0,
|
156087
|
+
if ((0, import_error_utils34.isError)(err) && err.message === "USER_ABORT") {
|
156053
156088
|
output_manager_default.log("Canceled");
|
156054
156089
|
return 0;
|
156055
156090
|
}
|
@@ -156062,7 +156097,7 @@ async function add7(client2) {
|
|
156062
156097
|
} catch (err) {
|
156063
156098
|
output_manager_default.stopSpinner();
|
156064
156099
|
output_manager_default.print(eraseLines(2));
|
156065
|
-
output_manager_default.error((0,
|
156100
|
+
output_manager_default.error((0, import_error_utils34.errorToString)(err));
|
156066
156101
|
}
|
156067
156102
|
} while (!team);
|
156068
156103
|
output_manager_default.stopSpinner();
|
@@ -156078,7 +156113,7 @@ async function add7(client2) {
|
|
156078
156113
|
validate: validateName
|
156079
156114
|
});
|
156080
156115
|
} catch (err) {
|
156081
|
-
if ((0,
|
156116
|
+
if ((0, import_error_utils34.isError)(err) && err.message === "USER_ABORT") {
|
156082
156117
|
output_manager_default.log("No name specified");
|
156083
156118
|
return 2;
|
156084
156119
|
}
|
@@ -156105,7 +156140,7 @@ async function add7(client2) {
|
|
156105
156140
|
});
|
156106
156141
|
return 0;
|
156107
156142
|
}
|
156108
|
-
var import_chalk115,
|
156143
|
+
var import_chalk115, import_error_utils34, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
156109
156144
|
var init_add13 = __esm({
|
156110
156145
|
"src/commands/teams/add.ts"() {
|
156111
156146
|
"use strict";
|
@@ -156118,7 +156153,7 @@ var init_add13 = __esm({
|
|
156118
156153
|
init_pkg_name();
|
156119
156154
|
init_create_team();
|
156120
156155
|
init_patch_team();
|
156121
|
-
|
156156
|
+
import_error_utils34 = __toESM3(require_dist2());
|
156122
156157
|
init_output_manager();
|
156123
156158
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
156124
156159
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
@@ -156747,7 +156782,7 @@ var init_whoami2 = __esm({
|
|
156747
156782
|
});
|
156748
156783
|
|
156749
156784
|
// src/index.ts
|
156750
|
-
var
|
156785
|
+
var import_error_utils35 = __toESM3(require_dist2());
|
156751
156786
|
var import_path40 = require("path");
|
156752
156787
|
var import_fs8 = require("fs");
|
156753
156788
|
var import_fs_extra23 = __toESM3(require_lib());
|
@@ -157530,7 +157565,7 @@ init_output_manager();
|
|
157530
157565
|
try {
|
157531
157566
|
process.cwd();
|
157532
157567
|
} catch (err) {
|
157533
|
-
if ((0,
|
157568
|
+
if ((0, import_error_utils35.isError)(err) && err.message.includes("uv_cwd")) {
|
157534
157569
|
console.error("Error: The current working directory does not exist.");
|
157535
157570
|
process.exit(1);
|
157536
157571
|
}
|
@@ -157639,7 +157674,7 @@ var main14 = async () => {
|
|
157639
157674
|
output_manager_default.error(
|
157640
157675
|
`An unexpected error occurred while trying to create the global directory "${humanizePath(
|
157641
157676
|
VERCEL_DIR3
|
157642
|
-
)}" ${(0,
|
157677
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
157643
157678
|
);
|
157644
157679
|
return 1;
|
157645
157680
|
}
|
@@ -157647,7 +157682,7 @@ var main14 = async () => {
|
|
157647
157682
|
try {
|
157648
157683
|
config2 = readConfigFile();
|
157649
157684
|
} catch (err) {
|
157650
|
-
if ((0,
|
157685
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
157651
157686
|
config2 = defaultGlobalConfig;
|
157652
157687
|
try {
|
157653
157688
|
writeToConfigFile(config2);
|
@@ -157655,7 +157690,7 @@ var main14 = async () => {
|
|
157655
157690
|
output_manager_default.error(
|
157656
157691
|
`An unexpected error occurred while trying to save the config to "${humanizePath(
|
157657
157692
|
VERCEL_CONFIG_PATH
|
157658
|
-
)}" ${(0,
|
157693
|
+
)}" ${(0, import_error_utils35.errorToString)(err2)}`
|
157659
157694
|
);
|
157660
157695
|
return 1;
|
157661
157696
|
}
|
@@ -157663,7 +157698,7 @@ var main14 = async () => {
|
|
157663
157698
|
output_manager_default.error(
|
157664
157699
|
`An unexpected error occurred while trying to read the config in "${humanizePath(
|
157665
157700
|
VERCEL_CONFIG_PATH
|
157666
|
-
)}" ${(0,
|
157701
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
157667
157702
|
);
|
157668
157703
|
return 1;
|
157669
157704
|
}
|
@@ -157672,7 +157707,7 @@ var main14 = async () => {
|
|
157672
157707
|
try {
|
157673
157708
|
authConfig = readAuthConfigFile();
|
157674
157709
|
} catch (err) {
|
157675
|
-
if ((0,
|
157710
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
157676
157711
|
authConfig = defaultAuthConfig;
|
157677
157712
|
try {
|
157678
157713
|
writeToAuthConfigFile(authConfig);
|
@@ -157680,7 +157715,7 @@ var main14 = async () => {
|
|
157680
157715
|
output_manager_default.error(
|
157681
157716
|
`An unexpected error occurred while trying to write the auth config to "${humanizePath(
|
157682
157717
|
VERCEL_AUTH_CONFIG_PATH
|
157683
|
-
)}" ${(0,
|
157718
|
+
)}" ${(0, import_error_utils35.errorToString)(err2)}`
|
157684
157719
|
);
|
157685
157720
|
return 1;
|
157686
157721
|
}
|
@@ -157688,7 +157723,7 @@ var main14 = async () => {
|
|
157688
157723
|
output_manager_default.error(
|
157689
157724
|
`An unexpected error occurred while trying to read the auth config in "${humanizePath(
|
157690
157725
|
VERCEL_AUTH_CONFIG_PATH
|
157691
|
-
)}" ${(0,
|
157726
|
+
)}" ${(0, import_error_utils35.errorToString)(err)}`
|
157692
157727
|
);
|
157693
157728
|
return 1;
|
157694
157729
|
}
|
@@ -157857,7 +157892,7 @@ var main14 = async () => {
|
|
157857
157892
|
if (err instanceof Error) {
|
157858
157893
|
output_manager_default.debug(err.stack || err.toString());
|
157859
157894
|
}
|
157860
|
-
if ((0,
|
157895
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "NOT_AUTHORIZED") {
|
157861
157896
|
output_manager_default.prettyError({
|
157862
157897
|
message: `You do not have access to the specified account`,
|
157863
157898
|
link: "https://err.sh/vercel/scope-not-accessible"
|
@@ -157878,14 +157913,14 @@ var main14 = async () => {
|
|
157878
157913
|
try {
|
157879
157914
|
teams2 = await getTeams(client);
|
157880
157915
|
} catch (err) {
|
157881
|
-
if ((0,
|
157916
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "not_authorized") {
|
157882
157917
|
output_manager_default.prettyError({
|
157883
157918
|
message: `You do not have access to the specified team`,
|
157884
157919
|
link: "https://err.sh/vercel/scope-not-accessible"
|
157885
157920
|
});
|
157886
157921
|
return 1;
|
157887
157922
|
}
|
157888
|
-
if ((0,
|
157923
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "rate_limited") {
|
157889
157924
|
output_manager_default.prettyError({
|
157890
157925
|
message: "Rate limited. Too many requests to the same endpoint: /teams"
|
157891
157926
|
});
|
@@ -157905,7 +157940,6 @@ var main14 = async () => {
|
|
157905
157940
|
client.config.currentTeam = related.id;
|
157906
157941
|
}
|
157907
157942
|
}
|
157908
|
-
client.telemetryEventStore.updateTeamId(client.config.currentTeam);
|
157909
157943
|
let exitCode2;
|
157910
157944
|
try {
|
157911
157945
|
if (!targetCommand2) {
|
@@ -157919,7 +157953,7 @@ var main14 = async () => {
|
|
157919
157953
|
);
|
157920
157954
|
telemetry2.trackCliExtension();
|
157921
157955
|
} catch (err) {
|
157922
|
-
if ((0,
|
157956
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOENT") {
|
157923
157957
|
targetCommand2 = subcommand = "deploy";
|
157924
157958
|
} else {
|
157925
157959
|
throw err;
|
@@ -158065,7 +158099,7 @@ var main14 = async () => {
|
|
158065
158099
|
exitCode2 = await func(client);
|
158066
158100
|
}
|
158067
158101
|
} catch (err) {
|
158068
|
-
if ((0,
|
158102
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ENOTFOUND") {
|
158069
158103
|
const matches = /getaddrinfo ENOTFOUND (.*)$/.exec(err.message || "");
|
158070
158104
|
if (matches && matches[1]) {
|
158071
158105
|
const hostname2 = matches[1];
|
@@ -158080,7 +158114,7 @@ var main14 = async () => {
|
|
158080
158114
|
}
|
158081
158115
|
return 1;
|
158082
158116
|
}
|
158083
|
-
if ((0,
|
158117
|
+
if ((0, import_error_utils35.isErrnoException)(err) && err.code === "ECONNRESET") {
|
158084
158118
|
const matches = /request to https:\/\/(.*?)\//.exec(err.message || "");
|
158085
158119
|
const hostname2 = matches?.[1];
|
158086
158120
|
if (hostname2) {
|
@@ -158092,7 +158126,7 @@ var main14 = async () => {
|
|
158092
158126
|
}
|
158093
158127
|
return 1;
|
158094
158128
|
}
|
158095
|
-
if ((0,
|
158129
|
+
if ((0, import_error_utils35.isErrnoException)(err) && (err.code === "NOT_AUTHORIZED" || err.code === "TEAM_DELETED")) {
|
158096
158130
|
output_manager_default.prettyError(err);
|
158097
158131
|
return 1;
|
158098
158132
|
}
|
@@ -158101,7 +158135,7 @@ var main14 = async () => {
|
|
158101
158135
|
output_manager_default.prettyError(err);
|
158102
158136
|
return 1;
|
158103
158137
|
}
|
158104
|
-
if ((0,
|
158138
|
+
if ((0, import_error_utils35.isErrnoException)(err)) {
|
158105
158139
|
if (typeof err.stack === "string") {
|
158106
158140
|
output_manager_default.debug(err.stack);
|
158107
158141
|
}
|
@@ -158112,6 +158146,7 @@ var main14 = async () => {
|
|
158112
158146
|
}
|
158113
158147
|
return 1;
|
158114
158148
|
}
|
158149
|
+
telemetryEventStore.updateTeamId(client.config.currentTeam);
|
158115
158150
|
await telemetryEventStore.save();
|
158116
158151
|
return exitCode2;
|
158117
158152
|
};
|