vercel-cli 48.2.6__py3-none-any.whl → 48.3.0__py3-none-any.whl
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.
Potentially problematic release.
This version of vercel-cli might be problematic. Click here for more details.
- vercel_cli/vendor/dist/index.js +1333 -591
- vercel_cli/vendor/node_modules/.package-lock.json +6 -6
- vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md +6 -0
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/stream-to-buffer.js +1 -1
- vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.js +1 -1
- vercel_cli/vendor/node_modules/@vercel/build-utils/package.json +1 -1
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +145 -71
- vercel_cli/vendor/node_modules/@vercel/python/package.json +4 -3
- vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +107 -233
- vercel_cli/vendor/node_modules/@vercel/python/vc_init_dev_asgi.py +42 -1
- vercel_cli/vendor/node_modules/@vercel/python/vc_init_dev_wsgi.py +123 -0
- vercel_cli/vendor/package.json +3 -3
- {vercel_cli-48.2.6.dist-info → vercel_cli-48.3.0.dist-info}/METADATA +1 -1
- {vercel_cli-48.2.6.dist-info → vercel_cli-48.3.0.dist-info}/RECORD +16 -15
- {vercel_cli-48.2.6.dist-info → vercel_cli-48.3.0.dist-info}/WHEEL +0 -0
- {vercel_cli-48.2.6.dist-info → vercel_cli-48.3.0.dist-info}/entry_points.txt +0 -0
vercel_cli/vendor/dist/index.js
CHANGED
|
@@ -2383,7 +2383,7 @@ var require_ensure = __commonJS2({
|
|
|
2383
2383
|
// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
2384
2384
|
var require_utils2 = __commonJS2({
|
|
2385
2385
|
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports2, module2) {
|
|
2386
|
-
function
|
|
2386
|
+
function stringify2(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
2387
2387
|
const EOF = finalEOL ? EOL : "";
|
|
2388
2388
|
const str = JSON.stringify(obj, replacer, spaces);
|
|
2389
2389
|
return str.replace(/\n/g, EOL) + EOF;
|
|
@@ -2393,7 +2393,7 @@ var require_utils2 = __commonJS2({
|
|
|
2393
2393
|
content = content.toString("utf8");
|
|
2394
2394
|
return content.replace(/^\uFEFF/, "");
|
|
2395
2395
|
}
|
|
2396
|
-
module2.exports = { stringify:
|
|
2396
|
+
module2.exports = { stringify: stringify2, stripBom };
|
|
2397
2397
|
}
|
|
2398
2398
|
});
|
|
2399
2399
|
|
|
@@ -2407,7 +2407,7 @@ var require_jsonfile = __commonJS2({
|
|
|
2407
2407
|
_fs = require("fs");
|
|
2408
2408
|
}
|
|
2409
2409
|
var universalify = require_universalify();
|
|
2410
|
-
var { stringify:
|
|
2410
|
+
var { stringify: stringify2, stripBom } = require_utils2();
|
|
2411
2411
|
async function _readFile(file, options = {}) {
|
|
2412
2412
|
if (typeof options === "string") {
|
|
2413
2413
|
options = { encoding: options };
|
|
@@ -2451,13 +2451,13 @@ var require_jsonfile = __commonJS2({
|
|
|
2451
2451
|
}
|
|
2452
2452
|
async function _writeFile(file, obj, options = {}) {
|
|
2453
2453
|
const fs15 = options.fs || _fs;
|
|
2454
|
-
const str =
|
|
2454
|
+
const str = stringify2(obj, options);
|
|
2455
2455
|
await universalify.fromCallback(fs15.writeFile)(file, str, options);
|
|
2456
2456
|
}
|
|
2457
2457
|
var writeFile4 = universalify.fromPromise(_writeFile);
|
|
2458
2458
|
function writeFileSync(file, obj, options = {}) {
|
|
2459
2459
|
const fs15 = options.fs || _fs;
|
|
2460
|
-
const str =
|
|
2460
|
+
const str = stringify2(obj, options);
|
|
2461
2461
|
return fs15.writeFileSync(file, str, options);
|
|
2462
2462
|
}
|
|
2463
2463
|
var jsonfile = {
|
|
@@ -2531,10 +2531,10 @@ var require_output = __commonJS2({
|
|
|
2531
2531
|
var require_output_json = __commonJS2({
|
|
2532
2532
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
|
|
2533
2533
|
"use strict";
|
|
2534
|
-
var { stringify:
|
|
2534
|
+
var { stringify: stringify2 } = require_utils2();
|
|
2535
2535
|
var { outputFile: outputFile2 } = require_output();
|
|
2536
2536
|
async function outputJson2(file, data, options = {}) {
|
|
2537
|
-
const str =
|
|
2537
|
+
const str = stringify2(data, options);
|
|
2538
2538
|
await outputFile2(file, str, options);
|
|
2539
2539
|
}
|
|
2540
2540
|
module2.exports = outputJson2;
|
|
@@ -2545,10 +2545,10 @@ var require_output_json = __commonJS2({
|
|
|
2545
2545
|
var require_output_json_sync = __commonJS2({
|
|
2546
2546
|
"../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
|
|
2547
2547
|
"use strict";
|
|
2548
|
-
var { stringify:
|
|
2548
|
+
var { stringify: stringify2 } = require_utils2();
|
|
2549
2549
|
var { outputFileSync } = require_output();
|
|
2550
2550
|
function outputJsonSync(file, data, options) {
|
|
2551
|
-
const str =
|
|
2551
|
+
const str = stringify2(data, options);
|
|
2552
2552
|
outputFileSync(file, str, options);
|
|
2553
2553
|
}
|
|
2554
2554
|
module2.exports = outputJsonSync;
|
|
@@ -35095,7 +35095,7 @@ var init_code = __esm({
|
|
|
35095
35095
|
function isAPIError(v) {
|
|
35096
35096
|
return (0, import_error_utils2.isError)(v) && "status" in v;
|
|
35097
35097
|
}
|
|
35098
|
-
var import_bytes, import_build_utils, import_chalk8, import_error_utils2, APIError, TeamDeleted, InvalidToken, MissingUser, DomainAlreadyExists, DomainPermissionDenied, DomainExternal, SourceNotFound,
|
|
35098
|
+
var import_bytes, import_build_utils, import_chalk8, import_error_utils2, APIError, TeamDeleted, InvalidToken, MissingUser, DomainAlreadyExists, DomainPermissionDenied, DomainExternal, SourceNotFound, DomainNotFound, DomainNotVerified, DomainVerificationFailed, InvalidDomain, NotDomainOwner, InvalidDeploymentId, UnsupportedTLD, TLDNotSupportedViaCLI, DomainNotAvailable, UnexpectedDomainPurchaseError, UnexpectedDomainTransferError, DomainPaymentError, DomainPurchasePending, UserAborted, CertNotFound, CertsPermissionDenied, CertOrderNotFound, TooManyRequests, CertError, CertConfigurationError, DeploymentNotFound, DeploymentNotReady, DeploymentFailedAliasImpossible, DeploymentPermissionDenied, InvalidAlias, AliasInUse, CertMissing, CantParseJSONFile, ConflictingConfigFiles, CantFindConfig, WorkingDirectoryDoesNotExist, NoAliasInConfig, InvalidAliasInConfig, DNSPermissionDenied, DNSInvalidPort, DNSInvalidType, DNSConflictingRecord, DomainRemovalConflict, DomainMoveConflict, InvalidMoveDestination, LambdaSizeExceededError, MissingDotenvVarsError, DeploymentsRateLimited, BuildsRateLimited, ProjectNotFound, AliasDomainConfigured, MissingBuildScript, ConflictingFilePath, ConflictingPathSegment, BuildError, SchemaValidationFailed, InvalidLocalConfig;
|
|
35099
35099
|
var init_errors_ts = __esm({
|
|
35100
35100
|
"src/util/errors-ts.ts"() {
|
|
35101
35101
|
"use strict";
|
|
@@ -35195,24 +35195,6 @@ var init_errors_ts = __esm({
|
|
|
35195
35195
|
});
|
|
35196
35196
|
}
|
|
35197
35197
|
};
|
|
35198
|
-
InvalidTransferAuthCode = class extends NowError {
|
|
35199
|
-
constructor(domain, authCode) {
|
|
35200
|
-
super({
|
|
35201
|
-
code: "INVALID_TRANSFER_AUTH_CODE",
|
|
35202
|
-
meta: { domain, authCode },
|
|
35203
|
-
message: `The provided auth code does not match with the one expected by the current registar`
|
|
35204
|
-
});
|
|
35205
|
-
}
|
|
35206
|
-
};
|
|
35207
|
-
DomainRegistrationFailed = class extends NowError {
|
|
35208
|
-
constructor(domain, message2) {
|
|
35209
|
-
super({
|
|
35210
|
-
code: "DOMAIN_REGISTRATION_FAILED",
|
|
35211
|
-
meta: { domain },
|
|
35212
|
-
message: message2
|
|
35213
|
-
});
|
|
35214
|
-
}
|
|
35215
|
-
};
|
|
35216
35198
|
DomainNotFound = class extends NowError {
|
|
35217
35199
|
constructor(domain, contextName) {
|
|
35218
35200
|
super({
|
|
@@ -35281,39 +35263,39 @@ var init_errors_ts = __esm({
|
|
|
35281
35263
|
});
|
|
35282
35264
|
}
|
|
35283
35265
|
};
|
|
35284
|
-
|
|
35266
|
+
TLDNotSupportedViaCLI = class extends NowError {
|
|
35285
35267
|
constructor(domain) {
|
|
35286
35268
|
super({
|
|
35287
|
-
code: "
|
|
35269
|
+
code: "UNSUPPORTED_TLD_VIA_CLI",
|
|
35288
35270
|
meta: { domain },
|
|
35289
|
-
message: `
|
|
35271
|
+
message: `Purchased for the TLD for domain name ${domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`
|
|
35290
35272
|
});
|
|
35291
35273
|
}
|
|
35292
35274
|
};
|
|
35293
|
-
|
|
35275
|
+
DomainNotAvailable = class extends NowError {
|
|
35294
35276
|
constructor(domain) {
|
|
35295
35277
|
super({
|
|
35296
|
-
code: "
|
|
35278
|
+
code: "DOMAIN_NOT_AVAILABLE",
|
|
35297
35279
|
meta: { domain },
|
|
35298
|
-
message: `The domain
|
|
35280
|
+
message: `The domain ${domain} is not available to be purchased.`
|
|
35299
35281
|
});
|
|
35300
35282
|
}
|
|
35301
35283
|
};
|
|
35302
|
-
|
|
35284
|
+
UnexpectedDomainPurchaseError = class extends NowError {
|
|
35303
35285
|
constructor(domain) {
|
|
35304
35286
|
super({
|
|
35305
|
-
code: "
|
|
35287
|
+
code: "UNEXPECTED_DOMAIN_PURCHASE_ERROR",
|
|
35306
35288
|
meta: { domain },
|
|
35307
|
-
message: `
|
|
35289
|
+
message: `An unexpected error happened while purchasing.`
|
|
35308
35290
|
});
|
|
35309
35291
|
}
|
|
35310
35292
|
};
|
|
35311
|
-
|
|
35293
|
+
UnexpectedDomainTransferError = class extends NowError {
|
|
35312
35294
|
constructor(domain) {
|
|
35313
35295
|
super({
|
|
35314
|
-
code: "
|
|
35296
|
+
code: "UNEXPECTED_DOMAIN_TRANSFER_ERROR",
|
|
35315
35297
|
meta: { domain },
|
|
35316
|
-
message: `An unexpected error happened while
|
|
35298
|
+
message: `An unexpected error happened while transferring.`
|
|
35317
35299
|
});
|
|
35318
35300
|
}
|
|
35319
35301
|
};
|
|
@@ -48405,7 +48387,7 @@ var require_jsonfile3 = __commonJS2({
|
|
|
48405
48387
|
}
|
|
48406
48388
|
}
|
|
48407
48389
|
}
|
|
48408
|
-
function
|
|
48390
|
+
function stringify2(obj, options) {
|
|
48409
48391
|
var spaces;
|
|
48410
48392
|
var EOL = "\n";
|
|
48411
48393
|
if (typeof options === "object" && options !== null) {
|
|
@@ -48428,7 +48410,7 @@ var require_jsonfile3 = __commonJS2({
|
|
|
48428
48410
|
var fs15 = options.fs || _fs;
|
|
48429
48411
|
var str = "";
|
|
48430
48412
|
try {
|
|
48431
|
-
str =
|
|
48413
|
+
str = stringify2(obj, options);
|
|
48432
48414
|
} catch (err) {
|
|
48433
48415
|
if (callback)
|
|
48434
48416
|
callback(err, null);
|
|
@@ -48439,7 +48421,7 @@ var require_jsonfile3 = __commonJS2({
|
|
|
48439
48421
|
function writeFileSync(file, obj, options) {
|
|
48440
48422
|
options = options || {};
|
|
48441
48423
|
var fs15 = options.fs || _fs;
|
|
48442
|
-
var str =
|
|
48424
|
+
var str = stringify2(obj, options);
|
|
48443
48425
|
return fs15.writeFileSync(file, str, options);
|
|
48444
48426
|
}
|
|
48445
48427
|
function stripBom(content) {
|
|
@@ -49568,7 +49550,7 @@ var require_package = __commonJS2({
|
|
|
49568
49550
|
"../client/package.json"(exports2, module2) {
|
|
49569
49551
|
module2.exports = {
|
|
49570
49552
|
name: "@vercel/client",
|
|
49571
|
-
version: "17.0.
|
|
49553
|
+
version: "17.0.4",
|
|
49572
49554
|
main: "dist/index.js",
|
|
49573
49555
|
typings: "dist/index.d.ts",
|
|
49574
49556
|
homepage: "https://vercel.com",
|
|
@@ -49607,7 +49589,7 @@ var require_package = __commonJS2({
|
|
|
49607
49589
|
vitest: "2.0.1"
|
|
49608
49590
|
},
|
|
49609
49591
|
dependencies: {
|
|
49610
|
-
"@vercel/build-utils": "12.1.
|
|
49592
|
+
"@vercel/build-utils": "12.1.3",
|
|
49611
49593
|
"@vercel/error-utils": "2.0.3",
|
|
49612
49594
|
"@vercel/microfrontends": "1.2.2",
|
|
49613
49595
|
"@vercel/routing-utils": "5.2.0",
|
|
@@ -52574,7 +52556,7 @@ var require_stringify = __commonJS2({
|
|
|
52574
52556
|
"use strict";
|
|
52575
52557
|
var utils = require_utils9();
|
|
52576
52558
|
module2.exports = (ast, options = {}) => {
|
|
52577
|
-
const
|
|
52559
|
+
const stringify2 = (node, parent = {}) => {
|
|
52578
52560
|
const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
|
|
52579
52561
|
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
52580
52562
|
let output2 = "";
|
|
@@ -52589,12 +52571,12 @@ var require_stringify = __commonJS2({
|
|
|
52589
52571
|
}
|
|
52590
52572
|
if (node.nodes) {
|
|
52591
52573
|
for (const child of node.nodes) {
|
|
52592
|
-
output2 +=
|
|
52574
|
+
output2 += stringify2(child);
|
|
52593
52575
|
}
|
|
52594
52576
|
}
|
|
52595
52577
|
return output2;
|
|
52596
52578
|
};
|
|
52597
|
-
return
|
|
52579
|
+
return stringify2(ast);
|
|
52598
52580
|
};
|
|
52599
52581
|
}
|
|
52600
52582
|
});
|
|
@@ -52852,7 +52834,7 @@ var require_fill_range = __commonJS2({
|
|
|
52852
52834
|
;
|
|
52853
52835
|
return index > 0;
|
|
52854
52836
|
};
|
|
52855
|
-
var
|
|
52837
|
+
var stringify2 = (start, end, options) => {
|
|
52856
52838
|
if (typeof start === "string" || typeof end === "string") {
|
|
52857
52839
|
return true;
|
|
52858
52840
|
}
|
|
@@ -52954,7 +52936,7 @@ var require_fill_range = __commonJS2({
|
|
|
52954
52936
|
step = Math.max(Math.abs(step), 1);
|
|
52955
52937
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
52956
52938
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
52957
|
-
let toNumber = padded === false &&
|
|
52939
|
+
let toNumber = padded === false && stringify2(start, end, options) === false;
|
|
52958
52940
|
let format7 = options.transform || transform(toNumber);
|
|
52959
52941
|
if (options.toRegex && step === 1) {
|
|
52960
52942
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
@@ -53090,7 +53072,7 @@ var require_expand = __commonJS2({
|
|
|
53090
53072
|
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js"(exports2, module2) {
|
|
53091
53073
|
"use strict";
|
|
53092
53074
|
var fill = require_fill_range();
|
|
53093
|
-
var
|
|
53075
|
+
var stringify2 = require_stringify();
|
|
53094
53076
|
var utils = require_utils9();
|
|
53095
53077
|
var append = (queue = "", stash = "", enclose = false) => {
|
|
53096
53078
|
const result = [];
|
|
@@ -53127,7 +53109,7 @@ var require_expand = __commonJS2({
|
|
|
53127
53109
|
q = p.queue;
|
|
53128
53110
|
}
|
|
53129
53111
|
if (node.invalid || node.dollar) {
|
|
53130
|
-
q.push(append(q.pop(),
|
|
53112
|
+
q.push(append(q.pop(), stringify2(node, options)));
|
|
53131
53113
|
return;
|
|
53132
53114
|
}
|
|
53133
53115
|
if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) {
|
|
@@ -53141,7 +53123,7 @@ var require_expand = __commonJS2({
|
|
|
53141
53123
|
}
|
|
53142
53124
|
let range = fill(...args2, options);
|
|
53143
53125
|
if (range.length === 0) {
|
|
53144
|
-
range =
|
|
53126
|
+
range = stringify2(node, options);
|
|
53145
53127
|
}
|
|
53146
53128
|
q.push(append(q.pop(), range));
|
|
53147
53129
|
node.nodes = [];
|
|
@@ -53287,7 +53269,7 @@ var require_constants3 = __commonJS2({
|
|
|
53287
53269
|
var require_parse2 = __commonJS2({
|
|
53288
53270
|
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js"(exports2, module2) {
|
|
53289
53271
|
"use strict";
|
|
53290
|
-
var
|
|
53272
|
+
var stringify2 = require_stringify();
|
|
53291
53273
|
var {
|
|
53292
53274
|
MAX_LENGTH,
|
|
53293
53275
|
CHAR_BACKSLASH,
|
|
@@ -53460,7 +53442,7 @@ var require_parse2 = __commonJS2({
|
|
|
53460
53442
|
if (block.ranges > 0) {
|
|
53461
53443
|
block.ranges = 0;
|
|
53462
53444
|
const open7 = block.nodes.shift();
|
|
53463
|
-
block.nodes = [open7, { type: "text", value:
|
|
53445
|
+
block.nodes = [open7, { type: "text", value: stringify2(block) }];
|
|
53464
53446
|
}
|
|
53465
53447
|
push({ type: "comma", value });
|
|
53466
53448
|
block.commas++;
|
|
@@ -53529,7 +53511,7 @@ var require_parse2 = __commonJS2({
|
|
|
53529
53511
|
var require_braces = __commonJS2({
|
|
53530
53512
|
"../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js"(exports2, module2) {
|
|
53531
53513
|
"use strict";
|
|
53532
|
-
var
|
|
53514
|
+
var stringify2 = require_stringify();
|
|
53533
53515
|
var compile = require_compile();
|
|
53534
53516
|
var expand = require_expand();
|
|
53535
53517
|
var parse11 = require_parse2();
|
|
@@ -53555,9 +53537,9 @@ var require_braces = __commonJS2({
|
|
|
53555
53537
|
braces.parse = (input, options = {}) => parse11(input, options);
|
|
53556
53538
|
braces.stringify = (input, options = {}) => {
|
|
53557
53539
|
if (typeof input === "string") {
|
|
53558
|
-
return
|
|
53540
|
+
return stringify2(braces.parse(input, options), options);
|
|
53559
53541
|
}
|
|
53560
|
-
return
|
|
53542
|
+
return stringify2(input, options);
|
|
53561
53543
|
};
|
|
53562
53544
|
braces.compile = (input, options = {}) => {
|
|
53563
53545
|
if (typeof input === "string") {
|
|
@@ -66114,8 +66096,540 @@ var require_proxy_from_env = __commonJS2({
|
|
|
66114
66096
|
}
|
|
66115
66097
|
});
|
|
66116
66098
|
|
|
66117
|
-
// ../../node_modules/.pnpm/
|
|
66099
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
|
|
66118
66100
|
var require_common6 = __commonJS2({
|
|
66101
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) {
|
|
66102
|
+
function setup(env) {
|
|
66103
|
+
createDebug.debug = createDebug;
|
|
66104
|
+
createDebug.default = createDebug;
|
|
66105
|
+
createDebug.coerce = coerce;
|
|
66106
|
+
createDebug.disable = disable3;
|
|
66107
|
+
createDebug.enable = enable3;
|
|
66108
|
+
createDebug.enabled = enabled;
|
|
66109
|
+
createDebug.humanize = require_ms2();
|
|
66110
|
+
createDebug.destroy = destroy;
|
|
66111
|
+
Object.keys(env).forEach((key) => {
|
|
66112
|
+
createDebug[key] = env[key];
|
|
66113
|
+
});
|
|
66114
|
+
createDebug.names = [];
|
|
66115
|
+
createDebug.skips = [];
|
|
66116
|
+
createDebug.formatters = {};
|
|
66117
|
+
function selectColor(namespace) {
|
|
66118
|
+
let hash = 0;
|
|
66119
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
66120
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
66121
|
+
hash |= 0;
|
|
66122
|
+
}
|
|
66123
|
+
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
66124
|
+
}
|
|
66125
|
+
createDebug.selectColor = selectColor;
|
|
66126
|
+
function createDebug(namespace) {
|
|
66127
|
+
let prevTime;
|
|
66128
|
+
let enableOverride = null;
|
|
66129
|
+
let namespacesCache;
|
|
66130
|
+
let enabledCache;
|
|
66131
|
+
function debug2(...args2) {
|
|
66132
|
+
if (!debug2.enabled) {
|
|
66133
|
+
return;
|
|
66134
|
+
}
|
|
66135
|
+
const self2 = debug2;
|
|
66136
|
+
const curr = Number(/* @__PURE__ */ new Date());
|
|
66137
|
+
const ms32 = curr - (prevTime || curr);
|
|
66138
|
+
self2.diff = ms32;
|
|
66139
|
+
self2.prev = prevTime;
|
|
66140
|
+
self2.curr = curr;
|
|
66141
|
+
prevTime = curr;
|
|
66142
|
+
args2[0] = createDebug.coerce(args2[0]);
|
|
66143
|
+
if (typeof args2[0] !== "string") {
|
|
66144
|
+
args2.unshift("%O");
|
|
66145
|
+
}
|
|
66146
|
+
let index = 0;
|
|
66147
|
+
args2[0] = args2[0].replace(/%([a-zA-Z%])/g, (match, format7) => {
|
|
66148
|
+
if (match === "%%") {
|
|
66149
|
+
return "%";
|
|
66150
|
+
}
|
|
66151
|
+
index++;
|
|
66152
|
+
const formatter = createDebug.formatters[format7];
|
|
66153
|
+
if (typeof formatter === "function") {
|
|
66154
|
+
const val = args2[index];
|
|
66155
|
+
match = formatter.call(self2, val);
|
|
66156
|
+
args2.splice(index, 1);
|
|
66157
|
+
index--;
|
|
66158
|
+
}
|
|
66159
|
+
return match;
|
|
66160
|
+
});
|
|
66161
|
+
createDebug.formatArgs.call(self2, args2);
|
|
66162
|
+
const logFn = self2.log || createDebug.log;
|
|
66163
|
+
logFn.apply(self2, args2);
|
|
66164
|
+
}
|
|
66165
|
+
debug2.namespace = namespace;
|
|
66166
|
+
debug2.useColors = createDebug.useColors();
|
|
66167
|
+
debug2.color = createDebug.selectColor(namespace);
|
|
66168
|
+
debug2.extend = extend;
|
|
66169
|
+
debug2.destroy = createDebug.destroy;
|
|
66170
|
+
Object.defineProperty(debug2, "enabled", {
|
|
66171
|
+
enumerable: true,
|
|
66172
|
+
configurable: false,
|
|
66173
|
+
get: () => {
|
|
66174
|
+
if (enableOverride !== null) {
|
|
66175
|
+
return enableOverride;
|
|
66176
|
+
}
|
|
66177
|
+
if (namespacesCache !== createDebug.namespaces) {
|
|
66178
|
+
namespacesCache = createDebug.namespaces;
|
|
66179
|
+
enabledCache = createDebug.enabled(namespace);
|
|
66180
|
+
}
|
|
66181
|
+
return enabledCache;
|
|
66182
|
+
},
|
|
66183
|
+
set: (v) => {
|
|
66184
|
+
enableOverride = v;
|
|
66185
|
+
}
|
|
66186
|
+
});
|
|
66187
|
+
if (typeof createDebug.init === "function") {
|
|
66188
|
+
createDebug.init(debug2);
|
|
66189
|
+
}
|
|
66190
|
+
return debug2;
|
|
66191
|
+
}
|
|
66192
|
+
function extend(namespace, delimiter3) {
|
|
66193
|
+
const newDebug = createDebug(this.namespace + (typeof delimiter3 === "undefined" ? ":" : delimiter3) + namespace);
|
|
66194
|
+
newDebug.log = this.log;
|
|
66195
|
+
return newDebug;
|
|
66196
|
+
}
|
|
66197
|
+
function enable3(namespaces) {
|
|
66198
|
+
createDebug.save(namespaces);
|
|
66199
|
+
createDebug.namespaces = namespaces;
|
|
66200
|
+
createDebug.names = [];
|
|
66201
|
+
createDebug.skips = [];
|
|
66202
|
+
const split3 = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
66203
|
+
for (const ns of split3) {
|
|
66204
|
+
if (ns[0] === "-") {
|
|
66205
|
+
createDebug.skips.push(ns.slice(1));
|
|
66206
|
+
} else {
|
|
66207
|
+
createDebug.names.push(ns);
|
|
66208
|
+
}
|
|
66209
|
+
}
|
|
66210
|
+
}
|
|
66211
|
+
function matchesTemplate(search, template) {
|
|
66212
|
+
let searchIndex = 0;
|
|
66213
|
+
let templateIndex = 0;
|
|
66214
|
+
let starIndex = -1;
|
|
66215
|
+
let matchIndex = 0;
|
|
66216
|
+
while (searchIndex < search.length) {
|
|
66217
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
66218
|
+
if (template[templateIndex] === "*") {
|
|
66219
|
+
starIndex = templateIndex;
|
|
66220
|
+
matchIndex = searchIndex;
|
|
66221
|
+
templateIndex++;
|
|
66222
|
+
} else {
|
|
66223
|
+
searchIndex++;
|
|
66224
|
+
templateIndex++;
|
|
66225
|
+
}
|
|
66226
|
+
} else if (starIndex !== -1) {
|
|
66227
|
+
templateIndex = starIndex + 1;
|
|
66228
|
+
matchIndex++;
|
|
66229
|
+
searchIndex = matchIndex;
|
|
66230
|
+
} else {
|
|
66231
|
+
return false;
|
|
66232
|
+
}
|
|
66233
|
+
}
|
|
66234
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
|
66235
|
+
templateIndex++;
|
|
66236
|
+
}
|
|
66237
|
+
return templateIndex === template.length;
|
|
66238
|
+
}
|
|
66239
|
+
function disable3() {
|
|
66240
|
+
const namespaces = [
|
|
66241
|
+
...createDebug.names,
|
|
66242
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
|
66243
|
+
].join(",");
|
|
66244
|
+
createDebug.enable("");
|
|
66245
|
+
return namespaces;
|
|
66246
|
+
}
|
|
66247
|
+
function enabled(name) {
|
|
66248
|
+
for (const skip of createDebug.skips) {
|
|
66249
|
+
if (matchesTemplate(name, skip)) {
|
|
66250
|
+
return false;
|
|
66251
|
+
}
|
|
66252
|
+
}
|
|
66253
|
+
for (const ns of createDebug.names) {
|
|
66254
|
+
if (matchesTemplate(name, ns)) {
|
|
66255
|
+
return true;
|
|
66256
|
+
}
|
|
66257
|
+
}
|
|
66258
|
+
return false;
|
|
66259
|
+
}
|
|
66260
|
+
function coerce(val) {
|
|
66261
|
+
if (val instanceof Error) {
|
|
66262
|
+
return val.stack || val.message;
|
|
66263
|
+
}
|
|
66264
|
+
return val;
|
|
66265
|
+
}
|
|
66266
|
+
function destroy() {
|
|
66267
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
66268
|
+
}
|
|
66269
|
+
createDebug.enable(createDebug.load());
|
|
66270
|
+
return createDebug;
|
|
66271
|
+
}
|
|
66272
|
+
module2.exports = setup;
|
|
66273
|
+
}
|
|
66274
|
+
});
|
|
66275
|
+
|
|
66276
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
|
|
66277
|
+
var require_browser3 = __commonJS2({
|
|
66278
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
66279
|
+
exports2.formatArgs = formatArgs;
|
|
66280
|
+
exports2.save = save;
|
|
66281
|
+
exports2.load = load3;
|
|
66282
|
+
exports2.useColors = useColors;
|
|
66283
|
+
exports2.storage = localstorage();
|
|
66284
|
+
exports2.destroy = (() => {
|
|
66285
|
+
let warned = false;
|
|
66286
|
+
return () => {
|
|
66287
|
+
if (!warned) {
|
|
66288
|
+
warned = true;
|
|
66289
|
+
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
66290
|
+
}
|
|
66291
|
+
};
|
|
66292
|
+
})();
|
|
66293
|
+
exports2.colors = [
|
|
66294
|
+
"#0000CC",
|
|
66295
|
+
"#0000FF",
|
|
66296
|
+
"#0033CC",
|
|
66297
|
+
"#0033FF",
|
|
66298
|
+
"#0066CC",
|
|
66299
|
+
"#0066FF",
|
|
66300
|
+
"#0099CC",
|
|
66301
|
+
"#0099FF",
|
|
66302
|
+
"#00CC00",
|
|
66303
|
+
"#00CC33",
|
|
66304
|
+
"#00CC66",
|
|
66305
|
+
"#00CC99",
|
|
66306
|
+
"#00CCCC",
|
|
66307
|
+
"#00CCFF",
|
|
66308
|
+
"#3300CC",
|
|
66309
|
+
"#3300FF",
|
|
66310
|
+
"#3333CC",
|
|
66311
|
+
"#3333FF",
|
|
66312
|
+
"#3366CC",
|
|
66313
|
+
"#3366FF",
|
|
66314
|
+
"#3399CC",
|
|
66315
|
+
"#3399FF",
|
|
66316
|
+
"#33CC00",
|
|
66317
|
+
"#33CC33",
|
|
66318
|
+
"#33CC66",
|
|
66319
|
+
"#33CC99",
|
|
66320
|
+
"#33CCCC",
|
|
66321
|
+
"#33CCFF",
|
|
66322
|
+
"#6600CC",
|
|
66323
|
+
"#6600FF",
|
|
66324
|
+
"#6633CC",
|
|
66325
|
+
"#6633FF",
|
|
66326
|
+
"#66CC00",
|
|
66327
|
+
"#66CC33",
|
|
66328
|
+
"#9900CC",
|
|
66329
|
+
"#9900FF",
|
|
66330
|
+
"#9933CC",
|
|
66331
|
+
"#9933FF",
|
|
66332
|
+
"#99CC00",
|
|
66333
|
+
"#99CC33",
|
|
66334
|
+
"#CC0000",
|
|
66335
|
+
"#CC0033",
|
|
66336
|
+
"#CC0066",
|
|
66337
|
+
"#CC0099",
|
|
66338
|
+
"#CC00CC",
|
|
66339
|
+
"#CC00FF",
|
|
66340
|
+
"#CC3300",
|
|
66341
|
+
"#CC3333",
|
|
66342
|
+
"#CC3366",
|
|
66343
|
+
"#CC3399",
|
|
66344
|
+
"#CC33CC",
|
|
66345
|
+
"#CC33FF",
|
|
66346
|
+
"#CC6600",
|
|
66347
|
+
"#CC6633",
|
|
66348
|
+
"#CC9900",
|
|
66349
|
+
"#CC9933",
|
|
66350
|
+
"#CCCC00",
|
|
66351
|
+
"#CCCC33",
|
|
66352
|
+
"#FF0000",
|
|
66353
|
+
"#FF0033",
|
|
66354
|
+
"#FF0066",
|
|
66355
|
+
"#FF0099",
|
|
66356
|
+
"#FF00CC",
|
|
66357
|
+
"#FF00FF",
|
|
66358
|
+
"#FF3300",
|
|
66359
|
+
"#FF3333",
|
|
66360
|
+
"#FF3366",
|
|
66361
|
+
"#FF3399",
|
|
66362
|
+
"#FF33CC",
|
|
66363
|
+
"#FF33FF",
|
|
66364
|
+
"#FF6600",
|
|
66365
|
+
"#FF6633",
|
|
66366
|
+
"#FF9900",
|
|
66367
|
+
"#FF9933",
|
|
66368
|
+
"#FFCC00",
|
|
66369
|
+
"#FFCC33"
|
|
66370
|
+
];
|
|
66371
|
+
function useColors() {
|
|
66372
|
+
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
|
66373
|
+
return true;
|
|
66374
|
+
}
|
|
66375
|
+
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
66376
|
+
return false;
|
|
66377
|
+
}
|
|
66378
|
+
let m;
|
|
66379
|
+
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
66380
|
+
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
66381
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
66382
|
+
typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
66383
|
+
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
66384
|
+
}
|
|
66385
|
+
function formatArgs(args2) {
|
|
66386
|
+
args2[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args2[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
|
66387
|
+
if (!this.useColors) {
|
|
66388
|
+
return;
|
|
66389
|
+
}
|
|
66390
|
+
const c = "color: " + this.color;
|
|
66391
|
+
args2.splice(1, 0, c, "color: inherit");
|
|
66392
|
+
let index = 0;
|
|
66393
|
+
let lastC = 0;
|
|
66394
|
+
args2[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
66395
|
+
if (match === "%%") {
|
|
66396
|
+
return;
|
|
66397
|
+
}
|
|
66398
|
+
index++;
|
|
66399
|
+
if (match === "%c") {
|
|
66400
|
+
lastC = index;
|
|
66401
|
+
}
|
|
66402
|
+
});
|
|
66403
|
+
args2.splice(lastC, 0, c);
|
|
66404
|
+
}
|
|
66405
|
+
exports2.log = console.debug || console.log || (() => {
|
|
66406
|
+
});
|
|
66407
|
+
function save(namespaces) {
|
|
66408
|
+
try {
|
|
66409
|
+
if (namespaces) {
|
|
66410
|
+
exports2.storage.setItem("debug", namespaces);
|
|
66411
|
+
} else {
|
|
66412
|
+
exports2.storage.removeItem("debug");
|
|
66413
|
+
}
|
|
66414
|
+
} catch (error3) {
|
|
66415
|
+
}
|
|
66416
|
+
}
|
|
66417
|
+
function load3() {
|
|
66418
|
+
let r;
|
|
66419
|
+
try {
|
|
66420
|
+
r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
|
66421
|
+
} catch (error3) {
|
|
66422
|
+
}
|
|
66423
|
+
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
66424
|
+
r = process.env.DEBUG;
|
|
66425
|
+
}
|
|
66426
|
+
return r;
|
|
66427
|
+
}
|
|
66428
|
+
function localstorage() {
|
|
66429
|
+
try {
|
|
66430
|
+
return localStorage;
|
|
66431
|
+
} catch (error3) {
|
|
66432
|
+
}
|
|
66433
|
+
}
|
|
66434
|
+
module2.exports = require_common6()(exports2);
|
|
66435
|
+
var { formatters } = module2.exports;
|
|
66436
|
+
formatters.j = function(v) {
|
|
66437
|
+
try {
|
|
66438
|
+
return JSON.stringify(v);
|
|
66439
|
+
} catch (error3) {
|
|
66440
|
+
return "[UnexpectedJSONParseError]: " + error3.message;
|
|
66441
|
+
}
|
|
66442
|
+
};
|
|
66443
|
+
}
|
|
66444
|
+
});
|
|
66445
|
+
|
|
66446
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
|
|
66447
|
+
var require_node4 = __commonJS2({
|
|
66448
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports2, module2) {
|
|
66449
|
+
var tty = require("tty");
|
|
66450
|
+
var util = require("util");
|
|
66451
|
+
exports2.init = init3;
|
|
66452
|
+
exports2.log = log2;
|
|
66453
|
+
exports2.formatArgs = formatArgs;
|
|
66454
|
+
exports2.save = save;
|
|
66455
|
+
exports2.load = load3;
|
|
66456
|
+
exports2.useColors = useColors;
|
|
66457
|
+
exports2.destroy = util.deprecate(
|
|
66458
|
+
() => {
|
|
66459
|
+
},
|
|
66460
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
66461
|
+
);
|
|
66462
|
+
exports2.colors = [6, 2, 3, 4, 5, 1];
|
|
66463
|
+
try {
|
|
66464
|
+
const supportsColor = require_supports_color();
|
|
66465
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
66466
|
+
exports2.colors = [
|
|
66467
|
+
20,
|
|
66468
|
+
21,
|
|
66469
|
+
26,
|
|
66470
|
+
27,
|
|
66471
|
+
32,
|
|
66472
|
+
33,
|
|
66473
|
+
38,
|
|
66474
|
+
39,
|
|
66475
|
+
40,
|
|
66476
|
+
41,
|
|
66477
|
+
42,
|
|
66478
|
+
43,
|
|
66479
|
+
44,
|
|
66480
|
+
45,
|
|
66481
|
+
56,
|
|
66482
|
+
57,
|
|
66483
|
+
62,
|
|
66484
|
+
63,
|
|
66485
|
+
68,
|
|
66486
|
+
69,
|
|
66487
|
+
74,
|
|
66488
|
+
75,
|
|
66489
|
+
76,
|
|
66490
|
+
77,
|
|
66491
|
+
78,
|
|
66492
|
+
79,
|
|
66493
|
+
80,
|
|
66494
|
+
81,
|
|
66495
|
+
92,
|
|
66496
|
+
93,
|
|
66497
|
+
98,
|
|
66498
|
+
99,
|
|
66499
|
+
112,
|
|
66500
|
+
113,
|
|
66501
|
+
128,
|
|
66502
|
+
129,
|
|
66503
|
+
134,
|
|
66504
|
+
135,
|
|
66505
|
+
148,
|
|
66506
|
+
149,
|
|
66507
|
+
160,
|
|
66508
|
+
161,
|
|
66509
|
+
162,
|
|
66510
|
+
163,
|
|
66511
|
+
164,
|
|
66512
|
+
165,
|
|
66513
|
+
166,
|
|
66514
|
+
167,
|
|
66515
|
+
168,
|
|
66516
|
+
169,
|
|
66517
|
+
170,
|
|
66518
|
+
171,
|
|
66519
|
+
172,
|
|
66520
|
+
173,
|
|
66521
|
+
178,
|
|
66522
|
+
179,
|
|
66523
|
+
184,
|
|
66524
|
+
185,
|
|
66525
|
+
196,
|
|
66526
|
+
197,
|
|
66527
|
+
198,
|
|
66528
|
+
199,
|
|
66529
|
+
200,
|
|
66530
|
+
201,
|
|
66531
|
+
202,
|
|
66532
|
+
203,
|
|
66533
|
+
204,
|
|
66534
|
+
205,
|
|
66535
|
+
206,
|
|
66536
|
+
207,
|
|
66537
|
+
208,
|
|
66538
|
+
209,
|
|
66539
|
+
214,
|
|
66540
|
+
215,
|
|
66541
|
+
220,
|
|
66542
|
+
221
|
|
66543
|
+
];
|
|
66544
|
+
}
|
|
66545
|
+
} catch (error3) {
|
|
66546
|
+
}
|
|
66547
|
+
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
66548
|
+
return /^debug_/i.test(key);
|
|
66549
|
+
}).reduce((obj, key) => {
|
|
66550
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
66551
|
+
return k.toUpperCase();
|
|
66552
|
+
});
|
|
66553
|
+
let val = process.env[key];
|
|
66554
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
66555
|
+
val = true;
|
|
66556
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
66557
|
+
val = false;
|
|
66558
|
+
} else if (val === "null") {
|
|
66559
|
+
val = null;
|
|
66560
|
+
} else {
|
|
66561
|
+
val = Number(val);
|
|
66562
|
+
}
|
|
66563
|
+
obj[prop] = val;
|
|
66564
|
+
return obj;
|
|
66565
|
+
}, {});
|
|
66566
|
+
function useColors() {
|
|
66567
|
+
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
66568
|
+
}
|
|
66569
|
+
function formatArgs(args2) {
|
|
66570
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
66571
|
+
if (useColors2) {
|
|
66572
|
+
const c = this.color;
|
|
66573
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
66574
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
66575
|
+
args2[0] = prefix + args2[0].split("\n").join("\n" + prefix);
|
|
66576
|
+
args2.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
66577
|
+
} else {
|
|
66578
|
+
args2[0] = getDate() + name + " " + args2[0];
|
|
66579
|
+
}
|
|
66580
|
+
}
|
|
66581
|
+
function getDate() {
|
|
66582
|
+
if (exports2.inspectOpts.hideDate) {
|
|
66583
|
+
return "";
|
|
66584
|
+
}
|
|
66585
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
66586
|
+
}
|
|
66587
|
+
function log2(...args2) {
|
|
66588
|
+
return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args2) + "\n");
|
|
66589
|
+
}
|
|
66590
|
+
function save(namespaces) {
|
|
66591
|
+
if (namespaces) {
|
|
66592
|
+
process.env.DEBUG = namespaces;
|
|
66593
|
+
} else {
|
|
66594
|
+
delete process.env.DEBUG;
|
|
66595
|
+
}
|
|
66596
|
+
}
|
|
66597
|
+
function load3() {
|
|
66598
|
+
return process.env.DEBUG;
|
|
66599
|
+
}
|
|
66600
|
+
function init3(debug2) {
|
|
66601
|
+
debug2.inspectOpts = {};
|
|
66602
|
+
const keys = Object.keys(exports2.inspectOpts);
|
|
66603
|
+
for (let i = 0; i < keys.length; i++) {
|
|
66604
|
+
debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
|
|
66605
|
+
}
|
|
66606
|
+
}
|
|
66607
|
+
module2.exports = require_common6()(exports2);
|
|
66608
|
+
var { formatters } = module2.exports;
|
|
66609
|
+
formatters.o = function(v) {
|
|
66610
|
+
this.inspectOpts.colors = this.useColors;
|
|
66611
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
66612
|
+
};
|
|
66613
|
+
formatters.O = function(v) {
|
|
66614
|
+
this.inspectOpts.colors = this.useColors;
|
|
66615
|
+
return util.inspect(v, this.inspectOpts);
|
|
66616
|
+
};
|
|
66617
|
+
}
|
|
66618
|
+
});
|
|
66619
|
+
|
|
66620
|
+
// ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
|
|
66621
|
+
var require_src2 = __commonJS2({
|
|
66622
|
+
"../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) {
|
|
66623
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
66624
|
+
module2.exports = require_browser3();
|
|
66625
|
+
} else {
|
|
66626
|
+
module2.exports = require_node4();
|
|
66627
|
+
}
|
|
66628
|
+
}
|
|
66629
|
+
});
|
|
66630
|
+
|
|
66631
|
+
// ../../node_modules/.pnpm/data-uri-to-buffer@6.0.2/node_modules/data-uri-to-buffer/dist/common.js
|
|
66632
|
+
var require_common7 = __commonJS2({
|
|
66119
66633
|
"../../node_modules/.pnpm/data-uri-to-buffer@6.0.2/node_modules/data-uri-to-buffer/dist/common.js"(exports2) {
|
|
66120
66634
|
"use strict";
|
|
66121
66635
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -66163,12 +66677,12 @@ var require_common6 = __commonJS2({
|
|
|
66163
66677
|
});
|
|
66164
66678
|
|
|
66165
66679
|
// ../../node_modules/.pnpm/data-uri-to-buffer@6.0.2/node_modules/data-uri-to-buffer/dist/node.js
|
|
66166
|
-
var
|
|
66680
|
+
var require_node5 = __commonJS2({
|
|
66167
66681
|
"../../node_modules/.pnpm/data-uri-to-buffer@6.0.2/node_modules/data-uri-to-buffer/dist/node.js"(exports2) {
|
|
66168
66682
|
"use strict";
|
|
66169
66683
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
66170
66684
|
exports2.dataUriToBuffer = void 0;
|
|
66171
|
-
var common_1 =
|
|
66685
|
+
var common_1 = require_common7();
|
|
66172
66686
|
function nodeBuffertoArrayBuffer(nodeBuf) {
|
|
66173
66687
|
if (nodeBuf.byteLength === nodeBuf.buffer.byteLength) {
|
|
66174
66688
|
return nodeBuf.buffer;
|
|
@@ -66212,10 +66726,10 @@ var require_data = __commonJS2({
|
|
|
66212
66726
|
};
|
|
66213
66727
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
66214
66728
|
exports2.data = void 0;
|
|
66215
|
-
var debug_1 = __importDefault2(
|
|
66729
|
+
var debug_1 = __importDefault2(require_src2());
|
|
66216
66730
|
var stream_1 = require("stream");
|
|
66217
66731
|
var crypto_1 = require("crypto");
|
|
66218
|
-
var data_uri_to_buffer_1 =
|
|
66732
|
+
var data_uri_to_buffer_1 = require_node5();
|
|
66219
66733
|
var notmodified_1 = __importDefault2(require_notmodified());
|
|
66220
66734
|
var debug2 = (0, debug_1.default)("get-uri:data");
|
|
66221
66735
|
var DataReadable = class extends stream_1.Readable {
|
|
@@ -66268,7 +66782,7 @@ var require_file3 = __commonJS2({
|
|
|
66268
66782
|
};
|
|
66269
66783
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
66270
66784
|
exports2.file = void 0;
|
|
66271
|
-
var debug_1 = __importDefault2(
|
|
66785
|
+
var debug_1 = __importDefault2(require_src2());
|
|
66272
66786
|
var fs_1 = require("fs");
|
|
66273
66787
|
var notfound_1 = __importDefault2(require_notfound());
|
|
66274
66788
|
var notmodified_1 = __importDefault2(require_notmodified());
|
|
@@ -68279,7 +68793,7 @@ var require_ftp = __commonJS2({
|
|
|
68279
68793
|
var basic_ftp_1 = require_dist9();
|
|
68280
68794
|
var stream_1 = require("stream");
|
|
68281
68795
|
var path_1 = require("path");
|
|
68282
|
-
var debug_1 = __importDefault2(
|
|
68796
|
+
var debug_1 = __importDefault2(require_src2());
|
|
68283
68797
|
var notfound_1 = __importDefault2(require_notfound());
|
|
68284
68798
|
var notmodified_1 = __importDefault2(require_notmodified());
|
|
68285
68799
|
var debug2 = (0, debug_1.default)("get-uri:ftp");
|
|
@@ -68377,7 +68891,7 @@ var require_http4 = __commonJS2({
|
|
|
68377
68891
|
var http_1 = __importDefault2(require("http"));
|
|
68378
68892
|
var https_1 = __importDefault2(require("https"));
|
|
68379
68893
|
var events_1 = require("events");
|
|
68380
|
-
var debug_1 = __importDefault2(
|
|
68894
|
+
var debug_1 = __importDefault2(require_src2());
|
|
68381
68895
|
var http_error_1 = __importDefault2(require_http_error());
|
|
68382
68896
|
var notfound_1 = __importDefault2(require_notfound());
|
|
68383
68897
|
var notmodified_1 = __importDefault2(require_notmodified());
|
|
@@ -68545,7 +69059,7 @@ var require_dist10 = __commonJS2({
|
|
|
68545
69059
|
};
|
|
68546
69060
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
68547
69061
|
exports2.getUri = exports2.isValidProtocol = exports2.protocols = void 0;
|
|
68548
|
-
var debug_1 = __importDefault2(
|
|
69062
|
+
var debug_1 = __importDefault2(require_src2());
|
|
68549
69063
|
var data_1 = require_data();
|
|
68550
69064
|
var file_1 = require_file3();
|
|
68551
69065
|
var ftp_1 = require_ftp();
|
|
@@ -88574,7 +89088,7 @@ var require_util6 = __commonJS2({
|
|
|
88574
89088
|
});
|
|
88575
89089
|
|
|
88576
89090
|
// ../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/common.js
|
|
88577
|
-
var
|
|
89091
|
+
var require_common8 = __commonJS2({
|
|
88578
89092
|
"../../node_modules/.pnpm/ip-address@9.0.5/node_modules/ip-address/dist/common.js"(exports2) {
|
|
88579
89093
|
"use strict";
|
|
88580
89094
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -90303,7 +90817,7 @@ var require_ipv4 = __commonJS2({
|
|
|
90303
90817
|
};
|
|
90304
90818
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
90305
90819
|
exports2.Address4 = void 0;
|
|
90306
|
-
var common2 = __importStar2(
|
|
90820
|
+
var common2 = __importStar2(require_common8());
|
|
90307
90821
|
var constants = __importStar2(require_constants7());
|
|
90308
90822
|
var address_error_1 = require_address_error();
|
|
90309
90823
|
var jsbn_1 = require_jsbn();
|
|
@@ -90811,7 +91325,7 @@ var require_ipv6 = __commonJS2({
|
|
|
90811
91325
|
};
|
|
90812
91326
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
90813
91327
|
exports2.Address6 = void 0;
|
|
90814
|
-
var common2 = __importStar2(
|
|
91328
|
+
var common2 = __importStar2(require_common8());
|
|
90815
91329
|
var constants4 = __importStar2(require_constants7());
|
|
90816
91330
|
var constants6 = __importStar2(require_constants8());
|
|
90817
91331
|
var helpers = __importStar2(require_helpers2());
|
|
@@ -92649,7 +93163,7 @@ var require_dist14 = __commonJS2({
|
|
|
92649
93163
|
exports2.SocksProxyAgent = void 0;
|
|
92650
93164
|
var socks_1 = require_build();
|
|
92651
93165
|
var agent_base_1 = require_dist8();
|
|
92652
|
-
var debug_1 = __importDefault2(
|
|
93166
|
+
var debug_1 = __importDefault2(require_src2());
|
|
92653
93167
|
var dns2 = __importStar2(require("dns"));
|
|
92654
93168
|
var net = __importStar2(require("net"));
|
|
92655
93169
|
var tls = __importStar2(require("tls"));
|
|
@@ -92811,7 +93325,7 @@ var require_parse_proxy_response2 = __commonJS2({
|
|
|
92811
93325
|
};
|
|
92812
93326
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
92813
93327
|
exports2.parseProxyResponse = void 0;
|
|
92814
|
-
var debug_1 = __importDefault2(
|
|
93328
|
+
var debug_1 = __importDefault2(require_src2());
|
|
92815
93329
|
var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
92816
93330
|
function parseProxyResponse(socket) {
|
|
92817
93331
|
return new Promise((resolve13, reject) => {
|
|
@@ -92942,7 +93456,7 @@ var require_dist15 = __commonJS2({
|
|
|
92942
93456
|
var net = __importStar2(require("net"));
|
|
92943
93457
|
var tls = __importStar2(require("tls"));
|
|
92944
93458
|
var assert_1 = __importDefault2(require("assert"));
|
|
92945
|
-
var debug_1 = __importDefault2(
|
|
93459
|
+
var debug_1 = __importDefault2(require_src2());
|
|
92946
93460
|
var agent_base_1 = require_dist8();
|
|
92947
93461
|
var url_1 = require("url");
|
|
92948
93462
|
var parse_proxy_response_1 = require_parse_proxy_response2();
|
|
@@ -93096,7 +93610,7 @@ var require_dist16 = __commonJS2({
|
|
|
93096
93610
|
exports2.HttpProxyAgent = void 0;
|
|
93097
93611
|
var net = __importStar2(require("net"));
|
|
93098
93612
|
var tls = __importStar2(require("tls"));
|
|
93099
|
-
var debug_1 = __importDefault2(
|
|
93613
|
+
var debug_1 = __importDefault2(require_src2());
|
|
93100
93614
|
var events_1 = require("events");
|
|
93101
93615
|
var agent_base_1 = require_dist8();
|
|
93102
93616
|
var url_1 = require("url");
|
|
@@ -93233,7 +93747,7 @@ var require_dist17 = __commonJS2({
|
|
|
93233
93747
|
var tls = __importStar2(require("tls"));
|
|
93234
93748
|
var crypto = __importStar2(require("crypto"));
|
|
93235
93749
|
var events_1 = require("events");
|
|
93236
|
-
var debug_1 = __importDefault2(
|
|
93750
|
+
var debug_1 = __importDefault2(require_src2());
|
|
93237
93751
|
var url_1 = require("url");
|
|
93238
93752
|
var agent_base_1 = require_dist8();
|
|
93239
93753
|
var get_uri_1 = require_dist10();
|
|
@@ -98642,13 +99156,12 @@ var require_pluralize = __commonJS2({
|
|
|
98642
99156
|
});
|
|
98643
99157
|
|
|
98644
99158
|
// src/util/domains/get-domain-price.ts
|
|
98645
|
-
async function getDomainPrice(client2, name
|
|
99159
|
+
async function getDomainPrice(client2, name) {
|
|
98646
99160
|
try {
|
|
98647
|
-
|
|
98648
|
-
return await client2.fetch(`/v3/domains/price?${querystr}`);
|
|
99161
|
+
return await client2.fetch(`/v1/registrar/domains/${name}/price`);
|
|
98649
99162
|
} catch (err) {
|
|
98650
99163
|
if (isAPIError(err)) {
|
|
98651
|
-
if (err.code === "
|
|
99164
|
+
if (err.code === "tld_not_supported") {
|
|
98652
99165
|
return new UnsupportedTLD(name);
|
|
98653
99166
|
}
|
|
98654
99167
|
if (err.status < 500) {
|
|
@@ -98658,11 +99171,9 @@ async function getDomainPrice(client2, name, type) {
|
|
|
98658
99171
|
throw err;
|
|
98659
99172
|
}
|
|
98660
99173
|
}
|
|
98661
|
-
var import_querystring;
|
|
98662
99174
|
var init_get_domain_price = __esm({
|
|
98663
99175
|
"src/util/domains/get-domain-price.ts"() {
|
|
98664
99176
|
"use strict";
|
|
98665
|
-
import_querystring = require("querystring");
|
|
98666
99177
|
init_errors_ts();
|
|
98667
99178
|
}
|
|
98668
99179
|
});
|
|
@@ -98670,47 +99181,147 @@ var init_get_domain_price = __esm({
|
|
|
98670
99181
|
// src/util/domains/get-domain-status.ts
|
|
98671
99182
|
async function getDomainStatus(client2, domain) {
|
|
98672
99183
|
return client2.fetch(
|
|
98673
|
-
`/
|
|
99184
|
+
`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`
|
|
98674
99185
|
);
|
|
98675
99186
|
}
|
|
98676
|
-
var import_querystring2;
|
|
98677
99187
|
var init_get_domain_status = __esm({
|
|
98678
99188
|
"src/util/domains/get-domain-status.ts"() {
|
|
98679
99189
|
"use strict";
|
|
98680
|
-
|
|
99190
|
+
}
|
|
99191
|
+
});
|
|
99192
|
+
|
|
99193
|
+
// src/util/domains/get-order.ts
|
|
99194
|
+
async function getOrder(client2, orderId) {
|
|
99195
|
+
const { team } = await getScope(client2);
|
|
99196
|
+
const teamParam = team ? `?teamId=${team.slug}` : "";
|
|
99197
|
+
try {
|
|
99198
|
+
return await client2.fetch(
|
|
99199
|
+
`/v1/registrar/orders/${orderId}${teamParam}`
|
|
99200
|
+
);
|
|
99201
|
+
} catch (err) {
|
|
99202
|
+
if (isAPIError(err)) {
|
|
99203
|
+
if (err.code === "not_found") {
|
|
99204
|
+
return null;
|
|
99205
|
+
}
|
|
99206
|
+
if (err.status < 500) {
|
|
99207
|
+
return err;
|
|
99208
|
+
}
|
|
99209
|
+
}
|
|
99210
|
+
throw err;
|
|
99211
|
+
}
|
|
99212
|
+
}
|
|
99213
|
+
var pollForOrder;
|
|
99214
|
+
var init_get_order = __esm({
|
|
99215
|
+
"src/util/domains/get-order.ts"() {
|
|
99216
|
+
"use strict";
|
|
99217
|
+
init_errors_ts();
|
|
99218
|
+
init_sleep();
|
|
99219
|
+
init_get_scope();
|
|
99220
|
+
pollForOrder = async (client2, orderId, timeoutMs = 1e4) => {
|
|
99221
|
+
const intervalMs = 500;
|
|
99222
|
+
const startTime = Date.now();
|
|
99223
|
+
while (Date.now() - startTime < timeoutMs) {
|
|
99224
|
+
const order = await getOrder(client2, orderId);
|
|
99225
|
+
if (order !== null && (order.status === "completed" || order.status === "failed")) {
|
|
99226
|
+
return order;
|
|
99227
|
+
}
|
|
99228
|
+
await sleep(intervalMs);
|
|
99229
|
+
}
|
|
99230
|
+
return null;
|
|
99231
|
+
};
|
|
99232
|
+
}
|
|
99233
|
+
});
|
|
99234
|
+
|
|
99235
|
+
// src/util/domains/get-domain.ts
|
|
99236
|
+
async function getDomain(client2, contextName, domainName) {
|
|
99237
|
+
output_manager_default.spinner(
|
|
99238
|
+
`Fetching domain ${domainName} under ${import_chalk29.default.bold(contextName)}`
|
|
99239
|
+
);
|
|
99240
|
+
try {
|
|
99241
|
+
const { domain } = await client2.fetch(
|
|
99242
|
+
`/v5/domains/${domainName}`
|
|
99243
|
+
);
|
|
99244
|
+
return domain;
|
|
99245
|
+
} catch (err) {
|
|
99246
|
+
if (isAPIError(err) && err.status < 500) {
|
|
99247
|
+
return err;
|
|
99248
|
+
}
|
|
99249
|
+
throw err;
|
|
99250
|
+
}
|
|
99251
|
+
}
|
|
99252
|
+
var import_chalk29;
|
|
99253
|
+
var init_get_domain = __esm({
|
|
99254
|
+
"src/util/domains/get-domain.ts"() {
|
|
99255
|
+
"use strict";
|
|
99256
|
+
import_chalk29 = __toESM3(require_source());
|
|
99257
|
+
init_errors_ts();
|
|
99258
|
+
init_output_manager();
|
|
98681
99259
|
}
|
|
98682
99260
|
});
|
|
98683
99261
|
|
|
98684
99262
|
// src/util/domains/purchase-domain.ts
|
|
98685
|
-
async function purchaseDomain(client2, name, expectedPrice,
|
|
99263
|
+
async function purchaseDomain(client2, name, expectedPrice, years, autoRenew = true) {
|
|
99264
|
+
const { team, contextName } = await getScope(client2);
|
|
99265
|
+
const teamParam = team ? `?teamId=${team.slug}` : "";
|
|
98686
99266
|
try {
|
|
98687
|
-
|
|
98688
|
-
|
|
98689
|
-
|
|
98690
|
-
|
|
99267
|
+
const { orderId } = await client2.fetch(
|
|
99268
|
+
`/v1/registrar/domains/${name}/buy${teamParam}`,
|
|
99269
|
+
{
|
|
99270
|
+
body: {
|
|
99271
|
+
expectedPrice,
|
|
99272
|
+
autoRenew,
|
|
99273
|
+
years,
|
|
99274
|
+
contactInformation: {
|
|
99275
|
+
firstName: "Vercel",
|
|
99276
|
+
lastName: "Whois",
|
|
99277
|
+
email: "domains@registrar.vercel.com",
|
|
99278
|
+
phone: "+14153985463",
|
|
99279
|
+
address1: "100 First Street, Suite 2400",
|
|
99280
|
+
city: "San Fransisco",
|
|
99281
|
+
state: "CA",
|
|
99282
|
+
zip: "94105",
|
|
99283
|
+
country: "US",
|
|
99284
|
+
companyName: "Vercel Inc."
|
|
99285
|
+
}
|
|
99286
|
+
},
|
|
99287
|
+
method: "POST"
|
|
99288
|
+
}
|
|
99289
|
+
);
|
|
99290
|
+
const order = await pollForOrder(client2, orderId);
|
|
99291
|
+
if (order === null) {
|
|
99292
|
+
return new UnexpectedDomainPurchaseError(name);
|
|
99293
|
+
}
|
|
99294
|
+
if (order.status === "completed") {
|
|
99295
|
+
const domain = order.domains.find((domain2) => domain2.domainName === name);
|
|
99296
|
+
if (domain?.status === "completed") {
|
|
99297
|
+
const domain2 = await getDomain(client2, contextName, name);
|
|
99298
|
+
if (domain2 instanceof APIError) {
|
|
99299
|
+
throw domain2;
|
|
99300
|
+
}
|
|
99301
|
+
return domain2;
|
|
99302
|
+
}
|
|
99303
|
+
}
|
|
99304
|
+
if (order.error?.code === "payment_failed") {
|
|
99305
|
+
return new DomainPaymentError();
|
|
99306
|
+
}
|
|
99307
|
+
return new UnexpectedDomainPurchaseError(name);
|
|
98691
99308
|
} catch (err) {
|
|
98692
99309
|
if (isAPIError(err)) {
|
|
98693
99310
|
if (err.code === "invalid_domain") {
|
|
98694
99311
|
return new InvalidDomain(name);
|
|
98695
99312
|
}
|
|
98696
|
-
if (err.code === "
|
|
99313
|
+
if (err.code === "domain_not_available") {
|
|
98697
99314
|
return new DomainNotAvailable(name);
|
|
98698
99315
|
}
|
|
98699
|
-
if (err.code === "
|
|
98700
|
-
return new DomainServiceNotAvailable(name);
|
|
98701
|
-
}
|
|
98702
|
-
if (err.code === "unexpected_error") {
|
|
99316
|
+
if (err.code === "internal_server_error") {
|
|
98703
99317
|
return new UnexpectedDomainPurchaseError(name);
|
|
98704
99318
|
}
|
|
98705
|
-
if (err.code === "
|
|
98706
|
-
return new SourceNotFound();
|
|
98707
|
-
}
|
|
98708
|
-
if (err.code === "payment_error") {
|
|
98709
|
-
return new DomainPaymentError();
|
|
98710
|
-
}
|
|
98711
|
-
if (err.code === "unsupported_tld") {
|
|
99319
|
+
if (err.code === "tld_not_supported") {
|
|
98712
99320
|
return new UnsupportedTLD(name);
|
|
98713
99321
|
}
|
|
99322
|
+
if (err.code === "additional_contact_info_required") {
|
|
99323
|
+
return new TLDNotSupportedViaCLI(name);
|
|
99324
|
+
}
|
|
98714
99325
|
}
|
|
98715
99326
|
throw err;
|
|
98716
99327
|
}
|
|
@@ -98719,12 +99330,15 @@ var init_purchase_domain = __esm({
|
|
|
98719
99330
|
"src/util/domains/purchase-domain.ts"() {
|
|
98720
99331
|
"use strict";
|
|
98721
99332
|
init_errors_ts();
|
|
99333
|
+
init_get_order();
|
|
99334
|
+
init_get_domain();
|
|
99335
|
+
init_get_scope();
|
|
98722
99336
|
}
|
|
98723
99337
|
});
|
|
98724
99338
|
|
|
98725
99339
|
// src/util/domains/purchase-domain-if-available.ts
|
|
98726
99340
|
async function purchaseDomainIfAvailable(client2, domain, contextName) {
|
|
98727
|
-
output_manager_default.spinner(`Checking status of ${
|
|
99341
|
+
output_manager_default.spinner(`Checking status of ${import_chalk30.default.bold(domain)}`);
|
|
98728
99342
|
const buyDomainStamp = stamp_default();
|
|
98729
99343
|
const { available } = await getDomainStatus(client2, domain);
|
|
98730
99344
|
if (available) {
|
|
@@ -98741,39 +99355,44 @@ async function purchaseDomainIfAvailable(client2, domain, contextName) {
|
|
|
98741
99355
|
if (domainPrice instanceof Error) {
|
|
98742
99356
|
throw domainPrice;
|
|
98743
99357
|
}
|
|
98744
|
-
const {
|
|
99358
|
+
const { purchasePrice, years } = domainPrice;
|
|
99359
|
+
if (purchasePrice === null) {
|
|
99360
|
+
output_manager_default.error(
|
|
99361
|
+
`The domain ${param(domain)} is ${import_chalk30.default.underline(
|
|
99362
|
+
"unavailable"
|
|
99363
|
+
)}! ${buyDomainStamp()}`
|
|
99364
|
+
);
|
|
99365
|
+
return new DomainNotAvailable(domain);
|
|
99366
|
+
}
|
|
98745
99367
|
output_manager_default.log(
|
|
98746
|
-
`Domain not found, but you can buy it under ${
|
|
99368
|
+
`Domain not found, but you can buy it under ${import_chalk30.default.bold(
|
|
98747
99369
|
contextName
|
|
98748
99370
|
)}! ${buyDomainStamp()}`
|
|
98749
99371
|
);
|
|
98750
99372
|
if (!await client2.input.confirm(
|
|
98751
|
-
`Buy ${
|
|
98752
|
-
`$${
|
|
98753
|
-
)} (${(0, import_pluralize.default)("yr",
|
|
99373
|
+
`Buy ${import_chalk30.default.underline(domain)} for ${import_chalk30.default.bold(
|
|
99374
|
+
`$${purchasePrice}`
|
|
99375
|
+
)} (${(0, import_pluralize.default)("yr", years, true)})?`,
|
|
98754
99376
|
false
|
|
98755
99377
|
)) {
|
|
98756
99378
|
output_manager_default.print(eraseLines(1));
|
|
98757
99379
|
return new UserAborted();
|
|
98758
99380
|
}
|
|
98759
99381
|
output_manager_default.print(eraseLines(1));
|
|
98760
|
-
const result = await purchaseDomain(client2, domain,
|
|
99382
|
+
const result = await purchaseDomain(client2, domain, purchasePrice, years);
|
|
98761
99383
|
if (result instanceof Error) {
|
|
98762
99384
|
return result;
|
|
98763
99385
|
}
|
|
98764
|
-
if (result.pending) {
|
|
98765
|
-
return new DomainPurchasePending(domain);
|
|
98766
|
-
}
|
|
98767
99386
|
return true;
|
|
98768
99387
|
}
|
|
98769
99388
|
output_manager_default.debug(`Domain ${domain} is not available to be purchased`);
|
|
98770
99389
|
return false;
|
|
98771
99390
|
}
|
|
98772
|
-
var
|
|
99391
|
+
var import_chalk30, import_pluralize, isTTY;
|
|
98773
99392
|
var init_purchase_domain_if_available = __esm({
|
|
98774
99393
|
"src/util/domains/purchase-domain-if-available.ts"() {
|
|
98775
99394
|
"use strict";
|
|
98776
|
-
|
|
99395
|
+
import_chalk30 = __toESM3(require_source());
|
|
98777
99396
|
import_pluralize = __toESM3(require_pluralize());
|
|
98778
99397
|
init_erase_lines();
|
|
98779
99398
|
init_get_domain_price();
|
|
@@ -98782,6 +99401,7 @@ var init_purchase_domain_if_available = __esm({
|
|
|
98782
99401
|
init_stamp();
|
|
98783
99402
|
init_errors_ts();
|
|
98784
99403
|
init_output_manager();
|
|
99404
|
+
init_param();
|
|
98785
99405
|
isTTY = process.stdout.isTTY;
|
|
98786
99406
|
}
|
|
98787
99407
|
});
|
|
@@ -98955,7 +99575,7 @@ async function getAppLastDeployment(client2, appName, user, contextName) {
|
|
|
98955
99575
|
return null;
|
|
98956
99576
|
}
|
|
98957
99577
|
async function getDeploymentForAlias(client2, args2, localConfigPath, user, contextName, localConfig) {
|
|
98958
|
-
output_manager_default.spinner(`Fetching deployment to alias in ${
|
|
99578
|
+
output_manager_default.spinner(`Fetching deployment to alias in ${import_chalk31.default.bold(contextName)}`);
|
|
98959
99579
|
if (args2.length === 2) {
|
|
98960
99580
|
const [deploymentId] = args2;
|
|
98961
99581
|
try {
|
|
@@ -98974,12 +99594,12 @@ async function getDeploymentForAlias(client2, args2, localConfigPath, user, cont
|
|
|
98974
99594
|
output_manager_default.stopSpinner();
|
|
98975
99595
|
}
|
|
98976
99596
|
}
|
|
98977
|
-
var import_path9,
|
|
99597
|
+
var import_path9, import_chalk31;
|
|
98978
99598
|
var init_get_deployment_by_alias = __esm({
|
|
98979
99599
|
"src/util/alias/get-deployment-by-alias.ts"() {
|
|
98980
99600
|
"use strict";
|
|
98981
99601
|
import_path9 = __toESM3(require("path"));
|
|
98982
|
-
|
|
99602
|
+
import_chalk31 = __toESM3(require_source());
|
|
98983
99603
|
init_get_deployments_by_appname();
|
|
98984
99604
|
init_get_deployment();
|
|
98985
99605
|
init_output_manager();
|
|
@@ -98990,13 +99610,13 @@ var init_get_deployment_by_alias = __esm({
|
|
|
98990
99610
|
function formatDNSTable(rows) {
|
|
98991
99611
|
return table([HEADER, ...rows], { hsep: 8 });
|
|
98992
99612
|
}
|
|
98993
|
-
var
|
|
99613
|
+
var import_chalk32, HEADER;
|
|
98994
99614
|
var init_format_dns_table = __esm({
|
|
98995
99615
|
"src/util/format-dns-table.ts"() {
|
|
98996
99616
|
"use strict";
|
|
98997
99617
|
init_table();
|
|
98998
|
-
|
|
98999
|
-
HEADER = ["name", "type", "value"].map((v) => (0,
|
|
99618
|
+
import_chalk32 = __toESM3(require_source());
|
|
99619
|
+
HEADER = ["name", "type", "value"].map((v) => (0, import_chalk32.gray)(v));
|
|
99000
99620
|
}
|
|
99001
99621
|
});
|
|
99002
99622
|
|
|
@@ -99028,7 +99648,7 @@ function handleCertError(error3) {
|
|
|
99028
99648
|
if (error3 instanceof CertConfigurationError) {
|
|
99029
99649
|
const { external, cns } = error3.meta;
|
|
99030
99650
|
output_manager_default.error(
|
|
99031
|
-
`We couldn't verify the propagation of the DNS settings for ${error3.meta.cns.map((cn) =>
|
|
99651
|
+
`We couldn't verify the propagation of the DNS settings for ${error3.meta.cns.map((cn) => import_chalk33.default.underline(cn)).join(", ")}`
|
|
99032
99652
|
);
|
|
99033
99653
|
if (external) {
|
|
99034
99654
|
output_manager_default.print(
|
|
@@ -99069,13 +99689,13 @@ function handleCertError(error3) {
|
|
|
99069
99689
|
}
|
|
99070
99690
|
return error3;
|
|
99071
99691
|
}
|
|
99072
|
-
var import_ms4, import_tldts3,
|
|
99692
|
+
var import_ms4, import_tldts3, import_chalk33;
|
|
99073
99693
|
var init_handle_cert_error = __esm({
|
|
99074
99694
|
"src/util/certs/handle-cert-error.ts"() {
|
|
99075
99695
|
"use strict";
|
|
99076
99696
|
import_ms4 = __toESM3(require_ms());
|
|
99077
99697
|
import_tldts3 = __toESM3(require_cjs7());
|
|
99078
|
-
|
|
99698
|
+
import_chalk33 = __toESM3(require_source());
|
|
99079
99699
|
init_errors_ts();
|
|
99080
99700
|
init_format_dns_table();
|
|
99081
99701
|
init_pkg_name();
|
|
@@ -99211,7 +99831,7 @@ async function set(client2, argv) {
|
|
|
99211
99831
|
return 1;
|
|
99212
99832
|
}
|
|
99213
99833
|
output_manager_default.success(
|
|
99214
|
-
`${
|
|
99834
|
+
`${import_chalk34.default.bold(
|
|
99215
99835
|
`${isWildcardAlias(target) ? "" : "https://"}${handleResult2.alias}`
|
|
99216
99836
|
)} now points to https://${deployment2.url} ${setStamp()}`
|
|
99217
99837
|
);
|
|
@@ -99247,16 +99867,16 @@ async function set(client2, argv) {
|
|
|
99247
99867
|
}
|
|
99248
99868
|
const prefix = isWildcard ? "" : "https://";
|
|
99249
99869
|
output_manager_default.success(
|
|
99250
|
-
`${
|
|
99870
|
+
`${import_chalk34.default.bold(`${prefix}${handleResult.alias}`)} now points to https://${deployment.url} ${setStamp()}`
|
|
99251
99871
|
);
|
|
99252
99872
|
return 0;
|
|
99253
99873
|
}
|
|
99254
99874
|
function handleSetupDomainError(error3) {
|
|
99255
99875
|
if (error3 instanceof DomainPermissionDenied) {
|
|
99256
99876
|
output_manager_default.error(
|
|
99257
|
-
`You don't have permissions over domain ${
|
|
99877
|
+
`You don't have permissions over domain ${import_chalk34.default.underline(
|
|
99258
99878
|
error3.meta.domain
|
|
99259
|
-
)} under ${
|
|
99879
|
+
)} under ${import_chalk34.default.bold(error3.meta.context)}.`
|
|
99260
99880
|
);
|
|
99261
99881
|
return 1;
|
|
99262
99882
|
}
|
|
@@ -99286,12 +99906,6 @@ function handleSetupDomainError(error3) {
|
|
|
99286
99906
|
);
|
|
99287
99907
|
return 1;
|
|
99288
99908
|
}
|
|
99289
|
-
if (error3 instanceof DomainServiceNotAvailable) {
|
|
99290
|
-
output_manager_default.error(
|
|
99291
|
-
"The domain purchase service is not available. Try again later."
|
|
99292
|
-
);
|
|
99293
|
-
return 1;
|
|
99294
|
-
}
|
|
99295
99909
|
if (error3 instanceof UnexpectedDomainPurchaseError) {
|
|
99296
99910
|
output_manager_default.error("There was an unexpected error while purchasing the domain.");
|
|
99297
99911
|
return 1;
|
|
@@ -99325,6 +99939,12 @@ function handleSetupDomainError(error3) {
|
|
|
99325
99939
|
output_manager_default.print(" Please add a valid payment method and retry.\n");
|
|
99326
99940
|
return 1;
|
|
99327
99941
|
}
|
|
99942
|
+
if (error3 instanceof TLDNotSupportedViaCLI) {
|
|
99943
|
+
output_manager_default.error(
|
|
99944
|
+
`The TLD for domain name ${error3.meta.domain} is not supported via the CLI. Use the REST API or the dashboard to purchase.`
|
|
99945
|
+
);
|
|
99946
|
+
return 1;
|
|
99947
|
+
}
|
|
99328
99948
|
return error3;
|
|
99329
99949
|
}
|
|
99330
99950
|
function handleCreateAliasError(errorOrResult) {
|
|
@@ -99334,7 +99954,7 @@ function handleCreateAliasError(errorOrResult) {
|
|
|
99334
99954
|
}
|
|
99335
99955
|
if (error3 instanceof AliasInUse) {
|
|
99336
99956
|
output_manager_default.error(
|
|
99337
|
-
`The alias ${
|
|
99957
|
+
`The alias ${import_chalk34.default.dim(
|
|
99338
99958
|
error3.meta.alias
|
|
99339
99959
|
)} is a deployment URL or it's in use by a different team.`
|
|
99340
99960
|
);
|
|
@@ -99342,7 +99962,7 @@ function handleCreateAliasError(errorOrResult) {
|
|
|
99342
99962
|
}
|
|
99343
99963
|
if (error3 instanceof DeploymentNotFound) {
|
|
99344
99964
|
output_manager_default.error(
|
|
99345
|
-
`Failed to find deployment ${
|
|
99965
|
+
`Failed to find deployment ${import_chalk34.default.dim(error3.meta.id)} under ${import_chalk34.default.bold(
|
|
99346
99966
|
error3.meta.context
|
|
99347
99967
|
)}`
|
|
99348
99968
|
);
|
|
@@ -99356,9 +99976,9 @@ function handleCreateAliasError(errorOrResult) {
|
|
|
99356
99976
|
}
|
|
99357
99977
|
if (error3 instanceof DeploymentPermissionDenied) {
|
|
99358
99978
|
output_manager_default.error(
|
|
99359
|
-
`No permission to access deployment ${
|
|
99979
|
+
`No permission to access deployment ${import_chalk34.default.dim(
|
|
99360
99980
|
error3.meta.id
|
|
99361
|
-
)} under ${
|
|
99981
|
+
)} under ${import_chalk34.default.bold(error3.meta.context)}`
|
|
99362
99982
|
);
|
|
99363
99983
|
return 1;
|
|
99364
99984
|
}
|
|
@@ -99401,11 +100021,11 @@ function getTargetsForAlias(args2, { alias: alias2 } = {}) {
|
|
|
99401
100021
|
}
|
|
99402
100022
|
return typeof alias2 === "string" ? [alias2] : alias2;
|
|
99403
100023
|
}
|
|
99404
|
-
var
|
|
100024
|
+
var import_chalk34;
|
|
99405
100025
|
var init_set2 = __esm({
|
|
99406
100026
|
"src/commands/alias/set.ts"() {
|
|
99407
100027
|
"use strict";
|
|
99408
|
-
|
|
100028
|
+
import_chalk34 = __toESM3(require_source());
|
|
99409
100029
|
init_errors_ts();
|
|
99410
100030
|
init_assign_alias();
|
|
99411
100031
|
init_get_deployment();
|
|
@@ -100389,30 +101009,30 @@ var require_format = __commonJS2({
|
|
|
100389
101009
|
// src/util/format-date.ts
|
|
100390
101010
|
function formatDate(dateStrOrNumber) {
|
|
100391
101011
|
if (!dateStrOrNumber) {
|
|
100392
|
-
return
|
|
101012
|
+
return import_chalk35.default.gray("-");
|
|
100393
101013
|
}
|
|
100394
101014
|
const date = new Date(dateStrOrNumber);
|
|
100395
101015
|
const diff = date.getTime() - Date.now();
|
|
100396
|
-
return diff < 0 ? `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${
|
|
101016
|
+
return diff < 0 ? `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk35.default.gray(
|
|
100397
101017
|
`[${(0, import_ms5.default)(-diff)} ago]`
|
|
100398
|
-
)}` : `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${
|
|
101018
|
+
)}` : `${(0, import_format2.default)(date, "DD MMMM YYYY HH:mm:ss")} ${import_chalk35.default.gray(
|
|
100399
101019
|
`[in ${(0, import_ms5.default)(diff)}]`
|
|
100400
101020
|
)}`;
|
|
100401
101021
|
}
|
|
100402
101022
|
function formatDateWithoutTime(dateStrOrNumber) {
|
|
100403
101023
|
if (!dateStrOrNumber) {
|
|
100404
|
-
return
|
|
101024
|
+
return import_chalk35.default.gray("-");
|
|
100405
101025
|
}
|
|
100406
101026
|
const date = new Date(dateStrOrNumber);
|
|
100407
101027
|
const diff = date.getTime() - Date.now();
|
|
100408
|
-
return diff < 0 ? `${(0, import_format2.default)(date, "MMM DD YYYY")} ${
|
|
101028
|
+
return diff < 0 ? `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk35.default.gray(`[${(0, import_ms5.default)(-diff)} ago]`)}` : `${(0, import_format2.default)(date, "MMM DD YYYY")} ${import_chalk35.default.gray(`[in ${(0, import_ms5.default)(diff)}]`)}`;
|
|
100409
101029
|
}
|
|
100410
|
-
var import_ms5,
|
|
101030
|
+
var import_ms5, import_chalk35, import_format2;
|
|
100411
101031
|
var init_format_date = __esm({
|
|
100412
101032
|
"src/util/format-date.ts"() {
|
|
100413
101033
|
"use strict";
|
|
100414
101034
|
import_ms5 = __toESM3(require_ms());
|
|
100415
|
-
|
|
101035
|
+
import_chalk35 = __toESM3(require_source());
|
|
100416
101036
|
import_format2 = __toESM3(require_format());
|
|
100417
101037
|
}
|
|
100418
101038
|
});
|
|
@@ -100533,9 +101153,9 @@ async function bisect(client2) {
|
|
|
100533
101153
|
if (typeof parsed.path === "string" && parsed.path !== "/") {
|
|
100534
101154
|
if (subpath && subpath !== parsed.path) {
|
|
100535
101155
|
output_manager_default.note(
|
|
100536
|
-
`Ignoring subpath ${
|
|
101156
|
+
`Ignoring subpath ${import_chalk36.default.bold(
|
|
100537
101157
|
parsed.path
|
|
100538
|
-
)} in favor of \`--path\` argument ${
|
|
101158
|
+
)} in favor of \`--path\` argument ${import_chalk36.default.bold(subpath)}`
|
|
100539
101159
|
);
|
|
100540
101160
|
} else {
|
|
100541
101161
|
subpath = parsed.path;
|
|
@@ -100550,9 +101170,9 @@ async function bisect(client2) {
|
|
|
100550
101170
|
good = parsed.hostname;
|
|
100551
101171
|
if (typeof parsed.path === "string" && parsed.path !== "/" && subpath && subpath !== parsed.path) {
|
|
100552
101172
|
output_manager_default.note(
|
|
100553
|
-
`Ignoring subpath ${
|
|
101173
|
+
`Ignoring subpath ${import_chalk36.default.bold(
|
|
100554
101174
|
parsed.path
|
|
100555
|
-
)} which does not match ${
|
|
101175
|
+
)} which does not match ${import_chalk36.default.bold(subpath)}`
|
|
100556
101176
|
);
|
|
100557
101177
|
}
|
|
100558
101178
|
if (!subpath) {
|
|
@@ -100575,7 +101195,7 @@ async function bisect(client2) {
|
|
|
100575
101195
|
}
|
|
100576
101196
|
bad = badDeployment.url;
|
|
100577
101197
|
} else {
|
|
100578
|
-
output_manager_default.error(`Failed to retrieve ${
|
|
101198
|
+
output_manager_default.error(`Failed to retrieve ${import_chalk36.default.bold("bad")} Deployment: ${bad}`);
|
|
100579
101199
|
return 1;
|
|
100580
101200
|
}
|
|
100581
101201
|
const goodDeployment = await getDeployment(client2, contextName, good).catch(
|
|
@@ -100592,7 +101212,7 @@ async function bisect(client2) {
|
|
|
100592
101212
|
good = goodDeployment.url;
|
|
100593
101213
|
} else {
|
|
100594
101214
|
output_manager_default.error(
|
|
100595
|
-
`Failed to retrieve ${
|
|
101215
|
+
`Failed to retrieve ${import_chalk36.default.bold("good")} Deployment: ${good}`
|
|
100596
101216
|
);
|
|
100597
101217
|
return 1;
|
|
100598
101218
|
}
|
|
@@ -100653,21 +101273,21 @@ async function bisect(client2) {
|
|
|
100653
101273
|
const steps = Math.floor(Math.log2(deployments.length));
|
|
100654
101274
|
const pSteps = (0, import_pluralize2.default)("step", steps, true);
|
|
100655
101275
|
output_manager_default.log(
|
|
100656
|
-
|
|
100657
|
-
`${
|
|
101276
|
+
import_chalk36.default.magenta(
|
|
101277
|
+
`${import_chalk36.default.bold(
|
|
100658
101278
|
"Bisecting:"
|
|
100659
101279
|
)} ${rem} left to test after this (roughly ${pSteps})`
|
|
100660
101280
|
),
|
|
100661
|
-
|
|
101281
|
+
import_chalk36.default.magenta
|
|
100662
101282
|
);
|
|
100663
101283
|
const testUrl = `https://${deployment.url}${subpath}`;
|
|
100664
|
-
output_manager_default.log(`${
|
|
100665
|
-
output_manager_default.log(`${
|
|
101284
|
+
output_manager_default.log(`${import_chalk36.default.bold("Deployment URL:")} ${link_default(testUrl)}`);
|
|
101285
|
+
output_manager_default.log(`${import_chalk36.default.bold("Date:")} ${formatDate(deployment.createdAt)}`);
|
|
100666
101286
|
const commit2 = getCommit(deployment);
|
|
100667
101287
|
if (commit2) {
|
|
100668
101288
|
const shortSha = commit2.sha.substring(0, 7);
|
|
100669
101289
|
const firstLine = commit2.message?.split("\n")[0];
|
|
100670
|
-
output_manager_default.log(`${
|
|
101290
|
+
output_manager_default.log(`${import_chalk36.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
|
|
100671
101291
|
}
|
|
100672
101292
|
let action;
|
|
100673
101293
|
if (run) {
|
|
@@ -100687,17 +101307,17 @@ async function bisect(client2) {
|
|
|
100687
101307
|
const { exitCode: exitCode2 } = proc;
|
|
100688
101308
|
let color;
|
|
100689
101309
|
if (exitCode2 === 0) {
|
|
100690
|
-
color =
|
|
101310
|
+
color = import_chalk36.default.green;
|
|
100691
101311
|
action = "good";
|
|
100692
101312
|
} else if (exitCode2 === 125) {
|
|
100693
101313
|
action = "skip";
|
|
100694
|
-
color =
|
|
101314
|
+
color = import_chalk36.default.grey;
|
|
100695
101315
|
} else {
|
|
100696
101316
|
action = "bad";
|
|
100697
|
-
color =
|
|
101317
|
+
color = import_chalk36.default.red;
|
|
100698
101318
|
}
|
|
100699
101319
|
output_manager_default.log(
|
|
100700
|
-
`Run script returned exit code ${
|
|
101320
|
+
`Run script returned exit code ${import_chalk36.default.bold(String(exitCode2))}: ${color(
|
|
100701
101321
|
action
|
|
100702
101322
|
)}`
|
|
100703
101323
|
);
|
|
@@ -100725,19 +101345,19 @@ async function bisect(client2) {
|
|
|
100725
101345
|
}
|
|
100726
101346
|
output_manager_default.print("\n");
|
|
100727
101347
|
const result = [
|
|
100728
|
-
|
|
101348
|
+
import_chalk36.default.bold(
|
|
100729
101349
|
`The first bad deployment is: ${link_default(`https://${lastBad.url}`)}`
|
|
100730
101350
|
),
|
|
100731
101351
|
"",
|
|
100732
|
-
` ${
|
|
101352
|
+
` ${import_chalk36.default.bold("Date:")} ${formatDate(lastBad.createdAt)}`
|
|
100733
101353
|
];
|
|
100734
101354
|
const commit = getCommit(lastBad);
|
|
100735
101355
|
if (commit) {
|
|
100736
101356
|
const shortSha = commit.sha.substring(0, 7);
|
|
100737
101357
|
const firstLine = commit.message?.split("\n")[0];
|
|
100738
|
-
result.push(` ${
|
|
101358
|
+
result.push(` ${import_chalk36.default.bold("Commit:")} [${shortSha}] ${firstLine}`);
|
|
100739
101359
|
}
|
|
100740
|
-
result.push(`${
|
|
101360
|
+
result.push(`${import_chalk36.default.bold("Inspect:")} ${link_default(lastBad.inspectorUrl)}`);
|
|
100741
101361
|
output_manager_default.print(box(result.join("\n")));
|
|
100742
101362
|
output_manager_default.print("\n");
|
|
100743
101363
|
return 0;
|
|
@@ -100749,7 +101369,7 @@ function getCommit(deployment) {
|
|
|
100749
101369
|
const message2 = deployment.meta?.githubCommitMessage || deployment.meta?.gitlabCommitMessage || deployment.meta?.bitbucketCommitMessage;
|
|
100750
101370
|
return { sha, message: message2 };
|
|
100751
101371
|
}
|
|
100752
|
-
var import_open2, import_execa2, import_pluralize2, import_path10,
|
|
101372
|
+
var import_open2, import_execa2, import_pluralize2, import_path10, import_chalk36, import_url6;
|
|
100753
101373
|
var init_bisect2 = __esm({
|
|
100754
101374
|
"src/commands/bisect/index.ts"() {
|
|
100755
101375
|
"use strict";
|
|
@@ -100757,7 +101377,7 @@ var init_bisect2 = __esm({
|
|
|
100757
101377
|
import_execa2 = __toESM3(require_execa());
|
|
100758
101378
|
import_pluralize2 = __toESM3(require_pluralize());
|
|
100759
101379
|
import_path10 = require("path");
|
|
100760
|
-
|
|
101380
|
+
import_chalk36 = __toESM3(require_source());
|
|
100761
101381
|
import_url6 = require("url");
|
|
100762
101382
|
init_box();
|
|
100763
101383
|
init_format_date();
|
|
@@ -100886,7 +101506,7 @@ async function list2(client2, argv, rwToken) {
|
|
|
100886
101506
|
const urls = [];
|
|
100887
101507
|
const tablePrint = table(
|
|
100888
101508
|
[
|
|
100889
|
-
headers.map((header) =>
|
|
101509
|
+
headers.map((header) => import_chalk37.default.dim(header)),
|
|
100890
101510
|
...list9.blobs.map((blob5) => {
|
|
100891
101511
|
urls.push(blob5.url);
|
|
100892
101512
|
const uploadedAt = (0, import_ms6.default)(Date.now() - new Date(blob5.uploadedAt).getTime());
|
|
@@ -100913,14 +101533,14 @@ ${tablePrint}
|
|
|
100913
101533
|
}
|
|
100914
101534
|
return 0;
|
|
100915
101535
|
}
|
|
100916
|
-
var blob,
|
|
101536
|
+
var blob, import_chalk37, import_ms6;
|
|
100917
101537
|
var init_list3 = __esm({
|
|
100918
101538
|
"src/commands/blob/list.ts"() {
|
|
100919
101539
|
"use strict";
|
|
100920
101540
|
init_output_manager();
|
|
100921
101541
|
blob = __toESM3(require("@vercel/blob"));
|
|
100922
101542
|
init_table();
|
|
100923
|
-
|
|
101543
|
+
import_chalk37 = __toESM3(require_source());
|
|
100924
101544
|
import_ms6 = __toESM3(require_ms());
|
|
100925
101545
|
init_get_command_flags();
|
|
100926
101546
|
init_get_args();
|
|
@@ -101084,15 +101704,15 @@ async function put2(client2, argv, rwToken) {
|
|
|
101084
101704
|
if (!filePath) {
|
|
101085
101705
|
if (client2.stdin.isTTY) {
|
|
101086
101706
|
output_manager_default.error(
|
|
101087
|
-
`Missing input. Usage: ${
|
|
101707
|
+
`Missing input. Usage: ${import_chalk38.default.cyan(
|
|
101088
101708
|
`${getCommandName("blob put <file>")}`
|
|
101089
|
-
)} or pipe data: ${
|
|
101709
|
+
)} or pipe data: ${import_chalk38.default.cyan("cat file.txt | vercel blob put --pathname <pathname>")}`
|
|
101090
101710
|
);
|
|
101091
101711
|
return 1;
|
|
101092
101712
|
}
|
|
101093
101713
|
if (!pathnameFlag) {
|
|
101094
101714
|
output_manager_default.error(
|
|
101095
|
-
`Missing pathname. When reading from stdin, you must specify --pathname. Usage: ${
|
|
101715
|
+
`Missing pathname. When reading from stdin, you must specify --pathname. Usage: ${import_chalk38.default.cyan(
|
|
101096
101716
|
"cat file.txt | vercel blob put --pathname <pathname>"
|
|
101097
101717
|
)}`
|
|
101098
101718
|
);
|
|
@@ -101125,9 +101745,9 @@ async function put2(client2, argv, rwToken) {
|
|
|
101125
101745
|
}
|
|
101126
101746
|
if (!pathname || !putBody) {
|
|
101127
101747
|
output_manager_default.error(
|
|
101128
|
-
`Missing pathname or input. Usage: ${
|
|
101748
|
+
`Missing pathname or input. Usage: ${import_chalk38.default.cyan(
|
|
101129
101749
|
`${getCommandName("blob put <file>")}`
|
|
101130
|
-
)} or ${
|
|
101750
|
+
)} or ${import_chalk38.default.cyan(
|
|
101131
101751
|
`cat file.txt | ${getCommandName("blob put --pathname <pathname>")}`
|
|
101132
101752
|
)}`
|
|
101133
101753
|
);
|
|
@@ -101154,7 +101774,7 @@ async function put2(client2, argv, rwToken) {
|
|
|
101154
101774
|
output_manager_default.success(result.url);
|
|
101155
101775
|
return 0;
|
|
101156
101776
|
}
|
|
101157
|
-
var blob2, import_node_fs, import_promises, import_error_utils10, import_node_path,
|
|
101777
|
+
var blob2, import_node_fs, import_promises, import_error_utils10, import_node_path, import_chalk38;
|
|
101158
101778
|
var init_put2 = __esm({
|
|
101159
101779
|
"src/commands/blob/put.ts"() {
|
|
101160
101780
|
"use strict";
|
|
@@ -101168,7 +101788,7 @@ var init_put2 = __esm({
|
|
|
101168
101788
|
import_error_utils10 = __toESM3(require_dist2());
|
|
101169
101789
|
import_node_path = require("path");
|
|
101170
101790
|
init_pkg_name();
|
|
101171
|
-
|
|
101791
|
+
import_chalk38 = __toESM3(require_source());
|
|
101172
101792
|
init_put();
|
|
101173
101793
|
init_error2();
|
|
101174
101794
|
}
|
|
@@ -103058,7 +103678,7 @@ var require_fast_json_stable_stringify = __commonJS2({
|
|
|
103058
103678
|
};
|
|
103059
103679
|
}(opts.cmp);
|
|
103060
103680
|
var seen = [];
|
|
103061
|
-
return function
|
|
103681
|
+
return function stringify2(node) {
|
|
103062
103682
|
if (node && node.toJSON && typeof node.toJSON === "function") {
|
|
103063
103683
|
node = node.toJSON();
|
|
103064
103684
|
}
|
|
@@ -103074,7 +103694,7 @@ var require_fast_json_stable_stringify = __commonJS2({
|
|
|
103074
103694
|
for (i = 0; i < node.length; i++) {
|
|
103075
103695
|
if (i)
|
|
103076
103696
|
out += ",";
|
|
103077
|
-
out +=
|
|
103697
|
+
out += stringify2(node[i]) || "null";
|
|
103078
103698
|
}
|
|
103079
103699
|
return out + "]";
|
|
103080
103700
|
}
|
|
@@ -103090,7 +103710,7 @@ var require_fast_json_stable_stringify = __commonJS2({
|
|
|
103090
103710
|
out = "";
|
|
103091
103711
|
for (i = 0; i < keys.length; i++) {
|
|
103092
103712
|
var key = keys[i];
|
|
103093
|
-
var value =
|
|
103713
|
+
var value = stringify2(node[key]);
|
|
103094
103714
|
if (!value)
|
|
103095
103715
|
continue;
|
|
103096
103716
|
if (out)
|
|
@@ -107745,9 +108365,9 @@ var require_ajv = __commonJS2({
|
|
|
107745
108365
|
// src/util/projects/get-project-by-id-or-name.ts
|
|
107746
108366
|
async function getProjectByNameOrId(client2, projectNameOrId, accountId, includeRollbackInfo) {
|
|
107747
108367
|
try {
|
|
107748
|
-
const
|
|
108368
|
+
const qs2 = includeRollbackInfo ? "?rollbackInfo=true" : "";
|
|
107749
108369
|
const project = await client2.fetch(
|
|
107750
|
-
`/v9/projects/${encodeURIComponent(projectNameOrId)}${
|
|
108370
|
+
`/v9/projects/${encodeURIComponent(projectNameOrId)}${qs2}`,
|
|
107751
108371
|
{ accountId }
|
|
107752
108372
|
);
|
|
107753
108373
|
return project;
|
|
@@ -109378,7 +109998,7 @@ var init_create_project = __esm({
|
|
|
109378
109998
|
});
|
|
109379
109999
|
|
|
109380
110000
|
// ../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/common.js
|
|
109381
|
-
var
|
|
110001
|
+
var require_common9 = __commonJS2({
|
|
109382
110002
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/common.js"(exports2, module2) {
|
|
109383
110003
|
"use strict";
|
|
109384
110004
|
function isNothing(subject) {
|
|
@@ -109458,7 +110078,7 @@ var require_exception = __commonJS2({
|
|
|
109458
110078
|
var require_mark = __commonJS2({
|
|
109459
110079
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/mark.js"(exports2, module2) {
|
|
109460
110080
|
"use strict";
|
|
109461
|
-
var common2 =
|
|
110081
|
+
var common2 = require_common9();
|
|
109462
110082
|
function Mark(name, buffer, position, line, column) {
|
|
109463
110083
|
this.name = name;
|
|
109464
110084
|
this.buffer = buffer;
|
|
@@ -109576,7 +110196,7 @@ var require_type = __commonJS2({
|
|
|
109576
110196
|
var require_schema = __commonJS2({
|
|
109577
110197
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/schema.js"(exports2, module2) {
|
|
109578
110198
|
"use strict";
|
|
109579
|
-
var common2 =
|
|
110199
|
+
var common2 = require_common9();
|
|
109580
110200
|
var YAMLException = require_exception();
|
|
109581
110201
|
var Type = require_type();
|
|
109582
110202
|
function compileList(schema, name, result) {
|
|
@@ -109800,7 +110420,7 @@ var require_bool = __commonJS2({
|
|
|
109800
110420
|
var require_int = __commonJS2({
|
|
109801
110421
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/type/int.js"(exports2, module2) {
|
|
109802
110422
|
"use strict";
|
|
109803
|
-
var common2 =
|
|
110423
|
+
var common2 = require_common9();
|
|
109804
110424
|
var Type = require_type();
|
|
109805
110425
|
function isHexCode(c) {
|
|
109806
110426
|
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
|
@@ -109951,7 +110571,7 @@ var require_int = __commonJS2({
|
|
|
109951
110571
|
var require_float = __commonJS2({
|
|
109952
110572
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/type/float.js"(exports2, module2) {
|
|
109953
110573
|
"use strict";
|
|
109954
|
-
var common2 =
|
|
110574
|
+
var common2 = require_common9();
|
|
109955
110575
|
var Type = require_type();
|
|
109956
110576
|
var YAML_FLOAT_PATTERN = new RegExp(
|
|
109957
110577
|
// 2.5e4, 2.5 and integers
|
|
@@ -110551,7 +111171,7 @@ var require_default_full = __commonJS2({
|
|
|
110551
111171
|
var require_loader = __commonJS2({
|
|
110552
111172
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/loader.js"(exports2, module2) {
|
|
110553
111173
|
"use strict";
|
|
110554
|
-
var common2 =
|
|
111174
|
+
var common2 = require_common9();
|
|
110555
111175
|
var YAMLException = require_exception();
|
|
110556
111176
|
var Mark = require_mark();
|
|
110557
111177
|
var DEFAULT_SAFE_SCHEMA = require_default_safe();
|
|
@@ -111651,7 +112271,7 @@ var require_loader = __commonJS2({
|
|
|
111651
112271
|
var require_dumper = __commonJS2({
|
|
111652
112272
|
"../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/lib/js-yaml/dumper.js"(exports2, module2) {
|
|
111653
112273
|
"use strict";
|
|
111654
|
-
var common2 =
|
|
112274
|
+
var common2 = require_common9();
|
|
111655
112275
|
var YAMLException = require_exception();
|
|
111656
112276
|
var DEFAULT_FULL_SCHEMA = require_default_full();
|
|
111657
112277
|
var DEFAULT_SAFE_SCHEMA = require_default_safe();
|
|
@@ -113993,9 +114613,9 @@ var require_parse6 = __commonJS2({
|
|
|
113993
114613
|
var require_stringify2 = __commonJS2({
|
|
113994
114614
|
"../../node_modules/.pnpm/@iarna+toml@2.2.3/node_modules/@iarna/toml/stringify.js"(exports2, module2) {
|
|
113995
114615
|
"use strict";
|
|
113996
|
-
module2.exports =
|
|
114616
|
+
module2.exports = stringify2;
|
|
113997
114617
|
module2.exports.value = stringifyInline;
|
|
113998
|
-
function
|
|
114618
|
+
function stringify2(obj) {
|
|
113999
114619
|
if (obj === null)
|
|
114000
114620
|
throw typeError("null");
|
|
114001
114621
|
if (obj === void 0)
|
|
@@ -116612,7 +117232,7 @@ var require_frameworks = __commonJS2({
|
|
|
116612
117232
|
description: "Nitro lets you create web servers that run on multiple platforms.",
|
|
116613
117233
|
website: "https://nitro.build/",
|
|
116614
117234
|
detectors: {
|
|
116615
|
-
|
|
117235
|
+
some: [{ matchPackage: "nitropack" }, { matchPackage: "nitro" }]
|
|
116616
117236
|
},
|
|
116617
117237
|
settings: {
|
|
116618
117238
|
installCommand: {
|
|
@@ -116629,7 +117249,6 @@ var require_frameworks = __commonJS2({
|
|
|
116629
117249
|
value: "dist"
|
|
116630
117250
|
}
|
|
116631
117251
|
},
|
|
116632
|
-
dependency: "nitropack",
|
|
116633
117252
|
getOutputDirName: async () => "public"
|
|
116634
117253
|
},
|
|
116635
117254
|
{
|
|
@@ -117210,9 +117829,173 @@ var require_frameworks = __commonJS2({
|
|
|
117210
117829
|
detectors: {
|
|
117211
117830
|
every: [{ matchPackage: "@nestjs/core" }],
|
|
117212
117831
|
some: [
|
|
117832
|
+
{
|
|
117833
|
+
path: "src/main.js",
|
|
117834
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117835
|
+
},
|
|
117836
|
+
{
|
|
117837
|
+
path: "src/main.cjs",
|
|
117838
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117839
|
+
},
|
|
117840
|
+
{
|
|
117841
|
+
path: "src/main.mjs",
|
|
117842
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117843
|
+
},
|
|
117213
117844
|
{
|
|
117214
117845
|
path: "src/main.ts",
|
|
117215
117846
|
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117847
|
+
},
|
|
117848
|
+
{
|
|
117849
|
+
path: "src/main.cts",
|
|
117850
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117851
|
+
},
|
|
117852
|
+
{
|
|
117853
|
+
path: "src/main.mts",
|
|
117854
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117855
|
+
},
|
|
117856
|
+
{
|
|
117857
|
+
path: "app.js",
|
|
117858
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117859
|
+
},
|
|
117860
|
+
{
|
|
117861
|
+
path: "app.cjs",
|
|
117862
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117863
|
+
},
|
|
117864
|
+
{
|
|
117865
|
+
path: "app.mjs",
|
|
117866
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117867
|
+
},
|
|
117868
|
+
{
|
|
117869
|
+
path: "app.ts",
|
|
117870
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117871
|
+
},
|
|
117872
|
+
{
|
|
117873
|
+
path: "app.cts",
|
|
117874
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117875
|
+
},
|
|
117876
|
+
{
|
|
117877
|
+
path: "app.mts",
|
|
117878
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117879
|
+
},
|
|
117880
|
+
{
|
|
117881
|
+
path: "index.js",
|
|
117882
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117883
|
+
},
|
|
117884
|
+
{
|
|
117885
|
+
path: "index.cjs",
|
|
117886
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117887
|
+
},
|
|
117888
|
+
{
|
|
117889
|
+
path: "index.mjs",
|
|
117890
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117891
|
+
},
|
|
117892
|
+
{
|
|
117893
|
+
path: "index.ts",
|
|
117894
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117895
|
+
},
|
|
117896
|
+
{
|
|
117897
|
+
path: "index.cts",
|
|
117898
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117899
|
+
},
|
|
117900
|
+
{
|
|
117901
|
+
path: "index.mts",
|
|
117902
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117903
|
+
},
|
|
117904
|
+
{
|
|
117905
|
+
path: "server.js",
|
|
117906
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117907
|
+
},
|
|
117908
|
+
{
|
|
117909
|
+
path: "server.cjs",
|
|
117910
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117911
|
+
},
|
|
117912
|
+
{
|
|
117913
|
+
path: "server.mjs",
|
|
117914
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117915
|
+
},
|
|
117916
|
+
{
|
|
117917
|
+
path: "server.ts",
|
|
117918
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117919
|
+
},
|
|
117920
|
+
{
|
|
117921
|
+
path: "server.cts",
|
|
117922
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117923
|
+
},
|
|
117924
|
+
{
|
|
117925
|
+
path: "server.mts",
|
|
117926
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117927
|
+
},
|
|
117928
|
+
{
|
|
117929
|
+
path: "src/app.js",
|
|
117930
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117931
|
+
},
|
|
117932
|
+
{
|
|
117933
|
+
path: "src/app.cjs",
|
|
117934
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117935
|
+
},
|
|
117936
|
+
{
|
|
117937
|
+
path: "src/app.mjs",
|
|
117938
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117939
|
+
},
|
|
117940
|
+
{
|
|
117941
|
+
path: "src/app.ts",
|
|
117942
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117943
|
+
},
|
|
117944
|
+
{
|
|
117945
|
+
path: "src/app.cts",
|
|
117946
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117947
|
+
},
|
|
117948
|
+
{
|
|
117949
|
+
path: "src/app.mts",
|
|
117950
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117951
|
+
},
|
|
117952
|
+
{
|
|
117953
|
+
path: "src/index.js",
|
|
117954
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117955
|
+
},
|
|
117956
|
+
{
|
|
117957
|
+
path: "src/index.cjs",
|
|
117958
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117959
|
+
},
|
|
117960
|
+
{
|
|
117961
|
+
path: "src/index.mjs",
|
|
117962
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117963
|
+
},
|
|
117964
|
+
{
|
|
117965
|
+
path: "src/index.ts",
|
|
117966
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117967
|
+
},
|
|
117968
|
+
{
|
|
117969
|
+
path: "src/index.cts",
|
|
117970
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117971
|
+
},
|
|
117972
|
+
{
|
|
117973
|
+
path: "src/index.mts",
|
|
117974
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117975
|
+
},
|
|
117976
|
+
{
|
|
117977
|
+
path: "src/server.js",
|
|
117978
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117979
|
+
},
|
|
117980
|
+
{
|
|
117981
|
+
path: "src/server.cjs",
|
|
117982
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117983
|
+
},
|
|
117984
|
+
{
|
|
117985
|
+
path: "src/server.mjs",
|
|
117986
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117987
|
+
},
|
|
117988
|
+
{
|
|
117989
|
+
path: "src/server.ts",
|
|
117990
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117991
|
+
},
|
|
117992
|
+
{
|
|
117993
|
+
path: "src/server.cts",
|
|
117994
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117995
|
+
},
|
|
117996
|
+
{
|
|
117997
|
+
path: "src/server.mts",
|
|
117998
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']@nestjs/core["']\\s*(?:\\))?`
|
|
117216
117999
|
}
|
|
117217
118000
|
]
|
|
117218
118001
|
},
|
|
@@ -120932,7 +121715,7 @@ var require_get_workspaces = __commonJS2({
|
|
|
120932
121715
|
});
|
|
120933
121716
|
|
|
120934
121717
|
// ../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js
|
|
120935
|
-
var
|
|
121718
|
+
var require_common10 = __commonJS2({
|
|
120936
121719
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/common.js"(exports2, module2) {
|
|
120937
121720
|
"use strict";
|
|
120938
121721
|
function isNothing(subject) {
|
|
@@ -121020,7 +121803,7 @@ var require_exception2 = __commonJS2({
|
|
|
121020
121803
|
var require_snippet = __commonJS2({
|
|
121021
121804
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/snippet.js"(exports2, module2) {
|
|
121022
121805
|
"use strict";
|
|
121023
|
-
var common2 =
|
|
121806
|
+
var common2 = require_common10();
|
|
121024
121807
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
121025
121808
|
var head = "";
|
|
121026
121809
|
var tail = "";
|
|
@@ -121402,7 +122185,7 @@ var require_bool2 = __commonJS2({
|
|
|
121402
122185
|
var require_int2 = __commonJS2({
|
|
121403
122186
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/int.js"(exports2, module2) {
|
|
121404
122187
|
"use strict";
|
|
121405
|
-
var common2 =
|
|
122188
|
+
var common2 = require_common10();
|
|
121406
122189
|
var Type = require_type2();
|
|
121407
122190
|
function isHexCode(c) {
|
|
121408
122191
|
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
|
@@ -121541,7 +122324,7 @@ var require_int2 = __commonJS2({
|
|
|
121541
122324
|
var require_float2 = __commonJS2({
|
|
121542
122325
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/type/float.js"(exports2, module2) {
|
|
121543
122326
|
"use strict";
|
|
121544
|
-
var common2 =
|
|
122327
|
+
var common2 = require_common10();
|
|
121545
122328
|
var Type = require_type2();
|
|
121546
122329
|
var YAML_FLOAT_PATTERN = new RegExp(
|
|
121547
122330
|
// 2.5e4, 2.5 and integers
|
|
@@ -121951,7 +122734,7 @@ var require_default = __commonJS2({
|
|
|
121951
122734
|
var require_loader2 = __commonJS2({
|
|
121952
122735
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/loader.js"(exports2, module2) {
|
|
121953
122736
|
"use strict";
|
|
121954
|
-
var common2 =
|
|
122737
|
+
var common2 = require_common10();
|
|
121955
122738
|
var YAMLException = require_exception2();
|
|
121956
122739
|
var makeSnippet = require_snippet();
|
|
121957
122740
|
var DEFAULT_SCHEMA = require_default();
|
|
@@ -123119,7 +123902,7 @@ var require_loader2 = __commonJS2({
|
|
|
123119
123902
|
var require_dumper2 = __commonJS2({
|
|
123120
123903
|
"../../node_modules/.pnpm/js-yaml@4.1.0/node_modules/js-yaml/lib/dumper.js"(exports2, module2) {
|
|
123121
123904
|
"use strict";
|
|
123122
|
-
var common2 =
|
|
123905
|
+
var common2 = require_common10();
|
|
123123
123906
|
var YAMLException = require_exception2();
|
|
123124
123907
|
var DEFAULT_SCHEMA = require_default();
|
|
123125
123908
|
var _toString = Object.prototype.toString;
|
|
@@ -124069,7 +124852,7 @@ var require_fs7 = __commonJS2({
|
|
|
124069
124852
|
});
|
|
124070
124853
|
|
|
124071
124854
|
// ../../node_modules/.pnpm/glob@8.0.3/node_modules/glob/common.js
|
|
124072
|
-
var
|
|
124855
|
+
var require_common11 = __commonJS2({
|
|
124073
124856
|
"../../node_modules/.pnpm/glob@8.0.3/node_modules/glob/common.js"(exports2) {
|
|
124074
124857
|
exports2.setopts = setopts;
|
|
124075
124858
|
exports2.ownProp = ownProp;
|
|
@@ -124276,7 +125059,7 @@ var require_sync7 = __commonJS2({
|
|
|
124276
125059
|
var path11 = require("path");
|
|
124277
125060
|
var assert = require("assert");
|
|
124278
125061
|
var isAbsolute2 = require("path").isAbsolute;
|
|
124279
|
-
var common2 =
|
|
125062
|
+
var common2 = require_common11();
|
|
124280
125063
|
var setopts = common2.setopts;
|
|
124281
125064
|
var ownProp = common2.ownProp;
|
|
124282
125065
|
var childrenIgnored = common2.childrenIgnored;
|
|
@@ -124675,7 +125458,7 @@ var require_glob = __commonJS2({
|
|
|
124675
125458
|
var assert = require("assert");
|
|
124676
125459
|
var isAbsolute2 = require("path").isAbsolute;
|
|
124677
125460
|
var globSync = require_sync7();
|
|
124678
|
-
var common2 =
|
|
125461
|
+
var common2 = require_common11();
|
|
124679
125462
|
var setopts = common2.setopts;
|
|
124680
125463
|
var ownProp = common2.ownProp;
|
|
124681
125464
|
var inflight = require_inflight();
|
|
@@ -126101,7 +126884,7 @@ var require_parse7 = __commonJS2({
|
|
|
126101
126884
|
var require_stringify3 = __commonJS2({
|
|
126102
126885
|
"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/stringify.js"(exports2, module2) {
|
|
126103
126886
|
var util = require_util8();
|
|
126104
|
-
module2.exports = function
|
|
126887
|
+
module2.exports = function stringify2(value, replacer, space) {
|
|
126105
126888
|
const stack2 = [];
|
|
126106
126889
|
let indent = "";
|
|
126107
126890
|
let propertyList;
|
|
@@ -126320,10 +127103,10 @@ var require_stringify3 = __commonJS2({
|
|
|
126320
127103
|
var require_lib12 = __commonJS2({
|
|
126321
127104
|
"../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/index.js"(exports2, module2) {
|
|
126322
127105
|
var parse11 = require_parse7();
|
|
126323
|
-
var
|
|
127106
|
+
var stringify2 = require_stringify3();
|
|
126324
127107
|
var JSON5 = {
|
|
126325
127108
|
parse: parse11,
|
|
126326
|
-
stringify:
|
|
127109
|
+
stringify: stringify2
|
|
126327
127110
|
};
|
|
126328
127111
|
module2.exports = JSON5;
|
|
126329
127112
|
}
|
|
@@ -127286,13 +128069,13 @@ async function connectGitProvider(client2, projectId, type, repo) {
|
|
|
127286
128069
|
const apiError = isAPIError(err);
|
|
127287
128070
|
if (apiError && (err.action === "Install GitHub App" || err.code === "repo_not_found")) {
|
|
127288
128071
|
output_manager_default.error(
|
|
127289
|
-
`Failed to connect ${
|
|
128072
|
+
`Failed to connect ${import_chalk39.default.cyan(
|
|
127290
128073
|
repo
|
|
127291
128074
|
)} to project. Make sure there aren't any typos and that you have access to the repository if it's private.`
|
|
127292
128075
|
);
|
|
127293
128076
|
} else if (apiError && err.action === "Add a Login Connection") {
|
|
127294
128077
|
output_manager_default.error(
|
|
127295
|
-
err.message.replace(repo,
|
|
128078
|
+
err.message.replace(repo, import_chalk39.default.cyan(repo)) + `
|
|
127296
128079
|
Visit ${link_default(err.link)} for more information.`
|
|
127297
128080
|
);
|
|
127298
128081
|
} else {
|
|
@@ -127363,7 +128146,7 @@ function parseRepoUrl(originUrl) {
|
|
|
127363
128146
|
}
|
|
127364
128147
|
function printRemoteUrls(remoteUrls) {
|
|
127365
128148
|
for (const [name, url3] of Object.entries(remoteUrls)) {
|
|
127366
|
-
output_manager_default.print(` \u2022 ${name}: ${
|
|
128149
|
+
output_manager_default.print(` \u2022 ${name}: ${import_chalk39.default.cyan(url3)}
|
|
127367
128150
|
`);
|
|
127368
128151
|
}
|
|
127369
128152
|
}
|
|
@@ -127371,7 +128154,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
|
127371
128154
|
const choices = [];
|
|
127372
128155
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
|
127373
128156
|
choices.push({
|
|
127374
|
-
name: `${urlValue} ${
|
|
128157
|
+
name: `${urlValue} ${import_chalk39.default.gray(`(${urlKey})`)}`,
|
|
127375
128158
|
value: urlValue,
|
|
127376
128159
|
short: urlKey
|
|
127377
128160
|
});
|
|
@@ -127395,7 +128178,7 @@ async function selectAndParseRemoteUrl(client2, remoteUrls) {
|
|
|
127395
128178
|
}
|
|
127396
128179
|
const repoInfo = parseRepoUrl(remoteUrl);
|
|
127397
128180
|
if (!repoInfo) {
|
|
127398
|
-
output_manager_default.log(`Connecting Git repository: ${
|
|
128181
|
+
output_manager_default.log(`Connecting Git repository: ${import_chalk39.default.cyan(remoteUrl)}`);
|
|
127399
128182
|
output_manager_default.error(
|
|
127400
128183
|
`Failed to parse Git repo data from the following remote URL: ${link_default(
|
|
127401
128184
|
remoteUrl
|
|
@@ -127418,7 +128201,7 @@ async function checkExistsAndConnect({
|
|
|
127418
128201
|
}) {
|
|
127419
128202
|
const displayUrl = buildRepoUrl(provider, gitOrg, repo) || repoPath;
|
|
127420
128203
|
output_manager_default.log(
|
|
127421
|
-
`Connecting ${formatProvider(provider)} repository: ${
|
|
128204
|
+
`Connecting ${formatProvider(provider)} repository: ${import_chalk39.default.cyan(displayUrl)}`
|
|
127422
128205
|
);
|
|
127423
128206
|
if (!gitProviderLink) {
|
|
127424
128207
|
const connect2 = await connectGitProvider(
|
|
@@ -127438,7 +128221,7 @@ async function checkExistsAndConnect({
|
|
|
127438
128221
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
|
127439
128222
|
if (isSameRepo) {
|
|
127440
128223
|
output_manager_default.log(
|
|
127441
|
-
`${
|
|
128224
|
+
`${import_chalk39.default.cyan(connectedRepoPath)} is already connected to your project.`
|
|
127442
128225
|
);
|
|
127443
128226
|
return 1;
|
|
127444
128227
|
}
|
|
@@ -127470,7 +128253,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
|
127470
128253
|
shouldReplaceProject = await client2.input.confirm(
|
|
127471
128254
|
`Looks like you already have a ${formatProvider(
|
|
127472
128255
|
connectedProvider
|
|
127473
|
-
)} repository connected: ${
|
|
128256
|
+
)} repository connected: ${import_chalk39.default.cyan(
|
|
127474
128257
|
connectedRepoPath
|
|
127475
128258
|
)}. Do you want to replace it?`,
|
|
127476
128259
|
true
|
|
@@ -127481,12 +128264,12 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
|
127481
128264
|
}
|
|
127482
128265
|
return shouldReplaceProject;
|
|
127483
128266
|
}
|
|
127484
|
-
var import_url7,
|
|
128267
|
+
var import_url7, import_chalk39;
|
|
127485
128268
|
var init_connect_git_provider = __esm({
|
|
127486
128269
|
"src/util/git/connect-git-provider.ts"() {
|
|
127487
128270
|
"use strict";
|
|
127488
128271
|
import_url7 = require("url");
|
|
127489
|
-
|
|
128272
|
+
import_chalk39 = __toESM3(require_source());
|
|
127490
128273
|
init_link();
|
|
127491
128274
|
init_errors_ts();
|
|
127492
128275
|
init_output_manager();
|
|
@@ -127559,7 +128342,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
127559
128342
|
return /* @__PURE__ */ new Map();
|
|
127560
128343
|
});
|
|
127561
128344
|
const shouldLink = yes || await client2.input.confirm(
|
|
127562
|
-
`Link Git repository at ${
|
|
128345
|
+
`Link Git repository at ${import_chalk40.default.cyan(
|
|
127563
128346
|
`\u201C${humanizePath(rootPath)}\u201D`
|
|
127564
128347
|
)} to your Project(s)?`,
|
|
127565
128348
|
true
|
|
@@ -127606,7 +128389,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
127606
128389
|
fallback: () => link_default(repoUrl)
|
|
127607
128390
|
});
|
|
127608
128391
|
output_manager_default.spinner(
|
|
127609
|
-
`Fetching Projects for ${repoUrlLink} under ${
|
|
128392
|
+
`Fetching Projects for ${repoUrlLink} under ${import_chalk40.default.bold(org.slug)}\u2026`
|
|
127610
128393
|
);
|
|
127611
128394
|
let projects = [];
|
|
127612
128395
|
const query = new URLSearchParams({ repoUrl });
|
|
@@ -127615,12 +128398,12 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
127615
128398
|
for await (const chunk of projectsIterator) {
|
|
127616
128399
|
projects = projects.concat(chunk.projects);
|
|
127617
128400
|
if (chunk.pagination.next) {
|
|
127618
|
-
output_manager_default.spinner(`Found ${
|
|
128401
|
+
output_manager_default.spinner(`Found ${import_chalk40.default.bold(projects.length)} Projects\u2026`, 0);
|
|
127619
128402
|
}
|
|
127620
128403
|
}
|
|
127621
128404
|
if (projects.length === 0) {
|
|
127622
128405
|
output_manager_default.log(
|
|
127623
|
-
`No Projects are linked to ${repoUrlLink} under ${
|
|
128406
|
+
`No Projects are linked to ${repoUrlLink} under ${import_chalk40.default.bold(
|
|
127624
128407
|
org.slug
|
|
127625
128408
|
)}.`
|
|
127626
128409
|
);
|
|
@@ -127630,7 +128413,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
127630
128413
|
"Project",
|
|
127631
128414
|
projects.length,
|
|
127632
128415
|
true
|
|
127633
|
-
)} linked to ${repoUrlLink} under ${
|
|
128416
|
+
)} linked to ${repoUrlLink} under ${import_chalk40.default.bold(org.slug)}`
|
|
127634
128417
|
);
|
|
127635
128418
|
}
|
|
127636
128419
|
for (const project of projects) {
|
|
@@ -127746,7 +128529,7 @@ async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
|
|
|
127746
128529
|
"Project",
|
|
127747
128530
|
selected.length,
|
|
127748
128531
|
true
|
|
127749
|
-
)} under ${
|
|
128532
|
+
)} under ${import_chalk40.default.bold(org.slug)} (created ${VERCEL_DIR2}${isGitIgnoreUpdated ? " and added it to .gitignore" : ""})`,
|
|
127750
128533
|
emoji("link")
|
|
127751
128534
|
) + "\n"
|
|
127752
128535
|
);
|
|
@@ -127803,11 +128586,11 @@ function findProjectsFromPath(projects, path11) {
|
|
|
127803
128586
|
const firstMatch = matches[0];
|
|
127804
128587
|
return matches.filter((match) => match.directory === firstMatch.directory);
|
|
127805
128588
|
}
|
|
127806
|
-
var
|
|
128589
|
+
var import_chalk40, import_pluralize3, import_os7, import_slugify, import_path14, import_build_utils5, import_fs_extra6, home;
|
|
127807
128590
|
var init_repo = __esm({
|
|
127808
128591
|
"src/util/link/repo.ts"() {
|
|
127809
128592
|
"use strict";
|
|
127810
|
-
|
|
128593
|
+
import_chalk40 = __toESM3(require_source());
|
|
127811
128594
|
init_esm4();
|
|
127812
128595
|
import_pluralize3 = __toESM3(require_pluralize());
|
|
127813
128596
|
import_os7 = require("os");
|
|
@@ -128023,20 +128806,20 @@ async function linkFolderToProject(client2, path11, projectLink, projectName, or
|
|
|
128023
128806
|
const isGitIgnoreUpdated = await addToGitIgnore(path11);
|
|
128024
128807
|
output_manager_default.print(
|
|
128025
128808
|
prependEmoji(
|
|
128026
|
-
`Linked to ${
|
|
128809
|
+
`Linked to ${import_chalk41.default.bold(
|
|
128027
128810
|
`${orgSlug}/${projectName}`
|
|
128028
128811
|
)} (created ${VERCEL_DIR2}${isGitIgnoreUpdated ? " and added it to .gitignore" : ""})`,
|
|
128029
128812
|
emoji(successEmoji)
|
|
128030
128813
|
) + "\n"
|
|
128031
128814
|
);
|
|
128032
128815
|
}
|
|
128033
|
-
var import_fs4, import_ajv,
|
|
128816
|
+
var import_fs4, import_ajv, import_chalk41, import_path15, import_fs_extra7, import_util2, import_build_utils6, import_error_utils12, readFile3, writeFile2, VERCEL_DIR2, VERCEL_DIR_FALLBACK, VERCEL_DIR_README, VERCEL_DIR_PROJECT, VERCEL_DIR_REPO, linkSchema;
|
|
128034
128817
|
var init_link2 = __esm({
|
|
128035
128818
|
"src/util/projects/link.ts"() {
|
|
128036
128819
|
"use strict";
|
|
128037
128820
|
import_fs4 = __toESM3(require("fs"));
|
|
128038
128821
|
import_ajv = __toESM3(require_ajv());
|
|
128039
|
-
|
|
128822
|
+
import_chalk41 = __toESM3(require_source());
|
|
128040
128823
|
import_path15 = require("path");
|
|
128041
128824
|
import_fs_extra7 = __toESM3(require_lib());
|
|
128042
128825
|
import_util2 = require("util");
|
|
@@ -128203,7 +128986,7 @@ async function addStore(client2, argv) {
|
|
|
128203
128986
|
]
|
|
128204
128987
|
});
|
|
128205
128988
|
output_manager_default.spinner(
|
|
128206
|
-
`Connecting ${
|
|
128989
|
+
`Connecting ${import_chalk42.default.bold(name)} to ${import_chalk42.default.bold(link4.project.name)}...`
|
|
128207
128990
|
);
|
|
128208
128991
|
await connectResourceToProject(
|
|
128209
128992
|
client2,
|
|
@@ -128213,7 +128996,7 @@ async function addStore(client2, argv) {
|
|
|
128213
128996
|
link4.org.id
|
|
128214
128997
|
);
|
|
128215
128998
|
output_manager_default.success(
|
|
128216
|
-
`Blob store ${
|
|
128999
|
+
`Blob store ${import_chalk42.default.bold(name)} linked to ${import_chalk42.default.bold(
|
|
128217
129000
|
link4.project.name
|
|
128218
129001
|
)}. Make sure to pull the new environment variables using ${getCommandName("env pull")}`
|
|
128219
129002
|
);
|
|
@@ -128221,14 +129004,14 @@ async function addStore(client2, argv) {
|
|
|
128221
129004
|
}
|
|
128222
129005
|
return 0;
|
|
128223
129006
|
}
|
|
128224
|
-
var
|
|
129007
|
+
var import_chalk42;
|
|
128225
129008
|
var init_store_add2 = __esm({
|
|
128226
129009
|
"src/commands/blob/store-add.ts"() {
|
|
128227
129010
|
"use strict";
|
|
128228
129011
|
init_output_manager();
|
|
128229
129012
|
init_link2();
|
|
128230
129013
|
init_connect_resource_to_project();
|
|
128231
|
-
|
|
129014
|
+
import_chalk42 = __toESM3(require_source());
|
|
128232
129015
|
init_pkg_name();
|
|
128233
129016
|
init_get_flags_specification();
|
|
128234
129017
|
init_get_args();
|
|
@@ -130708,8 +131491,8 @@ async function getStore2(client2, argv, rwToken) {
|
|
|
130708
131491
|
const regionInfo = store2.store.region ? `
|
|
130709
131492
|
Region: ${store2.store.region}` : "";
|
|
130710
131493
|
output_manager_default.print(
|
|
130711
|
-
`Blob Store: ${
|
|
130712
|
-
Billing State: ${store2.store.billingState === "active" ?
|
|
131494
|
+
`Blob Store: ${import_chalk43.default.bold(store2.store.name)} (${import_chalk43.default.dim(store2.store.id)})
|
|
131495
|
+
Billing State: ${store2.store.billingState === "active" ? import_chalk43.default.green("Active") : import_chalk43.default.red("Inactive")}
|
|
130713
131496
|
Size: ${(0, import_bytes3.default)(store2.store.size)}${regionInfo}
|
|
130714
131497
|
Created At: ${(0, import_date_fns.format)(new Date(store2.store.createdAt), dateTimeFormat2)}
|
|
130715
131498
|
Updated At: ${(0, import_date_fns.format)(new Date(store2.store.updatedAt), dateTimeFormat2)}
|
|
@@ -130722,7 +131505,7 @@ Updated At: ${(0, import_date_fns.format)(new Date(store2.store.updatedAt), date
|
|
|
130722
131505
|
output_manager_default.stopSpinner();
|
|
130723
131506
|
return 0;
|
|
130724
131507
|
}
|
|
130725
|
-
var import_bytes3, import_date_fns,
|
|
131508
|
+
var import_bytes3, import_date_fns, import_chalk43;
|
|
130726
131509
|
var init_store_get2 = __esm({
|
|
130727
131510
|
"src/commands/blob/store-get.ts"() {
|
|
130728
131511
|
"use strict";
|
|
@@ -130734,7 +131517,7 @@ var init_store_get2 = __esm({
|
|
|
130734
131517
|
init_link2();
|
|
130735
131518
|
init_command36();
|
|
130736
131519
|
import_date_fns = __toESM3(require_date_fns());
|
|
130737
|
-
|
|
131520
|
+
import_chalk43 = __toESM3(require_source());
|
|
130738
131521
|
init_store_get();
|
|
130739
131522
|
}
|
|
130740
131523
|
});
|
|
@@ -130892,33 +131675,33 @@ function findChanges(oldEnv, newEnv) {
|
|
|
130892
131675
|
function buildDeltaString(oldEnv, newEnv) {
|
|
130893
131676
|
const { added, changed, removed } = findChanges(oldEnv, newEnv);
|
|
130894
131677
|
let deltaString = "";
|
|
130895
|
-
deltaString +=
|
|
130896
|
-
deltaString +=
|
|
130897
|
-
deltaString +=
|
|
130898
|
-
return deltaString ?
|
|
131678
|
+
deltaString += import_chalk44.default.green(addDeltaSection("+", changed, true));
|
|
131679
|
+
deltaString += import_chalk44.default.green(addDeltaSection("+", added));
|
|
131680
|
+
deltaString += import_chalk44.default.red(addDeltaSection("-", removed));
|
|
131681
|
+
return deltaString ? import_chalk44.default.gray("Changes:\n") + deltaString + "\n" : deltaString;
|
|
130899
131682
|
}
|
|
130900
131683
|
function addDeltaSection(prefix, arr, changed = false) {
|
|
130901
131684
|
if (arr.length === 0)
|
|
130902
131685
|
return "";
|
|
130903
131686
|
return arr.sort().map((item) => `${prefix} ${item}${changed ? " (Updated)" : ""}`).join("\n") + "\n";
|
|
130904
131687
|
}
|
|
130905
|
-
var import_fs_extra8,
|
|
131688
|
+
var import_fs_extra8, import_chalk44;
|
|
130906
131689
|
var init_diff_env_files = __esm({
|
|
130907
131690
|
"src/util/env/diff-env-files.ts"() {
|
|
130908
131691
|
"use strict";
|
|
130909
131692
|
import_fs_extra8 = __toESM3(require_lib());
|
|
130910
131693
|
init_parse_env();
|
|
130911
|
-
|
|
131694
|
+
import_chalk44 = __toESM3(require_source());
|
|
130912
131695
|
init_output_manager();
|
|
130913
131696
|
}
|
|
130914
131697
|
});
|
|
130915
131698
|
|
|
130916
131699
|
// src/util/output/list-item.ts
|
|
130917
|
-
var
|
|
131700
|
+
var import_chalk45, listItem, list_item_default;
|
|
130918
131701
|
var init_list_item = __esm({
|
|
130919
131702
|
"src/util/output/list-item.ts"() {
|
|
130920
131703
|
"use strict";
|
|
130921
|
-
|
|
131704
|
+
import_chalk45 = __toESM3(require_source());
|
|
130922
131705
|
listItem = (msg, n) => {
|
|
130923
131706
|
if (!n) {
|
|
130924
131707
|
n = "-";
|
|
@@ -130926,7 +131709,7 @@ var init_list_item = __esm({
|
|
|
130926
131709
|
if (Number(n)) {
|
|
130927
131710
|
n += ".";
|
|
130928
131711
|
}
|
|
130929
|
-
return `${(0,
|
|
131712
|
+
return `${(0, import_chalk45.default)(n.toString())} ${msg}`;
|
|
130930
131713
|
};
|
|
130931
131714
|
list_item_default = listItem;
|
|
130932
131715
|
}
|
|
@@ -145797,18 +146580,18 @@ var init_get_env_records = __esm({
|
|
|
145797
146580
|
function formatProject(orgSlug, projectSlug, options) {
|
|
145798
146581
|
const orgProjectSlug = `${orgSlug}/${projectSlug}`;
|
|
145799
146582
|
const projectUrl = `https://vercel.com/${orgProjectSlug}`;
|
|
145800
|
-
const projectSlugLink = output_manager_default.link(
|
|
145801
|
-
fallback: () =>
|
|
146583
|
+
const projectSlugLink = output_manager_default.link(import_chalk46.default.bold(orgProjectSlug), projectUrl, {
|
|
146584
|
+
fallback: () => import_chalk46.default.bold(orgProjectSlug),
|
|
145802
146585
|
color: false,
|
|
145803
146586
|
...options
|
|
145804
146587
|
});
|
|
145805
146588
|
return projectSlugLink;
|
|
145806
146589
|
}
|
|
145807
|
-
var
|
|
146590
|
+
var import_chalk46;
|
|
145808
146591
|
var init_format_project = __esm({
|
|
145809
146592
|
"src/util/projects/format-project.ts"() {
|
|
145810
146593
|
"use strict";
|
|
145811
|
-
|
|
146594
|
+
import_chalk46 = __toESM3(require_source());
|
|
145812
146595
|
init_output_manager();
|
|
145813
146596
|
}
|
|
145814
146597
|
});
|
|
@@ -145951,7 +146734,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
|
|
|
145951
146734
|
const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
|
|
145952
146735
|
const exists = typeof head !== "undefined";
|
|
145953
146736
|
if (head === CONTENTS_PREFIX) {
|
|
145954
|
-
output_manager_default.log(`Overwriting existing ${
|
|
146737
|
+
output_manager_default.log(`Overwriting existing ${import_chalk47.default.bold(filename)} file`);
|
|
145955
146738
|
} else if (exists && !skipConfirmation && !await client2.input.confirm(
|
|
145956
146739
|
`Found existing file ${param(filename)}. Do you want to overwrite?`,
|
|
145957
146740
|
false
|
|
@@ -145961,7 +146744,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
|
|
|
145961
146744
|
}
|
|
145962
146745
|
const projectSlugLink = formatProject(link4.org.slug, link4.project.name);
|
|
145963
146746
|
output_manager_default.log(
|
|
145964
|
-
`Downloading \`${
|
|
146747
|
+
`Downloading \`${import_chalk47.default.cyan(
|
|
145965
146748
|
environment
|
|
145966
146749
|
)}\` Environment Variables for ${projectSlugLink}`
|
|
145967
146750
|
);
|
|
@@ -145994,7 +146777,7 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
|
|
|
145994
146777
|
}
|
|
145995
146778
|
output_manager_default.print(
|
|
145996
146779
|
`${prependEmoji(
|
|
145997
|
-
`${exists ? "Updated" : "Created"} ${
|
|
146780
|
+
`${exists ? "Updated" : "Created"} ${import_chalk47.default.bold(filename)} file ${isGitIgnoreUpdated ? "and added it to .gitignore" : ""} ${import_chalk47.default.gray(pullStamp())}`,
|
|
145998
146781
|
emoji("success")
|
|
145999
146782
|
)}
|
|
146000
146783
|
`
|
|
@@ -146003,11 +146786,11 @@ async function envPullCommandLogic(client2, filename, skipConfirmation, environm
|
|
|
146003
146786
|
function escapeValue(value) {
|
|
146004
146787
|
return value ? value.replace(new RegExp("\n", "g"), "\\n").replace(new RegExp("\r", "g"), "\\r") : "";
|
|
146005
146788
|
}
|
|
146006
|
-
var
|
|
146789
|
+
var import_chalk47, import_fs_extra15, import_fs5, import_path24, import_error_utils16, import_json_parse_better_errors2, CONTENTS_PREFIX, VARIABLES_TO_IGNORE;
|
|
146007
146790
|
var init_pull2 = __esm({
|
|
146008
146791
|
"src/commands/env/pull.ts"() {
|
|
146009
146792
|
"use strict";
|
|
146010
|
-
|
|
146793
|
+
import_chalk47 = __toESM3(require_source());
|
|
146011
146794
|
import_fs_extra15 = __toESM3(require_lib());
|
|
146012
146795
|
import_fs5 = require("fs");
|
|
146013
146796
|
import_path24 = require("path");
|
|
@@ -146063,7 +146846,7 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
|
|
|
146063
146846
|
);
|
|
146064
146847
|
} else {
|
|
146065
146848
|
if (await client2.input.confirm(
|
|
146066
|
-
`Found project ${
|
|
146849
|
+
`Found project ${import_chalk48.default.cyan(
|
|
146067
146850
|
`\u201C${org.slug}/${detectedProject.name}\u201D`
|
|
146068
146851
|
)}. Link to it?`,
|
|
146069
146852
|
true
|
|
@@ -146108,12 +146891,12 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
|
|
|
146108
146891
|
}
|
|
146109
146892
|
});
|
|
146110
146893
|
}
|
|
146111
|
-
var
|
|
146894
|
+
var import_chalk48, import_slugify2;
|
|
146112
146895
|
var init_input_project = __esm({
|
|
146113
146896
|
"src/util/input/input-project.ts"() {
|
|
146114
146897
|
"use strict";
|
|
146115
146898
|
init_get_project_by_id_or_name();
|
|
146116
|
-
|
|
146899
|
+
import_chalk48 = __toESM3(require_source());
|
|
146117
146900
|
init_errors_ts();
|
|
146118
146901
|
import_slugify2 = __toESM3(require_slugify());
|
|
146119
146902
|
init_output_manager();
|
|
@@ -146126,7 +146909,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
|
|
|
146126
146909
|
const suffix = errorSuffix ? ` ${errorSuffix}` : "";
|
|
146127
146910
|
if (!pathStat) {
|
|
146128
146911
|
output_manager_default.error(
|
|
146129
|
-
`The provided path ${
|
|
146912
|
+
`The provided path ${import_chalk49.default.cyan(
|
|
146130
146913
|
`\u201C${humanizePath(path11)}\u201D`
|
|
146131
146914
|
)} does not exist.${suffix}`
|
|
146132
146915
|
);
|
|
@@ -146134,7 +146917,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
|
|
|
146134
146917
|
}
|
|
146135
146918
|
if (!pathStat.isDirectory()) {
|
|
146136
146919
|
output_manager_default.error(
|
|
146137
|
-
`The provided path ${
|
|
146920
|
+
`The provided path ${import_chalk49.default.cyan(
|
|
146138
146921
|
`\u201C${humanizePath(path11)}\u201D`
|
|
146139
146922
|
)} is a file, but expected a directory.${suffix}`
|
|
146140
146923
|
);
|
|
@@ -146142,7 +146925,7 @@ async function validateRootDirectory(cwd, path11, errorSuffix = "") {
|
|
|
146142
146925
|
}
|
|
146143
146926
|
if (!path11.startsWith(cwd)) {
|
|
146144
146927
|
output_manager_default.error(
|
|
146145
|
-
`The provided path ${
|
|
146928
|
+
`The provided path ${import_chalk49.default.cyan(
|
|
146146
146929
|
`\u201C${humanizePath(path11)}\u201D`
|
|
146147
146930
|
)} is outside of the project.${suffix}`
|
|
146148
146931
|
);
|
|
@@ -146158,7 +146941,7 @@ async function validatePaths(client2, paths) {
|
|
|
146158
146941
|
const path11 = paths[0];
|
|
146159
146942
|
const pathStat = await (0, import_fs_extra16.lstat)(path11).catch(() => null);
|
|
146160
146943
|
if (!pathStat) {
|
|
146161
|
-
output_manager_default.error(`Could not find ${
|
|
146944
|
+
output_manager_default.error(`Could not find ${import_chalk49.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}`);
|
|
146162
146945
|
return { valid: false, exitCode: 1 };
|
|
146163
146946
|
}
|
|
146164
146947
|
if (!pathStat.isDirectory()) {
|
|
@@ -146181,12 +146964,12 @@ async function validatePaths(client2, paths) {
|
|
|
146181
146964
|
}
|
|
146182
146965
|
return { valid: true, path: path11 };
|
|
146183
146966
|
}
|
|
146184
|
-
var import_fs_extra16,
|
|
146967
|
+
var import_fs_extra16, import_chalk49, import_os8;
|
|
146185
146968
|
var init_validate_paths = __esm({
|
|
146186
146969
|
"src/util/validate-paths.ts"() {
|
|
146187
146970
|
"use strict";
|
|
146188
146971
|
import_fs_extra16 = __toESM3(require_lib());
|
|
146189
|
-
|
|
146972
|
+
import_chalk49 = __toESM3(require_source());
|
|
146190
146973
|
import_os8 = require("os");
|
|
146191
146974
|
init_humanize_path();
|
|
146192
146975
|
init_output_manager();
|
|
@@ -146202,7 +146985,7 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
|
|
|
146202
146985
|
const rootDirectory = await client2.input.text({
|
|
146203
146986
|
message: `In which directory is your code located?`,
|
|
146204
146987
|
transformer: (input) => {
|
|
146205
|
-
return `${
|
|
146988
|
+
return `${import_chalk50.default.dim(`./`)}${input}`;
|
|
146206
146989
|
}
|
|
146207
146990
|
});
|
|
146208
146991
|
if (!rootDirectory) {
|
|
@@ -146223,12 +147006,12 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
|
|
|
146223
147006
|
return normal;
|
|
146224
147007
|
}
|
|
146225
147008
|
}
|
|
146226
|
-
var import_path25,
|
|
147009
|
+
var import_path25, import_chalk50;
|
|
146227
147010
|
var init_input_root_directory = __esm({
|
|
146228
147011
|
"src/util/input/input-root-directory.ts"() {
|
|
146229
147012
|
"use strict";
|
|
146230
147013
|
import_path25 = __toESM3(require("path"));
|
|
146231
|
-
|
|
147014
|
+
import_chalk50 = __toESM3(require_source());
|
|
146232
147015
|
init_validate_paths();
|
|
146233
147016
|
}
|
|
146234
147017
|
});
|
|
@@ -146267,8 +147050,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
|
146267
147050
|
const override = localConfigurationOverrides[setting];
|
|
146268
147051
|
if (override) {
|
|
146269
147052
|
output_manager_default.print(
|
|
146270
|
-
`${
|
|
146271
|
-
`- ${
|
|
147053
|
+
`${import_chalk51.default.dim(
|
|
147054
|
+
`- ${import_chalk51.default.bold(`${settingMap[setting]}:`)} ${override}`
|
|
146272
147055
|
)}
|
|
146273
147056
|
`
|
|
146274
147057
|
);
|
|
@@ -146294,13 +147077,13 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
|
146294
147077
|
const styledFramework = (frameworkName) => {
|
|
146295
147078
|
const frameworkStyle = {
|
|
146296
147079
|
text: frameworkName,
|
|
146297
|
-
color:
|
|
147080
|
+
color: import_chalk51.default.blue
|
|
146298
147081
|
};
|
|
146299
147082
|
if (frameworkName === "Hono") {
|
|
146300
147083
|
frameworkStyle.text = "\u{1F525} Hono";
|
|
146301
|
-
frameworkStyle.color =
|
|
147084
|
+
frameworkStyle.color = import_chalk51.default.hex("#FFA500");
|
|
146302
147085
|
}
|
|
146303
|
-
return
|
|
147086
|
+
return import_chalk51.default.bold(frameworkStyle.color(frameworkStyle.text));
|
|
146304
147087
|
};
|
|
146305
147088
|
output_manager_default.print(
|
|
146306
147089
|
!framework.slug ? `No framework detected. Default Project Settings:
|
|
@@ -146316,8 +147099,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
|
146316
147099
|
const override = localConfigurationOverrides?.[setting];
|
|
146317
147100
|
if (!override && defaultSetting) {
|
|
146318
147101
|
output_manager_default.print(
|
|
146319
|
-
`${
|
|
146320
|
-
`- ${
|
|
147102
|
+
`${import_chalk51.default.dim(
|
|
147103
|
+
`- ${import_chalk51.default.bold(`${settingMap[setting]}:`)} ${isSettingValue(defaultSetting) ? defaultSetting.value : import_chalk51.default.italic(`${defaultSetting.placeholder}`)}`
|
|
146321
147104
|
)}
|
|
146322
147105
|
`
|
|
146323
147106
|
);
|
|
@@ -146342,16 +147125,16 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
|
146342
147125
|
for (const setting of settingFields) {
|
|
146343
147126
|
const field = settingMap[setting];
|
|
146344
147127
|
settings[setting] = await client2.input.text({
|
|
146345
|
-
message: `What's your ${
|
|
147128
|
+
message: `What's your ${import_chalk51.default.bold(field)}?`
|
|
146346
147129
|
});
|
|
146347
147130
|
}
|
|
146348
147131
|
return settings;
|
|
146349
147132
|
}
|
|
146350
|
-
var
|
|
147133
|
+
var import_chalk51, import_frameworks3, settingMap, settingKeys;
|
|
146351
147134
|
var init_edit_project_settings = __esm({
|
|
146352
147135
|
"src/util/input/edit-project-settings.ts"() {
|
|
146353
147136
|
"use strict";
|
|
146354
|
-
|
|
147137
|
+
import_chalk51 = __toESM3(require_source());
|
|
146355
147138
|
import_frameworks3 = __toESM3(require_frameworks());
|
|
146356
147139
|
init_is_setting_value();
|
|
146357
147140
|
init_output_manager();
|
|
@@ -146393,7 +147176,7 @@ async function vercelAuth(client2, {
|
|
|
146393
147176
|
autoConfirm = false
|
|
146394
147177
|
}) {
|
|
146395
147178
|
if (autoConfirm || await client2.input.confirm(
|
|
146396
|
-
`Want to use the default Deployment Protection settings? ${
|
|
147179
|
+
`Want to use the default Deployment Protection settings? ${import_chalk52.default.dim(`(Vercel Authentication: Standard Protection)`)}`,
|
|
146397
147180
|
true
|
|
146398
147181
|
)) {
|
|
146399
147182
|
return DEFAULT_VERCEL_AUTH_SETTING;
|
|
@@ -146401,11 +147184,11 @@ async function vercelAuth(client2, {
|
|
|
146401
147184
|
const vercelAuth2 = await client2.input.select(OPTIONS);
|
|
146402
147185
|
return vercelAuth2;
|
|
146403
147186
|
}
|
|
146404
|
-
var
|
|
147187
|
+
var import_chalk52, DEFAULT_VERCEL_AUTH_SETTING, OPTIONS;
|
|
146405
147188
|
var init_vercel_auth = __esm({
|
|
146406
147189
|
"src/util/input/vercel-auth.ts"() {
|
|
146407
147190
|
"use strict";
|
|
146408
|
-
|
|
147191
|
+
import_chalk52 = __toESM3(require_source());
|
|
146409
147192
|
DEFAULT_VERCEL_AUTH_SETTING = "standard";
|
|
146410
147193
|
OPTIONS = {
|
|
146411
147194
|
message: `What setting do you want to use for Vercel Authentication?`,
|
|
@@ -146459,7 +147242,7 @@ async function setupAndLink(client2, path11, {
|
|
|
146459
147242
|
return { status: "error", exitCode: 1, reason: "HEADLESS" };
|
|
146460
147243
|
}
|
|
146461
147244
|
const shouldStartSetup = autoConfirm || await client2.input.confirm(
|
|
146462
|
-
`${setupMsg} ${
|
|
147245
|
+
`${setupMsg} ${import_chalk53.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}?`,
|
|
146463
147246
|
true
|
|
146464
147247
|
);
|
|
146465
147248
|
if (!shouldStartSetup) {
|
|
@@ -146625,11 +147408,11 @@ async function connectGitRepository(client2, path11, project, autoConfirm, org)
|
|
|
146625
147408
|
output_manager_default.debug(`Failed to connect git repository: ${error3}`);
|
|
146626
147409
|
}
|
|
146627
147410
|
}
|
|
146628
|
-
var
|
|
147411
|
+
var import_chalk53, import_fs_extra17, import_path26, import_frameworks4;
|
|
146629
147412
|
var init_setup_and_link = __esm({
|
|
146630
147413
|
"src/util/link/setup-and-link.ts"() {
|
|
146631
147414
|
"use strict";
|
|
146632
|
-
|
|
147415
|
+
import_chalk53 = __toESM3(require_source());
|
|
146633
147416
|
import_fs_extra17 = __toESM3(require_lib());
|
|
146634
147417
|
import_path26 = require("path");
|
|
146635
147418
|
init_link2();
|
|
@@ -146833,20 +147616,20 @@ async function pullCommandLogic(client2, cwd, autoConfirm, environment, flags) {
|
|
|
146833
147616
|
const settingsStamp = stamp_default();
|
|
146834
147617
|
output_manager_default.print(
|
|
146835
147618
|
`${prependEmoji(
|
|
146836
|
-
`Downloaded project settings to ${
|
|
147619
|
+
`Downloaded project settings to ${import_chalk54.default.bold(
|
|
146837
147620
|
humanizePath((0, import_node_path3.join)(currentDirectory, VERCEL_DIR2, VERCEL_DIR_PROJECT))
|
|
146838
|
-
)} ${
|
|
147621
|
+
)} ${import_chalk54.default.gray(settingsStamp())}`,
|
|
146839
147622
|
emoji("success")
|
|
146840
147623
|
)}
|
|
146841
147624
|
`
|
|
146842
147625
|
);
|
|
146843
147626
|
return 0;
|
|
146844
147627
|
}
|
|
146845
|
-
var
|
|
147628
|
+
var import_chalk54, import_node_path3;
|
|
146846
147629
|
var init_pull4 = __esm({
|
|
146847
147630
|
"src/commands/pull/index.ts"() {
|
|
146848
147631
|
"use strict";
|
|
146849
|
-
|
|
147632
|
+
import_chalk54 = __toESM3(require_source());
|
|
146850
147633
|
import_node_path3 = require("path");
|
|
146851
147634
|
init_emoji();
|
|
146852
147635
|
init_get_args();
|
|
@@ -147423,9 +148206,9 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span, stand
|
|
|
147423
148206
|
const relOutputDir = (0, import_path27.relative)(cwd, outputDir);
|
|
147424
148207
|
output_manager_default.print(
|
|
147425
148208
|
`${prependEmoji(
|
|
147426
|
-
`Build Completed in ${
|
|
148209
|
+
`Build Completed in ${import_chalk55.default.bold(
|
|
147427
148210
|
relOutputDir.startsWith("..") ? outputDir : relOutputDir
|
|
147428
|
-
)} ${
|
|
148211
|
+
)} ${import_chalk55.default.gray(buildStamp())}`,
|
|
147429
148212
|
emoji("success")
|
|
147430
148213
|
)}
|
|
147431
148214
|
`
|
|
@@ -147558,11 +148341,11 @@ async function getFrameworkRoutes(framework, dirPrefix) {
|
|
|
147558
148341
|
}
|
|
147559
148342
|
return routes2;
|
|
147560
148343
|
}
|
|
147561
|
-
var
|
|
148344
|
+
var import_chalk55, import_dotenv, import_fs_extra18, import_minimatch2, import_path27, import_semver3, import_build_utils13, import_client6, import_frameworks5, import_fs_detectors4, import_routing_utils2, import_promises2, InMemoryReporter;
|
|
147562
148345
|
var init_build2 = __esm({
|
|
147563
148346
|
"src/commands/build/index.ts"() {
|
|
147564
148347
|
"use strict";
|
|
147565
|
-
|
|
148348
|
+
import_chalk55 = __toESM3(require_source());
|
|
147566
148349
|
import_dotenv = __toESM3(require_main3());
|
|
147567
148350
|
import_fs_extra18 = __toESM3(require_lib());
|
|
147568
148351
|
import_minimatch2 = __toESM3(require_minimatch2());
|
|
@@ -148213,7 +148996,7 @@ async function add(client2, argv) {
|
|
|
148213
148996
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
|
148214
148997
|
);
|
|
148215
148998
|
output_manager_default.print(
|
|
148216
|
-
` ${
|
|
148999
|
+
` ${import_chalk56.default.cyan(
|
|
148217
149000
|
`${getCommandName(
|
|
148218
149001
|
"certs add --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
|
|
148219
149002
|
)}`
|
|
@@ -148225,9 +149008,9 @@ async function add(client2, argv) {
|
|
|
148225
149008
|
cert = await createCertFromFile(client2, keyPath, crtPath, caPath);
|
|
148226
149009
|
} else {
|
|
148227
149010
|
output_manager_default.warn(
|
|
148228
|
-
`${
|
|
149011
|
+
`${import_chalk56.default.cyan(
|
|
148229
149012
|
getCommandName("certs add")
|
|
148230
|
-
)} will be soon deprecated. Please use ${
|
|
149013
|
+
)} will be soon deprecated. Please use ${import_chalk56.default.cyan(
|
|
148231
149014
|
getCommandName("certs issue <cn> <cns>")
|
|
148232
149015
|
)} instead`
|
|
148233
149016
|
);
|
|
@@ -148236,7 +149019,7 @@ async function add(client2, argv) {
|
|
|
148236
149019
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
|
148237
149020
|
);
|
|
148238
149021
|
output_manager_default.print(
|
|
148239
|
-
` ${
|
|
149022
|
+
` ${import_chalk56.default.cyan(getCommandName("certs add <cn>[, <cn>]"))}
|
|
148240
149023
|
`
|
|
148241
149024
|
);
|
|
148242
149025
|
return 1;
|
|
@@ -148246,7 +149029,7 @@ async function add(client2, argv) {
|
|
|
148246
149029
|
[]
|
|
148247
149030
|
);
|
|
148248
149031
|
output_manager_default.spinner(
|
|
148249
|
-
`Generating a certificate for ${
|
|
149032
|
+
`Generating a certificate for ${import_chalk56.default.bold(cns.join(", "))}`
|
|
148250
149033
|
);
|
|
148251
149034
|
const { contextName } = await getScope(client2);
|
|
148252
149035
|
cert = await createCertForCns(client2, cns, contextName);
|
|
@@ -148257,18 +149040,18 @@ async function add(client2, argv) {
|
|
|
148257
149040
|
return 1;
|
|
148258
149041
|
} else {
|
|
148259
149042
|
output_manager_default.success(
|
|
148260
|
-
`Certificate entry for ${
|
|
149043
|
+
`Certificate entry for ${import_chalk56.default.bold(
|
|
148261
149044
|
cert.cns.join(", ")
|
|
148262
149045
|
)} created ${addStamp()}`
|
|
148263
149046
|
);
|
|
148264
149047
|
}
|
|
148265
149048
|
return 0;
|
|
148266
149049
|
}
|
|
148267
|
-
var
|
|
149050
|
+
var import_chalk56, add_default;
|
|
148268
149051
|
var init_add2 = __esm({
|
|
148269
149052
|
"src/commands/certs/add.ts"() {
|
|
148270
149053
|
"use strict";
|
|
148271
|
-
|
|
149054
|
+
import_chalk56 = __toESM3(require_source());
|
|
148272
149055
|
init_get_scope();
|
|
148273
149056
|
init_stamp();
|
|
148274
149057
|
init_output_manager();
|
|
@@ -148286,7 +149069,7 @@ var init_add2 = __esm({
|
|
|
148286
149069
|
|
|
148287
149070
|
// src/util/certs/finish-cert-order.ts
|
|
148288
149071
|
async function startCertOrder(client2, cns, context) {
|
|
148289
|
-
output_manager_default.spinner(`Issuing a certificate for ${
|
|
149072
|
+
output_manager_default.spinner(`Issuing a certificate for ${import_chalk57.default.bold(cns.join(", "))}`);
|
|
148290
149073
|
try {
|
|
148291
149074
|
const cert = await client2.fetch("/v3/certs", {
|
|
148292
149075
|
method: "PATCH",
|
|
@@ -148309,11 +149092,11 @@ async function startCertOrder(client2, cns, context) {
|
|
|
148309
149092
|
throw err;
|
|
148310
149093
|
}
|
|
148311
149094
|
}
|
|
148312
|
-
var
|
|
149095
|
+
var import_chalk57;
|
|
148313
149096
|
var init_finish_cert_order = __esm({
|
|
148314
149097
|
"src/util/certs/finish-cert-order.ts"() {
|
|
148315
149098
|
"use strict";
|
|
148316
|
-
|
|
149099
|
+
import_chalk57 = __toESM3(require_source());
|
|
148317
149100
|
init_errors_ts();
|
|
148318
149101
|
init_map_cert_error();
|
|
148319
149102
|
init_output_manager();
|
|
@@ -148333,9 +149116,9 @@ var init_get_cns_from_args = __esm({
|
|
|
148333
149116
|
// src/util/certs/start-cert-order.ts
|
|
148334
149117
|
async function startCertOrder2(client2, cns, contextName) {
|
|
148335
149118
|
output_manager_default.spinner(
|
|
148336
|
-
`Starting certificate issuance for ${
|
|
149119
|
+
`Starting certificate issuance for ${import_chalk58.default.bold(
|
|
148337
149120
|
cns.join(", ")
|
|
148338
|
-
)} under ${
|
|
149121
|
+
)} under ${import_chalk58.default.bold(contextName)}`
|
|
148339
149122
|
);
|
|
148340
149123
|
const order = await client2.fetch("/v3/certs", {
|
|
148341
149124
|
method: "PATCH",
|
|
@@ -148346,11 +149129,11 @@ async function startCertOrder2(client2, cns, contextName) {
|
|
|
148346
149129
|
});
|
|
148347
149130
|
return order;
|
|
148348
149131
|
}
|
|
148349
|
-
var
|
|
149132
|
+
var import_chalk58;
|
|
148350
149133
|
var init_start_cert_order = __esm({
|
|
148351
149134
|
"src/util/certs/start-cert-order.ts"() {
|
|
148352
149135
|
"use strict";
|
|
148353
|
-
|
|
149136
|
+
import_chalk58 = __toESM3(require_source());
|
|
148354
149137
|
init_output_manager();
|
|
148355
149138
|
}
|
|
148356
149139
|
});
|
|
@@ -148420,7 +149203,7 @@ async function issue(client2, argv) {
|
|
|
148420
149203
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
|
148421
149204
|
);
|
|
148422
149205
|
output_manager_default.print(
|
|
148423
|
-
` ${
|
|
149206
|
+
` ${import_chalk59.default.cyan(
|
|
148424
149207
|
getCommandName(
|
|
148425
149208
|
"certs issue --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
|
|
148426
149209
|
)
|
|
@@ -148435,7 +149218,7 @@ async function issue(client2, argv) {
|
|
|
148435
149218
|
return 1;
|
|
148436
149219
|
}
|
|
148437
149220
|
output_manager_default.success(
|
|
148438
|
-
`Certificate entry for ${
|
|
149221
|
+
`Certificate entry for ${import_chalk59.default.bold(
|
|
148439
149222
|
cert.cns.join(", ")
|
|
148440
149223
|
)} created ${addStamp()}`
|
|
148441
149224
|
);
|
|
@@ -148446,7 +149229,7 @@ async function issue(client2, argv) {
|
|
|
148446
149229
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
|
148447
149230
|
);
|
|
148448
149231
|
output_manager_default.print(
|
|
148449
|
-
` ${
|
|
149232
|
+
` ${import_chalk59.default.cyan(getCommandName("certs issue <cn>[, <cn>]"))}
|
|
148450
149233
|
`
|
|
148451
149234
|
);
|
|
148452
149235
|
return 1;
|
|
@@ -148474,14 +149257,14 @@ async function issue(client2, argv) {
|
|
|
148474
149257
|
}
|
|
148475
149258
|
if (handledResult instanceof DomainPermissionDenied) {
|
|
148476
149259
|
output_manager_default.error(
|
|
148477
|
-
`You do not have permissions over domain ${
|
|
149260
|
+
`You do not have permissions over domain ${import_chalk59.default.underline(
|
|
148478
149261
|
handledResult.meta.domain
|
|
148479
|
-
)} under ${
|
|
149262
|
+
)} under ${import_chalk59.default.bold(handledResult.meta.context)}.`
|
|
148480
149263
|
);
|
|
148481
149264
|
return 1;
|
|
148482
149265
|
}
|
|
148483
149266
|
output_manager_default.success(
|
|
148484
|
-
`Certificate entry for ${
|
|
149267
|
+
`Certificate entry for ${import_chalk59.default.bold(
|
|
148485
149268
|
handledResult.cns.join(", ")
|
|
148486
149269
|
)} created ${addStamp()}`
|
|
148487
149270
|
);
|
|
@@ -148503,7 +149286,7 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
|
|
|
148503
149286
|
}
|
|
148504
149287
|
if (pendingChallenges.length === 0) {
|
|
148505
149288
|
output_manager_default.log(
|
|
148506
|
-
`A certificate issuance for ${
|
|
149289
|
+
`A certificate issuance for ${import_chalk59.default.bold(
|
|
148507
149290
|
cns.join(", ")
|
|
148508
149291
|
)} has been started ${stamp()}`
|
|
148509
149292
|
);
|
|
@@ -148512,13 +149295,13 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
|
|
|
148512
149295
|
`
|
|
148513
149296
|
);
|
|
148514
149297
|
output_manager_default.print(
|
|
148515
|
-
` ${
|
|
149298
|
+
` ${import_chalk59.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
|
|
148516
149299
|
`
|
|
148517
149300
|
);
|
|
148518
149301
|
return 0;
|
|
148519
149302
|
}
|
|
148520
149303
|
output_manager_default.log(
|
|
148521
|
-
`A certificate issuance for ${
|
|
149304
|
+
`A certificate issuance for ${import_chalk59.default.bold(
|
|
148522
149305
|
cns.join(", ")
|
|
148523
149306
|
)} has been started ${stamp()}`
|
|
148524
149307
|
);
|
|
@@ -148547,7 +149330,7 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
|
|
|
148547
149330
|
`);
|
|
148548
149331
|
output_manager_default.log(`To issue the certificate once the records are added, run:`);
|
|
148549
149332
|
output_manager_default.print(
|
|
148550
|
-
` ${
|
|
149333
|
+
` ${import_chalk59.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
|
|
148551
149334
|
`
|
|
148552
149335
|
);
|
|
148553
149336
|
output_manager_default.print(
|
|
@@ -148555,11 +149338,11 @@ async function runStartOrder(client2, cns, contextName, stamp, { fallingBack = f
|
|
|
148555
149338
|
);
|
|
148556
149339
|
return 0;
|
|
148557
149340
|
}
|
|
148558
|
-
var
|
|
149341
|
+
var import_chalk59, import_tldts4;
|
|
148559
149342
|
var init_issue2 = __esm({
|
|
148560
149343
|
"src/commands/certs/issue.ts"() {
|
|
148561
149344
|
"use strict";
|
|
148562
|
-
|
|
149345
|
+
import_chalk59 = __toESM3(require_source());
|
|
148563
149346
|
import_tldts4 = __toESM3(require_cjs7());
|
|
148564
149347
|
init_errors_ts();
|
|
148565
149348
|
init_create_cert_for_cns();
|
|
@@ -148651,7 +149434,7 @@ async function ls2(client2, argv) {
|
|
|
148651
149434
|
const lsStamp = stamp_default();
|
|
148652
149435
|
if (args2.length !== 0) {
|
|
148653
149436
|
output_manager_default.error(
|
|
148654
|
-
`Invalid number of arguments. Usage: ${
|
|
149437
|
+
`Invalid number of arguments. Usage: ${import_chalk60.default.cyan(
|
|
148655
149438
|
`${getCommandName("certs ls")}`
|
|
148656
149439
|
)}`
|
|
148657
149440
|
);
|
|
@@ -148660,7 +149443,7 @@ async function ls2(client2, argv) {
|
|
|
148660
149443
|
const { certs, pagination } = await getCerts(client2, ...paginationOptions);
|
|
148661
149444
|
const { contextName } = await getScope(client2);
|
|
148662
149445
|
output_manager_default.log(
|
|
148663
|
-
`${certs.length > 0 ? "Certificates" : "No certificates"} found under ${
|
|
149446
|
+
`${certs.length > 0 ? "Certificates" : "No certificates"} found under ${import_chalk60.default.bold(contextName)} ${lsStamp()}`
|
|
148664
149447
|
);
|
|
148665
149448
|
if (certs.length > 0) {
|
|
148666
149449
|
client2.stdout.write(formatCertsTable(certs));
|
|
@@ -148684,11 +149467,11 @@ function formatCertsTable(certsList) {
|
|
|
148684
149467
|
}
|
|
148685
149468
|
function formatCertsTableHead() {
|
|
148686
149469
|
return [
|
|
148687
|
-
|
|
148688
|
-
|
|
148689
|
-
|
|
148690
|
-
|
|
148691
|
-
|
|
149470
|
+
import_chalk60.default.dim("id"),
|
|
149471
|
+
import_chalk60.default.dim("cns"),
|
|
149472
|
+
import_chalk60.default.dim("expiration"),
|
|
149473
|
+
import_chalk60.default.dim("renew"),
|
|
149474
|
+
import_chalk60.default.dim("age")
|
|
148692
149475
|
];
|
|
148693
149476
|
}
|
|
148694
149477
|
function formatCertsTableBody(certsList) {
|
|
@@ -148707,7 +149490,7 @@ function formatCertNonFirstCn(cn, multiple) {
|
|
|
148707
149490
|
return ["", formatCertCn(cn, multiple), "", "", ""];
|
|
148708
149491
|
}
|
|
148709
149492
|
function formatCertCn(cn, multiple) {
|
|
148710
|
-
return multiple ? `${
|
|
149493
|
+
return multiple ? `${import_chalk60.default.gray("-")} ${import_chalk60.default.bold(cn)}` : import_chalk60.default.bold(cn);
|
|
148711
149494
|
}
|
|
148712
149495
|
function formatCertFirstCn(time, cert, cn, multiple) {
|
|
148713
149496
|
return [
|
|
@@ -148715,18 +149498,18 @@ function formatCertFirstCn(time, cert, cn, multiple) {
|
|
|
148715
149498
|
formatCertCn(cn, multiple),
|
|
148716
149499
|
formatExpirationDate(new Date(cert.expiration)),
|
|
148717
149500
|
cert.autoRenew ? "yes" : "no",
|
|
148718
|
-
|
|
149501
|
+
import_chalk60.default.gray((0, import_ms7.default)(time.getTime() - new Date(cert.created).getTime()))
|
|
148719
149502
|
];
|
|
148720
149503
|
}
|
|
148721
149504
|
function formatExpirationDate(date) {
|
|
148722
149505
|
const diff = date.getTime() - Date.now();
|
|
148723
|
-
return diff < 0 ?
|
|
149506
|
+
return diff < 0 ? import_chalk60.default.gray(`${(0, import_ms7.default)(-diff)} ago`) : import_chalk60.default.gray(`in ${(0, import_ms7.default)(diff)}`);
|
|
148724
149507
|
}
|
|
148725
|
-
var
|
|
149508
|
+
var import_chalk60, import_ms7, ls_default;
|
|
148726
149509
|
var init_ls3 = __esm({
|
|
148727
149510
|
"src/commands/certs/ls.ts"() {
|
|
148728
149511
|
"use strict";
|
|
148729
|
-
|
|
149512
|
+
import_chalk60 = __toESM3(require_source());
|
|
148730
149513
|
import_ms7 = __toESM3(require_ms());
|
|
148731
149514
|
init_table();
|
|
148732
149515
|
init_get_scope();
|
|
@@ -148779,7 +149562,7 @@ var init_get_cert_by_id = __esm({
|
|
|
148779
149562
|
async function getCustomCertsForDomain(client2, context, domain) {
|
|
148780
149563
|
try {
|
|
148781
149564
|
const { certs } = await client2.fetch(
|
|
148782
|
-
`/v5/now/certs?${(0,
|
|
149565
|
+
`/v5/now/certs?${(0, import_querystring.stringify)({ domain, custom: true })}`
|
|
148783
149566
|
);
|
|
148784
149567
|
return certs;
|
|
148785
149568
|
} catch (err) {
|
|
@@ -148789,11 +149572,11 @@ async function getCustomCertsForDomain(client2, context, domain) {
|
|
|
148789
149572
|
throw err;
|
|
148790
149573
|
}
|
|
148791
149574
|
}
|
|
148792
|
-
var
|
|
149575
|
+
var import_querystring;
|
|
148793
149576
|
var init_get_custom_certs_for_domain = __esm({
|
|
148794
149577
|
"src/util/certs/get-custom-certs-for-domain.ts"() {
|
|
148795
149578
|
"use strict";
|
|
148796
|
-
|
|
149579
|
+
import_querystring = require("querystring");
|
|
148797
149580
|
init_errors_ts();
|
|
148798
149581
|
}
|
|
148799
149582
|
});
|
|
@@ -148839,7 +149622,7 @@ async function rm2(client2, argv) {
|
|
|
148839
149622
|
telemetry2.trackCliArgumentId(id);
|
|
148840
149623
|
if (args2.length !== 1) {
|
|
148841
149624
|
output_manager_default.error(
|
|
148842
|
-
`Invalid number of arguments. Usage: ${
|
|
149625
|
+
`Invalid number of arguments. Usage: ${import_chalk61.default.cyan(
|
|
148843
149626
|
`${getCommandName("certs rm <id or cn>")}`
|
|
148844
149627
|
)}`
|
|
148845
149628
|
);
|
|
@@ -148856,13 +149639,13 @@ async function rm2(client2, argv) {
|
|
|
148856
149639
|
if (certs.length === 0) {
|
|
148857
149640
|
if (id.includes(".")) {
|
|
148858
149641
|
output_manager_default.error(
|
|
148859
|
-
`No custom certificates found for "${id}" under ${
|
|
149642
|
+
`No custom certificates found for "${id}" under ${import_chalk61.default.bold(
|
|
148860
149643
|
contextName
|
|
148861
149644
|
)}`
|
|
148862
149645
|
);
|
|
148863
149646
|
} else {
|
|
148864
149647
|
output_manager_default.error(
|
|
148865
|
-
`No certificates found by id "${id}" under ${
|
|
149648
|
+
`No certificates found by id "${id}" under ${import_chalk61.default.bold(contextName)}`
|
|
148866
149649
|
);
|
|
148867
149650
|
}
|
|
148868
149651
|
return 1;
|
|
@@ -148877,7 +149660,7 @@ async function rm2(client2, argv) {
|
|
|
148877
149660
|
}
|
|
148878
149661
|
await Promise.all(certs.map((cert) => deleteCertById(client2, cert.uid)));
|
|
148879
149662
|
output_manager_default.success(
|
|
148880
|
-
`${
|
|
149663
|
+
`${import_chalk61.default.bold(
|
|
148881
149664
|
(0, import_pluralize7.default)("Certificate", certs.length, true)
|
|
148882
149665
|
)} removed ${rmStamp()}`
|
|
148883
149666
|
);
|
|
@@ -148905,7 +149688,7 @@ function readConfirmation(client2, msg, certs) {
|
|
|
148905
149688
|
`
|
|
148906
149689
|
);
|
|
148907
149690
|
output_manager_default.print(
|
|
148908
|
-
`${
|
|
149691
|
+
`${import_chalk61.default.bold.red("> Are you sure?")} ${import_chalk61.default.gray("(y/N) ")}`
|
|
148909
149692
|
);
|
|
148910
149693
|
client2.stdin.on("data", (d) => {
|
|
148911
149694
|
process.stdin.pause();
|
|
@@ -148916,15 +149699,15 @@ function readConfirmation(client2, msg, certs) {
|
|
|
148916
149699
|
function formatCertRow(cert) {
|
|
148917
149700
|
return [
|
|
148918
149701
|
cert.uid,
|
|
148919
|
-
|
|
148920
|
-
...cert.created ? [
|
|
149702
|
+
import_chalk61.default.bold(cert.cns ? cert.cns.join(", ") : "\u2013"),
|
|
149703
|
+
...cert.created ? [import_chalk61.default.gray(`${(0, import_ms8.default)(Date.now() - new Date(cert.created).getTime())} ago`)] : []
|
|
148921
149704
|
];
|
|
148922
149705
|
}
|
|
148923
|
-
var
|
|
149706
|
+
var import_chalk61, import_ms8, import_pluralize7, rm_default;
|
|
148924
149707
|
var init_rm2 = __esm({
|
|
148925
149708
|
"src/commands/certs/rm.ts"() {
|
|
148926
149709
|
"use strict";
|
|
148927
|
-
|
|
149710
|
+
import_chalk61 = __toESM3(require_source());
|
|
148928
149711
|
import_ms8 = __toESM3(require_ms());
|
|
148929
149712
|
import_pluralize7 = __toESM3(require_pluralize());
|
|
148930
149713
|
init_table();
|
|
@@ -149170,7 +149953,7 @@ var require_jsonlines = __commonJS2({
|
|
|
149170
149953
|
exports2.parse = function parse11(options) {
|
|
149171
149954
|
return new Parser(options);
|
|
149172
149955
|
};
|
|
149173
|
-
exports2.stringify = function
|
|
149956
|
+
exports2.stringify = function stringify2() {
|
|
149174
149957
|
return new Stringifier();
|
|
149175
149958
|
};
|
|
149176
149959
|
}
|
|
@@ -149481,7 +150264,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
|
149481
150264
|
const timeout = setTimeout(() => {
|
|
149482
150265
|
abortController.abort();
|
|
149483
150266
|
warn(
|
|
149484
|
-
`${
|
|
150267
|
+
`${import_chalk62.default.bold(
|
|
149485
150268
|
`Command automatically interrupted after ${CommandTimeout}.`
|
|
149486
150269
|
)}
|
|
149487
150270
|
`
|
|
@@ -149523,7 +150306,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
|
149523
150306
|
stopSpinner();
|
|
149524
150307
|
if (isRuntimeLimitDelimiter(log3)) {
|
|
149525
150308
|
abortController.abort();
|
|
149526
|
-
warn(`${
|
|
150309
|
+
warn(`${import_chalk62.default.bold(log3.message)}
|
|
149527
150310
|
`);
|
|
149528
150311
|
return;
|
|
149529
150312
|
}
|
|
@@ -149560,7 +150343,7 @@ function printBuildLog(log2, print) {
|
|
|
149560
150343
|
return;
|
|
149561
150344
|
const date = new Date(log2.created).toISOString();
|
|
149562
150345
|
for (const line of colorize(sanitize(log2), log2).split("\n")) {
|
|
149563
|
-
print(`${
|
|
150346
|
+
print(`${import_chalk62.default.dim(date)} ${line.replace("[now-builder-debug] ", "")}
|
|
149564
150347
|
`);
|
|
149565
150348
|
}
|
|
149566
150349
|
}
|
|
@@ -149585,9 +150368,9 @@ function prettyPrintLogline({
|
|
|
149585
150368
|
const date = (0, import_date_fns2.format)(timestampInMs, dateTimeFormat);
|
|
149586
150369
|
const levelIcon = getLevelIcon(level);
|
|
149587
150370
|
const sourceIcon = getSourceIcon(source);
|
|
149588
|
-
const detailsLine = `${
|
|
150371
|
+
const detailsLine = `${import_chalk62.default.dim(date)} ${levelIcon} ${import_chalk62.default.bold(
|
|
149589
150372
|
method
|
|
149590
|
-
)} ${
|
|
150373
|
+
)} ${import_chalk62.default.grey(status3 <= 0 ? "---" : status3)} ${import_chalk62.default.dim(
|
|
149591
150374
|
domain
|
|
149592
150375
|
)} ${sourceIcon} ${path11}`;
|
|
149593
150376
|
print(
|
|
@@ -149628,17 +150411,17 @@ function sanitize(log2) {
|
|
|
149628
150411
|
}
|
|
149629
150412
|
function colorize(text, log2) {
|
|
149630
150413
|
if (log2.level === "error") {
|
|
149631
|
-
return
|
|
150414
|
+
return import_chalk62.default.red(text);
|
|
149632
150415
|
} else if (log2.level === "warning") {
|
|
149633
|
-
return
|
|
150416
|
+
return import_chalk62.default.yellow(text);
|
|
149634
150417
|
}
|
|
149635
150418
|
return text;
|
|
149636
150419
|
}
|
|
149637
|
-
var
|
|
150420
|
+
var import_chalk62, import_date_fns2, import_ms9, import_jsonlines2, import_split2, import_url11, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
|
|
149638
150421
|
var init_logs = __esm({
|
|
149639
150422
|
"src/util/logs.ts"() {
|
|
149640
150423
|
"use strict";
|
|
149641
|
-
|
|
150424
|
+
import_chalk62 = __toESM3(require_source());
|
|
149642
150425
|
import_date_fns2 = __toESM3(require_date_fns());
|
|
149643
150426
|
import_ms9 = __toESM3(require_ms());
|
|
149644
150427
|
import_jsonlines2 = __toESM3(require_jsonlines());
|
|
@@ -149677,7 +150460,7 @@ function printInspectUrl(inspectorUrl, deployStamp) {
|
|
|
149677
150460
|
}
|
|
149678
150461
|
output_manager_default.print(
|
|
149679
150462
|
prependEmoji(
|
|
149680
|
-
`Inspect: ${
|
|
150463
|
+
`Inspect: ${import_chalk63.default.bold(inspectorUrl)} ${deployStamp()}`,
|
|
149681
150464
|
emoji("inspect")
|
|
149682
150465
|
) + `
|
|
149683
150466
|
`
|
|
@@ -149729,7 +150512,7 @@ async function processDeployment({
|
|
|
149729
150512
|
agent,
|
|
149730
150513
|
projectName
|
|
149731
150514
|
};
|
|
149732
|
-
const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${
|
|
150515
|
+
const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk63.default.bold(`${org.slug}/${projectName}`)}`;
|
|
149733
150516
|
output_manager_default.spinner(deployingSpinnerVal, 0);
|
|
149734
150517
|
const indications = [];
|
|
149735
150518
|
let abortController;
|
|
@@ -149766,7 +150549,7 @@ async function processDeployment({
|
|
|
149766
150549
|
const percent = uploadedBytes / missingSize;
|
|
149767
150550
|
if (percent >= nextStep) {
|
|
149768
150551
|
output_manager_default.spinner(
|
|
149769
|
-
`Uploading ${
|
|
150552
|
+
`Uploading ${import_chalk63.default.reset(
|
|
149770
150553
|
`[${bar}] (${uploadedHuman}/${totalSizeHuman})`
|
|
149771
150554
|
)}`,
|
|
149772
150555
|
0
|
|
@@ -149794,7 +150577,7 @@ async function processDeployment({
|
|
|
149794
150577
|
const previewUrl = `https://${deployment.url}`;
|
|
149795
150578
|
output_manager_default.print(
|
|
149796
150579
|
prependEmoji(
|
|
149797
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
|
150580
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk63.default.bold(
|
|
149798
150581
|
previewUrl
|
|
149799
150582
|
)} ${deployStamp()}`,
|
|
149800
150583
|
emoji("success")
|
|
@@ -149891,14 +150674,14 @@ ${archiveSuggestionText}`
|
|
|
149891
150674
|
}
|
|
149892
150675
|
}
|
|
149893
150676
|
}
|
|
149894
|
-
var import_client7, import_error_utils18, import_bytes4,
|
|
150677
|
+
var import_client7, import_error_utils18, import_bytes4, import_chalk63, archiveSuggestionText, UploadErrorMissingArchive;
|
|
149895
150678
|
var init_process_deployment = __esm({
|
|
149896
150679
|
"src/util/deploy/process-deployment.ts"() {
|
|
149897
150680
|
"use strict";
|
|
149898
150681
|
import_client7 = __toESM3(require_dist7());
|
|
149899
150682
|
import_error_utils18 = __toESM3(require_dist2());
|
|
149900
150683
|
import_bytes4 = __toESM3(require_bytes());
|
|
149901
|
-
|
|
150684
|
+
import_chalk63 = __toESM3(require_source());
|
|
149902
150685
|
init_emoji();
|
|
149903
150686
|
init_logs();
|
|
149904
150687
|
init_progress();
|
|
@@ -149916,17 +150699,17 @@ var init_process_deployment = __esm({
|
|
|
149916
150699
|
});
|
|
149917
150700
|
|
|
149918
150701
|
// src/util/index.ts
|
|
149919
|
-
var
|
|
150702
|
+
var import_querystring2, import_url12, import_async_retry5, import_ms10, import_node_fetch4, import_bytes5, import_chalk64, Now;
|
|
149920
150703
|
var init_util = __esm({
|
|
149921
150704
|
"src/util/index.ts"() {
|
|
149922
150705
|
"use strict";
|
|
149923
|
-
|
|
150706
|
+
import_querystring2 = __toESM3(require("querystring"));
|
|
149924
150707
|
import_url12 = require("url");
|
|
149925
150708
|
import_async_retry5 = __toESM3(require_dist5());
|
|
149926
150709
|
import_ms10 = __toESM3(require_ms());
|
|
149927
150710
|
import_node_fetch4 = __toESM3(require_lib7());
|
|
149928
150711
|
import_bytes5 = __toESM3(require_bytes());
|
|
149929
|
-
|
|
150712
|
+
import_chalk64 = __toESM3(require_source());
|
|
149930
150713
|
init_ua();
|
|
149931
150714
|
init_process_deployment();
|
|
149932
150715
|
init_error2();
|
|
@@ -150039,7 +150822,7 @@ var init_util = __esm({
|
|
|
150039
150822
|
if (sizeExceeded > 0) {
|
|
150040
150823
|
warn(`${sizeExceeded} of the files exceeded the limit for your plan.`);
|
|
150041
150824
|
log2(
|
|
150042
|
-
`Please upgrade your plan here: ${
|
|
150825
|
+
`Please upgrade your plan here: ${import_chalk64.default.cyan(
|
|
150043
150826
|
"https://vercel.com/account/plan"
|
|
150044
150827
|
)}`
|
|
150045
150828
|
);
|
|
@@ -150139,7 +150922,7 @@ ${err.stack}`);
|
|
|
150139
150922
|
const parsedUrl = (0, import_url12.parse)(_url, true);
|
|
150140
150923
|
const query = parsedUrl.query;
|
|
150141
150924
|
query.teamId = this.currentTeam;
|
|
150142
|
-
_url = `${parsedUrl.pathname}?${
|
|
150925
|
+
_url = `${parsedUrl.pathname}?${import_querystring2.default.stringify(query)}`;
|
|
150143
150926
|
delete opts.useCurrentTeam;
|
|
150144
150927
|
}
|
|
150145
150928
|
opts.headers = new import_node_fetch4.Headers(opts.headers);
|
|
@@ -150377,7 +151160,7 @@ var init_is_deploying = __esm({
|
|
|
150377
151160
|
// src/util/suggest-next-commands.ts
|
|
150378
151161
|
function suggestNextCommands(commands2) {
|
|
150379
151162
|
output_manager_default.print(
|
|
150380
|
-
|
|
151163
|
+
import_chalk65.default.dim(
|
|
150381
151164
|
[
|
|
150382
151165
|
`Common next commands:`,
|
|
150383
151166
|
...commands2.map((command) => `- ${command}`)
|
|
@@ -150386,12 +151169,12 @@ function suggestNextCommands(commands2) {
|
|
|
150386
151169
|
);
|
|
150387
151170
|
output_manager_default.print("\n");
|
|
150388
151171
|
}
|
|
150389
|
-
var
|
|
151172
|
+
var import_chalk65;
|
|
150390
151173
|
var init_suggest_next_commands = __esm({
|
|
150391
151174
|
"src/util/suggest-next-commands.ts"() {
|
|
150392
151175
|
"use strict";
|
|
150393
151176
|
init_output_manager();
|
|
150394
|
-
|
|
151177
|
+
import_chalk65 = __toESM3(require_source());
|
|
150395
151178
|
}
|
|
150396
151179
|
});
|
|
150397
151180
|
|
|
@@ -150438,10 +151221,10 @@ async function printDeploymentStatus({
|
|
|
150438
151221
|
}
|
|
150439
151222
|
const newline = "\n";
|
|
150440
151223
|
for (const indication of indications) {
|
|
150441
|
-
const message2 = prependEmoji(
|
|
151224
|
+
const message2 = prependEmoji(import_chalk66.default.dim(indication.payload), emoji(indication.type)) + newline;
|
|
150442
151225
|
let link4 = "";
|
|
150443
151226
|
if (indication.link)
|
|
150444
|
-
link4 =
|
|
151227
|
+
link4 = import_chalk66.default.dim(
|
|
150445
151228
|
`${indication.action || "Learn More"}: ${link_default(indication.link)}`
|
|
150446
151229
|
) + newline;
|
|
150447
151230
|
output_manager_default.print(message2 + link4);
|
|
@@ -150458,11 +151241,11 @@ async function printDeploymentStatus({
|
|
|
150458
151241
|
}
|
|
150459
151242
|
return 0;
|
|
150460
151243
|
}
|
|
150461
|
-
var
|
|
151244
|
+
var import_chalk66;
|
|
150462
151245
|
var init_print_deployment_status = __esm({
|
|
150463
151246
|
"src/util/deploy/print-deployment-status.ts"() {
|
|
150464
151247
|
"use strict";
|
|
150465
|
-
|
|
151248
|
+
import_chalk66 = __toESM3(require_source());
|
|
150466
151249
|
init_is_deploying();
|
|
150467
151250
|
init_link();
|
|
150468
151251
|
init_emoji();
|
|
@@ -150687,7 +151470,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
150687
151470
|
}
|
|
150688
151471
|
if (error3 instanceof DomainVerificationFailed) {
|
|
150689
151472
|
output_manager_default.error(
|
|
150690
|
-
`The domain used as a suffix ${
|
|
151473
|
+
`The domain used as a suffix ${import_chalk67.default.underline(
|
|
150691
151474
|
error3.meta.domain
|
|
150692
151475
|
)} is not verified and can't be used as custom suffix.`
|
|
150693
151476
|
);
|
|
@@ -150695,7 +151478,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
150695
151478
|
}
|
|
150696
151479
|
if (error3 instanceof DomainPermissionDenied) {
|
|
150697
151480
|
output_manager_default.error(
|
|
150698
|
-
`You don't have permissions to access the domain used as a suffix ${
|
|
151481
|
+
`You don't have permissions to access the domain used as a suffix ${import_chalk67.default.underline(
|
|
150699
151482
|
error3.meta.domain
|
|
150700
151483
|
)}.`
|
|
150701
151484
|
);
|
|
@@ -150721,7 +151504,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
150721
151504
|
}
|
|
150722
151505
|
if (error3 instanceof DomainNotVerified) {
|
|
150723
151506
|
output_manager_default.error(
|
|
150724
|
-
`The domain used as an alias ${
|
|
151507
|
+
`The domain used as an alias ${import_chalk67.default.underline(
|
|
150725
151508
|
error3.meta.domain
|
|
150726
151509
|
)} is not verified yet. Please verify it.`
|
|
150727
151510
|
);
|
|
@@ -150740,7 +151523,7 @@ function handleCreateDeployError(error3, localConfig) {
|
|
|
150740
151523
|
}
|
|
150741
151524
|
return error3;
|
|
150742
151525
|
}
|
|
150743
|
-
var import_build_utils14, import_client11, import_error_utils19, import_bytes6,
|
|
151526
|
+
var import_build_utils14, import_client11, import_error_utils19, import_bytes6, import_chalk67, import_fs_extra20, import_ms11, import_path31, import_detect_agent, deploy_default, addProcessEnv;
|
|
150744
151527
|
var init_deploy2 = __esm({
|
|
150745
151528
|
"src/commands/deploy/index.ts"() {
|
|
150746
151529
|
"use strict";
|
|
@@ -150748,7 +151531,7 @@ var init_deploy2 = __esm({
|
|
|
150748
151531
|
import_client11 = __toESM3(require_dist7());
|
|
150749
151532
|
import_error_utils19 = __toESM3(require_dist2());
|
|
150750
151533
|
import_bytes6 = __toESM3(require_bytes());
|
|
150751
|
-
|
|
151534
|
+
import_chalk67 = __toESM3(require_source());
|
|
150752
151535
|
import_fs_extra20 = __toESM3(require_lib());
|
|
150753
151536
|
import_ms11 = __toESM3(require_ms());
|
|
150754
151537
|
import_path31 = require("path");
|
|
@@ -151280,15 +152063,15 @@ ${err.stack}`);
|
|
|
151280
152063
|
val = process.env[key];
|
|
151281
152064
|
if (typeof val === "string") {
|
|
151282
152065
|
log2(
|
|
151283
|
-
`Reading ${
|
|
151284
|
-
`"${
|
|
152066
|
+
`Reading ${import_chalk67.default.bold(
|
|
152067
|
+
`"${import_chalk67.default.bold(key)}"`
|
|
151285
152068
|
)} from your env (as no value was specified)`
|
|
151286
152069
|
);
|
|
151287
152070
|
env[key] = val.replace(/^@/, "\\@");
|
|
151288
152071
|
} else {
|
|
151289
152072
|
throw new Error(
|
|
151290
|
-
`No value specified for env variable ${
|
|
151291
|
-
`"${
|
|
152073
|
+
`No value specified for env variable ${import_chalk67.default.bold(
|
|
152074
|
+
`"${import_chalk67.default.bold(key)}"`
|
|
151292
152075
|
)} and it was not found in your env. If you meant to specify an environment to deploy to, use ${param("--target")}`
|
|
151293
152076
|
);
|
|
151294
152077
|
}
|
|
@@ -155998,7 +156781,7 @@ var require_requires_port = __commonJS2({
|
|
|
155998
156781
|
});
|
|
155999
156782
|
|
|
156000
156783
|
// ../../node_modules/.pnpm/http-proxy@1.18.1_debug@3.1.0/node_modules/http-proxy/lib/http-proxy/common.js
|
|
156001
|
-
var
|
|
156784
|
+
var require_common12 = __commonJS2({
|
|
156002
156785
|
"../../node_modules/.pnpm/http-proxy@1.18.1_debug@3.1.0/node_modules/http-proxy/lib/http-proxy/common.js"(exports2) {
|
|
156003
156786
|
var common2 = exports2;
|
|
156004
156787
|
var url3 = require("url");
|
|
@@ -156111,7 +156894,7 @@ var require_common11 = __commonJS2({
|
|
|
156111
156894
|
var require_web_outgoing = __commonJS2({
|
|
156112
156895
|
"../../node_modules/.pnpm/http-proxy@1.18.1_debug@3.1.0/node_modules/http-proxy/lib/http-proxy/passes/web-outgoing.js"(exports2, module2) {
|
|
156113
156896
|
var url3 = require("url");
|
|
156114
|
-
var common2 =
|
|
156897
|
+
var common2 = require_common12();
|
|
156115
156898
|
var redirectRegex = /^201|30(1|2|7|8)$/;
|
|
156116
156899
|
module2.exports = {
|
|
156117
156900
|
// <--
|
|
@@ -156461,7 +157244,7 @@ var require_debug4 = __commonJS2({
|
|
|
156461
157244
|
});
|
|
156462
157245
|
|
|
156463
157246
|
// ../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/browser.js
|
|
156464
|
-
var
|
|
157247
|
+
var require_browser4 = __commonJS2({
|
|
156465
157248
|
"../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
156466
157249
|
exports2 = module2.exports = require_debug4();
|
|
156467
157250
|
exports2.log = log2;
|
|
@@ -156622,7 +157405,7 @@ var require_browser3 = __commonJS2({
|
|
|
156622
157405
|
});
|
|
156623
157406
|
|
|
156624
157407
|
// ../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/node.js
|
|
156625
|
-
var
|
|
157408
|
+
var require_node6 = __commonJS2({
|
|
156626
157409
|
"../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/node.js"(exports2, module2) {
|
|
156627
157410
|
var tty = require("tty");
|
|
156628
157411
|
var util = require("util");
|
|
@@ -156795,12 +157578,12 @@ var require_node5 = __commonJS2({
|
|
|
156795
157578
|
});
|
|
156796
157579
|
|
|
156797
157580
|
// ../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/index.js
|
|
156798
|
-
var
|
|
157581
|
+
var require_src3 = __commonJS2({
|
|
156799
157582
|
"../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/index.js"(exports2, module2) {
|
|
156800
157583
|
if (typeof process === "undefined" || process.type === "renderer") {
|
|
156801
|
-
module2.exports =
|
|
157584
|
+
module2.exports = require_browser4();
|
|
156802
157585
|
} else {
|
|
156803
|
-
module2.exports =
|
|
157586
|
+
module2.exports = require_node6();
|
|
156804
157587
|
}
|
|
156805
157588
|
}
|
|
156806
157589
|
});
|
|
@@ -156812,7 +157595,7 @@ var require_debug5 = __commonJS2({
|
|
|
156812
157595
|
module2.exports = function() {
|
|
156813
157596
|
if (!debug2) {
|
|
156814
157597
|
try {
|
|
156815
|
-
debug2 =
|
|
157598
|
+
debug2 = require_src3()("follow-redirects");
|
|
156816
157599
|
} catch (error3) {
|
|
156817
157600
|
}
|
|
156818
157601
|
if (typeof debug2 !== "function") {
|
|
@@ -157327,7 +158110,7 @@ var require_web_incoming = __commonJS2({
|
|
|
157327
158110
|
var httpNative = require("http");
|
|
157328
158111
|
var httpsNative = require("https");
|
|
157329
158112
|
var web_o = require_web_outgoing();
|
|
157330
|
-
var common2 =
|
|
158113
|
+
var common2 = require_common12();
|
|
157331
158114
|
var followRedirects = require_follow_redirects();
|
|
157332
158115
|
web_o = Object.keys(web_o).map(function(pass) {
|
|
157333
158116
|
return web_o[pass];
|
|
@@ -157480,7 +158263,7 @@ var require_ws_incoming = __commonJS2({
|
|
|
157480
158263
|
"../../node_modules/.pnpm/http-proxy@1.18.1_debug@3.1.0/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js"(exports2, module2) {
|
|
157481
158264
|
var http3 = require("http");
|
|
157482
158265
|
var https = require("https");
|
|
157483
|
-
var common2 =
|
|
158266
|
+
var common2 = require_common12();
|
|
157484
158267
|
module2.exports = {
|
|
157485
158268
|
/**
|
|
157486
158269
|
* WebSocket requests must have the `GET` method and
|
|
@@ -166925,7 +167708,7 @@ var require_error4 = __commonJS2({
|
|
|
166925
167708
|
});
|
|
166926
167709
|
|
|
166927
167710
|
// ../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js
|
|
166928
|
-
var
|
|
167711
|
+
var require_src4 = __commonJS2({
|
|
166929
167712
|
"../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2, module2) {
|
|
166930
167713
|
var { promisify: promisify3 } = require("util");
|
|
166931
167714
|
var path11 = require("path");
|
|
@@ -168392,10 +169175,10 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
|
|
|
168392
169175
|
if (src[0] === "/") {
|
|
168393
169176
|
src = src.substring(1);
|
|
168394
169177
|
}
|
|
168395
|
-
if (buildConfig.config?.framework === "hono" || buildConfig.config?.framework === "express" || buildConfig.config?.framework === "h3") {
|
|
169178
|
+
if (buildConfig.config?.framework === "hono" || buildConfig.config?.framework === "express" || buildConfig.config?.framework === "h3" || buildConfig.config?.framework === "nestjs") {
|
|
168396
169179
|
src = "package.json";
|
|
168397
169180
|
}
|
|
168398
|
-
if (buildConfig.config?.framework === "fastapi") {
|
|
169181
|
+
if (buildConfig.config?.framework === "fastapi" || buildConfig.config?.framework === "flask") {
|
|
168399
169182
|
const candidateDirs = ["", "src", "app"];
|
|
168400
169183
|
const candidateNames = ["app", "index", "server", "main"];
|
|
168401
169184
|
const candidates = [];
|
|
@@ -169044,7 +169827,7 @@ function buildMatchEquals(a, b) {
|
|
|
169044
169827
|
return false;
|
|
169045
169828
|
return true;
|
|
169046
169829
|
}
|
|
169047
|
-
var import_url15, import_http3, import_fs_extra21, import_ms13,
|
|
169830
|
+
var import_url15, import_http3, import_fs_extra21, import_ms13, import_chalk68, import_node_fetch6, import_pluralize9, 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;
|
|
169048
169831
|
var init_server = __esm({
|
|
169049
169832
|
"src/util/dev/server.ts"() {
|
|
169050
169833
|
"use strict";
|
|
@@ -169052,7 +169835,7 @@ var init_server = __esm({
|
|
|
169052
169835
|
import_http3 = __toESM3(require("http"));
|
|
169053
169836
|
import_fs_extra21 = __toESM3(require_lib());
|
|
169054
169837
|
import_ms13 = __toESM3(require_ms());
|
|
169055
|
-
|
|
169838
|
+
import_chalk68 = __toESM3(require_source());
|
|
169056
169839
|
import_node_fetch6 = __toESM3(require_lib7());
|
|
169057
169840
|
import_pluralize9 = __toESM3(require_pluralize());
|
|
169058
169841
|
import_raw_body = __toESM3(require_raw_body());
|
|
@@ -169060,7 +169843,7 @@ var init_server = __esm({
|
|
|
169060
169843
|
import_minimatch4 = __toESM3(require_minimatch2());
|
|
169061
169844
|
import_http_proxy = __toESM3(require_http_proxy3());
|
|
169062
169845
|
import_crypto2 = require("crypto");
|
|
169063
|
-
import_serve_handler = __toESM3(
|
|
169846
|
+
import_serve_handler = __toESM3(require_src4());
|
|
169064
169847
|
import_chokidar = require("chokidar");
|
|
169065
169848
|
import_dotenv2 = __toESM3(require_main3());
|
|
169066
169849
|
import_path35 = __toESM3(require("path"));
|
|
@@ -169130,7 +169913,7 @@ var init_server = __esm({
|
|
|
169130
169913
|
return;
|
|
169131
169914
|
}
|
|
169132
169915
|
const method = req.method || "GET";
|
|
169133
|
-
output_manager_default.debug(`${
|
|
169916
|
+
output_manager_default.debug(`${import_chalk68.default.bold(method)} ${req.url}`);
|
|
169134
169917
|
try {
|
|
169135
169918
|
const vercelConfig = await this.getVercelConfig();
|
|
169136
169919
|
await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
|
|
@@ -169332,7 +170115,7 @@ var init_server = __esm({
|
|
|
169332
170115
|
}
|
|
169333
170116
|
} catch (err) {
|
|
169334
170117
|
if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
|
|
169335
|
-
err.message = `Command not found: ${
|
|
170118
|
+
err.message = `Command not found: ${import_chalk68.default.cyan(
|
|
169336
170119
|
err.path,
|
|
169337
170120
|
...err.spawnargs
|
|
169338
170121
|
)}
|
|
@@ -169589,7 +170372,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
169589
170372
|
});
|
|
169590
170373
|
} catch (err) {
|
|
169591
170374
|
if ((0, import_error_utils20.isSpawnError)(err) && err.code === "ENOENT") {
|
|
169592
|
-
err.message = `Command not found: ${
|
|
170375
|
+
err.message = `Command not found: ${import_chalk68.default.cyan(
|
|
169593
170376
|
err.path,
|
|
169594
170377
|
...err.spawnargs
|
|
169595
170378
|
)}
|
|
@@ -170289,10 +171072,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
170289
171072
|
*/
|
|
170290
171073
|
async _start(...listenSpec) {
|
|
170291
171074
|
if (!import_fs_extra21.default.existsSync(this.cwd)) {
|
|
170292
|
-
throw new Error(`${
|
|
171075
|
+
throw new Error(`${import_chalk68.default.bold(this.cwd)} doesn't exist`);
|
|
170293
171076
|
}
|
|
170294
171077
|
if (!import_fs_extra21.default.lstatSync(this.cwd).isDirectory()) {
|
|
170295
|
-
throw new Error(`${
|
|
171078
|
+
throw new Error(`${import_chalk68.default.bold(this.cwd)} is not a directory`);
|
|
170296
171079
|
}
|
|
170297
171080
|
const { ig } = await (0, import_client12.getVercelIgnore)(this.cwd);
|
|
170298
171081
|
this.filter = ig.createFilter();
|
|
@@ -170306,14 +171089,14 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
|
170306
171089
|
if (err.code === "EADDRINUSE") {
|
|
170307
171090
|
if (typeof listenSpec[0] === "number") {
|
|
170308
171091
|
output_manager_default.note(
|
|
170309
|
-
`Requested port ${
|
|
171092
|
+
`Requested port ${import_chalk68.default.yellow(
|
|
170310
171093
|
String(listenSpec[0])
|
|
170311
171094
|
)} is already in use`
|
|
170312
171095
|
);
|
|
170313
171096
|
listenSpec[0]++;
|
|
170314
171097
|
} else {
|
|
170315
171098
|
output_manager_default.error(
|
|
170316
|
-
`Requested socket ${
|
|
171099
|
+
`Requested socket ${import_chalk68.default.cyan(
|
|
170317
171100
|
listenSpec[0]
|
|
170318
171101
|
)} is already in use`
|
|
170319
171102
|
);
|
|
@@ -170705,7 +171488,7 @@ ${error_code}
|
|
|
170705
171488
|
if (this.devProcess) {
|
|
170706
171489
|
await treeKill(this.devProcess.pid);
|
|
170707
171490
|
}
|
|
170708
|
-
output_manager_default.log(`Running Dev Command ${
|
|
171491
|
+
output_manager_default.log(`Running Dev Command ${import_chalk68.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`);
|
|
170709
171492
|
const port = await (0, import_get_port.default)();
|
|
170710
171493
|
const env = (0, import_build_utils17.cloneEnv)(
|
|
170711
171494
|
{
|
|
@@ -170944,7 +171727,7 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
170944
171727
|
envValues,
|
|
170945
171728
|
"vercel-cli:dev"
|
|
170946
171729
|
)) {
|
|
170947
|
-
output_manager_default.debug(`Refreshing ${
|
|
171730
|
+
output_manager_default.debug(`Refreshing ${import_chalk69.default.green(VERCEL_OIDC_TOKEN)}`);
|
|
170948
171731
|
envValues[VERCEL_OIDC_TOKEN] = token;
|
|
170949
171732
|
await devServer.runDevCommand(true);
|
|
170950
171733
|
telemetry2.trackOidcTokenRefresh(++refreshCount);
|
|
@@ -170975,11 +171758,11 @@ async function dev(client2, opts, args2, telemetry2) {
|
|
|
170975
171758
|
controller.abort();
|
|
170976
171759
|
}
|
|
170977
171760
|
}
|
|
170978
|
-
var
|
|
171761
|
+
var import_chalk69, import_path36, import_fs_extra22;
|
|
170979
171762
|
var init_dev = __esm({
|
|
170980
171763
|
"src/commands/dev/dev.ts"() {
|
|
170981
171764
|
"use strict";
|
|
170982
|
-
|
|
171765
|
+
import_chalk69 = __toESM3(require_source());
|
|
170983
171766
|
import_path36 = require("path");
|
|
170984
171767
|
import_fs_extra22 = __toESM3(require_lib());
|
|
170985
171768
|
init_server();
|
|
@@ -171152,17 +171935,17 @@ async function main6(client2) {
|
|
|
171152
171935
|
function stringifyError(err) {
|
|
171153
171936
|
if (err instanceof NowError) {
|
|
171154
171937
|
const errMeta = JSON.stringify(err.meta, null, 2).replace(/\\n/g, "\n");
|
|
171155
|
-
return `${
|
|
171938
|
+
return `${import_chalk70.default.red(err.code)} ${err.message}
|
|
171156
171939
|
${errMeta}`;
|
|
171157
171940
|
}
|
|
171158
171941
|
return err.stack;
|
|
171159
171942
|
}
|
|
171160
|
-
var import_path37,
|
|
171943
|
+
var import_path37, import_chalk70, import_error_utils21, COMMAND_CONFIG6;
|
|
171161
171944
|
var init_dev3 = __esm({
|
|
171162
171945
|
"src/commands/dev/index.ts"() {
|
|
171163
171946
|
"use strict";
|
|
171164
171947
|
import_path37 = __toESM3(require("path"));
|
|
171165
|
-
|
|
171948
|
+
import_chalk70 = __toESM3(require_source());
|
|
171166
171949
|
init_get_args();
|
|
171167
171950
|
init_get_subcommand();
|
|
171168
171951
|
init_now_error();
|
|
@@ -171304,9 +172087,9 @@ async function getDNSData(client2, data) {
|
|
|
171304
172087
|
const port = await getNumber(client2, `- ${type} port: `);
|
|
171305
172088
|
const target = await getTrimmedString(client2, `- ${type} target: `);
|
|
171306
172089
|
output_manager_default.log(
|
|
171307
|
-
`${
|
|
172090
|
+
`${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(
|
|
171308
172091
|
`${priority}`
|
|
171309
|
-
)} ${
|
|
172092
|
+
)} ${import_chalk71.default.cyan(`${weight}`)} ${import_chalk71.default.cyan(`${port}`)} ${import_chalk71.default.cyan(
|
|
171310
172093
|
target
|
|
171311
172094
|
)}.`
|
|
171312
172095
|
);
|
|
@@ -171325,9 +172108,9 @@ async function getDNSData(client2, data) {
|
|
|
171325
172108
|
const mxPriority = await getNumber(client2, `- ${type} priority: `);
|
|
171326
172109
|
const value2 = await getTrimmedString(client2, `- ${type} host: `);
|
|
171327
172110
|
output_manager_default.log(
|
|
171328
|
-
`${
|
|
172111
|
+
`${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(
|
|
171329
172112
|
`${mxPriority}`
|
|
171330
|
-
)} ${
|
|
172113
|
+
)} ${import_chalk71.default.cyan(value2)}`
|
|
171331
172114
|
);
|
|
171332
172115
|
return await verifyData(client2) ? {
|
|
171333
172116
|
name,
|
|
@@ -171337,7 +172120,7 @@ async function getDNSData(client2, data) {
|
|
|
171337
172120
|
} : null;
|
|
171338
172121
|
}
|
|
171339
172122
|
const value = await getTrimmedString(client2, `- ${type} value: `);
|
|
171340
|
-
output_manager_default.log(`${
|
|
172123
|
+
output_manager_default.log(`${import_chalk71.default.cyan(name)} ${import_chalk71.default.bold(type)} ${import_chalk71.default.cyan(value)}`);
|
|
171341
172124
|
return await verifyData(client2) ? {
|
|
171342
172125
|
name,
|
|
171343
172126
|
type,
|
|
@@ -171371,11 +172154,11 @@ async function getTrimmedString(client2, label) {
|
|
|
171371
172154
|
});
|
|
171372
172155
|
return res.trim();
|
|
171373
172156
|
}
|
|
171374
|
-
var
|
|
172157
|
+
var import_chalk71, RECORD_TYPES;
|
|
171375
172158
|
var init_get_dns_data = __esm({
|
|
171376
172159
|
"src/util/dns/get-dns-data.ts"() {
|
|
171377
172160
|
"use strict";
|
|
171378
|
-
|
|
172161
|
+
import_chalk71 = __toESM3(require_source());
|
|
171379
172162
|
init_output_manager();
|
|
171380
172163
|
RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
|
|
171381
172164
|
}
|
|
@@ -171448,7 +172231,7 @@ async function add2(client2, argv) {
|
|
|
171448
172231
|
const parsedParams = parseAddArgs(args2);
|
|
171449
172232
|
if (!parsedParams) {
|
|
171450
172233
|
output_manager_default.error(
|
|
171451
|
-
`Invalid number of arguments. See: ${
|
|
172234
|
+
`Invalid number of arguments. See: ${import_chalk72.default.cyan(
|
|
171452
172235
|
`${getCommandName("dns --help")}`
|
|
171453
172236
|
)} for usage.`
|
|
171454
172237
|
);
|
|
@@ -171475,23 +172258,23 @@ async function add2(client2, argv) {
|
|
|
171475
172258
|
const record = await addDNSRecord(client2, domain, data);
|
|
171476
172259
|
if (record instanceof DomainNotFound) {
|
|
171477
172260
|
output_manager_default.error(
|
|
171478
|
-
`The domain ${domain} can't be found under ${
|
|
172261
|
+
`The domain ${domain} can't be found under ${import_chalk72.default.bold(
|
|
171479
172262
|
contextName
|
|
171480
|
-
)} ${
|
|
172263
|
+
)} ${import_chalk72.default.gray(addStamp())}`
|
|
171481
172264
|
);
|
|
171482
172265
|
return 1;
|
|
171483
172266
|
}
|
|
171484
172267
|
if (record instanceof DNSPermissionDenied) {
|
|
171485
172268
|
output_manager_default.error(
|
|
171486
|
-
`You don't have permissions to add records to domain ${domain} under ${
|
|
172269
|
+
`You don't have permissions to add records to domain ${domain} under ${import_chalk72.default.bold(
|
|
171487
172270
|
contextName
|
|
171488
|
-
)} ${
|
|
172271
|
+
)} ${import_chalk72.default.gray(addStamp())}`
|
|
171489
172272
|
);
|
|
171490
172273
|
return 1;
|
|
171491
172274
|
}
|
|
171492
172275
|
if (record instanceof DNSInvalidPort) {
|
|
171493
172276
|
output_manager_default.error(
|
|
171494
|
-
`Invalid <port> parameter. A number was expected ${
|
|
172277
|
+
`Invalid <port> parameter. A number was expected ${import_chalk72.default.gray(
|
|
171495
172278
|
addStamp()
|
|
171496
172279
|
)}`
|
|
171497
172280
|
);
|
|
@@ -171499,7 +172282,7 @@ async function add2(client2, argv) {
|
|
|
171499
172282
|
}
|
|
171500
172283
|
if (record instanceof DNSInvalidType) {
|
|
171501
172284
|
output_manager_default.error(
|
|
171502
|
-
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${
|
|
172285
|
+
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk72.default.gray(
|
|
171503
172286
|
addStamp()
|
|
171504
172287
|
)}`
|
|
171505
172288
|
);
|
|
@@ -171510,17 +172293,17 @@ async function add2(client2, argv) {
|
|
|
171510
172293
|
return 1;
|
|
171511
172294
|
}
|
|
171512
172295
|
output_manager_default.success(
|
|
171513
|
-
`DNS record for domain ${
|
|
172296
|
+
`DNS record for domain ${import_chalk72.default.bold(domain)} ${import_chalk72.default.gray(
|
|
171514
172297
|
`(${record.uid})`
|
|
171515
|
-
)} created under ${
|
|
172298
|
+
)} created under ${import_chalk72.default.bold(contextName)} ${import_chalk72.default.gray(addStamp())}`
|
|
171516
172299
|
);
|
|
171517
172300
|
return 0;
|
|
171518
172301
|
}
|
|
171519
|
-
var
|
|
172302
|
+
var import_chalk72;
|
|
171520
172303
|
var init_add4 = __esm({
|
|
171521
172304
|
"src/commands/dns/add.ts"() {
|
|
171522
172305
|
"use strict";
|
|
171523
|
-
|
|
172306
|
+
import_chalk72 = __toESM3(require_source());
|
|
171524
172307
|
init_errors_ts();
|
|
171525
172308
|
init_add_dns_record();
|
|
171526
172309
|
init_get_scope();
|
|
@@ -171540,7 +172323,7 @@ var init_add4 = __esm({
|
|
|
171540
172323
|
// src/util/dns/import-zonefile.ts
|
|
171541
172324
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
171542
172325
|
output_manager_default.spinner(
|
|
171543
|
-
`Importing Zone file for domain ${domain} under ${
|
|
172326
|
+
`Importing Zone file for domain ${domain} under ${import_chalk73.default.bold(contextName)}`
|
|
171544
172327
|
);
|
|
171545
172328
|
const zonefile = (0, import_fs7.readFileSync)((0, import_path38.resolve)(zonefilePath), "utf8");
|
|
171546
172329
|
try {
|
|
@@ -171567,11 +172350,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
|
171567
172350
|
throw err;
|
|
171568
172351
|
}
|
|
171569
172352
|
}
|
|
171570
|
-
var
|
|
172353
|
+
var import_chalk73, import_fs7, import_path38;
|
|
171571
172354
|
var init_import_zonefile = __esm({
|
|
171572
172355
|
"src/util/dns/import-zonefile.ts"() {
|
|
171573
172356
|
"use strict";
|
|
171574
|
-
|
|
172357
|
+
import_chalk73 = __toESM3(require_source());
|
|
171575
172358
|
import_fs7 = require("fs");
|
|
171576
172359
|
import_path38 = require("path");
|
|
171577
172360
|
init_errors_ts();
|
|
@@ -171626,7 +172409,7 @@ async function importZone(client2, argv) {
|
|
|
171626
172409
|
});
|
|
171627
172410
|
if (args2.length !== 2) {
|
|
171628
172411
|
output_manager_default.error(
|
|
171629
|
-
`Invalid number of arguments. Usage: ${
|
|
172412
|
+
`Invalid number of arguments. Usage: ${import_chalk74.default.cyan(
|
|
171630
172413
|
`${getCommandName("dns import <domain> <zonefile>")}`
|
|
171631
172414
|
)}`
|
|
171632
172415
|
);
|
|
@@ -171644,32 +172427,32 @@ async function importZone(client2, argv) {
|
|
|
171644
172427
|
);
|
|
171645
172428
|
if (recordIds instanceof DomainNotFound) {
|
|
171646
172429
|
output_manager_default.error(
|
|
171647
|
-
`The domain ${domain} can't be found under ${
|
|
172430
|
+
`The domain ${domain} can't be found under ${import_chalk74.default.bold(
|
|
171648
172431
|
contextName
|
|
171649
|
-
)} ${
|
|
172432
|
+
)} ${import_chalk74.default.gray(addStamp())}`
|
|
171650
172433
|
);
|
|
171651
172434
|
return 1;
|
|
171652
172435
|
}
|
|
171653
172436
|
if (recordIds instanceof InvalidDomain) {
|
|
171654
172437
|
output_manager_default.error(
|
|
171655
|
-
`The domain ${domain} doesn't match with the one found in the Zone file ${
|
|
172438
|
+
`The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk74.default.gray(
|
|
171656
172439
|
addStamp()
|
|
171657
172440
|
)}`
|
|
171658
172441
|
);
|
|
171659
172442
|
return 1;
|
|
171660
172443
|
}
|
|
171661
172444
|
output_manager_default.success(
|
|
171662
|
-
`${recordIds.length} DNS records for domain ${
|
|
172445
|
+
`${recordIds.length} DNS records for domain ${import_chalk74.default.bold(
|
|
171663
172446
|
domain
|
|
171664
|
-
)} created under ${
|
|
172447
|
+
)} created under ${import_chalk74.default.bold(contextName)} ${import_chalk74.default.gray(addStamp())}`
|
|
171665
172448
|
);
|
|
171666
172449
|
return 0;
|
|
171667
172450
|
}
|
|
171668
|
-
var
|
|
172451
|
+
var import_chalk74;
|
|
171669
172452
|
var init_import2 = __esm({
|
|
171670
172453
|
"src/commands/dns/import.ts"() {
|
|
171671
172454
|
"use strict";
|
|
171672
|
-
|
|
172455
|
+
import_chalk74 = __toESM3(require_source());
|
|
171673
172456
|
init_get_scope();
|
|
171674
172457
|
init_errors_ts();
|
|
171675
172458
|
init_stamp();
|
|
@@ -171712,7 +172495,7 @@ function formatTable(header, align, blocks) {
|
|
|
171712
172495
|
out += `${block.name}
|
|
171713
172496
|
`;
|
|
171714
172497
|
}
|
|
171715
|
-
const rows = [header.map((s) =>
|
|
172498
|
+
const rows = [header.map((s) => import_chalk75.default.dim(s))].concat(block.rows);
|
|
171716
172499
|
if (rows.length > 0) {
|
|
171717
172500
|
rows[0][0] = ` ${rows[0][0]}`;
|
|
171718
172501
|
for (let i = 1; i < rows.length; i++) {
|
|
@@ -171732,11 +172515,11 @@ function formatTable(header, align, blocks) {
|
|
|
171732
172515
|
}
|
|
171733
172516
|
return out.slice(0, -1);
|
|
171734
172517
|
}
|
|
171735
|
-
var
|
|
172518
|
+
var import_chalk75;
|
|
171736
172519
|
var init_format_table = __esm({
|
|
171737
172520
|
"src/util/format-table.ts"() {
|
|
171738
172521
|
"use strict";
|
|
171739
|
-
|
|
172522
|
+
import_chalk75 = __toESM3(require_source());
|
|
171740
172523
|
init_table();
|
|
171741
172524
|
init_strlen();
|
|
171742
172525
|
}
|
|
@@ -171820,18 +172603,18 @@ function getAddDomainName(domainNames) {
|
|
|
171820
172603
|
];
|
|
171821
172604
|
}
|
|
171822
172605
|
async function getDomainNames(client2, contextName, next) {
|
|
171823
|
-
output_manager_default.spinner(`Fetching domains under ${
|
|
172606
|
+
output_manager_default.spinner(`Fetching domains under ${import_chalk76.default.bold(contextName)}`);
|
|
171824
172607
|
const { domains: domains2, pagination } = await getDomains(client2, next);
|
|
171825
172608
|
return { domainNames: domains2.map((domain) => domain.name), pagination };
|
|
171826
172609
|
}
|
|
171827
|
-
var
|
|
172610
|
+
var import_chalk76;
|
|
171828
172611
|
var init_get_dns_records = __esm({
|
|
171829
172612
|
"src/util/dns/get-dns-records.ts"() {
|
|
171830
172613
|
"use strict";
|
|
171831
172614
|
init_errors_ts();
|
|
171832
172615
|
init_get_domain_dns_records();
|
|
171833
172616
|
init_get_domains();
|
|
171834
|
-
|
|
172617
|
+
import_chalk76 = __toESM3(require_source());
|
|
171835
172618
|
init_output_manager();
|
|
171836
172619
|
}
|
|
171837
172620
|
});
|
|
@@ -171896,7 +172679,7 @@ async function ls3(client2, argv) {
|
|
|
171896
172679
|
telemetry2.trackCliOptionNext(opts["--next"]);
|
|
171897
172680
|
if (args2.length > 1) {
|
|
171898
172681
|
output_manager_default.error(
|
|
171899
|
-
`Invalid number of arguments. Usage: ${
|
|
172682
|
+
`Invalid number of arguments. Usage: ${import_chalk77.default.cyan(
|
|
171900
172683
|
`${getCommandName("dns ls [domain]")}`
|
|
171901
172684
|
)}`
|
|
171902
172685
|
);
|
|
@@ -171918,15 +172701,15 @@ async function ls3(client2, argv) {
|
|
|
171918
172701
|
);
|
|
171919
172702
|
if (data instanceof DomainNotFound) {
|
|
171920
172703
|
output_manager_default.error(
|
|
171921
|
-
`The domain ${domainName} can't be found under ${
|
|
172704
|
+
`The domain ${domainName} can't be found under ${import_chalk77.default.bold(
|
|
171922
172705
|
contextName
|
|
171923
|
-
)} ${
|
|
172706
|
+
)} ${import_chalk77.default.gray(lsStamp())}`
|
|
171924
172707
|
);
|
|
171925
172708
|
return 1;
|
|
171926
172709
|
}
|
|
171927
172710
|
const { records, pagination: pagination2 } = data;
|
|
171928
172711
|
output_manager_default.log(
|
|
171929
|
-
`${records.length > 0 ? "Records" : "No records"} found under ${
|
|
172712
|
+
`${records.length > 0 ? "Records" : "No records"} found under ${import_chalk77.default.bold(contextName)} ${import_chalk77.default.gray(lsStamp())}`
|
|
171930
172713
|
);
|
|
171931
172714
|
client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
|
171932
172715
|
if (pagination2 && pagination2.count === 20) {
|
|
@@ -171946,9 +172729,9 @@ async function ls3(client2, argv) {
|
|
|
171946
172729
|
);
|
|
171947
172730
|
const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
|
|
171948
172731
|
output_manager_default.log(
|
|
171949
|
-
`${nRecords > 0 ? "Records" : "No records"} found under ${
|
|
172732
|
+
`${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk77.default.bold(
|
|
171950
172733
|
contextName
|
|
171951
|
-
)} ${
|
|
172734
|
+
)} ${import_chalk77.default.gray(lsStamp())}`
|
|
171952
172735
|
);
|
|
171953
172736
|
output_manager_default.log(getDNSRecordsTable(dnsRecords));
|
|
171954
172737
|
if (pagination && pagination.count === 20) {
|
|
@@ -171966,7 +172749,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
|
171966
172749
|
["", "id", "name", "type", "value", "created"],
|
|
171967
172750
|
["l", "r", "l", "l", "l", "l"],
|
|
171968
172751
|
dnsRecords.map(({ domainName, records }) => ({
|
|
171969
|
-
name:
|
|
172752
|
+
name: import_chalk77.default.bold(domainName),
|
|
171970
172753
|
rows: records.map(getDNSRecordRow)
|
|
171971
172754
|
}))
|
|
171972
172755
|
);
|
|
@@ -171983,14 +172766,14 @@ function getDNSRecordRow(record) {
|
|
|
171983
172766
|
record.name,
|
|
171984
172767
|
record.type,
|
|
171985
172768
|
priority ? `${priority} ${record.value}` : record.value,
|
|
171986
|
-
|
|
172769
|
+
import_chalk77.default.gray(isSystemRecord ? "default" : createdAt)
|
|
171987
172770
|
];
|
|
171988
172771
|
}
|
|
171989
|
-
var
|
|
172772
|
+
var import_chalk77, import_ms15;
|
|
171990
172773
|
var init_ls5 = __esm({
|
|
171991
172774
|
"src/commands/dns/ls.ts"() {
|
|
171992
172775
|
"use strict";
|
|
171993
|
-
|
|
172776
|
+
import_chalk77 = __toESM3(require_source());
|
|
171994
172777
|
import_ms15 = __toESM3(require_ms());
|
|
171995
172778
|
init_errors_ts();
|
|
171996
172779
|
init_format_table();
|
|
@@ -172075,7 +172858,7 @@ async function rm3(client2, argv) {
|
|
|
172075
172858
|
const [recordId] = args2;
|
|
172076
172859
|
if (args2.length !== 1) {
|
|
172077
172860
|
output_manager_default.error(
|
|
172078
|
-
`Invalid number of arguments. Usage: ${
|
|
172861
|
+
`Invalid number of arguments. Usage: ${import_chalk78.default.cyan(
|
|
172079
172862
|
`${getCommandName("dns rm <id>")}`
|
|
172080
172863
|
)}`
|
|
172081
172864
|
);
|
|
@@ -172101,7 +172884,7 @@ async function rm3(client2, argv) {
|
|
|
172101
172884
|
const rmStamp = stamp_default();
|
|
172102
172885
|
await deleteDNSRecordById(client2, domainName, record.id);
|
|
172103
172886
|
output_manager_default.success(
|
|
172104
|
-
`Record ${
|
|
172887
|
+
`Record ${import_chalk78.default.gray(`${record.id}`)} removed ${import_chalk78.default.gray(rmStamp())}`
|
|
172105
172888
|
);
|
|
172106
172889
|
return 0;
|
|
172107
172890
|
}
|
|
@@ -172116,7 +172899,7 @@ function readConfirmation2(client2, msg, domainName, record) {
|
|
|
172116
172899
|
`
|
|
172117
172900
|
);
|
|
172118
172901
|
output_manager_default.print(
|
|
172119
|
-
`${
|
|
172902
|
+
`${import_chalk78.default.bold.red("> Are you sure?")} ${import_chalk78.default.gray("(y/N) ")}`
|
|
172120
172903
|
);
|
|
172121
172904
|
client2.stdin.on("data", (d) => {
|
|
172122
172905
|
process.stdin.pause();
|
|
@@ -172128,19 +172911,19 @@ function getDeleteTableRow(domainName, record) {
|
|
|
172128
172911
|
const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
|
|
172129
172912
|
return [
|
|
172130
172913
|
record.id,
|
|
172131
|
-
|
|
172914
|
+
import_chalk78.default.bold(
|
|
172132
172915
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
|
172133
172916
|
),
|
|
172134
|
-
|
|
172917
|
+
import_chalk78.default.gray(
|
|
172135
172918
|
`${(0, import_ms16.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
|
172136
172919
|
)
|
|
172137
172920
|
];
|
|
172138
172921
|
}
|
|
172139
|
-
var
|
|
172922
|
+
var import_chalk78, import_ms16;
|
|
172140
172923
|
var init_rm4 = __esm({
|
|
172141
172924
|
"src/commands/dns/rm.ts"() {
|
|
172142
172925
|
"use strict";
|
|
172143
|
-
|
|
172926
|
+
import_chalk78 = __toESM3(require_source());
|
|
172144
172927
|
import_ms16 = __toESM3(require_ms());
|
|
172145
172928
|
init_table();
|
|
172146
172929
|
init_delete_dns_record_by_id();
|
|
@@ -172314,16 +173097,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
172314
173097
|
const rows = [];
|
|
172315
173098
|
for (let i = 0; i < maxLength; i++) {
|
|
172316
173099
|
rows.push([
|
|
172317
|
-
sortedIntended[i] ||
|
|
172318
|
-
sortedCurrent[i] ||
|
|
172319
|
-
sortedIntended[i] === sortedCurrent[i] ?
|
|
173100
|
+
sortedIntended[i] || import_chalk79.default.gray("-"),
|
|
173101
|
+
sortedCurrent[i] || import_chalk79.default.gray("-"),
|
|
173102
|
+
sortedIntended[i] === sortedCurrent[i] ? import_chalk79.default.green(chars_default.tick) : import_chalk79.default.red(chars_default.cross)
|
|
172320
173103
|
]);
|
|
172321
173104
|
}
|
|
172322
173105
|
return table(
|
|
172323
173106
|
[
|
|
172324
173107
|
[
|
|
172325
|
-
|
|
172326
|
-
|
|
173108
|
+
import_chalk79.default.gray("Intended Nameservers"),
|
|
173109
|
+
import_chalk79.default.gray("Current Nameservers"),
|
|
172327
173110
|
""
|
|
172328
173111
|
],
|
|
172329
173112
|
...rows
|
|
@@ -172331,43 +173114,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
|
172331
173114
|
{ hsep: 4 }
|
|
172332
173115
|
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
|
172333
173116
|
}
|
|
172334
|
-
var
|
|
173117
|
+
var import_chalk79;
|
|
172335
173118
|
var init_format_ns_table = __esm({
|
|
172336
173119
|
"src/util/format-ns-table.ts"() {
|
|
172337
173120
|
"use strict";
|
|
172338
|
-
|
|
173121
|
+
import_chalk79 = __toESM3(require_source());
|
|
172339
173122
|
init_table();
|
|
172340
173123
|
init_chars();
|
|
172341
173124
|
}
|
|
172342
173125
|
});
|
|
172343
173126
|
|
|
172344
|
-
// src/util/domains/get-domain.ts
|
|
172345
|
-
async function getDomain(client2, contextName, domainName) {
|
|
172346
|
-
output_manager_default.spinner(
|
|
172347
|
-
`Fetching domain ${domainName} under ${import_chalk79.default.bold(contextName)}`
|
|
172348
|
-
);
|
|
172349
|
-
try {
|
|
172350
|
-
const { domain } = await client2.fetch(
|
|
172351
|
-
`/v5/domains/${domainName}`
|
|
172352
|
-
);
|
|
172353
|
-
return domain;
|
|
172354
|
-
} catch (err) {
|
|
172355
|
-
if (isAPIError(err) && err.status < 500) {
|
|
172356
|
-
return err;
|
|
172357
|
-
}
|
|
172358
|
-
throw err;
|
|
172359
|
-
}
|
|
172360
|
-
}
|
|
172361
|
-
var import_chalk79;
|
|
172362
|
-
var init_get_domain = __esm({
|
|
172363
|
-
"src/util/domains/get-domain.ts"() {
|
|
172364
|
-
"use strict";
|
|
172365
|
-
import_chalk79 = __toESM3(require_source());
|
|
172366
|
-
init_errors_ts();
|
|
172367
|
-
init_output_manager();
|
|
172368
|
-
}
|
|
172369
|
-
});
|
|
172370
|
-
|
|
172371
173127
|
// src/util/domains/is-public-suffix.ts
|
|
172372
173128
|
function isPublicSuffix(domainName) {
|
|
172373
173129
|
return domainName.endsWith(".vercel.app") || domainName.endsWith(".now.sh");
|
|
@@ -172701,16 +173457,14 @@ async function buy(client2, argv) {
|
|
|
172701
173457
|
return 1;
|
|
172702
173458
|
}
|
|
172703
173459
|
const availableStamp = stamp_default();
|
|
172704
|
-
const
|
|
172705
|
-
getDomainPrice(client2, domainName),
|
|
172706
|
-
getDomainPrice(client2, domainName, "renewal")
|
|
172707
|
-
]);
|
|
173460
|
+
const domainPrice = await getDomainPrice(client2, domainName);
|
|
172708
173461
|
if (domainPrice instanceof Error) {
|
|
172709
173462
|
output_manager_default.prettyError(domainPrice);
|
|
172710
173463
|
return 1;
|
|
172711
173464
|
}
|
|
172712
|
-
|
|
172713
|
-
|
|
173465
|
+
const { years, purchasePrice, renewalPrice } = domainPrice;
|
|
173466
|
+
if (purchasePrice === null || renewalPrice === null) {
|
|
173467
|
+
output_manager_default.error("Domain price not found");
|
|
172714
173468
|
return 1;
|
|
172715
173469
|
}
|
|
172716
173470
|
if (!(await getDomainStatus(client2, domainName)).available) {
|
|
@@ -172721,7 +173475,6 @@ async function buy(client2, argv) {
|
|
|
172721
173475
|
);
|
|
172722
173476
|
return 1;
|
|
172723
173477
|
}
|
|
172724
|
-
const { period, price } = domainPrice;
|
|
172725
173478
|
output_manager_default.log(
|
|
172726
173479
|
`The domain ${param(domainName)} is ${import_chalk83.default.underline(
|
|
172727
173480
|
"available"
|
|
@@ -172732,14 +173485,14 @@ async function buy(client2, argv) {
|
|
|
172732
173485
|
autoRenew = true;
|
|
172733
173486
|
} else {
|
|
172734
173487
|
if (!await client2.input.confirm(
|
|
172735
|
-
`Buy now for ${import_chalk83.default.bold(`$${
|
|
173488
|
+
`Buy now for ${import_chalk83.default.bold(`$${purchasePrice}`)} (${`${years}yr${years > 1 ? "s" : ""}`})?`,
|
|
172736
173489
|
false
|
|
172737
173490
|
)) {
|
|
172738
173491
|
return 0;
|
|
172739
173492
|
}
|
|
172740
173493
|
autoRenew = await client2.input.confirm(
|
|
172741
|
-
|
|
172742
|
-
`$${
|
|
173494
|
+
years === 1 ? `Auto renew yearly for ${import_chalk83.default.bold(`$${renewalPrice}`)}?` : `Auto renew every ${years} years for ${import_chalk83.default.bold(
|
|
173495
|
+
`$${renewalPrice}`
|
|
172743
173496
|
)}?`,
|
|
172744
173497
|
true
|
|
172745
173498
|
);
|
|
@@ -172748,7 +173501,13 @@ async function buy(client2, argv) {
|
|
|
172748
173501
|
const purchaseStamp = stamp_default();
|
|
172749
173502
|
output_manager_default.spinner("Purchasing");
|
|
172750
173503
|
try {
|
|
172751
|
-
buyResult = await purchaseDomain(
|
|
173504
|
+
buyResult = await purchaseDomain(
|
|
173505
|
+
client2,
|
|
173506
|
+
domainName,
|
|
173507
|
+
purchasePrice,
|
|
173508
|
+
years,
|
|
173509
|
+
autoRenew
|
|
173510
|
+
);
|
|
172752
173511
|
} catch (err) {
|
|
172753
173512
|
output_manager_default.error(
|
|
172754
173513
|
"An unexpected error occurred while purchasing your domain. Please try again later."
|
|
@@ -172757,15 +173516,15 @@ async function buy(client2, argv) {
|
|
|
172757
173516
|
return 1;
|
|
172758
173517
|
}
|
|
172759
173518
|
output_manager_default.stopSpinner();
|
|
172760
|
-
if (buyResult instanceof
|
|
173519
|
+
if (buyResult instanceof UnsupportedTLD) {
|
|
172761
173520
|
output_manager_default.error(
|
|
172762
|
-
`
|
|
173521
|
+
`The TLD for domain name ${buyResult.meta.domain} is not supported.`
|
|
172763
173522
|
);
|
|
172764
173523
|
return 1;
|
|
172765
173524
|
}
|
|
172766
|
-
if (buyResult instanceof
|
|
173525
|
+
if (buyResult instanceof TLDNotSupportedViaCLI) {
|
|
172767
173526
|
output_manager_default.error(
|
|
172768
|
-
`
|
|
173527
|
+
`Purchased for the TLD for domain name ${buyResult.meta.domain} are not supported via the CLI. Use the REST API or the dashboard to purchase.`
|
|
172769
173528
|
);
|
|
172770
173529
|
return 1;
|
|
172771
173530
|
}
|
|
@@ -172777,12 +173536,6 @@ async function buy(client2, argv) {
|
|
|
172777
173536
|
output_manager_default.error(`The domain ${buyResult.meta.domain} is not available.`);
|
|
172778
173537
|
return 1;
|
|
172779
173538
|
}
|
|
172780
|
-
if (buyResult instanceof DomainServiceNotAvailable) {
|
|
172781
|
-
output_manager_default.error(
|
|
172782
|
-
`The domain purchase service is not available. Please try again later.`
|
|
172783
|
-
);
|
|
172784
|
-
return 1;
|
|
172785
|
-
}
|
|
172786
173539
|
if (buyResult instanceof UnexpectedDomainPurchaseError) {
|
|
172787
173540
|
output_manager_default.error(`An unexpected error happened while performing the purchase.`);
|
|
172788
173541
|
return 1;
|
|
@@ -172791,35 +173544,12 @@ async function buy(client2, argv) {
|
|
|
172791
173544
|
output_manager_default.error(`Your card was declined.`);
|
|
172792
173545
|
return 1;
|
|
172793
173546
|
}
|
|
172794
|
-
|
|
172795
|
-
|
|
172796
|
-
|
|
172797
|
-
|
|
172798
|
-
|
|
172799
|
-
|
|
172800
|
-
);
|
|
172801
|
-
output_manager_default.print(
|
|
172802
|
-
` An email will be sent upon completion for you to start using your new domain.
|
|
172803
|
-
`
|
|
172804
|
-
);
|
|
172805
|
-
} else {
|
|
172806
|
-
output_manager_default.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`);
|
|
172807
|
-
if (!buyResult.verified) {
|
|
172808
|
-
output_manager_default.note(
|
|
172809
|
-
`Your domain is not fully configured yet so it may appear as not verified.`
|
|
172810
|
-
);
|
|
172811
|
-
output_manager_default.print(
|
|
172812
|
-
` It might take a few minutes, but you will get an email as soon as it is ready.
|
|
172813
|
-
`
|
|
172814
|
-
);
|
|
172815
|
-
} else {
|
|
172816
|
-
output_manager_default.note(
|
|
172817
|
-
`You may now use your domain as an alias to your deployments. Run ${getCommandName(
|
|
172818
|
-
`alias --help`
|
|
172819
|
-
)}`
|
|
172820
|
-
);
|
|
172821
|
-
}
|
|
172822
|
-
}
|
|
173547
|
+
output_manager_default.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`);
|
|
173548
|
+
output_manager_default.note(
|
|
173549
|
+
`You may now use your domain as an alias to your deployments. Run ${getCommandName(
|
|
173550
|
+
`alias --help`
|
|
173551
|
+
)}`
|
|
173552
|
+
);
|
|
172823
173553
|
return 0;
|
|
172824
173554
|
}
|
|
172825
173555
|
var import_chalk83, import_tldts6, import_error_utils22;
|
|
@@ -172847,31 +173577,58 @@ var init_buy2 = __esm({
|
|
|
172847
173577
|
});
|
|
172848
173578
|
|
|
172849
173579
|
// src/util/domains/transfer-in-domain.ts
|
|
172850
|
-
async function transferInDomain(client2, name, authCode, expectedPrice) {
|
|
173580
|
+
async function transferInDomain(client2, name, authCode, expectedPrice, years) {
|
|
173581
|
+
const { team } = await getScope(client2);
|
|
173582
|
+
const teamParam = team ? `?teamId=${team.slug}` : "";
|
|
172851
173583
|
try {
|
|
172852
|
-
|
|
172853
|
-
|
|
172854
|
-
|
|
172855
|
-
|
|
173584
|
+
const { orderId } = await client2.fetch(
|
|
173585
|
+
`/v1/registrar/domains/${name}/transfer${teamParam}`,
|
|
173586
|
+
{
|
|
173587
|
+
body: {
|
|
173588
|
+
authCode,
|
|
173589
|
+
autoRenew: true,
|
|
173590
|
+
years,
|
|
173591
|
+
expectedPrice,
|
|
173592
|
+
contactInformation: {
|
|
173593
|
+
firstName: "Vercel",
|
|
173594
|
+
lastName: "Whois",
|
|
173595
|
+
email: "domains@registrar.vercel.com",
|
|
173596
|
+
phone: "+14153985463",
|
|
173597
|
+
address1: "100 First Street, Suite 2400",
|
|
173598
|
+
city: "San Fransisco",
|
|
173599
|
+
state: "CA",
|
|
173600
|
+
zip: "94105",
|
|
173601
|
+
country: "US",
|
|
173602
|
+
companyName: "Vercel Inc."
|
|
173603
|
+
}
|
|
173604
|
+
},
|
|
173605
|
+
method: "POST"
|
|
173606
|
+
}
|
|
173607
|
+
);
|
|
173608
|
+
const order = await pollForOrder(client2, orderId);
|
|
173609
|
+
if (order === null) {
|
|
173610
|
+
return new UnexpectedDomainTransferError(name);
|
|
173611
|
+
}
|
|
173612
|
+
if (order.status === "completed") {
|
|
173613
|
+
const domain = order.domains.find((domain2) => domain2.domainName === name);
|
|
173614
|
+
if (domain?.status === "completed") {
|
|
173615
|
+
return { ok: true };
|
|
173616
|
+
}
|
|
173617
|
+
}
|
|
173618
|
+
if (order.error?.code === "payment_failed") {
|
|
173619
|
+
return new DomainPaymentError();
|
|
173620
|
+
}
|
|
173621
|
+
return new UnexpectedDomainTransferError(name);
|
|
172856
173622
|
} catch (err) {
|
|
172857
173623
|
if (isAPIError(err)) {
|
|
172858
173624
|
if (err.code === "invalid_name") {
|
|
172859
173625
|
return new InvalidDomain(name);
|
|
172860
173626
|
}
|
|
172861
|
-
if (err.code === "
|
|
172862
|
-
return new
|
|
172863
|
-
}
|
|
172864
|
-
if (err.code === "not_transferable") {
|
|
172865
|
-
return new DomainNotTransferable(name);
|
|
172866
|
-
}
|
|
172867
|
-
if (err.code === "invalid_auth_code") {
|
|
172868
|
-
return new InvalidTransferAuthCode(name, authCode);
|
|
172869
|
-
}
|
|
172870
|
-
if (err.code === "source_not_found") {
|
|
172871
|
-
return new SourceNotFound();
|
|
173627
|
+
if (err.code === "tld_not_supported") {
|
|
173628
|
+
return new UnsupportedTLD(name);
|
|
172872
173629
|
}
|
|
172873
|
-
if (err.code === "
|
|
172874
|
-
return new
|
|
173630
|
+
if (err.code === "domain_not_available") {
|
|
173631
|
+
return new DomainNotAvailable(name);
|
|
172875
173632
|
}
|
|
172876
173633
|
}
|
|
172877
173634
|
throw err;
|
|
@@ -172881,6 +173638,8 @@ var init_transfer_in_domain = __esm({
|
|
|
172881
173638
|
"src/util/domains/transfer-in-domain.ts"() {
|
|
172882
173639
|
"use strict";
|
|
172883
173640
|
init_errors_ts();
|
|
173641
|
+
init_get_scope();
|
|
173642
|
+
init_get_order();
|
|
172884
173643
|
}
|
|
172885
173644
|
});
|
|
172886
173645
|
|
|
@@ -172903,18 +173662,6 @@ var init_get_auth_code = __esm({
|
|
|
172903
173662
|
}
|
|
172904
173663
|
});
|
|
172905
173664
|
|
|
172906
|
-
// src/util/domains/check-transfer.ts
|
|
172907
|
-
async function checkTransfer(client2, name) {
|
|
172908
|
-
return client2.fetch(
|
|
172909
|
-
`/v4/domains/${encodeURIComponent(name)}/registry`
|
|
172910
|
-
);
|
|
172911
|
-
}
|
|
172912
|
-
var init_check_transfer = __esm({
|
|
172913
|
-
"src/util/domains/check-transfer.ts"() {
|
|
172914
|
-
"use strict";
|
|
172915
|
-
}
|
|
172916
|
-
});
|
|
172917
|
-
|
|
172918
173665
|
// src/util/is-root-domain.ts
|
|
172919
173666
|
function isRootDomain(domainName) {
|
|
172920
173667
|
const parsedDomain = (0, import_tldts7.parse)(domainName);
|
|
@@ -172992,19 +173739,16 @@ async function transferIn(client2, argv) {
|
|
|
172992
173739
|
return 1;
|
|
172993
173740
|
}
|
|
172994
173741
|
const availableStamp = stamp_default();
|
|
172995
|
-
const
|
|
172996
|
-
getDomainPrice(client2, domainName, "renewal"),
|
|
172997
|
-
checkTransfer(client2, domainName)
|
|
172998
|
-
]);
|
|
173742
|
+
const domainPrice = await getDomainPrice(client2, domainName);
|
|
172999
173743
|
if (domainPrice instanceof Error) {
|
|
173000
173744
|
output_manager_default.prettyError(domainPrice);
|
|
173001
173745
|
return 1;
|
|
173002
173746
|
}
|
|
173003
|
-
|
|
173747
|
+
const { transferPrice, years } = domainPrice;
|
|
173748
|
+
if (transferPrice === null) {
|
|
173004
173749
|
output_manager_default.error(`The domain ${param(domainName)} is not transferable.`);
|
|
173005
173750
|
return 1;
|
|
173006
173751
|
}
|
|
173007
|
-
const { price } = domainPrice;
|
|
173008
173752
|
const { contextName } = await getScope(client2);
|
|
173009
173753
|
output_manager_default.log(
|
|
173010
173754
|
`The domain ${param(domainName)} is ${import_chalk84.default.underline(
|
|
@@ -173013,7 +173757,7 @@ async function transferIn(client2, argv) {
|
|
|
173013
173757
|
);
|
|
173014
173758
|
const authCode = await getAuthCode(client2, opts["--code"]);
|
|
173015
173759
|
const shouldTransfer = await client2.input.confirm(
|
|
173016
|
-
|
|
173760
|
+
`Transfer now with 1yr renewal for ${import_chalk84.default.bold(`$${transferPrice}`)}?`,
|
|
173017
173761
|
false
|
|
173018
173762
|
);
|
|
173019
173763
|
if (!shouldTransfer) {
|
|
@@ -173025,32 +173769,31 @@ async function transferIn(client2, argv) {
|
|
|
173025
173769
|
client2,
|
|
173026
173770
|
domainName,
|
|
173027
173771
|
authCode,
|
|
173028
|
-
|
|
173772
|
+
transferPrice,
|
|
173773
|
+
years
|
|
173029
173774
|
);
|
|
173030
173775
|
if (transferInResult instanceof InvalidDomain) {
|
|
173031
173776
|
output_manager_default.error(`The domain ${transferInResult.meta.domain} is not valid.`);
|
|
173032
173777
|
return 1;
|
|
173033
173778
|
}
|
|
173034
|
-
if (transferInResult instanceof DomainNotAvailable
|
|
173779
|
+
if (transferInResult instanceof DomainNotAvailable) {
|
|
173035
173780
|
output_manager_default.error(
|
|
173036
173781
|
`The domain "${transferInResult.meta.domain}" is not transferable.`
|
|
173037
173782
|
);
|
|
173038
173783
|
return 1;
|
|
173039
173784
|
}
|
|
173040
|
-
if (transferInResult instanceof
|
|
173785
|
+
if (transferInResult instanceof UnsupportedTLD) {
|
|
173041
173786
|
output_manager_default.error(
|
|
173042
|
-
`The
|
|
173787
|
+
`The TLD for domain name ${transferInResult.meta.domain} is not supported.`
|
|
173043
173788
|
);
|
|
173044
173789
|
return 1;
|
|
173045
173790
|
}
|
|
173046
|
-
if (transferInResult instanceof
|
|
173047
|
-
output_manager_default.error(
|
|
173048
|
-
`Could not purchase domain. Please add a payment method using the dashboard.`
|
|
173049
|
-
);
|
|
173791
|
+
if (transferInResult instanceof DomainPaymentError) {
|
|
173792
|
+
output_manager_default.error(`Your card was declined.`);
|
|
173050
173793
|
return 1;
|
|
173051
173794
|
}
|
|
173052
|
-
if (transferInResult instanceof
|
|
173053
|
-
output_manager_default.error(`
|
|
173795
|
+
if (transferInResult instanceof UnexpectedDomainTransferError) {
|
|
173796
|
+
output_manager_default.error(`An unexpected error happened while initiating the transfer.`);
|
|
173054
173797
|
return 1;
|
|
173055
173798
|
}
|
|
173056
173799
|
output_manager_default.success(
|
|
@@ -173093,7 +173836,6 @@ var init_transfer_in2 = __esm({
|
|
|
173093
173836
|
init_stamp();
|
|
173094
173837
|
init_get_auth_code();
|
|
173095
173838
|
init_get_domain_price();
|
|
173096
|
-
init_check_transfer();
|
|
173097
173839
|
init_is_root_domain();
|
|
173098
173840
|
init_pkg_name();
|
|
173099
173841
|
init_transfer_in();
|
|
@@ -173327,7 +174069,7 @@ async function fetchInformation({
|
|
|
173327
174069
|
}) {
|
|
173328
174070
|
const [domain, renewalPrice] = await Promise.all([
|
|
173329
174071
|
getDomainByName(client2, contextName, domainName, { ignoreWait: true }),
|
|
173330
|
-
getDomainPrice(client2, domainName
|
|
174072
|
+
getDomainPrice(client2, domainName).then((res) => res instanceof Error ? null : res.renewalPrice).catch(() => null)
|
|
173331
174073
|
]);
|
|
173332
174074
|
if (domain instanceof DomainNotFound) {
|
|
173333
174075
|
output_manager_default.prettyError(domain);
|