vercel 54.21.0 → 55.0.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 (84) hide show
  1. package/dist/chunks/{add-KZSG7SVG.js → add-BQGGX36J.js} +8 -8
  2. package/dist/chunks/{add-UDJ45UVF.js → add-YRFK663I.js} +7 -7
  3. package/dist/chunks/{chunk-OGJB2GHI.js → chunk-22GUZ5KG.js} +1 -1
  4. package/dist/chunks/{chunk-DDS5Z2MB.js → chunk-2QBF3ZL3.js} +1 -0
  5. package/dist/chunks/{chunk-KGPSD6TA.js → chunk-2XTV2FM7.js} +100 -36
  6. package/dist/chunks/{chunk-ULKM3ZD4.js → chunk-4RGSUV5C.js} +2 -2
  7. package/dist/chunks/{chunk-UJ5UEAMC.js → chunk-5AJNUXWP.js} +1 -1
  8. package/dist/chunks/{chunk-KXGWAWRV.js → chunk-5OT26JZN.js} +35 -3
  9. package/dist/chunks/{chunk-JAUGUJR3.js → chunk-6CRRXESK.js} +1 -1
  10. package/dist/chunks/{chunk-RY3AVR6E.js → chunk-7C7MMT4J.js} +1 -1
  11. package/dist/chunks/chunk-7PZWVZN6.js +105 -0
  12. package/dist/chunks/{chunk-D2M77YVC.js → chunk-7S3QUMIG.js} +2 -2
  13. package/dist/chunks/{chunk-TYXSXFVM.js → chunk-A5QK4X3Z.js} +6 -6
  14. package/dist/chunks/{chunk-6SVPJXCO.js → chunk-AA3E7OLF.js} +30 -3
  15. package/dist/chunks/{chunk-VFXF4O4X.js → chunk-AW6V5LOC.js} +3 -3
  16. package/dist/chunks/{chunk-I3HGCZ4E.js → chunk-CMJMYVQM.js} +1 -0
  17. package/dist/chunks/{chunk-SCQAJO6E.js → chunk-D43MOSMZ.js} +425 -22
  18. package/dist/chunks/{chunk-EJ6GQI6F.js → chunk-EHTPDXTS.js} +1 -0
  19. package/dist/chunks/{chunk-JIX2UI23.js → chunk-EJV2KFOF.js} +3 -3
  20. package/dist/chunks/{chunk-FCYCUCLI.js → chunk-EUARKVCA.js} +83 -20
  21. package/dist/chunks/{chunk-HAZXLIKZ.js → chunk-GVZKC6PS.js} +1 -1
  22. package/dist/chunks/{chunk-FNRZFHFO.js → chunk-HA7C7SDO.js} +3 -1
  23. package/dist/chunks/{chunk-KS5FONWU.js → chunk-HOYOJUQZ.js} +70 -17
  24. package/dist/chunks/{chunk-DFEUWDGM.js → chunk-IDMKFYEA.js} +1 -1
  25. package/dist/chunks/{chunk-S2N7BLSM.js → chunk-IIUE7CDZ.js} +2 -2
  26. package/dist/chunks/{chunk-MAJWH2PD.js → chunk-JJWESW5Y.js} +1 -1
  27. package/dist/chunks/{chunk-DBA4N3OZ.js → chunk-LHY5EFII.js} +2 -2
  28. package/dist/chunks/{chunk-BEETD7P4.js → chunk-MGUQN3V3.js} +3 -3
  29. package/dist/chunks/{chunk-LVR7QUSG.js → chunk-OCEM4YAQ.js} +1 -1
  30. package/dist/chunks/{chunk-UDIFOPZL.js → chunk-OKWMOW2F.js} +354 -404
  31. package/dist/chunks/{chunk-VKBYAWTL.js → chunk-QEEGXNFK.js} +1 -1
  32. package/dist/chunks/{chunk-EFUR47FZ.js → chunk-QKR7GNAK.js} +1 -1
  33. package/dist/chunks/{chunk-YSIZGIDP.js → chunk-QY63UKTP.js} +2 -2
  34. package/dist/chunks/{chunk-AUECDTMX.js → chunk-RLJA2KI7.js} +1 -1
  35. package/dist/chunks/{chunk-DJ4JEVDI.js → chunk-SENGDDFO.js} +1 -1
  36. package/dist/chunks/{chunk-VDTSYCXY.js → chunk-VTA3KZUX.js} +3 -3
  37. package/dist/chunks/chunk-WGGABYO5.js +31 -0
  38. package/dist/chunks/{chunk-6W7I5IOO.js → chunk-X36ADWA5.js} +51 -9
  39. package/dist/chunks/{chunk-IR674PKY.js → chunk-XHC5YRFY.js} +451 -274
  40. package/dist/chunks/{chunk-BLWPQEED.js → chunk-ZQEZYHPJ.js} +8 -6
  41. package/dist/chunks/{compile-vercel-config-DY63NSZV.js → compile-vercel-config-3RYUGKGU.js} +3 -3
  42. package/dist/chunks/{delete-WVLC7FLA.js → delete-UQKVMHVV.js} +5 -5
  43. package/dist/chunks/{disable-VLYKCAM5.js → disable-GUK4VHQY.js} +5 -5
  44. package/dist/chunks/{discard-GGNJLKTH.js → discard-DTI36R2T.js} +5 -5
  45. package/dist/chunks/{edit-ZU5K7DM3.js → edit-ED4LM54G.js} +6 -6
  46. package/dist/chunks/{enable-G3MUGP3W.js → enable-RAWDG7GZ.js} +5 -5
  47. package/dist/chunks/{exec-UKMIYIF6.js → exec-G4AUF3KG.js} +4 -90
  48. package/dist/chunks/{export-QHSB2FON.js → export-U6OBSYVP.js} +5 -5
  49. package/dist/chunks/{image-CWHCW3N5.js → image-LIJI6QJY.js} +4 -4
  50. package/dist/chunks/{inspect-OVAC6PJK.js → inspect-25D5G5FX.js} +11 -11
  51. package/dist/chunks/{inspect-W6RHYESL.js → inspect-3SEYQNWT.js} +11 -11
  52. package/dist/chunks/{inspect-QJSREPM3.js → inspect-7LGTAPH3.js} +7 -7
  53. package/dist/chunks/{inspect-HFCKYQQ3.js → inspect-IQD2ULLP.js} +11 -11
  54. package/dist/chunks/{list-2XYQW3YA.js → list-2IJHE2AC.js} +8 -8
  55. package/dist/chunks/{list-R37YS5CX.js → list-I25HBKWF.js} +5 -5
  56. package/dist/chunks/login-N4DIZZWE.js +247 -0
  57. package/dist/chunks/{ls-HKVAT223.js → ls-2VXZPNMR.js} +12 -12
  58. package/dist/chunks/{ls-X7Y37IPT.js → ls-HN3SUOPA.js} +7 -7
  59. package/dist/chunks/{ls-7JNUKRV2.js → ls-S7YPR3OS.js} +11 -11
  60. package/dist/chunks/{ls-JJXUYZU7.js → ls-TFOKQKY3.js} +11 -11
  61. package/dist/chunks/{publish-MYVZ4UTW.js → publish-ZTGB4XE2.js} +5 -5
  62. package/dist/chunks/{query-ZH2YJPAC.js → query-2UK5BV4B.js} +6 -6
  63. package/dist/chunks/{reorder-VY53EYZJ.js → reorder-FM755TJK.js} +5 -5
  64. package/dist/chunks/{restore-F2AEG3WO.js → restore-NXQJMPMT.js} +5 -5
  65. package/dist/chunks/{rm-T6Z6WZZN.js → rm-III6VASE.js} +8 -8
  66. package/dist/chunks/{rm-VUL4FHMX.js → rm-MPC5DPOS.js} +7 -7
  67. package/dist/chunks/{rm-IDSOMXQR.js → rm-XJMPAJNP.js} +6 -6
  68. package/dist/chunks/{rule-inspect-ELB7P5YA.js → rule-inspect-BJGXMAO5.js} +7 -7
  69. package/dist/chunks/{rules-XR6U5U7F.js → rules-FSNWMWJH.js} +9 -9
  70. package/dist/chunks/{schema-WKPB25ZF.js → schema-NR6DGYCB.js} +7 -7
  71. package/dist/chunks/{tags-NSWTVGHE.js → tags-RVHMONZN.js} +3 -3
  72. package/dist/chunks/{types-EQD5UZOH.js → types-2TPA6J4G.js} +3 -3
  73. package/dist/chunks/{update-H4Q24DK4.js → update-55OM2454.js} +7 -7
  74. package/dist/commands/build/index.js +51 -13
  75. package/dist/commands/deploy/index.js +33 -55
  76. package/dist/commands/dev/index.js +205 -62
  77. package/dist/commands/env/index.js +19 -19
  78. package/dist/commands/link/index.js +42 -25
  79. package/dist/commands/list/index.js +29 -14
  80. package/dist/commands-bulk.js +3869 -2022
  81. package/dist/index.js +24 -24
  82. package/dist/version.mjs +1 -1
  83. package/package.json +21 -21
  84. package/dist/chunks/chunk-Y4JJYHUG.js +0 -16
