vercel 54.17.3 → 54.18.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 (61) hide show
  1. package/dist/chunks/{add-PQWZCK7O.js → add-4IT4GOJW.js} +8 -8
  2. package/dist/chunks/chunk-2RVK3DDN.js +224 -0
  3. package/dist/chunks/{chunk-NRP6ZKXJ.js → chunk-4IMUS3MS.js} +1 -1
  4. package/dist/chunks/{chunk-G4YL2LRL.js → chunk-54YT5DAU.js} +2 -2
  5. package/dist/chunks/{chunk-QM7D5H2G.js → chunk-6BBEJYCU.js} +1 -1
  6. package/dist/chunks/{chunk-UXP2N2WD.js → chunk-6BKX6MX4.js} +57 -5
  7. package/dist/chunks/{chunk-4FG6Q2EM.js → chunk-7G6CGX4Q.js} +1 -1
  8. package/dist/chunks/{chunk-HCJRHKSM.js → chunk-7YKF2IH6.js} +8 -8
  9. package/dist/chunks/{chunk-IAOBSXJ5.js → chunk-A2UBFY4K.js} +3 -3
  10. package/dist/chunks/{chunk-OYQKUG4C.js → chunk-A56XRPQF.js} +8 -8
  11. package/dist/chunks/{chunk-YI3JV6GM.js → chunk-CT3OCODK.js} +1 -1
  12. package/dist/chunks/{chunk-OSXRHH6W.js → chunk-D46XEMEE.js} +20 -20
  13. package/dist/chunks/{chunk-ATBH7KGL.js → chunk-JDW2DCII.js} +1 -1
  14. package/dist/chunks/{chunk-6V37RSQB.js → chunk-KFMV4Q4Z.js} +1 -1
  15. package/dist/chunks/{chunk-JKIM3UW3.js → chunk-MDVN2CL3.js} +5 -5
  16. package/dist/chunks/{chunk-FMBDRMTZ.js → chunk-N6JDK2GO.js} +9 -8
  17. package/dist/chunks/{chunk-SBYEIQ32.js → chunk-OJB4B7YD.js} +1 -1
  18. package/dist/chunks/{chunk-2CYJVSAM.js → chunk-QMRIZXZB.js} +1 -1
  19. package/dist/chunks/{chunk-BHMMV3HE.js → chunk-S6WD5L3L.js} +3606 -513
  20. package/dist/chunks/{chunk-QMMMXYOY.js → chunk-SYHCMCWI.js} +2 -2
  21. package/dist/chunks/{chunk-5FAPBIX6.js → chunk-WJLL77OK.js} +1 -1
  22. package/dist/chunks/{chunk-MB63D7UN.js → chunk-XMNRQYFL.js} +28 -7
  23. package/dist/chunks/{chunk-P4KQ3FJ4.js → chunk-XQQXV6ZZ.js} +1 -0
  24. package/dist/chunks/{compile-vercel-config-45XN4U4D.js → compile-vercel-config-U7H5E3AF.js} +4 -4
  25. package/dist/chunks/{delete-RQYOSBNO.js → delete-EWHQTXBW.js} +5 -5
  26. package/dist/chunks/{disable-RRGOZIA7.js → disable-D6PWS73S.js} +5 -5
  27. package/dist/chunks/{discard-X2NIGII5.js → discard-RCWQO5OM.js} +5 -5
  28. package/dist/chunks/{edit-QV3Y6IUT.js → edit-Y53X26NZ.js} +6 -6
  29. package/dist/chunks/{enable-UQAJJKCG.js → enable-M5RHORDQ.js} +5 -5
  30. package/dist/chunks/{exec-HI4HF4GY.js → exec-CGBHRYWG.js} +14 -9
  31. package/dist/chunks/{export-D4YNS2G5.js → export-2DR3UQFV.js} +5 -5
  32. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +99 -0
  33. package/dist/chunks/{inspect-FHB3H3NA.js → inspect-B7I5BKQS.js} +7 -7
  34. package/dist/chunks/{list-QYUCZR26.js → list-B57MANV4.js} +12 -12
  35. package/dist/chunks/{list-6RAHTDT2.js → list-WZ32GBPG.js} +6 -6
  36. package/dist/chunks/{ls-GKWWEHQS.js → ls-HG2AU4FP.js} +8 -8
  37. package/dist/chunks/{publish-UTKKRA4P.js → publish-5RPU7CGQ.js} +5 -5
  38. package/dist/chunks/{query-NM7MXRFW.js → query-QEMQUYOA.js} +11 -11
  39. package/dist/chunks/{reorder-ZLVQQBMG.js → reorder-E37TLOBH.js} +5 -5
  40. package/dist/chunks/{restore-SDTDA4A6.js → restore-HBKARSXS.js} +5 -5
  41. package/dist/chunks/{rm-65PQY7XN.js → rm-NODZBG52.js} +8 -8
  42. package/dist/chunks/{rule-inspect-JFKSPCDU.js → rule-inspect-XDPT3CMS.js} +8 -8
  43. package/dist/chunks/{rules-6672IXZE.js → rules-EMK5FIZX.js} +6 -6
  44. package/dist/chunks/{schema-DC2LLUHD.js → schema-AHANZBO4.js} +6 -6
  45. package/dist/chunks/{update-7VFELUTD.js → update-BDHCWMWZ.js} +8 -8
  46. package/dist/commands/build/index.js +33 -18
  47. package/dist/commands/deploy/index.js +21 -21
  48. package/dist/commands/dev/index.js +46 -38
  49. package/dist/commands/env/index.js +15 -15
  50. package/dist/commands/link/index.js +13 -13
  51. package/dist/commands/list/index.js +12 -12
  52. package/dist/commands-bulk.js +227 -84
  53. package/dist/fetch-dist-tags.cjs +60 -0
  54. package/dist/get-latest-worker.cjs +6 -56
  55. package/dist/help.js +1 -1
  56. package/dist/index.js +200 -61
  57. package/dist/version.mjs +1 -1
  58. package/package.json +21 -23
  59. package/dist/chunks/chunk-N2T234LO.js +0 -3144
  60. package/dist/chunks/{chunk-3NR6OYDV.js → chunk-LWJWW6ZY.js} +3 -3
  61. package/dist/chunks/{chunk-D7MGZH35.js → chunk-U5FVI3MF.js} +3 -3
