vercel 44.2.6 → 44.2.7
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 +1025 -717
- package/package.json +4 -4
package/dist/index.js
CHANGED
@@ -4071,14 +4071,14 @@ var require_templates = __commonJS2({
|
|
4071
4071
|
}
|
4072
4072
|
return results;
|
4073
4073
|
}
|
4074
|
-
function buildStyle(
|
4074
|
+
function buildStyle(chalk125, styles) {
|
4075
4075
|
const enabled = {};
|
4076
4076
|
for (const layer of styles) {
|
4077
4077
|
for (const style of layer.styles) {
|
4078
4078
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
4079
4079
|
}
|
4080
4080
|
}
|
4081
|
-
let current =
|
4081
|
+
let current = chalk125;
|
4082
4082
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
4083
4083
|
if (!Array.isArray(styles2)) {
|
4084
4084
|
continue;
|
@@ -4090,7 +4090,7 @@ var require_templates = __commonJS2({
|
|
4090
4090
|
}
|
4091
4091
|
return current;
|
4092
4092
|
}
|
4093
|
-
module2.exports = (
|
4093
|
+
module2.exports = (chalk125, temporary) => {
|
4094
4094
|
const styles = [];
|
4095
4095
|
const chunks = [];
|
4096
4096
|
let chunk = [];
|
@@ -4100,13 +4100,13 @@ var require_templates = __commonJS2({
|
|
4100
4100
|
} else if (style) {
|
4101
4101
|
const string = chunk.join("");
|
4102
4102
|
chunk = [];
|
4103
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
4103
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk125, styles)(string));
|
4104
4104
|
styles.push({ inverse, styles: parseStyle(style) });
|
4105
4105
|
} else if (close2) {
|
4106
4106
|
if (styles.length === 0) {
|
4107
4107
|
throw new Error("Found extraneous } in Chalk template literal");
|
4108
4108
|
}
|
4109
|
-
chunks.push(buildStyle(
|
4109
|
+
chunks.push(buildStyle(chalk125, styles)(chunk.join("")));
|
4110
4110
|
chunk = [];
|
4111
4111
|
styles.pop();
|
4112
4112
|
} else {
|
@@ -4154,16 +4154,16 @@ var require_source = __commonJS2({
|
|
4154
4154
|
}
|
4155
4155
|
};
|
4156
4156
|
var chalkFactory = (options) => {
|
4157
|
-
const
|
4158
|
-
applyOptions(
|
4159
|
-
|
4160
|
-
Object.setPrototypeOf(
|
4161
|
-
Object.setPrototypeOf(
|
4162
|
-
|
4157
|
+
const chalk126 = {};
|
4158
|
+
applyOptions(chalk126, options);
|
4159
|
+
chalk126.template = (...arguments_) => chalkTag(chalk126.template, ...arguments_);
|
4160
|
+
Object.setPrototypeOf(chalk126, Chalk.prototype);
|
4161
|
+
Object.setPrototypeOf(chalk126.template, chalk126);
|
4162
|
+
chalk126.template.constructor = () => {
|
4163
4163
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
4164
4164
|
};
|
4165
|
-
|
4166
|
-
return
|
4165
|
+
chalk126.template.Instance = ChalkClass;
|
4166
|
+
return chalk126.template;
|
4167
4167
|
};
|
4168
4168
|
function Chalk(options) {
|
4169
4169
|
return chalkFactory(options);
|
@@ -4274,7 +4274,7 @@ var require_source = __commonJS2({
|
|
4274
4274
|
return openAll + string + closeAll;
|
4275
4275
|
};
|
4276
4276
|
var template;
|
4277
|
-
var chalkTag = (
|
4277
|
+
var chalkTag = (chalk126, ...strings) => {
|
4278
4278
|
const [firstString] = strings;
|
4279
4279
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
4280
4280
|
return strings.join(" ");
|
@@ -4290,14 +4290,14 @@ var require_source = __commonJS2({
|
|
4290
4290
|
if (template === void 0) {
|
4291
4291
|
template = require_templates();
|
4292
4292
|
}
|
4293
|
-
return template(
|
4293
|
+
return template(chalk126, parts.join(""));
|
4294
4294
|
};
|
4295
4295
|
Object.defineProperties(Chalk.prototype, styles);
|
4296
|
-
var
|
4297
|
-
|
4298
|
-
|
4299
|
-
|
4300
|
-
module2.exports =
|
4296
|
+
var chalk125 = Chalk();
|
4297
|
+
chalk125.supportsColor = stdoutColor;
|
4298
|
+
chalk125.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
4299
|
+
chalk125.stderr.supportsColor = stderrColor;
|
4300
|
+
module2.exports = chalk125;
|
4301
4301
|
}
|
4302
4302
|
});
|
4303
4303
|
|
@@ -7208,14 +7208,14 @@ var require_templates2 = __commonJS2({
|
|
7208
7208
|
}
|
7209
7209
|
return results;
|
7210
7210
|
}
|
7211
|
-
function buildStyle(
|
7211
|
+
function buildStyle(chalk125, styles) {
|
7212
7212
|
const enabled = {};
|
7213
7213
|
for (const layer of styles) {
|
7214
7214
|
for (const style of layer.styles) {
|
7215
7215
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
7216
7216
|
}
|
7217
7217
|
}
|
7218
|
-
let current =
|
7218
|
+
let current = chalk125;
|
7219
7219
|
for (const styleName of Object.keys(enabled)) {
|
7220
7220
|
if (Array.isArray(enabled[styleName])) {
|
7221
7221
|
if (!(styleName in current)) {
|
@@ -7230,7 +7230,7 @@ var require_templates2 = __commonJS2({
|
|
7230
7230
|
}
|
7231
7231
|
return current;
|
7232
7232
|
}
|
7233
|
-
module2.exports = (
|
7233
|
+
module2.exports = (chalk125, tmp) => {
|
7234
7234
|
const styles = [];
|
7235
7235
|
const chunks = [];
|
7236
7236
|
let chunk = [];
|
@@ -7240,13 +7240,13 @@ var require_templates2 = __commonJS2({
|
|
7240
7240
|
} else if (style) {
|
7241
7241
|
const str = chunk.join("");
|
7242
7242
|
chunk = [];
|
7243
|
-
chunks.push(styles.length === 0 ? str : buildStyle(
|
7243
|
+
chunks.push(styles.length === 0 ? str : buildStyle(chalk125, styles)(str));
|
7244
7244
|
styles.push({ inverse, styles: parseStyle(style) });
|
7245
7245
|
} else if (close2) {
|
7246
7246
|
if (styles.length === 0) {
|
7247
7247
|
throw new Error("Found extraneous } in Chalk template literal");
|
7248
7248
|
}
|
7249
|
-
chunks.push(buildStyle(
|
7249
|
+
chunks.push(buildStyle(chalk125, styles)(chunk.join("")));
|
7250
7250
|
chunk = [];
|
7251
7251
|
styles.pop();
|
7252
7252
|
} else {
|
@@ -7283,16 +7283,16 @@ var require_chalk = __commonJS2({
|
|
7283
7283
|
}
|
7284
7284
|
function Chalk(options) {
|
7285
7285
|
if (!this || !(this instanceof Chalk) || this.template) {
|
7286
|
-
const
|
7287
|
-
applyOptions(
|
7288
|
-
|
7286
|
+
const chalk125 = {};
|
7287
|
+
applyOptions(chalk125, options);
|
7288
|
+
chalk125.template = function() {
|
7289
7289
|
const args2 = [].slice.call(arguments);
|
7290
|
-
return chalkTag.apply(null, [
|
7290
|
+
return chalkTag.apply(null, [chalk125.template].concat(args2));
|
7291
7291
|
};
|
7292
|
-
Object.setPrototypeOf(
|
7293
|
-
Object.setPrototypeOf(
|
7294
|
-
|
7295
|
-
return
|
7292
|
+
Object.setPrototypeOf(chalk125, Chalk.prototype);
|
7293
|
+
Object.setPrototypeOf(chalk125.template, chalk125);
|
7294
|
+
chalk125.template.constructor = Chalk;
|
7295
|
+
return chalk125.template;
|
7296
7296
|
}
|
7297
7297
|
applyOptions(this, options);
|
7298
7298
|
}
|
@@ -7411,7 +7411,7 @@ var require_chalk = __commonJS2({
|
|
7411
7411
|
ansiStyles.dim.open = originalDim;
|
7412
7412
|
return str;
|
7413
7413
|
}
|
7414
|
-
function chalkTag(
|
7414
|
+
function chalkTag(chalk125, strings) {
|
7415
7415
|
if (!Array.isArray(strings)) {
|
7416
7416
|
return [].slice.call(arguments, 1).join(" ");
|
7417
7417
|
}
|
@@ -7421,7 +7421,7 @@ var require_chalk = __commonJS2({
|
|
7421
7421
|
parts.push(String(args2[i - 1]).replace(/[{}\\]/g, "\\$&"));
|
7422
7422
|
parts.push(String(strings.raw[i]));
|
7423
7423
|
}
|
7424
|
-
return template(
|
7424
|
+
return template(chalk125, parts.join(""));
|
7425
7425
|
}
|
7426
7426
|
Object.defineProperties(Chalk.prototype, styles);
|
7427
7427
|
module2.exports = Chalk();
|
@@ -9372,19 +9372,19 @@ var require_cli_spinners = __commonJS2({
|
|
9372
9372
|
var require_log_symbols = __commonJS2({
|
9373
9373
|
"../../node_modules/.pnpm/log-symbols@2.2.0/node_modules/log-symbols/index.js"(exports2, module2) {
|
9374
9374
|
"use strict";
|
9375
|
-
var
|
9375
|
+
var chalk125 = require_chalk();
|
9376
9376
|
var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
|
9377
9377
|
var main17 = {
|
9378
|
-
info:
|
9379
|
-
success:
|
9380
|
-
warning:
|
9381
|
-
error:
|
9378
|
+
info: chalk125.blue("\u2139"),
|
9379
|
+
success: chalk125.green("\u2714"),
|
9380
|
+
warning: chalk125.yellow("\u26A0"),
|
9381
|
+
error: chalk125.red("\u2716")
|
9382
9382
|
};
|
9383
9383
|
var fallbacks = {
|
9384
|
-
info:
|
9385
|
-
success:
|
9386
|
-
warning:
|
9387
|
-
error:
|
9384
|
+
info: chalk125.blue("i"),
|
9385
|
+
success: chalk125.green("\u221A"),
|
9386
|
+
warning: chalk125.yellow("\u203C"),
|
9387
|
+
error: chalk125.red("\xD7")
|
9388
9388
|
};
|
9389
9389
|
module2.exports = isSupported ? main17 : fallbacks;
|
9390
9390
|
}
|
@@ -9780,7 +9780,7 @@ var require_wcwidth = __commonJS2({
|
|
9780
9780
|
var require_ora = __commonJS2({
|
9781
9781
|
"../../node_modules/.pnpm/ora@3.4.0/node_modules/ora/index.js"(exports2, module2) {
|
9782
9782
|
"use strict";
|
9783
|
-
var
|
9783
|
+
var chalk125 = require_chalk();
|
9784
9784
|
var cliCursor = require_cli_cursor();
|
9785
9785
|
var cliSpinners = require_cli_spinners();
|
9786
9786
|
var logSymbols = require_log_symbols();
|
@@ -9869,7 +9869,7 @@ var require_ora = __commonJS2({
|
|
9869
9869
|
const { frames } = this.spinner;
|
9870
9870
|
let frame = frames[this.frameIndex];
|
9871
9871
|
if (this.color) {
|
9872
|
-
frame =
|
9872
|
+
frame = chalk125[this.color](frame);
|
9873
9873
|
}
|
9874
9874
|
this.frameIndex = ++this.frameIndex % frames.length;
|
9875
9875
|
const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
|
@@ -14258,10 +14258,10 @@ var require_session = __commonJS2({
|
|
14258
14258
|
session.status = context.status;
|
14259
14259
|
}
|
14260
14260
|
}
|
14261
|
-
function closeSession(session,
|
14261
|
+
function closeSession(session, status3) {
|
14262
14262
|
let context = {};
|
14263
|
-
if (
|
14264
|
-
context = { status:
|
14263
|
+
if (status3) {
|
14264
|
+
context = { status: status3 };
|
14265
14265
|
} else if (session.status === "ok") {
|
14266
14266
|
context = { status: "exited" };
|
14267
14267
|
}
|
@@ -14302,13 +14302,13 @@ var require_spanUtils = __commonJS2({
|
|
14302
14302
|
var TRACE_FLAG_SAMPLED = 1;
|
14303
14303
|
function spanToTraceContext(span) {
|
14304
14304
|
const { spanId: span_id, traceId: trace_id } = span.spanContext();
|
14305
|
-
const { data, op, parent_span_id, status:
|
14305
|
+
const { data, op, parent_span_id, status: status3, tags, origin } = spanToJSON(span);
|
14306
14306
|
return utils.dropUndefinedKeys({
|
14307
14307
|
data,
|
14308
14308
|
op,
|
14309
14309
|
parent_span_id,
|
14310
14310
|
span_id,
|
14311
|
-
status:
|
14311
|
+
status: status3,
|
14312
14312
|
tags,
|
14313
14313
|
trace_id,
|
14314
14314
|
origin
|
@@ -14698,8 +14698,8 @@ var require_exports = __commonJS2({
|
|
14698
14698
|
function withMonitor(monitorSlug, callback, upsertMonitorConfig) {
|
14699
14699
|
const checkInId = captureCheckIn({ monitorSlug, status: "in_progress" }, upsertMonitorConfig);
|
14700
14700
|
const now = utils.timestampInSeconds();
|
14701
|
-
function finishCheckIn(
|
14702
|
-
captureCheckIn({ monitorSlug, status:
|
14701
|
+
function finishCheckIn(status3) {
|
14702
|
+
captureCheckIn({ monitorSlug, status: status3, checkInId, duration: utils.timestampInSeconds() - now });
|
14703
14703
|
}
|
14704
14704
|
let maybePromiseResult;
|
14705
14705
|
try {
|
@@ -16211,9 +16211,9 @@ var require_errors = __commonJS2({
|
|
16211
16211
|
function errorCallback() {
|
16212
16212
|
const activeTransaction = utils$1.getActiveTransaction();
|
16213
16213
|
if (activeTransaction) {
|
16214
|
-
const
|
16215
|
-
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Transaction: ${
|
16216
|
-
activeTransaction.setStatus(
|
16214
|
+
const status3 = "internal_error";
|
16215
|
+
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Transaction: ${status3} -> Global error occured`);
|
16216
|
+
activeTransaction.setStatus(status3);
|
16217
16217
|
}
|
16218
16218
|
}
|
16219
16219
|
errorCallback.tag = "sentry_tracingErrorCallback";
|
@@ -16426,8 +16426,8 @@ var require_trace = __commonJS2({
|
|
16426
16426
|
() => callback(activeSpan),
|
16427
16427
|
() => {
|
16428
16428
|
if (activeSpan) {
|
16429
|
-
const { status:
|
16430
|
-
if (!
|
16429
|
+
const { status: status3 } = spanUtils.spanToJSON(activeSpan);
|
16430
|
+
if (!status3 || status3 === "ok") {
|
16431
16431
|
activeSpan.setStatus("internal_error");
|
16432
16432
|
}
|
16433
16433
|
}
|
@@ -16458,8 +16458,8 @@ var require_trace = __commonJS2({
|
|
16458
16458
|
() => callback(activeSpan, finishAndSetSpan),
|
16459
16459
|
() => {
|
16460
16460
|
if (activeSpan && activeSpan.isRecording()) {
|
16461
|
-
const { status:
|
16462
|
-
if (!
|
16461
|
+
const { status: status3 } = spanUtils.spanToJSON(activeSpan);
|
16462
|
+
if (!status3 || status3 === "ok") {
|
16463
16463
|
activeSpan.setStatus("internal_error");
|
16464
16464
|
}
|
16465
16465
|
}
|
@@ -16930,8 +16930,8 @@ var require_span = __commonJS2({
|
|
16930
16930
|
*
|
16931
16931
|
* @deprecated Use `.setStatus()` instead to set or update the status.
|
16932
16932
|
*/
|
16933
|
-
set status(
|
16934
|
-
this._status =
|
16933
|
+
set status(status3) {
|
16934
|
+
this._status = status3;
|
16935
16935
|
}
|
16936
16936
|
/**
|
16937
16937
|
* Operation of the span
|
@@ -18102,14 +18102,14 @@ var require_sessionflusher = __commonJS2({
|
|
18102
18102
|
* Increments status bucket in pendingAggregates buffer (internal state) corresponding to status of
|
18103
18103
|
* the session received
|
18104
18104
|
*/
|
18105
|
-
_incrementSessionStatusCount(
|
18105
|
+
_incrementSessionStatusCount(status3, date) {
|
18106
18106
|
const sessionStartedTrunc = new Date(date).setSeconds(0, 0);
|
18107
18107
|
this._pendingAggregates[sessionStartedTrunc] = this._pendingAggregates[sessionStartedTrunc] || {};
|
18108
18108
|
const aggregationCounts = this._pendingAggregates[sessionStartedTrunc];
|
18109
18109
|
if (!aggregationCounts.started) {
|
18110
18110
|
aggregationCounts.started = new Date(sessionStartedTrunc).toISOString();
|
18111
18111
|
}
|
18112
|
-
switch (
|
18112
|
+
switch (status3) {
|
18113
18113
|
case "errored":
|
18114
18114
|
aggregationCounts.errored = (aggregationCounts.errored || 0) + 1;
|
18115
18115
|
return aggregationCounts.errored;
|
@@ -21906,9 +21906,9 @@ var require_backgroundtab = __commonJS2({
|
|
21906
21906
|
const activeTransaction = core.getActiveTransaction();
|
21907
21907
|
if (types.WINDOW.document.hidden && activeTransaction) {
|
21908
21908
|
const statusType = "cancelled";
|
21909
|
-
const { op, status:
|
21909
|
+
const { op, status: status3 } = core.spanToJSON(activeTransaction);
|
21910
21910
|
debugBuild.DEBUG_BUILD && utils.logger.log(`[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${op}`);
|
21911
|
-
if (!
|
21911
|
+
if (!status3) {
|
21912
21912
|
activeTransaction.setStatus(statusType);
|
21913
21913
|
}
|
21914
21914
|
activeTransaction.setTag("visibilitychange", "document.hidden");
|
@@ -25670,7 +25670,7 @@ var require_http3 = __commonJS2({
|
|
25670
25670
|
var require_common = __commonJS2({
|
25671
25671
|
"../../node_modules/.pnpm/@sentry+node@7.120.1/node_modules/@sentry/node/cjs/integrations/local-variables/common.js"(exports2) {
|
25672
25672
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
25673
|
-
function createRateLimiter(maxPerSecond,
|
25673
|
+
function createRateLimiter(maxPerSecond, enable3, disable3) {
|
25674
25674
|
let count = 0;
|
25675
25675
|
let retrySeconds = 5;
|
25676
25676
|
let disabledTimeout = 0;
|
@@ -25678,7 +25678,7 @@ var require_common = __commonJS2({
|
|
25678
25678
|
if (disabledTimeout === 0) {
|
25679
25679
|
if (count > maxPerSecond) {
|
25680
25680
|
retrySeconds *= 2;
|
25681
|
-
|
25681
|
+
disable3(retrySeconds);
|
25682
25682
|
if (retrySeconds > 86400) {
|
25683
25683
|
retrySeconds = 86400;
|
25684
25684
|
}
|
@@ -25687,7 +25687,7 @@ var require_common = __commonJS2({
|
|
25687
25687
|
} else {
|
25688
25688
|
disabledTimeout -= 1;
|
25689
25689
|
if (disabledTimeout === 0) {
|
25690
|
-
|
25690
|
+
enable3();
|
25691
25691
|
}
|
25692
25692
|
}
|
25693
25693
|
count = 0;
|
@@ -27242,8 +27242,8 @@ var require_handlers2 = __commonJS2({
|
|
27242
27242
|
return statusCode ? parseInt(statusCode, 10) : 500;
|
27243
27243
|
}
|
27244
27244
|
function defaultShouldHandleError(error3) {
|
27245
|
-
const
|
27246
|
-
return
|
27245
|
+
const status3 = getStatusCodeFromResponse(error3);
|
27246
|
+
return status3 >= 500;
|
27247
27247
|
}
|
27248
27248
|
function errorHandler(options) {
|
27249
27249
|
return function sentryErrorMiddleware(error3, _req, res, next) {
|
@@ -30442,12 +30442,12 @@ var require_httpclient = __commonJS2({
|
|
30442
30442
|
return givenRequestTarget.test(target);
|
30443
30443
|
});
|
30444
30444
|
}
|
30445
|
-
function _isInGivenStatusRanges(failedRequestStatusCodes,
|
30445
|
+
function _isInGivenStatusRanges(failedRequestStatusCodes, status3) {
|
30446
30446
|
return failedRequestStatusCodes.some((range) => {
|
30447
30447
|
if (typeof range === "number") {
|
30448
|
-
return range ===
|
30448
|
+
return range === status3;
|
30449
30449
|
}
|
30450
|
-
return
|
30450
|
+
return status3 >= range[0] && status3 <= range[1];
|
30451
30451
|
});
|
30452
30452
|
}
|
30453
30453
|
function _wrapFetch(client2, options) {
|
@@ -30487,8 +30487,8 @@ var require_httpclient = __commonJS2({
|
|
30487
30487
|
}
|
30488
30488
|
});
|
30489
30489
|
}
|
30490
|
-
function _shouldCaptureResponse(options,
|
30491
|
-
return _isInGivenStatusRanges(options.failedRequestStatusCodes,
|
30490
|
+
function _shouldCaptureResponse(options, status3, url3) {
|
30491
|
+
return _isInGivenStatusRanges(options.failedRequestStatusCodes, status3) && _isInGivenRequestTargets(options.failedRequestTargets, url3) && !core.isSentryRequestUrl(url3, core.getClient());
|
30492
30492
|
}
|
30493
30493
|
function _createEvent(data) {
|
30494
30494
|
const message2 = `HTTP Client Error with status code: ${data.status}`;
|
@@ -32629,9 +32629,50 @@ var init_command11 = __esm({
|
|
32629
32629
|
}
|
32630
32630
|
});
|
32631
32631
|
|
32632
|
+
// src/commands/guidance/command.ts
|
32633
|
+
var statusSubcommand, enableSubcommand, disableSubcommand, guidanceCommand;
|
32634
|
+
var init_command12 = __esm({
|
32635
|
+
"src/commands/guidance/command.ts"() {
|
32636
|
+
"use strict";
|
32637
|
+
statusSubcommand = {
|
32638
|
+
name: "status",
|
32639
|
+
aliases: [],
|
32640
|
+
description: "Shows whether guidance messages are enabled or disabled",
|
32641
|
+
arguments: [],
|
32642
|
+
options: [],
|
32643
|
+
examples: []
|
32644
|
+
};
|
32645
|
+
enableSubcommand = {
|
32646
|
+
name: "enable",
|
32647
|
+
aliases: [],
|
32648
|
+
description: "Enables guidance messages",
|
32649
|
+
arguments: [],
|
32650
|
+
options: [],
|
32651
|
+
examples: []
|
32652
|
+
};
|
32653
|
+
disableSubcommand = {
|
32654
|
+
name: "disable",
|
32655
|
+
aliases: [],
|
32656
|
+
description: "Disables guidance messages",
|
32657
|
+
arguments: [],
|
32658
|
+
options: [],
|
32659
|
+
examples: []
|
32660
|
+
};
|
32661
|
+
guidanceCommand = {
|
32662
|
+
name: "guidance",
|
32663
|
+
aliases: [],
|
32664
|
+
description: "Allows you to enable or disable guidance messages",
|
32665
|
+
arguments: [],
|
32666
|
+
subcommands: [enableSubcommand, disableSubcommand, statusSubcommand],
|
32667
|
+
options: [],
|
32668
|
+
examples: []
|
32669
|
+
};
|
32670
|
+
}
|
32671
|
+
});
|
32672
|
+
|
32632
32673
|
// src/commands/init/command.ts
|
32633
32674
|
var initCommand;
|
32634
|
-
var
|
32675
|
+
var init_command13 = __esm({
|
32635
32676
|
"src/commands/init/command.ts"() {
|
32636
32677
|
"use strict";
|
32637
32678
|
init_pkg_name();
|
@@ -32681,7 +32722,7 @@ var init_command12 = __esm({
|
|
32681
32722
|
|
32682
32723
|
// src/commands/inspect/command.ts
|
32683
32724
|
var inspectCommand;
|
32684
|
-
var
|
32725
|
+
var init_command14 = __esm({
|
32685
32726
|
"src/commands/inspect/command.ts"() {
|
32686
32727
|
"use strict";
|
32687
32728
|
init_pkg_name();
|
@@ -32747,7 +32788,7 @@ var init_command13 = __esm({
|
|
32747
32788
|
|
32748
32789
|
// src/commands/install/command.ts
|
32749
32790
|
var installCommand;
|
32750
|
-
var
|
32791
|
+
var init_command15 = __esm({
|
32751
32792
|
"src/commands/install/command.ts"() {
|
32752
32793
|
"use strict";
|
32753
32794
|
init_pkg_name();
|
@@ -32774,7 +32815,7 @@ var init_command14 = __esm({
|
|
32774
32815
|
|
32775
32816
|
// src/commands/integration-resource/command.ts
|
32776
32817
|
var removeSubcommand6, disconnectSubcommand2, createThresholdSubcommand, integrationResourceCommand;
|
32777
|
-
var
|
32818
|
+
var init_command16 = __esm({
|
32778
32819
|
"src/commands/integration-resource/command.ts"() {
|
32779
32820
|
"use strict";
|
32780
32821
|
init_arg_common();
|
@@ -32925,7 +32966,7 @@ var init_command15 = __esm({
|
|
32925
32966
|
|
32926
32967
|
// src/commands/integration/command.ts
|
32927
32968
|
var addSubcommand5, openSubcommand, listSubcommand6, balanceSubcommand, removeSubcommand7, integrationCommand;
|
32928
|
-
var
|
32969
|
+
var init_command17 = __esm({
|
32929
32970
|
"src/commands/integration/command.ts"() {
|
32930
32971
|
"use strict";
|
32931
32972
|
init_arg_common();
|
@@ -33087,7 +33128,7 @@ var init_command16 = __esm({
|
|
33087
33128
|
|
33088
33129
|
// src/commands/link/command.ts
|
33089
33130
|
var linkCommand;
|
33090
|
-
var
|
33131
|
+
var init_command18 = __esm({
|
33091
33132
|
"src/commands/link/command.ts"() {
|
33092
33133
|
"use strict";
|
33093
33134
|
init_pkg_name();
|
@@ -33143,7 +33184,7 @@ var init_command17 = __esm({
|
|
33143
33184
|
|
33144
33185
|
// src/commands/list/command.ts
|
33145
33186
|
var listCommand;
|
33146
|
-
var
|
33187
|
+
var init_command19 = __esm({
|
33147
33188
|
"src/commands/list/command.ts"() {
|
33148
33189
|
"use strict";
|
33149
33190
|
init_pkg_name();
|
@@ -33213,7 +33254,7 @@ var init_command18 = __esm({
|
|
33213
33254
|
|
33214
33255
|
// src/commands/login/command.ts
|
33215
33256
|
var loginCommand;
|
33216
|
-
var
|
33257
|
+
var init_command20 = __esm({
|
33217
33258
|
"src/commands/login/command.ts"() {
|
33218
33259
|
"use strict";
|
33219
33260
|
init_pkg_name();
|
@@ -33276,7 +33317,7 @@ var init_command19 = __esm({
|
|
33276
33317
|
|
33277
33318
|
// src/commands/logout/command.ts
|
33278
33319
|
var logoutCommand;
|
33279
|
-
var
|
33320
|
+
var init_command21 = __esm({
|
33280
33321
|
"src/commands/logout/command.ts"() {
|
33281
33322
|
"use strict";
|
33282
33323
|
init_pkg_name();
|
@@ -33306,7 +33347,7 @@ var init_command20 = __esm({
|
|
33306
33347
|
|
33307
33348
|
// src/commands/logs/command.ts
|
33308
33349
|
var CommandTimeout, logsCommand;
|
33309
|
-
var
|
33350
|
+
var init_command22 = __esm({
|
33310
33351
|
"src/commands/logs/command.ts"() {
|
33311
33352
|
"use strict";
|
33312
33353
|
init_pkg_name();
|
@@ -33380,7 +33421,7 @@ var init_command21 = __esm({
|
|
33380
33421
|
|
33381
33422
|
// src/commands/microfrontends/command.ts
|
33382
33423
|
var pullSubcommand2, microfrontendsCommand;
|
33383
|
-
var
|
33424
|
+
var init_command23 = __esm({
|
33384
33425
|
"src/commands/microfrontends/command.ts"() {
|
33385
33426
|
"use strict";
|
33386
33427
|
init_pkg_name();
|
@@ -33423,7 +33464,7 @@ var init_command22 = __esm({
|
|
33423
33464
|
|
33424
33465
|
// src/commands/project/command.ts
|
33425
33466
|
var addSubcommand6, inspectSubcommand2, listSubcommand7, removeSubcommand8, projectCommand;
|
33426
|
-
var
|
33467
|
+
var init_command24 = __esm({
|
33427
33468
|
"src/commands/project/command.ts"() {
|
33428
33469
|
"use strict";
|
33429
33470
|
init_pkg_name();
|
@@ -33522,13 +33563,13 @@ var init_command23 = __esm({
|
|
33522
33563
|
});
|
33523
33564
|
|
33524
33565
|
// src/commands/promote/command.ts
|
33525
|
-
var
|
33526
|
-
var
|
33566
|
+
var statusSubcommand2, promoteCommand;
|
33567
|
+
var init_command25 = __esm({
|
33527
33568
|
"src/commands/promote/command.ts"() {
|
33528
33569
|
"use strict";
|
33529
33570
|
init_pkg_name();
|
33530
33571
|
init_arg_common();
|
33531
|
-
|
33572
|
+
statusSubcommand2 = {
|
33532
33573
|
name: "status",
|
33533
33574
|
aliases: [],
|
33534
33575
|
description: "Show the status of any current pending promotions",
|
@@ -33565,7 +33606,7 @@ var init_command24 = __esm({
|
|
33565
33606
|
required: true
|
33566
33607
|
}
|
33567
33608
|
],
|
33568
|
-
subcommands: [
|
33609
|
+
subcommands: [statusSubcommand2],
|
33569
33610
|
options: [
|
33570
33611
|
{
|
33571
33612
|
name: "timeout",
|
@@ -33592,7 +33633,7 @@ var init_command24 = __esm({
|
|
33592
33633
|
|
33593
33634
|
// src/commands/pull/command.ts
|
33594
33635
|
var pullCommand;
|
33595
|
-
var
|
33636
|
+
var init_command26 = __esm({
|
33596
33637
|
"src/commands/pull/command.ts"() {
|
33597
33638
|
"use strict";
|
33598
33639
|
init_pkg_name();
|
@@ -33664,7 +33705,7 @@ var init_command25 = __esm({
|
|
33664
33705
|
|
33665
33706
|
// src/commands/redeploy/command.ts
|
33666
33707
|
var redeployCommand;
|
33667
|
-
var
|
33708
|
+
var init_command27 = __esm({
|
33668
33709
|
"src/commands/redeploy/command.ts"() {
|
33669
33710
|
"use strict";
|
33670
33711
|
init_pkg_name();
|
@@ -33715,7 +33756,7 @@ var init_command26 = __esm({
|
|
33715
33756
|
|
33716
33757
|
// src/commands/remove/command.ts
|
33717
33758
|
var removeCommand;
|
33718
|
-
var
|
33759
|
+
var init_command28 = __esm({
|
33719
33760
|
"src/commands/remove/command.ts"() {
|
33720
33761
|
"use strict";
|
33721
33762
|
init_pkg_name();
|
@@ -33764,13 +33805,13 @@ var init_command27 = __esm({
|
|
33764
33805
|
});
|
33765
33806
|
|
33766
33807
|
// src/commands/rollback/command.ts
|
33767
|
-
var
|
33768
|
-
var
|
33808
|
+
var statusSubcommand3, rollbackCommand;
|
33809
|
+
var init_command29 = __esm({
|
33769
33810
|
"src/commands/rollback/command.ts"() {
|
33770
33811
|
"use strict";
|
33771
33812
|
init_pkg_name();
|
33772
33813
|
init_arg_common();
|
33773
|
-
|
33814
|
+
statusSubcommand3 = {
|
33774
33815
|
name: "status",
|
33775
33816
|
aliases: [],
|
33776
33817
|
description: "Show the status of any current pending rollbacks",
|
@@ -33802,7 +33843,7 @@ var init_command28 = __esm({
|
|
33802
33843
|
required: true
|
33803
33844
|
}
|
33804
33845
|
],
|
33805
|
-
subcommands: [
|
33846
|
+
subcommands: [statusSubcommand3],
|
33806
33847
|
options: [
|
33807
33848
|
{
|
33808
33849
|
name: "timeout",
|
@@ -33826,7 +33867,7 @@ var init_command28 = __esm({
|
|
33826
33867
|
|
33827
33868
|
// src/commands/rolling-release/command.ts
|
33828
33869
|
var configureSubcommand, startSubcommand, approveSubcommand, abortSubcommand, completeSubcommand, fetchSubcommand, rollingReleaseCommand;
|
33829
|
-
var
|
33870
|
+
var init_command30 = __esm({
|
33830
33871
|
"src/commands/rolling-release/command.ts"() {
|
33831
33872
|
"use strict";
|
33832
33873
|
init_arg_common();
|
@@ -34020,7 +34061,7 @@ var init_command29 = __esm({
|
|
34020
34061
|
|
34021
34062
|
// src/commands/target/command.ts
|
34022
34063
|
var listSubcommand8, targetCommand;
|
34023
|
-
var
|
34064
|
+
var init_command31 = __esm({
|
34024
34065
|
"src/commands/target/command.ts"() {
|
34025
34066
|
"use strict";
|
34026
34067
|
init_pkg_name();
|
@@ -34051,7 +34092,7 @@ var init_command30 = __esm({
|
|
34051
34092
|
|
34052
34093
|
// src/commands/teams/command.ts
|
34053
34094
|
var addSubcommand7, listSubcommand9, switchSubcommand, inviteSubcommand, teamsCommand;
|
34054
|
-
var
|
34095
|
+
var init_command32 = __esm({
|
34055
34096
|
"src/commands/teams/command.ts"() {
|
34056
34097
|
"use strict";
|
34057
34098
|
init_pkg_name();
|
@@ -34141,11 +34182,11 @@ var init_command31 = __esm({
|
|
34141
34182
|
});
|
34142
34183
|
|
34143
34184
|
// src/commands/telemetry/command.ts
|
34144
|
-
var
|
34145
|
-
var
|
34185
|
+
var statusSubcommand4, enableSubcommand2, flushSubcommand, disableSubcommand2, telemetryCommand;
|
34186
|
+
var init_command33 = __esm({
|
34146
34187
|
"src/commands/telemetry/command.ts"() {
|
34147
34188
|
"use strict";
|
34148
|
-
|
34189
|
+
statusSubcommand4 = {
|
34149
34190
|
name: "status",
|
34150
34191
|
aliases: [],
|
34151
34192
|
description: "Shows whether telemetry collection is enabled or disabled",
|
@@ -34153,7 +34194,7 @@ var init_command32 = __esm({
|
|
34153
34194
|
options: [],
|
34154
34195
|
examples: []
|
34155
34196
|
};
|
34156
|
-
|
34197
|
+
enableSubcommand2 = {
|
34157
34198
|
name: "enable",
|
34158
34199
|
aliases: [],
|
34159
34200
|
description: "Enables telemetry collection",
|
@@ -34170,7 +34211,7 @@ var init_command32 = __esm({
|
|
34170
34211
|
options: [],
|
34171
34212
|
examples: []
|
34172
34213
|
};
|
34173
|
-
|
34214
|
+
disableSubcommand2 = {
|
34174
34215
|
name: "disable",
|
34175
34216
|
aliases: [],
|
34176
34217
|
description: "Disables telemetry collection",
|
@@ -34184,9 +34225,9 @@ var init_command32 = __esm({
|
|
34184
34225
|
description: "Allows you to enable or disable telemetry collection",
|
34185
34226
|
arguments: [],
|
34186
34227
|
subcommands: [
|
34187
|
-
|
34188
|
-
|
34189
|
-
|
34228
|
+
enableSubcommand2,
|
34229
|
+
disableSubcommand2,
|
34230
|
+
statusSubcommand4,
|
34190
34231
|
flushSubcommand
|
34191
34232
|
],
|
34192
34233
|
options: [],
|
@@ -34197,7 +34238,7 @@ var init_command32 = __esm({
|
|
34197
34238
|
|
34198
34239
|
// src/commands/whoami/command.ts
|
34199
34240
|
var whoamiCommand;
|
34200
|
-
var
|
34241
|
+
var init_command34 = __esm({
|
34201
34242
|
"src/commands/whoami/command.ts"() {
|
34202
34243
|
"use strict";
|
34203
34244
|
init_pkg_name();
|
@@ -34219,7 +34260,7 @@ var init_command33 = __esm({
|
|
34219
34260
|
|
34220
34261
|
// src/commands/blob/command.ts
|
34221
34262
|
var listSubcommand10, putSubcommand, delSubcommand, copySubcommand, addStoreSubcommand, removeStoreSubcommand, getStoreSubcommand, storeSubcommand, blobCommand;
|
34222
|
-
var
|
34263
|
+
var init_command35 = __esm({
|
34223
34264
|
"src/commands/blob/command.ts"() {
|
34224
34265
|
"use strict";
|
34225
34266
|
listSubcommand10 = {
|
@@ -34498,6 +34539,7 @@ var init_commands = __esm({
|
|
34498
34539
|
init_command32();
|
34499
34540
|
init_command33();
|
34500
34541
|
init_command34();
|
34542
|
+
init_command35();
|
34501
34543
|
init_output_manager();
|
34502
34544
|
commandsStructs = [
|
34503
34545
|
aliasCommand,
|
@@ -34537,6 +34579,9 @@ var init_commands = __esm({
|
|
34537
34579
|
// added because we don't have a full help command
|
34538
34580
|
{ name: "help", aliases: [] }
|
34539
34581
|
];
|
34582
|
+
if (process.env.FF_GUIDANCE_MODE) {
|
34583
|
+
commandsStructs.push(guidanceCommand);
|
34584
|
+
}
|
34540
34585
|
commands = /* @__PURE__ */ new Map();
|
34541
34586
|
for (const command of commandsStructs) {
|
34542
34587
|
const aliases = getCommandAliases(command);
|
@@ -35846,14 +35891,14 @@ var require_templates3 = __commonJS2({
|
|
35846
35891
|
}
|
35847
35892
|
return results;
|
35848
35893
|
}
|
35849
|
-
function buildStyle(
|
35894
|
+
function buildStyle(chalk125, styles) {
|
35850
35895
|
const enabled = {};
|
35851
35896
|
for (const layer of styles) {
|
35852
35897
|
for (const style of layer.styles) {
|
35853
35898
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
35854
35899
|
}
|
35855
35900
|
}
|
35856
|
-
let current =
|
35901
|
+
let current = chalk125;
|
35857
35902
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
35858
35903
|
if (!Array.isArray(styles2)) {
|
35859
35904
|
continue;
|
@@ -35865,7 +35910,7 @@ var require_templates3 = __commonJS2({
|
|
35865
35910
|
}
|
35866
35911
|
return current;
|
35867
35912
|
}
|
35868
|
-
module2.exports = (
|
35913
|
+
module2.exports = (chalk125, temporary) => {
|
35869
35914
|
const styles = [];
|
35870
35915
|
const chunks = [];
|
35871
35916
|
let chunk = [];
|
@@ -35875,13 +35920,13 @@ var require_templates3 = __commonJS2({
|
|
35875
35920
|
} else if (style) {
|
35876
35921
|
const string = chunk.join("");
|
35877
35922
|
chunk = [];
|
35878
|
-
chunks.push(styles.length === 0 ? string : buildStyle(
|
35923
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk125, styles)(string));
|
35879
35924
|
styles.push({ inverse, styles: parseStyle(style) });
|
35880
35925
|
} else if (close2) {
|
35881
35926
|
if (styles.length === 0) {
|
35882
35927
|
throw new Error("Found extraneous } in Chalk template literal");
|
35883
35928
|
}
|
35884
|
-
chunks.push(buildStyle(
|
35929
|
+
chunks.push(buildStyle(chalk125, styles)(chunk.join("")));
|
35885
35930
|
chunk = [];
|
35886
35931
|
styles.pop();
|
35887
35932
|
} else {
|
@@ -35929,16 +35974,16 @@ var require_source2 = __commonJS2({
|
|
35929
35974
|
}
|
35930
35975
|
};
|
35931
35976
|
var chalkFactory = (options) => {
|
35932
|
-
const
|
35933
|
-
applyOptions(
|
35934
|
-
|
35935
|
-
Object.setPrototypeOf(
|
35936
|
-
Object.setPrototypeOf(
|
35937
|
-
|
35977
|
+
const chalk126 = {};
|
35978
|
+
applyOptions(chalk126, options);
|
35979
|
+
chalk126.template = (...arguments_) => chalkTag(chalk126.template, ...arguments_);
|
35980
|
+
Object.setPrototypeOf(chalk126, Chalk.prototype);
|
35981
|
+
Object.setPrototypeOf(chalk126.template, chalk126);
|
35982
|
+
chalk126.template.constructor = () => {
|
35938
35983
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
35939
35984
|
};
|
35940
|
-
|
35941
|
-
return
|
35985
|
+
chalk126.template.Instance = ChalkClass;
|
35986
|
+
return chalk126.template;
|
35942
35987
|
};
|
35943
35988
|
function Chalk(options) {
|
35944
35989
|
return chalkFactory(options);
|
@@ -36049,7 +36094,7 @@ var require_source2 = __commonJS2({
|
|
36049
36094
|
return openAll + string + closeAll;
|
36050
36095
|
};
|
36051
36096
|
var template;
|
36052
|
-
var chalkTag = (
|
36097
|
+
var chalkTag = (chalk126, ...strings) => {
|
36053
36098
|
const [firstString] = strings;
|
36054
36099
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
36055
36100
|
return strings.join(" ");
|
@@ -36065,14 +36110,14 @@ var require_source2 = __commonJS2({
|
|
36065
36110
|
if (template === void 0) {
|
36066
36111
|
template = require_templates3();
|
36067
36112
|
}
|
36068
|
-
return template(
|
36113
|
+
return template(chalk126, parts.join(""));
|
36069
36114
|
};
|
36070
36115
|
Object.defineProperties(Chalk.prototype, styles);
|
36071
|
-
var
|
36072
|
-
|
36073
|
-
|
36074
|
-
|
36075
|
-
module2.exports =
|
36116
|
+
var chalk125 = Chalk();
|
36117
|
+
chalk125.supportsColor = stdoutColor;
|
36118
|
+
chalk125.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
36119
|
+
chalk125.stderr.supportsColor = stderrColor;
|
36120
|
+
module2.exports = chalk125;
|
36076
36121
|
}
|
36077
36122
|
});
|
36078
36123
|
|
@@ -37728,7 +37773,7 @@ var init_esm4 = __esm({
|
|
37728
37773
|
const { instructions, pageSize = 7, loop = true, choices, required, validate: validate2 = () => true } = config2;
|
37729
37774
|
const theme = makeTheme(checkboxTheme, config2.theme);
|
37730
37775
|
const prefix = usePrefix({ theme });
|
37731
|
-
const [
|
37776
|
+
const [status3, setStatus] = useState("pending");
|
37732
37777
|
const [items, setItems] = useState(choices.map((choice) => ({ ...choice })));
|
37733
37778
|
const bounds = useMemo(() => {
|
37734
37779
|
const first = items.findIndex(isSelectable);
|
@@ -37802,7 +37847,7 @@ var init_esm4 = __esm({
|
|
37802
37847
|
loop,
|
37803
37848
|
theme
|
37804
37849
|
});
|
37805
|
-
if (
|
37850
|
+
if (status3 === "done") {
|
37806
37851
|
const selection = items.filter(isChecked);
|
37807
37852
|
const answer = theme.style.answer(theme.style.renderSelectedChoices(selection, items));
|
37808
37853
|
return `${prefix} ${message2} ${answer}`;
|
@@ -37839,7 +37884,7 @@ var init_esm5 = __esm({
|
|
37839
37884
|
init_esm3();
|
37840
37885
|
esm_default3 = createPrompt((config2, done) => {
|
37841
37886
|
const { transformer = (answer) => answer ? "yes" : "no" } = config2;
|
37842
|
-
const [
|
37887
|
+
const [status3, setStatus] = useState("pending");
|
37843
37888
|
const [value, setValue] = useState("");
|
37844
37889
|
const theme = makeTheme(config2.theme);
|
37845
37890
|
const prefix = usePrefix({ theme });
|
@@ -37859,7 +37904,7 @@ var init_esm5 = __esm({
|
|
37859
37904
|
});
|
37860
37905
|
let formattedValue = value;
|
37861
37906
|
let defaultValue = "";
|
37862
|
-
if (
|
37907
|
+
if (status3 === "done") {
|
37863
37908
|
formattedValue = theme.style.answer(value);
|
37864
37909
|
} else {
|
37865
37910
|
defaultValue = ` ${theme.style.defaultAnswer(config2.default === false ? "y/N" : "Y/n")}`;
|
@@ -37893,7 +37938,7 @@ var init_esm6 = __esm({
|
|
37893
37938
|
};
|
37894
37939
|
esm_default4 = createPrompt((config2, done) => {
|
37895
37940
|
const { choices, default: defaultKey = "h", expanded: defaultExpandState = false } = config2;
|
37896
|
-
const [
|
37941
|
+
const [status3, setStatus] = useState("pending");
|
37897
37942
|
const [value, setValue] = useState("");
|
37898
37943
|
const [expanded, setExpanded] = useState(defaultExpandState);
|
37899
37944
|
const [errorMsg, setError] = useState(void 0);
|
@@ -37923,7 +37968,7 @@ var init_esm6 = __esm({
|
|
37923
37968
|
}
|
37924
37969
|
});
|
37925
37970
|
const message2 = theme.style.message(config2.message);
|
37926
|
-
if (
|
37971
|
+
if (status3 === "done") {
|
37927
37972
|
return `${prefix} ${message2} ${theme.style.answer(value)}`;
|
37928
37973
|
}
|
37929
37974
|
const allChoices = expanded ? choices : [...choices, helpChoice];
|
@@ -37970,14 +38015,14 @@ var init_esm7 = __esm({
|
|
37970
38015
|
esm_default5 = createPrompt((config2, done) => {
|
37971
38016
|
const { validate: validate2 = () => true } = config2;
|
37972
38017
|
const theme = makeTheme(config2.theme);
|
37973
|
-
const [
|
38018
|
+
const [status3, setStatus] = useState("pending");
|
37974
38019
|
const [defaultValue = "", setDefaultValue] = useState(config2.default);
|
37975
38020
|
const [errorMsg, setError] = useState(void 0);
|
37976
38021
|
const [value, setValue] = useState("");
|
37977
|
-
const isLoading =
|
38022
|
+
const isLoading = status3 === "loading";
|
37978
38023
|
const prefix = usePrefix({ isLoading, theme });
|
37979
38024
|
useKeypress(async (key, rl) => {
|
37980
|
-
if (
|
38025
|
+
if (status3 !== "pending") {
|
37981
38026
|
return;
|
37982
38027
|
}
|
37983
38028
|
if (isEnterKey(key)) {
|
@@ -38008,12 +38053,12 @@ var init_esm7 = __esm({
|
|
38008
38053
|
const message2 = theme.style.message(config2.message);
|
38009
38054
|
let formattedValue = value;
|
38010
38055
|
if (typeof config2.transformer === "function") {
|
38011
|
-
formattedValue = config2.transformer(value, { isFinal:
|
38012
|
-
} else if (
|
38056
|
+
formattedValue = config2.transformer(value, { isFinal: status3 === "done" });
|
38057
|
+
} else if (status3 === "done") {
|
38013
38058
|
formattedValue = theme.style.answer(value);
|
38014
38059
|
}
|
38015
38060
|
let defaultStr;
|
38016
|
-
if (defaultValue &&
|
38061
|
+
if (defaultValue && status3 !== "done" && !value) {
|
38017
38062
|
defaultStr = theme.style.defaultAnswer(defaultValue);
|
38018
38063
|
}
|
38019
38064
|
let error3 = "";
|
@@ -38048,7 +38093,7 @@ var init_esm8 = __esm({
|
|
38048
38093
|
const firstRender = useRef(true);
|
38049
38094
|
const theme = makeTheme(selectTheme, config2.theme);
|
38050
38095
|
const prefix = usePrefix({ theme });
|
38051
|
-
const [
|
38096
|
+
const [status3, setStatus] = useState("pending");
|
38052
38097
|
const searchTimeoutRef = useRef(void 0);
|
38053
38098
|
const bounds = useMemo(() => {
|
38054
38099
|
const first = items.findIndex(isSelectable2);
|
@@ -38129,7 +38174,7 @@ var init_esm8 = __esm({
|
|
38129
38174
|
loop,
|
38130
38175
|
theme
|
38131
38176
|
});
|
38132
|
-
if (
|
38177
|
+
if (status3 === "done") {
|
38133
38178
|
const answer = selectedChoice.name || // TODO: Could we enforce that at the type level? Name should be defined for non-string values.
|
38134
38179
|
String(selectedChoice.value);
|
38135
38180
|
return `${prefix} ${message2} ${theme.style.answer(answer)}`;
|
@@ -38614,8 +38659,8 @@ var require_tr46 = __commonJS2({
|
|
38614
38659
|
var len = countSymbols(domain_name);
|
38615
38660
|
for (var i = 0; i < len; ++i) {
|
38616
38661
|
var codePoint = domain_name.codePointAt(i);
|
38617
|
-
var
|
38618
|
-
switch (
|
38662
|
+
var status3 = findStatus(codePoint);
|
38663
|
+
switch (status3[1]) {
|
38619
38664
|
case "disallowed":
|
38620
38665
|
hasError = true;
|
38621
38666
|
processed += String.fromCodePoint(codePoint);
|
@@ -38623,11 +38668,11 @@ var require_tr46 = __commonJS2({
|
|
38623
38668
|
case "ignored":
|
38624
38669
|
break;
|
38625
38670
|
case "mapped":
|
38626
|
-
processed += String.fromCodePoint.apply(String,
|
38671
|
+
processed += String.fromCodePoint.apply(String, status3[2]);
|
38627
38672
|
break;
|
38628
38673
|
case "deviation":
|
38629
38674
|
if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {
|
38630
|
-
processed += String.fromCodePoint.apply(String,
|
38675
|
+
processed += String.fromCodePoint.apply(String, status3[2]);
|
38631
38676
|
} else {
|
38632
38677
|
processed += String.fromCodePoint(codePoint);
|
38633
38678
|
}
|
@@ -38640,7 +38685,7 @@ var require_tr46 = __commonJS2({
|
|
38640
38685
|
hasError = true;
|
38641
38686
|
processed += String.fromCodePoint(codePoint);
|
38642
38687
|
} else {
|
38643
|
-
processed += String.fromCodePoint.apply(String,
|
38688
|
+
processed += String.fromCodePoint.apply(String, status3[2]);
|
38644
38689
|
}
|
38645
38690
|
break;
|
38646
38691
|
case "disallowed_STD3_valid":
|
@@ -38668,8 +38713,8 @@ var require_tr46 = __commonJS2({
|
|
38668
38713
|
}
|
38669
38714
|
var len = countSymbols(label);
|
38670
38715
|
for (var i = 0; i < len; ++i) {
|
38671
|
-
var
|
38672
|
-
if (processing === PROCESSING_OPTIONS.TRANSITIONAL &&
|
38716
|
+
var status3 = findStatus(label.codePointAt(i));
|
38717
|
+
if (processing === PROCESSING_OPTIONS.TRANSITIONAL && status3[1] !== "valid" || processing === PROCESSING_OPTIONS.NONTRANSITIONAL && status3[1] !== "valid" && status3[1] !== "deviation") {
|
38673
38718
|
error3 = true;
|
38674
38719
|
break;
|
38675
38720
|
}
|
@@ -40922,7 +40967,7 @@ var require_lib7 = __commonJS2({
|
|
40922
40967
|
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
40923
40968
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
40924
40969
|
Body.call(this, body, opts);
|
40925
|
-
const
|
40970
|
+
const status3 = opts.status || 200;
|
40926
40971
|
const headers = new Headers6(opts.headers);
|
40927
40972
|
if (body != null && !headers.has("Content-Type")) {
|
40928
40973
|
const contentType2 = extractContentType(body);
|
@@ -40932,8 +40977,8 @@ var require_lib7 = __commonJS2({
|
|
40932
40977
|
}
|
40933
40978
|
this[INTERNALS$1] = {
|
40934
40979
|
url: opts.url,
|
40935
|
-
status:
|
40936
|
-
statusText: opts.statusText || STATUS_CODES[
|
40980
|
+
status: status3,
|
40981
|
+
statusText: opts.statusText || STATUS_CODES[status3],
|
40937
40982
|
headers,
|
40938
40983
|
counter: opts.counter
|
40939
40984
|
};
|
@@ -61394,22 +61439,22 @@ function printError(error3) {
|
|
61394
61439
|
error3 = new Error(error3);
|
61395
61440
|
}
|
61396
61441
|
const apiError = error3;
|
61397
|
-
const { message: message2, stack: stack2, status:
|
61442
|
+
const { message: message2, stack: stack2, status: status3, code: code2, sizeLimit } = apiError;
|
61398
61443
|
output_manager_default.debug(`handling error: ${stack2}`);
|
61399
61444
|
if (message2 === "User force closed the prompt with 0 null") {
|
61400
61445
|
return;
|
61401
61446
|
}
|
61402
|
-
if (
|
61447
|
+
if (status3 === 403) {
|
61403
61448
|
output_manager_default.error(
|
61404
61449
|
message2 || `Authentication error. Run ${getCommandName("login")} to log-in again.`
|
61405
61450
|
);
|
61406
|
-
} else if (
|
61451
|
+
} else if (status3 === 429) {
|
61407
61452
|
output_manager_default.error(message2);
|
61408
61453
|
} else if (code2 === "size_limit_exceeded") {
|
61409
61454
|
output_manager_default.error(`File size limit exceeded (${(0, import_bytes2.default)(sizeLimit)})`);
|
61410
61455
|
} else if (message2) {
|
61411
61456
|
output_manager_default.prettyError(apiError);
|
61412
|
-
} else if (
|
61457
|
+
} else if (status3 === 500) {
|
61413
61458
|
output_manager_default.error("Unexpected server error. Please retry.");
|
61414
61459
|
} else if (code2 === "USER_ABORT") {
|
61415
61460
|
output_manager_default.log("Canceled");
|
@@ -61872,12 +61917,12 @@ var require_lru_cache = __commonJS2({
|
|
61872
61917
|
this.updateItemAge = (index) => {
|
61873
61918
|
this.starts[index] = this.ttls[index] !== 0 ? perf.now() : 0;
|
61874
61919
|
};
|
61875
|
-
this.statusTTL = (
|
61876
|
-
if (
|
61877
|
-
|
61878
|
-
|
61879
|
-
|
61880
|
-
|
61920
|
+
this.statusTTL = (status3, index) => {
|
61921
|
+
if (status3) {
|
61922
|
+
status3.ttl = this.ttls[index];
|
61923
|
+
status3.start = this.starts[index];
|
61924
|
+
status3.now = cachedNow || getNow();
|
61925
|
+
status3.remainingTTL = status3.now + status3.ttl - status3.start;
|
61881
61926
|
}
|
61882
61927
|
};
|
61883
61928
|
let cachedNow = 0;
|
@@ -61945,7 +61990,7 @@ var require_lru_cache = __commonJS2({
|
|
61945
61990
|
}
|
61946
61991
|
return size;
|
61947
61992
|
};
|
61948
|
-
this.addItemSize = (index, size,
|
61993
|
+
this.addItemSize = (index, size, status3) => {
|
61949
61994
|
this.sizes[index] = size;
|
61950
61995
|
if (this.maxSize) {
|
61951
61996
|
const maxSize = this.maxSize - this.sizes[index];
|
@@ -61954,9 +61999,9 @@ var require_lru_cache = __commonJS2({
|
|
61954
61999
|
}
|
61955
62000
|
}
|
61956
62001
|
this.calculatedSize += this.sizes[index];
|
61957
|
-
if (
|
61958
|
-
|
61959
|
-
|
62002
|
+
if (status3) {
|
62003
|
+
status3.entrySize = size;
|
62004
|
+
status3.totalCalculatedSize = this.calculatedSize;
|
61960
62005
|
}
|
61961
62006
|
};
|
61962
62007
|
}
|
@@ -62136,13 +62181,13 @@ var require_lru_cache = __commonJS2({
|
|
62136
62181
|
size = 0,
|
62137
62182
|
sizeCalculation = this.sizeCalculation,
|
62138
62183
|
noUpdateTTL = this.noUpdateTTL,
|
62139
|
-
status:
|
62184
|
+
status: status3
|
62140
62185
|
} = {}) {
|
62141
62186
|
size = this.requireSize(k, v, size, sizeCalculation);
|
62142
62187
|
if (this.maxEntrySize && size > this.maxEntrySize) {
|
62143
|
-
if (
|
62144
|
-
|
62145
|
-
|
62188
|
+
if (status3) {
|
62189
|
+
status3.set = "miss";
|
62190
|
+
status3.maxEntrySizeExceeded = true;
|
62146
62191
|
}
|
62147
62192
|
this.delete(k);
|
62148
62193
|
return this;
|
@@ -62157,9 +62202,9 @@ var require_lru_cache = __commonJS2({
|
|
62157
62202
|
this.prev[index] = this.tail;
|
62158
62203
|
this.tail = index;
|
62159
62204
|
this.size++;
|
62160
|
-
this.addItemSize(index, size,
|
62161
|
-
if (
|
62162
|
-
|
62205
|
+
this.addItemSize(index, size, status3);
|
62206
|
+
if (status3) {
|
62207
|
+
status3.set = "add";
|
62163
62208
|
}
|
62164
62209
|
noUpdateTTL = false;
|
62165
62210
|
} else {
|
@@ -62178,15 +62223,15 @@ var require_lru_cache = __commonJS2({
|
|
62178
62223
|
}
|
62179
62224
|
this.removeItemSize(index);
|
62180
62225
|
this.valList[index] = v;
|
62181
|
-
this.addItemSize(index, size,
|
62182
|
-
if (
|
62183
|
-
|
62226
|
+
this.addItemSize(index, size, status3);
|
62227
|
+
if (status3) {
|
62228
|
+
status3.set = "replace";
|
62184
62229
|
const oldValue = oldVal && this.isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
62185
62230
|
if (oldValue !== void 0)
|
62186
|
-
|
62231
|
+
status3.oldValue = oldValue;
|
62187
62232
|
}
|
62188
|
-
} else if (
|
62189
|
-
|
62233
|
+
} else if (status3) {
|
62234
|
+
status3.set = "update";
|
62190
62235
|
}
|
62191
62236
|
}
|
62192
62237
|
if (ttl !== 0 && this.ttl === 0 && !this.ttls) {
|
@@ -62195,7 +62240,7 @@ var require_lru_cache = __commonJS2({
|
|
62195
62240
|
if (!noUpdateTTL) {
|
62196
62241
|
this.setItemTTL(index, ttl, start);
|
62197
62242
|
}
|
62198
|
-
this.statusTTL(
|
62243
|
+
this.statusTTL(status3, index);
|
62199
62244
|
if (this.disposeAfter) {
|
62200
62245
|
while (this.disposed.length) {
|
62201
62246
|
this.disposeAfter(...this.disposed.shift());
|
@@ -62245,23 +62290,23 @@ var require_lru_cache = __commonJS2({
|
|
62245
62290
|
this.size--;
|
62246
62291
|
return head;
|
62247
62292
|
}
|
62248
|
-
has(k, { updateAgeOnHas = this.updateAgeOnHas, status:
|
62293
|
+
has(k, { updateAgeOnHas = this.updateAgeOnHas, status: status3 } = {}) {
|
62249
62294
|
const index = this.keyMap.get(k);
|
62250
62295
|
if (index !== void 0) {
|
62251
62296
|
if (!this.isStale(index)) {
|
62252
62297
|
if (updateAgeOnHas) {
|
62253
62298
|
this.updateItemAge(index);
|
62254
62299
|
}
|
62255
|
-
if (
|
62256
|
-
|
62257
|
-
this.statusTTL(
|
62300
|
+
if (status3)
|
62301
|
+
status3.has = "hit";
|
62302
|
+
this.statusTTL(status3, index);
|
62258
62303
|
return true;
|
62259
|
-
} else if (
|
62260
|
-
|
62261
|
-
this.statusTTL(
|
62304
|
+
} else if (status3) {
|
62305
|
+
status3.has = "stale";
|
62306
|
+
this.statusTTL(status3, index);
|
62262
62307
|
}
|
62263
|
-
} else if (
|
62264
|
-
|
62308
|
+
} else if (status3) {
|
62309
|
+
status3.has = "miss";
|
62265
62310
|
}
|
62266
62311
|
return false;
|
62267
62312
|
}
|
@@ -62400,17 +62445,17 @@ var require_lru_cache = __commonJS2({
|
|
62400
62445
|
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
62401
62446
|
fetchContext = this.fetchContext,
|
62402
62447
|
forceRefresh = false,
|
62403
|
-
status:
|
62448
|
+
status: status3,
|
62404
62449
|
signal
|
62405
62450
|
} = {}) {
|
62406
62451
|
if (!this.fetchMethod) {
|
62407
|
-
if (
|
62408
|
-
|
62452
|
+
if (status3)
|
62453
|
+
status3.fetch = "get";
|
62409
62454
|
return this.get(k, {
|
62410
62455
|
allowStale,
|
62411
62456
|
updateAgeOnGet,
|
62412
62457
|
noDeleteOnStaleGet,
|
62413
|
-
status:
|
62458
|
+
status: status3
|
62414
62459
|
});
|
62415
62460
|
}
|
62416
62461
|
const options = {
|
@@ -62426,44 +62471,44 @@ var require_lru_cache = __commonJS2({
|
|
62426
62471
|
allowStaleOnFetchRejection,
|
62427
62472
|
allowStaleOnFetchAbort,
|
62428
62473
|
ignoreFetchAbort,
|
62429
|
-
status:
|
62474
|
+
status: status3,
|
62430
62475
|
signal
|
62431
62476
|
};
|
62432
62477
|
let index = this.keyMap.get(k);
|
62433
62478
|
if (index === void 0) {
|
62434
|
-
if (
|
62435
|
-
|
62479
|
+
if (status3)
|
62480
|
+
status3.fetch = "miss";
|
62436
62481
|
const p = this.backgroundFetch(k, index, options, fetchContext);
|
62437
62482
|
return p.__returned = p;
|
62438
62483
|
} else {
|
62439
62484
|
const v = this.valList[index];
|
62440
62485
|
if (this.isBackgroundFetch(v)) {
|
62441
62486
|
const stale = allowStale && v.__staleWhileFetching !== void 0;
|
62442
|
-
if (
|
62443
|
-
|
62487
|
+
if (status3) {
|
62488
|
+
status3.fetch = "inflight";
|
62444
62489
|
if (stale)
|
62445
|
-
|
62490
|
+
status3.returnedStale = true;
|
62446
62491
|
}
|
62447
62492
|
return stale ? v.__staleWhileFetching : v.__returned = v;
|
62448
62493
|
}
|
62449
62494
|
const isStale = this.isStale(index);
|
62450
62495
|
if (!forceRefresh && !isStale) {
|
62451
|
-
if (
|
62452
|
-
|
62496
|
+
if (status3)
|
62497
|
+
status3.fetch = "hit";
|
62453
62498
|
this.moveToTail(index);
|
62454
62499
|
if (updateAgeOnGet) {
|
62455
62500
|
this.updateItemAge(index);
|
62456
62501
|
}
|
62457
|
-
this.statusTTL(
|
62502
|
+
this.statusTTL(status3, index);
|
62458
62503
|
return v;
|
62459
62504
|
}
|
62460
62505
|
const p = this.backgroundFetch(k, index, options, fetchContext);
|
62461
62506
|
const hasStale = p.__staleWhileFetching !== void 0;
|
62462
62507
|
const staleVal = hasStale && allowStale;
|
62463
|
-
if (
|
62464
|
-
|
62508
|
+
if (status3) {
|
62509
|
+
status3.fetch = hasStale && isStale ? "stale" : "refresh";
|
62465
62510
|
if (staleVal && isStale)
|
62466
|
-
|
62511
|
+
status3.returnedStale = true;
|
62467
62512
|
}
|
62468
62513
|
return staleVal ? p.__staleWhileFetching : p.__returned = p;
|
62469
62514
|
}
|
@@ -62472,32 +62517,32 @@ var require_lru_cache = __commonJS2({
|
|
62472
62517
|
allowStale = this.allowStale,
|
62473
62518
|
updateAgeOnGet = this.updateAgeOnGet,
|
62474
62519
|
noDeleteOnStaleGet = this.noDeleteOnStaleGet,
|
62475
|
-
status:
|
62520
|
+
status: status3
|
62476
62521
|
} = {}) {
|
62477
62522
|
const index = this.keyMap.get(k);
|
62478
62523
|
if (index !== void 0) {
|
62479
62524
|
const value = this.valList[index];
|
62480
62525
|
const fetching = this.isBackgroundFetch(value);
|
62481
|
-
this.statusTTL(
|
62526
|
+
this.statusTTL(status3, index);
|
62482
62527
|
if (this.isStale(index)) {
|
62483
|
-
if (
|
62484
|
-
|
62528
|
+
if (status3)
|
62529
|
+
status3.get = "stale";
|
62485
62530
|
if (!fetching) {
|
62486
62531
|
if (!noDeleteOnStaleGet) {
|
62487
62532
|
this.delete(k);
|
62488
62533
|
}
|
62489
|
-
if (
|
62490
|
-
|
62534
|
+
if (status3)
|
62535
|
+
status3.returnedStale = allowStale;
|
62491
62536
|
return allowStale ? value : void 0;
|
62492
62537
|
} else {
|
62493
|
-
if (
|
62494
|
-
|
62538
|
+
if (status3) {
|
62539
|
+
status3.returnedStale = allowStale && value.__staleWhileFetching !== void 0;
|
62495
62540
|
}
|
62496
62541
|
return allowStale ? value.__staleWhileFetching : void 0;
|
62497
62542
|
}
|
62498
62543
|
} else {
|
62499
|
-
if (
|
62500
|
-
|
62544
|
+
if (status3)
|
62545
|
+
status3.get = "hit";
|
62501
62546
|
if (fetching) {
|
62502
62547
|
return value.__staleWhileFetching;
|
62503
62548
|
}
|
@@ -62507,8 +62552,8 @@ var require_lru_cache = __commonJS2({
|
|
62507
62552
|
}
|
62508
62553
|
return value;
|
62509
62554
|
}
|
62510
|
-
} else if (
|
62511
|
-
|
62555
|
+
} else if (status3) {
|
62556
|
+
status3.get = "miss";
|
62512
62557
|
}
|
62513
62558
|
}
|
62514
62559
|
connect(p, n) {
|
@@ -62987,8 +63032,8 @@ var require_common5 = __commonJS2({
|
|
62987
63032
|
createDebug.debug = createDebug;
|
62988
63033
|
createDebug.default = createDebug;
|
62989
63034
|
createDebug.coerce = coerce;
|
62990
|
-
createDebug.disable =
|
62991
|
-
createDebug.enable =
|
63035
|
+
createDebug.disable = disable3;
|
63036
|
+
createDebug.enable = enable3;
|
62992
63037
|
createDebug.enabled = enabled;
|
62993
63038
|
createDebug.humanize = require_ms2();
|
62994
63039
|
createDebug.destroy = destroy;
|
@@ -63078,7 +63123,7 @@ var require_common5 = __commonJS2({
|
|
63078
63123
|
newDebug.log = this.log;
|
63079
63124
|
return newDebug;
|
63080
63125
|
}
|
63081
|
-
function
|
63126
|
+
function enable3(namespaces) {
|
63082
63127
|
createDebug.save(namespaces);
|
63083
63128
|
createDebug.namespaces = namespaces;
|
63084
63129
|
createDebug.names = [];
|
@@ -63120,7 +63165,7 @@ var require_common5 = __commonJS2({
|
|
63120
63165
|
}
|
63121
63166
|
return templateIndex === template.length;
|
63122
63167
|
}
|
63123
|
-
function
|
63168
|
+
function disable3() {
|
63124
63169
|
const namespaces = [
|
63125
63170
|
...createDebug.names,
|
63126
63171
|
...createDebug.skips.map((namespace) => "-" + namespace)
|
@@ -91575,14 +91620,14 @@ var require_enoent = __commonJS2({
|
|
91575
91620
|
return originalEmit.apply(cp, arguments);
|
91576
91621
|
};
|
91577
91622
|
}
|
91578
|
-
function verifyENOENT(
|
91579
|
-
if (isWin &&
|
91623
|
+
function verifyENOENT(status3, parsed) {
|
91624
|
+
if (isWin && status3 === 1 && !parsed.file) {
|
91580
91625
|
return notFoundError(parsed.original, "spawn");
|
91581
91626
|
}
|
91582
91627
|
return null;
|
91583
91628
|
}
|
91584
|
-
function verifyENOENTSync(
|
91585
|
-
if (isWin &&
|
91629
|
+
function verifyENOENTSync(status3, parsed) {
|
91630
|
+
if (isWin && status3 === 1 && !parsed.file) {
|
91586
91631
|
return notFoundError(parsed.original, "spawnSync");
|
91587
91632
|
}
|
91588
91633
|
return null;
|
@@ -100670,7 +100715,7 @@ var init_list4 = __esm({
|
|
100670
100715
|
init_get_command_flags();
|
100671
100716
|
init_get_args();
|
100672
100717
|
init_get_flags_specification();
|
100673
|
-
|
100718
|
+
init_command35();
|
100674
100719
|
init_pkg_name();
|
100675
100720
|
init_list3();
|
100676
100721
|
init_error2();
|
@@ -100880,7 +100925,7 @@ var init_put2 = __esm({
|
|
100880
100925
|
blob2 = __toESM3(require("@vercel/blob"));
|
100881
100926
|
init_get_args();
|
100882
100927
|
init_get_flags_specification();
|
100883
|
-
|
100928
|
+
init_command35();
|
100884
100929
|
import_node_fs = require("fs");
|
100885
100930
|
import_error_utils12 = __toESM3(require_dist2());
|
100886
100931
|
import_node_path = require("path");
|
@@ -100953,7 +100998,7 @@ var init_del2 = __esm({
|
|
100953
100998
|
blob3 = __toESM3(require("@vercel/blob"));
|
100954
100999
|
init_get_args();
|
100955
101000
|
init_get_flags_specification();
|
100956
|
-
|
101001
|
+
init_command35();
|
100957
101002
|
init_del();
|
100958
101003
|
init_error2();
|
100959
101004
|
init_pkg_name();
|
@@ -101072,7 +101117,7 @@ var init_copy2 = __esm({
|
|
101072
101117
|
blob4 = __toESM3(require("@vercel/blob"));
|
101073
101118
|
init_get_args();
|
101074
101119
|
init_get_flags_specification();
|
101075
|
-
|
101120
|
+
init_command35();
|
101076
101121
|
init_copy();
|
101077
101122
|
init_pkg_name();
|
101078
101123
|
}
|
@@ -119019,7 +119064,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
119019
119064
|
});
|
119020
119065
|
module2.exports = __toCommonJS4(detect_file_system_api_exports);
|
119021
119066
|
var import_semver4 = __toESM4(require_semver2());
|
119022
|
-
var
|
119067
|
+
var import__98 = require_dist20();
|
119023
119068
|
async function detectFileSystemAPI2({
|
119024
119069
|
files,
|
119025
119070
|
projectSettings,
|
@@ -119085,7 +119130,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
119085
119130
|
};
|
119086
119131
|
}
|
119087
119132
|
const invalidBuilder = builders.find(({ use }) => {
|
119088
|
-
const valid = (0,
|
119133
|
+
const valid = (0, import__98.isOfficialRuntime)("go", use) || (0, import__98.isOfficialRuntime)("python", use) || (0, import__98.isOfficialRuntime)("ruby", use) || (0, import__98.isOfficialRuntime)("node", use) || (0, import__98.isOfficialRuntime)("next", use) || (0, import__98.isOfficialRuntime)("static", use) || (0, import__98.isOfficialRuntime)("static-build", use);
|
119089
119134
|
return !valid;
|
119090
119135
|
});
|
119091
119136
|
if (invalidBuilder) {
|
@@ -119098,7 +119143,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
119098
119143
|
for (const lang of ["go", "python", "ruby"]) {
|
119099
119144
|
for (const { use } of builders) {
|
119100
119145
|
const plugin = "vercel-plugin-" + lang;
|
119101
|
-
if ((0,
|
119146
|
+
if ((0, import__98.isOfficialRuntime)(lang, use) && !deps[plugin]) {
|
119102
119147
|
return {
|
119103
119148
|
metadata,
|
119104
119149
|
fsApiBuilder: null,
|
@@ -119155,7 +119200,7 @@ var require_detect_file_system_api = __commonJS2({
|
|
119155
119200
|
}
|
119156
119201
|
}
|
119157
119202
|
const frontendBuilder = builders.find(
|
119158
|
-
({ use }) => (0,
|
119203
|
+
({ use }) => (0, import__98.isOfficialRuntime)("next", use) || (0, import__98.isOfficialRuntime)("static", use) || (0, import__98.isOfficialRuntime)("static-build", use)
|
119159
119204
|
);
|
119160
119205
|
const config2 = frontendBuilder?.config || {};
|
119161
119206
|
const withTag = tag ? `@${tag}` : "";
|
@@ -126906,7 +126951,7 @@ var init_store_add2 = __esm({
|
|
126906
126951
|
init_pkg_name();
|
126907
126952
|
init_get_flags_specification();
|
126908
126953
|
init_get_args();
|
126909
|
-
|
126954
|
+
init_command35();
|
126910
126955
|
init_store_add();
|
126911
126956
|
init_error2();
|
126912
126957
|
}
|
@@ -126982,7 +127027,7 @@ var init_store_remove = __esm({
|
|
126982
127027
|
init_error2();
|
126983
127028
|
init_output_manager();
|
126984
127029
|
init_get_flags_specification();
|
126985
|
-
|
127030
|
+
init_command35();
|
126986
127031
|
init_get_args();
|
126987
127032
|
init_link2();
|
126988
127033
|
}
|
@@ -129403,7 +129448,7 @@ var init_store_get2 = __esm({
|
|
129403
129448
|
init_get_args();
|
129404
129449
|
init_get_flags_specification();
|
129405
129450
|
init_link2();
|
129406
|
-
|
129451
|
+
init_command35();
|
129407
129452
|
import_date_fns = __toESM3(require_date_fns());
|
129408
129453
|
import_chalk40 = __toESM3(require_source());
|
129409
129454
|
init_store_get();
|
@@ -129482,7 +129527,7 @@ var init_store2 = __esm({
|
|
129482
129527
|
init_get_invalid_subcommand();
|
129483
129528
|
init_get_subcommand();
|
129484
129529
|
init_help();
|
129485
|
-
|
129530
|
+
init_command35();
|
129486
129531
|
init_get_flags_specification();
|
129487
129532
|
init_output_manager();
|
129488
129533
|
init_commands();
|
@@ -129640,7 +129685,7 @@ var init_token = __esm({
|
|
129640
129685
|
import_node_path2 = require("path");
|
129641
129686
|
init_diff_env_files();
|
129642
129687
|
init_get_flags_specification();
|
129643
|
-
|
129688
|
+
init_command35();
|
129644
129689
|
init_get_args();
|
129645
129690
|
init_pkg_name();
|
129646
129691
|
init_cmd();
|
@@ -129758,7 +129803,7 @@ var init_blob2 = __esm({
|
|
129758
129803
|
init_get_subcommand();
|
129759
129804
|
init_help();
|
129760
129805
|
init_list4();
|
129761
|
-
|
129806
|
+
init_command35();
|
129762
129807
|
init_get_flags_specification();
|
129763
129808
|
init_output_manager();
|
129764
129809
|
init_commands();
|
@@ -130678,19 +130723,19 @@ var require_superstatic = __commonJS2({
|
|
130678
130723
|
}));
|
130679
130724
|
return htmlFiles;
|
130680
130725
|
}
|
130681
|
-
function convertCleanUrls(cleanUrls, trailingSlash,
|
130726
|
+
function convertCleanUrls(cleanUrls, trailingSlash, status3 = 308) {
|
130682
130727
|
const routes2 = [];
|
130683
130728
|
if (cleanUrls) {
|
130684
130729
|
const loc = trailingSlash ? "/$1/" : "/$1";
|
130685
130730
|
routes2.push({
|
130686
130731
|
src: "^/(?:(.+)/)?index(?:\\.html)?/?$",
|
130687
130732
|
headers: { Location: loc },
|
130688
|
-
status:
|
130733
|
+
status: status3
|
130689
130734
|
});
|
130690
130735
|
routes2.push({
|
130691
130736
|
src: "^/(.*)\\.html/?$",
|
130692
130737
|
headers: { Location: loc },
|
130693
|
-
status:
|
130738
|
+
status: status3
|
130694
130739
|
});
|
130695
130740
|
}
|
130696
130741
|
return routes2;
|
@@ -130703,18 +130748,18 @@ var require_superstatic = __commonJS2({
|
|
130703
130748
|
normalizeHasKeys(r.missing);
|
130704
130749
|
try {
|
130705
130750
|
const loc = replaceSegments(segments, hasSegments, r.destination, true);
|
130706
|
-
let
|
130751
|
+
let status3;
|
130707
130752
|
if (typeof r.permanent === "boolean") {
|
130708
|
-
|
130753
|
+
status3 = r.permanent ? 308 : 307;
|
130709
130754
|
} else if (r.statusCode) {
|
130710
|
-
|
130755
|
+
status3 = r.statusCode;
|
130711
130756
|
} else {
|
130712
|
-
|
130757
|
+
status3 = defaultStatus;
|
130713
130758
|
}
|
130714
130759
|
const route = {
|
130715
130760
|
src,
|
130716
130761
|
headers: { Location: loc },
|
130717
|
-
status:
|
130762
|
+
status: status3
|
130718
130763
|
};
|
130719
130764
|
if (r.has) {
|
130720
130765
|
route.has = r.has;
|
@@ -130798,27 +130843,27 @@ var require_superstatic = __commonJS2({
|
|
130798
130843
|
return route;
|
130799
130844
|
});
|
130800
130845
|
}
|
130801
|
-
function convertTrailingSlash(
|
130846
|
+
function convertTrailingSlash(enable3, status3 = 308) {
|
130802
130847
|
const routes2 = [];
|
130803
|
-
if (
|
130848
|
+
if (enable3) {
|
130804
130849
|
routes2.push({
|
130805
130850
|
src: "^/\\.well-known(?:/.*)?$"
|
130806
130851
|
});
|
130807
130852
|
routes2.push({
|
130808
130853
|
src: "^/((?:[^/]+/)*[^/\\.]+)$",
|
130809
130854
|
headers: { Location: "/$1/" },
|
130810
|
-
status:
|
130855
|
+
status: status3
|
130811
130856
|
});
|
130812
130857
|
routes2.push({
|
130813
130858
|
src: "^/((?:[^/]+/)*[^/]+\\.\\w+)/$",
|
130814
130859
|
headers: { Location: "/$1" },
|
130815
|
-
status:
|
130860
|
+
status: status3
|
130816
130861
|
});
|
130817
130862
|
} else {
|
130818
130863
|
routes2.push({
|
130819
130864
|
src: "^/(.*)\\/$",
|
130820
130865
|
headers: { Location: "/$1" },
|
130821
|
-
status:
|
130866
|
+
status: status3
|
130822
130867
|
});
|
130823
130868
|
}
|
130824
130869
|
return routes2;
|
@@ -145334,7 +145379,7 @@ var init_pull4 = __esm({
|
|
145334
145379
|
init_ensure_link();
|
145335
145380
|
init_humanize_path();
|
145336
145381
|
init_help();
|
145337
|
-
|
145382
|
+
init_command26();
|
145338
145383
|
init_parse_target();
|
145339
145384
|
init_get_flags_specification();
|
145340
145385
|
init_error2();
|
@@ -147746,7 +147791,7 @@ function prettyPrintLogline({
|
|
147746
147791
|
level,
|
147747
147792
|
domain,
|
147748
147793
|
requestPath: path11,
|
147749
|
-
responseStatusCode:
|
147794
|
+
responseStatusCode: status3,
|
147750
147795
|
requestMethod: method,
|
147751
147796
|
message: message2,
|
147752
147797
|
messageTruncated,
|
@@ -147758,7 +147803,7 @@ function prettyPrintLogline({
|
|
147758
147803
|
const sourceIcon = getSourceIcon(source);
|
147759
147804
|
const detailsLine = `${import_chalk58.default.dim(date)} ${levelIcon} ${import_chalk58.default.bold(
|
147760
147805
|
method
|
147761
|
-
)} ${import_chalk58.default.grey(
|
147806
|
+
)} ${import_chalk58.default.grey(status3 <= 0 ? "---" : status3)} ${import_chalk58.default.dim(
|
147762
147807
|
domain
|
147763
147808
|
)} ${sourceIcon} ${path11}`;
|
147764
147809
|
print(
|
@@ -147816,7 +147861,7 @@ var init_logs = __esm({
|
|
147816
147861
|
import_split2 = __toESM3(require_split2());
|
147817
147862
|
import_url14 = require("url");
|
147818
147863
|
init_events();
|
147819
|
-
|
147864
|
+
init_command22();
|
147820
147865
|
init_output_manager();
|
147821
147866
|
runtimeLogSpinnerMessage = `waiting for new logs...`;
|
147822
147867
|
dateTimeFormat = "HH:mm:ss.SS";
|
@@ -147908,6 +147953,8 @@ async function processDeployment({
|
|
147908
147953
|
abortController?.abort();
|
147909
147954
|
output_manager_default.stopSpinner();
|
147910
147955
|
}
|
147956
|
+
let rollingRelease2;
|
147957
|
+
let project;
|
147911
147958
|
try {
|
147912
147959
|
for await (const event of (0, import_client7.createDeployment)(clientOptions, requestBody)) {
|
147913
147960
|
if (["tip", "notice", "warning"].includes(event.type)) {
|
@@ -147999,6 +148046,15 @@ async function processDeployment({
|
|
147999
148046
|
stopSpinner();
|
148000
148047
|
return event.payload;
|
148001
148048
|
}
|
148049
|
+
if (project === void 0) {
|
148050
|
+
project = await getProjectByNameOrId(client2, projectName);
|
148051
|
+
rollingRelease2 = project?.rollingRelease;
|
148052
|
+
}
|
148053
|
+
if (event.type === "ready" && rollingRelease2) {
|
148054
|
+
output_manager_default.spinner("Releasing", 0);
|
148055
|
+
output_manager_default.stopSpinner();
|
148056
|
+
return event.payload;
|
148057
|
+
}
|
148002
148058
|
if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true) && !withLogs) {
|
148003
148059
|
output_manager_default.spinner("Completing", 0);
|
148004
148060
|
}
|
@@ -148064,6 +148120,7 @@ var init_process_deployment = __esm({
|
|
148064
148120
|
init_progress();
|
148065
148121
|
init_ua();
|
148066
148122
|
init_output_manager();
|
148123
|
+
init_get_project_by_id_or_name();
|
148067
148124
|
archiveSuggestionText = "Try using `--archive=tgz` to limit the amount of files you upload.";
|
148068
148125
|
UploadErrorMissingArchive = class extends Error {
|
148069
148126
|
constructor() {
|
@@ -149348,11 +149405,13 @@ ${err.stack}`);
|
|
149348
149405
|
}
|
149349
149406
|
if (err instanceof BuildError) {
|
149350
149407
|
output_manager_default.error(err.message || "Build failed");
|
149351
|
-
output_manager_default.
|
149352
|
-
|
149353
|
-
|
149408
|
+
output_manager_default.log("\n");
|
149409
|
+
output_manager_default.log(
|
149410
|
+
`To check build logs run: ${getCommandName(
|
149411
|
+
`inspect ${now.url} --logs`
|
149354
149412
|
)}`
|
149355
149413
|
);
|
149414
|
+
output_manager_default.log(`Or inspect them in your browser at https://${now.url}/_logs`);
|
149356
149415
|
return 1;
|
149357
149416
|
}
|
149358
149417
|
if (isAPIError(err) && err.code === "size_limit_exceeded") {
|
@@ -149999,10 +150058,10 @@ var require_statuses = __commonJS2({
|
|
149999
150058
|
"../../node_modules/.pnpm/statuses@1.5.0/node_modules/statuses/index.js"(exports2, module2) {
|
150000
150059
|
"use strict";
|
150001
150060
|
var codes = require_codes();
|
150002
|
-
module2.exports =
|
150003
|
-
|
150004
|
-
|
150005
|
-
|
150061
|
+
module2.exports = status3;
|
150062
|
+
status3.STATUS_CODES = codes;
|
150063
|
+
status3.codes = populateStatusesMap(status3, codes);
|
150064
|
+
status3.redirect = {
|
150006
150065
|
300: true,
|
150007
150066
|
301: true,
|
150008
150067
|
302: true,
|
@@ -150011,12 +150070,12 @@ var require_statuses = __commonJS2({
|
|
150011
150070
|
307: true,
|
150012
150071
|
308: true
|
150013
150072
|
};
|
150014
|
-
|
150073
|
+
status3.empty = {
|
150015
150074
|
204: true,
|
150016
150075
|
205: true,
|
150017
150076
|
304: true
|
150018
150077
|
};
|
150019
|
-
|
150078
|
+
status3.retry = {
|
150020
150079
|
502: true,
|
150021
150080
|
503: true,
|
150022
150081
|
504: true
|
@@ -150025,17 +150084,17 @@ var require_statuses = __commonJS2({
|
|
150025
150084
|
var arr = [];
|
150026
150085
|
Object.keys(codes2).forEach(function forEachCode(code2) {
|
150027
150086
|
var message2 = codes2[code2];
|
150028
|
-
var
|
150029
|
-
statuses[
|
150030
|
-
statuses[message2] =
|
150031
|
-
statuses[message2.toLowerCase()] =
|
150032
|
-
arr.push(
|
150087
|
+
var status4 = Number(code2);
|
150088
|
+
statuses[status4] = message2;
|
150089
|
+
statuses[message2] = status4;
|
150090
|
+
statuses[message2.toLowerCase()] = status4;
|
150091
|
+
arr.push(status4);
|
150033
150092
|
});
|
150034
150093
|
return arr;
|
150035
150094
|
}
|
150036
|
-
function
|
150095
|
+
function status3(code2) {
|
150037
150096
|
if (typeof code2 === "number") {
|
150038
|
-
if (!
|
150097
|
+
if (!status3[code2])
|
150039
150098
|
throw new Error("invalid status code: " + code2);
|
150040
150099
|
return code2;
|
150041
150100
|
}
|
@@ -150044,11 +150103,11 @@ var require_statuses = __commonJS2({
|
|
150044
150103
|
}
|
150045
150104
|
var n = parseInt(code2, 10);
|
150046
150105
|
if (!isNaN(n)) {
|
150047
|
-
if (!
|
150106
|
+
if (!status3[n])
|
150048
150107
|
throw new Error("invalid status code: " + n);
|
150049
150108
|
return n;
|
150050
150109
|
}
|
150051
|
-
n =
|
150110
|
+
n = status3[code2.toLowerCase()];
|
150052
150111
|
if (!n)
|
150053
150112
|
throw new Error('invalid status message: "' + code2 + '"');
|
150054
150113
|
return n;
|
@@ -150080,19 +150139,19 @@ var require_http_errors = __commonJS2({
|
|
150080
150139
|
module2.exports = createError;
|
150081
150140
|
module2.exports.HttpError = createHttpErrorConstructor();
|
150082
150141
|
populateConstructorExports(module2.exports, statuses.codes, module2.exports.HttpError);
|
150083
|
-
function codeClass(
|
150084
|
-
return Number(String(
|
150142
|
+
function codeClass(status3) {
|
150143
|
+
return Number(String(status3).charAt(0) + "00");
|
150085
150144
|
}
|
150086
150145
|
function createError() {
|
150087
150146
|
var err;
|
150088
150147
|
var msg;
|
150089
|
-
var
|
150148
|
+
var status3 = 500;
|
150090
150149
|
var props = {};
|
150091
150150
|
for (var i = 0; i < arguments.length; i++) {
|
150092
150151
|
var arg2 = arguments[i];
|
150093
150152
|
if (arg2 instanceof Error) {
|
150094
150153
|
err = arg2;
|
150095
|
-
|
150154
|
+
status3 = err.status || err.statusCode || status3;
|
150096
150155
|
continue;
|
150097
150156
|
}
|
150098
150157
|
switch (typeof arg2) {
|
@@ -150100,7 +150159,7 @@ var require_http_errors = __commonJS2({
|
|
150100
150159
|
msg = arg2;
|
150101
150160
|
break;
|
150102
150161
|
case "number":
|
150103
|
-
|
150162
|
+
status3 = arg2;
|
150104
150163
|
if (i !== 0) {
|
150105
150164
|
deprecate2("non-first-argument status code; replace with createError(" + arg2 + ", ...)");
|
150106
150165
|
}
|
@@ -150110,20 +150169,20 @@ var require_http_errors = __commonJS2({
|
|
150110
150169
|
break;
|
150111
150170
|
}
|
150112
150171
|
}
|
150113
|
-
if (typeof
|
150172
|
+
if (typeof status3 === "number" && (status3 < 400 || status3 >= 600)) {
|
150114
150173
|
deprecate2("non-error status code; use only 4xx or 5xx status codes");
|
150115
150174
|
}
|
150116
|
-
if (typeof
|
150117
|
-
|
150175
|
+
if (typeof status3 !== "number" || !statuses[status3] && (status3 < 400 || status3 >= 600)) {
|
150176
|
+
status3 = 500;
|
150118
150177
|
}
|
150119
|
-
var HttpError = createError[
|
150178
|
+
var HttpError = createError[status3] || createError[codeClass(status3)];
|
150120
150179
|
if (!err) {
|
150121
|
-
err = HttpError ? new HttpError(msg) : new Error(msg || statuses[
|
150180
|
+
err = HttpError ? new HttpError(msg) : new Error(msg || statuses[status3]);
|
150122
150181
|
Error.captureStackTrace(err, createError);
|
150123
150182
|
}
|
150124
|
-
if (!HttpError || !(err instanceof HttpError) || err.status !==
|
150125
|
-
err.expose =
|
150126
|
-
err.status = err.statusCode =
|
150183
|
+
if (!HttpError || !(err instanceof HttpError) || err.status !== status3) {
|
150184
|
+
err.expose = status3 < 500;
|
150185
|
+
err.status = err.statusCode = status3;
|
150127
150186
|
}
|
150128
150187
|
for (var key in props) {
|
150129
150188
|
if (key !== "status" && key !== "statusCode") {
|
@@ -154431,8 +154490,8 @@ var require_debug4 = __commonJS2({
|
|
154431
154490
|
"../../node_modules/.pnpm/debug@3.1.0/node_modules/debug/src/debug.js"(exports2, module2) {
|
154432
154491
|
exports2 = module2.exports = createDebug.debug = createDebug["default"] = createDebug;
|
154433
154492
|
exports2.coerce = coerce;
|
154434
|
-
exports2.disable =
|
154435
|
-
exports2.enable =
|
154493
|
+
exports2.disable = disable3;
|
154494
|
+
exports2.enable = enable3;
|
154436
154495
|
exports2.enabled = enabled;
|
154437
154496
|
exports2.humanize = require_ms3();
|
154438
154497
|
exports2.instances = [];
|
@@ -154505,7 +154564,7 @@ var require_debug4 = __commonJS2({
|
|
154505
154564
|
return false;
|
154506
154565
|
}
|
154507
154566
|
}
|
154508
|
-
function
|
154567
|
+
function enable3(namespaces) {
|
154509
154568
|
exports2.save(namespaces);
|
154510
154569
|
exports2.names = [];
|
154511
154570
|
exports2.skips = [];
|
@@ -154527,7 +154586,7 @@ var require_debug4 = __commonJS2({
|
|
154527
154586
|
instance.enabled = exports2.enabled(instance.namespace);
|
154528
154587
|
}
|
154529
154588
|
}
|
154530
|
-
function
|
154589
|
+
function disable3() {
|
154531
154590
|
exports2.enable("");
|
154532
154591
|
}
|
154533
154592
|
function enabled(name) {
|
@@ -165941,7 +166000,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
165941
166000
|
reqPathname = reqPathname || "/";
|
165942
166001
|
const reqQuery = parseQueryString(reqSearch);
|
165943
166002
|
const combinedHeaders = { ...previousHeaders };
|
165944
|
-
let
|
166003
|
+
let status3;
|
165945
166004
|
let isContinue = false;
|
165946
166005
|
if (routes2) {
|
165947
166006
|
let idx = -1;
|
@@ -165977,7 +166036,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
165977
166036
|
}
|
165978
166037
|
if (routeConfig.continue) {
|
165979
166038
|
if (routeConfig.status) {
|
165980
|
-
|
166039
|
+
status3 = routeConfig.status;
|
165981
166040
|
}
|
165982
166041
|
reqPathname = destPath;
|
165983
166042
|
isContinue = true;
|
@@ -166012,7 +166071,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
166012
166071
|
}
|
166013
166072
|
} else {
|
166014
166073
|
if (routeConfig.status && phase === "miss") {
|
166015
|
-
|
166074
|
+
status3 = routeConfig.status;
|
166016
166075
|
}
|
166017
166076
|
reqPathname = destPath;
|
166018
166077
|
continue;
|
@@ -166026,7 +166085,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
166026
166085
|
continue: isContinue,
|
166027
166086
|
userDest: false,
|
166028
166087
|
isDestUrl,
|
166029
|
-
status: routeConfig.status ||
|
166088
|
+
status: routeConfig.status || status3,
|
166030
166089
|
headers: combinedHeaders,
|
166031
166090
|
query: reqQuery,
|
166032
166091
|
matched_route: routeConfig,
|
@@ -166048,7 +166107,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
166048
166107
|
continue: isContinue,
|
166049
166108
|
userDest: Boolean(routeConfig.dest),
|
166050
166109
|
isDestUrl,
|
166051
|
-
status: routeConfig.status ||
|
166110
|
+
status: routeConfig.status || status3,
|
166052
166111
|
headers: combinedHeaders,
|
166053
166112
|
query: destQuery,
|
166054
166113
|
matched_route: routeConfig,
|
@@ -166065,7 +166124,7 @@ async function devRouter(reqUrl = "/", reqMethod, routes2, devServer, vercelConf
|
|
166065
166124
|
found: false,
|
166066
166125
|
dest: reqPathname,
|
166067
166126
|
continue: isContinue,
|
166068
|
-
status:
|
166127
|
+
status: status3,
|
166069
166128
|
isDestUrl: false,
|
166070
166129
|
query: reqQuery,
|
166071
166130
|
headers: combinedHeaders,
|
@@ -167223,19 +167282,19 @@ var init_server = __esm({
|
|
167223
167282
|
* This is the equivalent to now-proxy exit_with_status() function.
|
167224
167283
|
*/
|
167225
167284
|
this.exitWithStatus = async (match, routeResult, phase, req, res, requestId) => {
|
167226
|
-
const { status:
|
167285
|
+
const { status: status3, headers, dest } = routeResult;
|
167227
167286
|
const location = headers["location"] || dest;
|
167228
|
-
if (
|
167229
|
-
output_manager_default.debug(`Route found with redirect status code ${
|
167230
|
-
await this.sendRedirect(req, res, requestId, location,
|
167287
|
+
if (status3 && location && 300 <= status3 && status3 <= 399) {
|
167288
|
+
output_manager_default.debug(`Route found with redirect status code ${status3}`);
|
167289
|
+
await this.sendRedirect(req, res, requestId, location, status3);
|
167231
167290
|
return true;
|
167232
167291
|
}
|
167233
|
-
if (!match &&
|
167292
|
+
if (!match && status3 && phase !== "miss") {
|
167234
167293
|
if (routeResult.userDest) {
|
167235
167294
|
return false;
|
167236
167295
|
}
|
167237
|
-
output_manager_default.debug(`Route found with with status code ${
|
167238
|
-
await this.sendError(req, res, requestId, "",
|
167296
|
+
output_manager_default.debug(`Route found with with status code ${status3}`);
|
167297
|
+
await this.sendError(req, res, requestId, "", status3, headers);
|
167239
167298
|
return true;
|
167240
167299
|
}
|
167241
167300
|
return false;
|
@@ -173828,6 +173887,190 @@ var init_git2 = __esm({
|
|
173828
173887
|
}
|
173829
173888
|
});
|
173830
173889
|
|
173890
|
+
// src/commands/guidance/status.ts
|
173891
|
+
async function status(client2) {
|
173892
|
+
const enabled = client2.config.guidance?.enabled !== false;
|
173893
|
+
const status3 = enabled ? import_chalk91.default.green("Enabled") : import_chalk91.default.red("Disabled");
|
173894
|
+
output_manager_default.print("\n");
|
173895
|
+
output_manager_default.log(`${import_chalk91.default.bold("Guidance status")}: ${status3}`);
|
173896
|
+
output_manager_default.print("\n");
|
173897
|
+
return 0;
|
173898
|
+
}
|
173899
|
+
var import_chalk91;
|
173900
|
+
var init_status = __esm({
|
173901
|
+
"src/commands/guidance/status.ts"() {
|
173902
|
+
"use strict";
|
173903
|
+
import_chalk91 = __toESM3(require_source());
|
173904
|
+
init_output_manager();
|
173905
|
+
}
|
173906
|
+
});
|
173907
|
+
|
173908
|
+
// src/commands/guidance/enable.ts
|
173909
|
+
async function enable(client2) {
|
173910
|
+
client2.config = {
|
173911
|
+
...client2.config,
|
173912
|
+
guidance: {
|
173913
|
+
...client2.config.guidance,
|
173914
|
+
enabled: true
|
173915
|
+
}
|
173916
|
+
};
|
173917
|
+
writeToConfigFile(client2.config);
|
173918
|
+
await status(client2);
|
173919
|
+
return 0;
|
173920
|
+
}
|
173921
|
+
var init_enable = __esm({
|
173922
|
+
"src/commands/guidance/enable.ts"() {
|
173923
|
+
"use strict";
|
173924
|
+
init_files();
|
173925
|
+
init_status();
|
173926
|
+
}
|
173927
|
+
});
|
173928
|
+
|
173929
|
+
// src/commands/guidance/disable.ts
|
173930
|
+
async function disable(client2) {
|
173931
|
+
client2.config = {
|
173932
|
+
...client2.config,
|
173933
|
+
guidance: {
|
173934
|
+
...client2.config.guidance,
|
173935
|
+
enabled: false
|
173936
|
+
}
|
173937
|
+
};
|
173938
|
+
writeToConfigFile(client2.config);
|
173939
|
+
await status(client2);
|
173940
|
+
return 0;
|
173941
|
+
}
|
173942
|
+
var init_disable = __esm({
|
173943
|
+
"src/commands/guidance/disable.ts"() {
|
173944
|
+
"use strict";
|
173945
|
+
init_files();
|
173946
|
+
init_status();
|
173947
|
+
}
|
173948
|
+
});
|
173949
|
+
|
173950
|
+
// src/util/telemetry/commands/guidance/index.ts
|
173951
|
+
var GuidanceTelemetryClient;
|
173952
|
+
var init_guidance = __esm({
|
173953
|
+
"src/util/telemetry/commands/guidance/index.ts"() {
|
173954
|
+
"use strict";
|
173955
|
+
init_telemetry();
|
173956
|
+
GuidanceTelemetryClient = class extends TelemetryClient {
|
173957
|
+
trackCliSubcommandStatus(actual) {
|
173958
|
+
this.trackCliSubcommand({
|
173959
|
+
subcommand: "status",
|
173960
|
+
value: actual
|
173961
|
+
});
|
173962
|
+
}
|
173963
|
+
trackCliSubcommandEnable(actual) {
|
173964
|
+
this.trackCliSubcommand({
|
173965
|
+
subcommand: "enable",
|
173966
|
+
value: actual
|
173967
|
+
});
|
173968
|
+
}
|
173969
|
+
trackCliSubcommandDisable(actual) {
|
173970
|
+
this.trackCliSubcommand({
|
173971
|
+
subcommand: "disable",
|
173972
|
+
value: actual
|
173973
|
+
});
|
173974
|
+
}
|
173975
|
+
};
|
173976
|
+
}
|
173977
|
+
});
|
173978
|
+
|
173979
|
+
// src/commands/guidance/index.ts
|
173980
|
+
var guidance_exports = {};
|
173981
|
+
__export3(guidance_exports, {
|
173982
|
+
default: () => guidance
|
173983
|
+
});
|
173984
|
+
async function guidance(client2) {
|
173985
|
+
if (!process.env.FF_GUIDANCE_MODE) {
|
173986
|
+
output_manager_default.error("The guidance subcommand does not exist");
|
173987
|
+
return 1;
|
173988
|
+
}
|
173989
|
+
const telemetryClient = new GuidanceTelemetryClient({
|
173990
|
+
opts: {
|
173991
|
+
store: client2.telemetryEventStore
|
173992
|
+
}
|
173993
|
+
});
|
173994
|
+
let parsedArguments;
|
173995
|
+
const flagsSpecification = getFlagsSpecification(guidanceCommand.options);
|
173996
|
+
try {
|
173997
|
+
parsedArguments = parseArguments(client2.argv.slice(2), flagsSpecification);
|
173998
|
+
} catch (err) {
|
173999
|
+
printError(err);
|
174000
|
+
return 1;
|
174001
|
+
}
|
174002
|
+
const { subcommand, subcommandOriginal } = getSubcommand(
|
174003
|
+
parsedArguments.args.slice(1),
|
174004
|
+
COMMAND_CONFIG11
|
174005
|
+
);
|
174006
|
+
const needHelp = parsedArguments.flags["--help"];
|
174007
|
+
function printHelp(command) {
|
174008
|
+
output_manager_default.print(
|
174009
|
+
help2(command, {
|
174010
|
+
columns: client2.stderr.columns,
|
174011
|
+
parent: guidanceCommand
|
174012
|
+
})
|
174013
|
+
);
|
174014
|
+
}
|
174015
|
+
if (!subcommand && needHelp) {
|
174016
|
+
telemetryClient.trackCliFlagHelp("guidance", subcommand);
|
174017
|
+
output_manager_default.print(help2(guidanceCommand, { columns: client2.stderr.columns }));
|
174018
|
+
return 2;
|
174019
|
+
}
|
174020
|
+
switch (subcommand) {
|
174021
|
+
case "status":
|
174022
|
+
if (needHelp) {
|
174023
|
+
telemetryClient.trackCliFlagHelp("guidance", subcommandOriginal);
|
174024
|
+
printHelp(statusSubcommand);
|
174025
|
+
return 2;
|
174026
|
+
}
|
174027
|
+
telemetryClient.trackCliSubcommandStatus(subcommandOriginal);
|
174028
|
+
return status(client2);
|
174029
|
+
case "enable":
|
174030
|
+
if (needHelp) {
|
174031
|
+
telemetryClient.trackCliFlagHelp("guidance", subcommandOriginal);
|
174032
|
+
printHelp(enableSubcommand);
|
174033
|
+
return 2;
|
174034
|
+
}
|
174035
|
+
telemetryClient.trackCliSubcommandEnable(subcommandOriginal);
|
174036
|
+
return enable(client2);
|
174037
|
+
case "disable":
|
174038
|
+
if (needHelp) {
|
174039
|
+
telemetryClient.trackCliFlagHelp("guidance", subcommandOriginal);
|
174040
|
+
printHelp(disableSubcommand);
|
174041
|
+
return 2;
|
174042
|
+
}
|
174043
|
+
return disable(client2);
|
174044
|
+
default: {
|
174045
|
+
output_manager_default.print(help2(guidanceCommand, { columns: client2.stderr.columns }));
|
174046
|
+
return 2;
|
174047
|
+
}
|
174048
|
+
}
|
174049
|
+
}
|
174050
|
+
var COMMAND_CONFIG11;
|
174051
|
+
var init_guidance2 = __esm({
|
174052
|
+
"src/commands/guidance/index.ts"() {
|
174053
|
+
"use strict";
|
174054
|
+
init_error2();
|
174055
|
+
init_get_args();
|
174056
|
+
init_get_subcommand();
|
174057
|
+
init_help();
|
174058
|
+
init_status();
|
174059
|
+
init_enable();
|
174060
|
+
init_disable();
|
174061
|
+
init_command12();
|
174062
|
+
init_get_flags_specification();
|
174063
|
+
init_guidance();
|
174064
|
+
init_output_manager();
|
174065
|
+
init_commands();
|
174066
|
+
COMMAND_CONFIG11 = {
|
174067
|
+
status: getCommandAliases(statusSubcommand),
|
174068
|
+
enable: getCommandAliases(enableSubcommand),
|
174069
|
+
disable: getCommandAliases(disableSubcommand)
|
174070
|
+
};
|
174071
|
+
}
|
174072
|
+
});
|
174073
|
+
|
173831
174074
|
// ../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js
|
173832
174075
|
var require_jaro_winkler = __commonJS2({
|
173833
174076
|
"../../node_modules/.pnpm/jaro-winkler@0.2.8/node_modules/jaro-winkler/index.js"(exports2, module2) {
|
@@ -174015,9 +174258,9 @@ async function extractExample(client2, name, dir, force, ver = "v2") {
|
|
174015
174258
|
extractor.on("finish", resolve13);
|
174016
174259
|
res.body.pipe(extractor);
|
174017
174260
|
});
|
174018
|
-
const successLog = `Initialized "${
|
174261
|
+
const successLog = `Initialized "${import_chalk92.default.bold(
|
174019
174262
|
name
|
174020
|
-
)}" example in ${
|
174263
|
+
)}" example in ${import_chalk92.default.bold(humanizePath(folder))}.`;
|
174021
174264
|
const folderRel = import_node_path4.default.relative(client2.cwd, folder);
|
174022
174265
|
const deployHint = folderRel === "" ? list_item_default(`To deploy, run ${getCommandName()}.`) : list_item_default(
|
174023
174266
|
`To deploy, ${cmd(
|
@@ -174037,14 +174280,14 @@ function prepareFolder(cwd, folder, force) {
|
|
174037
174280
|
if (import_node_fs2.default.existsSync(dest)) {
|
174038
174281
|
if (!import_node_fs2.default.lstatSync(dest).isDirectory()) {
|
174039
174282
|
throw new Error(
|
174040
|
-
`Destination path "${
|
174283
|
+
`Destination path "${import_chalk92.default.bold(
|
174041
174284
|
folder
|
174042
174285
|
)}" already exists and is not a directory.`
|
174043
174286
|
);
|
174044
174287
|
}
|
174045
174288
|
if (!force && import_node_fs2.default.readdirSync(dest).length !== 0) {
|
174046
174289
|
throw new Error(
|
174047
|
-
`Destination path "${
|
174290
|
+
`Destination path "${import_chalk92.default.bold(
|
174048
174291
|
folder
|
174049
174292
|
)}" already exists and is not an empty directory. You may use ${cmd(
|
174050
174293
|
"--force"
|
@@ -174055,14 +174298,14 @@ function prepareFolder(cwd, folder, force) {
|
|
174055
174298
|
try {
|
174056
174299
|
import_node_fs2.default.mkdirSync(dest);
|
174057
174300
|
} catch (e2) {
|
174058
|
-
throw new Error(`Could not create directory "${
|
174301
|
+
throw new Error(`Could not create directory "${import_chalk92.default.bold(folder)}".`);
|
174059
174302
|
}
|
174060
174303
|
}
|
174061
174304
|
return dest;
|
174062
174305
|
}
|
174063
174306
|
async function guess(client2, exampleList, name) {
|
174064
174307
|
const GuessError = new Error(
|
174065
|
-
`No example found for ${
|
174308
|
+
`No example found for ${import_chalk92.default.bold(name)}, run ${getCommandName(
|
174066
174309
|
"init"
|
174067
174310
|
)} to see the list of available examples.`
|
174068
174311
|
);
|
@@ -174071,21 +174314,21 @@ async function guess(client2, exampleList, name) {
|
|
174071
174314
|
}
|
174072
174315
|
const found = did_you_mean_default(name, exampleList, 0.7);
|
174073
174316
|
if (typeof found === "string") {
|
174074
|
-
if (await client2.input.confirm(`Did you mean ${
|
174317
|
+
if (await client2.input.confirm(`Did you mean ${import_chalk92.default.bold(found)}?`, false)) {
|
174075
174318
|
return found;
|
174076
174319
|
}
|
174077
174320
|
} else {
|
174078
174321
|
throw GuessError;
|
174079
174322
|
}
|
174080
174323
|
}
|
174081
|
-
var import_node_fs2, import_node_path4, import_tar_fs,
|
174324
|
+
var import_node_fs2, import_node_path4, import_tar_fs, import_chalk92, EXAMPLE_API;
|
174082
174325
|
var init_init = __esm({
|
174083
174326
|
"src/commands/init/init.ts"() {
|
174084
174327
|
"use strict";
|
174085
174328
|
import_node_fs2 = __toESM3(require("fs"));
|
174086
174329
|
import_node_path4 = __toESM3(require("path"));
|
174087
174330
|
import_tar_fs = __toESM3(require_tar_fs());
|
174088
|
-
|
174331
|
+
import_chalk92 = __toESM3(require_source());
|
174089
174332
|
init_list();
|
174090
174333
|
init_list_item();
|
174091
174334
|
init_humanize_path();
|
@@ -174153,7 +174396,7 @@ async function main10(client2) {
|
|
174153
174396
|
output_manager_default.print(help2(initCommand, { columns: client2.stderr.columns }));
|
174154
174397
|
return 2;
|
174155
174398
|
}
|
174156
|
-
const args2 = getSubcommand(parsedArgs.args.slice(1),
|
174399
|
+
const args2 = getSubcommand(parsedArgs.args.slice(1), COMMAND_CONFIG12).args;
|
174157
174400
|
if (parsedArgs.args.length > 3) {
|
174158
174401
|
output_manager_default.error("Too many arguments.");
|
174159
174402
|
return 1;
|
@@ -174170,7 +174413,7 @@ async function main10(client2) {
|
|
174170
174413
|
return 1;
|
174171
174414
|
}
|
174172
174415
|
}
|
174173
|
-
var import_error_utils27,
|
174416
|
+
var import_error_utils27, COMMAND_CONFIG12;
|
174174
174417
|
var init_init3 = __esm({
|
174175
174418
|
"src/commands/init/index.ts"() {
|
174176
174419
|
"use strict";
|
@@ -174180,11 +174423,11 @@ var init_init3 = __esm({
|
|
174180
174423
|
init_init();
|
174181
174424
|
import_error_utils27 = __toESM3(require_dist2());
|
174182
174425
|
init_help();
|
174183
|
-
|
174426
|
+
init_command13();
|
174184
174427
|
init_get_flags_specification();
|
174185
174428
|
init_output_manager();
|
174186
174429
|
init_init2();
|
174187
|
-
|
174430
|
+
COMMAND_CONFIG12 = {
|
174188
174431
|
init: ["init"]
|
174189
174432
|
};
|
174190
174433
|
}
|
@@ -174201,11 +174444,11 @@ var init_build_state = __esm({
|
|
174201
174444
|
});
|
174202
174445
|
|
174203
174446
|
// src/util/output/builds.ts
|
174204
|
-
var
|
174447
|
+
var import_chalk93, import_bytes8, padding, MAX_BUILD_GROUPS, MAX_OUTPUTS_PER_GROUP, hasOutput, getCommonPath, styleBuild, styleHiddenBuilds, styleOutput, getDirPath, sortByEntrypoint, groupBuilds, builds_default;
|
174205
174448
|
var init_builds = __esm({
|
174206
174449
|
"src/util/output/builds.ts"() {
|
174207
174450
|
"use strict";
|
174208
|
-
|
174451
|
+
import_chalk93 = __toESM3(require_source());
|
174209
174452
|
import_bytes8 = __toESM3(require_bytes());
|
174210
174453
|
init_build_state();
|
174211
174454
|
padding = 8;
|
@@ -174234,48 +174477,48 @@ var init_builds = __esm({
|
|
174234
174477
|
styleBuild = (build2, times, longestSource) => {
|
174235
174478
|
const { entrypoint, id } = build2;
|
174236
174479
|
const time = typeof times[id] === "string" ? times[id] : "";
|
174237
|
-
let pathColor =
|
174480
|
+
let pathColor = import_chalk93.default.cyan;
|
174238
174481
|
if (isFailed(build2)) {
|
174239
|
-
pathColor =
|
174482
|
+
pathColor = import_chalk93.default.red;
|
174240
174483
|
}
|
174241
174484
|
const entry = entrypoint.padEnd(longestSource + padding);
|
174242
174485
|
const prefix = hasOutput(build2) ? "\u250C" : "\u2576";
|
174243
|
-
return `${
|
174486
|
+
return `${import_chalk93.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
174244
174487
|
};
|
174245
174488
|
styleHiddenBuilds = (commonPath, buildGroup, times, longestSource, isHidden2 = false) => {
|
174246
174489
|
const { id } = buildGroup[0];
|
174247
174490
|
const entry = commonPath.padEnd(longestSource + padding);
|
174248
174491
|
const time = typeof times[id] === "string" ? times[id] : "";
|
174249
174492
|
const prefix = isHidden2 === false && buildGroup.some(hasOutput) ? "\u250C" : "\u2576";
|
174250
|
-
let pathColor =
|
174493
|
+
let pathColor = import_chalk93.default.cyan;
|
174251
174494
|
if (buildGroup.every(isFailed)) {
|
174252
|
-
pathColor =
|
174495
|
+
pathColor = import_chalk93.default.red;
|
174253
174496
|
}
|
174254
174497
|
if (isHidden2) {
|
174255
|
-
pathColor =
|
174498
|
+
pathColor = import_chalk93.default.grey;
|
174256
174499
|
}
|
174257
|
-
return `${
|
174500
|
+
return `${import_chalk93.default.grey(prefix)} ${pathColor(entry)}${time}`;
|
174258
174501
|
};
|
174259
174502
|
styleOutput = (output2, readyState, isLast) => {
|
174260
174503
|
const { type, path: path11, size, lambda } = output2;
|
174261
174504
|
const prefix = type === "lambda" ? "\u03BB " : "";
|
174262
|
-
const finalSize = size ? ` ${
|
174263
|
-
let color =
|
174505
|
+
const finalSize = size ? ` ${import_chalk93.default.grey(`(${(0, import_bytes8.default)(size)})`)}` : "";
|
174506
|
+
let color = import_chalk93.default.grey;
|
174264
174507
|
let finalRegion = "";
|
174265
174508
|
if (isReady({ readyState })) {
|
174266
|
-
color =
|
174509
|
+
color = import_chalk93.default;
|
174267
174510
|
} else if (isFailed({ readyState })) {
|
174268
|
-
color =
|
174511
|
+
color = import_chalk93.default.red;
|
174269
174512
|
}
|
174270
174513
|
if (lambda) {
|
174271
174514
|
const { deployedTo } = lambda;
|
174272
174515
|
if (deployedTo && deployedTo.length > 0) {
|
174273
|
-
finalRegion = ` ${
|
174516
|
+
finalRegion = ` ${import_chalk93.default.grey(`[${deployedTo.join(", ")}]`)}`;
|
174274
174517
|
}
|
174275
174518
|
}
|
174276
174519
|
const corner = isLast ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500";
|
174277
174520
|
const main17 = prefix + path11 + finalSize + finalRegion;
|
174278
|
-
return `${
|
174521
|
+
return `${import_chalk93.default.grey(corner)} ${color(main17)}`;
|
174279
174522
|
};
|
174280
174523
|
getDirPath = (path11, level = 0, highestLevel = null) => {
|
174281
174524
|
const parts = path11.split("/").slice(0, -1);
|
@@ -174407,7 +174650,7 @@ var init_builds = __esm({
|
|
174407
174650
|
);
|
174408
174651
|
if (outputs.length > MAX_OUTPUTS_PER_GROUP) {
|
174409
174652
|
final.push(
|
174410
|
-
|
174653
|
+
import_chalk93.default.grey(
|
174411
174654
|
`\u2514\u2500\u2500 ${outputs.length - MAX_OUTPUTS_PER_GROUP} output items hidden
|
174412
174655
|
`
|
174413
174656
|
)
|
@@ -174455,19 +174698,19 @@ function routes(routes2) {
|
|
174455
174698
|
const padding2 = 6;
|
174456
174699
|
const space = " ".repeat(padding2);
|
174457
174700
|
const destSpace = " ".repeat(longestDest || 10);
|
174458
|
-
const arrow =
|
174701
|
+
const arrow = import_chalk94.default.grey("->");
|
174459
174702
|
for (const item of routes2) {
|
174460
174703
|
if ("handle" in item) {
|
174461
|
-
toPrint += `${
|
174704
|
+
toPrint += `${import_chalk94.default.grey("\u2576")} ${import_chalk94.default.cyan(item.handle)}`;
|
174462
174705
|
continue;
|
174463
174706
|
}
|
174464
|
-
const { src, dest, status:
|
174707
|
+
const { src, dest, status: status3, headers } = item;
|
174465
174708
|
const last = routes2.indexOf(item) === routes2.length - 1;
|
174466
174709
|
const suffix = last ? "" : `
|
174467
174710
|
`;
|
174468
|
-
const finalSrc =
|
174711
|
+
const finalSrc = import_chalk94.default.cyan(src.padEnd(longestSrc + padding2));
|
174469
174712
|
const finalDest = dest ? `${arrow}${space}${dest}` : ` ${space}${destSpace}`;
|
174470
|
-
const finalStatus =
|
174713
|
+
const finalStatus = status3 ? import_chalk94.default.grey(`[${status3}]`) : "";
|
174471
174714
|
let finalHeaders = null;
|
174472
174715
|
if (headers) {
|
174473
174716
|
finalHeaders = `
|
@@ -174478,21 +174721,21 @@ function routes(routes2) {
|
|
174478
174721
|
const last2 = headerKeys.indexOf(header) === headerKeys.length - 1;
|
174479
174722
|
const suffix2 = last2 ? "" : `
|
174480
174723
|
`;
|
174481
|
-
const prefix2 =
|
174724
|
+
const prefix2 = import_chalk94.default.grey(last2 ? "\u2514\u2500\u2500" : "\u251C\u2500\u2500");
|
174482
174725
|
finalHeaders += `${prefix2} ${header}: ${value}${suffix2}`;
|
174483
174726
|
}
|
174484
174727
|
}
|
174485
|
-
const prefix =
|
174728
|
+
const prefix = import_chalk94.default.grey(finalHeaders ? "\u250C" : "\u2576");
|
174486
174729
|
const fill = `${finalSrc}${finalDest}${space}${finalStatus}`;
|
174487
174730
|
toPrint += `${prefix} ${fill}${finalHeaders || ""}${suffix}`;
|
174488
174731
|
}
|
174489
174732
|
return toPrint;
|
174490
174733
|
}
|
174491
|
-
var
|
174734
|
+
var import_chalk94, longestProperty;
|
174492
174735
|
var init_routes = __esm({
|
174493
174736
|
"src/util/output/routes.ts"() {
|
174494
174737
|
"use strict";
|
174495
|
-
|
174738
|
+
import_chalk94 = __toESM3(require_source());
|
174496
174739
|
longestProperty = (routes2, name) => {
|
174497
174740
|
const longestItem = routes2.sort((a, b) => {
|
174498
174741
|
const aName = a[name];
|
@@ -174612,7 +174855,7 @@ async function inspect3(client2) {
|
|
174612
174855
|
} catch {
|
174613
174856
|
}
|
174614
174857
|
output_manager_default.spinner(
|
174615
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
174858
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk95.default.bold(contextName)}`
|
174616
174859
|
);
|
174617
174860
|
let deployment = await getDeployment(client2, contextName, deploymentIdOrHost);
|
174618
174861
|
let abortController;
|
@@ -174639,7 +174882,7 @@ async function inspect3(client2) {
|
|
174639
174882
|
}
|
174640
174883
|
}
|
174641
174884
|
if (withLogs) {
|
174642
|
-
print(`${
|
174885
|
+
print(`${import_chalk95.default.cyan("status")} ${stateString(deployment.readyState)}
|
174643
174886
|
`);
|
174644
174887
|
} else {
|
174645
174888
|
await printDetails({ deployment, contextName, client: client2, startTimestamp });
|
@@ -174652,17 +174895,17 @@ function stateString(s) {
|
|
174652
174895
|
switch (s) {
|
174653
174896
|
case "INITIALIZING":
|
174654
174897
|
case "BUILDING":
|
174655
|
-
return
|
174898
|
+
return import_chalk95.default.yellow(CIRCLE) + sTitle;
|
174656
174899
|
case "ERROR":
|
174657
|
-
return
|
174900
|
+
return import_chalk95.default.red(CIRCLE) + sTitle;
|
174658
174901
|
case "READY":
|
174659
|
-
return
|
174902
|
+
return import_chalk95.default.green(CIRCLE) + sTitle;
|
174660
174903
|
case "QUEUED":
|
174661
|
-
return
|
174904
|
+
return import_chalk95.default.gray(CIRCLE) + sTitle;
|
174662
174905
|
case "CANCELED":
|
174663
|
-
return
|
174906
|
+
return import_chalk95.default.gray(CIRCLE) + sTitle;
|
174664
174907
|
default:
|
174665
|
-
return
|
174908
|
+
return import_chalk95.default.gray("UNKNOWN");
|
174666
174909
|
}
|
174667
174910
|
}
|
174668
174911
|
async function printDetails({
|
@@ -174672,7 +174915,7 @@ async function printDetails({
|
|
174672
174915
|
startTimestamp
|
174673
174916
|
}) {
|
174674
174917
|
output_manager_default.log(
|
174675
|
-
`Fetched deployment "${
|
174918
|
+
`Fetched deployment "${import_chalk95.default.bold(deployment.url)}" in ${import_chalk95.default.bold(
|
174676
174919
|
contextName
|
174677
174920
|
)} ${elapsed(Date.now() - startTimestamp)}`
|
174678
174921
|
);
|
@@ -174688,14 +174931,14 @@ async function printDetails({
|
|
174688
174931
|
const { print, link: link4 } = output_manager_default;
|
174689
174932
|
const { builds } = deployment.version === 2 ? await client2.fetch(`/v11/deployments/${id}/builds`) : { builds: [] };
|
174690
174933
|
print("\n");
|
174691
|
-
print(
|
174692
|
-
print(` ${
|
174934
|
+
print(import_chalk95.default.bold(" General\n\n"));
|
174935
|
+
print(` ${import_chalk95.default.cyan("id")} ${id}
|
174693
174936
|
`);
|
174694
|
-
print(` ${
|
174937
|
+
print(` ${import_chalk95.default.cyan("name")} ${name}
|
174695
174938
|
`);
|
174696
174939
|
const customEnvironmentSlug = deployment.customEnvironment?.slug;
|
174697
174940
|
const target = customEnvironmentSlug ?? deployment.target ?? "preview";
|
174698
|
-
print(` ${
|
174941
|
+
print(` ${import_chalk95.default.cyan("target")} `);
|
174699
174942
|
print(
|
174700
174943
|
deployment.customEnvironment && deployment.team?.slug ? `${link4(
|
174701
174944
|
`${target}`,
|
@@ -174705,13 +174948,13 @@ async function printDetails({
|
|
174705
174948
|
` : `${target}
|
174706
174949
|
`
|
174707
174950
|
);
|
174708
|
-
print(` ${
|
174951
|
+
print(` ${import_chalk95.default.cyan("status")} ${stateString(readyState)}
|
174709
174952
|
`);
|
174710
|
-
print(` ${
|
174953
|
+
print(` ${import_chalk95.default.cyan("url")} https://${url3}
|
174711
174954
|
`);
|
174712
174955
|
if (createdAt) {
|
174713
174956
|
print(
|
174714
|
-
` ${
|
174957
|
+
` ${import_chalk95.default.cyan("created")} ${new Date(createdAt)} ${elapsed(
|
174715
174958
|
Date.now() - createdAt,
|
174716
174959
|
true
|
174717
174960
|
)}
|
@@ -174720,10 +174963,10 @@ async function printDetails({
|
|
174720
174963
|
}
|
174721
174964
|
print("\n\n");
|
174722
174965
|
if (aliases !== void 0 && aliases.length > 0) {
|
174723
|
-
print(
|
174966
|
+
print(import_chalk95.default.bold(" Aliases\n\n"));
|
174724
174967
|
let aliasList = "";
|
174725
174968
|
for (const alias2 of aliases) {
|
174726
|
-
aliasList += `${
|
174969
|
+
aliasList += `${import_chalk95.default.gray("\u2576")} https://${alias2}
|
174727
174970
|
`;
|
174728
174971
|
}
|
174729
174972
|
print(indent_default(aliasList, 4));
|
@@ -174735,12 +174978,12 @@ async function printDetails({
|
|
174735
174978
|
const { id: id2, createdAt: createdAt2, readyStateAt } = build2;
|
174736
174979
|
times[id2] = createdAt2 && readyStateAt ? elapsed(readyStateAt - createdAt2) : null;
|
174737
174980
|
}
|
174738
|
-
print(
|
174981
|
+
print(import_chalk95.default.bold(" Builds\n\n"));
|
174739
174982
|
print(indent_default(builds_default(builds, times).toPrint, 4));
|
174740
174983
|
print("\n\n");
|
174741
174984
|
}
|
174742
174985
|
if (Array.isArray(routes2) && routes2.length > 0) {
|
174743
|
-
print(
|
174986
|
+
print(import_chalk95.default.bold(" Routes\n\n"));
|
174744
174987
|
print(indent_default(routes(routes2), 4));
|
174745
174988
|
print(`
|
174746
174989
|
|
@@ -174753,12 +174996,12 @@ function exitCode(state) {
|
|
174753
174996
|
}
|
174754
174997
|
return 0;
|
174755
174998
|
}
|
174756
|
-
var import_error_utils28,
|
174999
|
+
var import_error_utils28, import_chalk95, import_ms20, import_title6, import_url19;
|
174757
175000
|
var init_inspect4 = __esm({
|
174758
175001
|
"src/commands/inspect/index.ts"() {
|
174759
175002
|
"use strict";
|
174760
175003
|
import_error_utils28 = __toESM3(require_dist2());
|
174761
|
-
|
175004
|
+
import_chalk95 = __toESM3(require_source());
|
174762
175005
|
import_ms20 = __toESM3(require_ms());
|
174763
175006
|
import_title6 = __toESM3(require_lib4());
|
174764
175007
|
import_url19 = require("url");
|
@@ -174777,7 +175020,7 @@ var init_inspect4 = __esm({
|
|
174777
175020
|
init_pkg_name();
|
174778
175021
|
init_sleep();
|
174779
175022
|
init_help();
|
174780
|
-
|
175023
|
+
init_command14();
|
174781
175024
|
init_output_manager();
|
174782
175025
|
init_inspect3();
|
174783
175026
|
}
|
@@ -175194,7 +175437,7 @@ async function add5(client2, args2) {
|
|
175194
175437
|
}
|
175195
175438
|
const installation = teamInstallations[0];
|
175196
175439
|
output_manager_default.log(
|
175197
|
-
`Installing ${
|
175440
|
+
`Installing ${import_chalk96.default.bold(product.name)} by ${import_chalk96.default.bold(integration.name)} under ${import_chalk96.default.bold(contextName)}`
|
175198
175441
|
);
|
175199
175442
|
const metadataSchema = product.metadataSchema;
|
175200
175443
|
const metadataWizard = createMetadataWizard(metadataSchema);
|
@@ -175414,16 +175657,16 @@ async function selectBillingPlan(client2, billingPlans) {
|
|
175414
175657
|
}
|
175415
175658
|
async function confirmProductSelection(client2, product, name, metadata, billingPlan) {
|
175416
175659
|
output_manager_default.print("Selected product:\n");
|
175417
|
-
output_manager_default.print(`${
|
175660
|
+
output_manager_default.print(`${import_chalk96.default.dim(`- ${import_chalk96.default.bold("Name:")} ${name}`)}
|
175418
175661
|
`);
|
175419
175662
|
for (const [key, value] of Object.entries(metadata)) {
|
175420
175663
|
output_manager_default.print(
|
175421
|
-
`${
|
175664
|
+
`${import_chalk96.default.dim(`- ${import_chalk96.default.bold(`${product.metadataSchema.properties[key]["ui:label"]}:`)} ${value}`)}
|
175422
175665
|
`
|
175423
175666
|
);
|
175424
175667
|
}
|
175425
175668
|
output_manager_default.print(
|
175426
|
-
`${
|
175669
|
+
`${import_chalk96.default.dim(`- ${import_chalk96.default.bold("Plan:")} ${billingPlan.name}`)}
|
175427
175670
|
`
|
175428
175671
|
);
|
175429
175672
|
return client2.input.confirm("Confirm selection?", true);
|
@@ -175533,7 +175776,7 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
175533
175776
|
]
|
175534
175777
|
});
|
175535
175778
|
output_manager_default.spinner(
|
175536
|
-
`Connecting ${
|
175779
|
+
`Connecting ${import_chalk96.default.bold(name)} to ${import_chalk96.default.bold(project.name)}...`
|
175537
175780
|
);
|
175538
175781
|
try {
|
175539
175782
|
await connectResourceToProject(
|
@@ -175551,17 +175794,17 @@ async function provisionStorageProduct(client2, product, installation, name, met
|
|
175551
175794
|
output_manager_default.stopSpinner();
|
175552
175795
|
}
|
175553
175796
|
output_manager_default.log(
|
175554
|
-
`${
|
175797
|
+
`${import_chalk96.default.bold(name)} successfully connected to ${import_chalk96.default.bold(project.name)}
|
175555
175798
|
|
175556
175799
|
${indent_default(`Run ${cmd(`${packageName} env pull`)} to update the environment variables`, 4)}`
|
175557
175800
|
);
|
175558
175801
|
return 0;
|
175559
175802
|
}
|
175560
|
-
var
|
175803
|
+
var import_chalk96, import_open3;
|
175561
175804
|
var init_add10 = __esm({
|
175562
175805
|
"src/commands/integration/add.ts"() {
|
175563
175806
|
"use strict";
|
175564
|
-
|
175807
|
+
import_chalk96 = __toESM3(require_source());
|
175565
175808
|
import_open3 = __toESM3(require_open());
|
175566
175809
|
init_format_table();
|
175567
175810
|
init_pkg_name();
|
@@ -175620,7 +175863,7 @@ var init_install2 = __esm({
|
|
175620
175863
|
init_get_args();
|
175621
175864
|
init_help();
|
175622
175865
|
init_add10();
|
175623
|
-
|
175866
|
+
init_command15();
|
175624
175867
|
init_output_manager();
|
175625
175868
|
init_install();
|
175626
175869
|
}
|
@@ -175881,7 +176124,7 @@ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
|
|
175881
176124
|
}
|
175882
176125
|
}
|
175883
176126
|
output_manager_default.log(
|
175884
|
-
`${
|
176127
|
+
`${import_chalk97.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
|
175885
176128
|
);
|
175886
176129
|
for (const key in mappings) {
|
175887
176130
|
const mapping = mappings[key];
|
@@ -175907,11 +176150,11 @@ function formattedCurrency(amountInCents) {
|
|
175907
176150
|
currency: "USD"
|
175908
176151
|
}).format(amountInCents / 100);
|
175909
176152
|
}
|
175910
|
-
var
|
176153
|
+
var import_chalk97;
|
175911
176154
|
var init_balance2 = __esm({
|
175912
176155
|
"src/commands/integration/balance.ts"() {
|
175913
176156
|
"use strict";
|
175914
|
-
|
176157
|
+
import_chalk97 = __toESM3(require_source());
|
175915
176158
|
init_output_manager();
|
175916
176159
|
init_get_scope();
|
175917
176160
|
init_fetch_installation_prepayment_info();
|
@@ -176065,18 +176308,18 @@ async function list4(client2) {
|
|
176065
176308
|
return 0;
|
176066
176309
|
}
|
176067
176310
|
output_manager_default.log(
|
176068
|
-
`Integrations in ${
|
176311
|
+
`Integrations in ${import_chalk98.default.bold(contextName)}:
|
176069
176312
|
${table(
|
176070
176313
|
[
|
176071
176314
|
["Name", "Status", "Product", "Integration", "Projects"].map(
|
176072
|
-
(header) =>
|
176315
|
+
(header) => import_chalk98.default.bold(import_chalk98.default.cyan(header))
|
176073
176316
|
),
|
176074
176317
|
...results.map((result) => [
|
176075
|
-
resourceLink(contextName, result) ??
|
176318
|
+
resourceLink(contextName, result) ?? import_chalk98.default.gray("\u2013"),
|
176076
176319
|
resourceStatus(result.status ?? "\u2013"),
|
176077
|
-
result.product ??
|
176078
|
-
integrationLink(result, team) ??
|
176079
|
-
|
176320
|
+
result.product ?? import_chalk98.default.gray("\u2013"),
|
176321
|
+
integrationLink(result, team) ?? import_chalk98.default.gray("\u2013"),
|
176322
|
+
import_chalk98.default.grey(result.projects ? result.projects : "\u2013")
|
176080
176323
|
])
|
176081
176324
|
],
|
176082
176325
|
{ hsep: 8 }
|
@@ -176084,22 +176327,22 @@ ${table(
|
|
176084
176327
|
);
|
176085
176328
|
return 0;
|
176086
176329
|
}
|
176087
|
-
function resourceStatus(
|
176330
|
+
function resourceStatus(status3) {
|
176088
176331
|
const CIRCLE = "\u25CF ";
|
176089
|
-
const statusTitleCase = (0, import_title7.default)(
|
176090
|
-
switch (
|
176332
|
+
const statusTitleCase = (0, import_title7.default)(status3);
|
176333
|
+
switch (status3) {
|
176091
176334
|
case "initializing":
|
176092
|
-
return
|
176335
|
+
return import_chalk98.default.yellow(CIRCLE) + statusTitleCase;
|
176093
176336
|
case "error":
|
176094
|
-
return
|
176337
|
+
return import_chalk98.default.red(CIRCLE) + statusTitleCase;
|
176095
176338
|
case "available":
|
176096
|
-
return
|
176339
|
+
return import_chalk98.default.green(CIRCLE) + statusTitleCase;
|
176097
176340
|
case "suspended":
|
176098
|
-
return
|
176341
|
+
return import_chalk98.default.white(CIRCLE) + statusTitleCase;
|
176099
176342
|
case "limits-exceeded-suspended":
|
176100
|
-
return `${
|
176343
|
+
return `${import_chalk98.default.white(CIRCLE)}Limits exceeded`;
|
176101
176344
|
default:
|
176102
|
-
return
|
176345
|
+
return import_chalk98.default.gray(statusTitleCase);
|
176103
176346
|
}
|
176104
176347
|
}
|
176105
176348
|
function resourceLink(orgSlug, resource) {
|
@@ -176120,22 +176363,22 @@ function integrationLink(integration, team) {
|
|
176120
176363
|
if (!integration.configurationId) {
|
176121
176364
|
return integration.integration;
|
176122
176365
|
}
|
176123
|
-
const boldName =
|
176366
|
+
const boldName = import_chalk98.default.bold(integration.integration);
|
176124
176367
|
const integrationDeepLink = buildSSOLink(team, integration.configurationId);
|
176125
176368
|
return output_manager_default.link(boldName, integrationDeepLink, {
|
176126
176369
|
fallback: () => boldName,
|
176127
176370
|
color: false
|
176128
176371
|
});
|
176129
176372
|
}
|
176130
|
-
var
|
176373
|
+
var import_chalk98, import_title7;
|
176131
176374
|
var init_list6 = __esm({
|
176132
176375
|
"src/commands/integration/list.ts"() {
|
176133
176376
|
"use strict";
|
176134
|
-
|
176377
|
+
import_chalk98 = __toESM3(require_source());
|
176135
176378
|
init_get_scope();
|
176136
176379
|
init_link2();
|
176137
176380
|
init_get_resources();
|
176138
|
-
|
176381
|
+
init_command17();
|
176139
176382
|
init_get_flags_specification();
|
176140
176383
|
init_get_args();
|
176141
176384
|
init_error2();
|
@@ -176192,7 +176435,7 @@ async function openIntegration(client2, args2) {
|
|
176192
176435
|
knownIntegrationSlug = !!configuration;
|
176193
176436
|
} catch (error3) {
|
176194
176437
|
output_manager_default.error(
|
176195
|
-
`Failed to fetch configuration for ${
|
176438
|
+
`Failed to fetch configuration for ${import_chalk99.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
|
176196
176439
|
);
|
176197
176440
|
return 1;
|
176198
176441
|
} finally {
|
@@ -176200,19 +176443,19 @@ async function openIntegration(client2, args2) {
|
|
176200
176443
|
}
|
176201
176444
|
if (!configuration) {
|
176202
176445
|
output_manager_default.error(
|
176203
|
-
`No configuration found for ${
|
176446
|
+
`No configuration found for ${import_chalk99.default.bold(`"${integrationSlug}"`)}.`
|
176204
176447
|
);
|
176205
176448
|
return 1;
|
176206
176449
|
}
|
176207
|
-
output_manager_default.print(`Opening the ${
|
176450
|
+
output_manager_default.print(`Opening the ${import_chalk99.default.bold(integrationSlug)} dashboard...`);
|
176208
176451
|
(0, import_open4.default)(buildSSOLink(team, configuration.id));
|
176209
176452
|
return 0;
|
176210
176453
|
}
|
176211
|
-
var
|
176454
|
+
var import_chalk99, import_open4;
|
176212
176455
|
var init_open_integration = __esm({
|
176213
176456
|
"src/commands/integration/open-integration.ts"() {
|
176214
176457
|
"use strict";
|
176215
|
-
|
176458
|
+
import_chalk99 = __toESM3(require_source());
|
176216
176459
|
import_open4 = __toESM3(require_open());
|
176217
176460
|
init_get_scope();
|
176218
176461
|
init_fetch_marketplace_integrations();
|
@@ -176305,7 +176548,7 @@ async function remove3(client2) {
|
|
176305
176548
|
);
|
176306
176549
|
output_manager_default.stopSpinner();
|
176307
176550
|
if (!integrationConfiguration) {
|
176308
|
-
output_manager_default.error(`No integration ${
|
176551
|
+
output_manager_default.error(`No integration ${import_chalk100.default.bold(integrationName)} found.`);
|
176309
176552
|
telemetry2.trackCliArgumentIntegration(integrationName, false);
|
176310
176553
|
return 0;
|
176311
176554
|
}
|
@@ -176324,26 +176567,26 @@ async function remove3(client2) {
|
|
176324
176567
|
await removeIntegration(client2, integrationConfiguration, team);
|
176325
176568
|
} catch (error3) {
|
176326
176569
|
output_manager_default.error(
|
176327
|
-
|
176328
|
-
`Failed to remove ${
|
176570
|
+
import_chalk100.default.red(
|
176571
|
+
`Failed to remove ${import_chalk100.default.bold(integrationName)}: ${error3.message}`
|
176329
176572
|
)
|
176330
176573
|
);
|
176331
176574
|
return 1;
|
176332
176575
|
}
|
176333
|
-
output_manager_default.success(`${
|
176576
|
+
output_manager_default.success(`${import_chalk100.default.bold(integrationName)} successfully removed.`);
|
176334
176577
|
return 0;
|
176335
176578
|
}
|
176336
176579
|
async function confirmIntegrationRemoval(client2, integration, team) {
|
176337
176580
|
output_manager_default.log(
|
176338
|
-
`The ${
|
176581
|
+
`The ${import_chalk100.default.bold(integration)} integration will be removed permanently from team ${import_chalk100.default.bold(team.name)}.`
|
176339
176582
|
);
|
176340
|
-
return client2.input.confirm(`${
|
176583
|
+
return client2.input.confirm(`${import_chalk100.default.red("Are you sure?")}`, false);
|
176341
176584
|
}
|
176342
|
-
var
|
176585
|
+
var import_chalk100;
|
176343
176586
|
var init_remove_integration2 = __esm({
|
176344
176587
|
"src/commands/integration/remove-integration.ts"() {
|
176345
176588
|
"use strict";
|
176346
|
-
|
176589
|
+
import_chalk100 = __toESM3(require_source());
|
176347
176590
|
init_output_manager();
|
176348
176591
|
init_get_args();
|
176349
176592
|
init_get_flags_specification();
|
@@ -176351,7 +176594,7 @@ var init_remove_integration2 = __esm({
|
|
176351
176594
|
init_error2();
|
176352
176595
|
init_fetch_marketplace_integrations();
|
176353
176596
|
init_remove_integration();
|
176354
|
-
|
176597
|
+
init_command17();
|
176355
176598
|
init_remove3();
|
176356
176599
|
}
|
176357
176600
|
});
|
@@ -176376,7 +176619,7 @@ async function main11(client2) {
|
|
176376
176619
|
subcommand,
|
176377
176620
|
subcommandOriginal,
|
176378
176621
|
args: subArgs
|
176379
|
-
} = getSubcommand(args2.slice(1),
|
176622
|
+
} = getSubcommand(args2.slice(1), COMMAND_CONFIG13);
|
176380
176623
|
const needHelp = flags["--help"];
|
176381
176624
|
function printHelp(command) {
|
176382
176625
|
output_manager_default.print(
|
@@ -176442,12 +176685,12 @@ async function main11(client2) {
|
|
176442
176685
|
return remove3(client2);
|
176443
176686
|
}
|
176444
176687
|
default: {
|
176445
|
-
output_manager_default.error(getInvalidSubcommand(
|
176688
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG13));
|
176446
176689
|
return 2;
|
176447
176690
|
}
|
176448
176691
|
}
|
176449
176692
|
}
|
176450
|
-
var
|
176693
|
+
var COMMAND_CONFIG13;
|
176451
176694
|
var init_integration2 = __esm({
|
176452
176695
|
"src/commands/integration/index.ts"() {
|
176453
176696
|
"use strict";
|
@@ -176461,11 +176704,11 @@ var init_integration2 = __esm({
|
|
176461
176704
|
init_help();
|
176462
176705
|
init_add10();
|
176463
176706
|
init_balance2();
|
176464
|
-
|
176707
|
+
init_command17();
|
176465
176708
|
init_list6();
|
176466
176709
|
init_open_integration();
|
176467
176710
|
init_remove_integration2();
|
176468
|
-
|
176711
|
+
COMMAND_CONFIG13 = {
|
176469
176712
|
add: getCommandAliases(addSubcommand5),
|
176470
176713
|
open: getCommandAliases(openSubcommand),
|
176471
176714
|
list: getCommandAliases(listSubcommand6),
|
@@ -176641,18 +176884,18 @@ async function createThreshold(client2) {
|
|
176641
176884
|
);
|
176642
176885
|
output_manager_default.stopSpinner();
|
176643
176886
|
if (!targetedResource) {
|
176644
|
-
output_manager_default.log(`The resource ${
|
176887
|
+
output_manager_default.log(`The resource ${import_chalk101.default.bold(resourceName)} was not found.`);
|
176645
176888
|
return 0;
|
176646
176889
|
}
|
176647
176890
|
if (!targetedResource.product?.integrationConfigurationId) {
|
176648
176891
|
output_manager_default.error(
|
176649
|
-
`The resource ${
|
176892
|
+
`The resource ${import_chalk101.default.bold(resourceName)} does not have an integration configuration.`
|
176650
176893
|
);
|
176651
176894
|
return 1;
|
176652
176895
|
}
|
176653
176896
|
if (targetedResource.billingPlan?.type !== "prepayment") {
|
176654
176897
|
output_manager_default.error(
|
176655
|
-
`The resource ${
|
176898
|
+
`The resource ${import_chalk101.default.bold(resourceName)} is not a prepayment-based resource.`
|
176656
176899
|
);
|
176657
176900
|
return 1;
|
176658
176901
|
}
|
@@ -176680,7 +176923,7 @@ async function createThreshold(client2) {
|
|
176680
176923
|
}
|
176681
176924
|
if (targetedResource.billingPlan.scope !== "resource") {
|
176682
176925
|
output_manager_default.log(
|
176683
|
-
`The resource ${
|
176926
|
+
`The resource ${import_chalk101.default.bold(resourceName)} uses an installation-level balance.`
|
176684
176927
|
);
|
176685
176928
|
return await updateThresholdForInstallation({
|
176686
176929
|
client: client2,
|
@@ -176794,17 +177037,17 @@ async function updateThresholdForInstallation(props) {
|
|
176794
177037
|
async function handleUpdateThreshold(props) {
|
176795
177038
|
if (props.resource.billingPlan?.type !== "prepayment") {
|
176796
177039
|
output_manager_default.log(
|
176797
|
-
`The resource ${
|
177040
|
+
`The resource ${import_chalk101.default.bold(props.resource.name)} is not a prepayment-based resource.`
|
176798
177041
|
);
|
176799
177042
|
return 0;
|
176800
177043
|
}
|
176801
177044
|
if (!props.resource.product?.integrationConfigurationId) {
|
176802
177045
|
output_manager_default.log(
|
176803
|
-
`The resource ${
|
177046
|
+
`The resource ${import_chalk101.default.bold(props.resource.name)} does not have an integration configuration.`
|
176804
177047
|
);
|
176805
177048
|
return 0;
|
176806
177049
|
}
|
176807
|
-
const entityTextReference = props.isInstallationLevel ? `installation ${
|
177050
|
+
const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk101.default.bold(props.resource.product?.name)}` : `resource ${import_chalk101.default.bold(props.resource.name)}`;
|
176808
177051
|
if (props.existingThreshold) {
|
176809
177052
|
const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
|
176810
177053
|
`The ${entityTextReference} already has a threshold. (minimum: $${props.existingThreshold.minimumAmountInCents / 100}, spend: $${props.existingThreshold.purchaseAmountInCents / 100}, limit: ${props.existingThreshold.maximumAmountPerPeriodInCents ? `$${props.existingThreshold.maximumAmountPerPeriodInCents / 100}` : "none set"}). Do you want to overwrite it?`,
|
@@ -176861,18 +177104,18 @@ async function handleUpdateThreshold(props) {
|
|
176861
177104
|
output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
|
176862
177105
|
return 0;
|
176863
177106
|
}
|
176864
|
-
var
|
177107
|
+
var import_chalk101;
|
176865
177108
|
var init_create_threshold2 = __esm({
|
176866
177109
|
"src/commands/integration-resource/create-threshold.ts"() {
|
176867
177110
|
"use strict";
|
176868
|
-
|
177111
|
+
import_chalk101 = __toESM3(require_source());
|
176869
177112
|
init_output_manager();
|
176870
177113
|
init_error2();
|
176871
177114
|
init_get_args();
|
176872
177115
|
init_get_flags_specification();
|
176873
177116
|
init_get_resources();
|
176874
177117
|
init_create_threshold();
|
176875
|
-
|
177118
|
+
init_command16();
|
176876
177119
|
init_get_scope();
|
176877
177120
|
init_fetch_installation_prepayment_info();
|
176878
177121
|
init_update_threshold();
|
@@ -177008,7 +177251,7 @@ async function disconnect2(client2) {
|
|
177008
177251
|
);
|
177009
177252
|
output_manager_default.stopSpinner();
|
177010
177253
|
if (!targetedResource) {
|
177011
|
-
output_manager_default.error(`No resource ${
|
177254
|
+
output_manager_default.error(`No resource ${import_chalk102.default.bold(resourceName)} found.`);
|
177012
177255
|
return 0;
|
177013
177256
|
}
|
177014
177257
|
if (parsedArguments.flags["--all"]) {
|
@@ -177058,7 +177301,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
177058
177301
|
);
|
177059
177302
|
if (!project) {
|
177060
177303
|
output_manager_default.log(
|
177061
|
-
`Could not find project ${
|
177304
|
+
`Could not find project ${import_chalk102.default.bold(projectName)} connected to resource ${import_chalk102.default.bold(resource.name)}.`
|
177062
177305
|
);
|
177063
177306
|
return 0;
|
177064
177307
|
}
|
@@ -177070,7 +177313,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
177070
177313
|
output_manager_default.spinner("Disconnecting resource\u2026", 500);
|
177071
177314
|
await disconnectResourceFromProject(client2, resource, project);
|
177072
177315
|
output_manager_default.success(
|
177073
|
-
`Disconnected ${
|
177316
|
+
`Disconnected ${import_chalk102.default.bold(project.name)} from ${import_chalk102.default.bold(resource.name)}`
|
177074
177317
|
);
|
177075
177318
|
} catch (error3) {
|
177076
177319
|
output_manager_default.error(
|
@@ -177082,7 +177325,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
|
|
177082
177325
|
}
|
177083
177326
|
async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
|
177084
177327
|
if (resource.projectsMetadata?.length === 0) {
|
177085
|
-
output_manager_default.log(`${
|
177328
|
+
output_manager_default.log(`${import_chalk102.default.bold(resource.name)} has no projects to disconnect.`);
|
177086
177329
|
return;
|
177087
177330
|
}
|
177088
177331
|
if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
|
@@ -177092,7 +177335,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
177092
177335
|
output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
|
177093
177336
|
await disconnectResourceFromAllProjects(client2, resource);
|
177094
177337
|
output_manager_default.success(
|
177095
|
-
`Disconnected all projects from ${
|
177338
|
+
`Disconnected all projects from ${import_chalk102.default.bold(resource.name)}`
|
177096
177339
|
);
|
177097
177340
|
} catch (error3) {
|
177098
177341
|
throw new FailedError(
|
@@ -177103,9 +177346,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
|
|
177103
177346
|
}
|
177104
177347
|
async function confirmDisconnectProject(client2, resource, project) {
|
177105
177348
|
output_manager_default.log(
|
177106
|
-
`The resource ${
|
177349
|
+
`The resource ${import_chalk102.default.bold(resource.name)} will be disconnected from project ${import_chalk102.default.bold(project.name)}.`
|
177107
177350
|
);
|
177108
|
-
return client2.input.confirm(`${
|
177351
|
+
return client2.input.confirm(`${import_chalk102.default.red("Are you sure?")}`, false);
|
177109
177352
|
}
|
177110
177353
|
async function confirmDisconnectAllProjects(client2, resource) {
|
177111
177354
|
output_manager_default.log("The following projects will be disconnected:");
|
@@ -177116,13 +177359,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
|
|
177116
177359
|
output_manager_default.print(` ${project.name}
|
177117
177360
|
`);
|
177118
177361
|
}
|
177119
|
-
return client2.input.confirm(
|
177362
|
+
return client2.input.confirm(import_chalk102.default.red("Are you sure?"), false);
|
177120
177363
|
}
|
177121
|
-
var
|
177364
|
+
var import_chalk102;
|
177122
177365
|
var init_disconnect4 = __esm({
|
177123
177366
|
"src/commands/integration-resource/disconnect.ts"() {
|
177124
177367
|
"use strict";
|
177125
|
-
|
177368
|
+
import_chalk102 = __toESM3(require_source());
|
177126
177369
|
init_output_manager();
|
177127
177370
|
init_get_args();
|
177128
177371
|
init_get_flags_specification();
|
@@ -177133,7 +177376,7 @@ var init_disconnect4 = __esm({
|
|
177133
177376
|
init_link2();
|
177134
177377
|
init_disconnect3();
|
177135
177378
|
init_types();
|
177136
|
-
|
177379
|
+
init_command16();
|
177137
177380
|
}
|
177138
177381
|
});
|
177139
177382
|
|
@@ -177227,7 +177470,7 @@ async function remove4(client2) {
|
|
177227
177470
|
);
|
177228
177471
|
output_manager_default.stopSpinner();
|
177229
177472
|
if (!targetedResource) {
|
177230
|
-
output_manager_default.error(`No resource ${
|
177473
|
+
output_manager_default.error(`No resource ${import_chalk103.default.bold(resourceName)} found.`);
|
177231
177474
|
return 0;
|
177232
177475
|
}
|
177233
177476
|
if (disconnectAll) {
|
@@ -177258,7 +177501,7 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
177258
177501
|
const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
|
177259
177502
|
if (!options?.skipProjectCheck && hasProjects) {
|
177260
177503
|
output_manager_default.error(
|
177261
|
-
`Cannot delete resource ${
|
177504
|
+
`Cannot delete resource ${import_chalk103.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
|
177262
177505
|
);
|
177263
177506
|
return 1;
|
177264
177507
|
}
|
@@ -177269,24 +177512,24 @@ async function handleDeleteResource(client2, team, resource, options) {
|
|
177269
177512
|
try {
|
177270
177513
|
output_manager_default.spinner("Deleting resource\u2026", 500);
|
177271
177514
|
await deleteResource(client2, resource, team);
|
177272
|
-
output_manager_default.success(`${
|
177515
|
+
output_manager_default.success(`${import_chalk103.default.bold(resource.name)} successfully deleted.`);
|
177273
177516
|
} catch (error3) {
|
177274
177517
|
output_manager_default.error(
|
177275
|
-
`A problem occurred when attempting to delete ${
|
177518
|
+
`A problem occurred when attempting to delete ${import_chalk103.default.bold(resource.name)}: ${error3.message}`
|
177276
177519
|
);
|
177277
177520
|
return 1;
|
177278
177521
|
}
|
177279
177522
|
return 0;
|
177280
177523
|
}
|
177281
177524
|
async function confirmDeleteResource(client2, resource) {
|
177282
|
-
output_manager_default.log(`${
|
177283
|
-
return client2.input.confirm(`${
|
177525
|
+
output_manager_default.log(`${import_chalk103.default.bold(resource.name)} will be deleted permanently.`);
|
177526
|
+
return client2.input.confirm(`${import_chalk103.default.red("Are you sure?")}`, false);
|
177284
177527
|
}
|
177285
|
-
var
|
177528
|
+
var import_chalk103;
|
177286
177529
|
var init_remove_resource = __esm({
|
177287
177530
|
"src/commands/integration-resource/remove-resource.ts"() {
|
177288
177531
|
"use strict";
|
177289
|
-
|
177532
|
+
import_chalk103 = __toESM3(require_source());
|
177290
177533
|
init_output_manager();
|
177291
177534
|
init_get_args();
|
177292
177535
|
init_get_flags_specification();
|
@@ -177296,7 +177539,7 @@ var init_remove_resource = __esm({
|
|
177296
177539
|
init_get_resources();
|
177297
177540
|
init_types();
|
177298
177541
|
init_remove4();
|
177299
|
-
|
177542
|
+
init_command16();
|
177300
177543
|
init_disconnect4();
|
177301
177544
|
}
|
177302
177545
|
});
|
@@ -177319,7 +177562,7 @@ async function main12(client2) {
|
|
177319
177562
|
);
|
177320
177563
|
const { subcommand, subcommandOriginal } = getSubcommand(
|
177321
177564
|
args2.slice(1),
|
177322
|
-
|
177565
|
+
COMMAND_CONFIG14
|
177323
177566
|
);
|
177324
177567
|
const needHelp = flags["--help"];
|
177325
177568
|
if (!subcommand && needHelp) {
|
@@ -177365,12 +177608,12 @@ async function main12(client2) {
|
|
177365
177608
|
return disconnect2(client2);
|
177366
177609
|
}
|
177367
177610
|
default: {
|
177368
|
-
output_manager_default.error(getInvalidSubcommand(
|
177611
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG14));
|
177369
177612
|
return 2;
|
177370
177613
|
}
|
177371
177614
|
}
|
177372
177615
|
}
|
177373
|
-
var
|
177616
|
+
var COMMAND_CONFIG14;
|
177374
177617
|
var init_integration_resource2 = __esm({
|
177375
177618
|
"src/commands/integration-resource/index.ts"() {
|
177376
177619
|
"use strict";
|
@@ -177382,11 +177625,11 @@ var init_integration_resource2 = __esm({
|
|
177382
177625
|
init_get_subcommand();
|
177383
177626
|
init_integration_resource();
|
177384
177627
|
init_help();
|
177385
|
-
|
177628
|
+
init_command16();
|
177386
177629
|
init_create_threshold2();
|
177387
177630
|
init_disconnect4();
|
177388
177631
|
init_remove_resource();
|
177389
|
-
|
177632
|
+
COMMAND_CONFIG14 = {
|
177390
177633
|
remove: getCommandAliases(removeSubcommand6),
|
177391
177634
|
disconnect: getCommandAliases(disconnectSubcommand2),
|
177392
177635
|
"create-threshold": getCommandAliases(createThresholdSubcommand)
|
@@ -177507,7 +177750,7 @@ var init_link4 = __esm({
|
|
177507
177750
|
init_ensure_link();
|
177508
177751
|
init_repo();
|
177509
177752
|
init_help();
|
177510
|
-
|
177753
|
+
init_command18();
|
177511
177754
|
init_get_flags_specification();
|
177512
177755
|
init_error2();
|
177513
177756
|
init_output_manager();
|
@@ -177732,7 +177975,7 @@ async function list5(client2) {
|
|
177732
177975
|
}
|
177733
177976
|
const projectSlugLink = formatProject(contextName, project.name);
|
177734
177977
|
if (!singleDeployment) {
|
177735
|
-
spinner(`Fetching deployments in ${
|
177978
|
+
spinner(`Fetching deployments in ${import_chalk104.default.bold(contextName)}`);
|
177736
177979
|
const start = Date.now();
|
177737
177980
|
debug2("Fetching deployments");
|
177738
177981
|
const query = new URLSearchParams({ limit: "20", projectId: project.id });
|
@@ -177772,7 +178015,7 @@ async function list5(client2) {
|
|
177772
178015
|
const urls = [];
|
177773
178016
|
const tablePrint = table(
|
177774
178017
|
[
|
177775
|
-
headers.map((header) =>
|
178018
|
+
headers.map((header) => import_chalk104.default.bold(import_chalk104.default.cyan(header))),
|
177776
178019
|
...deployments.sort(sortByCreatedAt).map((dep) => {
|
177777
178020
|
urls.push(`https://${dep.url}`);
|
177778
178021
|
const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
|
@@ -177782,16 +178025,16 @@ async function list5(client2) {
|
|
177782
178025
|
const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
|
177783
178026
|
const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
|
177784
178027
|
return [
|
177785
|
-
|
178028
|
+
import_chalk104.default.gray(createdAt),
|
177786
178029
|
`https://${dep.url}`,
|
177787
178030
|
stateString2(dep.readyState || ""),
|
177788
178031
|
formatEnvironment(contextName, project.name, {
|
177789
178032
|
id: targetSlug,
|
177790
178033
|
slug: targetName
|
177791
178034
|
}),
|
177792
|
-
...!showPolicy ? [
|
177793
|
-
...!showPolicy ? [
|
177794
|
-
...showPolicy ? [
|
178035
|
+
...!showPolicy ? [import_chalk104.default.gray(getDeploymentDuration(dep))] : [],
|
178036
|
+
...!showPolicy ? [import_chalk104.default.gray(dep.creator?.username)] : [],
|
178037
|
+
...showPolicy ? [import_chalk104.default.gray(proposedExp)] : []
|
177795
178038
|
];
|
177796
178039
|
}).filter(
|
177797
178040
|
(app2) => (
|
@@ -177838,17 +178081,17 @@ function stateString2(s) {
|
|
177838
178081
|
case "BUILDING":
|
177839
178082
|
case "DEPLOYING":
|
177840
178083
|
case "ANALYZING":
|
177841
|
-
return
|
178084
|
+
return import_chalk104.default.yellow(CIRCLE) + sTitle;
|
177842
178085
|
case "ERROR":
|
177843
|
-
return
|
178086
|
+
return import_chalk104.default.red(CIRCLE) + sTitle;
|
177844
178087
|
case "READY":
|
177845
|
-
return
|
178088
|
+
return import_chalk104.default.green(CIRCLE) + sTitle;
|
177846
178089
|
case "QUEUED":
|
177847
|
-
return
|
178090
|
+
return import_chalk104.default.white(CIRCLE) + sTitle;
|
177848
178091
|
case "CANCELED":
|
177849
|
-
return
|
178092
|
+
return import_chalk104.default.gray(sTitle);
|
177850
178093
|
default:
|
177851
|
-
return
|
178094
|
+
return import_chalk104.default.gray("UNKNOWN");
|
177852
178095
|
}
|
177853
178096
|
}
|
177854
178097
|
function sortByCreatedAt(a, b) {
|
@@ -177864,12 +178107,12 @@ function filterUniqueApps() {
|
|
177864
178107
|
return true;
|
177865
178108
|
};
|
177866
178109
|
}
|
177867
|
-
var import_ms21,
|
178110
|
+
var import_ms21, import_chalk104, import_title8, import_error_utils29;
|
177868
178111
|
var init_list8 = __esm({
|
177869
178112
|
"src/commands/list/index.ts"() {
|
177870
178113
|
"use strict";
|
177871
178114
|
import_ms21 = __toESM3(require_ms());
|
177872
|
-
|
178115
|
+
import_chalk104 = __toESM3(require_source());
|
177873
178116
|
import_title8 = __toESM3(require_lib4());
|
177874
178117
|
init_table();
|
177875
178118
|
init_get_args();
|
@@ -177886,7 +178129,7 @@ var init_list8 = __esm({
|
|
177886
178129
|
init_errors_ts();
|
177887
178130
|
import_error_utils29 = __toESM3(require_dist2());
|
177888
178131
|
init_help();
|
177889
|
-
|
178132
|
+
init_command19();
|
177890
178133
|
init_parse_target();
|
177891
178134
|
init_get_flags_specification();
|
177892
178135
|
init_get_deployment();
|
@@ -178033,7 +178276,7 @@ async function logs(client2) {
|
|
178033
178276
|
} catch {
|
178034
178277
|
}
|
178035
178278
|
spinner(
|
178036
|
-
`Fetching deployment "${deploymentIdOrHost}" in ${
|
178279
|
+
`Fetching deployment "${deploymentIdOrHost}" in ${import_chalk105.default.bold(contextName)}`
|
178037
178280
|
);
|
178038
178281
|
let deployment;
|
178039
178282
|
try {
|
@@ -178069,19 +178312,19 @@ function printDisclaimer(deployment) {
|
|
178069
178312
|
`This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
|
178070
178313
|
);
|
178071
178314
|
output_manager_default.print(
|
178072
|
-
`Displaying runtime logs for deployment ${deployment.url} (${
|
178315
|
+
`Displaying runtime logs for deployment ${deployment.url} (${import_chalk105.default.dim(
|
178073
178316
|
deployment.id
|
178074
|
-
)}) starting from ${
|
178317
|
+
)}) starting from ${import_chalk105.default.bold((0, import_format3.default)(Date.now(), dateTimeFormat2))}
|
178075
178318
|
|
178076
178319
|
`
|
178077
178320
|
);
|
178078
178321
|
}
|
178079
|
-
var import_error_utils30,
|
178322
|
+
var import_error_utils30, import_chalk105, import_format3, deprecatedFlags, dateTimeFormat2;
|
178080
178323
|
var init_logs3 = __esm({
|
178081
178324
|
"src/commands/logs/index.ts"() {
|
178082
178325
|
"use strict";
|
178083
178326
|
import_error_utils30 = __toESM3(require_dist2());
|
178084
|
-
|
178327
|
+
import_chalk105 = __toESM3(require_source());
|
178085
178328
|
import_format3 = __toESM3(require_format());
|
178086
178329
|
init_build_state();
|
178087
178330
|
init_is_deploying();
|
@@ -178097,7 +178340,7 @@ var init_logs3 = __esm({
|
|
178097
178340
|
init_logs2();
|
178098
178341
|
init_help();
|
178099
178342
|
init_list8();
|
178100
|
-
|
178343
|
+
init_command22();
|
178101
178344
|
init_output_manager();
|
178102
178345
|
deprecatedFlags = [
|
178103
178346
|
"--follow",
|
@@ -178172,14 +178415,14 @@ async function login2(client2) {
|
|
178172
178415
|
}).on("SIGINT", () => process.exit(0));
|
178173
178416
|
rl.question(
|
178174
178417
|
`
|
178175
|
-
Visit ${
|
178418
|
+
Visit ${import_chalk106.default.bold(
|
178176
178419
|
output_manager_default.link(
|
178177
178420
|
verification_uri.replace("https://", ""),
|
178178
178421
|
verification_uri_complete,
|
178179
178422
|
{ color: false, fallback: () => verification_uri_complete }
|
178180
178423
|
)
|
178181
|
-
)}${output_manager_default.supportsHyperlink ? ` and enter ${
|
178182
|
-
${
|
178424
|
+
)}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk106.default.bold(user_code)}` : ""}
|
178425
|
+
${import_chalk106.default.grey("Press [ENTER] to open the browser")}
|
178183
178426
|
`,
|
178184
178427
|
() => {
|
178185
178428
|
open5.default(verification_uri_complete);
|
@@ -178255,12 +178498,12 @@ async function login2(client2) {
|
|
178255
178498
|
client2.writeToConfigFile();
|
178256
178499
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
178257
178500
|
output_manager_default.print(`
|
178258
|
-
${
|
178501
|
+
${import_chalk106.default.cyan("Congratulations!")} You are now signed in.
|
178259
178502
|
|
178260
178503
|
To deploy something, run ${getCommandName()}.
|
178261
178504
|
|
178262
178505
|
${emoji("tip")} To deploy every commit automatically,
|
178263
|
-
connect a Git Repository (${
|
178506
|
+
connect a Git Repository (${import_chalk106.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
|
178264
178507
|
`);
|
178265
178508
|
return;
|
178266
178509
|
}
|
@@ -178273,12 +178516,12 @@ async function login2(client2) {
|
|
178273
178516
|
printError(error3);
|
178274
178517
|
return 1;
|
178275
178518
|
}
|
178276
|
-
var import_node_readline,
|
178519
|
+
var import_node_readline, import_chalk106, open5, import_ansi_escapes6;
|
178277
178520
|
var init_future = __esm({
|
178278
178521
|
"src/commands/login/future.ts"() {
|
178279
178522
|
"use strict";
|
178280
178523
|
import_node_readline = __toESM3(require("readline"));
|
178281
|
-
|
178524
|
+
import_chalk106 = __toESM3(require_source());
|
178282
178525
|
open5 = __toESM3(require_open());
|
178283
178526
|
import_ansi_escapes6 = __toESM3(require_ansi_escapes());
|
178284
178527
|
init_error2();
|
@@ -178358,7 +178601,7 @@ async function login3(client2) {
|
|
178358
178601
|
writeToConfigFile(client2.config);
|
178359
178602
|
output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
|
178360
178603
|
output_manager_default.print(
|
178361
|
-
`${
|
178604
|
+
`${import_chalk107.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
|
178362
178605
|
`
|
178363
178606
|
);
|
178364
178607
|
output_manager_default.print(
|
@@ -178370,12 +178613,12 @@ async function login3(client2) {
|
|
178370
178613
|
);
|
178371
178614
|
return 0;
|
178372
178615
|
}
|
178373
|
-
var import_email_validator,
|
178616
|
+
var import_email_validator, import_chalk107;
|
178374
178617
|
var init_login3 = __esm({
|
178375
178618
|
"src/commands/login/index.ts"() {
|
178376
178619
|
"use strict";
|
178377
178620
|
import_email_validator = __toESM3(require_email_validator());
|
178378
|
-
|
178621
|
+
import_chalk107 = __toESM3(require_source());
|
178379
178622
|
init_humanize_path();
|
178380
178623
|
init_get_args();
|
178381
178624
|
init_prompt();
|
@@ -178389,7 +178632,7 @@ var init_login3 = __esm({
|
|
178389
178632
|
init_global_path();
|
178390
178633
|
init_files();
|
178391
178634
|
init_help();
|
178392
|
-
|
178635
|
+
init_command20();
|
178393
178636
|
init_update_current_team_after_login();
|
178394
178637
|
init_get_flags_specification();
|
178395
178638
|
init_error2();
|
@@ -178538,7 +178781,7 @@ var init_logout2 = __esm({
|
|
178538
178781
|
init_errors_ts();
|
178539
178782
|
import_error_utils32 = __toESM3(require_dist2());
|
178540
178783
|
init_help();
|
178541
|
-
|
178784
|
+
init_command21();
|
178542
178785
|
init_get_flags_specification();
|
178543
178786
|
init_output_manager();
|
178544
178787
|
init_logout();
|
@@ -178562,7 +178805,7 @@ async function pull2(client2) {
|
|
178562
178805
|
client2.config.currentTeam = org.type === "team" ? org.id : void 0;
|
178563
178806
|
const { contextName } = await getScope(client2);
|
178564
178807
|
output_manager_default.spinner(
|
178565
|
-
`Fetching microfrontends configuration in ${
|
178808
|
+
`Fetching microfrontends configuration in ${import_chalk108.default.bold(contextName)}`
|
178566
178809
|
);
|
178567
178810
|
let parsedArgs;
|
178568
178811
|
const flagsSpecification = getFlagsSpecification(pullSubcommand2.options);
|
@@ -178610,11 +178853,11 @@ async function pull2(client2) {
|
|
178610
178853
|
const microfrontendsStamp = stamp_default();
|
178611
178854
|
output_manager_default.print(
|
178612
178855
|
`${prependEmoji(
|
178613
|
-
`Downloaded microfrontends configuration to ${
|
178856
|
+
`Downloaded microfrontends configuration to ${import_chalk108.default.bold(
|
178614
178857
|
humanizePath(
|
178615
178858
|
(0, import_node_path5.join)(currentDirectory, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS)
|
178616
178859
|
)
|
178617
|
-
)} ${
|
178860
|
+
)} ${import_chalk108.default.gray(microfrontendsStamp())}`,
|
178618
178861
|
emoji("success")
|
178619
178862
|
)}
|
178620
178863
|
`
|
@@ -178626,11 +178869,11 @@ async function pull2(client2) {
|
|
178626
178869
|
return 1;
|
178627
178870
|
}
|
178628
178871
|
}
|
178629
|
-
var
|
178872
|
+
var import_chalk108, import_node_path5, import_fs_extra23, VERCEL_DIR3, VERCEL_DIR_MICROFRONTENDS;
|
178630
178873
|
var init_pull5 = __esm({
|
178631
178874
|
"src/commands/microfrontends/pull.ts"() {
|
178632
178875
|
"use strict";
|
178633
|
-
|
178876
|
+
import_chalk108 = __toESM3(require_source());
|
178634
178877
|
import_node_path5 = require("path");
|
178635
178878
|
init_output_manager();
|
178636
178879
|
init_get_scope();
|
@@ -178639,7 +178882,7 @@ var init_pull5 = __esm({
|
|
178639
178882
|
init_humanize_path();
|
178640
178883
|
init_stamp();
|
178641
178884
|
import_fs_extra23 = __toESM3(require_lib());
|
178642
|
-
|
178885
|
+
init_command23();
|
178643
178886
|
init_get_flags_specification();
|
178644
178887
|
init_get_args();
|
178645
178888
|
init_error2();
|
@@ -178690,7 +178933,7 @@ async function main13(client2) {
|
|
178690
178933
|
}
|
178691
178934
|
let { subcommand, subcommandOriginal } = getSubcommand(
|
178692
178935
|
parsedArgs.args.slice(1),
|
178693
|
-
|
178936
|
+
COMMAND_CONFIG15
|
178694
178937
|
);
|
178695
178938
|
const needHelp = parsedArgs.flags["--help"];
|
178696
178939
|
if (!subcommand && needHelp) {
|
@@ -178718,14 +178961,14 @@ async function main13(client2) {
|
|
178718
178961
|
telemetry2.trackCliSubcommandPull(subcommandOriginal);
|
178719
178962
|
return pull2(client2);
|
178720
178963
|
default:
|
178721
|
-
output_manager_default.error(getInvalidSubcommand(
|
178964
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG15));
|
178722
178965
|
output_manager_default.print(
|
178723
178966
|
help2(microfrontendsCommand, { columns: client2.stderr.columns })
|
178724
178967
|
);
|
178725
178968
|
return 2;
|
178726
178969
|
}
|
178727
178970
|
}
|
178728
|
-
var
|
178971
|
+
var COMMAND_CONFIG15;
|
178729
178972
|
var init_microfrontends2 = __esm({
|
178730
178973
|
"src/commands/microfrontends/index.ts"() {
|
178731
178974
|
"use strict";
|
@@ -178734,13 +178977,13 @@ var init_microfrontends2 = __esm({
|
|
178734
178977
|
init_error2();
|
178735
178978
|
init_help();
|
178736
178979
|
init_pull5();
|
178737
|
-
|
178980
|
+
init_command23();
|
178738
178981
|
init_get_flags_specification();
|
178739
178982
|
init_output_manager();
|
178740
178983
|
init_commands();
|
178741
178984
|
init_get_subcommand();
|
178742
178985
|
init_microfrontends();
|
178743
|
-
|
178986
|
+
COMMAND_CONFIG15 = {
|
178744
178987
|
pull: getCommandAliases(pullSubcommand2)
|
178745
178988
|
};
|
178746
178989
|
}
|
@@ -178783,12 +179026,12 @@ async function add6(client2, argv) {
|
|
178783
179026
|
const { args: args2 } = parsedArgs;
|
178784
179027
|
if (args2.length !== 1) {
|
178785
179028
|
output_manager_default.error(
|
178786
|
-
`Invalid number of arguments. Usage: ${
|
179029
|
+
`Invalid number of arguments. Usage: ${import_chalk109.default.cyan(
|
178787
179030
|
`${getCommandName("project add <name>")}`
|
178788
179031
|
)}`
|
178789
179032
|
);
|
178790
179033
|
if (args2.length > 1) {
|
178791
|
-
const example =
|
179034
|
+
const example = import_chalk109.default.cyan(
|
178792
179035
|
`${getCommandName(`project add "${args2.join(" ")}"`)}`
|
178793
179036
|
);
|
178794
179037
|
output_manager_default.log(
|
@@ -178816,24 +179059,24 @@ async function add6(client2, argv) {
|
|
178816
179059
|
const elapsed2 = (0, import_ms22.default)(Date.now() - start);
|
178817
179060
|
const { contextName } = await getScope(client2);
|
178818
179061
|
output_manager_default.log(
|
178819
|
-
`${
|
179062
|
+
`${import_chalk109.default.cyan("Success!")} Project ${import_chalk109.default.bold(
|
178820
179063
|
name.toLowerCase()
|
178821
|
-
)} added (${
|
179064
|
+
)} added (${import_chalk109.default.bold(contextName)}) ${import_chalk109.default.gray(`[${elapsed2}]`)}`
|
178822
179065
|
);
|
178823
179066
|
return 0;
|
178824
179067
|
}
|
178825
|
-
var
|
179068
|
+
var import_chalk109, import_ms22;
|
178826
179069
|
var init_add12 = __esm({
|
178827
179070
|
"src/commands/project/add.ts"() {
|
178828
179071
|
"use strict";
|
178829
|
-
|
179072
|
+
import_chalk109 = __toESM3(require_source());
|
178830
179073
|
import_ms22 = __toESM3(require_ms());
|
178831
179074
|
init_errors_ts();
|
178832
179075
|
init_pkg_name();
|
178833
179076
|
init_create_project();
|
178834
179077
|
init_output_manager();
|
178835
179078
|
init_add11();
|
178836
|
-
|
179079
|
+
init_command24();
|
178837
179080
|
init_get_args();
|
178838
179081
|
init_get_flags_specification();
|
178839
179082
|
init_error2();
|
@@ -178925,7 +179168,7 @@ async function inspect4(client2, argv) {
|
|
178925
179168
|
telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
|
178926
179169
|
if (args2.length !== 0 && args2.length !== 1) {
|
178927
179170
|
output_manager_default.error(
|
178928
|
-
`Invalid number of arguments. Usage: ${
|
179171
|
+
`Invalid number of arguments. Usage: ${import_chalk110.default.cyan(
|
178929
179172
|
`${getCommandName("project inspect <name>")}`
|
178930
179173
|
)}`
|
178931
179174
|
);
|
@@ -178940,57 +179183,57 @@ async function inspect4(client2, argv) {
|
|
178940
179183
|
});
|
178941
179184
|
const org = await getTeamById(client2, project.accountId);
|
178942
179185
|
const projectSlugLink = formatProject(org.slug, project.name);
|
178943
|
-
output_manager_default.log(`Found Project ${projectSlugLink} ${
|
179186
|
+
output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk110.default.gray(inspectStamp())}`);
|
178944
179187
|
output_manager_default.print("\n");
|
178945
|
-
output_manager_default.print(
|
178946
|
-
output_manager_default.print(` ${
|
179188
|
+
output_manager_default.print(import_chalk110.default.bold(" General\n\n"));
|
179189
|
+
output_manager_default.print(` ${import_chalk110.default.cyan("ID")} ${project.id}
|
178947
179190
|
`);
|
178948
|
-
output_manager_default.print(` ${
|
179191
|
+
output_manager_default.print(` ${import_chalk110.default.cyan("Name")} ${project.name}
|
178949
179192
|
`);
|
178950
|
-
output_manager_default.print(` ${
|
179193
|
+
output_manager_default.print(` ${import_chalk110.default.cyan("Owner")} ${org.name}
|
178951
179194
|
`);
|
178952
179195
|
output_manager_default.print(
|
178953
|
-
` ${
|
179196
|
+
` ${import_chalk110.default.cyan("Created At")} ${formatDate(project.createdAt)}
|
178954
179197
|
`
|
178955
179198
|
);
|
178956
179199
|
output_manager_default.print(
|
178957
|
-
` ${
|
179200
|
+
` ${import_chalk110.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
|
178958
179201
|
`
|
178959
179202
|
);
|
178960
179203
|
output_manager_default.print(
|
178961
|
-
` ${
|
179204
|
+
` ${import_chalk110.default.cyan("Node.js Version")} ${project.nodeVersion}
|
178962
179205
|
`
|
178963
179206
|
);
|
178964
179207
|
const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
|
178965
179208
|
output_manager_default.print("\n");
|
178966
|
-
output_manager_default.print(
|
178967
|
-
output_manager_default.print(` ${
|
179209
|
+
output_manager_default.print(import_chalk110.default.bold(" Framework Settings\n\n"));
|
179210
|
+
output_manager_default.print(` ${import_chalk110.default.cyan("Framework Preset")} ${framework?.name}
|
178968
179211
|
`);
|
178969
179212
|
output_manager_default.print(
|
178970
|
-
` ${
|
179213
|
+
` ${import_chalk110.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk110.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
|
178971
179214
|
`
|
178972
179215
|
);
|
178973
179216
|
output_manager_default.print(
|
178974
|
-
` ${
|
179217
|
+
` ${import_chalk110.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk110.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
|
178975
179218
|
`
|
178976
179219
|
);
|
178977
179220
|
output_manager_default.print(
|
178978
|
-
` ${
|
179221
|
+
` ${import_chalk110.default.cyan("Install Command")} ${project.installCommand ?? import_chalk110.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
|
178979
179222
|
`
|
178980
179223
|
);
|
178981
179224
|
output_manager_default.print("\n");
|
178982
179225
|
return 0;
|
178983
179226
|
}
|
178984
|
-
var
|
179227
|
+
var import_chalk110, import_frameworks7;
|
178985
179228
|
var init_inspect6 = __esm({
|
178986
179229
|
"src/commands/project/inspect.ts"() {
|
178987
179230
|
"use strict";
|
178988
|
-
|
179231
|
+
import_chalk110 = __toESM3(require_source());
|
178989
179232
|
import_frameworks7 = __toESM3(require_frameworks());
|
178990
179233
|
init_pkg_name();
|
178991
179234
|
init_inspect5();
|
178992
179235
|
init_output_manager();
|
178993
|
-
|
179236
|
+
init_command24();
|
178994
179237
|
init_get_args();
|
178995
179238
|
init_get_flags_specification();
|
178996
179239
|
init_error2();
|
@@ -179044,7 +179287,7 @@ async function list6(client2, argv) {
|
|
179044
179287
|
const { args: args2, flags: opts } = parsedArgs;
|
179045
179288
|
if (args2.length !== 0) {
|
179046
179289
|
output_manager_default.error(
|
179047
|
-
`Invalid number of arguments. Usage: ${
|
179290
|
+
`Invalid number of arguments. Usage: ${import_chalk111.default.cyan(
|
179048
179291
|
`${getCommandName("project ls")}`
|
179049
179292
|
)}`
|
179050
179293
|
);
|
@@ -179052,7 +179295,7 @@ async function list6(client2, argv) {
|
|
179052
179295
|
}
|
179053
179296
|
const start = Date.now();
|
179054
179297
|
const { contextName } = await getScope(client2);
|
179055
|
-
output_manager_default.spinner(`Fetching projects in ${
|
179298
|
+
output_manager_default.spinner(`Fetching projects in ${import_chalk111.default.bold(contextName)}`);
|
179056
179299
|
let projectsUrl = "/v9/projects?limit=20";
|
179057
179300
|
const deprecated = opts["--update-required"] || false;
|
179058
179301
|
telemetryClient.trackCliFlagUpdateRequired(deprecated);
|
@@ -179073,7 +179316,7 @@ async function list6(client2, argv) {
|
|
179073
179316
|
output_manager_default.stopSpinner();
|
179074
179317
|
const elapsed2 = (0, import_ms23.default)(Date.now() - start);
|
179075
179318
|
output_manager_default.log(
|
179076
|
-
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${
|
179319
|
+
`${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk111.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk111.default.gray(`[${elapsed2}]`)}`
|
179077
179320
|
);
|
179078
179321
|
if (projectList.length > 0) {
|
179079
179322
|
const tablePrint = table(
|
@@ -179083,12 +179326,12 @@ async function list6(client2, argv) {
|
|
179083
179326
|
"Latest Production URL",
|
179084
179327
|
"Updated",
|
179085
179328
|
"Node Version"
|
179086
|
-
].map((header) =>
|
179329
|
+
].map((header) => import_chalk111.default.bold(import_chalk111.default.cyan(header))),
|
179087
179330
|
...projectList.flatMap((project) => [
|
179088
179331
|
[
|
179089
|
-
|
179332
|
+
import_chalk111.default.bold(project.name),
|
179090
179333
|
getLatestProdUrl(project),
|
179091
|
-
|
179334
|
+
import_chalk111.default.gray((0, import_ms23.default)(Date.now() - project.updatedAt)),
|
179092
179335
|
project.nodeVersion ?? ""
|
179093
179336
|
]
|
179094
179337
|
])
|
@@ -179113,18 +179356,18 @@ function getLatestProdUrl(project) {
|
|
179113
179356
|
return `https://${alias2}`;
|
179114
179357
|
return "--";
|
179115
179358
|
}
|
179116
|
-
var import_ms23,
|
179359
|
+
var import_ms23, import_chalk111;
|
179117
179360
|
var init_list10 = __esm({
|
179118
179361
|
"src/commands/project/list.ts"() {
|
179119
179362
|
"use strict";
|
179120
179363
|
import_ms23 = __toESM3(require_ms());
|
179121
|
-
|
179364
|
+
import_chalk111 = __toESM3(require_source());
|
179122
179365
|
init_table();
|
179123
179366
|
init_get_command_flags();
|
179124
179367
|
init_pkg_name();
|
179125
179368
|
init_list9();
|
179126
179369
|
init_output_manager();
|
179127
|
-
|
179370
|
+
init_command24();
|
179128
179371
|
init_get_args();
|
179129
179372
|
init_get_flags_specification();
|
179130
179373
|
init_error2();
|
@@ -179169,7 +179412,7 @@ async function rm6(client2, argv) {
|
|
179169
179412
|
const { args: args2 } = parsedArgs;
|
179170
179413
|
if (args2.length !== 1) {
|
179171
179414
|
output_manager_default.error(
|
179172
|
-
`Invalid number of arguments. Usage: ${
|
179415
|
+
`Invalid number of arguments. Usage: ${import_chalk112.default.cyan(
|
179173
179416
|
`${getCommandName("project rm <name>")}`
|
179174
179417
|
)}`
|
179175
179418
|
);
|
@@ -179199,7 +179442,7 @@ async function rm6(client2, argv) {
|
|
179199
179442
|
}
|
179200
179443
|
const elapsed2 = (0, import_ms24.default)(Date.now() - start);
|
179201
179444
|
output_manager_default.log(
|
179202
|
-
`${
|
179445
|
+
`${import_chalk112.default.cyan("Success!")} Project ${import_chalk112.default.bold(name)} removed ${import_chalk112.default.gray(
|
179203
179446
|
`[${elapsed2}]`
|
179204
179447
|
)}`
|
179205
179448
|
);
|
@@ -179208,22 +179451,22 @@ async function rm6(client2, argv) {
|
|
179208
179451
|
async function readConfirmation3(client2, projectName) {
|
179209
179452
|
output_manager_default.print(
|
179210
179453
|
prependEmoji(
|
179211
|
-
`The project ${
|
179454
|
+
`The project ${import_chalk112.default.bold(projectName)} will be removed permanently.
|
179212
179455
|
It will also delete everything under the project including deployments.
|
179213
179456
|
`,
|
179214
179457
|
emoji("warning")
|
179215
179458
|
)
|
179216
179459
|
);
|
179217
179460
|
return await client2.input.confirm(
|
179218
|
-
`${
|
179461
|
+
`${import_chalk112.default.bold.red("Are you sure?")}`,
|
179219
179462
|
false
|
179220
179463
|
);
|
179221
179464
|
}
|
179222
|
-
var
|
179465
|
+
var import_chalk112, import_ms24, e;
|
179223
179466
|
var init_rm10 = __esm({
|
179224
179467
|
"src/commands/project/rm.ts"() {
|
179225
179468
|
"use strict";
|
179226
|
-
|
179469
|
+
import_chalk112 = __toESM3(require_source());
|
179227
179470
|
import_ms24 = __toESM3(require_ms());
|
179228
179471
|
init_emoji();
|
179229
179472
|
init_errors_ts();
|
@@ -179233,7 +179476,7 @@ var init_rm10 = __esm({
|
|
179233
179476
|
init_get_args();
|
179234
179477
|
init_get_flags_specification();
|
179235
179478
|
init_error2();
|
179236
|
-
|
179479
|
+
init_command24();
|
179237
179480
|
e = encodeURIComponent;
|
179238
179481
|
}
|
179239
179482
|
});
|
@@ -179296,7 +179539,7 @@ async function main14(client2) {
|
|
179296
179539
|
}
|
179297
179540
|
let { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
179298
179541
|
parsedArgs.args.slice(1),
|
179299
|
-
|
179542
|
+
COMMAND_CONFIG16
|
179300
179543
|
);
|
179301
179544
|
const needHelp = parsedArgs.flags["--help"];
|
179302
179545
|
if (!subcommand && needHelp) {
|
@@ -179343,12 +179586,12 @@ async function main14(client2) {
|
|
179343
179586
|
telemetry2.trackCliSubcommandRemove(subcommandOriginal);
|
179344
179587
|
return rm6(client2, args2);
|
179345
179588
|
default:
|
179346
|
-
output_manager_default.error(getInvalidSubcommand(
|
179589
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG16));
|
179347
179590
|
output_manager_default.print(help2(projectCommand, { columns: client2.stderr.columns }));
|
179348
179591
|
return 2;
|
179349
179592
|
}
|
179350
179593
|
}
|
179351
|
-
var
|
179594
|
+
var COMMAND_CONFIG16;
|
179352
179595
|
var init_project2 = __esm({
|
179353
179596
|
"src/commands/project/index.ts"() {
|
179354
179597
|
"use strict";
|
@@ -179360,13 +179603,13 @@ var init_project2 = __esm({
|
|
179360
179603
|
init_inspect6();
|
179361
179604
|
init_list10();
|
179362
179605
|
init_rm10();
|
179363
|
-
|
179606
|
+
init_command24();
|
179364
179607
|
init_get_flags_specification();
|
179365
179608
|
init_project();
|
179366
179609
|
init_output_manager();
|
179367
179610
|
init_commands();
|
179368
179611
|
init_get_subcommand();
|
179369
|
-
|
179612
|
+
COMMAND_CONFIG16 = {
|
179370
179613
|
inspect: getCommandAliases(inspectSubcommand2),
|
179371
179614
|
list: getCommandAliases(listSubcommand7),
|
179372
179615
|
add: getCommandAliases(addSubcommand6),
|
@@ -179391,7 +179634,7 @@ async function getProjectByDeployment({
|
|
179391
179634
|
let team;
|
179392
179635
|
try {
|
179393
179636
|
output_manager_default?.spinner(
|
179394
|
-
`Fetching deployment "${deployId}" in ${
|
179637
|
+
`Fetching deployment "${deployId}" in ${import_chalk113.default.bold(contextName)}\u2026`
|
179395
179638
|
);
|
179396
179639
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
179397
179640
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -179408,12 +179651,12 @@ async function getProjectByDeployment({
|
|
179408
179651
|
team = teamResult.value;
|
179409
179652
|
deployment = deploymentResult.value;
|
179410
179653
|
output_manager_default?.log(
|
179411
|
-
`Fetching deployment "${deployId}" in ${
|
179654
|
+
`Fetching deployment "${deployId}" in ${import_chalk113.default.bold(contextName)}\u2026`
|
179412
179655
|
);
|
179413
179656
|
if (deployment.team?.id) {
|
179414
179657
|
if (!team || deployment.team.id !== team.id) {
|
179415
179658
|
const err = new Error(
|
179416
|
-
team ? `Deployment doesn't belong to current team ${
|
179659
|
+
team ? `Deployment doesn't belong to current team ${import_chalk113.default.bold(
|
179417
179660
|
contextName
|
179418
179661
|
)}` : `Deployment belongs to a different team`
|
179419
179662
|
);
|
@@ -179422,7 +179665,7 @@ async function getProjectByDeployment({
|
|
179422
179665
|
}
|
179423
179666
|
} else if (team) {
|
179424
179667
|
const err = new Error(
|
179425
|
-
`Deployment doesn't belong to current team ${
|
179668
|
+
`Deployment doesn't belong to current team ${import_chalk113.default.bold(contextName)}`
|
179426
179669
|
);
|
179427
179670
|
err.code = "ERR_INVALID_TEAM";
|
179428
179671
|
throw err;
|
@@ -179443,11 +179686,11 @@ async function getProjectByDeployment({
|
|
179443
179686
|
output_manager_default?.stopSpinner();
|
179444
179687
|
}
|
179445
179688
|
}
|
179446
|
-
var
|
179689
|
+
var import_chalk113;
|
179447
179690
|
var init_get_project_by_deployment = __esm({
|
179448
179691
|
"src/util/projects/get-project-by-deployment.ts"() {
|
179449
179692
|
"use strict";
|
179450
|
-
|
179693
|
+
import_chalk113 = __toESM3(require_source());
|
179451
179694
|
init_get_deployment();
|
179452
179695
|
init_get_project_by_id_or_name();
|
179453
179696
|
init_get_scope();
|
@@ -179459,23 +179702,23 @@ var init_get_project_by_deployment = __esm({
|
|
179459
179702
|
});
|
179460
179703
|
|
179461
179704
|
// src/util/alias/render-alias-status.ts
|
179462
|
-
function renderAliasStatus(
|
179463
|
-
if (
|
179464
|
-
return
|
179705
|
+
function renderAliasStatus(status3) {
|
179706
|
+
if (status3 === "completed") {
|
179707
|
+
return import_chalk114.default.green(status3);
|
179465
179708
|
}
|
179466
|
-
if (
|
179467
|
-
return
|
179709
|
+
if (status3 === "failed") {
|
179710
|
+
return import_chalk114.default.red(status3);
|
179468
179711
|
}
|
179469
|
-
if (
|
179470
|
-
return
|
179712
|
+
if (status3 === "skipped") {
|
179713
|
+
return import_chalk114.default.gray(status3);
|
179471
179714
|
}
|
179472
|
-
return
|
179715
|
+
return import_chalk114.default.yellow(status3);
|
179473
179716
|
}
|
179474
|
-
var
|
179717
|
+
var import_chalk114;
|
179475
179718
|
var init_render_alias_status = __esm({
|
179476
179719
|
"src/util/alias/render-alias-status.ts"() {
|
179477
179720
|
"use strict";
|
179478
|
-
|
179721
|
+
import_chalk114 = __toESM3(require_source());
|
179479
179722
|
}
|
179480
179723
|
});
|
179481
179724
|
|
@@ -179582,7 +179825,7 @@ async function promoteStatus({
|
|
179582
179825
|
}
|
179583
179826
|
if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
|
179584
179827
|
output_manager_default.log(
|
179585
|
-
`The promotion exceeded its deadline - rerun ${
|
179828
|
+
`The promotion exceeded its deadline - rerun ${import_chalk115.default.bold(
|
179586
179829
|
`${packageName} promote ${toDeploymentId}`
|
179587
179830
|
)} to try again`
|
179588
179831
|
);
|
@@ -179622,9 +179865,9 @@ async function renderJobFailed({
|
|
179622
179865
|
url3 += `&until=${nextTimestamp}`;
|
179623
179866
|
}
|
179624
179867
|
const { aliases, pagination } = await client2.fetch(url3);
|
179625
|
-
for (const { alias: alias2, status:
|
179868
|
+
for (const { alias: alias2, status: status3 } of aliases) {
|
179626
179869
|
output_manager_default.log(
|
179627
|
-
` ${renderAliasStatus(
|
179870
|
+
` ${renderAliasStatus(status3).padEnd(11)} ${alias2.alias} (${alias2.deploymentId})`
|
179628
179871
|
);
|
179629
179872
|
}
|
179630
179873
|
if (pagination?.next) {
|
@@ -179646,26 +179889,26 @@ async function renderJobSucceeded({
|
|
179646
179889
|
let deploymentInfo = "";
|
179647
179890
|
try {
|
179648
179891
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
179649
|
-
deploymentInfo = `${
|
179892
|
+
deploymentInfo = `${import_chalk115.default.bold(deployment.url)} (${toDeploymentId})`;
|
179650
179893
|
} catch (err) {
|
179651
179894
|
output_manager_default.debug(
|
179652
179895
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
179653
179896
|
);
|
179654
|
-
deploymentInfo =
|
179897
|
+
deploymentInfo = import_chalk115.default.bold(toDeploymentId);
|
179655
179898
|
}
|
179656
179899
|
const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
|
179657
179900
|
output_manager_default.log(
|
179658
|
-
`Success! ${
|
179901
|
+
`Success! ${import_chalk115.default.bold(
|
179659
179902
|
project.name
|
179660
179903
|
)} was promoted to ${deploymentInfo} ${duration}`
|
179661
179904
|
);
|
179662
179905
|
return 0;
|
179663
179906
|
}
|
179664
|
-
var
|
179665
|
-
var
|
179907
|
+
var import_chalk115, import_ms25;
|
179908
|
+
var init_status2 = __esm({
|
179666
179909
|
"src/commands/promote/status.ts"() {
|
179667
179910
|
"use strict";
|
179668
|
-
|
179911
|
+
import_chalk115 = __toESM3(require_source());
|
179669
179912
|
init_elapsed();
|
179670
179913
|
init_format_date();
|
179671
179914
|
init_get_deployment();
|
@@ -179722,7 +179965,7 @@ async function requestPromote({
|
|
179722
179965
|
}
|
179723
179966
|
);
|
179724
179967
|
output_manager_default.log(
|
179725
|
-
`Successfully created new deployment of ${
|
179968
|
+
`Successfully created new deployment of ${import_chalk116.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
|
179726
179969
|
);
|
179727
179970
|
return 0;
|
179728
179971
|
}
|
@@ -179743,7 +179986,7 @@ async function requestPromote({
|
|
179743
179986
|
}
|
179744
179987
|
if (timeout !== void 0 && (0, import_ms26.default)(timeout) === 0) {
|
179745
179988
|
output_manager_default.log(
|
179746
|
-
`Successfully requested promote of ${
|
179989
|
+
`Successfully requested promote of ${import_chalk116.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
179747
179990
|
);
|
179748
179991
|
output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
|
179749
179992
|
return 0;
|
@@ -179756,15 +179999,15 @@ async function requestPromote({
|
|
179756
179999
|
timeout
|
179757
180000
|
});
|
179758
180001
|
}
|
179759
|
-
var
|
180002
|
+
var import_chalk116, import_ms26;
|
179760
180003
|
var init_request_promote = __esm({
|
179761
180004
|
"src/commands/promote/request-promote.ts"() {
|
179762
180005
|
"use strict";
|
179763
|
-
|
180006
|
+
import_chalk116 = __toESM3(require_source());
|
179764
180007
|
init_pkg_name();
|
179765
180008
|
init_get_project_by_deployment();
|
179766
180009
|
import_ms26 = __toESM3(require_ms());
|
179767
|
-
|
180010
|
+
init_status2();
|
179768
180011
|
init_output_manager();
|
179769
180012
|
}
|
179770
180013
|
});
|
@@ -179822,8 +180065,8 @@ var init_promote2 = __esm({
|
|
179822
180065
|
init_error2();
|
179823
180066
|
import_error_utils33 = __toESM3(require_dist2());
|
179824
180067
|
init_request_promote();
|
179825
|
-
|
179826
|
-
|
180068
|
+
init_status2();
|
180069
|
+
init_command25();
|
179827
180070
|
init_help();
|
179828
180071
|
init_get_flags_specification();
|
179829
180072
|
init_promote();
|
@@ -179862,7 +180105,7 @@ var init_promote2 = __esm({
|
|
179862
180105
|
if (needHelp) {
|
179863
180106
|
telemetry2.trackCliFlagHelp("promote", "status");
|
179864
180107
|
output_manager_default.print(
|
179865
|
-
help2(
|
180108
|
+
help2(statusSubcommand2, {
|
179866
180109
|
columns: client2.stderr.columns,
|
179867
180110
|
parent: promoteCommand
|
179868
180111
|
})
|
@@ -179921,7 +180164,7 @@ async function getDeploymentByIdOrURL({
|
|
179921
180164
|
let team;
|
179922
180165
|
try {
|
179923
180166
|
output_manager_default.spinner(
|
179924
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
180167
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk117.default.bold(contextName)}\u2026`
|
179925
180168
|
);
|
179926
180169
|
const [teamResult, deploymentResult] = await Promise.allSettled([
|
179927
180170
|
config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
|
@@ -179938,7 +180181,7 @@ async function getDeploymentByIdOrURL({
|
|
179938
180181
|
team = teamResult.value;
|
179939
180182
|
deployment = deploymentResult.value;
|
179940
180183
|
output_manager_default.log(
|
179941
|
-
`Fetching deployment "${deployIdOrUrl}" in ${
|
180184
|
+
`Fetching deployment "${deployIdOrUrl}" in ${import_chalk117.default.bold(contextName)}\u2026`
|
179942
180185
|
);
|
179943
180186
|
} finally {
|
179944
180187
|
output_manager_default.stopSpinner();
|
@@ -179946,7 +180189,7 @@ async function getDeploymentByIdOrURL({
|
|
179946
180189
|
if (deployment.team?.id) {
|
179947
180190
|
if (!team || deployment.team.id !== team.id) {
|
179948
180191
|
const err = new Error(
|
179949
|
-
team ? `Deployment doesn't belong to current team ${
|
180192
|
+
team ? `Deployment doesn't belong to current team ${import_chalk117.default.bold(
|
179950
180193
|
contextName
|
179951
180194
|
)}` : `Deployment belongs to a different team`
|
179952
180195
|
);
|
@@ -179955,18 +180198,18 @@ async function getDeploymentByIdOrURL({
|
|
179955
180198
|
}
|
179956
180199
|
} else if (team) {
|
179957
180200
|
const err = new Error(
|
179958
|
-
`Deployment doesn't belong to current team ${
|
180201
|
+
`Deployment doesn't belong to current team ${import_chalk117.default.bold(contextName)}`
|
179959
180202
|
);
|
179960
180203
|
err.code = "ERR_INVALID_TEAM";
|
179961
180204
|
throw err;
|
179962
180205
|
}
|
179963
180206
|
return deployment;
|
179964
180207
|
}
|
179965
|
-
var
|
180208
|
+
var import_chalk117;
|
179966
180209
|
var init_get_deployment_by_id_or_url = __esm({
|
179967
180210
|
"src/util/deploy/get-deployment-by-id-or-url.ts"() {
|
179968
180211
|
"use strict";
|
179969
|
-
|
180212
|
+
import_chalk117 = __toESM3(require_source());
|
179970
180213
|
init_get_deployment();
|
179971
180214
|
init_get_team_by_id();
|
179972
180215
|
init_is_valid_name();
|
@@ -180105,14 +180348,14 @@ async function redeploy(client2) {
|
|
180105
180348
|
}
|
180106
180349
|
output_manager_default.print(
|
180107
180350
|
`${prependEmoji(
|
180108
|
-
`Inspect: ${
|
180351
|
+
`Inspect: ${import_chalk118.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
|
180109
180352
|
emoji("inspect")
|
180110
180353
|
)}
|
180111
180354
|
`
|
180112
180355
|
);
|
180113
180356
|
output_manager_default.print(
|
180114
180357
|
prependEmoji(
|
180115
|
-
`${isProdDeployment ? "Production" : "Preview"}: ${
|
180358
|
+
`${isProdDeployment ? "Production" : "Preview"}: ${import_chalk118.default.bold(
|
180116
180359
|
previewUrl
|
180117
180360
|
)} ${deployStamp()}`,
|
180118
180361
|
emoji("success")
|
@@ -180127,7 +180370,13 @@ async function redeploy(client2) {
|
|
180127
180370
|
deployment.readyState === "QUEUED" ? "Queued" : "Building",
|
180128
180371
|
0
|
180129
180372
|
);
|
180130
|
-
|
180373
|
+
let project;
|
180374
|
+
let rollingRelease2;
|
180375
|
+
if (deployment.projectId && deployment.projectId != "") {
|
180376
|
+
project = await getProjectByNameOrId(client2, deployment.projectId);
|
180377
|
+
rollingRelease2 = project?.rollingRelease;
|
180378
|
+
}
|
180379
|
+
if (deployment.readyState === "READY" && deployment.aliasAssigned && !rollingRelease2) {
|
180131
180380
|
output_manager_default.spinner("Completing", 0);
|
180132
180381
|
} else {
|
180133
180382
|
try {
|
@@ -180147,6 +180396,11 @@ async function redeploy(client2) {
|
|
180147
180396
|
)) {
|
180148
180397
|
if (event.type === "building") {
|
180149
180398
|
output_manager_default.spinner("Building", 0);
|
180399
|
+
} else if (event.type === "ready" && rollingRelease2) {
|
180400
|
+
output_manager_default.spinner("Releasing", 0);
|
180401
|
+
output_manager_default.stopSpinner();
|
180402
|
+
deployment = event.payload;
|
180403
|
+
break;
|
180150
180404
|
} else if (event.type === "ready" && (event.payload.checksState ? event.payload.checksState === "completed" : true)) {
|
180151
180405
|
output_manager_default.spinner("Completing", 0);
|
180152
180406
|
} else if (event.type === "checks-running") {
|
@@ -180182,17 +180436,17 @@ async function redeploy(client2) {
|
|
180182
180436
|
output_manager_default.prettyError(err);
|
180183
180437
|
if ((0, import_error_utils34.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
|
180184
180438
|
output_manager_default.error(
|
180185
|
-
`Use ${
|
180439
|
+
`Use ${import_chalk118.default.bold("vc switch")} to change your current team`
|
180186
180440
|
);
|
180187
180441
|
}
|
180188
180442
|
return 1;
|
180189
180443
|
}
|
180190
180444
|
}
|
180191
|
-
var
|
180445
|
+
var import_chalk118, import_client13, import_error_utils34;
|
180192
180446
|
var init_redeploy2 = __esm({
|
180193
180447
|
"src/commands/redeploy/index.ts"() {
|
180194
180448
|
"use strict";
|
180195
|
-
|
180449
|
+
import_chalk118 = __toESM3(require_source());
|
180196
180450
|
import_client13 = __toESM3(require_dist7());
|
180197
180451
|
init_emoji();
|
180198
180452
|
init_get_args();
|
@@ -180206,11 +180460,12 @@ var init_redeploy2 = __esm({
|
|
180206
180460
|
init_stamp();
|
180207
180461
|
init_ua();
|
180208
180462
|
init_help();
|
180209
|
-
|
180463
|
+
init_command27();
|
180210
180464
|
init_get_flags_specification();
|
180211
180465
|
init_output_manager();
|
180212
180466
|
init_redeploy();
|
180213
180467
|
init_get_custom_environments();
|
180468
|
+
init_get_project_by_id_or_name();
|
180214
180469
|
}
|
180215
180470
|
});
|
180216
180471
|
|
@@ -180399,7 +180654,7 @@ async function remove5(client2) {
|
|
180399
180654
|
}
|
180400
180655
|
const { contextName } = await getScope(client2);
|
180401
180656
|
output_manager_default.spinner(
|
180402
|
-
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${
|
180657
|
+
`Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk119.default.bold(contextName)}`
|
180403
180658
|
);
|
180404
180659
|
let aliases;
|
180405
180660
|
let projects;
|
@@ -180465,7 +180720,7 @@ async function remove5(client2) {
|
|
180465
180720
|
});
|
180466
180721
|
if (deployments.length === 0 && projects.length === 0) {
|
180467
180722
|
const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
|
180468
|
-
const stylizedIds = ids.map((id) =>
|
180723
|
+
const stylizedIds = ids.map((id) => import_chalk119.default.bold(`"${id}"`)).join(", ");
|
180469
180724
|
const commandName = getCommandName("projects ls");
|
180470
180725
|
log2(
|
180471
180726
|
`Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
|
@@ -180473,7 +180728,7 @@ async function remove5(client2) {
|
|
180473
180728
|
return 1;
|
180474
180729
|
}
|
180475
180730
|
log2(
|
180476
|
-
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${
|
180731
|
+
`Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk119.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
|
180477
180732
|
);
|
180478
180733
|
if (deployments.length > 200) {
|
180479
180734
|
output_manager_default.warn(
|
@@ -180500,11 +180755,11 @@ async function remove5(client2) {
|
|
180500
180755
|
`Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
|
180501
180756
|
);
|
180502
180757
|
deployments.forEach((depl) => {
|
180503
|
-
output_manager_default.print(`${
|
180758
|
+
output_manager_default.print(`${import_chalk119.default.gray("-")} ${import_chalk119.default.bold(depl.url)}
|
180504
180759
|
`);
|
180505
180760
|
});
|
180506
180761
|
projects.forEach((project) => {
|
180507
|
-
output_manager_default.print(`${
|
180762
|
+
output_manager_default.print(`${import_chalk119.default.gray("-")} ${import_chalk119.default.bold(project.name)}
|
180508
180763
|
`);
|
180509
180764
|
});
|
180510
180765
|
return 0;
|
@@ -180521,8 +180776,8 @@ function readConfirmation4(deployments, projects) {
|
|
180521
180776
|
);
|
180522
180777
|
const deploymentTable = table(
|
180523
180778
|
deployments.map((depl) => {
|
180524
|
-
const time =
|
180525
|
-
const url3 = depl.url ?
|
180779
|
+
const time = import_chalk119.default.gray(`${(0, import_ms28.default)(Date.now() - depl.createdAt)} ago`);
|
180780
|
+
const url3 = depl.url ? import_chalk119.default.underline(`https://${depl.url}`) : "";
|
180526
180781
|
return [` ${depl.id}`, url3, time];
|
180527
180782
|
}),
|
180528
180783
|
{ align: ["l", "r", "l"], hsep: 6 }
|
@@ -180533,7 +180788,7 @@ function readConfirmation4(deployments, projects) {
|
|
180533
180788
|
for (const depl of deployments) {
|
180534
180789
|
for (const { alias: alias2 } of depl.aliases) {
|
180535
180790
|
output_manager_default.warn(
|
180536
|
-
`${
|
180791
|
+
`${import_chalk119.default.underline(`https://${alias2}`)} is an alias for ${import_chalk119.default.bold(depl.url)} and will be removed`
|
180537
180792
|
);
|
180538
180793
|
}
|
180539
180794
|
}
|
@@ -180547,12 +180802,12 @@ function readConfirmation4(deployments, projects) {
|
|
180547
180802
|
`
|
180548
180803
|
);
|
180549
180804
|
for (const project of projects) {
|
180550
|
-
output_manager_default.print(`${
|
180805
|
+
output_manager_default.print(`${import_chalk119.default.gray("-")} ${import_chalk119.default.bold(project.name)}
|
180551
180806
|
`);
|
180552
180807
|
}
|
180553
180808
|
}
|
180554
180809
|
output_manager_default.print(
|
180555
|
-
`${
|
180810
|
+
`${import_chalk119.default.bold.red("> Are you sure?")} ${import_chalk119.default.gray("(y/N) ")}`
|
180556
180811
|
);
|
180557
180812
|
process.stdin.on("data", (d) => {
|
180558
180813
|
process.stdin.pause();
|
@@ -180569,11 +180824,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
|
|
180569
180824
|
}
|
180570
180825
|
return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
|
180571
180826
|
}
|
180572
|
-
var
|
180827
|
+
var import_chalk119, import_ms28, import_pluralize11;
|
180573
180828
|
var init_remove6 = __esm({
|
180574
180829
|
"src/commands/remove/index.ts"() {
|
180575
180830
|
"use strict";
|
180576
|
-
|
180831
|
+
import_chalk119 = __toESM3(require_source());
|
180577
180832
|
import_ms28 = __toESM3(require_ms());
|
180578
180833
|
import_pluralize11 = __toESM3(require_pluralize());
|
180579
180834
|
init_table();
|
@@ -180592,7 +180847,7 @@ var init_remove6 = __esm({
|
|
180592
180847
|
init_error2();
|
180593
180848
|
init_now_error();
|
180594
180849
|
init_help();
|
180595
|
-
|
180850
|
+
init_command28();
|
180596
180851
|
init_get_flags_specification();
|
180597
180852
|
init_remove5();
|
180598
180853
|
init_output_manager();
|
@@ -180669,7 +180924,7 @@ async function rollbackStatus({
|
|
180669
180924
|
}
|
180670
180925
|
if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
|
180671
180926
|
output_manager_default.log(
|
180672
|
-
`The rollback exceeded its deadline - rerun ${
|
180927
|
+
`The rollback exceeded its deadline - rerun ${import_chalk120.default.bold(
|
180673
180928
|
`${packageName} rollback ${toDeploymentId}`
|
180674
180929
|
)} to try again`
|
180675
180930
|
);
|
@@ -180709,9 +180964,9 @@ async function renderJobFailed2({
|
|
180709
180964
|
url3 += `&until=${nextTimestamp}`;
|
180710
180965
|
}
|
180711
180966
|
const { aliases, pagination } = await client2.fetch(url3);
|
180712
|
-
for (const { alias: alias2, status:
|
180967
|
+
for (const { alias: alias2, status: status3 } of aliases) {
|
180713
180968
|
output_manager_default.log(
|
180714
|
-
` ${renderAliasStatus(
|
180969
|
+
` ${renderAliasStatus(status3).padEnd(11)} ${alias2.alias} (${alias2.deploymentId})`
|
180715
180970
|
);
|
180716
180971
|
}
|
180717
180972
|
if (pagination?.next) {
|
@@ -180733,26 +180988,26 @@ async function renderJobSucceeded2({
|
|
180733
180988
|
let deploymentInfo = "";
|
180734
180989
|
try {
|
180735
180990
|
const deployment = await getDeployment(client2, contextName, toDeploymentId);
|
180736
|
-
deploymentInfo = `${
|
180991
|
+
deploymentInfo = `${import_chalk120.default.bold(deployment.url)} (${toDeploymentId})`;
|
180737
180992
|
} catch (err) {
|
180738
180993
|
output_manager_default.debug(
|
180739
180994
|
`Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
|
180740
180995
|
);
|
180741
|
-
deploymentInfo =
|
180996
|
+
deploymentInfo = import_chalk120.default.bold(toDeploymentId);
|
180742
180997
|
}
|
180743
180998
|
const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
|
180744
180999
|
output_manager_default.log(
|
180745
|
-
`Success! ${
|
181000
|
+
`Success! ${import_chalk120.default.bold(
|
180746
181001
|
project.name
|
180747
181002
|
)} was rolled back to ${deploymentInfo} ${duration}`
|
180748
181003
|
);
|
180749
181004
|
return 0;
|
180750
181005
|
}
|
180751
|
-
var
|
180752
|
-
var
|
181006
|
+
var import_chalk120, import_ms29;
|
181007
|
+
var init_status3 = __esm({
|
180753
181008
|
"src/commands/rollback/status.ts"() {
|
180754
181009
|
"use strict";
|
180755
|
-
|
181010
|
+
import_chalk120 = __toESM3(require_source());
|
180756
181011
|
init_elapsed();
|
180757
181012
|
init_format_date();
|
180758
181013
|
init_get_deployment();
|
@@ -180784,7 +181039,7 @@ async function requestRollback({
|
|
180784
181039
|
});
|
180785
181040
|
if (timeout !== void 0 && (0, import_ms30.default)(timeout) === 0) {
|
180786
181041
|
output_manager_default.log(
|
180787
|
-
`Successfully requested rollback of ${
|
181042
|
+
`Successfully requested rollback of ${import_chalk121.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
|
180788
181043
|
);
|
180789
181044
|
output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
|
180790
181045
|
return 0;
|
@@ -180797,15 +181052,15 @@ async function requestRollback({
|
|
180797
181052
|
timeout
|
180798
181053
|
});
|
180799
181054
|
}
|
180800
|
-
var
|
181055
|
+
var import_chalk121, import_ms30;
|
180801
181056
|
var init_request_rollback = __esm({
|
180802
181057
|
"src/commands/rollback/request-rollback.ts"() {
|
180803
181058
|
"use strict";
|
180804
|
-
|
181059
|
+
import_chalk121 = __toESM3(require_source());
|
180805
181060
|
init_pkg_name();
|
180806
181061
|
init_get_project_by_deployment();
|
180807
181062
|
import_ms30 = __toESM3(require_ms());
|
180808
|
-
|
181063
|
+
init_status3();
|
180809
181064
|
init_output_manager();
|
180810
181065
|
}
|
180811
181066
|
});
|
@@ -180863,9 +181118,9 @@ var init_rollback2 = __esm({
|
|
180863
181118
|
import_error_utils35 = __toESM3(require_dist2());
|
180864
181119
|
import_ms31 = __toESM3(require_ms());
|
180865
181120
|
init_request_rollback();
|
180866
|
-
|
181121
|
+
init_status3();
|
180867
181122
|
init_help();
|
180868
|
-
|
181123
|
+
init_command29();
|
180869
181124
|
init_get_flags_specification();
|
180870
181125
|
init_rollback();
|
180871
181126
|
init_output_manager();
|
@@ -180902,7 +181157,7 @@ var init_rollback2 = __esm({
|
|
180902
181157
|
if (needHelp) {
|
180903
181158
|
telemetry2.trackCliFlagHelp("promote", "status");
|
180904
181159
|
output_manager_default.print(
|
180905
|
-
help2(
|
181160
|
+
help2(statusSubcommand3, {
|
180906
181161
|
columns: client2.stderr.columns,
|
180907
181162
|
parent: rollbackCommand
|
180908
181163
|
})
|
@@ -181232,7 +181487,7 @@ async function rollingRelease(client2) {
|
|
181232
181487
|
subcommand,
|
181233
181488
|
args: subcommandArgs,
|
181234
181489
|
subcommandOriginal
|
181235
|
-
} = getSubcommand(client2.argv.slice(3),
|
181490
|
+
} = getSubcommand(client2.argv.slice(3), COMMAND_CONFIG17);
|
181236
181491
|
const needHelp = client2.argv.includes("--help") || client2.argv.includes("-h");
|
181237
181492
|
if (!subcommand && needHelp) {
|
181238
181493
|
telemetry2.trackCliFlagHelp("rolling-release");
|
@@ -181421,7 +181676,7 @@ async function rollingRelease(client2) {
|
|
181421
181676
|
}
|
181422
181677
|
default: {
|
181423
181678
|
output_manager_default.debug(`Invalid subcommand: ${subcommand}`);
|
181424
|
-
output_manager_default.error(getInvalidSubcommand(
|
181679
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG17));
|
181425
181680
|
output_manager_default.print(
|
181426
181681
|
help2(rollingReleaseCommand, { columns: client2.stderr.columns })
|
181427
181682
|
);
|
@@ -181434,14 +181689,14 @@ async function rollingRelease(client2) {
|
|
181434
181689
|
return 1;
|
181435
181690
|
}
|
181436
181691
|
}
|
181437
|
-
var
|
181692
|
+
var COMMAND_CONFIG17;
|
181438
181693
|
var init_rolling_release2 = __esm({
|
181439
181694
|
"src/commands/rolling-release/index.ts"() {
|
181440
181695
|
"use strict";
|
181441
181696
|
init_get_args();
|
181442
181697
|
init_get_flags_specification();
|
181443
181698
|
init_help();
|
181444
|
-
|
181699
|
+
init_command30();
|
181445
181700
|
init_request_rolling_release();
|
181446
181701
|
init_start_rolling_release();
|
181447
181702
|
init_configure_rolling_release();
|
@@ -181455,7 +181710,7 @@ var init_rolling_release2 = __esm({
|
|
181455
181710
|
init_get_subcommand();
|
181456
181711
|
init_commands();
|
181457
181712
|
init_get_invalid_subcommand();
|
181458
|
-
|
181713
|
+
COMMAND_CONFIG17 = {
|
181459
181714
|
configure: getCommandAliases(configureSubcommand),
|
181460
181715
|
start: getCommandAliases(startSubcommand),
|
181461
181716
|
approve: getCommandAliases(approveSubcommand),
|
@@ -181471,17 +181726,17 @@ function formatBranchMatcher(branchMatcher) {
|
|
181471
181726
|
if (branchMatcher?.type === "equals") {
|
181472
181727
|
return branchMatcher.pattern;
|
181473
181728
|
} else if (branchMatcher?.type === "startsWith") {
|
181474
|
-
return `${branchMatcher.pattern}${
|
181729
|
+
return `${branchMatcher.pattern}${import_chalk122.default.dim("*")}`;
|
181475
181730
|
} else if (branchMatcher?.type === "endsWith") {
|
181476
|
-
return `${
|
181731
|
+
return `${import_chalk122.default.dim("*")}${branchMatcher.pattern}`;
|
181477
181732
|
}
|
181478
|
-
return
|
181733
|
+
return import_chalk122.default.dim("No branch configuration");
|
181479
181734
|
}
|
181480
181735
|
async function list7(client2, argv) {
|
181481
181736
|
const { cwd } = client2;
|
181482
181737
|
if (argv.length !== 0) {
|
181483
181738
|
output_manager_default.error(
|
181484
|
-
`Invalid number of arguments. Usage: ${
|
181739
|
+
`Invalid number of arguments. Usage: ${import_chalk122.default.cyan(
|
181485
181740
|
`${getCommandName("target ls")}`
|
181486
181741
|
)}`
|
181487
181742
|
);
|
@@ -181505,12 +181760,12 @@ async function list7(client2, argv) {
|
|
181505
181760
|
const elapsed2 = (0, import_ms32.default)(Date.now() - start);
|
181506
181761
|
result = withDefaultEnvironmentsIncluded(result);
|
181507
181762
|
output_manager_default.log(
|
181508
|
-
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${
|
181763
|
+
`${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk122.default.gray(`[${elapsed2}]`)}`
|
181509
181764
|
);
|
181510
181765
|
const tablePrint = table(
|
181511
181766
|
[
|
181512
181767
|
["Target Name", "Branch Tracking", "Type", "Updated"].map(
|
181513
|
-
(header) =>
|
181768
|
+
(header) => import_chalk122.default.bold(import_chalk122.default.cyan(header))
|
181514
181769
|
),
|
181515
181770
|
...result.flatMap((target) => {
|
181516
181771
|
return [
|
@@ -181518,7 +181773,7 @@ async function list7(client2, argv) {
|
|
181518
181773
|
formatEnvironment(link4.org.slug, link4.project.name, target),
|
181519
181774
|
BRANCH_TRACKING_MAP[target.type](link4.project, target),
|
181520
181775
|
TYPE_MAP[target.type],
|
181521
|
-
|
181776
|
+
import_chalk122.default.gray(
|
181522
181777
|
target.updatedAt > 0 ? (0, import_ms32.default)(Date.now() - target.updatedAt) : "-"
|
181523
181778
|
)
|
181524
181779
|
]
|
@@ -181565,15 +181820,15 @@ function withDefaultEnvironmentsIncluded(environments) {
|
|
181565
181820
|
...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
|
181566
181821
|
];
|
181567
181822
|
}
|
181568
|
-
var import_ms32,
|
181823
|
+
var import_ms32, import_chalk122, TYPE_MAP, BRANCH_TRACKING_MAP;
|
181569
181824
|
var init_list11 = __esm({
|
181570
181825
|
"src/commands/target/list.ts"() {
|
181571
181826
|
"use strict";
|
181572
181827
|
import_ms32 = __toESM3(require_ms());
|
181573
|
-
|
181828
|
+
import_chalk122 = __toESM3(require_source());
|
181574
181829
|
init_table();
|
181575
181830
|
init_output_manager();
|
181576
|
-
|
181831
|
+
init_command31();
|
181577
181832
|
init_pkg_name();
|
181578
181833
|
init_ensure_link();
|
181579
181834
|
init_format_project();
|
@@ -181585,8 +181840,8 @@ var init_list11 = __esm({
|
|
181585
181840
|
};
|
181586
181841
|
BRANCH_TRACKING_MAP = {
|
181587
181842
|
production: (project) => project.link?.productionBranch ?? "main",
|
181588
|
-
preview: (_, env) => env.slug === "preview" ?
|
181589
|
-
development: () =>
|
181843
|
+
preview: (_, env) => env.slug === "preview" ? import_chalk122.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
|
181844
|
+
development: () => import_chalk122.default.dim("Accessible via CLI")
|
181590
181845
|
};
|
181591
181846
|
}
|
181592
181847
|
});
|
@@ -181653,12 +181908,12 @@ async function main15(client2) {
|
|
181653
181908
|
telemetry2.trackCliSubcommandList(subcommand);
|
181654
181909
|
return await list7(client2, args2);
|
181655
181910
|
default:
|
181656
|
-
output_manager_default.error(getInvalidSubcommand(
|
181911
|
+
output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG18));
|
181657
181912
|
output_manager_default.print(help2(targetCommand, { columns: client2.stderr.columns }));
|
181658
181913
|
return 2;
|
181659
181914
|
}
|
181660
181915
|
}
|
181661
|
-
var
|
181916
|
+
var COMMAND_CONFIG18;
|
181662
181917
|
var init_target2 = __esm({
|
181663
181918
|
"src/commands/target/index.ts"() {
|
181664
181919
|
"use strict";
|
@@ -181666,13 +181921,13 @@ var init_target2 = __esm({
|
|
181666
181921
|
init_get_invalid_subcommand();
|
181667
181922
|
init_help();
|
181668
181923
|
init_list11();
|
181669
|
-
|
181924
|
+
init_command31();
|
181670
181925
|
init_get_flags_specification();
|
181671
181926
|
init_error2();
|
181672
181927
|
init_output_manager();
|
181673
181928
|
init_target();
|
181674
181929
|
init_commands();
|
181675
|
-
|
181930
|
+
COMMAND_CONFIG18 = {
|
181676
181931
|
ls: getCommandAliases(listSubcommand8)
|
181677
181932
|
};
|
181678
181933
|
}
|
@@ -181781,7 +182036,7 @@ async function list8(client2, argv) {
|
|
181781
182036
|
client2.stdout.write("\n");
|
181782
182037
|
const teamTable = table(
|
181783
182038
|
[
|
181784
|
-
["id", "email / name"].map((str) => (0,
|
182039
|
+
["id", "email / name"].map((str) => (0, import_chalk123.gray)(str)),
|
181785
182040
|
...teamList.map((team) => [team.value, team.name])
|
181786
182041
|
],
|
181787
182042
|
{ hsep: 5 }
|
@@ -181798,13 +182053,13 @@ async function list8(client2, argv) {
|
|
181798
182053
|
}
|
181799
182054
|
return 0;
|
181800
182055
|
}
|
181801
|
-
var
|
182056
|
+
var import_chalk123;
|
181802
182057
|
var init_list13 = __esm({
|
181803
182058
|
"src/commands/teams/list.ts"() {
|
181804
182059
|
"use strict";
|
181805
182060
|
init_chars();
|
181806
182061
|
init_table();
|
181807
|
-
|
182062
|
+
import_chalk123 = __toESM3(require_source());
|
181808
182063
|
init_get_user();
|
181809
182064
|
init_get_teams();
|
181810
182065
|
init_pkg_name();
|
@@ -181813,7 +182068,7 @@ var init_list13 = __esm({
|
|
181813
182068
|
init_get_args();
|
181814
182069
|
init_error2();
|
181815
182070
|
init_get_flags_specification();
|
181816
|
-
|
182071
|
+
init_command32();
|
181817
182072
|
init_output_manager();
|
181818
182073
|
init_list12();
|
181819
182074
|
}
|
@@ -181899,7 +182154,7 @@ Please select a team scope using ${getCommandName(
|
|
181899
182154
|
return 1;
|
181900
182155
|
}
|
181901
182156
|
output_manager_default.log(
|
181902
|
-
introMsg || `Inviting team members to ${
|
182157
|
+
introMsg || `Inviting team members to ${import_chalk124.default.bold(currentTeam.name)}`
|
181903
182158
|
);
|
181904
182159
|
telemetry2.trackCliArgumentEmail(emails);
|
181905
182160
|
if (emails.length > 0) {
|
@@ -181919,10 +182174,10 @@ Please select a team scope using ${getCommandName(
|
|
181919
182174
|
throw err;
|
181920
182175
|
}
|
181921
182176
|
output_manager_default.log(
|
181922
|
-
`${
|
182177
|
+
`${import_chalk124.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
|
181923
182178
|
);
|
181924
182179
|
} else {
|
181925
|
-
output_manager_default.log(`${
|
182180
|
+
output_manager_default.log(`${import_chalk124.default.red(`\u2716 ${email3}`)} ${import_chalk124.default.gray("[invalid]")}`);
|
181926
182181
|
}
|
181927
182182
|
}
|
181928
182183
|
return 0;
|
@@ -181955,15 +182210,15 @@ Please select a team scope using ${getCommandName(
|
|
181955
182210
|
);
|
181956
182211
|
email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
|
181957
182212
|
emails.push(email2);
|
181958
|
-
output_manager_default.log(`${
|
182213
|
+
output_manager_default.log(`${import_chalk124.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
|
181959
182214
|
if (hasError) {
|
181960
182215
|
hasError = false;
|
181961
182216
|
process.stderr.write(eraseLines(emails.length + 2));
|
181962
182217
|
output_manager_default.log(
|
181963
|
-
introMsg || `Inviting team members to ${
|
182218
|
+
introMsg || `Inviting team members to ${import_chalk124.default.bold(currentTeam.name)}`
|
181964
182219
|
);
|
181965
182220
|
for (const email3 of emails) {
|
181966
|
-
output_manager_default.log(`${
|
182221
|
+
output_manager_default.log(`${import_chalk124.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
181967
182222
|
}
|
181968
182223
|
}
|
181969
182224
|
} catch (err) {
|
@@ -181972,7 +182227,7 @@ Please select a team scope using ${getCommandName(
|
|
181972
182227
|
output_manager_default.error((0, import_error_utils36.errorToString)(err));
|
181973
182228
|
hasError = true;
|
181974
182229
|
for (const email3 of emails) {
|
181975
|
-
output_manager_default.log(`${
|
182230
|
+
output_manager_default.log(`${import_chalk124.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
|
181976
182231
|
}
|
181977
182232
|
}
|
181978
182233
|
}
|
@@ -181985,16 +182240,16 @@ Please select a team scope using ${getCommandName(
|
|
181985
182240
|
} else {
|
181986
182241
|
output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
|
181987
182242
|
for (const email3 of emails) {
|
181988
|
-
output_manager_default.log(`${
|
182243
|
+
output_manager_default.log(`${import_chalk124.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
|
181989
182244
|
}
|
181990
182245
|
}
|
181991
182246
|
return 0;
|
181992
182247
|
}
|
181993
|
-
var
|
182248
|
+
var import_chalk124, import_error_utils36, validateEmail2, domains;
|
181994
182249
|
var init_invite2 = __esm({
|
181995
182250
|
"src/commands/teams/invite.ts"() {
|
181996
182251
|
"use strict";
|
181997
|
-
|
182252
|
+
import_chalk124 = __toESM3(require_source());
|
181998
182253
|
init_cmd();
|
181999
182254
|
init_stamp();
|
182000
182255
|
init_param();
|
@@ -182012,7 +182267,7 @@ var init_invite2 = __esm({
|
|
182012
182267
|
init_get_args();
|
182013
182268
|
init_get_flags_specification();
|
182014
182269
|
init_error2();
|
182015
|
-
|
182270
|
+
init_command32();
|
182016
182271
|
validateEmail2 = (data) => email.test(data.trim()) || data.length === 0;
|
182017
182272
|
domains = Array.from(
|
182018
182273
|
/* @__PURE__ */ new Set([
|
@@ -182070,7 +182325,7 @@ async function add7(client2) {
|
|
182070
182325
|
let team;
|
182071
182326
|
let elapsed2;
|
182072
182327
|
output_manager_default.log(
|
182073
|
-
`Pick a team identifier for its URL (e.g.: ${
|
182328
|
+
`Pick a team identifier for its URL (e.g.: ${import_chalk125.default.cyan(
|
182074
182329
|
"`vercel.com/acme`"
|
182075
182330
|
)})`
|
182076
182331
|
);
|
@@ -182101,7 +182356,7 @@ async function add7(client2) {
|
|
182101
182356
|
output_manager_default.stopSpinner();
|
182102
182357
|
process.stdout.write(eraseLines(2));
|
182103
182358
|
output_manager_default.success(`Team created ${elapsed2()}`);
|
182104
|
-
output_manager_default.log(`${
|
182359
|
+
output_manager_default.log(`${import_chalk125.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
|
182105
182360
|
`);
|
182106
182361
|
output_manager_default.log("Pick a display name for your team");
|
182107
182362
|
let name;
|
@@ -182124,7 +182379,7 @@ async function add7(client2) {
|
|
182124
182379
|
process.stdout.write(eraseLines(2));
|
182125
182380
|
team = Object.assign(team, res);
|
182126
182381
|
output_manager_default.success(`Team name saved ${elapsed2()}`);
|
182127
|
-
output_manager_default.log(`${
|
182382
|
+
output_manager_default.log(`${import_chalk125.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
|
182128
182383
|
`);
|
182129
182384
|
output_manager_default.spinner("Saving");
|
182130
182385
|
client2.config.currentTeam = team.id;
|
@@ -182138,11 +182393,11 @@ async function add7(client2) {
|
|
182138
182393
|
});
|
182139
182394
|
return 0;
|
182140
182395
|
}
|
182141
|
-
var
|
182396
|
+
var import_chalk125, import_error_utils37, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
|
182142
182397
|
var init_add13 = __esm({
|
182143
182398
|
"src/commands/teams/add.ts"() {
|
182144
182399
|
"use strict";
|
182145
|
-
|
182400
|
+
import_chalk125 = __toESM3(require_source());
|
182146
182401
|
init_stamp();
|
182147
182402
|
init_erase_lines();
|
182148
182403
|
init_chars();
|
@@ -182155,7 +182410,7 @@ var init_add13 = __esm({
|
|
182155
182410
|
init_output_manager();
|
182156
182411
|
validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
|
182157
182412
|
validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
|
182158
|
-
teamUrlPrefix = "Team URL".padEnd(14) +
|
182413
|
+
teamUrlPrefix = "Team URL".padEnd(14) + import_chalk125.default.gray("vercel.com/");
|
182159
182414
|
teamNamePrefix = "Team Name".padEnd(14);
|
182160
182415
|
}
|
182161
182416
|
});
|
@@ -182214,7 +182469,7 @@ async function change(client2, argv) {
|
|
182214
182469
|
let title9 = `${team.name} (${team.slug})`;
|
182215
182470
|
const selected = team.id === currentTeam?.id;
|
182216
182471
|
if (selected) {
|
182217
|
-
title9 += ` ${
|
182472
|
+
title9 += ` ${import_chalk126.default.bold("(current)")}`;
|
182218
182473
|
}
|
182219
182474
|
if (team.limited) {
|
182220
182475
|
title9 += ` ${emoji("locked")}`;
|
@@ -182226,7 +182481,7 @@ async function change(client2, argv) {
|
|
182226
182481
|
selected
|
182227
182482
|
};
|
182228
182483
|
});
|
182229
|
-
let suffix = personalScopeSelected ? ` ${
|
182484
|
+
let suffix = personalScopeSelected ? ` ${import_chalk126.default.bold("(current)")}` : "";
|
182230
182485
|
if (user.limited) {
|
182231
182486
|
suffix += ` ${emoji("locked")}`;
|
182232
182487
|
}
|
@@ -182272,14 +182527,14 @@ async function change(client2, argv) {
|
|
182272
182527
|
}
|
182273
182528
|
updateCurrentTeam(config2);
|
182274
182529
|
output_manager_default.success(
|
182275
|
-
`Your account (${
|
182530
|
+
`Your account (${import_chalk126.default.bold(user.username)}) is now active!`
|
182276
182531
|
);
|
182277
182532
|
return 0;
|
182278
182533
|
}
|
182279
182534
|
const newTeam = teams2.find((team) => team.slug === desiredSlug);
|
182280
182535
|
if (!newTeam) {
|
182281
182536
|
output_manager_default.error(
|
182282
|
-
`You do not have permission to access scope ${
|
182537
|
+
`You do not have permission to access scope ${import_chalk126.default.bold(desiredSlug)}.`
|
182283
182538
|
);
|
182284
182539
|
return 1;
|
182285
182540
|
}
|
@@ -182297,15 +182552,15 @@ async function change(client2, argv) {
|
|
182297
182552
|
}
|
182298
182553
|
updateCurrentTeam(config2, newTeam);
|
182299
182554
|
output_manager_default.success(
|
182300
|
-
`The team ${
|
182555
|
+
`The team ${import_chalk126.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
|
182301
182556
|
);
|
182302
182557
|
return 0;
|
182303
182558
|
}
|
182304
|
-
var
|
182559
|
+
var import_chalk126, updateCurrentTeam;
|
182305
182560
|
var init_switch2 = __esm({
|
182306
182561
|
"src/commands/teams/switch.ts"() {
|
182307
182562
|
"use strict";
|
182308
|
-
|
182563
|
+
import_chalk126 = __toESM3(require_source());
|
182309
182564
|
init_emoji();
|
182310
182565
|
init_get_user();
|
182311
182566
|
init_get_teams();
|
@@ -182313,7 +182568,7 @@ var init_switch2 = __esm({
|
|
182313
182568
|
init_files();
|
182314
182569
|
init_output_manager();
|
182315
182570
|
init_switch();
|
182316
|
-
|
182571
|
+
init_command32();
|
182317
182572
|
init_get_args();
|
182318
182573
|
init_get_flags_specification();
|
182319
182574
|
init_error2();
|
@@ -182397,7 +182652,7 @@ async function teams(client2) {
|
|
182397
182652
|
}
|
182398
182653
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
182399
182654
|
parsedArgs.args.slice(1),
|
182400
|
-
|
182655
|
+
COMMAND_CONFIG19
|
182401
182656
|
);
|
182402
182657
|
const needHelp = parsedArgs.flags["--help"];
|
182403
182658
|
if (!subcommand && needHelp) {
|
@@ -182456,7 +182711,7 @@ async function teams(client2) {
|
|
182456
182711
|
}
|
182457
182712
|
}
|
182458
182713
|
}
|
182459
|
-
var
|
182714
|
+
var COMMAND_CONFIG19;
|
182460
182715
|
var init_teams2 = __esm({
|
182461
182716
|
"src/commands/teams/index.ts"() {
|
182462
182717
|
"use strict";
|
@@ -182465,14 +182720,14 @@ var init_teams2 = __esm({
|
|
182465
182720
|
init_switch2();
|
182466
182721
|
init_invite2();
|
182467
182722
|
init_get_args();
|
182468
|
-
|
182723
|
+
init_command32();
|
182469
182724
|
init_help();
|
182470
182725
|
init_get_flags_specification();
|
182471
182726
|
init_error2();
|
182472
182727
|
init_teams();
|
182473
182728
|
init_output_manager();
|
182474
182729
|
init_get_subcommand();
|
182475
|
-
|
182730
|
+
COMMAND_CONFIG19 = {
|
182476
182731
|
list: ["ls", "list"],
|
182477
182732
|
switch: ["switch", "change"],
|
182478
182733
|
add: ["create", "add"],
|
@@ -182482,15 +182737,15 @@ var init_teams2 = __esm({
|
|
182482
182737
|
});
|
182483
182738
|
|
182484
182739
|
// src/commands/telemetry/status.ts
|
182485
|
-
async function
|
182740
|
+
async function status2(client2) {
|
182486
182741
|
const enabled = client2.config.telemetry?.enabled !== false;
|
182487
|
-
const
|
182742
|
+
const status3 = enabled ? import_chalk127.default.green("Enabled") : import_chalk127.default.red("Disabled");
|
182488
182743
|
output_manager_default.print("\n");
|
182489
|
-
output_manager_default.log(`${
|
182744
|
+
output_manager_default.log(`${import_chalk127.default.bold("Telemetry status")}: ${status3}
|
182490
182745
|
`);
|
182491
182746
|
const learnMoreMessage = `
|
182492
182747
|
|
182493
|
-
Learn more: ${
|
182748
|
+
Learn more: ${import_chalk127.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
|
182494
182749
|
if (enabled) {
|
182495
182750
|
output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
|
182496
182751
|
} else {
|
@@ -182501,17 +182756,17 @@ Learn more: ${import_chalk126.default.cyan("https://vercel.com/docs/cli/about-te
|
|
182501
182756
|
}
|
182502
182757
|
return 0;
|
182503
182758
|
}
|
182504
|
-
var
|
182505
|
-
var
|
182759
|
+
var import_chalk127;
|
182760
|
+
var init_status4 = __esm({
|
182506
182761
|
"src/commands/telemetry/status.ts"() {
|
182507
182762
|
"use strict";
|
182508
|
-
|
182763
|
+
import_chalk127 = __toESM3(require_source());
|
182509
182764
|
init_output_manager();
|
182510
182765
|
}
|
182511
182766
|
});
|
182512
182767
|
|
182513
182768
|
// src/commands/telemetry/enable.ts
|
182514
|
-
async function
|
182769
|
+
async function enable2(client2) {
|
182515
182770
|
client2.config = {
|
182516
182771
|
...client2.config,
|
182517
182772
|
telemetry: {
|
@@ -182520,19 +182775,19 @@ async function enable(client2) {
|
|
182520
182775
|
}
|
182521
182776
|
};
|
182522
182777
|
writeToConfigFile(client2.config);
|
182523
|
-
await
|
182778
|
+
await status2(client2);
|
182524
182779
|
return 0;
|
182525
182780
|
}
|
182526
|
-
var
|
182781
|
+
var init_enable2 = __esm({
|
182527
182782
|
"src/commands/telemetry/enable.ts"() {
|
182528
182783
|
"use strict";
|
182529
182784
|
init_files();
|
182530
|
-
|
182785
|
+
init_status4();
|
182531
182786
|
}
|
182532
182787
|
});
|
182533
182788
|
|
182534
182789
|
// src/commands/telemetry/disable.ts
|
182535
|
-
async function
|
182790
|
+
async function disable2(client2) {
|
182536
182791
|
client2.config = {
|
182537
182792
|
...client2.config,
|
182538
182793
|
telemetry: {
|
@@ -182541,14 +182796,14 @@ async function disable(client2) {
|
|
182541
182796
|
}
|
182542
182797
|
};
|
182543
182798
|
writeToConfigFile(client2.config);
|
182544
|
-
await
|
182799
|
+
await status2(client2);
|
182545
182800
|
return 0;
|
182546
182801
|
}
|
182547
|
-
var
|
182802
|
+
var init_disable2 = __esm({
|
182548
182803
|
"src/commands/telemetry/disable.ts"() {
|
182549
182804
|
"use strict";
|
182550
182805
|
init_files();
|
182551
|
-
|
182806
|
+
init_status4();
|
182552
182807
|
}
|
182553
182808
|
});
|
182554
182809
|
|
@@ -182563,10 +182818,10 @@ async function flush(client2, args2) {
|
|
182563
182818
|
body: JSON.stringify(body),
|
182564
182819
|
json: false
|
182565
182820
|
});
|
182566
|
-
const
|
182821
|
+
const status3 = res.status;
|
182567
182822
|
const cliTracked = res.headers.get("x-vercel-cli-tracked") || "";
|
182568
182823
|
const wasRecorded = cliTracked === "1";
|
182569
|
-
if (
|
182824
|
+
if (status3 === 204) {
|
182570
182825
|
if (wasRecorded) {
|
182571
182826
|
process.stderr.write("Telemetry event tracked");
|
182572
182827
|
} else {
|
@@ -182574,7 +182829,7 @@ async function flush(client2, args2) {
|
|
182574
182829
|
}
|
182575
182830
|
} else {
|
182576
182831
|
process.stderr.write(
|
182577
|
-
`Failed to send telemetry events. Unexpected response from telemetry server: ${
|
182832
|
+
`Failed to send telemetry events. Unexpected response from telemetry server: ${status3}`
|
182578
182833
|
);
|
182579
182834
|
}
|
182580
182835
|
return 0;
|
@@ -182641,7 +182896,7 @@ async function telemetry(client2) {
|
|
182641
182896
|
}
|
182642
182897
|
const { subcommand, args: args2, subcommandOriginal } = getSubcommand(
|
182643
182898
|
parsedArguments.args.slice(1),
|
182644
|
-
|
182899
|
+
COMMAND_CONFIG20
|
182645
182900
|
);
|
182646
182901
|
const needHelp = parsedArguments.flags["--help"];
|
182647
182902
|
function printHelp(command) {
|
@@ -182661,32 +182916,32 @@ async function telemetry(client2) {
|
|
182661
182916
|
case "status":
|
182662
182917
|
if (needHelp) {
|
182663
182918
|
telemetryClient.trackCliFlagHelp("telemetry", subcommandOriginal);
|
182664
|
-
printHelp(
|
182919
|
+
printHelp(statusSubcommand4);
|
182665
182920
|
return 2;
|
182666
182921
|
}
|
182667
182922
|
telemetryClient.trackCliSubcommandStatus(subcommandOriginal);
|
182668
|
-
return
|
182923
|
+
return status2(client2);
|
182669
182924
|
case "flush":
|
182670
182925
|
return flush(client2, args2);
|
182671
182926
|
case "enable":
|
182672
182927
|
if (needHelp) {
|
182673
182928
|
telemetryClient.trackCliFlagHelp("telemetry", subcommandOriginal);
|
182674
|
-
printHelp(
|
182929
|
+
printHelp(enableSubcommand2);
|
182675
182930
|
return 2;
|
182676
182931
|
}
|
182677
182932
|
telemetryClient.trackCliSubcommandEnable(subcommandOriginal);
|
182678
|
-
return
|
182933
|
+
return enable2(client2);
|
182679
182934
|
case "disable":
|
182680
182935
|
if (needHelp) {
|
182681
182936
|
telemetryClient.trackCliFlagHelp("telemetry", subcommandOriginal);
|
182682
|
-
printHelp(
|
182937
|
+
printHelp(disableSubcommand2);
|
182683
182938
|
return 2;
|
182684
182939
|
}
|
182685
|
-
return
|
182940
|
+
return disable2(client2);
|
182686
182941
|
default: {
|
182687
182942
|
const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
|
182688
182943
|
output_manager_default.print(
|
182689
|
-
`${
|
182944
|
+
`${import_chalk128.default.red("Error")}: ${errorMessage}. See help instructions for usage:
|
182690
182945
|
`
|
182691
182946
|
);
|
182692
182947
|
output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
|
@@ -182694,7 +182949,7 @@ async function telemetry(client2) {
|
|
182694
182949
|
}
|
182695
182950
|
}
|
182696
182951
|
}
|
182697
|
-
var
|
182952
|
+
var import_chalk128, COMMAND_CONFIG20;
|
182698
182953
|
var init_telemetry3 = __esm({
|
182699
182954
|
"src/commands/telemetry/index.ts"() {
|
182700
182955
|
"use strict";
|
@@ -182702,20 +182957,20 @@ var init_telemetry3 = __esm({
|
|
182702
182957
|
init_get_args();
|
182703
182958
|
init_get_subcommand();
|
182704
182959
|
init_help();
|
182705
|
-
|
182706
|
-
|
182707
|
-
|
182960
|
+
init_status4();
|
182961
|
+
init_enable2();
|
182962
|
+
init_disable2();
|
182708
182963
|
init_flush();
|
182709
|
-
|
182964
|
+
init_command33();
|
182710
182965
|
init_get_flags_specification();
|
182711
182966
|
init_telemetry2();
|
182712
|
-
|
182967
|
+
import_chalk128 = __toESM3(require_source());
|
182713
182968
|
init_output_manager();
|
182714
182969
|
init_commands();
|
182715
|
-
|
182716
|
-
status: getCommandAliases(
|
182717
|
-
enable: getCommandAliases(
|
182718
|
-
disable: getCommandAliases(
|
182970
|
+
COMMAND_CONFIG20 = {
|
182971
|
+
status: getCommandAliases(statusSubcommand4),
|
182972
|
+
enable: getCommandAliases(enableSubcommand2),
|
182973
|
+
disable: getCommandAliases(disableSubcommand2),
|
182719
182974
|
flush: getCommandAliases(flushSubcommand)
|
182720
182975
|
};
|
182721
182976
|
}
|
@@ -182769,7 +183024,7 @@ var init_whoami2 = __esm({
|
|
182769
183024
|
"src/commands/whoami/index.ts"() {
|
182770
183025
|
"use strict";
|
182771
183026
|
init_help();
|
182772
|
-
|
183027
|
+
init_command34();
|
182773
183028
|
init_get_scope();
|
182774
183029
|
init_get_args();
|
182775
183030
|
init_get_flags_specification();
|
@@ -182784,7 +183039,7 @@ var import_error_utils38 = __toESM3(require_dist2());
|
|
182784
183039
|
var import_path40 = require("path");
|
182785
183040
|
var import_fs8 = require("fs");
|
182786
183041
|
var import_fs_extra24 = __toESM3(require_lib());
|
182787
|
-
var
|
183042
|
+
var import_chalk129 = __toESM3(require_source());
|
182788
183043
|
var import_epipebomb = __toESM3(require_epipebomb());
|
182789
183044
|
|
182790
183045
|
// src/util/get-latest-version/index.ts
|
@@ -183258,6 +183513,12 @@ var RootTelemetryClient = class extends TelemetryClient {
|
|
183258
183513
|
value: actual
|
183259
183514
|
});
|
183260
183515
|
}
|
183516
|
+
trackCliCommandGuidance(actual) {
|
183517
|
+
this.trackCliCommand({
|
183518
|
+
command: "guidance",
|
183519
|
+
value: actual
|
183520
|
+
});
|
183521
|
+
}
|
183261
183522
|
trackCliCommandHelp(actual) {
|
183262
183523
|
this.trackCliCommand({
|
183263
183524
|
command: "help",
|
@@ -183596,6 +183857,36 @@ function checkTelemetryStatus({ config: config2 }) {
|
|
183596
183857
|
|
183597
183858
|
// src/index.ts
|
183598
183859
|
init_output_manager();
|
183860
|
+
|
183861
|
+
// src/util/guidance/check-status.ts
|
183862
|
+
init_files();
|
183863
|
+
init_output_manager();
|
183864
|
+
function checkGuidanceStatus({ config: config2 }) {
|
183865
|
+
if (!process.env.FF_GUIDANCE_MODE) {
|
183866
|
+
return;
|
183867
|
+
}
|
183868
|
+
if (process.env.CI) {
|
183869
|
+
return;
|
183870
|
+
}
|
183871
|
+
if (process.env.VERCEL_GUIDANCE_DISABLED) {
|
183872
|
+
return;
|
183873
|
+
}
|
183874
|
+
if (config2.guidance) {
|
183875
|
+
return;
|
183876
|
+
}
|
183877
|
+
output_manager_default.note(
|
183878
|
+
"The Vercel CLI can suggest common follow-up commands and steps to help guide new users."
|
183879
|
+
);
|
183880
|
+
output_manager_default.log("You can disable this feature by running:");
|
183881
|
+
output_manager_default.log("vercel guidance disable");
|
183882
|
+
output_manager_default.log("or by setting VERCEL_GUIDANCE_DISABLED=1");
|
183883
|
+
config2.guidance = {
|
183884
|
+
enabled: true
|
183885
|
+
};
|
183886
|
+
writeToConfigFile(config2);
|
183887
|
+
}
|
183888
|
+
|
183889
|
+
// src/index.ts
|
183599
183890
|
try {
|
183600
183891
|
process.cwd();
|
183601
183892
|
} catch (err) {
|
@@ -183683,13 +183974,13 @@ var main16 = async () => {
|
|
183683
183974
|
const betaCommands = [];
|
183684
183975
|
if (betaCommands.includes(targetOrSubcommand)) {
|
183685
183976
|
output_manager_default.print(
|
183686
|
-
`${
|
183977
|
+
`${import_chalk129.default.grey(
|
183687
183978
|
`${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
|
183688
183979
|
)}
|
183689
183980
|
`
|
183690
183981
|
);
|
183691
183982
|
} else {
|
183692
|
-
output_manager_default.print(`${
|
183983
|
+
output_manager_default.print(`${import_chalk129.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
|
183693
183984
|
`);
|
183694
183985
|
}
|
183695
183986
|
if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
|
@@ -183769,6 +184060,11 @@ var main16 = async () => {
|
|
183769
184060
|
checkTelemetryStatus({
|
183770
184061
|
config: config2
|
183771
184062
|
});
|
184063
|
+
if (process.env.FF_GUIDANCE_MODE) {
|
184064
|
+
checkGuidanceStatus({
|
184065
|
+
config: config2
|
184066
|
+
});
|
184067
|
+
}
|
183772
184068
|
const telemetry2 = new RootTelemetryClient({
|
183773
184069
|
opts: {
|
183774
184070
|
store: telemetryEventStore
|
@@ -183855,6 +184151,9 @@ var main16 = async () => {
|
|
183855
184151
|
"build",
|
183856
184152
|
"telemetry"
|
183857
184153
|
];
|
184154
|
+
if (process.env.FF_GUIDANCE_MODE) {
|
184155
|
+
subcommandsWithoutToken.push("guidance");
|
184156
|
+
}
|
183858
184157
|
if ((!authConfig || !authConfig.token) && !client.argv.includes("-h") && !client.argv.includes("--help") && !parsedArgs.flags["--token"] && subcommand && !subcommandsWithoutToken.includes(subcommand)) {
|
183859
184158
|
if (isTTY2) {
|
183860
184159
|
output_manager_default.log(`No existing credentials found. Please log in:`);
|
@@ -184051,6 +184350,15 @@ var main16 = async () => {
|
|
184051
184350
|
telemetry2.trackCliCommandGit(userSuppliedSubCommand);
|
184052
184351
|
func = (init_git2(), __toCommonJS3(git_exports)).default;
|
184053
184352
|
break;
|
184353
|
+
case "guidance":
|
184354
|
+
if (process.env.FF_GUIDANCE_MODE) {
|
184355
|
+
telemetry2.trackCliCommandGuidance(userSuppliedSubCommand);
|
184356
|
+
func = (init_guidance2(), __toCommonJS3(guidance_exports)).default;
|
184357
|
+
break;
|
184358
|
+
} else {
|
184359
|
+
func = null;
|
184360
|
+
break;
|
184361
|
+
}
|
184054
184362
|
case "init":
|
184055
184363
|
telemetry2.trackCliCommandInit(userSuppliedSubCommand);
|
184056
184364
|
func = (init_init3(), __toCommonJS3(init_exports)).default;
|
@@ -184241,20 +184549,20 @@ main16().then(async (exitCode2) => {
|
|
184241
184549
|
});
|
184242
184550
|
if (latest) {
|
184243
184551
|
const changelog = "https://github.com/vercel/vercel/releases";
|
184244
|
-
const errorMsg = exitCode2 && exitCode2 !== 2 ?
|
184552
|
+
const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk129.default.magenta(
|
184245
184553
|
`
|
184246
184554
|
|
184247
|
-
The latest update ${
|
184555
|
+
The latest update ${import_chalk129.default.italic(
|
184248
184556
|
"may"
|
184249
184557
|
)} fix any errors that occurred.`
|
184250
184558
|
) : "";
|
184251
184559
|
output_manager_default.print(
|
184252
184560
|
box(
|
184253
|
-
`Update available! ${
|
184561
|
+
`Update available! ${import_chalk129.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk129.default.green(
|
184254
184562
|
`v${latest}`
|
184255
184563
|
)}
|
184256
184564
|
Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
|
184257
|
-
Run ${
|
184565
|
+
Run ${import_chalk129.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
|
184258
184566
|
)
|
184259
184567
|
);
|
184260
184568
|
output_manager_default.print("\n\n");
|