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,338 @@
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
+ __require
10
+ } from "./chunk-TZ2YI2VH.js";
11
+
12
+ // ../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js
13
+ var require_is_docker = __commonJS({
14
+ "../../node_modules/.pnpm/is-docker@2.2.1/node_modules/is-docker/index.js"(exports, module) {
15
+ "use strict";
16
+ var fs = __require("fs");
17
+ var isDocker;
18
+ function hasDockerEnv() {
19
+ try {
20
+ fs.statSync("/.dockerenv");
21
+ return true;
22
+ } catch (_) {
23
+ return false;
24
+ }
25
+ }
26
+ function hasDockerCGroup() {
27
+ try {
28
+ return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
29
+ } catch (_) {
30
+ return false;
31
+ }
32
+ }
33
+ module.exports = () => {
34
+ if (isDocker === void 0) {
35
+ isDocker = hasDockerEnv() || hasDockerCGroup();
36
+ }
37
+ return isDocker;
38
+ };
39
+ }
40
+ });
41
+
42
+ // ../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js
43
+ var require_is_wsl = __commonJS({
44
+ "../../node_modules/.pnpm/is-wsl@2.2.0/node_modules/is-wsl/index.js"(exports, module) {
45
+ "use strict";
46
+ var os = __require("os");
47
+ var fs = __require("fs");
48
+ var isDocker = require_is_docker();
49
+ var isWsl = () => {
50
+ if (process.platform !== "linux") {
51
+ return false;
52
+ }
53
+ if (os.release().toLowerCase().includes("microsoft")) {
54
+ if (isDocker()) {
55
+ return false;
56
+ }
57
+ return true;
58
+ }
59
+ try {
60
+ return fs.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isDocker() : false;
61
+ } catch (_) {
62
+ return false;
63
+ }
64
+ };
65
+ if (process.env.__IS_WSL_TEST__) {
66
+ module.exports = isWsl;
67
+ } else {
68
+ module.exports = isWsl();
69
+ }
70
+ }
71
+ });
72
+
73
+ // ../../node_modules/.pnpm/define-lazy-prop@2.0.0/node_modules/define-lazy-prop/index.js
74
+ var require_define_lazy_prop = __commonJS({
75
+ "../../node_modules/.pnpm/define-lazy-prop@2.0.0/node_modules/define-lazy-prop/index.js"(exports, module) {
76
+ "use strict";
77
+ module.exports = (object, propertyName, fn) => {
78
+ const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
79
+ Object.defineProperty(object, propertyName, {
80
+ configurable: true,
81
+ enumerable: true,
82
+ get() {
83
+ const result = fn();
84
+ define(result);
85
+ return result;
86
+ },
87
+ set(value) {
88
+ define(value);
89
+ }
90
+ });
91
+ return object;
92
+ };
93
+ }
94
+ });
95
+
96
+ // ../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js
97
+ var require_open = __commonJS({
98
+ "../../node_modules/.pnpm/open@8.4.0/node_modules/open/index.js"(exports, module) {
99
+ var path = __require("path");
100
+ var childProcess = __require("child_process");
101
+ var { promises: fs, constants: fsConstants } = __require("fs");
102
+ var isWsl = require_is_wsl();
103
+ var isDocker = require_is_docker();
104
+ var defineLazyProperty = require_define_lazy_prop();
105
+ var localXdgOpenPath = path.join(__dirname, "xdg-open");
106
+ var { platform, arch } = process;
107
+ var getWslDrivesMountPoint = (() => {
108
+ const defaultMountPoint = "/mnt/";
109
+ let mountPoint;
110
+ return async function() {
111
+ if (mountPoint) {
112
+ return mountPoint;
113
+ }
114
+ const configFilePath = "/etc/wsl.conf";
115
+ let isConfigFileExists = false;
116
+ try {
117
+ await fs.access(configFilePath, fsConstants.F_OK);
118
+ isConfigFileExists = true;
119
+ } catch {
120
+ }
121
+ if (!isConfigFileExists) {
122
+ return defaultMountPoint;
123
+ }
124
+ const configContent = await fs.readFile(configFilePath, { encoding: "utf8" });
125
+ const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
126
+ if (!configMountPoint) {
127
+ return defaultMountPoint;
128
+ }
129
+ mountPoint = configMountPoint.groups.mountPoint.trim();
130
+ mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
131
+ return mountPoint;
132
+ };
133
+ })();
134
+ var pTryEach = async (array, mapper) => {
135
+ let latestError;
136
+ for (const item of array) {
137
+ try {
138
+ return await mapper(item);
139
+ } catch (error) {
140
+ latestError = error;
141
+ }
142
+ }
143
+ throw latestError;
144
+ };
145
+ var baseOpen = async (options) => {
146
+ options = {
147
+ wait: false,
148
+ background: false,
149
+ newInstance: false,
150
+ allowNonzeroExitCode: false,
151
+ ...options
152
+ };
153
+ if (Array.isArray(options.app)) {
154
+ return pTryEach(options.app, (singleApp) => baseOpen({
155
+ ...options,
156
+ app: singleApp
157
+ }));
158
+ }
159
+ let { name: app, arguments: appArguments = [] } = options.app || {};
160
+ appArguments = [...appArguments];
161
+ if (Array.isArray(app)) {
162
+ return pTryEach(app, (appName) => baseOpen({
163
+ ...options,
164
+ app: {
165
+ name: appName,
166
+ arguments: appArguments
167
+ }
168
+ }));
169
+ }
170
+ let command;
171
+ const cliArguments = [];
172
+ const childProcessOptions = {};
173
+ if (platform === "darwin") {
174
+ command = "open";
175
+ if (options.wait) {
176
+ cliArguments.push("--wait-apps");
177
+ }
178
+ if (options.background) {
179
+ cliArguments.push("--background");
180
+ }
181
+ if (options.newInstance) {
182
+ cliArguments.push("--new");
183
+ }
184
+ if (app) {
185
+ cliArguments.push("-a", app);
186
+ }
187
+ } else if (platform === "win32" || isWsl && !isDocker()) {
188
+ const mountPoint = await getWslDrivesMountPoint();
189
+ command = isWsl ? `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`;
190
+ cliArguments.push(
191
+ "-NoProfile",
192
+ "-NonInteractive",
193
+ "\u2013ExecutionPolicy",
194
+ "Bypass",
195
+ "-EncodedCommand"
196
+ );
197
+ if (!isWsl) {
198
+ childProcessOptions.windowsVerbatimArguments = true;
199
+ }
200
+ const encodedArguments = ["Start"];
201
+ if (options.wait) {
202
+ encodedArguments.push("-Wait");
203
+ }
204
+ if (app) {
205
+ encodedArguments.push(`"\`"${app}\`""`, "-ArgumentList");
206
+ if (options.target) {
207
+ appArguments.unshift(options.target);
208
+ }
209
+ } else if (options.target) {
210
+ encodedArguments.push(`"${options.target}"`);
211
+ }
212
+ if (appArguments.length > 0) {
213
+ appArguments = appArguments.map((arg) => `"\`"${arg}\`""`);
214
+ encodedArguments.push(appArguments.join(","));
215
+ }
216
+ options.target = Buffer.from(encodedArguments.join(" "), "utf16le").toString("base64");
217
+ } else {
218
+ if (app) {
219
+ command = app;
220
+ } else {
221
+ const isBundled = !__dirname || __dirname === "/";
222
+ let exeLocalXdgOpen = false;
223
+ try {
224
+ await fs.access(localXdgOpenPath, fsConstants.X_OK);
225
+ exeLocalXdgOpen = true;
226
+ } catch {
227
+ }
228
+ const useSystemXdgOpen = process.versions.electron || platform === "android" || isBundled || !exeLocalXdgOpen;
229
+ command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
230
+ }
231
+ if (appArguments.length > 0) {
232
+ cliArguments.push(...appArguments);
233
+ }
234
+ if (!options.wait) {
235
+ childProcessOptions.stdio = "ignore";
236
+ childProcessOptions.detached = true;
237
+ }
238
+ }
239
+ if (options.target) {
240
+ cliArguments.push(options.target);
241
+ }
242
+ if (platform === "darwin" && appArguments.length > 0) {
243
+ cliArguments.push("--args", ...appArguments);
244
+ }
245
+ const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
246
+ if (options.wait) {
247
+ return new Promise((resolve, reject) => {
248
+ subprocess.once("error", reject);
249
+ subprocess.once("close", (exitCode) => {
250
+ if (options.allowNonzeroExitCode && exitCode > 0) {
251
+ reject(new Error(`Exited with code ${exitCode}`));
252
+ return;
253
+ }
254
+ resolve(subprocess);
255
+ });
256
+ });
257
+ }
258
+ subprocess.unref();
259
+ return subprocess;
260
+ };
261
+ var open = (target, options) => {
262
+ if (typeof target !== "string") {
263
+ throw new TypeError("Expected a `target`");
264
+ }
265
+ return baseOpen({
266
+ ...options,
267
+ target
268
+ });
269
+ };
270
+ var openApp = (name, options) => {
271
+ if (typeof name !== "string") {
272
+ throw new TypeError("Expected a `name`");
273
+ }
274
+ const { arguments: appArguments = [] } = options || {};
275
+ if (appArguments !== void 0 && appArguments !== null && !Array.isArray(appArguments)) {
276
+ throw new TypeError("Expected `appArguments` as Array type");
277
+ }
278
+ return baseOpen({
279
+ ...options,
280
+ app: {
281
+ name,
282
+ arguments: appArguments
283
+ }
284
+ });
285
+ };
286
+ function detectArchBinary(binary) {
287
+ if (typeof binary === "string" || Array.isArray(binary)) {
288
+ return binary;
289
+ }
290
+ const { [arch]: archBinary } = binary;
291
+ if (!archBinary) {
292
+ throw new Error(`${arch} is not supported`);
293
+ }
294
+ return archBinary;
295
+ }
296
+ function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
297
+ if (wsl && isWsl) {
298
+ return detectArchBinary(wsl);
299
+ }
300
+ if (!platformBinary) {
301
+ throw new Error(`${platform} is not supported`);
302
+ }
303
+ return detectArchBinary(platformBinary);
304
+ }
305
+ var apps = {};
306
+ defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
307
+ darwin: "google chrome",
308
+ win32: "chrome",
309
+ linux: ["google-chrome", "google-chrome-stable", "chromium"]
310
+ }, {
311
+ wsl: {
312
+ ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
313
+ x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
314
+ }
315
+ }));
316
+ defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
317
+ darwin: "firefox",
318
+ win32: "C:\\Program Files\\Mozilla Firefox\\firefox.exe",
319
+ linux: "firefox"
320
+ }, {
321
+ wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
322
+ }));
323
+ defineLazyProperty(apps, "edge", () => detectPlatformBinary({
324
+ darwin: "microsoft edge",
325
+ win32: "msedge",
326
+ linux: ["microsoft-edge", "microsoft-edge-dev"]
327
+ }, {
328
+ wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
329
+ }));
330
+ open.apps = apps;
331
+ open.openApp = openApp;
332
+ module.exports = open;
333
+ }
334
+ });
335
+
336
+ export {
337
+ require_open
338
+ };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-2473DUBR.js";
10
10
  import {
11
11
  outputError
12
- } from "./chunk-3T7WSWZH.js";
12
+ } from "./chunk-KFWQ3EFH.js";
13
13
 
