vercel 54.9.1 → 54.10.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 (57) hide show
  1. package/dist/chunks/{add-DLK472F2.js → add-5DY5F6KR.js} +5 -5
  2. package/dist/chunks/{chunk-LZQB35VT.js → chunk-3QEUKH37.js} +1 -1
  3. package/dist/chunks/{chunk-NHT3AQHJ.js → chunk-6B7TYTF6.js} +4 -4
  4. package/dist/chunks/{chunk-6TKGW3ER.js → chunk-6ESIT3CL.js} +1 -1
  5. package/dist/chunks/{chunk-SZB6YXTE.js → chunk-6UWHSMGM.js} +2 -2
  6. package/dist/chunks/{chunk-WBGELPB3.js → chunk-7V42ARD4.js} +6 -6
  7. package/dist/chunks/{chunk-CSYB45VZ.js → chunk-ERHL5CQY.js} +67 -9
  8. package/dist/chunks/{chunk-7BNN27HP.js → chunk-GPBBIDQ5.js} +1 -1
  9. package/dist/chunks/{chunk-H3M6DIPE.js → chunk-GSR2GQLJ.js} +1946 -191
  10. package/dist/chunks/{chunk-J5JWEUV2.js → chunk-IUBY6GNH.js} +1 -1
  11. package/dist/chunks/{chunk-DPXUXH7G.js → chunk-J5273CSE.js} +2 -2
  12. package/dist/chunks/{chunk-WA3URLW4.js → chunk-J763BFOA.js} +1 -1
  13. package/dist/chunks/{chunk-BTHBAHZ7.js → chunk-JK7NBOHR.js} +1 -1
  14. package/dist/chunks/{chunk-5DEFO6LE.js → chunk-LFHOOCSD.js} +2 -2
  15. package/dist/chunks/{chunk-BR7Z2MXT.js → chunk-MBDHDIBC.js} +6 -6
  16. package/dist/chunks/{chunk-KXIQF76V.js → chunk-PAB6JAI7.js} +1 -1
  17. package/dist/chunks/{chunk-KV23GR7J.js → chunk-PV533MBH.js} +1 -1
  18. package/dist/chunks/{chunk-OZLTZQ6G.js → chunk-R3OUWO35.js} +10 -3
  19. package/dist/chunks/{chunk-2WIR65ZA.js → chunk-SHWTWKFP.js} +127 -93
  20. package/dist/chunks/{chunk-TS7YAK5A.js → chunk-TMD7R76P.js} +1 -1
  21. package/dist/chunks/{chunk-5ZJHY4AC.js → chunk-VNUNCNPE.js} +1 -1
  22. package/dist/chunks/{chunk-5MNBLHCW.js → chunk-WBFTHBNH.js} +1 -1
  23. package/dist/chunks/{chunk-TAHQ6VAS.js → chunk-WFRHKZFI.js} +2 -1
  24. package/dist/chunks/{chunk-BBJUIDZF.js → chunk-YI3JV6GM.js} +3 -3
  25. package/dist/chunks/{chunk-ZOEYFRYV.js → chunk-YSBVITVJ.js} +3 -3
  26. package/dist/chunks/{compile-vercel-config-6DRMFWMC.js → compile-vercel-config-E3BX5VFO.js} +2 -2
  27. package/dist/chunks/{delete-IJ6VXN3J.js → delete-RKFK2KFA.js} +4 -4
  28. package/dist/chunks/{disable-YD3NZSGK.js → disable-RD33Y4KE.js} +4 -4
  29. package/dist/chunks/{discard-VFWKNLCW.js → discard-ITS7653Z.js} +4 -4
  30. package/dist/chunks/{edit-3UMHPT2N.js → edit-ANQBSFXA.js} +6 -6
  31. package/dist/chunks/{enable-OM55GDFZ.js → enable-7WGWM77Y.js} +4 -4
  32. package/dist/chunks/{exec-JSOL4CYJ.js → exec-HI4HF4GY.js} +1 -1
  33. package/dist/chunks/{export-LSEMLHHU.js → export-VTGALJ7L.js} +4 -4
  34. package/dist/chunks/{inspect-ZMNYUC4I.js → inspect-3CNYVFQE.js} +4 -4
  35. package/dist/chunks/{list-ZBRTOAFQ.js → list-B4QVO4HZ.js} +4 -4
  36. package/dist/chunks/{list-GIAM3YSQ.js → list-G634SMGU.js} +3 -3
  37. package/dist/chunks/{ls-NDRKV5AX.js → ls-OY7LDCQP.js} +5 -5
  38. package/dist/chunks/{publish-T3LIYYM2.js → publish-VATWAP53.js} +4 -4
  39. package/dist/chunks/{query-ZPH4RM2S.js → query-S26UM5S4.js} +3 -3
  40. package/dist/chunks/{reorder-E53AAA3P.js → reorder-7WO5ZX6S.js} +4 -4
  41. package/dist/chunks/{restore-4HJU6B2V.js → restore-WXOV5IWA.js} +4 -4
  42. package/dist/chunks/{rm-ZOVPEOPT.js → rm-FT6BU2BM.js} +5 -5
  43. package/dist/chunks/{routes-3OHKNMGT.js → routes-EAMQVFU2.js} +2 -2
  44. package/dist/chunks/{rule-inspect-UMFXT335.js → rule-inspect-7WQCBK25.js} +5 -5
  45. package/dist/chunks/{rules-LUJB7CCT.js → rules-J5RKONBR.js} +6 -6
  46. package/dist/chunks/{schema-VKBUX74S.js → schema-7W6TY5ST.js} +3 -3
  47. package/dist/chunks/{update-G6D7GNBJ.js → update-GKAXCULF.js} +5 -5
  48. package/dist/commands/build/index.js +332 -111
  49. package/dist/commands/deploy/index.js +13 -13
  50. package/dist/commands/dev/index.js +31 -16
  51. package/dist/commands/env/index.js +8 -8
  52. package/dist/commands/link/index.js +10 -10
  53. package/dist/commands/list/index.js +5 -5
  54. package/dist/commands-bulk.js +697 -89
  55. package/dist/index.js +12 -12
  56. package/dist/version.mjs +1 -1
  57. package/package.json +21 -21
