vercel 54.17.2 → 54.18.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 (62) hide show
  1. package/dist/chunks/{add-ADMRKNTV.js → add-6IFGG2TY.js} +9 -9
  2. package/dist/chunks/chunk-2RVK3DDN.js +224 -0
  3. package/dist/chunks/{chunk-FR2CJ7AV.js → chunk-5ACKBNHW.js} +8 -8
  4. package/dist/chunks/{chunk-CQRLZB3Y.js → chunk-AQIWBG3Y.js} +8 -8
  5. package/dist/chunks/{chunk-U7HYX4V6.js → chunk-AWAUGLOM.js} +4 -4
  6. package/dist/chunks/{chunk-AZP6TNVD.js → chunk-B3VMTJM2.js} +1 -1
  7. package/dist/chunks/{chunk-UZZBWCU2.js → chunk-C6H4BP2L.js} +58 -6
  8. package/dist/chunks/{chunk-YI3JV6GM.js → chunk-CT3OCODK.js} +1 -1
  9. package/dist/chunks/{chunk-3ESVKDUA.js → chunk-DZ65TDY4.js} +1 -1
  10. package/dist/chunks/{chunk-PEJCJXGI.js → chunk-F57GYOKZ.js} +1 -1
  11. package/dist/chunks/{chunk-A6I3RGAN.js → chunk-FOPFOSQM.js} +3 -3
  12. package/dist/chunks/{chunk-RL7DANWP.js → chunk-GZ5KF7HK.js} +5 -5
  13. package/dist/chunks/{chunk-NG53DNDG.js → chunk-HMWVVA4B.js} +1 -1
  14. package/dist/chunks/{chunk-KAICYGS4.js → chunk-IBJBNVZV.js} +1 -1
  15. package/dist/chunks/{chunk-52DDM5F6.js → chunk-JJKW6J63.js} +2 -2
  16. package/dist/chunks/{chunk-WR6JALPR.js → chunk-JWQ37WLT.js} +4 -3
  17. package/dist/chunks/{chunk-64KT5RVX.js → chunk-KQDEJE65.js} +3 -3
  18. package/dist/chunks/{chunk-7CTNFMKH.js → chunk-MUDZFSZC.js} +1 -1
  19. package/dist/chunks/{chunk-ZKAWVYGP.js → chunk-UNIIXDM2.js} +56 -56
  20. package/dist/chunks/{chunk-LUORN5H7.js → chunk-VUVQO3LF.js} +3607 -514
  21. package/dist/chunks/{chunk-NHGCQRK5.js → chunk-X5UROEGN.js} +12 -0
  22. package/dist/chunks/{chunk-2YIEJRSL.js → chunk-X7KGEDKQ.js} +10 -9
  23. package/dist/chunks/{chunk-P4KQ3FJ4.js → chunk-XQQXV6ZZ.js} +1 -0
  24. package/dist/chunks/{chunk-JYTOXUQJ.js → chunk-YHFZKOKK.js} +1 -1
  25. package/dist/chunks/{compile-vercel-config-7IAWGVM7.js → compile-vercel-config-CZH5GU3R.js} +4 -4
  26. package/dist/chunks/{delete-DHYJ7ZYD.js → delete-KZJPJUTT.js} +6 -6
  27. package/dist/chunks/{disable-A4D7SZ6G.js → disable-XXKGGPR5.js} +6 -6
  28. package/dist/chunks/{discard-PRE343AI.js → discard-VFWCCRDF.js} +6 -6
  29. package/dist/chunks/{edit-MWFKADR7.js → edit-RY2KAHX2.js} +7 -7
  30. package/dist/chunks/{enable-6P6TDM6D.js → enable-M2PSCPZH.js} +6 -6
  31. package/dist/chunks/{exec-HI4HF4GY.js → exec-CGBHRYWG.js} +14 -9
  32. package/dist/chunks/{export-WISO5LBX.js → export-U3ZPYBWC.js} +6 -6
  33. package/dist/chunks/fetch-proxy-R3JZNXBZ.js +99 -0
  34. package/dist/chunks/{inspect-EBIQ5XF3.js → inspect-HI7DLEJ2.js} +8 -8
  35. package/dist/chunks/{list-755IMC6Y.js → list-KLZIIRGS.js} +13 -13
  36. package/dist/chunks/{list-OD7KO5BB.js → list-TUYF4LRT.js} +6 -6
  37. package/dist/chunks/{ls-ZSVMQVZX.js → ls-6PFY2I7Q.js} +9 -9
  38. package/dist/chunks/{publish-LMGSRL3X.js → publish-GXWEL4UA.js} +6 -6
  39. package/dist/chunks/{query-WZTKABE4.js → query-SLLJ6OJT.js} +11 -11
  40. package/dist/chunks/{reorder-QK5QJ6TW.js → reorder-VRC6BLJM.js} +6 -6
  41. package/dist/chunks/{restore-VF3HDGON.js → restore-SMXHUGVC.js} +6 -6
  42. package/dist/chunks/{rm-QP57BPQO.js → rm-V7DGLIHX.js} +9 -9
  43. package/dist/chunks/{rule-inspect-ZZJ7SQJF.js → rule-inspect-7AZGYZDI.js} +9 -9
  44. package/dist/chunks/{rules-SUBKFNPR.js → rules-MQBE2RMP.js} +7 -7
  45. package/dist/chunks/{schema-FSQEAUMR.js → schema-EMHEFUMV.js} +6 -6
  46. package/dist/chunks/{update-DDCJ2EDT.js → update-GSQ26HZG.js} +9 -9
  47. package/dist/commands/build/index.js +28 -18
  48. package/dist/commands/deploy/index.js +22 -22
  49. package/dist/commands/dev/index.js +47 -39
  50. package/dist/commands/env/index.js +16 -16
  51. package/dist/commands/link/index.js +13 -13
  52. package/dist/commands/list/index.js +12 -12
  53. package/dist/commands-bulk.js +576 -292
  54. package/dist/fetch-dist-tags.cjs +60 -0
  55. package/dist/get-latest-worker.cjs +6 -56
  56. package/dist/help.js +1 -1
  57. package/dist/index.js +200 -61
  58. package/dist/version.mjs +1 -1
  59. package/package.json +15 -17
  60. package/dist/chunks/chunk-N2T234LO.js +0 -3144
  61. package/dist/chunks/{chunk-3NR6OYDV.js → chunk-LWJWW6ZY.js} +3 -3
  62. package/dist/chunks/{chunk-D7MGZH35.js → chunk-U5FVI3MF.js} +3 -3
