@vercel/cli-support 0.0.0 → 65.3.1
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.
- package/LICENSE +202 -0
- package/README.md +100 -3
- package/dist/chunks/add-5YZQTIQM.js +8 -0
- package/dist/chunks/add-A524QQ2H.js +8 -0
- package/dist/chunks/add-V4JMUHKO.js +8 -0
- package/dist/chunks/build-K2PVDJZ4.js +7 -0
- package/dist/chunks/chunk-22FDWPWY.js +7 -0
- package/dist/chunks/chunk-25565AGS.js +7 -0
- package/dist/chunks/chunk-2ACMWVTB.js +12 -0
- package/dist/chunks/chunk-2EYYB6YN.js +7 -0
- package/dist/chunks/chunk-2GHZGOWT.js +7 -0
- package/dist/chunks/chunk-2H3SB5RP.js +9 -0
- package/dist/chunks/chunk-2NABMKFV.js +29 -0
- package/dist/chunks/chunk-2PKEEQ5W.js +25 -0
- package/dist/chunks/chunk-2S6PE6GB.js +7 -0
- package/dist/chunks/chunk-2U7DJZSQ.js +21 -0
- package/dist/chunks/chunk-2WYYGGEO.js +7 -0
- package/dist/chunks/chunk-3ADDGPEN.js +7 -0
- package/dist/chunks/chunk-3AYYFYZG.js +7 -0
- package/dist/chunks/chunk-3G3FQYMW.js +7 -0
- package/dist/chunks/chunk-3JGBBS6V.js +7 -0
- package/dist/chunks/chunk-3KKFLKQG.js +7 -0
- package/dist/chunks/chunk-3LIKVGFT.js +8 -0
- package/dist/chunks/chunk-3XW7N4W3.js +9 -0
- package/dist/chunks/chunk-43GBAKL2.js +86 -0
- package/dist/chunks/chunk-4CACOKMS.js +7 -0
- package/dist/chunks/chunk-4NTBYNFR.js +17 -0
- package/dist/chunks/chunk-4SAVH3H7.js +7 -0
- package/dist/chunks/chunk-4UGHFESV.js +8 -0
- package/dist/chunks/chunk-4VFYJU37.js +7 -0
- package/dist/chunks/chunk-5IASAERQ.js +7 -0
- package/dist/chunks/chunk-5RMIM4S2.js +7 -0
- package/dist/chunks/chunk-67GZ5REA.js +7 -0
- package/dist/chunks/chunk-6IDNVZZR.js +7 -0
- package/dist/chunks/chunk-6ISAISGD.js +16 -0
- package/dist/chunks/chunk-6KVHNQW4.js +17 -0
- package/dist/chunks/chunk-6OVX3PWM.js +7 -0
- package/dist/chunks/chunk-6QKS6QK7.js +7 -0
- package/dist/chunks/chunk-6VH56CX2.js +19 -0
- package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
- package/dist/chunks/chunk-76KGQU2G.js +7 -0
- package/dist/chunks/chunk-76SVVWPH.js +7 -0
- package/dist/chunks/chunk-773GOZIR.js +13 -0
- package/dist/chunks/chunk-7BGKE3JW.js +10 -0
- package/dist/chunks/chunk-7EJQLVWX.js +7 -0
- package/dist/chunks/chunk-7HV7O6DM.js +7 -0
- package/dist/chunks/chunk-7L2K4OKM.js +63 -0
- package/dist/chunks/chunk-7Y46LB43.js +14 -0
- package/dist/chunks/chunk-7YKFF6CE.js +7 -0
- package/dist/chunks/chunk-7Z3WUAO5.js +10 -0
- package/dist/chunks/chunk-A2RZZQEP.js +7 -0
- package/dist/chunks/chunk-ABZEMNDR.js +7 -0
- package/dist/chunks/chunk-ADLBLGT3.js +8 -0
- package/dist/chunks/chunk-AM46JVVN.js +7 -0
- package/dist/chunks/chunk-ANMDN3EG.js +9 -0
- package/dist/chunks/chunk-APZULWJC.js +8 -0
- package/dist/chunks/chunk-AWMQGOS2.js +7 -0
- package/dist/chunks/chunk-B4UE4LVE.js +7 -0
- package/dist/chunks/chunk-B4YYOSPY.js +7 -0
- package/dist/chunks/chunk-BBKEP7RO.js +7 -0
- package/dist/chunks/chunk-BL3HBRF6.js +12 -0
- package/dist/chunks/chunk-BLUPZPAS.js +7 -0
- package/dist/chunks/chunk-BPUANOGW.js +7 -0
- package/dist/chunks/chunk-BRQUZ5NC.js +7 -0
- package/dist/chunks/chunk-BS32OUOC.js +7 -0
- package/dist/chunks/chunk-BTI5TG6Q.js +7 -0
- package/dist/chunks/chunk-BUJITHGZ.js +8 -0
- package/dist/chunks/chunk-BVH2AEFE.js +7 -0
- package/dist/chunks/chunk-BZENIQ7N.js +7 -0
- package/dist/chunks/chunk-C6GY2G73.js +7 -0
- package/dist/chunks/chunk-CEMPU323.js +7 -0
- package/dist/chunks/chunk-COD3WAUI.js +7 -0
- package/dist/chunks/chunk-COM5YCHF.js +9 -0
- package/dist/chunks/chunk-CZSOZKHX.js +7 -0
- package/dist/chunks/chunk-D2BZMGHP.js +7 -0
- package/dist/chunks/chunk-D3AHZ5LI.js +7 -0
- package/dist/chunks/chunk-D6REP5QQ.js +15 -0
- package/dist/chunks/chunk-DFVNL5ML.js +7 -0
- package/dist/chunks/chunk-DGYHWXD2.js +10 -0
- package/dist/chunks/chunk-DUT4U5YY.js +7 -0
- package/dist/chunks/chunk-DWZBL4NK.js +7 -0
- package/dist/chunks/chunk-E2SADN6I.js +7 -0
- package/dist/chunks/chunk-E6CO6TUM.js +7 -0
- package/dist/chunks/chunk-EAUDC24V.js +9 -0
- package/dist/chunks/chunk-ECQIO5K3.js +7 -0
- package/dist/chunks/chunk-ETV3C2CV.js +7 -0
- package/dist/chunks/chunk-F2SWJEYV.js +8 -0
- package/dist/chunks/chunk-F4KY2TOK.js +7 -0
- package/dist/chunks/chunk-F53OKXYI.js +7 -0
- package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
- package/dist/chunks/chunk-FBYA6LLM.js +7 -0
- package/dist/chunks/chunk-FDNYYENK.js +11 -0
- package/dist/chunks/chunk-FGFLTLEA.js +7 -0
- package/dist/chunks/chunk-FUX6LKNP.js +7 -0
- package/dist/chunks/chunk-G4T7VBGN.js +9 -0
- package/dist/chunks/chunk-GA277JFB.js +20 -0
- package/dist/chunks/chunk-GD7AV7BO.js +9 -0
- package/dist/chunks/chunk-GG5RME4X.js +7 -0
- package/dist/chunks/chunk-GHAY4PSD.js +7 -0
- package/dist/chunks/chunk-GVTXA6HG.js +7 -0
- package/dist/chunks/chunk-GYVJIIYL.js +7 -0
- package/dist/chunks/chunk-GZNDA6SV.js +8 -0
- package/dist/chunks/chunk-HCRD3JFL.js +7 -0
- package/dist/chunks/chunk-HEGJZJO7.js +7 -0
- package/dist/chunks/chunk-HRR57QNP.js +7 -0
- package/dist/chunks/chunk-IA3MXJRC.js +8 -0
- package/dist/chunks/chunk-ID663OJ7.js +7 -0
- package/dist/chunks/chunk-IEPW2YRH.js +7 -0
- package/dist/chunks/chunk-IGDG5CWT.js +7 -0
- package/dist/chunks/chunk-IKQTP764.js +7 -0
- package/dist/chunks/chunk-IQ7FPAI4.js +7 -0
- package/dist/chunks/chunk-IQKGQ2Y2.js +15 -0
- package/dist/chunks/chunk-ISWW3DKF.js +7 -0
- package/dist/chunks/chunk-IUXSJWL3.js +7 -0
- package/dist/chunks/chunk-IVSC7ZFJ.js +7 -0
- package/dist/chunks/chunk-IVSSTHB6.js +7 -0
- package/dist/chunks/chunk-J24BABG4.js +21 -0
- package/dist/chunks/chunk-JALVF3C2.js +7 -0
- package/dist/chunks/chunk-JELLVPCM.js +8 -0
- package/dist/chunks/chunk-JESNVRVR.js +7 -0
- package/dist/chunks/chunk-JLEJB6KM.js +7 -0
- package/dist/chunks/chunk-KH6565YH.js +8 -0
- package/dist/chunks/chunk-KNLGWGUE.js +57 -0
- package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
- package/dist/chunks/chunk-KW6GSQXV.js +7 -0
- package/dist/chunks/chunk-L4NSF346.js +22 -0
- package/dist/chunks/chunk-LCHECISY.js +7 -0
- package/dist/chunks/chunk-LJBUJ23M.js +7 -0
- package/dist/chunks/chunk-LKLH6DZP.js +9 -0
- package/dist/chunks/chunk-LRYGNQ6C.js +8 -0
- package/dist/chunks/chunk-LSF7FY6X.js +7 -0
- package/dist/chunks/chunk-LSQREJXO.js +11 -0
- package/dist/chunks/chunk-LT3UK4K6.js +10 -0
- package/dist/chunks/chunk-LUBUI5GF.js +7 -0
- package/dist/chunks/chunk-MCRKBVZA.js +7 -0
- package/dist/chunks/chunk-MVGTMPMI.js +23 -0
- package/dist/chunks/chunk-MXTC4ZAQ.js +7 -0
- package/dist/chunks/chunk-NB2WLB3J.js +12 -0
- package/dist/chunks/chunk-NEFDNROD.js +7 -0
- package/dist/chunks/chunk-NQWGRKF4.js +7 -0
- package/dist/chunks/chunk-NTZ5WWYV.js +7 -0
- package/dist/chunks/chunk-NWGBDBZI.js +7 -0
- package/dist/chunks/chunk-NZ2TFADV.js +7 -0
- package/dist/chunks/chunk-OAM5NJCU.js +9 -0
- package/dist/chunks/chunk-OCQPXOTX.js +11 -0
- package/dist/chunks/chunk-OCR5CRTH.js +10 -0
- package/dist/chunks/chunk-OFDTADPQ.js +7 -0
- package/dist/chunks/chunk-OGPENBY2.js +7 -0
- package/dist/chunks/chunk-OKEBIUKZ.js +7 -0
- package/dist/chunks/chunk-OMCGXRSA.js +21 -0
- package/dist/chunks/chunk-OO572JUC.js +7 -0
- package/dist/chunks/chunk-OPORM35X.js +7 -0
- package/dist/chunks/chunk-OQCMRU3J.js +10 -0
- package/dist/chunks/chunk-OQPXJCMK.js +32 -0
- package/dist/chunks/chunk-OWOWPOIE.js +23 -0
- package/dist/chunks/chunk-PADL3C6Z.js +7 -0
- package/dist/chunks/chunk-PFD7LETF.js +7 -0
- package/dist/chunks/chunk-PFNYWWLI.js +7 -0
- package/dist/chunks/chunk-PFPJLIFF.js +33 -0
- package/dist/chunks/chunk-PSOVLGHP.js +7 -0
- package/dist/chunks/chunk-PUKYAALC.js +7 -0
- package/dist/chunks/chunk-PVASGBEF.js +7 -0
- package/dist/chunks/chunk-Q5ODLDCU.js +7 -0
- package/dist/chunks/chunk-Q7D7RGXM.js +7 -0
- package/dist/chunks/chunk-QB7F3UAP.js +7 -0
- package/dist/chunks/chunk-QHJLRTVY.js +7 -0
- package/dist/chunks/chunk-QMCHGGDX.js +10 -0
- package/dist/chunks/chunk-QZX7VG2V.js +9 -0
- package/dist/chunks/chunk-R6BEOVTU.js +7 -0
- package/dist/chunks/chunk-RLKS5G6C.js +12 -0
- package/dist/chunks/chunk-RM3ZDRYE.js +7 -0
- package/dist/chunks/chunk-RRDNKB2X.js +7 -0
- package/dist/chunks/chunk-RRREFECI.js +7 -0
- package/dist/chunks/chunk-RUXO73ON.js +7 -0
- package/dist/chunks/chunk-RW3X523R.js +8 -0
- package/dist/chunks/chunk-S3L2OHPO.js +7 -0
- package/dist/chunks/chunk-S4SJ7GIZ.js +7 -0
- package/dist/chunks/chunk-S5IWVPYT.js +32 -0
- package/dist/chunks/chunk-SACGQMVQ.js +13 -0
- package/dist/chunks/chunk-SCV7XEEO.js +7 -0
- package/dist/chunks/chunk-SF4E3AQ3.js +7 -0
- package/dist/chunks/chunk-SKYDLHEZ.js +7 -0
- package/dist/chunks/chunk-SLI2O5X7.js +63 -0
- package/dist/chunks/chunk-SXOSF4O6.js +39 -0
- package/dist/chunks/chunk-TAAWMNNL.js +7 -0
- package/dist/chunks/chunk-TG2RCYTH.js +7 -0
- package/dist/chunks/chunk-TKBORMUF.js +7 -0
- package/dist/chunks/chunk-TO5PJDEN.js +7 -0
- package/dist/chunks/chunk-TPNOSQZ3.js +15 -0
- package/dist/chunks/chunk-TZFDVQ72.js +27 -0
- package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
- package/dist/chunks/chunk-U56NHYAH.js +7 -0
- package/dist/chunks/chunk-UJSW56GS.js +9 -0
- package/dist/chunks/chunk-UKQMYTWW.js +9 -0
- package/dist/chunks/chunk-ULHNMQ7C.js +7 -0
- package/dist/chunks/chunk-UNEGQPD3.js +7 -0
- package/dist/chunks/chunk-URPEIX6M.js +7 -0
- package/dist/chunks/chunk-UVHKXCR5.js +11 -0
- package/dist/chunks/chunk-V6Y6UK6B.js +43 -0
- package/dist/chunks/chunk-V7BEC3E4.js +10 -0
- package/dist/chunks/chunk-VMMMBWD3.js +7 -0
- package/dist/chunks/chunk-VOCZ34ON.js +7 -0
- package/dist/chunks/chunk-VQSLPYAF.js +7 -0
- package/dist/chunks/chunk-VT6RIZJH.js +7 -0
- package/dist/chunks/chunk-WBF36MYT.js +16 -0
- package/dist/chunks/chunk-WCWP4GBR.js +7 -0
- package/dist/chunks/chunk-WGXKX24Q.js +7 -0
- package/dist/chunks/chunk-X4762EE4.js +7 -0
- package/dist/chunks/chunk-XB4SKARZ.js +29 -0
- package/dist/chunks/chunk-XGTKHQTT.js +7 -0
- package/dist/chunks/chunk-XOETL6DB.js +96 -0
- package/dist/chunks/chunk-XP3FT56R.js +27 -0
- package/dist/chunks/chunk-XR6QY7RR.js +7 -0
- package/dist/chunks/chunk-XXXRTHTP.js +8 -0
- package/dist/chunks/chunk-XZV4BFM5.js +7 -0
- package/dist/chunks/chunk-Y6AGOERS.js +8 -0
- package/dist/chunks/chunk-YHPPP3SF.js +7 -0
- package/dist/chunks/chunk-YHQ7PPXP.js +7 -0
- package/dist/chunks/chunk-YK7XLFU2.js +24 -0
- package/dist/chunks/chunk-YN3C5BL5.js +7 -0
- package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
- package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
- package/dist/chunks/chunk-ZH6KHD55.js +20 -0
- package/dist/chunks/cjs-2SMN43VH.js +54 -0
- package/dist/chunks/clear-ZS4KQ7OT.js +8 -0
- package/dist/chunks/compile-vercel-config-3IYM2CHC.js +7 -0
- package/dist/chunks/config-N2SBVW4T.js +8 -0
- package/dist/chunks/config-ZFIC7N4D.js +7 -0
- package/dist/chunks/config-validator.mjs +1 -0
- package/dist/chunks/connect-git-provider-FS5Q2HO4.js +7 -0
- package/dist/chunks/constants-ICJL2EO5.js +7 -0
- package/dist/chunks/create-project-IKCB6MB2.js +7 -0
- package/dist/chunks/delete-2ZE2NVHI.js +10 -0
- package/dist/chunks/delete-AL57HZDQ.js +9 -0
- package/dist/chunks/detect-projects-OD4JEAW2.js +7 -0
- package/dist/chunks/detect-services-MOXTX5XG.js +7 -0
- package/dist/chunks/disable-MKI3BKNH.js +7 -0
- package/dist/chunks/discard-SI4H7ST3.js +14 -0
- package/dist/chunks/dist-33WTJLVQ.js +7 -0
- package/dist/chunks/dist-RXYNZPEA.js +7 -0
- package/dist/chunks/edit-DNWH6SPE.js +8 -0
- package/dist/chunks/edit-WYNWDFUJ.js +9 -0
- package/dist/chunks/enable-J6MMYPYF.js +7 -0
- package/dist/chunks/esm-33752ISR.js +7 -0
- package/dist/chunks/esm-4JKEE7PC.js +7 -0
- package/dist/chunks/esm-BYG5BWYH.js +9 -0
- package/dist/chunks/esm-DFFBNKNU.js +20 -0
- package/dist/chunks/esm-IF453UWS.js +7 -0
- package/dist/chunks/esm-LABWDJ72.js +7 -0
- package/dist/chunks/esm-TG37FXTU.js +9 -0
- package/dist/chunks/exec-OZSY46V6.js +16372 -0
- package/dist/chunks/export-MHSH7QCX.js +19 -0
- package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
- package/dist/chunks/future-FFOGTKMF.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-YZKNGAEQ.js +7 -0
- package/dist/chunks/image-7METSS6F.js +7 -0
- package/dist/chunks/import-builders-GM2SERWV.js +7 -0
- package/dist/chunks/inspect-A7WJQQZO.js +15 -0
- package/dist/chunks/inspect-DI434TAM.js +19 -0
- package/dist/chunks/inspect-H2Q7XOWN.js +13 -0
- package/dist/chunks/inspect-H5JC2XKI.js +9 -0
- package/dist/chunks/inspect-IAWVHJXQ.js +20 -0
- package/dist/chunks/list-ELEUTZWJ.js +12 -0
- package/dist/chunks/list-INRPH25K.js +10 -0
- package/dist/chunks/list-WWU734RK.js +16 -0
- package/dist/chunks/login-R5NQRPQC.js +7 -0
- package/dist/chunks/login-ZF2TLCQB.js +9 -0
- package/dist/chunks/logs-UD7FEXZ7.js +7 -0
- package/dist/chunks/ls-5ZEAKKPQ.js +8 -0
- package/dist/chunks/ls-IXRLAJ4L.js +11 -0
- package/dist/chunks/ls-LIGIBVAT.js +12 -0
- package/dist/chunks/ls-MCQ2NS65.js +8 -0
- package/dist/chunks/ls-S5E2NQMI.js +12 -0
- package/dist/chunks/ls-V2ZSIVO3.js +12 -0
- package/dist/chunks/ls-VXH4QYF5.js +12 -0
- package/dist/chunks/mutate-OQWOKLIW.js +9 -0
- package/dist/chunks/notifications-KFZ333V5.js +7 -0
- package/dist/chunks/open-HH6K7ZRC.js +7 -0
- package/dist/chunks/openapi-JGYEFJJV.js +7 -0
- package/dist/chunks/permissions-ZSHKMXBZ.js +7 -0
- package/dist/chunks/pkg-EDJQLCNP.js +7 -0
- package/dist/chunks/plugin-offer-Z6FCPQFD.js +9 -0
- package/dist/chunks/prompt-missing-credentials-KOA7C4QC.js +7 -0
- package/dist/chunks/publish-FPNQ2US4.js +15 -0
- package/dist/chunks/pull-7OGOIKB3.js +7 -0
- package/dist/chunks/purchase-domain-if-available-F4LKHVBD.js +7 -0
- package/dist/chunks/push-NY3SIK2C.js +7 -0
- package/dist/chunks/query-JGPO7TNY.js +12 -0
- package/dist/chunks/reauthenticate-OZRQFR66.js +7 -0
- package/dist/chunks/reorder-4J2STFUS.js +10 -0
- package/dist/chunks/reply-EO4NTTPW.js +9 -0
- package/dist/chunks/repo-info-to-url-XQSULSEO.js +7 -0
- package/dist/chunks/resolve-RPHHRPNM.js +12 -0
- package/dist/chunks/resolve-agent-team-KX77HEAF.js +7 -0
- package/dist/chunks/resolve-deployment-framework-preset-AXXYBFCL.js +7 -0
- package/dist/chunks/restore-TEA6TSVK.js +16 -0
- package/dist/chunks/rm-BPILSPUI.js +8 -0
- package/dist/chunks/rm-F6XVUDBM.js +8 -0
- package/dist/chunks/rm-JCPXV2FN.js +8 -0
- package/dist/chunks/rm-LPQRGX7N.js +8 -0
- package/dist/chunks/rm-WHUGT6TE.js +8 -0
- package/dist/chunks/routes-P6LKQCWH.js +7 -0
- package/dist/chunks/rule-inspect-BOETGPFO.js +8 -0
- package/dist/chunks/schema-BEUO7G52.js +44 -0
- package/dist/chunks/schema-YOEAK4VX.js +14 -0
- package/dist/chunks/select-org-OMLGQEKK.js +7 -0
- package/dist/chunks/set-5XY27S7R.js +7 -0
- package/dist/chunks/setup-and-link-A7M3QT52.js +7 -0
- package/dist/chunks/skills-4J2NC2QI.js +590 -0
- package/dist/chunks/slugify-NMMUASYK.js +7 -0
- package/dist/chunks/stamp-TKONNIJ5.js +7 -0
- package/dist/chunks/tags-ZXZQEXOV.js +7 -0
- package/dist/chunks/token-W6P2KNI5.js +7 -0
- package/dist/chunks/token-util-JDQI37VN.js +7 -0
- package/dist/chunks/types-SK6J2HFE.js +14 -0
- package/dist/chunks/update-25CKNOY5.js +8 -0
- package/dist/chunks/update-route-version-KWK5S4UW.js +7 -0
- package/dist/chunks/utils-IQZEE4DT.js +86 -0
- package/dist/chunks/vlt-builder-graph-XL2XRO4V.js +7 -0
- package/dist/chunks/vlt-builder-importer-RBUPAB6J.js +11 -0
- package/dist/chunks/zod-2C2SXNIK.js +7 -0
- package/dist/commands/build/builder-worker.cjs +281 -0
- package/dist/commands/build/index.js +34 -0
- package/dist/commands/deploy/index.js +72 -0
- package/dist/commands/dev/builder-worker.cjs +110 -0
- package/dist/commands/dev/index.js +157 -0
- package/dist/commands/env/index.js +40 -0
- package/dist/commands/link/index.js +10 -0
- package/dist/commands/list/index.js +14 -0
- package/dist/commands/project/index.js +113 -0
- package/dist/commands-account.js +209 -0
- package/dist/commands-ai.js +200 -0
- package/dist/commands-blob.js +107 -0
- package/dist/commands-core.js +222 -0
- package/dist/commands-deployments.js +84 -0
- package/dist/commands-flags.js +377 -0
- package/dist/commands-integrations.js +143 -0
- package/dist/commands-observability.js +122 -0
- package/dist/commands-routing.js +273 -0
- package/dist/fetch-dist-tags.cjs +60 -0
- package/dist/get-latest-worker.cjs +222 -0
- package/dist/help.js +7 -0
- package/dist/index.js +25 -0
- package/dist/internal-build-worker.js +10 -0
- package/dist/internal-build.js +11 -0
- package/dist/package.json +265 -0
- package/dist/root-help-commands.mjs +1 -0
- package/dist/runtime-assets/dev-tunnel/api/tunnel.ts +443 -0
- package/dist/runtime-assets/dev-tunnel/lib/env.ts +25 -0
- package/dist/runtime-assets/dev-tunnel/lib/tunnel_pb.ts +505 -0
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +220 -0
- package/dist/vc.js +393 -0
- package/dist/version.mjs +2 -0
- package/package.json +224 -14
- package/index.js +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
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_isexe}from"./chunk-OPORM35X.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_which=__commonJS({"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports,module){var isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",path=__require("path"),COLON=isWindows?";":":",isexe=require_isexe(),getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"}),getPathInfo=(cmd,opt)=>{let colon=opt.colon||COLON,pathEnv=cmd.match(/\//)||isWindows&&cmd.match(/\\/)?[""]:[...isWindows?[process.cwd()]:[],...(opt.path||process.env.PATH||"").split(colon)],pathExtExe=isWindows?opt.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",pathExt=isWindows?pathExtExe.split(colon):[""];return isWindows&&cmd.indexOf(".")!==-1&&pathExt[0]!==""&&pathExt.unshift(""),{pathEnv,pathExt,pathExtExe}},which=(cmd,opt,cb)=>{typeof opt=="function"&&(cb=opt,opt={}),opt||(opt={});let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[],step=i=>new Promise((resolve,reject)=>{if(i===pathEnv.length)return opt.all&&found.length?resolve(found):reject(getNotFoundError(cmd));let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;resolve(subStep(p,i,0))}),subStep=(p,i,ii)=>new Promise((resolve,reject)=>{if(ii===pathExt.length)return resolve(step(i+1));let ext=pathExt[ii];isexe(p+ext,{pathExt:pathExtExe},(er,is)=>{if(!er&&is)if(opt.all)found.push(p+ext);else return resolve(p+ext);return resolve(subStep(p,i,ii+1))})});return cb?step(0).then(res=>cb(null,res),cb):step(0)},whichSync=(cmd,opt)=>{opt=opt||{};let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let i=0;i<pathEnv.length;i++){let ppRaw=pathEnv[i],pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw,pCmd=path.join(pathPart,cmd),p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;for(let j=0;j<pathExt.length;j++){let cur=p+pathExt[j];try{if(isexe.sync(cur,{pathExt:pathExtExe}))if(opt.all)found.push(cur);else return cur}catch{}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};module.exports=which;which.sync=whichSync}});var require_path_key=__commonJS({"../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports,module){"use strict";var pathKey=(options={})=>{let environment=options.env||process.env;return(options.platform||process.platform)!=="win32"?"PATH":Object.keys(environment).reverse().find(key=>key.toUpperCase()==="PATH")||"Path"};module.exports=pathKey;module.exports.default=pathKey}});var require_resolveCommand=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports,module){"use strict";var path=__require("path"),which=require_which(),getPathKey=require_path_key();function resolveCommandAttempt(parsed,withoutPathExt){let env=parsed.options.env||process.env,cwd=process.cwd(),hasCustomCwd=parsed.options.cwd!=null,shouldSwitchCwd=hasCustomCwd&&process.chdir!==void 0&&!process.chdir.disabled;if(shouldSwitchCwd)try{process.chdir(parsed.options.cwd)}catch{}let resolved;try{resolved=which.sync(parsed.command,{path:env[getPathKey({env})],pathExt:withoutPathExt?path.delimiter:void 0})}catch{}finally{shouldSwitchCwd&&process.chdir(cwd)}return resolved&&(resolved=path.resolve(hasCustomCwd?parsed.options.cwd:"",resolved)),resolved}function resolveCommand(parsed){return resolveCommandAttempt(parsed)||resolveCommandAttempt(parsed,!0)}module.exports=resolveCommand}});var require_escape=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports,module){"use strict";var metaCharsRegExp=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(arg){return arg=arg.replace(metaCharsRegExp,"^$1"),arg}function escapeArgument(arg,doubleEscapeMetaChars){return arg=`${arg}`,arg=arg.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),arg=arg.replace(/(?=(\\+?)?)\1$/,"$1$1"),arg=`"${arg}"`,arg=arg.replace(metaCharsRegExp,"^$1"),doubleEscapeMetaChars&&(arg=arg.replace(metaCharsRegExp,"^$1")),arg}module.exports.command=escapeCommand;module.exports.argument=escapeArgument}});var require_shebang_regex=__commonJS({"../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports,module){"use strict";module.exports=/^#!(.*)/}});var require_shebang_command=__commonJS({"../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports,module){"use strict";var shebangRegex=require_shebang_regex();module.exports=(string="")=>{let match=string.match(shebangRegex);if(!match)return null;let[path,argument]=match[0].replace(/#! ?/,"").split(" "),binary=path.split("/").pop();return binary==="env"?argument:argument?`${binary} ${argument}`:binary}}});var require_readShebang=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports,module){"use strict";var fs=__require("fs"),shebangCommand=require_shebang_command();function readShebang(command){let buffer=Buffer.alloc(150),fd;try{fd=fs.openSync(command,"r"),fs.readSync(fd,buffer,0,150,0),fs.closeSync(fd)}catch{}return shebangCommand(buffer.toString())}module.exports=readShebang}});var require_parse=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports,module){"use strict";var path=__require("path"),resolveCommand=require_resolveCommand(),escape=require_escape(),readShebang=require_readShebang(),isWin=process.platform==="win32",isExecutableRegExp=/\.(?:com|exe)$/i,isCmdShimRegExp=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(parsed){parsed.file=resolveCommand(parsed);let shebang=parsed.file&&readShebang(parsed.file);return shebang?(parsed.args.unshift(parsed.file),parsed.command=shebang,resolveCommand(parsed)):parsed.file}function parseNonShell(parsed){if(!isWin)return parsed;let commandFile=detectShebang(parsed),needsShell=!isExecutableRegExp.test(commandFile);if(parsed.options.forceShell||needsShell){let needsDoubleEscapeMetaChars=isCmdShimRegExp.test(commandFile);parsed.command=path.normalize(parsed.command),parsed.command=escape.command(parsed.command),parsed.args=parsed.args.map(arg=>escape.argument(arg,needsDoubleEscapeMetaChars));let shellCommand=[parsed.command].concat(parsed.args).join(" ");parsed.args=["/d","/s","/c",`"${shellCommand}"`],parsed.command=process.env.comspec||"cmd.exe",parsed.options.windowsVerbatimArguments=!0}return parsed}function parse(command,args,options){args&&!Array.isArray(args)&&(options=args,args=null),args=args?args.slice(0):[],options=Object.assign({},options);let parsed={command,args,options,file:void 0,original:{command,args}};return options.shell?parsed:parseNonShell(parsed)}module.exports=parse}});var require_enoent=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports,module){"use strict";var isWin=process.platform==="win32";function notFoundError(original,syscall){return Object.assign(new Error(`${syscall} ${original.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${syscall} ${original.command}`,path:original.command,spawnargs:original.args})}function hookChildProcess(cp,parsed){if(!isWin)return;let originalEmit=cp.emit;cp.emit=function(name,arg1){if(name==="exit"){let err=verifyENOENT(arg1,parsed);if(err)return originalEmit.call(cp,"error",err)}return originalEmit.apply(cp,arguments)}}function verifyENOENT(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawn"):null}function verifyENOENTSync(status,parsed){return isWin&&status===1&&!parsed.file?notFoundError(parsed.original,"spawnSync"):null}module.exports={hookChildProcess,verifyENOENT,verifyENOENTSync,notFoundError}}});var require_cross_spawn=__commonJS({"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports,module){"use strict";var cp=__require("child_process"),parse=require_parse(),enoent=require_enoent();function spawn(command,args,options){let parsed=parse(command,args,options),spawned=cp.spawn(parsed.command,parsed.args,parsed.options);return enoent.hookChildProcess(spawned,parsed),spawned}function spawnSync(command,args,options){let parsed=parse(command,args,options),result=cp.spawnSync(parsed.command,parsed.args,parsed.options);return result.error=result.error||enoent.verifyENOENTSync(result.status,parsed),result}module.exports=spawn;module.exports.spawn=spawn;module.exports.sync=spawnSync;module.exports._parse=parse;module.exports._enoent=enoent}});var require_strip_final_newline=__commonJS({"../../node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js"(exports,module){"use strict";module.exports=input=>{let LF=typeof input=="string"?`
|
|
8
|
+
`:`
|
|
9
|
+
`.charCodeAt(),CR=typeof input=="string"?"\r":"\r".charCodeAt();return input[input.length-1]===LF&&(input=input.slice(0,input.length-1)),input[input.length-1]===CR&&(input=input.slice(0,input.length-1)),input}}});var require_npm_run_path=__commonJS({"../../node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js"(exports,module){"use strict";var path=__require("path"),pathKey=require_path_key(),npmRunPath=options=>{options={cwd:process.cwd(),path:process.env[pathKey()],execPath:process.execPath,...options};let previous,cwdPath=path.resolve(options.cwd),result=[];for(;previous!==cwdPath;)result.push(path.join(cwdPath,"node_modules/.bin")),previous=cwdPath,cwdPath=path.resolve(cwdPath,"..");let execPathDir=path.resolve(options.cwd,options.execPath,"..");return result.push(execPathDir),result.concat(options.path).join(path.delimiter)};module.exports=npmRunPath;module.exports.default=npmRunPath;module.exports.env=options=>{options={env:process.env,...options};let env={...options.env},path2=pathKey({env});return options.path=env[path2],env[path2]=module.exports(options),env}}});var require_mimic_fn=__commonJS({"../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports,module){"use strict";var mimicFn=(to,from)=>{for(let prop of Reflect.ownKeys(from))Object.defineProperty(to,prop,Object.getOwnPropertyDescriptor(from,prop));return to};module.exports=mimicFn;module.exports.default=mimicFn}});var require_onetime=__commonJS({"../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports,module){"use strict";var mimicFn=require_mimic_fn(),calledFunctions=new WeakMap,onetime=(function_,options={})=>{if(typeof function_!="function")throw new TypeError("Expected a function");let returnValue,callCount=0,functionName=function_.displayName||function_.name||"<anonymous>",onetime2=function(...arguments_){if(calledFunctions.set(onetime2,++callCount),callCount===1)returnValue=function_.apply(this,arguments_),function_=null;else if(options.throw===!0)throw new Error(`Function \`${functionName}\` can only be called once`);return returnValue};return mimicFn(onetime2,function_),calledFunctions.set(onetime2,callCount),onetime2};module.exports=onetime;module.exports.default=onetime;module.exports.callCount=function_=>{if(!calledFunctions.has(function_))throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);return calledFunctions.get(function_)}}});var require_is_stream=__commonJS({"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports,module){"use strict";var isStream=stream=>stream!==null&&typeof stream=="object"&&typeof stream.pipe=="function";isStream.writable=stream=>isStream(stream)&&stream.writable!==!1&&typeof stream._write=="function"&&typeof stream._writableState=="object";isStream.readable=stream=>isStream(stream)&&stream.readable!==!1&&typeof stream._read=="function"&&typeof stream._readableState=="object";isStream.duplex=stream=>isStream.writable(stream)&&isStream.readable(stream);isStream.transform=stream=>isStream.duplex(stream)&&typeof stream._transform=="function";module.exports=isStream}});var require_merge_stream=__commonJS({"../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports,module){"use strict";var{PassThrough}=__require("stream");module.exports=function(){var sources=[],output=new PassThrough({objectMode:!0});return output.setMaxListeners(0),output.add=add,output.isEmpty=isEmpty,output.on("unpipe",remove),Array.prototype.slice.call(arguments).forEach(add),output;function add(source){return Array.isArray(source)?(source.forEach(add),this):(sources.push(source),source.once("end",remove.bind(null,source)),source.once("error",output.emit.bind(output,"error")),source.pipe(output,{end:!1}),this)}function isEmpty(){return sources.length==0}function remove(source){sources=sources.filter(function(it){return it!==source}),!sources.length&&output.readable&&output.end()}}}});export{require_cross_spawn,require_strip_final_newline,require_npm_run_path,require_onetime,require_is_stream,require_merge_stream};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{getProductionUrl}from"./chunk-VT6RIZJH.js";import{output_manager_default}from"./chunk-XP3FT56R.js";var PROTECTION_METHODS=[{setting:"ssoProtection",id:"vercel_authentication",name:"Vercel Authentication"},{setting:"passwordProtection",id:"password",name:"Password Protection"}];async function getEnabledProtection(client,project){try{let settings=await client.fetch(`/v9/projects/${encodeURIComponent(project.id)}`,{accountId:project.accountId});return PROTECTION_METHODS.filter(method=>settings[method.setting]).map(method=>({...method,deploymentType:readDeploymentType(settings[method.setting])}))}catch(err){return output_manager_default.debug(`Could not read Deployment Protection settings: ${err}`),null}}function readDeploymentType(setting){if(setting&&typeof setting=="object"&&"deploymentType"in setting){let{deploymentType}=setting;return typeof deploymentType=="string"?deploymentType:void 0}}var PRODUCTION_DOMAINS_PUBLIC=new Set(["all_except_custom_domains","prod_deployment_urls_and_all_previews","preview"]),PRODUCTION_DEPLOYMENTS_PUBLIC=new Set(["preview"]);function getProtectionForDeployment(methods,deployment){if(!methods)return[];if(deployment.target!=="production")return methods;let publicScopes=getProductionUrl(deployment)?PRODUCTION_DOMAINS_PUBLIC:PRODUCTION_DEPLOYMENTS_PUBLIC;return methods.filter(method=>!method.deploymentType||!publicScopes.has(method.deploymentType))}export{getEnabledProtection,getProtectionForDeployment};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
var LABEL_OVERRIDES={createdAt:"Created",updatedAt:"Updated",deletedAt:"Deleted",expiredAt:"Expired",verifiedAt:"Verified",deployedAt:"Deployed",created_at:"Created",updated_at:"Updated",accountId:"Account Id",projectId:"Project Id",teamId:"Team Id",nodeVersion:"Node Version"};function humanizeIdentifier(raw){let s=raw.trim();return s?s.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(/[\s_-]+/).filter(Boolean).map(w=>w.charAt(0).toUpperCase()+w.slice(1).toLowerCase()).join(" "):raw}function humanReadableColumnLabel(columnPath){let override=LABEL_OVERRIDES[columnPath];if(override)return override;let parts=columnPath.split(".").filter(Boolean);return parts.length===0?columnPath:parts.length===1?LABEL_OVERRIDES[parts[0]]??humanizeIdentifier(parts[0]):parts.map(p=>LABEL_OVERRIDES[p]??humanizeIdentifier(p)).join(" \u203A ")}export{humanizeIdentifier,humanReadableColumnLabel};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{environmentOption,formatOption,jsonOption,projectOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var RULE_ENVIRONMENTS=["any","preview","production"],ruleEnvironmentOption={...environmentOption,description:"Environment the rule applies to (required): production, preview, or any"},lsSubcommand={name:"ls",aliases:["list"],description:"List the Vercel tracing sampling rules for a project",arguments:[],options:[formatOption,jsonOption,projectOption],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"List the sampling rules as JSON",value:`${packageName} traces config ls --json`}]},setSubcommand={name:"set",aliases:[],description:"Enable Vercel tracing and add or replace one sampling rule. The rate is a whole percentage from 1 to 100.",arguments:[{name:"rate",required:!0},{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,formatOption,jsonOption,projectOption],examples:[{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Trace every preview request to one path prefix",value:`${packageName} traces config set 100 /api --environment preview`},{name:"Trace one percent of traffic in every environment",value:`${packageName} traces config set 1 --environment any`}]},rmSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove Vercel tracing sampling rules. Without a path prefix, every rule for the environment is removed. Removing the final rule disables tracing.",arguments:[{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,{name:"default",shorthand:null,type:Boolean,deprecated:!1,description:"Remove only the rule that has no path prefix, keeping the per-path rules"},formatOption,jsonOption,projectOption],examples:[{name:"Remove one rule by environment and path prefix",value:`${packageName} traces config remove /api --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`},{name:"Remove only the production rule that covers all paths",value:`${packageName} traces config remove --environment production --default`}]},tracesConfigCommand={name:"config",aliases:[],description:"Manage Vercel tracing sampling rules for a project.",arguments:[],subcommands:[lsSubcommand,setSubcommand,rmSubcommand],options:[],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`}]};export{RULE_ENVIRONMENTS,lsSubcommand,setSubcommand,rmSubcommand,tracesConfigCommand};
|
|
@@ -0,0 +1,7 @@
|
|
|
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_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_strip_ansi=__toESM(require_strip_ansi(),1),CONTROL_CHARACTERS=/[\u0000-\u001F\u007F-\u009F]/g,FORMAT_CHARACTERS=/[\u200B-\u200F\u202A-\u202E\u2060-\u2069\uFEFF]/g;function remoteText(value){return(0,import_strip_ansi.default)(value).replace(/\r?\n/g,"\\n").replace(CONTROL_CHARACTERS,"").replace(FORMAT_CHARACTERS,"")}export{remoteText};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
var indent_default=(input,level)=>{let fill=" ".repeat(level);return`${fill}${input.replace(/\n/g,`
|
|
8
|
+
${fill}`)}`};export{indent_default};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{CertConfigurationError,CertError,DomainNotFound,TooManyRequests}from"./chunk-6VH56CX2.js";function mapCertError(error,cns){let errorCode=error.code;if(errorCode==="too_many_requests"){let retryAfter=typeof error.retryAfterMs=="number"?error.retryAfterMs:0;return new TooManyRequests("certificates",retryAfter)}return errorCode==="not_found"?new DomainNotFound(error.domain):errorCode==="configuration_error"?new CertConfigurationError({cns:cns||error.cns||[],message:error.message,external:error.external,helpUrl:error.helpUrl,type:error.statusCode===449?"http-01":"dns-01"}):errorCode==="bad_domains"||errorCode==="challenge_still_pending"||errorCode==="common_name_domain_name_mismatch"||errorCode==="conflicting_caa_record"||errorCode==="domain_not_verified"||errorCode==="invalid_cn"||errorCode==="invalid_domain"||errorCode==="rate_limited"||errorCode==="should_share_root_domain"||errorCode==="unauthorized_request_error"||errorCode==="unsupported_challenge_priority"||errorCode==="wildcard_not_allowed"||errorCode==="validation_running"||errorCode==="dns_error"||errorCode==="challenge_error"||errorCode==="txt_record_not_found"?new CertError({cns:cns||error.cns||[],code:errorCode,message:error.message,helpUrl:error.helpUrl}):null}export{mapCertError};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
var REPOSITORY_PATTERN=/^[a-z0-9]+(?:(?:\.|_|__|-+)[a-z0-9]+)*$/,TAG_PATTERN=/^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}$/,DEFAULT_TAG="latest";function parseNameArg(nameArg,defaultRepo){if(!nameArg)return{repository:defaultRepo,tag:void 0};if(nameArg.includes("/"))return{error:`Invalid image name "${nameArg}". Provide only a repository name (optionally with :tag); the registry, team, and project are added automatically.`};let colon=nameArg.lastIndexOf(":");if(colon===-1)return{repository:nameArg,tag:void 0};let repository=nameArg.slice(0,colon),tag=nameArg.slice(colon+1);return repository?{repository,tag}:{error:`Invalid image name "${nameArg}". Missing repository name before ":".`}}function validateImageParts(parts){if(!REPOSITORY_PATTERN.test(parts.repository))return`Invalid repository name "${parts.repository}". Use lowercase letters, digits, and separators (\`.\` \`_\` \`-\`), for example "my-app". Pass a valid name explicitly, e.g. \`... my-app\`.`;if(parts.tag!==void 0&&!TAG_PATTERN.test(parts.tag))return`Invalid tag "${parts.tag}". Tags may contain letters, digits, "_", ".", "-" and be up to 128 characters.`}function buildRepositoryReference(parts){return`${parts.registry}/${parts.teamSlug}/${parts.projectName}/${parts.repository}`}export{DEFAULT_TAG,parseNameArg,validateImageParts,buildRepositoryReference};
|
|
@@ -0,0 +1,7 @@
|
|
|
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_format}from"./chunk-PFD7LETF.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_ms=__toESM(require_ms(),1),import_chalk=__toESM(require_source(),1),import_format=__toESM(require_format(),1);function isMissingDate(value){return value==null||value===""}function formatDate(dateStrOrNumber){if(isMissingDate(dateStrOrNumber))return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"DD MMMM YYYY HH:mm:ss")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}function formatDateWithoutTime(dateStrOrNumber){if(isMissingDate(dateStrOrNumber))return import_chalk.default.gray("-");let date=new Date(dateStrOrNumber),diff=date.getTime()-Date.now();return diff<0?`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[${(0,import_ms.default)(-diff)} ago]`)}`:`${(0,import_format.default)(date,"MMM DD YYYY")} ${import_chalk.default.gray(`[in ${(0,import_ms.default)(diff)}]`)}`}export{formatDate,formatDateWithoutTime};
|
|
@@ -0,0 +1,8 @@
|
|
|
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{did_you_mean_default}from"./chunk-DWZBL4NK.js";import{param}from"./chunk-3G3FQYMW.js";import{shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-DGYHWXD2.js";import{buildCorrectedCommand,suggestCorrection}from"./chunk-VOCZ34ON.js";import{getFlagsSpecification}from"./chunk-AWMQGOS2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function handleCommandTypo({command,availableCommands,threshold=.7,client}){if(!command||command.startsWith("-"))return!1;let visibleCommands=availableCommands.filter(command2=>!command2.hidden),commandNames=visibleCommands.flatMap(({name,aliases})=>[name,...aliases]),correction=suggestCorrection(command,commandNames),suggestion=correction??did_you_mean_default(command,commandNames,threshold);if(suggestion){if(client){let definition=visibleCommands.find(candidate=>candidate.name===correction||candidate.aliases.some(alias=>alias===correction)),corrected=correction?buildCorrectedCommand(client.argv,command,correction,getFlagsSpecification(definition?.options??[])):void 0,payload={status:"error",reason:"unknown_command",message:`Unknown command "${command}". Did you mean "${suggestion}"?`,hint:corrected?"Use the suggested command after replacing any placeholders with the intended values.":`Accepted commands: ${commandNames.join(", ")}.`,...corrected&&{next:[{command:corrected,when:"Run the corrected command; replace any placeholders first"}]}};return shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,payload):(output_manager_default.fatal(payload.message),output_manager_default.print(` ${corrected??payload.hint}
|
|
8
|
+
`)),!0}return output_manager_default.error(`${param(command)} is not a valid target directory or subcommand. Did you mean ${param(suggestion)}?`),!0}return!1}export{handleCommandTypo};
|
|
@@ -0,0 +1,7 @@
|
|
|
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_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_strip_ansi=__toESM(require_strip_ansi(),1);function truncateEnd(value,maxLength,opts={}){let omission=opts.omission??"...";return value.length<=maxLength?value:maxLength<=omission.length?value.slice(0,maxLength):`${value.slice(0,maxLength-omission.length)}${omission}`}function truncateMiddle(value,maxLength,opts={}){let omission=opts.omission??"...",comparable=opts.useVisibleLength?(0,import_strip_ansi.default)(value):value;if(comparable.length<=maxLength)return value;if(maxLength<=omission.length)return comparable.slice(0,maxLength);let available=maxLength-omission.length,start=Math.ceil(available/2),end=Math.floor(available/2);return`${comparable.slice(0,start)}${omission}${comparable.slice(comparable.length-end)}`}function ellipsizeMiddle(value,maxLength,useVisibleLength=!1){return truncateMiddle(value,maxLength,{omission:"\u2026",useVisibleLength})}export{truncateEnd,truncateMiddle,ellipsizeMiddle};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-DGYHWXD2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function getRenamedOption(flags,name,oldName,{json=!1}={}){let value=flags[name],oldValue=flags[oldName];if(value!==void 0&&oldValue!==void 0)return{error:`Can't use ${name} with ${oldName}.`};if(value!==void 0&&value.trim()==="")return{error:`${name} can't be empty.`};if(oldValue===void 0)return{value};let message=`${oldName} is deprecated. Use ${name}.`;return json?{value:oldValue,warning:{reason:AGENT_REASON.DEPRECATED,message}}:(output_manager_default.warning(message),{value:oldValue})}function reportRenamedOptionError(client,message,{json=!1}={}){return json||shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}):output_manager_default.error(message),2}function renameOptionInArgs(args,oldName,name){let end=args.indexOf("--");return args.map((arg,index)=>(end===-1||index<end)&&(arg===oldName||arg.startsWith(`${oldName}=`))?`${name}${arg.slice(oldName.length)}`:arg)}export{getRenamedOption,reportRenamedOptionError,renameOptionInArgs};
|
|
@@ -0,0 +1,7 @@
|
|
|
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,limitOption,nextCursorOption,projectOption,sinceOption,untilOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var typesSubcommand={name:"types",aliases:[],description:"List available event types with descriptions.",arguments:[],options:[formatOption,jsonOption],examples:[{name:"List all event types",value:`${packageName} activity types`},{name:"Output JSON",value:`${packageName} activity types --json`}]},activityCommand={name:"activity",aliases:[],description:"List user activity events.",arguments:[],subcommands:[{name:"ls",aliases:["list"],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},typesSubcommand],options:[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by event type. Repeatable and comma-separated (e.g. --type deployment --type project-created or --type deployment,project-created)."},sinceOption,untilOption,{...projectOption,shorthand:"p",description:"Filter by project (overrides auto-detected linked project)."},{name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"Show all team events (ignore linked project auto-scoping)."},limitOption,nextCursorOption,formatOption,jsonOption],examples:[{name:"List events for the linked project",value:`${packageName} activity`},{name:"Filter events by multiple types",value:`${packageName} activity --type deployment --type project-created --since 7d`},{name:"Filter events by comma-separated types",value:`${packageName} activity --type deployment,project-created --since 7d`},{name:"List all team events",value:`${packageName} activity --all --since 30d`},{name:"Output JSON",value:`${packageName} activity --json | jq '.events[]'`},{name:"List activity event types",value:`${packageName} activity types`}]};export{typesSubcommand,activityCommand};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{warnDeprecatedInput}from"./chunk-AWMQGOS2.js";var VALUE_LIKE=/^(on|off|true|false|yes|no|1|0|enabled?|disabled?)$/i;function negationOf(name){return`--no-${name.slice(2)}`}function readOnOffOption(client,flags,names){let typed=name=>name!==void 0&&flags[name]===!0,onNames=[names.on,names.oldOn].filter(typed),offNames=[names.off,names.oldOff].filter(typed);return onNames.length>0&&offNames.length>0?{error:`Can't use ${onNames[0]} with ${offNames[0]}.`}:(names.oldOn&&onNames.includes(names.oldOn)&&warnDeprecatedInput(client,names.oldOn,names.on),names.oldOff&&offNames.includes(names.oldOff)&&warnDeprecatedInput(client,names.oldOff,names.off),{value:onNames.length>0?!0:offNames.length>0?!1:void 0})}function rewriteLegacyOnOffValues(args,options,client){let legacyOptions=options.filter(option=>option.legacyValues),out=[],legacy=new Map,end=args.indexOf("--");for(let i=0;i<args.length;i++){let token=args[i];if(end!==-1&&i>=end){out.push(token);continue}let option=legacyOptions.find(candidate=>token===`--${candidate.name}`||token.startsWith(`--${candidate.name}=`));if(!option?.legacyValues){out.push(token);continue}let name=`--${option.name}`,negation=negationOf(name),{on,off}=option.legacyValues,invalid={error:`${name} doesn't take a value. Use ${name} or ${negation}.`};if(token===name){let next=args[i+1];if(next===void 0||end!==-1&&i+1>=end)out.push(token);else if(next===on||next===off)out.push(next===on?name:negation),legacy.set(name,next),client&&warnDeprecatedInput(client,`${name} ${next}`,next===on?name:negation),i++;else{if(VALUE_LIKE.test(next))return invalid;out.push(token)}continue}let value=token.slice(name.length+1);if(value==="true"||value==="false")out.push(value==="true"?name:negation);else if(value===on||value===off)out.push(value===on?name:negation),legacy.set(name,value),client&&warnDeprecatedInput(client,token,value===on?name:negation);else return invalid}return{args:out,legacy}}function getFalseValueWarnings(args,options){let booleans=new Set(options.filter(option=>option.type===Boolean&&!option.legacyValues&&!option.rejectsValue&&option.name!=="non-interactive").map(option=>option.name)),warnings=new Set;for(let token of args){if(token==="--")break;let match=/^--([^=]+)=(.*)$/.exec(token);if(!match||!booleans.has(match[1])||!/^false$/i.test(match[2]))continue;let name=`--${match[1]}`;warnings.add(match[1].startsWith("no-")?`${token} turns ${name} on. Leave out ${name} to turn it off.`:`${token} turns ${name} on. Use ${negationOf(name)} to turn it off.`)}return[...warnings]}export{readOnOffOption,rewriteLegacyOnOffValues,getFalseValueWarnings};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
function canPrompt(client){return!!client.stdin.isTTY&&!client.nonInteractive}function canPromptOnTerminal(client){return canPrompt(client)&&!!client.stderr.isTTY&&!process.env.CI}export{canPrompt,canPromptOnTerminal};
|
|
@@ -0,0 +1,15 @@
|
|
|
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{Separator}from"./chunk-MVGTMPMI.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{isAPIError}from"./chunk-6VH56CX2.js";import{eraseLines,link_default,output_manager_default}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);import{URL}from"url";var import_strip_ansi=__toESM(require_strip_ansi(),1);function getLength(input){let biggestLength=0;for(let line of input.split(`
|
|
8
|
+
`)){let str=(0,import_strip_ansi.default)(line);str.length>biggestLength&&(biggestLength=str.length)}return biggestLength}async function list(client,{message="the question",choices:_choices=[{name:`something
|
|
9
|
+
description
|
|
10
|
+
details
|
|
11
|
+
etc`,value:"something unique",short:"generally the first line of `name`"}],pageSize=15,separator=!1,cancel="end",eraseFinalAnswer=!1}){let biggestLength=0,selected;for(let choice of _choices)if("name"in choice){let length=getLength(choice.name);length>biggestLength&&(biggestLength=length)}else if(choice&&typeof choice=="object"&&"separator"in choice){let length=getLength(`\u2500\u2500 ${choice.separator} `);length>biggestLength&&(biggestLength=length)}let choices=_choices.map(choice=>{if(choice instanceof Separator)return choice;if("separator"in choice){let prefix=`\u2500\u2500 ${choice.separator} `,suffix="\u2500".repeat(Math.max(0,biggestLength-getLength(prefix)));return new Separator(`${prefix}${suffix}`)}if("short"in choice){if(choice.selected){if(selected)throw new Error("Only one choice may be selected");selected=choice.short}return choice}throw new Error("Invalid choice")});if(separator)for(let i=0;i<choices.length;i+=2)choices.splice(i,0,new Separator(" "));let cancelSeparator=new Separator("\u2500".repeat(biggestLength)),_cancel={name:"Cancel",value:"",short:""};cancel==="start"?choices.unshift(_cancel,cancelSeparator):choices.push(cancelSeparator,_cancel);let answer=await client.input.select({message,choices,pageSize,default:selected});return eraseFinalAnswer===!0&&process.stdout.write(eraseLines(2)),answer}async function disconnectGitProvider(client,org,projectId){let fetchUrl=`/v9/projects/${projectId}/link`;return client.fetch(fetchUrl,{method:"DELETE",headers:{"Content-Type":"application/json"}})}async function connectGitProvider(client,projectId,type,repo){let fetchUrl=`/v9/projects/${projectId}/link`;try{return await client.fetch(fetchUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type,repo})})}catch(err){let apiError=isAPIError(err);if(apiError&&(err.action==="Install GitHub App"||err.code==="repo_not_found"))output_manager_default.error(`Failed to connect ${import_chalk.default.cyan(repo)} to project. Make sure there aren't any typos and that you have access to the repository if it's private.`);else if(apiError&&err.code==="repo_links_exceeded_limit"){let ctaLabel,ctaUrl;typeof err.ctaLabel=="string"&&typeof err.ctaUrl=="string"?(ctaLabel=err.ctaLabel,ctaUrl=err.ctaUrl):typeof err.action=="string"&&typeof err.link=="string"&&(ctaLabel=err.action,ctaUrl=err.link);let message=err.message;ctaLabel&&ctaUrl&&(message+=`
|
|
12
|
+
${ctaLabel}: ${link_default(ctaUrl)}`),output_manager_default.error(message)}else apiError&&err.action==="Add a Login Connection"?output_manager_default.error(err.message.replace(repo,import_chalk.default.cyan(repo))+`
|
|
13
|
+
Visit ${link_default(err.link)} for more information.`):output_manager_default.error(`Failed to connect the ${formatProvider(type)} repository ${repo}.
|
|
14
|
+
${err}`);return 1}}function formatProvider(type){switch(type){case"github":return"GitHub";case"gitlab":return"GitLab";case"bitbucket":return"Bitbucket";default:return type}}function buildRepoUrl(provider,org,repo){switch(provider){case"github":return`https://github.com/${org}/${repo}`;case"gitlab":return`https://gitlab.com/${org}/${repo}`;case"bitbucket":return`https://bitbucket.org/${org}/${repo}`;default:return null}}function getURL(input){let url=null;try{url=new URL(input)}catch{}if(!url)try{url=new URL(`ssh://${input.replace(":","/")}`)}catch{}return url}function parseRepoUrl(originUrl){let url=getURL(originUrl);if(!url)return null;let hostParts=url.hostname.split(".");if(hostParts.length<2)return null;let provider=hostParts[hostParts.length-2],pathParts=url.pathname.split("/").filter(Boolean);if(pathParts.length<2)return null;let repo=pathParts.pop()?.replace(/\.git$/,"");if(!repo)return null;let org=pathParts.join("/");return{url:originUrl,provider,org,repo}}function printRemoteUrls(remoteUrls){for(let[name,url]of Object.entries(remoteUrls))output_manager_default.print(` \u2022 ${name}: ${import_chalk.default.cyan(url)}
|
|
15
|
+
`)}async function selectRemoteUrl(client,remoteUrls){let choices=[];for(let[urlKey,urlValue]of Object.entries(remoteUrls))choices.push({name:`${urlValue} ${import_chalk.default.gray(`(${urlKey})`)}`,value:urlValue,short:urlKey});return await list(client,{message:"Which remote do you want to connect?",choices})}async function selectAndParseRemoteUrl(client,remoteUrls){let remoteUrl;if(Object.keys(remoteUrls).length>1?(output_manager_default.log("Found multiple remote URLs."),remoteUrl=await selectRemoteUrl(client,remoteUrls)):remoteUrl=Object.values(remoteUrls)[0],remoteUrl==="")return output_manager_default.log("Canceled"),null;let repoInfo=parseRepoUrl(remoteUrl);return repoInfo||(output_manager_default.log(`Connecting Git repository: ${import_chalk.default.cyan(remoteUrl)}`),output_manager_default.error(`Failed to parse Git repo data from the following remote URL: ${link_default(remoteUrl)}`),null)}async function checkExistsAndConnect({client,confirm,org,project,gitProviderLink,provider,repoPath,gitOrg,repo}){let displayUrl=buildRepoUrl(provider,gitOrg,repo)||repoPath;if(output_manager_default.log(`Connecting ${formatProvider(provider)} repository: ${import_chalk.default.cyan(displayUrl)}`),gitProviderLink){let connectedProvider=gitProviderLink.type,connectedOrg=gitProviderLink.org,connectedRepo=gitProviderLink.repo,connectedRepoPath=`${connectedOrg}/${connectedRepo}`;if(connectedProvider===provider&&connectedOrg===gitOrg&&connectedRepo===repo)return output_manager_default.log(`${import_chalk.default.cyan(connectedRepoPath)} is already connected to your project.`),1;if(!await confirmRepoConnect(client,confirm,connectedProvider,connectedRepoPath))return 0;await disconnectGitProvider(client,org,project.id);let connect=await connectGitProvider(client,project.id,provider,repoPath);if(typeof connect=="number")return connect}else{let connect=await connectGitProvider(client,project.id,provider,repoPath);if(typeof connect=="number")return connect}output_manager_default.log("Connected")}async function confirmRepoConnect(client,yes,connectedProvider,connectedRepoPath){let shouldReplaceProject=yes;return shouldReplaceProject||(shouldReplaceProject=await client.input.confirm(`Looks like you already have a ${formatProvider(connectedProvider)} repository connected: ${import_chalk.default.cyan(connectedRepoPath)}. Do you want to replace it?`,!0),shouldReplaceProject||output_manager_default.log("Canceled. Repo not connected.")),shouldReplaceProject}export{list,disconnectGitProvider,connectGitProvider,formatProvider,buildRepoUrl,parseRepoUrl,printRemoteUrls,selectRemoteUrl,selectAndParseRemoteUrl,checkExistsAndConnect};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_has_flag=__commonJS({"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports,module){"use strict";module.exports=(flag,argv=process.argv)=>{let prefix=flag.startsWith("-")?"":flag.length===1?"-":"--",position=argv.indexOf(prefix+flag),terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)}}});var require_supports_color=__commonJS({"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports,module){"use strict";var os=__require("os"),tty=__require("tty"),hasFlag=require_has_flag(),{env}=process,forceColor;hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")?forceColor=0:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=1);"FORCE_COLOR"in env&&(env.FORCE_COLOR==="true"?forceColor=1:env.FORCE_COLOR==="false"?forceColor=0:forceColor=env.FORCE_COLOR.length===0?1:Math.min(parseInt(env.FORCE_COLOR,10),3));function translateLevel(level){return level===0?!1:{level,hasBasic:!0,has256:level>=2,has16m:level>=3}}function supportsColor(haveStream,streamIsTTY){if(forceColor===0)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(haveStream&&!streamIsTTY&&forceColor===void 0)return 0;let min=forceColor||0;if(env.TERM==="dumb")return min;if(process.platform==="win32"){let osRelease=os.release().split(".");return Number(osRelease[0])>=10&&Number(osRelease[2])>=10586?Number(osRelease[2])>=14931?3:2:1}if("CI"in env)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(sign=>sign in env)||env.CI_NAME==="codeship"?1:min;if("TEAMCITY_VERSION"in env)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0;if(env.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in env){let version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)||"COLORTERM"in env?1:min}function getSupportLevel(stream){let level=supportsColor(stream,stream&&stream.isTTY);return translateLevel(level)}module.exports={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(!0,tty.isatty(1))),stderr:translateLevel(supportsColor(!0,tty.isatty(2)))}}});export{require_has_flag,require_supports_color};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{confirmOption,projectOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var addSubcommand={name:"add",aliases:[],description:"Add projects to an existing repository link created by link --repo",arguments:[],options:[{...yesOption,description:"Skip questions when adding projects with default team and settings"}],examples:[{name:"Add projects to an existing repository link",value:`${packageName} link add`}]},linkCommand={name:"link",aliases:[],description:"Link a local directory to a Vercel project",runsWithoutSubcommand:!0,arguments:[],subcommands:[addSubcommand],options:[{name:"repo",description:"Link multiple projects from the Git repository (alpha; per-directory project links take precedence)",shorthand:null,deprecatedShorthand:"r",type:Boolean,deprecated:!1},{...projectOption,shorthand:"p",description:"Set the project name or ID to link; required for non-interactive existing-project links"},{name:"team",description:"Set the team ID or slug; use with --project for non-interactive links",shorthand:null,argument:"TEAM_ID_OR_SLUG",type:String,deprecated:!1},{...yesOption,description:"Skip questions when setting up with default team and settings"},confirmOption],examples:[{name:"Link current directory to a Vercel project",value:`${packageName} link`},{name:"Link current directory with default options and skip questions",value:`${packageName} link --yes`},{name:"Link to an existing project in CI or agent mode",value:`${packageName} link --yes --team <team-id> --project <project-name-or-id>`},{name:"Link a specific directory to a Vercel project",value:`${packageName} link --cwd /path/to/project`},{name:"Link multiple projects from the current Git repository",value:`${packageName} link --repo`},{name:"Add additional projects to an existing repository link",value:`${packageName} link add`}]};export{addSubcommand,linkCommand};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{purchaseDomainIfAvailable}from"./chunk-WCWP4GBR.js";import{addDomain,getDomainByName,require_cjs}from"./chunk-DUT4U5YY.js";import{mapCertError}from"./chunk-HCRD3JFL.js";import{require_dist as require_dist2}from"./chunk-KNLGWGUE.js";import{DomainNotFound,DomainPermissionDenied,InvalidDomain,NowError,isAPIError}from"./chunk-6VH56CX2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_async_retry=__toESM(require_dist2(),1);var import_error_utils=__toESM(require_dist(),1);async function issueCert(client,cns){return(0,import_async_retry.default)(async bail=>{try{return await client.fetch("/v3/certs",{method:"POST",body:{domains:cns}})}catch(err){if(isAPIError(err)&&err.code==="configuration_error")throw err;if((0,import_error_utils.isError)(err))bail(err);else throw err}},{retries:3,minTimeout:5e3,maxTimeout:15e3})}async function createCertForCns(client,cns,context){output_manager_default.spinner(`Issuing a certificate for ${import_chalk.default.bold(cns.join(", "))}`);try{return await issueCert(client,cns)}catch(err){if(isAPIError(err)){if(err.code==="forbidden")return new DomainPermissionDenied(err.domain,context);let mappedError=mapCertError(err,cns);if(mappedError)return mappedError}throw err}finally{output_manager_default.stopSpinner()}}var import_tldts=__toESM(require_cjs(),1);async function maybeGetDomainByName(client,contextName,domainName){let maybeDomain=await getDomainByName(client,contextName,domainName);return maybeDomain instanceof DomainPermissionDenied?maybeDomain:maybeDomain instanceof DomainNotFound?null:maybeDomain}function isWildcardAlias(alias){return alias.startsWith("*.")}function extractDomain(alias){return isWildcardAlias(alias)?alias.slice(2):alias}async function setupDomain(client,alias,contextName){let aliasDomain=extractDomain(alias);output_manager_default.debug(`Trying to fetch domain ${aliasDomain} by name`);let info=await maybeGetDomainByName(client,contextName,aliasDomain);if(info instanceof DomainPermissionDenied)return info;if(info){let{name:domain2}=info;return output_manager_default.debug(`Domain ${domain2} found for the given context`),info}output_manager_default.debug(`The domain ${aliasDomain} was not found, trying to purchase it`);let purchased=await purchaseDomainIfAvailable(client,aliasDomain,contextName);if(purchased instanceof NowError)return purchased;if(!purchased){output_manager_default.debug(`Domain ${aliasDomain} is not available to be purchased. Trying to add it`);let parsedDomain=(0,import_tldts.parse)(aliasDomain);if(!parsedDomain.domain)return new InvalidDomain(alias);let{domain:domain2}=parsedDomain;output_manager_default.debug(`Adding ${domain2}`);let addResult=await addDomain(client,domain2,contextName);return addResult instanceof NowError||output_manager_default.debug(`Domain ${domain2} successfully added and automatically verified`),addResult}output_manager_default.debug(`The domain ${aliasDomain} was successfully purchased`);let purchasedDomain=await maybeGetDomainByName(client,contextName,aliasDomain),{name:domain}=purchasedDomain;return output_manager_default.debug(`Domain ${domain} was purchased and it is automatically verified`),maybeGetDomainByName(client,contextName,domain)}export{createCertForCns,isWildcardAlias,extractDomain,setupDomain};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
function formatGranularity(value){if(!value||typeof value!="object")return;let granularity=value;if(typeof granularity.minutes=="number")return`${granularity.minutes}m`;if(typeof granularity.hours=="number")return`${granularity.hours}h`;if(typeof granularity.days=="number")return`${granularity.days}d`}export{formatGranularity};
|
|
@@ -0,0 +1,21 @@
|
|
|
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{__esm}from"./chunk-BZENIQ7N.js";function createScanner(text,ignoreTrivia=!1){let len=text.length,pos=0,value="",tokenOffset=0,token=16,lineNumber=0,lineStartOffset=0,tokenLineStartOffset=0,prevTokenLineStartOffset=0,scanError=0;function scanHexDigits(count,exact){let digits=0,value2=0;for(;digits<count||!exact;){let ch=text.charCodeAt(pos);if(ch>=48&&ch<=57)value2=value2*16+ch-48;else if(ch>=65&&ch<=70)value2=value2*16+ch-65+10;else if(ch>=97&&ch<=102)value2=value2*16+ch-97+10;else break;pos++,digits++}return digits<count&&(value2=-1),value2}function setPosition(newPosition){pos=newPosition,value="",tokenOffset=0,token=16,scanError=0}function scanNumber(){let start=pos;if(text.charCodeAt(pos)===48)pos++;else for(pos++;pos<text.length&&isDigit(text.charCodeAt(pos));)pos++;if(pos<text.length&&text.charCodeAt(pos)===46)if(pos++,pos<text.length&&isDigit(text.charCodeAt(pos)))for(pos++;pos<text.length&&isDigit(text.charCodeAt(pos));)pos++;else return scanError=3,text.substring(start,pos);let end=pos;if(pos<text.length&&(text.charCodeAt(pos)===69||text.charCodeAt(pos)===101))if(pos++,(pos<text.length&&text.charCodeAt(pos)===43||text.charCodeAt(pos)===45)&&pos++,pos<text.length&&isDigit(text.charCodeAt(pos))){for(pos++;pos<text.length&&isDigit(text.charCodeAt(pos));)pos++;end=pos}else scanError=3;return text.substring(start,end)}function scanString(){let result="",start=pos;for(;;){if(pos>=len){result+=text.substring(start,pos),scanError=2;break}let ch=text.charCodeAt(pos);if(ch===34){result+=text.substring(start,pos),pos++;break}if(ch===92){if(result+=text.substring(start,pos),pos++,pos>=len){scanError=2;break}switch(text.charCodeAt(pos++)){case 34:result+='"';break;case 92:result+="\\";break;case 47:result+="/";break;case 98:result+="\b";break;case 102:result+="\f";break;case 110:result+=`
|
|
8
|
+
`;break;case 114:result+="\r";break;case 116:result+=" ";break;case 117:let ch3=scanHexDigits(4,!0);ch3>=0?result+=String.fromCharCode(ch3):scanError=4;break;default:scanError=5}start=pos;continue}if(ch>=0&&ch<=31)if(isLineBreak(ch)){result+=text.substring(start,pos),scanError=2;break}else scanError=6;pos++}return result}function scanNext(){if(value="",scanError=0,tokenOffset=pos,lineStartOffset=lineNumber,prevTokenLineStartOffset=tokenLineStartOffset,pos>=len)return tokenOffset=len,token=17;let code=text.charCodeAt(pos);if(isWhiteSpace(code)){do pos++,value+=String.fromCharCode(code),code=text.charCodeAt(pos);while(isWhiteSpace(code));return token=15}if(isLineBreak(code))return pos++,value+=String.fromCharCode(code),code===13&&text.charCodeAt(pos)===10&&(pos++,value+=`
|
|
9
|
+
`),lineNumber++,tokenLineStartOffset=pos,token=14;switch(code){case 123:return pos++,token=1;case 125:return pos++,token=2;case 91:return pos++,token=3;case 93:return pos++,token=4;case 58:return pos++,token=6;case 44:return pos++,token=5;case 34:return pos++,value=scanString(),token=10;case 47:let start=pos-1;if(text.charCodeAt(pos+1)===47){for(pos+=2;pos<len&&!isLineBreak(text.charCodeAt(pos));)pos++;return value=text.substring(start,pos),token=12}if(text.charCodeAt(pos+1)===42){pos+=2;let safeLength=len-1,commentClosed=!1;for(;pos<safeLength;){let ch=text.charCodeAt(pos);if(ch===42&&text.charCodeAt(pos+1)===47){pos+=2,commentClosed=!0;break}pos++,isLineBreak(ch)&&(ch===13&&text.charCodeAt(pos)===10&&pos++,lineNumber++,tokenLineStartOffset=pos)}return commentClosed||(pos++,scanError=1),value=text.substring(start,pos),token=13}return value+=String.fromCharCode(code),pos++,token=16;case 45:if(value+=String.fromCharCode(code),pos++,pos===len||!isDigit(text.charCodeAt(pos)))return token=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return value+=scanNumber(),token=11;default:for(;pos<len&&isUnknownContentCharacter(code);)pos++,code=text.charCodeAt(pos);if(tokenOffset!==pos){switch(value=text.substring(tokenOffset,pos),value){case"true":return token=8;case"false":return token=9;case"null":return token=7}return token=16}return value+=String.fromCharCode(code),pos++,token=16}}function isUnknownContentCharacter(code){if(isWhiteSpace(code)||isLineBreak(code))return!1;switch(code){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function scanNextNonTrivia(){let result;do result=scanNext();while(result>=12&&result<=15);return result}return{setPosition,getPosition:()=>pos,scan:ignoreTrivia?scanNextNonTrivia:scanNext,getToken:()=>token,getTokenValue:()=>value,getTokenOffset:()=>tokenOffset,getTokenLength:()=>pos-tokenOffset,getTokenStartLine:()=>lineStartOffset,getTokenStartCharacter:()=>tokenOffset-prevTokenLineStartOffset,getTokenError:()=>scanError}}function isWhiteSpace(ch){return ch===32||ch===9}function isLineBreak(ch){return ch===10||ch===13}function isDigit(ch){return ch>=48&&ch<=57}var CharacterCodes,init_scanner=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js"(){"use strict";(function(CharacterCodes2){CharacterCodes2[CharacterCodes2.lineFeed=10]="lineFeed",CharacterCodes2[CharacterCodes2.carriageReturn=13]="carriageReturn",CharacterCodes2[CharacterCodes2.space=32]="space",CharacterCodes2[CharacterCodes2._0=48]="_0",CharacterCodes2[CharacterCodes2._1=49]="_1",CharacterCodes2[CharacterCodes2._2=50]="_2",CharacterCodes2[CharacterCodes2._3=51]="_3",CharacterCodes2[CharacterCodes2._4=52]="_4",CharacterCodes2[CharacterCodes2._5=53]="_5",CharacterCodes2[CharacterCodes2._6=54]="_6",CharacterCodes2[CharacterCodes2._7=55]="_7",CharacterCodes2[CharacterCodes2._8=56]="_8",CharacterCodes2[CharacterCodes2._9=57]="_9",CharacterCodes2[CharacterCodes2.a=97]="a",CharacterCodes2[CharacterCodes2.b=98]="b",CharacterCodes2[CharacterCodes2.c=99]="c",CharacterCodes2[CharacterCodes2.d=100]="d",CharacterCodes2[CharacterCodes2.e=101]="e",CharacterCodes2[CharacterCodes2.f=102]="f",CharacterCodes2[CharacterCodes2.g=103]="g",CharacterCodes2[CharacterCodes2.h=104]="h",CharacterCodes2[CharacterCodes2.i=105]="i",CharacterCodes2[CharacterCodes2.j=106]="j",CharacterCodes2[CharacterCodes2.k=107]="k",CharacterCodes2[CharacterCodes2.l=108]="l",CharacterCodes2[CharacterCodes2.m=109]="m",CharacterCodes2[CharacterCodes2.n=110]="n",CharacterCodes2[CharacterCodes2.o=111]="o",CharacterCodes2[CharacterCodes2.p=112]="p",CharacterCodes2[CharacterCodes2.q=113]="q",CharacterCodes2[CharacterCodes2.r=114]="r",CharacterCodes2[CharacterCodes2.s=115]="s",CharacterCodes2[CharacterCodes2.t=116]="t",CharacterCodes2[CharacterCodes2.u=117]="u",CharacterCodes2[CharacterCodes2.v=118]="v",CharacterCodes2[CharacterCodes2.w=119]="w",CharacterCodes2[CharacterCodes2.x=120]="x",CharacterCodes2[CharacterCodes2.y=121]="y",CharacterCodes2[CharacterCodes2.z=122]="z",CharacterCodes2[CharacterCodes2.A=65]="A",CharacterCodes2[CharacterCodes2.B=66]="B",CharacterCodes2[CharacterCodes2.C=67]="C",CharacterCodes2[CharacterCodes2.D=68]="D",CharacterCodes2[CharacterCodes2.E=69]="E",CharacterCodes2[CharacterCodes2.F=70]="F",CharacterCodes2[CharacterCodes2.G=71]="G",CharacterCodes2[CharacterCodes2.H=72]="H",CharacterCodes2[CharacterCodes2.I=73]="I",CharacterCodes2[CharacterCodes2.J=74]="J",CharacterCodes2[CharacterCodes2.K=75]="K",CharacterCodes2[CharacterCodes2.L=76]="L",CharacterCodes2[CharacterCodes2.M=77]="M",CharacterCodes2[CharacterCodes2.N=78]="N",CharacterCodes2[CharacterCodes2.O=79]="O",CharacterCodes2[CharacterCodes2.P=80]="P",CharacterCodes2[CharacterCodes2.Q=81]="Q",CharacterCodes2[CharacterCodes2.R=82]="R",CharacterCodes2[CharacterCodes2.S=83]="S",CharacterCodes2[CharacterCodes2.T=84]="T",CharacterCodes2[CharacterCodes2.U=85]="U",CharacterCodes2[CharacterCodes2.V=86]="V",CharacterCodes2[CharacterCodes2.W=87]="W",CharacterCodes2[CharacterCodes2.X=88]="X",CharacterCodes2[CharacterCodes2.Y=89]="Y",CharacterCodes2[CharacterCodes2.Z=90]="Z",CharacterCodes2[CharacterCodes2.asterisk=42]="asterisk",CharacterCodes2[CharacterCodes2.backslash=92]="backslash",CharacterCodes2[CharacterCodes2.closeBrace=125]="closeBrace",CharacterCodes2[CharacterCodes2.closeBracket=93]="closeBracket",CharacterCodes2[CharacterCodes2.colon=58]="colon",CharacterCodes2[CharacterCodes2.comma=44]="comma",CharacterCodes2[CharacterCodes2.dot=46]="dot",CharacterCodes2[CharacterCodes2.doubleQuote=34]="doubleQuote",CharacterCodes2[CharacterCodes2.minus=45]="minus",CharacterCodes2[CharacterCodes2.openBrace=123]="openBrace",CharacterCodes2[CharacterCodes2.openBracket=91]="openBracket",CharacterCodes2[CharacterCodes2.plus=43]="plus",CharacterCodes2[CharacterCodes2.slash=47]="slash",CharacterCodes2[CharacterCodes2.formFeed=12]="formFeed",CharacterCodes2[CharacterCodes2.tab=9]="tab"})(CharacterCodes||(CharacterCodes={}))}});var cachedSpaces,maxCachedValues,cachedBreakLinesWithSpaces,supportedEols,init_string_intern=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js"(){cachedSpaces=new Array(20).fill(0).map((_,index)=>" ".repeat(index)),maxCachedValues=200,cachedBreakLinesWithSpaces={" ":{"\n":new Array(maxCachedValues).fill(0).map((_,index)=>`
|
|
10
|
+
`+" ".repeat(index)),"\r":new Array(maxCachedValues).fill(0).map((_,index)=>"\r"+" ".repeat(index)),"\r\n":new Array(maxCachedValues).fill(0).map((_,index)=>`\r
|
|
11
|
+
`+" ".repeat(index))}," ":{"\n":new Array(maxCachedValues).fill(0).map((_,index)=>`
|
|
12
|
+
`+" ".repeat(index)),"\r":new Array(maxCachedValues).fill(0).map((_,index)=>"\r"+" ".repeat(index)),"\r\n":new Array(maxCachedValues).fill(0).map((_,index)=>`\r
|
|
13
|
+
`+" ".repeat(index))}},supportedEols=[`
|
|
14
|
+
`,"\r",`\r
|
|
15
|
+
`]}});function format(documentText,range,options){let initialIndentLevel,formatText,formatTextStart,rangeStart,rangeEnd;if(range){for(rangeStart=range.offset,rangeEnd=rangeStart+range.length,formatTextStart=rangeStart;formatTextStart>0&&!isEOL(documentText,formatTextStart-1);)formatTextStart--;let endOffset=rangeEnd;for(;endOffset<documentText.length&&!isEOL(documentText,endOffset);)endOffset++;formatText=documentText.substring(formatTextStart,endOffset),initialIndentLevel=computeIndentLevel(formatText,options)}else formatText=documentText,initialIndentLevel=0,formatTextStart=0,rangeStart=0,rangeEnd=documentText.length;let eol=getEOL(options,documentText),eolFastPathSupported=supportedEols.includes(eol),numberLineBreaks=0,indentLevel=0,indentValue;options.insertSpaces?indentValue=cachedSpaces[options.tabSize||4]??repeat(cachedSpaces[1],options.tabSize||4):indentValue=" ";let indentType=indentValue===" "?" ":" ",scanner=createScanner(formatText,!1),hasError=!1;function newLinesAndIndent(){if(numberLineBreaks>1)return repeat(eol,numberLineBreaks)+repeat(indentValue,initialIndentLevel+indentLevel);let amountOfSpaces=indentValue.length*(initialIndentLevel+indentLevel);return!eolFastPathSupported||amountOfSpaces>cachedBreakLinesWithSpaces[indentType][eol].length?eol+repeat(indentValue,initialIndentLevel+indentLevel):amountOfSpaces<=0?eol:cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces]}function scanNext(){let token=scanner.scan();for(numberLineBreaks=0;token===15||token===14;)token===14&&options.keepLines?numberLineBreaks+=1:token===14&&(numberLineBreaks=1),token=scanner.scan();return hasError=token===16||scanner.getTokenError()!==0,token}let editOperations=[];function addEdit(text,startOffset,endOffset){!hasError&&(!range||startOffset<rangeEnd&&endOffset>rangeStart)&&documentText.substring(startOffset,endOffset)!==text&&editOperations.push({offset:startOffset,length:endOffset-startOffset,content:text})}let firstToken=scanNext();if(options.keepLines&&numberLineBreaks>0&&addEdit(repeat(eol,numberLineBreaks),0,0),firstToken!==17){let firstTokenStart=scanner.getTokenOffset()+formatTextStart,initialIndent=indentValue.length*initialIndentLevel<20&&options.insertSpaces?cachedSpaces[indentValue.length*initialIndentLevel]:repeat(indentValue,initialIndentLevel);addEdit(initialIndent,formatTextStart,firstTokenStart)}for(;firstToken!==17;){let firstTokenEnd=scanner.getTokenOffset()+scanner.getTokenLength()+formatTextStart,secondToken=scanNext(),replaceContent="",needsLineBreak=!1;for(;numberLineBreaks===0&&(secondToken===12||secondToken===13);){let commentTokenStart=scanner.getTokenOffset()+formatTextStart;addEdit(cachedSpaces[1],firstTokenEnd,commentTokenStart),firstTokenEnd=scanner.getTokenOffset()+scanner.getTokenLength()+formatTextStart,needsLineBreak=secondToken===12,replaceContent=needsLineBreak?newLinesAndIndent():"",secondToken=scanNext()}if(secondToken===2)firstToken!==1&&indentLevel--,options.keepLines&&numberLineBreaks>0||!options.keepLines&&firstToken!==1?replaceContent=newLinesAndIndent():options.keepLines&&(replaceContent=cachedSpaces[1]);else if(secondToken===4)firstToken!==3&&indentLevel--,options.keepLines&&numberLineBreaks>0||!options.keepLines&&firstToken!==3?replaceContent=newLinesAndIndent():options.keepLines&&(replaceContent=cachedSpaces[1]);else{switch(firstToken){case 3:case 1:indentLevel++,options.keepLines&&numberLineBreaks>0||!options.keepLines?replaceContent=newLinesAndIndent():replaceContent=cachedSpaces[1];break;case 5:options.keepLines&&numberLineBreaks>0||!options.keepLines?replaceContent=newLinesAndIndent():replaceContent=cachedSpaces[1];break;case 12:replaceContent=newLinesAndIndent();break;case 13:numberLineBreaks>0?replaceContent=newLinesAndIndent():needsLineBreak||(replaceContent=cachedSpaces[1]);break;case 6:options.keepLines&&numberLineBreaks>0?replaceContent=newLinesAndIndent():needsLineBreak||(replaceContent=cachedSpaces[1]);break;case 10:options.keepLines&&numberLineBreaks>0?replaceContent=newLinesAndIndent():secondToken===6&&!needsLineBreak&&(replaceContent="");break;case 7:case 8:case 9:case 11:case 2:case 4:options.keepLines&&numberLineBreaks>0?replaceContent=newLinesAndIndent():(secondToken===12||secondToken===13)&&!needsLineBreak?replaceContent=cachedSpaces[1]:secondToken!==5&&secondToken!==17&&(hasError=!0);break;case 16:hasError=!0;break}numberLineBreaks>0&&(secondToken===12||secondToken===13)&&(replaceContent=newLinesAndIndent())}secondToken===17&&(options.keepLines&&numberLineBreaks>0?replaceContent=newLinesAndIndent():replaceContent=options.insertFinalNewline?eol:"");let secondTokenStart=scanner.getTokenOffset()+formatTextStart;addEdit(replaceContent,firstTokenEnd,secondTokenStart),firstToken=secondToken}return editOperations}function repeat(s,count){let result="";for(let i=0;i<count;i++)result+=s;return result}function computeIndentLevel(content,options){let i=0,nChars=0,tabSize=options.tabSize||4;for(;i<content.length;){let ch=content.charAt(i);if(ch===cachedSpaces[1])nChars++;else if(ch===" ")nChars+=tabSize;else break;i++}return Math.floor(nChars/tabSize)}function getEOL(options,text){for(let i=0;i<text.length;i++){let ch=text.charAt(i);if(ch==="\r")return i+1<text.length&&text.charAt(i+1)===`
|
|
16
|
+
`?`\r
|
|
17
|
+
`:"\r";if(ch===`
|
|
18
|
+
`)return`
|
|
19
|
+
`}return options&&options.eol||`
|
|
20
|
+
`}function isEOL(text,offset){return`\r
|
|
21
|
+
`.indexOf(text.charAt(offset))!==-1}var init_format=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js"(){"use strict";init_scanner();init_string_intern()}});function parse(text,errors=[],options=ParseOptions.DEFAULT){let currentProperty=null,currentParent=[],previousParents=[];function onValue(value){Array.isArray(currentParent)?currentParent.push(value):currentProperty!==null&&(currentParent[currentProperty]=value)}return visit(text,{onObjectBegin:()=>{let object={};onValue(object),previousParents.push(currentParent),currentParent=object,currentProperty=null},onObjectProperty:name=>{currentProperty=name},onObjectEnd:()=>{currentParent=previousParents.pop()},onArrayBegin:()=>{let array=[];onValue(array),previousParents.push(currentParent),currentParent=array,currentProperty=null},onArrayEnd:()=>{currentParent=previousParents.pop()},onLiteralValue:onValue,onError:(error,offset,length)=>{errors.push({error,offset,length})}},options),currentParent[0]}function parseTree(text,errors=[],options=ParseOptions.DEFAULT){let currentParent={type:"array",offset:-1,length:-1,children:[],parent:void 0};function ensurePropertyComplete(endOffset){currentParent.type==="property"&&(currentParent.length=endOffset-currentParent.offset,currentParent=currentParent.parent)}function onValue(valueNode){return currentParent.children.push(valueNode),valueNode}visit(text,{onObjectBegin:offset=>{currentParent=onValue({type:"object",offset,length:-1,parent:currentParent,children:[]})},onObjectProperty:(name,offset,length)=>{currentParent=onValue({type:"property",offset,length:-1,parent:currentParent,children:[]}),currentParent.children.push({type:"string",value:name,offset,length,parent:currentParent})},onObjectEnd:(offset,length)=>{ensurePropertyComplete(offset+length),currentParent.length=offset+length-currentParent.offset,currentParent=currentParent.parent,ensurePropertyComplete(offset+length)},onArrayBegin:(offset,length)=>{currentParent=onValue({type:"array",offset,length:-1,parent:currentParent,children:[]})},onArrayEnd:(offset,length)=>{currentParent.length=offset+length-currentParent.offset,currentParent=currentParent.parent,ensurePropertyComplete(offset+length)},onLiteralValue:(value,offset,length)=>{onValue({type:getNodeType(value),offset,length,parent:currentParent,value}),ensurePropertyComplete(offset+length)},onSeparator:(sep,offset,length)=>{currentParent.type==="property"&&(sep===":"?currentParent.colonOffset=offset:sep===","&&ensurePropertyComplete(offset))},onError:(error,offset,length)=>{errors.push({error,offset,length})}},options);let result=currentParent.children[0];return result&&delete result.parent,result}function findNodeAtLocation(root,path){if(!root)return;let node=root;for(let segment of path)if(typeof segment=="string"){if(node.type!=="object"||!Array.isArray(node.children))return;let found=!1;for(let propertyNode of node.children)if(Array.isArray(propertyNode.children)&&propertyNode.children[0].value===segment&&propertyNode.children.length===2){node=propertyNode.children[1],found=!0;break}if(!found)return}else{let index=segment;if(node.type!=="array"||index<0||!Array.isArray(node.children)||index>=node.children.length)return;node=node.children[index]}return node}function visit(text,visitor,options=ParseOptions.DEFAULT){let _scanner=createScanner(text,!1),_jsonPath=[],suppressedCallbacks=0;function toNoArgVisit(visitFunction){return visitFunction?()=>suppressedCallbacks===0&&visitFunction(_scanner.getTokenOffset(),_scanner.getTokenLength(),_scanner.getTokenStartLine(),_scanner.getTokenStartCharacter()):()=>!0}function toOneArgVisit(visitFunction){return visitFunction?arg=>suppressedCallbacks===0&&visitFunction(arg,_scanner.getTokenOffset(),_scanner.getTokenLength(),_scanner.getTokenStartLine(),_scanner.getTokenStartCharacter()):()=>!0}function toOneArgVisitWithPath(visitFunction){return visitFunction?arg=>suppressedCallbacks===0&&visitFunction(arg,_scanner.getTokenOffset(),_scanner.getTokenLength(),_scanner.getTokenStartLine(),_scanner.getTokenStartCharacter(),()=>_jsonPath.slice()):()=>!0}function toBeginVisit(visitFunction){return visitFunction?()=>{suppressedCallbacks>0?suppressedCallbacks++:visitFunction(_scanner.getTokenOffset(),_scanner.getTokenLength(),_scanner.getTokenStartLine(),_scanner.getTokenStartCharacter(),()=>_jsonPath.slice())===!1&&(suppressedCallbacks=1)}:()=>!0}function toEndVisit(visitFunction){return visitFunction?()=>{suppressedCallbacks>0&&suppressedCallbacks--,suppressedCallbacks===0&&visitFunction(_scanner.getTokenOffset(),_scanner.getTokenLength(),_scanner.getTokenStartLine(),_scanner.getTokenStartCharacter())}:()=>!0}let onObjectBegin=toBeginVisit(visitor.onObjectBegin),onObjectProperty=toOneArgVisitWithPath(visitor.onObjectProperty),onObjectEnd=toEndVisit(visitor.onObjectEnd),onArrayBegin=toBeginVisit(visitor.onArrayBegin),onArrayEnd=toEndVisit(visitor.onArrayEnd),onLiteralValue=toOneArgVisitWithPath(visitor.onLiteralValue),onSeparator=toOneArgVisit(visitor.onSeparator),onComment=toNoArgVisit(visitor.onComment),onError=toOneArgVisit(visitor.onError),disallowComments=options&&options.disallowComments,allowTrailingComma=options&&options.allowTrailingComma;function scanNext(){for(;;){let token=_scanner.scan();switch(_scanner.getTokenError()){case 4:handleError(14);break;case 5:handleError(15);break;case 3:handleError(13);break;case 1:disallowComments||handleError(11);break;case 2:handleError(12);break;case 6:handleError(16);break}switch(token){case 12:case 13:disallowComments?handleError(10):onComment();break;case 16:handleError(1);break;case 15:case 14:break;default:return token}}}function handleError(error,skipUntilAfter=[],skipUntil=[]){if(onError(error),skipUntilAfter.length+skipUntil.length>0){let token=_scanner.getToken();for(;token!==17;){if(skipUntilAfter.indexOf(token)!==-1){scanNext();break}else if(skipUntil.indexOf(token)!==-1)break;token=scanNext()}}}function parseString(isValue){let value=_scanner.getTokenValue();return isValue?onLiteralValue(value):(onObjectProperty(value),_jsonPath.push(value)),scanNext(),!0}function parseLiteral(){switch(_scanner.getToken()){case 11:let tokenValue=_scanner.getTokenValue(),value=Number(tokenValue);isNaN(value)&&(handleError(2),value=0),onLiteralValue(value);break;case 7:onLiteralValue(null);break;case 8:onLiteralValue(!0);break;case 9:onLiteralValue(!1);break;default:return!1}return scanNext(),!0}function parseProperty(){return _scanner.getToken()!==10?(handleError(3,[],[2,5]),!1):(parseString(!1),_scanner.getToken()===6?(onSeparator(":"),scanNext(),parseValue()||handleError(4,[],[2,5])):handleError(5,[],[2,5]),_jsonPath.pop(),!0)}function parseObject(){onObjectBegin(),scanNext();let needsComma=!1;for(;_scanner.getToken()!==2&&_scanner.getToken()!==17;){if(_scanner.getToken()===5){if(needsComma||handleError(4,[],[]),onSeparator(","),scanNext(),_scanner.getToken()===2&&allowTrailingComma)break}else needsComma&&handleError(6,[],[]);parseProperty()||handleError(4,[],[2,5]),needsComma=!0}return onObjectEnd(),_scanner.getToken()!==2?handleError(7,[2],[]):scanNext(),!0}function parseArray(){onArrayBegin(),scanNext();let isFirstElement=!0,needsComma=!1;for(;_scanner.getToken()!==4&&_scanner.getToken()!==17;){if(_scanner.getToken()===5){if(needsComma||handleError(4,[],[]),onSeparator(","),scanNext(),_scanner.getToken()===4&&allowTrailingComma)break}else needsComma&&handleError(6,[],[]);isFirstElement?(_jsonPath.push(0),isFirstElement=!1):_jsonPath[_jsonPath.length-1]++,parseValue()||handleError(4,[],[4,5]),needsComma=!0}return onArrayEnd(),isFirstElement||_jsonPath.pop(),_scanner.getToken()!==4?handleError(8,[4],[]):scanNext(),!0}function parseValue(){switch(_scanner.getToken()){case 3:return parseArray();case 1:return parseObject();case 10:return parseString(!0);default:return parseLiteral()}}return scanNext(),_scanner.getToken()===17?options.allowEmptyContent?!0:(handleError(4,[],[]),!1):parseValue()?(_scanner.getToken()!==17&&handleError(9,[],[]),!0):(handleError(4,[],[]),!1)}function getNodeType(value){switch(typeof value){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(value){if(Array.isArray(value))return"array"}else return"null";return"object"}default:return"null"}}var ParseOptions,init_parser=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js"(){"use strict";init_scanner();(function(ParseOptions2){ParseOptions2.DEFAULT={allowTrailingComma:!1}})(ParseOptions||(ParseOptions={}))}});function setProperty(text,originalPath,value,options){let path=originalPath.slice(),root=parseTree(text,[]),parent,lastSegment;for(;path.length>0&&(lastSegment=path.pop(),parent=findNodeAtLocation(root,path),parent===void 0&&value!==void 0);)typeof lastSegment=="string"?value={[lastSegment]:value}:value=[value];if(parent)if(parent.type==="object"&&typeof lastSegment=="string"&&Array.isArray(parent.children)){let existing=findNodeAtLocation(parent,[lastSegment]);if(existing!==void 0)if(value===void 0){if(!existing.parent)throw new Error("Malformed AST");let propertyIndex=parent.children.indexOf(existing.parent),removeBegin,removeEnd=existing.parent.offset+existing.parent.length;if(propertyIndex>0){let previous=parent.children[propertyIndex-1];removeBegin=previous.offset+previous.length}else removeBegin=parent.offset+1,parent.children.length>1&&(removeEnd=parent.children[1].offset);return withFormatting(text,{offset:removeBegin,length:removeEnd-removeBegin,content:""},options)}else return withFormatting(text,{offset:existing.offset,length:existing.length,content:JSON.stringify(value)},options);else{if(value===void 0)return[];let newProperty=`${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`,index=options.getInsertionIndex?options.getInsertionIndex(parent.children.map(p=>p.children[0].value)):parent.children.length,edit;if(index>0){let previous=parent.children[index-1];edit={offset:previous.offset+previous.length,length:0,content:","+newProperty}}else parent.children.length===0?edit={offset:parent.offset+1,length:0,content:newProperty}:edit={offset:parent.offset+1,length:0,content:newProperty+","};return withFormatting(text,edit,options)}}else if(parent.type==="array"&&typeof lastSegment=="number"&&Array.isArray(parent.children)){let insertIndex=lastSegment;if(insertIndex===-1){let newProperty=`${JSON.stringify(value)}`,edit;if(parent.children.length===0)edit={offset:parent.offset+1,length:0,content:newProperty};else{let previous=parent.children[parent.children.length-1];edit={offset:previous.offset+previous.length,length:0,content:","+newProperty}}return withFormatting(text,edit,options)}else if(value===void 0&&parent.children.length>=0){let removalIndex=lastSegment,toRemove=parent.children[removalIndex],edit;if(parent.children.length===1)edit={offset:parent.offset+1,length:parent.length-2,content:""};else if(parent.children.length-1===removalIndex){let previous=parent.children[removalIndex-1],offset=previous.offset+previous.length,parentEndOffset=parent.offset+parent.length;edit={offset,length:parentEndOffset-2-offset,content:""}}else edit={offset:toRemove.offset,length:parent.children[removalIndex+1].offset-toRemove.offset,content:""};return withFormatting(text,edit,options)}else if(value!==void 0){let edit,newProperty=`${JSON.stringify(value)}`;if(!options.isArrayInsertion&&parent.children.length>lastSegment){let toModify=parent.children[lastSegment];edit={offset:toModify.offset,length:toModify.length,content:newProperty}}else if(parent.children.length===0||lastSegment===0)edit={offset:parent.offset+1,length:0,content:parent.children.length===0?newProperty:newProperty+","};else{let index=lastSegment>parent.children.length?parent.children.length:lastSegment,previous=parent.children[index-1];edit={offset:previous.offset+previous.length,length:0,content:","+newProperty}}return withFormatting(text,edit,options)}else throw new Error(`Can not ${value===void 0?"remove":options.isArrayInsertion?"insert":"modify"} Array index ${insertIndex} as length is not sufficient`)}else throw new Error(`Can not add ${typeof lastSegment!="number"?"index":"property"} to parent of type ${parent.type}`);else{if(value===void 0)throw new Error("Can not delete in empty document");return withFormatting(text,{offset:root?root.offset:0,length:root?root.length:0,content:JSON.stringify(value)},options)}}function withFormatting(text,edit,options){if(!options.formattingOptions)return[edit];let newText=applyEdit(text,edit),begin=edit.offset,end=edit.offset+edit.content.length;if(edit.length===0||edit.content.length===0){for(;begin>0&&!isEOL(newText,begin-1);)begin--;for(;end<newText.length&&!isEOL(newText,end);)end++}let edits=format(newText,{offset:begin,length:end-begin},{...options.formattingOptions,keepLines:!1});for(let i=edits.length-1;i>=0;i--){let edit2=edits[i];newText=applyEdit(newText,edit2),begin=Math.min(begin,edit2.offset),end=Math.max(end,edit2.offset+edit2.length),end+=edit2.content.length-edit2.length}let editLength=text.length-(newText.length-end)-begin;return[{offset:begin,length:editLength,content:newText.substring(begin,end)}]}function applyEdit(text,edit){return text.substring(0,edit.offset)+edit.content+text.substring(edit.offset+edit.length)}var init_edit=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js"(){"use strict";init_format();init_parser()}});function printParseErrorCode(code){switch(code){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function modify(text,path,value,options){return setProperty(text,path,value,options)}function applyEdits(text,edits){let sortedEdits=edits.slice(0).sort((a,b)=>{let diff=a.offset-b.offset;return diff===0?a.length-b.length:diff}),lastModifiedOffset=text.length;for(let i=sortedEdits.length-1;i>=0;i--){let e=sortedEdits[i];if(e.offset+e.length<=lastModifiedOffset)text=applyEdit(text,e);else throw new Error("Overlapping edit");lastModifiedOffset=e.offset}return text}var ScanError,SyntaxKind,parse2,parseTree2,findNodeAtLocation2,ParseErrorCode,init_main=__esm({"../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js"(){"use strict";init_format();init_edit();init_scanner();init_parser();(function(ScanError2){ScanError2[ScanError2.None=0]="None",ScanError2[ScanError2.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",ScanError2[ScanError2.UnexpectedEndOfString=2]="UnexpectedEndOfString",ScanError2[ScanError2.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",ScanError2[ScanError2.InvalidUnicode=4]="InvalidUnicode",ScanError2[ScanError2.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",ScanError2[ScanError2.InvalidCharacter=6]="InvalidCharacter"})(ScanError||(ScanError={}));(function(SyntaxKind2){SyntaxKind2[SyntaxKind2.OpenBraceToken=1]="OpenBraceToken",SyntaxKind2[SyntaxKind2.CloseBraceToken=2]="CloseBraceToken",SyntaxKind2[SyntaxKind2.OpenBracketToken=3]="OpenBracketToken",SyntaxKind2[SyntaxKind2.CloseBracketToken=4]="CloseBracketToken",SyntaxKind2[SyntaxKind2.CommaToken=5]="CommaToken",SyntaxKind2[SyntaxKind2.ColonToken=6]="ColonToken",SyntaxKind2[SyntaxKind2.NullKeyword=7]="NullKeyword",SyntaxKind2[SyntaxKind2.TrueKeyword=8]="TrueKeyword",SyntaxKind2[SyntaxKind2.FalseKeyword=9]="FalseKeyword",SyntaxKind2[SyntaxKind2.StringLiteral=10]="StringLiteral",SyntaxKind2[SyntaxKind2.NumericLiteral=11]="NumericLiteral",SyntaxKind2[SyntaxKind2.LineCommentTrivia=12]="LineCommentTrivia",SyntaxKind2[SyntaxKind2.BlockCommentTrivia=13]="BlockCommentTrivia",SyntaxKind2[SyntaxKind2.LineBreakTrivia=14]="LineBreakTrivia",SyntaxKind2[SyntaxKind2.Trivia=15]="Trivia",SyntaxKind2[SyntaxKind2.Unknown=16]="Unknown",SyntaxKind2[SyntaxKind2.EOF=17]="EOF"})(SyntaxKind||(SyntaxKind={}));parse2=parse,parseTree2=parseTree,findNodeAtLocation2=findNodeAtLocation;(function(ParseErrorCode2){ParseErrorCode2[ParseErrorCode2.InvalidSymbol=1]="InvalidSymbol",ParseErrorCode2[ParseErrorCode2.InvalidNumberFormat=2]="InvalidNumberFormat",ParseErrorCode2[ParseErrorCode2.PropertyNameExpected=3]="PropertyNameExpected",ParseErrorCode2[ParseErrorCode2.ValueExpected=4]="ValueExpected",ParseErrorCode2[ParseErrorCode2.ColonExpected=5]="ColonExpected",ParseErrorCode2[ParseErrorCode2.CommaExpected=6]="CommaExpected",ParseErrorCode2[ParseErrorCode2.CloseBraceExpected=7]="CloseBraceExpected",ParseErrorCode2[ParseErrorCode2.CloseBracketExpected=8]="CloseBracketExpected",ParseErrorCode2[ParseErrorCode2.EndOfFileExpected=9]="EndOfFileExpected",ParseErrorCode2[ParseErrorCode2.InvalidCommentToken=10]="InvalidCommentToken",ParseErrorCode2[ParseErrorCode2.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",ParseErrorCode2[ParseErrorCode2.UnexpectedEndOfString=12]="UnexpectedEndOfString",ParseErrorCode2[ParseErrorCode2.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",ParseErrorCode2[ParseErrorCode2.InvalidUnicode=14]="InvalidUnicode",ParseErrorCode2[ParseErrorCode2.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",ParseErrorCode2[ParseErrorCode2.InvalidCharacter=16]="InvalidCharacter"})(ParseErrorCode||(ParseErrorCode={}))}});export{parse2 as parse,parseTree2 as parseTree,findNodeAtLocation2 as findNodeAtLocation,printParseErrorCode,modify,applyEdits,init_main};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../../node_modules/.pnpm/async-listen@3.0.0/node_modules/async-listen/dist/index.js"(exports){"use strict";var __awaiter=exports&&exports.__awaiter||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator.throw(value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0});exports.listen=void 0;var http=__require("http"),https=__require("https"),path_1=__require("path"),events_1=__require("events"),getProtocol=server=>{if(typeof server.protocol=="string")return server.protocol;if(server instanceof http.Server)return"http";if(server instanceof https.Server)return"https"};function listen(server,...args){return __awaiter(this,void 0,void 0,function*(){server.listen(...args,()=>{}),yield(0,events_1.once)(server,"listening");let addressInfo=server.address();if(!addressInfo)throw new Error("Server not listening");let host,protocol=getProtocol(server);if(typeof addressInfo=="string")host=encodeURIComponent((0,path_1.resolve)(addressInfo)),protocol?protocol+="+unix":protocol="unix";else{let{address,port,family}=addressInfo;host=family==="IPv6"?`[${address}]`:address,host+=`:${port}`,protocol||(protocol="tcp")}return new URL(`${protocol}://${host}`)})}exports.listen=listen;exports.default=listen}});export{require_dist};
|
|
@@ -0,0 +1,8 @@
|
|
|
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{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../../node_modules/.pnpm/@next+env@11.1.2/node_modules/@next/env/dist/index.js"(exports,module){module.exports=function(n,r){"use strict";var e={};function __webpack_require__(r2){if(e[r2])return e[r2].exports;var t=e[r2]={i:r2,l:!1,exports:{}};return n[r2].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(903)}return r(__webpack_require__),startup()}({148:function(n){"use strict";var r=function(n2){var r2=n2.ignoreProcessEnv?{}:process.env,e=function(t2){var o2=t2.match(/(.?\${?(?:[a-zA-Z0-9_]+)?}?)/g)||[];return o2.reduce(function(t3,o3){var c2=/(.?)\${?([a-zA-Z0-9_]+)?}?/g.exec(o3),s=c2[1],i,f;if(s==="\\")f=c2[0],i=f.replace("\\$","$");else{var p=c2[2];f=c2[0].substring(s.length),i=r2.hasOwnProperty(p)?r2[p]:n2.parsed[p]||"",i=e(i)}return t3.replace(f,i)},t2)};for(var t in n2.parsed){var o=r2.hasOwnProperty(t)?r2[t]:n2.parsed[t];n2.parsed[t]=e(o)}for(var c in n2.parsed)r2[c]=n2.parsed[c];return n2};n.exports=r},548:function(n,r,e){let t=e(747),o=e(622);function log(n2){console.log(`[dotenv][DEBUG] ${n2}`)}let c=`
|
|
8
|
+
`,s=/^\s*([\w.-]+)\s*=\s*(.*)?\s*$/,i=/\\n/g,f=/\n|\r|\r\n/;function parse(n2,r2){let e2=!!(r2&&r2.debug),t2={};return n2.toString().split(f).forEach(function(n3,r3){let o2=n3.match(s);if(o2!=null){let n4=o2[1],r4=o2[2]||"",e3=r4.length-1,s2=r4[0]==='"'&&r4[e3]==='"';r4[0]==="'"&&r4[e3]==="'"||s2?(r4=r4.substring(1,e3),s2&&(r4=r4.replace(i,c))):r4=r4.trim(),t2[n4]=r4}else e2&&log(`did not match key and value when parsing line ${r3+1}: ${n3}`)}),t2}function config(n2){let r2=o.resolve(process.cwd(),".env"),e2="utf8",c2=!1;n2&&(n2.path!=null&&(r2=n2.path),n2.encoding!=null&&(e2=n2.encoding),n2.debug!=null&&(c2=!0));try{let n3=parse(t.readFileSync(r2,{encoding:e2}),{debug:c2});return Object.keys(n3).forEach(function(r3){Object.prototype.hasOwnProperty.call(process.env,r3)?c2&&log(`"${r3}" is already defined in \`process.env\` and will not be overwritten`):process.env[r3]=n3[r3]}),{parsed:n3}}catch(n3){return{error:n3}}}n.exports.config=config,n.exports.parse=parse},622:function(n){n.exports=__require("path")},747:function(n){n.exports=__require("fs")},903:function(n,r,e){"use strict";e.r(r),e.d(r,"processEnv",function(){return processEnv}),e.d(r,"loadEnvConfig",function(){return loadEnvConfig});var t=e(747),o=e.n(t),c=e(622),s=e.n(c),i=e(548),f=e.n(i),p=e(148),u=e.n(p);let a,d=[];function processEnv(n2,r2,e2=console){var t2;if(process.env.__NEXT_PROCESSED_ENV||n2.length===0)return process.env;process.env.__NEXT_PROCESSED_ENV="true";let o2=Object.assign({},process.env),s2={};for(let f2 of n2)try{let n3={};n3.parsed=i.parse(f2.contents),n3=u()(n3),n3.parsed&&e2.info(`Loaded env from ${c.join(r2||"",f2.path)}`);for(let r3 of Object.keys(n3.parsed||{}))typeof s2[r3]>"u"&&typeof o2[r3]>"u"&&(s2[r3]=(t2=n3.parsed)===null||t2===void 0?void 0:t2[r3])}catch(n3){e2.error(`Failed to load env from ${c.join(r2||"",f2.path)}`,n3)}return Object.assign(process.env,s2)}function loadEnvConfig(n2,r2,e2=console){if(a)return{combinedEnv:a,loadedEnvFiles:d};let s2=process.env.NODE_ENV==="test"?"test":r2?"development":"production",i2=[`.env.${s2}.local`,s2!=="test"&&".env.local",`.env.${s2}`,".env"].filter(Boolean);for(let r3 of i2){let o3=c.join(n2,r3);try{if(!t.statSync(o3).isFile())continue;let c2=t.readFileSync(o3,"utf8");d.push({path:r3,contents:c2})}catch(n3){n3.code!=="ENOENT"&&e2.error(`Failed to load env from ${r3}`,n3)}}return a=processEnv(d,n2,e2),{combinedEnv:a,loadedEnvFiles:d}}}},function(n){"use strict";(function(){n.r=function(n2){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(n2,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n2,"__esModule",{value:!0})}})(),function(){n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,"a",e),e}}(),function(){var r=Object.prototype.hasOwnProperty;n.d=function(n2,e,t){r.call(n2,e)||Object.defineProperty(n2,e,{enumerable:!0,get:t})}}()})}});export{require_dist};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{pkg_default}from"./chunk-OO572JUC.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_lower_case=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/lower-case.js"(exports,module){var conjunctions=["for","and","nor","but","or","yet","so"],articles=["a","an","the"],prepositions=["aboard","about","above","across","after","against","along","amid","among","anti","around","as","at","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","considering","despite","down","during","except","excepting","excluding","following","for","from","in","inside","into","like","minus","near","of","off","on","onto","opposite","over","past","per","plus","regarding","round","save","since","than","through","to","toward","towards","under","underneath","unlike","until","up","upon","versus","via","with","within","without"];module.exports=new Set([...conjunctions,...articles,...prepositions])}});var require_specials=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/specials.js"(exports,module){var intended=["ZEIT","ZEIT Inc.","CLI","API","HTTP","HTTPS","JSX","DNS","URL","now.sh","now.json","CI","CDN","package.json","GitHub","CSS","JS","HTML","WordPress","JavaScript","Next.js","Node.js"];module.exports=intended}});var require_lib=__commonJS({"../../node_modules/.pnpm/title@3.4.1/node_modules/title/lib/index.js"(exports,module){var lowerCase=require_lower_case(),specials=require_specials(),regex=/(?:(?:(\s?(?:^|[.\(\)!?;:"-])\s*)(\w))|(\w))(\w*[’']*\w*)/g,convertToRegExp=specials2=>specials2.map(s=>[new RegExp(`\\b${s}\\b`,"gi"),s]);function parseMatch(match){let firstCharacter=match[0];return/\s/.test(firstCharacter)?match.substr(1):/[\(\)]/.test(firstCharacter)?null:match}module.exports=(str,options={})=>{str=str.toLowerCase().replace(regex,(m,lead="",forced,lower,rest)=>{let parsedMatch=parseMatch(m);if(!parsedMatch)return m;if(!forced){let fullLower=lower+rest;if(lowerCase.has(fullLower))return parsedMatch}return lead+(lower||forced).toUpperCase()+rest});let customSpecials=options.special||[],replace=[...specials,...customSpecials];return convertToRegExp(replace).forEach(([pattern,s])=>{str=str.replace(pattern,s)}),str}}});var import_chalk=__toESM(require_source(),1);function cmd(text){return`${import_chalk.default.gray("`")}${import_chalk.default.cyan(text)}${import_chalk.default.gray("`")}`}var import_title=__toESM(require_lib(),1);var packageName=pkg_default.name;function getTitleName(){return(0,import_title.default)(packageName)}function getCommandName(subcommands){let vercel=packageName;return subcommands&&(vercel=`${vercel} ${subcommands}`),cmd(vercel)}function getCommandNamePlain(subcommands){return subcommands?`${packageName} ${subcommands}`:packageName}export{require_lib,cmd,packageName,getTitleName,getCommandName,getCommandNamePlain};
|
|
@@ -0,0 +1,7 @@
|
|
|
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{STANDARD_ENVIRONMENTS}from"./chunk-7YKFF6CE.js";import{require_lib}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_title=__toESM(require_lib(),1);function formatEnvironment(orgSlug,projectSlug,environment){let projectUrl=`https://vercel.com/${orgSlug}/${projectSlug}`,boldName=import_chalk.default.bold(STANDARD_ENVIRONMENTS.includes(environment.slug)?(0,import_title.default)(environment.slug):environment.slug);return output_manager_default.link(boldName,`${projectUrl}/settings/environments/${environment.slug}`,{fallback:()=>boldName,color:!1})}export{formatEnvironment};
|
|
@@ -0,0 +1,8 @@
|
|
|
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{noBorderChars,require_cli_table3}from"./chunk-773GOZIR.js";import{require_dist}from"./chunk-PUKYAALC.js";import{getShortFlags,globalCommandOptions}from"./chunk-AWMQGOS2.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1),import_constants=__toESM(require_dist(),1),import_cli_table3=__toESM(require_cli_table3(),1);var INDENT=" ".repeat(2),NEWLINE=`
|
|
8
|
+
`,tableOptions={chars:noBorderChars,style:{"padding-left":0,"padding-right":0}};function wordWrap(text,maxWidth){let _tableOptions=Object.assign({},tableOptions,{colWidths:[maxWidth],style:{"padding-left":INDENT.length}}),table=new import_cli_table3.default(_tableOptions);return table.push([{content:text,wordWrap:!0}]),table.toString()}function lineToString(line){let string="";for(let i=0;i<line.length;i++)if(i===line.length-1)string+=line[i];else{let curr=line[i],next=line[i+1];string+=curr,curr.trim()!==""&&next.trim()!==""&&(string+=" ")}return string}function outputArrayToString(outputArray){return outputArray.filter(line=>line!==null).join(NEWLINE)}var commandPaths=new WeakMap;function registerCommandPaths(roots){let visit=(command,parentPath)=>{let path=[...parentPath,command.name];commandPaths.has(command)||commandPaths.set(command,path);for(let subcommand of command.subcommands??[])visit(subcommand,path)};for(let root of roots)visit(root,[])}function getCommandPath(command,parent){let registered=commandPaths.get(command);return registered||(parent?[parent.name,command.name]:[command.name])}function buildCommandSynopsisLine(command,parent){let line=[INDENT,import_constants.LOGO,import_chalk.default.bold(import_constants.NAME)];for(let name of getCommandPath(command,parent))line.push(import_chalk.default.bold(name));let args=command.arguments.slice(0);if(args.length===0&&command.subcommands&&command.subcommands.length>0&&args.push({name:"command",required:!command.subcommands.some(subcommand=>subcommand.default)}),args.length>0)for(let argument of args){let{name}=argument;argument.multiple&&(name+=" ..."),line.push(argument.required?name:`[${name}]`)}return command.options.length>0&&line.push("[options]"),line.push(NEWLINE),lineToString(line)}function buildCommandOptionLines(commandOptions,options,sectionTitle){let filteredCommandOptions=commandOptions.filter(option=>!option.deprecated&&option.description!==void 0);if(filteredCommandOptions.length===0)return null;filteredCommandOptions.sort((a,b)=>a.name<b.name?-1:a.name>b.name?1:0);let maxWidthOfUnwrappedColumns=0,rows=[];for(let option of filteredCommandOptions){let shorthandCell=option.shorthand?`${INDENT}-${option.shorthand},`:"",longhandCell=`${INDENT}--${option.name}`;option.argument&&(longhandCell+=` <${option.argument}>`),longhandCell+=INDENT;let widthOfUnwrappedColumns=shorthandCell.length+longhandCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([shorthandCell,longhandCell,{content:option.description,wordWrap:!0}])}let finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return table.push(...rows),[`${INDENT}${import_chalk.default.dim(sectionTitle)}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join("")}function buildSubcommandLines(subcommands,options,title="Commands"){if(!subcommands)return null;let maxWidthOfUnwrappedColumns=0,rows=[];for(let command of subcommands){if(command.hidden)continue;let nameCell=`${INDENT}${command.name}`,argsCell=INDENT;argsCell+=command.arguments.map(arg=>arg.required?arg.name:`[${arg.name}]`).join(" "),argsCell+=INDENT;let widthOfUnwrappedColumns=nameCell.length+argsCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([nameCell,argsCell,{content:command.default?`${command.summary??command.description} ${import_chalk.default.bold("(default)")}`:command.summary??command.description,wordWrap:!0}])}let rightMargin=INDENT.repeat(4).length,finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns-rightMargin,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return rows.length===0?null:(table.push(...rows),[`${INDENT}${import_chalk.default.dim(title)}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join(""))}function buildCommandExampleLines(command){if(!command.examples?.length)return null;let outputArray=[`${INDENT}${import_chalk.default.dim("Examples:")}`,""];for(let example of command.examples){let nameLine=[INDENT];nameLine.push(import_chalk.default.gray("-")),nameLine.push(example.name),outputArray.push(lineToString(nameLine)),outputArray.push("");let buildValueLine=value=>lineToString([INDENT,INDENT,import_chalk.default.cyan(`$ ${value}`)]);if(Array.isArray(example.value))for(let line of example.value)outputArray.push(buildValueLine(line));else outputArray.push(buildValueLine(example.value));outputArray.push("")}return outputArrayToString(outputArray)}function buildCommandDocumentationLines(command,options){if(options.omitDocumentation)return null;let documentation=command.documentation??options.parent?.documentation;return documentation?outputArrayToString([`${INDENT}${import_chalk.default.dim(`${documentation.label}:`)}`,"",lineToString([INDENT,INDENT,import_chalk.default.cyan(documentation.url)]),""]):null}function buildDescriptionLine(command,options){return`${wordWrap(command.description,options.columns)}${NEWLINE}`}function buildHelpOutput(command,options){let filteredGlobalOptions=command.disabledGlobalOptions?globalCommandOptions.filter(opt=>!command.disabledGlobalOptions?.includes(opt.name)):globalCommandOptions,sections=command.helpSections??[],buildSection=section=>outputArrayToString([`${INDENT}${import_chalk.default.dim(`${section.title}:`)}`,"",...section.body.map(line=>line===""?"":wordWrap(line,options.columns)),""]),outputArray=["",buildCommandSynopsisLine(command,options.parent),buildDescriptionLine(command,options),buildSubcommandLines(command.subcommands,options,command.subcommandsTitle),buildCommandOptionLines(command.options,options,"Options"),...sections.filter(section=>section.placement==="afterOptions").map(buildSection),buildCommandOptionLines(filteredGlobalOptions,options,"Global Options"),buildCommandExampleLines(command),...sections.filter(section=>section.placement!=="afterOptions").map(buildSection),buildCommandDocumentationLines(command,options),""];return outputArrayToString(outputArray)}function help(command,options){return buildHelpOutput(command,{...options,columns:options.columns??80})}function findOption(token,options){return token.startsWith("--")?options.find(candidate=>candidate.name===token.slice(2)):options.find(candidate=>getShortFlags(candidate).includes(token))}function subtreeOptions(command){return[...command.options,...(command.subcommands??[]).flatMap(subtreeOptions)]}function isSubcommandOf(command,token){return token!==void 0&&(command.subcommands??[]).some(subcommand=>subcommand.name===token||subcommand.aliases.includes(token))}function optionTakesValue(token,walkedOptions,command,nextToken){let walked=findOption(token,walkedOptions);if(walked)return walked.type!==Boolean;let below=findOption(token,subtreeOptions(command)),global=findOption(token,globalCommandOptions);return below&&below.type!==Boolean&&(!global||global.type!==Boolean||!isSubcommandOf(command,nextToken))?!0:global!==void 0&&global.type!==Boolean}function resolveHelpTarget(root,tokens){let command=root,ancestors=[],typedPath=[],options=[...root.options],groupArguments=0,unknownSegment;for(let i=0;i<tokens.length;i++){let token=tokens[i];if(token==="--")break;if(token.startsWith("-")){!token.includes("=")&&optionTakesValue(token,options,command,tokens[i+1])&&i++;continue}let subcommand=command.subcommands?.find(candidate=>candidate.name===token||candidate.aliases.includes(token));if(!subcommand){if(command.argumentsBeforeSubcommand&&groupArguments<command.arguments.length){groupArguments++;continue}command.subcommands?.length&&command.arguments.length===0&&!command.runsWithoutSubcommand&&!command.subcommands.some(candidate=>candidate.default)&&(unknownSegment=token);break}ancestors.push(command),typedPath.push(token),options.push(...subcommand.options),command=subcommand,groupArguments=0}let parent=ancestors[ancestors.length-1];for(let i=ancestors.length-1;i>=0;i--)if(ancestors[i].documentation){parent=ancestors[i];break}return{command,parent,typedPath,unknownSegment}}export{registerCommandPaths,buildCommandDocumentationLines,help,resolveHelpTarget};
|