vercel 41.4.1 → 41.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1187 -342
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -4071,14 +4071,14 @@ var require_templates = __commonJS2({
4071
4071
  }
4072
4072
  return results;
4073
4073
  }
4074
- function buildStyle(chalk116, styles) {
4074
+ function buildStyle(chalk118, 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 = chalk116;
4081
+ let current = chalk118;
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 = (chalk116, temporary) => {
4093
+ module2.exports = (chalk118, 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(chalk116, styles)(string));
4103
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk118, 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(chalk116, styles)(chunk.join("")));
4109
+ chunks.push(buildStyle(chalk118, 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 chalk117 = {};
4158
- applyOptions(chalk117, options);
4159
- chalk117.template = (...arguments_) => chalkTag(chalk117.template, ...arguments_);
4160
- Object.setPrototypeOf(chalk117, Chalk.prototype);
4161
- Object.setPrototypeOf(chalk117.template, chalk117);
4162
- chalk117.template.constructor = () => {
4157
+ const chalk119 = {};
4158
+ applyOptions(chalk119, options);
4159
+ chalk119.template = (...arguments_) => chalkTag(chalk119.template, ...arguments_);
4160
+ Object.setPrototypeOf(chalk119, Chalk.prototype);
4161
+ Object.setPrototypeOf(chalk119.template, chalk119);
4162
+ chalk119.template.constructor = () => {
4163
4163
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
4164
4164
  };
4165
- chalk117.template.Instance = ChalkClass;
4166
- return chalk117.template;
4165
+ chalk119.template.Instance = ChalkClass;
4166
+ return chalk119.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 = (chalk117, ...strings) => {
4277
+ var chalkTag = (chalk119, ...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(chalk117, parts.join(""));
4293
+ return template(chalk119, parts.join(""));
4294
4294
  };
4295
4295
  Object.defineProperties(Chalk.prototype, styles);
4296
- var chalk116 = Chalk();
4297
- chalk116.supportsColor = stdoutColor;
4298
- chalk116.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4299
- chalk116.stderr.supportsColor = stderrColor;
4300
- module2.exports = chalk116;
4296
+ var chalk118 = Chalk();
4297
+ chalk118.supportsColor = stdoutColor;
4298
+ chalk118.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4299
+ chalk118.stderr.supportsColor = stderrColor;
4300
+ module2.exports = chalk118;
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(chalk116, styles) {
7211
+ function buildStyle(chalk118, 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 = chalk116;
7218
+ let current = chalk118;
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 = (chalk116, tmp) => {
7233
+ module2.exports = (chalk118, 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(chalk116, styles)(str));
7243
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk118, 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(chalk116, styles)(chunk.join("")));
7249
+ chunks.push(buildStyle(chalk118, 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 chalk116 = {};
7287
- applyOptions(chalk116, options);
7288
- chalk116.template = function() {
7286
+ const chalk118 = {};
7287
+ applyOptions(chalk118, options);
7288
+ chalk118.template = function() {
7289
7289
  const args2 = [].slice.call(arguments);
7290
- return chalkTag.apply(null, [chalk116.template].concat(args2));
7290
+ return chalkTag.apply(null, [chalk118.template].concat(args2));
7291
7291
  };
7292
- Object.setPrototypeOf(chalk116, Chalk.prototype);
7293
- Object.setPrototypeOf(chalk116.template, chalk116);
7294
- chalk116.template.constructor = Chalk;
7295
- return chalk116.template;
7292
+ Object.setPrototypeOf(chalk118, Chalk.prototype);
7293
+ Object.setPrototypeOf(chalk118.template, chalk118);
7294
+ chalk118.template.constructor = Chalk;
7295
+ return chalk118.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(chalk116, strings) {
7414
+ function chalkTag(chalk118, 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(chalk116, parts.join(""));
7424
+ return template(chalk118, 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 chalk116 = require_chalk();
9375
+ var chalk118 = require_chalk();
9376
9376
  var isSupported = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color";
9377
9377
  var main14 = {
9378
- info: chalk116.blue("\u2139"),
9379
- success: chalk116.green("\u2714"),
9380
- warning: chalk116.yellow("\u26A0"),
9381
- error: chalk116.red("\u2716")
9378
+ info: chalk118.blue("\u2139"),
9379
+ success: chalk118.green("\u2714"),
9380
+ warning: chalk118.yellow("\u26A0"),
9381
+ error: chalk118.red("\u2716")
9382
9382
  };
9383
9383
  var fallbacks = {
9384
- info: chalk116.blue("i"),
9385
- success: chalk116.green("\u221A"),
9386
- warning: chalk116.yellow("\u203C"),
9387
- error: chalk116.red("\xD7")
9384
+ info: chalk118.blue("i"),
9385
+ success: chalk118.green("\u221A"),
9386
+ warning: chalk118.yellow("\u203C"),
9387
+ error: chalk118.red("\xD7")
9388
9388
  };
9389
9389
  module2.exports = isSupported ? main14 : 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 chalk116 = require_chalk();
9783
+ var chalk118 = 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 = chalk116[this.color](frame);
9872
+ frame = chalk118[this.color](frame);
9873
9873
  }
9874
9874
  this.frameIndex = ++this.frameIndex % frames.length;
9875
9875
  const fullPrefixText = typeof this.prefixText === "string" ? this.prefixText + " " : "";
@@ -32716,7 +32716,7 @@ var init_command13 = __esm({
32716
32716
  });
32717
32717
 
32718
32718
  // src/commands/integration-resource/command.ts
32719
- var removeSubcommand6, disconnectSubcommand2, integrationResourceCommand;
32719
+ var removeSubcommand6, disconnectSubcommand2, createThresholdSubcommand, integrationResourceCommand;
32720
32720
  var init_command14 = __esm({
32721
32721
  "src/commands/integration-resource/command.ts"() {
32722
32722
  "use strict";
@@ -32815,6 +32815,45 @@ var init_command14 = __esm({
32815
32815
  }
32816
32816
  ]
32817
32817
  };
32818
+ createThresholdSubcommand = {
32819
+ name: "create-threshold",
32820
+ aliases: [],
32821
+ description: "Creates a threshold for a resource (or installation, if the integration uses installation-level thresholds)",
32822
+ arguments: [
32823
+ {
32824
+ name: "resource",
32825
+ required: true
32826
+ },
32827
+ {
32828
+ name: "minimum",
32829
+ required: true
32830
+ },
32831
+ {
32832
+ name: "spend",
32833
+ required: true
32834
+ },
32835
+ {
32836
+ name: "limit",
32837
+ required: true
32838
+ }
32839
+ ],
32840
+ options: [
32841
+ {
32842
+ ...yesOption,
32843
+ description: "Skip the confirmation prompt when creating a threshold"
32844
+ }
32845
+ ],
32846
+ examples: [
32847
+ {
32848
+ name: "create threshold",
32849
+ value: [
32850
+ `${packageName} integration-resource create-threshold <resource> <minimum> <spend> <limit> [options]`,
32851
+ `${packageName} integration-resource create-threshold my-acme-resource 100 50 2000`,
32852
+ `${packageName} integration-resource create-threshold my-acme-resource 100 50 2000 --yes`
32853
+ ]
32854
+ }
32855
+ ]
32856
+ };
32818
32857
  integrationResourceCommand = {
32819
32858
  name: "integration-resource",
32820
32859
  aliases: ["ir"],
@@ -32828,7 +32867,7 @@ var init_command14 = __esm({
32828
32867
  });
32829
32868
 
32830
32869
  // src/commands/integration/command.ts
32831
- var addSubcommand5, openSubcommand, listSubcommand6, removeSubcommand7, integrationCommand;
32870
+ var addSubcommand5, openSubcommand, listSubcommand6, balanceSubcommand, removeSubcommand7, integrationCommand;
32832
32871
  var init_command15 = __esm({
32833
32872
  "src/commands/integration/command.ts"() {
32834
32873
  "use strict";
@@ -32925,6 +32964,27 @@ var init_command15 = __esm({
32925
32964
  }
32926
32965
  ]
32927
32966
  };
32967
+ balanceSubcommand = {
32968
+ name: "balance",
32969
+ aliases: [],
32970
+ description: "Shows the balances and thresholds of specified marketplace integration",
32971
+ arguments: [
32972
+ {
32973
+ name: "integration",
32974
+ required: true
32975
+ }
32976
+ ],
32977
+ options: [],
32978
+ examples: [
32979
+ {
32980
+ name: "Show the balance(s) & threshold(s) of a marketplace integration",
32981
+ value: [
32982
+ `${packageName} integration balance <integration-name>`,
32983
+ `${packageName} integration balance acme`
32984
+ ]
32985
+ }
32986
+ ]
32987
+ };
32928
32988
  removeSubcommand7 = {
32929
32989
  name: "remove",
32930
32990
  aliases: [],
@@ -35237,14 +35297,14 @@ var require_templates3 = __commonJS2({
35237
35297
  }
35238
35298
  return results;
35239
35299
  }
35240
- function buildStyle(chalk116, styles) {
35300
+ function buildStyle(chalk118, styles) {
35241
35301
  const enabled = {};
35242
35302
  for (const layer of styles) {
35243
35303
  for (const style of layer.styles) {
35244
35304
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
35245
35305
  }
35246
35306
  }
35247
- let current = chalk116;
35307
+ let current = chalk118;
35248
35308
  for (const [styleName, styles2] of Object.entries(enabled)) {
35249
35309
  if (!Array.isArray(styles2)) {
35250
35310
  continue;
@@ -35256,7 +35316,7 @@ var require_templates3 = __commonJS2({
35256
35316
  }
35257
35317
  return current;
35258
35318
  }
35259
- module2.exports = (chalk116, temporary) => {
35319
+ module2.exports = (chalk118, temporary) => {
35260
35320
  const styles = [];
35261
35321
  const chunks = [];
35262
35322
  let chunk = [];
@@ -35266,13 +35326,13 @@ var require_templates3 = __commonJS2({
35266
35326
  } else if (style) {
35267
35327
  const string = chunk.join("");
35268
35328
  chunk = [];
35269
- chunks.push(styles.length === 0 ? string : buildStyle(chalk116, styles)(string));
35329
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk118, styles)(string));
35270
35330
  styles.push({ inverse, styles: parseStyle(style) });
35271
35331
  } else if (close2) {
35272
35332
  if (styles.length === 0) {
35273
35333
  throw new Error("Found extraneous } in Chalk template literal");
35274
35334
  }
35275
- chunks.push(buildStyle(chalk116, styles)(chunk.join("")));
35335
+ chunks.push(buildStyle(chalk118, styles)(chunk.join("")));
35276
35336
  chunk = [];
35277
35337
  styles.pop();
35278
35338
  } else {
@@ -35320,16 +35380,16 @@ var require_source2 = __commonJS2({
35320
35380
  }
35321
35381
  };
35322
35382
  var chalkFactory = (options) => {
35323
- const chalk117 = {};
35324
- applyOptions(chalk117, options);
35325
- chalk117.template = (...arguments_) => chalkTag(chalk117.template, ...arguments_);
35326
- Object.setPrototypeOf(chalk117, Chalk.prototype);
35327
- Object.setPrototypeOf(chalk117.template, chalk117);
35328
- chalk117.template.constructor = () => {
35383
+ const chalk119 = {};
35384
+ applyOptions(chalk119, options);
35385
+ chalk119.template = (...arguments_) => chalkTag(chalk119.template, ...arguments_);
35386
+ Object.setPrototypeOf(chalk119, Chalk.prototype);
35387
+ Object.setPrototypeOf(chalk119.template, chalk119);
35388
+ chalk119.template.constructor = () => {
35329
35389
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
35330
35390
  };
35331
- chalk117.template.Instance = ChalkClass;
35332
- return chalk117.template;
35391
+ chalk119.template.Instance = ChalkClass;
35392
+ return chalk119.template;
35333
35393
  };
35334
35394
  function Chalk(options) {
35335
35395
  return chalkFactory(options);
@@ -35440,7 +35500,7 @@ var require_source2 = __commonJS2({
35440
35500
  return openAll + string + closeAll;
35441
35501
  };
35442
35502
  var template;
35443
- var chalkTag = (chalk117, ...strings) => {
35503
+ var chalkTag = (chalk119, ...strings) => {
35444
35504
  const [firstString] = strings;
35445
35505
  if (!isArray(firstString) || !isArray(firstString.raw)) {
35446
35506
  return strings.join(" ");
@@ -35456,14 +35516,14 @@ var require_source2 = __commonJS2({
35456
35516
  if (template === void 0) {
35457
35517
  template = require_templates3();
35458
35518
  }
35459
- return template(chalk117, parts.join(""));
35519
+ return template(chalk119, parts.join(""));
35460
35520
  };
35461
35521
  Object.defineProperties(Chalk.prototype, styles);
35462
- var chalk116 = Chalk();
35463
- chalk116.supportsColor = stdoutColor;
35464
- chalk116.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
35465
- chalk116.stderr.supportsColor = stderrColor;
35466
- module2.exports = chalk116;
35522
+ var chalk118 = Chalk();
35523
+ chalk118.supportsColor = stdoutColor;
35524
+ chalk118.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
35525
+ chalk118.stderr.supportsColor = stderrColor;
35526
+ module2.exports = chalk118;
35467
35527
  }
35468
35528
  });
35469
35529
 
@@ -102103,7 +102163,7 @@ var require_detect_file_system_api = __commonJS2({
102103
102163
  });
102104
102164
  module2.exports = __toCommonJS4(detect_file_system_api_exports);
102105
102165
  var import_semver4 = __toESM4(require_semver2());
102106
- var import__77 = require_dist20();
102166
+ var import__79 = require_dist20();
102107
102167
  async function detectFileSystemAPI2({
102108
102168
  files,
102109
102169
  projectSettings,
@@ -102169,7 +102229,7 @@ var require_detect_file_system_api = __commonJS2({
102169
102229
  };
102170
102230
  }
102171
102231
  const invalidBuilder = builders.find(({ use }) => {
102172
- const valid = (0, import__77.isOfficialRuntime)("go", use) || (0, import__77.isOfficialRuntime)("python", use) || (0, import__77.isOfficialRuntime)("ruby", use) || (0, import__77.isOfficialRuntime)("node", use) || (0, import__77.isOfficialRuntime)("next", use) || (0, import__77.isOfficialRuntime)("static", use) || (0, import__77.isOfficialRuntime)("static-build", use);
102232
+ const valid = (0, import__79.isOfficialRuntime)("go", use) || (0, import__79.isOfficialRuntime)("python", use) || (0, import__79.isOfficialRuntime)("ruby", use) || (0, import__79.isOfficialRuntime)("node", use) || (0, import__79.isOfficialRuntime)("next", use) || (0, import__79.isOfficialRuntime)("static", use) || (0, import__79.isOfficialRuntime)("static-build", use);
102173
102233
  return !valid;
102174
102234
  });
102175
102235
  if (invalidBuilder) {
@@ -102182,7 +102242,7 @@ var require_detect_file_system_api = __commonJS2({
102182
102242
  for (const lang of ["go", "python", "ruby"]) {
102183
102243
  for (const { use } of builders) {
102184
102244
  const plugin = "vercel-plugin-" + lang;
102185
- if ((0, import__77.isOfficialRuntime)(lang, use) && !deps[plugin]) {
102245
+ if ((0, import__79.isOfficialRuntime)(lang, use) && !deps[plugin]) {
102186
102246
  return {
102187
102247
  metadata,
102188
102248
  fsApiBuilder: null,
@@ -102239,7 +102299,7 @@ var require_detect_file_system_api = __commonJS2({
102239
102299
  }
102240
102300
  }
102241
102301
  const frontendBuilder = builders.find(
102242
- ({ use }) => (0, import__77.isOfficialRuntime)("next", use) || (0, import__77.isOfficialRuntime)("static", use) || (0, import__77.isOfficialRuntime)("static-build", use)
102302
+ ({ use }) => (0, import__79.isOfficialRuntime)("next", use) || (0, import__79.isOfficialRuntime)("static", use) || (0, import__79.isOfficialRuntime)("static-build", use)
102243
102303
  );
102244
102304
  const config2 = frontendBuilder?.config || {};
102245
102305
  const withTag = tag ? `@${tag}` : "";
@@ -134062,15 +134122,23 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir, span) {
134062
134122
  }
134063
134123
  }
134064
134124
  buildResults.set(build2, buildResult);
134125
+ let buildOutputLength = 0;
134126
+ if ("output" in buildResult) {
134127
+ buildOutputLength = Array.isArray(buildResult.output) ? buildResult.output.length : 1;
134128
+ }
134065
134129
  ops.push(
134066
- writeBuildResult(
134067
- repoRootPath,
134068
- outputDir,
134069
- buildResult,
134070
- build2,
134071
- builder,
134072
- builderPkg,
134073
- localConfig
134130
+ builderSpan.child("vc.builder.writeBuildResult", {
134131
+ buildOutputLength: String(buildOutputLength)
134132
+ }).trace(
134133
+ () => writeBuildResult(
134134
+ repoRootPath,
134135
+ outputDir,
134136
+ buildResult,
134137
+ build2,
134138
+ builder,
134139
+ builderPkg,
134140
+ localConfig
134141
+ )
134074
134142
  ).then(
134075
134143
  (override) => {
134076
134144
  if (override)
@@ -165029,6 +165097,17 @@ var init_inspect4 = __esm({
165029
165097
  });
165030
165098
 
165031
165099
  // src/commands/integration/wizard.ts
165100
+ function createHiddenStep(key, schema) {
165101
+ if (schema["ui:hidden"] !== true && schema["ui:hidden"] !== "create") {
165102
+ throw new Error(
165103
+ `HiddenStep: Expected "ui:hidden" to have value 'true' or '"create"' for key "${key}", but was "${schema["ui:hidden"]}"`
165104
+ );
165105
+ }
165106
+ return async () => {
165107
+ const value = schema.default;
165108
+ return [key, value];
165109
+ };
165110
+ }
165032
165111
  function createInputStep(key, schema) {
165033
165112
  if (schema["ui:control"] !== "input") {
165034
165113
  throw new Error(
@@ -165124,6 +165203,7 @@ function createMetadataWizard(metadataSchema) {
165124
165203
  for (const [key, schema] of Object.entries(properties)) {
165125
165204
  try {
165126
165205
  if (isHidden(schema)) {
165206
+ steps.push(createHiddenStep(key, schema));
165127
165207
  continue;
165128
165208
  }
165129
165209
  if (isDisabled(schema)) {
@@ -165234,7 +165314,7 @@ var init_wizard = __esm({
165234
165314
  });
165235
165315
 
165236
165316
  // src/util/integration/provision-store-resource.ts
165237
- async function provisionStoreResource(client2, installationId, productId, billingPlanId, name, metadata) {
165317
+ async function provisionStoreResource(client2, installationId, productId, billingPlanId, name, metadata, authorizationId) {
165238
165318
  return await client2.fetch(
165239
165319
  "/v1/storage/stores/integration",
165240
165320
  {
@@ -165245,7 +165325,8 @@ async function provisionStoreResource(client2, installationId, productId, billin
165245
165325
  integrationConfigurationId: installationId,
165246
165326
  integrationProductIdOrSlug: productId,
165247
165327
  metadata,
165248
- name
165328
+ name,
165329
+ authorizationId
165249
165330
  }
165250
165331
  }
165251
165332
  );
@@ -165341,6 +165422,42 @@ var init_add9 = __esm({
165341
165422
  }
165342
165423
  });
165343
165424
 
165425
+ // src/util/integration/create-authorization.ts
165426
+ async function createAuthorization(client2, integrationIdOrSlug, installationId, productId, billingPlanId, metadata, prepaymentAmountCents) {
165427
+ return await client2.fetch("/v1/integrations/billing/authorization", {
165428
+ method: "POST",
165429
+ json: true,
165430
+ body: {
165431
+ billingPlanId,
165432
+ integrationIdOrSlug,
165433
+ integrationConfigurationId: installationId,
165434
+ productId,
165435
+ metadata: JSON.stringify(metadata),
165436
+ prepaymentAmountCents
165437
+ }
165438
+ });
165439
+ }
165440
+ var init_create_authorization = __esm({
165441
+ "src/util/integration/create-authorization.ts"() {
165442
+ "use strict";
165443
+ }
165444
+ });
165445
+
165446
+ // src/util/integration/fetch-authorization.ts
165447
+ async function fetchAuthorization(client2, authorizationId) {
165448
+ return client2.fetch(
165449
+ `/v1/integrations/billing/authorization/${authorizationId}`,
165450
+ {
165451
+ json: true
165452
+ }
165453
+ );
165454
+ }
165455
+ var init_fetch_authorization = __esm({
165456
+ "src/util/integration/fetch-authorization.ts"() {
165457
+ "use strict";
165458
+ }
165459
+ });
165460
+
165344
165461
  // src/commands/integration/add.ts
165345
165462
  async function add5(client2, args2) {
165346
165463
  const telemetry2 = new IntegrationAddTelemetryClient({
@@ -165412,8 +165529,8 @@ async function add5(client2, args2) {
165412
165529
  );
165413
165530
  const metadataSchema = product.metadataSchema;
165414
165531
  const metadataWizard = createMetadataWizard(metadataSchema);
165415
- const provisionResourceViaCLIIsSupported = false;
165416
- if (!provisionResourceViaCLIIsSupported || !installation) {
165532
+ const provisionResourceViaCLIIsSupported = installation && metadataWizard.isSupported;
165533
+ if (!provisionResourceViaCLIIsSupported) {
165417
165534
  const projectLink = await getOptionalLinkedProject(client2);
165418
165535
  if (projectLink?.status === "error") {
165419
165536
  return projectLink.exitCode;
@@ -165423,7 +165540,7 @@ async function add5(client2, args2) {
165423
165540
  true
165424
165541
  );
165425
165542
  if (openInWeb) {
165426
- privisionResourceViaWebUI(
165543
+ provisionResourceViaWebUI(
165427
165544
  team.id,
165428
165545
  integration.id,
165429
165546
  product.id,
@@ -165432,8 +165549,9 @@ async function add5(client2, args2) {
165432
165549
  }
165433
165550
  return 0;
165434
165551
  }
165435
- return provisionResourceViaCLI(
165552
+ return await provisionResourceViaCLI(
165436
165553
  client2,
165554
+ team.id,
165437
165555
  integration,
165438
165556
  installation,
165439
165557
  product,
@@ -165457,7 +165575,7 @@ async function getOptionalLinkedProject(client2) {
165457
165575
  }
165458
165576
  return { status: "success", project: linkedProject.project };
165459
165577
  }
165460
- function privisionResourceViaWebUI(teamId, integrationId, productId, projectId) {
165578
+ function provisionResourceViaWebUI(teamId, integrationId, productId, projectId) {
165461
165579
  const url3 = new URL("/api/marketplace/cli", "https://vercel.com");
165462
165580
  url3.searchParams.set("teamId", teamId);
165463
165581
  url3.searchParams.set("integrationId", integrationId);
@@ -165469,7 +165587,7 @@ function privisionResourceViaWebUI(teamId, integrationId, productId, projectId)
165469
165587
  output_manager_default.print("Opening the Vercel Dashboard to continue the installation...");
165470
165588
  (0, import_open3.default)(url3.href);
165471
165589
  }
165472
- async function provisionResourceViaCLI(client2, integration, installation, product, metadataWizard) {
165590
+ async function provisionResourceViaCLI(client2, teamId, integration, installation, product, metadataWizard) {
165473
165591
  const name = await client2.input.text({
165474
165592
  message: "What is the name of the resource?"
165475
165593
  });
@@ -165497,6 +165615,25 @@ async function provisionResourceViaCLI(client2, integration, installation, produ
165497
165615
  output_manager_default.error("No billing plan selected");
165498
165616
  return 1;
165499
165617
  }
165618
+ if (billingPlan.type !== "subscription") {
165619
+ const projectLink = await getOptionalLinkedProject(client2);
165620
+ if (projectLink?.status === "error") {
165621
+ return projectLink.exitCode;
165622
+ }
165623
+ const openInWeb = await client2.input.confirm(
165624
+ "You have selected a plan that cannot be provisioned through the CLI. Open Vercel Dashboard?",
165625
+ true
165626
+ );
165627
+ if (openInWeb) {
165628
+ provisionResourceViaWebUI(
165629
+ teamId,
165630
+ integration.id,
165631
+ product.id,
165632
+ projectLink?.project?.id
165633
+ );
165634
+ }
165635
+ return 0;
165636
+ }
165500
165637
  const confirmed = await confirmProductSelection(
165501
165638
  client2,
165502
165639
  product,
@@ -165507,14 +165644,28 @@ async function provisionResourceViaCLI(client2, integration, installation, produ
165507
165644
  if (!confirmed) {
165508
165645
  return 1;
165509
165646
  }
165510
- return provisionStorageProduct(
165511
- client2,
165512
- product,
165513
- installation,
165514
- name,
165515
- metadata,
165516
- billingPlan
165517
- );
165647
+ try {
165648
+ const authorizationId = await getAuthorizationId(
165649
+ client2,
165650
+ teamId,
165651
+ installation,
165652
+ product,
165653
+ metadata,
165654
+ billingPlan
165655
+ );
165656
+ return await provisionStorageProduct(
165657
+ client2,
165658
+ product,
165659
+ installation,
165660
+ name,
165661
+ metadata,
165662
+ billingPlan,
165663
+ authorizationId
165664
+ );
165665
+ } catch (error3) {
165666
+ output_manager_default.error(error3.message);
165667
+ return 1;
165668
+ }
165518
165669
  }
165519
165670
  async function selectProduct(client2, integration) {
165520
165671
  const products = integration.products;
@@ -165540,6 +165691,11 @@ async function selectBillingPlan(client2, billingPlans) {
165540
165691
  separator: true,
165541
165692
  choices: billingPlans.map((plan) => {
165542
165693
  const body = [plan.description];
165694
+ if (plan.type !== "subscription") {
165695
+ body.push(
165696
+ "This plan is not subscription-based. Selecting it will prompt you to use the Vercel Dashboard."
165697
+ );
165698
+ }
165543
165699
  if (plan.details?.length) {
165544
165700
  const detailsTable = formatTable(
165545
165701
  ["", ""],
@@ -165603,7 +165759,72 @@ async function confirmProductSelection(client2, product, name, metadata, billing
165603
165759
  );
165604
165760
  return client2.input.confirm("Confirm selection?", true);
165605
165761
  }
165606
- async function provisionStorageProduct(client2, product, installation, name, metadata, billingPlan) {
165762
+ async function getAuthorizationId(client2, teamId, installation, product, metadata, billingPlan) {
165763
+ output_manager_default.spinner("Validating payment...", 250);
165764
+ const originalAuthorizationState = await createAuthorization(
165765
+ client2,
165766
+ installation.integrationId,
165767
+ installation.id,
165768
+ product.id,
165769
+ billingPlan.id,
165770
+ metadata
165771
+ );
165772
+ if (!originalAuthorizationState.authorization) {
165773
+ output_manager_default.stopSpinner();
165774
+ throw new Error(
165775
+ "Failed to get an authorization state. If the problem persists, please contact support."
165776
+ );
165777
+ }
165778
+ let authorization = originalAuthorizationState.authorization;
165779
+ while (authorization.status === "pending") {
165780
+ await sleep(200);
165781
+ authorization = await fetchAuthorization(
165782
+ client2,
165783
+ originalAuthorizationState.authorization.id
165784
+ );
165785
+ }
165786
+ output_manager_default.stopSpinner();
165787
+ if (authorization.status === "succeeded") {
165788
+ output_manager_default.log("Validation complete.");
165789
+ return authorization.id;
165790
+ }
165791
+ if (authorization.status === "failed") {
165792
+ throw new Error(
165793
+ "Payment validation failed. Please change your payment method via the web UI and try again."
165794
+ );
165795
+ }
165796
+ output_manager_default.spinner(
165797
+ "Payment validation requires manual action. Please complete the steps in your browser..."
165798
+ );
165799
+ handleManualVerificationAction(
165800
+ teamId,
165801
+ originalAuthorizationState.authorization.id
165802
+ );
165803
+ while (authorization.status !== "succeeded") {
165804
+ await sleep(200);
165805
+ authorization = await fetchAuthorization(
165806
+ client2,
165807
+ originalAuthorizationState.authorization.id
165808
+ );
165809
+ if (authorization.status === "failed") {
165810
+ throw new Error(
165811
+ "Payment validation failed. Please change your payment method via the web UI and try again."
165812
+ );
165813
+ }
165814
+ }
165815
+ output_manager_default.stopSpinner();
165816
+ output_manager_default.log("Validation complete.");
165817
+ return authorization.id;
165818
+ }
165819
+ function handleManualVerificationAction(teamId, authorizationId) {
165820
+ const url3 = new URL("/api/marketplace/cli", "https://vercel.com");
165821
+ url3.searchParams.set("teamId", teamId);
165822
+ url3.searchParams.set("authorizationId", authorizationId);
165823
+ url3.searchParams.set("cmd", "authorize");
165824
+ output_manager_default.print("Opening the Vercel Dashboard to continue the installation...");
165825
+ (0, import_open3.default)(url3.href);
165826
+ }
165827
+ async function provisionStorageProduct(client2, product, installation, name, metadata, billingPlan, authorizationId) {
165607
165828
  output_manager_default.spinner("Provisioning resource...");
165608
165829
  let storeId;
165609
165830
  try {
@@ -165613,7 +165834,8 @@ async function provisionStorageProduct(client2, product, installation, name, met
165613
165834
  product.id,
165614
165835
  billingPlan.id,
165615
165836
  name,
165616
- metadata
165837
+ metadata,
165838
+ authorizationId
165617
165839
  );
165618
165840
  storeId = result.store.id;
165619
165841
  } catch (error3) {
@@ -165687,6 +165909,9 @@ var init_add10 = __esm({
165687
165909
  init_fetch_integration();
165688
165910
  init_output_manager();
165689
165911
  init_add9();
165912
+ init_create_authorization();
165913
+ init_sleep();
165914
+ init_fetch_authorization();
165690
165915
  }
165691
165916
  });
165692
165917
 
@@ -165757,6 +165982,12 @@ var init_integration = __esm({
165757
165982
  value: actual
165758
165983
  });
165759
165984
  }
165985
+ trackCliSubcommandBalance(actual) {
165986
+ this.trackCliSubcommand({
165987
+ subcommand: "balance",
165988
+ value: actual
165989
+ });
165990
+ }
165760
165991
  trackCliSubcommandRemove(actual) {
165761
165992
  this.trackCliSubcommand({
165762
165993
  subcommand: "remove",
@@ -165767,6 +165998,89 @@ var init_integration = __esm({
165767
165998
  }
165768
165999
  });
165769
166000
 
166001
+ // src/util/integration/fetch-installation-prepayment-info.ts
166002
+ async function fetchInstallationPrepaymentInfo(client2, teamId, installationId) {
166003
+ const searchParams = new URLSearchParams();
166004
+ searchParams.set("teamId", teamId);
166005
+ return await client2.fetch(
166006
+ `/v1/integrations/installations/${installationId}/billing/balance?teamId=${searchParams}`,
166007
+ {
166008
+ json: true
166009
+ }
166010
+ );
166011
+ }
166012
+ async function getBalanceInformation(client2, installationId, team) {
166013
+ output_manager_default.spinner("Retrieving balance info\u2026", 500);
166014
+ try {
166015
+ const prepaymentInfo = await fetchInstallationPrepaymentInfo(
166016
+ client2,
166017
+ team.id,
166018
+ installationId
166019
+ );
166020
+ output_manager_default.stopSpinner();
166021
+ if (!prepaymentInfo) {
166022
+ output_manager_default.error("No balance information found for this integration");
166023
+ return;
166024
+ }
166025
+ return prepaymentInfo;
166026
+ } catch (error3) {
166027
+ output_manager_default.stopSpinner();
166028
+ output_manager_default.error(`Failed to fetch balance info: ${error3.message}`);
166029
+ return;
166030
+ }
166031
+ }
166032
+ var init_fetch_installation_prepayment_info = __esm({
166033
+ "src/util/integration/fetch-installation-prepayment-info.ts"() {
166034
+ "use strict";
166035
+ init_output_manager();
166036
+ }
166037
+ });
166038
+
166039
+ // src/util/integration/fetch-marketplace-integrations.ts
166040
+ async function fetchMarketplaceIntegrations(client2, slug) {
166041
+ const searchParams = new URLSearchParams();
166042
+ searchParams.set("view", "account");
166043
+ searchParams.set("installationType", "marketplace");
166044
+ searchParams.set("integrationIdOrSlug", slug);
166045
+ return await client2.fetch(
166046
+ `/v2/integrations/configurations?${searchParams}`,
166047
+ {
166048
+ json: true
166049
+ }
166050
+ );
166051
+ }
166052
+ async function getFirstConfiguration(client2, integrationSlug) {
166053
+ const configurations = await fetchMarketplaceIntegrations(
166054
+ client2,
166055
+ integrationSlug
166056
+ );
166057
+ return configurations.length > 0 ? configurations[0] : void 0;
166058
+ }
166059
+ var init_fetch_marketplace_integrations = __esm({
166060
+ "src/util/integration/fetch-marketplace-integrations.ts"() {
166061
+ "use strict";
166062
+ }
166063
+ });
166064
+
166065
+ // src/util/telemetry/commands/integration/balance.ts
166066
+ var IntegrationBalanceTelemetryClient;
166067
+ var init_balance = __esm({
166068
+ "src/util/telemetry/commands/integration/balance.ts"() {
166069
+ "use strict";
166070
+ init_telemetry();
166071
+ IntegrationBalanceTelemetryClient = class extends TelemetryClient {
166072
+ trackCliArgumentIntegration(v, known) {
166073
+ if (v) {
166074
+ this.trackCliArgument({
166075
+ arg: "name",
166076
+ value: known ? v : this.redactedValue
166077
+ });
166078
+ }
166079
+ }
166080
+ };
166081
+ }
166082
+ });
166083
+
165770
166084
  // src/util/integration-resource/get-resources.ts
165771
166085
  async function getResources(client2, teamId) {
165772
166086
  const searchParams = new URLSearchParams();
@@ -165785,6 +166099,159 @@ var init_get_resources = __esm({
165785
166099
  }
165786
166100
  });
165787
166101
 
166102
+ // src/commands/integration/balance.ts
166103
+ async function balance(client2, args2) {
166104
+ const telemetry2 = new IntegrationBalanceTelemetryClient({
166105
+ opts: {
166106
+ store: client2.telemetryEventStore
166107
+ }
166108
+ });
166109
+ if (args2.length > 1) {
166110
+ output_manager_default.error("Cannot specify more than one integration at a time");
166111
+ return 1;
166112
+ }
166113
+ const integrationSlug = args2[0];
166114
+ if (!integrationSlug) {
166115
+ output_manager_default.error("You must pass an integration slug");
166116
+ return 1;
166117
+ }
166118
+ const { team } = await getScope(client2);
166119
+ if (!team) {
166120
+ output_manager_default.error("Team not found.");
166121
+ return 1;
166122
+ }
166123
+ const installation = await getBalanceInstallationId(
166124
+ client2,
166125
+ integrationSlug,
166126
+ telemetry2
166127
+ );
166128
+ if (installation === void 0) {
166129
+ return 1;
166130
+ }
166131
+ const installationId = installation.id;
166132
+ const resources = await getResourcesForInstallation(
166133
+ client2,
166134
+ installationId,
166135
+ team
166136
+ );
166137
+ if (resources === void 0) {
166138
+ return 1;
166139
+ }
166140
+ const prepaymentInfo = await getBalanceInformation(
166141
+ client2,
166142
+ installationId,
166143
+ team
166144
+ );
166145
+ if (prepaymentInfo === void 0) {
166146
+ return 1;
166147
+ }
166148
+ outputBalanceInformation(prepaymentInfo, resources, integrationSlug);
166149
+ return 0;
166150
+ }
166151
+ async function getBalanceInstallationId(client2, integrationSlug, telemetry2) {
166152
+ let knownIntegrationSlug = false;
166153
+ output_manager_default.spinner("Retrieving installation\u2026", 500);
166154
+ try {
166155
+ const installation = await getFirstConfiguration(client2, integrationSlug);
166156
+ if (!installation) {
166157
+ output_manager_default.stopSpinner();
166158
+ output_manager_default.error("No installations found for this integration");
166159
+ return;
166160
+ }
166161
+ knownIntegrationSlug = true;
166162
+ return installation;
166163
+ } catch (error3) {
166164
+ output_manager_default.stopSpinner();
166165
+ output_manager_default.error(`Failed to fetch installations: ${error3.message}`);
166166
+ return;
166167
+ } finally {
166168
+ telemetry2.trackCliArgumentIntegration(
166169
+ integrationSlug,
166170
+ knownIntegrationSlug
166171
+ );
166172
+ }
166173
+ }
166174
+ async function getResourcesForInstallation(client2, installationId, team) {
166175
+ output_manager_default.spinner("Retrieving resources\u2026", 500);
166176
+ try {
166177
+ const resources = (await getResources(client2, team.id)).filter(
166178
+ (resource) => resource.product?.integrationConfigurationId === installationId
166179
+ );
166180
+ output_manager_default.stopSpinner();
166181
+ return resources;
166182
+ } catch (error3) {
166183
+ output_manager_default.stopSpinner();
166184
+ output_manager_default.error(`Failed to fetch resources: ${error3.message}`);
166185
+ return;
166186
+ }
166187
+ }
166188
+ function outputBalanceInformation(prepaymentInfo, resources, integrationSlug) {
166189
+ const hasBalances = prepaymentInfo.balances.length > 0;
166190
+ const hasThresholds = prepaymentInfo.thresholds.length > 0;
166191
+ if (!hasBalances) {
166192
+ output_manager_default.log("No balances found for this integration");
166193
+ }
166194
+ if (!hasThresholds) {
166195
+ output_manager_default.log("No thresholds found for this integration");
166196
+ }
166197
+ if (!hasBalances && !hasThresholds) {
166198
+ return 0;
166199
+ }
166200
+ const mappings = {};
166201
+ for (const balance2 of prepaymentInfo.balances) {
166202
+ const resourceName = balance2.resourceId ? resources.find((r) => r.externalResourceId === balance2.resourceId)?.name ?? balance2.resourceId : "installation";
166203
+ mappings[balance2.resourceId ?? "installation"] = { balance: balance2, resourceName };
166204
+ }
166205
+ for (const threshold of prepaymentInfo.thresholds) {
166206
+ const mapping = mappings[threshold.resourceId ?? "installation"];
166207
+ if (mapping) {
166208
+ mapping.threshold = threshold;
166209
+ } else {
166210
+ const resourceName = threshold.resourceId ? resources.find((r) => r.externalResourceId === threshold.resourceId)?.name ?? threshold.resourceId : "installation";
166211
+ mappings[resourceName] = { threshold, resourceName };
166212
+ }
166213
+ }
166214
+ output_manager_default.log(
166215
+ `${import_chalk91.default.bold(`Balances and thresholds for ${integrationSlug}`)}:`
166216
+ );
166217
+ for (const key in mappings) {
166218
+ const mapping = mappings[key];
166219
+ const name = mapping.resourceName;
166220
+ const balance2 = mapping.balance;
166221
+ const threshold = mapping.threshold;
166222
+ output_manager_default.log(`\u25CF ${name}`);
166223
+ if (balance2) {
166224
+ output_manager_default.log(
166225
+ ` Balance: ${formattedCurrency(balance2.currencyValueInCents)}`
166226
+ );
166227
+ }
166228
+ if (threshold) {
166229
+ output_manager_default.log(
166230
+ ` Threshold: Spend ${formattedCurrency(threshold.purchaseAmountInCents)} if balance goes below ${formattedCurrency(threshold.minimumAmountInCents)}`
166231
+ );
166232
+ }
166233
+ }
166234
+ }
166235
+ function formattedCurrency(amountInCents) {
166236
+ return Intl.NumberFormat("en-US", {
166237
+ style: "currency",
166238
+ currency: "USD"
166239
+ }).format(amountInCents / 100);
166240
+ }
166241
+ var import_chalk91;
166242
+ var init_balance2 = __esm({
166243
+ "src/commands/integration/balance.ts"() {
166244
+ "use strict";
166245
+ import_chalk91 = __toESM3(require_source());
166246
+ init_output_manager();
166247
+ init_get_scope();
166248
+ init_fetch_installation_prepayment_info();
166249
+ init_fetch_marketplace_integrations();
166250
+ init_balance();
166251
+ init_get_resources();
166252
+ }
166253
+ });
166254
+
165788
166255
  // src/util/integration/build-sso-link.ts
165789
166256
  function buildSSOLink(team, configurationId) {
165790
166257
  const url3 = new URL("/api/marketplace/sso", "https://vercel.com");
@@ -165929,18 +166396,18 @@ async function list2(client2) {
165929
166396
  return 0;
165930
166397
  }
165931
166398
  output_manager_default.log(
165932
- `Integrations in ${import_chalk91.default.bold(contextName)}:
166399
+ `Integrations in ${import_chalk92.default.bold(contextName)}:
165933
166400
  ${table(
165934
166401
  [
165935
166402
  ["Name", "Status", "Product", "Integration", "Projects"].map(
165936
- (header) => import_chalk91.default.bold(import_chalk91.default.cyan(header))
166403
+ (header) => import_chalk92.default.bold(import_chalk92.default.cyan(header))
165937
166404
  ),
165938
166405
  ...results.map((result) => [
165939
- resourceLink(contextName, result) ?? import_chalk91.default.gray("\u2013"),
166406
+ resourceLink(contextName, result) ?? import_chalk92.default.gray("\u2013"),
165940
166407
  resourceStatus(result.status ?? "\u2013"),
165941
- result.product ?? import_chalk91.default.gray("\u2013"),
165942
- integrationLink(result, team) ?? import_chalk91.default.gray("\u2013"),
165943
- import_chalk91.default.grey(result.projects ? result.projects : "\u2013")
166408
+ result.product ?? import_chalk92.default.gray("\u2013"),
166409
+ integrationLink(result, team) ?? import_chalk92.default.gray("\u2013"),
166410
+ import_chalk92.default.grey(result.projects ? result.projects : "\u2013")
165944
166411
  ])
165945
166412
  ],
165946
166413
  { hsep: 8 }
@@ -165953,17 +166420,17 @@ function resourceStatus(status2) {
165953
166420
  const statusTitleCase = (0, import_title7.default)(status2);
165954
166421
  switch (status2) {
165955
166422
  case "initializing":
165956
- return import_chalk91.default.yellow(CIRCLE) + statusTitleCase;
166423
+ return import_chalk92.default.yellow(CIRCLE) + statusTitleCase;
165957
166424
  case "error":
165958
- return import_chalk91.default.red(CIRCLE) + statusTitleCase;
166425
+ return import_chalk92.default.red(CIRCLE) + statusTitleCase;
165959
166426
  case "available":
165960
- return import_chalk91.default.green(CIRCLE) + statusTitleCase;
166427
+ return import_chalk92.default.green(CIRCLE) + statusTitleCase;
165961
166428
  case "suspended":
165962
- return import_chalk91.default.white(CIRCLE) + statusTitleCase;
166429
+ return import_chalk92.default.white(CIRCLE) + statusTitleCase;
165963
166430
  case "limits-exceeded-suspended":
165964
- return `${import_chalk91.default.white(CIRCLE)}Limits exceeded`;
166431
+ return `${import_chalk92.default.white(CIRCLE)}Limits exceeded`;
165965
166432
  default:
165966
- return import_chalk91.default.gray(statusTitleCase);
166433
+ return import_chalk92.default.gray(statusTitleCase);
165967
166434
  }
165968
166435
  }
165969
166436
  function resourceLink(orgSlug, resource) {
@@ -165984,18 +166451,18 @@ function integrationLink(integration, team) {
165984
166451
  if (!integration.configurationId) {
165985
166452
  return integration.integration;
165986
166453
  }
165987
- const boldName = import_chalk91.default.bold(integration.integration);
166454
+ const boldName = import_chalk92.default.bold(integration.integration);
165988
166455
  const integrationDeepLink = buildSSOLink(team, integration.configurationId);
165989
166456
  return output_manager_default.link(boldName, integrationDeepLink, {
165990
166457
  fallback: () => boldName,
165991
166458
  color: false
165992
166459
  });
165993
166460
  }
165994
- var import_chalk91, import_title7;
166461
+ var import_chalk92, import_title7;
165995
166462
  var init_list4 = __esm({
165996
166463
  "src/commands/integration/list.ts"() {
165997
166464
  "use strict";
165998
- import_chalk91 = __toESM3(require_source());
166465
+ import_chalk92 = __toESM3(require_source());
165999
166466
  init_get_scope();
166000
166467
  init_link2();
166001
166468
  init_get_resources();
@@ -166011,32 +166478,6 @@ var init_list4 = __esm({
166011
166478
  }
166012
166479
  });
166013
166480
 
166014
- // src/util/integration/fetch-marketplace-integrations.ts
166015
- async function fetchMarketplaceIntegrations(client2, slug) {
166016
- const searchParams = new URLSearchParams();
166017
- searchParams.set("view", "account");
166018
- searchParams.set("installationType", "marketplace");
166019
- searchParams.set("integrationIdOrSlug", slug);
166020
- return await client2.fetch(
166021
- `/v2/integrations/configurations?${searchParams}`,
166022
- {
166023
- json: true
166024
- }
166025
- );
166026
- }
166027
- async function getFirstConfiguration(client2, integrationSlug) {
166028
- const configurations = await fetchMarketplaceIntegrations(
166029
- client2,
166030
- integrationSlug
166031
- );
166032
- return configurations.length > 0 ? configurations[0] : void 0;
166033
- }
166034
- var init_fetch_marketplace_integrations = __esm({
166035
- "src/util/integration/fetch-marketplace-integrations.ts"() {
166036
- "use strict";
166037
- }
166038
- });
166039
-
166040
166481
  // src/util/telemetry/commands/integration/open.ts
166041
166482
  var IntegrationOpenTelemetryClient;
166042
166483
  var init_open = __esm({
@@ -166082,7 +166523,7 @@ async function openIntegration(client2, args2) {
166082
166523
  knownIntegrationSlug = !!configuration;
166083
166524
  } catch (error3) {
166084
166525
  output_manager_default.error(
166085
- `Failed to fetch configuration for ${import_chalk92.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
166526
+ `Failed to fetch configuration for ${import_chalk93.default.bold(`"${integrationSlug}"`)}: ${error3.message}`
166086
166527
  );
166087
166528
  return 1;
166088
166529
  } finally {
@@ -166090,19 +166531,19 @@ async function openIntegration(client2, args2) {
166090
166531
  }
166091
166532
  if (!configuration) {
166092
166533
  output_manager_default.error(
166093
- `No configuration found for ${import_chalk92.default.bold(`"${integrationSlug}"`)}.`
166534
+ `No configuration found for ${import_chalk93.default.bold(`"${integrationSlug}"`)}.`
166094
166535
  );
166095
166536
  return 1;
166096
166537
  }
166097
- output_manager_default.print(`Opening the ${import_chalk92.default.bold(integrationSlug)} dashboard...`);
166538
+ output_manager_default.print(`Opening the ${import_chalk93.default.bold(integrationSlug)} dashboard...`);
166098
166539
  (0, import_open4.default)(buildSSOLink(team, configuration.id));
166099
166540
  return 0;
166100
166541
  }
166101
- var import_chalk92, import_open4;
166542
+ var import_chalk93, import_open4;
166102
166543
  var init_open_integration = __esm({
166103
166544
  "src/commands/integration/open-integration.ts"() {
166104
166545
  "use strict";
166105
- import_chalk92 = __toESM3(require_source());
166546
+ import_chalk93 = __toESM3(require_source());
166106
166547
  import_open4 = __toESM3(require_open());
166107
166548
  init_get_scope();
166108
166549
  init_fetch_marketplace_integrations();
@@ -166195,7 +166636,7 @@ async function remove3(client2) {
166195
166636
  );
166196
166637
  output_manager_default.stopSpinner();
166197
166638
  if (!integrationConfiguration) {
166198
- output_manager_default.error(`No integration ${import_chalk93.default.bold(integrationName)} found.`);
166639
+ output_manager_default.error(`No integration ${import_chalk94.default.bold(integrationName)} found.`);
166199
166640
  telemetry2.trackCliArgumentIntegration(integrationName, false);
166200
166641
  return 0;
166201
166642
  }
@@ -166214,26 +166655,26 @@ async function remove3(client2) {
166214
166655
  await removeIntegration(client2, integrationConfiguration, team);
166215
166656
  } catch (error3) {
166216
166657
  output_manager_default.error(
166217
- import_chalk93.default.red(
166218
- `Failed to remove ${import_chalk93.default.bold(integrationName)}: ${error3.message}`
166658
+ import_chalk94.default.red(
166659
+ `Failed to remove ${import_chalk94.default.bold(integrationName)}: ${error3.message}`
166219
166660
  )
166220
166661
  );
166221
166662
  return 1;
166222
166663
  }
166223
- output_manager_default.success(`${import_chalk93.default.bold(integrationName)} successfully removed.`);
166664
+ output_manager_default.success(`${import_chalk94.default.bold(integrationName)} successfully removed.`);
166224
166665
  return 0;
166225
166666
  }
166226
166667
  async function confirmIntegrationRemoval(client2, integration, team) {
166227
166668
  output_manager_default.log(
166228
- `The ${import_chalk93.default.bold(integration)} integration will be removed permanently from team ${import_chalk93.default.bold(team.name)}.`
166669
+ `The ${import_chalk94.default.bold(integration)} integration will be removed permanently from team ${import_chalk94.default.bold(team.name)}.`
166229
166670
  );
166230
- return client2.input.confirm(`${import_chalk93.default.red("Are you sure?")}`, false);
166671
+ return client2.input.confirm(`${import_chalk94.default.red("Are you sure?")}`, false);
166231
166672
  }
166232
- var import_chalk93;
166673
+ var import_chalk94;
166233
166674
  var init_remove_integration2 = __esm({
166234
166675
  "src/commands/integration/remove-integration.ts"() {
166235
166676
  "use strict";
166236
- import_chalk93 = __toESM3(require_source());
166677
+ import_chalk94 = __toESM3(require_source());
166237
166678
  init_output_manager();
166238
166679
  init_get_args();
166239
166680
  init_get_flags_specification();
@@ -166304,6 +166745,15 @@ async function main9(client2) {
166304
166745
  telemetry2.trackCliSubcommandList(subcommandOriginal);
166305
166746
  return list2(client2);
166306
166747
  }
166748
+ case "balance": {
166749
+ if (needHelp) {
166750
+ telemetry2.trackCliFlagHelp("integration", subcommandOriginal);
166751
+ printHelp(balanceSubcommand);
166752
+ return 2;
166753
+ }
166754
+ telemetry2.trackCliSubcommandBalance(subcommandOriginal);
166755
+ return balance(client2, subArgs);
166756
+ }
166307
166757
  case "open": {
166308
166758
  if (needHelp) {
166309
166759
  telemetry2.trackCliFlagHelp("integration", subcommandOriginal);
@@ -166341,6 +166791,7 @@ var init_integration2 = __esm({
166341
166791
  init_integration();
166342
166792
  init_help();
166343
166793
  init_add10();
166794
+ init_balance2();
166344
166795
  init_command15();
166345
166796
  init_list4();
166346
166797
  init_open_integration();
@@ -166349,6 +166800,7 @@ var init_integration2 = __esm({
166349
166800
  add: getCommandAliases(addSubcommand5),
166350
166801
  open: getCommandAliases(openSubcommand),
166351
166802
  list: getCommandAliases(listSubcommand6),
166803
+ balance: getCommandAliases(balanceSubcommand),
166352
166804
  remove: getCommandAliases(removeSubcommand7)
166353
166805
  };
166354
166806
  }
@@ -166361,6 +166813,12 @@ var init_integration_resource = __esm({
166361
166813
  "use strict";
166362
166814
  init_telemetry();
166363
166815
  IntegrationResourceTelemetryClient = class extends TelemetryClient {
166816
+ trackCliSubcommandCreateThreshold(actual) {
166817
+ this.trackCliSubcommand({
166818
+ subcommand: "create-threshold",
166819
+ value: actual
166820
+ });
166821
+ }
166364
166822
  trackCliSubcommandRemove(actual) {
166365
166823
  this.trackCliSubcommand({
166366
166824
  subcommand: "remove",
@@ -166377,6 +166835,382 @@ var init_integration_resource = __esm({
166377
166835
  }
166378
166836
  });
166379
166837
 
166838
+ // src/util/telemetry/commands/integration-resource/create-threshold.ts
166839
+ var IntegrationResourceCreateThresholdTelemetryClient;
166840
+ var init_create_threshold = __esm({
166841
+ "src/util/telemetry/commands/integration-resource/create-threshold.ts"() {
166842
+ "use strict";
166843
+ init_telemetry();
166844
+ IntegrationResourceCreateThresholdTelemetryClient = class extends TelemetryClient {
166845
+ trackCliArgumentResource(v) {
166846
+ if (v) {
166847
+ this.trackCliArgument({
166848
+ arg: "resource",
166849
+ value: this.redactedValue
166850
+ });
166851
+ }
166852
+ }
166853
+ trackCliArgumentMinimum(v) {
166854
+ if (v) {
166855
+ this.trackCliArgument({
166856
+ arg: "minimum",
166857
+ value: this.redactedValue
166858
+ });
166859
+ }
166860
+ }
166861
+ trackCliArgumentSpend(v) {
166862
+ if (v) {
166863
+ this.trackCliArgument({
166864
+ arg: "spend",
166865
+ value: this.redactedValue
166866
+ });
166867
+ }
166868
+ }
166869
+ trackCliArgumentLimit(v) {
166870
+ if (v) {
166871
+ this.trackCliArgument({
166872
+ arg: "limit",
166873
+ value: this.redactedValue
166874
+ });
166875
+ }
166876
+ }
166877
+ trackCliFlagYes(v) {
166878
+ if (v) {
166879
+ this.trackCliFlag("yes");
166880
+ }
166881
+ }
166882
+ };
166883
+ }
166884
+ });
166885
+
166886
+ // src/util/integration-resource/update-threshold.ts
166887
+ async function updateThreshold(client2, installationId, resourceId, billingPlanId, minimumAmountInCents, purchaseAmountInCents, maximumAmountPerPeriodInCents, metadata) {
166888
+ return await client2.fetch(
166889
+ `/v1/integrations/installations/${installationId}/resources/${resourceId}/billing/threshold`,
166890
+ {
166891
+ method: "POST",
166892
+ json: true,
166893
+ body: {
166894
+ billingPlanId,
166895
+ minimumAmountInCents,
166896
+ purchaseAmountInCents,
166897
+ maximumAmountPerPeriodInCents,
166898
+ metadata: JSON.stringify(metadata)
166899
+ }
166900
+ }
166901
+ );
166902
+ }
166903
+ var init_update_threshold = __esm({
166904
+ "src/util/integration-resource/update-threshold.ts"() {
166905
+ "use strict";
166906
+ }
166907
+ });
166908
+
166909
+ // src/util/integration/update-installation-threshold.ts
166910
+ async function updateInstallationThreshold(client2, installationId, billingPlanId, minimumAmountInCents, purchaseAmountInCents, maximumAmountPerPeriodInCents, metadata) {
166911
+ return await client2.fetch(
166912
+ `/v1/integrations/installations/${installationId}/billing/threshold/batch`,
166913
+ {
166914
+ method: "POST",
166915
+ json: true,
166916
+ body: {
166917
+ items: [
166918
+ {
166919
+ billingPlanId,
166920
+ minimumAmountInCents,
166921
+ purchaseAmountInCents,
166922
+ maximumAmountPerPeriodInCents,
166923
+ metadata: JSON.stringify(metadata)
166924
+ }
166925
+ ]
166926
+ }
166927
+ }
166928
+ );
166929
+ }
166930
+ var init_update_installation_threshold = __esm({
166931
+ "src/util/integration/update-installation-threshold.ts"() {
166932
+ "use strict";
166933
+ }
166934
+ });
166935
+
166936
+ // src/commands/integration-resource/create-threshold.ts
166937
+ async function createThreshold(client2) {
166938
+ const telemetry2 = new IntegrationResourceCreateThresholdTelemetryClient({
166939
+ opts: {
166940
+ store: client2.telemetryEventStore
166941
+ }
166942
+ });
166943
+ let parsedArguments = null;
166944
+ const flagsSpecification = getFlagsSpecification(
166945
+ createThresholdSubcommand.options
166946
+ );
166947
+ try {
166948
+ parsedArguments = parseArguments(client2.argv.slice(3), flagsSpecification);
166949
+ } catch (error3) {
166950
+ printError(error3);
166951
+ return 1;
166952
+ }
166953
+ let args2;
166954
+ try {
166955
+ args2 = parseCreateThresholdArguments(parsedArguments.args, telemetry2);
166956
+ } catch (error3) {
166957
+ output_manager_default.error(error3.message);
166958
+ return 1;
166959
+ }
166960
+ const skipConfirmWithYes = parsedArguments.flags["--yes"];
166961
+ telemetry2.trackCliFlagYes(skipConfirmWithYes);
166962
+ const { resourceName, minimum, spend, limit } = args2;
166963
+ const { team } = await getScope(client2);
166964
+ if (!team) {
166965
+ output_manager_default.error("Team not found.");
166966
+ return 1;
166967
+ }
166968
+ output_manager_default.spinner("Retrieving resource\u2026", 500);
166969
+ const resources = await getResources(client2, team.id);
166970
+ const targetedResource = resources.find(
166971
+ (resource) => resource.name === resourceName
166972
+ );
166973
+ output_manager_default.stopSpinner();
166974
+ if (!targetedResource) {
166975
+ output_manager_default.log(`The resource ${import_chalk95.default.bold(resourceName)} was not found.`);
166976
+ return 0;
166977
+ }
166978
+ if (!targetedResource.product?.integrationConfigurationId) {
166979
+ output_manager_default.error(
166980
+ `The resource ${import_chalk95.default.bold(resourceName)} does not have an integration configuration.`
166981
+ );
166982
+ return 1;
166983
+ }
166984
+ if (targetedResource.billingPlan?.type !== "prepayment") {
166985
+ output_manager_default.error(
166986
+ `The resource ${import_chalk95.default.bold(resourceName)} is not a prepayment-based resource.`
166987
+ );
166988
+ return 1;
166989
+ }
166990
+ const minimumSpend = parseFloat(targetedResource.billingPlan.minimumAmount ?? "0.50") * 100;
166991
+ if (minimumSpend > spend) {
166992
+ output_manager_default.error(
166993
+ `The spend amount $${spend / 100} is below your billing plan's minimum amount of $${minimumSpend / 100}.`
166994
+ );
166995
+ return 1;
166996
+ }
166997
+ const maximumSpend = parseFloat(targetedResource.billingPlan.maximumAmount ?? "1000000") * 100;
166998
+ if (targetedResource.billingPlan.maximumAmount !== void 0 && maximumSpend < spend) {
166999
+ output_manager_default.error(
167000
+ `The spend amount $${spend / 100} is above your billing plan's maximum amount of $${maximumSpend / 100}.`
167001
+ );
167002
+ return 1;
167003
+ }
167004
+ const prepaymentInfo = await getBalanceInformation(
167005
+ client2,
167006
+ targetedResource.product.integrationConfigurationId,
167007
+ team
167008
+ );
167009
+ if (prepaymentInfo === void 0) {
167010
+ return 1;
167011
+ }
167012
+ if (targetedResource.billingPlan.scope !== "resource") {
167013
+ output_manager_default.log(
167014
+ `The resource ${import_chalk95.default.bold(resourceName)} uses an installation-level balance.`
167015
+ );
167016
+ return await updateThresholdForInstallation({
167017
+ client: client2,
167018
+ resource: targetedResource,
167019
+ prepaymentInfo,
167020
+ minimum,
167021
+ spend,
167022
+ limit,
167023
+ skipConfirmWithYes: Boolean(skipConfirmWithYes)
167024
+ });
167025
+ }
167026
+ return await updateThresholdForResource({
167027
+ client: client2,
167028
+ resource: targetedResource,
167029
+ prepaymentInfo,
167030
+ minimum,
167031
+ spend,
167032
+ limit,
167033
+ skipConfirmWithYes: Boolean(skipConfirmWithYes)
167034
+ });
167035
+ }
167036
+ function parseCreateThresholdArguments(passedArgs, telemetry2) {
167037
+ if (passedArgs.length < 5) {
167038
+ throw new Error("Missing arguments. See `--help` for details.");
167039
+ }
167040
+ if (passedArgs.length > 5) {
167041
+ throw new Error("Too many arguments. See `--help` for details.");
167042
+ }
167043
+ const args2 = passedArgs.slice(1, 5);
167044
+ telemetry2.trackCliArgumentResource(args2[0]);
167045
+ telemetry2.trackCliArgumentMinimum(args2[1]);
167046
+ telemetry2.trackCliArgumentSpend(args2[2]);
167047
+ telemetry2.trackCliArgumentLimit(args2[3]);
167048
+ const resourceName = args2[0];
167049
+ const minimum = Number.parseFloat(args2[1]) * 100;
167050
+ const spend = Number.parseInt(args2[2]) * 100;
167051
+ const limit = Number.parseInt(args2[3]) * 100;
167052
+ if (isNaN(minimum)) {
167053
+ throw new Error(
167054
+ 'Minimum is an invalid number format. Spend must be a positive number (ex. "5.75")'
167055
+ );
167056
+ }
167057
+ if (isNaN(spend)) {
167058
+ throw new Error(
167059
+ 'Spend is an invalid number format. Spend must be a positive number (ex. "10.99").'
167060
+ );
167061
+ }
167062
+ if (isNaN(limit)) {
167063
+ throw new Error(
167064
+ 'Limit is an invalid number format. Limit must be a positive number (ex. "1000").'
167065
+ );
167066
+ }
167067
+ if (minimum < 0) {
167068
+ throw new Error("Minimum cannot be negative.");
167069
+ }
167070
+ if (spend < 0) {
167071
+ throw new Error("Spend cannot be negative.");
167072
+ }
167073
+ if (limit < 0) {
167074
+ throw new Error("Limit cannot be negative.");
167075
+ }
167076
+ if (minimum > spend) {
167077
+ throw new Error("Minimum cannot be greater than spend.");
167078
+ }
167079
+ if (minimum > limit) {
167080
+ throw new Error("Minimum cannot be greater than limit.");
167081
+ }
167082
+ if (limit < spend) {
167083
+ throw new Error("Limit cannot be less than spend.");
167084
+ }
167085
+ return { resourceName, minimum, spend, limit };
167086
+ }
167087
+ async function updateThresholdForResource(props) {
167088
+ const existingThreshold = props.prepaymentInfo.thresholds.find(
167089
+ (threshold) => threshold.resourceId === props.resource.externalResourceId
167090
+ );
167091
+ const existingBalance = props.prepaymentInfo.balances.find(
167092
+ (balance2) => balance2.resourceId === props.resource.externalResourceId
167093
+ );
167094
+ return handleUpdateThreshold({
167095
+ client: props.client,
167096
+ resource: props.resource,
167097
+ minimum: props.minimum,
167098
+ spend: props.spend,
167099
+ limit: props.limit,
167100
+ existingThreshold,
167101
+ existingBalance,
167102
+ skipConfirmWithYes: props.skipConfirmWithYes,
167103
+ isInstallationLevel: false
167104
+ });
167105
+ }
167106
+ async function updateThresholdForInstallation(props) {
167107
+ const existingThreshold = props.prepaymentInfo.thresholds.find(
167108
+ (threshold) => threshold.resourceId === void 0
167109
+ );
167110
+ const existingBalance = props.prepaymentInfo.balances.find(
167111
+ (balance2) => balance2.resourceId === void 0
167112
+ );
167113
+ return handleUpdateThreshold({
167114
+ client: props.client,
167115
+ resource: props.resource,
167116
+ minimum: props.minimum,
167117
+ spend: props.spend,
167118
+ limit: props.limit,
167119
+ existingThreshold,
167120
+ existingBalance,
167121
+ skipConfirmWithYes: props.skipConfirmWithYes,
167122
+ isInstallationLevel: true
167123
+ });
167124
+ }
167125
+ async function handleUpdateThreshold(props) {
167126
+ if (props.resource.billingPlan?.type !== "prepayment") {
167127
+ output_manager_default.log(
167128
+ `The resource ${import_chalk95.default.bold(props.resource.name)} is not a prepayment-based resource.`
167129
+ );
167130
+ return 0;
167131
+ }
167132
+ if (!props.resource.product?.integrationConfigurationId) {
167133
+ output_manager_default.log(
167134
+ `The resource ${import_chalk95.default.bold(props.resource.name)} does not have an integration configuration.`
167135
+ );
167136
+ return 0;
167137
+ }
167138
+ const entityTextReference = props.isInstallationLevel ? `installation ${import_chalk95.default.bold(props.resource.product?.name)}` : `resource ${import_chalk95.default.bold(props.resource.name)}`;
167139
+ if (props.existingThreshold) {
167140
+ const shouldOverwriteThreshold = props.skipConfirmWithYes || await props.client.input.confirm(
167141
+ `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?`,
167142
+ true
167143
+ );
167144
+ if (!shouldOverwriteThreshold) {
167145
+ output_manager_default.log("Aborting\u2026");
167146
+ return 0;
167147
+ }
167148
+ }
167149
+ if (props.existingBalance && props.existingBalance.currencyValueInCents < props.minimum) {
167150
+ const shouldOverwriteBalance = props.skipConfirmWithYes || await props.client.input.confirm(
167151
+ `The minimum threshold is higher than the current balance of $${props.existingBalance.currencyValueInCents / 100}. Are you sure?`,
167152
+ true
167153
+ );
167154
+ if (!shouldOverwriteBalance) {
167155
+ output_manager_default.log("Aborting\u2026");
167156
+ return 0;
167157
+ }
167158
+ }
167159
+ const thresholdCreationConfirmed = props.skipConfirmWithYes || await props.client.input.confirm(
167160
+ `Are you sure you want to create a threshold for the ${entityTextReference} with minimum $${props.minimum / 100}, spend $${props.spend / 100}, and limit $${props.limit / 100}?`,
167161
+ true
167162
+ );
167163
+ if (!thresholdCreationConfirmed) {
167164
+ output_manager_default.log("Aborting\u2026");
167165
+ return 0;
167166
+ }
167167
+ const metadata = JSON.parse(props.existingThreshold?.metadata ?? "{}");
167168
+ output_manager_default.spinner("Creating threshold\u2026", 500);
167169
+ if (props.isInstallationLevel) {
167170
+ await updateInstallationThreshold(
167171
+ props.client,
167172
+ props.resource.product.integrationConfigurationId,
167173
+ props.resource.billingPlan.id,
167174
+ props.minimum,
167175
+ props.spend,
167176
+ props.limit,
167177
+ metadata
167178
+ );
167179
+ } else {
167180
+ await updateThreshold(
167181
+ props.client,
167182
+ props.resource.product.integrationConfigurationId,
167183
+ props.resource.id,
167184
+ props.resource.billingPlan.id,
167185
+ props.minimum,
167186
+ props.spend,
167187
+ props.limit,
167188
+ metadata
167189
+ );
167190
+ }
167191
+ output_manager_default.stopSpinner();
167192
+ output_manager_default.success(`Threshold for ${entityTextReference} created successfully.`);
167193
+ return 0;
167194
+ }
167195
+ var import_chalk95;
167196
+ var init_create_threshold2 = __esm({
167197
+ "src/commands/integration-resource/create-threshold.ts"() {
167198
+ "use strict";
167199
+ import_chalk95 = __toESM3(require_source());
167200
+ init_output_manager();
167201
+ init_error2();
167202
+ init_get_args();
167203
+ init_get_flags_specification();
167204
+ init_get_resources();
167205
+ init_create_threshold();
167206
+ init_command14();
167207
+ init_get_scope();
167208
+ init_fetch_installation_prepayment_info();
167209
+ init_update_threshold();
167210
+ init_update_installation_threshold();
167211
+ }
167212
+ });
167213
+
166380
167214
  // src/util/integration-resource/disconnect-resource-from-project.ts
166381
167215
  async function disconnectResourceFromProject(client2, resource, connection) {
166382
167216
  return client2.fetch(
@@ -166505,7 +167339,7 @@ async function disconnect2(client2) {
166505
167339
  );
166506
167340
  output_manager_default.stopSpinner();
166507
167341
  if (!targetedResource) {
166508
- output_manager_default.error(`No resource ${import_chalk94.default.bold(resourceName)} found.`);
167342
+ output_manager_default.error(`No resource ${import_chalk96.default.bold(resourceName)} found.`);
166509
167343
  return 0;
166510
167344
  }
166511
167345
  if (parsedArguments.flags["--all"]) {
@@ -166555,7 +167389,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
166555
167389
  );
166556
167390
  if (!project) {
166557
167391
  output_manager_default.log(
166558
- `Could not find project ${import_chalk94.default.bold(projectName)} connected to resource ${import_chalk94.default.bold(resource.name)}.`
167392
+ `Could not find project ${import_chalk96.default.bold(projectName)} connected to resource ${import_chalk96.default.bold(resource.name)}.`
166559
167393
  );
166560
167394
  return 0;
166561
167395
  }
@@ -166567,7 +167401,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
166567
167401
  output_manager_default.spinner("Disconnecting resource\u2026", 500);
166568
167402
  await disconnectResourceFromProject(client2, resource, project);
166569
167403
  output_manager_default.success(
166570
- `Disconnected ${import_chalk94.default.bold(project.name)} from ${import_chalk94.default.bold(resource.name)}`
167404
+ `Disconnected ${import_chalk96.default.bold(project.name)} from ${import_chalk96.default.bold(resource.name)}`
166571
167405
  );
166572
167406
  } catch (error3) {
166573
167407
  output_manager_default.error(
@@ -166579,7 +167413,7 @@ async function handleDisconnectProject(client2, resource, projectName, skipConfi
166579
167413
  }
166580
167414
  async function handleDisconnectAllProjects(client2, resource, skipConfirmation) {
166581
167415
  if (resource.projectsMetadata?.length === 0) {
166582
- output_manager_default.log(`${import_chalk94.default.bold(resource.name)} has no projects to disconnect.`);
167416
+ output_manager_default.log(`${import_chalk96.default.bold(resource.name)} has no projects to disconnect.`);
166583
167417
  return;
166584
167418
  }
166585
167419
  if (!skipConfirmation && !await confirmDisconnectAllProjects(client2, resource)) {
@@ -166589,7 +167423,7 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
166589
167423
  output_manager_default.spinner("Disconnecting projects from resource\u2026", 500);
166590
167424
  await disconnectResourceFromAllProjects(client2, resource);
166591
167425
  output_manager_default.success(
166592
- `Disconnected all projects from ${import_chalk94.default.bold(resource.name)}`
167426
+ `Disconnected all projects from ${import_chalk96.default.bold(resource.name)}`
166593
167427
  );
166594
167428
  } catch (error3) {
166595
167429
  throw new FailedError(
@@ -166600,9 +167434,9 @@ async function handleDisconnectAllProjects(client2, resource, skipConfirmation)
166600
167434
  }
166601
167435
  async function confirmDisconnectProject(client2, resource, project) {
166602
167436
  output_manager_default.log(
166603
- `The resource ${import_chalk94.default.bold(resource.name)} will be disconnected from project ${import_chalk94.default.bold(project.name)}.`
167437
+ `The resource ${import_chalk96.default.bold(resource.name)} will be disconnected from project ${import_chalk96.default.bold(project.name)}.`
166604
167438
  );
166605
- return client2.input.confirm(`${import_chalk94.default.red("Are you sure?")}`, false);
167439
+ return client2.input.confirm(`${import_chalk96.default.red("Are you sure?")}`, false);
166606
167440
  }
166607
167441
  async function confirmDisconnectAllProjects(client2, resource) {
166608
167442
  output_manager_default.log("The following projects will be disconnected:");
@@ -166613,13 +167447,13 @@ async function confirmDisconnectAllProjects(client2, resource) {
166613
167447
  output_manager_default.print(` ${project.name}
166614
167448
  `);
166615
167449
  }
166616
- return client2.input.confirm(import_chalk94.default.red("Are you sure?"), false);
167450
+ return client2.input.confirm(import_chalk96.default.red("Are you sure?"), false);
166617
167451
  }
166618
- var import_chalk94;
167452
+ var import_chalk96;
166619
167453
  var init_disconnect4 = __esm({
166620
167454
  "src/commands/integration-resource/disconnect.ts"() {
166621
167455
  "use strict";
166622
- import_chalk94 = __toESM3(require_source());
167456
+ import_chalk96 = __toESM3(require_source());
166623
167457
  init_output_manager();
166624
167458
  init_get_args();
166625
167459
  init_get_flags_specification();
@@ -166724,7 +167558,7 @@ async function remove4(client2) {
166724
167558
  );
166725
167559
  output_manager_default.stopSpinner();
166726
167560
  if (!targetedResource) {
166727
- output_manager_default.error(`No resource ${import_chalk95.default.bold(resourceName)} found.`);
167561
+ output_manager_default.error(`No resource ${import_chalk97.default.bold(resourceName)} found.`);
166728
167562
  return 0;
166729
167563
  }
166730
167564
  if (disconnectAll) {
@@ -166755,7 +167589,7 @@ async function handleDeleteResource(client2, team, resource, options) {
166755
167589
  const hasProjects = resource.projectsMetadata && resource.projectsMetadata?.length > 0;
166756
167590
  if (!options?.skipProjectCheck && hasProjects) {
166757
167591
  output_manager_default.error(
166758
- `Cannot delete resource ${import_chalk95.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
167592
+ `Cannot delete resource ${import_chalk97.default.bold(resource.name)} while it has connected projects. Please disconnect any projects using this resource first or use the \`--disconnect-all\` flag.`
166759
167593
  );
166760
167594
  return 1;
166761
167595
  }
@@ -166766,24 +167600,24 @@ async function handleDeleteResource(client2, team, resource, options) {
166766
167600
  try {
166767
167601
  output_manager_default.spinner("Deleting resource\u2026", 500);
166768
167602
  await deleteResource(client2, resource, team);
166769
- output_manager_default.success(`${import_chalk95.default.bold(resource.name)} successfully deleted.`);
167603
+ output_manager_default.success(`${import_chalk97.default.bold(resource.name)} successfully deleted.`);
166770
167604
  } catch (error3) {
166771
167605
  output_manager_default.error(
166772
- `A problem occurred when attempting to delete ${import_chalk95.default.bold(resource.name)}: ${error3.message}`
167606
+ `A problem occurred when attempting to delete ${import_chalk97.default.bold(resource.name)}: ${error3.message}`
166773
167607
  );
166774
167608
  return 1;
166775
167609
  }
166776
167610
  return 0;
166777
167611
  }
166778
167612
  async function confirmDeleteResource(client2, resource) {
166779
- output_manager_default.log(`${import_chalk95.default.bold(resource.name)} will be deleted permanently.`);
166780
- return client2.input.confirm(`${import_chalk95.default.red("Are you sure?")}`, false);
167613
+ output_manager_default.log(`${import_chalk97.default.bold(resource.name)} will be deleted permanently.`);
167614
+ return client2.input.confirm(`${import_chalk97.default.red("Are you sure?")}`, false);
166781
167615
  }
166782
- var import_chalk95;
167616
+ var import_chalk97;
166783
167617
  var init_remove_resource = __esm({
166784
167618
  "src/commands/integration-resource/remove-resource.ts"() {
166785
167619
  "use strict";
166786
- import_chalk95 = __toESM3(require_source());
167620
+ import_chalk97 = __toESM3(require_source());
166787
167621
  init_output_manager();
166788
167622
  init_get_args();
166789
167623
  init_get_flags_specification();
@@ -166834,6 +167668,15 @@ async function main10(client2) {
166834
167668
  );
166835
167669
  }
166836
167670
  switch (subcommand) {
167671
+ case "create-threshold": {
167672
+ if (needHelp) {
167673
+ telemetry2.trackCliFlagHelp("integration-resource", subcommandOriginal);
167674
+ printHelp(createThresholdSubcommand);
167675
+ return 2;
167676
+ }
167677
+ telemetry2.trackCliSubcommandCreateThreshold(subcommandOriginal);
167678
+ return createThreshold(client2);
167679
+ }
166837
167680
  case "remove": {
166838
167681
  if (needHelp) {
166839
167682
  telemetry2.trackCliFlagHelp("integration-resource", subcommandOriginal);
@@ -166871,11 +167714,13 @@ var init_integration_resource2 = __esm({
166871
167714
  init_integration_resource();
166872
167715
  init_help();
166873
167716
  init_command14();
167717
+ init_create_threshold2();
166874
167718
  init_disconnect4();
166875
167719
  init_remove_resource();
166876
167720
  COMMAND_CONFIG10 = {
166877
167721
  remove: getCommandAliases(removeSubcommand6),
166878
- disconnect: getCommandAliases(disconnectSubcommand2)
167722
+ disconnect: getCommandAliases(disconnectSubcommand2),
167723
+ "create-threshold": getCommandAliases(createThresholdSubcommand)
166879
167724
  };
166880
167725
  }
166881
167726
  });
@@ -167218,7 +168063,7 @@ async function list3(client2) {
167218
168063
  }
167219
168064
  const projectSlugLink = formatProject(contextName, project.name);
167220
168065
  if (!singleDeployment) {
167221
- spinner(`Fetching deployments in ${import_chalk96.default.bold(contextName)}`);
168066
+ spinner(`Fetching deployments in ${import_chalk98.default.bold(contextName)}`);
167222
168067
  const start = Date.now();
167223
168068
  debug2("Fetching deployments");
167224
168069
  const query = new URLSearchParams({ limit: "20", projectId: project.id });
@@ -167258,7 +168103,7 @@ async function list3(client2) {
167258
168103
  const urls = [];
167259
168104
  const tablePrint = table(
167260
168105
  [
167261
- headers.map((header) => import_chalk96.default.bold(import_chalk96.default.cyan(header))),
168106
+ headers.map((header) => import_chalk98.default.bold(import_chalk98.default.cyan(header))),
167262
168107
  ...deployments.sort(sortByCreatedAt).map((dep) => {
167263
168108
  urls.push(`https://${dep.url}`);
167264
168109
  const proposedExp = dep.proposedExpiration ? toDate(Math.min(Date.now(), dep.proposedExpiration)) : "No expiration";
@@ -167268,16 +168113,16 @@ async function list3(client2) {
167268
168113
  const targetName = dep.customEnvironment?.slug || (dep.target === "production" ? "Production" : "Preview");
167269
168114
  const targetSlug = dep.customEnvironment?.id || dep.target || "preview";
167270
168115
  return [
167271
- import_chalk96.default.gray(createdAt),
168116
+ import_chalk98.default.gray(createdAt),
167272
168117
  `https://${dep.url}`,
167273
168118
  stateString2(dep.readyState || ""),
167274
168119
  formatEnvironment(contextName, project.name, {
167275
168120
  id: targetSlug,
167276
168121
  slug: targetName
167277
168122
  }),
167278
- ...!showPolicy ? [import_chalk96.default.gray(getDeploymentDuration(dep))] : [],
167279
- ...!showPolicy ? [import_chalk96.default.gray(dep.creator?.username)] : [],
167280
- ...showPolicy ? [import_chalk96.default.gray(proposedExp)] : []
168123
+ ...!showPolicy ? [import_chalk98.default.gray(getDeploymentDuration(dep))] : [],
168124
+ ...!showPolicy ? [import_chalk98.default.gray(dep.creator?.username)] : [],
168125
+ ...showPolicy ? [import_chalk98.default.gray(proposedExp)] : []
167281
168126
  ];
167282
168127
  }).filter(
167283
168128
  (app2) => (
@@ -167324,17 +168169,17 @@ function stateString2(s) {
167324
168169
  case "BUILDING":
167325
168170
  case "DEPLOYING":
167326
168171
  case "ANALYZING":
167327
- return import_chalk96.default.yellow(CIRCLE) + sTitle;
168172
+ return import_chalk98.default.yellow(CIRCLE) + sTitle;
167328
168173
  case "ERROR":
167329
- return import_chalk96.default.red(CIRCLE) + sTitle;
168174
+ return import_chalk98.default.red(CIRCLE) + sTitle;
167330
168175
  case "READY":
167331
- return import_chalk96.default.green(CIRCLE) + sTitle;
168176
+ return import_chalk98.default.green(CIRCLE) + sTitle;
167332
168177
  case "QUEUED":
167333
- return import_chalk96.default.white(CIRCLE) + sTitle;
168178
+ return import_chalk98.default.white(CIRCLE) + sTitle;
167334
168179
  case "CANCELED":
167335
- return import_chalk96.default.gray(sTitle);
168180
+ return import_chalk98.default.gray(sTitle);
167336
168181
  default:
167337
- return import_chalk96.default.gray("UNKNOWN");
168182
+ return import_chalk98.default.gray("UNKNOWN");
167338
168183
  }
167339
168184
  }
167340
168185
  function sortByCreatedAt(a, b) {
@@ -167350,12 +168195,12 @@ function filterUniqueApps() {
167350
168195
  return true;
167351
168196
  };
167352
168197
  }
167353
- var import_ms19, import_chalk96, import_title8, import_error_utils28;
168198
+ var import_ms19, import_chalk98, import_title8, import_error_utils28;
167354
168199
  var init_list6 = __esm({
167355
168200
  "src/commands/list/index.ts"() {
167356
168201
  "use strict";
167357
168202
  import_ms19 = __toESM3(require_ms());
167358
- import_chalk96 = __toESM3(require_source());
168203
+ import_chalk98 = __toESM3(require_source());
167359
168204
  import_title8 = __toESM3(require_lib4());
167360
168205
  init_table();
167361
168206
  init_get_args();
@@ -167519,7 +168364,7 @@ async function logs(client2) {
167519
168364
  } catch {
167520
168365
  }
167521
168366
  spinner(
167522
- `Fetching deployment "${deploymentIdOrHost}" in ${import_chalk97.default.bold(contextName)}`
168367
+ `Fetching deployment "${deploymentIdOrHost}" in ${import_chalk99.default.bold(contextName)}`
167523
168368
  );
167524
168369
  let deployment;
167525
168370
  try {
@@ -167555,19 +168400,19 @@ function printDisclaimer(deployment) {
167555
168400
  `This command now displays runtime logs. To access your build logs, run \`vercel inspect --logs ${deployment.url}\``
167556
168401
  );
167557
168402
  output_manager_default.print(
167558
- `Displaying runtime logs for deployment ${deployment.url} (${import_chalk97.default.dim(
168403
+ `Displaying runtime logs for deployment ${deployment.url} (${import_chalk99.default.dim(
167559
168404
  deployment.id
167560
- )}) starting from ${import_chalk97.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
168405
+ )}) starting from ${import_chalk99.default.bold((0, import_format2.default)(Date.now(), dateTimeFormat2))}
167561
168406
 
167562
168407
  `
167563
168408
  );
167564
168409
  }
167565
- var import_error_utils29, import_chalk97, import_format2, deprecatedFlags, dateTimeFormat2;
168410
+ var import_error_utils29, import_chalk99, import_format2, deprecatedFlags, dateTimeFormat2;
167566
168411
  var init_logs3 = __esm({
167567
168412
  "src/commands/logs/index.ts"() {
167568
168413
  "use strict";
167569
168414
  import_error_utils29 = __toESM3(require_dist2());
167570
- import_chalk97 = __toESM3(require_source());
168415
+ import_chalk99 = __toESM3(require_source());
167571
168416
  import_format2 = __toESM3(require_format());
167572
168417
  init_build_state();
167573
168418
  init_is_deploying();
@@ -167886,8 +168731,8 @@ async function login2(client2) {
167886
168731
  `
167887
168732
  \u25B2 Sign in to the Vercel CLI
167888
168733
 
167889
- Visit ${import_chalk98.default.bold(output_manager_default.link(verification_uri.replace("https://", ""), verification_uri_complete, { color: false }))} to enter ${import_chalk98.default.bold(user_code)}
167890
- ${import_chalk98.default.grey("Press [ENTER] to open the browser")}
168734
+ Visit ${import_chalk100.default.bold(output_manager_default.link(verification_uri.replace("https://", ""), verification_uri_complete, { color: false }))} to enter ${import_chalk100.default.bold(user_code)}
168735
+ ${import_chalk100.default.grey("Press [ENTER] to open the browser")}
167891
168736
  `,
167892
168737
  () => {
167893
168738
  open5.default(verification_uri_complete);
@@ -167958,10 +168803,10 @@ async function login2(client2) {
167958
168803
  writeToConfigFile(client2.config);
167959
168804
  output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
167960
168805
  output_manager_default.print(`
167961
- ${import_chalk98.default.cyan("Congratulations!")} You are now signed in. In order to deploy something, run ${getCommandName()}.
168806
+ ${import_chalk100.default.cyan("Congratulations!")} You are now signed in. In order to deploy something, run ${getCommandName()}.
167962
168807
 
167963
168808
  ${prependEmoji(
167964
- `Connect your Git Repositories to deploy every branch push automatically (${import_chalk98.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).`,
168809
+ `Connect your Git Repositories to deploy every branch push automatically (${import_chalk100.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).`,
167965
168810
  emoji("tip")
167966
168811
  )}
167967
168812
  `);
@@ -167976,12 +168821,12 @@ async function login2(client2) {
167976
168821
  printError(error3);
167977
168822
  return 1;
167978
168823
  }
167979
- var import_node_readline, import_chalk98, open5;
168824
+ var import_node_readline, import_chalk100, open5;
167980
168825
  var init_future = __esm({
167981
168826
  "src/commands/login/future.ts"() {
167982
168827
  "use strict";
167983
168828
  import_node_readline = __toESM3(require("readline"));
167984
- import_chalk98 = __toESM3(require_source());
168829
+ import_chalk100 = __toESM3(require_source());
167985
168830
  open5 = __toESM3(require_open());
167986
168831
  init_error2();
167987
168832
  init_update_current_team_after_login();
@@ -168060,7 +168905,7 @@ async function login3(client2) {
168060
168905
  writeToConfigFile(client2.config);
168061
168906
  output_manager_default.debug(`Saved credentials in "${humanizePath(global_path_default())}"`);
168062
168907
  output_manager_default.print(
168063
- `${import_chalk99.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
168908
+ `${import_chalk101.default.cyan("Congratulations!")} You are now logged in. In order to deploy something, run ${getCommandName()}.
168064
168909
  `
168065
168910
  );
168066
168911
  output_manager_default.print(
@@ -168072,12 +168917,12 @@ async function login3(client2) {
168072
168917
  );
168073
168918
  return 0;
168074
168919
  }
168075
- var import_email_validator, import_chalk99;
168920
+ var import_email_validator, import_chalk101;
168076
168921
  var init_login3 = __esm({
168077
168922
  "src/commands/login/index.ts"() {
168078
168923
  "use strict";
168079
168924
  import_email_validator = __toESM3(require_email_validator());
168080
- import_chalk99 = __toESM3(require_source());
168925
+ import_chalk101 = __toESM3(require_source());
168081
168926
  init_humanize_path();
168082
168927
  init_get_args();
168083
168928
  init_prompt();
@@ -168291,12 +169136,12 @@ async function add6(client2, argv) {
168291
169136
  const { args: args2 } = parsedArgs;
168292
169137
  if (args2.length !== 1) {
168293
169138
  output_manager_default.error(
168294
- `Invalid number of arguments. Usage: ${import_chalk100.default.cyan(
169139
+ `Invalid number of arguments. Usage: ${import_chalk102.default.cyan(
168295
169140
  `${getCommandName("project add <name>")}`
168296
169141
  )}`
168297
169142
  );
168298
169143
  if (args2.length > 1) {
168299
- const example = import_chalk100.default.cyan(
169144
+ const example = import_chalk102.default.cyan(
168300
169145
  `${getCommandName(`project add "${args2.join(" ")}"`)}`
168301
169146
  );
168302
169147
  output_manager_default.log(
@@ -168324,17 +169169,17 @@ async function add6(client2, argv) {
168324
169169
  const elapsed2 = (0, import_ms20.default)(Date.now() - start);
168325
169170
  const { contextName } = await getScope(client2);
168326
169171
  output_manager_default.log(
168327
- `${import_chalk100.default.cyan("Success!")} Project ${import_chalk100.default.bold(
169172
+ `${import_chalk102.default.cyan("Success!")} Project ${import_chalk102.default.bold(
168328
169173
  name.toLowerCase()
168329
- )} added (${import_chalk100.default.bold(contextName)}) ${import_chalk100.default.gray(`[${elapsed2}]`)}`
169174
+ )} added (${import_chalk102.default.bold(contextName)}) ${import_chalk102.default.gray(`[${elapsed2}]`)}`
168330
169175
  );
168331
169176
  return 0;
168332
169177
  }
168333
- var import_chalk100, import_ms20;
169178
+ var import_chalk102, import_ms20;
168334
169179
  var init_add12 = __esm({
168335
169180
  "src/commands/project/add.ts"() {
168336
169181
  "use strict";
168337
- import_chalk100 = __toESM3(require_source());
169182
+ import_chalk102 = __toESM3(require_source());
168338
169183
  import_ms20 = __toESM3(require_ms());
168339
169184
  init_errors_ts();
168340
169185
  init_pkg_name();
@@ -168433,7 +169278,7 @@ async function inspect4(client2, argv) {
168433
169278
  telemetry2.trackCliFlagYes(parsedArgs.flags["--yes"]);
168434
169279
  if (args2.length !== 0 && args2.length !== 1) {
168435
169280
  output_manager_default.error(
168436
- `Invalid number of arguments. Usage: ${import_chalk101.default.cyan(
169281
+ `Invalid number of arguments. Usage: ${import_chalk103.default.cyan(
168437
169282
  `${getCommandName("project inspect <name>")}`
168438
169283
  )}`
168439
169284
  );
@@ -168448,52 +169293,52 @@ async function inspect4(client2, argv) {
168448
169293
  });
168449
169294
  const org = await getTeamById(client2, project.accountId);
168450
169295
  const projectSlugLink = formatProject(org.slug, project.name);
168451
- output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk101.default.gray(inspectStamp())}`);
169296
+ output_manager_default.log(`Found Project ${projectSlugLink} ${import_chalk103.default.gray(inspectStamp())}`);
168452
169297
  output_manager_default.print("\n");
168453
- output_manager_default.print(import_chalk101.default.bold(" General\n\n"));
168454
- output_manager_default.print(` ${import_chalk101.default.cyan("ID")} ${project.id}
169298
+ output_manager_default.print(import_chalk103.default.bold(" General\n\n"));
169299
+ output_manager_default.print(` ${import_chalk103.default.cyan("ID")} ${project.id}
168455
169300
  `);
168456
- output_manager_default.print(` ${import_chalk101.default.cyan("Name")} ${project.name}
169301
+ output_manager_default.print(` ${import_chalk103.default.cyan("Name")} ${project.name}
168457
169302
  `);
168458
- output_manager_default.print(` ${import_chalk101.default.cyan("Owner")} ${org.name}
169303
+ output_manager_default.print(` ${import_chalk103.default.cyan("Owner")} ${org.name}
168459
169304
  `);
168460
169305
  output_manager_default.print(
168461
- ` ${import_chalk101.default.cyan("Created At")} ${formatDate(project.createdAt)}
169306
+ ` ${import_chalk103.default.cyan("Created At")} ${formatDate(project.createdAt)}
168462
169307
  `
168463
169308
  );
168464
169309
  output_manager_default.print(
168465
- ` ${import_chalk101.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
169310
+ ` ${import_chalk103.default.cyan("Root Directory")} ${project.rootDirectory ?? "."}
168466
169311
  `
168467
169312
  );
168468
169313
  output_manager_default.print(
168469
- ` ${import_chalk101.default.cyan("Node.js Version")} ${project.nodeVersion}
169314
+ ` ${import_chalk103.default.cyan("Node.js Version")} ${project.nodeVersion}
168470
169315
  `
168471
169316
  );
168472
169317
  const framework = import_frameworks7.frameworkList.find((f) => f.slug === project.framework);
168473
169318
  output_manager_default.print("\n");
168474
- output_manager_default.print(import_chalk101.default.bold(" Framework Settings\n\n"));
168475
- output_manager_default.print(` ${import_chalk101.default.cyan("Framework Preset")} ${framework?.name}
169319
+ output_manager_default.print(import_chalk103.default.bold(" Framework Settings\n\n"));
169320
+ output_manager_default.print(` ${import_chalk103.default.cyan("Framework Preset")} ${framework?.name}
168476
169321
  `);
168477
169322
  output_manager_default.print(
168478
- ` ${import_chalk101.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk101.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
169323
+ ` ${import_chalk103.default.cyan("Build Command")} ${project.buildCommand ?? import_chalk103.default.dim(framework?.settings?.buildCommand.placeholder ?? "None")}
168479
169324
  `
168480
169325
  );
168481
169326
  output_manager_default.print(
168482
- ` ${import_chalk101.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk101.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
169327
+ ` ${import_chalk103.default.cyan("Output Directory")} ${project.outputDirectory ?? import_chalk103.default.dim(framework?.settings?.outputDirectory.placeholder ?? "None")}
168483
169328
  `
168484
169329
  );
168485
169330
  output_manager_default.print(
168486
- ` ${import_chalk101.default.cyan("Install Command")} ${project.installCommand ?? import_chalk101.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
169331
+ ` ${import_chalk103.default.cyan("Install Command")} ${project.installCommand ?? import_chalk103.default.dim(framework?.settings?.installCommand.placeholder ?? "None")}
168487
169332
  `
168488
169333
  );
168489
169334
  output_manager_default.print("\n");
168490
169335
  return 0;
168491
169336
  }
168492
- var import_chalk101, import_frameworks7;
169337
+ var import_chalk103, import_frameworks7;
168493
169338
  var init_inspect6 = __esm({
168494
169339
  "src/commands/project/inspect.ts"() {
168495
169340
  "use strict";
168496
- import_chalk101 = __toESM3(require_source());
169341
+ import_chalk103 = __toESM3(require_source());
168497
169342
  import_frameworks7 = __toESM3(require_frameworks());
168498
169343
  init_pkg_name();
168499
169344
  init_inspect5();
@@ -168552,7 +169397,7 @@ async function list4(client2, argv) {
168552
169397
  const { args: args2, flags: opts } = parsedArgs;
168553
169398
  if (args2.length !== 0) {
168554
169399
  output_manager_default.error(
168555
- `Invalid number of arguments. Usage: ${import_chalk102.default.cyan(
169400
+ `Invalid number of arguments. Usage: ${import_chalk104.default.cyan(
168556
169401
  `${getCommandName("project ls")}`
168557
169402
  )}`
168558
169403
  );
@@ -168560,7 +169405,7 @@ async function list4(client2, argv) {
168560
169405
  }
168561
169406
  const start = Date.now();
168562
169407
  const { contextName } = await getScope(client2);
168563
- output_manager_default.spinner(`Fetching projects in ${import_chalk102.default.bold(contextName)}`);
169408
+ output_manager_default.spinner(`Fetching projects in ${import_chalk104.default.bold(contextName)}`);
168564
169409
  let projectsUrl = "/v9/projects?limit=20";
168565
169410
  const deprecated = opts["--update-required"] || false;
168566
169411
  telemetryClient.trackCliFlagUpdateRequired(deprecated);
@@ -168581,7 +169426,7 @@ async function list4(client2, argv) {
168581
169426
  output_manager_default.stopSpinner();
168582
169427
  const elapsed2 = (0, import_ms21.default)(Date.now() - start);
168583
169428
  output_manager_default.log(
168584
- `${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk102.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk102.default.gray(`[${elapsed2}]`)}`
169429
+ `${projectList.length > 0 ? "Projects" : "No projects"} found under ${import_chalk104.default.bold(contextName)} ${deprecated ? "that are using a deprecated Node.js version" : "\b"} ${import_chalk104.default.gray(`[${elapsed2}]`)}`
168585
169430
  );
168586
169431
  if (projectList.length > 0) {
168587
169432
  const tablePrint = table(
@@ -168591,12 +169436,12 @@ async function list4(client2, argv) {
168591
169436
  "Latest Production URL",
168592
169437
  "Updated",
168593
169438
  "Node Version"
168594
- ].map((header) => import_chalk102.default.bold(import_chalk102.default.cyan(header))),
169439
+ ].map((header) => import_chalk104.default.bold(import_chalk104.default.cyan(header))),
168595
169440
  ...projectList.flatMap((project) => [
168596
169441
  [
168597
- import_chalk102.default.bold(project.name),
169442
+ import_chalk104.default.bold(project.name),
168598
169443
  getLatestProdUrl(project),
168599
- import_chalk102.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt)),
169444
+ import_chalk104.default.gray((0, import_ms21.default)(Date.now() - project.updatedAt)),
168600
169445
  project.nodeVersion ?? ""
168601
169446
  ]
168602
169447
  ])
@@ -168621,12 +169466,12 @@ function getLatestProdUrl(project) {
168621
169466
  return `https://${alias2}`;
168622
169467
  return "--";
168623
169468
  }
168624
- var import_ms21, import_chalk102;
169469
+ var import_ms21, import_chalk104;
168625
169470
  var init_list8 = __esm({
168626
169471
  "src/commands/project/list.ts"() {
168627
169472
  "use strict";
168628
169473
  import_ms21 = __toESM3(require_ms());
168629
- import_chalk102 = __toESM3(require_source());
169474
+ import_chalk104 = __toESM3(require_source());
168630
169475
  init_table();
168631
169476
  init_get_command_flags();
168632
169477
  init_pkg_name();
@@ -168677,7 +169522,7 @@ async function rm6(client2, argv) {
168677
169522
  const { args: args2 } = parsedArgs;
168678
169523
  if (args2.length !== 1) {
168679
169524
  output_manager_default.error(
168680
- `Invalid number of arguments. Usage: ${import_chalk103.default.cyan(
169525
+ `Invalid number of arguments. Usage: ${import_chalk105.default.cyan(
168681
169526
  `${getCommandName("project rm <name>")}`
168682
169527
  )}`
168683
169528
  );
@@ -168707,7 +169552,7 @@ async function rm6(client2, argv) {
168707
169552
  }
168708
169553
  const elapsed2 = (0, import_ms22.default)(Date.now() - start);
168709
169554
  output_manager_default.log(
168710
- `${import_chalk103.default.cyan("Success!")} Project ${import_chalk103.default.bold(name)} removed ${import_chalk103.default.gray(
169555
+ `${import_chalk105.default.cyan("Success!")} Project ${import_chalk105.default.bold(name)} removed ${import_chalk105.default.gray(
168711
169556
  `[${elapsed2}]`
168712
169557
  )}`
168713
169558
  );
@@ -168716,22 +169561,22 @@ async function rm6(client2, argv) {
168716
169561
  async function readConfirmation3(client2, projectName) {
168717
169562
  output_manager_default.print(
168718
169563
  prependEmoji(
168719
- `The project ${import_chalk103.default.bold(projectName)} will be removed permanently.
169564
+ `The project ${import_chalk105.default.bold(projectName)} will be removed permanently.
168720
169565
  It will also delete everything under the project including deployments.
168721
169566
  `,
168722
169567
  emoji("warning")
168723
169568
  )
168724
169569
  );
168725
169570
  return await client2.input.confirm(
168726
- `${import_chalk103.default.bold.red("Are you sure?")}`,
169571
+ `${import_chalk105.default.bold.red("Are you sure?")}`,
168727
169572
  false
168728
169573
  );
168729
169574
  }
168730
- var import_chalk103, import_ms22, e;
169575
+ var import_chalk105, import_ms22, e;
168731
169576
  var init_rm10 = __esm({
168732
169577
  "src/commands/project/rm.ts"() {
168733
169578
  "use strict";
168734
- import_chalk103 = __toESM3(require_source());
169579
+ import_chalk105 = __toESM3(require_source());
168735
169580
  import_ms22 = __toESM3(require_ms());
168736
169581
  init_emoji();
168737
169582
  init_errors_ts();
@@ -168899,7 +169744,7 @@ async function getProjectByDeployment({
168899
169744
  let team;
168900
169745
  try {
168901
169746
  output_manager_default?.spinner(
168902
- `Fetching deployment "${deployId}" in ${import_chalk104.default.bold(contextName)}\u2026`
169747
+ `Fetching deployment "${deployId}" in ${import_chalk106.default.bold(contextName)}\u2026`
168903
169748
  );
168904
169749
  const [teamResult, deploymentResult] = await Promise.allSettled([
168905
169750
  config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
@@ -168916,12 +169761,12 @@ async function getProjectByDeployment({
168916
169761
  team = teamResult.value;
168917
169762
  deployment = deploymentResult.value;
168918
169763
  output_manager_default?.log(
168919
- `Fetching deployment "${deployId}" in ${import_chalk104.default.bold(contextName)}\u2026`
169764
+ `Fetching deployment "${deployId}" in ${import_chalk106.default.bold(contextName)}\u2026`
168920
169765
  );
168921
169766
  if (deployment.team?.id) {
168922
169767
  if (!team || deployment.team.id !== team.id) {
168923
169768
  const err = new Error(
168924
- team ? `Deployment doesn't belong to current team ${import_chalk104.default.bold(
169769
+ team ? `Deployment doesn't belong to current team ${import_chalk106.default.bold(
168925
169770
  contextName
168926
169771
  )}` : `Deployment belongs to a different team`
168927
169772
  );
@@ -168930,7 +169775,7 @@ async function getProjectByDeployment({
168930
169775
  }
168931
169776
  } else if (team) {
168932
169777
  const err = new Error(
168933
- `Deployment doesn't belong to current team ${import_chalk104.default.bold(contextName)}`
169778
+ `Deployment doesn't belong to current team ${import_chalk106.default.bold(contextName)}`
168934
169779
  );
168935
169780
  err.code = "ERR_INVALID_TEAM";
168936
169781
  throw err;
@@ -168951,11 +169796,11 @@ async function getProjectByDeployment({
168951
169796
  output_manager_default?.stopSpinner();
168952
169797
  }
168953
169798
  }
168954
- var import_chalk104;
169799
+ var import_chalk106;
168955
169800
  var init_get_project_by_deployment = __esm({
168956
169801
  "src/util/projects/get-project-by-deployment.ts"() {
168957
169802
  "use strict";
168958
- import_chalk104 = __toESM3(require_source());
169803
+ import_chalk106 = __toESM3(require_source());
168959
169804
  init_get_deployment();
168960
169805
  init_get_project_by_id_or_name();
168961
169806
  init_get_scope();
@@ -168969,21 +169814,21 @@ var init_get_project_by_deployment = __esm({
168969
169814
  // src/util/alias/render-alias-status.ts
168970
169815
  function renderAliasStatus(status2) {
168971
169816
  if (status2 === "completed") {
168972
- return import_chalk105.default.green(status2);
169817
+ return import_chalk107.default.green(status2);
168973
169818
  }
168974
169819
  if (status2 === "failed") {
168975
- return import_chalk105.default.red(status2);
169820
+ return import_chalk107.default.red(status2);
168976
169821
  }
168977
169822
  if (status2 === "skipped") {
168978
- return import_chalk105.default.gray(status2);
169823
+ return import_chalk107.default.gray(status2);
168979
169824
  }
168980
- return import_chalk105.default.yellow(status2);
169825
+ return import_chalk107.default.yellow(status2);
168981
169826
  }
168982
- var import_chalk105;
169827
+ var import_chalk107;
168983
169828
  var init_render_alias_status = __esm({
168984
169829
  "src/util/alias/render-alias-status.ts"() {
168985
169830
  "use strict";
168986
- import_chalk105 = __toESM3(require_source());
169831
+ import_chalk107 = __toESM3(require_source());
168987
169832
  }
168988
169833
  });
168989
169834
 
@@ -169057,7 +169902,7 @@ async function promoteStatus({
169057
169902
  }
169058
169903
  if (requestedAt < recentThreshold || Date.now() >= promoteTimeout) {
169059
169904
  output_manager_default.log(
169060
- `The promotion exceeded its deadline - rerun ${import_chalk106.default.bold(
169905
+ `The promotion exceeded its deadline - rerun ${import_chalk108.default.bold(
169061
169906
  `${packageName} promote ${toDeploymentId}`
169062
169907
  )} to try again`
169063
169908
  );
@@ -169121,26 +169966,26 @@ async function renderJobSucceeded({
169121
169966
  let deploymentInfo = "";
169122
169967
  try {
169123
169968
  const deployment = await getDeployment(client2, contextName, toDeploymentId);
169124
- deploymentInfo = `${import_chalk106.default.bold(deployment.url)} (${toDeploymentId})`;
169969
+ deploymentInfo = `${import_chalk108.default.bold(deployment.url)} (${toDeploymentId})`;
169125
169970
  } catch (err) {
169126
169971
  output_manager_default.debug(
169127
169972
  `Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
169128
169973
  );
169129
- deploymentInfo = import_chalk106.default.bold(toDeploymentId);
169974
+ deploymentInfo = import_chalk108.default.bold(toDeploymentId);
169130
169975
  }
169131
169976
  const duration = performingPromote ? elapsed(Date.now() - requestedAt) : "";
169132
169977
  output_manager_default.log(
169133
- `Success! ${import_chalk106.default.bold(
169978
+ `Success! ${import_chalk108.default.bold(
169134
169979
  project.name
169135
169980
  )} was promoted to ${deploymentInfo} ${duration}`
169136
169981
  );
169137
169982
  return 0;
169138
169983
  }
169139
- var import_chalk106, import_ms23;
169984
+ var import_chalk108, import_ms23;
169140
169985
  var init_status = __esm({
169141
169986
  "src/commands/promote/status.ts"() {
169142
169987
  "use strict";
169143
- import_chalk106 = __toESM3(require_source());
169988
+ import_chalk108 = __toESM3(require_source());
169144
169989
  init_elapsed();
169145
169990
  init_format_date();
169146
169991
  init_get_deployment();
@@ -169196,7 +170041,7 @@ async function requestPromote({
169196
170041
  }
169197
170042
  );
169198
170043
  output_manager_default.log(
169199
- `Successfully created new deployment of ${import_chalk107.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
170044
+ `Successfully created new deployment of ${import_chalk109.default.bold(project.name)} at ${newDeployment.inspectorUrl}`
169200
170045
  );
169201
170046
  return 0;
169202
170047
  }
@@ -169208,7 +170053,7 @@ async function requestPromote({
169208
170053
  });
169209
170054
  if (timeout !== void 0 && (0, import_ms24.default)(timeout) === 0) {
169210
170055
  output_manager_default.log(
169211
- `Successfully requested promote of ${import_chalk107.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
170056
+ `Successfully requested promote of ${import_chalk109.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
169212
170057
  );
169213
170058
  output_manager_default.log(`To check promote status, run ${getCommandName("promote")}.`);
169214
170059
  return 0;
@@ -169221,11 +170066,11 @@ async function requestPromote({
169221
170066
  timeout
169222
170067
  });
169223
170068
  }
169224
- var import_chalk107, import_ms24;
170069
+ var import_chalk109, import_ms24;
169225
170070
  var init_request_promote = __esm({
169226
170071
  "src/commands/promote/request-promote.ts"() {
169227
170072
  "use strict";
169228
- import_chalk107 = __toESM3(require_source());
170073
+ import_chalk109 = __toESM3(require_source());
169229
170074
  init_pkg_name();
169230
170075
  init_get_project_by_deployment();
169231
170076
  import_ms24 = __toESM3(require_ms());
@@ -169386,7 +170231,7 @@ async function getDeploymentByIdOrURL({
169386
170231
  let team;
169387
170232
  try {
169388
170233
  output_manager_default.spinner(
169389
- `Fetching deployment "${deployIdOrUrl}" in ${import_chalk108.default.bold(contextName)}\u2026`
170234
+ `Fetching deployment "${deployIdOrUrl}" in ${import_chalk110.default.bold(contextName)}\u2026`
169390
170235
  );
169391
170236
  const [teamResult, deploymentResult] = await Promise.allSettled([
169392
170237
  config2.currentTeam ? getTeamById(client2, config2.currentTeam) : void 0,
@@ -169403,7 +170248,7 @@ async function getDeploymentByIdOrURL({
169403
170248
  team = teamResult.value;
169404
170249
  deployment = deploymentResult.value;
169405
170250
  output_manager_default.log(
169406
- `Fetching deployment "${deployIdOrUrl}" in ${import_chalk108.default.bold(contextName)}\u2026`
170251
+ `Fetching deployment "${deployIdOrUrl}" in ${import_chalk110.default.bold(contextName)}\u2026`
169407
170252
  );
169408
170253
  } finally {
169409
170254
  output_manager_default.stopSpinner();
@@ -169411,7 +170256,7 @@ async function getDeploymentByIdOrURL({
169411
170256
  if (deployment.team?.id) {
169412
170257
  if (!team || deployment.team.id !== team.id) {
169413
170258
  const err = new Error(
169414
- team ? `Deployment doesn't belong to current team ${import_chalk108.default.bold(
170259
+ team ? `Deployment doesn't belong to current team ${import_chalk110.default.bold(
169415
170260
  contextName
169416
170261
  )}` : `Deployment belongs to a different team`
169417
170262
  );
@@ -169420,18 +170265,18 @@ async function getDeploymentByIdOrURL({
169420
170265
  }
169421
170266
  } else if (team) {
169422
170267
  const err = new Error(
169423
- `Deployment doesn't belong to current team ${import_chalk108.default.bold(contextName)}`
170268
+ `Deployment doesn't belong to current team ${import_chalk110.default.bold(contextName)}`
169424
170269
  );
169425
170270
  err.code = "ERR_INVALID_TEAM";
169426
170271
  throw err;
169427
170272
  }
169428
170273
  return deployment;
169429
170274
  }
169430
- var import_chalk108;
170275
+ var import_chalk110;
169431
170276
  var init_get_deployment_by_id_or_url = __esm({
169432
170277
  "src/util/deploy/get-deployment-by-id-or-url.ts"() {
169433
170278
  "use strict";
169434
- import_chalk108 = __toESM3(require_source());
170279
+ import_chalk110 = __toESM3(require_source());
169435
170280
  init_get_deployment();
169436
170281
  init_get_team_by_id();
169437
170282
  init_is_valid_name();
@@ -169570,14 +170415,14 @@ async function redeploy(client2) {
169570
170415
  }
169571
170416
  output_manager_default.print(
169572
170417
  `${prependEmoji(
169573
- `Inspect: ${import_chalk109.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
170418
+ `Inspect: ${import_chalk111.default.bold(deployment.inspectorUrl)} ${deployStamp()}`,
169574
170419
  emoji("inspect")
169575
170420
  )}
169576
170421
  `
169577
170422
  );
169578
170423
  output_manager_default.print(
169579
170424
  prependEmoji(
169580
- `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk109.default.bold(
170425
+ `${isProdDeployment ? "Production" : "Preview"}: ${import_chalk111.default.bold(
169581
170426
  previewUrl
169582
170427
  )} ${deployStamp()}`,
169583
170428
  emoji("success")
@@ -169647,17 +170492,17 @@ async function redeploy(client2) {
169647
170492
  output_manager_default.prettyError(err);
169648
170493
  if ((0, import_error_utils33.isErrnoException)(err) && err.code === "ERR_INVALID_TEAM") {
169649
170494
  output_manager_default.error(
169650
- `Use ${import_chalk109.default.bold("vc switch")} to change your current team`
170495
+ `Use ${import_chalk111.default.bold("vc switch")} to change your current team`
169651
170496
  );
169652
170497
  }
169653
170498
  return 1;
169654
170499
  }
169655
170500
  }
169656
- var import_chalk109, import_client13, import_error_utils33;
170501
+ var import_chalk111, import_client13, import_error_utils33;
169657
170502
  var init_redeploy2 = __esm({
169658
170503
  "src/commands/redeploy/index.ts"() {
169659
170504
  "use strict";
169660
- import_chalk109 = __toESM3(require_source());
170505
+ import_chalk111 = __toESM3(require_source());
169661
170506
  import_client13 = __toESM3(require_dist7());
169662
170507
  init_emoji();
169663
170508
  init_get_args();
@@ -169864,7 +170709,7 @@ async function remove5(client2) {
169864
170709
  }
169865
170710
  const { contextName } = await getScope(client2);
169866
170711
  output_manager_default.spinner(
169867
- `Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk110.default.bold(contextName)}`
170712
+ `Fetching deployment(s) ${ids.map((id) => `"${id}"`).join(" ")} in ${import_chalk112.default.bold(contextName)}`
169868
170713
  );
169869
170714
  let aliases;
169870
170715
  let projects;
@@ -169930,7 +170775,7 @@ async function remove5(client2) {
169930
170775
  });
169931
170776
  if (deployments.length === 0 && projects.length === 0) {
169932
170777
  const safeUnaliased = parsedArgs.flags["--safe"] ? "unaliased" : "any";
169933
- const stylizedIds = ids.map((id) => import_chalk110.default.bold(`"${id}"`)).join(", ");
170778
+ const stylizedIds = ids.map((id) => import_chalk112.default.bold(`"${id}"`)).join(", ");
169934
170779
  const commandName = getCommandName("projects ls");
169935
170780
  log2(
169936
170781
  `Could not find ${safeUnaliased} deployments or projects matching ${stylizedIds}. Run ${commandName} to list.`
@@ -169938,7 +170783,7 @@ async function remove5(client2) {
169938
170783
  return 1;
169939
170784
  }
169940
170785
  log2(
169941
- `Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk110.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
170786
+ `Found ${deploymentsAndProjects(deployments, projects)} for removal in ${import_chalk112.default.bold(contextName)} ${elapsed(Date.now() - findStart)}`
169942
170787
  );
169943
170788
  if (deployments.length > 200) {
169944
170789
  output_manager_default.warn(
@@ -169965,11 +170810,11 @@ async function remove5(client2) {
169965
170810
  `Removed ${deploymentsAndProjects(deployments, projects)} ${elapsed(Date.now() - start)}`
169966
170811
  );
169967
170812
  deployments.forEach((depl) => {
169968
- output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(depl.url)}
170813
+ output_manager_default.print(`${import_chalk112.default.gray("-")} ${import_chalk112.default.bold(depl.url)}
169969
170814
  `);
169970
170815
  });
169971
170816
  projects.forEach((project) => {
169972
- output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(project.name)}
170817
+ output_manager_default.print(`${import_chalk112.default.gray("-")} ${import_chalk112.default.bold(project.name)}
169973
170818
  `);
169974
170819
  });
169975
170820
  return 0;
@@ -169986,8 +170831,8 @@ function readConfirmation4(deployments, projects) {
169986
170831
  );
169987
170832
  const deploymentTable = table(
169988
170833
  deployments.map((depl) => {
169989
- const time = import_chalk110.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
169990
- const url3 = depl.url ? import_chalk110.default.underline(`https://${depl.url}`) : "";
170834
+ const time = import_chalk112.default.gray(`${(0, import_ms26.default)(Date.now() - depl.createdAt)} ago`);
170835
+ const url3 = depl.url ? import_chalk112.default.underline(`https://${depl.url}`) : "";
169991
170836
  return [` ${depl.id}`, url3, time];
169992
170837
  }),
169993
170838
  { align: ["l", "r", "l"], hsep: 6 }
@@ -169998,7 +170843,7 @@ function readConfirmation4(deployments, projects) {
169998
170843
  for (const depl of deployments) {
169999
170844
  for (const { alias: alias2 } of depl.aliases) {
170000
170845
  output_manager_default.warn(
170001
- `${import_chalk110.default.underline(`https://${alias2}`)} is an alias for ${import_chalk110.default.bold(depl.url)} and will be removed`
170846
+ `${import_chalk112.default.underline(`https://${alias2}`)} is an alias for ${import_chalk112.default.bold(depl.url)} and will be removed`
170002
170847
  );
170003
170848
  }
170004
170849
  }
@@ -170012,12 +170857,12 @@ function readConfirmation4(deployments, projects) {
170012
170857
  `
170013
170858
  );
170014
170859
  for (const project of projects) {
170015
- output_manager_default.print(`${import_chalk110.default.gray("-")} ${import_chalk110.default.bold(project.name)}
170860
+ output_manager_default.print(`${import_chalk112.default.gray("-")} ${import_chalk112.default.bold(project.name)}
170016
170861
  `);
170017
170862
  }
170018
170863
  }
170019
170864
  output_manager_default.print(
170020
- `${import_chalk110.default.bold.red("> Are you sure?")} ${import_chalk110.default.gray("(y/N) ")}`
170865
+ `${import_chalk112.default.bold.red("> Are you sure?")} ${import_chalk112.default.gray("(y/N) ")}`
170021
170866
  );
170022
170867
  process.stdin.on("data", (d) => {
170023
170868
  process.stdin.pause();
@@ -170034,11 +170879,11 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
170034
170879
  }
170035
170880
  return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
170036
170881
  }
170037
- var import_chalk110, import_ms26, import_pluralize11;
170882
+ var import_chalk112, import_ms26, import_pluralize11;
170038
170883
  var init_remove6 = __esm({
170039
170884
  "src/commands/remove/index.ts"() {
170040
170885
  "use strict";
170041
- import_chalk110 = __toESM3(require_source());
170886
+ import_chalk112 = __toESM3(require_source());
170042
170887
  import_ms26 = __toESM3(require_ms());
170043
170888
  import_pluralize11 = __toESM3(require_pluralize());
170044
170889
  init_table();
@@ -170134,7 +170979,7 @@ async function rollbackStatus({
170134
170979
  }
170135
170980
  if (requestedAt < recentThreshold || Date.now() >= rollbackTimeout) {
170136
170981
  output_manager_default.log(
170137
- `The rollback exceeded its deadline - rerun ${import_chalk111.default.bold(
170982
+ `The rollback exceeded its deadline - rerun ${import_chalk113.default.bold(
170138
170983
  `${packageName} rollback ${toDeploymentId}`
170139
170984
  )} to try again`
170140
170985
  );
@@ -170198,26 +171043,26 @@ async function renderJobSucceeded2({
170198
171043
  let deploymentInfo = "";
170199
171044
  try {
170200
171045
  const deployment = await getDeployment(client2, contextName, toDeploymentId);
170201
- deploymentInfo = `${import_chalk111.default.bold(deployment.url)} (${toDeploymentId})`;
171046
+ deploymentInfo = `${import_chalk113.default.bold(deployment.url)} (${toDeploymentId})`;
170202
171047
  } catch (err) {
170203
171048
  output_manager_default.debug(
170204
171049
  `Failed to get deployment url for ${toDeploymentId}: ${err?.toString() || err}`
170205
171050
  );
170206
- deploymentInfo = import_chalk111.default.bold(toDeploymentId);
171051
+ deploymentInfo = import_chalk113.default.bold(toDeploymentId);
170207
171052
  }
170208
171053
  const duration = performingRollback ? elapsed(Date.now() - requestedAt) : "";
170209
171054
  output_manager_default.log(
170210
- `Success! ${import_chalk111.default.bold(
171055
+ `Success! ${import_chalk113.default.bold(
170211
171056
  project.name
170212
171057
  )} was rolled back to ${deploymentInfo} ${duration}`
170213
171058
  );
170214
171059
  return 0;
170215
171060
  }
170216
- var import_chalk111, import_ms27;
171061
+ var import_chalk113, import_ms27;
170217
171062
  var init_status2 = __esm({
170218
171063
  "src/commands/rollback/status.ts"() {
170219
171064
  "use strict";
170220
- import_chalk111 = __toESM3(require_source());
171065
+ import_chalk113 = __toESM3(require_source());
170221
171066
  init_elapsed();
170222
171067
  init_format_date();
170223
171068
  init_get_deployment();
@@ -170249,7 +171094,7 @@ async function requestRollback({
170249
171094
  });
170250
171095
  if (timeout !== void 0 && (0, import_ms28.default)(timeout) === 0) {
170251
171096
  output_manager_default.log(
170252
- `Successfully requested rollback of ${import_chalk112.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
171097
+ `Successfully requested rollback of ${import_chalk114.default.bold(project.name)} to ${deployment.url} (${deployment.id})`
170253
171098
  );
170254
171099
  output_manager_default.log(`To check rollback status, run ${getCommandName("rollback")}.`);
170255
171100
  return 0;
@@ -170262,11 +171107,11 @@ async function requestRollback({
170262
171107
  timeout
170263
171108
  });
170264
171109
  }
170265
- var import_chalk112, import_ms28;
171110
+ var import_chalk114, import_ms28;
170266
171111
  var init_request_rollback = __esm({
170267
171112
  "src/commands/rollback/request-rollback.ts"() {
170268
171113
  "use strict";
170269
- import_chalk112 = __toESM3(require_source());
171114
+ import_chalk114 = __toESM3(require_source());
170270
171115
  init_pkg_name();
170271
171116
  init_get_project_by_deployment();
170272
171117
  import_ms28 = __toESM3(require_ms());
@@ -170413,17 +171258,17 @@ function formatBranchMatcher(branchMatcher) {
170413
171258
  if (branchMatcher?.type === "equals") {
170414
171259
  return branchMatcher.pattern;
170415
171260
  } else if (branchMatcher?.type === "startsWith") {
170416
- return `${branchMatcher.pattern}${import_chalk113.default.dim("*")}`;
171261
+ return `${branchMatcher.pattern}${import_chalk115.default.dim("*")}`;
170417
171262
  } else if (branchMatcher?.type === "endsWith") {
170418
- return `${import_chalk113.default.dim("*")}${branchMatcher.pattern}`;
171263
+ return `${import_chalk115.default.dim("*")}${branchMatcher.pattern}`;
170419
171264
  }
170420
- return import_chalk113.default.dim("No branch configuration");
171265
+ return import_chalk115.default.dim("No branch configuration");
170421
171266
  }
170422
171267
  async function list5(client2, argv) {
170423
171268
  const { cwd } = client2;
170424
171269
  if (argv.length !== 0) {
170425
171270
  output_manager_default.error(
170426
- `Invalid number of arguments. Usage: ${import_chalk113.default.cyan(
171271
+ `Invalid number of arguments. Usage: ${import_chalk115.default.cyan(
170427
171272
  `${getCommandName("target ls")}`
170428
171273
  )}`
170429
171274
  );
@@ -170447,12 +171292,12 @@ async function list5(client2, argv) {
170447
171292
  const elapsed2 = (0, import_ms30.default)(Date.now() - start);
170448
171293
  result = withDefaultEnvironmentsIncluded(result);
170449
171294
  output_manager_default.log(
170450
- `${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk113.default.gray(`[${elapsed2}]`)}`
171295
+ `${result.length} Environment${result.length === 1 ? "" : "s"} found under ${projectSlugLink} ${import_chalk115.default.gray(`[${elapsed2}]`)}`
170451
171296
  );
170452
171297
  const tablePrint = table(
170453
171298
  [
170454
171299
  ["Target Name", "Branch Tracking", "Type", "Updated"].map(
170455
- (header) => import_chalk113.default.bold(import_chalk113.default.cyan(header))
171300
+ (header) => import_chalk115.default.bold(import_chalk115.default.cyan(header))
170456
171301
  ),
170457
171302
  ...result.flatMap((target) => {
170458
171303
  return [
@@ -170460,7 +171305,7 @@ async function list5(client2, argv) {
170460
171305
  formatEnvironment(link4.org.slug, link4.project.name, target),
170461
171306
  BRANCH_TRACKING_MAP[target.type](link4.project, target),
170462
171307
  TYPE_MAP[target.type],
170463
- import_chalk113.default.gray(
171308
+ import_chalk115.default.gray(
170464
171309
  target.updatedAt > 0 ? (0, import_ms30.default)(Date.now() - target.updatedAt) : "-"
170465
171310
  )
170466
171311
  ]
@@ -170507,12 +171352,12 @@ function withDefaultEnvironmentsIncluded(environments) {
170507
171352
  ...environments.slice().sort((a, b) => a.slug.localeCompare(b.slug))
170508
171353
  ];
170509
171354
  }
170510
- var import_ms30, import_chalk113, TYPE_MAP, BRANCH_TRACKING_MAP;
171355
+ var import_ms30, import_chalk115, TYPE_MAP, BRANCH_TRACKING_MAP;
170511
171356
  var init_list9 = __esm({
170512
171357
  "src/commands/target/list.ts"() {
170513
171358
  "use strict";
170514
171359
  import_ms30 = __toESM3(require_ms());
170515
- import_chalk113 = __toESM3(require_source());
171360
+ import_chalk115 = __toESM3(require_source());
170516
171361
  init_table();
170517
171362
  init_output_manager();
170518
171363
  init_command27();
@@ -170527,8 +171372,8 @@ var init_list9 = __esm({
170527
171372
  };
170528
171373
  BRANCH_TRACKING_MAP = {
170529
171374
  production: (project) => project.link?.productionBranch ?? "main",
170530
- preview: (_, env) => env.slug === "preview" ? import_chalk113.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
170531
- development: () => import_chalk113.default.dim("Accessible via CLI")
171375
+ preview: (_, env) => env.slug === "preview" ? import_chalk115.default.dim("All unassigned git branches") : formatBranchMatcher(env.branchMatcher),
171376
+ development: () => import_chalk115.default.dim("Accessible via CLI")
170532
171377
  };
170533
171378
  }
170534
171379
  });
@@ -170723,7 +171568,7 @@ async function list6(client2, argv) {
170723
171568
  client2.stdout.write("\n");
170724
171569
  const teamTable = table(
170725
171570
  [
170726
- ["id", "email / name"].map((str) => (0, import_chalk114.gray)(str)),
171571
+ ["id", "email / name"].map((str) => (0, import_chalk116.gray)(str)),
170727
171572
  ...teamList.map((team) => [team.value, team.name])
170728
171573
  ],
170729
171574
  { hsep: 5 }
@@ -170740,13 +171585,13 @@ async function list6(client2, argv) {
170740
171585
  }
170741
171586
  return 0;
170742
171587
  }
170743
- var import_chalk114;
171588
+ var import_chalk116;
170744
171589
  var init_list11 = __esm({
170745
171590
  "src/commands/teams/list.ts"() {
170746
171591
  "use strict";
170747
171592
  init_chars();
170748
171593
  init_table();
170749
- import_chalk114 = __toESM3(require_source());
171594
+ import_chalk116 = __toESM3(require_source());
170750
171595
  init_get_user();
170751
171596
  init_get_teams();
170752
171597
  init_pkg_name();
@@ -170841,7 +171686,7 @@ Please select a team scope using ${getCommandName(
170841
171686
  return 1;
170842
171687
  }
170843
171688
  output_manager_default.log(
170844
- introMsg || `Inviting team members to ${import_chalk115.default.bold(currentTeam.name)}`
171689
+ introMsg || `Inviting team members to ${import_chalk117.default.bold(currentTeam.name)}`
170845
171690
  );
170846
171691
  telemetry2.trackCliArgumentEmail(emails);
170847
171692
  if (emails.length > 0) {
@@ -170861,10 +171706,10 @@ Please select a team scope using ${getCommandName(
170861
171706
  throw err;
170862
171707
  }
170863
171708
  output_manager_default.log(
170864
- `${import_chalk115.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
171709
+ `${import_chalk117.default.cyan(chars_default.tick)} ${email3}${userInfo ? ` (${userInfo})` : ""} ${elapsed2()}`
170865
171710
  );
170866
171711
  } else {
170867
- output_manager_default.log(`${import_chalk115.default.red(`\u2716 ${email3}`)} ${import_chalk115.default.gray("[invalid]")}`);
171712
+ output_manager_default.log(`${import_chalk117.default.red(`\u2716 ${email3}`)} ${import_chalk117.default.gray("[invalid]")}`);
170868
171713
  }
170869
171714
  }
170870
171715
  return 0;
@@ -170897,15 +171742,15 @@ Please select a team scope using ${getCommandName(
170897
171742
  );
170898
171743
  email2 = `${email2}${username ? ` (${username})` : ""} ${elapsed2()}`;
170899
171744
  emails.push(email2);
170900
- output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
171745
+ output_manager_default.log(`${import_chalk117.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email2}`);
170901
171746
  if (hasError) {
170902
171747
  hasError = false;
170903
171748
  process.stderr.write(eraseLines(emails.length + 2));
170904
171749
  output_manager_default.log(
170905
- introMsg || `Inviting team members to ${import_chalk115.default.bold(currentTeam.name)}`
171750
+ introMsg || `Inviting team members to ${import_chalk117.default.bold(currentTeam.name)}`
170906
171751
  );
170907
171752
  for (const email3 of emails) {
170908
- output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
171753
+ output_manager_default.log(`${import_chalk117.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
170909
171754
  }
170910
171755
  }
170911
171756
  } catch (err) {
@@ -170914,7 +171759,7 @@ Please select a team scope using ${getCommandName(
170914
171759
  output_manager_default.error((0, import_error_utils35.errorToString)(err));
170915
171760
  hasError = true;
170916
171761
  for (const email3 of emails) {
170917
- output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
171762
+ output_manager_default.log(`${import_chalk117.default.cyan(chars_default.tick)} ${sentEmailPrefix}${email3}`);
170918
171763
  }
170919
171764
  }
170920
171765
  }
@@ -170927,16 +171772,16 @@ Please select a team scope using ${getCommandName(
170927
171772
  } else {
170928
171773
  output_manager_default.success(`Invited ${n} teammate${n > 1 ? "s" : ""}`);
170929
171774
  for (const email3 of emails) {
170930
- output_manager_default.log(`${import_chalk115.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
171775
+ output_manager_default.log(`${import_chalk117.default.cyan(chars_default.tick)} ${inviteUserPrefix}${email3}`);
170931
171776
  }
170932
171777
  }
170933
171778
  return 0;
170934
171779
  }
170935
- var import_chalk115, import_error_utils35, validateEmail2, domains;
171780
+ var import_chalk117, import_error_utils35, validateEmail2, domains;
170936
171781
  var init_invite2 = __esm({
170937
171782
  "src/commands/teams/invite.ts"() {
170938
171783
  "use strict";
170939
- import_chalk115 = __toESM3(require_source());
171784
+ import_chalk117 = __toESM3(require_source());
170940
171785
  init_cmd();
170941
171786
  init_stamp();
170942
171787
  init_param();
@@ -171012,7 +171857,7 @@ async function add7(client2) {
171012
171857
  let team;
171013
171858
  let elapsed2;
171014
171859
  output_manager_default.log(
171015
- `Pick a team identifier for its URL (e.g.: ${import_chalk116.default.cyan(
171860
+ `Pick a team identifier for its URL (e.g.: ${import_chalk118.default.cyan(
171016
171861
  "`vercel.com/acme`"
171017
171862
  )})`
171018
171863
  );
@@ -171043,7 +171888,7 @@ async function add7(client2) {
171043
171888
  output_manager_default.stopSpinner();
171044
171889
  process.stdout.write(eraseLines(2));
171045
171890
  output_manager_default.success(`Team created ${elapsed2()}`);
171046
- output_manager_default.log(`${import_chalk116.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
171891
+ output_manager_default.log(`${import_chalk118.default.cyan(`${chars_default.tick} `) + teamUrlPrefix + slug}
171047
171892
  `);
171048
171893
  output_manager_default.log("Pick a display name for your team");
171049
171894
  let name;
@@ -171066,7 +171911,7 @@ async function add7(client2) {
171066
171911
  process.stdout.write(eraseLines(2));
171067
171912
  team = Object.assign(team, res);
171068
171913
  output_manager_default.success(`Team name saved ${elapsed2()}`);
171069
- output_manager_default.log(`${import_chalk116.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
171914
+ output_manager_default.log(`${import_chalk118.default.cyan(`${chars_default.tick} `) + teamNamePrefix + team.name}
171070
171915
  `);
171071
171916
  output_manager_default.spinner("Saving");
171072
171917
  client2.config.currentTeam = team.id;
@@ -171080,11 +171925,11 @@ async function add7(client2) {
171080
171925
  });
171081
171926
  return 0;
171082
171927
  }
171083
- var import_chalk116, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
171928
+ var import_chalk118, import_error_utils36, validateSlug, validateName, teamUrlPrefix, teamNamePrefix;
171084
171929
  var init_add13 = __esm({
171085
171930
  "src/commands/teams/add.ts"() {
171086
171931
  "use strict";
171087
- import_chalk116 = __toESM3(require_source());
171932
+ import_chalk118 = __toESM3(require_source());
171088
171933
  init_stamp();
171089
171934
  init_erase_lines();
171090
171935
  init_chars();
@@ -171097,7 +171942,7 @@ var init_add13 = __esm({
171097
171942
  init_output_manager();
171098
171943
  validateSlug = (value) => /^[a-z]+[a-z0-9_-]*$/.test(value);
171099
171944
  validateName = (value) => /^[ a-zA-Z0-9_-]+$/.test(value);
171100
- teamUrlPrefix = "Team URL".padEnd(14) + import_chalk116.default.gray("vercel.com/");
171945
+ teamUrlPrefix = "Team URL".padEnd(14) + import_chalk118.default.gray("vercel.com/");
171101
171946
  teamNamePrefix = "Team Name".padEnd(14);
171102
171947
  }
171103
171948
  });
@@ -171156,7 +172001,7 @@ async function change(client2, argv) {
171156
172001
  let title9 = `${team.name} (${team.slug})`;
171157
172002
  const selected = team.id === currentTeam?.id;
171158
172003
  if (selected) {
171159
- title9 += ` ${import_chalk117.default.bold("(current)")}`;
172004
+ title9 += ` ${import_chalk119.default.bold("(current)")}`;
171160
172005
  }
171161
172006
  if (team.limited) {
171162
172007
  title9 += ` ${emoji("locked")}`;
@@ -171168,7 +172013,7 @@ async function change(client2, argv) {
171168
172013
  selected
171169
172014
  };
171170
172015
  });
171171
- let suffix = personalScopeSelected ? ` ${import_chalk117.default.bold("(current)")}` : "";
172016
+ let suffix = personalScopeSelected ? ` ${import_chalk119.default.bold("(current)")}` : "";
171172
172017
  if (user.limited) {
171173
172018
  suffix += ` ${emoji("locked")}`;
171174
172019
  }
@@ -171214,14 +172059,14 @@ async function change(client2, argv) {
171214
172059
  }
171215
172060
  updateCurrentTeam(config2);
171216
172061
  output_manager_default.success(
171217
- `Your account (${import_chalk117.default.bold(user.username)}) is now active!`
172062
+ `Your account (${import_chalk119.default.bold(user.username)}) is now active!`
171218
172063
  );
171219
172064
  return 0;
171220
172065
  }
171221
172066
  const newTeam = teams2.find((team) => team.slug === desiredSlug);
171222
172067
  if (!newTeam) {
171223
172068
  output_manager_default.error(
171224
- `You do not have permission to access scope ${import_chalk117.default.bold(desiredSlug)}.`
172069
+ `You do not have permission to access scope ${import_chalk119.default.bold(desiredSlug)}.`
171225
172070
  );
171226
172071
  return 1;
171227
172072
  }
@@ -171239,15 +172084,15 @@ async function change(client2, argv) {
171239
172084
  }
171240
172085
  updateCurrentTeam(config2, newTeam);
171241
172086
  output_manager_default.success(
171242
- `The team ${import_chalk117.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
172087
+ `The team ${import_chalk119.default.bold(newTeam.name)} (${newTeam.slug}) is now active!`
171243
172088
  );
171244
172089
  return 0;
171245
172090
  }
171246
- var import_chalk117, updateCurrentTeam;
172091
+ var import_chalk119, updateCurrentTeam;
171247
172092
  var init_switch2 = __esm({
171248
172093
  "src/commands/teams/switch.ts"() {
171249
172094
  "use strict";
171250
- import_chalk117 = __toESM3(require_source());
172095
+ import_chalk119 = __toESM3(require_source());
171251
172096
  init_emoji();
171252
172097
  init_get_user();
171253
172098
  init_get_teams();
@@ -171426,13 +172271,13 @@ var init_teams2 = __esm({
171426
172271
  // src/commands/telemetry/status.ts
171427
172272
  async function status(client2) {
171428
172273
  const enabled = client2.config.telemetry?.enabled !== false;
171429
- const status2 = enabled ? import_chalk118.default.green("Enabled") : import_chalk118.default.red("Disabled");
172274
+ const status2 = enabled ? import_chalk120.default.green("Enabled") : import_chalk120.default.red("Disabled");
171430
172275
  output_manager_default.print("\n");
171431
- output_manager_default.log(`${import_chalk118.default.bold("Telemetry status")}: ${status2}
172276
+ output_manager_default.log(`${import_chalk120.default.bold("Telemetry status")}: ${status2}
171432
172277
  `);
171433
172278
  const learnMoreMessage = `
171434
172279
 
171435
- Learn more: ${import_chalk118.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
172280
+ Learn more: ${import_chalk120.default.cyan("https://vercel.com/docs/cli/about-telemetry")}`;
171436
172281
  if (enabled) {
171437
172282
  output_manager_default.log(`You have opted in to Vercel CLI telemetry${learnMoreMessage}`);
171438
172283
  } else {
@@ -171443,11 +172288,11 @@ Learn more: ${import_chalk118.default.cyan("https://vercel.com/docs/cli/about-te
171443
172288
  }
171444
172289
  return 0;
171445
172290
  }
171446
- var import_chalk118;
172291
+ var import_chalk120;
171447
172292
  var init_status3 = __esm({
171448
172293
  "src/commands/telemetry/status.ts"() {
171449
172294
  "use strict";
171450
- import_chalk118 = __toESM3(require_source());
172295
+ import_chalk120 = __toESM3(require_source());
171451
172296
  init_output_manager();
171452
172297
  }
171453
172298
  });
@@ -171628,7 +172473,7 @@ async function telemetry(client2) {
171628
172473
  default: {
171629
172474
  const errorMessage = parsedArguments.args.length !== 2 ? "Invalid number of arguments" : "Invalid subcommand";
171630
172475
  output_manager_default.print(
171631
- `${import_chalk119.default.red("Error")}: ${errorMessage}. See help instructions for usage:
172476
+ `${import_chalk121.default.red("Error")}: ${errorMessage}. See help instructions for usage:
171632
172477
  `
171633
172478
  );
171634
172479
  output_manager_default.print(help2(telemetryCommand, { columns: client2.stderr.columns }));
@@ -171636,7 +172481,7 @@ async function telemetry(client2) {
171636
172481
  }
171637
172482
  }
171638
172483
  }
171639
- var import_chalk119, COMMAND_CONFIG14;
172484
+ var import_chalk121, COMMAND_CONFIG14;
171640
172485
  var init_telemetry3 = __esm({
171641
172486
  "src/commands/telemetry/index.ts"() {
171642
172487
  "use strict";
@@ -171651,7 +172496,7 @@ var init_telemetry3 = __esm({
171651
172496
  init_command29();
171652
172497
  init_get_flags_specification();
171653
172498
  init_telemetry2();
171654
- import_chalk119 = __toESM3(require_source());
172499
+ import_chalk121 = __toESM3(require_source());
171655
172500
  init_output_manager();
171656
172501
  init_commands();
171657
172502
  COMMAND_CONFIG14 = {
@@ -171726,7 +172571,7 @@ var import_error_utils37 = __toESM3(require_dist2());
171726
172571
  var import_path40 = require("path");
171727
172572
  var import_fs8 = require("fs");
171728
172573
  var import_fs_extra23 = __toESM3(require_lib());
171729
- var import_chalk120 = __toESM3(require_source());
172574
+ var import_chalk122 = __toESM3(require_source());
171730
172575
  var import_epipebomb = __toESM3(require_epipebomb());
171731
172576
 
171732
172577
  // src/util/get-latest-version/index.ts
@@ -172001,7 +172846,7 @@ init_errors_ts();
172001
172846
  init_errors_ts();
172002
172847
 
172003
172848
  // src/util/constants.ts
172004
- var SENTRY_DSN = "https://26a24e59ba954011919a524b341b6ab5@sentry.io/1323225";
172849
+ var SENTRY_DSN = void 0;
172005
172850
 
172006
172851
  // src/index.ts
172007
172852
  init_get_update_command();
@@ -172598,13 +173443,13 @@ var main13 = async () => {
172598
173443
  const betaCommands = [];
172599
173444
  if (betaCommands.includes(targetOrSubcommand)) {
172600
173445
  output_manager_default.print(
172601
- `${import_chalk120.default.grey(
173446
+ `${import_chalk122.default.grey(
172602
173447
  `${getTitleName()} CLI ${pkg_default.version} ${targetOrSubcommand} (beta) \u2014 https://vercel.com/feedback`
172603
173448
  )}
172604
173449
  `
172605
173450
  );
172606
173451
  } else {
172607
- output_manager_default.print(`${import_chalk120.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
173452
+ output_manager_default.print(`${import_chalk122.default.grey(`${getTitleName()} CLI ${pkg_default.version}`)}
172608
173453
  `);
172609
173454
  }
172610
173455
  if (!targetOrSubcommand && parsedArgs.flags["--version"]) {
@@ -173133,20 +173978,20 @@ main13().then(async (exitCode2) => {
173133
173978
  });
173134
173979
  if (latest) {
173135
173980
  const changelog = "https://github.com/vercel/vercel/releases";
173136
- const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk120.default.magenta(
173981
+ const errorMsg = exitCode2 && exitCode2 !== 2 ? import_chalk122.default.magenta(
173137
173982
  `
173138
173983
 
173139
- The latest update ${import_chalk120.default.italic(
173984
+ The latest update ${import_chalk122.default.italic(
173140
173985
  "may"
173141
173986
  )} fix any errors that occurred.`
173142
173987
  ) : "";
173143
173988
  output_manager_default.print(
173144
173989
  box(
173145
- `Update available! ${import_chalk120.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk120.default.green(
173990
+ `Update available! ${import_chalk122.default.gray(`v${pkg_default.version}`)} \u226B ${import_chalk122.default.green(
173146
173991
  `v${latest}`
173147
173992
  )}
173148
173993
  Changelog: ${output_manager_default.link(changelog, changelog, { fallback: false })}
173149
- Run ${import_chalk120.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
173994
+ Run ${import_chalk122.default.cyan(cmd(await getUpdateCommand()))} to update.${errorMsg}`
173150
173995
  )
173151
173996
  );
173152
173997
  output_manager_default.print("\n\n");