vercel 51.5.1 → 51.7.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 (53) hide show
  1. package/dist/chunks/{add-CSYGALLC.js → add-HLIPDOM3.js} +5 -5
  2. package/dist/chunks/{chunk-7V43C2HB.js → chunk-5QNVUXGF.js} +5 -5
  3. package/dist/chunks/{chunk-TY6AGA4P.js → chunk-6GTUL6VG.js} +3 -3
  4. package/dist/chunks/{chunk-GZF6VMKA.js → chunk-BO7LOGQA.js} +4 -4
  5. package/dist/chunks/{chunk-TX6K3Z5E.js → chunk-BXSWMI6W.js} +1 -1
  6. package/dist/chunks/{chunk-LR5Y63NG.js → chunk-HYAMHBSF.js} +1 -1
  7. package/dist/chunks/{chunk-T7LHO6SF.js → chunk-IDDYXD6T.js} +2 -2
  8. package/dist/chunks/{chunk-JHVQUIP6.js → chunk-IS75MWZN.js} +57 -29
  9. package/dist/chunks/{chunk-5I2ESU2C.js → chunk-L7AFYPER.js} +1 -1
  10. package/dist/chunks/{chunk-K3HUUZM5.js → chunk-LGSOFQRC.js} +1 -1
  11. package/dist/chunks/{chunk-QO2ED7OU.js → chunk-LKIVGPRE.js} +5 -2
  12. package/dist/chunks/{chunk-P445TBWL.js → chunk-LOUKPRIS.js} +316 -152
  13. package/dist/chunks/{chunk-7IM2OOGY.js → chunk-QLO5NXAS.js} +1 -1
  14. package/dist/chunks/{chunk-3VIDEX7A.js → chunk-QO6J4DC7.js} +1 -1
  15. package/dist/chunks/{chunk-NJ7GOUCE.js → chunk-QZ3UQIL3.js} +108 -60
  16. package/dist/chunks/{chunk-KAKD6QXJ.js → chunk-T74PTRRA.js} +4 -4
  17. package/dist/chunks/{chunk-EQIXUYBY.js → chunk-V766LKN6.js} +1 -1
  18. package/dist/chunks/chunk-VNDSVCGB.js +2321 -0
  19. package/dist/chunks/{chunk-CXTJ4RY4.js → chunk-WKRF7JKF.js} +1 -1
  20. package/dist/chunks/{chunk-CGTXAXZ4.js → chunk-XKHLPA6V.js} +3 -1
  21. package/dist/chunks/{chunk-KNZNWP2U.js → chunk-YDCXNOCS.js} +3 -3
  22. package/dist/chunks/{chunk-SVYO7LZ5.js → chunk-YKYISUXV.js} +2 -2
  23. package/dist/chunks/{compile-vercel-config-OLTGIW27.js → compile-vercel-config-U4OJGTLE.js} +2 -2
  24. package/dist/chunks/{delete-XAYXXDEB.js → delete-H2OF5N72.js} +3 -3
  25. package/dist/chunks/{disable-PNN5ZWF4.js → disable-Z4ENND33.js} +3 -3
  26. package/dist/chunks/{discard-QUK6T2AQ.js → discard-UQGHXIL4.js} +3 -3
  27. package/dist/chunks/{edit-D2OHUFQ6.js → edit-UFYK3Z3T.js} +4 -4
  28. package/dist/chunks/{enable-SJV7HD2Y.js → enable-2MEB4O5O.js} +3 -3
  29. package/dist/chunks/{export-SN3F75NH.js → export-T5VEXLYZ.js} +3 -3
  30. package/dist/chunks/{inspect-C2ZW7BZA.js → inspect-7CDEJF2U.js} +4 -4
  31. package/dist/chunks/{list-2DKITLDE.js → list-LTDGGY5C.js} +3 -3
  32. package/dist/chunks/{list-EUXU6BVD.js → list-MKMRMDWW.js} +4 -4
  33. package/dist/chunks/{ls-7R3DRCUY.js → ls-GRDKWPVP.js} +5 -5
  34. package/dist/chunks/{publish-HNGKZNDH.js → publish-SMAXMKKV.js} +3 -3
  35. package/dist/chunks/{query-G4SY7VMM.js → query-WGX6PLTN.js} +3 -3
  36. package/dist/chunks/{reorder-Q2LYGVZK.js → reorder-SQ52RGDY.js} +3 -3
  37. package/dist/chunks/{restore-YJUUQLZG.js → restore-P6RHBBEG.js} +3 -3
  38. package/dist/chunks/{rm-XEV4FF6H.js → rm-EDOGYDVM.js} +5 -5
  39. package/dist/chunks/{rule-inspect-JNZMBVJF.js → rule-inspect-GW54LGXF.js} +5 -5
  40. package/dist/chunks/{rules-5PJVEET5.js → rules-MCUCN322.js} +7 -7
  41. package/dist/chunks/{schema-OU7FKPQZ.js → schema-CZ7B2GTS.js} +3 -3
  42. package/dist/chunks/{update-6LXBPVBH.js → update-QHI4MJ6N.js} +5 -5
  43. package/dist/commands/build/index.js +62 -30
  44. package/dist/commands/deploy/index.js +11 -11
  45. package/dist/commands/dev/index.js +75 -44
  46. package/dist/commands/env/index.js +6 -6
  47. package/dist/commands/link/index.js +7 -7
  48. package/dist/commands/list/index.js +4 -4
  49. package/dist/commands-bulk.js +1786 -2567
  50. package/dist/index.js +31 -11
  51. package/dist/version.mjs +1 -1
  52. package/package.json +18 -18
  53. package/dist/chunks/chunk-4T7RWBT7.js +0 -310
