vercel-cli 41.1.0__py3-none-any.whl → 46.1.0__py3-none-any.whl

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.

Potentially problematic release.


This version of vercel-cli might be problematic. Click here for more details.

Files changed (30) hide show
  1. vercel_cli/vendor/README.md +1 -1
  2. vercel_cli/vendor/dist/index.js +72500 -59234
  3. vercel_cli/vendor/node_modules/.package-lock.json +12 -6
  4. vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md +168 -0
  5. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.d.ts +1 -0
  6. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/node-version.js +7 -1
  7. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.d.ts +11 -12
  8. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/fs/run-user-scripts.js +220 -87
  9. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/get-prefixed-env-vars.js +4 -1
  10. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/index.js +393 -155
  11. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.d.ts +44 -4
  12. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/lambda.js +91 -3
  13. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.d.ts +12 -1
  14. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/prerender.js +3 -2
  15. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.d.ts +41 -0
  16. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/schemas.js +43 -1
  17. vercel_cli/vendor/node_modules/@vercel/build-utils/dist/types.d.ts +41 -10
  18. vercel_cli/vendor/node_modules/@vercel/build-utils/package.json +3 -2
  19. vercel_cli/vendor/node_modules/@vercel/detect-agent/LICENSE +202 -0
  20. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts +1 -0
  21. vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js +66 -0
  22. vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json +31 -0
  23. vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +29 -37
  24. vercel_cli/vendor/node_modules/@vercel/python/package.json +2 -2
  25. vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +8 -7
  26. vercel_cli/vendor/package.json +4 -3
  27. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/METADATA +1 -1
  28. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/RECORD +30 -26
  29. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/WHEEL +0 -0
  30. {vercel_cli-41.1.0.dist-info → vercel_cli-46.1.0.dist-info}/entry_points.txt +0 -0
@@ -10825,9 +10825,9 @@ var require_fs2 = __commonJS({
10825
10825
  }
10826
10826
  });
10827
10827
 
10828
- // ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js
10828
+ // ../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js
10829
10829
  var require_path = __commonJS({
10830
- "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports2, module2) {
10830
+ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports2, module2) {
10831
10831
  var isWindows = typeof process === "object" && process && process.platform === "win32";
10832
10832
  module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
10833
10833
  }
@@ -10984,9 +10984,9 @@ var require_brace_expansion2 = __commonJS({
10984
10984
  }
10985
10985
  });
10986
10986
 