@@ -7,16 +7,16 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  printProjectNotFoundError,
9
9
  setupAndLink
10
- } from "./chunk-2YIEJRSL.js";
10
+ } from "./chunk-X7KGEDKQ.js";
11
11
  import {
12
12
  getLinkedProject,
13
13
  param,
14
14
  resolveProjectCwd
15
- } from "./chunk-LUORN5H7.js";
15
+ } from "./chunk-VUVQO3LF.js";
16
16
  import {
17
17
  buildCommandWithYes,
18
18
  outputActionRequired
19
- } from "./chunk-NHGCQRK5.js";
19
+ } from "./chunk-X5UROEGN.js";
20
20
  import {
21
21
  getCommandName,
22
22
  getCommandNamePlain
@@ -11,7 +11,7 @@ import {
11
11
  getTeamById,
12
12
  getUser,
13
13
  getVercelDirectory
14
- } from "./chunk-LUORN5H7.js";
14
+ } from "./chunk-VUVQO3LF.js";
15
15
  import {
16
16
  TeamDeleted
17
17
  } from "./chunk-LN6B7ZI3.js";
@@ -10,7 +10,7 @@ import {
10
10
  progress,
11
11
  require_dist as require_dist2,
12
12
  sleep
13
- } from "./chunk-CQRLZB3Y.js";
13
+ } from "./chunk-AQIWBG3Y.js";
14
14
  import {
15
15
  suggestNextCommands
16
16
  } from "./chunk-LKBI43XK.js";
@@ -20,7 +20,7 @@ import {
20
20
  } from "./chunk-TCF6MGBY.js";
21
21
  import {
22
22
  CommandTimeout
23
- } from "./chunk-UZZBWCU2.js";
23
+ } from "./chunk-C6H4BP2L.js";
24
24
  import {
25
25
  showPluginTipIfNeeded
26
26
  } from "./chunk-BRQ6PX3U.js";
@@ -29,7 +29,7 @@ import {
29
29
  } from "./chunk-64IF634X.js";
