vercel 37.11.0 → 37.12.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 +179 -16
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -69836,6 +69836,11 @@ var init_telemetry = __esm({
69836
69836
  event.teamId = this.teamId;
69837
69837
  this.events.push(event);
69838
69838
  }
69839
+ updateTeamId(teamId) {
69840
+ if (teamId) {
69841
+ this.teamId = teamId;
69842
+ }
69843
+ }
69839
69844
  get readonlyEvents() {
69840
69845
  return Array.from(this.events);
69841
69846
  }
@@ -72122,11 +72127,43 @@ var init_is_valid_name = __esm({
72122
72127
  }
72123
72128
  });
72124
72129
 
72130
+ // src/util/telemetry/commands/alias/remove.ts
72131
+ var AliasRmTelemetryClient;
72132
+ var init_remove = __esm({
72133
+ "src/util/telemetry/commands/alias/remove.ts"() {
72134
+ "use strict";
72135
+ init_telemetry();
72136
+ AliasRmTelemetryClient = class extends TelemetryClient {
72137
+ trackCliArgumentAlias(alias2) {
72138
+ if (alias2) {
72139
+ this.trackCliArgument({
72140
+ arg: "alias",
72141
+ value: this.redactedValue
72142
+ });
72143
+ }
72144
+ }
72145
+ trackCliFlagYes(yes) {
72146
+ if (yes) {
72147
+ this.trackCliFlag("yes");
72148
+ }
72149
+ }
72150
+ };
72151
+ }
72152
+ });
72153
+
72125
72154
  // src/commands/alias/rm.ts