@@ -9,7 +9,7 @@ import {
9
9
  getPreservedArgsForEnvPull,
10
10
  outputActionRequired,
11
11
  outputAgentError
12
- } from "./chunk-DDS5Z2MB.js";
12
+ } from "./chunk-2QBF3ZL3.js";
13
13
  import {
14
14
  TelemetryClient,
15
15
  require_dist as require_dist2,
@@ -24,7 +24,7 @@ import {
24
24
  require_string_width,
25
25
  require_strip_ansi,
26
26
  yesOption
27
- } from "./chunk-EJ6GQI6F.js";
27
+ } from "./chunk-EHTPDXTS.js";
28
28
  import {
29
29
  APIError,
30
30
  CantParseJSONFile,
@@ -8431,14 +8431,14 @@ var require_templates = __commonJS({
8431
8431
  }
8432
8432
  return results;
8433
8433
  }
8434
- function buildStyle(chalk14, styles) {
8434
+ function buildStyle(chalk15, styles) {
8435
8435
  const enabled = {};
8436
8436
  for (const layer of styles) {
8437
8437
  for (const style of layer.styles) {
8438
8438
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
8439
8439
  }
8440
8440
  }
8441
- let current = chalk14;
8441
+ let current = chalk15;
8442
8442
  for (const [styleName, styles2] of Object.entries(enabled)) {
8443
8443
  if (!Array.isArray(styles2)) {
8444
8444
  continue;
@@ -8450,7 +8450,7 @@ var require_templates = __commonJS({
8450
8450
  }
8451
8451
  return current;
8452
8452
  }
8453
- module.exports = (chalk14, temporary) => {
8453
+ module.exports = (chalk15, temporary) => {
8454
8454
  const styles = [];
8455
8455
  const chunks = [];
8456
8456
  let chunk = [];
@@ -8460,13 +8460,13 @@ var require_templates = __commonJS({
8460
8460
  } else if (style) {
8461
8461
  const string = chunk.join("");
8462
8462
  chunk = [];
8463
- chunks.push(styles.length === 0 ? string : buildStyle(chalk14, styles)(string));
8463
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk15, styles)(string));
8464
8464
  styles.push({ inverse, styles: parseStyle(style) });
8465
8465
  } else if (close) {
8466
8466
  if (styles.length === 0) {
8467
8467
  throw new Error("Found extraneous } in Chalk template literal");
8468
8468
  }
8469
- chunks.push(buildStyle(chalk14, styles)(chunk.join("")));
8469
+ chunks.push(buildStyle(chalk15, styles)(chunk.join("")));
8470
8470
  chunk = [];
8471
8471
  styles.pop();
8472
8472
  } else {
@@ -8514,16 +8514,16 @@ var require_source2 = __commonJS({
8514
8514
  }
8515
8515
  };
8516
8516
  var chalkFactory = (options) => {
8517
- const chalk15 = {};
8518
- applyOptions(chalk15, options);
8519
- chalk15.template = (...arguments_) => chalkTag(chalk15.template, ...arguments_);
8520
- Object.setPrototypeOf(chalk15, Chalk.prototype);
8521
- Object.setPrototypeOf(chalk15.template, chalk15);
8522
- chalk15.template.constructor = () => {
8517
+ const chalk16 = {};
8518
+ applyOptions(chalk16, options);
8519
+ chalk16.template = (...arguments_) => chalkTag(chalk16.template, ...arguments_);
8520
+ Object.setPrototypeOf(chalk16, Chalk.prototype);
8521
+ Object.setPrototypeOf(chalk16.template, chalk16);
8522
+ chalk16.template.constructor = () => {
8523
8523
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
8524
8524
  };
8525
- chalk15.template.Instance = ChalkClass;
8526
- return chalk15.template;
8525
+ chalk16.template.Instance = ChalkClass;
8526
+ return chalk16.template;
8527
8527
  };
8528
8528
  function Chalk(options) {
8529
8529
  return chalkFactory(options);
@@ -8634,7 +8634,7 @@ var require_source2 = __commonJS({
8634
8634
  return openAll + string + closeAll;
8635
8635
  };
8636
8636
  var template;
8637
- var chalkTag = (chalk15, ...strings) => {
8637
+ var chalkTag = (chalk16, ...strings) => {
8638
8638
  const [firstString] = strings;
8639
8639
  if (!isArray(firstString) || !isArray(firstString.raw)) {
8640
8640
  return strings.join(" ");
@@ -8650,14 +8650,14 @@ var require_source2 = __commonJS({
8650
8650
  if (template === void 0) {
8651
8651
  template = require_templates();
8652
8652
  }
8653
- return template(chalk15, parts.join(""));
8653
+ return template(chalk16, parts.join(""));
8654
8654
  };
8655
8655
  Object.defineProperties(Chalk.prototype, styles);
8656
- var chalk14 = Chalk();
8657
- chalk14.supportsColor = stdoutColor;
8658
- chalk14.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8659
- chalk14.stderr.supportsColor = stderrColor;
8660
- module.exports = chalk14;
8656
+ var chalk15 = Chalk();
8657
+ chalk15.supportsColor = stdoutColor;
8658
+ chalk15.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
8659
+ chalk15.stderr.supportsColor = stderrColor;
8660
+ module.exports = chalk15;
8661
8661
  }
8662
8662
  });
8663
8663
 
@@ -15702,6 +15702,52 @@ var require_frameworks = __commonJS({
15702
15702
  },
15703
15703
  getOutputDirName: async () => "dist"
15704
15704
  },
15705
+ {
15706
+ name: "TanStack Start",
15707
+ slug: "tanstack-start-lovable",
15708
+ logo: "https://api-frameworks.vercel.sh/framework-logos/tanstack-start.svg",
15709
+ darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/tanstack-start-dark.svg",
15710
+ platform: {
15711
+ name: "lovable",
15712
+ logo: "https://api-frameworks.vercel.sh/framework-logos/lovable.svg"
15713
+ },
15714
+ tagline: "Full-stack Framework powered by TanStack Router imported from Lovable",
15715
+ description: "Full-document SSR, Streaming, Server Functions, bundling and more, imported from Lovable",
15716
+ website: "https://lovable.dev/",
15717
+ supersedes: ["tanstack-start", "ionic-react", "vite"],
15718
+ detectors: {
15719
+ every: [
15720
+ {
15721
+ matchPackage: "@lovable.dev/vite-tanstack-config"
15722
+ }
15723
+ ],
15724
+ some: [
15725
+ {
15726
+ matchPackage: "@tanstack/react-start"
15727
+ },
15728
+ {
15729
+ matchPackage: "@tanstack/solid-start"
15730
+ }
15731
+ ]
15732
+ },
15733
+ settings: {
15734
+ installCommand: {
15735
+ placeholder: "`yarn install`, `pnpm install`, `npm install`, or `bun install`"
15736
+ },
15737
+ buildCommand: {
15738
+ placeholder: "`npm run build` or `vite build`",
15739
+ value: "vite build"
15740
+ },
15741
+ devCommand: {
15742
+ placeholder: "vite",
15743
+ value: "vite --port $PORT"
15744
+ },
15745
+ outputDirectory: {
15746
+ value: "dist"
15747
+ }
15748
+ },
15749
+ getOutputDirName: async () => "dist"
15750
+ },
15705
15751
  {
15706
15752
  name: "VitePress",
15707
15753
  slug: "vitepress",
@@ -23071,14 +23117,14 @@ var require_utils3 = __commonJS({
23071
23117
  __export2(utils_exports, {
23072
23118
  DETECTION_FRAMEWORKS: () => DETECTION_FRAMEWORKS,
23073
23119
  INTERNAL_QUEUES_PREFIX: () => INTERNAL_QUEUES_PREFIX,
23074
- INTERNAL_SERVICE_PREFIX: () => import_build_utils6.INTERNAL_SERVICE_PREFIX,
23120
+ INTERNAL_SERVICE_PREFIX: () => import_build_utils7.INTERNAL_SERVICE_PREFIX,
23075
23121
  assignMountPaths: () => assignMountPaths,
23076
23122
  combineBuildCommand: () => combineBuildCommand,
23077
23123
  filterFrameworksByRuntime: () => filterFrameworksByRuntime,
23078
23124
  getBuilderForRuntime: () => getBuilderForRuntime,
23079
- getInternalServiceCronPath: () => import_build_utils6.getInternalServiceCronPath,
23080
- getInternalServiceCronPathPrefix: () => import_build_utils6.getInternalServiceCronPathPrefix,
23081
- getInternalServiceFunctionPath: () => import_build_utils6.getInternalServiceFunctionPath,
23125
+ getInternalServiceCronPath: () => import_build_utils7.getInternalServiceCronPath,
23126
+ getInternalServiceCronPathPrefix: () => import_build_utils7.getInternalServiceCronPathPrefix,
23127
+ getInternalServiceFunctionPath: () => import_build_utils7.getInternalServiceFunctionPath,
23082
23128
  getInternalServiceWorkerPath: () => getInternalServiceWorkerPath2,
23083
23129
  getInternalServiceWorkerPathPrefix: () => getInternalServiceWorkerPathPrefix2,
23084
23130
  hasFile: () => hasFile,
@@ -23093,7 +23139,7 @@ var require_utils3 = __commonJS({
23093
23139
  });
23094
23140
  module.exports = __toCommonJS2(utils_exports);
23095
23141
  var import_framework_helpers = __require("@vercel/build-utils/dist/framework-helpers");
23096
- var import_build_utils6 = __require("@vercel/build-utils");
23142
+ var import_build_utils7 = __require("@vercel/build-utils");
23097
23143
  var import_frameworks2 = require_frameworks();
23098
23144
  var import_types = require_types3();
23099
23145
  var DETECTION_FRAMEWORKS = import_frameworks2.frameworkList.filter(
@@ -23116,7 +23162,7 @@ var require_utils3 = __commonJS({
23116
23162
  return normalized || "index";
23117
23163
  }
23118
23164
  function getInternalServiceWorkerPathPrefix2(serviceName) {
23119
- return `${import_build_utils6.INTERNAL_SERVICE_PREFIX}/${serviceName}/workers`;
23165
+ return `${import_build_utils7.INTERNAL_SERVICE_PREFIX}/${serviceName}/workers`;
23120
23166
  }
23121
23167
  function getInternalServiceWorkerPath2(serviceName, entrypoint, handler = "worker") {
23122
23168
  const normalizedEntrypoint = normalizeInternalServiceEntrypoint(entrypoint);
@@ -23567,7 +23613,7 @@ var require_resolve2 = __commonJS({
23567
23613
  });
23568
23614
  module.exports = __toCommonJS2(resolve_exports);
23569
23615
  var import_path12 = __require("path");
23570
- var import_build_utils6 = __require("@vercel/build-utils");
23616
+ var import_build_utils7 = __require("@vercel/build-utils");
23571
23617
  var import_types = require_types3();
23572
23618
  var import_utils4 = require_utils3();
23573
23619
  var import_frameworks2 = require_frameworks();
@@ -23876,8 +23922,8 @@ var require_resolve2 = __commonJS({
23876
23922
  trigger: effectiveTrigger
23877
23923
  };
23878
23924
  const isJobService = serviceType === "job" || serviceType === "cron";
23879
- const isScheduleJobService = (0, import_build_utils6.isScheduleTriggeredService)(effectiveService);
23880
- const isQueueJobService = serviceType === "job" && (0, import_build_utils6.isQueueTriggeredService)(effectiveService);
23925
+ const isScheduleJobService = (0, import_build_utils7.isScheduleTriggeredService)(effectiveService);
23926
+ const isQueueJobService = serviceType === "job" && (0, import_build_utils7.isQueueTriggeredService)(effectiveService);
23881
23927
  const isWorkflowService = serviceType === "job" && effectiveTrigger === "workflow";
23882
23928
  const isNonWebService = serviceType === "worker" || isJobService;
23883
23929
  const serviceTypeLabel = isJobService ? "Job" : serviceType === "worker" ? "Worker" : "Web";
@@ -23931,10 +23977,10 @@ var require_resolve2 = __commonJS({
23931
23977
  serviceName: name
23932
23978
  };
23933
23979
  }
23934
- if (serviceType === "job" && effectiveTrigger && !import_build_utils6.JOB_TRIGGERS.includes(effectiveTrigger)) {
23980
+ if (serviceType === "job" && effectiveTrigger && !import_build_utils7.JOB_TRIGGERS.includes(effectiveTrigger)) {
23935
23981
  return {
23936
23982
  code: "INVALID_JOB_TRIGGER",
23937
- message: `Job service "${name}" has invalid trigger "${effectiveTrigger}". Expected ${import_build_utils6.JOB_TRIGGERS.map((t) => `"${t}"`).join(", ")}.`,
23983
+ message: `Job service "${name}" has invalid trigger "${effectiveTrigger}". Expected ${import_build_utils7.JOB_TRIGGERS.map((t) => `"${t}"`).join(", ")}.`,
23938
23984
  serviceName: name
23939
23985
  };
23940
23986
  }
@@ -24163,7 +24209,7 @@ var require_resolve2 = __commonJS({
24163
24209
  workspace = workspace === "." ? normalizedRoot : import_path12.posix.join(normalizedRoot, workspace);
24164
24210
  }
24165
24211
  }
24166
- const topics = type === "worker" ? (0, import_build_utils6.getServiceQueueTopics)({ type, topics: config.topics }) : trigger === "queue" ? config.topics : trigger === "workflow" ? ["__wkf_*"] : void 0;
24212
+ const topics = type === "worker" ? (0, import_build_utils7.getServiceQueueTopics)({ type, topics: config.topics }) : trigger === "queue" ? config.topics : trigger === "workflow" ? ["__wkf_*"] : void 0;
24167
24213
  let builderUse;
24168
24214
  let builderSrc;
24169
24215
  const frameworkDefinition = config.framework ? frameworksBySlug.get(config.framework) : void 0;
@@ -24171,7 +24217,7 @@ var require_resolve2 = __commonJS({
24171
24217
  builderUse = config.builder;
24172
24218
  builderSrc = resolvedEntrypointFile || frameworkDefinition?.useRuntime?.src || "package.json";
24173
24219
  } else if (config.framework) {
24174
- const isCronService = (0, import_build_utils6.isScheduleTriggeredService)({ type, trigger });
24220
+ const isCronService = (0, import_build_utils7.isScheduleTriggeredService)({ type, trigger });
24175
24221
  if ((0, import_build_utils22.isNodeBackendFramework)(config.framework) && (type === "web" || isCronService)) {
24176
24222
  builderUse = "@vercel/backends";
24177
24223
  } else {
@@ -24185,7 +24231,7 @@ var require_resolve2 = __commonJS({
24185
24231
  );
24186
24232
  }
24187
24233
  if (inferredRuntime === "node") {
24188
- const isCronService = (0, import_build_utils6.isScheduleTriggeredService)({ type, trigger });
24234
+ const isCronService = (0, import_build_utils7.isScheduleTriggeredService)({ type, trigger });
24189
24235
  builderUse = type === "web" || isCronService ? "@vercel/backends" : "@vercel/node";
24190
24236
  } else {
24191
24237
  builderUse = (0, import_utils4.getBuilderForRuntime)(inferredRuntime);
@@ -24469,7 +24515,7 @@ var require_resolve_v2 = __commonJS({
24469
24515
  });
24470
24516
  module.exports = __toCommonJS2(resolve_v2_exports);
24471
24517
  var import_path12 = __require("path");
24472
- var import_build_utils6 = __require("@vercel/build-utils");
24518
+ var import_build_utils7 = __require("@vercel/build-utils");
24473
24519
  var import_frameworks2 = require_frameworks();
24474
24520
  var import_types = require_types3();
24475
24521
  var import_resolve = require_resolve2();
@@ -24673,7 +24719,7 @@ var require_resolve_v2 = __commonJS({
24673
24719
  let framework = config.framework;
24674
24720
  let detectedFramework = false;
24675
24721
  if (!framework) {
24676
- const workspace = normalizedEntrypoint ? entrypointIsDirectory ? normalizedEntrypoint : import_path12.posix.dirname(normalizedEntrypoint) || "." : ".";
24722
+ const workspace = entrypointIsDirectory && normalizedEntrypoint ? normalizedEntrypoint : ".";
24677
24723
  const detection = await (0, import_resolve.detectFrameworkFromWorkspace)({
24678
24724
  fs: serviceFs,
24679
24725
  workspace,
@@ -24714,7 +24760,7 @@ var require_resolve_v2 = __commonJS({
24714
24760
  let builderUse;
24715
24761
  let builderSrc;
24716
24762
  if (framework) {
24717
- builderUse = (0, import_build_utils6.isNodeBackendFramework)(framework) ? "@vercel/backends" : frameworkDefinition?.useRuntime?.use || "@vercel/static-build";
24763
+ builderUse = (0, import_build_utils7.isNodeBackendFramework)(framework) ? "@vercel/backends" : frameworkDefinition?.useRuntime?.use || "@vercel/static-build";
24718
24764
  builderSrc = entrypointFile || frameworkDefinition?.useRuntime?.src || "package.json";
24719
24765
  } else {
24720
24766
  if (!inferredRuntime) {
@@ -28725,7 +28771,7 @@ var require_detect_services = __commonJS({
28725
28771
  generateServicesRoutes: () => generateServicesRoutes2
28726
28772
  });
28727
28773
  module.exports = __toCommonJS2(detect_services_exports);
28728
- var import_build_utils6 = __require("@vercel/build-utils");
28774
+ var import_build_utils7 = __require("@vercel/build-utils");
28729
28775
  var import_routing_utils2 = require_dist5();
28730
28776
  var import_utils4 = require_utils3();
28731
28777
  var import_resolve = require_resolve2();
@@ -28998,7 +29044,7 @@ var require_detect_services = __commonJS({
28998
29044
  });
28999
29045
  }
29000
29046
  function generateServicesRoutes2(allServices) {
29001
- const services = allServices.filter(import_build_utils6.isExperimentalService);
29047
+ const services = allServices.filter(import_build_utils7.isExperimentalService);
29002
29048
  const hostRewrites = [];
29003
29049
  const rewrites = [];
29004
29050
  const defaults = [];
@@ -29073,7 +29119,7 @@ var require_detect_services = __commonJS({
29073
29119
  }
29074
29120
  }
29075
29121
  }
29076
- const cronServices = services.filter(import_build_utils6.isScheduleTriggeredService);
29122
+ const cronServices = services.filter(import_build_utils7.isScheduleTriggeredService);
29077
29123
  for (const service of cronServices) {
29078
29124
  const cronPrefix = (0, import_utils4.getInternalServiceCronPathPrefix)(service.name);
29079
29125
  const functionPath = (0, import_utils4.getInternalServiceFunctionPath)(service.name);
@@ -29527,7 +29573,7 @@ var require_detect_builders = __commonJS({
29527
29573
  var import_path12 = __require("path");
29528
29574
  var import_frameworks2 = require_frameworks();
29529
29575
  var import_is_official_runtime = require_is_official_runtime();
29530
- var import_build_utils6 = __require("@vercel/build-utils");
29576
+ var import_build_utils7 = __require("@vercel/build-utils");
29531
29577
  var import_get_services_builders = require_get_services_builders();
29532
29578
  var REGEX_MIDDLEWARE_FILES = "middleware.[jt]s";
29533
29579
  var REGEX_VERCEL_PLATFORM_FILES = [
@@ -29834,7 +29880,7 @@ var require_detect_builders = __commonJS({
29834
29880
  }
29835
29881
  if (fileName.endsWith(".py") && options.workPath) {
29836
29882
  const fsPath = (0, import_path12.join)(options.workPath, fileName);
29837
- const isEntrypoint = await (0, import_build_utils6.isPythonEntrypoint)({ fsPath });
29883
+ const isEntrypoint = await (0, import_build_utils7.isPythonEntrypoint)({ fsPath });
29838
29884
  if (!isEntrypoint) {
29839
29885
  return null;
29840
29886
  }
@@ -29842,7 +29888,7 @@ var require_detect_builders = __commonJS({
29842
29888
  const nodeExtensions = [".js", ".mjs", ".ts", ".tsx"];
29843
29889
  if (fileName.startsWith("api/") && process.env.VERCEL_NODE_FILTER_ENTRYPOINTS === "1" && nodeExtensions.some((ext) => fileName.endsWith(ext)) && options.workPath) {
29844
29890
  const fsPath = (0, import_path12.join)(options.workPath, fileName);
29845
- const isEntrypoint = await (0, import_build_utils6.isNodeEntrypoint)({ fsPath });
29891
+ const isEntrypoint = await (0, import_build_utils7.isNodeEntrypoint)({ fsPath });
29846
29892
  if (!isEntrypoint) {
29847
29893
  return null;
29848
29894
  }
@@ -29952,8 +29998,8 @@ var require_detect_builders = __commonJS({
29952
29998
  const f = slugToFramework.get(framework || "");
29953
29999
  if (f && f.useRuntime) {
29954
30000
  const { src, use } = f.useRuntime;
29955
- const shouldUseUnifiedBackend = (0, import_build_utils6.isExperimentalBackendsEnabled)() && import_build_utils6.BACKEND_BUILDERS.includes(use);
29956
- const finalUse = shouldUseUnifiedBackend ? import_build_utils6.UNIFIED_BACKEND_BUILDER : use;
30001
+ const shouldUseUnifiedBackend = (0, import_build_utils7.isExperimentalBackendsEnabled)() && import_build_utils7.BACKEND_BUILDERS.includes(use);
30002
+ const finalUse = shouldUseUnifiedBackend ? import_build_utils7.UNIFIED_BACKEND_BUILDER : use;
29957
30003
  return { src, use: `${finalUse}${withTag}`, config };
29958
30004
  }
29959
30005
  const entrypoints = /* @__PURE__ */ new Set([
@@ -29998,7 +30044,7 @@ var require_detect_builders = __commonJS({
29998
30044
  message: "Function must contain at least one property."
29999
30045
  };
30000
30046
  }
30001
- const maxDurationLimit = (0, import_build_utils6.getMaxDurationLimit)();
30047
+ const maxDurationLimit = (0, import_build_utils7.getMaxDurationLimit)();
30002
30048
  if (func.maxDuration !== void 0 && func.maxDuration !== "max" && (func.maxDuration < 1 || maxDurationLimit !== void 0 && func.maxDuration > maxDurationLimit || !Number.isInteger(func.maxDuration))) {
30003
30049
  return {
30004
30050
  code: "invalid_function_duration",
@@ -34862,8 +34908,8 @@ var require_dist6 = __commonJS({
34862
34908
  getServicesBuilders: () => import_get_services_builders.getServicesBuilders,
34863
34909
  getWorkspacePackagePaths: () => import_get_workspace_package_paths.getWorkspacePackagePaths,
34864
34910
  getWorkspaces: () => import_get_workspaces.getWorkspaces,
34865
- isExperimentalService: () => import_build_utils6.isExperimentalService,
34866
- isExperimentalServiceV2: () => import_build_utils6.isExperimentalServiceV2,
34911
+ isExperimentalService: () => import_build_utils7.isExperimentalService,
34912
+ isExperimentalServiceV2: () => import_build_utils7.isExperimentalServiceV2,
34867
34913
  isOfficialRuntime: () => import_is_official_runtime.isOfficialRuntime,
34868
34914
  isRouteOwningBuilder: () => import_utils4.isRouteOwningBuilder,
34869
34915
  isStaticBuild: () => import_utils4.isStaticBuild,
@@ -34879,7 +34925,7 @@ var require_dist6 = __commonJS({
34879
34925
  var import_detect_builders = require_detect_builders();
34880
34926
  var import_detect_services2 = require_detect_services();
34881
34927
  var import_resolve_v2 = require_resolve_v2();
34882
- var import_build_utils6 = __require("@vercel/build-utils");
34928
+ var import_build_utils7 = __require("@vercel/build-utils");
34883
34929
  var import_auto_detect = require_auto_detect();
34884
34930
  var import_utils4 = require_utils3();
34885
34931
  var import_get_services_builders = require_get_services_builders();
@@ -40902,7 +40948,7 @@ var require_package = __commonJS({
40902
40948
  "../client/package.json"(exports, module) {
40903
40949
  module.exports = {
40904
40950
  name: "@vercel/client",
40905
- version: "17.6.3",
40951
+ version: "17.6.4",
40906
40952
  main: "dist/index.js",
40907
40953
  typings: "dist/index.d.ts",
40908
40954
  homepage: "https://vercel.com",
@@ -48823,7 +48869,7 @@ var require_utils10 = __commonJS({
48823
48869
  var import_url4 = __require("url");
48824
48870
  var import_ignore = __toESM2(require_ignore());
48825
48871
  var import_pkg2 = require_pkg();
48826
- var import_build_utils6 = __require("@vercel/build-utils");
48872
+ var import_build_utils7 = __require("@vercel/build-utils");
48827
48873
  var import_async_sema = require_lib6();
48828
48874
  var import_fs_extra9 = require_lib5();
48829
48875
  var import_readdir_recursive = __toESM2(require_readdir_recursive());
@@ -49057,7 +49103,7 @@ var require_utils10 = __commonJS({
49057
49103
  maybeRead((0, import_path12.join)(cwd2, ".nowignore"), "")
49058
49104
  ]);
49059
49105
  if (vercelignore && nowignore) {
49060
- throw new import_build_utils6.NowBuildError({
49106
+ throw new import_build_utils7.NowBuildError({
49061
49107
  code: "CONFLICTING_IGNORE_FILES",
49062
49108
  message: "Cannot use both a `.vercelignore` and `.nowignore` file. Please delete the `.nowignore` file.",
49063
49109
  link: "https://vercel.link/combining-old-and-new-config"
@@ -49101,10 +49147,13 @@ ${clearRelative(ignoreFile)}`);
49101
49147
  };
49102
49148
  debug(`${opts.method || "GET"} ${url}`);
49103
49149
  time = Date.now();
49104
- const res = await (0, import_node_fetch.default)(url, opts);
49105
- debug(`DONE in ${Date.now() - time}ms: ${opts.method || "GET"} ${url}`);
49106
- semaphore.release();
49107
- return res;
49150
+ try {
49151
+ const res = await (0, import_node_fetch.default)(url, opts);
49152
+ debug(`DONE in ${Date.now() - time}ms: ${opts.method || "GET"} ${url}`);
49153
+ return res;
49154
+ } finally {
49155
+ semaphore.release();
49156
+ }
49108
49157
  };
49109
49158
  var isWin = process.platform.includes("win");
49110
49159
  var prepareFiles = (files, clientOptions) => {
@@ -49241,6 +49290,36 @@ var require_check_deployment_status = __commonJS({
49241
49290
  var RETRY_DELAY_MIN_MS = 5e3;
49242
49291
  var RETRY_DELAY_SKEW_MS = 3e4;
49243
49292
  var RETRY_DELAY_DEFAULT_MS = 5e3;
49293
+ function getAliasAssignedEvent(signal, deploymentId) {
49294
+ if (!signal?.aborted)
49295
+ return;
49296
+ const event = signal.reason;
49297
+ if (event?.type === "alias-assigned" && event.deploymentId === deploymentId && typeof event.date === "number" && Array.isArray(event.alias) && "aliasError" in event && "aliasWarning" in event) {
49298
+ return event;
49299
+ }
49300
+ return void 0;
49301
+ }
49302
+ async function sleepUntilAliasAssigned(duration, signal, deploymentId) {
49303
+ if (getAliasAssignedEvent(signal, deploymentId))
49304
+ return;
49305
+ if (!signal || signal.aborted) {
49306
+ await (0, import_sleep_promise.default)(duration);
49307
+ return;
49308
+ }
49309
+ await new Promise((resolve4) => {
49310
+ const timeout = setTimeout(finish, duration);
49311
+ function finish() {
49312
+ clearTimeout(timeout);
49313
+ signal?.removeEventListener("abort", onAbort);
49314
+ resolve4();
49315
+ }
49316
+ function onAbort() {
49317
+ if (getAliasAssignedEvent(signal, deploymentId))
49318
+ finish();
49319
+ }
49320
+ signal.addEventListener("abort", onAbort, { once: true });
49321
+ });
49322
+ }
49244
49323
  function parseRetryAfterMs(response) {
49245
49324
  if (response.status === 429 || response.status === 503) {
49246
49325
  let header = response.headers.get("Retry-After");
@@ -49270,6 +49349,8 @@ var require_check_deployment_status = __commonJS({
49270
49349
  const { token, teamId, apiUrl, userAgent: userAgent2 } = clientOptions;
49271
49350
  const debug = (0, import_utils22.createDebug)(clientOptions.debug);
49272
49351
  let deploymentState = deployment;
49352
+ const deploymentId = deployment.id || deployment.deploymentId;
49353
+ let aliasAssignedSignal = clientOptions.aliasAssignedSignal;
49273
49354
  const apiDeployments = (0, import_utils4.getApiDeploymentsUrl)();
49274
49355
  if ((0, import_ready_state.isDone)(deploymentState) && (0, import_ready_state.isAliasAssigned)(deploymentState)) {
49275
49356
  debug(
@@ -49280,109 +49361,172 @@ var require_check_deployment_status = __commonJS({
49280
49361
  debug("Waiting for builds and the deployment to complete...");
49281
49362
  const finishedEvents = /* @__PURE__ */ new Set();
49282
49363
  const startTime = Date.now();
49283
- while (true) {
49284
- let deploymentResponse;
49285
- let retriesLeft = RETRY_COUNT;
49364
+ polling:
49286
49365
  while (true) {
49287
- deploymentResponse = await (0, import_utils4.fetchApi)(
49288
- `${apiDeployments}/${deployment.id || deployment.deploymentId}${teamId ? `?teamId=${teamId}` : ""}`,
49289
- token,
49290
- { apiUrl, userAgent: userAgent2, agent: clientOptions.agent }
49366
+ const aliasAssignedEvent = getAliasAssignedEvent(
49367
+ aliasAssignedSignal,
49368
+ deploymentId
49291
49369
  );
49292
- retriesLeft--;
49293
- if (retriesLeft == 0) {
49370
+ if (aliasAssignedEvent) {
49371
+ deploymentState = {
49372
+ ...deploymentState,
49373
+ readyState: "READY",
49374
+ aliasAssigned: aliasAssignedEvent.date,
49375
+ alias: aliasAssignedEvent.alias,
49376
+ aliasError: aliasAssignedEvent.aliasError,
49377
+ aliasWarning: aliasAssignedEvent.aliasWarning
49378
+ };
49379
+ if (!finishedEvents.has("ready")) {
49380
+ debug("Deployment state changed to READY");
49381
+ finishedEvents.add("ready");
49382
+ yield { type: "ready", payload: deploymentState };
49383
+ }
49384
+ debug("Deployment alias assigned from event stream");
49385
+ return yield { type: "alias-assigned", payload: deploymentState };
49386
+ }
49387
+ let deploymentResponse;
49388
+ let retriesLeft = RETRY_COUNT;
49389
+ while (true) {
49390
+ try {
49391
+ deploymentResponse = await (0, import_utils4.fetchApi)(
49392
+ `${apiDeployments}/${deploymentId}${teamId ? `?teamId=${teamId}` : ""}`,
49393
+ token,
49394
+ {
49395
+ apiUrl,
49396
+ userAgent: userAgent2,
49397
+ agent: clientOptions.agent,
49398
+ // node-fetch's bundled AbortSignal type predates the native one.
49399
+ signal: aliasAssignedSignal
49400
+ }
49401
+ );
49402
+ } catch (error) {
49403
+ if (getAliasAssignedEvent(aliasAssignedSignal, deploymentId)) {
49404
+ continue polling;
49405
+ }
49406
+ if (aliasAssignedSignal?.aborted) {
49407
+ aliasAssignedSignal = void 0;
49408
+ continue polling;
49409
+ }
49410
+ throw error;
49411
+ }
49412
+ if (getAliasAssignedEvent(aliasAssignedSignal, deploymentId)) {
49413
+ continue polling;
49414
+ }
49415
+ retriesLeft--;
49416
+ if (retriesLeft == 0) {
49417
+ break;
49418
+ }
49419
+ const retryAfterMs = parseRetryAfterMs(deploymentResponse);
49420
+ if (retryAfterMs != null) {
49421
+ const randomSkewMs = Math.floor(RETRY_DELAY_SKEW_MS * Math.random());
49422
+ debug(
49423
+ `Received a transient error or rate limit (HTTP ${deploymentResponse.status}) while querying deployment status, retrying after ${retryAfterMs + randomSkewMs}ms (${retryAfterMs} + ${randomSkewMs}ms of random skew)`
49424
+ );
49425
+ await sleepUntilAliasAssigned(
49426
+ retryAfterMs + randomSkewMs,
49427
+ aliasAssignedSignal,
49428
+ deploymentId
49429
+ );
49430
+ if (getAliasAssignedEvent(aliasAssignedSignal, deploymentId)) {
49431
+ continue polling;
49432
+ }
49433
+ continue;
49434
+ }
49294
49435
  break;
49295
49436
  }
49296
- const retryAfterMs = parseRetryAfterMs(deploymentResponse);
49297
- if (retryAfterMs != null) {
49298
- const randomSkewMs = Math.floor(RETRY_DELAY_SKEW_MS * Math.random());
49299
- debug(
49300
- `Received a transient error or rate limit (HTTP ${deploymentResponse.status}) while querying deployment status, retrying after ${retryAfterMs + randomSkewMs}ms (${retryAfterMs} + ${randomSkewMs}ms of random skew)`
49301
- );
49302
- await (0, import_sleep_promise.default)(retryAfterMs + randomSkewMs);
49303
- continue;
49437
+ let deploymentUpdate;
49438
+ try {
49439
+ deploymentUpdate = await deploymentResponse.json();
49440
+ } catch (error) {
49441
+ if (getAliasAssignedEvent(aliasAssignedSignal, deploymentId))
49442
+ continue;
49443
+ if (aliasAssignedSignal?.aborted) {
49444
+ aliasAssignedSignal = void 0;
49445
+ continue;
49446
+ }
49447
+ throw error;
49304
49448
  }
49305
- break;
49306
- }
49307
- const deploymentUpdate = await deploymentResponse.json();
49308
- if (deploymentUpdate.error) {
49309
- debug("Deployment status check has errorred");
49310
- return yield { type: "error", payload: deploymentUpdate.error };
49311
- }
49312
- if (deploymentUpdate.readyState === "BUILDING" && !finishedEvents.has("building")) {
49313
- debug("Deployment state changed to BUILDING");
49314
- finishedEvents.add("building");
49315
- yield { type: "building", payload: deploymentUpdate };
49316
- }
49317
- if (deploymentUpdate.readyState === "CANCELED" && !finishedEvents.has("canceled")) {
49318
- debug("Deployment state changed to CANCELED");
49319
- finishedEvents.add("canceled");
49320
- yield { type: "canceled", payload: deploymentUpdate };
49321
- }
49322
- if ((0, import_ready_state.isReady)(deploymentUpdate) && !finishedEvents.has("ready")) {
49323
- debug("Deployment state changed to READY");
49324
- finishedEvents.add("ready");
49325
- yield { type: "ready", payload: deploymentUpdate };
49326
- }
49327
- if (deploymentUpdate.checksState !== void 0) {
49328
- if (deploymentUpdate.checksState === "completed" && !finishedEvents.has("checks-completed")) {
49329
- finishedEvents.add("checks-completed");
49330
- if (deploymentUpdate.checksConclusion === "succeeded") {
49331
- yield {
49332
- type: "checks-conclusion-succeeded",
49333
- payload: deploymentUpdate
49334
- };
49335
- } else if (deploymentUpdate.checksConclusion === "failed") {
49336
- yield { type: "checks-conclusion-failed", payload: deploymentUpdate };
49337
- } else if (deploymentUpdate.checksConclusion === "skipped") {
49338
- yield {
49339
- type: "checks-conclusion-skipped",
49340
- payload: deploymentUpdate
49341
- };
49342
- } else if (deploymentUpdate.checksConclusion === "canceled") {
49343
- yield {
49344
- type: "checks-conclusion-canceled",
49345
- payload: deploymentUpdate
49346
- };
49449
+ if (getAliasAssignedEvent(aliasAssignedSignal, deploymentId))
49450
+ continue;
49451
+ if (deploymentUpdate.error) {
49452
+ debug("Deployment status check has errorred");
49453
+ return yield { type: "error", payload: deploymentUpdate.error };
49454
+ }
49455
+ deploymentState = deploymentUpdate;
49456
+ if (deploymentUpdate.readyState === "BUILDING" && !finishedEvents.has("building")) {
49457
+ debug("Deployment state changed to BUILDING");
49458
+ finishedEvents.add("building");
49459
+ yield { type: "building", payload: deploymentUpdate };
49460
+ }
49461
+ if (deploymentUpdate.readyState === "CANCELED" && !finishedEvents.has("canceled")) {
49462
+ debug("Deployment state changed to CANCELED");
49463
+ finishedEvents.add("canceled");
49464
+ yield { type: "canceled", payload: deploymentUpdate };
49465
+ }
49466
+ if ((0, import_ready_state.isReady)(deploymentUpdate) && !finishedEvents.has("ready")) {
49467
+ debug("Deployment state changed to READY");
49468
+ finishedEvents.add("ready");
49469
+ yield { type: "ready", payload: deploymentUpdate };
49470
+ }
49471
+ if (deploymentUpdate.checksState !== void 0) {
49472
+ if (deploymentUpdate.checksState === "completed" && !finishedEvents.has("checks-completed")) {
49473
+ finishedEvents.add("checks-completed");
49474
+ if (deploymentUpdate.checksConclusion === "succeeded") {
49475
+ yield {
49476
+ type: "checks-conclusion-succeeded",
49477
+ payload: deploymentUpdate
49478
+ };
49479
+ } else if (deploymentUpdate.checksConclusion === "failed") {
49480
+ yield { type: "checks-conclusion-failed", payload: deploymentUpdate };
49481
+ } else if (deploymentUpdate.checksConclusion === "skipped") {
49482
+ yield {
49483
+ type: "checks-conclusion-skipped",
49484
+ payload: deploymentUpdate
49485
+ };
49486
+ } else if (deploymentUpdate.checksConclusion === "canceled") {
49487
+ yield {
49488
+ type: "checks-conclusion-canceled",
49489
+ payload: deploymentUpdate
49490
+ };
49491
+ }
49492
+ }
49493
+ if (deploymentUpdate.checksState === "registered" && !finishedEvents.has("checks-registered")) {
49494
+ finishedEvents.add("checks-registered");
49495
+ yield { type: "checks-registered", payload: deploymentUpdate };
49496
+ }
49497
+ if (deploymentUpdate.checksState === "running" && !finishedEvents.has("checks-running")) {
49498
+ finishedEvents.add("checks-running");
49499
+ yield { type: "checks-running", payload: deploymentUpdate };
49347
49500
  }
49348
49501
  }
49349
- if (deploymentUpdate.checksState === "registered" && !finishedEvents.has("checks-registered")) {
49350
- finishedEvents.add("checks-registered");
49351
- yield { type: "checks-registered", payload: deploymentUpdate };
49502
+ if (deploymentUpdate.checks?.["deployment-alias"]?.state === "failed" && !finishedEvents.has("checks-v2-failed")) {
49503
+ debug("v2 deployment-alias check failed");
49504
+ finishedEvents.add("checks-v2-failed");
49505
+ return yield {
49506
+ type: "checks-v2-failed",
49507
+ payload: deploymentUpdate
49508
+ };
49352
49509
  }
49353
- if (deploymentUpdate.checksState === "running" && !finishedEvents.has("checks-running")) {
49354
- finishedEvents.add("checks-running");
49355
- yield { type: "checks-running", payload: deploymentUpdate };
49510
+ if ((0, import_ready_state.isAliasAssigned)(deploymentUpdate)) {
49511
+ debug("Deployment alias assigned");
49512
+ return yield { type: "alias-assigned", payload: deploymentUpdate };
49356
49513
  }
49514
+ if ((0, import_ready_state.isAliasError)(deploymentUpdate)) {
49515
+ return yield { type: "error", payload: deploymentUpdate.aliasError };
49516
+ }
49517
+ if (deploymentUpdate.readyState === "ERROR" && deploymentUpdate.errorCode === "BUILD_FAILED") {
49518
+ return yield { type: "error", payload: deploymentUpdate };
49519
+ }
49520
+ if ((0, import_ready_state.isFailed)(deploymentUpdate)) {
49521
+ return yield {
49522
+ type: "error",
49523
+ payload: deploymentUpdate.error || deploymentUpdate
49524
+ };
49525
+ }
49526
+ const elapsed = Date.now() - startTime;
49527
+ const duration = (0, import_get_polling_delay.getPollingDelay)(elapsed);
49528
+ await sleepUntilAliasAssigned(duration, aliasAssignedSignal, deploymentId);
49357
49529
  }
49358
- if (deploymentUpdate.checks?.["deployment-alias"]?.state === "failed" && !finishedEvents.has("checks-v2-failed")) {
49359
- debug("v2 deployment-alias check failed");
49360
- finishedEvents.add("checks-v2-failed");
49361
- return yield {
49362
- type: "checks-v2-failed",
49363
- payload: deploymentUpdate
49364
- };
49365
- }
49366
- if ((0, import_ready_state.isAliasAssigned)(deploymentUpdate)) {
49367
- debug("Deployment alias assigned");
49368
- return yield { type: "alias-assigned", payload: deploymentUpdate };
49369
- }
49370
- if ((0, import_ready_state.isAliasError)(deploymentUpdate)) {
49371
- return yield { type: "error", payload: deploymentUpdate.aliasError };
49372
- }
49373
- if (deploymentUpdate.readyState === "ERROR" && deploymentUpdate.errorCode === "BUILD_FAILED") {
49374
- return yield { type: "error", payload: deploymentUpdate };
49375
- }
49376
- if ((0, import_ready_state.isFailed)(deploymentUpdate)) {
49377
- return yield {
49378
- type: "error",
49379
- payload: deploymentUpdate.error || deploymentUpdate
49380
- };
49381
- }
49382
- const elapsed = Date.now() - startTime;
49383
- const duration = (0, import_get_polling_delay.getPollingDelay)(elapsed);
49384
- await (0, import_sleep_promise.default)(duration);
49385
- }
49386
49530
  }
49387
49531
  }
49388
49532
  });
@@ -55530,7 +55674,7 @@ var require_archive = __commonJS({
55530
55674
  module.exports = __toCommonJS2(archive_exports);
55531
55675
  var import_node_path2 = __require("path");
55532
55676
  var import_node_zlib = __require("zlib");
55533
- var import_build_utils6 = __require("@vercel/build-utils");
55677
+ var import_build_utils7 = __require("@vercel/build-utils");
55534
55678
  var import_tar_fs = __toESM2(require_tar_fs());
55535
55679
  var import_hashes = require_hashes();
55536
55680
  async function createTgzFiles(workPath, fileList, debug, exclude) {
@@ -55539,7 +55683,7 @@ var require_archive = __commonJS({
55539
55683
  const tarStream = import_tar_fs.default.pack(workPath, {
55540
55684
  entries: filesToArchive.map((file) => (0, import_node_path2.relative)(workPath, file))
55541
55685
  }).pipe((0, import_node_zlib.createGzip)());
55542
- const chunkedTarBuffers = await (0, import_build_utils6.streamToBufferChunks)(tarStream);
55686
+ const chunkedTarBuffers = await (0, import_build_utils7.streamToBufferChunks)(tarStream);
55543
55687
  debug?.(`Packed tarball into ${chunkedTarBuffers.length} chunks`);
55544
55688
  return new Map(
55545
55689
  chunkedTarBuffers.map((chunk, index) => [
@@ -56248,11 +56392,11 @@ function isDirectory(targetPath) {
56248
56392
  }
56249
56393
 
56250
56394
  // src/util/projects/link.ts
56251
- import { NowBuildError as NowBuildError2, getPlatformEnv } from "@vercel/build-utils";
56395
+ import { NowBuildError as NowBuildError2, getPlatformEnv as getPlatformEnv2 } from "@vercel/build-utils";
56252
56396
  var import_error_utils4 = __toESM(require_dist(), 1);
56253
56397
 
56254
56398
  // src/util/link/repo.ts
56255
- var import_chalk7 = __toESM(require_source(), 1);
56399
+ var import_chalk9 = __toESM(require_source(), 1);
56256
56400
 
56257
56401
  // ../../node_modules/.pnpm/@inquirer+core@7.1.3/node_modules/@inquirer/core/dist/esm/lib/key.mjs
56258
56402
  var isUpKey = (key) => (
@@ -57622,6 +57766,9 @@ async function getOriginUrl(configPath) {
57622
57766
  return null;
57623
57767
  }
57624
57768
 
57769
+ // src/util/input/select-org.ts
57770
+ var import_chalk6 = __toESM(require_source(), 1);
57771
+
57625
57772
  // src/util/teams/get-teams.ts
57626
57773
  import { URLSearchParams as URLSearchParams2 } from "url";
57627
57774
  async function getTeams(client, opts = {}) {
@@ -57681,6 +57828,27 @@ async function fetchTeams(client, opts = {}) {
57681
57828
  }
57682
57829
  }
57683
57830
 
57831
+ // src/util/input/select-org.ts
57832
+ import { getPlatformEnv } from "@vercel/build-utils";
57833
+
57834
+ // src/util/output/param.ts
57835
+ var import_chalk4 = __toESM(require_source(), 1);
57836
+ function param(text) {
57837
+ return `${import_chalk4.default.gray('"')}${import_chalk4.default.bold(text)}${import_chalk4.default.gray('"')}`;
57838
+ }
57839
+
57840
+ // src/util/output/print-aligned-label.ts
57841
+ var import_chalk5 = __toESM(require_source(), 1);
57842
+ var ALIGNED_LABEL_WIDTH = 16;
57843
+ function printAlignedLabel(label, value, options = {}) {
57844
+ const gutter = options.gutter === "\u2713" ? import_chalk5.default.green("\u2713") : options.gutter;
57845
+ const prefix = gutter ? `${gutter} ` : " ";
57846
+ output_manager_default.print(
57847
+ `${prefix}${import_chalk5.default.bold(label.padEnd(ALIGNED_LABEL_WIDTH))}${import_chalk5.default.bold(value)}
57848
+ `
57849
+ );
57850
+ }
57851
+
57684
57852
  // src/util/input/select-org.ts
57685
57853
  function getScopeOrTeamFromArgv(argv) {
57686
57854
  const args = argv.slice(2);
@@ -57702,44 +57870,10 @@ function getScopeOrTeamFromArgv(argv) {
57702
57870
  }
57703
57871
  return null;
57704
57872
  }
57705
- async function selectOrg(client, question, autoConfirm) {
57873
+ async function selectOrg(client, question, autoConfirm, searchable = false, meta) {
57706
57874
  const {
57707
57875
  config: { currentTeam }
57708
57876
  } = client;
57709
- if (autoConfirm && !client.nonInteractive) {
57710
- if (currentTeam) {
57711
- output_manager_default.spinner("Loading team\u2026", 1e3);
57712
- try {
57713
- const team = await getTeamById(client, currentTeam);
57714
- return { type: "team", id: team.id, slug: team.slug };
57715
- } catch (err) {
57716
- output_manager_default.debug(`Unable to load current team directly: ${err}`);
57717
- } finally {
57718
- output_manager_default.stopSpinner();
57719
- }
57720
- }
57721
- output_manager_default.spinner("Loading user\u2026", 1e3);
57722
- let user2;
57723
- try {
57724
- user2 = await getUser(client);
57725
- } finally {
57726
- output_manager_default.stopSpinner();
57727
- }
57728
- if (user2.version !== "northstar") {
57729
- return { type: "user", id: user2.id, slug: user2.username };
57730
- }
57731
- if (user2.defaultTeamId) {
57732
- output_manager_default.spinner("Loading team\u2026", 1e3);
57733
- try {
57734
- const team = await getTeamById(client, user2.defaultTeamId);
57735
- return { type: "team", id: team.id, slug: team.slug };
57736
- } catch (err) {
57737
- output_manager_default.debug(`Unable to load default team directly: ${err}`);
57738
- } finally {
57739
- output_manager_default.stopSpinner();
57740
- }
57741
- }
57742
- }
57743
57877
  output_manager_default.spinner("Loading teams\u2026", 1e3);
57744
57878
  let user;
57745
57879
  let teams;
@@ -57748,16 +57882,36 @@ async function selectOrg(client, question, autoConfirm) {
57748
57882
  } finally {
57749
57883
  output_manager_default.stopSpinner();
57750
57884
  }
57885
+ const formatChoiceName = (name, slug, isCurrent, limited) => {
57886
+ let title2 = `${name} (${slug})`;
57887
+ if (isCurrent) {
57888
+ title2 += ` ${import_chalk6.default.bold("(current)")}`;
57889
+ }
57890
+ if (limited) {
57891
+ title2 += ` ${emoji("locked")}`;
57892
+ }
57893
+ return title2;
57894
+ };
57751
57895
  const personalAccountChoice = user.version === "northstar" ? [] : [
57752
57896
  {
57753
- name: user.name || user.username,
57897
+ name: formatChoiceName(
57898
+ user.name || user.username,
57899
+ user.username,
57900
+ !currentTeam,
57901
+ user.limited
57902
+ ),
57754
57903
  value: { type: "user", id: user.id, slug: user.username }
57755
57904
  }
57756
57905
  ];
57757
57906
  const choices = [
57758
57907
  ...personalAccountChoice,
57759
57908
  ...teams.sort((a) => a.id === user.defaultTeamId ? -1 : 1).map((team) => ({
57760
- name: team.name || team.slug,
57909
+ name: formatChoiceName(
57910
+ team.name || team.slug,
57911
+ team.slug,
57912
+ team.id === currentTeam,
57913
+ team.limited
57914
+ ),
57761
57915
  value: { type: "team", id: team.id, slug: team.slug }
57762
57916
  }))
57763
57917
  ];
@@ -57765,19 +57919,30 @@ async function selectOrg(client, question, autoConfirm) {
57765
57919
  choices.findIndex((choice) => choice.value.id === currentTeam),
57766
57920
  0
57767
57921
  );
57768
- if (client.nonInteractive) {
57769
- if (currentTeam) {
57770
- const match = choices.find((c) => c.value.id === currentTeam);
57771
- if (match)
57772
- return match.value;
57773
- }
57774
- const explicitScope = getScopeOrTeamFromArgv(client.argv);
57775
- if (explicitScope) {
57776
- const match = choices.find(
57777
- (c) => c.value.id === explicitScope || c.value.slug === explicitScope
57778
- );
57779
- if (match)
57780
- return match.value;
57922
+ if (meta) {
57923
+ meta.choiceCount = choices.length;
57924
+ }
57925
+ const localConfigScope = client.localConfig?.scope;
57926
+ const explicitScope = getScopeOrTeamFromArgv(client.argv) ?? (typeof localConfigScope === "string" ? localConfigScope : null) ?? getPlatformEnv("ORG_ID") ?? null;
57927
+ const matchExplicitScope = () => {
57928
+ if (!explicitScope)
57929
+ return void 0;
57930
+ const match = choices.find(
57931
+ (c) => c.value.id === explicitScope || c.value.slug === explicitScope
57932
+ );
57933
+ if (match)
57934
+ return match.value;
57935
+ if (user.id === explicitScope || user.email === explicitScope || user.username === explicitScope) {
57936
+ return choices.find((c) => c.value.type === "user")?.value;
57937
+ }
57938
+ return void 0;
57939
+ };
57940
+ if (client.nonInteractive || !client.stdin.isTTY) {
57941
+ const match = matchExplicitScope();
57942
+ if (match)
57943
+ return match;
57944
+ if (choices.length === 1) {
57945
+ return choices[0].value;
57781
57946
  }
57782
57947
  const actionRequired = {
57783
57948
  status: "action_required",
@@ -57792,15 +57957,44 @@ async function selectOrg(client, question, autoConfirm) {
57792
57957
  }))
57793
57958
  };
57794
57959
  outputActionRequired(client, actionRequired);
57960
+ output_manager_default.error(
57961
+ choices.length > 0 ? `Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param(
57962
+ "--team <slug>"
57963
+ )}, or run ${getCommandName("teams ls")} to list your teams.` : "No teams available."
57964
+ );
57795
57965
  process.exit(1);
57796
57966
  }
57797
- if (autoConfirm) {
57798
- return choices[defaultChoiceIndex].value;
57967
+ const explicitOrg = matchExplicitScope();
57968
+ if (explicitOrg) {
57969
+ return explicitOrg;
57799
57970
  }
57800
- return await client.input.select({
57801
- message: question,
57802
- choices,
57803
- default: choices[defaultChoiceIndex].value
57971
+ if (choices.length === 1) {
57972
+ printAlignedLabel("Team", choices[0].value.slug);
57973
+ return choices[0].value;
57974
+ }
57975
+ if (!searchable) {
57976
+ return await client.input.select({
57977
+ message: question,
57978
+ choices,
57979
+ default: choices[defaultChoiceIndex].value
57980
+ });
57981
+ }
57982
+ const defaultChoice = choices[defaultChoiceIndex];
57983
+ const initialChoices = defaultChoice ? [defaultChoice, ...choices.filter((choice) => choice !== defaultChoice)] : choices;
57984
+ const pageSize = 15;
57985
+ const countHint = choices.length > pageSize ? ` ${import_chalk6.default.dim(`(${choices.length} teams)`)}` : "";
57986
+ return await client.input.search({
57987
+ message: `${question}${countHint}`,
57988
+ pageSize,
57989
+ source: (term) => {
57990
+ const searchTerm = term?.trim().toLowerCase();
57991
+ if (!searchTerm) {
57992
+ return initialChoices;
57993
+ }
57994
+ return choices.filter(
57995
+ (choice) => choice.name.toLowerCase().includes(searchTerm) || choice.value.slug.toLowerCase().includes(searchTerm)
57996
+ );
57997
+ }
57804
57998
  });
57805
57999
  }
57806
58000
 
@@ -57885,16 +58079,16 @@ function repoInfoToUrl(info) {
57885
58079
  }
57886
58080
 
57887
58081
  // src/util/git/connect-git-provider.ts
57888
- var import_chalk5 = __toESM(require_source(), 1);
58082
+ var import_chalk8 = __toESM(require_source(), 1);
57889
58083
  import { URL as URL2 } from "url";
57890
58084
 
57891
58085
  // ../../node_modules/.pnpm/@inquirer+select@2.2.2/node_modules/@inquirer/select/dist/esm/index.mjs
57892
- var import_chalk4 = __toESM(require_source2(), 1);
58086
+ var import_chalk7 = __toESM(require_source2(), 1);
57893
58087
  var import_figures3 = __toESM(require_figures(), 1);
57894
58088
  var import_ansi_escapes3 = __toESM(require_ansi_escapes(), 1);
57895
58089
  var selectTheme = {
57896
58090
  icon: { cursor: import_figures3.default.pointer },
57897
- style: { disabled: (text) => import_chalk4.default.dim(`- ${text}`) }
58091
+ style: { disabled: (text) => import_chalk7.default.dim(`- ${text}`) }
57898
58092
  };
57899
58093
  function isSelectable2(item) {
57900
58094
  return !Separator.isSeparator(item) && !item.disabled;
@@ -58110,7 +58304,7 @@ async function connectGitProvider(client, projectId, type, repo) {
58110
58304
  const apiError = isAPIError(err);
58111
58305
  if (apiError && (err.action === "Install GitHub App" || err.code === "repo_not_found")) {
58112
58306
  output_manager_default.error(
58113
- `Failed to connect ${import_chalk5.default.cyan(
58307
+ `Failed to connect ${import_chalk8.default.cyan(
58114
58308
  repo
58115
58309
  )} to project. Make sure there aren't any typos and that you have access to the repository if it's private.`
58116
58310
  );
@@ -58132,7 +58326,7 @@ ${ctaLabel}: ${link_default(ctaUrl)}`;
58132
58326
  output_manager_default.error(message);
58133
58327
  } else if (apiError && err.action === "Add a Login Connection") {
58134
58328
  output_manager_default.error(
58135
- err.message.replace(repo, import_chalk5.default.cyan(repo)) + `
58329
+ err.message.replace(repo, import_chalk8.default.cyan(repo)) + `
58136
58330
  Visit ${link_default(err.link)} for more information.`
58137
58331
  );
58138
58332
  } else {
@@ -58203,7 +58397,7 @@ function parseRepoUrl(originUrl) {
58203
58397
  }
58204
58398
  function printRemoteUrls(remoteUrls) {
58205
58399
  for (const [name, url] of Object.entries(remoteUrls)) {
58206
- output_manager_default.print(` \u2022 ${name}: ${import_chalk5.default.cyan(url)}
58400
+ output_manager_default.print(` \u2022 ${name}: ${import_chalk8.default.cyan(url)}
58207
58401
  `);
58208
58402
  }
58209
58403
  }
@@ -58211,7 +58405,7 @@ async function selectRemoteUrl(client, remoteUrls) {
58211
58405
  const choices = [];
58212
58406
  for (const [urlKey, urlValue] of Object.entries(remoteUrls)) {
58213
58407
  choices.push({
58214
- name: `${urlValue} ${import_chalk5.default.gray(`(${urlKey})`)}`,
58408
+ name: `${urlValue} ${import_chalk8.default.gray(`(${urlKey})`)}`,
58215
58409
  value: urlValue,
58216
58410
  short: urlKey
58217
58411
  });
@@ -58235,7 +58429,7 @@ async function selectAndParseRemoteUrl(client, remoteUrls) {
58235
58429
  }
58236
58430
  const repoInfo = parseRepoUrl(remoteUrl);
58237
58431
  if (!repoInfo) {
58238
- output_manager_default.log(`Connecting Git repository: ${import_chalk5.default.cyan(remoteUrl)}`);
58432
+ output_manager_default.log(`Connecting Git repository: ${import_chalk8.default.cyan(remoteUrl)}`);
58239
58433
  output_manager_default.error(
58240
58434
  `Failed to parse Git repo data from the following remote URL: ${link_default(
58241
58435
  remoteUrl
@@ -58258,7 +58452,7 @@ async function checkExistsAndConnect({
58258
58452
  }) {
58259
58453
  const displayUrl = buildRepoUrl(provider, gitOrg, repo) || repoPath;
58260
58454
  output_manager_default.log(
58261
- `Connecting ${formatProvider(provider)} repository: ${import_chalk5.default.cyan(displayUrl)}`
58455
+ `Connecting ${formatProvider(provider)} repository: ${import_chalk8.default.cyan(displayUrl)}`
58262
58456
  );
58263
58457
  if (!gitProviderLink) {
58264
58458
  const connect = await connectGitProvider(
@@ -58278,7 +58472,7 @@ async function checkExistsAndConnect({
58278
58472
  const isSameRepo = connectedProvider === provider && connectedOrg === gitOrg && connectedRepo === repo;
58279
58473
  if (isSameRepo) {
58280
58474
  output_manager_default.log(
58281
- `${import_chalk5.default.cyan(connectedRepoPath)} is already connected to your project.`
58475
+ `${import_chalk8.default.cyan(connectedRepoPath)} is already connected to your project.`
58282
58476
  );
58283
58477
  return 1;
58284
58478
  }
@@ -58310,7 +58504,7 @@ async function confirmRepoConnect(client, yes, connectedProvider, connectedRepoP
58310
58504
  shouldReplaceProject = await client.input.confirm(
58311
58505
  `Looks like you already have a ${formatProvider(
58312
58506
  connectedProvider
58313
- )} repository connected: ${import_chalk5.default.cyan(
58507
+ )} repository connected: ${import_chalk8.default.cyan(
58314
58508
  connectedRepoPath
58315
58509
  )}. Do you want to replace it?`,
58316
58510
  true
@@ -58370,18 +58564,6 @@ function getGitConfigPath(opts) {
58370
58564
  return join4(absoluteGitCommonDir, "config");
58371
58565
  }
58372
58566
 
58373
- // src/util/output/print-aligned-label.ts
58374
- var import_chalk6 = __toESM(require_source(), 1);
58375
- var ALIGNED_LABEL_WIDTH = 16;
58376
- function printAlignedLabel(label, value, options = {}) {
58377
- const gutter = options.gutter === "\u2713" ? import_chalk6.default.green("\u2713") : options.gutter;
58378
- const prefix = gutter ? `${gutter} ` : " ";
58379
- output_manager_default.print(
58380
- `${prefix}${import_chalk6.default.bold(label.padEnd(ALIGNED_LABEL_WIDTH))}${import_chalk6.default.bold(value)}
58381
- `
58382
- );
58383
- }
58384
-
58385
58567
  // src/util/link/repo.ts
58386
58568
  var home = homedir2();
58387
58569
  async function getRepoLink(client, cwd) {
@@ -58492,9 +58674,9 @@ async function discoverRepoProjects(client, rootPath, {
58492
58674
  return /* @__PURE__ */ new Map();
58493
58675
  });
58494
58676
  const promptAction = existingRemoteName ? "add" : "link";
58495
- const confirmMessage = promptAction === "add" ? `Add Project(s) for Git repository at ${import_chalk7.default.dim(
58677
+ const confirmMessage = promptAction === "add" ? `Add Project(s) for Git repository at ${import_chalk9.default.dim(
58496
58678
  `"${humanizePath(rootPath)}"`
58497
- )}?` : `Link Git repository at ${import_chalk7.default.dim(
58679
+ )}?` : `Link Git repository at ${import_chalk9.default.dim(
58498
58680
  `"${humanizePath(rootPath)}"`
58499
58681
  )} to your Project(s)?`;
58500
58682
  const shouldLink = yes || await client.input.confirm(confirmMessage, true);
@@ -58521,7 +58703,7 @@ async function discoverRepoProjects(client, rootPath, {
58521
58703
  fallback: () => link_default(repoUrl)
58522
58704
  });
58523
58705
  output_manager_default.spinner(
58524
- `Fetching Projects for ${repoUrlLink} under ${import_chalk7.default.bold(org.slug)}\u2026`
58706
+ `Fetching Projects for ${repoUrlLink} under ${import_chalk9.default.bold(org.slug)}\u2026`
58525
58707
  );
58526
58708
  const detectedProjects = await detectedProjectsPromise;
58527
58709
  let projects = await fetchProjectsForRepoUrl(client, repoUrl, org.id);
@@ -58536,7 +58718,7 @@ async function discoverRepoProjects(client, rootPath, {
58536
58718
  }
58537
58719
  if (projects.length === 0) {
58538
58720
  output_manager_default.print(
58539
- ` No Projects are linked to ${repoUrlLink} under ${import_chalk7.default.bold(org.slug)}.
58721
+ ` No Projects are linked to ${repoUrlLink} under ${import_chalk9.default.bold(org.slug)}.
58540
58722
  `
58541
58723
  );
58542
58724
  } else {
@@ -58545,7 +58727,7 @@ async function discoverRepoProjects(client, rootPath, {
58545
58727
  "Project",
58546
58728
  projects.length,
58547
58729
  true
58548
- )} linked to ${repoUrlLink} under ${import_chalk7.default.bold(org.slug)}
58730
+ )} linked to ${repoUrlLink} under ${import_chalk9.default.bold(org.slug)}
58549
58731
  `
58550
58732
  );
58551
58733
  }
@@ -58583,7 +58765,7 @@ async function discoverRepoProjects(client, rootPath, {
58583
58765
  ...projects.map((project) => {
58584
58766
  const dir = project.rootDirectory || ".";
58585
58767
  return {
58586
- name: `${org.slug}/${project.name} ${import_chalk7.default.gray(`(${dir})`)}`,
58768
+ name: `${org.slug}/${project.name} ${import_chalk9.default.gray(`(${dir})`)}`,
58587
58769
  value: project,
58588
58770
  checked: true
58589
58771
  };
@@ -58598,7 +58780,7 @@ async function discoverRepoProjects(client, rootPath, {
58598
58780
  ].filter(Boolean).join("-")
58599
58781
  );
58600
58782
  return {
58601
- name: `${org.slug}/${name} ${import_chalk7.default.gray(`(${rootDirectory || "."} \xB7 ${framework.name})`)}`,
58783
+ name: `${org.slug}/${name} ${import_chalk9.default.gray(`(${rootDirectory || "."} \xB7 ${framework.name})`)}`,
58602
58784
  value: {
58603
58785
  newProject: true,
58604
58786
  rootDirectory,
@@ -58806,17 +58988,11 @@ function findProjectsFromPath(projects, path) {
58806
58988
  }
58807
58989
 
58808
58990
  // src/commands/env/pull.ts
58809
- var import_chalk12 = __toESM(require_source(), 1);
58991
+ var import_chalk13 = __toESM(require_source(), 1);
58810
58992
  var import_fs_extra5 = __toESM(require_lib2(), 1);
58811
58993
  import { closeSync, openSync, readSync } from "fs";
58812
58994
  import { resolve as resolve3 } from "path";
58813
58995
 
58814
- // src/util/output/param.ts
58815
- var import_chalk8 = __toESM(require_source(), 1);
58816
- function param(text) {
58817
- return `${import_chalk8.default.gray('"')}${import_chalk8.default.bold(text)}${import_chalk8.default.gray('"')}`;
58818
- }
58819
-
58820
58996
  // src/util/env/get-env-records.ts
58821
58997
  import { URLSearchParams as URLSearchParams3 } from "url";
58822
58998
  async function getEnvRecords(client, projectId, source, {
@@ -58901,7 +59077,7 @@ var parseEnv = (env) => {
58901
59077
  };
58902
59078
 
58903
59079
  // src/util/env/diff-env-files.ts
58904
- var import_chalk9 = __toESM(require_source(), 1);
59080
+ var import_chalk10 = __toESM(require_source(), 1);
58905
59081
  async function createEnvObject(envPath) {
58906
59082
  const envArr = (await (0, import_fs_extra4.readFile)(envPath, "utf-8")).replace(/"/g, "").split(/\r?\n|\r/).filter((line) => /^[^#]/.test(line)).filter((line) => /=/i.test(line));
58907
59083
  const parsedEnv = parseEnv(envArr);
@@ -58932,10 +59108,10 @@ function findChanges(oldEnv, newEnv) {
58932
59108
  function buildDeltaString(oldEnv, newEnv) {
58933
59109
  const { added, changed, removed } = findChanges(oldEnv, newEnv);
58934
59110
  let deltaString = "";
58935
- deltaString += import_chalk9.default.green(addDeltaSection("+", changed, true));
58936
- deltaString += import_chalk9.default.green(addDeltaSection("+", added));
58937
- deltaString += import_chalk9.default.red(addDeltaSection("-", removed));
58938
- return deltaString ? import_chalk9.default.gray(" Changes:\n") + deltaString + "\n" : deltaString;
59111
+ deltaString += import_chalk10.default.green(addDeltaSection("+", changed, true));
59112
+ deltaString += import_chalk10.default.green(addDeltaSection("+", added));
59113
+ deltaString += import_chalk10.default.red(addDeltaSection("-", removed));
59114
+ return deltaString ? import_chalk10.default.gray(" Changes:\n") + deltaString + "\n" : deltaString;
58939
59115
  }
58940
59116
  function addDeltaSection(prefix, arr, changed = false) {
58941
59117
  if (arr.length === 0)
@@ -58983,12 +59159,12 @@ var import_error_utils2 = __toESM(require_dist(), 1);
58983
59159
  var import_json_parse_better_errors = __toESM(require_json_parse_better_errors(), 1);
58984
59160
 
58985
59161
  // src/util/projects/format-project.ts
58986
- var import_chalk10 = __toESM(require_source(), 1);
59162
+ var import_chalk11 = __toESM(require_source(), 1);
58987
59163
  function formatProject(orgSlug, projectSlug, options) {
58988
59164
  const orgProjectSlug = `${orgSlug}/${projectSlug}`;
58989
59165
  const projectUrl = `https://vercel.com/${orgProjectSlug}`;
58990
- const projectSlugLink = output_manager_default.link(import_chalk10.default.bold(orgProjectSlug), projectUrl, {
58991
- fallback: () => import_chalk10.default.bold(orgProjectSlug),
59166
+ const projectSlugLink = output_manager_default.link(import_chalk11.default.bold(orgProjectSlug), projectUrl, {
59167
+ fallback: () => import_chalk11.default.bold(orgProjectSlug),
58992
59168
  color: false,
58993
59169
  ...options
58994
59170
  });
@@ -59441,7 +59617,7 @@ function parseTarget({
59441
59617
  }
59442
59618
 
59443
59619
  // src/commands/login/future.ts
59444
- var import_chalk11 = __toESM(require_source(), 1);
59620
+ var import_chalk12 = __toESM(require_source(), 1);
59445
59621
  var open = __toESM(require_open(), 1);
59446
59622
  var import_ansi_escapes4 = __toESM(require_ansi_escapes(), 1);
59447
59623
  import readline3 from "readline";
@@ -59722,13 +59898,13 @@ async function performDeviceCodeFlow(client, options) {
59722
59898
  const shouldSkipBrowser = process.env.CI && !isCursorAgent;
59723
59899
  output_manager_default.log(
59724
59900
  `
59725
- Visit ${import_chalk11.default.bold(
59901
+ Visit ${import_chalk12.default.bold(
59726
59902
  output_manager_default.link(
59727
59903
  verification_uri.replace("https://", ""),
59728
59904
  verification_uri_complete,
59729
59905
  { color: false, fallback: () => verification_uri_complete }
59730
59906
  )
59731
- )}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk11.default.bold(user_code)}` : ""}
59907
+ )}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk12.default.bold(user_code)}` : ""}
59732
59908
  `
59733
59909
  );
59734
59910
  if (!shouldSkipBrowser) {
@@ -59742,7 +59918,7 @@ async function performDeviceCodeFlow(client, options) {
59742
59918
  if (client.isAgent && client.nonInteractive) {
59743
59919
  output_manager_default.log(
59744
59920
  `
59745
- ${import_chalk11.default.yellow("\u26A0")} ${import_chalk11.default.bold("Browser could not be opened automatically.")}
59921
+ ${import_chalk12.default.yellow("\u26A0")} ${import_chalk12.default.bold("Browser could not be opened automatically.")}
59746
59922
  `
59747
59923
  );
59748
59924
  output_manager_default.log(
@@ -59840,12 +60016,12 @@ async function login(client, telemetry) {
59840
60016
  client.writeToConfigFile();
59841
60017
  output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
59842
60018
  output_manager_default.print(`
59843
- ${import_chalk11.default.cyan("Congratulations!")} You are now signed in.
60019
+ ${import_chalk12.default.cyan("Congratulations!")} You are now signed in.
59844
60020
 
59845
60021
  To deploy something, run ${getCommandName()}.
59846
60022
 
59847
60023
  ${emoji("tip")} To deploy every commit automatically,
59848
- connect a Git Repository (${import_chalk11.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
60024
+ connect a Git Repository (${import_chalk12.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
59849
60025
  `);
59850
60026
  telemetry.trackState("success");
59851
60027
  return 0;
@@ -59977,7 +60153,7 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
59977
60153
  const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
59978
60154
  const exists = typeof head !== "undefined";
59979
60155
  if (head === CONTENTS_PREFIX && !oidcTokenOnly) {
59980
- output_manager_default.log(`Overwriting existing ${import_chalk12.default.bold(filename)} file`);
60156
+ output_manager_default.log(`Overwriting existing ${import_chalk13.default.bold(filename)} file`);
59981
60157
  } else if (exists && !skipConfirmation && !oidcTokenOnly) {
59982
60158
  if (client.nonInteractive) {
59983
60159
  outputActionRequired(client, {
@@ -60005,13 +60181,13 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
60005
60181
  }
60006
60182
  }
60007
60183
  const projectSlugLink = formatProject(link.org.slug, link.project.name);
60008
- const downloadMessage = oidcTokenOnly ? `Downloading a fresh \`${import_chalk12.default.cyan(
60184
+ const downloadMessage = oidcTokenOnly ? `Downloading a fresh \`${import_chalk13.default.cyan(
60009
60185
  VERCEL_OIDC_TOKEN
60010
- )}\` for ${projectSlugLink}` : gitBranch ? `Downloading \`${import_chalk12.default.cyan(
60186
+ )}\` for ${projectSlugLink}` : gitBranch ? `Downloading \`${import_chalk13.default.cyan(
60011
60187
  environment
60012
- )}\` environment variables for ${projectSlugLink} and any overrides for branch ${import_chalk12.default.cyan(
60188
+ )}\` environment variables for ${projectSlugLink} and any overrides for branch ${import_chalk13.default.cyan(
60013
60189
  gitBranch
60014
- )}` : `Downloading \`${import_chalk12.default.cyan(
60190
+ )}` : `Downloading \`${import_chalk13.default.cyan(
60015
60191
  environment
60016
60192
  )}\` environment variables for ${projectSlugLink}`;
60017
60193
  output_manager_default.log(downloadMessage);
@@ -60125,7 +60301,7 @@ function escapeValue2(value) {
60125
60301
  }
60126
60302
 
60127
60303
  // src/util/projects/find-project-root.ts
60128
- var import_chalk13 = __toESM(require_source(), 1);
60304
+ var import_chalk14 = __toESM(require_source(), 1);
60129
60305
  var import_fs_extra7 = __toESM(require_lib2(), 1);
60130
60306
  import { stat } from "fs/promises";
60131
60307
  import { join as join8, dirname } from "path";
@@ -61072,7 +61248,7 @@ async function resolveProjectCwd(cwd) {
61072
61248
  }
61073
61249
  const result = await tryDetectServices(projectRoot);
61074
61250
  if (result && (result.services?.length ?? 0) > 0) {
61075
- output_manager_default.debug(`Running from project root: ${import_chalk13.default.cyan(projectRoot)}`);
61251
+ output_manager_default.debug(`Running from project root: ${import_chalk14.default.cyan(projectRoot)}`);
61076
61252
  return projectRoot;
61077
61253
  }
61078
61254
  return cwd;
@@ -61226,8 +61402,8 @@ async function getLinkFromDir(dir) {
61226
61402
  }
61227
61403
  }
61228
61404
  async function hasProjectLink(client, projectLink, path) {
61229
- const VERCEL_ORG_ID = getPlatformEnv("ORG_ID");
61230
- const VERCEL_PROJECT_ID = getPlatformEnv("PROJECT_ID");
61405
+ const VERCEL_ORG_ID = getPlatformEnv2("ORG_ID");
61406
+ const VERCEL_PROJECT_ID = getPlatformEnv2("PROJECT_ID");
61231
61407
  if (VERCEL_ORG_ID === projectLink.orgId && VERCEL_PROJECT_ID === projectLink.projectId) {
61232
61408
  return true;
61233
61409
  }
@@ -61256,8 +61432,8 @@ async function hasProjectLink(client, projectLink, path) {
61256
61432
  }
61257
61433
  async function getLinkedProject(client, path = client.cwd, projectName, apiFallback) {
61258
61434
  path = await resolveProjectCwd(path);
61259
- const VERCEL_ORG_ID = getPlatformEnv("ORG_ID");
61260
- const VERCEL_PROJECT_ID = getPlatformEnv("PROJECT_ID");
61435
+ const VERCEL_ORG_ID = getPlatformEnv2("ORG_ID");
61436
+ const VERCEL_PROJECT_ID = getPlatformEnv2("PROJECT_ID");
61261
61437
  const shouldUseEnv = Boolean(VERCEL_ORG_ID && VERCEL_PROJECT_ID);
61262
61438
  if ((VERCEL_ORG_ID || VERCEL_PROJECT_ID) && !shouldUseEnv) {
61263
61439
  output_manager_default.error(
@@ -61780,6 +61956,7 @@ export {
61780
61956
  onExit,
61781
61957
  createPrompt,
61782
61958
  esm_default,
61959
+ Separator,
61783
61960
  esm_default2,
61784
61961
  esm_default3,
61785
61962
  ua_default,
@@ -61802,6 +61979,7 @@ export {
61802
61979
  createGitMeta,
61803
61980
  parseGitConfig,
61804
61981
  pluckRemoteUrls,
61982
+ printAlignedLabel,
61805
61983
  selectOrg,
61806
61984
  createProject,
61807
61985
  require_frameworks,
@@ -61816,7 +61994,6 @@ export {
61816
61994
  printRemoteUrls,
61817
61995
  selectAndParseRemoteUrl,
61818
61996
  checkExistsAndConnect,
61819
- printAlignedLabel,
61820
61997
  getRepoLink,
61821
61998
  resolveGitRemote,
61822
61999
  fetchProjectsForRepoUrl,