10987
- // ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js
10987
+ // ../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js
10988
10988
  var require_minimatch2 = __commonJS({
10989
- "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports2, module2) {
10989
+ "../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js"(exports2, module2) {
10990
10990
  var minimatch2 = module2.exports = (p, pattern, options = {}) => {
10991
10991
  assertValidPattern(pattern);
10992
10992
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -11072,9 +11072,7 @@ var require_minimatch2 = __commonJS({
11072
11072
  return list;
11073
11073
  };
11074
11074
  var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
11075
- var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
11076
11075
  var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
11077
- var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&");
11078
11076
  var Minimatch = class {
11079
11077
  constructor(pattern, options) {
11080
11078
  assertValidPattern(pattern);
@@ -11083,10 +11081,6 @@ var require_minimatch2 = __commonJS({
11083
11081
  this.options = options;
11084
11082
  this.set = [];
11085
11083
  this.pattern = pattern;
11086
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
11087
- if (this.windowsPathsNoEscape) {
11088
- this.pattern = this.pattern.replace(/\\/g, "/");
11089
- }
11090
11084
  this.regexp = null;
11091
11085
  this.negate = false;
11092
11086
  this.comment = false;
@@ -11131,7 +11125,7 @@ var require_minimatch2 = __commonJS({
11131
11125
  negateOffset++;
11132
11126
  }
11133
11127
  if (negateOffset)
11134
- this.pattern = pattern.slice(negateOffset);
11128
+ this.pattern = pattern.substr(negateOffset);
11135
11129
  this.negate = negate;
11136
11130
  }
11137
11131
  // set partial to true to test if, for example,
@@ -11222,7 +11216,7 @@ var require_minimatch2 = __commonJS({
11222
11216
  if (pattern === "")
11223
11217
  return "";
11224
11218
  let re = "";
11225
- let hasMagic = false;
11219
+ let hasMagic = !!options.nocase;
11226
11220
  let escaping = false;
11227
11221
  const patternListStack = [];
11228
11222
  const negativeLists = [];
@@ -11233,10 +11227,7 @@ var require_minimatch2 = __commonJS({
11233
11227
  let cs;
11234
11228
  let pl;
11235
11229
  let sp;
11236
- let dotTravAllowed = pattern.charAt(0) === ".";
11237
- let dotFileAllowed = options.dot || dotTravAllowed;
11238
- const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
11239
- const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
11230
+ const patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
11240
11231
  const clearStateChar = () => {
11241
11232
  if (stateChar) {
11242
11233
  switch (stateChar) {
@@ -11274,10 +11265,6 @@ var require_minimatch2 = __commonJS({
11274
11265
  return false;
11275
11266
  }
11276
11267
  case "\\":
11277
- if (inClass && pattern.charAt(i + 1) === "-") {
11278
- re += c;
11279
- continue;
11280
- }
11281
11268
  clearStateChar();
11282
11269
  escaping = true;
11283
11270
  continue;
@@ -11300,7 +11287,7 @@ var require_minimatch2 = __commonJS({
11300
11287
  if (options.noext)
11301
11288
  clearStateChar();
11302
11289
  continue;
11303
- case "(": {
11290
+ case "(":
11304
11291
  if (inClass) {
11305
11292
  re += "(";
11306
11293
  continue;
@@ -11309,54 +11296,39 @@ var require_minimatch2 = __commonJS({
11309
11296
  re += "\\(";
11310
11297
  continue;
11311
11298
  }
11312
- const plEntry = {
11299
+ patternListStack.push({
11313
11300
  type: stateChar,
11314
11301
  start: i - 1,
11315
11302
  reStart: re.length,
11316
11303
  open: plTypes[stateChar].open,
11317
11304
  close: plTypes[stateChar].close
11318
- };
11319
- this.debug(this.pattern, " ", plEntry);
11320
- patternListStack.push(plEntry);
11321
- re += plEntry.open;
11322
- if (plEntry.start === 0 && plEntry.type !== "!") {
11323
- dotTravAllowed = true;
11324
- re += subPatternStart(pattern.slice(i + 1));
11325
- }
11305
+ });
11306
+ re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
11326
11307
  this.debug("plType %j %j", stateChar, re);
11327
11308
  stateChar = false;
11328
11309
  continue;
11329
- }
11330
- case ")": {
11331
- const plEntry = patternListStack[patternListStack.length - 1];
11332
- if (inClass || !plEntry) {
11310
+ case ")":
11311
+ if (inClass || !patternListStack.length) {
11333
11312
  re += "\\)";
11334
11313
  continue;
11335
11314
  }
11336
- patternListStack.pop();
11337
11315
  clearStateChar();
11338
11316
  hasMagic = true;
11339
- pl = plEntry;
11317
+ pl = patternListStack.pop();
11340
11318
  re += pl.close;
11341
11319
  if (pl.type === "!") {
11342
- negativeLists.push(Object.assign(pl, { reEnd: re.length }));
11320
+ negativeLists.push(pl);
11343
11321
  }
11322
+ pl.reEnd = re.length;
11344
11323
  continue;
11345
- }
11346
- case "|": {
11347
- const plEntry = patternListStack[patternListStack.length - 1];
11348
- if (inClass || !plEntry) {
11324
+ case "|":
11325
+ if (inClass || !patternListStack.length) {
11349
11326
  re += "\\|";
11350
11327
  continue;
11351
11328
  }
11352
11329
  clearStateChar();
11353
11330
  re += "|";
11354
- if (plEntry.start === 0 && plEntry.type !== "!") {
11355
- dotTravAllowed = true;
11356
- re += subPatternStart(pattern.slice(i + 1));
11357
- }
11358
11331
  continue;
11359
- }
11360
11332
  case "[":
11361
11333
  clearStateChar();
11362
11334
  if (inClass) {
@@ -11375,13 +11347,17 @@ var require_minimatch2 = __commonJS({
11375
11347
  }
11376
11348
  cs = pattern.substring(classStart + 1, i);
11377
11349
  try {
11378
- RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
11379
- re += c;
11350
+ RegExp("[" + cs + "]");
11380
11351
  } catch (er) {
11381
- re = re.substring(0, reClassStart) + "(?:$.)";
11352
+ sp = this.parse(cs, SUBPARSE);
11353
+ re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
11354
+ hasMagic = hasMagic || sp[1];
11355
+ inClass = false;
11356
+ continue;
11382
11357
  }
11383
11358
  hasMagic = true;
11384
11359
  inClass = false;
11360
+ re += c;
11385
11361
  continue;
11386
11362
  default:
11387
11363
  clearStateChar();
@@ -11393,9 +11369,9 @@ var require_minimatch2 = __commonJS({
11393
11369
  }
11394
11370
  }
11395
11371
  if (inClass) {
11396
- cs = pattern.slice(classStart + 1);
11372
+ cs = pattern.substr(classStart + 1);
11397
11373
  sp = this.parse(cs, SUBPARSE);
11398
- re = re.substring(0, reClassStart) + "\\[" + sp[0];
11374
+ re = re.substr(0, reClassStart) + "\\[" + sp[0];
11399
11375
  hasMagic = hasMagic || sp[1];
11400
11376
  }
11401
11377
  for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
@@ -11424,28 +11400,24 @@ var require_minimatch2 = __commonJS({
11424
11400
  const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
11425
11401
  let nlAfter = re.slice(nl.reEnd);
11426
11402
  const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
11427
- const closeParensBefore = nlBefore.split(")").length;
11428
- const openParensBefore = nlBefore.split("(").length - closeParensBefore;
11403
+ const openParensBefore = nlBefore.split("(").length - 1;
11429
11404
  let cleanAfter = nlAfter;
11430
11405
  for (let i = 0; i < openParensBefore; i++) {
11431
11406
  cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
11432
11407
  }
11433
11408
  nlAfter = cleanAfter;
11434
- const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
11409
+ const dollar = nlAfter === "" && isSub !== SUBPARSE ? "$" : "";
11435
11410
  re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
11436
11411
  }
11437
11412
  if (re !== "" && hasMagic) {
11438
11413
  re = "(?=.)" + re;
11439
11414
  }
11440
11415
  if (addPatternStart) {
11441
- re = patternStart() + re;
11416
+ re = patternStart + re;
11442
11417
  }
11443
11418
  if (isSub === SUBPARSE) {
11444
11419
  return [re, hasMagic];
11445
11420
  }
11446
- if (options.nocase && !hasMagic) {
11447
- hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
11448
- }
11449
11421
  if (!hasMagic) {
11450
11422
  return globUnescape(pattern);
11451
11423
  }
@@ -18333,8 +18305,8 @@ var require_js_yaml = __commonJS({
18333
18305
  var require_js_yaml2 = __commonJS({
18334
18306
  "../../node_modules/.pnpm/js-yaml@3.13.1/node_modules/js-yaml/index.js"(exports2, module2) {
18335
18307
  "use strict";
18336
- var yaml2 = require_js_yaml();
18337
- module2.exports = yaml2;
18308
+ var yaml3 = require_js_yaml();
18309
+ module2.exports = yaml3;
18338
18310
  }
18339
18311
  });
18340
18312
 
@@ -22400,6 +22372,20 @@ async function download(files, basePath, meta) {
22400
22372
  }
22401
22373
 
22402
22374
  // src/lambda.ts
22375
+ function getDefaultLambdaArchitecture(architecture) {
22376
+ if (architecture) {
22377
+ return architecture;
22378
+ }
22379
+ switch (process.arch) {
22380
+ case "arm":
22381
+ case "arm64": {
22382
+ return "arm64";
22383
+ }
22384
+ default: {
22385
+ return "x86_64";
22386
+ }
22387
+ }
22388
+ }
22403
22389
  var Lambda = class {
22404
22390
  constructor(opts) {
22405
22391
  const {
@@ -22416,7 +22402,9 @@ var Lambda = class {
22416
22402
  supportsResponseStreaming,
22417
22403
  experimentalResponseStreaming,
22418
22404
  operationType,
22419
- framework
22405
+ framework,
22406
+ experimentalTriggers,
22407
+ supportsCancellation
22420
22408
  } = opts;
22421
22409
  if ("files" in opts) {
22422
22410
  (0, import_assert4.default)(typeof opts.files === "object", '"files" must be an object');
@@ -22484,12 +22472,79 @@ var Lambda = class {
22484
22472
  );
22485
22473
  }
22486
22474
  }
22475
+ if (experimentalTriggers !== void 0) {
22476
+ (0, import_assert4.default)(
22477
+ Array.isArray(experimentalTriggers),
22478
+ '"experimentalTriggers" is not an Array'
22479
+ );
22480
+ for (let i = 0; i < experimentalTriggers.length; i++) {
22481
+ const trigger = experimentalTriggers[i];
22482
+ const prefix = `"experimentalTriggers[${i}]"`;
22483
+ (0, import_assert4.default)(
22484
+ typeof trigger === "object" && trigger !== null,
22485
+ `${prefix} is not an object`
22486
+ );
22487
+ (0, import_assert4.default)(
22488
+ trigger.type === "queue/v1beta",
22489
+ `${prefix}.type must be "queue/v1beta"`
22490
+ );
22491
+ (0, import_assert4.default)(
22492
+ typeof trigger.topic === "string",
22493
+ `${prefix}.topic is required and must be a string`
22494
+ );
22495
+ (0, import_assert4.default)(trigger.topic.length > 0, `${prefix}.topic cannot be empty`);
22496
+ (0, import_assert4.default)(
22497
+ typeof trigger.consumer === "string",
22498
+ `${prefix}.consumer is required and must be a string`
22499
+ );
22500
+ (0, import_assert4.default)(
22501
+ trigger.consumer.length > 0,
22502
+ `${prefix}.consumer cannot be empty`
22503
+ );
22504
+ if (trigger.maxDeliveries !== void 0) {
22505
+ (0, import_assert4.default)(
22506
+ typeof trigger.maxDeliveries === "number",
22507
+ `${prefix}.maxDeliveries must be a number`
22508
+ );
22509
+ (0, import_assert4.default)(
22510
+ Number.isInteger(trigger.maxDeliveries) && trigger.maxDeliveries >= 1,
22511
+ `${prefix}.maxDeliveries must be at least 1`
22512
+ );
22513
+ }
22514
+ if (trigger.retryAfterSeconds !== void 0) {
22515
+ (0, import_assert4.default)(
22516
+ typeof trigger.retryAfterSeconds === "number",
22517
+ `${prefix}.retryAfterSeconds must be a number`
22518
+ );
22519
+ (0, import_assert4.default)(
22520
+ trigger.retryAfterSeconds > 0,
22521
+ `${prefix}.retryAfterSeconds must be a positive number`
22522
+ );
22523
+ }
22524
+ if (trigger.initialDelaySeconds !== void 0) {
22525
+ (0, import_assert4.default)(
22526
+ typeof trigger.initialDelaySeconds === "number",
22527
+ `${prefix}.initialDelaySeconds must be a number`
22528
+ );
22529
+ (0, import_assert4.default)(
22530
+ trigger.initialDelaySeconds >= 0,
22531
+ `${prefix}.initialDelaySeconds must be a non-negative number`
22532
+ );
22533
+ }
22534
+ }
22535
+ }
22536
+ if (supportsCancellation !== void 0) {
22537
+ (0, import_assert4.default)(
22538
+ typeof supportsCancellation === "boolean",
22539
+ '"supportsCancellation" is not a boolean'
22540
+ );
22541
+ }
22487
22542
  this.type = "Lambda";
22488
22543
  this.operationType = operationType;
22489
22544
  this.files = "files" in opts ? opts.files : void 0;
22490
22545
  this.handler = handler;
22491
22546
  this.runtime = runtime;
22492
- this.architecture = architecture;
22547
+ this.architecture = getDefaultLambdaArchitecture(architecture);
22493
22548
  this.memory = memory;
22494
22549
  this.maxDuration = maxDuration;
22495
22550
  this.environment = environment;
@@ -22501,6 +22556,8 @@ var Lambda = class {
22501
22556
  this.supportsResponseStreaming = supportsResponseStreaming ?? experimentalResponseStreaming;
22502
22557
  this.framework = framework;
22503
22558
  this.experimentalAllowBundling = "experimentalAllowBundling" in opts ? opts.experimentalAllowBundling : void 0;
22559
+ this.experimentalTriggers = experimentalTriggers;
22560
+ this.supportsCancellation = supportsCancellation;
22504
22561
  }
22505
22562
  async createZip() {
22506
22563
  let { zipBuffer } = this;
@@ -22573,8 +22630,11 @@ async function getLambdaOptionsFromFunction({
22573
22630
  for (const [pattern, fn] of Object.entries(config.functions)) {
22574
22631
  if (sourceFile === pattern || (0, import_minimatch.default)(sourceFile, pattern)) {
22575
22632
  return {
22633
+ architecture: fn.architecture,
22576
22634
  memory: fn.memory,
22577
- maxDuration: fn.maxDuration
22635
+ maxDuration: fn.maxDuration,
22636
+ experimentalTriggers: fn.experimentalTriggers,
22637
+ supportsCancellation: fn.supportsCancellation
22578
22638
  };
22579
22639
  }
22580
22640
  }
@@ -22604,6 +22664,7 @@ var NodejsLambda = class extends Lambda {
22604
22664
  var Prerender = class {
22605
22665
  constructor({
22606
22666
  expiration,
22667
+ staleExpiration,
22607
22668
  lambda,
22608
22669
  fallback,
22609
22670
  group,
@@ -22620,6 +22681,7 @@ var Prerender = class {
22620
22681
  }) {
22621
22682
  this.type = "Prerender";
22622
22683
  this.expiration = expiration;
22684
+ this.staleExpiration = staleExpiration;
22623
22685
  this.sourcePath = sourcePath;
22624
22686
  this.lambda = lambda;
22625
22687
  if (this.lambda) {
@@ -22654,8 +22716,7 @@ var Prerender = class {
22654
22716
  }
22655
22717
  if (experimentalBypassFor !== void 0) {
22656
22718
  if (!Array.isArray(experimentalBypassFor) || experimentalBypassFor.some(
22657
- (field) => typeof field !== "object" || // host doesn't need a key
22658
- field.type !== "host" && typeof field.key !== "string" || typeof field.type !== "string" || field.value !== void 0 && typeof field.value !== "string"
22719
+ (field) => typeof field !== "object" || typeof field.type !== "string" || field.type === "host" && "key" in field || field.type !== "host" && typeof field.key !== "string" || field.value !== void 0 && typeof field.value !== "string" && (typeof field.value !== "object" || field.value === null || Array.isArray(field.value))
22659
22720
  )) {
22660
22721
  throw new Error(
22661
22722
  "The `experimentalBypassFor` argument for `Prerender` must be Array of objects with fields `type`, `key` and optionally `value`."
@@ -22902,7 +22963,8 @@ var NODE_VERSIONS = [
22902
22963
  new NodeVersion({
22903
22964
  major: 18,
22904
22965
  range: "18.x",
22905
- runtime: "nodejs18.x"
22966
+ runtime: "nodejs18.x",
22967
+ discontinueDate: /* @__PURE__ */ new Date("2025-09-01")
22906
22968
  }),
22907
22969
  new NodeVersion({
22908
22970
  major: 16,
@@ -23080,7 +23142,7 @@ function cloneEnv(...envs) {
23080
23142
 
23081
23143
  // src/fs/run-user-scripts.ts
23082
23144
  var import_json5 = __toESM(require_lib5());
23083
- var runNpmInstallSema = new import_async_sema4.default(1);
23145
+ var import_js_yaml2 = __toESM(require_js_yaml2());
23084
23146
  var NO_OVERRIDE = {
23085
23147
  detectedLockfile: void 0,
23086
23148
  detectedPackageManager: void 0,
@@ -23251,14 +23313,24 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
23251
23313
  start: destPath,
23252
23314
  filename: "package.json"
23253
23315
  });
23254
- const packageJson = readPackageJson && pkgJsonPath ? JSON.parse(await import_fs_extra7.default.readFile(pkgJsonPath, "utf8")) : void 0;
23316
+ let packageJson;
23317
+ if (readPackageJson && pkgJsonPath) {
23318
+ try {
23319
+ packageJson = JSON.parse(await import_fs_extra7.default.readFile(pkgJsonPath, "utf8"));
23320
+ } catch (err) {
23321
+ throw new Error(
23322
+ `Could not read ${pkgJsonPath}: ${err.message}.`
23323
+ );
23324
+ }
23325
+ }
23255
23326
  const {
23256
23327
  paths: [
23257
23328
  yarnLockPath,
23258
23329
  npmLockPath,
23259
23330
  pnpmLockPath,
23260
23331
  bunLockTextPath,
23261
- bunLockBinPath
23332
+ bunLockBinPath,
23333
+ vltLockPath
23262
23334
  ],
23263
23335
  packageJsonPackageManager
23264
23336
  } = await walkParentDirsMulti({
@@ -23269,18 +23341,20 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
23269
23341
  "package-lock.json",
23270
23342
  "pnpm-lock.yaml",
23271
23343
  "bun.lock",
23272
- "bun.lockb"
23344
+ "bun.lockb",
23345
+ "vlt-lock.json"
23273
23346
  ]
23274
23347
  });
23275
23348
  let lockfilePath;
23276
23349
  let lockfileVersion;
23277
23350
  let cliType;
23278
23351
  const bunLockPath = bunLockTextPath ?? bunLockBinPath;
23279
- const [hasYarnLock, packageLockJson, pnpmLockYaml, bunLock] = await Promise.all([
23280
- Boolean(yarnLockPath),
23352
+ const [packageLockJson, pnpmLockYaml, bunLock, yarnLock, vltLock] = await Promise.all([
23281
23353
  npmLockPath ? readConfigFile(npmLockPath) : null,
23282
23354
  pnpmLockPath ? readConfigFile(pnpmLockPath) : null,
23283
- bunLockPath ? import_fs_extra7.default.readFile(bunLockPath) : null
23355
+ bunLockPath ? import_fs_extra7.default.readFile(bunLockPath) : null,
23356
+ yarnLockPath ? import_fs_extra7.default.readFile(yarnLockPath, "utf8") : null,
23357
+ vltLockPath ? readConfigFile(vltLockPath) : null
23284
23358
  ]);
23285
23359
  const rootProjectInfo = readPackageJson ? await readProjectRootInfo({
23286
23360
  base,
@@ -23291,13 +23365,14 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
23291
23365
  turboVersionRange,
23292
23366
  rootProjectInfo?.rootDir
23293
23367
  ) : void 0;
23294
- if (bunLock && hasYarnLock) {
23368
+ if (bunLock && yarnLock) {
23295
23369
  cliType = "bun";
23296
23370
  lockfilePath = bunLockPath;
23297
23371
  lockfileVersion = bunLockTextPath ? 1 : 0;
23298
- } else if (hasYarnLock) {
23372
+ } else if (yarnLock) {
23299
23373
  cliType = "yarn";
23300
23374
  lockfilePath = yarnLockPath;
23375
+ lockfileVersion = parseYarnLockVersion(yarnLock);
23301
23376
  } else if (pnpmLockYaml) {
23302
23377
  cliType = "pnpm";
23303
23378
  lockfilePath = pnpmLockPath;
@@ -23310,6 +23385,9 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
23310
23385
  cliType = "bun";
23311
23386
  lockfilePath = bunLockPath;
23312
23387
  lockfileVersion = bunLockTextPath ? 1 : 0;
23388
+ } else if (vltLock) {
23389
+ cliType = "vlt";
23390
+ lockfilePath = vltLockPath;
23313
23391
  } else {
23314
23392
  cliType = detectPackageManagerNameWithoutLockfile(
23315
23393
  packageJsonPackageManager,
@@ -23327,6 +23405,17 @@ async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
23327
23405
  turboSupportsCorepackHome
23328
23406
  };
23329
23407
  }
23408
+ function parseYarnLockVersion(yarnLock) {
23409
+ if (!yarnLock.includes("__metadata:")) {
23410
+ return 1;
23411
+ }
23412
+ try {
23413
+ const metadata = import_js_yaml2.default.load(yarnLock).__metadata;
23414
+ return Number(metadata.version);
23415
+ } catch {
23416
+ return void 0;
23417
+ }
23418
+ }
23330
23419
  async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
23331
23420
  if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) {
23332
23421
  return true;
@@ -23436,7 +23525,64 @@ async function walkParentDirsMulti({
23436
23525
  function isSet(v) {
23437
23526
  return v?.constructor?.name === "Set";
23438
23527
  }
23439
- async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion) {
23528
+ function getInstallCommandForPackageManager(packageManager, args) {
23529
+ switch (packageManager) {
23530
+ case "npm":
23531
+ return {
23532
+ prettyCommand: "npm install",
23533
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"])
23534
+ };
23535
+ case "pnpm":
23536
+ return {
23537
+ prettyCommand: "pnpm install",
23538
+ // PNPM's install command is similar to NPM's but without the audit nonsense
23539
+ // @see options https://pnpm.io/cli/install
23540
+ commandArguments: args.filter((a) => a !== "--prefer-offline").concat(["install", "--unsafe-perm"])
23541
+ };
23542
+ case "bun":
23543
+ return {
23544
+ prettyCommand: "bun install",
23545
+ // @see options https://bun.sh/docs/cli/install
23546
+ commandArguments: ["install", ...args]
23547
+ };
23548
+ case "yarn":
23549
+ return {
23550
+ prettyCommand: "yarn install",
23551
+ commandArguments: ["install", ...args]
23552
+ };
23553
+ case "vlt":
23554
+ return {
23555
+ prettyCommand: "vlt install",
23556
+ commandArguments: ["install", ...args]
23557
+ };
23558
+ }
23559
+ }
23560
+ async function runInstallCommand({
23561
+ packageManager,
23562
+ args,
23563
+ opts
23564
+ }) {
23565
+ const { commandArguments, prettyCommand } = getInstallCommandForPackageManager(packageManager, args);
23566
+ opts.prettyCommand = prettyCommand;
23567
+ if (process.env.NPM_ONLY_PRODUCTION) {
23568
+ commandArguments.push("--production");
23569
+ }
23570
+ await spawnAsync(packageManager, commandArguments, opts);
23571
+ }
23572
+ function initializeSet(set) {
23573
+ if (!isSet(set)) {
23574
+ return /* @__PURE__ */ new Set();
23575
+ }
23576
+ return set;
23577
+ }
23578
+ function checkIfAlreadyInstalled(runNpmInstallSet, packageJsonPath) {
23579
+ const initializedRunNpmInstallSet = initializeSet(runNpmInstallSet);
23580
+ const alreadyInstalled = initializedRunNpmInstallSet.has(packageJsonPath);
23581
+ initializedRunNpmInstallSet.add(packageJsonPath);
23582
+ return { alreadyInstalled, runNpmInstallSet: initializedRunNpmInstallSet };
23583
+ }
23584
+ var runNpmInstallSema = new import_async_sema4.default(1);
23585
+ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion, projectCreatedAt) {
23440
23586
  if (meta?.isDev) {
23441
23587
  debug("Skipping dependency installation because dev mode is enabled");
23442
23588
  return false;
@@ -23456,19 +23602,27 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
23456
23602
  debug(
23457
23603
  `Skipping dependency installation because no package.json was found for ${destPath}`
23458
23604
  );
23459
- runNpmInstallSema.release();
23460
23605
  return false;
23461
23606
  }
23462
- if (meta && packageJsonPath && args.length === 0) {
23463
- if (!isSet(meta.runNpmInstallSet)) {
23464
- meta.runNpmInstallSet = /* @__PURE__ */ new Set();
23607
+ const defaultInstall = args.length === 0;
23608
+ if (meta && packageJsonPath && defaultInstall) {
23609
+ const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(
23610
+ meta.runNpmInstallSet,
23611
+ packageJsonPath
23612
+ );
23613
+ if (alreadyInstalled) {
23614
+ return false;
23465
23615
  }
23466
- if (isSet(meta.runNpmInstallSet)) {
23467
- if (meta.runNpmInstallSet.has(packageJsonPath)) {
23468
- return false;
23469
- } else {
23470
- meta.runNpmInstallSet.add(packageJsonPath);
23471
- }
23616
+ meta.runNpmInstallSet = runNpmInstallSet;
23617
+ }
23618
+ if (cliType === "yarn") {
23619
+ const yarnVersion = detectYarnVersion(lockfileVersion);
23620
+ if (["yarn@3.x", "yarn@4.x"].includes(yarnVersion)) {
23621
+ await spawnAsync(
23622
+ "yarn",
23623
+ ["config", "set", "enableGlobalCache", "false"],
23624
+ { cwd: destPath }
23625
+ );
23472
23626
  }
23473
23627
  }
23474
23628
  const installTime = Date.now();
@@ -23484,47 +23638,20 @@ async function runNpmInstall(destPath, args = [], spawnOpts, meta, nodeVersion)
23484
23638
  nodeVersion,
23485
23639
  env,
23486
23640
  packageJsonEngines: packageJson?.engines,
23487
- turboSupportsCorepackHome
23641
+ turboSupportsCorepackHome,
23642
+ projectCreatedAt
23488
23643
  });
23489
- let commandArgs;
23490
- const isPotentiallyBrokenNpm = cliType === "npm" && (nodeVersion?.major === 16 || opts.env.PATH?.includes("/node16/bin-npm7")) && !args.includes("--legacy-peer-deps") && spawnOpts?.env?.ENABLE_EXPERIMENTAL_COREPACK !== "1";
23491
- if (cliType === "npm") {
23492
- opts.prettyCommand = "npm install";
23493
- commandArgs = args.filter((a) => a !== "--prefer-offline").concat(["install", "--no-audit", "--unsafe-perm"]);
23494
- if (isPotentiallyBrokenNpm && spawnOpts?.env?.VERCEL_NPM_LEGACY_PEER_DEPS === "1") {
23495
- commandArgs.push("--legacy-peer-deps");
23496
- }
23497
- } else if (cliType === "pnpm") {
23498
- opts.prettyCommand = "pnpm install";
23499
- commandArgs = args.filter((a) => a !== "--prefer-offline").concat(["install", "--unsafe-perm"]);
23500
- } else if (cliType === "bun") {
23501
- opts.prettyCommand = "bun install";
23502
- commandArgs = ["install", ...args];
23503
- } else {
23504
- opts.prettyCommand = "yarn install";
23505
- commandArgs = ["install", ...args];
23506
- }
23507
- if (process.env.NPM_ONLY_PRODUCTION) {
23508
- commandArgs.push("--production");
23509
- }
23510
- try {
23511
- await spawnAsync(cliType, commandArgs, opts);
23512
- } catch (err) {
23513
- const potentialErrorPath = import_path5.default.join(
23514
- process.env.HOME || "/",
23515
- ".npm",
23516
- "eresolve-report.txt"
23644
+ const maySeeDynamicRequireYarnBug = process.env?.ENABLE_EXPERIMENTAL_COREPACK && packageJson?.packageManager?.startsWith("yarn") && packageJson?.type === "module";
23645
+ if (maySeeDynamicRequireYarnBug) {
23646
+ console.warn(
23647
+ `Warning: This project may see "Error: Dynamic require of "util" is not supported". To avoid this error, remove \`"type": "module"\` from your package.json file, or use \`yarnPath\` instead of Corepack. Learn more: https://vercel.com/docs/errors/error-list#yarn-dynamic-require-of-util-is-not-supported`
23517
23648
  );
23518
- if (isPotentiallyBrokenNpm && !commandArgs.includes("--legacy-peer-deps") && import_fs_extra7.default.existsSync(potentialErrorPath)) {
23519
- console.warn(
23520
- 'Warning: Retrying "Install Command" with `--legacy-peer-deps` which may accept a potentially broken dependency and slow install time.'
23521
- );
23522
- commandArgs.push("--legacy-peer-deps");
23523
- await spawnAsync(cliType, commandArgs, opts);
23524
- } else {
23525
- throw err;
23526
- }
23527
23649
  }
23650
+ await runInstallCommand({
23651
+ packageManager: cliType,
23652
+ args,
23653
+ opts
23654
+ });
23528
23655
  debug(`Install complete [${Date.now() - installTime}ms]`);
23529
23656
  return true;
23530
23657
  } finally {
@@ -23538,7 +23665,8 @@ function getEnvForPackageManager({
23538
23665
  nodeVersion,
23539
23666
  env,
23540
23667
  packageJsonEngines,
23541
- turboSupportsCorepackHome
23668
+ turboSupportsCorepackHome,
23669
+ projectCreatedAt
23542
23670
  }) {
23543
23671
  const corepackEnabled = usingCorepack(
23544
23672
  env,
@@ -23555,7 +23683,8 @@ function getEnvForPackageManager({
23555
23683
  corepackPackageManager: packageJsonPackageManager,
23556
23684
  nodeVersion,
23557
23685
  corepackEnabled,
23558
- packageJsonEngines
23686
+ packageJsonEngines,
23687
+ projectCreatedAt
23559
23688
  });
23560
23689
  if (corepackEnabled) {
23561
23690
  debug(
@@ -23577,10 +23706,26 @@ function getEnvForPackageManager({
23577
23706
  const oldPath = env.PATH + "";
23578
23707
  newEnv.PATH = `${newPath}${import_path5.default.delimiter}${oldPath}`;
23579
23708
  if (detectedLockfile && detectedPackageManager) {
23580
- const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
23581
- console.log(
23582
- `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
23583
- );
23709
+ const detectedV9PnpmLockfile = detectedLockfile === "pnpm-lock.yaml" && lockfileVersion === 9;
23710
+ const pnpm10UsingPackageJsonPackageManager = detectedPackageManager === "pnpm@10.x" && packageJsonPackageManager;
23711
+ if (pnpm10UsingPackageJsonPackageManager) {
23712
+ const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
23713
+ console.log(
23714
+ `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager} with package.json#packageManager ${packageJsonPackageManager}`
23715
+ );
23716
+ } else if (detectedV9PnpmLockfile) {
23717
+ const otherVersion = detectedPackageManager === "pnpm@10.x" ? `pnpm@9.x` : `pnpm@10.x`;
23718
+ console.log(
23719
+ `Detected \`${detectedLockfile}\` ${lockfileVersion} which may be generated by pnpm@9.x or pnpm@10.x
23720
+ Using ${detectedPackageManager} based on project creation date
23721
+ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)`
23722
+ );
23723
+ } else {
23724
+ const versionString = cliType === "pnpm" ? `version ${lockfileVersion} ` : "";
23725
+ console.log(
23726
+ `Detected \`${detectedLockfile}\` ${versionString}generated by ${detectedPackageManager}`
23727
+ );
23728
+ }
23584
23729
  if (cliType === "bun") {
23585
23730
  console.warn(
23586
23731
  "Warning: Bun is used as a package manager at build time only, not at runtime with Functions"
@@ -23593,7 +23738,8 @@ function getEnvForPackageManager({
23593
23738
  }
23594
23739
  return newEnv;
23595
23740
  }
23596
- function detectPnpmVersion(lockfileVersion) {
23741
+ var PNPM_10_PREFERRED_AT = /* @__PURE__ */ new Date("2025-02-27T20:00:00Z");
23742
+ function detectPnpmVersion(lockfileVersion, projectCreatedAt) {
23597
23743
  switch (true) {
23598
23744
  case lockfileVersion === void 0:
23599
23745
  return "not found";
@@ -23603,21 +23749,42 @@ function detectPnpmVersion(lockfileVersion) {
23603
23749
  return "pnpm 7";
23604
23750
  case (lockfileVersion === 6 || lockfileVersion === 6.1):
23605
23751
  return "pnpm 8";
23606
- case (lockfileVersion === 7 || lockfileVersion === 9):
23752
+ case lockfileVersion === 7:
23607
23753
  return "pnpm 9";
23754
+ case lockfileVersion === 9: {
23755
+ const projectPrefersPnpm10 = projectCreatedAt && projectCreatedAt >= PNPM_10_PREFERRED_AT.getTime();
23756
+ return projectPrefersPnpm10 ? "pnpm 10" : "pnpm 9";
23757
+ }
23608
23758
  default:
23609
23759
  return "not found";
23610
23760
  }
23611
23761
  }
23762
+ function detectYarnVersion(lockfileVersion) {
23763
+ if (lockfileVersion) {
23764
+ if ([1].includes(lockfileVersion)) {
23765
+ return "yarn@1.x";
23766
+ } else if ([4, 5].includes(lockfileVersion)) {
23767
+ return "yarn@2.x";
23768
+ } else if ([6, 7].includes(lockfileVersion)) {
23769
+ return "yarn@3.x";
23770
+ } else if ([8].includes(lockfileVersion)) {
23771
+ return "yarn@4.x";
23772
+ }
23773
+ }
23774
+ return "unknown yarn";
23775
+ }
23612
23776
  function validLockfileForPackageManager(cliType, lockfileVersion, packageManagerVersion) {
23613
23777
  const packageManagerMajorVersion = packageManagerVersion.major;
23614
23778
  switch (cliType) {
23615
23779
  case "npm":
23616
23780
  case "bun":
23617
23781
  case "yarn":
23782
+ case "vlt":
23618
23783
  return true;
23619
23784
  case "pnpm":
23620
23785
  switch (packageManagerMajorVersion) {
23786
+ case 10:
23787
+ return lockfileVersion === 9;
23621
23788
  case 9:
23622
23789
  if ("9.0.0" === packageManagerVersion.version && lockfileVersion === 6) {
23623
23790
  return false;
@@ -23639,25 +23806,34 @@ function getPathOverrideForPackageManager({
23639
23806
  lockfileVersion,
23640
23807
  corepackPackageManager,
23641
23808
  corepackEnabled = true,
23642
- packageJsonEngines
23809
+ packageJsonEngines,
23810
+ projectCreatedAt
23643
23811
  }) {
23644
- const detectedPackageManger = detectPackageManager(cliType, lockfileVersion);
23645
- if (!corepackPackageManager || !corepackEnabled) {
23646
- if (cliType === "pnpm" && packageJsonEngines?.pnpm) {
23812
+ const detectedPackageManger = detectPackageManager(
23813
+ cliType,
23814
+ lockfileVersion,
23815
+ projectCreatedAt
23816
+ );
23817
+ const usingCorepack2 = corepackPackageManager && corepackEnabled;
23818
+ if (usingCorepack2) {
23819
+ validateCorepackPackageManager(
23820
+ cliType,
23821
+ lockfileVersion,
23822
+ corepackPackageManager,
23823
+ packageJsonEngines?.pnpm
23824
+ );
23825
+ return NO_OVERRIDE;
23826
+ }
23827
+ if (cliType === "pnpm" && packageJsonEngines?.pnpm) {
23828
+ const usingDetected = detectedPackageManger?.pnpmVersionRange !== "10.x" || !corepackPackageManager;
23829
+ if (usingDetected) {
23647
23830
  checkEnginesPnpmAgainstDetected(
23648
23831
  packageJsonEngines.pnpm,
23649
23832
  detectedPackageManger
23650
23833
  );
23651
23834
  }
23652
- return detectedPackageManger ?? NO_OVERRIDE;
23653
23835
  }
23654
- validateCorepackPackageManager(
23655
- cliType,
23656
- lockfileVersion,
23657
- corepackPackageManager,
23658
- packageJsonEngines?.pnpm
23659
- );
23660
- return NO_OVERRIDE;
23836
+ return detectedPackageManger ?? NO_OVERRIDE;
23661
23837
  }
23662
23838
  function checkEnginesPnpmAgainstDetected(enginesPnpm, detectedPackageManger) {
23663
23839
  if (detectedPackageManger?.pnpmVersionRange && (0, import_semver2.validRange)(detectedPackageManger.pnpmVersionRange) && (0, import_semver2.validRange)(enginesPnpm)) {
@@ -23732,12 +23908,12 @@ function validateVersionSpecifier(version) {
23732
23908
  packageVersion
23733
23909
  };
23734
23910
  }
23735
- function detectPackageManager(cliType, lockfileVersion) {
23911
+ function detectPackageManager(cliType, lockfileVersion, projectCreatedAt) {
23736
23912
  switch (cliType) {
23737
23913
  case "npm":
23738
23914
  return void 0;
23739
23915
  case "pnpm":
23740
- switch (detectPnpmVersion(lockfileVersion)) {
23916
+ switch (detectPnpmVersion(lockfileVersion, projectCreatedAt)) {
23741
23917
  case "pnpm 7":
23742
23918
  return {
23743
23919
  path: "/pnpm7/node_modules/.bin",
@@ -23759,10 +23935,16 @@ function detectPackageManager(cliType, lockfileVersion) {
23759
23935
  detectedPackageManager: "pnpm@9.x",
23760
23936
  pnpmVersionRange: "9.x"
23761
23937
  };
23938
+ case "pnpm 10":
23939
+ return {
23940
+ path: "/pnpm10/node_modules/.bin",
23941
+ detectedLockfile: "pnpm-lock.yaml",
23942
+ detectedPackageManager: "pnpm@10.x",
23943
+ pnpmVersionRange: "10.x"
23944
+ };
23762
23945
  case "pnpm 6":
23763
23946
  return {
23764
- // undefined because pnpm@6 is the current default in the build container
23765
- path: void 0,
23947
+ path: "/pnpm6/node_modules/.bin",
23766
23948
  detectedLockfile: "pnpm-lock.yaml",
23767
23949
  detectedPackageManager: "pnpm@6.x",
23768
23950
  pnpmVersionRange: "6.x"
@@ -23780,7 +23962,13 @@ function detectPackageManager(cliType, lockfileVersion) {
23780
23962
  return {
23781
23963
  path: void 0,
23782
23964
  detectedLockfile: "yarn.lock",
23783
- detectedPackageManager: "yarn"
23965
+ detectedPackageManager: detectYarnVersion(lockfileVersion)
23966
+ };
23967
+ case "vlt":
23968
+ return {
23969
+ path: void 0,
23970
+ detectedLockfile: "vlt-lock.json",
23971
+ detectedPackageManager: "vlt@0.x"
23784
23972
  };
23785
23973
  }
23786
23974
  }
@@ -23822,7 +24010,8 @@ async function runCustomInstallCommand({
23822
24010
  destPath,
23823
24011
  installCommand,
23824
24012
  nodeVersion,
23825
- spawnOpts
24013
+ spawnOpts,
24014
+ projectCreatedAt
23826
24015
  }) {
23827
24016
  console.log(`Running "install" command: \`${installCommand}\`...`);
23828
24017
  const {
@@ -23839,7 +24028,8 @@ async function runCustomInstallCommand({
23839
24028
  nodeVersion,
23840
24029
  env: spawnOpts?.env || {},
23841
24030
  packageJsonEngines: packageJson?.engines,
23842
- turboSupportsCorepackHome
24031
+ turboSupportsCorepackHome,
24032
+ projectCreatedAt
23843
24033
  });
23844
24034
  debug(`Running with $PATH:`, env?.PATH || "");
23845
24035
  await execCommand(installCommand, {
@@ -23848,7 +24038,7 @@ async function runCustomInstallCommand({
23848
24038
  cwd: destPath
23849
24039
  });
23850
24040
  }
23851
- async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
24041
+ async function runPackageJsonScript(destPath, scriptNames, spawnOpts, projectCreatedAt) {
23852
24042
  (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
23853
24043
  const {
23854
24044
  packageJson,
@@ -23875,7 +24065,8 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
23875
24065
  nodeVersion: void 0,
23876
24066
  env: cloneEnv(process.env, spawnOpts?.env),
23877
24067
  packageJsonEngines: packageJson?.engines,
23878
- turboSupportsCorepackHome
24068
+ turboSupportsCorepackHome,
24069
+ projectCreatedAt
23879
24070
  })
23880
24071
  };
23881
24072
  if (cliType === "npm") {
@@ -23884,6 +24075,8 @@ async function runPackageJsonScript(destPath, scriptNames, spawnOpts) {
23884
24075
  opts.prettyCommand = `pnpm run ${scriptName}`;
23885
24076
  } else if (cliType === "bun") {
23886
24077
  opts.prettyCommand = `bun run ${scriptName}`;
24078
+ } else if (cliType === "vlt") {
24079
+ opts.prettyCommand = `vlt run ${scriptName}`;
23887
24080
  } else {
23888
24081
  opts.prettyCommand = `yarn run ${scriptName}`;
23889
24082
  }
@@ -23997,9 +24190,12 @@ function getPrefixedEnvVars({
23997
24190
  const allowed = [
23998
24191
  "VERCEL_URL",
23999
24192
  "VERCEL_ENV",
24193
+ "VERCEL_TARGET_ENV",
24000
24194
  "VERCEL_REGION",
24001
24195
  "VERCEL_BRANCH_URL",
24002
- "VERCEL_PROJECT_PRODUCTION_URL"
24196
+ "VERCEL_PROJECT_PRODUCTION_URL",
24197
+ "VERCEL_DEPLOYMENT_ID",
24198
+ "VERCEL_PROJECT_ID"
24003
24199
  ];
24004
24200
  const newEnvs = {};
24005
24201
  if (envPrefix && envs.VERCEL_URL) {
@@ -24170,6 +24366,37 @@ function hasProp(obj, key) {
24170
24366
  }
24171
24367
 
24172
24368
  // src/schemas.ts
24369
+ var triggerEventSchema = {
24370
+ type: "object",
24371
+ properties: {
24372
+ type: {
24373
+ type: "string",
24374
+ const: "queue/v1beta"
24375
+ },
24376
+ topic: {
24377
+ type: "string",
24378
+ minLength: 1
24379
+ },
24380
+ consumer: {
24381
+ type: "string",
24382
+ minLength: 1
24383
+ },
24384
+ maxDeliveries: {
24385
+ type: "number",
24386
+ minimum: 1
24387
+ },
24388
+ retryAfterSeconds: {
24389
+ type: "number",
24390
+ exclusiveMinimum: 0
24391
+ },
24392
+ initialDelaySeconds: {
24393
+ type: "number",
24394
+ minimum: 0
24395
+ }
24396
+ },
24397
+ required: ["type", "topic", "consumer"],
24398
+ additionalProperties: false
24399
+ };
24173
24400
  var functionsSchema = {
24174
24401
  type: "object",
24175
24402
  minProperties: 1,
@@ -24180,13 +24407,17 @@ var functionsSchema = {
24180
24407
  type: "object",
24181
24408
  additionalProperties: false,
24182
24409
  properties: {
24410
+ architecture: {
24411
+ type: "string",
24412
+ enum: ["x86_64", "arm64"]
24413
+ },
24183
24414
  runtime: {
24184
24415
  type: "string",
24185
24416
  maxLength: 256
24186
24417
  },
24187
24418
  memory: {
24188
24419
  minimum: 128,
24189
- maximum: 3009
24420
+ maximum: 10240
24190
24421
  },
24191
24422
  maxDuration: {
24192
24423
  type: "number",
@@ -24200,6 +24431,13 @@ var functionsSchema = {
24200
24431
  excludeFiles: {
24201
24432
  type: "string",
24202
24433
  maxLength: 256
24434
+ },
24435
+ experimentalTriggers: {
24436
+ type: "array",
24437
+ items: triggerEventSchema
24438
+ },
24439
+ supportsCancellation: {
24440
+ type: "boolean"
24203
24441
  }
24204
24442
  }
24205
24443
  }