@depup/vercel 60.1.3-depup.0 → 62.2.0-depup.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 (194) hide show
  1. package/README.md +25 -6
  2. package/changes.json +85 -9
  3. package/dist/chunks/{add-IEQXYKXU.js → add-7HJR3HK7.js} +1 -1
  4. package/dist/chunks/add-Q5OZFIRM.js +8 -0
  5. package/dist/chunks/add-VLVURKGS.js +8 -0
  6. package/dist/chunks/{build-Z7KM3GMP.js → build-MR7MUWBQ.js} +1 -1
  7. package/dist/chunks/chunk-23NBYS6R.js +36 -0
  8. package/dist/chunks/{chunk-YMVDWVMO.js → chunk-2RQFMCPJ.js} +1 -1
  9. package/dist/chunks/{chunk-IVWPQYIH.js → chunk-3R66O72V.js} +1 -1
  10. package/dist/chunks/{chunk-7CTHRXTG.js → chunk-4HXRTNAK.js} +2 -2
  11. package/dist/chunks/{chunk-KCARCOP5.js → chunk-5VWK73R6.js} +2 -2
  12. package/dist/chunks/{chunk-H4FTGLWV.js → chunk-6JU3QZ3O.js} +1 -1
  13. package/dist/chunks/{chunk-JM3BFUXX.js → chunk-743NGLUN.js} +1 -1
  14. package/dist/chunks/{chunk-UO2ECTIU.js → chunk-7ANQHBBE.js} +1 -1
  15. package/dist/chunks/chunk-7I23VXBQ.js +7 -0
  16. package/dist/chunks/{chunk-TTKDYUJD.js → chunk-7IRKF3ZG.js} +5 -5
  17. package/dist/chunks/{chunk-5ENY7DSN.js → chunk-7JFK53D4.js} +1 -1
  18. package/dist/chunks/{chunk-R7ZRVA7E.js → chunk-7POWBJDF.js} +7 -5
  19. package/dist/chunks/chunk-7T4CJ6MJ.js +9 -0
  20. package/dist/chunks/{chunk-7QVVD3WT.js → chunk-A752WDCH.js} +1 -1
  21. package/dist/chunks/{chunk-2R6NQXTQ.js → chunk-ACCZWEKL.js} +1 -1
  22. package/dist/chunks/chunk-ADDXKC3J.js +9 -0
  23. package/dist/chunks/{chunk-U6AYMUHX.js → chunk-AKPQWZIP.js} +4 -4
  24. package/dist/chunks/chunk-ALXWJ7XN.js +7 -0
  25. package/dist/chunks/chunk-B5PFD6Q3.js +7 -0
  26. package/dist/chunks/{chunk-WSZHNPA6.js → chunk-C3XFIO5L.js} +1 -1
  27. package/dist/chunks/{chunk-B6PMTBCU.js → chunk-C6ITILVT.js} +2 -2
  28. package/dist/chunks/{chunk-JSKGZLE4.js → chunk-CQ3RAERR.js} +1 -1
  29. package/dist/chunks/chunk-CVX5X5RI.js +7 -0
  30. package/dist/chunks/chunk-D5VTBRWF.js +7 -0
  31. package/dist/chunks/{chunk-MDZ2JJP3.js → chunk-DECIQZZQ.js} +3 -3
  32. package/dist/chunks/{chunk-HJ3E752K.js → chunk-E4RLHRDF.js} +2 -2
  33. package/dist/chunks/chunk-EQHNA4BW.js +7 -0
  34. package/dist/chunks/{chunk-3HLNS2I4.js → chunk-GASSNHZG.js} +4 -4
  35. package/dist/chunks/{chunk-YXTE2H6I.js → chunk-HLVUEYOZ.js} +1 -1
  36. package/dist/chunks/chunk-HVROAV4B.js +9 -0
  37. package/dist/chunks/{chunk-TAG2AZXS.js → chunk-HYW4A5B3.js} +1 -1
  38. package/dist/chunks/{chunk-ZXE4XYIV.js → chunk-ILFUNCJZ.js} +1 -1
  39. package/dist/chunks/{chunk-QLS2XUFL.js → chunk-ILXXXXVQ.js} +1 -1
  40. package/dist/chunks/chunk-J6OPPI3A.js +63 -0
  41. package/dist/chunks/{chunk-BHVHQKUZ.js → chunk-JO3XBFR3.js} +1 -1
  42. package/dist/chunks/{chunk-MEAY2K5Z.js → chunk-JRU6AGXG.js} +1 -1
  43. package/dist/chunks/{chunk-E3EJLJFQ.js → chunk-JSKSNCK2.js} +1 -1
  44. package/dist/chunks/{chunk-IS43O66T.js → chunk-K5WTLFS6.js} +1 -1
  45. package/dist/chunks/{chunk-D2ZPYXZ6.js → chunk-KG5BMLOI.js} +1 -1
  46. package/dist/chunks/{chunk-QFPCR4NL.js → chunk-KOSM3DYE.js} +1 -1
  47. package/dist/chunks/{chunk-WH6M54KF.js → chunk-KREBNPHL.js} +3 -3
  48. package/dist/chunks/{chunk-DV4Z4WSD.js → chunk-L46BHPRD.js} +1 -1
  49. package/dist/chunks/{chunk-WWB66KP5.js → chunk-LCWCTL6L.js} +1 -1
  50. package/dist/chunks/{chunk-BEGUGOL7.js → chunk-LCY4SULE.js} +1 -1
  51. package/dist/chunks/chunk-LHQUNL52.js +7 -0
  52. package/dist/chunks/{chunk-YXBDDHPL.js → chunk-M7ZGWERO.js} +1 -1
  53. package/dist/chunks/{chunk-A5VLP25I.js → chunk-MCCL762Q.js} +1 -1
  54. package/dist/chunks/chunk-MK3CTSDV.js +24 -0
  55. package/dist/chunks/{chunk-OCWSKPV4.js → chunk-N4PVXHAJ.js} +3 -2
  56. package/dist/chunks/{chunk-M5Y335WI.js → chunk-N5MNZPPJ.js} +1 -1
  57. package/dist/chunks/{chunk-3B4P7YHO.js → chunk-N7XPPYQQ.js} +1 -1
  58. package/dist/chunks/{chunk-N3N5UHIL.js → chunk-NESZV33T.js} +1 -1
  59. package/dist/chunks/{chunk-JZUVWAOK.js → chunk-NRN65VUM.js} +2 -2
  60. package/dist/chunks/{chunk-O7G3CZ42.js → chunk-NT67T6DL.js} +1 -1
  61. package/dist/chunks/chunk-NXTK7VKL.js +7 -0
  62. package/dist/chunks/{chunk-CN4SCEIP.js → chunk-PADCVJ7G.js} +1 -1
  63. package/dist/chunks/{chunk-QVAZWF3J.js → chunk-PAI3WRPA.js} +1 -1
  64. package/dist/chunks/{chunk-RMYQX7NP.js → chunk-PTFKU33G.js} +1 -1
  65. package/dist/chunks/{chunk-JAJW3P42.js → chunk-PV5YI2ZZ.js} +1 -1
  66. package/dist/chunks/{chunk-WUZD4KBL.js → chunk-RFWCEREA.js} +1 -1
  67. package/dist/chunks/{chunk-UTVDFSQS.js → chunk-RVKOPGOI.js} +1 -1
  68. package/dist/chunks/{chunk-ZKYS7EAB.js → chunk-S2LBGLRE.js} +1 -1
  69. package/dist/chunks/{chunk-6OI6SRHZ.js → chunk-SDGWKUST.js} +1 -1
  70. package/dist/chunks/{chunk-WKZ6JSGZ.js → chunk-TKBORMUF.js} +1 -1
  71. package/dist/chunks/chunk-UOHVKN6N.js +8 -0
  72. package/dist/chunks/{chunk-3MVT26LH.js → chunk-UWO3M2L2.js} +1 -1
  73. package/dist/chunks/{chunk-AP36GAOG.js → chunk-VDOJERIW.js} +1 -1
  74. package/dist/chunks/chunk-VGXFOQ4P.js +8 -0
  75. package/dist/chunks/{chunk-TTMLSKF7.js → chunk-VTMLKJVQ.js} +1 -1
  76. package/dist/chunks/{chunk-UFZ4W2PA.js → chunk-VZDY57PJ.js} +1 -1
  77. package/dist/chunks/{chunk-EQ52F4LH.js → chunk-W7PVS44H.js} +1 -1
  78. package/dist/chunks/{chunk-Y7PHTVZ6.js → chunk-WN6OXK2F.js} +1 -1
  79. package/dist/chunks/{chunk-25LSRUTF.js → chunk-WOKSTB3F.js} +1 -1
  80. package/dist/chunks/{chunk-NR367IWV.js → chunk-WW3VUXRV.js} +1 -1
  81. package/dist/chunks/{chunk-3RV2B7D3.js → chunk-X47XV2WG.js} +1 -1
  82. package/dist/chunks/chunk-ZQIUMXCI.js +7 -0
  83. package/dist/chunks/{chunk-YJZFFNUB.js → chunk-ZUYWATU5.js} +1 -1
  84. package/dist/chunks/{clear-AZWSIGIF.js → clear-PPE55RPM.js} +1 -1
  85. package/dist/chunks/{compile-vercel-config-56X2X4Z3.js → compile-vercel-config-2IC23CNT.js} +1 -1
  86. package/dist/chunks/{config-NGVEJABO.js → config-G2A6KPPM.js} +1 -1
  87. package/dist/chunks/config-T3WHONFJ.js +7 -0
  88. package/dist/chunks/config-validator.mjs +1 -1
  89. package/dist/chunks/{constants-G4UYVLOF.js → constants-NCE2LWSS.js} +1 -1
  90. package/dist/chunks/{delete-LX44AJYC.js → delete-75SYJKNE.js} +1 -1
  91. package/dist/chunks/{delete-TA6UVDSJ.js → delete-MHXN5KTO.js} +1 -1
  92. package/dist/chunks/{detect-projects-LEVGWMQE.js → detect-projects-GJF4VXQI.js} +1 -1
  93. package/dist/chunks/detect-services-K3363KB7.js +7 -0
  94. package/dist/chunks/{disable-E7TU3QIX.js → disable-OUYOHEWN.js} +1 -1
  95. package/dist/chunks/{discard-SVF5HBYG.js → discard-RXSHOY3J.js} +1 -1
  96. package/dist/chunks/{edit-VCOF42GW.js → edit-Y7OL72ZK.js} +1 -1
  97. package/dist/chunks/{edit-2RLFRAOJ.js → edit-Z5RCWPOX.js} +1 -1
  98. package/dist/chunks/{enable-H6RL2XIW.js → enable-HI2UH2NM.js} +1 -1
  99. package/dist/chunks/{export-JW3FFP7N.js → export-CMP3APAJ.js} +1 -1
  100. package/dist/chunks/{future-IGDV62BF.js → future-GS7ZLJ3N.js} +1 -1
  101. package/dist/chunks/{generate-cert-for-deploy-25UQ2477.js → generate-cert-for-deploy-2HHUYGHU.js} +1 -1
  102. package/dist/chunks/{image-MHAVMOJB.js → image-SQIUEBFK.js} +1 -1
  103. package/dist/chunks/{import-builders-5UODCCVF.js → import-builders-EUOOFPHW.js} +1 -1
  104. package/dist/chunks/{inspect-LIGFVYDM.js → inspect-2SXPXNYH.js} +1 -1
  105. package/dist/chunks/{inspect-43UJHR4K.js → inspect-DYNTJMTQ.js} +1 -1
  106. package/dist/chunks/{inspect-VETXDYUD.js → inspect-J3F3U3YF.js} +1 -1
  107. package/dist/chunks/{inspect-HJF2XFBX.js → inspect-KYFVYFWX.js} +1 -1
  108. package/dist/chunks/{inspect-KBJ7F64J.js → inspect-V7HA2GZ5.js} +1 -1
  109. package/dist/chunks/{list-EGYYRTG5.js → list-TSDBEAVF.js} +1 -1
  110. package/dist/chunks/{list-NAABRL7N.js → list-X4MKKDJX.js} +1 -1
  111. package/dist/chunks/{list-KAGIR3PD.js → list-ZQSOWXRI.js} +1 -1
  112. package/dist/chunks/{login-X3KPMMEP.js → login-5FMKHZVG.js} +1 -1
  113. package/dist/chunks/{login-MZ67I5ZB.js → login-YEDMPXUF.js} +1 -1
  114. package/dist/chunks/{logs-GHHH2DZA.js → logs-X2OIQXGW.js} +1 -1
  115. package/dist/chunks/{ls-JHJPWFMF.js → ls-4W4KTJ6T.js} +1 -1
  116. package/dist/chunks/{ls-QXEB3MBD.js → ls-6EDJUUDW.js} +1 -1
  117. package/dist/chunks/{ls-YA4OQL3F.js → ls-BMAVUMXU.js} +1 -1
  118. package/dist/chunks/{ls-7JFKEA5P.js → ls-HK45UWBD.js} +1 -1
  119. package/dist/chunks/{ls-MMA5XS6S.js → ls-LAYBQVU2.js} +1 -1
  120. package/dist/chunks/{ls-GOLB26ER.js → ls-SQ42O6O5.js} +1 -1
  121. package/dist/chunks/{ls-UAQ2QDGG.js → ls-XIJ4CY2N.js} +1 -1
  122. package/dist/chunks/{mutate-AJYMI5UB.js → mutate-6FCOCHSA.js} +1 -1
  123. package/dist/chunks/{notifications-DKZMDRHS.js → notifications-JTK7ZOLC.js} +1 -1
  124. package/dist/chunks/{open-L5DJKOV4.js → open-3G4R3VIN.js} +1 -1
  125. package/dist/chunks/{openapi-7JUPKBWV.js → openapi-W365UPH2.js} +1 -1
  126. package/dist/chunks/{permissions-BRSVLT6O.js → permissions-IWUBXZBZ.js} +1 -1
  127. package/dist/chunks/{prompt-missing-credentials-PPUSNDNC.js → prompt-missing-credentials-VDR5HVA2.js} +1 -1
  128. package/dist/chunks/{publish-PXKC5GXE.js → publish-5QKVU6YV.js} +1 -1
  129. package/dist/chunks/pull-K4JQEP7N.js +7 -0
  130. package/dist/chunks/{purchase-domain-if-available-BI7AHJMX.js → purchase-domain-if-available-Q7H2TGKR.js} +1 -1
  131. package/dist/chunks/{push-G4JYPC5S.js → push-COILRLCW.js} +1 -1
  132. package/dist/chunks/{query-JGUDFRPJ.js → query-ABPO2REN.js} +2 -2
  133. package/dist/chunks/{reauthenticate-DIFJZWC5.js → reauthenticate-3H5Q2ZWD.js} +1 -1
  134. package/dist/chunks/{reorder-VTFBS2DW.js → reorder-FBUQ5ET7.js} +1 -1
  135. package/dist/chunks/{reply-HXGAMNR6.js → reply-FR5VO7DA.js} +1 -1
  136. package/dist/chunks/{resolve-IGQSKGRI.js → resolve-JI2ENFS6.js} +1 -1
  137. package/dist/chunks/{resolve-deployment-framework-preset-XF3NJIDS.js → resolve-deployment-framework-preset-QEPJNWVF.js} +1 -1
  138. package/dist/chunks/{restore-XKLJMOKB.js → restore-LYY4BSYJ.js} +1 -1
  139. package/dist/chunks/{rm-3REOGKTJ.js → rm-C2RWWMO3.js} +1 -1
  140. package/dist/chunks/{rm-SQM4TQOV.js → rm-CYYVIF2U.js} +1 -1
  141. package/dist/chunks/rm-ETLZ75RJ.js +8 -0
  142. package/dist/chunks/{rm-C2OYOAJY.js → rm-GHSQEFRG.js} +1 -1
  143. package/dist/chunks/{rm-DTF2JN5L.js → rm-KHO6RV55.js} +1 -1
  144. package/dist/chunks/{routes-IPGKJ2E4.js → routes-FOCZWOGO.js} +1 -1
  145. package/dist/chunks/{rule-inspect-PQUJOWHR.js → rule-inspect-MISYALLU.js} +1 -1
  146. package/dist/chunks/{rules-IX7WN6XW.js → rules-KAGL6MH3.js} +1 -1
  147. package/dist/chunks/schema-EKWTCBNR.js +14 -0
  148. package/dist/chunks/{schema-WFKR7ULE.js → schema-FZVKQRNB.js} +2 -2
  149. package/dist/chunks/{select-org-6AA7XX6E.js → select-org-37C26F7T.js} +1 -1
  150. package/dist/chunks/set-5D7C6HMZ.js +7 -0
  151. package/dist/chunks/setup-and-link-H4P3FZB3.js +7 -0
  152. package/dist/chunks/{tags-FE4GVQQO.js → tags-DVGQQZNC.js} +1 -1
  153. package/dist/chunks/{types-UYIFBCCL.js → types-UN5J66MI.js} +1 -1
  154. package/dist/chunks/{update-27EMACWZ.js → update-QY3ZME4T.js} +1 -1
  155. package/dist/chunks/{vlt-builder-importer-QEWS6M2P.js → vlt-builder-importer-W63QEXYX.js} +2 -2
  156. package/dist/commands/build/index.js +1 -1
  157. package/dist/commands/deploy/index.js +9 -9
  158. package/dist/commands/dev/index.js +7 -7
  159. package/dist/commands/env/index.js +1 -1
  160. package/dist/commands/link/index.js +1 -1
  161. package/dist/commands/list/index.js +1 -1
  162. package/dist/commands-bulk.js +753 -700
  163. package/dist/help.js +1 -1
  164. package/dist/index.js +4 -3
  165. package/dist/internal-build-worker.js +2 -2
  166. package/dist/root-help-commands.mjs +1 -0
  167. package/dist/vc.js +66 -9
  168. package/dist/version.mjs +1 -1
  169. package/package.json +147 -70
  170. package/dist/chunks/add-5INBQVKB.js +0 -8
  171. package/dist/chunks/add-QJSYPE26.js +0 -8
  172. package/dist/chunks/chunk-5U25FWD5.js +0 -8
  173. package/dist/chunks/chunk-5UOVEMYX.js +0 -7
  174. package/dist/chunks/chunk-65JYSI26.js +0 -7
  175. package/dist/chunks/chunk-CVKB54WW.js +0 -7
  176. package/dist/chunks/chunk-DKV4IVH5.js +0 -7
  177. package/dist/chunks/chunk-FZKWLGRG.js +0 -7
  178. package/dist/chunks/chunk-GL7HB5ZK.js +0 -7
  179. package/dist/chunks/chunk-KK4AJES5.js +0 -36
  180. package/dist/chunks/chunk-KOOED3TJ.js +0 -9
  181. package/dist/chunks/chunk-LAYFSD5A.js +0 -7
  182. package/dist/chunks/chunk-LFQTA3CF.js +0 -7
  183. package/dist/chunks/chunk-N5AIKGEO.js +0 -9
  184. package/dist/chunks/chunk-RYZ5FAUA.js +0 -131
  185. package/dist/chunks/chunk-SW7MNF4H.js +0 -7
  186. package/dist/chunks/chunk-V54UKUGF.js +0 -7
  187. package/dist/chunks/chunk-VCB6KNW3.js +0 -24
  188. package/dist/chunks/config-A53AXEGB.js +0 -7
  189. package/dist/chunks/detect-services-KO3GQ2ZK.js +0 -7
  190. package/dist/chunks/pull-ZBELCNJJ.js +0 -7
  191. package/dist/chunks/rm-DL7NRDLF.js +0 -8
  192. package/dist/chunks/schema-R2J4TS6Q.js +0 -14
  193. package/dist/chunks/set-763MJP2G.js +0 -7
  194. package/dist/chunks/setup-and-link-57NI3GOM.js +0 -7
