vercel 37.11.0 → 37.12.1

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 +226 -27
  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
@@ -147027,15 +147072,26 @@ function createMetadataWizard(metadataSchema) {
147027
147072
  let allFieldsAreReadonly = true;
147028
147073
  const steps = [];
147029
147074
  for (const [key, schema] of Object.entries(properties)) {
147030
- if (isHidden(schema)) {
147031
- continue;
147032
- }
147033
- if (!supportedUIControls.has(schema["ui:control"])) {
147034
- isSupported = false;
147035
- break;
147036
- }
147037
- if (!isReadOnly(schema)) {
147038
- allFieldsAreReadonly = false;
147075
+ try {
147076
+ if (isHidden(schema)) {
147077
+ continue;
147078
+ }
147079
+ if (isDisabled(schema)) {
147080
+ continue;
147081
+ }
147082
+ if (!supportedUIControls.has(schema["ui:control"])) {
147083
+ isSupported = false;
147084
+ break;
147085
+ }
147086
+ if (!isReadOnly(schema)) {
147087
+ allFieldsAreReadonly = false;
147088
+ }
147089
+ } catch (error3) {
147090
+ if (error3 instanceof ExpressionError) {
147091
+ isSupported = false;
147092
+ break;
147093
+ }
147094
+ throw error3;
147039
147095
  }
147040
147096
  switch (schema["ui:control"]) {
147041
147097
  case "input": {
@@ -147081,14 +147137,37 @@ async function getMetadataFromSteps(client2, steps) {
147081
147137
  return Object.fromEntries(metadataEntries);
147082
147138
  }
147083
147139
  function isHidden(schema) {
147140
+ if (instanceOfExpression(schema["ui:hidden"])) {
147141
+ throw new ExpressionError("Expression found in schema");
147142
+ }
147084
147143
  return Boolean(
147085
147144
  schema["ui:hidden"] === true || schema["ui:hidden"] === "create"
147086
147145
  );
147087
147146
  }
147088
147147
  function isReadOnly(schema) {
147089
- return Boolean(schema["ui:read-only"]);
147148
+ if (instanceOfExpression(schema["ui:read-only"])) {
147149
+ throw new ExpressionError("Expression found in schema");
147150
+ }
147151
+ return Boolean(
147152
+ schema["ui:read-only"] === true || schema["ui:read-only"] === "create"
147153
+ );
147154
+ }
147155
+ function isDisabled(schema) {
147156
+ if (instanceOfExpression(schema["ui:disabled"])) {
147157
+ throw new ExpressionError("Expression found in schema");
147158
+ }
147159
+ return Boolean(
147160
+ schema["ui:disabled"] === true || schema["ui:disabled"] === "create"
147161
+ );
147090
147162
  }
147091
- var supportedUIControls;
147163
+ function instanceOfExpression(obj) {
147164
+ const checkedAsObject = Object(obj);
147165
+ if (obj !== checkedAsObject) {
147166
+ return false;
147167
+ }
147168
+ return "expr" in checkedAsObject;
147169
+ }
147170
+ var supportedUIControls, ExpressionError;
147092
147171
  var init_wizard = __esm({
147093
147172
  "src/commands/integration/wizard.ts"() {
147094
147173
  "use strict";
@@ -147099,6 +147178,8 @@ var init_wizard = __esm({
147099
147178
  "region",
147100
147179
  "vercel-region"
147101
147180
  ]);
147181
+ ExpressionError = class extends Error {
147182
+ };
147102
147183
  }
147103
147184
  });
147104
147185
 
@@ -149084,8 +149165,33 @@ var init_list4 = __esm({
149084
149165
  }
149085
149166
  });
149086
149167
 
149168
+ // src/util/telemetry/commands/project/rm.ts
149169
+ var ProjectRmTelemetryClient;
149170
+ var init_rm6 = __esm({
149171
+ "src/util/telemetry/commands/project/rm.ts"() {
149172
+ "use strict";
149173
+ init_telemetry();
149174
+ ProjectRmTelemetryClient = class extends TelemetryClient {
149175
+ trackCliArgumentName(name) {
149176
+ if (name) {
149177
+ this.trackCliArgument({
149178
+ arg: "name",
149179
+ value: this.redactedValue
149180
+ });
149181
+ }
149182
+ }
149183
+ };
149184
+ }
149185
+ });
149186
+
149087
149187
  // src/commands/project/rm.ts
149088
149188
  async function rm6(client2, args2) {
149189
+ const telemetryClient = new ProjectRmTelemetryClient({
149190
+ opts: {
149191
+ output: client2.output,
149192
+ store: client2.telemetryEventStore
149193
+ }
149194
+ });
149089
149195
  if (args2.length !== 1) {
149090
149196
  client2.output.error(
149091
149197
  `Invalid number of arguments. Usage: ${import_chalk99.default.cyan(
@@ -149095,6 +149201,7 @@ async function rm6(client2, args2) {
149095
149201
  return 1;
149096
149202
  }
149097
149203
  const name = args2[0];
149204
+ telemetryClient.trackCliArgumentName(name);
149098
149205
  const start = Date.now();
149099
149206
  const yes = await readConfirmation3(client2, name);
149100
149207
  if (!yes) {
@@ -149135,7 +149242,7 @@ It will also delete everything under the project including deployments.
149135
149242
  return await confirm(client2, `${import_chalk99.default.bold.red("Are you sure?")}`, false);
149136
149243
  }
149137
149244
  var import_chalk99, import_ms22, e;
149138
- var init_rm6 = __esm({
149245
+ var init_rm7 = __esm({
149139
149246
  "src/commands/project/rm.ts"() {
149140
149247
  "use strict";
149141
149248
  import_chalk99 = __toESM3(require_source());
@@ -149144,6 +149251,7 @@ var init_rm6 = __esm({
149144
149251
  init_errors_ts();
149145
149252
  init_confirm();
149146
149253
  init_pkg_name();
149254
+ init_rm6();
149147
149255
  e = encodeURIComponent;
149148
149256
  }
149149
149257
  });
@@ -149233,12 +149341,47 @@ var init_command21 = __esm({
149233
149341
  }
149234
149342
  });
149235
149343
 
149344
+ // src/util/telemetry/commands/project/index.ts
149345
+ var ProjectTelemetryClient;
149346
+ var init_project = __esm({
149347
+ "src/util/telemetry/commands/project/index.ts"() {
149348
+ "use strict";
149349
+ init_telemetry();
149350
+ ProjectTelemetryClient = class extends TelemetryClient {
149351
+ trackCliSubcommandLs(actual) {
149352
+ this.trackCliSubcommand({
149353
+ subcommand: "ls",
149354
+ value: actual
149355
+ });
149356
+ }
149357
+ trackCliSubcommandAdd(actual) {
149358
+ this.trackCliSubcommand({
149359
+ subcommand: "add",
149360
+ value: actual
149361
+ });
149362
+ }
149363
+ trackCliSubcommandRm(actual) {
149364
+ this.trackCliSubcommand({
149365
+ subcommand: "rm",
149366
+ value: actual
149367
+ });
149368
+ }
149369
+ };
149370
+ }
149371
+ });
149372
+
149236
149373
  // src/commands/project/index.ts
149237
149374
  var project_exports = {};
149238
149375
  __export3(project_exports, {
149239
149376
  default: () => main11
149240
149377
  });
149241
149378
  async function main11(client2) {
149379
+ const telemetryClient = new ProjectTelemetryClient({
149380
+ opts: {
149381
+ output: client2.output,
149382
+ store: client2.telemetryEventStore
149383
+ }
149384
+ });
149242
149385
  let subcommand;
149243
149386
  let parsedArgs = null;
149244
149387
  const flagsSpecification = getFlagsSpecification(projectCommand.options);
@@ -149260,11 +149403,14 @@ async function main11(client2) {
149260
149403
  switch (subcommand) {
149261
149404
  case "ls":
149262
149405
  case "list":
149406
+ telemetryClient.trackCliSubcommandLs(subcommand);
149263
149407
  return await list4(client2, parsedArgs.flags, args2, contextName);
149264
149408
  case "add":
149409
+ telemetryClient.trackCliSubcommandAdd(subcommand);
149265
149410
  return await add7(client2, args2, contextName);
149266
149411
  case "rm":
149267
149412
  case "remove":
149413
+ telemetryClient.trackCliSubcommandRm(subcommand);
149268
149414
  return await rm6(client2, args2);
149269
149415
  default:
149270
149416
  output2.error(getInvalidSubcommand(COMMAND_CONFIG10));
@@ -149275,7 +149421,7 @@ async function main11(client2) {
149275
149421
  }
149276
149422
  }
149277
149423
  var COMMAND_CONFIG10;
149278
- var init_project = __esm({
149424
+ var init_project2 = __esm({
149279
149425
  "src/commands/project/index.ts"() {
149280
149426
  "use strict";
149281
149427
  init_get_args();
@@ -149285,9 +149431,10 @@ var init_project = __esm({
149285
149431
  init_help();
149286
149432
  init_add6();
149287
149433
  init_list4();
149288
- init_rm6();
149434
+ init_rm7();
149289
149435
  init_command21();
149290
149436
  init_get_flags_specification();
149437
+ init_project();
149291
149438
  COMMAND_CONFIG10 = {
149292
149439
  ls: ["ls", "list"],
149293
149440
  add: ["add"],
@@ -150278,16 +150425,51 @@ var init_command24 = __esm({
150278
150425
  }
150279
150426
  });
150280
150427
 
150428
+ // src/util/telemetry/commands/remove/index.ts
150429
+ var RemoveTelemetryClient;
150430
+ var init_remove2 = __esm({
150431
+ "src/util/telemetry/commands/remove/index.ts"() {
150432
+ "use strict";
150433
+ init_telemetry();
150434
+ RemoveTelemetryClient = class extends TelemetryClient {
150435
+ trackCliFlagHard(flag) {
150436
+ if (flag) {
150437
+ this.trackCliFlag("hard");
150438
+ }
150439
+ }
150440
+ trackCliFlagSafe(flag) {
150441
+ if (flag) {
150442
+ this.trackCliFlag("safe");
150443
+ }
150444
+ }
150445
+ trackCliFlagYes(flag) {
150446
+ if (flag) {
150447
+ this.trackCliFlag("yes");
150448
+ }
150449
+ }
150450
+ };
150451
+ }
150452
+ });
150453
+
150281
150454
  // src/commands/remove/index.ts
150282
150455
  var remove_exports = {};
150283
150456
  __export3(remove_exports, {
150284
150457
  default: () => remove3
150285
150458
  });
150286
150459
  async function remove3(client2) {
150460
+ const telemetryClient = new RemoveTelemetryClient({
150461
+ opts: {
150462
+ output: client2.output,
150463
+ store: client2.telemetryEventStore
150464
+ }
150465
+ });
150287
150466
  let parsedArgs = null;
150288
150467
  const flagsSpecification = getFlagsSpecification(removeCommand.options);
150289
150468
  try {
150290
150469
  parsedArgs = parseArguments(client2.argv.slice(2), flagsSpecification);
150470
+ telemetryClient.trackCliFlagSafe(parsedArgs.flags["--safe"]);
150471
+ telemetryClient.trackCliFlagHard(parsedArgs.flags["--hard"]);
150472
+ telemetryClient.trackCliFlagYes(parsedArgs.flags["--yes"]);
150291
150473
  } catch (error4) {
150292
150474
  handleError(error4);
150293
150475
  return 1;
@@ -150488,7 +150670,7 @@ function deploymentsAndProjects(deployments, projects, conjunction = "and") {
150488
150670
  return `${(0, import_pluralize11.default)("deployment", deployments.length, true)} ${conjunction} ${(0, import_pluralize11.default)("project", projects.length, true)}`;
150489
150671
  }
150490
150672
  var import_chalk106, import_ms26, import_pluralize11;
150491
- var init_remove = __esm({
150673
+ var init_remove3 = __esm({
150492
150674
  "src/commands/remove/index.ts"() {
150493
150675
  "use strict";
150494
150676
  import_chalk106 = __toESM3(require_source());
@@ -150512,6 +150694,7 @@ var init_remove = __esm({
150512
150694
  init_help();
150513
150695
  init_command24();
150514
150696
  init_get_flags_specification();
150697
+ init_remove2();
150515
150698
  }
150516
150699
  });
150517
150700
 
@@ -151989,7 +152172,7 @@ __export3(telemetry_exports, {
151989
152172
  default: () => telemetry
151990
152173
  });
151991
152174
  async function telemetry(client2) {
151992
- let telemetryClient = new TelemetryTelemetryClient({
152175
+ const telemetryClient = new TelemetryTelemetryClient({
151993
152176
  opts: {
151994
152177
  output: client2.output,
151995
152178
  store: client2.telemetryEventStore
@@ -153507,6 +153690,21 @@ try {
153507
153690
  process.exit(1);
153508
153691
  }
153509
153692
  }
153693
+ {
153694
+ const SILENCED_ERRORS = [
153695
+ "DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead."
153696
+ ];
153697
+ const originalError = console.error;
153698
+ console.error = (msg) => {
153699
+ const isSilencedError = SILENCED_ERRORS.some(
153700
+ (error3) => typeof msg === "string" && msg.includes(error3)
153701
+ );
153702
+ if (isSilencedError) {
153703
+ return;
153704
+ }
153705
+ originalError(msg);
153706
+ };
153707
+ }
153510
153708
  var VERCEL_DIR3 = global_path_default();
153511
153709
  var VERCEL_CONFIG_PATH = getConfigFilePath();
153512
153710
  var VERCEL_AUTH_CONFIG_PATH = getAuthConfigFilePath();
@@ -153859,6 +154057,7 @@ var main14 = async () => {
153859
154057
  client.config.currentTeam = related.id;
153860
154058
  }
153861
154059
  }
154060
+ client.telemetryEventStore.updateTeamId(client.config.currentTeam);
153862
154061
  let exitCode2;
153863
154062
  try {
153864
154063
  if (!targetCommand2) {
@@ -153961,7 +154160,7 @@ var main14 = async () => {
153961
154160
  break;
153962
154161
  case "project":
153963
154162
  telemetry2.trackCliCommandProject(userSuppliedSubCommand);
153964
- func = (init_project(), __toCommonJS3(project_exports)).default;
154163
+ func = (init_project2(), __toCommonJS3(project_exports)).default;
153965
154164
  break;
153966
154165
  case "promote":
153967
154166
  telemetry2.trackCliCommandPromote(userSuppliedSubCommand);
@@ -153977,7 +154176,7 @@ var main14 = async () => {
153977
154176
  break;
153978
154177
  case "remove":
153979
154178
  telemetry2.trackCliCommandRemove(userSuppliedSubCommand);
153980
- func = (init_remove(), __toCommonJS3(remove_exports)).default;
154179
+ func = (init_remove3(), __toCommonJS3(remove_exports)).default;
153981
154180
  break;
153982
154181
  case "rollback":
153983
154182
  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.1",
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",