@@ -9,8 +9,8 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-LZQB35VT.js";
13
- import "./chunk-5DEFO6LE.js";
12
+ } from "./chunk-3QEUKH37.js";
13
+ import "./chunk-LFHOOCSD.js";
14
14
  import "./chunk-5SYDEK2N.js";
15
15
  import {
16
16
  validateJsonOutput
@@ -21,9 +21,9 @@ import {
21
21
  import {
22
22
  AGENT_REASON
23
23
  } from "./chunk-LJ5WXXG6.js";
24
- import "./chunk-WA3URLW4.js";
25
- import "./chunk-H3M6DIPE.js";
26
- import "./chunk-DPXUXH7G.js";
24
+ import "./chunk-J763BFOA.js";
25
+ import "./chunk-GSR2GQLJ.js";
26
+ import "./chunk-J5273CSE.js";
27
27
  import {
28
28
  buildCommandWithGlobalFlags,
29
29
  outputAgentError
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveAlertsScope
9
- } from "./chunk-5DEFO6LE.js";
9
+ } from "./chunk-LFHOOCSD.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
@@ -9,7 +9,7 @@ import {
9
9
  printIndications,
10
10
  require_dist as require_dist2,
11
11
  sleep
12
- } from "./chunk-OZLTZQ6G.js";
12
+ } from "./chunk-R3OUWO35.js";
13
13
  import {
14
14
  suggestNextCommands
15
15
  } from "./chunk-LKBI43XK.js";
@@ -19,10 +19,10 @@ import {
19
19
  } from "./chunk-TCF6MGBY.js";
20
20
  import {
21
21
  CommandTimeout
22
- } from "./chunk-2WIR65ZA.js";
22
+ } from "./chunk-SHWTWKFP.js";
23
23
  import {
24
24
  getScope
25
- } from "./chunk-WA3URLW4.js";
25
+ } from "./chunk-J763BFOA.js";
26
26
  import {
27
27
  getProjectByNameOrId,
28
28
  param,
@@ -31,7 +31,7 @@ import {
31
31
  require_pluralize,
32
32
  showPluginTipIfNeeded,
33
33
  ua_default
34
- } from "./chunk-H3M6DIPE.js";
34
+ } from "./chunk-GSR2GQLJ.js";
35
35
  import {
36
36
  require_ms,
37
37
  stamp_default
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_lib
9
- } from "./chunk-H3M6DIPE.js";
9
+ } from "./chunk-GSR2GQLJ.js";
10
10
  import {
11
11
  packageName
12
12
  } from "./chunk-LN6B7ZI3.js";