@@ -31,7 +31,7 @@ import {
31
31
  runInteractiveEditLoop,
32
32
  stripQuotes,
33
33
  validateActionFlags
34
- } from "./chunks/chunk-NRP6ZKXJ.js";
34
+ } from "./chunks/chunk-4IMUS3MS.js";
35
35
  import {
36
36
  getRouteVersions
37
37
  } from "./chunks/chunk-AHU7WNL2.js";
@@ -49,10 +49,10 @@ import {
49
49
  parsePosition,
50
50
  parseSubcommandArgs,
51
51
  withGlobalFlags
52
- } from "./chunks/chunk-QM7D5H2G.js";
52
+ } from "./chunks/chunk-6BBEJYCU.js";
53
53
  import {
54
54
  normalizeRepeatableStringFilters
55
- } from "./chunks/chunk-D7MGZH35.js";
55
+ } from "./chunks/chunk-U5FVI3MF.js";
56
56
  import {
57
57
  OpenApiCache,
58
58
  api,
@@ -65,11 +65,11 @@ import {
65
65
  resolveOpenApiTagForTeamsCli,
66
66
  setAutoUpdate,
67
67
  tryOpenApiFallback
68
- } from "./chunks/chunk-OYQKUG4C.js";
68
+ } from "./chunks/chunk-A56XRPQF.js";
69
69
  import {
70
70
  getUpdateCommand,
71
71
  isGlobal
72
- } from "./chunks/chunk-SBYEIQ32.js";
72
+ } from "./chunks/chunk-OJB4B7YD.js";
73
73
  import {
74
74
  Now,
75
75
  addDomain,
@@ -90,14 +90,14 @@ import {
90
90
  require_format,
91
91
  require_jsonlines,
92
92
  setupDomain
93
- } from "./chunks/chunk-OSXRHH6W.js";
93
+ } from "./chunks/chunk-D46XEMEE.js";
94
94
  import {
95
95
  getGlobalPathConfig,
96
96
  persistAuthConfig,
97
97
  readLocalConfig,
98
98
  sleep,
99
99
  writeToConfigFile
100
- } from "./chunks/chunk-HCJRHKSM.js";
100
+ } from "./chunks/chunk-7YKF2IH6.js";
101
101
  import "./chunks/chunk-V5P25P7F.js";
102
102
  import {
103
103
  ellipsis,
@@ -125,7 +125,7 @@ import {
125
125
  import {
126
126
  formatEnvironment,
127
127
  validateLsArgs
128
- } from "./chunks/chunk-5FAPBIX6.js";
128
+ } from "./chunks/chunk-WJLL77OK.js";
129
129
  import {
130
130
  validateJsonOutput
131
131
  } from "./chunks/chunk-XPKWKPWA.js";
@@ -398,7 +398,7 @@ import {
398
398
  webAnalyticsSubcommand,
399
399
  webhooksCommand,
400
400
  whoamiCommand
401
- } from "./chunks/chunk-UXP2N2WD.js";
401
+ } from "./chunks/chunk-6BKX6MX4.js";
402
402
  import {
403
403
  metricsCommand,
404
404
  schemaSubcommand
@@ -419,6 +419,10 @@ import {
419
419
  restoreSubcommand as restoreSubcommand2,
420
420
  routesCommand
421
421
  } from "./chunks/chunk-IB56QKCM.js";
422
+ import {
423
+ activityCommand,
424
+ typesSubcommand
425
+ } from "./chunks/chunk-56AJHIQC.js";
422
426
  import {
423
427
  alertsCommand,
424
428
  inspectSubcommand,
@@ -433,19 +437,15 @@ import {
433
437
  rulesUpdateSubcommand
434
438
  } from "./chunks/chunk-SGPBULVT.js";
435
439
  import "./chunks/chunk-VKRW77HH.js";
436
- import {
437
- activityCommand,
438
- typesSubcommand
439
- } from "./chunks/chunk-56AJHIQC.js";
440
440
  import "./chunks/chunk-IJJOI63T.js";
441
441
  import {
442
442
  main
443
- } from "./chunks/chunk-JKIM3UW3.js";
443
+ } from "./chunks/chunk-MDVN2CL3.js";
444
444
  import "./chunks/chunk-IB5L4LKZ.js";
445
- import "./chunks/chunk-4FG6Q2EM.js";
445
+ import "./chunks/chunk-7G6CGX4Q.js";
446
446
  import {
447
447
  require_execa
448
- } from "./chunks/chunk-YI3JV6GM.js";
448
+ } from "./chunks/chunk-CT3OCODK.js";
449
449
  import {
450
450
  autoInstallVercelPlugin
451
451
  } from "./chunks/chunk-BRQ6PX3U.js";
