vercel 59.11.2 → 59.12.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 (173) hide show
  1. package/dist/chunks/{add-BKSHWTPX.js → add-OO3JGLZW.js} +23 -18
  2. package/dist/chunks/{add-HPLJZFM2.js → add-RTXDASSS.js} +23 -18
  3. package/dist/chunks/add-XGO6LHMD.js +221 -0
  4. package/dist/chunks/{build-V4ZLAJWB.js → build-JINV2UD4.js} +23 -18
  5. package/dist/chunks/{chunk-NGGLYKNU.js → chunk-26CU4Q3C.js} +3 -115
  6. package/dist/chunks/{chunk-QFAS4OVW.js → chunk-2JIX6UMI.js} +3 -84
  7. package/dist/chunks/chunk-2NIDTSQJ.js +305 -0
  8. package/dist/chunks/chunk-32XSMM3W.js +49 -0
  9. package/dist/chunks/chunk-332LMJLZ.js +16014 -0
  10. package/dist/chunks/{chunk-RO44KX6Y.js → chunk-3BB2HOO2.js} +12 -7
  11. package/dist/chunks/{chunk-HDBQPBL6.js → chunk-3F25W3GA.js} +13 -9
  12. package/dist/chunks/{chunk-AYLY3ZVL.js → chunk-3VM7HWF6.js} +2 -2
  13. package/dist/chunks/chunk-4IALDGB7.js +22 -0
  14. package/dist/chunks/{chunk-MTWHQEXI.js → chunk-4TUMNBEE.js} +7 -5
  15. package/dist/chunks/{chunk-5XECIWME.js → chunk-5NF5HOBJ.js} +5 -3
  16. package/dist/chunks/chunk-6E6KPBXY.js +43 -0
  17. package/dist/chunks/{chunk-ASBP32T6.js → chunk-7MRDIPJY.js} +1 -1
  18. package/dist/chunks/chunk-ABSZNJQO.js +522 -0
  19. package/dist/chunks/{chunk-7ST552E3.js → chunk-AKLTIZCU.js} +1 -1
  20. package/dist/chunks/{chunk-ONRLTUP2.js → chunk-AV747POV.js} +43 -36
  21. package/dist/chunks/chunk-B5XLQKHI.js +849 -0
  22. package/dist/chunks/{chunk-BMKU5KEL.js → chunk-CV5YC2EN.js} +1 -1
  23. package/dist/chunks/{chunk-TPATD2MM.js → chunk-CZ5QQRXD.js} +14 -6
  24. package/dist/chunks/{chunk-2EAIC3SH.js → chunk-E47NARDE.js} +8 -8
  25. package/dist/chunks/{chunk-XM3LOQIX.js → chunk-EDMW7SBH.js} +76 -92
  26. package/dist/chunks/{chunk-QAT3CW4G.js → chunk-EFYMIIER.js} +2 -2
  27. package/dist/chunks/chunk-ELZ6WQQA.js +81 -0
  28. package/dist/chunks/{chunk-FKDO3CM4.js → chunk-EOLGLGXJ.js} +17 -13
  29. package/dist/chunks/chunk-FRVG4OW3.js +7438 -0
  30. package/dist/chunks/chunk-G5FBSUL4.js +822 -0
  31. package/dist/chunks/chunk-GDOUDU6O.js +74 -0
  32. package/dist/chunks/{chunk-OQ3C5VXZ.js → chunk-GVNCVKCI.js} +4 -2
  33. package/dist/chunks/chunk-HB4UKFDO.js +1295 -0
  34. package/dist/chunks/{chunk-FRAXI2WT.js → chunk-HD4DR3DA.js} +4 -3
  35. package/dist/chunks/{chunk-DWIC7MRV.js → chunk-HKHXKSXQ.js} +1 -1
  36. package/dist/chunks/{chunk-6JPVTPTU.js → chunk-HM24ZWQL.js} +4 -4
  37. package/dist/chunks/chunk-HR2MP4XF.js +324 -0
  38. package/dist/chunks/chunk-HRXRELD3.js +338 -0
  39. package/dist/chunks/{chunk-IJ4X426J.js → chunk-IIMSID24.js} +1 -1
  40. package/dist/chunks/{chunk-B4TXCKXE.js → chunk-JOXNBQ7W.js} +10 -8
  41. package/dist/chunks/{chunk-O75LSD3C.js → chunk-JSD4EZL3.js} +1 -1
  42. package/dist/chunks/{chunk-7AEEQOD4.js → chunk-K3RED3VO.js} +1 -1
  43. package/dist/chunks/chunk-KAF4WFF3.js +257 -0
  44. package/dist/chunks/{chunk-3T7WSWZH.js → chunk-KFWQ3EFH.js} +1 -1
  45. package/dist/chunks/{chunk-6CZZ3SH3.js → chunk-KNO327AW.js} +2 -2
  46. package/dist/chunks/{chunk-L3UXB2CW.js → chunk-KW7BS25T.js} +1 -1
  47. package/dist/chunks/{chunk-2NJJ2K5S.js → chunk-L6B6BRHH.js} +6 -6
  48. package/dist/chunks/{chunk-FZRBF25Y.js → chunk-LDV2R4P4.js} +4 -4
  49. package/dist/chunks/chunk-MADFAH3O.js +14059 -0
  50. package/dist/chunks/{chunk-OO3OF6MK.js → chunk-MDGPZHSM.js} +151 -26
  51. package/dist/chunks/{chunk-XRWOTCDO.js → chunk-ND5CF2H3.js} +1 -1
  52. package/dist/chunks/{chunk-6TBDHUXK.js → chunk-NDY3JDOU.js} +21 -15
  53. package/dist/chunks/{chunk-RKDCNQ4S.js → chunk-NW34PW6V.js} +3 -105
  54. package/dist/chunks/{chunk-C5HKWXRR.js → chunk-OAMU5QO6.js} +1 -1
  55. package/dist/chunks/{chunk-RSJBU3ON.js → chunk-OJHDGHOB.js} +35 -27
  56. package/dist/chunks/chunk-P7VSBDR4.js +827 -0
  57. package/dist/chunks/chunk-PEC3CQSK.js +90 -0
  58. package/dist/chunks/{chunk-KJBZ5ZST.js → chunk-PIMIVJYK.js} +1 -0
  59. package/dist/chunks/chunk-PNGVSHR3.js +40 -0
  60. package/dist/chunks/chunk-PP5GKSIX.js +137 -0
  61. package/dist/chunks/chunk-QB2UHSUB.js +58 -0
  62. package/dist/chunks/chunk-QIUK4Z7Q.js +79 -0
  63. package/dist/chunks/chunk-RN6V5ODW.js +114 -0
  64. package/dist/chunks/chunk-RNK3LXLR.js +1288 -0
  65. package/dist/chunks/chunk-RVBZ64EQ.js +52 -0
  66. package/dist/chunks/{chunk-WA2SJE5S.js → chunk-SWO66HE2.js} +4 -4
  67. package/dist/chunks/{chunk-NBW3BWOJ.js → chunk-TDGK45FB.js} +2 -2
  68. package/dist/chunks/{chunk-WNAKOXGK.js → chunk-TO7QZGYK.js} +1 -1
  69. package/dist/chunks/{chunk-QDV5LZ4Q.js → chunk-UA55I7M6.js} +12 -8
  70. package/dist/chunks/{chunk-FWKSJYDV.js → chunk-UG2WOB5L.js} +1 -1
  71. package/dist/chunks/chunk-UJPVHLL5.js +233 -0
  72. package/dist/chunks/chunk-V4RMJKQP.js +36 -0
  73. package/dist/chunks/chunk-VJSREJVM.js +875 -0
  74. package/dist/chunks/chunk-VUS2JQB2.js +121 -0
  75. package/dist/chunks/{chunk-4KVJ2M4J.js → chunk-WPBCUXMZ.js} +582 -37
  76. package/dist/chunks/chunk-WSZ5E4WH.js +92 -0
  77. package/dist/chunks/{chunk-Q5K5DEOK.js → chunk-WT2Y7FRD.js} +42 -28
  78. package/dist/chunks/chunk-WT6C2ALC.js +18188 -0
  79. package/dist/chunks/chunk-X6TGUHFD.js +59 -0
  80. package/dist/chunks/{chunk-ZSFEACZU.js → chunk-XFF5TGRA.js} +1 -1
  81. package/dist/chunks/chunk-XNIZGCN5.js +58 -0
  82. package/dist/chunks/chunk-XPJLPUKO.js +117 -0
  83. package/dist/chunks/{chunk-FXD67VN5.js → chunk-XUAWTW4W.js} +1 -1
  84. package/dist/chunks/chunk-YPMFZRTN.js +417 -0
  85. package/dist/chunks/chunk-YRESLJCW.js +1536 -0
  86. package/dist/chunks/{chunk-I526H4AS.js → chunk-YS76T533.js} +2 -2
  87. package/dist/chunks/{chunk-52QYYTM5.js → chunk-ZDU2NODC.js} +3 -127
  88. package/dist/chunks/chunk-ZW6HETRE.js +97 -0
  89. package/dist/chunks/{clear-IYGWCNXT.js → clear-GQTDYSKJ.js} +23 -18
  90. package/dist/chunks/{compile-vercel-config-NEEBZRUJ.js → compile-vercel-config-URVMKDVW.js} +8 -11
  91. package/dist/chunks/{config-6DS6BBR2.js → config-MSVQR5T6.js} +23 -18
  92. package/dist/chunks/{config-NTB5EMV4.js → config-OAXY4J6P.js} +23 -18
  93. package/dist/chunks/config-validator.mjs +1 -1
  94. package/dist/chunks/{delete-LSGID5FV.js → delete-57QO64HD.js} +19 -14
  95. package/dist/chunks/{delete-LLC2OGHA.js → delete-XN6ESD7C.js} +16 -12
  96. package/dist/chunks/detect-projects-ODNU4PK2.js +18 -0
  97. package/dist/chunks/detect-services-UPY4LTBZ.js +40 -0
  98. package/dist/chunks/{disable-H4EXEQK7.js → disable-BYI46V7B.js} +17 -13
  99. package/dist/chunks/{discard-FG6VKHWN.js → discard-IIQL44ZZ.js} +17 -13
  100. package/dist/chunks/{edit-BZJSGUHT.js → edit-BRNS3OR4.js} +19 -15
  101. package/dist/chunks/{edit-YE7D3CPJ.js → edit-JTW7XZH7.js} +17 -13
  102. package/dist/chunks/{enable-6ESD4QTE.js → enable-CH5FSQMR.js} +17 -13
  103. package/dist/chunks/{exec-XH4K34JM.js → exec-4IPHZ55G.js} +9 -5
  104. package/dist/chunks/{export-QWSJROLG.js → export-6WHQOWKM.js} +16 -13
  105. package/dist/chunks/{image-LTHQMKFG.js → image-ZSLYATWG.js} +11 -8
  106. package/dist/chunks/{import-builders-6O7ILGQJ.js → import-builders-FNMYJZGG.js} +18 -13
  107. package/dist/chunks/{inspect-2C4ZSNYC.js → inspect-4RDZSYWU.js} +27 -23
  108. package/dist/chunks/{inspect-N6SMHV3Z.js → inspect-7WQXZWET.js} +18 -14
  109. package/dist/chunks/{inspect-F7KCTHIL.js → inspect-CGXTNMMO.js} +19 -15
  110. package/dist/chunks/{inspect-ICKNCDMT.js → inspect-XJ7BYLZ5.js} +18 -14
  111. package/dist/chunks/{inspect-TWDPMXZ5.js → inspect-Z2MBTTB7.js} +18 -14
  112. package/dist/chunks/{list-NWTIJF3L.js → list-65LW6OTM.js} +20 -16
  113. package/dist/chunks/{list-DS7ZOUXA.js → list-7W3PHRB6.js} +25 -21
  114. package/dist/chunks/{list-IPGQVBJO.js → list-KS22Y57L.js} +16 -14
  115. package/dist/chunks/{login-F7A7ONKC.js → login-NXULVQZ2.js} +23 -18
  116. package/dist/chunks/{ls-2QW3ZSM6.js → ls-35EOVEIQ.js} +24 -18
  117. package/dist/chunks/{ls-XINES6PL.js → ls-5GKS5QRW.js} +24 -18
  118. package/dist/chunks/ls-ADYFYYIW.js +204 -0
  119. package/dist/chunks/{ls-D4TUDBIH.js → ls-DZYN3SNS.js} +24 -18
  120. package/dist/chunks/{ls-LSJEUPFX.js → ls-HVQOGBGV.js} +23 -16
  121. package/dist/chunks/{ls-NBDX3MKN.js → ls-I2PWG7YN.js} +24 -18
  122. package/dist/chunks/{open-VRQDWZAW.js → open-H34HXJHP.js} +18 -13
  123. package/dist/chunks/{permissions-6C5C7TEV.js → permissions-ZPPEPKVE.js} +14 -11
  124. package/dist/chunks/{publish-GVIZPNLN.js → publish-NRMKXHAU.js} +17 -13
  125. package/dist/chunks/pull-WUT3XTZX.js +45 -0
  126. package/dist/chunks/{push-EFZ5P5Z6.js → push-WFNCEA5J.js} +23 -18
  127. package/dist/chunks/{query-GBS2PIT4.js → query-2FQM3F7N.js} +23 -20
  128. package/dist/chunks/{reorder-TN65IFRL.js → reorder-GYCT7L3C.js} +17 -13
  129. package/dist/chunks/{reply-DYVEV3PY.js → reply-RFEXNYZ7.js} +17 -13
  130. package/dist/chunks/{resolve-JAWFBPUM.js → resolve-ZFGT7W6Z.js} +16 -12
  131. package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +36 -0
  132. package/dist/chunks/{restore-TJVMHUBQ.js → restore-JAXPMYL5.js} +17 -13
  133. package/dist/chunks/rm-CLKQN5E4.js +162 -0
  134. package/dist/chunks/{rm-HQ5CYNJA.js → rm-JPV5V2SH.js} +23 -18
  135. package/dist/chunks/{rm-7XACNZ2U.js → rm-N7SGFQOA.js} +23 -18
  136. package/dist/chunks/{rm-REJVXALW.js → rm-UQJ4CZJH.js} +23 -18
  137. package/dist/chunks/{rm-CBPNMSRP.js → rm-ZUQ4U454.js} +24 -17
  138. package/dist/chunks/{routes-2OLIBRYX.js → routes-QVMBXOSX.js} +7 -3
  139. package/dist/chunks/rule-inspect-HI3YY7OY.js +123 -0
  140. package/dist/chunks/{rules-VGV4M4KY.js → rules-DA3Q64M4.js} +15 -12
  141. package/dist/chunks/{schema-GMTQOQCV.js → schema-R3C4CXJ6.js} +20 -18
  142. package/dist/chunks/schema-UYYFV3JB.js +381 -0
  143. package/dist/chunks/{set-Z5FO2FCC.js → set-TOJPGW4J.js} +21 -14
  144. package/dist/chunks/setup-and-link-DRYXQOH4.js +65 -0
  145. package/dist/chunks/{tags-SDRXWJ63.js → tags-TNLVFNVI.js} +10 -7
  146. package/dist/chunks/{types-JGANJ5EQ.js → types-4GAJ7XQQ.js} +9 -7
  147. package/dist/chunks/update-X6JB3NPI.js +224 -0
  148. package/dist/chunks/vlt-builder-importer-USCFHWPL.js +322 -0
  149. package/dist/commands/build/index.js +86 -49
  150. package/dist/commands/deploy/index.js +76 -67
  151. package/dist/commands/dev/index.js +98 -52
  152. package/dist/commands/env/index.js +68 -44
  153. package/dist/commands/link/index.js +49 -28
  154. package/dist/commands/list/index.js +33 -22
  155. package/dist/commands-bulk.js +8715 -3581
  156. package/dist/help.js +1 -1
  157. package/dist/index.js +74 -42
  158. package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +6 -0
  159. package/dist/version.mjs +1 -1
  160. package/package.json +52 -48
  161. package/dist/chunks/add-RBW7QITR.js +0 -219
  162. package/dist/chunks/chunk-26XDDLXM.js +0 -144
  163. package/dist/chunks/chunk-5GGUB4EO.js +0 -31
  164. package/dist/chunks/chunk-MXLA3VQS.js +0 -20
  165. package/dist/chunks/chunk-OTXE7MHI.js +0 -96
  166. package/dist/chunks/chunk-RSEAADCE.js +0 -138
  167. package/dist/chunks/chunk-WYU64FLP.js +0 -62123
  168. package/dist/chunks/chunk-XNFHNTS2.js +0 -2939
  169. package/dist/chunks/ls-RNGO257R.js +0 -193
  170. package/dist/chunks/rm-5B5VHWWN.js +0 -170
  171. package/dist/chunks/rule-inspect-ZSTDDFID.js +0 -281
  172. package/dist/chunks/schema-45SJNY5L.js +0 -427
  173. package/dist/chunks/update-JBQBC3IV.js +0 -233