@@ -7,12 +7,12 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  printProjectNotFoundError,
9
9
  setupAndLink
10
- } from "./chunk-ZOEYFRYV.js";
10
+ } from "./chunk-YSBVITVJ.js";
11
11
  import {
12
12
  getLinkedProject,
13
13
  param,
14
14
  resolveProjectCwd
15
- } from "./chunk-H3M6DIPE.js";
15
+ } from "./chunk-GSR2GQLJ.js";
16
16
  import {
17
17
  buildCommandWithYes,
18
18
  outputActionRequired
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  writeProjectSettings
9
- } from "./chunk-KXIQF76V.js";
9
+ } from "./chunk-PAB6JAI7.js";
10
10
  import {
11
11
  ensureLink
12
- } from "./chunk-SZB6YXTE.js";
12
+ } from "./chunk-6UWHSMGM.js";
13
13
  import {
14
14
  pullCommand
15
- } from "./chunk-7BNN27HP.js";
15
+ } from "./chunk-GPBBIDQ5.js";
16
16
  import {
17
17
  help
18
- } from "./chunk-5ZJHY4AC.js";
18
+ } from "./chunk-VNUNCNPE.js";
19
19
  import {
20
20
  VERCEL_DIR,
21
21
  VERCEL_DIR_PROJECT,
@@ -23,10 +23,10 @@ import {
23
23
  envPullCommandLogic,
24
24
  humanizePath,
25
25
  parseTarget
26
- } from "./chunk-H3M6DIPE.js";
26
+ } from "./chunk-GSR2GQLJ.js";
27
27
  import {
28
28
  TelemetryClient
29
- } from "./chunk-DPXUXH7G.js";
29
+ } from "./chunk-J5273CSE.js";
30
30
  import {
31
31
  stamp_default
32
32
  } from "./chunk-CO5D46AG.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IB5L4LKZ.js";
