@vercel/cli-support 0.0.0 → 65.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +100 -3
- package/dist/chunks/add-7NS6HIWC.js +8 -0
- package/dist/chunks/add-NMYFDVXW.js +8 -0
- package/dist/chunks/add-PMJ5BECU.js +8 -0
- package/dist/chunks/build-BCY6HQJG.js +7 -0
- package/dist/chunks/chunk-25565AGS.js +7 -0
- package/dist/chunks/chunk-2EYYB6YN.js +7 -0
- package/dist/chunks/chunk-2GHZGOWT.js +7 -0
- package/dist/chunks/chunk-2K3ISCQ6.js +7 -0
- package/dist/chunks/chunk-2NABMKFV.js +29 -0
- package/dist/chunks/chunk-2S6PE6GB.js +7 -0
- package/dist/chunks/chunk-2TUVL6WE.js +12 -0
- package/dist/chunks/chunk-363SJ4TN.js +7 -0
- package/dist/chunks/chunk-3G3FQYMW.js +7 -0
- package/dist/chunks/chunk-3LIKVGFT.js +8 -0
- package/dist/chunks/chunk-3XW7N4W3.js +9 -0
- package/dist/chunks/chunk-462YCCJZ.js +7 -0
- package/dist/chunks/chunk-4CACOKMS.js +7 -0
- package/dist/chunks/chunk-4N6LMERQ.js +57 -0
- package/dist/chunks/chunk-4NTBYNFR.js +17 -0
- package/dist/chunks/chunk-4SAVH3H7.js +7 -0
- package/dist/chunks/chunk-4VFYJU37.js +7 -0
- package/dist/chunks/chunk-527GBU3K.js +7 -0
- package/dist/chunks/chunk-5IWFRZQT.js +10 -0
- package/dist/chunks/chunk-5KUUMQ3M.js +7 -0
- package/dist/chunks/chunk-5RMIM4S2.js +7 -0
- package/dist/chunks/chunk-5V53NA6C.js +7 -0
- package/dist/chunks/chunk-67GZ5REA.js +7 -0
- package/dist/chunks/chunk-6I6QJHCY.js +7 -0
- package/dist/chunks/chunk-6IDNVZZR.js +7 -0
- package/dist/chunks/chunk-6OVX3PWM.js +7 -0
- package/dist/chunks/chunk-6QKS6QK7.js +7 -0
- package/dist/chunks/chunk-6TXEVQA4.js +7 -0
- package/dist/chunks/chunk-6VH56CX2.js +19 -0
- package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
- package/dist/chunks/chunk-6YXIWZ3X.js +25 -0
- package/dist/chunks/chunk-773GOZIR.js +13 -0
- package/dist/chunks/chunk-7E3WREH5.js +7 -0
- package/dist/chunks/chunk-7EJQLVWX.js +7 -0
- package/dist/chunks/chunk-7L2K4OKM.js +63 -0
- package/dist/chunks/chunk-7L5QUDUR.js +8 -0
- package/dist/chunks/chunk-7QAGSRCU.js +7 -0
- package/dist/chunks/chunk-7R6TRRG5.js +7 -0
- package/dist/chunks/chunk-7YKFF6CE.js +7 -0
- package/dist/chunks/chunk-A2RZZQEP.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-AYUUSAB7.js +7 -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-BVGGTBYE.js +7 -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-C7FQMC6D.js +7 -0
- package/dist/chunks/chunk-CBVKB3DT.js +21 -0
- package/dist/chunks/chunk-CC6FLKIP.js +11 -0
- package/dist/chunks/chunk-COD3WAUI.js +7 -0
- package/dist/chunks/chunk-CR3NBTHV.js +7 -0
- package/dist/chunks/chunk-CWM2F235.js +7 -0
- package/dist/chunks/chunk-CZSOZKHX.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-DKJL2KV7.js +7 -0
- package/dist/chunks/chunk-DQ2SVW4R.js +12 -0
- package/dist/chunks/chunk-DWZBL4NK.js +7 -0
- package/dist/chunks/chunk-EAUDC24V.js +9 -0
- package/dist/chunks/chunk-EAXMWCOL.js +63 -0
- package/dist/chunks/chunk-ECEDD646.js +8 -0
- package/dist/chunks/chunk-ECQIO5K3.js +7 -0
- package/dist/chunks/chunk-EEUJLJEJ.js +7 -0
- package/dist/chunks/chunk-EGNR2DEI.js +7 -0
- package/dist/chunks/chunk-EISD3RG7.js +11 -0
- package/dist/chunks/chunk-EKZTFGDX.js +7 -0
- package/dist/chunks/chunk-ETV3C2CV.js +7 -0
- package/dist/chunks/chunk-EU2GBIPC.js +7 -0
- package/dist/chunks/chunk-F4KY2TOK.js +7 -0
- package/dist/chunks/chunk-F53OKXYI.js +7 -0
- package/dist/chunks/chunk-F6EBOT64.js +7 -0
- package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
- package/dist/chunks/chunk-FBYA6LLM.js +7 -0
- package/dist/chunks/chunk-FGFLTLEA.js +7 -0
- package/dist/chunks/chunk-FHU2O7ZJ.js +8 -0
- package/dist/chunks/chunk-FLHO75XC.js +8 -0
- package/dist/chunks/chunk-FSPPKNKN.js +7 -0
- package/dist/chunks/chunk-FUX6LKNP.js +7 -0
- package/dist/chunks/chunk-GA277JFB.js +20 -0
- package/dist/chunks/chunk-GCZVIDNG.js +86 -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-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-HSFKISDH.js +9 -0
- package/dist/chunks/chunk-HTXDC7E2.js +10 -0
- package/dist/chunks/chunk-ID663OJ7.js +7 -0
- package/dist/chunks/chunk-IOZ3I765.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-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-JLE7K4SY.js +9 -0
- package/dist/chunks/chunk-JLEJB6KM.js +7 -0
- package/dist/chunks/chunk-JP33AIDQ.js +7 -0
- package/dist/chunks/chunk-JRPNHWA3.js +7 -0
- package/dist/chunks/chunk-JUSR7V2L.js +7 -0
- package/dist/chunks/chunk-JWCEHQQF.js +29 -0
- package/dist/chunks/chunk-K5U47EVH.js +7 -0
- package/dist/chunks/chunk-KCKYPLIH.js +7 -0
- package/dist/chunks/chunk-KGBIRIFF.js +7 -0
- package/dist/chunks/chunk-KJA2GKPT.js +7 -0
- package/dist/chunks/chunk-KPQLUGFI.js +32 -0
- package/dist/chunks/chunk-KQCFC2JL.js +7 -0
- package/dist/chunks/chunk-KQCROPL3.js +8 -0
- package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
- package/dist/chunks/chunk-KW6GSQXV.js +7 -0
- package/dist/chunks/chunk-KY335KWI.js +7 -0
- package/dist/chunks/chunk-L3JYCXVB.js +23 -0
- package/dist/chunks/chunk-LFOWP74R.js +7 -0
- package/dist/chunks/chunk-LOBA3E72.js +7 -0
- package/dist/chunks/chunk-LQVSU5HR.js +7 -0
- package/dist/chunks/chunk-LSF7FY6X.js +7 -0
- package/dist/chunks/chunk-LSQREJXO.js +11 -0
- package/dist/chunks/chunk-LW4N3CW6.js +9 -0
- package/dist/chunks/chunk-M2NXKZKX.js +16 -0
- package/dist/chunks/chunk-MBEKRUTQ.js +8 -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-N2FLYCCO.js +9 -0
- package/dist/chunks/chunk-N6JBQMOF.js +20 -0
- package/dist/chunks/chunk-NAX6IARA.js +11 -0
- package/dist/chunks/chunk-NB2WLB3J.js +12 -0
- package/dist/chunks/chunk-NGKO2OOU.js +8 -0
- package/dist/chunks/chunk-NW7WWUCQ.js +9 -0
- package/dist/chunks/chunk-NWGBDBZI.js +7 -0
- package/dist/chunks/chunk-NZ2TFADV.js +7 -0
- package/dist/chunks/chunk-O4WNSKQR.js +15 -0
- package/dist/chunks/chunk-O72YDZKD.js +10 -0
- package/dist/chunks/chunk-OAM5NJCU.js +9 -0
- package/dist/chunks/chunk-OCR5CRTH.js +10 -0
- package/dist/chunks/chunk-OFDTADPQ.js +7 -0
- package/dist/chunks/chunk-OHEOYFBU.js +9 -0
- package/dist/chunks/chunk-OO572JUC.js +7 -0
- package/dist/chunks/chunk-OPORM35X.js +7 -0
- package/dist/chunks/chunk-OZCQTXI4.js +7 -0
- package/dist/chunks/chunk-PADL3C6Z.js +7 -0
- package/dist/chunks/chunk-PFD7LETF.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-Q4KTAQB3.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-QIVX6SCR.js +27 -0
- package/dist/chunks/chunk-QVHXFHBV.js +14 -0
- package/dist/chunks/chunk-QVXS234E.js +7 -0
- package/dist/chunks/chunk-QVZAAMGQ.js +39 -0
- package/dist/chunks/chunk-R2BUF6Z7.js +7 -0
- package/dist/chunks/chunk-R2XHJDAP.js +7 -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-RMZTB2IU.js +7 -0
- package/dist/chunks/chunk-RRDNKB2X.js +7 -0
- package/dist/chunks/chunk-RW3X523R.js +8 -0
- package/dist/chunks/chunk-S3L2OHPO.js +7 -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-SLGUYM42.js +10 -0
- package/dist/chunks/chunk-SYFG2RM6.js +10 -0
- package/dist/chunks/chunk-T6243EDS.js +7 -0
- package/dist/chunks/chunk-TAAWMNNL.js +7 -0
- package/dist/chunks/chunk-TAISZMA2.js +7 -0
- package/dist/chunks/chunk-TEYREL44.js +7 -0
- package/dist/chunks/chunk-TG2RCYTH.js +7 -0
- package/dist/chunks/chunk-TIPQQ4TG.js +17 -0
- package/dist/chunks/chunk-U2OBPULW.js +7 -0
- package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
- package/dist/chunks/chunk-U56NHYAH.js +7 -0
- package/dist/chunks/chunk-UGNIIDHR.js +32 -0
- package/dist/chunks/chunk-UHBMX3OK.js +7 -0
- package/dist/chunks/chunk-UVHKXCR5.js +11 -0
- package/dist/chunks/chunk-V6Y6UK6B.js +43 -0
- package/dist/chunks/chunk-VNIKIQVE.js +10 -0
- package/dist/chunks/chunk-VT6RIZJH.js +7 -0
- package/dist/chunks/chunk-WDXW6A4H.js +10 -0
- package/dist/chunks/chunk-WEH6XC4Y.js +22 -0
- package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
- package/dist/chunks/chunk-WVHCBDTB.js +7 -0
- package/dist/chunks/chunk-XC46OAAT.js +9 -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-XVDRGWXM.js +16 -0
- package/dist/chunks/chunk-Y5ZMKL7E.js +7 -0
- package/dist/chunks/chunk-YEZJNXQX.js +7 -0
- package/dist/chunks/chunk-YHPPP3SF.js +7 -0
- package/dist/chunks/chunk-YHULP2KK.js +7 -0
- package/dist/chunks/chunk-YMZ6WBKB.js +21 -0
- package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
- package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
- package/dist/chunks/chunk-ZN6CQWVP.js +7 -0
- package/dist/chunks/chunk-ZQBSAMFL.js +24 -0
- package/dist/chunks/cjs-2SMN43VH.js +54 -0
- package/dist/chunks/clear-FKVWDCVA.js +8 -0
- package/dist/chunks/compile-vercel-config-GWAJE44R.js +7 -0
- package/dist/chunks/config-5WVLG5SE.js +8 -0
- package/dist/chunks/config-RMOHN5YT.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-JAB7MRSK.js +7 -0
- package/dist/chunks/create-project-IKCB6MB2.js +7 -0
- package/dist/chunks/delete-5WMB4WFR.js +9 -0
- package/dist/chunks/delete-EM4JZPFA.js +10 -0
- package/dist/chunks/detect-projects-OD4JEAW2.js +7 -0
- package/dist/chunks/detect-services-BSJGB4RM.js +7 -0
- package/dist/chunks/disable-QOM7UHQC.js +7 -0
- package/dist/chunks/discard-L5ZH7P5B.js +14 -0
- package/dist/chunks/dist-33WTJLVQ.js +7 -0
- package/dist/chunks/dist-RXYNZPEA.js +7 -0
- package/dist/chunks/edit-F3VJGCG2.js +9 -0
- package/dist/chunks/edit-TM7YCWBU.js +8 -0
- package/dist/chunks/enable-72C3QX34.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-EPLYZF2Q.js +19 -0
- package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
- package/dist/chunks/future-V77DRMQG.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-Y3YHBMPU.js +7 -0
- package/dist/chunks/image-CVXEXU5R.js +7 -0
- package/dist/chunks/import-builders-PGRKJOOE.js +7 -0
- package/dist/chunks/inspect-BTRNXRJT.js +9 -0
- package/dist/chunks/inspect-CZ7WXYE5.js +20 -0
- package/dist/chunks/inspect-FGDVWAQP.js +13 -0
- package/dist/chunks/inspect-HFDGZNWC.js +15 -0
- package/dist/chunks/inspect-T2AIREYK.js +19 -0
- package/dist/chunks/list-CKRRHAOE.js +12 -0
- package/dist/chunks/list-FLREMGJR.js +16 -0
- package/dist/chunks/list-ON4YTQRN.js +10 -0
- package/dist/chunks/login-55LJ5ZA6.js +9 -0
- package/dist/chunks/login-DQRZSD4Z.js +7 -0
- package/dist/chunks/logs-2HQXWOHM.js +7 -0
- package/dist/chunks/ls-2HUJHVLA.js +12 -0
- package/dist/chunks/ls-3DVM5HLK.js +12 -0
- package/dist/chunks/ls-4B3QYHCI.js +8 -0
- package/dist/chunks/ls-A7K4XDQB.js +8 -0
- package/dist/chunks/ls-FK5XEJEU.js +12 -0
- package/dist/chunks/ls-QGUKJJY5.js +12 -0
- package/dist/chunks/ls-VTKHPDWS.js +11 -0
- package/dist/chunks/mutate-7ADZBCZM.js +9 -0
- package/dist/chunks/notifications-XZJXE2K4.js +7 -0
- package/dist/chunks/open-EE5IZQD7.js +7 -0
- package/dist/chunks/openapi-QBX62ZXC.js +7 -0
- package/dist/chunks/permissions-VYJ4LL5R.js +7 -0
- package/dist/chunks/pkg-EDJQLCNP.js +7 -0
- package/dist/chunks/plugin-offer-TEGYA3TA.js +9 -0
- package/dist/chunks/prompt-missing-credentials-VP6OVCFM.js +7 -0
- package/dist/chunks/publish-2HEK5UMJ.js +15 -0
- package/dist/chunks/pull-WRTTSY7J.js +7 -0
- package/dist/chunks/purchase-domain-if-available-6S3NLTUI.js +7 -0
- package/dist/chunks/push-L3QRGGLC.js +7 -0
- package/dist/chunks/query-FXXLX6UB.js +12 -0
- package/dist/chunks/reauthenticate-IXQDC4UZ.js +7 -0
- package/dist/chunks/reorder-B4OXSYCI.js +10 -0
- package/dist/chunks/reply-F637K6XH.js +9 -0
- package/dist/chunks/repo-info-to-url-XQSULSEO.js +7 -0
- package/dist/chunks/resolve-E3F6NYQZ.js +12 -0
- package/dist/chunks/resolve-agent-team-EIPCH766.js +7 -0
- package/dist/chunks/resolve-deployment-framework-preset-AXXYBFCL.js +7 -0
- package/dist/chunks/restore-Q25KRZPH.js +16 -0
- package/dist/chunks/rm-FWD2NUGX.js +8 -0
- package/dist/chunks/rm-JMQ4QKCC.js +8 -0
- package/dist/chunks/rm-PPG7P3GN.js +8 -0
- package/dist/chunks/rm-SH3DYKNS.js +8 -0
- package/dist/chunks/rm-UEBLKFVC.js +8 -0
- package/dist/chunks/routes-PKTWMDWQ.js +7 -0
- package/dist/chunks/rule-inspect-LKQA5I4V.js +8 -0
- package/dist/chunks/schema-FBV42W7N.js +14 -0
- package/dist/chunks/schema-ZWE5MNMG.js +44 -0
- package/dist/chunks/select-org-WMB752Z6.js +7 -0
- package/dist/chunks/set-UTYIPOLC.js +7 -0
- package/dist/chunks/setup-and-link-ZLY5XQW5.js +7 -0
- package/dist/chunks/skills-RKIGVVNM.js +590 -0
- package/dist/chunks/slugify-NMMUASYK.js +7 -0
- package/dist/chunks/stamp-TKONNIJ5.js +7 -0
- package/dist/chunks/tags-UCLZ5UMX.js +7 -0
- package/dist/chunks/token-W6P2KNI5.js +7 -0
- package/dist/chunks/token-util-JDQI37VN.js +7 -0
- package/dist/chunks/types-YM7TMHXW.js +14 -0
- package/dist/chunks/update-BGDQ5TXO.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 +27 -0
- package/dist/internal-build-worker.js +10 -0
- package/dist/internal-build.js +11 -0
- package/dist/package.json +264 -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 +404 -0
- package/dist/version.mjs +2 -0
- package/package.json +224 -14
- package/index.js +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
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 isNothing(subject){return typeof subject>"u"||subject===null}function isObject(subject){return typeof subject=="object"&&subject!==null}function toArray(sequence){return Array.isArray(sequence)?sequence:isNothing(sequence)?[]:[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source)for(sourceKeys=Object.keys(source),index=0,length=sourceKeys.length;index<length;index+=1)key=sourceKeys[index],target[key]=source[key];return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(exception2,compact){var where="",message=exception2.reason||"(unknown reason)";return exception2.mark?(exception2.mark.name&&(where+='in "'+exception2.mark.name+'" '),where+="("+(exception2.mark.line+1)+":"+(exception2.mark.column+1)+")",!compact&&exception2.mark.snippet&&(where+=`
|
|
8
|
+
|
|
9
|
+
`+exception2.mark.snippet),message+" "+where):message}function YAMLException$1(reason,mark){Error.call(this),this.name="YAMLException",this.reason=reason,this.mark=mark,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}YAMLException$1.prototype=Object.create(Error.prototype);YAMLException$1.prototype.constructor=YAMLException$1;YAMLException$1.prototype.toString=function(compact){return this.name+": "+formatError(this,compact)};var exception=YAMLException$1;function getLine(buffer,lineStart,lineEnd,position,maxLineLength){var head="",tail="",maxHalfLength=Math.floor(maxLineLength/2)-1;return position-lineStart>maxHalfLength&&(head=" ... ",lineStart=position-maxHalfLength+head.length),lineEnd-position>maxHalfLength&&(tail=" ...",lineEnd=position+maxHalfLength-tail.length),{str:head+buffer.slice(lineStart,lineEnd).replace(/\t/g,"\u2192")+tail,pos:position-lineStart+head.length}}function padStart(string,max){return common.repeat(" ",max-string.length)+string}function makeSnippet(mark,options){if(options=Object.create(options||null),!mark.buffer)return null;options.maxLength||(options.maxLength=79),typeof options.indent!="number"&&(options.indent=1),typeof options.linesBefore!="number"&&(options.linesBefore=3),typeof options.linesAfter!="number"&&(options.linesAfter=2);for(var re=/\r?\n|\r|\0/g,lineStarts=[0],lineEnds=[],match,foundLineNo=-1;match=re.exec(mark.buffer);)lineEnds.push(match.index),lineStarts.push(match.index+match[0].length),mark.position<=match.index&&foundLineNo<0&&(foundLineNo=lineStarts.length-2);foundLineNo<0&&(foundLineNo=lineStarts.length-1);var result="",i,line,lineNoLength=Math.min(mark.line+options.linesAfter,lineEnds.length).toString().length,maxLineLength=options.maxLength-(options.indent+lineNoLength+3);for(i=1;i<=options.linesBefore&&!(foundLineNo-i<0);i++)line=getLine(mark.buffer,lineStarts[foundLineNo-i],lineEnds[foundLineNo-i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo-i]),maxLineLength),result=common.repeat(" ",options.indent)+padStart((mark.line-i+1).toString(),lineNoLength)+" | "+line.str+`
|
|
10
|
+
`+result;for(line=getLine(mark.buffer,lineStarts[foundLineNo],lineEnds[foundLineNo],mark.position,maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+1).toString(),lineNoLength)+" | "+line.str+`
|
|
11
|
+
`,result+=common.repeat("-",options.indent+lineNoLength+3+line.pos)+`^
|
|
12
|
+
`,i=1;i<=options.linesAfter&&!(foundLineNo+i>=lineEnds.length);i++)line=getLine(mark.buffer,lineStarts[foundLineNo+i],lineEnds[foundLineNo+i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo+i]),maxLineLength),result+=common.repeat(" ",options.indent)+padStart((mark.line+i+1).toString(),lineNoLength)+" | "+line.str+`
|
|
13
|
+
`;return result.replace(/\n$/,"")}var snippet=makeSnippet,TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map2){var result={};return map2!==null&&Object.keys(map2).forEach(function(style){map2[style].forEach(function(alias){result[String(alias)]=style})}),result}function Type$1(tag,options){if(options=options||{},Object.keys(options).forEach(function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1)throw new exception('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}),this.options=options,this.tag=tag,this.kind=options.kind||null,this.resolve=options.resolve||function(){return!0},this.construct=options.construct||function(data){return data},this.instanceOf=options.instanceOf||null,this.predicate=options.predicate||null,this.represent=options.represent||null,this.representName=options.representName||null,this.defaultStyle=options.defaultStyle||null,this.multi=options.multi||!1,this.styleAliases=compileStyleAliases(options.styleAliases||null),YAML_NODE_KINDS.indexOf(this.kind)===-1)throw new exception('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}var type=Type$1;function compileList(schema2,name){var result=[];return schema2[name].forEach(function(currentType){var newIndex=result.length;result.forEach(function(previousType,previousIndex){previousType.tag===currentType.tag&&previousType.kind===currentType.kind&&previousType.multi===currentType.multi&&(newIndex=previousIndex)}),result[newIndex]=currentType}),result}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},index,length;function collectType(type2){type2.multi?(result.multi[type2.kind].push(type2),result.multi.fallback.push(type2)):result[type2.kind][type2.tag]=result.fallback[type2.tag]=type2}for(index=0,length=arguments.length;index<length;index+=1)arguments[index].forEach(collectType);return result}function Schema$1(definition){return this.extend(definition)}Schema$1.prototype.extend=function(definition){var implicit=[],explicit=[];if(definition instanceof type)explicit.push(definition);else if(Array.isArray(definition))explicit=explicit.concat(definition);else if(definition&&(Array.isArray(definition.implicit)||Array.isArray(definition.explicit)))definition.implicit&&(implicit=implicit.concat(definition.implicit)),definition.explicit&&(explicit=explicit.concat(definition.explicit));else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");implicit.forEach(function(type$1){if(!(type$1 instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(type$1.loadKind&&type$1.loadKind!=="scalar")throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(type$1.multi)throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),explicit.forEach(function(type$1){if(!(type$1 instanceof type))throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var result=Object.create(Schema$1.prototype);return result.implicit=(this.implicit||[]).concat(implicit),result.explicit=(this.explicit||[]).concat(explicit),result.compiledImplicit=compileList(result,"implicit"),result.compiledExplicit=compileList(result,"explicit"),result.compiledTypeMap=compileMap(result.compiledImplicit,result.compiledExplicit),result};var schema=Schema$1,str=new type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}}),seq=new type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}}),map=new type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}}),failsafe=new schema({explicit:[str,seq,map]});function resolveYamlNull(data){if(data===null)return!0;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}var _null=new type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function resolveYamlBoolean(data){if(data===null)return!1;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}var bool=new type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return!1;var max=data.length,index=0,hasDigits=!1,ch;if(!max)return!1;if(ch=data[index],(ch==="-"||ch==="+")&&(ch=data[++index]),ch==="0"){if(index+1===max)return!0;if(ch=data[++index],ch==="b"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(ch!=="0"&&ch!=="1")return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="x"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(!isHexCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}if(ch==="o"){for(index++;index<max;index++)if(ch=data[index],ch!=="_"){if(!isOctCode(data.charCodeAt(index)))return!1;hasDigits=!0}return hasDigits&&ch!=="_"}}if(ch==="_")return!1;for(;index<max;index++)if(ch=data[index],ch!=="_"){if(!isDecCode(data.charCodeAt(index)))return!1;hasDigits=!0}return!(!hasDigits||ch==="_")}function constructYamlInteger(data){var value=data,sign=1,ch;if(value.indexOf("_")!==-1&&(value=value.replace(/_/g,"")),ch=value[0],(ch==="-"||ch==="+")&&(ch==="-"&&(sign=-1),value=value.slice(1),ch=value[0]),value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value.slice(2),16);if(value[1]==="o")return sign*parseInt(value.slice(2),8)}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&object%1===0&&!common.isNegativeZero(object)}var int=new type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0o"+obj.toString(8):"-0o"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){return!(data===null||!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_")}function constructYamlFloat(data){var value,sign;return value=data.replace(/_/g,"").toLowerCase(),sign=value[0]==="-"?-1:1,"+-".indexOf(value[0])>=0&&(value=value.slice(1)),value===".inf"?sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:value===".nan"?NaN:sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object))switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===object)switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===object)switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(common.isNegativeZero(object))return"-0.0";return res=object.toString(10),SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}var float=new type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"}),json=failsafe.extend({implicit:[_null,bool,int,float]}),core=json,YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){return data===null?!1:YAML_DATE_REGEXP.exec(data)!==null||YAML_TIMESTAMP_REGEXP.exec(data)!==null}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;if(match=YAML_DATE_REGEXP.exec(data),match===null&&(match=YAML_TIMESTAMP_REGEXP.exec(data)),match===null)throw new Error("Date resolve error");if(year=+match[1],month=+match[2]-1,day=+match[3],!match[4])return new Date(Date.UTC(year,month,day));if(hour=+match[4],minute=+match[5],second=+match[6],match[7]){for(fraction=match[7].slice(0,3);fraction.length<3;)fraction+="0";fraction=+fraction}return match[9]&&(tz_hour=+match[10],tz_minute=+(match[11]||0),delta=(tz_hour*60+tz_minute)*6e4,match[9]==="-"&&(delta=-delta)),date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction)),delta&&date.setTime(date.getTime()-delta),date}function representYamlTimestamp(object){return object.toISOString()}var timestamp=new type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(data){return data==="<<"||data===null}var merge=new type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge}),BASE64_MAP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
14
|
+
\r`;function resolveYamlBinary(data){if(data===null)return!1;var code,idx,bitlen=0,max=data.length,map2=BASE64_MAP;for(idx=0;idx<max;idx++)if(code=map2.indexOf(data.charAt(idx)),!(code>64)){if(code<0)return!1;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map2=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++)idx%4===0&&idx&&(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)),bits=bits<<6|map2.indexOf(input.charAt(idx));return tailbits=max%4*6,tailbits===0?(result.push(bits>>16&255),result.push(bits>>8&255),result.push(bits&255)):tailbits===18?(result.push(bits>>10&255),result.push(bits>>2&255)):tailbits===12&&result.push(bits>>4&255),new Uint8Array(result)}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map2=BASE64_MAP;for(idx=0;idx<max;idx++)idx%3===0&&idx&&(result+=map2[bits>>18&63],result+=map2[bits>>12&63],result+=map2[bits>>6&63],result+=map2[bits&63]),bits=(bits<<8)+object[idx];return tail=max%3,tail===0?(result+=map2[bits>>18&63],result+=map2[bits>>12&63],result+=map2[bits>>6&63],result+=map2[bits&63]):tail===2?(result+=map2[bits>>10&63],result+=map2[bits>>4&63],result+=map2[bits<<2&63],result+=map2[64]):tail===1&&(result+=map2[bits>>2&63],result+=map2[bits<<4&63],result+=map2[64],result+=map2[64]),result}function isBinary(obj){return Object.prototype.toString.call(obj)==="[object Uint8Array]"}var binary=new type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary}),_hasOwnProperty$3=Object.prototype.hasOwnProperty,_toString$2=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return!0;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){if(pair=object[index],pairHasKey=!1,_toString$2.call(pair)!=="[object Object]")return!1;for(pairKey in pair)if(_hasOwnProperty$3.call(pair,pairKey))if(!pairHasKey)pairHasKey=!0;else return!1;if(!pairHasKey)return!1;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return!1}return!0}function constructYamlOmap(data){return data!==null?data:[]}var omap=new type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap}),_toString$1=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return!0;var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1){if(pair=object[index],_toString$1.call(pair)!=="[object Object]"||(keys=Object.keys(pair),keys.length!==1))return!1;result[index]=[keys[0],pair[keys[0]]]}return!0}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;for(result=new Array(object.length),index=0,length=object.length;index<length;index+=1)pair=object[index],keys=Object.keys(pair),result[index]=[keys[0],pair[keys[0]]];return result}var pairs=new type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs}),_hasOwnProperty$2=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return!0;var key,object=data;for(key in object)if(_hasOwnProperty$2.call(object,key)&&object[key]!==null)return!1;return!0}function constructYamlSet(data){return data!==null?data:{}}var set=new type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet}),_default=core.extend({implicit:[timestamp,merge],explicit:[binary,omap,pairs,set]}),_hasOwnProperty$1=Object.prototype.hasOwnProperty,CONTEXT_FLOW_IN=1,CONTEXT_FLOW_OUT=2,CONTEXT_BLOCK_IN=3,CONTEXT_BLOCK_OUT=4,CHOMPING_CLIP=1,CHOMPING_STRIP=2,CHOMPING_KEEP=3,PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/,PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/,PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i,PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;return 48<=c&&c<=57?c-48:(lc=c|32,97<=lc&&lc<=102?lc-97+10:-1)}function escapedHexLen(c){return c===120?2:c===117?4:c===85?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"\x07":c===98?"\b":c===116||c===9?" ":c===110?`
|
|
15
|
+
`:c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1B":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\x85":c===95?"\xA0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256),simpleEscapeMap=new Array(256);for(i=0;i<256;i++)simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0,simpleEscapeMap[i]=simpleEscapeSequence(i);var i;function State$1(input,options){this.input=input,this.filename=options.filename||null,this.schema=options.schema||_default,this.onWarning=options.onWarning||null,this.legacy=options.legacy||!1,this.json=options.json||!1,this.listener=options.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=input.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(state,message){var mark={name:state.filename,buffer:state.input.slice(0,-1),position:state.position,line:state.line,column:state.position-state.lineStart};return mark.snippet=snippet(mark),new exception(message,mark)}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){state.onWarning&&state.onWarning.call(null,generateError(state,message))}var directiveHandlers={YAML:function(state,name,args){var match,major,minor;state.version!==null&&throwError(state,"duplication of %YAML directive"),args.length!==1&&throwError(state,"YAML directive accepts exactly one argument"),match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]),match===null&&throwError(state,"ill-formed argument of the YAML directive"),major=parseInt(match[1],10),minor=parseInt(match[2],10),major!==1&&throwError(state,"unacceptable YAML version of the document"),state.version=args[0],state.checkLineBreaks=minor<2,minor!==1&&minor!==2&&throwWarning(state,"unsupported YAML version of the document")},TAG:function(state,name,args){var handle,prefix;args.length!==2&&throwError(state,"TAG directive accepts exactly two arguments"),handle=args[0],prefix=args[1],PATTERN_TAG_HANDLE.test(handle)||throwError(state,"ill-formed tag handle (first argument) of the TAG directive"),_hasOwnProperty$1.call(state.tagMap,handle)&&throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle'),PATTERN_TAG_URI.test(prefix)||throwError(state,"ill-formed tag prefix (second argument) of the TAG directive");try{prefix=decodeURIComponent(prefix)}catch{throwError(state,"tag prefix is malformed: "+prefix)}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){if(_result=state.input.slice(start,end),checkJson)for(_position=0,_length=_result.length;_position<_length;_position+=1)_character=_result.charCodeAt(_position),_character===9||32<=_character&&_character<=1114111||throwError(state,"expected valid JSON character");else PATTERN_NON_PRINTABLE.test(_result)&&throwError(state,"the stream contains non-printable characters");state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;for(common.isObject(source)||throwError(state,"cannot merge mappings; the provided source object is unacceptable"),sourceKeys=Object.keys(source),index=0,quantity=sourceKeys.length;index<quantity;index+=1)key=sourceKeys[index],_hasOwnProperty$1.call(destination,key)||(destination[key]=source[key],overridableKeys[key]=!0)}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startLineStart,startPos){var index,quantity;if(Array.isArray(keyNode))for(keyNode=Array.prototype.slice.call(keyNode),index=0,quantity=keyNode.length;index<quantity;index+=1)Array.isArray(keyNode[index])&&throwError(state,"nested arrays are not supported inside keys"),typeof keyNode=="object"&&_class(keyNode[index])==="[object Object]"&&(keyNode[index]="[object Object]");if(typeof keyNode=="object"&&_class(keyNode)==="[object Object]"&&(keyNode="[object Object]"),keyNode=String(keyNode),_result===null&&(_result={}),keyTag==="tag:yaml.org,2002:merge")if(Array.isArray(valueNode))for(index=0,quantity=valueNode.length;index<quantity;index+=1)mergeMappings(state,_result,valueNode[index],overridableKeys);else mergeMappings(state,_result,valueNode,overridableKeys);else!state.json&&!_hasOwnProperty$1.call(overridableKeys,keyNode)&&_hasOwnProperty$1.call(_result,keyNode)&&(state.line=startLine||state.line,state.lineStart=startLineStart||state.lineStart,state.position=startPos||state.position,throwError(state,"duplicated mapping key")),keyNode==="__proto__"?Object.defineProperty(_result,keyNode,{configurable:!0,enumerable:!0,writable:!0,value:valueNode}):_result[keyNode]=valueNode,delete overridableKeys[keyNode];return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position),ch===10?state.position++:ch===13?(state.position++,state.input.charCodeAt(state.position)===10&&state.position++):throwError(state,"a line break is expected"),state.line+=1,state.lineStart=state.position,state.firstTabInLine=-1}function skipSeparationSpace(state,allowComments,checkIndent){for(var lineBreaks=0,ch=state.input.charCodeAt(state.position);ch!==0;){for(;is_WHITE_SPACE(ch);)ch===9&&state.firstTabInLine===-1&&(state.firstTabInLine=state.position),ch=state.input.charCodeAt(++state.position);if(allowComments&&ch===35)do ch=state.input.charCodeAt(++state.position);while(ch!==10&&ch!==13&&ch!==0);if(is_EOL(ch))for(readLineBreak(state),ch=state.input.charCodeAt(state.position),lineBreaks++,state.lineIndent=0;ch===32;)state.lineIndent++,ch=state.input.charCodeAt(++state.position);else break}return checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent&&throwWarning(state,"deficient indentation"),lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;return ch=state.input.charCodeAt(_position),!!((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)&&(_position+=3,ch=state.input.charCodeAt(_position),ch===0||is_WS_OR_EOL(ch)))}function writeFoldedLines(state,count){count===1?state.result+=" ":count>1&&(state.result+=common.repeat(`
|
|
16
|
+
`,count-1))}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;if(ch=state.input.charCodeAt(state.position),is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96||(ch===63||ch===45)&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)))return!1;for(state.kind="scalar",state.result="",captureStart=captureEnd=state.position,hasPendingContent=!1;ch!==0;){if(ch===58){if(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following))break}else if(ch===35){if(preceding=state.input.charCodeAt(state.position-1),is_WS_OR_EOL(preceding))break}else{if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch))break;if(is_EOL(ch))if(_line=state.line,_lineStart=state.lineStart,_lineIndent=state.lineIndent,skipSeparationSpace(state,!1,-1),state.lineIndent>=nodeIndent){hasPendingContent=!0,ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd,state.line=_line,state.lineStart=_lineStart,state.lineIndent=_lineIndent;break}}hasPendingContent&&(captureSegment(state,captureStart,captureEnd,!1),writeFoldedLines(state,state.line-_line),captureStart=captureEnd=state.position,hasPendingContent=!1),is_WHITE_SPACE(ch)||(captureEnd=state.position+1),ch=state.input.charCodeAt(++state.position)}return captureSegment(state,captureStart,captureEnd,!1),state.result?!0:(state.kind=_kind,state.result=_result,!1)}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;if(ch=state.input.charCodeAt(state.position),ch!==39)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;(ch=state.input.charCodeAt(state.position))!==0;)if(ch===39)if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),ch===39)captureStart=state.position,state.position++,captureEnd=state.position;else return!0;else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a single quoted scalar"):(state.position++,captureEnd=state.position);throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;if(ch=state.input.charCodeAt(state.position),ch!==34)return!1;for(state.kind="scalar",state.result="",state.position++,captureStart=captureEnd=state.position;(ch=state.input.charCodeAt(state.position))!==0;){if(ch===34)return captureSegment(state,captureStart,state.position,!0),state.position++,!0;if(ch===92){if(captureSegment(state,captureStart,state.position,!0),ch=state.input.charCodeAt(++state.position),is_EOL(ch))skipSeparationSpace(state,!1,nodeIndent);else if(ch<256&&simpleEscapeCheck[ch])state.result+=simpleEscapeMap[ch],state.position++;else if((tmp=escapedHexLen(ch))>0){for(hexLength=tmp,hexResult=0;hexLength>0;hexLength--)ch=state.input.charCodeAt(++state.position),(tmp=fromHexCode(ch))>=0?hexResult=(hexResult<<4)+tmp:throwError(state,"expected hexadecimal character");state.result+=charFromCodepoint(hexResult),state.position++}else throwError(state,"unknown escape sequence");captureStart=captureEnd=state.position}else is_EOL(ch)?(captureSegment(state,captureStart,captureEnd,!0),writeFoldedLines(state,skipSeparationSpace(state,!1,nodeIndent)),captureStart=captureEnd=state.position):state.position===state.lineStart&&testDocumentSeparator(state)?throwError(state,"unexpected end of the document within a double quoted scalar"):(state.position++,captureEnd=state.position)}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=!0,_line,_lineStart,_pos,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=Object.create(null),keyNode,keyTag,valueNode,ch;if(ch=state.input.charCodeAt(state.position),ch===91)terminator=93,isMapping=!1,_result=[];else if(ch===123)terminator=125,isMapping=!0,_result={};else return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(++state.position);ch!==0;){if(skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),ch===terminator)return state.position++,state.tag=_tag,state.anchor=_anchor,state.kind=isMapping?"mapping":"sequence",state.result=_result,!0;readNext?ch===44&&throwError(state,"expected the node content, but found ','"):throwError(state,"missed comma between flow collection entries"),keyTag=keyNode=valueNode=null,isPair=isExplicitPair=!1,ch===63&&(following=state.input.charCodeAt(state.position+1),is_WS_OR_EOL(following)&&(isPair=isExplicitPair=!0,state.position++,skipSeparationSpace(state,!0,nodeIndent))),_line=state.line,_lineStart=state.lineStart,_pos=state.position,composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),keyTag=state.tag,keyNode=state.result,skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),(isExplicitPair||state.line===_line)&&ch===58&&(isPair=!0,ch=state.input.charCodeAt(++state.position),skipSeparationSpace(state,!0,nodeIndent),composeNode(state,nodeIndent,CONTEXT_FLOW_IN,!1,!0),valueNode=state.result),isMapping?storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos):isPair?_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos)):_result.push(keyNode),skipSeparationSpace(state,!0,nodeIndent),ch=state.input.charCodeAt(state.position),ch===44?(readNext=!0,ch=state.input.charCodeAt(++state.position)):readNext=!1}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=!1,detectedIndent=!1,textIndent=nodeIndent,emptyLines=0,atMoreIndented=!1,tmp,ch;if(ch=state.input.charCodeAt(state.position),ch===124)folding=!1;else if(ch===62)folding=!0;else return!1;for(state.kind="scalar",state.result="";ch!==0;)if(ch=state.input.charCodeAt(++state.position),ch===43||ch===45)CHOMPING_CLIP===chomping?chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP:throwError(state,"repeat of a chomping mode identifier");else if((tmp=fromDecimalCode(ch))>=0)tmp===0?throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one"):detectedIndent?throwError(state,"repeat of an indentation width identifier"):(textIndent=nodeIndent+tmp-1,detectedIndent=!0);else break;if(is_WHITE_SPACE(ch)){do ch=state.input.charCodeAt(++state.position);while(is_WHITE_SPACE(ch));if(ch===35)do ch=state.input.charCodeAt(++state.position);while(!is_EOL(ch)&&ch!==0)}for(;ch!==0;){for(readLineBreak(state),state.lineIndent=0,ch=state.input.charCodeAt(state.position);(!detectedIndent||state.lineIndent<textIndent)&&ch===32;)state.lineIndent++,ch=state.input.charCodeAt(++state.position);if(!detectedIndent&&state.lineIndent>textIndent&&(textIndent=state.lineIndent),is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){chomping===CHOMPING_KEEP?state.result+=common.repeat(`
|
|
17
|
+
`,didReadContent?1+emptyLines:emptyLines):chomping===CHOMPING_CLIP&&didReadContent&&(state.result+=`
|
|
18
|
+
`);break}for(folding?is_WHITE_SPACE(ch)?(atMoreIndented=!0,state.result+=common.repeat(`
|
|
19
|
+
`,didReadContent?1+emptyLines:emptyLines)):atMoreIndented?(atMoreIndented=!1,state.result+=common.repeat(`
|
|
20
|
+
`,emptyLines+1)):emptyLines===0?didReadContent&&(state.result+=" "):state.result+=common.repeat(`
|
|
21
|
+
`,emptyLines):state.result+=common.repeat(`
|
|
22
|
+
`,didReadContent?1+emptyLines:emptyLines),didReadContent=!0,detectedIndent=!0,emptyLines=0,captureStart=state.position;!is_EOL(ch)&&ch!==0;)ch=state.input.charCodeAt(++state.position);captureSegment(state,captureStart,state.position,!1)}return!0}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=!1,ch;if(state.firstTabInLine!==-1)return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);ch!==0&&(state.firstTabInLine!==-1&&(state.position=state.firstTabInLine,throwError(state,"tab characters must not be used in indentation")),!(ch!==45||(following=state.input.charCodeAt(state.position+1),!is_WS_OR_EOL(following))));){if(detected=!0,state.position++,skipSeparationSpace(state,!0,-1)&&state.lineIndent<=nodeIndent){_result.push(null),ch=state.input.charCodeAt(state.position);continue}if(_line=state.line,composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,!1,!0),_result.push(state.result),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),(state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a sequence entry");else if(state.lineIndent<nodeIndent)break}return detected?(state.tag=_tag,state.anchor=_anchor,state.kind="sequence",state.result=_result,!0):!1}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_keyLine,_keyLineStart,_keyPos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys=Object.create(null),keyTag=null,keyNode=null,valueNode=null,atExplicitKey=!1,detected=!1,ch;if(state.firstTabInLine!==-1)return!1;for(state.anchor!==null&&(state.anchorMap[state.anchor]=_result),ch=state.input.charCodeAt(state.position);ch!==0;){if(!atExplicitKey&&state.firstTabInLine!==-1&&(state.position=state.firstTabInLine,throwError(state,"tab characters must not be used in indentation")),following=state.input.charCodeAt(state.position+1),_line=state.line,(ch===63||ch===58)&&is_WS_OR_EOL(following))ch===63?(atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!0,allowCompact=!0):atExplicitKey?(atExplicitKey=!1,allowCompact=!0):throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),state.position+=1,ch=following;else{if(_keyLine=state.line,_keyLineStart=state.lineStart,_keyPos=state.position,!composeNode(state,flowIndent,CONTEXT_FLOW_OUT,!1,!0))break;if(state.line===_line){for(ch=state.input.charCodeAt(state.position);is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(ch===58)ch=state.input.charCodeAt(++state.position),is_WS_OR_EOL(ch)||throwError(state,"a whitespace character is expected after the key-value separator within a block mapping"),atExplicitKey&&(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),detected=!0,atExplicitKey=!1,allowCompact=!1,keyTag=state.tag,keyNode=state.result;else if(detected)throwError(state,"can not read an implicit mapping pair; a colon is missed");else return state.tag=_tag,state.anchor=_anchor,!0}else if(detected)throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key");else return state.tag=_tag,state.anchor=_anchor,!0}if((state.line===_line||state.lineIndent>nodeIndent)&&(atExplicitKey&&(_keyLine=state.line,_keyLineStart=state.lineStart,_keyPos=state.position),composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,!0,allowCompact)&&(atExplicitKey?keyNode=state.result:valueNode=state.result),atExplicitKey||(storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_keyLine,_keyLineStart,_keyPos),keyTag=keyNode=valueNode=null),skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position)),(state.line===_line||state.lineIndent>nodeIndent)&&ch!==0)throwError(state,"bad indentation of a mapping entry");else if(state.lineIndent<nodeIndent)break}return atExplicitKey&&storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos),detected&&(state.tag=_tag,state.anchor=_anchor,state.kind="mapping",state.result=_result),detected}function readTagProperty(state){var _position,isVerbatim=!1,isNamed=!1,tagHandle,tagName,ch;if(ch=state.input.charCodeAt(state.position),ch!==33)return!1;if(state.tag!==null&&throwError(state,"duplication of a tag property"),ch=state.input.charCodeAt(++state.position),ch===60?(isVerbatim=!0,ch=state.input.charCodeAt(++state.position)):ch===33?(isNamed=!0,tagHandle="!!",ch=state.input.charCodeAt(++state.position)):tagHandle="!",_position=state.position,isVerbatim){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&ch!==62);state.position<state.length?(tagName=state.input.slice(_position,state.position),ch=state.input.charCodeAt(++state.position)):throwError(state,"unexpected end of the stream within a verbatim tag")}else{for(;ch!==0&&!is_WS_OR_EOL(ch);)ch===33&&(isNamed?throwError(state,"tag suffix cannot contain exclamation marks"):(tagHandle=state.input.slice(_position-1,state.position+1),PATTERN_TAG_HANDLE.test(tagHandle)||throwError(state,"named tag handle cannot contain such characters"),isNamed=!0,_position=state.position+1)),ch=state.input.charCodeAt(++state.position);tagName=state.input.slice(_position,state.position),PATTERN_FLOW_INDICATORS.test(tagName)&&throwError(state,"tag suffix cannot contain flow indicator characters")}tagName&&!PATTERN_TAG_URI.test(tagName)&&throwError(state,"tag name cannot contain such characters: "+tagName);try{tagName=decodeURIComponent(tagName)}catch{throwError(state,"tag name is malformed: "+tagName)}return isVerbatim?state.tag=tagName:_hasOwnProperty$1.call(state.tagMap,tagHandle)?state.tag=state.tagMap[tagHandle]+tagName:tagHandle==="!"?state.tag="!"+tagName:tagHandle==="!!"?state.tag="tag:yaml.org,2002:"+tagName:throwError(state,'undeclared tag handle "'+tagHandle+'"'),!0}function readAnchorProperty(state){var _position,ch;if(ch=state.input.charCodeAt(state.position),ch!==38)return!1;for(state.anchor!==null&&throwError(state,"duplication of an anchor property"),ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an anchor node must contain at least one character"),state.anchor=state.input.slice(_position,state.position),!0}function readAlias(state){var _position,alias,ch;if(ch=state.input.charCodeAt(state.position),ch!==42)return!1;for(ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch);)ch=state.input.charCodeAt(++state.position);return state.position===_position&&throwError(state,"name of an alias node must contain at least one character"),alias=state.input.slice(_position,state.position),_hasOwnProperty$1.call(state.anchorMap,alias)||throwError(state,'unidentified alias "'+alias+'"'),state.result=state.anchorMap[alias],skipSeparationSpace(state,!0,-1),!0}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=!1,hasContent=!1,typeIndex,typeQuantity,typeList,type2,flowIndent,blockIndent;if(state.listener!==null&&state.listener("open",state),state.tag=null,state.anchor=null,state.kind=null,state.result=null,allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext,allowToSeek&&skipSeparationSpace(state,!0,-1)&&(atNewLine=!0,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)),indentStatus===1)for(;readTagProperty(state)||readAnchorProperty(state);)skipSeparationSpace(state,!0,-1)?(atNewLine=!0,allowBlockCollections=allowBlockStyles,state.lineIndent>parentIndent?indentStatus=1:state.lineIndent===parentIndent?indentStatus=0:state.lineIndent<parentIndent&&(indentStatus=-1)):allowBlockCollections=!1;if(allowBlockCollections&&(allowBlockCollections=atNewLine||allowCompact),(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext)&&(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext?flowIndent=parentIndent:flowIndent=parentIndent+1,blockIndent=state.position-state.lineStart,indentStatus===1?allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)?hasContent=!0:(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)?hasContent=!0:readAlias(state)?(hasContent=!0,(state.tag!==null||state.anchor!==null)&&throwError(state,"alias node should not have any properties")):readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)&&(hasContent=!0,state.tag===null&&(state.tag="?")),state.anchor!==null&&(state.anchorMap[state.anchor]=state.result)):indentStatus===0&&(hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent))),state.tag===null)state.anchor!==null&&(state.anchorMap[state.anchor]=state.result);else if(state.tag==="?"){for(state.result!==null&&state.kind!=="scalar"&&throwError(state,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state.kind+'"'),typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1)if(type2=state.implicitTypes[typeIndex],type2.resolve(state.result)){state.result=type2.construct(state.result),state.tag=type2.tag,state.anchor!==null&&(state.anchorMap[state.anchor]=state.result);break}}else if(state.tag!=="!"){if(_hasOwnProperty$1.call(state.typeMap[state.kind||"fallback"],state.tag))type2=state.typeMap[state.kind||"fallback"][state.tag];else for(type2=null,typeList=state.typeMap.multi[state.kind||"fallback"],typeIndex=0,typeQuantity=typeList.length;typeIndex<typeQuantity;typeIndex+=1)if(state.tag.slice(0,typeList[typeIndex].tag.length)===typeList[typeIndex].tag){type2=typeList[typeIndex];break}type2||throwError(state,"unknown tag !<"+state.tag+">"),state.result!==null&&type2.kind!==state.kind&&throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type2.kind+'", not "'+state.kind+'"'),type2.resolve(state.result,state.tag)?(state.result=type2.construct(state.result,state.tag),state.anchor!==null&&(state.anchorMap[state.anchor]=state.result)):throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}return state.listener!==null&&state.listener("close",state),state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=!1,ch;for(state.version=null,state.checkLineBreaks=state.legacy,state.tagMap=Object.create(null),state.anchorMap=Object.create(null);(ch=state.input.charCodeAt(state.position))!==0&&(skipSeparationSpace(state,!0,-1),ch=state.input.charCodeAt(state.position),!(state.lineIndent>0||ch!==37));){for(hasDirectives=!0,ch=state.input.charCodeAt(++state.position),_position=state.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);for(directiveName=state.input.slice(_position,state.position),directiveArgs=[],directiveName.length<1&&throwError(state,"directive name must not be less than one character in length");ch!==0;){for(;is_WHITE_SPACE(ch);)ch=state.input.charCodeAt(++state.position);if(ch===35){do ch=state.input.charCodeAt(++state.position);while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;for(_position=state.position;ch!==0&&!is_WS_OR_EOL(ch);)ch=state.input.charCodeAt(++state.position);directiveArgs.push(state.input.slice(_position,state.position))}ch!==0&&readLineBreak(state),_hasOwnProperty$1.call(directiveHandlers,directiveName)?directiveHandlers[directiveName](state,directiveName,directiveArgs):throwWarning(state,'unknown document directive "'+directiveName+'"')}if(skipSeparationSpace(state,!0,-1),state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45?(state.position+=3,skipSeparationSpace(state,!0,-1)):hasDirectives&&throwError(state,"directives end mark is expected"),composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,!1,!0),skipSeparationSpace(state,!0,-1),state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))&&throwWarning(state,"non-ASCII line breaks are interpreted as content"),state.documents.push(state.result),state.position===state.lineStart&&testDocumentSeparator(state)){state.input.charCodeAt(state.position)===46&&(state.position+=3,skipSeparationSpace(state,!0,-1));return}if(state.position<state.length-1)throwError(state,"end of the stream or a document separator is expected");else return}function loadDocuments(input,options){input=String(input),options=options||{},input.length!==0&&(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13&&(input+=`
|
|
23
|
+
`),input.charCodeAt(0)===65279&&(input=input.slice(1)));var state=new State$1(input,options),nullpos=input.indexOf("\0");for(nullpos!==-1&&(state.position=nullpos,throwError(state,"null byte is not allowed in input")),state.input+="\0";state.input.charCodeAt(state.position)===32;)state.lineIndent+=1,state.position+=1;for(;state.position<state.length-1;)readDocument(state);return state.documents}function loadAll$1(input,iterator,options){iterator!==null&&typeof iterator=="object"&&typeof options>"u"&&(options=iterator,iterator=null);var documents=loadDocuments(input,options);if(typeof iterator!="function")return documents;for(var index=0,length=documents.length;index<length;index+=1)iterator(documents[index])}function load$1(input,options){var documents=loadDocuments(input,options);if(documents.length!==0){if(documents.length===1)return documents[0];throw new exception("expected a single document in the stream, but found more")}}var loadAll_1=loadAll$1,load_1=load$1,loader={loadAll:loadAll_1,load:load_1},_toString=Object.prototype.toString,_hasOwnProperty=Object.prototype.hasOwnProperty,CHAR_BOM=65279,CHAR_TAB=9,CHAR_LINE_FEED=10,CHAR_CARRIAGE_RETURN=13,CHAR_SPACE=32,CHAR_EXCLAMATION=33,CHAR_DOUBLE_QUOTE=34,CHAR_SHARP=35,CHAR_PERCENT=37,CHAR_AMPERSAND=38,CHAR_SINGLE_QUOTE=39,CHAR_ASTERISK=42,CHAR_COMMA=44,CHAR_MINUS=45,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_GREATER_THAN=62,CHAR_QUESTION=63,CHAR_COMMERCIAL_AT=64,CHAR_LEFT_SQUARE_BRACKET=91,CHAR_RIGHT_SQUARE_BRACKET=93,CHAR_GRAVE_ACCENT=96,CHAR_LEFT_CURLY_BRACKET=123,CHAR_VERTICAL_LINE=124,CHAR_RIGHT_CURLY_BRACKET=125,ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(schema2,map2){var result,keys,index,length,tag,style,type2;if(map2===null)return{};for(result={},keys=Object.keys(map2),index=0,length=keys.length;index<length;index+=1)tag=keys[index],style=String(map2[tag]),tag.slice(0,2)==="!!"&&(tag="tag:yaml.org,2002:"+tag.slice(2)),type2=schema2.compiledTypeMap.fallback[tag],type2&&_hasOwnProperty.call(type2.styleAliases,style)&&(style=type2.styleAliases[style]),result[tag]=style;return result}function encodeHex(character){var string,handle,length;if(string=character.toString(16).toUpperCase(),character<=255)handle="x",length=2;else if(character<=65535)handle="u",length=4;else if(character<=4294967295)handle="U",length=8;else throw new exception("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+handle+common.repeat("0",length-string.length)+string}var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(options){this.schema=options.schema||_default,this.indent=Math.max(1,options.indent||2),this.noArrayIndent=options.noArrayIndent||!1,this.skipInvalid=options.skipInvalid||!1,this.flowLevel=common.isNothing(options.flowLevel)?-1:options.flowLevel,this.styleMap=compileStyleMap(this.schema,options.styles||null),this.sortKeys=options.sortKeys||!1,this.lineWidth=options.lineWidth||80,this.noRefs=options.noRefs||!1,this.noCompatMode=options.noCompatMode||!1,this.condenseFlow=options.condenseFlow||!1,this.quotingType=options.quotingType==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE,this.forceQuotes=options.forceQuotes||!1,this.replacer=typeof options.replacer=="function"?options.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function indentString(string,spaces){for(var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;position<length;)next=string.indexOf(`
|
|
24
|
+
`,position),next===-1?(line=string.slice(position),position=length):(line=string.slice(position,next+1),position=next+1),line.length&&line!==`
|
|
25
|
+
`&&(result+=ind),result+=line;return result}function generateNextLine(state,level){return`
|
|
26
|
+
`+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str2){var index,length,type2;for(index=0,length=state.implicitTypes.length;index<length;index+=1)if(type2=state.implicitTypes[index],type2.resolve(str2))return!0;return!1}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==CHAR_BOM||65536<=c&&c<=1114111}function isNsCharOrWhitespace(c){return isPrintable(c)&&c!==CHAR_BOM&&c!==CHAR_CARRIAGE_RETURN&&c!==CHAR_LINE_FEED}function isPlainSafe(c,prev,inblock){var cIsNsCharOrWhitespace=isNsCharOrWhitespace(c),cIsNsChar=cIsNsCharOrWhitespace&&!isWhitespace(c);return(inblock?cIsNsCharOrWhitespace:cIsNsCharOrWhitespace&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET)&&c!==CHAR_SHARP&&!(prev===CHAR_COLON&&!cIsNsChar)||isNsCharOrWhitespace(prev)&&!isWhitespace(prev)&&c===CHAR_SHARP||prev===CHAR_COLON&&cIsNsChar}function isPlainSafeFirst(c){return isPrintable(c)&&c!==CHAR_BOM&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_EQUALS&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function isPlainSafeLast(c){return!isWhitespace(c)&&c!==CHAR_COLON}function codePointAt(string,pos){var first=string.charCodeAt(pos),second;return first>=55296&&first<=56319&&pos+1<string.length&&(second=string.charCodeAt(pos+1),second>=56320&&second<=57343)?(first-55296)*1024+second-56320+65536:first}function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType,quotingType,forceQuotes,inblock){var i,char=0,prevChar=null,hasLineBreak=!1,hasFoldableLine=!1,shouldTrackWidth=lineWidth!==-1,previousLineBreak=-1,plain=isPlainSafeFirst(codePointAt(string,0))&&isPlainSafeLast(codePointAt(string,string.length-1));if(singleLineOnly||forceQuotes)for(i=0;i<string.length;char>=65536?i+=2:i++){if(char=codePointAt(string,i),!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}else{for(i=0;i<string.length;char>=65536?i+=2:i++){if(char=codePointAt(string,i),char===CHAR_LINE_FEED)hasLineBreak=!0,shouldTrackWidth&&(hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ",previousLineBreak=i);else if(!isPrintable(char))return STYLE_DOUBLE;plain=plain&&isPlainSafe(char,prevChar,inblock),prevChar=char}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" "}return!hasLineBreak&&!hasFoldableLine?plain&&!forceQuotes&&!testAmbiguousType(string)?STYLE_PLAIN:quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:indentPerLevel>9&&needIndentIndicator(string)?STYLE_DOUBLE:forceQuotes?quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE:hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey,inblock){state.dump=function(){if(string.length===0)return state.quotingType===QUOTING_TYPE_DOUBLE?'""':"''";if(!state.noCompatMode&&(DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1||DEPRECATED_BASE60_SYNTAX.test(string)))return state.quotingType===QUOTING_TYPE_DOUBLE?'"'+string+'"':"'"+string+"'";var indent=state.indent*Math.max(1,level),lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent),singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string2){return testImplicitResolving(state,string2)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity,state.quotingType,state.forceQuotes&&!iskey,inblock)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string)+'"';default:throw new exception("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"",clip=string[string.length-1]===`
|
|
27
|
+
`,keep=clip&&(string[string.length-2]===`
|
|
28
|
+
`||string===`
|
|
29
|
+
`),chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+`
|
|
30
|
+
`}function dropEndingNewline(string){return string[string.length-1]===`
|
|
31
|
+
`?string.slice(0,-1):string}function foldString(string,width){for(var lineRe=/(\n+)([^\n]*)/g,result=function(){var nextLF=string.indexOf(`
|
|
32
|
+
`);return nextLF=nextLF!==-1?nextLF:string.length,lineRe.lastIndex=nextLF,foldLine(string.slice(0,nextLF),width)}(),prevMoreIndented=string[0]===`
|
|
33
|
+
`||string[0]===" ",moreIndented,match;match=lineRe.exec(string);){var prefix=match[1],line=match[2];moreIndented=line[0]===" ",result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?`
|
|
34
|
+
`:"")+foldLine(line,width),prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;for(var breakRe=/ [^ ]/g,match,start=0,end,curr=0,next=0,result="";match=breakRe.exec(line);)next=match.index,next-start>width&&(end=curr>start?curr:next,result+=`
|
|
35
|
+
`+line.slice(start,end),start=end+1),curr=next;return result+=`
|
|
36
|
+
`,line.length-start>width&&curr>start?result+=line.slice(start,curr)+`
|
|
37
|
+
`+line.slice(curr+1):result+=line.slice(start),result.slice(1)}function escapeString(string){for(var result="",char=0,escapeSeq,i=0;i<string.length;char>=65536?i+=2:i++)char=codePointAt(string,i),escapeSeq=ESCAPE_SEQUENCES[char],!escapeSeq&&isPrintable(char)?(result+=string[i],char>=65536&&(result+=string[i+1])):result+=escapeSeq||encodeHex(char);return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state.replacer&&(value=state.replacer.call(object,String(index),value)),(writeNode(state,level,value,!1,!1)||typeof value>"u"&&writeNode(state,level,null,!1,!1))&&(_result!==""&&(_result+=","+(state.condenseFlow?"":" ")),_result+=state.dump);state.tag=_tag,state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1)value=object[index],state.replacer&&(value=state.replacer.call(object,String(index),value)),(writeNode(state,level+1,value,!0,!0,!1,!0)||typeof value>"u"&&writeNode(state,level+1,null,!0,!0,!1,!0))&&((!compact||_result!=="")&&(_result+=generateNextLine(state,level)),state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?_result+="-":_result+="- ",_result+=state.dump);state.tag=_tag,state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",_result!==""&&(pairBuffer+=", "),state.condenseFlow&&(pairBuffer+='"'),objectKey=objectKeyList[index],objectValue=object[objectKey],state.replacer&&(objectValue=state.replacer.call(object,objectKey,objectValue)),writeNode(state,level,objectKey,!1,!1)&&(state.dump.length>1024&&(pairBuffer+="? "),pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" "),writeNode(state,level,objectValue,!1,!1)&&(pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===!0)objectKeyList.sort();else if(typeof state.sortKeys=="function")objectKeyList.sort(state.sortKeys);else if(state.sortKeys)throw new exception("sortKeys must be a boolean or a function");for(index=0,length=objectKeyList.length;index<length;index+=1)pairBuffer="",(!compact||_result!=="")&&(pairBuffer+=generateNextLine(state,level)),objectKey=objectKeyList[index],objectValue=object[objectKey],state.replacer&&(objectValue=state.replacer.call(object,objectKey,objectValue)),writeNode(state,level+1,objectKey,!0,!0,!0)&&(explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024,explicitPair&&(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?pairBuffer+="?":pairBuffer+="? "),pairBuffer+=state.dump,explicitPair&&(pairBuffer+=generateNextLine(state,level)),writeNode(state,level+1,objectValue,!0,explicitPair)&&(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)?pairBuffer+=":":pairBuffer+=": ",pairBuffer+=state.dump,_result+=pairBuffer));state.tag=_tag,state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type2,style;for(typeList=explicit?state.explicitTypes:state.implicitTypes,index=0,length=typeList.length;index<length;index+=1)if(type2=typeList[index],(type2.instanceOf||type2.predicate)&&(!type2.instanceOf||typeof object=="object"&&object instanceof type2.instanceOf)&&(!type2.predicate||type2.predicate(object))){if(explicit?type2.multi&&type2.representName?state.tag=type2.representName(object):state.tag=type2.tag:state.tag="?",type2.represent){if(style=state.styleMap[type2.tag]||type2.defaultStyle,_toString.call(type2.represent)==="[object Function]")_result=type2.represent(object,style);else if(_hasOwnProperty.call(type2.represent,style))_result=type2.represent[style](object,style);else throw new exception("!<"+type2.tag+'> tag resolver accepts not "'+style+'" style');state.dump=_result}return!0}return!1}function writeNode(state,level,object,block,compact,iskey,isblockseq){state.tag=null,state.dump=object,detectType(state,object,!1)||detectType(state,object,!0);var type2=_toString.call(state.dump),inblock=block,tagStr;block&&(block=state.flowLevel<0||state.flowLevel>level);var objectOrArray=type2==="[object Object]"||type2==="[object Array]",duplicateIndex,duplicate;if(objectOrArray&&(duplicateIndex=state.duplicates.indexOf(object),duplicate=duplicateIndex!==-1),(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0)&&(compact=!1),duplicate&&state.usedDuplicates[duplicateIndex])state.dump="*ref_"+duplicateIndex;else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]&&(state.usedDuplicates[duplicateIndex]=!0),type2==="[object Object]")block&&Object.keys(state.dump).length!==0?(writeBlockMapping(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowMapping(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else if(type2==="[object Array]")block&&state.dump.length!==0?(state.noArrayIndent&&!isblockseq&&level>0?writeBlockSequence(state,level-1,state.dump,compact):writeBlockSequence(state,level,state.dump,compact),duplicate&&(state.dump="&ref_"+duplicateIndex+state.dump)):(writeFlowSequence(state,level,state.dump),duplicate&&(state.dump="&ref_"+duplicateIndex+" "+state.dump));else if(type2==="[object String]")state.tag!=="?"&&writeScalar(state,state.dump,level,iskey,inblock);else{if(type2==="[object Undefined]")return!1;if(state.skipInvalid)return!1;throw new exception("unacceptable kind of an object to dump "+type2)}state.tag!==null&&state.tag!=="?"&&(tagStr=encodeURI(state.tag[0]==="!"?state.tag.slice(1):state.tag).replace(/!/g,"%21"),state.tag[0]==="!"?tagStr="!"+tagStr:tagStr.slice(0,18)==="tag:yaml.org,2002:"?tagStr="!!"+tagStr.slice(18):tagStr="!<"+tagStr+">",state.dump=tagStr+" "+state.dump)}return!0}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;for(inspectNode(object,objects,duplicatesIndexes),index=0,length=duplicatesIndexes.length;index<length;index+=1)state.duplicates.push(objects[duplicatesIndexes[index]]);state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object=="object")if(index=objects.indexOf(object),index!==-1)duplicatesIndexes.indexOf(index)===-1&&duplicatesIndexes.push(index);else if(objects.push(object),Array.isArray(object))for(index=0,length=object.length;index<length;index+=1)inspectNode(object[index],objects,duplicatesIndexes);else for(objectKeyList=Object.keys(object),index=0,length=objectKeyList.length;index<length;index+=1)inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}function dump$1(input,options){options=options||{};var state=new State(options);state.noRefs||getDuplicateReferences(input,state);var value=input;return state.replacer&&(value=state.replacer.call({"":value},"",value)),writeNode(state,0,value,!0,!0)?state.dump+`
|
|
38
|
+
`:""}var dump_1=dump$1,dumper={dump:dump_1};function renamed(from,to){return function(){throw new Error("Function yaml."+from+" is removed in js-yaml 4. Use yaml."+to+" instead, which is now safe by default.")}}var Type=type,Schema=schema,FAILSAFE_SCHEMA=failsafe,JSON_SCHEMA=json,CORE_SCHEMA=core,DEFAULT_SCHEMA=_default,load=loader.load,loadAll=loader.loadAll,dump=dumper.dump,YAMLException=exception,types={binary,float,map,null:_null,pairs,set,timestamp,bool,int,merge,omap,seq,str},safeLoad=renamed("safeLoad","load"),safeLoadAll=renamed("safeLoadAll","loadAll"),safeDump=renamed("safeDump","dump"),jsYaml={Type,Schema,FAILSAFE_SCHEMA,JSON_SCHEMA,CORE_SCHEMA,DEFAULT_SCHEMA,load,loadAll,dump,YAMLException,types,safeLoad,safeLoadAll,safeDump},js_yaml_default=jsYaml;export{load,dump,js_yaml_default};
|
|
39
|
+
/*! Bundled license information:
|
|
40
|
+
|
|
41
|
+
js-yaml/dist/js-yaml.mjs:
|
|
42
|
+
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
|
43
|
+
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
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{normalizeFlagName,stripSensitiveAuthArgs}from"./chunk-QVXS234E.js";import{packageName}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 DEFAULT_LIST_LIMIT=20,MAX_LIST_LIMIT=100;function parseListLimit(value,{defaultLimit=DEFAULT_LIST_LIMIT,maxLimit=MAX_LIST_LIMIT}={}){if(value===void 0)return defaultLimit;if(!Number.isInteger(value)||value<1||value>maxLimit)throw new Error(`The --limit option must be an integer from 1 to ${maxLimit}.`);return value}var PaginationError=class extends Error{constructor(message){super(message),this.name="PaginationError"}};async function fetchAllPages(fetchPage,{maxPages=1e3}={}){let items=[],seen=new Set,next;for(let pages=0;pages<maxPages;pages++){let page=await fetchPage(next);if(items.push(...page.items),!page.next)return items;if(seen.has(page.next))throw new PaginationError("Pagination returned a cursor it already returned. The list is incomplete.");seen.add(page.next),next=page.next}throw new PaginationError(`Stopped after ${maxPages} pages. The list is incomplete. Use --limit and --next to page through it manually.`)}var CURSOR_FLAGS=new Set(["--next","-N"]);function quoteShellArg(value){return/^[A-Za-z0-9_./@:,=+-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}function getNextPageCommand(argv,next,dropFlags=[]){let args=stripSensitiveAuthArgs(argv.slice(2)),delimiter=args.indexOf("--"),own=delimiter===-1?args:args.slice(0,delimiter),passthrough=delimiter===-1?[]:args.slice(delimiter),kept=[];for(let i=0;i<own.length;i++){let arg=own[i],name=normalizeFlagName(arg);if(CURSOR_FLAGS.has(name)||dropFlags.includes(name)){!arg.includes("=")&&i+1<own.length&&i++;continue}if(/^-[A-Za-z]{2,}$/.test(arg)&&arg.includes("N")){kept.push(arg.replace(/N/g,"")),i+1<own.length&&i++;continue}kept.push(arg)}return kept.push(`--next=${next}`,...passthrough),`${packageName} ${kept.map(quoteShellArg).join(" ")}`}function printNextPageCommand(command,label="Next page"){output_manager_default.print(` ${label}:
|
|
8
|
+
${import_chalk.default.cyan(command)}
|
|
9
|
+
`)}function printNextPageHint(client,next,dropFlags=[]){next&&(output_manager_default.print(`
|
|
10
|
+
`),printNextPageCommand(getNextPageCommand(client.argv,next,dropFlags)))}export{DEFAULT_LIST_LIMIT,MAX_LIST_LIMIT,parseListLimit,PaginationError,fetchAllPages,getNextPageCommand,printNextPageCommand,printNextPageHint};
|
|
@@ -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 getProductionUrl(deployment){if(deployment.target!=="production"||!deployment.aliasAssigned||deployment.aliasError)return null;let domain=deployment.alias?.[0];return domain?`https://${domain}`:null}export{getProductionUrl};
|
|
@@ -0,0 +1,10 @@
|
|
|
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{linkCommand}from"./chunk-DKJL2KV7.js";import{quoteArg,teamCache}from"./chunk-F53OKXYI.js";import{arg_common_default,getFlagsSpecification,getGlobalFlagsFromArgs,normalizeFlagName,stripSensitiveAuthArgs,suggestionFlagTakesSeparateValue}from"./chunk-QVXS234E.js";import{LinkRequiredError,ProjectNotFound,isAPIError}from"./chunk-6VH56CX2.js";import{getCommandName,packageName}from"./chunk-JESNVRVR.js";import{recordCliError}from"./chunk-XP3FT56R.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{pkg_default}from"./chunk-OO572JUC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var AGENT_STATUS={ERROR:"error",ACTION_REQUIRED:"action_required",OK:"ok"},AGENT_REASON={MISSING_ARGUMENTS:"missing_arguments",INVALID_ARGUMENTS:"invalid_arguments",CONFIRMATION_REQUIRED:"confirmation_required",INTERACTIVE_CONFIRMATION_REQUIRED:"interactive_confirmation_required",LOGIN_REQUIRED:"login_required",PROJECT_SETTINGS_REQUIRED:"project_settings_required",NOT_LINKED:"not_linked",NOT_FOUND:"not_found",PROJECT_NOT_FOUND:"project_not_found",MISSING_SCOPE:"missing_scope",SCOPE_NOT_ACCESSIBLE:"scope_not_accessible",AGENT_CANNOT_SWITCH:"agent_cannot_switch",API_ERROR:"api_error",STDIN_ERROR:"stdin_error",RATE_LIMITED:"rate_limited",NETWORK_ERROR:"network_error",UNKNOWN_COMMAND:"unknown_command",SEGMENT_IN_USE:"segment_in_use",ENTITY_IN_USE:"entity_in_use",MISSING_REQUIREMENTS:"missing_requirements",MISSING_NAME:"missing_name",MISSING_VALUE:"missing_value",MISSING_ENVIRONMENT:"missing_environment",ENV_NOT_FOUND:"env_not_found",MULTIPLE_ENVS:"multiple_envs",ENV_FILE_EXISTS:"env_file_exists",GIT_BRANCH_REQUIRED:"git_branch_required",ENV_KEY_SENSITIVE:"env_key_sensitive",AMBIGUOUS_ROUTE:"ambiguous_route",ROUTE_CREATE_FAILED:"route_create_failed",ROUTE_GENERATION_FAILED:"route_generation_failed",DOMAIN_NOT_FOUND:"domain_not_found",PRICE_CHANGED:"price_changed",CONFLICT:"conflict",DOMAIN_NOT_AVAILABLE:"domain_not_available",TLD_NOT_SUPPORTED:"tld_not_supported",PAYMENT_FAILED:"payment_failed",UNKNOWN_OUTCOME:"unknown_outcome",DNS_RECORD_NOT_FOUND:"dns_record_not_found",INCOMPLETE_RECORD:"incomplete_record",PERMISSION_DENIED:"permission_denied",INVALID_PORT:"invalid_port",INVALID_DNS_TYPE:"invalid_dns_type",DNS_ADD_FAILED:"dns_add_failed",INVALID_DOMAIN:"invalid_domain",CONFIGURED_CORRECTLY:"configured_correctly",VERIFICATION_NEEDED:"verification_needed",INVALID_CONFIGURATION:"invalid_configuration",DNS_CHANGE_REQUIRED:"dns_change_required",DNS_CHANGE_RECOMMENDED:"dns_change_recommended",DNSSEC_NEEDS_TO_BE_DISABLED:"dnssec_needs_to_be_disabled",PROJECT_ATTACHMENT_RECOMMENDED:"project_attachment_recommended",PROJECT_DOMAIN_MISSING:"project_domain_missing",INTEGRATION_TERMS_ACCEPTANCE_REQUIRED:"integration_terms_acceptance_required",INTEGRATION_SETUP_REQUIRED:"integration_setup_required",HAS_RESOURCES:"has_resources",INTEGRATION_SANDBOX_CLAIM_REQUIRED:"integration_sandbox_claim_required",CLASSIC_TOKEN_REQUIRED:"classic_token_required",TOKEN_USER_SCOPE_REQUIRED:"token_user_scope_required",MISSING_URL:"missing_url",MISSING_EVENTS:"missing_events",INVALID_URL:"invalid_url",INVALID_EVENT:"invalid_event",INVALID_BUDGET:"invalid_budget",INVALID_REFRESH_PERIOD:"invalid_refresh_period",INVALID_EXPIRATION:"invalid_expiration",INVALID_ALERT_THRESHOLDS:"invalid_alert_thresholds",REQUIRES_CONSENT:"requires_consent",MISSING_ISSUER_ID:"missing_issuer_id",MISSING_KEY:"missing_key",MISSING_KEY_ID:"missing_key_id",MISSING_PROJECT:"missing_project",ISSUER_NOT_FOUND:"issuer_not_found",ISSUER_MANAGED:"issuer_managed",ISSUER_REQUIRES_IMPORTED_KEY:"issuer_requires_imported_key",ISSUER_REQUIRES_GENERATED_KEY:"issuer_requires_generated_key",KEY_NOT_REVOKING:"key_not_revoking",NO_CHANGES_REQUESTED:"no_changes_requested",GIT_REPOSITORY_REQUIRED:"git_repository_required",CI_RUN_NOT_FOUND:"ci_run_not_found",CI_RUN_IN_PROGRESS:"ci_run_in_progress",CI_RUN_NOT_RETRYABLE:"ci_run_not_retryable",SCHEDULES_NOT_ENABLED:"schedules_not_enabled",SCHEDULE_ALREADY_EXISTS:"schedule_already_exists",SCHEDULE_SINGLE_AT_PASSED:"schedule_single_at_passed",SCHEDULE_ALREADY_ACTIVE:"schedule_already_active",STATIC_SCHEDULE:"static_schedule",INVALID_CRON_EXPRESSION:"invalid_cron_expression",INVALID_JITTER:"invalid_jitter",JITTER_EXCEEDS_CADENCE:"jitter_exceeds_cadence",SINGLE_AT_TOO_SOON:"single_at_too_soon",SCHEDULE_PAYLOAD_TOO_LARGE:"payload_too_large",SCHEDULE_PAYLOAD_STORE_FAILED:"payload_store_failed",SCHEDULE_SERVICE_UNAVAILABLE:"service_unavailable",SCHEDULE_SERVICE_ERROR:"service_error",REDIRECT_NOT_FOUND:"redirect_not_found",VERSION_NOT_FOUND:"version_not_found",VERSION_ALREADY_LIVE:"version_already_live",VERSION_IS_STAGING:"version_is_staging",PLAN_UPGRADE_REQUIRED:"plan_upgrade_required",PLAN_LIMIT:"plan_limit",NOT_TEAM_MEMBER:"not_team_member",INVALID_ROLE_COMBINATION:"invalid_role_combination",TARGET_CONFLICT:"target_conflict",DEPRECATED:"deprecated",LIMIT_CLAMPED:"limit_clamped",METRICS_UNAVAILABLE:"metrics_unavailable",STREAM_GAP:"stream_gap",INCOMPLETE_RESULTS:"incomplete_results"},USAGE_ERROR_REASONS=new Set(["invalid_arguments","missing_arguments","unknown_command","missing_command","invalid_environment","invalid_type","missing_id","missing_value","missing_name","missing_flags","missing_clients","invalid_clients","conflicting_type_flags","missing_environment","invalid_slug","invalid_name","invalid_alert_thresholds","invalid_budget","invalid_dns_type","invalid_event","invalid_expiration","invalid_port","invalid_refresh_period","invalid_role_combination","invalid_url","missing_events","missing_issuer_id","missing_key_id","missing_key","missing_url"]);function getExitCodeForReason(reason){return reason!==void 0&&USAGE_ERROR_REASONS.has(reason)?2:1}var AGENT_ACTION={MISSING_ARGUMENTS:"missing_arguments",CONFIRMATION_REQUIRED:"confirmation_required",LOGIN_REQUIRED:"login_required"};var import_error_utils=__toESM(require_dist(),1);var OBSERVABILITY_PLUS_PURCHASE_COMMAND="buy addon observability-plus",PRIORITY_PROJECT_ENABLE_COMMAND="project priority enable",BUY_PRO_COMMAND="buy pro",PROJECT_ENABLE_COMMAND="project observability enable";function mentionsObservabilityPlus(message){return/observability\s+plus/i.test(message)}function mentionsPriorityProject(message){return/priority\s+project/i.test(message)||/priority\s+tier/i.test(message)}function observabilityPlusDenialReason(error){if(!error||typeof error!="object"||!("meta"in error))return;let meta=error.meta;if(meta&&typeof meta=="object"&&"reason"in meta&&typeof meta.reason=="string")return meta.reason}function observabilityPlusPurchaseHint(){return`Subscribe with ${getCommandName(OBSERVABILITY_PLUS_PURCHASE_COMMAND)}.`}function isHobbyLikePlan(plan){return plan==="hobby"||plan==="oss"}function isProOrEnterprisePlan(plan){return plan==="pro"||plan==="enterprise"}function currentTeamPlan(client){let id=client?.config?.currentTeam;if(id)return teamCache.get(id)?.billing?.plan}function planForTeam(idOrSlug){return teamCache.get(idOrSlug)?.billing?.plan}function buyProFix(hint){return{command:BUY_PRO_COMMAND,hint:hint??`Upgrade with ${getCommandName(BUY_PRO_COMMAND)}.`,when:"a person has approved upgrading the plan"}}function observabilityPlusPurchaseFix(){return{command:OBSERVABILITY_PLUS_PURCHASE_COMMAND,hint:observabilityPlusPurchaseHint(),when:"a person has approved buying the add-on"}}function inferDenialReason(message){if(/(?:disabled|switched off|re-enable)/i.test(message))return"subscription_disabled";if(/excluded from it|include the project/i.test(message))return"project_excluded";if(/upgrade your plan/i.test(message)&&/pro and enterprise/i.test(message))return"plan_upgrade_required";if(/(?:quota|usage limit|query limit)/i.test(message))return"quota"}function plusNeedsPlanUpgradeHint(){return`Observability Plus is available on Pro and Enterprise. Upgrade with ${getCommandName(BUY_PRO_COMMAND)}. The add-on cannot be purchased on Hobby.`}function observabilityPlusRecovery(message,denialReason,plan){if(mentionsObservabilityPlus(message))switch(denialReason??inferDenialReason(message)){case"subscription_disabled":return{hint:"Observability Plus is disabled. Ask a team owner to enable it for the intended team or project, then retry. A new subscription may not be needed."};case"project_excluded":return{command:PROJECT_ENABLE_COMMAND,excludeFlags:["--non-interactive","--project","--yes"],hint:`Observability Plus is on for the team, but this project is excluded. Enable it with ${getCommandName(PROJECT_ENABLE_COMMAND)}. A new subscription is not needed.`,preserveProject:!1,when:"a person has approved enabling Observability Plus for this project"};case"plan_upgrade_required":return buyProFix(plusNeedsPlanUpgradeHint());case"quota":return{hint:"The usage limit was reached. Ask a team owner to review the limit before retrying."};default:return isHobbyLikePlan(plan)?buyProFix(plusNeedsPlanUpgradeHint()):{...observabilityPlusPurchaseFix(),hint:`Check whether Observability Plus is disabled for this project or the team needs a subscription. Enable it if already subscribed. Otherwise, ${observabilityPlusPurchaseHint()}`,when:"the team has no subscription and a person has approved buying the add-on"}}}function priorityProjectRecovery(message,plan){if(mentionsPriorityProject(message))return isHobbyLikePlan(plan)?buyProFix(`Priority Projects are only available on Pro or Enterprise team plans. Upgrade with ${getCommandName(BUY_PRO_COMMAND)}, then run ${getCommandName(PRIORITY_PROJECT_ENABLE_COMMAND)}.`):{command:PRIORITY_PROJECT_ENABLE_COMMAND,excludeFlags:["--non-interactive","--project","--yes"],hint:getCommandName(PRIORITY_PROJECT_ENABLE_COMMAND),preserveProject:!1,when:"user runs this command in an interactive terminal"}}function observabilityPlanRecovery(message,denialReason,plan){return priorityProjectRecovery(message,plan)??observabilityPlusRecovery(message,denialReason,plan)}var PROJECT_POSITIONAL_COMMANDS=new Set([PRIORITY_PROJECT_ENABLE_COMMAND,PROJECT_ENABLE_COMMAND]);function currentTeamScope(client){let id=client?.config?.currentTeam;if(id)return teamCache.get(id)?.slug??id}function targetRecovery(fix,target){if(!fix)return;let targeted=command=>{let out=command;return target.projectName&&PROJECT_POSITIONAL_COMMANDS.has(command)&&(out+=` ${quoteArg(target.projectName)}`),target.scope&&(out+=` --scope ${quoteArg(target.scope)}`),out},hint=fix.hint;for(let command of[BUY_PRO_COMMAND,OBSERVABILITY_PLUS_PURCHASE_COMMAND,PRIORITY_PROJECT_ENABLE_COMMAND,PROJECT_ENABLE_COMMAND])hint=hint.split(getCommandName(command)).join(getCommandName(targeted(command)));if(!fix.command)return{...fix,hint};let excludeFlags=new Set(fix.excludeFlags??[]),preserveProject=fix.preserveProject;return target.projectName&&PROJECT_POSITIONAL_COMMANDS.has(fix.command)&&(excludeFlags.add("--project"),preserveProject=!1),fix.command===BUY_PRO_COMMAND&&excludeFlags.add("--project"),target.scope&&(excludeFlags.add("--scope"),excludeFlags.add("--team")),{...fix,command:targeted(fix.command),hint,...excludeFlags.size?{excludeFlags:Array.from(excludeFlags)}:{},...preserveProject!==void 0?{preserveProject}:{}}}function clientObservabilityPlanRecovery(client,error,message,projectName,scope){return targetRecovery(observabilityPlanRecovery(message,observabilityPlusDenialReason(error),scope?planForTeam(scope):currentTeamPlan(client)),{projectName,scope:scope??currentTeamScope(client)})}function errorContext(client){let teamId=client?.config?.currentTeam;return teamId?client?.teams?.find(team=>team.id===teamId||team.slug===teamId)?.slug??teamCache.get(teamId)?.slug:client?.user?.username||client?.user?.email}function getErrorRecovery(error,client){let reason=error.reason?.toLowerCase(),scope=errorContext(client);if(error.status===403||["forbidden","permission_denied","scope_not_accessible"].includes(reason??""))return{hint:`Check that the selected team is correct${scope?` (${scope})`:""}. If it is, ask a team owner to grant the required access. Retry only after the team or access changes.`,retryable:!1,userActionRequired:!0,...scope&&{scope},...error.action&&{action:error.action},...error.resource&&{resource:error.resource}};if(error.status===401||reason==="not_authorized")return{hint:"Provide valid credentials for the intended account and team, then retry.",retryable:!1,userActionRequired:!0};if(error.status===402||["payment_required","plan_upgrade_required"].includes(reason??"")){let message=error.serverMessage??error.message??"";return{hint:observabilityPlanRecovery(message,observabilityPlusDenialReason(error),currentTeamPlan(client))?.hint??(/(?:disabled|switched off|re-enable)/i.test(message)?"Enable the feature for the selected team or project, then retry.":/(?:overdue|payment method|unpaid|balance)/i.test(message)?"Ask a team owner to resolve the billing issue, then retry.":/(?:plan|subscription)/i.test(message)?"Ask a team owner to confirm the required plan or subscription before changing billing. Retry after access is enabled.":"Check the billing or feature requirement reported above with a team owner. Retry after that requirement is resolved."),retryable:!1,userActionRequired:!0,...scope&&{scope}}}if(error.status===429||reason==="rate_limited"){let wait=error.retryAfterMs;return{hint:typeof wait=="number"&&Number.isFinite(wait)&&wait>0?`Wait at least ${Math.ceil(wait/1e3)} seconds before trying again.`:wait==="never"?"This request cannot be retried with the current limit. Ask a team owner to review the limit.":"The request limit was reached. Wait before trying again; no retry time was provided.",retryable:wait!=="never",...typeof wait=="number"&&Number.isFinite(wait)&&wait>0&&{retryAfterMs:wait}}}return{}}import{randomUUID}from"node:crypto";function agentErrorMetadata(client){return client.isAgent?{cliVersion:pkg_default.version,invocationId:client.telemetryEventStore?.currentInvocationId}:{}}function agentErrorCategory(reason){return/^(forbidden|permission_denied|scope_not_accessible)$/i.test(reason)?"permission":/^(payment_required|plan_upgrade_required)$/i.test(reason)?"billing":/^(not_authorized|login_required)$/i.test(reason)?"authentication":/^(rate_limited|too_many_requests)$/i.test(reason)?"rate_limit":/^(invalid_arguments|unknown_command|ARG_UNKNOWN_OPTION)$/i.test(reason)?"usage":/^(link_required|project_not_found|not_found)$/i.test(reason)?"project_context":"other"}function trackAgentError(client,error){!client.isAgent||!client.telemetryEventStore||client.telemetryEventStore.add({id:randomUUID(),eventTime:Date.now(),key:"agent_error",value:JSON.stringify({invocationId:client.telemetryEventStore.currentInvocationId,category:agentErrorCategory(error.reason),hasRecovery:!!error.hint,retryable:error.retryable,userActionRequired:error.userActionRequired})})}function isHelpInvocation(argv){let args=argv.slice(2),separator=args.indexOf("--");return args.slice(0,separator<0?args.length:separator).some(arg=>arg==="--help"||arg==="-h")}function trackAgentCommandOutcome(client,exitCode){if(!client.isAgent||!client.telemetryEventStore)return;let help=isHelpInvocation(client.argv);client.telemetryEventStore.add({id:randomUUID(),eventTime:Date.now(),key:"agent_command_outcome",value:JSON.stringify({invocationId:client.telemetryEventStore.currentInvocationId,exitCode,outcome:help&&(exitCode===0||exitCode===2)?"help":exitCode===0?"success":"failure"})})}function buildCommandWithYes(argv,pkgName=packageName){let args=stripSensitiveAuthArgs(argv.slice(2)),out=args.some(a=>a==="--yes"||a==="-y")?args:[...args,"--yes"];return`${pkgName} ${out.join(" ")}`.trim()}function redactEnvValueArgs(argv){let redacted=[...argv];for(let i=0;i<redacted.length;i++)redacted[i]==="--value"&&i+1<redacted.length?(redacted[i+1]='"<value>"',i++):redacted[i].startsWith("--value=")&&(redacted[i]='--value="<value>"');return redacted}var GLOBAL_FLAG_NAMES=new Set(["--cwd","--config","--yes","-y","--non-interactive","--scope","--team","-S","-T"]),GLOBAL_FLAG_SHORTHANDS={"-y":"--yes","-S":"--scope","-T":"--team"};function canonicalGlobalFlagName(name){return GLOBAL_FLAG_SHORTHANDS[name]??name}function getGlobalFlagsFromArgv(argv){let args=getGlobalFlagsFromArgs(argv.slice(2),{preserveConfig:!0,preserveYes:!0}),out=[];for(let i=0;i<args.length;i++){let arg=args[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;GLOBAL_FLAG_NAMES.has(name)&&(out.push(arg),suggestionFlagTakesSeparateValue(name)&&!arg.includes("=")&&i+1<args.length&&!args[i+1].startsWith("-")&&(out.push(args[i+1]),i++))}return out}function omitGlobalFlagsFromArgs(args){let safeArgs=stripSensitiveAuthArgs(args),out=[];for(let i=0;i<safeArgs.length;i++){let arg=safeArgs[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;if(GLOBAL_FLAG_NAMES.has(name)){suggestionFlagTakesSeparateValue(name)&&!arg.includes("=")&&i+1<safeArgs.length&&!safeArgs[i+1].startsWith("-")&&i++;continue}out.push(arg)}return out}function buildIntegrationCommandTailFromArgv(argv){let args=argv.slice(2),idx=args.indexOf("integration");return idx===-1?"integration":omitGlobalFlagsFromArgs(args.slice(idx)).join(" ")}function buildCommandWithGlobalFlags(argv,commandTemplate,pkgName=packageName,options){let preserved=options?.globalFlags==="all"?getGlobalFlagsFromArgs(argv.slice(2),{preserveProject:options.preserveProject}):getGlobalFlagsFromArgv(argv);if(options?.globalFlags!=="all"&&options?.preserveProject){let globalArgs=getGlobalFlagsFromArgs(argv.slice(2)),contextArgs=getGlobalFlagsFromArgs(argv.slice(2),{preserveProject:!0});preserved.push(...contextArgs.slice(globalArgs.length))}let exclude=new Set(commandTemplate.split(/\s+/).filter(token=>token.startsWith("-")).map(token=>canonicalGlobalFlagName(token.split("=")[0])));for(let flag of options?.excludeFlags??[])exclude.add(canonicalGlobalFlagName(flag));if(exclude.size){let out=[];for(let i=0;i<preserved.length;i++){let arg=preserved[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;if(exclude.has(canonicalGlobalFlagName(name))){!arg.includes("=")&&i+1<preserved.length&&!preserved[i+1].startsWith("-")&&i++;continue}out.push(arg)}preserved=out}let base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:options?.prependGlobalFlags?`${pkgName} ${preserved.join(" ")} ${commandTemplate}`:`${base} ${preserved.join(" ")}`}function withGlobalFlags(client,commandTemplate,options={}){return buildCommandWithGlobalFlags(client.argv,commandTemplate,packageName,{globalFlags:"all",preserveProject:options.preserveProject})}function getPreservedArgsAfterEnvSubcommand(argv,subcommands,positionalCount){let args=stripSensitiveAuthArgs(argv.slice(2)),envIdx=args.findIndex((arg,index)=>arg==="env"&&subcommands.includes(args[index+1])),subcommandIdx=envIdx+1;if(envIdx===-1)return args;let preserved=[],positionals=0,optionsEnded=!1;for(let i=subcommandIdx+1;i<args.length;i++){let arg=args[i];if(arg==="--"&&!optionsEnded){optionsEnded=!0;continue}if(!optionsEnded&&arg.startsWith("-")){let flag=arg==="-e"?"--environment":arg;preserved.push(flag),!flag.includes("=")&&suggestionFlagTakesSeparateValue(flag)&&i+1<args.length&&!args[i+1].startsWith("-")&&preserved.push(args[++i]);continue}if(positionals<positionalCount){positionals++;continue}optionsEnded&&!preserved.includes("--")&&preserved.push("--"),preserved.push(arg)}return preserved}function omitPreservedFlagsAlreadyInTemplate(args,commandTemplate){let templateFlags=new Set(commandTemplate.split(/\s+/).filter(token=>token.startsWith("-")).map(token=>canonicalGlobalFlagName(token.split("=")[0]))),out=[];for(let i=0;i<args.length;i++){let arg=args[i],name=arg.startsWith("-")?arg.split("=")[0]:arg;if(!templateFlags.has(canonicalGlobalFlagName(name))){out.push(arg);continue}!arg.includes("=")&&suggestionFlagTakesSeparateValue(name)&&i+1<args.length&&!args[i+1].startsWith("-")&&i++}return out}function getPreservedArgsForEnvAdd(argv){return getPreservedArgsAfterEnvSubcommand(argv,["add"],3)}function buildEnvAddCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvAdd(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}function getPreservedArgsForEnvPull(argv){return getPreservedArgsAfterEnvSubcommand(argv,["pull"],1)}function getPreservedArgsForEnvRm(argv){return getPreservedArgsAfterEnvSubcommand(argv,["rm","remove"],3)}function buildEnvRmCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvRm(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}var LINK_FLAGS={...arg_common_default(),...getFlagsSpecification(linkCommand.options)};function getLinkSuggestionArgs(args){let out=[];for(let i=0;i<args.length;i++){let arg=args[i];if(!arg.startsWith("-"))continue;let spec=LINK_FLAGS[normalizeFlagName(arg)],handler=typeof spec=="string"?LINK_FLAGS[spec]:spec,hasSeparateValue=!arg.includes("=")&&i+1<args.length&&!args[i+1].startsWith("-");if(handler===void 0){hasSeparateValue&&suggestionFlagTakesSeparateValue(arg)&&i++;continue}out.push(arg),hasSeparateValue&&handler!==Boolean&&out.push(args[++i])}return out}function getPreservedArgsForEnvUpdate(argv){return getPreservedArgsAfterEnvSubcommand(argv,["update"],3)}function buildEnvUpdateCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvUpdate(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}function buildCommandWithScope(argv,scopeSlug,pkgName=packageName){let args=stripSensitiveAuthArgs(argv.slice(2)),out=[];for(let i=0;i<args.length;i++){if(args[i]==="--scope"||args[i]==="--team"||args[i]==="-S"||args[i]==="-T"){i++;continue}args[i].startsWith("--scope=")||args[i].startsWith("--team=")||out.push(args[i])}return out.push("--scope",scopeSlug),`${pkgName} ${out.join(" ")}`}function enrichActionRequiredWithInvokingCommand(payload,argv){if(payload.reason!=="missing_scope"||!payload.choices?.length)return payload;let next=[],linkCommand2=buildCommandWithGlobalFlags(argv,"link",packageName,{preserveProject:!0,excludeFlags:["--scope","--team"]});for(let choice of payload.choices){let slug=choice.name;next.push({command:`${linkCommand2} --scope ${slug}`,when:"Link first (then run any command without --scope)"}),next.push({command:buildCommandWithScope(argv,slug),when:"Run this command with scope (no link)"})}return{...payload,next}}function outputActionRequired(client,payload,exitCode=getExitCodeForReason(payload.reason)){shouldEmitNonInteractiveCommandError(client)&&(writeActionRequired(client,payload),process.exit(exitCode))}function writeActionRequired(client,payload){let enriched=enrichActionRequiredWithInvokingCommand(payload,client.argv);!enriched.hint&&enriched.next?.length&&(enriched.hint="Run one of the commands in next[] to complete without prompting."),recordCliError({code:payload.reason}),client.stdout.write(`${JSON.stringify(enriched,null,2)}
|
|
8
|
+
`)}function argvHasNonInteractive(argv){if(!argv?.length)return!1;for(let i=0;i<argv.length;i++){let a=argv[i];if(a==="--non-interactive")return argv[i+1]!=="false";if(a.startsWith("--non-interactive="))return a.slice(18)!=="false"}return!1}function shouldEmitNonInteractiveCommandError(client){return client.nonInteractive||argvHasNonInteractive(client.argv??[])}function outputAgentError(client,payload,exitCode=getExitCodeForReason(payload.reason)){shouldEmitNonInteractiveCommandError(client)&&(writeAgentError(client,payload),process.exit(exitCode))}function writeAgentError(client,payload){let enriched={...getErrorRecovery(payload,client),...payload,...agentErrorMetadata(client)};recordCliError({code:payload.reason,reportOnSuccess:!0}),trackAgentError(client,enriched),client.stdout.write(`${JSON.stringify(enriched,null,2)}
|
|
9
|
+
`)}function outputAgentSuccess(client,payload,exitCode=0){shouldEmitNonInteractiveCommandError(client)&&(!payload.hint&&payload.next?.length&&(payload.hint="Follow up with one of the commands in next[]."),client.stdout.write(`${JSON.stringify(payload,null,2)}
|
|
10
|
+
`),process.exit(exitCode))}function buildNextStepsForGlobalConfig(client){return[{command:buildCommandWithGlobalFlags(client.argv,"global-config list"),when:"List Global Config stores in the current team scope"},{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Switch to the team that owns the Global Config"},{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"Verify the current team or user scope"}]}var GLOBAL_CONFIG_NON_INTERACTIVE_HINT="Global Config commands use your current team scope. Pass --scope or run `vercel teams switch` if the store is missing.",LIST_ERROR_HINT="Project names are team-scoped. Use --scope when the project belongs to another team, or `list --all` to list deployments across all projects.";function buildNextStepsForList(client,projectName){return[projectName?{command:buildCommandWithGlobalFlags(client.argv,`project ls --query ${projectName}`),when:"Search projects matching the attempted name to find the right one"}:{command:buildCommandWithGlobalFlags(client.argv,"project ls --query <name>"),when:"Search projects by name substring to find the right one (replace <name>)"},{command:buildCommandWithGlobalFlags(client.argv,"list --all"),when:"List deployments across all projects in the current scope"},{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Re-link this directory to the correct Vercel project"}]}function buildNextStepsForProjectSubcommands(client,variant){let byName=variant==="access-groups"?{template:"project access-groups <name>",when:"List access groups by project name (replace <name>)"}:variant==="access-summary"?{template:"project access-summary <name>",when:"Show role counts by project name (replace <name>)"}:variant==="protection"?{template:"project protection <name>",when:"Show deployment protection by project name (replace <name>)"}:variant==="update"?{template:"project update <name> --framework <slug>",when:"Update a framework preset by project name (replace <name> and <slug>)"}:variant==="speed-insights"?{template:"project speed-insights <name>",when:"Enable Speed Insights by project name (replace <name>)"}:variant==="web-analytics"?{template:"project web-analytics <name>",when:"Enable Web Analytics by project name (replace <name>)"}:variant==="observability"?{template:"project observability enable <name>",when:"Enable Observability Plus by project name (replace <name>)"}:variant==="checks"?{template:"project checks add <name>",when:"Create a deployment check by project name (replace <name>)"}:variant==="inspect"?{template:"project inspect <name>",when:"Inspect a project by name (replace <name>)"}:variant==="resume"?{template:"project resume <name>",when:"Resume production traffic by project name (replace <name>)"}:{template:"project members <name>",when:"List members by project name (replace <name>)"};return[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Re-link this directory to the correct Vercel project"},{command:buildCommandWithGlobalFlags(client.argv,byName.template),when:byName.when},{command:buildCommandWithGlobalFlags(client.argv,"project ls"),when:"List projects in the current team to pick a name"}]}var PROJECT_SUBCOMMAND_ERROR_HINT="If you use --cwd, ensure that folder is linked to the right project, or pass an explicit project name. Use --scope when the project belongs to another team.";function resolveNonInteractiveDefaults(client,variant){return variant==="global-config"?{next:buildNextStepsForGlobalConfig(client),hint:GLOBAL_CONFIG_NON_INTERACTIVE_HINT}:variant==="list"?{next:buildNextStepsForList(client),hint:LIST_ERROR_HINT}:{next:buildNextStepsForProjectSubcommands(client,variant),hint:PROJECT_SUBCOMMAND_ERROR_HINT}}function writeAgentErrorPayloadAndExit(client,payload,exitCode,variant){let defaults=["link_required","project_not_found","not_found"].includes(payload.reason)?resolveNonInteractiveDefaults(client,variant):{},out={...payload,next:payload.next??defaults.next,hint:payload.hint??defaults.hint};writeAgentError(client,out),process.exit(exitCode)}function isProjectNotFoundLike(err){return!!(err instanceof ProjectNotFound||(0,import_error_utils.isError)(err)&&"code"in err&&err.code==="PROJECT_NOT_FOUND")}function isLinkRequiredLike(err){return err instanceof LinkRequiredError}function normalizeApiErrorText(message){return message.replace(/\s*\(\d{3}\)\s*$/,"").trim()}function exitWithNonInteractiveError(client,err,exitCode=1,options={variant:"members"}){if(!shouldEmitNonInteractiveCommandError(client))return;let{variant}=options;if(isLinkRequiredLike(err)){if(variant==="global-config"){writeAgentErrorPayloadAndExit(client,{status:"error",reason:"link_required",message:err instanceof Error?err.message:String(err),next:buildNextStepsForGlobalConfig(client),hint:GLOBAL_CONFIG_NON_INTERACTIVE_HINT},exitCode,"global-config");return}writeAgentErrorPayloadAndExit(client,{status:"error",reason:"link_required",message:err instanceof Error?err.message:String(err)},exitCode,variant);return}if(isProjectNotFoundLike(err)){writeAgentErrorPayloadAndExit(client,{status:"error",reason:"project_not_found",message:err instanceof Error?err.message:String(err),...variant==="list"&&options.projectName?{next:buildNextStepsForList(client,options.projectName)}:{}},exitCode,variant);return}if(isAPIError(err)){let rawMessage=err.serverMessage||err.message,message=normalizeApiErrorText(rawMessage),reason=err.status===403?"forbidden":err.status===402?"payment_required":err.status===401?"not_authorized":err.status===404?variant==="global-config"?"not_found":"project_not_found":err.status===429?"rate_limited":"api_error";writeAgentErrorPayloadAndExit(client,{status:"error",reason,message,...getErrorRecovery(err,client),...err.action&&{action:err.action},...err.resource&&{resource:err.resource}},exitCode,variant)}writeAgentErrorPayloadAndExit(client,{status:"error",reason:"unexpected_error",message:err instanceof Error?err.message:String(err)},exitCode,variant)}function openUrlInBrowserCommand(url){return process.platform==="win32"?`start ${url}`:process.platform==="darwin"?`open '${url}'`:`xdg-open '${url}'`}export{AGENT_STATUS,AGENT_REASON,getExitCodeForReason,AGENT_ACTION,PRIORITY_PROJECT_ENABLE_COMMAND,BUY_PRO_COMMAND,isProOrEnterprisePlan,buyProFix,targetRecovery,clientObservabilityPlanRecovery,getErrorRecovery,agentErrorMetadata,trackAgentError,isHelpInvocation,trackAgentCommandOutcome,buildCommandWithYes,redactEnvValueArgs,getGlobalFlagsFromArgv,omitGlobalFlagsFromArgs,buildIntegrationCommandTailFromArgv,buildCommandWithGlobalFlags,withGlobalFlags,getPreservedArgsForEnvAdd,buildEnvAddCommandWithPreservedArgs,getPreservedArgsForEnvPull,getPreservedArgsForEnvRm,buildEnvRmCommandWithPreservedArgs,getLinkSuggestionArgs,getPreservedArgsForEnvUpdate,buildEnvUpdateCommandWithPreservedArgs,outputActionRequired,writeActionRequired,argvHasNonInteractive,shouldEmitNonInteractiveCommandError,outputAgentError,writeAgentError,outputAgentSuccess,exitWithNonInteractiveError,openUrlInBrowserCommand};
|
|
@@ -0,0 +1,22 @@
|
|
|
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_open}from"./chunk-PVASGBEF.js";import{getTeams}from"./chunk-FGFLTLEA.js";import{printError}from"./chunk-HSFKISDH.js";import{deviceAccessTokenRequest,deviceAuthorizationRequest,getUser,humanizePath,isOAuthError,processDeviceAuthorizationResponse,processTokenResponse}from"./chunk-4N6LMERQ.js";import{getCommandName}from"./chunk-JESNVRVR.js";import{emoji,output_manager_default}from"./chunk-XP3FT56R.js";import{require_ansi_escapes}from"./chunk-YHPPP3SF.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1),open=__toESM(require_open(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);import readline from"node:readline";import{KNOWN_AGENTS}from"@vercel/detect-agent";async function updateCurrentTeamAfterLogin(client,ssoTeamId){if(ssoTeamId)client.updateConfig({currentTeam:ssoTeamId});else{let user=null;try{user=await getUser(client)}catch{return output_manager_default.error("Failed to fetch the logged in user. Please try again."),1}client.updateConfig({currentTeam:user.version==="northstar"&&user.defaultTeamId?user.defaultTeamId:void 0})}}function getSignupVerificationUrl(verificationUriComplete,email){let deviceUrl=new URL(verificationUriComplete),signupUrl=new URL("/signup",deviceUrl.origin);return signupUrl.searchParams.set("email",email),signupUrl.searchParams.set("autoSubmit","1"),signupUrl.searchParams.set("next",`${deviceUrl.pathname}${deviceUrl.search}`),signupUrl.toString()}async function performDeviceCodeFlow(client,options){let deviceAuthorizationResponse=await deviceAuthorizationRequest({refresh_token:options?.refreshToken,acr_values:options?.acrValues});output_manager_default.debug(`'Device Authorization response:', ${await deviceAuthorizationResponse.clone().text()}`);let[deviceAuthorizationError,deviceAuthorization]=await processDeviceAuthorizationResponse(deviceAuthorizationResponse);if(deviceAuthorizationError)return options?.fallbackToLoginOnStepUpFailure&&options.refreshToken&&isOAuthError(deviceAuthorizationError)&&(deviceAuthorizationError.code==="invalid_grant"||deviceAuthorizationError.code==="invalid_scope")?(output_manager_default.debug(`Step-up device authorization failed: ${deviceAuthorizationError.cause.message}`),output_manager_default.log("Couldn't refresh the saved login. Starting a new login."),performDeviceCodeFlow(client,options.teamId?{teamId:options.teamId}:void 0)):(printError(isOAuthError(deviceAuthorizationError)?deviceAuthorizationError.cause:deviceAuthorizationError),null);let{device_code,user_code,verification_uri,expiresAt,interval}=deviceAuthorization,{verification_uri_complete}=deviceAuthorization;if(options?.teamId){let url=new URL(verification_uri_complete);url.searchParams.set("team_id",options.teamId),verification_uri_complete=url.toString()}let isCursorAgent=client.agentName===KNOWN_AGENTS.CURSOR||client.agentName===KNOWN_AGENTS.CURSOR_CLI,shouldSkipBrowser=process.env.CI&&!isCursorAgent,browserUrl=verification_uri_complete;if(options?.signupEmail?(browserUrl=getSignupVerificationUrl(verification_uri_complete,options.signupEmail),output_manager_default.log(`
|
|
8
|
+
Visit ${import_chalk.default.bold(output_manager_default.link(new URL(browserUrl).host+"/signup",browserUrl,{color:!1,fallback:()=>browserUrl}))} to create your account with ${import_chalk.default.bold(options.signupEmail)} (device code ${import_chalk.default.bold(user_code)}).
|
|
9
|
+
`)):output_manager_default.log(`
|
|
10
|
+
Visit ${import_chalk.default.bold(output_manager_default.link(verification_uri.replace("https://",""),verification_uri_complete,{color:!1,fallback:()=>verification_uri_complete}))}${output_manager_default.supportsHyperlink?` and enter ${import_chalk.default.bold(user_code)}`:""}
|
|
11
|
+
`),!shouldSkipBrowser)try{(await open.default(browserUrl)).on("error",error=>{output_manager_default.debug(`Failed to open browser: ${error}`)})}catch(error){output_manager_default.debug(`Failed to open browser: ${error}`),client.isAgent&&client.nonInteractive&&(output_manager_default.log(`
|
|
12
|
+
${import_chalk.default.yellow("\u26A0")} ${import_chalk.default.bold("Browser could not be opened automatically.")}
|
|
13
|
+
`),output_manager_default.log(`Please ask the user to manually visit the URL above and complete the authentication process.
|
|
14
|
+
`))}let rl=readline.createInterface({input:process.stdin,output:process.stdout}).on("SIGINT",()=>{process.exit(0)});output_manager_default.spinner("Waiting for authentication...");let intervalMs=interval*1e3,result=null,flowError=new Error("Timed out waiting for authentication. Please try again.");async function pollForToken(){for(;Date.now()<expiresAt;){let[tokenResponseError,tokenResponse]=await deviceAccessTokenRequest({device_code});if(tokenResponseError){if(tokenResponseError.message.includes("timeout")){intervalMs*=2,output_manager_default.debug(`Connection timeout. Slowing down, polling every ${intervalMs/1e3}s...`),await wait(intervalMs);continue}return tokenResponseError}output_manager_default.debug(`'Device Access Token response:', ${await tokenResponse.clone().text()}`);let[tokensError,tokens]=await processTokenResponse(tokenResponse);if(isOAuthError(tokensError)){let{code}=tokensError;switch(code){case"authorization_pending":await wait(intervalMs);continue;case"slow_down":intervalMs+=5*1e3,output_manager_default.debug(`Authorization server requests to slow down. Polling every ${intervalMs/1e3}s...`),await wait(intervalMs);continue;default:return tokensError.cause}}if(tokensError)return tokensError;output_manager_default.print((0,import_ansi_escapes.eraseLines)(2)),result={access_token:tokens.access_token,expires_in:tokens.expires_in,refresh_token:tokens.refresh_token};return}}return flowError=await pollForToken(),output_manager_default.stopSpinner(),rl.close(),flowError?(printError(flowError),null):result}async function login(client,telemetry,standalone=!0){let tokens=await performDeviceCodeFlow(client);return tokens?(await saveDeviceCodeTokens(client,tokens),standalone?output_manager_default.print(`
|
|
15
|
+
${import_chalk.default.cyan("Congratulations!")} You are now signed in.
|
|
16
|
+
|
|
17
|
+
To deploy something, run ${getCommandName()}.
|
|
18
|
+
To set up the Vercel plugin and connect your coding agents to the AI Gateway, run ${getCommandName("setup")}.
|
|
19
|
+
|
|
20
|
+
${emoji("tip")} To deploy every commit automatically,
|
|
21
|
+
connect a Git Repository (${import_chalk.default.bold(output_manager_default.link("vercel.link/git","https://vercel.link/git",{color:!1}))}).
|
|
22
|
+
`):output_manager_default.success("Logged in."),telemetry.trackState("success"),0):(telemetry.trackState("error"),1)}async function saveDeviceCodeTokens(client,tokens){let runTeam=client.config.currentTeam,previousTeamId=client.ignoresSavedTeam?client.savedTeam:runTeam;if(client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token}),previousTeamId){let isMember=!0;try{isMember=(await getTeams(client)).some(team=>team.id===previousTeamId)}catch{}isMember||(output_manager_default.warn("Your previously selected team is no longer accessible; switching to your default scope."),client.updateConfig({currentTeam:void 0}),await updateCurrentTeamAfterLogin(client))}else client.updateConfig({currentTeam:void 0}),await updateCurrentTeamAfterLogin(client);client.persistAuthConfig(),client.writeToConfigFile(),client.ignoresSavedTeam&&(client.config.currentTeam=runTeam),output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`)}async function wait(intervalMs){await new Promise(resolve=>setTimeout(resolve,intervalMs))}export{getSignupVerificationUrl,performDeviceCodeFlow,login,saveDeviceCodeTokens};
|
|
@@ -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 SENTRY_DSN="https://26a24e59ba954011919a524b341b6ab5@o205439.ingest.us.sentry.io/1323225",BUILD_LABEL=void 0;export{SENTRY_DSN,BUILD_LABEL};
|
|
@@ -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,yesOption}from"./chunk-QVXS234E.js";import{packageName}from"./chunk-JESNVRVR.js";var agentOption={name:"agent",shorthand:null,type:[String],argument:"NAME",deprecated:!1,description:"Select a coding agent (repeatable); plugin setup supports claude-code, codex, and opencode"},dryRunOption={name:"dry-run",shorthand:null,type:Boolean,deprecated:!1,description:"Show what would change without writing any files"},pluginSubcommand={name:"plugin",aliases:[],description:"Install or update the Vercel plugin for Claude Code, Codex, and OpenCode",arguments:[],options:[{...agentOption,description:"Select claude-code, codex, or opencode (repeatable)"},dryRunOption,yesOption],examples:[{name:"Install the Vercel plugin for every detected agent",value:`${packageName} setup plugin`},{name:"Install the Vercel plugin for Codex",value:`${packageName} setup plugin --agent codex`}]},gatewaySubcommand={name:"gateway",aliases:[],description:"Connect local coding agents to the AI Gateway",arguments:[],options:[{...agentOption,description:"Select a coding agent (repeatable)"},{name:"all",shorthand:null,type:Boolean,deprecated:!1,description:"Configure every supported coding agent"},{name:"key",shorthand:null,type:String,argument:"KEY",deprecated:!1,description:"Use an existing AI Gateway API key instead of creating one"},{name:"reconfigure",shorthand:null,type:Boolean,deprecated:!1,description:"Re-run even if already configured, to rotate the key or switch team"},{name:"no-session-migration",shorthand:null,type:Boolean,deprecated:!1,description:"Do not copy existing Codex Desktop sessions for use with the Vercel AI Gateway provider."},dryRunOption,yesOption],examples:[{name:"Connect detected coding agents to the AI Gateway",value:`${packageName} setup gateway`},{name:"Preview the AI Gateway changes for Claude Code",value:`${packageName} setup gateway --agent claude-code --dry-run`}]},skillsSubcommand={name:"skills",aliases:[],description:"Write the vercel-cli agent skill that ships with this CLI version to ~/.agents/skills, or to --output",arguments:[],options:[{name:"output",shorthand:"o",type:String,argument:"PATH",deprecated:!1,description:"Directory to write the skill into (default: ~/.agents/skills/vercel-cli)"},{name:"dry-run",shorthand:null,type:Boolean,deprecated:!1,description:"Show what would change without writing any files"},formatOption,jsonOption],examples:[{name:"Write the Vercel CLI skill to ~/.agents/skills/vercel-cli",value:`${packageName} setup skills`},{name:"Update the skill after upgrading the CLI",value:`${packageName} setup skills`},{name:"Preview what would change",value:`${packageName} setup skills --dry-run`},{name:"Write the skill into a project or custom agent directory",value:`${packageName} setup skills --output .agents/skills/vercel-cli`}]},setupCommand={name:"setup",aliases:[],description:"Set up your machine for Vercel: install the Vercel plugin for Claude Code, Codex, and OpenCode and connect local coding agents to the AI Gateway",arguments:[],runsWithoutSubcommand:!0,subcommands:[pluginSubcommand,gatewaySubcommand,skillsSubcommand],options:[{name:"plugin",shorthand:null,type:Boolean,deprecated:!0,description:"DEPRECATED: Use `vercel setup plugin` instead"},{name:"gateway",shorthand:null,type:Boolean,deprecated:!0,description:"DEPRECATED: Use `vercel setup gateway` instead"},agentOption,dryRunOption,yesOption],examples:[{name:"Set up everything (prompts for each step)",value:`${packageName} setup`},{name:"Only connect coding agents to the AI Gateway",value:`${packageName} setup gateway`},{name:"Install the Vercel plugin for Codex",value:`${packageName} setup plugin --agent codex`},{name:"Preview what setup would change",value:`${packageName} setup --dry-run`},{name:"Run setup without prompts",value:`${packageName} setup --yes`},{name:"Write the Vercel CLI skill that matches this CLI version",value:`${packageName} setup skills`}]};export{pluginSubcommand,gatewaySubcommand,skillsSubcommand,setupCommand};
|
|
@@ -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{getExitCodeForErrorCode}from"./chunk-RW3X523R.js";import{AGENT_REASON,buildCommandWithGlobalFlags,getExitCodeForReason,outputAgentError}from"./chunk-WDXW6A4H.js";import{isJSONObject}from"./chunk-4N6LMERQ.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{readFileSync}from"fs";import{resolve}from"path";var MONITORS_API={basePath:"/alerts/v3/monitors",itemKey:"monitor",listKey:"monitors",typesKey:"monitorTypes",idKey:"monitorId"},ALERT_RULES_API={basePath:"/alerts/v3/alert-rules",itemKey:"rule",listKey:"rules",typesKey:"ruleTypes",idKey:"ruleId"};function rulesCollectionPath(api,teamId,options={}){let query=new URLSearchParams({teamId});return options.limit!==void 0&&query.set("limit",String(options.limit)),options.cursor&&query.set("cursor",options.cursor),options.projectId&&query.set("projectId",options.projectId),options.type&&query.set("type",options.type),`${api.basePath}?${query.toString()}`}function rulesItemPath(api,teamId,ruleId){let query=new URLSearchParams({teamId});return`${api.basePath}/${encodeURIComponent(ruleId)}?${query.toString()}`}function ruleNotificationsPath(api,teamId,ruleId){let query=new URLSearchParams({teamId});return`${api.basePath}/${encodeURIComponent(ruleId)}/notifications?${query.toString()}`}function rulesNotificationsPath(api,teamId,options={}){let query=new URLSearchParams({teamId});return options.limit!==void 0&&query.set("limit",String(options.limit)),options.cursor&&query.set("cursor",options.cursor),`${api.basePath}/notifications?${query.toString()}`}function rulesNotificationLinksPath(api,teamId,ruleId){let query=new URLSearchParams({teamId});return`${api.basePath}/${encodeURIComponent(ruleId)}/notifications/links?${query.toString()}`}function rulesSchemaPath(api,teamId,type){let query=new URLSearchParams({teamId});return type&&query.set("type",type),`${api.basePath}/schema?${query.toString()}`}async function fetchRule(client,api,scope,ruleId){return(await client.fetch(rulesItemPath(api,scope.teamId,ruleId)))[api.itemKey]}function getIssues(error){return Array.isArray(error.issues)?error.issues.filter(issue=>isJSONObject(issue)&&typeof issue.path=="string"&&typeof issue.message=="string"):[]}function outputRulesError(client,jsonOutput,code,message,options={}){let issues=options.issues??[],issueSummary=issues.slice(0,5).map(issue=>`${issue.path||"body"}: ${issue.message}`).join("; "),exitCode=options.reason!==void 0?getExitCodeForReason(options.reason):getExitCodeForErrorCode(code);return outputAgentError(client,{status:"error",reason:options.reason??AGENT_REASON.INVALID_ARGUMENTS,message,hint:options.hint??(issueSummary||void 0)},exitCode),jsonOutput?client.stdout.write(`${JSON.stringify({error:{code,message,...issues.length?{issues}:{}}},null,2)}
|
|
8
|
+
`):output_manager_default.fatal([message,...issues.map(issue=>` ${issue.path}: ${issue.message}`)].join(`
|
|
9
|
+
`)),exitCode}function handleRulesApiError(client,err,jsonOutput){let message=err.status===401?"You do not have access to monitors in this team. Ensure your role can manage Alert Rules, or pass --token and --scope.":err.status===403?err.serverMessage||"You do not have permission to manage monitors in this team.":err.status>=500?`The monitors endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`:err.serverMessage||`API error (${err.status}).`;return outputRulesError(client,jsonOutput,err.code||"API_ERROR",message,{reason:err.status===401?"not_authorized":err.status===403?"forbidden":err.status===404?AGENT_REASON.NOT_FOUND:err.status===429?"rate_limited":AGENT_REASON.API_ERROR,issues:getIssues(err),hint:err.status===401||err.status===403?"Confirm the team with `vercel whoami`; use --scope <team-slug> if the monitor belongs to another team.":void 0})}var LEGACY_BODY_FIELDS=["alertTypes","customAlert","queryJsonString"];function readRuleBody(client,bodyPath,jsonOutput){let raw;try{raw=readFileSync(resolve(client.cwd,bodyPath),"utf8")}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS",`Could not read --body file: ${bodyPath}`)}let parsed;try{parsed=JSON.parse(raw)}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","Invalid JSON in --body file.")}return isJSONObject(parsed)?LEGACY_BODY_FIELDS.some(field=>Object.hasOwn(parsed,field))?outputRulesError(client,jsonOutput,"LEGACY_ALERT_RULE_BODY","This body uses the previous alert-rules shape. Rewrite it using the current schema.",{hint:"Run `vercel monitors schema --type built-in` for examples."}):parsed:outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","The --body file must contain a JSON object.")}function getBodyType(body){return body.type==="built-in"||body.type==="custom"?body.type:void 0}function emitRulesArgParseError(client,err,recoverWithProjectFlag){let message=err instanceof Error?err.message:String(err),projectFlagMissingArg=message.includes("--project")&&message.includes("requires argument");outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:projectFlagMissingArg?"`--project` requires a project name or id (for example `--project my-app`).":message,next:[{command:buildCommandWithGlobalFlags(client.argv,projectFlagMissingArg?recoverWithProjectFlag:"monitors --help"),when:projectFlagMissingArg?"Retry with a project name or id":"See valid `monitors` subcommands"}]},2)}export{MONITORS_API,ALERT_RULES_API,rulesCollectionPath,rulesItemPath,ruleNotificationsPath,rulesNotificationsPath,rulesNotificationLinksPath,rulesSchemaPath,fetchRule,outputRulesError,handleRulesApiError,readRuleBody,getBodyType,emitRulesArgParseError};
|
|
@@ -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 getCommandFlags(argv,excludeFlags=[]){let flags=Object.keys(argv).filter(key=>key!=="--token"&&!excludeFlags.includes(key)).map(key=>`${key}${typeof argv[key]!="boolean"?" "+argv[key]:""}`);return flags.length>0?` ${flags.join(" ")}`:""}export{getCommandFlags};
|