@@ -457,22 +457,25 @@ import {
457
457
  } from "./chunks/chunk-VXYGCOKL.js";
458
458
  import {
459
459
  ensureLink
460
- } from "./chunks/chunk-QMMMXYOY.js";
461
- import "./chunks/chunk-FMBDRMTZ.js";
460
+ } from "./chunks/chunk-SYHCMCWI.js";
461
+ import "./chunks/chunk-N6JDK2GO.js";
462
462
  import {
463
463
  AGENT_ACTION,
464
464
  AGENT_REASON,
465
465
  AGENT_STATUS
466
466
  } from "./chunks/chunk-QH7WYDEP.js";
467
- import "./chunks/chunk-2CYJVSAM.js";
468
- import "./chunks/chunk-ATBH7KGL.js";
467
+ import "./chunks/chunk-QMRIZXZB.js";
468
+ import "./chunks/chunk-JDW2DCII.js";
469
469
  import {
470
470
  detectExplicitScope,
471
471
  getScope
472
- } from "./chunks/chunk-6V37RSQB.js";
472
+ } from "./chunks/chunk-KFMV4Q4Z.js";
473
473
  import {
474
474
  help
475
- } from "./chunks/chunk-3NR6OYDV.js";
475
+ } from "./chunks/chunk-LWJWW6ZY.js";
476
+ import {
477
+ table
478
+ } from "./chunks/chunk-LYCSVJIX.js";
476
479
  import {
477
480
  STANDARD_ENVIRONMENTS,
478
481
  VERCEL_CONFIG_EXTENSIONS,
@@ -518,10 +521,7 @@ import {
518
521
  selectAndParseRemoteUrl,
519
522
  selectOrg,
520
523
  ua_default
521
- } from "./chunks/chunk-BHMMV3HE.js";
522
- import {
523
- TelemetryClient
524
- } from "./chunks/chunk-Q77ALSXR.js";
524
+ } from "./chunks/chunk-S6WD5L3L.js";
525
525
  import {
526
526
  argvHasNonInteractive,
527
527
  buildCommandWithGlobalFlags,
@@ -536,14 +536,8 @@ import {
536
536
  shouldEmitNonInteractiveCommandError
537
537
  } from "./chunks/chunk-X5UROEGN.js";
538
538
  import {
539
- require_lib as require_lib3
540
- } from "./chunks/chunk-N2T234LO.js";
541
- import {
542
- require_ms
543
- } from "./chunks/chunk-GGP5R3FU.js";
544
- import {
545
- table
546
- } from "./chunks/chunk-LYCSVJIX.js";
539
+ TelemetryClient
540
+ } from "./chunks/chunk-Q77ALSXR.js";
547
541
  import {
548
542
  GLOBAL_CLI_FLAG_NAMES,
549
543
  getCommandNameWithGlobalFlags,
@@ -611,6 +605,10 @@ import {
611
605
  import {
612
606
  pkg_default
613
607
  } from "./chunks/chunk-P4QNYOFB.js";
608
+ import {
609
+ fetch as fetch2,
610
+ toNodeReadable
611
+ } from "./chunks/chunk-2RVK3DDN.js";
614
612
  import {
615
613
  emoji,
616
614
  eraseLines,
@@ -619,6 +617,9 @@ import {
619
617
  prependEmoji,
620
618
  require_dist
621
619
  } from "./chunks/chunk-Z5SBJH6L.js";
620
+ import {
621
+ require_ms
622
+ } from "./chunks/chunk-GGP5R3FU.js";
622
623
  import {
623
624
  require_source
624
625
  } from "./chunks/chunk-S7KYDPEM.js";
@@ -900,7 +901,7 @@ async function activity(client) {
900
901
  return 0;
901
902
  }
902
903
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
903
- const listFn = (await import("./chunks/list-6RAHTDT2.js")).default;
904
+ const listFn = (await import("./chunks/list-WZ32GBPG.js")).default;
904
905
  return listFn(client, telemetry2);
905
906
  }
906
907
  }
@@ -2003,17 +2004,17 @@ async function alerts(client) {
2003
2004
  switch (subcommand) {
2004
2005
  case "inspect": {
2005
2006
  telemetry2.trackCliSubcommandInspect(subcommandOriginal);
2006
- const inspectFn = (await import("./chunks/inspect-FHB3H3NA.js")).default;
2007
+ const inspectFn = (await import("./chunks/inspect-B7I5BKQS.js")).default;
2007
2008
  return inspectFn(client, args);
2008
2009
  }
2009
2010
  case "rules": {
2010
2011
  telemetry2.trackCliSubcommandRules(args[0] ?? "ls");
2011
- const rulesFn = (await import("./chunks/rules-6672IXZE.js")).default;
2012
+ const rulesFn = (await import("./chunks/rules-EMK5FIZX.js")).default;
2012
2013
  return rulesFn(client, args);
2013
2014
  }
2014
2015
  default: {
2015
2016
  telemetry2.trackCliSubcommandLs(subcommandOriginal);
2016
- const listFn = (await import("./chunks/list-QYUCZR26.js")).default;
2017
+ const listFn = (await import("./chunks/list-B57MANV4.js")).default;
2017
2018
  return listFn(client, telemetry2);
2018
2019
  }
2019
2020
  }
@@ -26164,11 +26165,56 @@ var import_ms13 = __toESM(require_ms(), 1);
26164
26165
  var import_pluralize8 = __toESM(require_pluralize(), 1);
26165
26166
 
26166
26167
  // src/util/flags/get-flags.ts
26167
- async function getFlags(client, projectId, state = "active") {
26168
+ var MAX_FLAGS_PAGE_LIMIT = 100;
26169
+ async function getFlags(client, projectId, options = {}) {
26170
+ const {
26171
+ state = "active",
26172
+ tags,
26173
+ createdBy,
26174
+ maintainerIds,
26175
+ limit,
26176
+ cursor
26177
+ } = options;
26168
26178
  output_manager_default.debug(`Fetching feature flags for project ${projectId}`);
26169
- const url = `/v1/projects/${encodeURIComponent(projectId)}/feature-flags/flags?state=${state}`;
26170
- const response = await client.fetch(url);
26171
- return response.data;
26179
+ const basePath = `/v2/projects/${encodeURIComponent(projectId)}/feature-flags/flags`;
26180
+ const buildQuery = (pageLimit, pageCursor2) => {
26181
+ const query = new URLSearchParams();
26182
+ query.set("state", state);
26183
+ query.set("limit", String(pageLimit));
26184
+ if (pageCursor2) {
26185
+ query.set("cursor", pageCursor2);
26186
+ }
26187
+ if (createdBy) {
26188
+ query.set("createdBy", createdBy);
26189
+ }
26190
+ for (const tag of tags ?? []) {
26191
+ query.append("tags", tag);
26192
+ }
26193
+ for (const maintainerId of maintainerIds ?? []) {
26194
+ query.append("maintainerIds", maintainerId);
26195
+ }
26196
+ return query.toString();
26197
+ };
26198
+ if (limit !== void 0 || cursor !== void 0) {
26199
+ const pageLimit = Math.min(
26200
+ limit ?? MAX_FLAGS_PAGE_LIMIT,
26201
+ MAX_FLAGS_PAGE_LIMIT
26202
+ );
26203
+ const response = await client.fetch(
26204
+ `${basePath}?${buildQuery(pageLimit, cursor)}`
26205
+ );
26206
+ return { flags: response.data, next: response.pagination?.next ?? null };
26207
+ }
26208
+ const flags = [];
26209
+ let pageCursor;
26210
+ do {
26211
+ const response = await client.fetch(
26212
+ `${basePath}?${buildQuery(MAX_FLAGS_PAGE_LIMIT, pageCursor)}`
26213
+ );
26214
+ flags.push(...response.data);
26215
+ pageCursor = response.pagination?.next ?? void 0;
26216
+ } while (pageCursor);
26217
+ return { flags, next: null };
26172
26218
  }
26173
26219
  async function getFlag(client, projectId, flagIdOrSlug) {
26174
26220
  output_manager_default.debug(
@@ -26200,6 +26246,46 @@ var FlagsLsTelemetryClient = class extends TelemetryClient {
26200
26246
  this.trackCliFlag("json");
26201
26247
  }
26202
26248
  }
26249
+ trackCliOptionTag(tags) {
26250
+ if (tags && tags.length > 0) {
26251
+ this.trackCliOption({
26252
+ option: "tag",
26253
+ value: this.redactedValue
26254
+ });
26255
+ }
26256
+ }
26257
+ trackCliOptionCreatedBy(createdBy) {
26258
+ if (createdBy) {
26259
+ this.trackCliOption({
26260
+ option: "created-by",
26261
+ value: this.redactedValue
26262
+ });
26263
+ }
26264
+ }
26265
+ trackCliOptionMaintainerId(maintainerIds) {
26266
+ if (maintainerIds && maintainerIds.length > 0) {
26267
+ this.trackCliOption({
26268
+ option: "maintainer-id",
26269
+ value: this.redactedValue
26270
+ });
26271
+ }
26272
+ }
26273
+ trackCliOptionLimit(limit) {
26274
+ if (limit !== void 0) {
26275
+ this.trackCliOption({
26276
+ option: "limit",
26277
+ value: String(limit)
26278
+ });
26279
+ }
26280
+ }
26281
+ trackCliOptionNext(next) {
26282
+ if (next) {
26283
+ this.trackCliOption({
26284
+ option: "next",
26285
+ value: this.redactedValue
26286
+ });
26287
+ }
26288
+ }
26203
26289
  };
26204
26290
 
26205
26291
  // src/commands/flags/ls.ts
@@ -26219,9 +26305,25 @@ async function ls7(client, argv) {
26219
26305
  }
26220
26306
  const { flags } = parsedArgs;
26221
26307
  const state = flags["--state"] || "active";
26308
+ const tags = flags["--tag"];
26309
+ const createdBy = flags["--created-by"];
26310
+ const maintainerIds = flags["--maintainer-id"];
26311
+ const limit = flags["--limit"];
26312
+ const next = flags["--next"];
26222
26313
  const json = flags["--json"];
26223
26314
  telemetryClient.trackCliOptionState(state);
26315
+ telemetryClient.trackCliOptionTag(tags);
26316
+ telemetryClient.trackCliOptionCreatedBy(createdBy);
26317
+ telemetryClient.trackCliOptionMaintainerId(maintainerIds);
26318
+ telemetryClient.trackCliOptionLimit(limit);
26319
+ telemetryClient.trackCliOptionNext(next);
26224
26320
  telemetryClient.trackCliFlagJson(json);
26321
+ if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1 || limit > MAX_FLAGS_PAGE_LIMIT)) {
26322
+ output_manager_default.error(
26323
+ `The --limit option must be an integer between 1 and ${MAX_FLAGS_PAGE_LIMIT}.`
26324
+ );
26325
+ return 1;
26326
+ }
26225
26327
  const link = await getLinkedProject(client);
26226
26328
  if (link.status === "error") {
26227
26329
  return link.exitCode;
@@ -26237,11 +26339,21 @@ async function ls7(client, argv) {
26237
26339
  const lsStamp = stamp_default();
26238
26340
  output_manager_default.spinner(`Fetching ${state} feature flags for ${projectSlugLink}`);
26239
26341
  try {
26240
- const flagsList = await getFlags(client, project.id, state);
26342
+ const { flags: flagsList, next: nextCursor } = await getFlags(
26343
+ client,
26344
+ project.id,
26345
+ {
26346
+ state,
26347
+ tags,
26348
+ createdBy,
26349
+ maintainerIds,
26350
+ limit,
26351
+ cursor: next
26352
+ }
26353
+ );
26241
26354
  output_manager_default.stopSpinner();
26242
- const sortedFlags = flagsList.sort((a, b) => b.updatedAt - a.updatedAt);
26243
26355
  if (json) {
26244
- outputJson3(client, sortedFlags);
26356
+ outputJson3(client, flagsList, nextCursor);
26245
26357
  } else if (flagsList.length === 0) {
26246
26358
  output_manager_default.log(
26247
26359
  `No ${state} feature flags found for ${projectSlugLink} ${import_chalk103.default.gray(lsStamp())}`
@@ -26250,7 +26362,16 @@ async function ls7(client, argv) {
26250
26362
  output_manager_default.log(
26251
26363
  `${(0, import_pluralize8.default)("feature flag", flagsList.length, true)} found for ${projectSlugLink} ${import_chalk103.default.gray(lsStamp())}`
26252
26364
  );
26253
- printFlagsTable(sortedFlags);
26365
+ printFlagsTable(flagsList);
26366
+ if (nextCursor) {
26367
+ const nextCmd = buildNextPageCommand(
26368
+ flags,
26369
+ tags,
26370
+ maintainerIds,
26371
+ nextCursor
26372
+ );
26373
+ output_manager_default.log(`To display the next page, run ${getCommandName(nextCmd)}`);
26374
+ }
26254
26375
  }
26255
26376
  } catch (err) {
26256
26377
  output_manager_default.stopSpinner();
@@ -26259,7 +26380,28 @@ async function ls7(client, argv) {
26259
26380
  }
26260
26381
  return 0;
26261
26382
  }
26262
- function outputJson3(client, flags) {
26383
+ function buildNextPageCommand(flags, tags, maintainerIds, nextCursor) {
26384
+ const baseFlags = getCommandFlags(flags, [
26385
+ "_",
26386
+ "--tag",
26387
+ "--maintainer-id",
26388
+ "--next",
26389
+ "--json"
26390
+ ]);
26391
+ const repeatable = [
26392
+ ...(tags ?? []).map((tag) => `--tag ${quoteArg(tag)}`),
26393
+ ...(maintainerIds ?? []).map((id) => `--maintainer-id ${quoteArg(id)}`)
26394
+ ];
26395
+ const suffix = repeatable.length > 0 ? ` ${repeatable.join(" ")}` : "";
26396
+ return `flags ls${baseFlags}${suffix} --next ${nextCursor}`;
26397
+ }
26398
+ function quoteArg(value) {
26399
+ if (/^[A-Za-z0-9_./@:-]+$/.test(value)) {
26400
+ return value;
26401
+ }
26402
+ return `'${value.replace(/'/g, `'\\''`)}'`;
26403
+ }
26404
+ function outputJson3(client, flags, next) {
26263
26405
  const jsonOutput = {
26264
26406
  flags: flags.map((flag) => ({
26265
26407
  id: flag.id,
@@ -26270,7 +26412,8 @@ function outputJson3(client, flags) {
26270
26412
  variants: flag.variants,
26271
26413
  createdAt: flag.createdAt,
26272
26414
  updatedAt: flag.updatedAt
26273
- }))
26415
+ })),
26416
+ pagination: { next }
26274
26417
  };
26275
26418
  client.stdout.write(`${JSON.stringify(jsonOutput, null, 2)}
26276
26419
  `);
@@ -32967,10 +33110,11 @@ async function extractExample(client, name, dir, force, ver = "v2") {
32967
33110
  }
32968
33111
  await new Promise((resolve9, reject) => {
32969
33112
  const extractor = import_tar_fs.default.extract(folder);
32970
- res.body.on("error", reject);
33113
+ const body = toNodeReadable(res.body);
33114
+ body.on("error", reject);
32971
33115
  extractor.on("error", reject);
32972
33116
  extractor.on("finish", resolve9);
32973
- res.body.pipe(extractor);
33117
+ body.pipe(extractor);
32974
33118
  });
32975
33119
  const successLog = `Initialized "${import_chalk131.default.bold(
32976
33120
  name
@@ -34304,7 +34448,7 @@ async function claim(client, argv) {
34304
34448
  telemetry2.trackCliFlagNoWait(noWait);
34305
34449
  if (parsedArguments.args.length > 1) {
34306
34450
  output_manager_default.error(
34307
- "Too many arguments. Usage: `vercel integration-resource claim [name]`."
34451
+ "Too many arguments. Usage: `vercel integration resource claim [name]`."
34308
34452
  );
34309
34453
  return 1;
34310
34454
  }
@@ -35509,24 +35653,24 @@ Re-run with --installation-id to select one, e.g.:
35509
35653
  });
35510
35654
  } else {
35511
35655
  output_manager_default.warn(
35512
- `Could not locate the newly provisioned resource. Run \`${packageName} integration-resource claim ${resourceName}\` to claim it.`
35656
+ `Could not locate the newly provisioned resource. Run \`${packageName} integration resource claim ${resourceName}\` to claim it.`
35513
35657
  );
35514
35658
  }
35515
35659
  } catch (error) {
35516
35660
  output_manager_default.warn(
35517
- `Failed to start claim flow: ${error.message}. Run \`${packageName} integration-resource claim ${resourceName}\` to retry.`
35661
+ `Failed to start claim flow: ${error.message}. Run \`${packageName} integration resource claim ${resourceName}\` to retry.`
35518
35662
  );
35519
35663
  }
35520
35664
  }
35521
35665
  } else {
35522
35666
  output_manager_default.log(
35523
- `Sandbox resource \u2014 claim it with: ${import_chalk138.default.cyan(`vercel integration-resource claim ${resourceName}`)}`
35667
+ `Sandbox resource \u2014 claim it with: ${import_chalk138.default.cyan(`vercel integration resource claim ${resourceName}`)}`
35524
35668
  );
35525
35669
  }
35526
35670
  } else if (isSandbox && options.noClaim) {
35527
35671
  telemetry2.trackCliFlagNoClaim(options.noClaim);
35528
35672
  output_manager_default.log(
35529
- `Sandbox resource \u2014 claim it later with: ${import_chalk138.default.cyan(`vercel integration-resource claim ${resourceName}`)}`
35673
+ `Sandbox resource \u2014 claim it later with: ${import_chalk138.default.cyan(`vercel integration resource claim ${resourceName}`)}`
35530
35674
  );
35531
35675
  }
35532
35676
  const guideSlug = integration.products.length > 1 ? `${integration.slug}/${product.slug}` : integration.slug;
@@ -37371,12 +37515,12 @@ async function remove5(client, argv) {
37371
37515
  status: "error",
37372
37516
  reason: AGENT_REASON.MISSING_ARGUMENTS,
37373
37517
  message,
37374
- hint: `Put global flags first, then \`integration-resource remove <resource> --yes\`. Use \`--disconnect-all\` to detach projects before delete.`,
37518
+ hint: `Put global flags first, then \`integration resource remove <resource> --yes\`. Use \`--disconnect-all\` to detach projects before delete.`,
37375
37519
  next: [
37376
37520
  {
37377
37521
  command: buildCommandWithGlobalFlags(
37378
37522
  client.argv,
37379
- "integration-resource remove <resource> --yes",
37523
+ "integration resource remove <resource> --yes",
37380
37524
  packageName,
37381
37525
  suggestRemoveOpts
37382
37526
  ),
@@ -37398,12 +37542,12 @@ async function remove5(client, argv) {
37398
37542
  status: "error",
37399
37543
  reason: AGENT_REASON.INVALID_ARGUMENTS,
37400
37544
  message,
37401
- hint: `One resource per invocation: \`${packageName} [global flags] integration-resource remove <resource> [--disconnect-all] --yes\`.`,
37545
+ hint: `One resource per invocation: \`${packageName} [global flags] integration resource remove <resource> [--disconnect-all] --yes\`.`,
37402
37546
  next: [
37403
37547
  {
37404
37548
  command: buildCommandWithGlobalFlags(
37405
37549
  client.argv,
37406
- "integration-resource remove <resource> --disconnect-all --yes",
37550
+ "integration resource remove <resource> --disconnect-all --yes",
37407
37551
  packageName,
37408
37552
  suggestRemoveOpts
37409
37553
  ),
@@ -37785,7 +37929,7 @@ ${table(
37785
37929
  const noun = sandboxCount === 1 ? "resource" : "resources";
37786
37930
  output_manager_default.log(`${sandboxCount} sandbox ${noun} can be claimed.`);
37787
37931
  output_manager_default.print(
37788
- ` Run \`${packageName} integration-resource claim <name>\` to claim one.
37932
+ ` Run \`${packageName} integration resource claim <name>\` to claim one.
37789
37933
  `
37790
37934
  );
37791
37935
  }
@@ -38161,12 +38305,12 @@ async function remove6(client, argv) {
38161
38305
  error: "has_resources",
38162
38306
  message: `Cannot uninstall ${integrationName} because it still has resources.`,
38163
38307
  resources: resourceNames,
38164
- hint: client.isAgent ? `${approvalHint} Agents must obtain explicit user approval before running integration-resource remove.` : approvalHint,
38308
+ hint: client.isAgent ? `${approvalHint} Agents must obtain explicit user approval before running integration resource remove.` : approvalHint,
38165
38309
  userActionRequired: client.isAgent ? true : void 0,
38166
38310
  next: resourceNames.map((name) => ({
38167
38311
  command: buildCommandWithGlobalFlags(
38168
38312
  client.argv,
38169
- `integration-resource remove ${name} ${resourceTail}`,
38313
+ `integration resource remove ${name} ${resourceTail}`,
38170
38314
  packageName,
38171
38315
  suggestNextOpts
38172
38316
  ),
@@ -38200,7 +38344,7 @@ async function remove6(client, argv) {
38200
38344
  );
38201
38345
  }
38202
38346
  output_manager_default.log(
38203
- `Remove and disconnect all resources first with: ${import_chalk149.default.cyan(`${packageName} integration-resource remove <resource-name> --disconnect-all`)}`
38347
+ `Remove and disconnect all resources first with: ${import_chalk149.default.cyan(`${packageName} integration resource remove <resource-name> --disconnect-all`)}`
38204
38348
  );
38205
38349
  output_manager_default.log(
38206
38350
  `Then retry: ${import_chalk149.default.cyan(`${packageName} integration remove ${integrationName}`)}`
@@ -41407,7 +41551,7 @@ async function metrics(client) {
41407
41551
  return 0;
41408
41552
  }
41409
41553
  telemetry2.trackCliSubcommandSchema(subcommandOriginal);
41410
- const schemaFn = (await import("./chunks/schema-DC2LLUHD.js")).default;
41554
+ const schemaFn = (await import("./chunks/schema-AHANZBO4.js")).default;
41411
41555
  return schemaFn(client, telemetry2);
41412
41556
  }
41413
41557
  default: {
@@ -41420,7 +41564,7 @@ async function metrics(client) {
41420
41564
  output_manager_default.print(help(metricsCommand, { columns: client.stderr.columns }));
41421
41565
  return 2;
41422
41566
  }
41423
- const queryFn = (await import("./chunks/query-NM7MXRFW.js")).default;
41567
+ const queryFn = (await import("./chunks/query-QEMQUYOA.js")).default;
41424
41568
  return queryFn(client, telemetry2);
41425
41569
  }
41426
41570
  }
@@ -47552,7 +47696,6 @@ async function add10(client, argv) {
47552
47696
  var import_chalk183 = __toESM(require_source(), 1);
47553
47697
  import { readFileSync as readFileSync4 } from "fs";
47554
47698
  import { basename as basename2 } from "path";
47555
- import FormData from "form-data";
47556
47699
 
47557
47700
  // src/commands/redirects/validate-redirects.ts
47558
47701
  import { statSync as statSync2 } from "fs";
@@ -47798,13 +47941,13 @@ async function upload(client, argv) {
47798
47941
  if (versionName) {
47799
47942
  form.append("name", versionName);
47800
47943
  }
47801
- form.append("bulkRedirectsFile", csvContent, {
47802
- filename: fileName,
47803
- contentType: "text/csv"
47804
- });
47944
+ form.append(
47945
+ "bulkRedirectsFile",
47946
+ new Blob([new Uint8Array(csvContent)], { type: "text/csv" }),
47947
+ fileName
47948
+ );
47805
47949
  result = await client.fetch(url, {
47806
47950
  method: "PUT",
47807
- headers: form.getHeaders(),
47808
47951
  body: form
47809
47952
  });
47810
47953
  } else {
@@ -52331,7 +52474,7 @@ async function main27(client) {
52331
52474
  return 2;
52332
52475
  }
52333
52476
  telemetry2.trackCliSubcommandEdit(subcommandOriginal);
52334
- return (await import("./chunks/edit-QV3Y6IUT.js")).default(client, args);
52477
+ return (await import("./chunks/edit-Y53X26NZ.js")).default(client, args);
52335
52478
  case "delete":
52336
52479
  if (needHelp) {
52337
52480
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52339,7 +52482,7 @@ async function main27(client) {
52339
52482
  return 2;
52340
52483
  }
52341
52484
  telemetry2.trackCliSubcommandDelete(subcommandOriginal);
52342
- return (await import("./chunks/delete-RQYOSBNO.js")).default(client, args);
52485
+ return (await import("./chunks/delete-EWHQTXBW.js")).default(client, args);
52343
52486
  case "enable":
52344
52487
  if (needHelp) {
52345
52488
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52347,7 +52490,7 @@ async function main27(client) {
52347
52490
  return 2;
52348
52491
  }
52349
52492
  telemetry2.trackCliSubcommandEnable(subcommandOriginal);
52350
- return (await import("./chunks/enable-UQAJJKCG.js")).default(client, args);
52493
+ return (await import("./chunks/enable-M5RHORDQ.js")).default(client, args);
52351
52494
  case "disable":
52352
52495
  if (needHelp) {
52353
52496
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52355,7 +52498,7 @@ async function main27(client) {
52355
52498
  return 2;
52356
52499
  }
52357
52500
  telemetry2.trackCliSubcommandDisable(subcommandOriginal);
52358
- return (await import("./chunks/disable-RRGOZIA7.js")).default(client, args);
52501
+ return (await import("./chunks/disable-D6PWS73S.js")).default(client, args);
52359
52502
  case "reorder":
52360
52503
  if (needHelp) {
52361
52504
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52363,7 +52506,7 @@ async function main27(client) {
52363
52506
  return 2;
52364
52507
  }
52365
52508
  telemetry2.trackCliSubcommandReorder(subcommandOriginal);
52366
- return (await import("./chunks/reorder-ZLVQQBMG.js")).default(client, args);
52509
+ return (await import("./chunks/reorder-E37TLOBH.js")).default(client, args);
52367
52510
  case "export":
52368
52511
  if (needHelp) {
52369
52512
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52371,7 +52514,7 @@ async function main27(client) {
52371
52514
  return 2;
52372
52515
  }
52373
52516
  telemetry2.trackCliSubcommandExport(subcommandOriginal);
52374
- return (await import("./chunks/export-D4YNS2G5.js")).default(client, args);
52517
+ return (await import("./chunks/export-2DR3UQFV.js")).default(client, args);
52375
52518
  case "publish":
52376
52519
  if (needHelp) {
52377
52520
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52379,7 +52522,7 @@ async function main27(client) {
52379
52522
  return 2;
52380
52523
  }
52381
52524
  telemetry2.trackCliSubcommandPublish(subcommandOriginal);
52382
- return (await import("./chunks/publish-UTKKRA4P.js")).default(client, args);
52525
+ return (await import("./chunks/publish-5RPU7CGQ.js")).default(client, args);
52383
52526
  case "restore":
52384
52527
  if (needHelp) {
52385
52528
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52387,7 +52530,7 @@ async function main27(client) {
52387
52530
  return 2;
52388
52531
  }
52389
52532
  telemetry2.trackCliSubcommandRestore(subcommandOriginal);
52390
- return (await import("./chunks/restore-SDTDA4A6.js")).default(client, args);
52533
+ return (await import("./chunks/restore-HBKARSXS.js")).default(client, args);
52391
52534
  case "discard-staging":
52392
52535
  if (needHelp) {
52393
52536
  telemetry2.trackCliFlagHelp("routes", subcommandOriginal);
@@ -52395,7 +52538,7 @@ async function main27(client) {
52395
52538
  return 2;
52396
52539
  }
52397
52540
  telemetry2.trackCliSubcommandDiscardStaging(subcommandOriginal);
52398
- return (await import("./chunks/discard-X2NIGII5.js")).default(client, args);
52541
+ return (await import("./chunks/discard-RCWQO5OM.js")).default(client, args);
52399
52542
  default:
52400
52543
  output_manager_default.error(getInvalidSubcommand(COMMAND_CONFIG37));
52401
52544
  output_manager_default.print(help(routesCommand, { columns: client.stderr.columns }));
@@ -55136,12 +55279,11 @@ async function disable5(client) {
55136
55279
  }
55137
55280
 
55138
55281
  // src/commands/telemetry/flush.ts
55139
- var import_node_fetch = __toESM(require_lib3(), 1);
55140
55282
  async function flush(_client, args) {
55141
55283
  const url = process.env.VERCEL_TELEMETRY_BRIDGE_URL || "https://telemetry.vercel.com/api/vercel-cli/v1/events";
55142
55284
  const { headers, body } = JSON.parse(args[0]);
55143
55285
  try {
55144
- const res = await (0, import_node_fetch.default)(url, {
55286
+ const res = await fetch2(url, {
55145
55287
  method: "POST",
55146
55288
  headers,
55147
55289
  body: JSON.stringify(body)
@@ -56693,7 +56835,8 @@ async function processCharges(response, breakdownPeriod, groupByDimension, conte
56693
56835
  let chargeCount = 0;
56694
56836
  let pricingUnit = "MIUs";
56695
56837
  await new Promise((resolve9, reject) => {
56696
- const stream = response.body.pipe(import_jsonlines.default.parse());
56838
+ const readable = toNodeReadable(response.body);
56839
+ const stream = readable.pipe(import_jsonlines.default.parse());
56697
56840
  stream.on("data", (charge) => {
56698
56841
  chargeCount++;
56699
56842
  if (chargeCount === 1 && charge.PricingUnit) {
@@ -56778,7 +56921,7 @@ async function processCharges(response, breakdownPeriod, groupByDimension, conte
56778
56921
  });
56779
56922
  stream.on("end", resolve9);
56780
56923
  stream.on("error", reject);
56781
- response.body.on("error", reject);
56924
+ readable.on("error", reject);
56782
56925
  });
56783
56926
  return {
56784
56927
  contextName,