@@ -9,10 +9,10 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-T7LHO6SF.js";
13
- import "./chunk-KNZNWP2U.js";
12
+ } from "./chunk-IDDYXD6T.js";
13
+ import "./chunk-YDCXNOCS.js";
14
14
  import "./chunk-HTOH3MSD.js";
15
- import "./chunk-EQIXUYBY.js";
15
+ import "./chunk-V766LKN6.js";
16
16
  import {
17
17
  validateJsonOutput
18
18
  } from "./chunk-XPKWKPWA.js";
@@ -22,12 +22,12 @@ import {
22
22
  import {
23
23
  AGENT_REASON
24
24
  } from "./chunk-E3NE4SKN.js";
25
- import "./chunk-P445TBWL.js";
25
+ import "./chunk-LOUKPRIS.js";
26
26
  import "./chunk-U3WLEFHU.js";
27
27
  import {
28
28
  buildCommandWithGlobalFlags,
29
29
  outputAgentError
30
- } from "./chunk-CGTXAXZ4.js";
30
+ } from "./chunk-XKHLPA6V.js";
31
31
  import "./chunk-CO5D46AG.js";
32
32
  import {
33
33
  getFlagsSpecification,
@@ -9,7 +9,7 @@ import {
9
9
  printIndications,
10
10
  require_dist as require_dist2,
11
11
  sleep
12
- } from "./chunk-KAKD6QXJ.js";
12
+ } from "./chunk-T74PTRRA.js";
13
13
  import {
14
14
  suggestNextCommands
15
15
  } from "./chunk-LOS7HHU3.js";
@@ -19,23 +19,23 @@ import {
19
19
  } from "./chunk-N45K6NXC.js";
20
20
  import {
21
21
  getScope
22
- } from "./chunk-EQIXUYBY.js";
22
+ } from "./chunk-V766LKN6.js";
23
23
  import {
24
24
  CommandTimeout
25
- } from "./chunk-NJ7GOUCE.js";
25
+ } from "./chunk-QZ3UQIL3.js";
26
26
  import {
27
27
  ua_default
28
28
  } from "./chunk-4PQA6H63.js";
29
29
  import {
30
30
  showPluginTipIfNeeded
31
- } from "./chunk-3VIDEX7A.js";
31
+ } from "./chunk-QO6J4DC7.js";
32
32
  import {
33
33
  getProjectByNameOrId,
34
34
  param,
35
35
  require_dist as require_dist3,
36
36
  require_lib3 as require_lib,
37
37
  require_pluralize
38
- } from "./chunk-P445TBWL.js";
38
+ } from "./chunk-LOUKPRIS.js";
39
39
  import {
40
40
  require_ms,
41
41
  stamp_default
@@ -6,16 +6,16 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  setupAndLink
9
- } from "./chunk-JHVQUIP6.js";
9
+ } from "./chunk-IS75MWZN.js";
10
10
  import {
11
11
  getLinkedProject,
12
12
  param,
13
13
  resolveProjectCwd
14
- } from "./chunk-P445TBWL.js";
14
+ } from "./chunk-LOUKPRIS.js";
15
15
  import {
16
16
  buildCommandWithYes,
17
17
  outputActionRequired
18
- } from "./chunk-CGTXAXZ4.js";
18
+ } from "./chunk-XKHLPA6V.js";
19
19
  import {
20
20
  getCommandName,
21
21
  getCommandNamePlain
@@ -6,14 +6,14 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  writeProjectSettings
9
- } from "./chunk-5I2ESU2C.js";
9
+ } from "./chunk-L7AFYPER.js";
10
10
  import {
11
11
  ensureLink
12
- } from "./chunk-TY6AGA4P.js";
12
+ } from "./chunk-6GTUL6VG.js";
13
13
  import {
14
14
  autoInstallVercelPlugin,
15
15
  pullCommand
16
- } from "./chunk-3VIDEX7A.js";
16
+ } from "./chunk-QO6J4DC7.js";
17
17
  import {
18
18
  help
19
19
  } from "./chunk-LDXYSGPZ.js";