10
10
  import {
11
11
  require_execa
12
- } from "./chunk-BBJUIDZF.js";
12
+ } from "./chunk-YI3JV6GM.js";
13
13
  import {
14
14
  VERCEL_DIR,
15
15
  readJSONFile,
@@ -18,7 +18,7 @@ import {
18
18
  require_lib,
19
19
  require_minimatch,
20
20
  require_pluralize
21
- } from "./chunk-H3M6DIPE.js";
21
+ } from "./chunk-GSR2GQLJ.js";
22
22
  import {
23
23
  CantParseJSONFile,
24
24
  cmd,
@@ -11227,6 +11227,7 @@ import {
11227
11227
  normalizePath,
11228
11228
  isBackendBuilder,
11229
11229
  isExperimentalBackendsEnabled,
11230
+ isExperimentalService,
11230
11231
  isExternalSymlink
11231
11232
  } from "@vercel/build-utils";
11232
11233
 
@@ -11355,6 +11356,12 @@ function getExtractedMode(entryMode, isDir) {
11355
11356
  var import_client2 = __toESM(require_dist2(), 1);
11356
11357
  var { normalize } = posix;
11357
11358
  var OUTPUT_DIR = join4(VERCEL_DIR, "output");
11359
+ var BUILD_OUTPUT_API_ENTRIES = [
11360
+ "config.json",
11361
+ "functions",
11362
+ "routes",
11363
+ "static"
11364
+ ];
11358
11365
  async function writeBuildResult(args) {
11359
11366
  const {
11360
11367
  repoRootPath,
@@ -11367,8 +11374,10 @@ async function writeBuildResult(args) {
11367
11374
  standalone,
11368
11375
  workPath,
11369
11376
  service,
11377
+ nestServiceOutput = false,
11370
11378
  stripServiceRoutePrefix = false
11371
11379
  } = args;
11380
+ const writeOutputDir = service && nestServiceOutput ? getServiceOutputDir(outputDir, service) : outputDir;
11372
11381
  let version2;
11373
11382
  let actualResult;
11374
11383
  if (builder.version === -1) {
@@ -11382,25 +11391,27 @@ async function writeBuildResult(args) {
11382
11391
  if (typeof version2 !== "number" || version2 === 2) {
11383
11392
  return writeBuildResultV2({
11384
11393
  repoRootPath,
11385
- outputDir,
11394
+ outputDir: writeOutputDir,
11386
11395
  buildResult: actualResult,
11387
11396
  build: build2,
11388
11397
  vercelConfig,
11389
11398
  standalone,
11390
11399
  workPath,
11391
11400
  service,
11401
+ rootOutputDir: outputDir,
11392
11402
  stripServiceRoutePrefix
11393
11403
  });
11394
11404
  } else if (version2 === 3) {
11395
11405
  return writeBuildResultV3({
11396
11406
  repoRootPath,
11397
- outputDir,
11407
+ outputDir: writeOutputDir,
11398
11408
  buildResult: actualResult,
11399
11409
  build: build2,
11400
11410
  vercelConfig,
11401
11411
  standalone,
11402
11412
  workPath,
11403
11413
  service,
11414
+ rootOutputDir: outputDir,
11404
11415
  stripServiceRoutePrefix
11405
11416
  });
11406
11417
  }
@@ -11441,6 +11452,17 @@ function injectServiceEnvVars(lambda, service, stripServiceRoutePrefix = false)
11441
11452
  function stripDuplicateSlashes(path2) {
11442
11453
  return normalize(path2).replace(/(^\/|\/$)/g, "");
11443
11454
  }
11455
+ function getServiceOutputDir(outputDir, service) {
11456
+ return join4(outputDir, "services", service.name);
11457
+ }
11458
+ async function relocateRootBuildOutputToService(args) {
11459
+ const { outputDir, service, workPath } = args;
11460
+ await relocateBuildOutputApiEntries(
11461
+ outputDir,
11462
+ getServiceOutputDir(outputDir, service),
11463
+ workPath
11464
+ );
11465
+ }
11444
11466
  async function writeBuildResultV2(args) {
11445
11467
  const {
11446
11468
  repoRootPath,
@@ -11451,10 +11473,11 @@ async function writeBuildResultV2(args) {
11451
11473
  standalone,
11452
11474
  workPath,
11453
11475
  service,
11476
+ rootOutputDir,
11454
11477
  stripServiceRoutePrefix
11455
11478
  } = args;
11456
11479
  if ("buildOutputPath" in buildResult) {
11457
- await mergeBuilderOutput(outputDir, buildResult, workPath);
11480
+ await mergeBuilderOutput(outputDir, buildResult, workPath, rootOutputDir);
11458
11481
  return;
11459
11482
  }
11460
11483
  if (!buildResult.output) {
@@ -11469,7 +11492,11 @@ async function writeBuildResultV2(args) {
11469
11492
  for (const [path2, output] of Object.entries(buildResult.output)) {
11470
11493
  const normalizedPath = stripDuplicateSlashes(path2);
11471
11494
  if (isLambda(output)) {
11472
- injectServiceEnvVars(output, service, stripServiceRoutePrefix);
11495
+ injectServiceEnvVars(
11496
+ output,
11497
+ service && isExperimentalService(service) ? service : void 0,
11498
+ stripServiceRoutePrefix
11499
+ );
11473
11500
  await writeLambda(
11474
11501
  repoRootPath,
11475
11502
  outputDir,
@@ -11565,6 +11592,7 @@ async function writeBuildResultV3(args) {
11565
11592
  standalone,
11566
11593
  workPath,
11567
11594
  service,
11595
+ rootOutputDir,
11568
11596
  stripServiceRoutePrefix
11569
11597
  } = args;
11570
11598
  const { output } = buildResult;
@@ -11595,6 +11623,7 @@ async function writeBuildResultV3(args) {
11595
11623
  standalone,
11596
11624
  workPath,
11597
11625
  service,
11626
+ rootOutputDir,
11598
11627
  stripServiceRoutePrefix
11599
11628
  });
11600
11629
  } catch (error) {
@@ -11611,6 +11640,7 @@ async function writeBuildResultV3(args) {
11611
11640
  standalone,
11612
11641
  workPath,
11613
11642
  service,
11643
+ rootOutputDir,
11614
11644
  stripServiceRoutePrefix
11615
11645
  });
11616
11646
  }
@@ -11628,7 +11658,11 @@ async function writeBuildResultV3(args) {
11628
11658
  build2.config?.zeroConfig ? src.substring(0, src.length - ext.length) : src
11629
11659
  );
11630
11660
  if (isLambda(output)) {
11631
- injectServiceEnvVars(output, service, stripServiceRoutePrefix);
11661
+ injectServiceEnvVars(
11662
+ output,
11663
+ service && isExperimentalService(service) ? service : void 0,
11664
+ stripServiceRoutePrefix
11665
+ );
11632
11666
  await writeLambda(
11633
11667
  repoRootPath,
11634
11668
  outputDir,
@@ -11812,8 +11846,9 @@ async function writeLambda(repoRootPath, outputDir, lambda, path2, functionConfi
11812
11846
  }
11813
11847
  }
11814
11848
  }
11815
- async function mergeBuilderOutput(outputDir, buildResult, workPath) {
11849
+ async function mergeBuilderOutput(outputDir, buildResult, workPath, rootOutputDir) {
11816
11850
  const absOutputDir = resolve2(outputDir);
11851
+ const absRootOutputDir = resolve2(rootOutputDir);
11817
11852
  const { ig } = await (0, import_client2.getVercelIgnore)(workPath);
11818
11853
  const filter = ig.createFilter();
11819
11854
  if (absOutputDir === buildResult.buildOutputPath) {
@@ -11826,6 +11861,10 @@ async function mergeBuilderOutput(outputDir, buildResult, workPath) {
11826
11861
  }
11827
11862
  return;
11828
11863
  }
11864
+ if (resolve2(buildResult.buildOutputPath) === absRootOutputDir) {
11865
+ await relocateBuildOutputApiEntries(rootOutputDir, outputDir, workPath);
11866
+ return;
11867
+ }
11829
11868
  const ignoreFilter = (path2) => {
11830
11869
  const normalizedPath = path2.replace(/\\/g, "/");
11831
11870
  if (normalizedPath.startsWith("static/")) {
@@ -11835,6 +11874,24 @@ async function mergeBuilderOutput(outputDir, buildResult, workPath) {
11835
11874
  };
11836
11875
  await merge(buildResult.buildOutputPath, outputDir, ignoreFilter);
11837
11876
  }
11877
+ async function relocateBuildOutputApiEntries(rootOutputDir, outputDir, workPath) {
11878
+ const { ig } = await (0, import_client2.getVercelIgnore)(workPath);
11879
+ const filter = ig.createFilter();
11880
+ await import_fs_extra5.default.mkdirp(outputDir);
11881
+ await Promise.all(
11882
+ BUILD_OUTPUT_API_ENTRIES.map(async (entry) => {
11883
+ const src = join4(rootOutputDir, entry);
11884
+ if (!await import_fs_extra5.default.pathExists(src))
11885
+ return;
11886
+ const dest = join4(outputDir, entry);
11887
+ if (entry === "static") {
11888
+ await merge(src, dest, (path2) => filter(path2));
11889
+ } else {
11890
+ await merge(src, dest);
11891
+ }
11892
+ })
11893
+ );
11894
+ }
11838
11895
  async function cleanIgnoredFiles(dir, staticRoot, filter) {
11839
11896
  const entries = await import_fs_extra5.default.readdir(dir);
11840
11897
  await Promise.all(
@@ -11943,7 +12000,8 @@ export {
11943
12000
  getStaticServiceSchedules,
11944
12001
  OUTPUT_DIR,
11945
12002
  writeBuildResult,
11946
- isLambda
12003
+ isLambda,
12004
+ relocateRootBuildOutputToService
11947
12005
  };
11948
12006
  /*! Bundled license information:
11949
12007
 
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getEnvTargetPlaceholder
9
- } from "./chunk-H3M6DIPE.js";
9
+ } from "./chunk-GSR2GQLJ.js";
10
10
  import {
11
11
  projectOption,
12
12
  yesOption