30
30
  import {
31
31
  getScope
32
- } from "./chunk-7CTNFMKH.js";
32
+ } from "./chunk-MUDZFSZC.js";
33
33
  import {
34
34
  getProjectByNameOrId,
35
35
  param,
@@ -37,13 +37,7 @@ import {
37
37
  require_dist as require_dist3,
38
38
  require_pluralize,
39
39
  ua_default
40
- } from "./chunk-LUORN5H7.js";
41
- import {
42
- require_lib
43
- } from "./chunk-N2T234LO.js";
44
- import {
45
- require_ms
46
- } from "./chunk-GGP5R3FU.js";
40
+ } from "./chunk-VUVQO3LF.js";
47
41
  import {
48
42
  require_strip_ansi,
49
43
  responseError
@@ -66,6 +60,11 @@ import {
66
60
  isAPIError,
67
61
  require_bytes
68
62
  } from "./chunk-LN6B7ZI3.js";
63
+ import {
64
+ Headers,
65
+ fetch,
66
+ toNodeReadable
67
+ } from "./chunk-2RVK3DDN.js";
69
68
  import {
70
69
  emoji,
71
70
  eraseLines,
@@ -75,6 +74,9 @@ import {
75
74
  require_ansi_escapes,
76
75
  require_dist
77
76
  } from "./chunk-Z5SBJH6L.js";
77
+ import {
78
+ require_ms
79
+ } from "./chunk-GGP5R3FU.js";
78
80
  import {
79
81
  require_source
80
82
  } from "./chunk-S7KYDPEM.js";
@@ -1607,11 +1609,10 @@ async function printEvents(client, urlOrDeploymentId, { mode, onEvent, quiet, fi
1607
1609
  try {
1608
1610
  const eventsRes = await client.fetch(eventsUrl, {
1609
1611
  json: false,
1610
- // @ts-expect-error: typescript is getting confused with the signal types from node (web & server) and node-fetch (server only)
1611
1612
  signal: abortController?.signal
1612
1613
  });
1613
1614
  if (eventsRes.ok) {
1614
- const readable = eventsRes.body;
1615
+ const readable = toNodeReadable(eventsRes.body);
1615
1616
  return new Promise((resolve, reject) => {
1616
1617
  const stream = readable.pipe(import_jsonlines.default.parse());
1617
1618
  let poller;
@@ -1782,7 +1783,6 @@ async function displayRuntimeLogs(client, options, abortController) {
1782
1783
  }, (0, import_ms.default)(CommandTimeout));
1783
1784
  const response = await client.fetch(url, {
1784
1785
  json: false,
1785
- // @ts-expect-error: typescipt is getting confused with the signal types from node (web & server) and node-fetch (server only)
1786
1786
  signal: abortController.signal,
1787
1787
  retry: {
1788
1788
  retries: 3,
@@ -1796,7 +1796,8 @@ async function displayRuntimeLogs(client, options, abortController) {
1796
1796
  }
1797
1797
  });
1798
1798
  return new Promise((resolve, reject) => {
1799
- const stream = response.body.pipe(parse2 ? import_jsonlines2.default.parse() : (0, import_split2.default)());
1799
+ const readable = toNodeReadable(response.body);
1800
+ const stream = readable.pipe(parse2 ? import_jsonlines2.default.parse() : (0, import_split2.default)());
1800
1801
  let finished = false;
1801
1802
  let errored = false;
1802
1803
  function finish(err) {
@@ -1845,7 +1846,7 @@ async function displayRuntimeLogs(client, options, abortController) {
1845
1846
  stream.on("end", finish);
1846
1847
  stream.on("data", handleData);
1847
1848
  stream.on("error", handleError);
1848
- response.body.on("error", handleError);
1849
+ readable.on("error", handleError);
1849
1850
  });
1850
1851
  }
1851
1852
  function printBuildLog(log, print) {
@@ -2223,11 +2224,10 @@ ${archiveSuggestionText}`
2223
2224
  // src/util/index.ts
2224
2225
  var import_async_retry2 = __toESM(require_dist2(), 1);
2225
2226
  var import_ms2 = __toESM(require_ms(), 1);
2226
- var import_node_fetch = __toESM(require_lib(), 1);
2227
- var import_bytes2 = __toESM(require_bytes(), 1);
2228
- var import_chalk3 = __toESM(require_source(), 1);
2229
2227
  import qs from "querystring";
2230
2228
  import { parse as parseUrl } from "url";
2229
+ var import_bytes2 = __toESM(require_bytes(), 1);
2230
+ var import_chalk3 = __toESM(require_source(), 1);
2231
2231
  var Now = class {
2232
2232
  constructor({
2233
2233
  client,
@@ -2444,7 +2444,7 @@ ${err.stack}`);
2444
2444
  _url = `${parsedUrl.pathname}?${qs.stringify(query)}`;
2445
2445
  delete opts.useCurrentTeam;
2446
2446
  }
2447
- opts.headers = new import_node_fetch.Headers(opts.headers);
2447
+ opts.headers = new Headers(opts.headers);
2448
2448
  opts.headers.set("accept", "application/json");
2449
2449
  if (this._token) {
2450
2450
  opts.headers.set("authorization", `Bearer ${this._token}`);
@@ -2459,7 +2459,7 @@ ${err.stack}`);
2459
2459
  }
2460
2460
  const res = await output_manager_default.time(
2461
2461
  `${opts.method || "GET"} ${this._apiUrl}${_url} ${opts.body || ""}`,
2462
- (0, import_node_fetch.default)(`${this._apiUrl}${_url}`, { ...opts, body })
2462
+ fetch(`${this._apiUrl}${_url}`, { ...opts, body })
2463
2463
  );
2464
2464
  printIndications(res);
2465
2465
  return res;
@@ -2916,12 +2916,45 @@ async function createCertForCns(client, cns, context) {
2916
2916
  }
2917
2917
  }
2918
2918
 
2919
- // src/util/domains/get-domain-by-name.ts
2919
+ // src/util/domains/add-domain.ts
2920
2920
  var import_chalk8 = __toESM(require_source(), 1);
2921
+ var import_async_retry4 = __toESM(require_dist2(), 1);
2922
+ async function addDomain(client, domain, contextName) {
2923
+ output_manager_default.spinner(`Adding domain ${domain} under ${import_chalk8.default.bold(contextName)}`);
2924
+ const addedDomain = await performAddRequest(client, domain);
2925
+ return addedDomain;
2926
+ }
2927
+ async function performAddRequest(client, domainName) {
2928
+ return (0, import_async_retry4.default)(
2929
+ async () => {
2930
+ try {
2931
+ const { domain } = await client.fetch("/v4/domains", {
2932
+ body: { name: domainName },
2933
+ method: "POST"
2934
+ });
2935
+ return domain;
2936
+ } catch (err) {
2937
+ if (isAPIError(err)) {
2938
+ if (err.code === "invalid_name") {
2939
+ return new InvalidDomain(domainName);
2940
+ }
2941
+ if (err.code === "domain_already_exists") {
2942
+ return new DomainAlreadyExists(domainName);
2943
+ }
2944
+ }
2945
+ throw err;
2946
+ }
2947
+ },
2948
+ { retries: 5, maxTimeout: 8e3 }
2949
+ );
2950
+ }
2951
+
2952
+ // src/util/domains/get-domain-by-name.ts
2953
+ var import_chalk9 = __toESM(require_source(), 1);
2921
2954
  async function getDomainByName(client, contextName, domainName, options = {}) {
2922
2955
  if (!options.ignoreWait) {
2923
2956
  output_manager_default.spinner(
2924
- `Fetching domain ${domainName} under ${import_chalk8.default.bold(contextName)}`
2957
+ `Fetching domain ${domainName} under ${import_chalk9.default.bold(contextName)}`
2925
2958
  );
2926
2959
  }
2927
2960
  try {
@@ -2951,39 +2984,6 @@ function isWildcardAlias(alias) {
2951
2984
  // src/util/domains/setup-domain.ts
2952
2985
  var import_tldts = __toESM(require_cjs(), 1);
2953
2986
 
2954
- // src/util/domains/add-domain.ts
2955
- var import_chalk9 = __toESM(require_source(), 1);
2956
- var import_async_retry4 = __toESM(require_dist2(), 1);
2957
- async function addDomain(client, domain, contextName) {
2958
- output_manager_default.spinner(`Adding domain ${domain} under ${import_chalk9.default.bold(contextName)}`);
2959
- const addedDomain = await performAddRequest(client, domain);
2960
- return addedDomain;
2961
- }
2962
- async function performAddRequest(client, domainName) {
2963
- return (0, import_async_retry4.default)(
2964
- async () => {
2965
- try {
2966
- const { domain } = await client.fetch("/v4/domains", {
2967
- body: { name: domainName },
2968
- method: "POST"
2969
- });
2970
- return domain;
2971
- } catch (err) {
2972
- if (isAPIError(err)) {
2973
- if (err.code === "invalid_name") {
2974
- return new InvalidDomain(domainName);
2975
- }
2976
- if (err.code === "domain_already_exists") {
2977
- return new DomainAlreadyExists(domainName);
2978
- }
2979
- }
2980
- throw err;
2981
- }
2982
- },
2983
- { retries: 5, maxTimeout: 8e3 }
2984
- );
2985
- }
2986
-
2987
2987
  // src/util/domains/maybe-get-domain-by-name.ts
2988
2988
  async function maybeGetDomainByName(client, contextName, domainName) {
2989
2989
  const maybeDomain = await getDomainByName(client, contextName, domainName);
@@ -3064,11 +3064,11 @@ export {
3064
3064
  Now,
3065
3065
  require_cjs,
3066
3066
  createCertForCns,
3067
+ addDomain,
3067
3068
  getDomainByName,
3068
3069
  getDomainPrice,
3069
3070
  getDomainStatus,
3070
3071
  pollForOrder,
3071
- getDomain,
3072
3072
  purchaseDomain,
3073
3073
  collectContactInformation,
3074
3074
  purchaseDomainIfAvailable,