@@ -23,7 +23,7 @@ import {
23
23
  envPullCommandLogic,
24
24
  humanizePath,
25
25
  parseTarget
26
- } from "./chunk-P445TBWL.js";
26
+ } from "./chunk-LOUKPRIS.js";
27
27
  import {
28
28
  TelemetryClient
29
29
  } from "./chunk-U3WLEFHU.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  STANDARD_ENVIRONMENTS
9
- } from "./chunk-P445TBWL.js";
9
+ } from "./chunk-LOUKPRIS.js";
10
10
  import {
11
11
  getCommandName,
12
12
  require_lib
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  require_end_of_stream,
9
9
  require_once
10
- } from "./chunk-P445TBWL.js";
10
+ } from "./chunk-LOUKPRIS.js";
11
11
  import {
12
12
  require_signal_exit
13
13
  } from "./chunk-ZQKJVHXY.js";
@@ -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-KNZNWP2U.js";
9
+ } from "./chunk-YDCXNOCS.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  buildCommandWithGlobalFlags,
20
20
  outputAgentError
21
- } from "./chunk-CGTXAXZ4.js";
21
+ } from "./chunk-XKHLPA6V.js";
22
22
 
23
23
  // src/commands/alerts/rules/parse-scope.ts
24
24
  async function parseRulesFlagsAndScope(client, flags, jsonOutput) {
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  getLocalPathConfig
9
- } from "./chunk-K3HUUZM5.js";
9
+ } from "./chunk-LGSOFQRC.js";
10
10
  import {
11
11
  table
12
12
  } from "./chunk-GE6G37P4.js";
@@ -17,6 +17,7 @@ import {
17
17
  compileVercelConfig,
18
18
  createProject,
19
19
  detectProjects,
20
+ findSourceVercelConfigFile,
20
21
  getLinkedProject,
21
22
  getProjectByNameOrId,
22
23
  getServicesConfigWriteBlocker,
@@ -36,7 +37,7 @@ import {
36
37
  selectAndParseRemoteUrl,
37
38
  selectOrg,
38
39
  writeServicesConfig
39
- } from "./chunk-P445TBWL.js";
40
+ } from "./chunk-LOUKPRIS.js";
40
41
  import {
41
42
  printError
42
43
  } from "./chunk-RFMC2QXQ.js";