14
14
  // src/commands/comments/content.ts
15
15
  import { readFileSync } from "fs";
@@ -6,20 +6,22 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveProjectContext
9
- } from "./chunk-WYU64FLP.js";
9
+ } from "./chunk-X6TGUHFD.js";
10
10
  import {
11
11
  AGENT_REASON,
12
- AGENT_STATUS,
13
- buildCommandWithYes,
14
- outputAgentError,
15
- withGlobalFlags
16
- } from "./chunk-NGGLYKNU.js";
12
+ AGENT_STATUS
13
+ } from "./chunk-VUS2JQB2.js";
17
14
  import {
18
15
  printError
19
- } from "./chunk-AYLY3ZVL.js";
16
+ } from "./chunk-3VM7HWF6.js";
20
17
  import {
21
18
  parseArguments
22
19
  } from "./chunk-57RHXXXG.js";
20
+ import {
21
+ buildCommandWithYes,
22
+ outputAgentError,
23
+ withGlobalFlags
24
+ } from "./chunk-26CU4Q3C.js";
23
25
  import {
24
26
  getCommandName,
25
27
  getCommandNamePlain,
@@ -28,7 +30,7 @@ import {
28
30
  } from "./chunk-Q2DGFCO7.js";
29
31
  import {
30
32
  output_manager_default
31
- } from "./chunk-QFAS4OVW.js";
33
+ } from "./chunk-2JIX6UMI.js";
32
34
  import {
33
35
  require_source
34
36
  } from "./chunk-S7KYDPEM.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-Q2DGFCO7.js";
