vercel 37.2.1 → 37.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +759 -780
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -4073,14 +4073,14 @@ var require_templates = __commonJS2({
|
|
4073
4073
|
}
|
4074
4074
|
return results;
|
4075
4075
|
}
|
4076
|
-
function buildStyle(
|
4076
|
+
function buildStyle(chalk108, styles) {
|
4077
4077
|
const enabled = {};
|
4078
4078
|
for (const layer of styles) {
|
4079
4079
|
for (const style of layer.styles) {
|
4080
4080
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4081
4081
|
}
|
4082
4082
|
}
|
4083
|
-
let current =
|
4083
|
+
let current = chalk108;
|
4084
4084
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
4085
4085
|
if (!Array.isArray(styles2)) {
|
4086
4086
|
continue;
|
@@ -4092,7 +4092,7 @@ var require_templates = __commonJS2({
|
|
4092
4092
|
}
|
4093
4093
|
return current;
|
4094
4094
|
}
|
4095
|
-
module2.exports = (
|
4095
|
+
module2.exports = (chalk108, temporary) => {
|
4096
4096
|
const styles = [];
|
4097
4097
|
const chunks = [];
|
4098
4098
|
let chunk = [];
|
@@ -4102,13 +4102,13 @@ var require_templates = __commonJS2({
|
|
4102
4102
|
} else if (style) {
|
4103
4103
|
const string = chunk.join("");
|
4104
4104
|
chunk = [];
|
4105
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
4105
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk108, styles)(string));
|
4106
4106
|
styles.push({ inverse, styles: parseStyle(style) });
|
4107
4107
|
} else if (close2) {
|
4108
4108
|
if (styles.length === 0) {
|
4109
4109
|
throw new Error("Found extraneous } in Chalk template literal");
|
4110
4110
|
}
|
4111
|
-
chunks.push(buildStyle(
|
4111
|
+
chunks.push(buildStyle(chalk108, styles)(chunk.join("")));
|
4112
4112
|
chunk = [];
|
4113
4113
|
styles.pop();
|
4114
4114
|
} else {
|
@@ -4156,16 +4156,16 @@ var require_source = __commonJS2({
|
|
4156
4156
|
}
|
4157
4157
|
};
|
4158
4158
|
var chalkFactory = (options) => {
|
4159
|
-
const
|
4160
|
-
applyOptions(
|
4161
|
-
|
4162
|
-
Object.setPrototypeOf(
|
4163
|
-
Object.setPrototypeOf(
|
4164
|
-
|
4159
|
+
const chalk109 = {};
|
4160
|
+
applyOptions(chalk109, options);
|
4161
|
+
chalk109.template = (...arguments_) => chalkTag(chalk109.template, ...arguments_);
|
4162
|
+
Object.setPrototypeOf(chalk109, Chalk3.prototype);
|
4163
|
+
Object.setPrototypeOf(chalk109.template, chalk109);
|
4164
|
+
chalk109.template.constructor = () => {
|
4165
4165
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4166
4166
|
};
|
4167
|
-
|
4168
|
-
return
|
4167
|
+
chalk109.template.Instance = ChalkClass;
|
4168
|
+
return chalk109.template;
|
4169
4169
|
};
|
4170
4170
|
function Chalk3(options) {
|
4171
4171
|
return chalkFactory(options);
|
@@ -4276,7 +4276,7 @@ var require_source = __commonJS2({
|
|
4276
4276
|
return openAll + string + closeAll;
|
4277
4277
|
};
|
4278
4278
|
var template;
|
4279
|
-
var chalkTag = (
|
4279
|
+
var chalkTag = (chalk109, ...strings) => {
|
4280
4280
|
const [firstString] = strings;
|
4281
4281
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
4282
4282
|
return strings.join(" ");
|
@@ -4292,14 +4292,14 @@ var require_source = __commonJS2({
|
|
4292
4292
|
if (template === void 0) {
|
4293
4293
|
template = require_templates();
|
4294
4294
|
}
|
4295
|
-
return template(
|
4295
|
+
return template(chalk109, parts.join(""));
|
4296
4296
|
};
|
4297
4297
|
Object.defineProperties(Chalk3.prototype, styles);
|
4298
|
-
var
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4302
|
-
module2.exports =
|
4298
|
+
var chalk108 = Chalk3();
|
4299
|
+
chalk108.supportsColor = stdoutColor;
|
4300
|
+
chalk108.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
4301
|
+
chalk108.stderr.supportsColor = stderrColor;
|
4302
|
+
module2.exports = chalk108;
|
4303
4303
|
}
|
4304
4304
|
});
|
4305
4305
|
|
@@ -9904,7 +9904,7 @@ var require_agent_base = __commonJS2({
|
|
9904
9904
|
require_patch_core();
|
9905
9905
|
var inherits = require("util").inherits;
|
9906
9906
|
var promisify3 = require_promisify();
|
9907
|
-
var
|
9907
|
+
var EventEmitter2 = require("events").EventEmitter;
|
9908
9908
|
module2.exports = Agent;
|
9909
9909
|
function isAgent(v) {
|
9910
9910
|
return v && typeof v.addRequest === "function";
|
@@ -9913,7 +9913,7 @@ var require_agent_base = __commonJS2({
|
|
9913
9913
|
if (!(this instanceof Agent)) {
|
9914
9914
|
return new Agent(callback, _opts);
|
9915
9915
|
}
|
9916
|
-
|
9916
|
+
EventEmitter2.call(this);
|
9917
9917
|
this._promisifiedCallback = false;
|
9918
9918
|
let opts = _opts;
|
9919
9919
|
if ("function" === typeof callback) {
|
@@ -9924,7 +9924,7 @@ var require_agent_base = __commonJS2({
|
|
9924
9924
|
this.timeout = opts && opts.timeout || null;
|
9925
9925
|
this.options = opts;
|
9926
9926
|
}
|
9927
|
-
inherits(Agent,
|
9927
|
+
inherits(Agent, EventEmitter2);
|
9928
9928
|
Agent.prototype.callback = function callback(req, opts) {
|
9929
9929
|
throw new Error(
|
9930
9930
|
'"agent-base" has no default implementation, you must subclass and override `callback()`'
|
@@ -13478,14 +13478,14 @@ var require_templates2 = __commonJS2({
|
|
13478
13478
|
}
|
13479
13479
|
return results;
|
13480
13480
|
}
|
13481
|
-
function buildStyle(
|
13481
|
+
function buildStyle(chalk108, styles) {
|
13482
13482
|
const enabled = {};
|
13483
13483
|
for (const layer of styles) {
|
13484
13484
|
for (const style of layer.styles) {
|
13485
13485
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
13486
13486
|
}
|
13487
13487
|
}
|
13488
|
-
let current =
|
13488
|
+
let current = chalk108;
|
13489
13489
|
for (const styleName of Object.keys(enabled)) {
|
13490
13490
|
if (Array.isArray(enabled[styleName])) {
|
13491
13491
|
if (!(styleName in current)) {
|
@@ -13500,7 +13500,7 @@ var require_templates2 = __commonJS2({
|
|
13500
13500
|
}
|
13501
13501
|
return current;
|
13502
13502
|
}
|
13503
|
-
module2.exports = (
|
13503
|
+
module2.exports = (chalk108, tmp) => {
|
13504
13504
|
const styles = [];
|
13505
13505
|
const chunks = [];
|
13506
13506
|
let chunk = [];
|
@@ -13510,13 +13510,13 @@ var require_templates2 = __commonJS2({
|
|
13510
13510
|
} else if (style) {
|
13511
13511
|
const str = chunk.join("");
|
13512
13512
|
chunk = [];
|
13513
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
13513
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk108, styles)(str));
|
13514
13514
|
styles.push({ inverse, styles: parseStyle(style) });
|
13515
13515
|
} else if (close2) {
|
13516
13516
|
if (styles.length === 0) {
|
13517
13517
|
throw new Error("Found extraneous } in Chalk template literal");
|
13518
13518
|
}
|
13519
|
-
chunks.push(buildStyle(
|
13519
|
+
chunks.push(buildStyle(chalk108, styles)(chunk.join("")));
|
13520
13520
|
chunk = [];
|
13521
13521
|
styles.pop();
|
13522
13522
|
} else {
|
@@ -13553,16 +13553,16 @@ var require_chalk = __commonJS2({
|
|
13553
13553
|
}
|
13554
13554
|
function Chalk3(options) {
|
13555
13555
|
if (!this || !(this instanceof Chalk3) || this.template) {
|
13556
|
-
const
|
13557
|
-
applyOptions(
|
13558
|
-
|
13556
|
+
const chalk108 = {};
|
13557
|
+
applyOptions(chalk108, options);
|
13558
|
+
chalk108.template = function() {
|
13559
13559
|
const args2 = [].slice.call(arguments);
|
13560
|
-
return chalkTag.apply(null, [
|
13560
|
+
return chalkTag.apply(null, [chalk108.template].concat(args2));
|
13561
13561
|
};
|
13562
|
-
Object.setPrototypeOf(
|
13563
|
-
Object.setPrototypeOf(
|
13564
|
-
|
13565
|
-
return
|
13562
|
+
Object.setPrototypeOf(chalk108, Chalk3.prototype);
|
13563
|
+
Object.setPrototypeOf(chalk108.template, chalk108);
|
13564
|
+
chalk108.template.constructor = Chalk3;
|
13565
|
+
return chalk108.template;
|
13566
13566
|
}
|
13567
13567
|
applyOptions(this, options);
|
13568
13568
|
}
|
@@ -13681,7 +13681,7 @@ var require_chalk = __commonJS2({
|
|
13681
13681
|
ansiStyles.dim.open = originalDim;
|
13682
13682
|
return str;
|
13683
13683
|
}
|
13684
|
-
function chalkTag(
|
13684
|
+
function chalkTag(chalk108, strings) {
|
13685
13685
|
if (!Array.isArray(strings)) {
|
13686
13686
|
return [].slice.call(arguments, 1).join(" ");
|
13687
13687
|
}
|
@@ -13691,7 +13691,7 @@ var require_chalk = __commonJS2({
|
|
13691
13691
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
13692
13692
|
parts.push(String(strings.raw[i]));
|
13693
13693
|
}
|
13694
|
-
return template(
|
13694
|
+
return template(chalk108, parts.join(""));
|
13695
13695
|
}
|
13696
13696
|
Object.defineProperties(Chalk3.prototype, styles);
|
13697
13697
|
module2.exports = Chalk3();
|
@@ -15488,19 +15488,19 @@ var require_cli_spinners = __commonJS2({
|
|
15488
15488
|
var require_log_symbols = __commonJS2({
|
15489
15489
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
15490
15490
|
"use strict";
|
15491
|
-
var
|
15491
|
+
var chalk108 = require_chalk();
|
15492
15492
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
15493
15493
|
var main15 = {
|
15494
|
-
info:
|
15495
|
-
success:
|
15496
|
-
warning:
|
15497
|
-
error:
|
15494
|
+
info: chalk108.blue("\u2139"),
|
15495
|
+
success: chalk108.green("\u2714"),
|
15496
|
+
warning: chalk108.yellow("\u26A0"),
|
15497
|
+
error: chalk108.red("\u2716")
|
15498
15498
|
};
|
15499
15499
|
var fallbacks = {
|
15500
|
-
info:
|
15501
|
-
success:
|
15502
|
-
warning:
|
15503
|
-
error:
|
15500
|
+
info: chalk108.blue("i"),
|
15501
|
+
success: chalk108.green("\u221A"),
|
15502
|
+
warning: chalk108.yellow("\u203C"),
|
15503
|
+
error: chalk108.red("\xD7")
|
15504
15504
|
};
|
15505
15505
|
module2.exports = isSupported ? main15 : fallbacks;
|
15506
15506
|
}
|
@@ -15896,7 +15896,7 @@ var require_wcwidth = __commonJS2({
|
|
15896
15896
|
var require_ora = __commonJS2({
|
15897
15897
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
15898
15898
|
"use strict";
|
15899
|
-
var
|
15899
|
+
var chalk108 = require_chalk();
|
15900
15900
|
var cliCursor = require_cli_cursor();
|
15901
15901
|
var cliSpinners = require_cli_spinners();
|
15902
15902
|
var logSymbols = require_log_symbols();
|
@@ -15985,7 +15985,7 @@ var require_ora = __commonJS2({
|
|
15985
15985
|
const { frames } = this.spinner;
|
15986
15986
|
let frame = frames[this.frameIndex];
|
15987
15987
|
if (this.color) {
|
15988
|
-
frame =
|
15988
|
+
frame = chalk108[this.color](frame);
|
15989
15989
|
}
|
15990
15990
|
this.frameIndex = ++this.frameIndex % frames.length;
|
15991
15991
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -17765,14 +17765,14 @@ var require_templates3 = __commonJS2({
|
|
17765
17765
|
}
|
17766
17766
|
return results;
|
17767
17767
|
}
|
17768
|
-
function buildStyle(
|
17768
|
+
function buildStyle(chalk108, styles) {
|
17769
17769
|
const enabled = {};
|
17770
17770
|
for (const layer of styles) {
|
17771
17771
|
for (const style of layer.styles) {
|
17772
17772
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
17773
17773
|
}
|
17774
17774
|
}
|
17775
|
-
let current =
|
17775
|
+
let current = chalk108;
|
17776
17776
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
17777
17777
|
if (!Array.isArray(styles2)) {
|
17778
17778
|
continue;
|
@@ -17784,7 +17784,7 @@ var require_templates3 = __commonJS2({
|
|
17784
17784
|
}
|
17785
17785
|
return current;
|
17786
17786
|
}
|
17787
|
-
module2.exports = (
|
17787
|
+
module2.exports = (chalk108, temporary) => {
|
17788
17788
|
const styles = [];
|
17789
17789
|
const chunks = [];
|
17790
17790
|
let chunk = [];
|
@@ -17794,13 +17794,13 @@ var require_templates3 = __commonJS2({
|
|
17794
17794
|
} else if (style) {
|
17795
17795
|
const string = chunk.join("");
|
17796
17796
|
chunk = [];
|
17797
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
17797
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk108, styles)(string));
|
17798
17798
|
styles.push({ inverse, styles: parseStyle(style) });
|
17799
17799
|
} else if (close2) {
|
17800
17800
|
if (styles.length === 0) {
|
17801
17801
|
throw new Error("Found extraneous } in Chalk template literal");
|
17802
17802
|
}
|
17803
|
-
chunks.push(buildStyle(
|
17803
|
+
chunks.push(buildStyle(chalk108, styles)(chunk.join("")));
|
17804
17804
|
chunk = [];
|
17805
17805
|
styles.pop();
|
17806
17806
|
} else {
|
@@ -17848,16 +17848,16 @@ var require_source2 = __commonJS2({
|
|
17848
17848
|
}
|
17849
17849
|
};
|
17850
17850
|
var chalkFactory = (options) => {
|
17851
|
-
const
|
17852
|
-
applyOptions(
|
17853
|
-
|
17854
|
-
Object.setPrototypeOf(
|
17855
|
-
Object.setPrototypeOf(
|
17856
|
-
|
17851
|
+
const chalk109 = {};
|
17852
|
+
applyOptions(chalk109, options);
|
17853
|
+
chalk109.template = (...arguments_) => chalkTag(chalk109.template, ...arguments_);
|
17854
|
+
Object.setPrototypeOf(chalk109, Chalk3.prototype);
|
17855
|
+
Object.setPrototypeOf(chalk109.template, chalk109);
|
17856
|
+
chalk109.template.constructor = () => {
|
17857
17857
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
17858
17858
|
};
|
17859
|
-
|
17860
|
-
return
|
17859
|
+
chalk109.template.Instance = ChalkClass;
|
17860
|
+
return chalk109.template;
|
17861
17861
|
};
|
17862
17862
|
function Chalk3(options) {
|
17863
17863
|
return chalkFactory(options);
|
@@ -17968,7 +17968,7 @@ var require_source2 = __commonJS2({
|
|
17968
17968
|
return openAll + string + closeAll;
|
17969
17969
|
};
|
17970
17970
|
var template;
|
17971
|
-
var chalkTag = (
|
17971
|
+
var chalkTag = (chalk109, ...strings) => {
|
17972
17972
|
const [firstString] = strings;
|
17973
17973
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
17974
17974
|
return strings.join(" ");
|
@@ -17984,14 +17984,14 @@ var require_source2 = __commonJS2({
|
|
17984
17984
|
if (template === void 0) {
|
17985
17985
|
template = require_templates3();
|
17986
17986
|
}
|
17987
|
-
return template(
|
17987
|
+
return template(chalk109, parts.join(""));
|
17988
17988
|
};
|
17989
17989
|
Object.defineProperties(Chalk3.prototype, styles);
|
17990
|
-
var
|
17991
|
-
|
17992
|
-
|
17993
|
-
|
17994
|
-
module2.exports =
|
17990
|
+
var chalk108 = Chalk3();
|
17991
|
+
chalk108.supportsColor = stdoutColor;
|
17992
|
+
chalk108.stderr = Chalk3({ level: stderrColor ? stderrColor.level : 0 });
|
17993
|
+
chalk108.stderr.supportsColor = stderrColor;
|
17994
|
+
module2.exports = chalk108;
|
17995
17995
|
}
|
17996
17996
|
});
|
17997
17997
|
|
@@ -30567,12 +30567,12 @@ var require_http_agent = __commonJS2({
|
|
30567
30567
|
"use strict";
|
30568
30568
|
var net = require("net");
|
30569
30569
|
var util = require("util");
|
30570
|
-
var
|
30570
|
+
var EventEmitter2 = require("events");
|
30571
30571
|
var debug3 = util.debuglog("http");
|
30572
30572
|
function Agent(options) {
|
30573
30573
|
if (!(this instanceof Agent))
|
30574
30574
|
return new Agent(options);
|
30575
|
-
|
30575
|
+
EventEmitter2.call(this);
|
30576
30576
|
var self2 = this;
|
30577
30577
|
self2.defaultPort = 80;
|
30578
30578
|
self2.protocol = "http:";
|
@@ -30628,7 +30628,7 @@ var require_http_agent = __commonJS2({
|
|
30628
30628
|
}
|
30629
30629
|
});
|
30630
30630
|
}
|
30631
|
-
util.inherits(Agent,
|
30631
|
+
util.inherits(Agent, EventEmitter2);
|
30632
30632
|
exports2.Agent = Agent;
|
30633
30633
|
function freeSocketErrorListener(err) {
|
30634
30634
|
var socket = this;
|
@@ -32536,7 +32536,7 @@ var require_package = __commonJS2({
|
|
32536
32536
|
"../client/package.json"(exports2, module2) {
|
32537
32537
|
module2.exports = {
|
32538
32538
|
name: "@vercel/client",
|
32539
|
-
version: "13.4.
|
32539
|
+
version: "13.4.3",
|
32540
32540
|
main: "dist/index.js",
|
32541
32541
|
typings: "dist/index.d.ts",
|
32542
32542
|
homepage: "https://vercel.com",
|
@@ -32573,7 +32573,7 @@ var require_package = __commonJS2({
|
|
32573
32573
|
typescript: "4.9.5"
|
32574
32574
|
},
|
32575
32575
|
dependencies: {
|
32576
|
-
"@vercel/build-utils": "8.3.
|
32576
|
+
"@vercel/build-utils": "8.3.9",
|
32577
32577
|
"@vercel/error-utils": "2.0.2",
|
32578
32578
|
"@vercel/routing-utils": "3.1.0",
|
32579
32579
|
"@zeit/fetch": "5.2.0",
|
@@ -34340,7 +34340,7 @@ var require_upload = __commonJS2({
|
|
34340
34340
|
var import_http4 = __toESM4(require("http"));
|
34341
34341
|
var import_https = __toESM4(require("https"));
|
34342
34342
|
var import_stream = require("stream");
|
34343
|
-
var
|
34343
|
+
var import_events3 = require("events");
|
34344
34344
|
var import_async_retry6 = __toESM4(require_lib10());
|
34345
34345
|
var import_async_sema = require_lib9();
|
34346
34346
|
var import_utils4 = require_utils4();
|
@@ -34513,7 +34513,7 @@ ${e2}`);
|
|
34513
34513
|
yield { type: "error", payload: e2 };
|
34514
34514
|
}
|
34515
34515
|
}
|
34516
|
-
var UploadProgress = class extends
|
34516
|
+
var UploadProgress = class extends import_events3.EventEmitter {
|
34517
34517
|
constructor(sha, file) {
|
34518
34518
|
super();
|
34519
34519
|
this.sha = sha;
|
@@ -104550,11 +104550,12 @@ var init_project_settings = __esm({
|
|
104550
104550
|
});
|
104551
104551
|
|
104552
104552
|
// src/util/env/get-env-records.ts
|
104553
|
-
async function getEnvRecords(
|
104553
|
+
async function getEnvRecords(client2, projectId, source, {
|
104554
104554
|
target,
|
104555
104555
|
gitBranch,
|
104556
104556
|
decrypt
|
104557
104557
|
} = {}) {
|
104558
|
+
const { output: output2 } = client2;
|
104558
104559
|
output2.debug(
|
104559
104560
|
`Fetching Environment Variables of project ${projectId} and target ${target}`
|
104560
104561
|
);
|
@@ -104630,9 +104631,7 @@ var init_parse_env = __esm({
|
|
104630
104631
|
key = e2.slice(0, equalsSign);
|
104631
104632
|
value = e2.slice(equalsSign + 1);
|
104632
104633
|
}
|
104633
|
-
|
104634
|
-
o[key] = value;
|
104635
|
-
}
|
104634
|
+
o[key] = value;
|
104636
104635
|
return o;
|
104637
104636
|
}, startingDict);
|
104638
104637
|
}
|
@@ -104692,6 +104691,29 @@ var init_diff_env_files = __esm({
|
|
104692
104691
|
}
|
104693
104692
|
});
|
104694
104693
|
|
104694
|
+
// src/util/projects/format-project.ts
|
104695
|
+
function formatProject(client2, orgSlug, projectSlug, options) {
|
104696
|
+
const orgProjectSlug = `${orgSlug}/${projectSlug}`;
|
104697
|
+
const projectUrl = `https://vercel.com/${orgProjectSlug}`;
|
104698
|
+
const projectSlugLink = client2.output.link(
|
104699
|
+
import_chalk39.default.bold(orgProjectSlug),
|
104700
|
+
projectUrl,
|
104701
|
+
{
|
104702
|
+
fallback: () => import_chalk39.default.bold(orgProjectSlug),
|
104703
|
+
color: false,
|
104704
|
+
...options
|
104705
|
+
}
|
104706
|
+
);
|
104707
|
+
return projectSlugLink;
|
104708
|
+
}
|
104709
|
+
var import_chalk39;
|
104710
|
+
var init_format_project = __esm({
|
104711
|
+
"src/util/projects/format-project.ts"() {
|
104712
|
+
"use strict";
|
104713
|
+
import_chalk39 = __toESM3(require_source());
|
104714
|
+
}
|
104715
|
+
});
|
104716
|
+
|
104695
104717
|
// src/commands/env/pull.ts
|
104696
104718
|
function readHeadSync(path11, length) {
|
104697
104719
|
const buffer = Buffer.alloc(length);
|
@@ -104712,7 +104734,8 @@ function tryReadHeadSync(path11, length) {
|
|
104712
104734
|
}
|
104713
104735
|
}
|
104714
104736
|
}
|
104715
|
-
async function pull(client2, link4,
|
104737
|
+
async function pull(client2, link4, environment, opts, args2, cwd, source) {
|
104738
|
+
const { output: output2 } = client2;
|
104716
104739
|
if (args2.length > 1) {
|
104717
104740
|
output2.error(
|
104718
104741
|
`Invalid number of arguments. Usage: ${getCommandName(`env pull <file>`)}`
|
@@ -104726,7 +104749,7 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
|
|
104726
104749
|
const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
|
104727
104750
|
const exists = typeof head !== "undefined";
|
104728
104751
|
if (head === CONTENTS_PREFIX) {
|
104729
|
-
output2.log(`Overwriting existing ${
|
104752
|
+
output2.log(`Overwriting existing ${import_chalk40.default.bold(filename)} file`);
|
104730
104753
|
} else if (exists && !skipConfirmation && !await confirm(
|
104731
104754
|
client2,
|
104732
104755
|
`Found existing file ${param(filename)}. Do you want to overwrite?`,
|
@@ -104735,14 +104758,19 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
|
|
104735
104758
|
output2.log("Canceled");
|
104736
104759
|
return 0;
|
104737
104760
|
}
|
104761
|
+
const projectSlugLink = formatProject(
|
104762
|
+
client2,
|
104763
|
+
link4.org.slug,
|
104764
|
+
link4.project.name
|
104765
|
+
);
|
104738
104766
|
output2.log(
|
104739
|
-
`Downloading \`${
|
104767
|
+
`Downloading \`${import_chalk40.default.cyan(
|
104740
104768
|
environment
|
104741
|
-
)}\` Environment Variables for
|
104769
|
+
)}\` Environment Variables for ${projectSlugLink}`
|
104742
104770
|
);
|
104743
104771
|
const pullStamp = stamp_default();
|
104744
104772
|
output2.spinner("Downloading");
|
104745
|
-
const records = (await pullEnvRecords(output2, client2, project.id, source, {
|
104773
|
+
const records = (await pullEnvRecords(output2, client2, link4.project.id, source, {
|
104746
104774
|
target: environment || "development",
|
104747
104775
|
gitBranch
|
104748
104776
|
})).env;
|
@@ -104769,7 +104797,7 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
|
|
104769
104797
|
}
|
104770
104798
|
output2.print(
|
104771
104799
|
`${prependEmoji(
|
104772
|
-
`${exists ? "Updated" : "Created"} ${
|
104800
|
+
`${exists ? "Updated" : "Created"} ${import_chalk40.default.bold(filename)} file ${isGitIgnoreUpdated ? "and added it to .gitignore" : ""} ${import_chalk40.default.gray(pullStamp())}`,
|
104773
104801
|
emoji("success")
|
104774
104802
|
)}
|
104775
104803
|
`
|
@@ -104779,11 +104807,11 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
|
|
104779
104807
|
function escapeValue(value) {
|
104780
104808
|
return value ? value.replace(new RegExp("\n", "g"), "\\n").replace(new RegExp("\r", "g"), "\\r") : "";
|
104781
104809
|
}
|
104782
|
-
var
|
104810
|
+
var import_chalk40, import_fs_extra10, import_fs5, import_path17, import_error_utils14, import_json_parse_better_errors2, CONTENTS_PREFIX, VARIABLES_TO_IGNORE;
|
104783
104811
|
var init_pull = __esm({
|
104784
104812
|
"src/commands/env/pull.ts"() {
|
104785
104813
|
"use strict";
|
104786
|
-
|
104814
|
+
import_chalk40 = __toESM3(require_source());
|
104787
104815
|
import_fs_extra10 = __toESM3(require_lib());
|
104788
104816
|
import_fs5 = require("fs");
|
104789
104817
|
import_path17 = require("path");
|
@@ -104797,6 +104825,7 @@ var init_pull = __esm({
|
|
104797
104825
|
import_error_utils14 = __toESM3(require_dist2());
|
104798
104826
|
init_add_to_gitignore();
|
104799
104827
|
import_json_parse_better_errors2 = __toESM3(require_json_parse_better_errors());
|
104828
|
+
init_format_project();
|
104800
104829
|
CONTENTS_PREFIX = "# Created by Vercel CLI\n";
|
104801
104830
|
VARIABLES_TO_IGNORE = [
|
104802
104831
|
"VERCEL_ANALYTICS_ID",
|
@@ -104854,7 +104883,7 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
|
|
104854
104883
|
} else {
|
104855
104884
|
if (await confirm(
|
104856
104885
|
client2,
|
104857
|
-
`Found project ${
|
104886
|
+
`Found project ${import_chalk41.default.cyan(
|
104858
104887
|
`\u201C${org.slug}/${detectedProject.name}\u201D`
|
104859
104888
|
)}. Link to it?`,
|
104860
104889
|
true
|
@@ -104900,13 +104929,13 @@ async function inputProject(client2, org, detectedProjectName, autoConfirm = fal
|
|
104900
104929
|
}
|
104901
104930
|
});
|
104902
104931
|
}
|
104903
|
-
var
|
104932
|
+
var import_chalk41, import_slugify2;
|
104904
104933
|
var init_input_project = __esm({
|
104905
104934
|
"src/util/input/input-project.ts"() {
|
104906
104935
|
"use strict";
|
104907
104936
|
init_confirm();
|
104908
104937
|
init_get_project_by_id_or_name();
|
104909
|
-
|
104938
|
+
import_chalk41 = __toESM3(require_source());
|
104910
104939
|
init_errors_ts();
|
104911
104940
|
import_slugify2 = __toESM3(require_slugify());
|
104912
104941
|
}
|
@@ -104918,7 +104947,7 @@ async function validateRootDirectory(output2, cwd, path11, errorSuffix) {
|
|
104918
104947
|
const suffix = errorSuffix ? ` ${errorSuffix}` : "";
|
104919
104948
|
if (!pathStat) {
|
104920
104949
|
output2.error(
|
104921
|
-
`The provided path ${
|
104950
|
+
`The provided path ${import_chalk42.default.cyan(
|
104922
104951
|
`\u201C${humanizePath(path11)}\u201D`
|
104923
104952
|
)} does not exist.${suffix}`
|
104924
104953
|
);
|
@@ -104926,7 +104955,7 @@ async function validateRootDirectory(output2, cwd, path11, errorSuffix) {
|
|
104926
104955
|
}
|
104927
104956
|
if (!pathStat.isDirectory()) {
|
104928
104957
|
output2.error(
|
104929
|
-
`The provided path ${
|
104958
|
+
`The provided path ${import_chalk42.default.cyan(
|
104930
104959
|
`\u201C${humanizePath(path11)}\u201D`
|
104931
104960
|
)} is a file, but expected a directory.${suffix}`
|
104932
104961
|
);
|
@@ -104934,7 +104963,7 @@ async function validateRootDirectory(output2, cwd, path11, errorSuffix) {
|
|
104934
104963
|
}
|
104935
104964
|
if (!path11.startsWith(cwd)) {
|
104936
104965
|
output2.error(
|
104937
|
-
`The provided path ${
|
104966
|
+
`The provided path ${import_chalk42.default.cyan(
|
104938
104967
|
`\u201C${humanizePath(path11)}\u201D`
|
104939
104968
|
)} is outside of the project.${suffix}`
|
104940
104969
|
);
|
@@ -104951,7 +104980,7 @@ async function validatePaths(client2, paths) {
|
|
104951
104980
|
const path11 = paths[0];
|
104952
104981
|
const pathStat = await (0, import_fs_extra11.lstat)(path11).catch(() => null);
|
104953
104982
|
if (!pathStat) {
|
104954
|
-
output2.error(`Could not find ${
|
104983
|
+
output2.error(`Could not find ${import_chalk42.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}`);
|
104955
104984
|
return { valid: false, exitCode: 1 };
|
104956
104985
|
}
|
104957
104986
|
if (!pathStat.isDirectory()) {
|
@@ -104975,12 +105004,12 @@ async function validatePaths(client2, paths) {
|
|
104975
105004
|
}
|
104976
105005
|
return { valid: true, path: path11 };
|
104977
105006
|
}
|
104978
|
-
var import_fs_extra11,
|
105007
|
+
var import_fs_extra11, import_chalk42, import_os7;
|
104979
105008
|
var init_validate_paths = __esm({
|
104980
105009
|
"src/util/validate-paths.ts"() {
|
104981
105010
|
"use strict";
|
104982
105011
|
import_fs_extra11 = __toESM3(require_lib());
|
104983
|
-
|
105012
|
+
import_chalk42 = __toESM3(require_source());
|
104984
105013
|
import_os7 = require("os");
|
104985
105014
|
init_confirm();
|
104986
105015
|
init_humanize_path();
|
@@ -104996,7 +105025,7 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
|
|
104996
105025
|
const rootDirectory = await client2.input.text({
|
104997
105026
|
message: `In which directory is your code located?`,
|
104998
105027
|
transformer: (input) => {
|
104999
|
-
return `${
|
105028
|
+
return `${import_chalk43.default.dim(`./`)}${input}`;
|
105000
105029
|
}
|
105001
105030
|
});
|
105002
105031
|
if (!rootDirectory) {
|
@@ -105018,12 +105047,12 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
|
|
105018
105047
|
return normal;
|
105019
105048
|
}
|
105020
105049
|
}
|
105021
|
-
var import_path18,
|
105050
|
+
var import_path18, import_chalk43;
|
105022
105051
|
var init_input_root_directory = __esm({
|
105023
105052
|
"src/util/input/input-root-directory.ts"() {
|
105024
105053
|
"use strict";
|
105025
105054
|
import_path18 = __toESM3(require("path"));
|
105026
|
-
|
105055
|
+
import_chalk43 = __toESM3(require_source());
|
105027
105056
|
init_validate_paths();
|
105028
105057
|
}
|
105029
105058
|
});
|
@@ -105063,8 +105092,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
105063
105092
|
const override = localConfigurationOverrides[setting];
|
105064
105093
|
if (override) {
|
105065
105094
|
output2.print(
|
105066
|
-
`${
|
105067
|
-
`- ${
|
105095
|
+
`${import_chalk44.default.dim(
|
105096
|
+
`- ${import_chalk44.default.bold(`${settingMap[setting]}:`)} ${override}`
|
105068
105097
|
)}
|
105069
105098
|
`
|
105070
105099
|
);
|
@@ -105089,7 +105118,7 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
105089
105118
|
}
|
105090
105119
|
output2.print(
|
105091
105120
|
!framework.slug ? `No framework detected. Default Project Settings:
|
105092
|
-
` : `Auto-detected Project Settings (${
|
105121
|
+
` : `Auto-detected Project Settings (${import_chalk44.default.bold(framework.name)}):
|
105093
105122
|
`
|
105094
105123
|
);
|
105095
105124
|
settings.framework = framework.slug;
|
@@ -105101,8 +105130,8 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
105101
105130
|
const override = localConfigurationOverrides?.[setting];
|
105102
105131
|
if (!override && defaultSetting) {
|
105103
105132
|
output2.print(
|
105104
|
-
`${
|
105105
|
-
`- ${
|
105133
|
+
`${import_chalk44.default.dim(
|
105134
|
+
`- ${import_chalk44.default.bold(`${settingMap[setting]}:`)} ${isSettingValue(defaultSetting) ? defaultSetting.value : import_chalk44.default.italic(`${defaultSetting.placeholder}`)}`
|
105106
105135
|
)}
|
105107
105136
|
`
|
105108
105137
|
);
|
@@ -105127,17 +105156,17 @@ async function editProjectSettings(client2, projectSettings, framework, autoConf
|
|
105127
105156
|
for (let setting of settingFields) {
|
105128
105157
|
const field = settingMap[setting];
|
105129
105158
|
settings[setting] = await client2.input.text({
|
105130
|
-
message: `What's your ${
|
105159
|
+
message: `What's your ${import_chalk44.default.bold(field)}?`
|
105131
105160
|
});
|
105132
105161
|
}
|
105133
105162
|
return settings;
|
105134
105163
|
}
|
105135
|
-
var
|
105164
|
+
var import_chalk44, import_frameworks2, settingMap, settingKeys;
|
105136
105165
|
var init_edit_project_settings = __esm({
|
105137
105166
|
"src/util/input/edit-project-settings.ts"() {
|
105138
105167
|
"use strict";
|
105139
105168
|
init_confirm();
|
105140
|
-
|
105169
|
+
import_chalk44 = __toESM3(require_source());
|
105141
105170
|
import_frameworks2 = __toESM3(require_frameworks());
|
105142
105171
|
init_is_setting_value();
|
105143
105172
|
settingMap = {
|
@@ -108050,7 +108079,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
108050
108079
|
const timeout = setTimeout(() => {
|
108051
108080
|
abortController.abort();
|
108052
108081
|
warn(
|
108053
|
-
`${
|
108082
|
+
`${import_chalk45.default.bold(
|
108054
108083
|
`Command automatically interrupted after ${CommandTimeout}.`
|
108055
108084
|
)}
|
108056
108085
|
`
|
@@ -108092,7 +108121,7 @@ async function displayRuntimeLogs(client2, options, abortController) {
|
|
108092
108121
|
stopSpinner();
|
108093
108122
|
if (isRuntimeLimitDelimiter(log3)) {
|
108094
108123
|
abortController.abort();
|
108095
|
-
warn(`${
|
108124
|
+
warn(`${import_chalk45.default.bold(log3.message)}
|
108096
108125
|
`);
|
108097
108126
|
return;
|
108098
108127
|
}
|
@@ -108129,7 +108158,7 @@ function printBuildLog(log2, print) {
|
|
108129
108158
|
return;
|
108130
108159
|
const date = new Date(log2.created).toISOString();
|
108131
108160
|
for (const line of colorize(sanitize(log2)).split("\n")) {
|
108132
|
-
print(`${
|
108161
|
+
print(`${import_chalk45.default.dim(date)} ${line.replace("[now-builder-debug] ", "")}
|
108133
108162
|
`);
|
108134
108163
|
}
|
108135
108164
|
}
|
@@ -108154,9 +108183,9 @@ function prettyPrintLogline({
|
|
108154
108183
|
const date = (0, import_date_fns.format)(timestampInMs, dateTimeFormat);
|
108155
108184
|
const levelIcon = getLevelIcon(level);
|
108156
108185
|
const sourceIcon = getSourceIcon(source);
|
108157
|
-
const detailsLine = `${
|
108186
|
+
const detailsLine = `${import_chalk45.default.dim(date)} ${levelIcon} ${import_chalk45.default.bold(
|
108158
108187
|
method
|
108159
|
-
)} ${
|
108188
|
+
)} ${import_chalk45.default.grey(status <= 0 ? "---" : status)} ${import_chalk45.default.dim(
|
108160
108189
|
domain
|
108161
108190
|
)} ${sourceIcon} ${path11}`;
|
108162
108191
|
print(
|
@@ -108197,9 +108226,9 @@ function sanitize(log2) {
|
|
108197
108226
|
}
|
108198
108227
|
function colorize(text2) {
|
108199
108228
|
if (isError7(text2)) {
|
108200
|
-
return
|
108229
|
+
return import_chalk45.default.red(text2);
|
108201
108230
|
}
|
108202
|
-
return isWarning(text2) ?
|
108231
|
+
return isWarning(text2) ? import_chalk45.default.yellow(text2) : text2;
|
108203
108232
|
}
|
108204
108233
|
function isError7(text2) {
|
108205
108234
|
return /^(\s+⨯\s+|\s+at\s+|npm err!)/i.test(text2) || /(^| |\[|eval|internal|range|reference|syntax|type|uri|fetch)err(or)?( |:)/i.test(
|
@@ -108211,11 +108240,11 @@ function isError7(text2) {
|
|
108211
108240
|
function isWarning(text2) {
|
108212
108241
|
return /^warn(ing)?(:|!)/i.test(text2) && !text2.includes("deprecationwarning");
|
108213
108242
|
}
|
108214
|
-
var
|
108243
|
+
var import_chalk45, import_date_fns, import_ms7, import_jsonlines2, import_split2, import_url13, runtimeLogSpinnerMessage, dateTimeFormat, moreSymbol, statusWidth;
|
108215
108244
|
var init_logs = __esm({
|
108216
108245
|
"src/util/logs.ts"() {
|
108217
108246
|
"use strict";
|
108218
|
-
|
108247
|
+
import_chalk45 = __toESM3(require_source());
|
108219
108248
|
import_date_fns = __toESM3(require_date_fns());
|
108220
108249
|
import_ms7 = __toESM3(require_ms2());
|
108221
108250
|
import_jsonlines2 = __toESM3(require_jsonlines());
|
@@ -108253,7 +108282,7 @@ function printInspectUrl(output2, inspectorUrl, deployStamp) {
|
|
108253
108282
|
}
|
108254
108283
|
output2.print(
|
108255
108284
|
prependEmoji(
|
108256
|
-
`Inspect: ${
|
108285
|
+
`Inspect: ${import_chalk46.default.bold(inspectorUrl)} ${deployStamp()}`,
|
108257
108286
|
emoji("inspect")
|
108258
108287
|
) + `
|
108259
108288
|
`
|
@@ -108294,7 +108323,7 @@ async function processDeployment({
|
|
108294
108323
|
teamId: org.type === "team" ? org.id : void 0,
|
108295
108324
|
apiUrl: now._apiUrl,
|
108296
108325
|
token,
|
108297
|
-
debug:
|
108326
|
+
debug: client2.output.isDebugEnabled(),
|
108298
108327
|
userAgent: ua_default,
|
108299
108328
|
path: path11,
|
108300
108329
|
force,
|
@@ -108306,7 +108335,7 @@ async function processDeployment({
|
|
108306
108335
|
archive,
|
108307
108336
|
agent
|
108308
108337
|
};
|
108309
|
-
const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${
|
108338
|
+
const deployingSpinnerVal = isSettingUpProject ? "Setting up project" : `Deploying ${import_chalk46.default.bold(`${org.slug}/${projectName}`)}`;
|
108310
108339
|
output2.spinner(deployingSpinnerVal, 0);
|
108311
108340
|
const indications = [];
|
108312
108341
|
let abortController;
|
@@ -108341,7 +108370,7 @@ async function processDeployment({
|
|
108341
108370
|
const percent = uploadedBytes / missingSize;
|
108342
108371
|
if (percent >= nextStep) {
|
108343
108372
|
output2.spinner(
|
108344
|
-
`Uploading ${
|
108373
|
+
`Uploading ${import_chalk46.default.reset(
|
108345
108374
|
`[${bar}] (${uploadedHuman}/${totalSizeHuman})`
|
108346
108375
|
)}`,
|
108347
108376
|
0
|
@@ -108379,7 +108408,7 @@ async function processDeployment({
|
|
108379
108408
|
const previewUrl = `https://${deployment.url}`;
|
108380
108409
|
output2.print(
|
108381
108410
|
prependEmoji(
|
108382
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
108411
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk46.default.bold(
|
108383
108412
|
previewUrl
|
108384
108413
|
)} ${deployStamp()}`,
|
108385
108414
|
emoji("success")
|
@@ -108449,13 +108478,13 @@ async function processDeployment({
|
|
108449
108478
|
throw err;
|
108450
108479
|
}
|
108451
108480
|
}
|
108452
|
-
var import_client3, import_bytes3,
|
108481
|
+
var import_client3, import_bytes3, import_chalk46;
|
108453
108482
|
var init_process_deployment = __esm({
|
108454
108483
|
"src/util/deploy/process-deployment.ts"() {
|
108455
108484
|
"use strict";
|
108456
108485
|
import_client3 = __toESM3(require_dist12());
|
108457
108486
|
import_bytes3 = __toESM3(require_bytes());
|
108458
|
-
|
108487
|
+
import_chalk46 = __toESM3(require_source());
|
108459
108488
|
init_emoji();
|
108460
108489
|
init_logs();
|
108461
108490
|
init_progress();
|
@@ -108465,18 +108494,17 @@ var init_process_deployment = __esm({
|
|
108465
108494
|
});
|
108466
108495
|
|
108467
108496
|
// src/util/index.ts
|
108468
|
-
var
|
108497
|
+
var import_querystring3, import_url14, import_async_retry5, import_ms8, import_node_fetch3, import_bytes4, import_chalk47, Now;
|
108469
108498
|
var init_util = __esm({
|
108470
108499
|
"src/util/index.ts"() {
|
108471
108500
|
"use strict";
|
108472
|
-
import_events3 = __toESM3(require("events"));
|
108473
108501
|
import_querystring3 = __toESM3(require("querystring"));
|
108474
108502
|
import_url14 = require("url");
|
108475
108503
|
import_async_retry5 = __toESM3(require_dist10());
|
108476
108504
|
import_ms8 = __toESM3(require_ms2());
|
108477
108505
|
import_node_fetch3 = __toESM3(require_lib7());
|
108478
108506
|
import_bytes4 = __toESM3(require_bytes());
|
108479
|
-
|
108507
|
+
import_chalk47 = __toESM3(require_source());
|
108480
108508
|
init_ua();
|
108481
108509
|
init_process_deployment();
|
108482
108510
|
init_highlight();
|
@@ -108485,7 +108513,7 @@ var init_util = __esm({
|
|
108485
108513
|
init_errors_ts();
|
108486
108514
|
init_print_indications();
|
108487
108515
|
init_client();
|
108488
|
-
Now = class
|
108516
|
+
Now = class {
|
108489
108517
|
constructor({
|
108490
108518
|
client: client2,
|
108491
108519
|
url: url3 = null,
|
@@ -108493,7 +108521,6 @@ var init_util = __esm({
|
|
108493
108521
|
forceNew = false,
|
108494
108522
|
withCache = false
|
108495
108523
|
}) {
|
108496
|
-
super();
|
108497
108524
|
this.url = url3;
|
108498
108525
|
this._client = client2;
|
108499
108526
|
this._forceNew = forceNew;
|
@@ -108507,12 +108534,6 @@ var init_util = __esm({
|
|
108507
108534
|
get _token() {
|
108508
108535
|
return this._client.authConfig.token;
|
108509
108536
|
}
|
108510
|
-
get _output() {
|
108511
|
-
return this._client.output;
|
108512
|
-
}
|
108513
|
-
get _debug() {
|
108514
|
-
return this._client.output.isDebugEnabled();
|
108515
|
-
}
|
108516
108537
|
async create(path11, {
|
108517
108538
|
// Legacy
|
108518
108539
|
nowConfig = {},
|
@@ -108582,7 +108603,7 @@ var init_util = __esm({
|
|
108582
108603
|
});
|
108583
108604
|
if (deployment && deployment.warnings) {
|
108584
108605
|
let sizeExceeded = 0;
|
108585
|
-
const { log: log2, warn } = this.
|
108606
|
+
const { log: log2, warn } = this._client.output;
|
108586
108607
|
deployment.warnings.forEach((warning) => {
|
108587
108608
|
if (warning.reason === "size_limit_exceeded") {
|
108588
108609
|
const { sha, limit } = warning;
|
@@ -108597,7 +108618,7 @@ var init_util = __esm({
|
|
108597
108618
|
if (sizeExceeded > 0) {
|
108598
108619
|
warn(`${sizeExceeded} of the files exceeded the limit for your plan.`);
|
108599
108620
|
log2(
|
108600
|
-
`Please upgrade your plan here: ${
|
108621
|
+
`Please upgrade your plan here: ${import_chalk47.default.cyan(
|
108601
108622
|
"https://vercel.com/account/plan"
|
108602
108623
|
)}`
|
108603
108624
|
);
|
@@ -108673,54 +108694,6 @@ var init_util = __esm({
|
|
108673
108694
|
}
|
108674
108695
|
return new Error(error3.message || error3.errorMessage);
|
108675
108696
|
}
|
108676
|
-
async findDeployment(hostOrId) {
|
108677
|
-
const { debug: debug3 } = this._output;
|
108678
|
-
let id = hostOrId && !hostOrId.includes(".");
|
108679
|
-
if (!id) {
|
108680
|
-
let host = hostOrId.replace(/^https:\/\//i, "");
|
108681
|
-
if (host.slice(-1) === "/") {
|
108682
|
-
host = host.slice(0, -1);
|
108683
|
-
}
|
108684
|
-
const url3 = `/v10/now/deployments/get?url=${encodeURIComponent(
|
108685
|
-
host
|
108686
|
-
)}&resolve=1&noState=1`;
|
108687
|
-
const deployment = await this.retry(
|
108688
|
-
async (bail) => {
|
108689
|
-
const res = await this._fetch(url3);
|
108690
|
-
if (res.status >= 400 && res.status < 500) {
|
108691
|
-
debug3(`Bailing on getting a deployment due to ${res.status}`);
|
108692
|
-
return bail(
|
108693
|
-
await responseError2(res, `Failed to resolve deployment "${id}"`)
|
108694
|
-
);
|
108695
|
-
}
|
108696
|
-
if (res.status !== 200) {
|
108697
|
-
throw new Error("Fetching a deployment failed");
|
108698
|
-
}
|
108699
|
-
return res.json();
|
108700
|
-
},
|
108701
|
-
{ retries: 3, minTimeout: 2500, onRetry: this._onRetry }
|
108702
|
-
);
|
108703
|
-
id = deployment.id;
|
108704
|
-
}
|
108705
|
-
return this.retry(
|
108706
|
-
async (bail) => {
|
108707
|
-
const res = await this._fetch(
|
108708
|
-
`/v11/now/deployments/${encodeURIComponent(id)}`
|
108709
|
-
);
|
108710
|
-
if (res.status >= 400 && res.status < 500) {
|
108711
|
-
debug3(`Bailing on getting a deployment due to ${res.status}`);
|
108712
|
-
return bail(
|
108713
|
-
await responseError2(res, `Failed to resolve deployment "${id}"`)
|
108714
|
-
);
|
108715
|
-
}
|
108716
|
-
if (res.status !== 200) {
|
108717
|
-
throw new Error("Fetching a deployment failed");
|
108718
|
-
}
|
108719
|
-
return res.json();
|
108720
|
-
},
|
108721
|
-
{ retries: 3, minTimeout: 2500, onRetry: this._onRetry }
|
108722
|
-
);
|
108723
|
-
}
|
108724
108697
|
async remove(deploymentId, { hard = false }) {
|
108725
108698
|
const url3 = `/now/deployments/${deploymentId}?hard=${hard ? 1 : 0}`;
|
108726
108699
|
await this.retry(async (bail) => {
|
@@ -108744,10 +108717,8 @@ var init_util = __esm({
|
|
108744
108717
|
});
|
108745
108718
|
}
|
108746
108719
|
_onRetry(err) {
|
108747
|
-
this.
|
108720
|
+
this._client.output.debug(`Retrying: ${err}
|
108748
108721
|
${err.stack}`);
|
108749
|
-
}
|
108750
|
-
close() {
|
108751
108722
|
}
|
108752
108723
|
async _fetch(_url, opts = {}) {
|
108753
108724
|
if (opts.useCurrentTeam !== false && this.currentTeam) {
|
@@ -108770,7 +108741,7 @@ ${err.stack}`);
|
|
108770
108741
|
} else {
|
108771
108742
|
body = opts.body;
|
108772
108743
|
}
|
108773
|
-
const res = await this.
|
108744
|
+
const res = await this._client.output.time(
|
108774
108745
|
`${opts.method || "GET"} ${this._apiUrl}${_url} ${opts.body || ""}`,
|
108775
108746
|
(0, import_node_fetch3.default)(`${this._apiUrl}${_url}`, { ...opts, body })
|
108776
108747
|
);
|
@@ -108853,7 +108824,7 @@ async function setupAndLink(client2, path11, {
|
|
108853
108824
|
}
|
108854
108825
|
const shouldStartSetup = autoConfirm || await confirm(
|
108855
108826
|
client2,
|
108856
|
-
`${setupMsg} ${
|
108827
|
+
`${setupMsg} ${import_chalk48.default.cyan(`\u201C${humanizePath(path11)}\u201D`)}?`,
|
108857
108828
|
true
|
108858
108829
|
);
|
108859
108830
|
if (!shouldStartSetup) {
|
@@ -109003,12 +108974,12 @@ async function setupAndLink(client2, path11, {
|
|
109003
108974
|
return { status: "error", exitCode: 1 };
|
109004
108975
|
}
|
109005
108976
|
}
|
109006
|
-
var import_path19,
|
108977
|
+
var import_path19, import_chalk48, import_fs_extra12;
|
109007
108978
|
var init_setup_and_link = __esm({
|
109008
108979
|
"src/util/link/setup-and-link.ts"() {
|
109009
108980
|
"use strict";
|
109010
108981
|
import_path19 = require("path");
|
109011
|
-
|
108982
|
+
import_chalk48 = __toESM3(require_source());
|
109012
108983
|
import_fs_extra12 = __toESM3(require_lib());
|
109013
108984
|
init_link2();
|
109014
108985
|
init_create_project();
|
@@ -109170,11 +109141,9 @@ async function pullAllEnvFiles(environment, client2, link4, project, flags, cwd)
|
|
109170
109141
|
return pull(
|
109171
109142
|
client2,
|
109172
109143
|
link4,
|
109173
|
-
project,
|
109174
109144
|
environment,
|
109175
109145
|
flags,
|
109176
109146
|
[(0, import_path20.join)(".vercel", environmentFile)],
|
109177
|
-
client2.output,
|
109178
109147
|
cwd,
|
109179
109148
|
"vercel-cli:pull"
|
109180
109149
|
);
|
@@ -109235,20 +109204,20 @@ async function main(client2) {
|
|
109235
109204
|
const settingsStamp = stamp_default();
|
109236
109205
|
client2.output.print(
|
109237
109206
|
`${prependEmoji(
|
109238
|
-
`Downloaded project settings to ${
|
109207
|
+
`Downloaded project settings to ${import_chalk49.default.bold(
|
109239
109208
|
humanizePath((0, import_path20.join)(cwd, VERCEL_DIR2, VERCEL_DIR_PROJECT))
|
109240
|
-
)} ${
|
109209
|
+
)} ${import_chalk49.default.gray(settingsStamp())}`,
|
109241
109210
|
emoji("success")
|
109242
109211
|
)}
|
109243
109212
|
`
|
109244
109213
|
);
|
109245
109214
|
return 0;
|
109246
109215
|
}
|
109247
|
-
var
|
109216
|
+
var import_chalk49, import_path20;
|
109248
109217
|
var init_pull2 = __esm({
|
109249
109218
|
"src/commands/pull/index.ts"() {
|
109250
109219
|
"use strict";
|
109251
|
-
|
109220
|
+
import_chalk49 = __toESM3(require_source());
|
109252
109221
|
import_path20 = require("path");
|
109253
109222
|
init_emoji();
|
109254
109223
|
init_get_args();
|
@@ -117496,15 +117465,15 @@ var require_fd_slicer = __commonJS2({
|
|
117496
117465
|
var Writable = stream.Writable;
|
117497
117466
|
var PassThrough = stream.PassThrough;
|
117498
117467
|
var Pend = require_pend();
|
117499
|
-
var
|
117468
|
+
var EventEmitter2 = require("events").EventEmitter;
|
117500
117469
|
exports2.createFromBuffer = createFromBuffer;
|
117501
117470
|
exports2.createFromFd = createFromFd;
|
117502
117471
|
exports2.BufferSlicer = BufferSlicer;
|
117503
117472
|
exports2.FdSlicer = FdSlicer;
|
117504
|
-
util.inherits(FdSlicer,
|
117473
|
+
util.inherits(FdSlicer, EventEmitter2);
|
117505
117474
|
function FdSlicer(fd, options) {
|
117506
117475
|
options = options || {};
|
117507
|
-
|
117476
|
+
EventEmitter2.call(this);
|
117508
117477
|
this.fd = fd;
|
117509
117478
|
this.pend = new Pend();
|
117510
117479
|
this.pend.max = 1;
|
@@ -117656,9 +117625,9 @@ var require_fd_slicer = __commonJS2({
|
|
117656
117625
|
this.destroyed = true;
|
117657
117626
|
this.context.unref();
|
117658
117627
|
};
|
117659
|
-
util.inherits(BufferSlicer,
|
117628
|
+
util.inherits(BufferSlicer, EventEmitter2);
|
117660
117629
|
function BufferSlicer(buffer, options) {
|
117661
|
-
|
117630
|
+
EventEmitter2.call(this);
|
117662
117631
|
options = options || {};
|
117663
117632
|
this.refCount = 0;
|
117664
117633
|
this.buffer = buffer;
|
@@ -118069,7 +118038,7 @@ var require_yauzl = __commonJS2({
|
|
118069
118038
|
var fd_slicer = require_fd_slicer();
|
118070
118039
|
var crc32 = require_buffer_crc32();
|
118071
118040
|
var util = require("util");
|
118072
|
-
var
|
118041
|
+
var EventEmitter2 = require("events").EventEmitter;
|
118073
118042
|
var Transform = require("stream").Transform;
|
118074
118043
|
var PassThrough = require("stream").PassThrough;
|
118075
118044
|
var Writable = require("stream").Writable;
|
@@ -118235,10 +118204,10 @@ var require_yauzl = __commonJS2({
|
|
118235
118204
|
callback(new Error("end of central directory record signature not found"));
|
118236
118205
|
});
|
118237
118206
|
}
|
118238
|
-
util.inherits(ZipFile2,
|
118207
|
+
util.inherits(ZipFile2, EventEmitter2);
|
118239
118208
|
function ZipFile2(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
|
118240
118209
|
var self2 = this;
|
118241
|
-
|
118210
|
+
EventEmitter2.call(self2);
|
118242
118211
|
self2.reader = reader;
|
118243
118212
|
self2.reader.on("error", function(err) {
|
118244
118213
|
emitError(self2, err);
|
@@ -118630,9 +118599,9 @@ var require_yauzl = __commonJS2({
|
|
118630
118599
|
}
|
118631
118600
|
cb();
|
118632
118601
|
};
|
118633
|
-
util.inherits(RandomAccessReader,
|
118602
|
+
util.inherits(RandomAccessReader, EventEmitter2);
|
118634
118603
|
function RandomAccessReader() {
|
118635
|
-
|
118604
|
+
EventEmitter2.call(this);
|
118636
118605
|
this.refCount = 0;
|
118637
118606
|
}
|
118638
118607
|
RandomAccessReader.prototype.ref = function() {
|
@@ -118783,7 +118752,7 @@ var require_events_intercept = __commonJS2({
|
|
118783
118752
|
if (typeof this._maxInterceptors !== "undefined") {
|
118784
118753
|
m = this._maxInterceptors;
|
118785
118754
|
} else {
|
118786
|
-
m =
|
118755
|
+
m = EventEmitter2.defaultMaxInterceptors;
|
118787
118756
|
}
|
118788
118757
|
if (m && m > 0 && this._interceptors[type].length > m) {
|
118789
118758
|
this._interceptors[type].warned = true;
|
@@ -118911,19 +118880,19 @@ var require_events_intercept = __commonJS2({
|
|
118911
118880
|
}
|
118912
118881
|
return this;
|
118913
118882
|
}
|
118914
|
-
function
|
118883
|
+
function EventEmitter2() {
|
118915
118884
|
events.EventEmitter.call(this);
|
118916
118885
|
fixListeners(this);
|
118917
118886
|
}
|
118918
|
-
util.inherits(
|
118919
|
-
|
118920
|
-
|
118921
|
-
|
118922
|
-
|
118923
|
-
|
118924
|
-
|
118925
|
-
|
118926
|
-
|
118887
|
+
util.inherits(EventEmitter2, events.EventEmitter);
|
118888
|
+
EventEmitter2.prototype.intercept = intercept;
|
118889
|
+
EventEmitter2.prototype.emit = emitFactory(EventEmitter2.super_.prototype.emit);
|
118890
|
+
EventEmitter2.prototype.interceptors = interceptors;
|
118891
|
+
EventEmitter2.prototype.removeInterceptor = removeInterceptor;
|
118892
|
+
EventEmitter2.prototype.removeAllInterceptors = removeAllInterceptors;
|
118893
|
+
EventEmitter2.prototype.setMaxInterceptors = setMaxInterceptors;
|
118894
|
+
EventEmitter2.prototype.listeners = listenersFactory(EventEmitter2.super_.prototype.listeners);
|
118895
|
+
EventEmitter2.defaultMaxInterceptors = 10;
|
118927
118896
|
function monkeyPatch(emitter) {
|
118928
118897
|
var oldEmit = emitter.emit;
|
118929
118898
|
var oldListeners = emitter.listeners;
|
@@ -118937,7 +118906,7 @@ var require_events_intercept = __commonJS2({
|
|
118937
118906
|
fixListeners(emitter);
|
118938
118907
|
}
|
118939
118908
|
module2.exports = {
|
118940
|
-
EventEmitter:
|
118909
|
+
EventEmitter: EventEmitter2,
|
118941
118910
|
patch: monkeyPatch
|
118942
118911
|
};
|
118943
118912
|
})();
|
@@ -121752,9 +121721,9 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
|
|
121752
121721
|
const relOutputDir = (0, import_path28.relative)(cwd, outputDir);
|
121753
121722
|
output2.print(
|
121754
121723
|
`${prependEmoji(
|
121755
|
-
`Build Completed in ${
|
121724
|
+
`Build Completed in ${import_chalk50.default.bold(
|
121756
121725
|
relOutputDir.startsWith("..") ? outputDir : relOutputDir
|
121757
|
-
)} ${
|
121726
|
+
)} ${import_chalk50.default.gray(buildStamp())}`,
|
121758
121727
|
emoji("success")
|
121759
121728
|
)}
|
121760
121729
|
`
|
@@ -121887,12 +121856,12 @@ async function getFrameworkRoutes(framework, dirPrefix) {
|
|
121887
121856
|
}
|
121888
121857
|
return routes2;
|
121889
121858
|
}
|
121890
|
-
var import_fs_extra18,
|
121859
|
+
var import_fs_extra18, import_chalk50, import_dotenv, import_semver3, import_minimatch2, import_path28, import_frameworks4, import_build_utils12, import_fs_detectors4, import_routing_utils2, import_client8;
|
121891
121860
|
var init_build = __esm({
|
121892
121861
|
"src/commands/build/index.ts"() {
|
121893
121862
|
"use strict";
|
121894
121863
|
import_fs_extra18 = __toESM3(require_lib());
|
121895
|
-
|
121864
|
+
import_chalk50 = __toESM3(require_source());
|
121896
121865
|
import_dotenv = __toESM3(require_main3());
|
121897
121866
|
import_semver3 = __toESM3(require_semver());
|
121898
121867
|
import_minimatch2 = __toESM3(require_minimatch2());
|
@@ -121989,7 +121958,7 @@ async function add(client2, opts, args2) {
|
|
121989
121958
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
121990
121959
|
);
|
121991
121960
|
output2.print(
|
121992
|
-
` ${
|
121961
|
+
` ${import_chalk51.default.cyan(
|
121993
121962
|
`${getCommandName(
|
121994
121963
|
"certs add --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
|
121995
121964
|
)}`
|
@@ -122001,9 +121970,9 @@ async function add(client2, opts, args2) {
|
|
122001
121970
|
cert = await createCertFromFile(client2, keyPath, crtPath, caPath);
|
122002
121971
|
} else {
|
122003
121972
|
output2.warn(
|
122004
|
-
`${
|
121973
|
+
`${import_chalk51.default.cyan(
|
122005
121974
|
getCommandName("certs add")
|
122006
|
-
)} will be soon deprecated. Please use ${
|
121975
|
+
)} will be soon deprecated. Please use ${import_chalk51.default.cyan(
|
122007
121976
|
getCommandName("certs issue <cn> <cns>")
|
122008
121977
|
)} instead`
|
122009
121978
|
);
|
@@ -122012,7 +121981,7 @@ async function add(client2, opts, args2) {
|
|
122012
121981
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
122013
121982
|
);
|
122014
121983
|
output2.print(
|
122015
|
-
` ${
|
121984
|
+
` ${import_chalk51.default.cyan(getCommandName("certs add <cn>[, <cn>]"))}
|
122016
121985
|
`
|
122017
121986
|
);
|
122018
121987
|
return 1;
|
@@ -122022,7 +121991,7 @@ async function add(client2, opts, args2) {
|
|
122022
121991
|
[]
|
122023
121992
|
);
|
122024
121993
|
output2.spinner(
|
122025
|
-
`Generating a certificate for ${
|
121994
|
+
`Generating a certificate for ${import_chalk51.default.bold(cns.join(", "))}`
|
122026
121995
|
);
|
122027
121996
|
cert = await createCertForCns(client2, cns, contextName);
|
122028
121997
|
output2.stopSpinner();
|
@@ -122032,18 +122001,18 @@ async function add(client2, opts, args2) {
|
|
122032
122001
|
return 1;
|
122033
122002
|
} else {
|
122034
122003
|
output2.success(
|
122035
|
-
`Certificate entry for ${
|
122004
|
+
`Certificate entry for ${import_chalk51.default.bold(
|
122036
122005
|
cert.cns.join(", ")
|
122037
122006
|
)} created ${addStamp()}`
|
122038
122007
|
);
|
122039
122008
|
}
|
122040
122009
|
return 0;
|
122041
122010
|
}
|
122042
|
-
var
|
122011
|
+
var import_chalk51, add_default;
|
122043
122012
|
var init_add = __esm({
|
122044
122013
|
"src/commands/certs/add.ts"() {
|
122045
122014
|
"use strict";
|
122046
|
-
|
122015
|
+
import_chalk51 = __toESM3(require_source());
|
122047
122016
|
init_get_scope();
|
122048
122017
|
init_stamp();
|
122049
122018
|
init_create_cert_from_file();
|
@@ -122056,7 +122025,7 @@ var init_add = __esm({
|
|
122056
122025
|
// src/util/certs/finish-cert-order.ts
|
122057
122026
|
async function startCertOrder(client2, cns, context) {
|
122058
122027
|
client2.output.spinner(
|
122059
|
-
`Issuing a certificate for ${
|
122028
|
+
`Issuing a certificate for ${import_chalk52.default.bold(cns.join(", "))}`
|
122060
122029
|
);
|
122061
122030
|
try {
|
122062
122031
|
const cert = await client2.fetch("/v3/now/certs", {
|
@@ -122080,11 +122049,11 @@ async function startCertOrder(client2, cns, context) {
|
|
122080
122049
|
throw err;
|
122081
122050
|
}
|
122082
122051
|
}
|
122083
|
-
var
|
122052
|
+
var import_chalk52;
|
122084
122053
|
var init_finish_cert_order = __esm({
|
122085
122054
|
"src/util/certs/finish-cert-order.ts"() {
|
122086
122055
|
"use strict";
|
122087
|
-
|
122056
|
+
import_chalk52 = __toESM3(require_source());
|
122088
122057
|
init_errors_ts();
|
122089
122058
|
init_map_cert_error();
|
122090
122059
|
}
|
@@ -122103,9 +122072,9 @@ var init_get_cns_from_args = __esm({
|
|
122103
122072
|
// src/util/certs/start-cert-order.ts
|
122104
122073
|
async function startCertOrder2(client2, cns, contextName) {
|
122105
122074
|
client2.output.spinner(
|
122106
|
-
`Starting certificate issuance for ${
|
122075
|
+
`Starting certificate issuance for ${import_chalk53.default.bold(
|
122107
122076
|
cns.join(", ")
|
122108
|
-
)} under ${
|
122077
|
+
)} under ${import_chalk53.default.bold(contextName)}`
|
122109
122078
|
);
|
122110
122079
|
const order = await client2.fetch("/v3/now/certs", {
|
122111
122080
|
method: "PATCH",
|
@@ -122116,11 +122085,11 @@ async function startCertOrder2(client2, cns, contextName) {
|
|
122116
122085
|
});
|
122117
122086
|
return order;
|
122118
122087
|
}
|
122119
|
-
var
|
122088
|
+
var import_chalk53;
|
122120
122089
|
var init_start_cert_order = __esm({
|
122121
122090
|
"src/util/certs/start-cert-order.ts"() {
|
122122
122091
|
"use strict";
|
122123
|
-
|
122092
|
+
import_chalk53 = __toESM3(require_source());
|
122124
122093
|
}
|
122125
122094
|
});
|
122126
122095
|
|
@@ -122147,7 +122116,7 @@ async function issue(client2, opts, args2) {
|
|
122147
122116
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
122148
122117
|
);
|
122149
122118
|
output2.print(
|
122150
|
-
` ${
|
122119
|
+
` ${import_chalk54.default.cyan(
|
122151
122120
|
getCommandName(
|
122152
122121
|
"certs issue --crt <domain.crt> --key <domain.key> --ca <ca.crt>"
|
122153
122122
|
)
|
@@ -122162,7 +122131,7 @@ async function issue(client2, opts, args2) {
|
|
122162
122131
|
return 1;
|
122163
122132
|
}
|
122164
122133
|
output2.success(
|
122165
|
-
`Certificate entry for ${
|
122134
|
+
`Certificate entry for ${import_chalk54.default.bold(
|
122166
122135
|
cert.cns.join(", ")
|
122167
122136
|
)} created ${addStamp()}`
|
122168
122137
|
);
|
@@ -122173,7 +122142,7 @@ async function issue(client2, opts, args2) {
|
|
122173
122142
|
`Invalid number of arguments to create a custom certificate entry. Usage:`
|
122174
122143
|
);
|
122175
122144
|
output2.print(
|
122176
|
-
` ${
|
122145
|
+
` ${import_chalk54.default.cyan(getCommandName("certs issue <cn>[, <cn>]"))}
|
122177
122146
|
`
|
122178
122147
|
);
|
122179
122148
|
return 1;
|
@@ -122199,14 +122168,14 @@ async function issue(client2, opts, args2) {
|
|
122199
122168
|
}
|
122200
122169
|
if (handledResult instanceof DomainPermissionDenied) {
|
122201
122170
|
output2.error(
|
122202
|
-
`You do not have permissions over domain ${
|
122171
|
+
`You do not have permissions over domain ${import_chalk54.default.underline(
|
122203
122172
|
handledResult.meta.domain
|
122204
|
-
)} under ${
|
122173
|
+
)} under ${import_chalk54.default.bold(handledResult.meta.context)}.`
|
122205
122174
|
);
|
122206
122175
|
return 1;
|
122207
122176
|
}
|
122208
122177
|
output2.success(
|
122209
|
-
`Certificate entry for ${
|
122178
|
+
`Certificate entry for ${import_chalk54.default.bold(
|
122210
122179
|
handledResult.cns.join(", ")
|
122211
122180
|
)} created ${addStamp()}`
|
122212
122181
|
);
|
@@ -122228,7 +122197,7 @@ async function runStartOrder(output2, client2, cns, contextName, stamp, { fallin
|
|
122228
122197
|
}
|
122229
122198
|
if (pendingChallenges.length === 0) {
|
122230
122199
|
output2.log(
|
122231
|
-
`A certificate issuance for ${
|
122200
|
+
`A certificate issuance for ${import_chalk54.default.bold(
|
122232
122201
|
cns.join(", ")
|
122233
122202
|
)} has been started ${stamp()}`
|
122234
122203
|
);
|
@@ -122237,13 +122206,13 @@ async function runStartOrder(output2, client2, cns, contextName, stamp, { fallin
|
|
122237
122206
|
`
|
122238
122207
|
);
|
122239
122208
|
output2.print(
|
122240
|
-
` ${
|
122209
|
+
` ${import_chalk54.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
|
122241
122210
|
`
|
122242
122211
|
);
|
122243
122212
|
return 0;
|
122244
122213
|
}
|
122245
122214
|
output2.log(
|
122246
|
-
`A certificate issuance for ${
|
122215
|
+
`A certificate issuance for ${import_chalk54.default.bold(
|
122247
122216
|
cns.join(", ")
|
122248
122217
|
)} has been started ${stamp()}`
|
122249
122218
|
);
|
@@ -122272,7 +122241,7 @@ async function runStartOrder(output2, client2, cns, contextName, stamp, { fallin
|
|
122272
122241
|
`);
|
122273
122242
|
output2.log(`To issue the certificate once the records are added, run:`);
|
122274
122243
|
output2.print(
|
122275
|
-
` ${
|
122244
|
+
` ${import_chalk54.default.cyan(getCommandName(`certs issue ${cns.join(" ")}`))}
|
122276
122245
|
`
|
122277
122246
|
);
|
122278
122247
|
output2.print(
|
@@ -122280,12 +122249,12 @@ async function runStartOrder(output2, client2, cns, contextName, stamp, { fallin
|
|
122280
122249
|
);
|
122281
122250
|
return 0;
|
122282
122251
|
}
|
122283
|
-
var import_psl5,
|
122252
|
+
var import_psl5, import_chalk54;
|
122284
122253
|
var init_issue = __esm({
|
122285
122254
|
"src/commands/certs/issue.ts"() {
|
122286
122255
|
"use strict";
|
122287
122256
|
import_psl5 = __toESM3(require_psl());
|
122288
|
-
|
122257
|
+
import_chalk54 = __toESM3(require_source());
|
122289
122258
|
init_errors_ts();
|
122290
122259
|
init_create_cert_for_cns();
|
122291
122260
|
init_create_cert_from_file();
|
@@ -122328,7 +122297,7 @@ async function ls2(client2, opts, args2) {
|
|
122328
122297
|
const lsStamp = stamp_default();
|
122329
122298
|
if (args2.length !== 0) {
|
122330
122299
|
output2.error(
|
122331
|
-
`Invalid number of arguments. Usage: ${
|
122300
|
+
`Invalid number of arguments. Usage: ${import_chalk55.default.cyan(
|
122332
122301
|
`${getCommandName("certs ls")}`
|
122333
122302
|
)}`
|
122334
122303
|
);
|
@@ -122336,7 +122305,7 @@ async function ls2(client2, opts, args2) {
|
|
122336
122305
|
}
|
122337
122306
|
const { certs, pagination } = await getCerts(client2, ...paginationOptions);
|
122338
122307
|
output2.log(
|
122339
|
-
`${certs.length > 0 ? "Certificates" : "No certificates"} found under ${
|
122308
|
+
`${certs.length > 0 ? "Certificates" : "No certificates"} found under ${import_chalk55.default.bold(contextName)} ${lsStamp()}`
|
122340
122309
|
);
|
122341
122310
|
if (certs.length > 0) {
|
122342
122311
|
client2.stdout.write(formatCertsTable(certs));
|
@@ -122360,11 +122329,11 @@ function formatCertsTable(certsList) {
|
|
122360
122329
|
}
|
122361
122330
|
function formatCertsTableHead() {
|
122362
122331
|
return [
|
122363
|
-
|
122364
|
-
|
122365
|
-
|
122366
|
-
|
122367
|
-
|
122332
|
+
import_chalk55.default.dim("id"),
|
122333
|
+
import_chalk55.default.dim("cns"),
|
122334
|
+
import_chalk55.default.dim("expiration"),
|
122335
|
+
import_chalk55.default.dim("renew"),
|
122336
|
+
import_chalk55.default.dim("age")
|
122368
122337
|
];
|
122369
122338
|
}
|
122370
122339
|
function formatCertsTableBody(certsList) {
|
@@ -122383,7 +122352,7 @@ function formatCertNonFirstCn(cn, multiple) {
|
|
122383
122352
|
return ["", formatCertCn(cn, multiple), "", "", ""];
|
122384
122353
|
}
|
122385
122354
|
function formatCertCn(cn, multiple) {
|
122386
|
-
return multiple ? `${
|
122355
|
+
return multiple ? `${import_chalk55.default.gray("-")} ${import_chalk55.default.bold(cn)}` : import_chalk55.default.bold(cn);
|
122387
122356
|
}
|
122388
122357
|
function formatCertFirstCn(time, cert, cn, multiple) {
|
122389
122358
|
return [
|
@@ -122391,18 +122360,18 @@ function formatCertFirstCn(time, cert, cn, multiple) {
|
|
122391
122360
|
formatCertCn(cn, multiple),
|
122392
122361
|
formatExpirationDate(new Date(cert.expiration)),
|
122393
122362
|
cert.autoRenew ? "yes" : "no",
|
122394
|
-
|
122363
|
+
import_chalk55.default.gray((0, import_ms9.default)(time.getTime() - new Date(cert.created).getTime()))
|
122395
122364
|
];
|
122396
122365
|
}
|
122397
122366
|
function formatExpirationDate(date) {
|
122398
122367
|
const diff = date.getTime() - Date.now();
|
122399
|
-
return diff < 0 ?
|
122368
|
+
return diff < 0 ? import_chalk55.default.gray(`${(0, import_ms9.default)(-diff)} ago`) : import_chalk55.default.gray(`in ${(0, import_ms9.default)(diff)}`);
|
122400
122369
|
}
|
122401
|
-
var
|
122370
|
+
var import_chalk55, import_ms9, ls_default;
|
122402
122371
|
var init_ls2 = __esm({
|
122403
122372
|
"src/commands/certs/ls.ts"() {
|
122404
122373
|
"use strict";
|
122405
|
-
|
122374
|
+
import_chalk55 = __toESM3(require_source());
|
122406
122375
|
import_ms9 = __toESM3(require_ms2());
|
122407
122376
|
init_table();
|
122408
122377
|
init_get_scope();
|
@@ -122475,7 +122444,7 @@ async function rm2(client2, opts, args2) {
|
|
122475
122444
|
const { contextName } = await getScope(client2);
|
122476
122445
|
if (args2.length !== 1) {
|
122477
122446
|
output2.error(
|
122478
|
-
`Invalid number of arguments. Usage: ${
|
122447
|
+
`Invalid number of arguments. Usage: ${import_chalk56.default.cyan(
|
122479
122448
|
`${getCommandName("certs rm <id or cn>")}`
|
122480
122449
|
)}`
|
122481
122450
|
);
|
@@ -122492,13 +122461,13 @@ async function rm2(client2, opts, args2) {
|
|
122492
122461
|
if (certs.length === 0) {
|
122493
122462
|
if (id.includes(".")) {
|
122494
122463
|
output2.error(
|
122495
|
-
`No custom certificates found for "${id}" under ${
|
122464
|
+
`No custom certificates found for "${id}" under ${import_chalk56.default.bold(
|
122496
122465
|
contextName
|
122497
122466
|
)}`
|
122498
122467
|
);
|
122499
122468
|
} else {
|
122500
122469
|
output2.error(
|
122501
|
-
`No certificates found by id "${id}" under ${
|
122470
|
+
`No certificates found by id "${id}" under ${import_chalk56.default.bold(contextName)}`
|
122502
122471
|
);
|
122503
122472
|
}
|
122504
122473
|
return 1;
|
@@ -122515,7 +122484,7 @@ async function rm2(client2, opts, args2) {
|
|
122515
122484
|
certs.map((cert) => deleteCertById(output2, client2, cert.uid))
|
122516
122485
|
);
|
122517
122486
|
output2.success(
|
122518
|
-
`${
|
122487
|
+
`${import_chalk56.default.bold(
|
122519
122488
|
(0, import_pluralize5.default)("Certificate", certs.length, true)
|
122520
122489
|
)} removed ${rmStamp()}`
|
122521
122490
|
);
|
@@ -122543,7 +122512,7 @@ function readConfirmation(output2, msg, certs) {
|
|
122543
122512
|
`
|
122544
122513
|
);
|
122545
122514
|
output2.print(
|
122546
|
-
`${
|
122515
|
+
`${import_chalk56.default.bold.red("> Are you sure?")} ${import_chalk56.default.gray("(y/N) ")}`
|
122547
122516
|
);
|
122548
122517
|
process.stdin.on("data", (d) => {
|
122549
122518
|
process.stdin.pause();
|
@@ -122554,15 +122523,15 @@ function readConfirmation(output2, msg, certs) {
|
|
122554
122523
|
function formatCertRow(cert) {
|
122555
122524
|
return [
|
122556
122525
|
cert.uid,
|
122557
|
-
|
122558
|
-
...cert.created ? [
|
122526
|
+
import_chalk56.default.bold(cert.cns ? cert.cns.join(", ") : "\u2013"),
|
122527
|
+
...cert.created ? [import_chalk56.default.gray(`${(0, import_ms10.default)(Date.now() - new Date(cert.created).getTime())} ago`)] : []
|
122559
122528
|
];
|
122560
122529
|
}
|
122561
|
-
var
|
122530
|
+
var import_chalk56, import_ms10, import_pluralize5, rm_default;
|
122562
122531
|
var init_rm2 = __esm({
|
122563
122532
|
"src/commands/certs/rm.ts"() {
|
122564
122533
|
"use strict";
|
122565
|
-
|
122534
|
+
import_chalk56 = __toESM3(require_source());
|
122566
122535
|
import_ms10 = __toESM3(require_ms2());
|
122567
122536
|
import_pluralize5 = __toESM3(require_pluralize());
|
122568
122537
|
init_table();
|
@@ -122844,21 +122813,21 @@ async function printDeploymentStatus(client2, {
|
|
122844
122813
|
}
|
122845
122814
|
const newline = "\n";
|
122846
122815
|
for (let indication of indications) {
|
122847
|
-
const message2 = prependEmoji(
|
122816
|
+
const message2 = prependEmoji(import_chalk57.default.dim(indication.payload), emoji(indication.type)) + newline;
|
122848
122817
|
let link4 = "";
|
122849
122818
|
if (indication.link)
|
122850
|
-
link4 =
|
122819
|
+
link4 = import_chalk57.default.dim(
|
122851
122820
|
`${indication.action || "Learn More"}: ${link_default(indication.link)}`
|
122852
122821
|
) + newline;
|
122853
122822
|
output2.print(message2 + link4);
|
122854
122823
|
}
|
122855
122824
|
return 0;
|
122856
122825
|
}
|
122857
|
-
var
|
122826
|
+
var import_chalk57;
|
122858
122827
|
var init_print_deployment_status = __esm({
|
122859
122828
|
"src/util/deploy/print-deployment-status.ts"() {
|
122860
122829
|
"use strict";
|
122861
|
-
|
122830
|
+
import_chalk57 = __toESM3(require_source());
|
122862
122831
|
init_is_deploying();
|
122863
122832
|
init_link();
|
122864
122833
|
init_emoji();
|
@@ -123097,7 +123066,7 @@ function handleCreateDeployError(output2, error3, localConfig) {
|
|
123097
123066
|
}
|
123098
123067
|
if (error3 instanceof DomainVerificationFailed) {
|
123099
123068
|
output2.error(
|
123100
|
-
`The domain used as a suffix ${
|
123069
|
+
`The domain used as a suffix ${import_chalk58.default.underline(
|
123101
123070
|
error3.meta.domain
|
123102
123071
|
)} is not verified and can't be used as custom suffix.`
|
123103
123072
|
);
|
@@ -123105,7 +123074,7 @@ function handleCreateDeployError(output2, error3, localConfig) {
|
|
123105
123074
|
}
|
123106
123075
|
if (error3 instanceof DomainPermissionDenied) {
|
123107
123076
|
output2.error(
|
123108
|
-
`You don't have permissions to access the domain used as a suffix ${
|
123077
|
+
`You don't have permissions to access the domain used as a suffix ${import_chalk58.default.underline(
|
123109
123078
|
error3.meta.domain
|
123110
123079
|
)}.`
|
123111
123080
|
);
|
@@ -123131,7 +123100,7 @@ function handleCreateDeployError(output2, error3, localConfig) {
|
|
123131
123100
|
}
|
123132
123101
|
if (error3 instanceof DomainNotVerified) {
|
123133
123102
|
output2.error(
|
123134
|
-
`The domain used as an alias ${
|
123103
|
+
`The domain used as an alias ${import_chalk58.default.underline(
|
123135
123104
|
error3.meta.domain
|
123136
123105
|
)} is not verified yet. Please verify it.`
|
123137
123106
|
);
|
@@ -123150,7 +123119,7 @@ function handleCreateDeployError(output2, error3, localConfig) {
|
|
123150
123119
|
}
|
123151
123120
|
return error3;
|
123152
123121
|
}
|
123153
|
-
var import_build_utils13, import_client10, import_error_utils18, import_bytes5,
|
123122
|
+
var import_build_utils13, import_client10, import_error_utils18, import_bytes5, import_chalk58, import_fs_extra20, import_ms11, import_path32, deploy_default, addProcessEnv;
|
123154
123123
|
var init_deploy = __esm({
|
123155
123124
|
"src/commands/deploy/index.ts"() {
|
123156
123125
|
"use strict";
|
@@ -123158,7 +123127,7 @@ var init_deploy = __esm({
|
|
123158
123127
|
import_client10 = __toESM3(require_dist12());
|
123159
123128
|
import_error_utils18 = __toESM3(require_dist2());
|
123160
123129
|
import_bytes5 = __toESM3(require_bytes());
|
123161
|
-
|
123130
|
+
import_chalk58 = __toESM3(require_source());
|
123162
123131
|
import_fs_extra20 = __toESM3(require_lib());
|
123163
123132
|
import_ms11 = __toESM3(require_ms2());
|
123164
123133
|
import_path32 = require("path");
|
@@ -123298,7 +123267,7 @@ var init_deploy = __esm({
|
|
123298
123267
|
if (status === "not_linked") {
|
123299
123268
|
const shouldStartSetup = autoConfirm || await confirm(
|
123300
123269
|
client2,
|
123301
|
-
`Set up and deploy ${
|
123270
|
+
`Set up and deploy ${import_chalk58.default.cyan(`\u201C${humanizePath(cwd)}\u201D`)}?`,
|
123302
123271
|
true
|
123303
123272
|
);
|
123304
123273
|
if (!shouldStartSetup) {
|
@@ -123708,16 +123677,16 @@ ${err.stack}`);
|
|
123708
123677
|
val = process.env[key];
|
123709
123678
|
if (typeof val === "string") {
|
123710
123679
|
log2(
|
123711
|
-
`Reading ${
|
123712
|
-
`"${
|
123680
|
+
`Reading ${import_chalk58.default.bold(
|
123681
|
+
`"${import_chalk58.default.bold(key)}"`
|
123713
123682
|
)} from your env (as no value was specified)`
|
123714
123683
|
);
|
123715
123684
|
env[key] = val.replace(/^@/, "\\@");
|
123716
123685
|
} else {
|
123717
123686
|
throw new Error(
|
123718
|
-
`No value specified for env ${
|
123719
|
-
`"${
|
123720
|
-
)} and it was not found in your env
|
123687
|
+
`No value specified for env variable ${import_chalk58.default.bold(
|
123688
|
+
`"${import_chalk58.default.bold(key)}"`
|
123689
|
+
)} and it was not found in your env. If you meant to specify an environment to deploy to, use ${param("--target")}`
|
123721
123690
|
);
|
123722
123691
|
}
|
123723
123692
|
}
|
@@ -123896,7 +123865,7 @@ var require_event_listener_count = __commonJS2({
|
|
123896
123865
|
var require_compat = __commonJS2({
|
123897
123866
|
"../../node_modules/.pnpm/depd@1.1.2/node_modules/depd/lib/compat/index.js"(exports2, module2) {
|
123898
123867
|
"use strict";
|
123899
|
-
var
|
123868
|
+
var EventEmitter2 = require("events").EventEmitter;
|
123900
123869
|
lazyProperty(module2.exports, "callSiteToString", function callSiteToString2() {
|
123901
123870
|
var limit = Error.stackTraceLimit;
|
123902
123871
|
var obj = {};
|
@@ -123913,7 +123882,7 @@ var require_compat = __commonJS2({
|
|
123913
123882
|
return stack2[0].toString ? toString2 : require_callsite_tostring();
|
123914
123883
|
});
|
123915
123884
|
lazyProperty(module2.exports, "eventListenerCount", function eventListenerCount2() {
|
123916
|
-
return
|
123885
|
+
return EventEmitter2.listenerCount || require_event_listener_count();
|
123917
123886
|
});
|
123918
123887
|
function lazyProperty(obj, prop, getter) {
|
123919
123888
|
function get() {
|
@@ -128252,11 +128221,11 @@ var require_eventemitter3 = __commonJS2({
|
|
128252
128221
|
else
|
128253
128222
|
delete emitter._events[evt];
|
128254
128223
|
}
|
128255
|
-
function
|
128224
|
+
function EventEmitter2() {
|
128256
128225
|
this._events = new Events();
|
128257
128226
|
this._eventsCount = 0;
|
128258
128227
|
}
|
128259
|
-
|
128228
|
+
EventEmitter2.prototype.eventNames = function eventNames() {
|
128260
128229
|
var names = [], events, name;
|
128261
128230
|
if (this._eventsCount === 0)
|
128262
128231
|
return names;
|
@@ -128269,7 +128238,7 @@ var require_eventemitter3 = __commonJS2({
|
|
128269
128238
|
}
|
128270
128239
|
return names;
|
128271
128240
|
};
|
128272
|
-
|
128241
|
+
EventEmitter2.prototype.listeners = function listeners(event) {
|
128273
128242
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
128274
128243
|
if (!handlers)
|
128275
128244
|
return [];
|
@@ -128280,7 +128249,7 @@ var require_eventemitter3 = __commonJS2({
|
|
128280
128249
|
}
|
128281
128250
|
return ee;
|
128282
128251
|
};
|
128283
|
-
|
128252
|
+
EventEmitter2.prototype.listenerCount = function listenerCount(event) {
|
128284
128253
|
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
128285
128254
|
if (!listeners)
|
128286
128255
|
return 0;
|
@@ -128288,7 +128257,7 @@ var require_eventemitter3 = __commonJS2({
|
|
128288
128257
|
return 1;
|
128289
128258
|
return listeners.length;
|
128290
128259
|
};
|
128291
|
-
|
128260
|
+
EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
128292
128261
|
var evt = prefix ? prefix + event : event;
|
128293
128262
|
if (!this._events[evt])
|
128294
128263
|
return false;
|
@@ -128343,13 +128312,13 @@ var require_eventemitter3 = __commonJS2({
|
|
128343
128312
|
}
|
128344
128313
|
return true;
|
128345
128314
|
};
|
128346
|
-
|
128315
|
+
EventEmitter2.prototype.on = function on(event, fn2, context) {
|
128347
128316
|
return addListener(this, event, fn2, context, false);
|
128348
128317
|
};
|
128349
|
-
|
128318
|
+
EventEmitter2.prototype.once = function once2(event, fn2, context) {
|
128350
128319
|
return addListener(this, event, fn2, context, true);
|
128351
128320
|
};
|
128352
|
-
|
128321
|
+
EventEmitter2.prototype.removeListener = function removeListener(event, fn2, context, once2) {
|
128353
128322
|
var evt = prefix ? prefix + event : event;
|
128354
128323
|
if (!this._events[evt])
|
128355
128324
|
return this;
|
@@ -128375,7 +128344,7 @@ var require_eventemitter3 = __commonJS2({
|
|
128375
128344
|
}
|
128376
128345
|
return this;
|
128377
128346
|
};
|
128378
|
-
|
128347
|
+
EventEmitter2.prototype.removeAllListeners = function removeAllListeners(event) {
|
128379
128348
|
var evt;
|
128380
128349
|
if (event) {
|
128381
128350
|
evt = prefix ? prefix + event : event;
|
@@ -128387,12 +128356,12 @@ var require_eventemitter3 = __commonJS2({
|
|
128387
128356
|
}
|
128388
128357
|
return this;
|
128389
128358
|
};
|
128390
|
-
|
128391
|
-
|
128392
|
-
|
128393
|
-
|
128359
|
+
EventEmitter2.prototype.off = EventEmitter2.prototype.removeListener;
|
128360
|
+
EventEmitter2.prototype.addListener = EventEmitter2.prototype.on;
|
128361
|
+
EventEmitter2.prefixed = prefix;
|
128362
|
+
EventEmitter2.EventEmitter = EventEmitter2;
|
128394
128363
|
if ("undefined" !== typeof module2) {
|
128395
|
-
module2.exports =
|
128364
|
+
module2.exports = EventEmitter2;
|
128396
128365
|
}
|
128397
128366
|
}
|
128398
128367
|
});
|
@@ -140836,14 +140805,14 @@ function buildMatchEquals(a, b) {
|
|
140836
140805
|
return false;
|
140837
140806
|
return true;
|
140838
140807
|
}
|
140839
|
-
var import_url18, import_http3, import_fs_extra21,
|
140808
|
+
var import_url18, import_http3, import_fs_extra21, import_chalk59, import_node_fetch5, import_pluralize7, import_raw_body, import_async_listen3, import_minimatch4, import_http_proxy, import_crypto2, import_serve_handler, import_chokidar, import_dotenv2, import_path36, 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_client11, import_routing_utils5, import_build_utils16, import_fs_detectors6, import_frameworks5, import_error_utils19, frontendRuntimeSet, DevServer;
|
140840
140809
|
var init_server = __esm({
|
140841
140810
|
"src/util/dev/server.ts"() {
|
140842
140811
|
"use strict";
|
140843
140812
|
import_url18 = __toESM3(require("url"));
|
140844
140813
|
import_http3 = __toESM3(require("http"));
|
140845
140814
|
import_fs_extra21 = __toESM3(require_lib());
|
140846
|
-
|
140815
|
+
import_chalk59 = __toESM3(require_source());
|
140847
140816
|
import_node_fetch5 = __toESM3(require_lib7());
|
140848
140817
|
import_pluralize7 = __toESM3(require_pluralize());
|
140849
140818
|
import_raw_body = __toESM3(require_raw_body());
|
@@ -140919,7 +140888,7 @@ var init_server = __esm({
|
|
140919
140888
|
return;
|
140920
140889
|
}
|
140921
140890
|
const method = req.method || "GET";
|
140922
|
-
this.output.debug(`${
|
140891
|
+
this.output.debug(`${import_chalk59.default.bold(method)} ${req.url}`);
|
140923
140892
|
try {
|
140924
140893
|
const vercelConfig = await this.getVercelConfig();
|
140925
140894
|
await this.serveProjectAsNowV2(req, res, requestId, vercelConfig);
|
@@ -141121,7 +141090,7 @@ var init_server = __esm({
|
|
141121
141090
|
}
|
141122
141091
|
} catch (err) {
|
141123
141092
|
if ((0, import_error_utils19.isSpawnError)(err) && err.code === "ENOENT") {
|
141124
|
-
err.message = `Command not found: ${
|
141093
|
+
err.message = `Command not found: ${import_chalk59.default.cyan(
|
141125
141094
|
err.path,
|
141126
141095
|
...err.spawnargs
|
141127
141096
|
)}
|
@@ -141378,7 +141347,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
141378
141347
|
});
|
141379
141348
|
} catch (err) {
|
141380
141349
|
if ((0, import_error_utils19.isSpawnError)(err) && err.code === "ENOENT") {
|
141381
|
-
err.message = `Command not found: ${
|
141350
|
+
err.message = `Command not found: ${import_chalk59.default.cyan(
|
141382
141351
|
err.path,
|
141383
141352
|
...err.spawnargs
|
141384
141353
|
)}
|
@@ -142077,10 +142046,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
142077
142046
|
*/
|
142078
142047
|
async _start(...listenSpec) {
|
142079
142048
|
if (!import_fs_extra21.default.existsSync(this.cwd)) {
|
142080
|
-
throw new Error(`${
|
142049
|
+
throw new Error(`${import_chalk59.default.bold(this.cwd)} doesn't exist`);
|
142081
142050
|
}
|
142082
142051
|
if (!import_fs_extra21.default.lstatSync(this.cwd).isDirectory()) {
|
142083
|
-
throw new Error(`${
|
142052
|
+
throw new Error(`${import_chalk59.default.bold(this.cwd)} is not a directory`);
|
142084
142053
|
}
|
142085
142054
|
const { ig } = await (0, import_client11.getVercelIgnore)(this.cwd);
|
142086
142055
|
this.filter = ig.createFilter();
|
@@ -142094,14 +142063,14 @@ Please ensure that ${cmd(err.path)} is properly installed`;
|
|
142094
142063
|
if (err.code === "EADDRINUSE") {
|
142095
142064
|
if (typeof listenSpec[0] === "number") {
|
142096
142065
|
this.output.note(
|
142097
|
-
`Requested port ${
|
142066
|
+
`Requested port ${import_chalk59.default.yellow(
|
142098
142067
|
String(listenSpec[0])
|
142099
142068
|
)} is already in use`
|
142100
142069
|
);
|
142101
142070
|
listenSpec[0]++;
|
142102
142071
|
} else {
|
142103
142072
|
this.output.error(
|
142104
|
-
`Requested socket ${
|
142073
|
+
`Requested socket ${import_chalk59.default.cyan(
|
142105
142074
|
listenSpec[0]
|
142106
142075
|
)} is already in use`
|
142107
142076
|
);
|
@@ -142494,7 +142463,7 @@ ${error_code}
|
|
142494
142463
|
await treeKill(this.devProcess.pid);
|
142495
142464
|
}
|
142496
142465
|
this.output.log(
|
142497
|
-
`Running Dev Command ${
|
142466
|
+
`Running Dev Command ${import_chalk59.default.cyan.bold(`\u201C${devCommand2}\u201D`)}`
|
142498
142467
|
);
|
142499
142468
|
const port = await (0, import_get_port.default)();
|
142500
142469
|
const env = (0, import_build_utils16.cloneEnv)(
|
@@ -142793,17 +142762,17 @@ async function main4(client2) {
|
|
142793
142762
|
function stringifyError(err) {
|
142794
142763
|
if (err instanceof NowError) {
|
142795
142764
|
const errMeta = JSON.stringify(err.meta, null, 2).replace(/\\n/g, "\n");
|
142796
|
-
return `${
|
142765
|
+
return `${import_chalk60.default.red(err.code)} ${err.message}
|
142797
142766
|
${errMeta}`;
|
142798
142767
|
}
|
142799
142768
|
return err.stack;
|
142800
142769
|
}
|
142801
|
-
var import_path39,
|
142770
|
+
var import_path39, import_chalk60, import_error_utils20, COMMAND_CONFIG3;
|
142802
142771
|
var init_dev2 = __esm({
|
142803
142772
|
"src/commands/dev/index.ts"() {
|
142804
142773
|
"use strict";
|
142805
142774
|
import_path39 = __toESM3(require("path"));
|
142806
|
-
|
142775
|
+
import_chalk60 = __toESM3(require_source());
|
142807
142776
|
init_get_args();
|
142808
142777
|
init_get_subcommand();
|
142809
142778
|
init_now_error();
|
@@ -142979,13 +142948,13 @@ function text({
|
|
142979
142948
|
stdout.write(label);
|
142980
142949
|
} else {
|
142981
142950
|
const _label = label.replace("-", "\u2716");
|
142982
|
-
stdout.write(
|
142951
|
+
stdout.write(import_chalk61.default.red(_label));
|
142983
142952
|
}
|
142984
142953
|
value = initialValue;
|
142985
142954
|
stdout.write(initialValue);
|
142986
142955
|
if (mask) {
|
142987
142956
|
if (!value) {
|
142988
|
-
value =
|
142957
|
+
value = import_chalk61.default.gray(placeholder);
|
142989
142958
|
caretOffset = 0 - (0, import_strip_ansi4.default)(value).length;
|
142990
142959
|
stdout.write(value);
|
142991
142960
|
stdout.write(import_ansi_escapes6.default.cursorBackward(Math.abs(caretOffset)));
|
@@ -143068,11 +143037,11 @@ function text({
|
|
143068
143037
|
} else {
|
143069
143038
|
if (mask === "cc" || mask === "ccv") {
|
143070
143039
|
value = formatCC(value);
|
143071
|
-
value = value.replace(regex,
|
143040
|
+
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143072
143041
|
} else if (mask === "expDate") {
|
143073
|
-
value = value.replace(regex,
|
143042
|
+
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143074
143043
|
}
|
143075
|
-
const l =
|
143044
|
+
const l = import_chalk61.default.red(label.replace("-", "\u2716"));
|
143076
143045
|
stdout.write(eraseLines(1));
|
143077
143046
|
stdout.write(l + value + import_ansi_escapes6.default.beep);
|
143078
143047
|
if (caretOffset) {
|
@@ -143112,7 +143081,7 @@ function text({
|
|
143112
143081
|
if (caretOffset === 0) {
|
143113
143082
|
const completion = await autoComplete(value);
|
143114
143083
|
if (completion) {
|
143115
|
-
suggestion =
|
143084
|
+
suggestion = import_chalk61.default.gray(completion);
|
143116
143085
|
suggestion += import_ansi_escapes6.default.cursorBackward(completion.length);
|
143117
143086
|
} else {
|
143118
143087
|
suggestion = "";
|
@@ -143124,9 +143093,9 @@ function text({
|
|
143124
143093
|
}
|
143125
143094
|
if (mask === "cc" || mask === "ccv") {
|
143126
143095
|
value = formatCC(value);
|
143127
|
-
value = value.replace(regex,
|
143096
|
+
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143128
143097
|
} else if (mask === "expDate") {
|
143129
|
-
value = value.replace(regex,
|
143098
|
+
value = value.replace(regex, import_chalk61.default.gray("$1"));
|
143130
143099
|
}
|
143131
143100
|
stdout.write(eraseLines(1));
|
143132
143101
|
stdout.write(label + value + suggestion);
|
@@ -143139,11 +143108,11 @@ function text({
|
|
143139
143108
|
}
|
143140
143109
|
});
|
143141
143110
|
}
|
143142
|
-
var
|
143111
|
+
var import_chalk61, import_ansi_escapes6, import_ansi_regex, import_strip_ansi4, ESCAPES, formatCC;
|
143143
143112
|
var init_text = __esm({
|
143144
143113
|
"src/util/input/text.ts"() {
|
143145
143114
|
"use strict";
|
143146
|
-
|
143115
|
+
import_chalk61 = __toESM3(require_source());
|
143147
143116
|
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
143148
143117
|
import_ansi_regex = __toESM3(require_ansi_regex2());
|
143149
143118
|
import_strip_ansi4 = __toESM3(require_strip_ansi2());
|
@@ -143179,9 +143148,9 @@ async function getDNSData(client2, data) {
|
|
143179
143148
|
const port = await getNumber(`- ${type} port: `);
|
143180
143149
|
const target = await getTrimmedString(`- ${type} target: `);
|
143181
143150
|
output2.log(
|
143182
|
-
`${
|
143151
|
+
`${import_chalk62.default.cyan(name)} ${import_chalk62.default.bold(type)} ${import_chalk62.default.cyan(
|
143183
143152
|
`${priority}`
|
143184
|
-
)} ${
|
143153
|
+
)} ${import_chalk62.default.cyan(`${weight}`)} ${import_chalk62.default.cyan(`${port}`)} ${import_chalk62.default.cyan(
|
143185
143154
|
target
|
143186
143155
|
)}.`
|
143187
143156
|
);
|
@@ -143200,9 +143169,9 @@ async function getDNSData(client2, data) {
|
|
143200
143169
|
const mxPriority = await getNumber(`- ${type} priority: `);
|
143201
143170
|
const value2 = await getTrimmedString(`- ${type} host: `);
|
143202
143171
|
output2.log(
|
143203
|
-
`${
|
143172
|
+
`${import_chalk62.default.cyan(name)} ${import_chalk62.default.bold(type)} ${import_chalk62.default.cyan(
|
143204
143173
|
`${mxPriority}`
|
143205
|
-
)} ${
|
143174
|
+
)} ${import_chalk62.default.cyan(value2)}`
|
143206
143175
|
);
|
143207
143176
|
return await verifyData(client2) ? {
|
143208
143177
|
name,
|
@@ -143212,7 +143181,7 @@ async function getDNSData(client2, data) {
|
|
143212
143181
|
} : null;
|
143213
143182
|
}
|
143214
143183
|
const value = await getTrimmedString(`- ${type} value: `);
|
143215
|
-
output2.log(`${
|
143184
|
+
output2.log(`${import_chalk62.default.cyan(name)} ${import_chalk62.default.bold(type)} ${import_chalk62.default.cyan(value)}`);
|
143216
143185
|
return await verifyData(client2) ? {
|
143217
143186
|
name,
|
143218
143187
|
type,
|
@@ -143246,11 +143215,11 @@ async function getTrimmedString(label) {
|
|
143246
143215
|
});
|
143247
143216
|
return res.trim();
|
143248
143217
|
}
|
143249
|
-
var
|
143218
|
+
var import_chalk62, RECORD_TYPES;
|
143250
143219
|
var init_get_dns_data = __esm({
|
143251
143220
|
"src/util/dns/get-dns-data.ts"() {
|
143252
143221
|
"use strict";
|
143253
|
-
|
143222
|
+
import_chalk62 = __toESM3(require_source());
|
143254
143223
|
init_text();
|
143255
143224
|
init_confirm();
|
143256
143225
|
RECORD_TYPES = ["A", "AAAA", "ALIAS", "CAA", "CNAME", "MX", "SRV", "TXT"];
|
@@ -143264,7 +143233,7 @@ async function add2(client2, opts, args2) {
|
|
143264
143233
|
const parsedParams = parseAddArgs(args2);
|
143265
143234
|
if (!parsedParams) {
|
143266
143235
|
output2.error(
|
143267
|
-
`Invalid number of arguments. See: ${
|
143236
|
+
`Invalid number of arguments. See: ${import_chalk63.default.cyan(
|
143268
143237
|
`${getCommandName("dns --help")}`
|
143269
143238
|
)} for usage.`
|
143270
143239
|
);
|
@@ -143280,23 +143249,23 @@ async function add2(client2, opts, args2) {
|
|
143280
143249
|
const record = await addDNSRecord(client2, domain, data);
|
143281
143250
|
if (record instanceof DomainNotFound) {
|
143282
143251
|
output2.error(
|
143283
|
-
`The domain ${domain} can't be found under ${
|
143252
|
+
`The domain ${domain} can't be found under ${import_chalk63.default.bold(
|
143284
143253
|
contextName
|
143285
|
-
)} ${
|
143254
|
+
)} ${import_chalk63.default.gray(addStamp())}`
|
143286
143255
|
);
|
143287
143256
|
return 1;
|
143288
143257
|
}
|
143289
143258
|
if (record instanceof DNSPermissionDenied) {
|
143290
143259
|
output2.error(
|
143291
|
-
`You don't have permissions to add records to domain ${domain} under ${
|
143260
|
+
`You don't have permissions to add records to domain ${domain} under ${import_chalk63.default.bold(
|
143292
143261
|
contextName
|
143293
|
-
)} ${
|
143262
|
+
)} ${import_chalk63.default.gray(addStamp())}`
|
143294
143263
|
);
|
143295
143264
|
return 1;
|
143296
143265
|
}
|
143297
143266
|
if (record instanceof DNSInvalidPort) {
|
143298
143267
|
output2.error(
|
143299
|
-
`Invalid <port> parameter. A number was expected ${
|
143268
|
+
`Invalid <port> parameter. A number was expected ${import_chalk63.default.gray(
|
143300
143269
|
addStamp()
|
143301
143270
|
)}`
|
143302
143271
|
);
|
@@ -143304,7 +143273,7 @@ async function add2(client2, opts, args2) {
|
|
143304
143273
|
}
|
143305
143274
|
if (record instanceof DNSInvalidType) {
|
143306
143275
|
output2.error(
|
143307
|
-
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${
|
143276
|
+
`Invalid <type> parameter "${record.meta.type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT ${import_chalk63.default.gray(
|
143308
143277
|
addStamp()
|
143309
143278
|
)}`
|
143310
143279
|
);
|
@@ -143315,17 +143284,17 @@ async function add2(client2, opts, args2) {
|
|
143315
143284
|
return 1;
|
143316
143285
|
}
|
143317
143286
|
output2.success(
|
143318
|
-
`DNS record for domain ${
|
143287
|
+
`DNS record for domain ${import_chalk63.default.bold(domain)} ${import_chalk63.default.gray(
|
143319
143288
|
`(${record.uid})`
|
143320
|
-
)} created under ${
|
143289
|
+
)} created under ${import_chalk63.default.bold(contextName)} ${import_chalk63.default.gray(addStamp())}`
|
143321
143290
|
);
|
143322
143291
|
return 0;
|
143323
143292
|
}
|
143324
|
-
var
|
143293
|
+
var import_chalk63;
|
143325
143294
|
var init_add2 = __esm({
|
143326
143295
|
"src/commands/dns/add.ts"() {
|
143327
143296
|
"use strict";
|
143328
|
-
|
143297
|
+
import_chalk63 = __toESM3(require_source());
|
143329
143298
|
init_errors_ts();
|
143330
143299
|
init_add_dns_record();
|
143331
143300
|
init_get_scope();
|
@@ -143339,7 +143308,7 @@ var init_add2 = __esm({
|
|
143339
143308
|
// src/util/dns/import-zonefile.ts
|
143340
143309
|
async function importZonefile(client2, contextName, domain, zonefilePath) {
|
143341
143310
|
client2.output.spinner(
|
143342
|
-
`Importing Zone file for domain ${domain} under ${
|
143311
|
+
`Importing Zone file for domain ${domain} under ${import_chalk64.default.bold(contextName)}`
|
143343
143312
|
);
|
143344
143313
|
const zonefile = (0, import_fs7.readFileSync)((0, import_path40.resolve)(zonefilePath), "utf8");
|
143345
143314
|
try {
|
@@ -143366,11 +143335,11 @@ async function importZonefile(client2, contextName, domain, zonefilePath) {
|
|
143366
143335
|
throw err;
|
143367
143336
|
}
|
143368
143337
|
}
|
143369
|
-
var
|
143338
|
+
var import_chalk64, import_fs7, import_path40;
|
143370
143339
|
var init_import_zonefile = __esm({
|
143371
143340
|
"src/util/dns/import-zonefile.ts"() {
|
143372
143341
|
"use strict";
|
143373
|
-
|
143342
|
+
import_chalk64 = __toESM3(require_source());
|
143374
143343
|
import_fs7 = require("fs");
|
143375
143344
|
import_path40 = require("path");
|
143376
143345
|
init_errors_ts();
|
@@ -143383,7 +143352,7 @@ async function add3(client2, opts, args2) {
|
|
143383
143352
|
const { contextName } = await getScope(client2);
|
143384
143353
|
if (args2.length !== 2) {
|
143385
143354
|
output2.error(
|
143386
|
-
`Invalid number of arguments. Usage: ${
|
143355
|
+
`Invalid number of arguments. Usage: ${import_chalk65.default.cyan(
|
143387
143356
|
`${getCommandName("dns import <domain> <zonefile>")}`
|
143388
143357
|
)}`
|
143389
143358
|
);
|
@@ -143399,32 +143368,32 @@ async function add3(client2, opts, args2) {
|
|
143399
143368
|
);
|
143400
143369
|
if (recordIds instanceof DomainNotFound) {
|
143401
143370
|
output2.error(
|
143402
|
-
`The domain ${domain} can't be found under ${
|
143371
|
+
`The domain ${domain} can't be found under ${import_chalk65.default.bold(
|
143403
143372
|
contextName
|
143404
|
-
)} ${
|
143373
|
+
)} ${import_chalk65.default.gray(addStamp())}`
|
143405
143374
|
);
|
143406
143375
|
return 1;
|
143407
143376
|
}
|
143408
143377
|
if (recordIds instanceof InvalidDomain) {
|
143409
143378
|
output2.error(
|
143410
|
-
`The domain ${domain} doesn't match with the one found in the Zone file ${
|
143379
|
+
`The domain ${domain} doesn't match with the one found in the Zone file ${import_chalk65.default.gray(
|
143411
143380
|
addStamp()
|
143412
143381
|
)}`
|
143413
143382
|
);
|
143414
143383
|
return 1;
|
143415
143384
|
}
|
143416
143385
|
output2.success(
|
143417
|
-
`${recordIds.length} DNS records for domain ${
|
143386
|
+
`${recordIds.length} DNS records for domain ${import_chalk65.default.bold(
|
143418
143387
|
domain
|
143419
|
-
)} created under ${
|
143388
|
+
)} created under ${import_chalk65.default.bold(contextName)} ${import_chalk65.default.gray(addStamp())}`
|
143420
143389
|
);
|
143421
143390
|
return 0;
|
143422
143391
|
}
|
143423
|
-
var
|
143392
|
+
var import_chalk65;
|
143424
143393
|
var init_import = __esm({
|
143425
143394
|
"src/commands/dns/import.ts"() {
|
143426
143395
|
"use strict";
|
143427
|
-
|
143396
|
+
import_chalk65 = __toESM3(require_source());
|
143428
143397
|
init_get_scope();
|
143429
143398
|
init_errors_ts();
|
143430
143399
|
init_stamp();
|
@@ -143461,7 +143430,7 @@ function formatTable(header, align, blocks) {
|
|
143461
143430
|
out += `${block.name}
|
143462
143431
|
`;
|
143463
143432
|
}
|
143464
|
-
const rows = [header.map((s) =>
|
143433
|
+
const rows = [header.map((s) => import_chalk66.default.dim(s))].concat(block.rows);
|
143465
143434
|
if (rows.length > 0) {
|
143466
143435
|
rows[0][0] = ` ${rows[0][0]}`;
|
143467
143436
|
for (let i = 1; i < rows.length; i++) {
|
@@ -143481,11 +143450,11 @@ function formatTable(header, align, blocks) {
|
|
143481
143450
|
}
|
143482
143451
|
return out.slice(0, -1);
|
143483
143452
|
}
|
143484
|
-
var
|
143453
|
+
var import_chalk66;
|
143485
143454
|
var init_format_table = __esm({
|
143486
143455
|
"src/util/format-table.ts"() {
|
143487
143456
|
"use strict";
|
143488
|
-
|
143457
|
+
import_chalk66 = __toESM3(require_source());
|
143489
143458
|
init_table();
|
143490
143459
|
init_strlen();
|
143491
143460
|
}
|
@@ -143568,18 +143537,18 @@ function getAddDomainName(domainNames) {
|
|
143568
143537
|
];
|
143569
143538
|
}
|
143570
143539
|
async function getDomainNames(client2, contextName, next) {
|
143571
|
-
client2.output.spinner(`Fetching domains under ${
|
143540
|
+
client2.output.spinner(`Fetching domains under ${import_chalk67.default.bold(contextName)}`);
|
143572
143541
|
const { domains: domains2, pagination } = await getDomains(client2, next);
|
143573
143542
|
return { domainNames: domains2.map((domain) => domain.name), pagination };
|
143574
143543
|
}
|
143575
|
-
var
|
143544
|
+
var import_chalk67;
|
143576
143545
|
var init_get_dns_records = __esm({
|
143577
143546
|
"src/util/dns/get-dns-records.ts"() {
|
143578
143547
|
"use strict";
|
143579
143548
|
init_errors_ts();
|
143580
143549
|
init_get_domain_dns_records();
|
143581
143550
|
init_get_domains();
|
143582
|
-
|
143551
|
+
import_chalk67 = __toESM3(require_source());
|
143583
143552
|
}
|
143584
143553
|
});
|
143585
143554
|
|
@@ -143591,7 +143560,7 @@ async function ls3(client2, opts, args2) {
|
|
143591
143560
|
const lsStamp = stamp_default();
|
143592
143561
|
if (args2.length > 1) {
|
143593
143562
|
output2.error(
|
143594
|
-
`Invalid number of arguments. Usage: ${
|
143563
|
+
`Invalid number of arguments. Usage: ${import_chalk68.default.cyan(
|
143595
143564
|
`${getCommandName("dns ls [domain]")}`
|
143596
143565
|
)}`
|
143597
143566
|
);
|
@@ -143614,15 +143583,15 @@ async function ls3(client2, opts, args2) {
|
|
143614
143583
|
);
|
143615
143584
|
if (data instanceof DomainNotFound) {
|
143616
143585
|
output2.error(
|
143617
|
-
`The domain ${domainName} can't be found under ${
|
143586
|
+
`The domain ${domainName} can't be found under ${import_chalk68.default.bold(
|
143618
143587
|
contextName
|
143619
|
-
)} ${
|
143588
|
+
)} ${import_chalk68.default.gray(lsStamp())}`
|
143620
143589
|
);
|
143621
143590
|
return 1;
|
143622
143591
|
}
|
143623
143592
|
const { records, pagination: pagination2 } = data;
|
143624
143593
|
output2.log(
|
143625
|
-
`${records.length > 0 ? "Records" : "No records"} found under ${
|
143594
|
+
`${records.length > 0 ? "Records" : "No records"} found under ${import_chalk68.default.bold(contextName)} ${import_chalk68.default.gray(lsStamp())}`
|
143626
143595
|
);
|
143627
143596
|
client2.stdout.write(getDNSRecordsTable([{ domainName, records }]));
|
143628
143597
|
if (pagination2 && pagination2.count === 20) {
|
@@ -143643,9 +143612,9 @@ async function ls3(client2, opts, args2) {
|
|
143643
143612
|
);
|
143644
143613
|
const nRecords = dnsRecords.reduce((p, r) => r.records.length + p, 0);
|
143645
143614
|
output2.log(
|
143646
|
-
`${nRecords > 0 ? "Records" : "No records"} found under ${
|
143615
|
+
`${nRecords > 0 ? "Records" : "No records"} found under ${import_chalk68.default.bold(
|
143647
143616
|
contextName
|
143648
|
-
)} ${
|
143617
|
+
)} ${import_chalk68.default.gray(lsStamp())}`
|
143649
143618
|
);
|
143650
143619
|
output2.log(getDNSRecordsTable(dnsRecords));
|
143651
143620
|
if (pagination && pagination.count === 20) {
|
@@ -143663,7 +143632,7 @@ function getDNSRecordsTable(dnsRecords) {
|
|
143663
143632
|
["", "id", "name", "type", "value", "created"],
|
143664
143633
|
["l", "r", "l", "l", "l", "l"],
|
143665
143634
|
dnsRecords.map(({ domainName, records }) => ({
|
143666
|
-
name:
|
143635
|
+
name: import_chalk68.default.bold(domainName),
|
143667
143636
|
rows: records.map(getDNSRecordRow)
|
143668
143637
|
}))
|
143669
143638
|
);
|
@@ -143680,14 +143649,14 @@ function getDNSRecordRow(record) {
|
|
143680
143649
|
record.name,
|
143681
143650
|
record.type,
|
143682
143651
|
priority ? `${priority} ${record.value}` : record.value,
|
143683
|
-
|
143652
|
+
import_chalk68.default.gray(isSystemRecord ? "default" : createdAt)
|
143684
143653
|
];
|
143685
143654
|
}
|
143686
|
-
var
|
143655
|
+
var import_chalk68, import_ms13;
|
143687
143656
|
var init_ls3 = __esm({
|
143688
143657
|
"src/commands/dns/ls.ts"() {
|
143689
143658
|
"use strict";
|
143690
|
-
|
143659
|
+
import_chalk68 = __toESM3(require_source());
|
143691
143660
|
import_ms13 = __toESM3(require_ms2());
|
143692
143661
|
init_errors_ts();
|
143693
143662
|
init_format_table();
|
@@ -143733,7 +143702,7 @@ async function rm3(client2, _opts, args2) {
|
|
143733
143702
|
const [recordId] = args2;
|
143734
143703
|
if (args2.length !== 1) {
|
143735
143704
|
output2.error(
|
143736
|
-
`Invalid number of arguments. Usage: ${
|
143705
|
+
`Invalid number of arguments. Usage: ${import_chalk69.default.cyan(
|
143737
143706
|
`${getCommandName("dns rm <id>")}`
|
143738
143707
|
)}`
|
143739
143708
|
);
|
@@ -143758,7 +143727,7 @@ async function rm3(client2, _opts, args2) {
|
|
143758
143727
|
const rmStamp = stamp_default();
|
143759
143728
|
await deleteDNSRecordById(client2, domainName, record.id);
|
143760
143729
|
output2.success(
|
143761
|
-
`Record ${
|
143730
|
+
`Record ${import_chalk69.default.gray(`${record.id}`)} removed ${import_chalk69.default.gray(rmStamp())}`
|
143762
143731
|
);
|
143763
143732
|
return 0;
|
143764
143733
|
}
|
@@ -143773,7 +143742,7 @@ function readConfirmation2(output2, msg, domainName, record) {
|
|
143773
143742
|
`
|
143774
143743
|
);
|
143775
143744
|
output2.print(
|
143776
|
-
`${
|
143745
|
+
`${import_chalk69.default.bold.red("> Are you sure?")} ${import_chalk69.default.gray("(y/N) ")}`
|
143777
143746
|
);
|
143778
143747
|
process.stdin.on("data", (d) => {
|
143779
143748
|
process.stdin.pause();
|
@@ -143785,19 +143754,19 @@ function getDeleteTableRow(domainName, record) {
|
|
143785
143754
|
const recordName = `${record.name.length > 0 ? `${record.name}.` : ""}${domainName}`;
|
143786
143755
|
return [
|
143787
143756
|
record.id,
|
143788
|
-
|
143757
|
+
import_chalk69.default.bold(
|
143789
143758
|
`${recordName} ${record.type} ${record.value} ${record.mxPriority || ""}`
|
143790
143759
|
),
|
143791
|
-
|
143760
|
+
import_chalk69.default.gray(
|
143792
143761
|
`${(0, import_ms14.default)(Date.now() - new Date(Number(record.createdAt)).getTime())} ago`
|
143793
143762
|
)
|
143794
143763
|
];
|
143795
143764
|
}
|
143796
|
-
var
|
143765
|
+
var import_chalk69, import_ms14;
|
143797
143766
|
var init_rm3 = __esm({
|
143798
143767
|
"src/commands/dns/rm.ts"() {
|
143799
143768
|
"use strict";
|
143800
|
-
|
143769
|
+
import_chalk69 = __toESM3(require_source());
|
143801
143770
|
import_ms14 = __toESM3(require_ms2());
|
143802
143771
|
init_table();
|
143803
143772
|
init_delete_dns_record_by_id();
|
@@ -144023,16 +143992,16 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
144023
143992
|
const rows = [];
|
144024
143993
|
for (let i = 0; i < maxLength; i++) {
|
144025
143994
|
rows.push([
|
144026
|
-
sortedIntended[i] ||
|
144027
|
-
sortedCurrent[i] ||
|
144028
|
-
sortedIntended[i] === sortedCurrent[i] ?
|
143995
|
+
sortedIntended[i] || import_chalk70.default.gray("-"),
|
143996
|
+
sortedCurrent[i] || import_chalk70.default.gray("-"),
|
143997
|
+
sortedIntended[i] === sortedCurrent[i] ? import_chalk70.default.green(chars_default.tick) : import_chalk70.default.red(chars_default.cross)
|
144029
143998
|
]);
|
144030
143999
|
}
|
144031
144000
|
return table(
|
144032
144001
|
[
|
144033
144002
|
[
|
144034
|
-
|
144035
|
-
|
144003
|
+
import_chalk70.default.gray("Intended Nameservers"),
|
144004
|
+
import_chalk70.default.gray("Current Nameservers"),
|
144036
144005
|
""
|
144037
144006
|
],
|
144038
144007
|
...rows
|
@@ -144040,11 +144009,11 @@ function formatNSTable(intendedNameservers, currentNameservers, { extraSpace = "
|
|
144040
144009
|
{ hsep: 4 }
|
144041
144010
|
).replace(/^(.*)/gm, `${extraSpace}$1`);
|
144042
144011
|
}
|
144043
|
-
var
|
144012
|
+
var import_chalk70;
|
144044
144013
|
var init_format_ns_table = __esm({
|
144045
144014
|
"src/util/format-ns-table.ts"() {
|
144046
144015
|
"use strict";
|
144047
|
-
|
144016
|
+
import_chalk70 = __toESM3(require_source());
|
144048
144017
|
init_table();
|
144049
144018
|
init_chars();
|
144050
144019
|
}
|
@@ -144053,7 +144022,7 @@ var init_format_ns_table = __esm({
|
|
144053
144022
|
// src/util/domains/get-domain.ts
|
144054
144023
|
async function getDomain(client2, contextName, domainName) {
|
144055
144024
|
client2.output.spinner(
|
144056
|
-
`Fetching domain ${domainName} under ${
|
144025
|
+
`Fetching domain ${domainName} under ${import_chalk71.default.bold(contextName)}`
|
144057
144026
|
);
|
144058
144027
|
try {
|
144059
144028
|
const { domain } = await client2.fetch(
|
@@ -144067,11 +144036,11 @@ async function getDomain(client2, contextName, domainName) {
|
|
144067
144036
|
throw err;
|
144068
144037
|
}
|
144069
144038
|
}
|
144070
|
-
var
|
144039
|
+
var import_chalk71;
|
144071
144040
|
var init_get_domain = __esm({
|
144072
144041
|
"src/util/domains/get-domain.ts"() {
|
144073
144042
|
"use strict";
|
144074
|
-
|
144043
|
+
import_chalk71 = __toESM3(require_source());
|
144075
144044
|
init_errors_ts();
|
144076
144045
|
}
|
144077
144046
|
});
|
@@ -144110,7 +144079,7 @@ var init_get_domain_config = __esm({
|
|
144110
144079
|
// src/util/projects/add-domain-to-project.ts
|
144111
144080
|
async function addDomainToProject(client2, projectNameOrId, domain) {
|
144112
144081
|
client2.output.spinner(
|
144113
|
-
`Adding domain ${domain} to project ${
|
144082
|
+
`Adding domain ${domain} to project ${import_chalk72.default.bold(projectNameOrId)}`
|
144114
144083
|
);
|
144115
144084
|
try {
|
144116
144085
|
const response = await client2.fetch(
|
@@ -144139,11 +144108,11 @@ async function addDomainToProject(client2, projectNameOrId, domain) {
|
|
144139
144108
|
throw err;
|
144140
144109
|
}
|
144141
144110
|
}
|
144142
|
-
var
|
144111
|
+
var import_chalk72;
|
144143
144112
|
var init_add_domain_to_project = __esm({
|
144144
144113
|
"src/util/projects/add-domain-to-project.ts"() {
|
144145
144114
|
"use strict";
|
144146
|
-
|
144115
|
+
import_chalk72 = __toESM3(require_source());
|
144147
144116
|
init_errors_ts();
|
144148
144117
|
}
|
144149
144118
|
});
|
@@ -144151,7 +144120,7 @@ var init_add_domain_to_project = __esm({
|
|
144151
144120
|
// src/util/projects/remove-domain-from-project.ts
|
144152
144121
|
async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
144153
144122
|
client2.output.spinner(
|
144154
|
-
`Removing domain ${domain} from project ${
|
144123
|
+
`Removing domain ${domain} from project ${import_chalk73.default.bold(projectNameOrId)}`
|
144155
144124
|
);
|
144156
144125
|
try {
|
144157
144126
|
const response = await client2.fetch(
|
@@ -144170,11 +144139,11 @@ async function removeDomainFromProject(client2, projectNameOrId, domain) {
|
|
144170
144139
|
throw err;
|
144171
144140
|
}
|
144172
144141
|
}
|
144173
|
-
var
|
144142
|
+
var import_chalk73;
|
144174
144143
|
var init_remove_domain_from_project = __esm({
|
144175
144144
|
"src/util/projects/remove-domain-from-project.ts"() {
|
144176
144145
|
"use strict";
|
144177
|
-
|
144146
|
+
import_chalk73 = __toESM3(require_source());
|
144178
144147
|
init_errors_ts();
|
144179
144148
|
}
|
144180
144149
|
});
|
@@ -144228,7 +144197,7 @@ async function add4(client2, opts, args2) {
|
|
144228
144197
|
}
|
144229
144198
|
}
|
144230
144199
|
output2.success(
|
144231
|
-
`Domain ${
|
144200
|
+
`Domain ${import_chalk74.default.bold(domainName)} added to project ${import_chalk74.default.bold(
|
144232
144201
|
projectName
|
144233
144202
|
)}. ${addStamp()}`
|
144234
144203
|
);
|
@@ -144249,11 +144218,11 @@ async function add4(client2, opts, args2) {
|
|
144249
144218
|
`This domain is not configured properly. To configure it you should either:`
|
144250
144219
|
);
|
144251
144220
|
output2.print(
|
144252
|
-
` ${
|
144221
|
+
` ${import_chalk74.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk74.default.grey("[recommended]")}
|
144253
144222
|
`
|
144254
144223
|
);
|
144255
144224
|
output2.print(
|
144256
|
-
` ${
|
144225
|
+
` ${import_chalk74.default.grey("b)")} Change your Domains's nameservers to the intended set`
|
144257
144226
|
);
|
144258
144227
|
output2.print(
|
144259
144228
|
`
|
@@ -144277,11 +144246,11 @@ ${formatNSTable(
|
|
144277
144246
|
}
|
144278
144247
|
return 0;
|
144279
144248
|
}
|
144280
|
-
var
|
144249
|
+
var import_chalk74;
|
144281
144250
|
var init_add3 = __esm({
|
144282
144251
|
"src/commands/domains/add.ts"() {
|
144283
144252
|
"use strict";
|
144284
|
-
|
144253
|
+
import_chalk74 = __toESM3(require_source());
|
144285
144254
|
init_errors_ts();
|
144286
144255
|
init_format_ns_table();
|
144287
144256
|
init_get_scope();
|
@@ -144338,7 +144307,7 @@ async function buy(client2, opts, args2) {
|
|
144338
144307
|
}
|
144339
144308
|
if (!(await getDomainStatus(client2, domainName)).available) {
|
144340
144309
|
output2.error(
|
144341
|
-
`The domain ${param(domainName)} is ${
|
144310
|
+
`The domain ${param(domainName)} is ${import_chalk75.default.underline(
|
144342
144311
|
"unavailable"
|
144343
144312
|
)}! ${availableStamp()}`
|
144344
144313
|
);
|
@@ -144346,9 +144315,9 @@ async function buy(client2, opts, args2) {
|
|
144346
144315
|
}
|
144347
144316
|
const { period, price } = domainPrice;
|
144348
144317
|
output2.log(
|
144349
|
-
`The domain ${param(domainName)} is ${
|
144318
|
+
`The domain ${param(domainName)} is ${import_chalk75.default.underline(
|
144350
144319
|
"available"
|
144351
|
-
)} to buy under ${
|
144320
|
+
)} to buy under ${import_chalk75.default.bold(contextName)}! ${availableStamp()}`
|
144352
144321
|
);
|
144353
144322
|
let autoRenew;
|
144354
144323
|
if (skipConfirmation) {
|
@@ -144356,14 +144325,14 @@ async function buy(client2, opts, args2) {
|
|
144356
144325
|
} else {
|
144357
144326
|
if (!await confirm(
|
144358
144327
|
client2,
|
144359
|
-
`Buy now for ${
|
144328
|
+
`Buy now for ${import_chalk75.default.bold(`$${price}`)} (${`${period}yr${period > 1 ? "s" : ""}`})?`,
|
144360
144329
|
false
|
144361
144330
|
)) {
|
144362
144331
|
return 0;
|
144363
144332
|
}
|
144364
144333
|
autoRenew = await confirm(
|
144365
144334
|
client2,
|
144366
|
-
renewalPrice.period === 1 ? `Auto renew yearly for ${
|
144335
|
+
renewalPrice.period === 1 ? `Auto renew yearly for ${import_chalk75.default.bold(`$${price}`)}?` : `Auto renew every ${renewalPrice.period} years for ${import_chalk75.default.bold(
|
144367
144336
|
`$${price}`
|
144368
144337
|
)}?`,
|
144369
144338
|
true
|
@@ -144447,11 +144416,11 @@ async function buy(client2, opts, args2) {
|
|
144447
144416
|
}
|
144448
144417
|
return 0;
|
144449
144418
|
}
|
144450
|
-
var
|
144419
|
+
var import_chalk75, import_psl6, import_error_utils21;
|
144451
144420
|
var init_buy = __esm({
|
144452
144421
|
"src/commands/domains/buy.ts"() {
|
144453
144422
|
"use strict";
|
144454
|
-
|
144423
|
+
import_chalk75 = __toESM3(require_source());
|
144455
144424
|
import_psl6 = __toESM3(require_psl());
|
144456
144425
|
init_errors_ts();
|
144457
144426
|
init_get_domain_price();
|
@@ -144587,14 +144556,14 @@ async function transferIn(client2, opts, args2) {
|
|
144587
144556
|
}
|
144588
144557
|
const { price } = domainPrice;
|
144589
144558
|
output2.log(
|
144590
|
-
`The domain ${param(domainName)} is ${
|
144559
|
+
`The domain ${param(domainName)} is ${import_chalk76.default.underline(
|
144591
144560
|
"available"
|
144592
|
-
)} to transfer under ${
|
144561
|
+
)} to transfer under ${import_chalk76.default.bold(contextName)}! ${availableStamp()}`
|
144593
144562
|
);
|
144594
144563
|
const authCode = await getAuthCode(opts["--code"]);
|
144595
144564
|
const shouldTransfer = await confirm(
|
144596
144565
|
client2,
|
144597
|
-
transferPolicy === "no-change" ? `Transfer now for ${
|
144566
|
+
transferPolicy === "no-change" ? `Transfer now for ${import_chalk76.default.bold(`$${price}`)}?` : `Transfer now with 1yr renewal for ${import_chalk76.default.bold(`$${price}`)}?`,
|
144598
144567
|
false
|
144599
144568
|
);
|
144600
144569
|
if (!shouldTransfer) {
|
@@ -144662,11 +144631,11 @@ async function transferIn(client2, opts, args2) {
|
|
144662
144631
|
);
|
144663
144632
|
return 0;
|
144664
144633
|
}
|
144665
|
-
var
|
144634
|
+
var import_chalk76;
|
144666
144635
|
var init_transfer_in = __esm({
|
144667
144636
|
"src/commands/domains/transfer-in.ts"() {
|
144668
144637
|
"use strict";
|
144669
|
-
|
144638
|
+
import_chalk76 = __toESM3(require_source());
|
144670
144639
|
init_errors_ts();
|
144671
144640
|
init_get_scope();
|
144672
144641
|
init_param();
|
@@ -144741,7 +144710,7 @@ async function inspect2(client2, opts, args2) {
|
|
144741
144710
|
}
|
144742
144711
|
if (args2.length !== 1) {
|
144743
144712
|
output2.error(
|
144744
|
-
`Invalid number of arguments. Usage: ${
|
144713
|
+
`Invalid number of arguments. Usage: ${import_chalk77.default.cyan(
|
144745
144714
|
`${getCommandName("domains inspect <domain>")}`
|
144746
144715
|
)}`
|
144747
144716
|
);
|
@@ -144749,7 +144718,7 @@ async function inspect2(client2, opts, args2) {
|
|
144749
144718
|
}
|
144750
144719
|
output2.debug(`Fetching domain info`);
|
144751
144720
|
output2.spinner(
|
144752
|
-
`Fetching Domain ${domainName} under ${
|
144721
|
+
`Fetching Domain ${domainName} under ${import_chalk77.default.bold(contextName)}`
|
144753
144722
|
);
|
144754
144723
|
const information = await fetchInformation({
|
144755
144724
|
output: output2,
|
@@ -144762,38 +144731,38 @@ async function inspect2(client2, opts, args2) {
|
|
144762
144731
|
}
|
144763
144732
|
const { domain, projects, renewalPrice, domainConfig } = information;
|
144764
144733
|
output2.log(
|
144765
|
-
`Domain ${domainName} found under ${
|
144734
|
+
`Domain ${domainName} found under ${import_chalk77.default.bold(contextName)} ${import_chalk77.default.gray(
|
144766
144735
|
inspectStamp()
|
144767
144736
|
)}`
|
144768
144737
|
);
|
144769
144738
|
output2.print("\n");
|
144770
|
-
output2.print(
|
144771
|
-
output2.print(` ${
|
144739
|
+
output2.print(import_chalk77.default.bold(" General\n\n"));
|
144740
|
+
output2.print(` ${import_chalk77.default.cyan("Name")} ${domain.name}
|
144772
144741
|
`);
|
144773
144742
|
output2.print(
|
144774
|
-
` ${
|
144743
|
+
` ${import_chalk77.default.cyan("Registrar")} ${getDomainRegistrar(domain)}
|
144775
144744
|
`
|
144776
144745
|
);
|
144777
144746
|
output2.print(
|
144778
|
-
` ${
|
144747
|
+
` ${import_chalk77.default.cyan("Expiration Date")} ${formatDate(domain.expiresAt)}
|
144779
144748
|
`
|
144780
144749
|
);
|
144781
144750
|
output2.print(
|
144782
|
-
` ${
|
144751
|
+
` ${import_chalk77.default.cyan("Creator")} ${domain.creator.username}
|
144783
144752
|
`
|
144784
144753
|
);
|
144785
144754
|
output2.print(
|
144786
|
-
` ${
|
144755
|
+
` ${import_chalk77.default.cyan("Created At")} ${formatDate(domain.createdAt)}
|
144787
144756
|
`
|
144788
144757
|
);
|
144789
|
-
output2.print(` ${
|
144758
|
+
output2.print(` ${import_chalk77.default.cyan("Edge Network")} yes
|
144790
144759
|
`);
|
144791
144760
|
output2.print(
|
144792
|
-
` ${
|
144761
|
+
` ${import_chalk77.default.cyan("Renewal Price")} ${domain.boughtAt && renewalPrice ? `$${renewalPrice} USD` : import_chalk77.default.gray("-")}
|
144793
144762
|
`
|
144794
144763
|
);
|
144795
144764
|
output2.print("\n");
|
144796
|
-
output2.print(
|
144765
|
+
output2.print(import_chalk77.default.bold(" Nameservers\n\n"));
|
144797
144766
|
output2.print(
|
144798
144767
|
`${formatNSTable(domain.intendedNameservers, domain.nameservers, {
|
144799
144768
|
extraSpace: " "
|
@@ -144802,7 +144771,7 @@ async function inspect2(client2, opts, args2) {
|
|
144802
144771
|
);
|
144803
144772
|
output2.print("\n");
|
144804
144773
|
if (Array.isArray(projects) && projects.length > 0) {
|
144805
|
-
output2.print(
|
144774
|
+
output2.print(import_chalk77.default.bold(" Projects\n"));
|
144806
144775
|
const table2 = formatTable(
|
144807
144776
|
["Project", "Domains"],
|
144808
144777
|
["l", "l"],
|
@@ -144832,11 +144801,11 @@ async function inspect2(client2, opts, args2) {
|
|
144832
144801
|
null
|
144833
144802
|
);
|
144834
144803
|
output2.print(
|
144835
|
-
` ${
|
144804
|
+
` ${import_chalk77.default.grey("a)")} Set the following record on your DNS provider to continue: ${code(`A ${domainName} 76.76.21.21`)} ${import_chalk77.default.grey("[recommended]")}
|
144836
144805
|
`
|
144837
144806
|
);
|
144838
144807
|
output2.print(
|
144839
|
-
` ${
|
144808
|
+
` ${import_chalk77.default.grey("b)")} Change your Domains's nameservers to the intended set detailed above.
|
144840
144809
|
|
144841
144810
|
`
|
144842
144811
|
);
|
@@ -144896,11 +144865,11 @@ async function fetchInformation({
|
|
144896
144865
|
domainConfig
|
144897
144866
|
};
|
144898
144867
|
}
|
144899
|
-
var
|
144868
|
+
var import_chalk77;
|
144900
144869
|
var init_inspect = __esm({
|
144901
144870
|
"src/commands/domains/inspect.ts"() {
|
144902
144871
|
"use strict";
|
144903
|
-
|
144872
|
+
import_chalk77 = __toESM3(require_source());
|
144904
144873
|
init_errors_ts();
|
144905
144874
|
init_stamp();
|
144906
144875
|
init_format_date();
|
@@ -144931,21 +144900,21 @@ async function ls4(client2, opts, args2) {
|
|
144931
144900
|
const lsStamp = stamp_default();
|
144932
144901
|
if (args2.length !== 0) {
|
144933
144902
|
output2.error(
|
144934
|
-
`Invalid number of arguments. Usage: ${
|
144903
|
+
`Invalid number of arguments. Usage: ${import_chalk78.default.cyan(
|
144935
144904
|
`${getCommandName("domains ls")}`
|
144936
144905
|
)}`
|
144937
144906
|
);
|
144938
144907
|
return 1;
|
144939
144908
|
}
|
144940
|
-
output2.spinner(`Fetching Domains under ${
|
144909
|
+
output2.spinner(`Fetching Domains under ${import_chalk78.default.bold(contextName)}`);
|
144941
144910
|
const { domains: domains2, pagination } = await getDomains(
|
144942
144911
|
client2,
|
144943
144912
|
...paginationOptions
|
144944
144913
|
);
|
144945
144914
|
output2.log(
|
144946
|
-
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${
|
144915
|
+
`${(0, import_pluralize8.default)("Domain", domains2.length, true)} found under ${import_chalk78.default.bold(
|
144947
144916
|
contextName
|
144948
|
-
)} ${
|
144917
|
+
)} ${import_chalk78.default.gray(lsStamp())}`
|
144949
144918
|
);
|
144950
144919
|
if (domains2.length > 0) {
|
144951
144920
|
output2.print(
|
@@ -144974,7 +144943,7 @@ function formatDomainsTable(domains2) {
|
|
144974
144943
|
isDomainExternal(domain) ? "Third Party" : "Vercel",
|
144975
144944
|
expiration,
|
144976
144945
|
domain.creator.username,
|
144977
|
-
|
144946
|
+
import_chalk78.default.gray(age)
|
144978
144947
|
];
|
144979
144948
|
});
|
144980
144949
|
return formatTable(
|
@@ -144983,12 +144952,12 @@ function formatDomainsTable(domains2) {
|
|
144983
144952
|
[{ rows }]
|
144984
144953
|
);
|
144985
144954
|
}
|
144986
|
-
var import_ms15,
|
144955
|
+
var import_ms15, import_chalk78, import_pluralize8;
|
144987
144956
|
var init_ls4 = __esm({
|
144988
144957
|
"src/commands/domains/ls.ts"() {
|
144989
144958
|
"use strict";
|
144990
144959
|
import_ms15 = __toESM3(require_ms2());
|
144991
|
-
|
144960
|
+
import_chalk78 = __toESM3(require_source());
|
144992
144961
|
import_pluralize8 = __toESM3(require_pluralize());
|
144993
144962
|
init_get_domains();
|
144994
144963
|
init_get_scope();
|
@@ -145092,7 +145061,7 @@ async function rm4(client2, opts, args2) {
|
|
145092
145061
|
}
|
145093
145062
|
if (args2.length !== 1) {
|
145094
145063
|
output2.error(
|
145095
|
-
`Invalid number of arguments. Usage: ${
|
145064
|
+
`Invalid number of arguments. Usage: ${import_chalk79.default.cyan(
|
145096
145065
|
`${getCommandName("domains rm <domain>")}`
|
145097
145066
|
)}`
|
145098
145067
|
);
|
@@ -145101,14 +145070,14 @@ async function rm4(client2, opts, args2) {
|
|
145101
145070
|
const domain = await getDomainByName(client2, contextName, domainName);
|
145102
145071
|
if (domain instanceof DomainNotFound || domain.name !== domainName) {
|
145103
145072
|
output2.error(
|
145104
|
-
`Domain not found by "${domainName}" under ${
|
145073
|
+
`Domain not found by "${domainName}" under ${import_chalk79.default.bold(contextName)}`
|
145105
145074
|
);
|
145106
145075
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145107
145076
|
return 1;
|
145108
145077
|
}
|
145109
145078
|
if (domain instanceof DomainPermissionDenied) {
|
145110
145079
|
output2.error(
|
145111
|
-
`You don't have access to the domain ${domainName} under ${
|
145080
|
+
`You don't have access to the domain ${domainName} under ${import_chalk79.default.bold(
|
145112
145081
|
contextName
|
145113
145082
|
)}`
|
145114
145083
|
);
|
@@ -145169,15 +145138,15 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145169
145138
|
domain.name
|
145170
145139
|
);
|
145171
145140
|
if (removeResult instanceof DomainNotFound) {
|
145172
|
-
output2.error(`Domain not found under ${
|
145141
|
+
output2.error(`Domain not found under ${import_chalk79.default.bold(contextName)}`);
|
145173
145142
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145174
145143
|
return 1;
|
145175
145144
|
}
|
145176
145145
|
if (removeResult instanceof DomainPermissionDenied) {
|
145177
145146
|
output2.error(
|
145178
|
-
`You don't have permissions over domain ${
|
145147
|
+
`You don't have permissions over domain ${import_chalk79.default.underline(
|
145179
145148
|
removeResult.meta.domain
|
145180
|
-
)} under ${
|
145149
|
+
)} under ${import_chalk79.default.bold(removeResult.meta.context)}.`
|
145181
145150
|
);
|
145182
145151
|
return 1;
|
145183
145152
|
}
|
@@ -145219,21 +145188,21 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145219
145188
|
);
|
145220
145189
|
if (aliases.length > 0) {
|
145221
145190
|
output2.warn(
|
145222
|
-
`This domain's ${
|
145191
|
+
`This domain's ${import_chalk79.default.bold(
|
145223
145192
|
(0, import_pluralize9.default)("alias", aliases.length, true)
|
145224
145193
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
145225
145194
|
);
|
145226
145195
|
}
|
145227
145196
|
if (certs.length > 0) {
|
145228
145197
|
output2.warn(
|
145229
|
-
`This domain's ${
|
145198
|
+
`This domain's ${import_chalk79.default.bold(
|
145230
145199
|
(0, import_pluralize9.default)("certificate", certs.length, true)
|
145231
145200
|
)} will be removed. Run ${getCommandName(`cert ls`)} to list them.`
|
145232
145201
|
);
|
145233
145202
|
}
|
145234
145203
|
if (suffix2) {
|
145235
145204
|
output2.warn(
|
145236
|
-
`The ${
|
145205
|
+
`The ${import_chalk79.default.bold(`custom suffix`)} associated with this domain.`
|
145237
145206
|
);
|
145238
145207
|
}
|
145239
145208
|
if (!skipConfirmation && !await confirm(
|
@@ -145256,14 +145225,14 @@ async function removeDomain(output2, client2, contextName, skipConfirmation, dom
|
|
145256
145225
|
attempt + 1
|
145257
145226
|
);
|
145258
145227
|
}
|
145259
|
-
output2.success(`Domain ${
|
145228
|
+
output2.success(`Domain ${import_chalk79.default.bold(domain.name)} removed ${removeStamp()}`);
|
145260
145229
|
return 0;
|
145261
145230
|
}
|
145262
|
-
var
|
145231
|
+
var import_chalk79, import_pluralize9;
|
145263
145232
|
var init_rm4 = __esm({
|
145264
145233
|
"src/commands/domains/rm.ts"() {
|
145265
145234
|
"use strict";
|
145266
|
-
|
145235
|
+
import_chalk79 = __toESM3(require_source());
|
145267
145236
|
import_pluralize9 = __toESM3(require_pluralize());
|
145268
145237
|
init_errors_ts();
|
145269
145238
|
init_delete_cert_by_id();
|
@@ -145349,15 +145318,15 @@ async function move2(client2, opts, args2) {
|
|
145349
145318
|
}
|
145350
145319
|
const domain = await getDomainByName(client2, contextName, domainName);
|
145351
145320
|
if (domain instanceof DomainNotFound) {
|
145352
|
-
output2.error(`Domain not found under ${
|
145321
|
+
output2.error(`Domain not found under ${import_chalk80.default.bold(contextName)}`);
|
145353
145322
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145354
145323
|
return 1;
|
145355
145324
|
}
|
145356
145325
|
if (domain instanceof DomainPermissionDenied) {
|
145357
145326
|
output2.error(
|
145358
|
-
`You don't have permissions over domain ${
|
145327
|
+
`You don't have permissions over domain ${import_chalk80.default.underline(
|
145359
145328
|
domain.meta.domain
|
145360
|
-
)} under ${
|
145329
|
+
)} under ${import_chalk80.default.bold(domain.meta.context)}.`
|
145361
145330
|
);
|
145362
145331
|
return 1;
|
145363
145332
|
}
|
@@ -145388,7 +145357,7 @@ async function move2(client2, opts, args2) {
|
|
145388
145357
|
const aliases = await getDomainAliases(client2, domainName);
|
145389
145358
|
if (aliases.length > 0) {
|
145390
145359
|
output2.warn(
|
145391
|
-
`This domain's ${
|
145360
|
+
`This domain's ${import_chalk80.default.bold(
|
145392
145361
|
(0, import_pluralize10.default)("alias", aliases.length, true)
|
145393
145362
|
)} will be removed. Run ${getCommandName(`alias ls`)} to list them.`
|
145394
145363
|
);
|
@@ -145430,21 +145399,21 @@ async function move2(client2, opts, args2) {
|
|
145430
145399
|
return 1;
|
145431
145400
|
}
|
145432
145401
|
if (moveTokenResult instanceof DomainNotFound) {
|
145433
|
-
output2.error(`Domain not found under ${
|
145402
|
+
output2.error(`Domain not found under ${import_chalk80.default.bold(contextName)}`);
|
145434
145403
|
output2.log(`Run ${getCommandName(`domains ls`)} to see your domains.`);
|
145435
145404
|
return 1;
|
145436
145405
|
}
|
145437
145406
|
if (moveTokenResult instanceof DomainPermissionDenied) {
|
145438
145407
|
output2.error(
|
145439
|
-
`You don't have permissions over domain ${
|
145408
|
+
`You don't have permissions over domain ${import_chalk80.default.underline(
|
145440
145409
|
moveTokenResult.meta.domain
|
145441
|
-
)} under ${
|
145410
|
+
)} under ${import_chalk80.default.bold(moveTokenResult.meta.context)}.`
|
145442
145411
|
);
|
145443
145412
|
return 1;
|
145444
145413
|
}
|
145445
145414
|
if (moveTokenResult instanceof InvalidMoveDestination) {
|
145446
145415
|
output2.error(
|
145447
|
-
`Destination ${
|
145416
|
+
`Destination ${import_chalk80.default.bold(
|
145448
145417
|
destination
|
145449
145418
|
)} is invalid. Please supply a valid username, email, team slug, user id, or team id.`
|
145450
145419
|
);
|
@@ -145489,11 +145458,11 @@ async function findDestinationMatch(destination, user, teams) {
|
|
145489
145458
|
}
|
145490
145459
|
return null;
|
145491
145460
|
}
|
145492
|
-
var
|
145461
|
+
var import_chalk80, import_pluralize10;
|
145493
145462
|
var init_move = __esm({
|
145494
145463
|
"src/commands/domains/move.ts"() {
|
145495
145464
|
"use strict";
|
145496
|
-
|
145465
|
+
import_chalk80 = __toESM3(require_source());
|
145497
145466
|
import_pluralize10 = __toESM3(require_pluralize());
|
145498
145467
|
init_errors_ts();
|
145499
145468
|
init_get_scope();
|
@@ -145854,7 +145823,9 @@ var init_get_custom_environments = __esm({
|
|
145854
145823
|
});
|
145855
145824
|
|
145856
145825
|
// src/commands/env/add.ts
|
145857
|
-
async function add5(client2,
|
145826
|
+
async function add5(client2, link4, opts, args2) {
|
145827
|
+
const { output: output2 } = client2;
|
145828
|
+
const { project } = link4;
|
145858
145829
|
const stdInput = await readStandardInput(client2.stdin);
|
145859
145830
|
let [envName, envTargetArg, envGitBranch] = args2;
|
145860
145831
|
if (args2.length > 3) {
|
@@ -145884,7 +145855,7 @@ async function add5(client2, project, opts, args2, output2) {
|
|
145884
145855
|
});
|
145885
145856
|
}
|
145886
145857
|
const [{ envs }, customEnvironments] = await Promise.all([
|
145887
|
-
getEnvRecords(
|
145858
|
+
getEnvRecords(client2, project.id, "vercel-cli:env:add"),
|
145888
145859
|
getCustomEnvironments(client2, project.id)
|
145889
145860
|
]);
|
145890
145861
|
const matchingEnvs = envs.filter((r) => r.key === envName);
|
@@ -145968,20 +145939,20 @@ async function add5(client2, project, opts, args2, output2) {
|
|
145968
145939
|
}
|
145969
145940
|
output2.print(
|
145970
145941
|
`${prependEmoji(
|
145971
|
-
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${
|
145942
|
+
`${opts["--force"] ? "Overrode" : "Added"} Environment Variable ${import_chalk81.default.bold(envName)} to Project ${import_chalk81.default.bold(
|
145972
145943
|
project.name
|
145973
|
-
)} ${
|
145944
|
+
)} ${import_chalk81.default.gray(addStamp())}`,
|
145974
145945
|
emoji("success")
|
145975
145946
|
)}
|
145976
145947
|
`
|
145977
145948
|
);
|
145978
145949
|
return 0;
|
145979
145950
|
}
|
145980
|
-
var
|
145951
|
+
var import_chalk81;
|
145981
145952
|
var init_add4 = __esm({
|
145982
145953
|
"src/commands/env/add.ts"() {
|
145983
145954
|
"use strict";
|
145984
|
-
|
145955
|
+
import_chalk81 = __toESM3(require_source());
|
145985
145956
|
init_stamp();
|
145986
145957
|
init_add_env_record();
|
145987
145958
|
init_get_env_records();
|
@@ -146006,8 +145977,51 @@ var init_ellipsis = __esm({
|
|
146006
145977
|
}
|
146007
145978
|
});
|
146008
145979
|
|
145980
|
+
// src/util/target/format-environment.ts
|
145981
|
+
function formatEnvironment(client2, orgSlug, projectSlug, environment) {
|
145982
|
+
const { output: output2 } = client2;
|
145983
|
+
const projectUrl = `https://vercel.com/${orgSlug}/${projectSlug}`;
|
145984
|
+
const boldName = import_chalk82.default.bold(environment.name);
|
145985
|
+
return output2.link(
|
145986
|
+
boldName,
|
145987
|
+
`${projectUrl}/settings/environments/${environment.id}`,
|
145988
|
+
{ fallback: () => boldName, color: false }
|
145989
|
+
);
|
145990
|
+
}
|
145991
|
+
var import_chalk82;
|
145992
|
+
var init_format_environment = __esm({
|
145993
|
+
"src/util/target/format-environment.ts"() {
|
145994
|
+
"use strict";
|
145995
|
+
import_chalk82 = __toESM3(require_source());
|
145996
|
+
}
|
145997
|
+
});
|
145998
|
+
|
145999
|
+
// src/util/env/format-environments.ts
|
146000
|
+
function formatEnvironments(client2, link4, env, customEnvironments) {
|
146001
|
+
const defaultTargets = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => {
|
146002
|
+
return formatEnvironment(client2, link4.org.slug, link4.project.name, {
|
146003
|
+
id: t,
|
146004
|
+
name: (0, import_title4.default)(t)
|
146005
|
+
});
|
146006
|
+
});
|
146007
|
+
const customTargets = env.customEnvironmentIds ? env.customEnvironmentIds.map((id) => customEnvironments.find((e2) => e2.id === id)).filter(Boolean).map(
|
146008
|
+
(e2) => formatEnvironment(client2, link4.org.slug, link4.project.name, e2)
|
146009
|
+
) : [];
|
146010
|
+
const targetsString = [...defaultTargets, ...customTargets].join(", ");
|
146011
|
+
return env.gitBranch ? `${targetsString} (${env.gitBranch})` : targetsString;
|
146012
|
+
}
|
146013
|
+
var import_title4;
|
146014
|
+
var init_format_environments = __esm({
|
146015
|
+
"src/util/env/format-environments.ts"() {
|
146016
|
+
"use strict";
|
146017
|
+
import_title4 = __toESM3(require_lib4());
|
146018
|
+
init_format_environment();
|
146019
|
+
}
|
146020
|
+
});
|
146021
|
+
|
146009
146022
|
// src/commands/env/ls.ts
|
146010
|
-
async function ls5(client2,
|
146023
|
+
async function ls5(client2, link4, opts, args2) {
|
146024
|
+
const { output: output2 } = client2;
|
146011
146025
|
if (args2.length > 2) {
|
146012
146026
|
output2.error(
|
146013
146027
|
`Invalid number of arguments. Usage: ${getCommandName(
|
@@ -146017,33 +146031,31 @@ async function ls5(client2, project, opts, args2, output2) {
|
|
146017
146031
|
return 1;
|
146018
146032
|
}
|
146019
146033
|
const [envTarget, envGitBranch] = args2;
|
146034
|
+
const { project, org } = link4;
|
146020
146035
|
const lsStamp = stamp_default();
|
146021
146036
|
const [envsResult, customEnvs] = await Promise.all([
|
146022
|
-
getEnvRecords(
|
146037
|
+
getEnvRecords(client2, project.id, "vercel-cli:env:ls", {
|
146023
146038
|
target: envTarget,
|
146024
146039
|
gitBranch: envGitBranch
|
146025
146040
|
}),
|
146026
146041
|
getCustomEnvironments(client2, project.id)
|
146027
146042
|
]);
|
146028
146043
|
const { envs } = envsResult;
|
146044
|
+
const projectSlugLink = formatProject(client2, org.slug, project.name);
|
146029
146045
|
if (envs.length === 0) {
|
146030
146046
|
output2.log(
|
146031
|
-
`No Environment Variables found
|
146032
|
-
project.name
|
146033
|
-
)} ${import_chalk81.default.gray(lsStamp())}`
|
146047
|
+
`No Environment Variables found for ${projectSlugLink} ${import_chalk83.default.gray(lsStamp())}`
|
146034
146048
|
);
|
146035
146049
|
} else {
|
146036
146050
|
output2.log(
|
146037
|
-
`Environment Variables found
|
146038
|
-
project.name
|
146039
|
-
)} ${import_chalk81.default.gray(lsStamp())}`
|
146051
|
+
`Environment Variables found for ${projectSlugLink} ${import_chalk83.default.gray(lsStamp())}`
|
146040
146052
|
);
|
146041
|
-
client2.stdout.write(`${getTable(envs, customEnvs)}
|
146053
|
+
client2.stdout.write(`${getTable(client2, link4, envs, customEnvs)}
|
146042
146054
|
`);
|
146043
146055
|
}
|
146044
146056
|
return 0;
|
146045
146057
|
}
|
146046
|
-
function getTable(records, customEnvironments) {
|
146058
|
+
function getTable(client2, link4, records, customEnvironments) {
|
146047
146059
|
const label = records.some((env) => env.gitBranch) ? "environments (git branch)" : "environments";
|
146048
146060
|
return formatTable(
|
146049
146061
|
["name", "value", label, "created"],
|
@@ -146051,42 +146063,35 @@ function getTable(records, customEnvironments) {
|
|
146051
146063
|
[
|
146052
146064
|
{
|
146053
146065
|
name: "",
|
146054
|
-
rows: records.map((row) => getRow(row, customEnvironments))
|
146066
|
+
rows: records.map((row) => getRow(client2, link4, row, customEnvironments))
|
146055
146067
|
}
|
146056
146068
|
]
|
146057
146069
|
);
|
146058
146070
|
}
|
146059
|
-
function getRow(env, customEnvironments) {
|
146071
|
+
function getRow(client2, link4, env, customEnvironments) {
|
146060
146072
|
let value;
|
146061
146073
|
if (env.type === "plain") {
|
146062
146074
|
const singleLineValue = env.value.replace(/\s/g, " ");
|
146063
|
-
value =
|
146075
|
+
value = import_chalk83.default.gray(ellipsis(singleLineValue, 19));
|
146064
146076
|
} else if (env.type === "system") {
|
146065
|
-
value =
|
146077
|
+
value = import_chalk83.default.gray.italic(env.value);
|
146066
146078
|
} else {
|
146067
|
-
value =
|
146079
|
+
value = import_chalk83.default.gray.italic("Encrypted");
|
146068
146080
|
}
|
146069
146081
|
const now = Date.now();
|
146070
146082
|
return [
|
146071
|
-
|
146083
|
+
import_chalk83.default.bold(env.key),
|
146072
146084
|
value,
|
146073
|
-
|
146085
|
+
formatEnvironments(client2, link4, env, customEnvironments),
|
146074
146086
|
env.createdAt ? `${(0, import_ms16.default)(now - env.createdAt)} ago` : ""
|
146075
146087
|
];
|
146076
146088
|
}
|
146077
|
-
|
146078
|
-
const defaultTargets = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => (0, import_title4.default)(t));
|
146079
|
-
const customTargets = env.customEnvironmentIds ? env.customEnvironmentIds.map((id) => customEnvironments.find((e2) => e2.id === id)?.name).filter(Boolean) : [];
|
146080
|
-
const targetsString = [...defaultTargets, ...customTargets].join(", ");
|
146081
|
-
return env.gitBranch ? `${targetsString} (${env.gitBranch})` : targetsString;
|
146082
|
-
}
|
146083
|
-
var import_chalk81, import_ms16, import_title4;
|
146089
|
+
var import_chalk83, import_ms16;
|
146084
146090
|
var init_ls5 = __esm({
|
146085
146091
|
"src/commands/env/ls.ts"() {
|
146086
146092
|
"use strict";
|
146087
|
-
|
146093
|
+
import_chalk83 = __toESM3(require_source());
|
146088
146094
|
import_ms16 = __toESM3(require_ms2());
|
146089
|
-
import_title4 = __toESM3(require_lib4());
|
146090
146095
|
init_format_table();
|
146091
146096
|
init_get_env_records();
|
146092
146097
|
init_env_target();
|
@@ -146094,6 +146099,8 @@ var init_ls5 = __esm({
|
|
146094
146099
|
init_pkg_name();
|
146095
146100
|
init_ellipsis();
|
146096
146101
|
init_get_custom_environments();
|
146102
|
+
init_format_environments();
|
146103
|
+
init_format_project();
|
146097
146104
|
}
|
146098
146105
|
});
|
146099
146106
|
|
@@ -146111,21 +146118,10 @@ var init_remove_env_record = __esm({
|
|
146111
146118
|
}
|
146112
146119
|
});
|
146113
146120
|
|
146114
|
-
// src/util/env/format-env-target.ts
|
146115
|
-
function formatEnvTarget2(env) {
|
146116
|
-
const target = (Array.isArray(env.target) ? env.target : [env.target || ""]).map((t) => (0, import_title5.default)(t)).join(", ");
|
146117
|
-
return env.gitBranch ? `${target} (${env.gitBranch})` : target;
|
146118
|
-
}
|
146119
|
-
var import_title5;
|
146120
|
-
var init_format_env_target = __esm({
|
146121
|
-
"src/util/env/format-env-target.ts"() {
|
146122
|
-
"use strict";
|
146123
|
-
import_title5 = __toESM3(require_lib4());
|
146124
|
-
}
|
146125
|
-
});
|
146126
|
-
|
146127
146121
|
// src/commands/env/rm.ts
|
146128
|
-
async function rm5(client2,
|
146122
|
+
async function rm5(client2, link4, opts, args2) {
|
146123
|
+
const { output: output2 } = client2;
|
146124
|
+
const { project } = link4;
|
146129
146125
|
if (args2.length > 3) {
|
146130
146126
|
output2.error(
|
146131
146127
|
`Invalid number of arguments. Usage: ${getCommandName(
|
@@ -146137,28 +146133,17 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
146137
146133
|
let [envName, envTarget, envGitBranch] = args2;
|
146138
146134
|
if (!envName) {
|
146139
146135
|
envName = await client2.input.text({
|
146140
|
-
message:
|
146136
|
+
message: "What's the name of the variable?",
|
146141
146137
|
validate: (val) => val ? true : "Name cannot be empty"
|
146142
146138
|
});
|
146143
146139
|
}
|
146144
|
-
|
146145
|
-
|
146146
|
-
`The Environment ${param(
|
146147
|
-
envTarget
|
146148
|
-
)} is invalid. It must be one of: ${getEnvTargetPlaceholder()}.`
|
146149
|
-
);
|
146150
|
-
return 1;
|
146151
|
-
}
|
146152
|
-
const result = await getEnvRecords(
|
146153
|
-
output2,
|
146154
|
-
client2,
|
146155
|
-
project.id,
|
146156
|
-
"vercel-cli:env:rm",
|
146157
|
-
{
|
146140
|
+
const [result, customEnvironments] = await Promise.all([
|
146141
|
+
getEnvRecords(client2, project.id, "vercel-cli:env:rm", {
|
146158
146142
|
target: envTarget,
|
146159
146143
|
gitBranch: envGitBranch
|
146160
|
-
}
|
146161
|
-
|
146144
|
+
}),
|
146145
|
+
getCustomEnvironments(client2, project.id)
|
146146
|
+
]);
|
146162
146147
|
let envs = result.envs.filter((env2) => env2.key === envName);
|
146163
146148
|
if (envs.length === 0) {
|
146164
146149
|
output2.error(`Environment Variable was not found.
|
@@ -146170,9 +146155,7 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
146170
146155
|
message: `Remove ${envName} from which Environments?`,
|
146171
146156
|
choices: envs.map((env2) => ({
|
146172
146157
|
value: env2.id,
|
146173
|
-
|
146174
|
-
// use new `formatEnvTarget` from `vc env ls`
|
146175
|
-
name: formatEnvTarget2(env2)
|
146158
|
+
name: formatEnvironments(client2, link4, env2, customEnvironments)
|
146176
146159
|
}))
|
146177
146160
|
});
|
146178
146161
|
if (!id) {
|
@@ -146184,9 +146167,12 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
146184
146167
|
const skipConfirmation = opts["--yes"];
|
146185
146168
|
if (!skipConfirmation && !await confirm(
|
146186
146169
|
client2,
|
146187
|
-
`Removing Environment Variable ${param(env.key)} from ${
|
146188
|
-
|
146189
|
-
|
146170
|
+
`Removing Environment Variable ${param(env.key)} from ${formatEnvironments(
|
146171
|
+
client2,
|
146172
|
+
link4,
|
146173
|
+
env,
|
146174
|
+
customEnvironments
|
146175
|
+
)} in Project ${import_chalk84.default.bold(project.name)}. Are you sure?`,
|
146190
146176
|
false
|
146191
146177
|
)) {
|
146192
146178
|
output2.log("Canceled");
|
@@ -146205,22 +146191,22 @@ async function rm5(client2, project, opts, args2, output2) {
|
|
146205
146191
|
}
|
146206
146192
|
output2.print(
|
146207
146193
|
`${prependEmoji(
|
146208
|
-
`Removed Environment Variable ${
|
146194
|
+
`Removed Environment Variable ${import_chalk84.default.gray(rmStamp())}`,
|
146209
146195
|
emoji("success")
|
146210
146196
|
)}
|
146211
146197
|
`
|
146212
146198
|
);
|
146213
146199
|
return 0;
|
146214
146200
|
}
|
146215
|
-
var
|
146201
|
+
var import_chalk84;
|
146216
146202
|
var init_rm5 = __esm({
|
146217
146203
|
"src/commands/env/rm.ts"() {
|
146218
146204
|
"use strict";
|
146219
|
-
|
146205
|
+
import_chalk84 = __toESM3(require_source());
|
146220
146206
|
init_confirm();
|
146221
146207
|
init_remove_env_record();
|
146222
146208
|
init_get_env_records();
|
146223
|
-
|
146209
|
+
init_format_environments();
|
146224
146210
|
init_env_target();
|
146225
146211
|
init_stamp();
|
146226
146212
|
init_param();
|
@@ -146228,6 +146214,7 @@ var init_rm5 = __esm({
|
|
146228
146214
|
init_known_error();
|
146229
146215
|
init_pkg_name();
|
146230
146216
|
init_errors_ts();
|
146217
|
+
init_get_custom_environments();
|
146231
146218
|
}
|
146232
146219
|
});
|
146233
146220
|
|
@@ -146451,24 +146438,21 @@ async function main6(client2) {
|
|
146451
146438
|
);
|
146452
146439
|
return 1;
|
146453
146440
|
} else {
|
146454
|
-
|
146455
|
-
config2.currentTeam = org.type === "team" ? org.id : void 0;
|
146441
|
+
config2.currentTeam = link4.org.type === "team" ? link4.org.id : void 0;
|
146456
146442
|
switch (subcommand) {
|
146457
146443
|
case "ls":
|
146458
|
-
return ls5(client2,
|
146444
|
+
return ls5(client2, link4, parsedArgs.flags, args2);
|
146459
146445
|
case "add":
|
146460
|
-
return add5(client2,
|
146446
|
+
return add5(client2, link4, parsedArgs.flags, args2);
|
146461
146447
|
case "rm":
|
146462
|
-
return rm5(client2,
|
146448
|
+
return rm5(client2, link4, parsedArgs.flags, args2);
|
146463
146449
|
case "pull":
|
146464
146450
|
return pull(
|
146465
146451
|
client2,
|
146466
146452
|
link4,
|
146467
|
-
project,
|
146468
146453
|
target,
|
146469
146454
|
parsedArgs.flags,
|
146470
146455
|
args2,
|
146471
|
-
output2,
|
146472
146456
|
cwd,
|
146473
146457
|
"vercel-cli:env:pull"
|
146474
146458
|
);
|
@@ -146515,7 +146499,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146515
146499
|
const repoArg = args2[0];
|
146516
146500
|
if (args2.length > 1) {
|
146517
146501
|
output2.error(
|
146518
|
-
`Invalid number of arguments. Usage: ${
|
146502
|
+
`Invalid number of arguments. Usage: ${import_chalk85.default.cyan(
|
146519
146503
|
`${getCommandName("project connect")}`
|
146520
146504
|
)}`
|
146521
146505
|
);
|
@@ -146561,7 +146545,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146561
146545
|
}
|
146562
146546
|
if (!gitConfig) {
|
146563
146547
|
output2.error(
|
146564
|
-
`No local Git repository found. Run ${
|
146548
|
+
`No local Git repository found. Run ${import_chalk85.default.cyan(
|
146565
146549
|
"`git clone <url>`"
|
146566
146550
|
)} to clone a remote Git repository first.`
|
146567
146551
|
);
|
@@ -146570,7 +146554,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146570
146554
|
const remoteUrls = pluckRemoteUrls(gitConfig);
|
146571
146555
|
if (!remoteUrls) {
|
146572
146556
|
output2.error(
|
146573
|
-
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${
|
146557
|
+
`No remote URLs found in your Git config. Make sure you've configured a remote repo in your local Git config. Run ${import_chalk85.default.cyan(
|
146574
146558
|
"`git remote --help`"
|
146575
146559
|
)} for more details.`
|
146576
146560
|
);
|
@@ -146614,7 +146598,7 @@ async function connect(client2, argv, args2, project, org) {
|
|
146614
146598
|
return checkAndConnect;
|
146615
146599
|
}
|
146616
146600
|
output2.log(
|
146617
|
-
`Connected ${formatProvider(provider)} repository ${
|
146601
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk85.default.cyan(repoPath)}!`
|
146618
146602
|
);
|
146619
146603
|
return 0;
|
146620
146604
|
}
|
@@ -146651,7 +146635,7 @@ async function connectArg({
|
|
146651
146635
|
return connect2;
|
146652
146636
|
}
|
146653
146637
|
client2.output.log(
|
146654
|
-
`Connected ${formatProvider(provider)} repository ${
|
146638
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk85.default.cyan(repoPath)}!`
|
146655
146639
|
);
|
146656
146640
|
return 0;
|
146657
146641
|
}
|
@@ -146693,7 +146677,7 @@ async function connectArgWithLocalGit({
|
|
146693
146677
|
return connect2;
|
146694
146678
|
}
|
146695
146679
|
client2.output.log(
|
146696
|
-
`Connected ${formatProvider(provider)} repository ${
|
146680
|
+
`Connected ${formatProvider(provider)} repository ${import_chalk85.default.cyan(
|
146697
146681
|
repoPath
|
146698
146682
|
)}!`
|
146699
146683
|
);
|
@@ -146726,7 +146710,7 @@ async function promptConnectArg({
|
|
146726
146710
|
return true;
|
146727
146711
|
}
|
146728
146712
|
client2.output.log(
|
146729
|
-
`Found a repository in your local Git Config: ${
|
146713
|
+
`Found a repository in your local Git Config: ${import_chalk85.default.cyan(
|
146730
146714
|
Object.values(remoteUrls)[0]
|
146731
146715
|
)}`
|
146732
146716
|
);
|
@@ -146775,7 +146759,7 @@ async function checkExistsAndConnect({
|
|
146775
146759
|
const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
|
146776
146760
|
if (isSameRepo) {
|
146777
146761
|
client2.output.log(
|
146778
|
-
`${
|
146762
|
+
`${import_chalk85.default.cyan(connectedRepoPath)} is already connected to your project.`
|
146779
146763
|
);
|
146780
146764
|
return 1;
|
146781
146765
|
}
|
@@ -146808,7 +146792,7 @@ async function confirmRepoConnect(client2, yes, connectedProvider, connectedRepo
|
|
146808
146792
|
client2,
|
146809
146793
|
`Looks like you already have a ${formatProvider(
|
146810
146794
|
connectedProvider
|
146811
|
-
)} repository connected: ${
|
146795
|
+
)} repository connected: ${import_chalk85.default.cyan(
|
146812
146796
|
connectedRepoPath
|
146813
146797
|
)}. Do you want to replace it?`,
|
146814
146798
|
true
|
@@ -146823,7 +146807,7 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
146823
146807
|
let choices = [];
|
146824
146808
|
for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
|
146825
146809
|
choices.push({
|
146826
|
-
name: `${urlValue} ${
|
146810
|
+
name: `${urlValue} ${import_chalk85.default.gray(`(${urlKey})`)}`,
|
146827
146811
|
value: urlValue,
|
146828
146812
|
short: urlKey
|
146829
146813
|
});
|
@@ -146833,11 +146817,11 @@ async function selectRemoteUrl(client2, remoteUrls) {
|
|
146833
146817
|
choices
|
146834
146818
|
});
|
146835
146819
|
}
|
146836
|
-
var
|
146820
|
+
var import_chalk85, import_path41;
|
146837
146821
|
var init_connect = __esm({
|
146838
146822
|
"src/commands/git/connect.ts"() {
|
146839
146823
|
"use strict";
|
146840
|
-
|
146824
|
+
import_chalk85 = __toESM3(require_source());
|
146841
146825
|
import_path41 = require("path");
|
146842
146826
|
init_create_git_meta();
|
146843
146827
|
init_confirm();
|
@@ -146853,7 +146837,7 @@ async function disconnect(client2, args2, project, org) {
|
|
146853
146837
|
const { output: output2 } = client2;
|
146854
146838
|
if (args2.length !== 0) {
|
146855
146839
|
output2.error(
|
146856
|
-
`Invalid number of arguments. Usage: ${
|
146840
|
+
`Invalid number of arguments. Usage: ${import_chalk86.default.cyan(
|
146857
146841
|
`${getCommandName("project disconnect")}`
|
146858
146842
|
)}`
|
146859
146843
|
);
|
@@ -146871,14 +146855,14 @@ async function disconnect(client2, args2, project, org) {
|
|
146871
146855
|
);
|
146872
146856
|
const confirmDisconnect = await confirm(
|
146873
146857
|
client2,
|
146874
|
-
`Are you sure you want to disconnect ${
|
146858
|
+
`Are you sure you want to disconnect ${import_chalk86.default.cyan(
|
146875
146859
|
`${linkOrg}/${repo}`
|
146876
146860
|
)} from your project?`,
|
146877
146861
|
false
|
146878
146862
|
);
|
146879
146863
|
if (confirmDisconnect) {
|
146880
146864
|
await disconnectGitProvider(client2, org, project.id);
|
146881
|
-
output2.log(`Disconnected ${
|
146865
|
+
output2.log(`Disconnected ${import_chalk86.default.cyan(`${linkOrg}/${repo}`)}.`);
|
146882
146866
|
} else {
|
146883
146867
|
output2.log("Canceled");
|
146884
146868
|
}
|
@@ -146892,11 +146876,11 @@ async function disconnect(client2, args2, project, org) {
|
|
146892
146876
|
}
|
146893
146877
|
return 0;
|
146894
146878
|
}
|
146895
|
-
var
|
146879
|
+
var import_chalk86;
|
146896
146880
|
var init_disconnect = __esm({
|
146897
146881
|
"src/commands/git/disconnect.ts"() {
|
146898
146882
|
"use strict";
|
146899
|
-
|
146883
|
+
import_chalk86 = __toESM3(require_source());
|
146900
146884
|
init_confirm();
|
146901
146885
|
init_pkg_name();
|
146902
146886
|
init_connect_git_provider();
|
@@ -147026,11 +147010,11 @@ var init_git = __esm({
|
|
147026
147010
|
});
|
147027
147011
|
|
147028
147012
|
// src/util/output/list-item.ts
|
147029
|
-
var
|
147013
|
+
var import_chalk87, listItem, list_item_default;
|
147030
147014
|
var init_list_item = __esm({
|
147031
147015
|
"src/util/output/list-item.ts"() {
|
147032
147016
|
"use strict";
|
147033
|
-
|
147017
|
+
import_chalk87 = __toESM3(require_source());
|
147034
147018
|
listItem = (msg, n) => {
|
147035
147019
|
if (!n) {
|
147036
147020
|
n = "-";
|
@@ -147038,7 +147022,7 @@ var init_list_item = __esm({
|
|
147038
147022
|
if (Number(n)) {
|
147039
147023
|
n += ".";
|
147040
147024
|
}
|
147041
|
-
return `${(0,
|
147025
|
+
return `${(0, import_chalk87.default)(n.toString())} ${msg}`;
|
147042
147026
|
};
|
147043
147027
|
list_item_default = listItem;
|
147044
147028
|
}
|
@@ -147230,9 +147214,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
147230
147214
|
extractor.on("finish", resolve12);
|
147231
147215
|
res.body.pipe(extractor);
|
147232
147216
|
});
|
147233
|
-
const successLog = `Initialized "${
|
147217
|
+
const successLog = `Initialized "${import_chalk88.default.bold(
|
147234
147218
|
name
|
147235
|
-
)}" example in ${
|
147219
|
+
)}" example in ${import_chalk88.default.bold(humanizePath(folder))}.`;
|
147236
147220
|
const folderRel = import_path42.default.relative(client2.cwd, folder);
|
147237
147221
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
147238
147222
|
`To deploy, ${cmd(
|
@@ -147252,14 +147236,14 @@ function prepareFolder(cwd, folder, force) {
|
|
147252
147236
|
if (import_fs8.default.existsSync(dest)) {
|
147253
147237
|
if (!import_fs8.default.lstatSync(dest).isDirectory()) {
|
147254
147238
|
throw new Error(
|
147255
|
-
`Destination path "${
|
147239
|
+
`Destination path "${import_chalk88.default.bold(
|
147256
147240
|
folder
|
147257
147241
|
)}" already exists and is not a directory.`
|
147258
147242
|
);
|
147259
147243
|
}
|
147260
147244
|
if (!force && import_fs8.default.readdirSync(dest).length !== 0) {
|
147261
147245
|
throw new Error(
|
147262
|
-
`Destination path "${
|
147246
|
+
`Destination path "${import_chalk88.default.bold(
|
147263
147247
|
folder
|
147264
147248
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
147265
147249
|
"--force"
|
@@ -147270,14 +147254,14 @@ function prepareFolder(cwd, folder, force) {
|
|
147270
147254
|
try {
|
147271
147255
|
import_fs8.default.mkdirSync(dest);
|
147272
147256
|
} catch (e2) {
|
147273
|
-
throw new Error(`Could not create directory "${
|
147257
|
+
throw new Error(`Could not create directory "${import_chalk88.default.bold(folder)}".`);
|
147274
147258
|
}
|
147275
147259
|
}
|
147276
147260
|
return dest;
|
147277
147261
|
}
|
147278
147262
|
async function guess(client2, exampleList, name) {
|
147279
147263
|
const GuessError = new Error(
|
147280
|
-
`No example found for ${
|
147264
|
+
`No example found for ${import_chalk88.default.bold(name)}, run ${getCommandName(
|
147281
147265
|
`init`
|
147282
147266
|
)} to see the list of available examples.`
|
147283
147267
|
);
|
@@ -147286,21 +147270,21 @@ async function guess(client2, exampleList, name) {
|
|
147286
147270
|
}
|
147287
147271
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
147288
147272
|
if (typeof found === "string") {
|
147289
|
-
if (await confirm(client2, `Did you mean ${
|
147273
|
+
if (await confirm(client2, `Did you mean ${import_chalk88.default.bold(found)}?`, false)) {
|
147290
147274
|
return found;
|
147291
147275
|
}
|
147292
147276
|
} else {
|
147293
147277
|
throw GuessError;
|
147294
147278
|
}
|
147295
147279
|
}
|
147296
|
-
var import_fs8, import_path42, import_tar_fs,
|
147280
|
+
var import_fs8, import_path42, import_tar_fs, import_chalk88, EXAMPLE_API;
|
147297
147281
|
var init_init = __esm({
|
147298
147282
|
"src/commands/init/init.ts"() {
|
147299
147283
|
"use strict";
|
147300
147284
|
import_fs8 = __toESM3(require("fs"));
|
147301
147285
|
import_path42 = __toESM3(require("path"));
|
147302
147286
|
import_tar_fs = __toESM3(require_tar_fs());
|
147303
|
-
|
147287
|
+
import_chalk88 = __toESM3(require_source());
|
147304
147288
|
init_list();
|
147305
147289
|
init_list_item();
|
147306
147290
|
init_confirm();
|
@@ -147426,11 +147410,11 @@ var init_build_state = __esm({
|
|
147426
147410
|
});
|
147427
147411
|
|
147428
147412
|
// src/util/output/builds.ts
|
147429
|
-
var
|
147413
|
+
var import_chalk89, import_bytes7, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
147430
147414
|
var init_builds = __esm({
|
147431
147415
|
"src/util/output/builds.ts"() {
|
147432
147416
|
"use strict";
|
147433
|
-
|
147417
|
+
import_chalk89 = __toESM3(require_source());
|
147434
147418
|
import_bytes7 = __toESM3(require_bytes());
|
147435
147419
|
init_build_state();
|
147436
147420
|
padding = 8;
|
@@ -147459,48 +147443,48 @@ var init_builds = __esm({
|
|
147459
147443
|
styleBuild = (build2, times, longestSource) => {
|
147460
147444
|
const { entrypoint, id } = build2;
|
147461
147445
|
const time = typeof times[id] === "string" ? times[id] : "";
|
147462
|
-
let pathColor =
|
147446
|
+
let pathColor = import_chalk89.default.cyan;
|
147463
147447
|
if (isFailed(build2)) {
|
147464
|
-
pathColor =
|
147448
|
+
pathColor = import_chalk89.default.red;
|
147465
147449
|
}
|
147466
147450
|
const entry = entrypoint.padEnd(longestSource + padding);
|
147467
147451
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
147468
|
-
return `${
|
147452
|
+
return `${import_chalk89.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
147469
147453
|
};
|
147470
147454
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden = false) => {
|
147471
147455
|
const { id } = buildGroup[0];
|
147472
147456
|
const entry = commonPath.padEnd(longestSource + padding);
|
147473
147457
|
const time = typeof times[id] === "string" ? times[id] : "";
|
147474
147458
|
const prefix = isHidden === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
147475
|
-
let pathColor =
|
147459
|
+
let pathColor = import_chalk89.default.cyan;
|
147476
147460
|
if (buildGroup.every(isFailed)) {
|
147477
|
-
pathColor =
|
147461
|
+
pathColor = import_chalk89.default.red;
|
147478
147462
|
}
|
147479
147463
|
if (isHidden) {
|
147480
|
-
pathColor =
|
147464
|
+
pathColor = import_chalk89.default.grey;
|
147481
147465
|
}
|
147482
|
-
return `${
|
147466
|
+
return `${import_chalk89.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
147483
147467
|
};
|
147484
147468
|
styleOutput = (output2, readyState, isLast) => {
|
147485
147469
|
const { type, path: path11, size, lambda } = output2;
|
147486
147470
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
147487
|
-
const finalSize = size ? ` ${
|
147488
|
-
let color =
|
147471
|
+
const finalSize = size ? ` ${import_chalk89.default.grey(`(${(0, import_bytes7.default)(size)})`)}` : "";
|
147472
|
+
let color = import_chalk89.default.grey;
|
147489
147473
|
let finalRegion = "";
|
147490
147474
|
if (isReady({ readyState })) {
|
147491
|
-
color =
|
147475
|
+
color = import_chalk89.default;
|
147492
147476
|
} else if (isFailed({ readyState })) {
|
147493
|
-
color =
|
147477
|
+
color = import_chalk89.default.red;
|
147494
147478
|
}
|
147495
147479
|
if (lambda) {
|
147496
147480
|
const { deployedTo } = lambda;
|
147497
147481
|
if (deployedTo && deployedTo.length > 0) {
|
147498
|
-
finalRegion = ` ${
|
147482
|
+
finalRegion = ` ${import_chalk89.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
147499
147483
|
}
|
147500
147484
|
}
|
147501
147485
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
147502
147486
|
const main15 = prefix + path11 + finalSize + finalRegion;
|
147503
|
-
return `${
|
147487
|
+
return `${import_chalk89.default.grey(corner)} ${color(main15)}`;
|
147504
147488
|
};
|
147505
147489
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
147506
147490
|
const parts = path11.split("/").slice(0, -1);
|
@@ -147632,7 +147616,7 @@ var init_builds = __esm({
|
|
147632
147616
|
);
|
147633
147617
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
147634
147618
|
final.push(
|
147635
|
-
|
147619
|
+
import_chalk89.default.grey(
|
147636
147620
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
147637
147621
|
`
|
147638
147622
|
)
|
@@ -147680,19 +147664,19 @@ function routes(routes2) {
|
|
147680
147664
|
const padding2 = 6;
|
147681
147665
|
const space = " ".repeat(padding2);
|
147682
147666
|
const destSpace = " ".repeat(longestDest || 10);
|
147683
|
-
const arrow =
|
147667
|
+
const arrow = import_chalk90.default.grey("->");
|
147684
147668
|
for (const item of routes2) {
|
147685
147669
|
if ("handle" in item) {
|
147686
|
-
toPrint += `${
|
147670
|
+
toPrint += `${import_chalk90.default.grey("\u2576")} ${import_chalk90.default.cyan(item.handle)}`;
|
147687
147671
|
continue;
|
147688
147672
|
}
|
147689
147673
|
const { src, dest, status, headers } = item;
|
147690
147674
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
147691
147675
|
const suffix = last ? "" : `
|
147692
147676
|
`;
|
147693
|
-
const finalSrc =
|
147677
|
+
const finalSrc = import_chalk90.default.cyan(src.padEnd(longestSrc + padding2));
|
147694
147678
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
147695
|
-
const finalStatus = status ?
|
147679
|
+
const finalStatus = status ? import_chalk90.default.grey(`[${status}]`) : "";
|
147696
147680
|
let finalHeaders = null;
|
147697
147681
|
if (headers) {
|
147698
147682
|
finalHeaders = `
|
@@ -147703,21 +147687,21 @@ function routes(routes2) {
|
|
147703
147687
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
147704
147688
|
const suffix2 = last2 ? "" : `
|
147705
147689
|
`;
|
147706
|
-
const prefix2 =
|
147690
|
+
const prefix2 = import_chalk90.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
147707
147691
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
147708
147692
|
}
|
147709
147693
|
}
|
147710
|
-
const prefix =
|
147694
|
+
const prefix = import_chalk90.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
147711
147695
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
147712
147696
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
147713
147697
|
}
|
147714
147698
|
return toPrint;
|
147715
147699
|
}
|
147716
|
-
var
|
147700
|
+
var import_chalk90, longestProperty;
|
147717
147701
|
var init_routes = __esm({
|
147718
147702
|
"src/util/output/routes.ts"() {
|
147719
147703
|
"use strict";
|
147720
|
-
|
147704
|
+
import_chalk90 = __toESM3(require_source());
|
147721
147705
|
longestProperty = (routes2, name) => {
|
147722
147706
|
const longestItem = routes2.sort((a, b) => {
|
147723
147707
|
const aName = a[name];
|
@@ -147855,7 +147839,7 @@ async function inspect3(client2) {
|
|
147855
147839
|
} catch {
|
147856
147840
|
}
|
147857
147841
|
client2.output.spinner(
|
147858
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
147842
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk91.default.bold(contextName)}`
|
147859
147843
|
);
|
147860
147844
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
147861
147845
|
let abortController;
|
@@ -147882,7 +147866,7 @@ async function inspect3(client2) {
|
|
147882
147866
|
}
|
147883
147867
|
}
|
147884
147868
|
if (withLogs) {
|
147885
|
-
print(`${
|
147869
|
+
print(`${import_chalk91.default.cyan("status")} ${stateString(deployment.readyState)}
|
147886
147870
|
`);
|
147887
147871
|
} else {
|
147888
147872
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
@@ -147891,21 +147875,21 @@ async function inspect3(client2) {
|
|
147891
147875
|
}
|
147892
147876
|
function stateString(s) {
|
147893
147877
|
const CIRCLE = "\u25CF ";
|
147894
|
-
const sTitle = s && (0,
|
147878
|
+
const sTitle = s && (0, import_title5.default)(s);
|
147895
147879
|
switch (s) {
|
147896
147880
|
case "INITIALIZING":
|
147897
147881
|
case "BUILDING":
|
147898
|
-
return
|
147882
|
+
return import_chalk91.default.yellow(CIRCLE) + sTitle;
|
147899
147883
|
case "ERROR":
|
147900
|
-
return
|
147884
|
+
return import_chalk91.default.red(CIRCLE) + sTitle;
|
147901
147885
|
case "READY":
|
147902
|
-
return
|
147886
|
+
return import_chalk91.default.green(CIRCLE) + sTitle;
|
147903
147887
|
case "QUEUED":
|
147904
|
-
return
|
147888
|
+
return import_chalk91.default.gray(CIRCLE) + sTitle;
|
147905
147889
|
case "CANCELED":
|
147906
|
-
return
|
147890
|
+
return import_chalk91.default.gray(CIRCLE) + sTitle;
|
147907
147891
|
default:
|
147908
|
-
return
|
147892
|
+
return import_chalk91.default.gray("UNKNOWN");
|
147909
147893
|
}
|
147910
147894
|
}
|
147911
147895
|
async function printDetails({
|
@@ -147915,7 +147899,7 @@ async function printDetails({
|
|
147915
147899
|
startTimestamp
|
147916
147900
|
}) {
|
147917
147901
|
client2.output.log(
|
147918
|
-
`Fetched deployment "${
|
147902
|
+
`Fetched deployment "${import_chalk91.default.bold(deployment.url)}" in ${import_chalk91.default.bold(
|
147919
147903
|
contextName
|
147920
147904
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
147921
147905
|
);
|
@@ -147931,14 +147915,14 @@ async function printDetails({
|
|
147931
147915
|
const { print, link: link4 } = client2.output;
|
147932
147916
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
147933
147917
|
print("\n");
|
147934
|
-
print(
|
147935
|
-
print(` ${
|
147918
|
+
print(import_chalk91.default.bold(" General\n\n"));
|
147919
|
+
print(` ${import_chalk91.default.cyan("id")} ${id}
|
147936
147920
|
`);
|
147937
|
-
print(` ${
|
147921
|
+
print(` ${import_chalk91.default.cyan("name")} ${name}
|
147938
147922
|
`);
|
147939
147923
|
const customEnvironmentName = deployment.customEnvironment?.name;
|
147940
147924
|
const target = customEnvironmentName ?? deployment.target ?? "preview";
|
147941
|
-
print(` ${
|
147925
|
+
print(` ${import_chalk91.default.cyan("target")} `);
|
147942
147926
|
print(
|
147943
147927
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
147944
147928
|
`${target}`,
|
@@ -147948,13 +147932,13 @@ async function printDetails({
|
|
147948
147932
|
` : `${target}
|
147949
147933
|
`
|
147950
147934
|
);
|
147951
|
-
print(` ${
|
147935
|
+
print(` ${import_chalk91.default.cyan("status")} ${stateString(readyState)}
|
147952
147936
|
`);
|
147953
|
-
print(` ${
|
147937
|
+
print(` ${import_chalk91.default.cyan("url")} https://${url3}
|
147954
147938
|
`);
|
147955
147939
|
if (createdAt) {
|
147956
147940
|
print(
|
147957
|
-
` ${
|
147941
|
+
` ${import_chalk91.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
147958
147942
|
Date.now() - createdAt,
|
147959
147943
|
true
|
147960
147944
|
)}
|
@@ -147963,10 +147947,10 @@ async function printDetails({
|
|
147963
147947
|
}
|
147964
147948
|
print("\n\n");
|
147965
147949
|
if (aliases !== void 0 && aliases.length > 0) {
|
147966
|
-
print(
|
147950
|
+
print(import_chalk91.default.bold(" Aliases\n\n"));
|
147967
147951
|
let aliasList = "";
|
147968
147952
|
for (const alias2 of aliases) {
|
147969
|
-
aliasList += `${
|
147953
|
+
aliasList += `${import_chalk91.default.gray("\u2576")} https://${alias2}
|
147970
147954
|
`;
|
147971
147955
|
}
|
147972
147956
|
print(indent_default(aliasList, 4));
|
@@ -147978,12 +147962,12 @@ async function printDetails({
|
|
147978
147962
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
147979
147963
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
147980
147964
|
}
|
147981
|
-
print(
|
147965
|
+
print(import_chalk91.default.bold(" Builds\n\n"));
|
147982
147966
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
147983
147967
|
print("\n\n");
|
147984
147968
|
}
|
147985
147969
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
147986
|
-
print(
|
147970
|
+
print(import_chalk91.default.bold(" Routes\n\n"));
|
147987
147971
|
print(indent_default(routes(routes2), 4));
|
147988
147972
|
print(`
|
147989
147973
|
|
@@ -147996,14 +147980,14 @@ function exitCode(state) {
|
|
147996
147980
|
}
|
147997
147981
|
return 0;
|
147998
147982
|
}
|
147999
|
-
var import_error_utils25,
|
147983
|
+
var import_error_utils25, import_chalk91, import_ms17, import_title5, import_url19;
|
148000
147984
|
var init_inspect2 = __esm({
|
148001
147985
|
"src/commands/inspect/index.ts"() {
|
148002
147986
|
"use strict";
|
148003
147987
|
import_error_utils25 = __toESM3(require_dist2());
|
148004
|
-
|
147988
|
+
import_chalk91 = __toESM3(require_source());
|
148005
147989
|
import_ms17 = __toESM3(require_ms2());
|
148006
|
-
|
147990
|
+
import_title5 = __toESM3(require_lib4());
|
148007
147991
|
import_url19 = require("url");
|
148008
147992
|
init_is_deploying();
|
148009
147993
|
init_logs();
|
@@ -148540,7 +148524,7 @@ async function list2(client2) {
|
|
148540
148524
|
});
|
148541
148525
|
let project;
|
148542
148526
|
let pagination;
|
148543
|
-
let contextName;
|
148527
|
+
let contextName = "";
|
148544
148528
|
let app = parsedArgs.args[1];
|
148545
148529
|
let deployments = [];
|
148546
148530
|
let singleDeployment = false;
|
@@ -148577,11 +148561,12 @@ async function list2(client2) {
|
|
148577
148561
|
deployments.push(deployment);
|
148578
148562
|
singleDeployment = true;
|
148579
148563
|
}
|
148580
|
-
|
148581
|
-
if (
|
148564
|
+
const p = await getProjectByNameOrId(client2, app);
|
148565
|
+
if (p instanceof ProjectNotFound) {
|
148582
148566
|
error3(`The provided argument "${app}" is not a valid project name`);
|
148583
148567
|
return 1;
|
148584
148568
|
}
|
148569
|
+
project = p;
|
148585
148570
|
} else {
|
148586
148571
|
const link4 = await ensureLink("list", client2, client2.cwd, {
|
148587
148572
|
autoConfirm
|
@@ -148606,14 +148591,9 @@ async function list2(client2) {
|
|
148606
148591
|
error3("Please provide a number for flag `--next`");
|
148607
148592
|
return 1;
|
148608
148593
|
}
|
148609
|
-
const
|
148610
|
-
const projectSlugBold = import_chalk90.default.bold(`${contextName}/${project.name}`);
|
148611
|
-
const projectSlugLink = client2.output.link(projectSlugBold, projectUrl, {
|
148612
|
-
fallback: () => projectSlugBold,
|
148613
|
-
color: false
|
148614
|
-
});
|
148594
|
+
const projectSlugLink = formatProject(client2, contextName, project.name);
|
148615
148595
|
if (!singleDeployment) {
|
148616
|
-
spinner(`Fetching deployments in ${
|
148596
|
+
spinner(`Fetching deployments in ${import_chalk92.default.bold(contextName)}`);
|
148617
148597
|
const start = Date.now();
|
148618
148598
|
debug3("Fetching deployments");
|
148619
148599
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -148653,7 +148633,7 @@ async function list2(client2) {
|
|
148653
148633
|
const urls = [];
|
148654
148634
|
const tablePrint = table(
|
148655
148635
|
[
|
148656
|
-
headers.map((header) =>
|
148636
|
+
headers.map((header) => import_chalk92.default.bold(import_chalk92.default.cyan(header))),
|
148657
148637
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
148658
148638
|
urls.push(`https://${dep.url}`);
|
148659
148639
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -148663,17 +148643,16 @@ async function list2(client2) {
|
|
148663
148643
|
const targetName = dep.customEnvironment?.name || (dep.target === "production" ? "Production" : "Preview");
|
148664
148644
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
148665
148645
|
return [
|
148666
|
-
|
148646
|
+
import_chalk92.default.gray(createdAt),
|
148667
148647
|
`https://${dep.url}`,
|
148668
148648
|
stateString2(dep.readyState || ""),
|
148669
|
-
client2.
|
148670
|
-
|
148671
|
-
|
148672
|
-
|
148673
|
-
),
|
148674
|
-
...!showPolicy ? [
|
148675
|
-
|
148676
|
-
...showPolicy ? [import_chalk90.default.gray(proposedExp)] : []
|
148649
|
+
formatEnvironment(client2, contextName, project.name, {
|
148650
|
+
id: targetSlug,
|
148651
|
+
name: targetName
|
148652
|
+
}),
|
148653
|
+
...!showPolicy ? [import_chalk92.default.gray(getDeploymentDuration(dep))] : [],
|
148654
|
+
...!showPolicy ? [import_chalk92.default.gray(dep.creator?.username)] : [],
|
148655
|
+
...showPolicy ? [import_chalk92.default.gray(proposedExp)] : []
|
148677
148656
|
];
|
148678
148657
|
}).filter(
|
148679
148658
|
(app2) => (
|
@@ -148714,23 +148693,23 @@ function getDeploymentDuration(dep) {
|
|
148714
148693
|
}
|
148715
148694
|
function stateString2(s) {
|
148716
148695
|
const CIRCLE = "\u25CF ";
|
148717
|
-
const sTitle = (0,
|
148696
|
+
const sTitle = (0, import_title6.default)(s);
|
148718
148697
|
switch (s) {
|
148719
148698
|
case "INITIALIZING":
|
148720
148699
|
case "BUILDING":
|
148721
148700
|
case "DEPLOYING":
|
148722
148701
|
case "ANALYZING":
|
148723
|
-
return
|
148702
|
+
return import_chalk92.default.yellow(CIRCLE) + sTitle;
|
148724
148703
|
case "ERROR":
|
148725
|
-
return
|
148704
|
+
return import_chalk92.default.red(CIRCLE) + sTitle;
|
148726
148705
|
case "READY":
|
148727
|
-
return
|
148706
|
+
return import_chalk92.default.green(CIRCLE) + sTitle;
|
148728
148707
|
case "QUEUED":
|
148729
|
-
return
|
148708
|
+
return import_chalk92.default.white(CIRCLE) + sTitle;
|
148730
148709
|
case "CANCELED":
|
148731
|
-
return
|
148710
|
+
return import_chalk92.default.gray(sTitle);
|
148732
148711
|
default:
|
148733
|
-
return
|
148712
|
+
return import_chalk92.default.gray("UNKNOWN");
|
148734
148713
|
}
|
148735
148714
|
}
|
148736
148715
|
function sortByCreatedAt(a, b) {
|
@@ -148746,14 +148725,14 @@ function filterUniqueApps() {
|
|
148746
148725
|
return true;
|
148747
148726
|
};
|
148748
148727
|
}
|
148749
|
-
var
|
148728
|
+
var import_ms18, import_chalk92, import_title6, import_error_utils26;
|
148750
148729
|
var init_list2 = __esm({
|
148751
148730
|
"src/commands/list/index.ts"() {
|
148752
148731
|
"use strict";
|
148753
|
-
import_chalk90 = __toESM3(require_source());
|
148754
148732
|
import_ms18 = __toESM3(require_ms2());
|
148733
|
+
import_chalk92 = __toESM3(require_source());
|
148734
|
+
import_title6 = __toESM3(require_lib4());
|
148755
148735
|
init_table();
|
148756
|
-
import_title7 = __toESM3(require_lib4());
|
148757
148736
|
init_get_args();
|
148758
148737
|
init_error2();
|
148759
148738
|
init_elapsed();
|
@@ -148773,6 +148752,8 @@ var init_list2 = __esm({
|
|
148773
148752
|
init_get_flags_specification();
|
148774
148753
|
init_get_deployment();
|
148775
148754
|
init_get_project_by_id_or_name();
|
148755
|
+
init_format_project();
|
148756
|
+
init_format_environment();
|
148776
148757
|
}
|
148777
148758
|
});
|
148778
148759
|
|
@@ -148835,7 +148816,7 @@ async function logs(client2) {
|
|
148835
148816
|
} catch {
|
148836
148817
|
}
|
148837
148818
|
spinner(
|
148838
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
148819
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk93.default.bold(contextName)}`
|
148839
148820
|
);
|
148840
148821
|
let deployment;
|
148841
148822
|
try {
|
@@ -148871,19 +148852,19 @@ function printDisclaimer(deployment, { print, warn }) {
|
|
148871
148852
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
148872
148853
|
);
|
148873
148854
|
print(
|
148874
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
148855
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk93.default.dim(
|
148875
148856
|
deployment.id
|
148876
|
-
)}) starting from ${
|
148857
|
+
)}) starting from ${import_chalk93.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
|
148877
148858
|
|
148878
148859
|
`
|
148879
148860
|
);
|
148880
148861
|
}
|
148881
|
-
var import_error_utils27,
|
148862
|
+
var import_error_utils27, import_chalk93, import_format2, deprecatedFlags, dateTimeFormat2;
|
148882
148863
|
var init_logs2 = __esm({
|
148883
148864
|
"src/commands/logs/index.ts"() {
|
148884
148865
|
"use strict";
|
148885
148866
|
import_error_utils27 = __toESM3(require_dist2());
|
148886
|
-
|
148867
|
+
import_chalk93 = __toESM3(require_source());
|
148887
148868
|
import_format2 = __toESM3(require_format());
|
148888
148869
|
init_build_state();
|
148889
148870
|
init_is_deploying();
|
@@ -149052,7 +149033,7 @@ async function login2(client2) {
|
|
149052
149033
|
writeToConfigFile(client2.config);
|
149053
149034
|
output2.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
149054
149035
|
output2.print(
|
149055
|
-
`${
|
149036
|
+
`${import_chalk94.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
149056
149037
|
`
|
149057
149038
|
);
|
149058
149039
|
output2.print(
|
@@ -149064,12 +149045,12 @@ async function login2(client2) {
|
|
149064
149045
|
);
|
149065
149046
|
return 0;
|
149066
149047
|
}
|
149067
|
-
var import_email_validator,
|
149048
|
+
var import_email_validator, import_chalk94;
|
149068
149049
|
var init_login2 = __esm({
|
149069
149050
|
"src/commands/login/index.ts"() {
|
149070
149051
|
"use strict";
|
149071
149052
|
import_email_validator = __toESM3(require_email_validator());
|
149072
|
-
|
149053
|
+
import_chalk94 = __toESM3(require_source());
|
149073
149054
|
init_humanize_path();
|
149074
149055
|
init_get_args();
|
149075
149056
|
init_prompt();
|
@@ -149194,12 +149175,12 @@ async function add7(client2, args2, contextName) {
|
|
149194
149175
|
const { output: output2 } = client2;
|
149195
149176
|
if (args2.length !== 1) {
|
149196
149177
|
output2.error(
|
149197
|
-
`Invalid number of arguments. Usage: ${
|
149178
|
+
`Invalid number of arguments. Usage: ${import_chalk95.default.cyan(
|
149198
149179
|
`${getCommandName("project add <name>")}`
|
149199
149180
|
)}`
|
149200
149181
|
);
|
149201
149182
|
if (args2.length > 1) {
|
149202
|
-
const example =
|
149183
|
+
const example = import_chalk95.default.cyan(
|
149203
149184
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
149204
149185
|
);
|
149205
149186
|
output2.log(
|
@@ -149225,17 +149206,17 @@ async function add7(client2, args2, contextName) {
|
|
149225
149206
|
}
|
149226
149207
|
const elapsed2 = (0, import_ms19.default)(Date.now() - start);
|
149227
149208
|
output2.log(
|
149228
|
-
`${
|
149209
|
+
`${import_chalk95.default.cyan("Success!")} Project ${import_chalk95.default.bold(
|
149229
149210
|
name.toLowerCase()
|
149230
|
-
)} added (${
|
149211
|
+
)} added (${import_chalk95.default.bold(contextName)}) ${import_chalk95.default.gray(`[${elapsed2}]`)}`
|
149231
149212
|
);
|
149232
149213
|
return;
|
149233
149214
|
}
|
149234
|
-
var
|
149215
|
+
var import_chalk95, import_ms19;
|
149235
149216
|
var init_add6 = __esm({
|
149236
149217
|
"src/commands/project/add.ts"() {
|
149237
149218
|
"use strict";
|
149238
|
-
|
149219
|
+
import_chalk95 = __toESM3(require_source());
|
149239
149220
|
import_ms19 = __toESM3(require_ms2());
|
149240
149221
|
init_errors_ts();
|
149241
149222
|
init_pkg_name();
|
@@ -149248,14 +149229,14 @@ async function list3(client2, argv, args2, contextName) {
|
|
149248
149229
|
const { output: output2 } = client2;
|
149249
149230
|
if (args2.length !== 0) {
|
149250
149231
|
output2.error(
|
149251
|
-
`Invalid number of arguments. Usage: ${
|
149232
|
+
`Invalid number of arguments. Usage: ${import_chalk96.default.cyan(
|
149252
149233
|
`${getCommandName("project ls")}`
|
149253
149234
|
)}`
|
149254
149235
|
);
|
149255
149236
|
return 2;
|
149256
149237
|
}
|
149257
149238
|
const start = Date.now();
|
149258
|
-
output2.spinner(`Fetching projects in ${
|
149239
|
+
output2.spinner(`Fetching projects in ${import_chalk96.default.bold(contextName)}`);
|
149259
149240
|
let projectsUrl = `/v9/projects?limit=20`;
|
149260
149241
|
const deprecated = argv["--update-required"] || false;
|
149261
149242
|
if (deprecated) {
|
@@ -149290,19 +149271,19 @@ async function list3(client2, argv, args2, contextName) {
|
|
149290
149271
|
);
|
149291
149272
|
}
|
149292
149273
|
output2.log(
|
149293
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
149274
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk96.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk96.default.gray(`[${elapsed2}]`)}`
|
149294
149275
|
);
|
149295
149276
|
if (projectList.length > 0) {
|
149296
149277
|
const tablePrint = table(
|
149297
149278
|
[
|
149298
149279
|
["Project Name", "Latest Production URL", "Updated"].map(
|
149299
|
-
(header) =>
|
149280
|
+
(header) => import_chalk96.default.bold(import_chalk96.default.cyan(header))
|
149300
149281
|
),
|
149301
149282
|
...projectList.map((project) => [
|
149302
149283
|
[
|
149303
|
-
|
149284
|
+
import_chalk96.default.bold(project.name),
|
149304
149285
|
getLatestProdUrl(project),
|
149305
|
-
|
149286
|
+
import_chalk96.default.gray((0, import_ms20.default)(Date.now() - project.updatedAt))
|
149306
149287
|
]
|
149307
149288
|
]).flat()
|
149308
149289
|
],
|
@@ -149326,11 +149307,11 @@ function getLatestProdUrl(project) {
|
|
149326
149307
|
return "https://" + alias2;
|
149327
149308
|
return "--";
|
149328
149309
|
}
|
149329
|
-
var
|
149310
|
+
var import_chalk96, import_ms20, import_build_utils17;
|
149330
149311
|
var init_list3 = __esm({
|
149331
149312
|
"src/commands/project/list.ts"() {
|
149332
149313
|
"use strict";
|
149333
|
-
|
149314
|
+
import_chalk96 = __toESM3(require_source());
|
149334
149315
|
import_ms20 = __toESM3(require_ms2());
|
149335
149316
|
init_table();
|
149336
149317
|
init_get_command_flags();
|
@@ -149343,7 +149324,7 @@ var init_list3 = __esm({
|
|
149343
149324
|
async function rm6(client2, args2) {
|
149344
149325
|
if (args2.length !== 1) {
|
149345
149326
|
client2.output.error(
|
149346
|
-
`Invalid number of arguments. Usage: ${
|
149327
|
+
`Invalid number of arguments. Usage: ${import_chalk97.default.cyan(
|
149347
149328
|
`${getCommandName("project rm <name>")}`
|
149348
149329
|
)}`
|
149349
149330
|
);
|
@@ -149372,7 +149353,7 @@ async function rm6(client2, args2) {
|
|
149372
149353
|
}
|
149373
149354
|
const elapsed2 = (0, import_ms21.default)(Date.now() - start);
|
149374
149355
|
client2.output.log(
|
149375
|
-
`${
|
149356
|
+
`${import_chalk97.default.cyan("Success!")} Project ${import_chalk97.default.bold(name)} removed ${import_chalk97.default.gray(
|
149376
149357
|
`[${elapsed2}]`
|
149377
149358
|
)}`
|
149378
149359
|
);
|
@@ -149381,19 +149362,19 @@ async function rm6(client2, args2) {
|
|
149381
149362
|
async function readConfirmation3(client2, projectName) {
|
149382
149363
|
client2.output.print(
|
149383
149364
|
prependEmoji(
|
149384
|
-
`The project ${
|
149365
|
+
`The project ${import_chalk97.default.bold(projectName)} will be removed permanently.
|
149385
149366
|
It will also delete everything under the project including deployments.
|
149386
149367
|
`,
|
149387
149368
|
emoji("warning")
|
149388
149369
|
)
|
149389
149370
|
);
|
149390
|
-
return await confirm(client2, `${
|
149371
|
+
return await confirm(client2, `${import_chalk97.default.bold.red("Are you sure?")}`, false);
|
149391
149372
|
}
|
149392
|
-
var
|
149373
|
+
var import_chalk97, import_ms21, e;
|
149393
149374
|
var init_rm6 = __esm({
|
149394
149375
|
"src/commands/project/rm.ts"() {
|
149395
149376
|
"use strict";
|
149396
|
-
|
149377
|
+
import_chalk97 = __toESM3(require_source());
|
149397
149378
|
import_ms21 = __toESM3(require_ms2());
|
149398
149379
|
init_emoji();
|
149399
149380
|
init_errors_ts();
|
@@ -149602,7 +149583,7 @@ async function getProjectByDeployment({
|
|
149602
149583
|
let team;
|
149603
149584
|
try {
|
149604
149585
|
output2?.spinner(
|
149605
|
-
`Fetching deployment "${deployId}" in ${
|
149586
|
+
`Fetching deployment "${deployId}" in ${import_chalk98.default.bold(contextName)}\u2026`
|
149606
149587
|
);
|
149607
149588
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
149608
149589
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -149619,12 +149600,12 @@ async function getProjectByDeployment({
|
|
149619
149600
|
team = teamResult.value;
|
149620
149601
|
deployment = deploymentResult.value;
|
149621
149602
|
output2?.log(
|
149622
|
-
`Fetching deployment "${deployId}" in ${
|
149603
|
+
`Fetching deployment "${deployId}" in ${import_chalk98.default.bold(contextName)}\u2026`
|
149623
149604
|
);
|
149624
149605
|
if (deployment.team?.id) {
|
149625
149606
|
if (!team || deployment.team.id !== team.id) {
|
149626
149607
|
const err = new Error(
|
149627
|
-
team ? `Deployment doesn't belong to current team ${
|
149608
|
+
team ? `Deployment doesn't belong to current team ${import_chalk98.default.bold(
|
149628
149609
|
contextName
|
149629
149610
|
)}` : `Deployment belongs to a different team`
|
149630
149611
|
);
|
@@ -149633,7 +149614,7 @@ async function getProjectByDeployment({
|
|
149633
149614
|
}
|
149634
149615
|
} else if (team) {
|
149635
149616
|
const err = new Error(
|
149636
|
-
`Deployment doesn't belong to current team ${
|
149617
|
+
`Deployment doesn't belong to current team ${import_chalk98.default.bold(contextName)}`
|
149637
149618
|
);
|
149638
149619
|
err.code = "ERR_INVALID_TEAM";
|
149639
149620
|
throw err;
|
@@ -149654,11 +149635,11 @@ async function getProjectByDeployment({
|
|
149654
149635
|
output2?.stopSpinner();
|
149655
149636
|
}
|
149656
149637
|
}
|
149657
|
-
var
|
149638
|
+
var import_chalk98;
|
149658
149639
|
var init_get_project_by_deployment = __esm({
|
149659
149640
|
"src/util/projects/get-project-by-deployment.ts"() {
|
149660
149641
|
"use strict";
|
149661
|
-
|
149642
|
+
import_chalk98 = __toESM3(require_source());
|
149662
149643
|
init_get_deployment();
|
149663
149644
|
init_get_project_by_id_or_name();
|
149664
149645
|
init_get_scope();
|
@@ -149671,21 +149652,21 @@ var init_get_project_by_deployment = __esm({
|
|
149671
149652
|
// src/util/alias/render-alias-status.ts
|
149672
149653
|
function renderAliasStatus(status) {
|
149673
149654
|
if (status === "completed") {
|
149674
|
-
return
|
149655
|
+
return import_chalk99.default.green(status);
|
149675
149656
|
}
|
149676
149657
|
if (status === "failed") {
|
149677
|
-
return
|
149658
|
+
return import_chalk99.default.red(status);
|
149678
149659
|
}
|
149679
149660
|
if (status === "skipped") {
|
149680
|
-
return
|
149661
|
+
return import_chalk99.default.gray(status);
|
149681
149662
|
}
|
149682
|
-
return
|
149663
|
+
return import_chalk99.default.yellow(status);
|
149683
149664
|
}
|
149684
|
-
var
|
149665
|
+
var import_chalk99;
|
149685
149666
|
var init_render_alias_status = __esm({
|
149686
149667
|
"src/util/alias/render-alias-status.ts"() {
|
149687
149668
|
"use strict";
|
149688
|
-
|
149669
|
+
import_chalk99 = __toESM3(require_source());
|
149689
149670
|
}
|
149690
149671
|
});
|
149691
149672
|
|
@@ -149760,7 +149741,7 @@ async function promoteStatus({
|
|
149760
149741
|
}
|
149761
149742
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
149762
149743
|
output2.log(
|
149763
|
-
`The promotion exceeded its deadline - rerun ${
|
149744
|
+
`The promotion exceeded its deadline - rerun ${import_chalk100.default.bold(
|
149764
149745
|
`${packageName} promote ${toDeploymentId}`
|
149765
149746
|
)} to try again`
|
149766
149747
|
);
|
@@ -149826,26 +149807,26 @@ async function renderJobSucceeded({
|
|
149826
149807
|
let deploymentInfo = "";
|
149827
149808
|
try {
|
149828
149809
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
149829
|
-
deploymentInfo = `${
|
149810
|
+
deploymentInfo = `${import_chalk100.default.bold(deployment.url)} (${toDeploymentId})`;
|
149830
149811
|
} catch (err) {
|
149831
149812
|
output2.debug(
|
149832
149813
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
149833
149814
|
);
|
149834
|
-
deploymentInfo =
|
149815
|
+
deploymentInfo = import_chalk100.default.bold(toDeploymentId);
|
149835
149816
|
}
|
149836
149817
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
149837
149818
|
output2.log(
|
149838
|
-
`Success! ${
|
149819
|
+
`Success! ${import_chalk100.default.bold(
|
149839
149820
|
project.name
|
149840
149821
|
)} was promoted to ${deploymentInfo} ${duration}`
|
149841
149822
|
);
|
149842
149823
|
return 0;
|
149843
149824
|
}
|
149844
|
-
var
|
149825
|
+
var import_chalk100, import_ms22;
|
149845
149826
|
var init_status = __esm({
|
149846
149827
|
"src/commands/promote/status.ts"() {
|
149847
149828
|
"use strict";
|
149848
|
-
|
149829
|
+
import_chalk100 = __toESM3(require_source());
|
149849
149830
|
init_elapsed();
|
149850
149831
|
init_format_date();
|
149851
149832
|
init_get_deployment();
|
@@ -149888,7 +149869,7 @@ async function requestPromote({
|
|
149888
149869
|
});
|
149889
149870
|
if (timeout !== void 0 && (0, import_ms23.default)(timeout) === 0) {
|
149890
149871
|
output2.log(
|
149891
|
-
`Successfully requested promote of ${
|
149872
|
+
`Successfully requested promote of ${import_chalk101.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
149892
149873
|
);
|
149893
149874
|
output2.log(`To check promote status, run ${getCommandName("promote")}.`);
|
149894
149875
|
return 0;
|
@@ -149901,11 +149882,11 @@ async function requestPromote({
|
|
149901
149882
|
timeout
|
149902
149883
|
});
|
149903
149884
|
}
|
149904
|
-
var
|
149885
|
+
var import_chalk101, import_ms23;
|
149905
149886
|
var init_request_promote = __esm({
|
149906
149887
|
"src/commands/promote/request-promote.ts"() {
|
149907
149888
|
"use strict";
|
149908
|
-
|
149889
|
+
import_chalk101 = __toESM3(require_source());
|
149909
149890
|
init_pkg_name();
|
149910
149891
|
init_get_project_by_deployment();
|
149911
149892
|
import_ms23 = __toESM3(require_ms2());
|
@@ -150067,7 +150048,7 @@ async function getDeploymentByIdOrURL({
|
|
150067
150048
|
let team;
|
150068
150049
|
try {
|
150069
150050
|
output2.spinner(
|
150070
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150051
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk102.default.bold(contextName)}\u2026`
|
150071
150052
|
);
|
150072
150053
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
150073
150054
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -150084,7 +150065,7 @@ async function getDeploymentByIdOrURL({
|
|
150084
150065
|
team = teamResult.value;
|
150085
150066
|
deployment = deploymentResult.value;
|
150086
150067
|
output2.log(
|
150087
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
150068
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk102.default.bold(contextName)}\u2026`
|
150088
150069
|
);
|
150089
150070
|
} finally {
|
150090
150071
|
output2.stopSpinner();
|
@@ -150092,7 +150073,7 @@ async function getDeploymentByIdOrURL({
|
|
150092
150073
|
if (deployment.team?.id) {
|
150093
150074
|
if (!team || deployment.team.id !== team.id) {
|
150094
150075
|
const err = new Error(
|
150095
|
-
team ? `Deployment doesn't belong to current team ${
|
150076
|
+
team ? `Deployment doesn't belong to current team ${import_chalk102.default.bold(
|
150096
150077
|
contextName
|
150097
150078
|
)}` : `Deployment belongs to a different team`
|
150098
150079
|
);
|
@@ -150101,18 +150082,18 @@ async function getDeploymentByIdOrURL({
|
|
150101
150082
|
}
|
150102
150083
|
} else if (team) {
|
150103
150084
|
const err = new Error(
|
150104
|
-
`Deployment doesn't belong to current team ${
|
150085
|
+
`Deployment doesn't belong to current team ${import_chalk102.default.bold(contextName)}`
|
150105
150086
|
);
|
150106
150087
|
err.code = "ERR_INVALID_TEAM";
|
150107
150088
|
throw err;
|
150108
150089
|
}
|
150109
150090
|
return deployment;
|
150110
150091
|
}
|
150111
|
-
var
|
150092
|
+
var import_chalk102;
|
150112
150093
|
var init_get_deployment_by_id_or_url = __esm({
|
150113
150094
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
150114
150095
|
"use strict";
|
150115
|
-
|
150096
|
+
import_chalk102 = __toESM3(require_source());
|
150116
150097
|
init_get_deployment();
|
150117
150098
|
init_get_team_by_id();
|
150118
150099
|
init_is_valid_name();
|
@@ -150213,14 +150194,14 @@ async function redeploy(client2) {
|
|
150213
150194
|
const previewUrl = `https://${deployment.url}`;
|
150214
150195
|
output2.print(
|
150215
150196
|
`${prependEmoji(
|
150216
|
-
`Inspect: ${
|
150197
|
+
`Inspect: ${import_chalk103.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
150217
150198
|
emoji("inspect")
|
150218
150199
|
)}
|
150219
150200
|
`
|
150220
150201
|
);
|
150221
150202
|
output2.print(
|
150222
150203
|
prependEmoji(
|
150223
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
150204
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk103.default.bold(
|
150224
150205
|
previewUrl
|
150225
150206
|
)} ${deployStamp()}`,
|
150226
150207
|
emoji("success")
|
@@ -150290,17 +150271,17 @@ async function redeploy(client2) {
|
|
150290
150271
|
output2.prettyError(err);
|
150291
150272
|
if ((0, import_error_utils30.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
150292
150273
|
output2.error(
|
150293
|
-
`Use ${
|
150274
|
+
`Use ${import_chalk103.default.bold("vc switch")} to change your current team`
|
150294
150275
|
);
|
150295
150276
|
}
|
150296
150277
|
return 1;
|
150297
150278
|
}
|
150298
150279
|
}
|
150299
|
-
var
|
150280
|
+
var import_chalk103, import_client12, import_error_utils30;
|
150300
150281
|
var init_redeploy = __esm({
|
150301
150282
|
"src/commands/redeploy/index.ts"() {
|
150302
150283
|
"use strict";
|
150303
|
-
|
150284
|
+
import_chalk103 = __toESM3(require_source());
|
150304
150285
|
import_client12 = __toESM3(require_dist12());
|
150305
150286
|
init_emoji();
|
150306
150287
|
init_get_args();
|
@@ -150510,7 +150491,7 @@ async function remove3(client2) {
|
|
150510
150491
|
}
|
150511
150492
|
const { contextName } = await getScope(client2);
|
150512
150493
|
output2.spinner(
|
150513
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
150494
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk104.default.bold(contextName)}`
|
150514
150495
|
);
|
150515
150496
|
let aliases;
|
150516
150497
|
let projects;
|
@@ -150576,12 +150557,12 @@ async function remove3(client2) {
|
|
150576
150557
|
});
|
150577
150558
|
if (deployments.length === 0 && projects.length === 0) {
|
150578
150559
|
log2(
|
150579
|
-
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) =>
|
150560
|
+
`Could not find ${parsedArgs.flags["--safe"] ? "unaliased" : "any"} deployments or projects matching ${ids.map((id) => import_chalk104.default.bold(`"${id}"`)).join(", ")}. Run ${getCommandName("projects ls")} to list.`
|
150580
150561
|
);
|
150581
150562
|
return 1;
|
150582
150563
|
}
|
150583
150564
|
log2(
|
150584
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
150565
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk104.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
150585
150566
|
);
|
150586
150567
|
if (deployments.length > 200) {
|
150587
150568
|
output2.warn(
|
@@ -150608,11 +150589,11 @@ async function remove3(client2) {
|
|
150608
150589
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
150609
150590
|
);
|
150610
150591
|
deployments.forEach((depl) => {
|
150611
|
-
output2.print(`${
|
150592
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(depl.url)}
|
150612
150593
|
`);
|
150613
150594
|
});
|
150614
150595
|
projects.forEach((project) => {
|
150615
|
-
output2.print(`${
|
150596
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(project.name)}
|
150616
150597
|
`);
|
150617
150598
|
});
|
150618
150599
|
return 0;
|
@@ -150629,8 +150610,8 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150629
150610
|
);
|
150630
150611
|
const deploymentTable = table(
|
150631
150612
|
deployments.map((depl) => {
|
150632
|
-
const time =
|
150633
|
-
const url3 = depl.url ?
|
150613
|
+
const time = import_chalk104.default.gray(`${(0, import_ms25.default)(Date.now() - depl.createdAt)} ago`);
|
150614
|
+
const url3 = depl.url ? import_chalk104.default.underline(`https://${depl.url}`) : "";
|
150634
150615
|
return [` ${depl.id}`, url3, time];
|
150635
150616
|
}),
|
150636
150617
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -150641,7 +150622,7 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150641
150622
|
for (const depl of deployments) {
|
150642
150623
|
for (const { alias: alias2 } of depl.aliases) {
|
150643
150624
|
output2.warn(
|
150644
|
-
`${
|
150625
|
+
`${import_chalk104.default.underline(`https://${alias2}`)} is an alias for ${import_chalk104.default.bold(depl.url)} and will be removed`
|
150645
150626
|
);
|
150646
150627
|
}
|
150647
150628
|
}
|
@@ -150655,12 +150636,12 @@ function readConfirmation4(deployments, projects, output2) {
|
|
150655
150636
|
`
|
150656
150637
|
);
|
150657
150638
|
for (const project of projects) {
|
150658
|
-
output2.print(`${
|
150639
|
+
output2.print(`${import_chalk104.default.gray("-")} ${import_chalk104.default.bold(project.name)}
|
150659
150640
|
`);
|
150660
150641
|
}
|
150661
150642
|
}
|
150662
150643
|
output2.print(
|
150663
|
-
`${
|
150644
|
+
`${import_chalk104.default.bold.red("> Are you sure?")} ${import_chalk104.default.gray("(y/N) ")}`
|
150664
150645
|
);
|
150665
150646
|
process.stdin.on("data", (d) => {
|
150666
150647
|
process.stdin.pause();
|
@@ -150677,11 +150658,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
150677
150658
|
}
|
150678
150659
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
150679
150660
|
}
|
150680
|
-
var
|
150661
|
+
var import_chalk104, import_ms25, import_pluralize11;
|
150681
150662
|
var init_remove = __esm({
|
150682
150663
|
"src/commands/remove/index.ts"() {
|
150683
150664
|
"use strict";
|
150684
|
-
|
150665
|
+
import_chalk104 = __toESM3(require_source());
|
150685
150666
|
import_ms25 = __toESM3(require_ms2());
|
150686
150667
|
import_pluralize11 = __toESM3(require_pluralize());
|
150687
150668
|
init_table();
|
@@ -150776,7 +150757,7 @@ async function rollbackStatus({
|
|
150776
150757
|
}
|
150777
150758
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
150778
150759
|
output2.log(
|
150779
|
-
`The rollback exceeded its deadline - rerun ${
|
150760
|
+
`The rollback exceeded its deadline - rerun ${import_chalk105.default.bold(
|
150780
150761
|
`${packageName} rollback ${toDeploymentId}`
|
150781
150762
|
)} to try again`
|
150782
150763
|
);
|
@@ -150842,26 +150823,26 @@ async function renderJobSucceeded2({
|
|
150842
150823
|
let deploymentInfo = "";
|
150843
150824
|
try {
|
150844
150825
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
150845
|
-
deploymentInfo = `${
|
150826
|
+
deploymentInfo = `${import_chalk105.default.bold(deployment.url)} (${toDeploymentId})`;
|
150846
150827
|
} catch (err) {
|
150847
150828
|
output2.debug(
|
150848
150829
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
150849
150830
|
);
|
150850
|
-
deploymentInfo =
|
150831
|
+
deploymentInfo = import_chalk105.default.bold(toDeploymentId);
|
150851
150832
|
}
|
150852
150833
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
150853
150834
|
output2.log(
|
150854
|
-
`Success! ${
|
150835
|
+
`Success! ${import_chalk105.default.bold(
|
150855
150836
|
project.name
|
150856
150837
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
150857
150838
|
);
|
150858
150839
|
return 0;
|
150859
150840
|
}
|
150860
|
-
var
|
150841
|
+
var import_chalk105, import_ms26;
|
150861
150842
|
var init_status2 = __esm({
|
150862
150843
|
"src/commands/rollback/status.ts"() {
|
150863
150844
|
"use strict";
|
150864
|
-
|
150845
|
+
import_chalk105 = __toESM3(require_source());
|
150865
150846
|
init_elapsed();
|
150866
150847
|
init_format_date();
|
150867
150848
|
init_get_deployment();
|
@@ -150894,7 +150875,7 @@ async function requestRollback({
|
|
150894
150875
|
});
|
150895
150876
|
if (timeout !== void 0 && (0, import_ms27.default)(timeout) === 0) {
|
150896
150877
|
output2.log(
|
150897
|
-
`Successfully requested rollback of ${
|
150878
|
+
`Successfully requested rollback of ${import_chalk106.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
150898
150879
|
);
|
150899
150880
|
output2.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
150900
150881
|
return 0;
|
@@ -150907,11 +150888,11 @@ async function requestRollback({
|
|
150907
150888
|
timeout
|
150908
150889
|
});
|
150909
150890
|
}
|
150910
|
-
var
|
150891
|
+
var import_chalk106, import_ms27;
|
150911
150892
|
var init_request_rollback = __esm({
|
150912
150893
|
"src/commands/rollback/request-rollback.ts"() {
|
150913
150894
|
"use strict";
|
150914
|
-
|
150895
|
+
import_chalk106 = __toESM3(require_source());
|
150915
150896
|
init_pkg_name();
|
150916
150897
|
init_get_project_by_deployment();
|
150917
150898
|
import_ms27 = __toESM3(require_ms2());
|
@@ -151059,21 +151040,17 @@ async function list4(client2, argv, args2, link4) {
|
|
151059
151040
|
const { output: output2 } = client2;
|
151060
151041
|
if (args2.length !== 0) {
|
151061
151042
|
output2.error(
|
151062
|
-
`Invalid number of arguments. Usage: ${
|
151043
|
+
`Invalid number of arguments. Usage: ${import_chalk107.default.cyan(
|
151063
151044
|
`${getCommandName("target ls")}`
|
151064
151045
|
)}`
|
151065
151046
|
);
|
151066
151047
|
return 2;
|
151067
151048
|
}
|
151068
151049
|
const start = Date.now();
|
151069
|
-
const
|
151070
|
-
|
151071
|
-
|
151072
|
-
|
151073
|
-
{
|
151074
|
-
fallback: () => import_chalk105.default.bold(`${link4.org.slug}/${link4.project.name}`),
|
151075
|
-
color: false
|
151076
|
-
}
|
151050
|
+
const projectSlugLink = formatProject(
|
151051
|
+
client2,
|
151052
|
+
link4.org.slug,
|
151053
|
+
link4.project.name
|
151077
151054
|
);
|
151078
151055
|
output2.spinner(`Fetching custom environments for ${projectSlugLink}`);
|
151079
151056
|
const url3 = `/projects/${encodeURIComponent(
|
@@ -151087,27 +151064,27 @@ async function list4(client2, argv, args2, link4) {
|
|
151087
151064
|
const elapsed2 = (0, import_ms29.default)(Date.now() - start);
|
151088
151065
|
result = withDefaultEnvironmentsIncluded(result);
|
151089
151066
|
output2.log(
|
151090
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
151067
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk107.default.gray(`[${elapsed2}]`)}`
|
151091
151068
|
);
|
151092
151069
|
const tablePrint = table(
|
151093
151070
|
[
|
151094
151071
|
["Target Name", "Target Slug", "Target ID", "Type", "Updated"].map(
|
151095
|
-
(header) =>
|
151072
|
+
(header) => import_chalk107.default.bold(import_chalk107.default.cyan(header))
|
151096
151073
|
),
|
151097
151074
|
...result.map((target) => {
|
151098
|
-
const boldName = import_chalk105.default.bold(target.name);
|
151099
151075
|
const type = target.type === "production" ? "Production" : target.type === "development" ? "Development" : "Preview";
|
151100
151076
|
return [
|
151101
151077
|
[
|
151102
|
-
|
151103
|
-
|
151104
|
-
|
151105
|
-
|
151078
|
+
formatEnvironment(
|
151079
|
+
client2,
|
151080
|
+
link4.org.slug,
|
151081
|
+
link4.project.name,
|
151082
|
+
target
|
151106
151083
|
),
|
151107
151084
|
target.slug,
|
151108
151085
|
target.id,
|
151109
151086
|
type,
|
151110
|
-
|
151087
|
+
import_chalk107.default.gray(
|
151111
151088
|
target.updatedAt > 0 ? (0, import_ms29.default)(Date.now() - target.updatedAt) : "-"
|
151112
151089
|
)
|
151113
151090
|
]
|
@@ -151157,14 +151134,16 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
151157
151134
|
}
|
151158
151135
|
];
|
151159
151136
|
}
|
151160
|
-
var
|
151137
|
+
var import_ms29, import_chalk107;
|
151161
151138
|
var init_list4 = __esm({
|
151162
151139
|
"src/commands/target/list.ts"() {
|
151163
151140
|
"use strict";
|
151164
|
-
import_chalk105 = __toESM3(require_source());
|
151165
151141
|
import_ms29 = __toESM3(require_ms2());
|
151142
|
+
import_chalk107 = __toESM3(require_source());
|
151166
151143
|
init_table();
|
151167
151144
|
init_pkg_name();
|
151145
|
+
init_format_project();
|
151146
|
+
init_format_environment();
|
151168
151147
|
}
|
151169
151148
|
});
|
151170
151149
|
|
@@ -151407,7 +151386,7 @@ async function list5(client2) {
|
|
151407
151386
|
client2.stdout.write("\n");
|
151408
151387
|
const teamTable = table(
|
151409
151388
|
[
|
151410
|
-
["id", "email / name"].map((str) => (0,
|
151389
|
+
["id", "email / name"].map((str) => (0, import_chalk108.gray)(str)),
|
151411
151390
|
...teamList.map((team) => [team.value, team.name])
|
151412
151391
|
],
|
151413
151392
|
{ hsep: 5 }
|
@@ -151424,13 +151403,13 @@ async function list5(client2) {
|
|
151424
151403
|
}
|
151425
151404
|
return 0;
|
151426
151405
|
}
|
151427
|
-
var
|
151406
|
+
var import_chalk108;
|
151428
151407
|
var init_list5 = __esm({
|
151429
151408
|
"src/commands/teams/list.ts"() {
|
151430
151409
|
"use strict";
|
151431
151410
|
init_chars();
|
151432
151411
|
init_table();
|
151433
|
-
|
151412
|
+
import_chalk108 = __toESM3(require_source());
|
151434
151413
|
init_get_user();
|
151435
151414
|
init_get_teams();
|
151436
151415
|
init_pkg_name();
|
@@ -151490,7 +151469,7 @@ Please select a team scope using ${getCommandName(
|
|
151490
151469
|
return 1;
|
151491
151470
|
}
|
151492
151471
|
output2.log(
|
151493
|
-
introMsg || `Inviting team members to ${
|
151472
|
+
introMsg || `Inviting team members to ${import_chalk109.default.bold(currentTeam.name)}`
|
151494
151473
|
);
|
151495
151474
|
if (emails.length > 0) {
|
151496
151475
|
for (const email3 of emails) {
|
@@ -151509,10 +151488,10 @@ Please select a team scope using ${getCommandName(
|
|
151509
151488
|
throw err;
|
151510
151489
|
}
|
151511
151490
|
output2.log(
|
151512
|
-
`${
|
151491
|
+
`${import_chalk109.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
151513
151492
|
);
|
151514
151493
|
} else {
|
151515
|
-
output2.log(`${
|
151494
|
+
output2.log(`${import_chalk109.default.red(`\u2716 ${email3}`)} ${import_chalk109.default.gray("[invalid]")}`);
|
151516
151495
|
}
|
151517
151496
|
}
|
151518
151497
|
return 0;
|
@@ -151546,15 +151525,15 @@ Please select a team scope using ${getCommandName(
|
|
151546
151525
|
);
|
151547
151526
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
151548
151527
|
emails.push(email2);
|
151549
|
-
output2.log(`${
|
151528
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
151550
151529
|
if (hasError) {
|
151551
151530
|
hasError = false;
|
151552
151531
|
process.stderr.write(eraseLines(emails.length + 2));
|
151553
151532
|
output2.log(
|
151554
|
-
introMsg || `Inviting team members to ${
|
151533
|
+
introMsg || `Inviting team members to ${import_chalk109.default.bold(currentTeam.name)}`
|
151555
151534
|
);
|
151556
151535
|
for (const email3 of emails) {
|
151557
|
-
output2.log(`${
|
151536
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
151558
151537
|
}
|
151559
151538
|
}
|
151560
151539
|
} catch (err) {
|
@@ -151563,7 +151542,7 @@ Please select a team scope using ${getCommandName(
|
|
151563
151542
|
output2.error((0, import_error_utils32.errorToString)(err));
|
151564
151543
|
hasError = true;
|
151565
151544
|
for (const email3 of emails) {
|
151566
|
-
output2.log(`${
|
151545
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
151567
151546
|
}
|
151568
151547
|
}
|
151569
151548
|
}
|
@@ -151576,16 +151555,16 @@ Please select a team scope using ${getCommandName(
|
|
151576
151555
|
} else {
|
151577
151556
|
output2.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
151578
151557
|
for (const email3 of emails) {
|
151579
|
-
output2.log(`${
|
151558
|
+
output2.log(`${import_chalk109.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
151580
151559
|
}
|
151581
151560
|
}
|
151582
151561
|
return 0;
|
151583
151562
|
}
|
151584
|
-
var
|
151563
|
+
var import_chalk109, import_error_utils32, validateEmail2, domains, emailAutoComplete;
|
151585
151564
|
var init_invite = __esm({
|
151586
151565
|
"src/commands/teams/invite.ts"() {
|
151587
151566
|
"use strict";
|
151588
|
-
|
151567
|
+
import_chalk109 = __toESM3(require_source());
|
151589
151568
|
init_cmd();
|
151590
151569
|
init_stamp();
|
151591
151570
|
init_param();
|
@@ -151674,7 +151653,7 @@ async function add8(client2) {
|
|
151674
151653
|
let elapsed2;
|
151675
151654
|
const { output: output2 } = client2;
|
151676
151655
|
output2.log(
|
151677
|
-
`Pick a team identifier for its URL (e.g.: ${
|
151656
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk110.default.cyan(
|
151678
151657
|
"`vercel.com/acme`"
|
151679
151658
|
)})`
|
151680
151659
|
);
|
@@ -151707,7 +151686,7 @@ async function add8(client2) {
|
|
151707
151686
|
output2.stopSpinner();
|
151708
151687
|
process.stdout.write(eraseLines(2));
|
151709
151688
|
output2.success(`Team created ${elapsed2()}`);
|
151710
|
-
output2.log(`${
|
151689
|
+
output2.log(`${import_chalk110.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
151711
151690
|
`);
|
151712
151691
|
output2.log("Pick a display name for your team");
|
151713
151692
|
let name;
|
@@ -151730,7 +151709,7 @@ async function add8(client2) {
|
|
151730
151709
|
process.stdout.write(eraseLines(2));
|
151731
151710
|
team = Object.assign(team, res);
|
151732
151711
|
output2.success(`Team name saved ${elapsed2()}`);
|
151733
|
-
output2.log(`${
|
151712
|
+
output2.log(`${import_chalk110.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
151734
151713
|
`);
|
151735
151714
|
output2.spinner("Saving");
|
151736
151715
|
client2.config.currentTeam = team.id;
|
@@ -151744,11 +151723,11 @@ async function add8(client2) {
|
|
151744
151723
|
});
|
151745
151724
|
return 0;
|
151746
151725
|
}
|
151747
|
-
var
|
151726
|
+
var import_chalk110, import_error_utils33, validateSlugKeypress, validateNameKeypress, teamUrlPrefix, teamNamePrefix;
|
151748
151727
|
var init_add7 = __esm({
|
151749
151728
|
"src/commands/teams/add.ts"() {
|
151750
151729
|
"use strict";
|
151751
|
-
|
151730
|
+
import_chalk110 = __toESM3(require_source());
|
151752
151731
|
init_stamp();
|
151753
151732
|
init_erase_lines();
|
151754
151733
|
init_chars();
|
@@ -151769,7 +151748,7 @@ var init_add7 = __esm({
|
|
151769
151748
|
// should be fixed on utils/input/text.js
|
151770
151749
|
/^[ a-zA-Z0-9_-]+$/.test(value + data)
|
151771
151750
|
);
|
151772
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
151751
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk110.default.gray("vercel.com/");
|
151773
151752
|
teamNamePrefix = "Team Name".padEnd(14);
|
151774
151753
|
}
|
151775
151754
|
});
|
@@ -151789,22 +151768,22 @@ async function main13(client2, desiredSlug) {
|
|
151789
151768
|
const teamChoices = teams.slice(0).sort((a, b) => {
|
151790
151769
|
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
|
151791
151770
|
}).map((team) => {
|
151792
|
-
let
|
151771
|
+
let title7 = `${team.name} (${team.slug})`;
|
151793
151772
|
const selected = team.id === currentTeam?.id;
|
151794
151773
|
if (selected) {
|
151795
|
-
|
151774
|
+
title7 += ` ${import_chalk111.default.bold("(current)")}`;
|
151796
151775
|
}
|
151797
151776
|
if (team.limited) {
|
151798
|
-
|
151777
|
+
title7 += ` ${emoji("locked")}`;
|
151799
151778
|
}
|
151800
151779
|
return {
|
151801
|
-
name:
|
151780
|
+
name: title7,
|
151802
151781
|
value: team.slug,
|
151803
151782
|
short: team.slug,
|
151804
151783
|
selected
|
151805
151784
|
};
|
151806
151785
|
});
|
151807
|
-
let suffix = personalScopeSelected ? ` ${
|
151786
|
+
let suffix = personalScopeSelected ? ` ${import_chalk111.default.bold("(current)")}` : "";
|
151808
151787
|
if (user.limited) {
|
151809
151788
|
suffix += ` ${emoji("locked")}`;
|
151810
151789
|
}
|
@@ -151850,14 +151829,14 @@ async function main13(client2, desiredSlug) {
|
|
151850
151829
|
}
|
151851
151830
|
updateCurrentTeam(config2);
|
151852
151831
|
output2.success(
|
151853
|
-
`Your account (${
|
151832
|
+
`Your account (${import_chalk111.default.bold(user.username)}) is now active!`
|
151854
151833
|
);
|
151855
151834
|
return 0;
|
151856
151835
|
}
|
151857
151836
|
const newTeam = teams.find((team) => team.slug === desiredSlug);
|
151858
151837
|
if (!newTeam) {
|
151859
151838
|
output2.error(
|
151860
|
-
`You do not have permission to access scope ${
|
151839
|
+
`You do not have permission to access scope ${import_chalk111.default.bold(desiredSlug)}.`
|
151861
151840
|
);
|
151862
151841
|
return 1;
|
151863
151842
|
}
|
@@ -151875,15 +151854,15 @@ async function main13(client2, desiredSlug) {
|
|
151875
151854
|
}
|
151876
151855
|
updateCurrentTeam(config2, newTeam);
|
151877
151856
|
output2.success(
|
151878
|
-
`The team ${
|
151857
|
+
`The team ${import_chalk111.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
151879
151858
|
);
|
151880
151859
|
return 0;
|
151881
151860
|
}
|
151882
|
-
var
|
151861
|
+
var import_chalk111, updateCurrentTeam;
|
151883
151862
|
var init_switch = __esm({
|
151884
151863
|
"src/commands/teams/switch.ts"() {
|
151885
151864
|
"use strict";
|
151886
|
-
|
151865
|
+
import_chalk111 = __toESM3(require_source());
|
151887
151866
|
init_emoji();
|
151888
151867
|
init_get_user();
|
151889
151868
|
init_get_teams();
|
@@ -152047,7 +152026,7 @@ var import_error_utils34 = __toESM3(require_dist2());
|
|
152047
152026
|
var import_path43 = require("path");
|
152048
152027
|
var import_fs9 = require("fs");
|
152049
152028
|
var import_fs_extra23 = __toESM3(require_lib());
|
152050
|
-
var
|
152029
|
+
var import_chalk112 = __toESM3(require_source());
|
152051
152030
|
var import_epipebomb = __toESM3(require_epipebomb());
|
152052
152031
|
|
152053
152032
|
// src/util/get-latest-version/index.ts
|
@@ -152848,13 +152827,13 @@ var main14 = async () => {
|
|
152848
152827
|
const betaCommands = [];
|
152849
152828
|
if (betaCommands.includes(targetOrSubcommand)) {
|
152850
152829
|
output.print(
|
152851
|
-
`${
|
152830
|
+
`${import_chalk112.default.grey(
|
152852
152831
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
152853
152832
|
)}
|
152854
152833
|
`
|
152855
152834
|
);
|
152856
152835
|
} else {
|
152857
|
-
output.print(`${
|
152836
|
+
output.print(`${import_chalk112.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
152858
152837
|
`);
|
152859
152838
|
}
|
152860
152839
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -153305,20 +153284,20 @@ main14().then(async (exitCode2) => {
|
|
153305
153284
|
});
|
153306
153285
|
if (latest) {
|
153307
153286
|
const changelog = "https://github.com/vercel/vercel/releases";
|
153308
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
153287
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk112.default.magenta(
|
153309
153288
|
`
|
153310
153289
|
|
153311
|
-
The latest update ${
|
153290
|
+
The latest update ${import_chalk112.default.italic(
|
153312
153291
|
"may"
|
153313
153292
|
)} fix any errors that occurred.`
|
153314
153293
|
) : "";
|
153315
153294
|
output.print(
|
153316
153295
|
box(
|
153317
|
-
`Update available! ${
|
153296
|
+
`Update available! ${import_chalk112.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk112.default.green(
|
153318
153297
|
`v${latest}`
|
153319
153298
|
)}
|
153320
153299
|
Changelog: ${output.link(changelog, changelog, { fallback: false })}
|
153321
|
-
Run ${
|
153300
|
+
Run ${import_chalk112.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
153322
153301
|
)
|
153323
153302
|
);
|
153324
153303
|
output.print("\n\n");
|