@@ -144,7 +145,11 @@ async function readConfig(dir) {
144
145
 
145
146
  // src/util/input/display-services.ts
146
147
  var import_frameworks = __toESM(require_frameworks(), 1);
147
- import { getWorkerTopics } from "@vercel/build-utils";
148
+ import {
149
+ getServiceQueueTopics,
150
+ isQueueTriggeredService,
151
+ isScheduleTriggeredService
152
+ } from "@vercel/build-utils";
148
153
  var chalk2 = require_source();
149
154
  var frameworksBySlug = new Map(import_frameworks.frameworkList.map((f) => [f.slug, f]));
150
155
  var frameworkColors = {
@@ -189,10 +194,15 @@ function formatRoutePrefix(routePrefix) {
189
194
  const normalized = routePrefix.startsWith("/") ? routePrefix : `/${routePrefix}`;
190
195
  return `${normalized}/*`;
191
196
  }
197
+ var jobTriggerLabels = {
198
+ queue: "Job/Queue",
199
+ schedule: "Job/Schedule",
200
+ workflow: "Job/Workflow"
201
+ };
192
202
  function getServiceDescriptionInfo(service) {
193
- if (service.type === "cron" || service.type === "worker") {
194
- const typeLabel = service.type === "cron" ? "Cron" : "Worker";
195
- const typeColorFn = service.type === "cron" ? chalk2.yellow : chalk2.magenta;
203
+ if (service.type === "worker" || service.type === "job" || service.type === "cron") {
204
+ const typeLabel = service.type === "worker" ? "Worker" : jobTriggerLabels[service.trigger ?? ""] ?? "Job";
205
+ const typeColorFn = service.type === "worker" ? chalk2.magenta : chalk2.cyan;
196
206
  if (service.runtime) {
197
207
  const runtimeName = service.runtime.charAt(0).toUpperCase() + service.runtime.slice(1);
198
208
  const runtimeColorFn = runtimeColors[service.runtime] || chalk2.yellow;
@@ -215,21 +225,27 @@ function getServiceDescriptionInfo(service) {
215
225
  return { label: "unknown", colorFn: chalk2.dim };
216
226
  }
217
227
  function getServiceTarget(service) {
218
- switch (service.type) {
219
- case "cron":
220
- return `schedule: ${service.schedule ?? "none"}`;
221
- case "worker": {
222
- const topics = getWorkerTopics(service);
223
- return `topics: ${topics.join(", ")}`;
224
- }
225
- default:
226
- return service.routePrefix ? formatRoutePrefix(service.routePrefix) : "no route";
228
+ if (isScheduleTriggeredService(service)) {
229
+ return `schedule: ${service.schedule ?? "none"}`;
227
230
  }
231
+ if (isQueueTriggeredService(service)) {
232
+ const topics = getServiceQueueTopics(service);
233
+ return `topics: ${topics.join(", ")}`;
234
+ }
235
+ if (service.type === "job" && service.trigger === "workflow") {
236
+ return "workflow";
237
+ }
238
+ return service.routePrefix ? formatRoutePrefix(service.routePrefix) : "no route";
228
239
  }
229
240
  function displayDetectedServices(services) {
230
241
  output_manager_default.print(`Detected services:
231
242
  `);
232
- const outputOrder = { web: 0, cron: 1, worker: 2 };
243
+ const outputOrder = {
244
+ web: 0,
245
+ cron: 1,
246
+ job: 1,
247
+ worker: 2
248
+ };
233
249
  const sorted = [...services].sort(
234
250
  (a, b) => (outputOrder[a.type] ?? 3) - (outputOrder[b.type] ?? 3)
235
251
  );
@@ -247,10 +263,12 @@ function displayDetectedServices(services) {
247
263
  output_manager_default.print(`${tableOutput}
248
264
  `);
249
265
  }
250
- function displayServicesConfigNote() {
251
- output_manager_default.print(`
252
- ${chalk2.dim("Services are configured via vercel.json.")}
253
- `);
266
+ function displayServicesConfigNote(configFileName = "vercel.json") {
267
+ output_manager_default.print(
268
+ `
269
+ ${chalk2.dim(`Services are configured via ${configFileName}.`)}
270
+ `
271
+ );
254
272
  }
255
273
  function displayServiceErrors(errors) {
256
274
  for (const error of errors) {
@@ -418,7 +436,7 @@ var settingMap = {
418
436
  framework: "Framework"
419
437
  };
420
438
  var settingKeys = Object.keys(settingMap).sort();
421
- async function editProjectSettings(client, projectSettings, framework, autoConfirm, localConfigurationOverrides) {
439
+ async function editProjectSettings(client, projectSettings, framework, autoConfirm, localConfigurationOverrides, configFileName = "vercel.json") {
422
440
  const settings = Object.assign(
423
441
  {
424
442
  buildCommand: null,
@@ -437,7 +455,8 @@ async function editProjectSettings(client, projectSettings, framework, autoConfi
437
455
  if (localConfigValue)
438
456
  settings[setting] = localConfigValue;
439
457
  }
440
- output_manager_default.print("Local settings detected in vercel.json:\n");
458
+ output_manager_default.print(`Local settings detected in ${configFileName}:
459
+ `);
441
460
  for (const setting of settingKeys) {
442
461
  const override = localConfigurationOverrides[setting];
443
462
  if (override) {
@@ -580,14 +599,14 @@ async function getServicesSetupState(workPath) {
580
599
  inferredServicesWriteBlocker
581
600
  };
582
601
  }
583
- function displayConfiguredServicesSetup(detectServicesResult) {
602
+ function displayConfiguredServicesSetup(detectServicesResult, configFileName = "vercel.json") {
584
603
  if (detectServicesResult.services.length > 0) {
585
604
  displayDetectedServices(detectServicesResult.services);
586
605
  }
587
606
  if (detectServicesResult.errors.length > 0) {
588
607
  displayServiceErrors(detectServicesResult.errors);
589
608
  }
590
- displayServicesConfigNote();
609
+ displayServicesConfigNote(configFileName);
591
610
  }
592
611
  function formatDetectedServicesSummary(services) {
593
612
  if (services.length === 0) {
@@ -672,8 +691,11 @@ async function promptForInferredServicesSetup({
672
691
  if (choice?.type !== "services") {
673
692
  return choice;
674
693
  }
675
- await writeServicesConfig(workPath, inferred.config);
676
- output_manager_default.log("Added services configuration to vercel.json.");
694
+ const { configFileName } = await writeServicesConfig(
695
+ workPath,
696
+ inferred.config
697
+ );
698
+ output_manager_default.log(`Added services configuration to ${configFileName}.`);
677
699
  return { type: "services" };
678
700
  }
679
701
 
@@ -917,6 +939,7 @@ async function setupAndLink(client, path2, {
917
939
  }
918
940
  config.currentTeam = org.type === "team" ? org.id : void 0;
919
941
  const rootServicesSetup = await getServicesSetupState(path2);
942
+ const configFileName = await findSourceVercelConfigFile(path2) ?? "vercel.json";
920
943
  try {
921
944
  let settings = {};
922
945
  let pathWithRootDirectory = path2;
@@ -933,7 +956,10 @@ async function setupAndLink(client, path2, {
933
956
  });
934
957
  }
935
958
  if (rootServicesSetup.hasConfiguredServices) {
936
- displayConfiguredServicesSetup(rootServicesSetup.detectServicesResult);
959
+ displayConfiguredServicesSetup(
960
+ rootServicesSetup.detectServicesResult,
961
+ configFileName
962
+ );
937
963
  settings.framework = "services";
938
964
  } else if (rootInferredServicesChoice?.type === "services") {
939
965
  settings.framework = "services";
@@ -969,7 +995,8 @@ async function setupAndLink(client, path2, {
969
995
  }
970
996
  if (selectedRootServicesSetup?.hasConfiguredServices) {
971
997
  displayConfiguredServicesSetup(
972
- selectedRootServicesSetup.detectServicesResult
998
+ selectedRootServicesSetup.detectServicesResult,
999
+ configFileName
973
1000
  );
974
1001
  settings.framework = "services";
975
1002
  } else if (selectedRootInferredServicesChoice?.type === "services") {
@@ -1007,7 +1034,8 @@ async function setupAndLink(client, path2, {
1007
1034
  {},
1008
1035
  framework,
1009
1036
  autoConfirm,
1010
- localConfigurationOverrides
1037
+ localConfigurationOverrides,
1038
+ configFileName
1011
1039
  );
1012
1040
  }
1013
1041
  }
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-P445TBWL.js";
11
+ } from "./chunk-LOUKPRIS.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-ZQKJVHXY.js";
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  VERCEL_DIR,
9
9
  isVercelTomlEnabled
10
- } from "./chunk-P445TBWL.js";
10
+ } from "./chunk-LOUKPRIS.js";
11
11
  import {
12
12
  getArgs
13
13
  } from "./chunk-RFMC2QXQ.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-IB5L4LKZ.js";
10
10
  import {
11
11
  require_execa
12
- } from "./chunk-LR5Y63NG.js";
12
+ } from "./chunk-HYAMHBSF.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-P445TBWL.js";
21
+ } from "./chunk-LOUKPRIS.js";
22
22
  import {
23
23
  CantParseJSONFile,
24
24
  cmd,
@@ -11397,6 +11397,9 @@ function injectServiceEnvVars(lambda, service, stripServiceRoutePrefix = false)
11397
11397
  if (service?.type) {
11398
11398
  lambda.environment.VERCEL_SERVICE_TYPE = service.type;
11399
11399
  }
11400
+ if (service?.trigger) {
11401
+ lambda.environment.VERCEL_SERVICE_TRIGGER = service.trigger;
11402
+ }
11400
11403
  if (service?.routePrefix && service.routePrefix !== "/") {
11401
11404
  lambda.environment.VERCEL_SERVICE_ROUTE_PREFIX = service.routePrefix;
11402
11405
  }