@@ -1,7 +0,0 @@
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{require_dist,require_dist2}from"./chunk-OCWSKPV4.js";import{require_types}from"./chunk-GHM7V3GG.js";import{require_build_utils}from"./chunk-EWWFNMPZ.js";import{__commonJS,__toESM}from"./chunk-6L236MNA.js";var require_dist3=__commonJS({"../../internals/service-topology/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{INTERNAL_SERVICE_PREFIX:()=>import_fs_detectors2.INTERNAL_SERVICE_PREFIX,autoDetectServices:()=>import_fs_detectors2.autoDetectServices,detectServices:()=>import_fs_detectors2.detectServices,generateServiceRewrites:()=>import_fs_detectors2.generateServiceRewrites,generateServicesRoutes:()=>import_fs_detectors2.generateServicesRoutes,getInternalServiceCronPath:()=>import_fs_detectors2.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_fs_detectors2.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_fs_detectors2.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_fs_detectors2.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_fs_detectors2.getInternalServiceWorkerPathPrefix,hasLegacyServicesConfig:()=>import_fs_detectors2.hasLegacyServicesConfig,isExperimentalService:()=>import_fs_detectors2.isExperimentalService,isExperimentalServiceV2:()=>import_fs_detectors2.isExperimentalServiceV2,isRouteOwningBuilder:()=>import_fs_detectors2.isRouteOwningBuilder,isStaticBuild:()=>import_fs_detectors2.isStaticBuild,migrateExperimentalServices:()=>import_fs_detectors2.migrateExperimentalServices,planExperimentalServicesMigration:()=>import_fs_detectors2.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_fs_detectors2.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_fs_detectors2.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_fs_detectors2.resolveConfiguredServiceV2,validateServiceConfigV2:()=>import_fs_detectors2.validateServiceConfigV2});module.exports=__toCommonJS(src_exports);var import_fs_detectors2=require_dist2()}});var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},schedulesSchema={type:"array",minItems:0,maxItems:100,items:{type:"object",additionalProperties:!1,required:["expression","target","name"],properties:{expression:{type:"object",additionalProperties:!1,required:["cron"],properties:{cron:{type:"string"},jitter:{type:"integer",minimum:1,maximum:15}}},target:{oneOf:[{type:"object",additionalProperties:!1,required:["function"],properties:{function:{type:"string",minLength:1}}},{type:"object",additionalProperties:!1,required:["path"],properties:{path:{description:"Deployment path to invoke over HTTP, like `crons[].path`. Must start with `/`.",type:"string",maxLength:512,pattern:"^/"}}},{type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1,maxLength:512}}}]},name:{type:"string",minLength:1,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."}}}},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},servicesServiceNamePattern="^[a-z]([a-z_-]*[a-z])?$",servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:servicesServiceNamePattern},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,required:["root"],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,command:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),getServicesSchema=()=>({type:"object",propertyNames:{pattern:servicesServiceNamePattern,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema()}}}function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}for(let[index,schedule]of(config.schedules??[]).entries())if(schedule.timezone!==void 0)try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`schedules[${index}].timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}for(let[pattern,fn]of Object.entries(config.functions??{}))if(fn.affinity!==void 0)return new import_build_utils.NowBuildError({code:"FUNCTION_AFFINITY_REQUIRES_SERVICE",message:`Function affinity can only be configured under a service. Move functions[${JSON.stringify(pattern)}].affinity into the relevant service's functions configuration.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"});let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy);if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(servicesConfig){let serviceNames=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames.has(binding.service))return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}export{require_dist3 as require_dist,validateConfig};
@@ -1,7 +0,0 @@
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{getGlobalPathConfig}from"./chunk-JSKGZLE4.js";import{require_load_json_file}from"./chunk-RCTYVKM5.js";import{require_types}from"./chunk-GHM7V3GG.js";import{inspectTokenRequest,processInspectTokenResponse}from"./chunk-5XJNPXQK.js";import{parseArguments}from"./chunk-WWB66KP5.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR,findProjectsFromPath,getLinkFromDir,getRepoLink,getVercelDirectory}from"./chunk-TTKDYUJD.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{require_cli_config}from"./chunk-BRK4OB4B.js";import{getUser}from"./chunk-SM5JI6QM.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{ConflictingConfigFiles,DeprecatedNowJson,InvalidLocalConfig,InvalidToken,NowError,TeamDeleted}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function highlight(text){return import_chalk.default.bold.underline(text)}var VERCEL_API_ORIGIN="https://api.vercel.com";async function introspectToken(client){let token=client.authConfig.token;if(!token)throw new Error("No token to introspect");if(new URL(client.apiUrl).origin!==VERCEL_API_ORIGIN)throw new Error("Token introspection is unavailable for custom API origins");let[error,introspection]=await processInspectTokenResponse(await inspectTokenRequest(token));if(error)throw error;return introspection}function isAppPrincipalEnabled(){return!!process.env.APP_PRINCIPAL_ENABLED}function resolveAppFromToken(token){return!token.active||!token.client_id?null:{id:token.client_id,name:token.client_name}}async function resolveAppTokenScope(client,scope){let token=await introspectToken(client).catch(()=>null),app=token?resolveAppFromToken(token):null,team=token?.team;return!app||!team||team.id!==scope&&team.slug!==scope?!1:(client.config.currentTeam=team.id,!0)}import{relative}from"path";var import_cli_config=__toESM(require_cli_config(),1);var import_load_json_file=__toESM(require_load_json_file(),1),config=__toESM(require_cli_config(),1),import_error_utils=__toESM(require_dist(),1),import_types=__toESM(require_types(),1);import{join,basename,dirname}from"path";import{accessSync,constants}from"fs";import{persistCliAuthConfig,readCliAuthConfig}from"@vercel/cli-auth/credentials-store.js";import path from"path";import{existsSync}from"fs";function getLocalPathConfig(prefix,useCompiledConfig=!0){let customPath=parseArguments(process.argv.slice(2),{},{permissive:!0}).flags["--local-config"];if(customPath){if(typeof customPath!="string")throw new InvalidLocalConfig(customPath);return path.resolve(process.cwd(),customPath)}let vercelConfigPath=path.join(prefix,"vercel.json"),vercelTomlPath=path.join(prefix,"vercel.toml"),nowConfigPath=path.join(prefix,"now.json"),vercelConfigExists=existsSync(vercelConfigPath),vercelTomlExists=existsSync(vercelTomlPath),nowConfigExists=existsSync(nowConfigPath),foundConfigs=[];if(vercelConfigExists&&foundConfigs.push(vercelConfigPath),vercelTomlExists&&foundConfigs.push(vercelTomlPath),nowConfigExists)throw new DeprecatedNowJson(nowConfigPath);if(foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs);let compiledConfigPath=path.join(prefix,VERCEL_DIR,"vercel.json"),compiledConfigExists=existsSync(compiledConfigPath);return useCompiledConfig&&compiledConfigExists?compiledConfigPath:vercelConfigPath}var VERCEL_DIR2=getGlobalPathConfig(),CONFIG_FILE_PATH=config.getConfigFilePath(VERCEL_DIR2),AUTH_CONFIG_FILE_PATH=config.getAuthConfigFilePath(VERCEL_DIR2),readConfigFile=()=>config.readGlobalConfigFile(CONFIG_FILE_PATH),writeToConfigFile=stuff=>{try{config.writeGlobalConfigFile(CONFIG_FILE_PATH,stuff)}catch(err){throw(0,import_error_utils.isErrnoException)(err)&&((0,import_error_utils.isErrnoException)(err)&&err.code==="EPERM"?(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (operation not permitted).`),process.exit(1)):err.code==="EBADF"&&(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (bad file descriptor).`),process.exit(1))),err}},readAuthConfigFile=_globalConfig=>({...config.getDefaultAuthConfig(),...readCliAuthConfig(VERCEL_DIR2)}),persistAuthConfig=(authConfig,_globalConfig)=>{try{return persistCliAuthConfig(VERCEL_DIR2,authConfig)}catch(err){let wrappedError=new Error(`Not able to create ${humanizePath(AUTH_CONFIG_FILE_PATH)} (${(0,import_error_utils.errorToStringFriendly)(err)}).`);throw wrappedError.cause=err,wrappedError}};function getConfigFilePath2(){return CONFIG_FILE_PATH}function getAuthConfigFilePath2(){return AUTH_CONFIG_FILE_PATH}function readLocalConfig(prefix=process.cwd()){let config2,target="";try{target=getLocalPathConfig(prefix)}catch(err){if(err instanceof NowError)output_manager_default.error(err.message),process.exit(1);else throw err}if(!target)return;try{accessSync(target,constants.F_OK),config2=import_load_json_file.default.sync(target)}catch(err){if(!((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"))if((0,import_error_utils.isError)(err)&&err.name==="JSONError")output_manager_default.error(err.message),process.exit(1);else if((0,import_error_utils.isErrnoException)(err)){let code=err.code?` (${err.code})`:"";output_manager_default.error(`Failed to read config file: ${target}${code}`),process.exit(1)}else output_manager_default.prettyError(err),process.exit(1)}if(!config2)return;if(basename(target)==="vercel.json"&&basename(dirname(target))===VERCEL_DIR){let workPath=dirname(dirname(target)),sourceFile=null;for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);try{accessSync(configPath,constants.F_OK),sourceFile=basename(configPath);break}catch{}}if(!sourceFile){let tomlPath=join(workPath,"vercel.toml");try{accessSync(tomlPath,constants.F_OK),sourceFile="vercel.toml"}catch{}}config2[import_types.fileNameSymbol]=sourceFile||DEFAULT_VERCEL_CONFIG_FILENAME}else config2[import_types.fileNameSymbol]=basename(target);return config2}function isEligibleForNativeBinaryAutoOptIn(client){return client.teams?.some(team=>team.slug==="vercel")===!0}function autoOptInNativeBinary(client){let envOverride=process.env.VERCEL_CLI_USE_NATIVE_BINARY;if(!(envOverride==="false"||envOverride==="0"||typeof client.config.useNativeBinary=="boolean"||client.config.nativeBinaryAutoOptIn===!0||!isEligibleForNativeBinaryAutoOptIn(client)))try{let configPath=getConfigFilePath2(),savedConfig=(0,import_cli_config.readGlobalConfigFile)(configPath);if(typeof savedConfig.useNativeBinary=="boolean"||savedConfig.nativeBinaryAutoOptIn===!0)return;let config2={...savedConfig,nativeBinaryAutoOptIn:!0};(0,import_cli_config.writeGlobalConfigFile)(configPath,config2),client.config={...client.config,nativeBinaryAutoOptIn:!0}}catch{output_manager_default.debug("Failed to persist automatic native binary enrollment.")}}async function getScope(client,opts={}){let{user,app,token}=await getPrincipal(client);user&&autoOptInNativeBinary(client);let defaultTeamId=user?.version==="northstar"?user.defaultTeamId:void 0,appTeamId=!user&&app?token?.team?.id:void 0;if(!user&&app&&opts.getTeam===!1)throw new Error("App principal scope resolution requires a team lookup.");!user&&app&&(client.config.currentTeam=appTeamId),!client.config.currentTeam&&defaultTeamId&&(client.config.currentTeam=defaultTeamId);let teamId=client.config.currentTeam||defaultTeamId,team=teamId&&opts.getTeam!==!1?await getTeam(client,teamId):null,contextName=team?.slug||user?.username||user?.email;if(!contextName)throw new Error("Unable to determine context name");return opts.resolveLocalScope?resolveLocalScopeContext(client,{user,app,team}):{contextName,team,user,app}}async function getPrincipal(client){if(!isAppPrincipalEnabled())return{user:await getUser(client),app:null,token:null};let[userResult,tokenResult]=await Promise.allSettled([getUser(client),introspectToken(client)]),token=tokenResult.status==="fulfilled"?tokenResult.value:null,app=token?resolveAppFromToken(token):null;if(userResult.status==="rejected"&&!(app&&userResult.reason instanceof InvalidToken))throw userResult.reason;return{user:userResult.status==="fulfilled"?userResult.value:null,app,token}}async function resolveLocalScopeContext(client,{user,app,team}){let explicitScopeProvided=detectExplicitScope(client),globalTeamId=client.config.currentTeam,{localOrgId,linkedRepo,isCrossTeamRepo}=await findLocalLink(client),isAppPrincipal=!user&&!!app,effectiveLocalOrgId=isAppPrincipal?void 0:localOrgId,scopeMismatch=!!(effectiveLocalOrgId&&globalTeamId&&globalTeamId!==effectiveLocalOrgId);!isAppPrincipal&&!explicitScopeProvided&&!effectiveLocalOrgId&&isCrossTeamRepo&&output_manager_default.warn("This repository has projects across multiple teams. Use `--scope` to specify which team, or `cd` into a project directory.");let resolvedTeam=!explicitScopeProvided&&effectiveLocalOrgId?await applyLocalOrg(client,effectiveLocalOrgId):team,{org,contextName}=resolveOrg(resolvedTeam,user);return{org,contextName,user,team:resolvedTeam,app,globalTeam:team,linkedRepo,isCrossTeamRepo,scopeMismatch,explicitScopeProvided}}async function applyLocalOrg(client,localOrgId){return client.config.currentTeam=localOrgId.startsWith("team_")?localOrgId:void 0,client.config.currentTeam?await getTeamByIdOrSlug(client,client.config.currentTeam):null}async function getTeam(client,teamId){let team=await getTeamByIdOrSlug(client,teamId);if(!team)throw new TeamDeleted;return team}function resolveOrg(team,user){if(team)return{org:{type:"team",id:team.id,slug:team.slug},contextName:team.slug};if(user)return{org:{type:"user",id:user.id,slug:user.username},contextName:user.username||user.email};throw new Error("Unable to determine scope: no team or personal account is available for this token. Use `--scope` to specify a team.")}async function findLocalLink(client){let[projectLink,repoLink]=await Promise.all([findProjectLink(client),findRepoLink(client)]);return{localOrgId:findLocalOrgId(client.cwd,projectLink,repoLink),linkedRepo:repoLink?.repoConfig?{repoConfig:repoLink.repoConfig,rootPath:repoLink.rootPath}:null,isCrossTeamRepo:detectCrossTeamRepo(repoLink?.repoConfig)}}async function findProjectLink(client){try{return await getLinkFromDir(getVercelDirectory(client.cwd))}catch{return null}}async function findRepoLink(client){try{return await getRepoLink(client,client.cwd)}catch{return null}}function findLocalOrgId(cwd,projectLink,repoLink){if(projectLink)return projectLink.orgId;if(repoLink?.repoConfig)return findRepoOrgId(repoLink.repoConfig,relative(repoLink.rootPath,cwd))}function findRepoOrgId(repoConfig,pathFromRepoRoot){let projects=findProjectsFromPath(repoConfig.projects,pathFromRepoRoot),orgIds=new Set(projects.map(p=>p.orgId??repoConfig.orgId??""));if(orgIds.size!==1)return;let[orgId]=orgIds;return orgId||void 0}function detectExplicitScope(client){let argv=client.argv;for(let arg of argv){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg.startsWith("--scope=")||arg.startsWith("--team=")||arg==="-S"||arg==="-T")return!0}return!!client.localConfig?.scope}function detectCrossTeamRepo(repoConfig){if(!repoConfig?.projects||repoConfig.projects.length<2)return!1;let orgIds=new Set;for(let project of repoConfig.projects){let orgId=project.orgId??repoConfig.orgId;orgId&&orgIds.add(orgId)}return orgIds.size>1}export{highlight,isAppPrincipalEnabled,resolveAppTokenScope,getScope,detectExplicitScope,getLocalPathConfig,readConfigFile,writeToConfigFile,readAuthConfigFile,persistAuthConfig,getConfigFilePath2 as getConfigFilePath,getAuthConfigFilePath2 as getAuthConfigFilePath,readLocalConfig};
@@ -1,9 +0,0 @@
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{buildCorrectedCommand,isArgumentError}from"./chunk-WWB66KP5.js";import{getErrorRecovery,shouldEmitNonInteractiveCommandError,trackAgentError,writeAgentError}from"./chunk-KCARCOP5.js";import{parseRetryAfterHeaderAsMillis,require_bytes}from"./chunk-RINZXCDJ.js";import{getCommandName}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{pkg_default}from"./chunk-AVSPFBLM.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var import_bytes=__toESM(require_bytes(),1);async function responseError(res,fallbackMessage=null,parsedBody={}){let message="",bodyError;if(res.status>=400&&res.status<500){let body;try{body=await res.json()}catch{body=parsedBody}bodyError=body.error||body.err||{},message=bodyError.message}message||(message=fallbackMessage===null?"Response Error":fallbackMessage);let err=new Error(`${message} (${res.status})`);if(err.status=res.status,err.serverMessage=message,bodyError)for(let field of Object.keys(bodyError))field!=="message"&&(err[field]=bodyError[field]);if(res.status===429||res.status===503){let parsed=parseRetryAfterHeaderAsMillis(res.headers.get("Retry-After"));err.retryAfterMs=parsed??(res.status===429?0:void 0)}return err}function toEnumerableError(err){let enumerable={};enumerable.name=err.name;for(let key of Object.getOwnPropertyNames(err))enumerable[key]=err[key];return enumerable}function printError(error2,client){typeof error2=="string"&&(error2=new Error(error2));let apiError=error2,{message,stack,status,code,sizeLimit}=apiError,argumentError=isArgumentError(error2)?error2:void 0,suggestion=argumentError?.suggestedOption&&argumentError.invalidOption,correction=suggestion&&client&&argumentError?buildCorrectedCommand(client.argv,argumentError.invalidOption,argumentError.suggestedOption,argumentError.flagsSpecification):void 0,recovery=getErrorRecovery(apiError,client),reason=status===403?"forbidden":status===402?"payment_required":status===401?"not_authorized":status===429?"rate_limited":code==="ARG_UNKNOWN_OPTION"?"invalid_arguments":"api_error",hint=argumentError?.allowedOptions?`Vercel CLI ${pkg_default.version} accepts: ${argumentError.allowedOptions.join(", ")}.${suggestion?` Did you mean ${argumentError.suggestedOption}?`:""}`:recovery.hint;if(client&&(status||argumentError?.allowedOptions)){let payload={...recovery,status:"error",reason,message:apiError.serverMessage||message,hint,...argumentError?.allowedOptions&&{allowedOptions:argumentError.allowedOptions,suggestedOption:argumentError.suggestedOption,cliVersion:pkg_default.version},...correction&&{next:[{command:correction,when:correction.includes("<")?"Replace placeholders with the intended values, then run the corrected command":"Run the corrected command"}]}};if(shouldEmitNonInteractiveCommandError(client)){output_manager_default.stopSpinner(),writeAgentError(client,payload);return}trackAgentError(client,payload)}if(hint){output_manager_default.stopSpinner(),output_manager_default.fatal(apiError.serverMessage||message||"The request failed."),output_manager_default.print(` ${hint}
8
- `),correction&&output_manager_default.print(` ${correction}
9
- `);return}output_manager_default.debug(`handling error: ${stack}`),message!=="User force closed the prompt with 0 null"&&(status===403?output_manager_default.error(message||`Authentication error. Run ${getCommandName("login")} to log-in again.`):status===429?output_manager_default.error(message):code==="size_limit_exceeded"?output_manager_default.error(`File size limit exceeded (${(0,import_bytes.default)(sizeLimit)})`):message?output_manager_default.prettyError(apiError):status===500?output_manager_default.error("Unexpected server error. Please retry."):code==="USER_ABORT"?output_manager_default.log("Canceled"):output_manager_default.error(`Unexpected error. Please try again later. (${message})`))}export{responseError,toEnumerableError,printError};
@@ -1,131 +0,0 @@
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{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1),packageName="vercel",logo="\u25B2",help=()=>`
8
- ${import_chalk.default.bold(`${logo} ${packageName}`)} [options] <command | path>
9
-
10
- ${import_chalk.default.dim("For deploy command help, run `vercel deploy --help`")}
11
-
12
- ${import_chalk.default.dim("Commands:")}
13
-
14
- ${import_chalk.default.dim("Basic")}
15
-
16
- deploy [path] Performs a deployment ${import_chalk.default.bold("(default)")}
17
- build Build the project locally into './vercel/output'
18
- cache [cmd] Manages cache for your current Project
19
- dev Start a local development server
20
- env Manages the Environment Variables for your current Project
21
- git Manage Git provider repository for your current Project
22
- help [cmd] Displays complete help for [cmd]
23
- init [example] Initialize an example project
24
- inspect [id] Displays information related to a deployment
25
- i | install [name] Install an integration from the Marketplace
26
- integration [cmd] Manages your Marketplace integrations
27
- ir | integration-resource [cmd] Manages your Marketplace integration resources
28
- link [path] Link local directory to a Vercel Project
29
- ls | list [app] Lists deployments
30
- login [email] Logs into your account or creates a new one
31
- logout Logs out of your account
32
- open Opens the current project in the Vercel Dashboard
33
- promote [url|id] Promote an existing deployment to current
34
- pull [path] Pull your Project Settings from the cloud
35
- redeploy [url|id] Rebuild and deploy a previous deployment.
36
- rollback [url|id] Quickly revert back to a previous deployment
37
- signup Creates a new account and logs in
38
- switch [scope] Switches between different scopes
39
-
40
- ${import_chalk.default.dim("Advanced")}
41
-
42
- activity List user activity events
43
- agent [init] Generate AGENTS.md with Vercel best practices
44
- ai-gateway [cmd] Manage AI Gateway resources
45
- agent-runs [cmd] Inspect Agent Runs observability data
46
- alerts List alerts for a project or team
47
- alias [cmd] Manages your domain aliases
48
- api [endpoint] Make authenticated HTTP requests to the Vercel API [beta]
49
- bisect Use binary search to find the deployment that introduced a bug
50
- blob [cmd] Manages your Blob stores and files
51
- budgets [cmd] Spend Management for on-demand usage [beta]
52
- buy [cmd] Purchase Vercel products for your team
53
- certs [cmd] Manages your SSL certificates
54
- changelog [cmd] Show the latest Vercel product updates
55
- connect [cmd] Manage connectors
56
- contract Show contract information for billing periods
57
- cron | crons [cmd] Manage cron jobs for a project [beta]
58
- curl [url|path] cURL requests with automatic deployment protection bypass [beta]
59
- deploy-hooks [cmd] Manage deploy hooks for Git-triggered builds
60
- dns [name] Manages your DNS records
61
- domains [name] Manages your domain names
62
- firewall [cmd] Manages Vercel Firewall configuration and custom rules
63
- flags [cmd] Manage feature flags for a Vercel project
64
- global-config [cmd] Manage Global Config stores
65
- httpstat path Visualize HTTP timing statistics for deployments
66
- kms [cmd] Manage KMS issuers, signing keys, and project grants [beta]
67
- logs [url] Displays the logs for a deployment
68
- metrics <metric> Queries observability metrics for your project or team
69
- mcp Set up MCP agents and configuration
70
- microfrontends Manages your microfrontends
71
- projects Manages your Projects
72
- redirects [cmd] Manages redirects for your current Project
73
- rm | remove [id] Removes a deployment
74
- routes [cmd] Manages routing rules for your current Project
75
- rr | rolling-release [cmd] Manage rolling releases for gradual traffic shifting
76
- sandbox Interact with Vercel Sandbox
77
- schedules [cmd] Manage schedules for the current project [beta]
78
- setup Set up the Vercel plugin and AI Gateway for coding agents
79
- skills [query] Discover agent skills relevant to your project
80
- storage [cmd] Connect and manage storage resources for your Projects
81
- target [cmd] Manage custom environments for your Project
82
- teams Manages your teams
83
- telemetry [cmd] Enable or disable telemetry collection
84
- tokens [cmd] Manage your personal Vercel authentication tokens
85
- traces [cmd] Fetch and capture traces for your project's deployment
86
- upgrade Upgrade the Vercel CLI to the latest version
87
- usage Show billing usage for the current billing period
88
- vcr [cmd] Manages your Container Registry repositories and images
89
- webhooks [cmd] Manages webhooks [beta]
90
- whoami Shows the username of the currently logged in user
91
-
92
- ${import_chalk.default.dim("Global Options:")}
93
-
94
- -h, --help Output usage information
95
- -v, --version Output the version number
96
- --changelog Show the 5 latest Vercel product updates
97
- --cwd Current working directory
98
- -A ${import_chalk.default.bold.underline("FILE")}, --local-config=${import_chalk.default.bold.underline("FILE")} Path to the local \`vercel.json\` file
99
- -Q ${import_chalk.default.bold.underline("DIR")}, --global-config=${import_chalk.default.bold.underline("DIR")} Path to the global \`.vercel\` directory
100
- -d, --debug Debug mode [off]
101
- --no-color No color mode [off]
102
- --non-interactive Run without interactive prompts (default when agent detected)
103
- -S, --scope Set a custom scope
104
- -t ${import_chalk.default.underline("TOKEN")}, --token=${import_chalk.default.underline("TOKEN")} Login token
105
-
106
- ${import_chalk.default.dim("Examples:")}
107
-
108
- ${import_chalk.default.gray("\u2013")} Deploy the current directory
109
-
110
- ${import_chalk.default.cyan(`$ ${packageName}`)}
111
-
112
- ${import_chalk.default.gray("\u2013")} Deploy a custom path
113
-
114
- ${import_chalk.default.cyan(`$ ${packageName} /usr/src/project`)}
115
-
116
- ${import_chalk.default.gray("\u2013")} Deploy with Environment Variables
117
-
118
- ${import_chalk.default.cyan(`$ ${packageName} -e NODE_ENV=production`)}
119
-
120
- ${import_chalk.default.gray("\u2013")} Show the usage information for the sub command ${import_chalk.default.dim("`list`")}
121
-
122
- ${import_chalk.default.cyan(`$ ${packageName} help list`)}
123
-
124
- ${import_chalk.default.gray("\u2013")} Show the 5 latest Vercel product updates
125
-
126
- ${import_chalk.default.cyan(`$ ${packageName} --changelog`)}
127
-
128
- ${import_chalk.default.gray("\u2013")} Search Vercel product updates
129
-
130
- ${import_chalk.default.cyan(`$ ${packageName} changelog search "AI SDK"`)}
131
- `;export{help};
@@ -1,7 +0,0 @@
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{formatOption,jsonOption,projectOption,yesOption}from"./chunk-JAJW3P42.js";import{packageName}from"./chunk-FI772UVH.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Use a project by name or ID"},listAllOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List all accessible rules in the selected team"},mutationAllOption={...listAllOption,description:"Apply the rule to all projects in the selected team"},deprecatedItemScopeOptions=[{...projectScopeOption,deprecated:!0},{...listAllOption,deprecated:!0}],bodyOption={name:"body",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read the alert rule body from a JSON file"},rulesLsSubcommand={name:"ls",aliases:["list"],description:"List alert rules for a project or team",arguments:[],options:[projectScopeOption,listAllOption,{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by rule type"},formatOption,jsonOption],examples:[{name:"List rules affecting the linked project",value:`${packageName} alerts rules ls`},{name:"List all rules in the selected team",value:`${packageName} alerts rules ls --all`},{name:"Write JSON output",value:`${packageName} alerts rules ls --all --json`}]},rulesSchemaSubcommand={name:"schema",aliases:[],description:"Show alert rule request fields and examples",arguments:[],options:[{name:"type",shorthand:null,type:String,argument:"TYPE",deprecated:!1,description:"Rule type to describe"},formatOption],examples:[{name:"List supported rule types",value:`${packageName} alerts rules schema`},{name:"Show the built-in rule schema",value:`${packageName} alerts rules schema --type built-in`}]},rulesAddSubcommand={name:"add",aliases:["create"],description:"Create an alert rule from a JSON body",arguments:[],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,bodyOption],examples:[{name:"Create a project-scoped rule",value:`${packageName} alerts rules add --project my-app --body ./rule.json`},{name:"Create a team-wide built-in rule",value:`${packageName} alerts rules add --all --body ./rule.json`}]},rulesInspectSubcommand={name:"inspect",aliases:["get"],description:"Show one alert rule by ID",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption],examples:[{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules inspect ar_abc123 --json`}]},rulesRmSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete an alert rule",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption,yesOption],examples:[{name:"Delete with confirmation",value:`${packageName} alerts rules rm ar_abc123`},{name:"Delete without a prompt",value:`${packageName} alerts rules rm ar_abc123 --yes`}]},rulesUpdateSubcommand={name:"update",aliases:["patch"],description:"Patch an alert rule or change its scope",arguments:[{name:"ruleId",required:!0}],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,{...bodyOption,description:"Read the partial update body from a JSON file"}],examples:[{name:"Update fields from a file",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Move a rule to a project",value:`${packageName} alerts rules update ar_abc123 --project my-app`}]},notificationTargetOptions=[{name:"webhook",shorthand:null,type:String,argument:"WEBHOOK_ID",deprecated:!1,description:"Select an account webhook by ID"},{name:"slack-channel",shorthand:null,type:String,argument:"CHANNEL_ID",deprecated:!1,description:"Select a Slack channel by ID"},{name:"slack-installation-id",shorthand:null,type:String,argument:"INSTALLATION_ID",deprecated:!1,description:"Slack installation ID. Optional only when the team has exactly one completed Slack installation."}],criticalOnlyOption={name:"critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Notify only when Vercel Agent escalates an alert to Critical"},noCriticalOnlyOption={name:"no-critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Deliver every alert matched by the rule"},rulesNotificationsLsSubcommand={name:"ls",aliases:["list"],default:!0,description:"List notification destinations for all readable rules or one alert rule",arguments:[{name:"ruleId",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List notification destinations for all readable rules",value:`${packageName} alerts rules notifications ls`},{name:"List notification destinations for one rule",value:`${packageName} alerts rules notifications ls ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules notifications ar_abc123 --json`}]},rulesNotificationsLinkSubcommand={name:"link",aliases:[],description:"Link a Slack channel or account webhook to an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,formatOption,jsonOption],examples:[{name:"Link a Slack channel",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`},{name:"Link a Slack channel from a specific installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123 --slack-installation-id icfg_abc123`},{name:"Link a webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123`},{name:"Link a Critical-only webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123 --critical-only`}]},rulesNotificationsUpdateSubcommand={name:"update",aliases:["patch"],description:"Update a notification destination's delivery setting",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,noCriticalOnlyOption,formatOption,jsonOption],examples:[{name:"Restrict a Slack channel to Critical alerts",value:`${packageName} alerts rules notifications update ar_abc123 --slack-channel C123 --critical-only`},{name:"Restore delivery for every alert matched by the rule",value:`${packageName} alerts rules notifications update ar_abc123 --webhook wh_abc123 --no-critical-only`}]},rulesNotificationsUnlinkSubcommand={name:"unlink",aliases:[],description:"Unlink a Slack channel or account webhook from an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,formatOption,jsonOption],examples:[{name:"Unlink a Slack channel",value:`${packageName} alerts rules notifications unlink ar_abc123 --slack-channel C123`},{name:"Unlink a webhook",value:`${packageName} alerts rules notifications unlink ar_abc123 --webhook wh_abc123`}]},rulesNotificationsAggregateCommand={name:"notifications",aliases:[],description:"List and manage linked Slack and webhook destinations for alert rules",arguments:[],subcommands:[rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand],options:[formatOption,jsonOption],examples:[{name:"List destinations for all readable rules",value:`${packageName} alerts rules notifications`},{name:"List destinations for one rule",value:`${packageName} alerts rules notifications ar_abc123`},{name:"Link Slack with the team's only installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`}]},rulesAggregateCommand={name:"rules",aliases:[],description:"Create, inspect, list, update, and delete alert rules and manage their notification destinations",arguments:[],subcommands:[rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsAggregateCommand],options:[],examples:[{name:"List rules for the linked project",value:`${packageName} alerts rules ls`},{name:"Add a rule",value:`${packageName} alerts rules add --project my-app --body ./rule.json`},{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Update a rule",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Delete a rule",value:`${packageName} alerts rules rm ar_abc123`},{name:"List notification destinations for a rule",value:`${packageName} alerts rules notifications ar_abc123`}]};export{rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand,rulesNotificationsAggregateCommand,rulesAggregateCommand};
@@ -1,7 +0,0 @@
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{printProjectNotFoundError}from"./chunk-BEGUGOL7.js";import{param}from"./chunk-SXUEGVWB.js";import{detectExplicitScope}from"./chunk-LFQTA3CF.js";import{getLinkedProject,resolveProjectCwd}from"./chunk-TTKDYUJD.js";import{buildCommandWithYes,outputActionRequired}from"./chunk-KCARCOP5.js";import{getCommandName,getCommandNamePlain}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};async function ensureLink(commandName,client,cwd,opts={}){cwd=await resolveProjectCwd(cwd);let link=opts.link,nonInteractive=opts.nonInteractive??client.nonInteractive??!1;if(opts.nonInteractive=nonInteractive,link||(opts.forceDelete?link={status:"not_linked",org:null,project:null}:link=await getLinkedProject(client,{cwd,projectName:opts.projectName,projectNameIsExplicit:!!(opts.projectName&&opts.failIfNotFound),scopeIsExplicit:detectExplicitScope(client),allowOwnerLookupFallback:opts.allowOwnerLookupFallback,skipRemoteLookup:opts.skipRemoteLookup}),opts.link=link),link.status==="linked"&&opts.forceDelete||link.status==="not_linked"){if(link.status==="not_linked"&&opts.failIfNotFound&&opts.projectName)return await printProjectNotFoundError(client,opts.projectName,commandName,link.orgId),1;if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-57NI3GOM.js");if(link=await setupAndLink(client,cwd,opts),link.status==="not_linked")return 0}return link.status==="error"?(link.reason==="HEADLESS"&&(nonInteractive?outputActionRequired(client,{status:"action_required",reason:"confirmation_required",message:`Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"Confirm and run"}]},link.exitCode):output_manager_default.error(`Command ${getCommandName(commandName)} requires confirmation. Use option ${param("--yes")} to confirm.`)),nonInteractive&&process.exit(link.exitCode),link.exitCode):link}export{parseEnv,ensureLink};