10
10
  import {
11
11
  output_manager_default
12
- } from "./chunk-QFAS4OVW.js";
12
+ } from "./chunk-2JIX6UMI.js";
13
13
  import {
14
14
  require_source
15
15
  } from "./chunk-S7KYDPEM.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  output_manager_default
9
- } from "./chunk-QFAS4OVW.js";
9
+ } from "./chunk-2JIX6UMI.js";
10
10
 
11
11
  // src/util/agent/auto-install-agentic.ts
12
12
  import { readFile, writeFile } from "fs/promises";
@@ -0,0 +1,257 @@
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
+ require_open
9
+ } from "./chunk-HRXRELD3.js";
10
+ import {
11
+ deviceAccessTokenRequest,
12
+ deviceAuthorizationRequest,
13
+ isOAuthError,
14
+ processDeviceAuthorizationResponse,
15
+ processTokenResponse
16
+ } from "./chunk-ABSZNJQO.js";
17
+ import {
18
+ printError
19
+ } from "./chunk-3VM7HWF6.js";
20
+ import {
21
+ getTeams,
22
+ getUser,
23
+ humanizePath
24
+ } from "./chunk-MADFAH3O.js";
25
+ import {
26
+ getCommandName
27
+ } from "./chunk-Q2DGFCO7.js";
28
+ import {
29
+ emoji,
30
+ output_manager_default,
31
+ require_ansi_escapes
32
+ } from "./chunk-2JIX6UMI.js";
33
+ import {
34
+ require_source
35
+ } from "./chunk-S7KYDPEM.js";
36
+ import {
37
+ __toESM
38
+ } from "./chunk-TZ2YI2VH.js";
39
+
40
+ // src/commands/login/future.ts
41
+ var import_chalk = __toESM(require_source(), 1);
42
+ var open = __toESM(require_open(), 1);
43
+ var import_ansi_escapes = __toESM(require_ansi_escapes(), 1);
44
+ import readline from "readline";
45
+ import { KNOWN_AGENTS } from "@vercel/detect-agent";
46
+
47
+ // src/util/login/update-current-team-after-login.ts
48
+ async function updateCurrentTeamAfterLogin(client, ssoTeamId) {
49
+ if (ssoTeamId) {
50
+ client.config.currentTeam = ssoTeamId;
51
+ } else {
52
+ let user = null;
53
+ try {
54
+ user = await getUser(client);
55
+ } catch (_err) {
56
+ output_manager_default.error("Failed to fetch the logged in user. Please try again.");
57
+ return 1;
58
+ }
59
+ if (user.version === "northstar" && user.defaultTeamId) {
60
+ client.config.currentTeam = user.defaultTeamId;
61
+ } else {
62
+ delete client.config.currentTeam;
63
+ }
64
+ }
65
+ }
66
+
67
+ // src/commands/login/future.ts
68
+ async function performDeviceCodeFlow(client, options) {
69
+ const deviceAuthorizationResponse = await deviceAuthorizationRequest({
70
+ refresh_token: options?.refreshToken,
71
+ acr_values: options?.acrValues
72
+ });
73
+ output_manager_default.debug(
74
+ `'Device Authorization response:', ${await deviceAuthorizationResponse.clone().text()}`
75
+ );
76
+ const [deviceAuthorizationError, deviceAuthorization] = await processDeviceAuthorizationResponse(deviceAuthorizationResponse);
77
+ if (deviceAuthorizationError) {
78
+ if (options?.fallbackToLoginOnStepUpFailure && options.refreshToken && isOAuthError(deviceAuthorizationError) && (deviceAuthorizationError.code === "invalid_grant" || deviceAuthorizationError.code === "invalid_scope")) {
79
+ output_manager_default.debug(
80
+ `Step-up device authorization failed: ${deviceAuthorizationError.cause.message}`
81
+ );
82
+ output_manager_default.log("Couldn't refresh the saved login. Starting a new login.");
83
+ return performDeviceCodeFlow(
84
+ client,
85
+ options.teamId ? { teamId: options.teamId } : void 0
86
+ );
87
+ }
88
+ printError(
89
+ isOAuthError(deviceAuthorizationError) ? deviceAuthorizationError.cause : deviceAuthorizationError
90
+ );
91
+ return null;
92
+ }
93
+ const { device_code, user_code, verification_uri, expiresAt, interval } = deviceAuthorization;
94
+ let { verification_uri_complete } = deviceAuthorization;
95
+ if (options?.teamId) {
96
+ const url = new URL(verification_uri_complete);
97
+ url.searchParams.set("team_id", options.teamId);
98
+ verification_uri_complete = url.toString();
99
+ }
100
+ const isCursorAgent = client.agentName === KNOWN_AGENTS.CURSOR || client.agentName === KNOWN_AGENTS.CURSOR_CLI;
101
+ const shouldSkipBrowser = process.env.CI && !isCursorAgent;
102
+ output_manager_default.log(
103
+ `
104
+ Visit ${import_chalk.default.bold(
105
+ output_manager_default.link(
106
+ verification_uri.replace("https://", ""),
107
+ verification_uri_complete,
108
+ { color: false, fallback: () => verification_uri_complete }
109
+ )
110
+ )}${output_manager_default.supportsHyperlink ? ` and enter ${import_chalk.default.bold(user_code)}` : ""}
111
+ `
112
+ );
113
+ if (!shouldSkipBrowser) {
114
+ try {
115
+ const browserProcess = await open.default(verification_uri_complete);
116
+ browserProcess.on("error", (error) => {
117
+ output_manager_default.debug(`Failed to open browser: ${error}`);
118
+ });
119
+ } catch (error) {
120
+ output_manager_default.debug(`Failed to open browser: ${error}`);
121
+ if (client.isAgent && client.nonInteractive) {
122
+ output_manager_default.log(
123
+ `
124
+ ${import_chalk.default.yellow("\u26A0")} ${import_chalk.default.bold("Browser could not be opened automatically.")}
125
+ `
126
+ );
127
+ output_manager_default.log(
128
+ `Please ask the user to manually visit the URL above and complete the authentication process.
129
+ `
130
+ );
131
+ }
132
+ }
133
+ }
134
+ const rl = readline.createInterface({
135
+ input: process.stdin,
136
+ output: process.stdout
137
+ }).on("SIGINT", () => {
138
+ process.exit(0);
139
+ });
140
+ output_manager_default.spinner("Waiting for authentication...");
141
+ let intervalMs = interval * 1e3;
142
+ let result = null;
143
+ let flowError = new Error(
144
+ "Timed out waiting for authentication. Please try again."
145
+ );
146
+ async function pollForToken() {
147
+ while (Date.now() < expiresAt) {
148
+ const [tokenResponseError, tokenResponse] = await deviceAccessTokenRequest({ device_code });
149
+ if (tokenResponseError) {
150
+ if (tokenResponseError.message.includes("timeout")) {
151
+ intervalMs *= 2;
152
+ output_manager_default.debug(
153
+ `Connection timeout. Slowing down, polling every ${intervalMs / 1e3}s...`
154
+ );
155
+ await wait(intervalMs);
156
+ continue;
157
+ }
158
+ return tokenResponseError;
159
+ }
160
+ output_manager_default.debug(
161
+ `'Device Access Token response:', ${await tokenResponse.clone().text()}`
162
+ );
163
+ const [tokensError, tokens] = await processTokenResponse(tokenResponse);
164
+ if (isOAuthError(tokensError)) {
165
+ const { code } = tokensError;
166
+ switch (code) {
167
+ case "authorization_pending":
168
+ await wait(intervalMs);
169
+ continue;
170
+ case "slow_down":
171
+ intervalMs += 5 * 1e3;
172
+ output_manager_default.debug(
173
+ `Authorization server requests to slow down. Polling every ${intervalMs / 1e3}s...`
174
+ );
175
+ await wait(intervalMs);
176
+ continue;
177
+ default:
178
+ return tokensError.cause;
179
+ }
180
+ }
181
+ if (tokensError)
182
+ return tokensError;
183
+ output_manager_default.print((0, import_ansi_escapes.eraseLines)(2));
184
+ result = {
185
+ access_token: tokens.access_token,
186
+ expires_in: tokens.expires_in,
187
+ refresh_token: tokens.refresh_token
188
+ };
189
+ return;
190
+ }
191
+ }
192
+ flowError = await pollForToken();
193
+ output_manager_default.stopSpinner();
194
+ rl.close();
195
+ if (flowError) {
196
+ printError(flowError);
197
+ return null;
198
+ }
199
+ return result;
200
+ }
201
+ async function login(client, telemetry, standalone = true) {
202
+ const tokens = await performDeviceCodeFlow(client);
203
+ if (!tokens) {
204
+ telemetry.trackState("error");
205
+ return 1;
206
+ }
207
+ const previousTeamId = client.config.currentTeam;
208
+ client.updateAuthConfig({
209
+ token: tokens.access_token,
210
+ userId: void 0,
211
+ expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in,
212
+ refreshToken: tokens.refresh_token
213
+ });
214
+ if (previousTeamId) {
215
+ let isMember = true;
216
+ try {
217
+ const teams = await getTeams(client);
218
+ isMember = teams.some((team) => team.id === previousTeamId);
219
+ } catch {
220
+ }
221
+ if (!isMember) {
222
+ output_manager_default.warn(
223
+ "Your previously selected team is no longer accessible; switching to your default scope."
224
+ );
225
+ client.updateConfig({ currentTeam: void 0 });
226
+ await updateCurrentTeamAfterLogin(client);
227
+ }
228
+ } else {
229
+ client.updateConfig({ currentTeam: void 0 });
230
+ await updateCurrentTeamAfterLogin(client);
231
+ }
232
+ client.persistAuthConfig();
233
+ client.writeToConfigFile();
234
+ output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
235
+ if (standalone) {
236
+ output_manager_default.print(`
237
+ ${import_chalk.default.cyan("Congratulations!")} You are now signed in.
238
+
239
+ To deploy something, run ${getCommandName()}.
240
+
241
+ ${emoji("tip")} To deploy every commit automatically,
242
+ connect a Git Repository (${import_chalk.default.bold(output_manager_default.link("vercel.link/git", "https://vercel.link/git", { color: false }))}).
243
+ `);
244
+ } else {
245
+ output_manager_default.success("Logged in.");
246
+ }
247
+ telemetry.trackState("success");
248
+ return 0;
249
+ }
250
+ async function wait(intervalMs) {
251
+ await new Promise((resolve) => setTimeout(resolve, intervalMs));
252
+ }
253
+
254
+ export {
255
+ performDeviceCodeFlow,
256
+ login
257
+ };
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-GGP5R3FU.js";
10
10
  import {
11
11
  output_manager_default
12
- } from "./chunk-QFAS4OVW.js";
12
+ } from "./chunk-2JIX6UMI.js";
13
13
  import {
14
14
  __toESM
15
15
  } from "./chunk-TZ2YI2VH.js";
@@ -8,10 +8,10 @@ import {
8
8
  formatCondition,
9
9
  formatTransform,
10
10
  isTargetTransform
11
- } from "./chunk-B4TXCKXE.js";
11
+ } from "./chunk-JOXNBQ7W.js";
12
12
  import {
13
13
  output_manager_default
14
- } from "./chunk-QFAS4OVW.js";
14
+ } from "./chunk-2JIX6UMI.js";
15
15
  import {
16
16
  require_source
17
17
  } from "./chunk-S7KYDPEM.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  TelemetryClient
9
- } from "./chunk-XNFHNTS2.js";
9
+ } from "./chunk-HB4UKFDO.js";
10
10
 
11
11
  // src/util/telemetry/commands/routes/index.ts
12
12
  var RoutesTelemetryClient = class extends TelemetryClient {