72126
72155
  async function rm(client2, opts, args2) {
72127
72156
  const { output: output2 } = client2;
72128
72157
  const { contextName } = await getScope(client2);
72158
+ const telemetryClient = new AliasRmTelemetryClient({
72159
+ opts: {
72160
+ output: client2.output,
72161
+ store: client2.telemetryEventStore
72162
+ }
72163
+ });
72164
+ telemetryClient.trackCliFlagYes(opts["--yes"]);
72129
72165
  const [aliasOrId] = args2;
72166
+ telemetryClient.trackCliArgumentAlias(aliasOrId);
72130
72167
  if (args2.length !== 1) {
72131
72168
  output2.error(
72132
72169
  `Invalid number of arguments. Usage: ${import_chalk24.default.cyan(
@@ -72191,6 +72228,7 @@ var init_rm = __esm({
72191
72228
  init_find_alias_by_alias_or_id();
72192
72229
  init_is_valid_name();
72193
72230
  init_pkg_name();
72231
+ init_remove();
72194
72232
  }
72195
72233
  });
72196
72234
 
@@ -73558,11 +73596,11 @@ async function setupDomain(output2, client2, alias2, contextName) {
73558
73596
  return addResult;
73559
73597
  }
73560
73598
  output2.debug(
73561
- `Domain ${domain2} successfuly added and automatically verified`
73599
+ `Domain ${domain2} successfully added and automatically verified`
73562
73600
  );
73563
73601
  return addResult;
73564
73602
  }
73565
- output2.debug(`The domain ${aliasDomain} was successfuly purchased`);
73603
+ output2.debug(`The domain ${aliasDomain} was successfully purchased`);
73566
73604
  const purchasedDomain = await maybeGetDomainByName(
73567
73605
  client2,
73568
73606
  contextName,
@@ -74274,6 +74312,12 @@ var init_alias = __esm({
74274
74312
  value: actual
74275
74313
  });
74276
74314
  }
74315
+ trackCliSubcommandRemove(actual) {
74316
+ this.trackCliSubcommand({
74317
+ subcommand: "rm",
74318
+ value: actual
74319
+ });
74320
+ }
74277
74321
  };
74278
74322
  }
74279
74323
  });
@@ -74284,7 +74328,7 @@ __export3(alias_exports, {
74284
74328
  default: () => alias
74285
74329
  });
74286
74330
  async function alias(client2) {
74287
- let telemetryClient = new AliasTelemetryClient({
74331
+ const telemetryClient = new AliasTelemetryClient({
74288
74332
  opts: {
74289
74333
  output: client2.output,
74290
74334
  store: client2.telemetryEventStore
@@ -74311,6 +74355,7 @@ async function alias(client2) {
74311
74355
  telemetryClient.trackCliSubcommandLs(subcommandOriginal);
74312
74356
  return ls(client2, parsedArguments.flags, args2);
74313
74357
  case "rm":
74358
+ telemetryClient.trackCliSubcommandRemove(subcommandOriginal);
74314
74359
  return rm(client2, parsedArguments.flags, args2);
74315
74360
  default:
74316
74361
  telemetryClient.trackCliSubcommandSet(subcommandOriginal);
@@ -85478,7 +85523,7 @@ var require_detect_file_system_api = __commonJS2({
85478
85523
  });
85479
85524
  module2.exports = __toCommonJS4(detect_file_system_api_exports);
85480
85525
  var import_semver4 = __toESM4(require_semver2());
85481
- var import__15 = require_dist27();
85526
+ var import__19 = require_dist27();
85482
85527
  async function detectFileSystemAPI2({
85483
85528
  files,
85484
85529
  projectSettings,
@@ -85544,7 +85589,7 @@ var require_detect_file_system_api = __commonJS2({
85544
85589
  };
85545
85590
  }
85546
85591
  const invalidBuilder = builders.find(({ use }) => {
85547
- const valid = (0, import__15.isOfficialRuntime)("go", use) || (0, import__15.isOfficialRuntime)("python", use) || (0, import__15.isOfficialRuntime)("ruby", use) || (0, import__15.isOfficialRuntime)("node", use) || (0, import__15.isOfficialRuntime)("next", use) || (0, import__15.isOfficialRuntime)("static", use) || (0, import__15.isOfficialRuntime)("static-build", use);
85592
+ const valid = (0, import__19.isOfficialRuntime)("go", use) || (0, import__19.isOfficialRuntime)("python", use) || (0, import__19.isOfficialRuntime)("ruby", use) || (0, import__19.isOfficialRuntime)("node", use) || (0, import__19.isOfficialRuntime)("next", use) || (0, import__19.isOfficialRuntime)("static", use) || (0, import__19.isOfficialRuntime)("static-build", use);
85548
85593
  return !valid;
85549
85594
  });
85550
85595
  if (invalidBuilder) {
@@ -85557,7 +85602,7 @@ var require_detect_file_system_api = __commonJS2({
85557
85602
  for (const lang of ["go", "python", "ruby"]) {
85558
85603
  for (const { use } of builders) {
85559
85604
  const plugin = "vercel-plugin-" + lang;
85560
- if ((0, import__15.isOfficialRuntime)(lang, use) && !deps[plugin]) {
85605
+ if ((0, import__19.isOfficialRuntime)(lang, use) && !deps[plugin]) {
85561
85606
  return {
85562
85607
  metadata,
85563
85608
  fsApiBuilder: null,
@@ -85614,7 +85659,7 @@ var require_detect_file_system_api = __commonJS2({
85614
85659
  }
85615
85660
  }
85616
85661
  const frontendBuilder = builders.find(
85617
- ({ use }) => (0, import__15.isOfficialRuntime)("next", use) || (0, import__15.isOfficialRuntime)("static", use) || (0, import__15.isOfficialRuntime)("static-build", use)
85662
+ ({ use }) => (0, import__19.isOfficialRuntime)("next", use) || (0, import__19.isOfficialRuntime)("static", use) || (0, import__19.isOfficialRuntime)("static-build", use)
85618
85663
  );
85619
85664
  const config2 = frontendBuilder?.config || {};
85620
85665
  const withTag = tag ? `@${tag}` : "";
@@ -120182,7 +120227,7 @@ __export3(build_exports, {
120182
120227
  default: () => main2
120183
120228
  });
120184
120229
  async function main2(client2) {
120185
- let telemetryClient = new BuildTelemetryClient({
120230
+ const telemetryClient = new BuildTelemetryClient({
120186
120231
  opts: {
120187
120232
  output: client2.output,
120188
120233
  store: client2.telemetryEventStore
@@ -122238,7 +122283,7 @@ var init_deploy2 = __esm({
122238
122283
  init_parse_target();
122239
122284
  init_deploy();
122240
122285
  deploy_default = async (client2) => {
122241
- let telemetryClient = new DeployTelemetryClient({
122286
+ const telemetryClient = new DeployTelemetryClient({
122242
122287
  opts: {
122243
122288
  output: client2.output,
122244
122289
  store: client2.telemetryEventStore
@@ -149084,8 +149129,33 @@ var init_list4 = __esm({
149084
149129
  }
149085
149130
  });
149086
149131
 
149132
+ // src/util/telemetry/commands/project/rm.ts
149133
+ var ProjectRmTelemetryClient;
149134
+ var init_rm6 = __esm({
149135
+ "src/util/telemetry/commands/project/rm.ts"() {
149136
+ "use strict";
149137
+ init_telemetry();
149138
+ ProjectRmTelemetryClient = class extends TelemetryClient {
149139
+ trackCliArgumentName(name) {
149140
+ if (name) {
149141
+ this.trackCliArgument({
149142
+ arg: "name",
149143
+ value: this.redactedValue
149144
+ });
149145
+ }
149146
+ }
149147
+ };
149148
+ }
149149
+ });
149150
+
149087
149151
  // src/commands/project/rm.ts
149088
149152
  async function rm6(client2, args2) {
149153
+ const telemetryClient = new ProjectRmTelemetryClient({
149154
+ opts: {
149155
+ output: client2.output,
149156
+ store: client2.telemetryEventStore
149157
+ }
149158
+ });
149089
149159
  if (args2.length !== 1) {
149090
149160
  client2.output.error(
149091
149161
  `Invalid number of arguments. Usage: ${import_chalk99.default.cyan(
@@ -149095,6 +149165,7 @@ async function rm6(client2, args2) {
149095
149165
  return 1;
149096
149166
  }
149097
149167
  const name = args2[0];
149168
+ telemetryClient.trackCliArgumentName(name);
149098
149169
  const start = Date.now();
149099
149170
  const yes = await readConfirmation3(client2, name);
149100
149171
  if (!yes) {
@@ -149135,7 +149206,7 @@ It will also delete everything under the project including deployments.
149135
149206
  return await confirm(client2, `${import_chalk99.default.bold.red("Are you sure?")}`, false);
149136
149207
  }
149137
149208
  var import_chalk99, import_ms22, e;
149138
- var init_rm6 = __esm({
149209
+ var init_rm7 = __esm({
149139
149210
  "src/commands/project/rm.ts"() {
149140
149211
  "use strict";
149141
149212
  import_chalk99 = __toESM3(require_source());
@@ -149144,6 +149215,7 @@ var init_rm6 = __esm({
149144
149215
  init_errors_ts();
149145
149216
  init_confirm();
149146
149217
  init_pkg_name();
149218
+ init_rm6();
149147
149219
  e = encodeURIComponent;
149148
149220
  }
149149
149221
  });
@@ -149233,12 +149305,47 @@ var init_command21 = __esm({
149233
149305
  }
149234
149306
  });
149235
149307
 
149308
+ // src/util/telemetry/commands/project/index.ts
149309
+ var ProjectTelemetryClient;
149310
+ var init_project = __esm({
149311
+ "src/util/telemetry/commands/project/index.ts"() {
149312
+ "use strict";
149313
+ init_telemetry();
149314
+ ProjectTelemetryClient = class extends TelemetryClient {
149315
+ trackCliSubcommandLs(actual) {
149316
+ this.trackCliSubcommand({
149317
+ subcommand: "ls",
149318
+ value: actual
149319
+ });
149320
+ }
149321
+ trackCliSubcommandAdd(actual) {
149322
+ this.trackCliSubcommand({
149323
+ subcommand: "add",
149324
+ value: actual
149325
+ });
149326
+ }
149327
+ trackCliSubcommandRm(actual) {
149328
+ this.trackCliSubcommand({
149329
+ subcommand: "rm",
149330
+ value: actual
149331
+ });
149332
+ }
149333
+ };
149334
+ }
149335
+ });
149336
+
149236
149337
  // src/commands/project/index.ts
149237
149338
  var project_exports = {};
149238
149339
  __export3(project_exports, {
149239
149340
  default: () => main11
149240
149341
  });
149241
149342
  async function main11(client2) {
149343
+ const telemetryClient = new ProjectTelemetryClient({
149344
+ opts: {
149345
+ output: client2.output,
149346
+ store: client2.telemetryEventStore
149347
+ }
149348
+ });
149242
149349
  let subcommand;
149243
149350
  let parsedArgs = null;
149244
149351
  const flagsSpecification = getFlagsSpecification(projectCommand.options);
@@ -149260,11 +149367,14 @@ async function main11(client2) {
149260
149367
  switch (subcommand) {
149261
149368
  case "ls":
149262
149369
  case "list":
149370
+ telemetryClient.trackCliSubcommandLs(subcommand);
149263
149371
  return await list4(client2, parsedArgs.flags, args2, contextName);
149264
149372
  case "add":
149373
+ telemetryClient.trackCliSubcommandAdd(subcommand);
149265
149374
  return await add7(client2, args2, contextName);
149266
149375
  case "rm":
149267
149376
  case "remove":
149377
+ telemetryClient.trackCliSubcommandRm(subcommand);
149268
149378
  return await rm6(client2, args2);
149269
149379
  default:
149270
149380
  output2.error(getInvalidSubcommand(COMMAND_CONFIG10));
@@ -149275,7 +149385,7 @@ async function main11(client2) {
149275
149385
  }
149276
149386
  }
149277
149387
  var COMMAND_CONFIG10;
149278
- var init_project = __esm({
149388
+ var init_project2 = __esm({
149279
149389
  "src/commands/project/index.ts"() {
149280
149390
  "use strict";
149281
149391
  init_get_args();
@@ -149285,9 +149395,10 @@ var init_project = __esm({
149285
149395
  init_help();
149286
149396
  init_add6();
149287
149397
  init_list4();
149288
- init_rm6();
149398
+ init_rm7();
149289
149399
  init_command21();
149290
149400
  init_get_flags_specification();
149401
+ init_project();
149291
149402
  COMMAND_CONFIG10 = {
149292
149403
  ls: ["ls", "list"],
149293
149404
  add: ["add"],
@@ -150278,16 +150389,51 @@ var init_command24 = __esm({
150278
150389
  }
150279
150390
  });
150280
150391
 
150392
+ // src/util/telemetry/commands/remove/index.ts
150393
+ var RemoveTelemetryClient;
150394
+ var init_remove2 = __esm({
150395
+ "src/util/telemetry/commands/remove/index.ts"() {
150396
+ "use strict";
150397
+ init_telemetry();
150398
+ RemoveTelemetryClient = class extends TelemetryClient {
150399
+ trackCliFlagHard(flag) {
150400
+ if (flag) {
150401
+ this.trackCliFlag("hard");
150402
+ }
150403
+ }
150404
+ trackCliFlagSafe(flag) {
150405
+ if (flag) {
150406
+ this.trackCliFlag("safe");
150407
+ }
150408
+ }
150409
+ trackCliFlagYes(flag) {
150410
+ if (flag) {
150411
+ this.trackCliFlag("yes");
150412
+ }
150413
+ }
150414
+ };
150415
+ }
150416
+ });
150417
+
150281
150418
  // src/commands/remove/index.ts
150282
150419
  var remove_exports = {};
150283
150420
  __export3(remove_exports, {
150284
150421
  default: () => remove3
150285
150422
  });
150286
150423
  async function remove3(client2) {
150424
+ const telemetryClient = new RemoveTelemetryClient({
150425
+ opts: {
150426
+ output: client2.output,
150427
+ store: client2.telemetryEventStore
150428
+ }
150429
+ });
150287
150430
  let parsedArgs = null;
150288
150431
  const flagsSpecification = getFlagsSpecification(removeCommand.options);
150289
150432
  try {
150290
150433
  parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
150434
+ telemetryClient.trackCliFlagSafe(parsedArgs.flags["--safe"]);
150435
+ telemetryClient.trackCliFlagHard(parsedArgs.flags["--hard"]);
150436
+ telemetryClient.trackCliFlagYes(parsedArgs.flags["--yes"]);
150291
150437
  } catch (error4) {
150292
150438
  handleError(error4);
150293
150439
  return 1;
@@ -150488,7 +150634,7 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
150488
150634
  return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
150489
150635
  }
150490
150636
  var import_chalk106, import_ms26, import_pluralize11;
150491
- var init_remove = __esm({
150637
+ var init_remove3 = __esm({
150492
150638
  "src/commands/remove/index.ts"() {
150493
150639
  "use strict";
150494
150640
  import_chalk106 = __toESM3(require_source());
@@ -150512,6 +150658,7 @@ var init_remove = __esm({
150512
150658
  init_help();
150513
150659
  init_command24();
150514
150660
  init_get_flags_specification();
150661
+ init_remove2();
150515
150662
  }
150516
150663
  });
150517
150664
 
@@ -151989,7 +152136,7 @@ __export3(telemetry_exports, {
151989
152136
  default: () => telemetry
151990
152137
  });
151991
152138
  async function telemetry(client2) {
151992
- let telemetryClient = new TelemetryTelemetryClient({
152139
+ const telemetryClient = new TelemetryTelemetryClient({
151993
152140
  opts: {
151994
152141
  output: client2.output,
151995
152142
  store: client2.telemetryEventStore
@@ -153507,6 +153654,21 @@ try {
153507
153654
  process.exit(1);
153508
153655
  }
153509
153656
  }
153657
+ {
153658
+ const SILENCED_ERRORS = [
153659
+ "DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."
153660
+ ];
153661
+ const originalError = console.error;
153662
+ console.error = (msg) => {
153663
+ const isSilencedError = SILENCED_ERRORS.some(
153664
+ (error3) => typeof msg === "string" && msg.includes(error3)
153665
+ );
153666
+ if (isSilencedError) {
153667
+ return;
153668
+ }
153669
+ originalError(msg);
153670
+ };
153671
+ }
153510
153672
  var VERCEL_DIR3 = global_path_default();
153511
153673
  var VERCEL_CONFIG_PATH = getConfigFilePath();
153512
153674
  var VERCEL_AUTH_CONFIG_PATH = getAuthConfigFilePath();
@@ -153859,6 +154021,7 @@ var main14 = async () => {
153859
154021
  client.config.currentTeam = related.id;
153860
154022
  }
153861
154023
  }
154024
+ client.telemetryEventStore.updateTeamId(client.config.currentTeam);
153862
154025
  let exitCode2;
153863
154026
  try {
153864
154027
  if (!targetCommand2) {
@@ -153961,7 +154124,7 @@ var main14 = async () => {
153961
154124
  break;
153962
154125
  case "project":
153963
154126
  telemetry2.trackCliCommandProject(userSuppliedSubCommand);
153964
- func = (init_project(), __toCommonJS3(project_exports)).default;
154127
+ func = (init_project2(), __toCommonJS3(project_exports)).default;
153965
154128
  break;
153966
154129
  case "promote":
153967
154130
  telemetry2.trackCliCommandPromote(userSuppliedSubCommand);
@@ -153977,7 +154140,7 @@ var main14 = async () => {
153977
154140
  break;
153978
154141
  case "remove":
153979
154142
  telemetry2.trackCliCommandRemove(userSuppliedSubCommand);
153980
- func = (init_remove(), __toCommonJS3(remove_exports)).default;
154143
+ func = (init_remove3(), __toCommonJS3(remove_exports)).default;
153981
154144
  break;
153982
154145
  case "rollback":
153983
154146
  telemetry2.trackCliCommandRollback(userSuppliedSubCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel",
3
- "version": "37.11.0",
3
+ "version": "37.12.0",
4
4
  "preferGlobal": true,
5
5
  "license": "Apache-2.0",
6
6
  "description": "The command-line interface for Vercel",
@@ -25,7 +25,7 @@
25
25
  "@vercel/fun": "1.1.0",
26
26
  "@vercel/go": "3.2.0",
27
27
  "@vercel/hydrogen": "1.0.9",
28
- "@vercel/next": "4.3.16",
28
+ "@vercel/next": "4.3.17",
29
29
  "@vercel/node": "3.2.23",
30
30
  "@vercel/python": "4.3.1",
31
31
  "@vercel/redwood": "2.1.8",