@@ -0,0 +1,90 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ __commonJS
9
+ } from "./chunk-TZ2YI2VH.js";
10
+
11
+ // ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js
12
+ var require_wrappy = __commonJS({
13
+ "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module) {
14
+ module.exports = wrappy;
15
+ function wrappy(fn, cb) {
16
+ if (fn && cb)
17
+ return wrappy(fn)(cb);
18
+ if (typeof fn !== "function")
19
+ throw new TypeError("need wrapper function");
20
+ Object.keys(fn).forEach(function(k) {
21
+ wrapper[k] = fn[k];
22
+ });
23
+ return wrapper;
24
+ function wrapper() {
25
+ var args = new Array(arguments.length);
26
+ for (var i = 0; i < args.length; i++) {
27
+ args[i] = arguments[i];
28
+ }
29
+ var ret = fn.apply(this, args);
30
+ var cb2 = args[args.length - 1];
31
+ if (typeof ret === "function" && ret !== cb2) {
32
+ Object.keys(cb2).forEach(function(k) {
33
+ ret[k] = cb2[k];
34
+ });
35
+ }
36
+ return ret;
37
+ }
38
+ }
39
+ }
40
+ });
41
+
42
+ // ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js
43
+ var require_once = __commonJS({
44
+ "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module) {
45
+ var wrappy = require_wrappy();
46
+ module.exports = wrappy(once);
47
+ module.exports.strict = wrappy(onceStrict);
48
+ once.proto = once(function() {
49
+ Object.defineProperty(Function.prototype, "once", {
50
+ value: function() {
51
+ return once(this);
52
+ },
53
+ configurable: true
54
+ });
55
+ Object.defineProperty(Function.prototype, "onceStrict", {
56
+ value: function() {
57
+ return onceStrict(this);
58
+ },
59
+ configurable: true
60
+ });
61
+ });
62
+ function once(fn) {
63
+ var f = function() {
64
+ if (f.called)
65
+ return f.value;
66
+ f.called = true;
67
+ return f.value = fn.apply(this, arguments);
68
+ };
69
+ f.called = false;
70
+ return f;
71
+ }
72
+ function onceStrict(fn) {
73
+ var f = function() {
74
+ if (f.called)
75
+ throw new Error(f.onceError);
76
+ f.called = true;
77
+ return f.value = fn.apply(this, arguments);
78
+ };
79
+ var name = fn.name || "Function wrapped with `once`";
80
+ f.onceError = name + " shouldn't be called more than once";
81
+ f.called = false;
82
+ return f;
83
+ }
84
+ }
85
+ });
86
+
87
+ export {
88
+ require_wrappy,
89
+ require_once
90
+ };
@@ -86,6 +86,7 @@ var help = () => `
86
86
  rr | rolling-release [cmd] Manage rolling releases for gradual traffic shifting
87
87
  sandbox Interact with Vercel Sandbox
88
88
  skills [query] Discover agent skills relevant to your project
89
+ storage [cmd] Connect and manage storage resources for your Projects
89
90
  target [cmd] Manage custom environments for your Project
90
91
  teams Manages your teams
91
92
  telemetry [cmd] Enable or disable telemetry collection
@@ -0,0 +1,40 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ output_manager_default
9
+ } from "./chunk-2JIX6UMI.js";
10
+ import {
11
+ require_source
12
+ } from "./chunk-S7KYDPEM.js";
13
+ import {
14
+ __toESM
15
+ } from "./chunk-TZ2YI2VH.js";
16
+
17
+ // src/util/projects/format-project.ts
18
+ var import_chalk = __toESM(require_source(), 1);
19
+ function formatProject(orgSlug, projectSlug, options) {
20
+ const orgProjectSlug = `${orgSlug}/${projectSlug}`;
21
+ const projectUrl = `https://vercel.com/${orgProjectSlug}`;
22
+ const projectSlugLink = output_manager_default.link(import_chalk.default.bold(orgProjectSlug), projectUrl, {
23
+ fallback: () => import_chalk.default.bold(orgProjectSlug),
24
+ color: false,
25
+ ...options
26
+ });
27
+ return projectSlugLink;
28
+ }
29
+
30
+ // src/util/target/standard-environments.ts
31
+ var STANDARD_ENVIRONMENTS = [
32
+ "production",
33
+ "preview",
34
+ "development"
35
+ ];
36
+
37
+ export {
38
+ formatProject,
39
+ STANDARD_ENVIRONMENTS
40
+ };
@@ -0,0 +1,137 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ printProjectNotFoundError
9
+ } from "./chunk-ELZ6WQQA.js";
10
+ import {
11
+ detectExplicitScope
12
+ } from "./chunk-ABSZNJQO.js";
13
+ import {
14
+ getLinkedProject,
15
+ param,
16
+ resolveProjectCwd
17
+ } from "./chunk-MADFAH3O.js";
18
+ import {
19
+ buildCommandWithYes,
20
+ outputActionRequired
21
+ } from "./chunk-26CU4Q3C.js";
22
+ import {
23
+ getCommandName,
24
+ getCommandNamePlain
25
+ } from "./chunk-Q2DGFCO7.js";
26
+ import {
27
+ output_manager_default
28
+ } from "./chunk-2JIX6UMI.js";
29
+
30
+ // src/util/parse-env.ts
31
+ var parseEnv = (env) => {
32
+ if (!env) {
33
+ return {};
34
+ }
35
+ if (typeof env === "string") {
36
+ env = [env];
37
+ }
38
+ if (Array.isArray(env)) {
39
+ const startingDict = {};
40
+ return env.reduce((o, e) => {
41
+ let key;
42
+ let value;
43
+ const equalsSign = e.indexOf("=");
44
+ if (equalsSign === -1) {
45
+ key = e;
46
+ } else {
47
+ key = e.slice(0, equalsSign);
48
+ value = e.slice(equalsSign + 1);
49
+ }
50
+ o[key] = value;
51
+ return o;
52
+ }, startingDict);
53
+ }
54
+ return env;
55
+ };
56
+
57
+ // src/util/link/ensure-link.ts
58
+ async function ensureLink(commandName, client, cwd, opts = {}) {
59
+ cwd = await resolveProjectCwd(cwd);
60
+ let link = opts.link;
61
+ const nonInteractive = opts.nonInteractive ?? client.nonInteractive ?? false;
62
+ opts.nonInteractive = nonInteractive;
63
+ if (!link) {
64
+ if (opts.forceDelete) {
65
+ link = { status: "not_linked", org: null, project: null };
66
+ } else {
67
+ link = await getLinkedProject(client, {
68
+ cwd,
69
+ projectName: opts.projectName,
70
+ projectNameIsExplicit: Boolean(opts.projectName && opts.failIfNotFound),
71
+ scopeIsExplicit: detectExplicitScope(client),
72
+ allowOwnerLookupFallback: opts.allowOwnerLookupFallback,
73
+ skipRemoteLookup: opts.skipRemoteLookup
74
+ });
75
+ }
76
+ opts.link = link;
77
+ }
78
+ if (link.status === "linked" && opts.forceDelete || link.status === "not_linked") {
79
+ if (link.status === "not_linked" && opts.failIfNotFound && opts.projectName) {
80
+ await printProjectNotFoundError(
81
+ client,
82
+ opts.projectName,
83
+ commandName,
84
+ link.orgId
85
+ );
86
+ return 1;
87
+ }
88
+ if (link.status === "not_linked" && opts.requireExistingLink) {
89
+ output_manager_default.error(
90
+ `Project is not linked. Run ${getCommandName("link")} first.`
91
+ );
92
+ return 1;
93
+ }
94
+ const { default: setupAndLink } = await import("./setup-and-link-DRYXQOH4.js");
95
+ link = await setupAndLink(client, cwd, opts);
96
+ if (link.status === "not_linked") {
97
+ return 0;
98
+ }
99
+ }
100
+ if (link.status === "error") {
101
+ if (link.reason === "HEADLESS") {
102
+ if (nonInteractive) {
103
+ outputActionRequired(
104
+ client,
105
+ {
106
+ status: "action_required",
107
+ reason: "confirmation_required",
108
+ message: `Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,
109
+ next: [
110
+ {
111
+ command: buildCommandWithYes(client.argv),
112
+ when: "Confirm and run"
113
+ }
114
+ ]
115
+ },
116
+ link.exitCode
117
+ );
118
+ } else {
119
+ output_manager_default.error(
120
+ `Command ${getCommandName(
121
+ commandName
122
+ )} requires confirmation. Use option ${param("--yes")} to confirm.`
123
+ );
124
+ }
125
+ }
126
+ if (nonInteractive) {
127
+ process.exit(link.exitCode);
128
+ }
129
+ return link.exitCode;
130
+ }
131
+ return link;
132
+ }
133
+
134
+ export {
135
+ parseEnv,
136
+ ensureLink
137
+ };
@@ -0,0 +1,58 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ parseArguments
9
+ } from "./chunk-57RHXXXG.js";
10
+ import {
11
+ VERCEL_DIR
12
+ } from "./chunk-MADFAH3O.js";
13
+ import {
14
+ ConflictingConfigFiles,
15
+ DeprecatedNowJson,
16
+ InvalidLocalConfig
17
+ } from "./chunk-CV5YC2EN.js";
18
+
19
+ // src/util/config/local-path.ts
20
+ import path from "path";
21
+ import { existsSync } from "fs";
22
+ function getLocalPathConfig(prefix) {
23
+ const argv = parseArguments(process.argv.slice(2), {}, { permissive: true });
24
+ const customPath = argv.flags["--local-config"];
25
+ if (customPath) {
26
+ if (typeof customPath !== "string") {
27
+ throw new InvalidLocalConfig(customPath);
28
+ }
29
+ return path.resolve(process.cwd(), customPath);
30
+ }
31
+ const vercelConfigPath = path.join(prefix, "vercel.json");
32
+ const vercelTomlPath = path.join(prefix, "vercel.toml");
33
+ const nowConfigPath = path.join(prefix, "now.json");
34
+ const vercelConfigExists = existsSync(vercelConfigPath);
35
+ const vercelTomlExists = existsSync(vercelTomlPath);
36
+ const nowConfigExists = existsSync(nowConfigPath);
37
+ const foundConfigs = [];
38
+ if (vercelConfigExists)
39
+ foundConfigs.push(vercelConfigPath);
40
+ if (vercelTomlExists)
41
+ foundConfigs.push(vercelTomlPath);
42
+ if (nowConfigExists) {
43
+ throw new DeprecatedNowJson(nowConfigPath);
44
+ }
45
+ if (foundConfigs.length > 1) {
46
+ throw new ConflictingConfigFiles(foundConfigs);
47
+ }
48
+ const compiledConfigPath = path.join(prefix, VERCEL_DIR, "vercel.json");
49
+ const compiledConfigExists = existsSync(compiledConfigPath);
50
+ if (compiledConfigExists) {
51
+ return compiledConfigPath;
52
+ }
53
+ return vercelConfigPath;
54
+ }
55
+
56
+ export {
57
+ getLocalPathConfig
58
+ };
@@ -0,0 +1,79 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ AGENT_REASON
9
+ } from "./chunk-VUS2JQB2.js";
10
+ import {
11
+ getProjectByNameOrId
12
+ } from "./chunk-MADFAH3O.js";
13
+ import {
14
+ ProjectNotFound
15
+ } from "./chunk-CV5YC2EN.js";
16
+
17
+ // src/commands/traces/scope-resolver.ts
18
+ var MISSING_BOTH_MESSAGE = "No linked project found. Run `vercel link`, pass --cwd to a linked dir, or use --scope <team> and --project <name>.";
19
+ async function resolveScope({
20
+ client,
21
+ flags = {},
22
+ linkedProject
23
+ }) {
24
+ const flagScope = flags.scope?.trim() || void 0;
25
+ const flagProject = flags.project?.trim() || void 0;
26
+ if (linkedProject.status === "linked") {
27
+ if (!flagScope && !flagProject) {
28
+ return {
29
+ teamId: linkedProject.org.id,
30
+ projectId: linkedProject.project.id
31
+ };
32
+ }
33
+ const teamId = flagScope ? client.config.currentTeam : linkedProject.org.id;
34
+ if (!teamId) {
35
+ return {
36
+ reason: AGENT_REASON.NOT_FOUND,
37
+ message: `Team not found: ${flagScope}`
38
+ };
39
+ }
40
+ const project = await getProjectByNameOrId(
41
+ client,
42
+ flagProject ?? linkedProject.project.id,
43
+ teamId
44
+ );
45
+ if (project instanceof ProjectNotFound) {
46
+ return {
47
+ reason: AGENT_REASON.NOT_FOUND,
48
+ message: `Project not found: ${flagProject}`
49
+ };
50
+ }
51
+ return {
52
+ teamId,
53
+ projectId: project.id
54
+ };
55
+ }
56
+ if (flagScope && flagProject) {
57
+ const teamId = client.config.currentTeam;
58
+ if (!teamId) {
59
+ return {
60
+ reason: AGENT_REASON.NOT_FOUND,
61
+ message: `Team not found: ${flagScope}`
62
+ };
63
+ }
64
+ const project = await getProjectByNameOrId(client, flagProject, teamId);
65
+ if (project instanceof ProjectNotFound) {
66
+ return {
67
+ reason: AGENT_REASON.NOT_FOUND,
68
+ message: `Project not found: ${flagProject}`
69
+ };
70
+ }
71
+ return { teamId, projectId: project.id };
72
+ }
73
+ return { reason: AGENT_REASON.NOT_LINKED, message: MISSING_BOTH_MESSAGE };
74
+ }
75
+
76
+ export {
77
+ MISSING_BOTH_MESSAGE,
78
+ resolveScope
79
+ };
@@ -0,0 +1,114 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ CertConfigurationError,
9
+ CertError,
10
+ DeploymentNotFound,
11
+ DeploymentPermissionDenied,
12
+ DomainNotFound,
13
+ InvalidDeploymentId,
14
+ TooManyRequests,
15
+ isAPIError
16
+ } from "./chunk-CV5YC2EN.js";
17
+ import {
18
+ output_manager_default
19
+ } from "./chunk-2JIX6UMI.js";
20
+
21
+ // src/util/parse-target.ts
22
+ function parseTarget({
23
+ flagName,
24
+ flags
25
+ }) {
26
+ const targetFlagName = `--${flagName}`;
27
+ const targetFlagValue = flags[targetFlagName];
28
+ const prodFlagValue = flags["--prod"];
29
+ if (prodFlagValue && targetFlagValue) {
30
+ output_manager_default.warn(
31
+ `Both \`--prod\` and \`${targetFlagName}\` detected. Ignoring \`--prod\`.`
32
+ );
33
+ }
34
+ if (typeof targetFlagValue === "string") {
35
+ output_manager_default.debug(`Setting target to ${targetFlagValue}`);
36
+ return targetFlagValue;
37
+ }
38
+ if (prodFlagValue) {
39
+ output_manager_default.debug("Setting target to production");
40
+ return "production";
41
+ }
42
+ return void 0;
43
+ }
44
+
45
+ // src/util/to-host.ts
46
+ function toHost(url) {
47
+ return url.replace(/^(?:.*?\/\/)?([^/]+).*/, "$1");
48
+ }
49
+
50
+ // src/util/certs/map-cert-error.ts
51
+ function mapCertError(error, cns) {
52
+ const errorCode = error.code;
53
+ if (errorCode === "too_many_requests") {
54
+ const retryAfter = typeof error.retryAfterMs === "number" ? error.retryAfterMs : 0;
55
+ return new TooManyRequests("certificates", retryAfter);
56
+ }
57
+ if (errorCode === "not_found") {
58
+ return new DomainNotFound(error.domain);
59
+ }
60
+ if (errorCode === "configuration_error") {
61
+ return new CertConfigurationError({
62
+ cns: cns || error.cns || [],
63
+ message: error.message,
64
+ external: error.external,
65
+ helpUrl: error.helpUrl,
66
+ type: error.statusCode === 449 ? "http-01" : "dns-01"
67
+ });
68
+ }
69
+ if (errorCode === "bad_domains" || errorCode === "challenge_still_pending" || errorCode === "common_name_domain_name_mismatch" || errorCode === "conflicting_caa_record" || errorCode === "domain_not_verified" || errorCode === "invalid_cn" || errorCode === "invalid_domain" || errorCode === "rate_limited" || errorCode === "should_share_root_domain" || errorCode === "unauthorized_request_error" || errorCode === "unsupported_challenge_priority" || errorCode === "wildcard_not_allowed" || errorCode === "validation_running" || errorCode === "dns_error" || errorCode === "challenge_error" || errorCode === "txt_record_not_found") {
70
+ return new CertError({
71
+ cns: cns || error.cns || [],
72
+ code: errorCode,
73
+ message: error.message,
74
+ helpUrl: error.helpUrl
75
+ });
76
+ }
77
+ return null;
78
+ }
79
+
80
+ // src/util/get-deployment.ts
81
+ async function getDeployment(client, contextName, hostOrId) {
82
+ if (hostOrId.includes(".")) {
83
+ hostOrId = toHost(hostOrId);
84
+ }
85
+ try {
86
+ return await client.fetch(
87
+ `/v13/deployments/${encodeURIComponent(hostOrId)}`
88
+ );
89
+ } catch (err) {
90
+ if (isAPIError(err)) {
91
+ if (err.status === 404) {
92
+ throw new DeploymentNotFound({ id: hostOrId, context: contextName });
93
+ }
94
+ if (err.status === 403) {
95
+ throw new DeploymentPermissionDenied(hostOrId, contextName);
96
+ }
97
+ if (err.status === 400 && err.message.includes("`id`")) {
98
+ throw new InvalidDeploymentId(hostOrId);
99
+ }
100
+ const certError = mapCertError(err);
101
+ if (certError) {
102
+ throw certError;
103
+ }
104
+ }
105
+ throw err;
106
+ }
107
+ }
108
+
109
+ export {
110
+ parseTarget,
111
+ mapCertError,
112
+ toHost,
113
+ getDeployment
114
+ };