vercel 62.2.0 → 62.5.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/dist/chunks/{add-7HJR3HK7.js → add-HN4OXQLM.js} +1 -1
- package/dist/chunks/add-SUDX7R63.js +8 -0
- package/dist/chunks/add-UNQJB3SM.js +8 -0
- package/dist/chunks/build-BRMOQZHW.js +7 -0
- package/dist/chunks/{chunk-C6ITILVT.js → chunk-2E6XILZC.js} +1 -1
- package/dist/chunks/{chunk-I46LFJJG.js → chunk-2FQCZE6S.js} +1 -1
- package/dist/chunks/{chunk-7T4CJ6MJ.js → chunk-2Z47VG5H.js} +1 -1
- package/dist/chunks/{chunk-2RQFMCPJ.js → chunk-35QK5NDD.js} +1 -1
- package/dist/chunks/{chunk-MCCL762Q.js → chunk-3J2P52OU.js} +1 -1
- package/dist/chunks/{chunk-GASSNHZG.js → chunk-4AY4YYKS.js} +1 -1
- package/dist/chunks/{chunk-743NGLUN.js → chunk-4BRFG5HP.js} +1 -1
- package/dist/chunks/chunk-4CACOKMS.js +7 -0
- package/dist/chunks/{chunk-RINZXCDJ.js → chunk-4WS3D23J.js} +1 -1
- package/dist/chunks/chunk-5CSWEE7J.js +7 -0
- package/dist/chunks/{chunk-PV5YI2ZZ.js → chunk-5IPBCD7K.js} +1 -1
- package/dist/chunks/{chunk-6JU3QZ3O.js → chunk-5NSYN7IO.js} +1 -1
- package/dist/chunks/{chunk-HYW4A5B3.js → chunk-5QVOIOPN.js} +5 -5
- package/dist/chunks/{chunk-3GUBYJN6.js → chunk-65Z5UPUC.js} +1 -1
- package/dist/chunks/{chunk-WOKSTB3F.js → chunk-6ALOD3OE.js} +1 -1
- package/dist/chunks/{chunk-7JFK53D4.js → chunk-6C4RPAG7.js} +1 -1
- package/dist/chunks/{chunk-KREBNPHL.js → chunk-6LOW7CGD.js} +9 -5
- package/dist/chunks/{chunk-DQ2KI6FO.js → chunk-72YTT324.js} +1 -1
- package/dist/chunks/chunk-733ZK37Y.js +7 -0
- package/dist/chunks/chunk-774D3BGN.js +7 -0
- package/dist/chunks/chunk-7SNMU7U7.js +7 -0
- package/dist/chunks/chunk-AJT64XO2.js +21 -0
- package/dist/chunks/{chunk-MK3CTSDV.js → chunk-AMSFO2VK.js} +1 -1
- package/dist/chunks/{chunk-N7XPPYQQ.js → chunk-B3MYIRFE.js} +1 -1
- package/dist/chunks/{chunk-FA6O7FPC.js → chunk-C7SLCL3Z.js} +2 -2
- package/dist/chunks/{chunk-CQ3RAERR.js → chunk-CAAD55US.js} +1 -1
- package/dist/chunks/{chunk-UWO3M2L2.js → chunk-D6JBONML.js} +1 -1
- package/dist/chunks/{chunk-VDOJERIW.js → chunk-DOWDSQPG.js} +1 -1
- package/dist/chunks/{chunk-6NPXWN5F.js → chunk-DQXGNNPB.js} +1 -1
- package/dist/chunks/{chunk-EQHNA4BW.js → chunk-DWPCZHDT.js} +1 -1
- package/dist/chunks/chunk-DZZFEAM6.js +7 -0
- package/dist/chunks/chunk-EA3BJUUK.js +7 -0
- package/dist/chunks/{chunk-NESZV33T.js → chunk-EDDOQXEI.js} +1 -1
- package/dist/chunks/chunk-EJNFKH6Y.js +10 -0
- package/dist/chunks/chunk-EPBZNTIJ.js +9 -0
- package/dist/chunks/{chunk-N4PVXHAJ.js → chunk-G3NHWIPJ.js} +1 -1
- package/dist/chunks/chunk-GXNSAACA.js +7 -0
- package/dist/chunks/{chunk-C3XFIO5L.js → chunk-H3QRCTIJ.js} +1 -1
- package/dist/chunks/{chunk-SM5JI6QM.js → chunk-HRQQ2N5B.js} +1 -1
- package/dist/chunks/{chunk-B5PFD6Q3.js → chunk-HVJERSGE.js} +1 -1
- package/dist/chunks/{chunk-6BZCSVH6.js → chunk-ILR6YA2A.js} +1 -1
- package/dist/chunks/{chunk-S2LBGLRE.js → chunk-JNLWD6DK.js} +1 -1
- package/dist/chunks/{chunk-VGXFOQ4P.js → chunk-L57FNGBV.js} +1 -1
- package/dist/chunks/{chunk-S5CEIACD.js → chunk-LG4JQAY7.js} +1 -1
- package/dist/chunks/chunk-LGFCHU75.js +8 -0
- package/dist/chunks/chunk-LSF7FY6X.js +7 -0
- package/dist/chunks/{chunk-NT67T6DL.js → chunk-M4IWOZEG.js} +1 -1
- package/dist/chunks/{chunk-R3B67TKQ.js → chunk-MCOJUSDV.js} +1 -1
- package/dist/chunks/{chunk-KG5BMLOI.js → chunk-MHKDLJEI.js} +1 -1
- package/dist/chunks/chunk-MJWC4W6J.js +10 -0
- package/dist/chunks/{chunk-D5VTBRWF.js → chunk-MOLEXKVC.js} +1 -1
- package/dist/chunks/{chunk-LCWCTL6L.js → chunk-MQW6DKD2.js} +1 -1
- package/dist/chunks/{chunk-EWWFNMPZ.js → chunk-MR423MWE.js} +3 -1
- package/dist/chunks/{chunk-MKY5IBKK.js → chunk-MUJP4VPF.js} +1 -1
- package/dist/chunks/chunk-NDZOUAFO.js +9 -0
- package/dist/chunks/{chunk-V6MR45PD.js → chunk-NNP5NITU.js} +1 -1
- package/dist/chunks/chunk-NTRM6VO6.js +9 -0
- package/dist/chunks/{chunk-LCY4SULE.js → chunk-O552UV4H.js} +1 -1
- package/dist/chunks/chunk-O5A7CNRV.js +7 -0
- package/dist/chunks/{chunk-KOSM3DYE.js → chunk-OQVE2WXX.js} +1 -1
- package/dist/chunks/{chunk-X47XV2WG.js → chunk-OYWYHFXV.js} +1 -1
- package/dist/chunks/{chunk-WN6OXK2F.js → chunk-P3YADO62.js} +1 -1
- package/dist/chunks/{chunk-K5WTLFS6.js → chunk-P3ZZVBZQ.js} +1 -1
- package/dist/chunks/{chunk-7POWBJDF.js → chunk-P4BGC5RL.js} +3 -3
- package/dist/chunks/{chunk-DECIQZZQ.js → chunk-PD3ZD52Q.js} +3 -3
- package/dist/chunks/{chunk-SDGWKUST.js → chunk-PQV3QNDG.js} +1 -1
- package/dist/chunks/{chunk-LQBC5QPO.js → chunk-PTKSYVXM.js} +1 -1
- package/dist/chunks/{chunk-4HXRTNAK.js → chunk-PY6YO4MR.js} +2 -2
- package/dist/chunks/{chunk-YMM3VY3J.js → chunk-QCOPZAUC.js} +1 -1
- package/dist/chunks/{chunk-7IRKF3ZG.js → chunk-QMTPSHRV.js} +4 -4
- package/dist/chunks/chunk-RERUTI3O.js +9 -0
- package/dist/chunks/{chunk-HWWHR7H3.js → chunk-RHUAFRZX.js} +1 -1
- package/dist/chunks/chunk-S54ISKGR.js +9 -0
- package/dist/chunks/{chunk-HLVUEYOZ.js → chunk-ST2X5QRA.js} +1 -1
- package/dist/chunks/chunk-SX64OM5A.js +7 -0
- package/dist/chunks/{chunk-L46BHPRD.js → chunk-TEYG3UZQ.js} +1 -1
- package/dist/chunks/{chunk-ZUYWATU5.js → chunk-TG6SMD7D.js} +1 -1
- package/dist/chunks/{chunk-U6N2RNDI.js → chunk-TN4IR2LY.js} +1 -1
- package/dist/chunks/{chunk-XQQGQ55A.js → chunk-TNGDWVMX.js} +1 -1
- package/dist/chunks/{chunk-7ANQHBBE.js → chunk-U4C2LU7H.js} +1 -1
- package/dist/chunks/{chunk-C5KVTG2O.js → chunk-UKC3NSS6.js} +1 -1
- package/dist/chunks/{chunk-A752WDCH.js → chunk-UXAYYF6I.js} +1 -1
- package/dist/chunks/{chunk-JO3XBFR3.js → chunk-VMHUBZRU.js} +1 -1
- package/dist/chunks/{chunk-JSKSNCK2.js → chunk-W45NZSSK.js} +1 -1
- package/dist/chunks/{chunk-UOHVKN6N.js → chunk-W6M24BQ4.js} +2 -2
- package/dist/chunks/{chunk-E4RLHRDF.js → chunk-WJZV7BI4.js} +1 -1
- package/dist/chunks/{vlt-builder-graph-B4DFIUS6.js → chunk-WKZ6JSGZ.js} +1 -1
- package/dist/chunks/{chunk-Z4VR6CQ2.js → chunk-WNG72BRT.js} +1 -1
- package/dist/chunks/chunk-WOTPEBSH.js +11 -0
- package/dist/chunks/chunk-X7F3567X.js +7 -0
- package/dist/chunks/{chunk-ACCZWEKL.js → chunk-X7U35FBE.js} +1 -1
- package/dist/chunks/chunk-XMV7OSFJ.js +9 -0
- package/dist/chunks/chunk-YW5R6XQI.js +7 -0
- package/dist/chunks/chunk-ZFYW4CEL.js +8 -0
- package/dist/chunks/{chunk-7I23VXBQ.js → chunk-ZTUQEA2X.js} +1 -1
- package/dist/chunks/{chunk-VTMLKJVQ.js → chunk-ZX2JOGOA.js} +1 -1
- package/dist/chunks/{chunk-N5MNZPPJ.js → chunk-ZXDS7NJI.js} +1 -1
- package/dist/chunks/clear-M6LODAMD.js +8 -0
- package/dist/chunks/{compile-vercel-config-2IC23CNT.js → compile-vercel-config-NBX5UWHW.js} +1 -1
- package/dist/chunks/{config-T3WHONFJ.js → config-Q3TRA4NK.js} +1 -1
- package/dist/chunks/config-YQ7FIAFK.js +8 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-VYU65KTS.js → connect-git-provider-67DJOI6X.js} +1 -1
- package/dist/chunks/{constants-NCE2LWSS.js → constants-G4UYVLOF.js} +1 -1
- package/dist/chunks/delete-KSZ7R5V6.js +10 -0
- package/dist/chunks/delete-NRWKSTCN.js +9 -0
- package/dist/chunks/{detect-projects-GJF4VXQI.js → detect-projects-AWDCPVLE.js} +1 -1
- package/dist/chunks/{detect-services-K3363KB7.js → detect-services-MWYUJZJZ.js} +1 -1
- package/dist/chunks/disable-BUGWQUS7.js +7 -0
- package/dist/chunks/discard-J5O3C753.js +14 -0
- package/dist/chunks/edit-DMOIBVEP.js +8 -0
- package/dist/chunks/edit-YRWAXGEI.js +9 -0
- package/dist/chunks/enable-IL27VHSU.js +7 -0
- package/dist/chunks/{exec-3RMS2X6B.js → exec-GYSSNCNK.js} +1 -1
- package/dist/chunks/{export-CMP3APAJ.js → export-HBUUGMGE.js} +2 -2
- package/dist/chunks/{future-GS7ZLJ3N.js → future-BXETJ6CT.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-2HHUYGHU.js → generate-cert-for-deploy-K5QDHEEQ.js} +1 -1
- package/dist/chunks/image-M2XIQYXT.js +7 -0
- package/dist/chunks/import-builders-UGIWTKRS.js +7 -0
- package/dist/chunks/inspect-HASOG2PB.js +13 -0
- package/dist/chunks/inspect-OGUGKPVK.js +9 -0
- package/dist/chunks/{inspect-KYFVYFWX.js → inspect-SUEMHSB6.js} +2 -2
- package/dist/chunks/{inspect-V7HA2GZ5.js → inspect-TDHISMRV.js} +2 -2
- package/dist/chunks/{inspect-DYNTJMTQ.js → inspect-XANEFWYN.js} +2 -2
- package/dist/chunks/list-32NXD7OW.js +11 -0
- package/dist/chunks/{list-X4MKKDJX.js → list-Q566PTT4.js} +2 -2
- package/dist/chunks/{list-TSDBEAVF.js → list-Z6DRFZ7F.js} +2 -2
- package/dist/chunks/login-A6R3RQIW.js +9 -0
- package/dist/chunks/login-GPCBSMHV.js +7 -0
- package/dist/chunks/logs-L33R4G67.js +7 -0
- package/dist/chunks/ls-6CYMQBX3.js +12 -0
- package/dist/chunks/ls-CTIACPC5.js +8 -0
- package/dist/chunks/ls-DUCIK4E6.js +11 -0
- package/dist/chunks/{ls-4W4KTJ6T.js → ls-GDR45ANC.js} +2 -2
- package/dist/chunks/{ls-BMAVUMXU.js → ls-JPL3AFIM.js} +2 -2
- package/dist/chunks/{ls-HK45UWBD.js → ls-R442RADW.js} +2 -2
- package/dist/chunks/ls-VSK2ZFSY.js +8 -0
- package/dist/chunks/mutate-MUWQVZKM.js +9 -0
- package/dist/chunks/notifications-YKGIFXKO.js +7 -0
- package/dist/chunks/open-OJAIEDS5.js +7 -0
- package/dist/chunks/{openapi-W365UPH2.js → openapi-Y4NWAKUM.js} +1 -1
- package/dist/chunks/permissions-LWKZBBU7.js +7 -0
- package/dist/chunks/{prompt-missing-credentials-VDR5HVA2.js → prompt-missing-credentials-O3GGMOZH.js} +1 -1
- package/dist/chunks/publish-JHNLZT6K.js +15 -0
- package/dist/chunks/pull-E4K6BVQW.js +7 -0
- package/dist/chunks/purchase-domain-if-available-CJK3G4DT.js +7 -0
- package/dist/chunks/push-MUMGVOSY.js +7 -0
- package/dist/chunks/{query-ABPO2REN.js → query-2TTSDOFF.js} +2 -2
- package/dist/chunks/{reauthenticate-3H5Q2ZWD.js → reauthenticate-S47X66LM.js} +1 -1
- package/dist/chunks/reorder-NGBZWNZH.js +10 -0
- package/dist/chunks/reply-5WF5YHOM.js +9 -0
- package/dist/chunks/resolve-MPZBUK5V.js +12 -0
- package/dist/chunks/restore-NVY4A3T3.js +16 -0
- package/dist/chunks/rm-DB5K2RI7.js +8 -0
- package/dist/chunks/rm-HFJCOK2D.js +8 -0
- package/dist/chunks/{rm-KHO6RV55.js → rm-QXQ2AD4R.js} +1 -1
- package/dist/chunks/rm-SMKVHN75.js +8 -0
- package/dist/chunks/rm-ZO5JP3GF.js +8 -0
- package/dist/chunks/{routes-FOCZWOGO.js → routes-KO5NFCCJ.js} +1 -1
- package/dist/chunks/rule-inspect-VZARLRS3.js +8 -0
- package/dist/chunks/rules-G2WFYCPB.js +7 -0
- package/dist/chunks/{schema-EKWTCBNR.js → schema-G6BOZBNB.js} +1 -1
- package/dist/chunks/{schema-FZVKQRNB.js → schema-SVYU72YU.js} +1 -1
- package/dist/chunks/{select-org-37C26F7T.js → select-org-2W67WKBG.js} +1 -1
- package/dist/chunks/set-ILVKMTUD.js +7 -0
- package/dist/chunks/setup-and-link-VFCYLLB5.js +7 -0
- package/dist/chunks/tags-C34XXMYO.js +7 -0
- package/dist/chunks/{types-UN5J66MI.js → types-MATC4UQL.js} +2 -2
- package/dist/chunks/{update-QY3ZME4T.js → update-IVWOZO4P.js} +2 -2
- package/dist/chunks/{chunk-TKBORMUF.js → vlt-builder-graph-S4YJ5UTQ.js} +1 -1
- package/dist/chunks/vlt-builder-importer-2ITR3DMQ.js +11 -0
- package/dist/commands/build/index.js +3 -3
- package/dist/commands/deploy/index.js +13 -10
- package/dist/commands/dev/index.js +6 -6
- package/dist/commands/env/index.js +12 -12
- package/dist/commands/link/index.js +2 -2
- package/dist/commands/list/index.js +1 -1
- package/dist/commands-bulk.js +552 -535
- package/dist/index.js +8 -7
- package/dist/internal-build-worker.js +4 -4
- package/dist/internal-build.js +11 -0
- package/dist/root-help-commands.mjs +1 -1
- package/dist/vc.js +26 -10
- package/dist/version.mjs +1 -1
- package/package.json +53 -53
- package/dist/chunks/add-Q5OZFIRM.js +0 -8
- package/dist/chunks/add-VLVURKGS.js +0 -8
- package/dist/chunks/build-MR7MUWBQ.js +0 -7
- package/dist/chunks/chunk-3R66O72V.js +0 -7
- package/dist/chunks/chunk-5VWK73R6.js +0 -10
- package/dist/chunks/chunk-ADDXKC3J.js +0 -9
- package/dist/chunks/chunk-AKPQWZIP.js +0 -21
- package/dist/chunks/chunk-ALXWJ7XN.js +0 -7
- package/dist/chunks/chunk-CJPM2DXZ.js +0 -7
- package/dist/chunks/chunk-CVX5X5RI.js +0 -7
- package/dist/chunks/chunk-HVROAV4B.js +0 -9
- package/dist/chunks/chunk-ILXXXXVQ.js +0 -8
- package/dist/chunks/chunk-JRU6AGXG.js +0 -11
- package/dist/chunks/chunk-LHQUNL52.js +0 -7
- package/dist/chunks/chunk-M7ZGWERO.js +0 -9
- package/dist/chunks/chunk-NRN65VUM.js +0 -8
- package/dist/chunks/chunk-NXTK7VKL.js +0 -7
- package/dist/chunks/chunk-PADCVJ7G.js +0 -7
- package/dist/chunks/chunk-PAI3WRPA.js +0 -9
- package/dist/chunks/chunk-PTFKU33G.js +0 -10
- package/dist/chunks/chunk-RFWCEREA.js +0 -7
- package/dist/chunks/chunk-RVKOPGOI.js +0 -7
- package/dist/chunks/chunk-VZDY57PJ.js +0 -7
- package/dist/chunks/chunk-W7PVS44H.js +0 -7
- package/dist/chunks/chunk-WW3VUXRV.js +0 -9
- package/dist/chunks/chunk-ZQIUMXCI.js +0 -7
- package/dist/chunks/clear-PPE55RPM.js +0 -8
- package/dist/chunks/config-G2A6KPPM.js +0 -8
- package/dist/chunks/delete-75SYJKNE.js +0 -10
- package/dist/chunks/delete-MHXN5KTO.js +0 -9
- package/dist/chunks/disable-OUYOHEWN.js +0 -7
- package/dist/chunks/discard-RXSHOY3J.js +0 -14
- package/dist/chunks/edit-Y7OL72ZK.js +0 -9
- package/dist/chunks/edit-Z5RCWPOX.js +0 -8
- package/dist/chunks/enable-HI2UH2NM.js +0 -7
- package/dist/chunks/image-SQIUEBFK.js +0 -7
- package/dist/chunks/import-builders-EUOOFPHW.js +0 -7
- package/dist/chunks/inspect-2SXPXNYH.js +0 -13
- package/dist/chunks/inspect-J3F3U3YF.js +0 -9
- package/dist/chunks/list-ZQSOWXRI.js +0 -11
- package/dist/chunks/login-5FMKHZVG.js +0 -7
- package/dist/chunks/login-YEDMPXUF.js +0 -9
- package/dist/chunks/logs-X2OIQXGW.js +0 -7
- package/dist/chunks/ls-6EDJUUDW.js +0 -12
- package/dist/chunks/ls-LAYBQVU2.js +0 -8
- package/dist/chunks/ls-SQ42O6O5.js +0 -11
- package/dist/chunks/ls-XIJ4CY2N.js +0 -8
- package/dist/chunks/mutate-6FCOCHSA.js +0 -9
- package/dist/chunks/notifications-JTK7ZOLC.js +0 -7
- package/dist/chunks/open-3G4R3VIN.js +0 -7
- package/dist/chunks/permissions-IWUBXZBZ.js +0 -7
- package/dist/chunks/publish-5QKVU6YV.js +0 -15
- package/dist/chunks/pull-K4JQEP7N.js +0 -7
- package/dist/chunks/purchase-domain-if-available-Q7H2TGKR.js +0 -7
- package/dist/chunks/push-COILRLCW.js +0 -7
- package/dist/chunks/reorder-FBUQ5ET7.js +0 -10
- package/dist/chunks/reply-FR5VO7DA.js +0 -9
- package/dist/chunks/resolve-JI2ENFS6.js +0 -12
- package/dist/chunks/restore-LYY4BSYJ.js +0 -16
- package/dist/chunks/rm-C2RWWMO3.js +0 -8
- package/dist/chunks/rm-CYYVIF2U.js +0 -8
- package/dist/chunks/rm-ETLZ75RJ.js +0 -8
- package/dist/chunks/rm-GHSQEFRG.js +0 -8
- package/dist/chunks/rule-inspect-MISYALLU.js +0 -8
- package/dist/chunks/rules-KAGL6MH3.js +0 -7
- package/dist/chunks/set-5D7C6HMZ.js +0 -7
- package/dist/chunks/setup-and-link-H4P3FZB3.js +0 -7
- package/dist/chunks/tags-DVGQQZNC.js +0 -7
- package/dist/chunks/vlt-builder-importer-W63QEXYX.js +0 -11
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_chownr,require_mkdirp,require_pump,require_tar_stream}from"./chunk-V6MR45PD.js";import{require_minimatch2 as require_minimatch}from"./chunk-N4PVXHAJ.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{require_types}from"./chunk-GHM7V3GG.js";import{VERCEL_DIR,VERCEL_DIR_PROJECT,require_lib}from"./chunk-7IRKF3ZG.js";import{require_graceful_fs}from"./chunk-F2ZWW2IO.js";import{require_dist}from"./chunk-QGIQK47P.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_universalify=__commonJS({"../../node_modules/.pnpm/universalify@0.1.2/node_modules/universalify/index.js"(exports){"use strict";exports.fromCallback=function(fn){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")fn.apply(this,arguments);else return new Promise((resolve,reject)=>{arguments[arguments.length]=(err,res)=>{if(err)return reject(err);resolve(res)},arguments.length++,fn.apply(this,arguments)})},"name",{value:fn.name})};exports.fromPromise=function(fn){return Object.defineProperty(function(){let cb=arguments[arguments.length-1];if(typeof cb!="function")return fn.apply(this,arguments);fn.apply(this,arguments).then(r=>cb(null,r),cb)},"name",{value:fn.name})}}});var require_fs=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/fs/index.js"(exports){"use strict";var u=require_universalify().fromCallback,fs=require_graceful_fs(),api=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(key=>typeof fs[key]=="function");Object.keys(fs).forEach(key=>{key!=="promises"&&(exports[key]=fs[key])});api.forEach(method=>{exports[method]=u(fs[method])});exports.exists=function(filename,callback){return typeof callback=="function"?fs.exists(filename,callback):new Promise(resolve=>fs.exists(filename,resolve))};exports.read=function(fd,buffer,offset,length,position,callback){return typeof callback=="function"?fs.read(fd,buffer,offset,length,position,callback):new Promise((resolve,reject)=>{fs.read(fd,buffer,offset,length,position,(err,bytesRead,buffer2)=>{if(err)return reject(err);resolve({bytesRead,buffer:buffer2})})})};exports.write=function(fd,buffer,...args){return typeof args[args.length-1]=="function"?fs.write(fd,buffer,...args):new Promise((resolve,reject)=>{fs.write(fd,buffer,...args,(err,bytesWritten,buffer2)=>{if(err)return reject(err);resolve({bytesWritten,buffer:buffer2})})})}}});var require_win32=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/mkdirs/win32.js"(exports,module){"use strict";var path=__require("path");function getRootPath(p){return p=path.normalize(path.resolve(p)).split(path.sep),p.length>0?p[0]:null}var INVALID_PATH_CHARS=/[<>:"|?*]/;function invalidWin32Path(p){let rp=getRootPath(p);return p=p.replace(rp,""),INVALID_PATH_CHARS.test(p)}module.exports={getRootPath,invalidWin32Path}}});var require_mkdirs=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs.js"(exports,module){"use strict";var fs=require_graceful_fs(),path=__require("path"),invalidWin32Path=require_win32().invalidWin32Path,o777=parseInt("0777",8);function mkdirs(p,opts,callback,made){if(typeof opts=="function"?(callback=opts,opts={}):(!opts||typeof opts!="object")&&(opts={mode:opts}),process.platform==="win32"&&invalidWin32Path(p)){let errInval=new Error(p+" contains invalid WIN32 path characters.");return errInval.code="EINVAL",callback(errInval)}let mode=opts.mode,xfs=opts.fs||fs;mode===void 0&&(mode=o777&~process.umask()),made||(made=null),callback=callback||function(){},p=path.resolve(p),xfs.mkdir(p,mode,er=>{if(!er)return made=made||p,callback(null,made);switch(er.code){case"ENOENT":if(path.dirname(p)===p)return callback(er);mkdirs(path.dirname(p),opts,(er2,made2)=>{er2?callback(er2,made2):mkdirs(p,opts,callback,made2)});break;default:xfs.stat(p,(er2,stat)=>{er2||!stat.isDirectory()?callback(er,made):callback(null,made)});break}})}module.exports=mkdirs}});var require_mkdirs_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js"(exports,module){"use strict";var fs=require_graceful_fs(),path=__require("path"),invalidWin32Path=require_win32().invalidWin32Path,o777=parseInt("0777",8);function mkdirsSync(p,opts,made){(!opts||typeof opts!="object")&&(opts={mode:opts});let mode=opts.mode,xfs=opts.fs||fs;if(process.platform==="win32"&&invalidWin32Path(p)){let errInval=new Error(p+" contains invalid WIN32 path characters.");throw errInval.code="EINVAL",errInval}mode===void 0&&(mode=o777&~process.umask()),made||(made=null),p=path.resolve(p);try{xfs.mkdirSync(p,mode),made=made||p}catch(err0){if(err0.code==="ENOENT"){if(path.dirname(p)===p)throw err0;made=mkdirsSync(path.dirname(p),opts,made),mkdirsSync(p,opts,made)}else{let stat;try{stat=xfs.statSync(p)}catch{throw err0}if(!stat.isDirectory())throw err0}}return made}module.exports=mkdirsSync}});var require_mkdirs2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,mkdirs=u(require_mkdirs()),mkdirsSync=require_mkdirs_sync();module.exports={mkdirs,mkdirsSync,mkdirp:mkdirs,mkdirpSync:mkdirsSync,ensureDir:mkdirs,ensureDirSync:mkdirsSync}}});var require_utimes=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/util/utimes.js"(exports,module){"use strict";var fs=require_graceful_fs(),os=__require("os"),path=__require("path");function hasMillisResSync(){let tmpfile=path.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));tmpfile=path.join(os.tmpdir(),tmpfile);let d=new Date(1435410243862);fs.writeFileSync(tmpfile,"https://github.com/jprichardson/node-fs-extra/pull/141");let fd=fs.openSync(tmpfile,"r+");return fs.futimesSync(fd,d,d),fs.closeSync(fd),fs.statSync(tmpfile).mtime>1435410243e3}function hasMillisRes(callback){let tmpfile=path.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));tmpfile=path.join(os.tmpdir(),tmpfile);let d=new Date(1435410243862);fs.writeFile(tmpfile,"https://github.com/jprichardson/node-fs-extra/pull/141",err=>{if(err)return callback(err);fs.open(tmpfile,"r+",(err2,fd)=>{if(err2)return callback(err2);fs.futimes(fd,d,d,err3=>{if(err3)return callback(err3);fs.close(fd,err4=>{if(err4)return callback(err4);fs.stat(tmpfile,(err5,stats)=>{if(err5)return callback(err5);callback(null,stats.mtime>1435410243e3)})})})})})}function timeRemoveMillis(timestamp){if(typeof timestamp=="number")return Math.floor(timestamp/1e3)*1e3;if(timestamp instanceof Date)return new Date(Math.floor(timestamp.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function utimesMillis(path2,atime,mtime,callback){fs.open(path2,"r+",(err,fd)=>{if(err)return callback(err);fs.futimes(fd,atime,mtime,futimesErr=>{fs.close(fd,closeErr=>{callback&&callback(futimesErr||closeErr)})})})}function utimesMillisSync(path2,atime,mtime){let fd=fs.openSync(path2,"r+");return fs.futimesSync(fd,atime,mtime),fs.closeSync(fd)}module.exports={hasMillisRes,hasMillisResSync,timeRemoveMillis,utimesMillis,utimesMillisSync}}});var require_stat=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/util/stat.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),NODE_VERSION_MAJOR_WITH_BIGINT=10,NODE_VERSION_MINOR_WITH_BIGINT=5,NODE_VERSION_PATCH_WITH_BIGINT=0,nodeVersion=process.versions.node.split("."),nodeVersionMajor=Number.parseInt(nodeVersion[0],10),nodeVersionMinor=Number.parseInt(nodeVersion[1],10),nodeVersionPatch=Number.parseInt(nodeVersion[2],10);function nodeSupportsBigInt(){if(nodeVersionMajor>NODE_VERSION_MAJOR_WITH_BIGINT)return!0;if(nodeVersionMajor===NODE_VERSION_MAJOR_WITH_BIGINT){if(nodeVersionMinor>NODE_VERSION_MINOR_WITH_BIGINT)return!0;if(nodeVersionMinor===NODE_VERSION_MINOR_WITH_BIGINT&&nodeVersionPatch>=NODE_VERSION_PATCH_WITH_BIGINT)return!0}return!1}function getStats(src,dest,cb){nodeSupportsBigInt()?fs.stat(src,{bigint:!0},(err,srcStat)=>{if(err)return cb(err);fs.stat(dest,{bigint:!0},(err2,destStat)=>err2?err2.code==="ENOENT"?cb(null,{srcStat,destStat:null}):cb(err2):cb(null,{srcStat,destStat}))}):fs.stat(src,(err,srcStat)=>{if(err)return cb(err);fs.stat(dest,(err2,destStat)=>err2?err2.code==="ENOENT"?cb(null,{srcStat,destStat:null}):cb(err2):cb(null,{srcStat,destStat}))})}function getStatsSync(src,dest){let srcStat,destStat;nodeSupportsBigInt()?srcStat=fs.statSync(src,{bigint:!0}):srcStat=fs.statSync(src);try{nodeSupportsBigInt()?destStat=fs.statSync(dest,{bigint:!0}):destStat=fs.statSync(dest)}catch(err){if(err.code==="ENOENT")return{srcStat,destStat:null};throw err}return{srcStat,destStat}}function checkPaths(src,dest,funcName,cb){getStats(src,dest,(err,stats)=>{if(err)return cb(err);let{srcStat,destStat}=stats;return destStat&&destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev?cb(new Error("Source and destination must not be the same.")):srcStat.isDirectory()&&isSrcSubdir(src,dest)?cb(new Error(errMsg(src,dest,funcName))):cb(null,{srcStat,destStat})})}function checkPathsSync(src,dest,funcName){let{srcStat,destStat}=getStatsSync(src,dest);if(destStat&&destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev)throw new Error("Source and destination must not be the same.");if(srcStat.isDirectory()&&isSrcSubdir(src,dest))throw new Error(errMsg(src,dest,funcName));return{srcStat,destStat}}function checkParentPaths(src,srcStat,dest,funcName,cb){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return cb();nodeSupportsBigInt()?fs.stat(destParent,{bigint:!0},(err,destStat)=>err?err.code==="ENOENT"?cb():cb(err):destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev?cb(new Error(errMsg(src,dest,funcName))):checkParentPaths(src,srcStat,destParent,funcName,cb)):fs.stat(destParent,(err,destStat)=>err?err.code==="ENOENT"?cb():cb(err):destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev?cb(new Error(errMsg(src,dest,funcName))):checkParentPaths(src,srcStat,destParent,funcName,cb))}function checkParentPathsSync(src,srcStat,dest,funcName){let srcParent=path.resolve(path.dirname(src)),destParent=path.resolve(path.dirname(dest));if(destParent===srcParent||destParent===path.parse(destParent).root)return;let destStat;try{nodeSupportsBigInt()?destStat=fs.statSync(destParent,{bigint:!0}):destStat=fs.statSync(destParent)}catch(err){if(err.code==="ENOENT")return;throw err}if(destStat.ino&&destStat.dev&&destStat.ino===srcStat.ino&&destStat.dev===srcStat.dev)throw new Error(errMsg(src,dest,funcName));return checkParentPathsSync(src,srcStat,destParent,funcName)}function isSrcSubdir(src,dest){let srcArr=path.resolve(src).split(path.sep).filter(i=>i),destArr=path.resolve(dest).split(path.sep).filter(i=>i);return srcArr.reduce((acc,cur,i)=>acc&&destArr[i]===cur,!0)}function errMsg(src,dest,funcName){return`Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`}module.exports={checkPaths,checkPathsSync,checkParentPaths,checkParentPathsSync,isSrcSubdir}}});var require_buffer=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/util/buffer.js"(exports,module){"use strict";module.exports=function(size){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(size)}catch{return new Buffer(size)}return new Buffer(size)}}});var require_copy_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),mkdirpSync=require_mkdirs2().mkdirsSync,utimesSync=require_utimes().utimesMillisSync,stat=require_stat();function copySync(src,dest,opts){typeof opts=="function"&&(opts={filter:opts}),opts=opts||{},opts.clobber="clobber"in opts?!!opts.clobber:!0,opts.overwrite="overwrite"in opts?!!opts.overwrite:opts.clobber,opts.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
8
|
-
|
|
9
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat,destStat}=stat.checkPathsSync(src,dest,"copy");return stat.checkParentPathsSync(src,srcStat,dest,"copy"),handleFilterAndCopy(destStat,src,dest,opts)}function handleFilterAndCopy(destStat,src,dest,opts){if(opts.filter&&!opts.filter(src,dest))return;let destParent=path.dirname(dest);return fs.existsSync(destParent)||mkdirpSync(destParent),startCopy(destStat,src,dest,opts)}function startCopy(destStat,src,dest,opts){if(!(opts.filter&&!opts.filter(src,dest)))return getStats(destStat,src,dest,opts)}function getStats(destStat,src,dest,opts){let srcStat=(opts.dereference?fs.statSync:fs.lstatSync)(src);if(srcStat.isDirectory())return onDir(srcStat,destStat,src,dest,opts);if(srcStat.isFile()||srcStat.isCharacterDevice()||srcStat.isBlockDevice())return onFile(srcStat,destStat,src,dest,opts);if(srcStat.isSymbolicLink())return onLink(destStat,src,dest,opts)}function onFile(srcStat,destStat,src,dest,opts){return destStat?mayCopyFile(srcStat,src,dest,opts):copyFile(srcStat,src,dest,opts)}function mayCopyFile(srcStat,src,dest,opts){if(opts.overwrite)return fs.unlinkSync(dest),copyFile(srcStat,src,dest,opts);if(opts.errorOnExist)throw new Error(`'${dest}' already exists`)}function copyFile(srcStat,src,dest,opts){return typeof fs.copyFileSync=="function"?(fs.copyFileSync(src,dest),fs.chmodSync(dest,srcStat.mode),opts.preserveTimestamps?utimesSync(dest,srcStat.atime,srcStat.mtime):void 0):copyFileFallback(srcStat,src,dest,opts)}function copyFileFallback(srcStat,src,dest,opts){let _buff=require_buffer()(65536),fdr=fs.openSync(src,"r"),fdw=fs.openSync(dest,"w",srcStat.mode),pos=0;for(;pos<srcStat.size;){let bytesRead=fs.readSync(fdr,_buff,0,65536,pos);fs.writeSync(fdw,_buff,0,bytesRead),pos+=bytesRead}opts.preserveTimestamps&&fs.futimesSync(fdw,srcStat.atime,srcStat.mtime),fs.closeSync(fdr),fs.closeSync(fdw)}function onDir(srcStat,destStat,src,dest,opts){if(!destStat)return mkDirAndCopy(srcStat,src,dest,opts);if(destStat&&!destStat.isDirectory())throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);return copyDir(src,dest,opts)}function mkDirAndCopy(srcStat,src,dest,opts){return fs.mkdirSync(dest),copyDir(src,dest,opts),fs.chmodSync(dest,srcStat.mode)}function copyDir(src,dest,opts){fs.readdirSync(src).forEach(item=>copyDirItem(item,src,dest,opts))}function copyDirItem(item,src,dest,opts){let srcItem=path.join(src,item),destItem=path.join(dest,item),{destStat}=stat.checkPathsSync(srcItem,destItem,"copy");return startCopy(destStat,srcItem,destItem,opts)}function onLink(destStat,src,dest,opts){let resolvedSrc=fs.readlinkSync(src);if(opts.dereference&&(resolvedSrc=path.resolve(process.cwd(),resolvedSrc)),destStat){let resolvedDest;try{resolvedDest=fs.readlinkSync(dest)}catch(err){if(err.code==="EINVAL"||err.code==="UNKNOWN")return fs.symlinkSync(resolvedSrc,dest);throw err}if(opts.dereference&&(resolvedDest=path.resolve(process.cwd(),resolvedDest)),stat.isSrcSubdir(resolvedSrc,resolvedDest))throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);if(fs.statSync(dest).isDirectory()&&stat.isSrcSubdir(resolvedDest,resolvedSrc))throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);return copyLink(resolvedSrc,dest)}else return fs.symlinkSync(resolvedSrc,dest)}function copyLink(resolvedSrc,dest){return fs.unlinkSync(dest),fs.symlinkSync(resolvedSrc,dest)}module.exports=copySync}});var require_copy_sync2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/copy-sync/index.js"(exports,module){"use strict";module.exports={copySync:require_copy_sync()}}});var require_path_exists=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/path-exists/index.js"(exports,module){"use strict";var u=require_universalify().fromPromise,fs=require_fs();function pathExists(path){return fs.access(path).then(()=>!0).catch(()=>!1)}module.exports={pathExists:u(pathExists),pathExistsSync:fs.existsSync}}});var require_copy=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/copy/copy.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),mkdirp=require_mkdirs2().mkdirs,pathExists=require_path_exists().pathExists,utimes=require_utimes().utimesMillis,stat=require_stat();function copy(src,dest,opts,cb){typeof opts=="function"&&!cb?(cb=opts,opts={}):typeof opts=="function"&&(opts={filter:opts}),cb=cb||function(){},opts=opts||{},opts.clobber="clobber"in opts?!!opts.clobber:!0,opts.overwrite="overwrite"in opts?!!opts.overwrite:opts.clobber,opts.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
10
|
-
|
|
11
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`),stat.checkPaths(src,dest,"copy",(err,stats)=>{if(err)return cb(err);let{srcStat,destStat}=stats;stat.checkParentPaths(src,srcStat,dest,"copy",err2=>err2?cb(err2):opts.filter?handleFilter(checkParentDir,destStat,src,dest,opts,cb):checkParentDir(destStat,src,dest,opts,cb))})}function checkParentDir(destStat,src,dest,opts,cb){let destParent=path.dirname(dest);pathExists(destParent,(err,dirExists)=>{if(err)return cb(err);if(dirExists)return startCopy(destStat,src,dest,opts,cb);mkdirp(destParent,err2=>err2?cb(err2):startCopy(destStat,src,dest,opts,cb))})}function handleFilter(onInclude,destStat,src,dest,opts,cb){Promise.resolve(opts.filter(src,dest)).then(include=>include?onInclude(destStat,src,dest,opts,cb):cb(),error=>cb(error))}function startCopy(destStat,src,dest,opts,cb){return opts.filter?handleFilter(getStats,destStat,src,dest,opts,cb):getStats(destStat,src,dest,opts,cb)}function getStats(destStat,src,dest,opts,cb){(opts.dereference?fs.stat:fs.lstat)(src,(err,srcStat)=>{if(err)return cb(err);if(srcStat.isDirectory())return onDir(srcStat,destStat,src,dest,opts,cb);if(srcStat.isFile()||srcStat.isCharacterDevice()||srcStat.isBlockDevice())return onFile(srcStat,destStat,src,dest,opts,cb);if(srcStat.isSymbolicLink())return onLink(destStat,src,dest,opts,cb)})}function onFile(srcStat,destStat,src,dest,opts,cb){return destStat?mayCopyFile(srcStat,src,dest,opts,cb):copyFile(srcStat,src,dest,opts,cb)}function mayCopyFile(srcStat,src,dest,opts,cb){if(opts.overwrite)fs.unlink(dest,err=>err?cb(err):copyFile(srcStat,src,dest,opts,cb));else return opts.errorOnExist?cb(new Error(`'${dest}' already exists`)):cb()}function copyFile(srcStat,src,dest,opts,cb){return typeof fs.copyFile=="function"?fs.copyFile(src,dest,err=>err?cb(err):setDestModeAndTimestamps(srcStat,dest,opts,cb)):copyFileFallback(srcStat,src,dest,opts,cb)}function copyFileFallback(srcStat,src,dest,opts,cb){let rs=fs.createReadStream(src);rs.on("error",err=>cb(err)).once("open",()=>{let ws=fs.createWriteStream(dest,{mode:srcStat.mode});ws.on("error",err=>cb(err)).on("open",()=>rs.pipe(ws)).once("close",()=>setDestModeAndTimestamps(srcStat,dest,opts,cb))})}function setDestModeAndTimestamps(srcStat,dest,opts,cb){fs.chmod(dest,srcStat.mode,err=>err?cb(err):opts.preserveTimestamps?utimes(dest,srcStat.atime,srcStat.mtime,cb):cb())}function onDir(srcStat,destStat,src,dest,opts,cb){return destStat?destStat&&!destStat.isDirectory()?cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)):copyDir(src,dest,opts,cb):mkDirAndCopy(srcStat,src,dest,opts,cb)}function mkDirAndCopy(srcStat,src,dest,opts,cb){fs.mkdir(dest,err=>{if(err)return cb(err);copyDir(src,dest,opts,err2=>err2?cb(err2):fs.chmod(dest,srcStat.mode,cb))})}function copyDir(src,dest,opts,cb){fs.readdir(src,(err,items)=>err?cb(err):copyDirItems(items,src,dest,opts,cb))}function copyDirItems(items,src,dest,opts,cb){let item=items.pop();return item?copyDirItem(items,item,src,dest,opts,cb):cb()}function copyDirItem(items,item,src,dest,opts,cb){let srcItem=path.join(src,item),destItem=path.join(dest,item);stat.checkPaths(srcItem,destItem,"copy",(err,stats)=>{if(err)return cb(err);let{destStat}=stats;startCopy(destStat,srcItem,destItem,opts,err2=>err2?cb(err2):copyDirItems(items,src,dest,opts,cb))})}function onLink(destStat,src,dest,opts,cb){fs.readlink(src,(err,resolvedSrc)=>{if(err)return cb(err);if(opts.dereference&&(resolvedSrc=path.resolve(process.cwd(),resolvedSrc)),destStat)fs.readlink(dest,(err2,resolvedDest)=>err2?err2.code==="EINVAL"||err2.code==="UNKNOWN"?fs.symlink(resolvedSrc,dest,cb):cb(err2):(opts.dereference&&(resolvedDest=path.resolve(process.cwd(),resolvedDest)),stat.isSrcSubdir(resolvedSrc,resolvedDest)?cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)):destStat.isDirectory()&&stat.isSrcSubdir(resolvedDest,resolvedSrc)?cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)):copyLink(resolvedSrc,dest,cb)));else return fs.symlink(resolvedSrc,dest,cb)})}function copyLink(resolvedSrc,dest,cb){fs.unlink(dest,err=>err?cb(err):fs.symlink(resolvedSrc,dest,cb))}module.exports=copy}});var require_copy2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/copy/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback;module.exports={copy:u(require_copy())}}});var require_rimraf=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/remove/rimraf.js"(exports,module){"use strict";var fs=require_graceful_fs(),path=__require("path"),assert=__require("assert"),isWindows=process.platform==="win32";function defaults(options){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(m=>{options[m]=options[m]||fs[m],m=m+"Sync",options[m]=options[m]||fs[m]}),options.maxBusyTries=options.maxBusyTries||3}function rimraf(p,options,cb){let busyTries=0;typeof options=="function"&&(cb=options,options={}),assert(p,"rimraf: missing path"),assert.strictEqual(typeof p,"string","rimraf: path should be a string"),assert.strictEqual(typeof cb,"function","rimraf: callback function required"),assert(options,"rimraf: invalid options argument provided"),assert.strictEqual(typeof options,"object","rimraf: options should be object"),defaults(options),rimraf_(p,options,function CB(er){if(er){if((er.code==="EBUSY"||er.code==="ENOTEMPTY"||er.code==="EPERM")&&busyTries<options.maxBusyTries){busyTries++;let time=busyTries*100;return setTimeout(()=>rimraf_(p,options,CB),time)}er.code==="ENOENT"&&(er=null)}cb(er)})}function rimraf_(p,options,cb){assert(p),assert(options),assert(typeof cb=="function"),options.lstat(p,(er,st)=>{if(er&&er.code==="ENOENT")return cb(null);if(er&&er.code==="EPERM"&&isWindows)return fixWinEPERM(p,options,er,cb);if(st&&st.isDirectory())return rmdir(p,options,er,cb);options.unlink(p,er2=>{if(er2){if(er2.code==="ENOENT")return cb(null);if(er2.code==="EPERM")return isWindows?fixWinEPERM(p,options,er2,cb):rmdir(p,options,er2,cb);if(er2.code==="EISDIR")return rmdir(p,options,er2,cb)}return cb(er2)})})}function fixWinEPERM(p,options,er,cb){assert(p),assert(options),assert(typeof cb=="function"),er&&assert(er instanceof Error),options.chmod(p,438,er2=>{er2?cb(er2.code==="ENOENT"?null:er):options.stat(p,(er3,stats)=>{er3?cb(er3.code==="ENOENT"?null:er):stats.isDirectory()?rmdir(p,options,er,cb):options.unlink(p,cb)})})}function fixWinEPERMSync(p,options,er){let stats;assert(p),assert(options),er&&assert(er instanceof Error);try{options.chmodSync(p,438)}catch(er2){if(er2.code==="ENOENT")return;throw er}try{stats=options.statSync(p)}catch(er3){if(er3.code==="ENOENT")return;throw er}stats.isDirectory()?rmdirSync(p,options,er):options.unlinkSync(p)}function rmdir(p,options,originalEr,cb){assert(p),assert(options),originalEr&&assert(originalEr instanceof Error),assert(typeof cb=="function"),options.rmdir(p,er=>{er&&(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")?rmkids(p,options,cb):er&&er.code==="ENOTDIR"?cb(originalEr):cb(er)})}function rmkids(p,options,cb){assert(p),assert(options),assert(typeof cb=="function"),options.readdir(p,(er,files)=>{if(er)return cb(er);let n=files.length,errState;if(n===0)return options.rmdir(p,cb);files.forEach(f=>{rimraf(path.join(p,f),options,er2=>{if(!errState){if(er2)return cb(errState=er2);--n===0&&options.rmdir(p,cb)}})})})}function rimrafSync(p,options){let st;options=options||{},defaults(options),assert(p,"rimraf: missing path"),assert.strictEqual(typeof p,"string","rimraf: path should be a string"),assert(options,"rimraf: missing options"),assert.strictEqual(typeof options,"object","rimraf: options should be object");try{st=options.lstatSync(p)}catch(er){if(er.code==="ENOENT")return;er.code==="EPERM"&&isWindows&&fixWinEPERMSync(p,options,er)}try{st&&st.isDirectory()?rmdirSync(p,options,null):options.unlinkSync(p)}catch(er){if(er.code==="ENOENT")return;if(er.code==="EPERM")return isWindows?fixWinEPERMSync(p,options,er):rmdirSync(p,options,er);if(er.code!=="EISDIR")throw er;rmdirSync(p,options,er)}}function rmdirSync(p,options,originalEr){assert(p),assert(options),originalEr&&assert(originalEr instanceof Error);try{options.rmdirSync(p)}catch(er){if(er.code==="ENOTDIR")throw originalEr;if(er.code==="ENOTEMPTY"||er.code==="EEXIST"||er.code==="EPERM")rmkidsSync(p,options);else if(er.code!=="ENOENT")throw er}}function rmkidsSync(p,options){if(assert(p),assert(options),options.readdirSync(p).forEach(f=>rimrafSync(path.join(p,f),options)),isWindows){let startTime=Date.now();do try{return options.rmdirSync(p,options)}catch{}while(Date.now()-startTime<500)}else return options.rmdirSync(p,options)}module.exports=rimraf;rimraf.sync=rimrafSync}});var require_remove=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/remove/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,rimraf=require_rimraf();module.exports={remove:u(rimraf),removeSync:rimraf.sync}}});var require_empty=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/empty/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,fs=__require("fs"),path=__require("path"),mkdir=require_mkdirs2(),remove=require_remove(),emptyDir=u(function(dir,callback){callback=callback||function(){},fs.readdir(dir,(err,items)=>{if(err)return mkdir.mkdirs(dir,callback);items=items.map(item=>path.join(dir,item)),deleteItem();function deleteItem(){let item=items.pop();if(!item)return callback();remove.remove(item,err2=>{if(err2)return callback(err2);deleteItem()})}})});function emptyDirSync(dir){let items;try{items=fs.readdirSync(dir)}catch{return mkdir.mkdirsSync(dir)}items.forEach(item=>{item=path.join(dir,item),remove.removeSync(item)})}module.exports={emptyDirSync,emptydirSync:emptyDirSync,emptyDir,emptydir:emptyDir}}});var require_file=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/file.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs=require_graceful_fs(),mkdir=require_mkdirs2(),pathExists=require_path_exists().pathExists;function createFile(file,callback){function makeFile(){fs.writeFile(file,"",err=>{if(err)return callback(err);callback()})}fs.stat(file,(err,stats)=>{if(!err&&stats.isFile())return callback();let dir=path.dirname(file);pathExists(dir,(err2,dirExists)=>{if(err2)return callback(err2);if(dirExists)return makeFile();mkdir.mkdirs(dir,err3=>{if(err3)return callback(err3);makeFile()})})})}function createFileSync(file){let stats;try{stats=fs.statSync(file)}catch{}if(stats&&stats.isFile())return;let dir=path.dirname(file);fs.existsSync(dir)||mkdir.mkdirsSync(dir),fs.writeFileSync(file,"")}module.exports={createFile:u(createFile),createFileSync}}});var require_link=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/link.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs=require_graceful_fs(),mkdir=require_mkdirs2(),pathExists=require_path_exists().pathExists;function createLink(srcpath,dstpath,callback){function makeLink(srcpath2,dstpath2){fs.link(srcpath2,dstpath2,err=>{if(err)return callback(err);callback(null)})}pathExists(dstpath,(err,destinationExists)=>{if(err)return callback(err);if(destinationExists)return callback(null);fs.lstat(srcpath,err2=>{if(err2)return err2.message=err2.message.replace("lstat","ensureLink"),callback(err2);let dir=path.dirname(dstpath);pathExists(dir,(err3,dirExists)=>{if(err3)return callback(err3);if(dirExists)return makeLink(srcpath,dstpath);mkdir.mkdirs(dir,err4=>{if(err4)return callback(err4);makeLink(srcpath,dstpath)})})})})}function createLinkSync(srcpath,dstpath){if(fs.existsSync(dstpath))return;try{fs.lstatSync(srcpath)}catch(err){throw err.message=err.message.replace("lstat","ensureLink"),err}let dir=path.dirname(dstpath);return fs.existsSync(dir)||mkdir.mkdirsSync(dir),fs.linkSync(srcpath,dstpath)}module.exports={createLink:u(createLink),createLinkSync}}});var require_symlink_paths=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),pathExists=require_path_exists().pathExists;function symlinkPaths(srcpath,dstpath,callback){if(path.isAbsolute(srcpath))return fs.lstat(srcpath,err=>err?(err.message=err.message.replace("lstat","ensureSymlink"),callback(err)):callback(null,{toCwd:srcpath,toDst:srcpath}));{let dstdir=path.dirname(dstpath),relativeToDst=path.join(dstdir,srcpath);return pathExists(relativeToDst,(err,exists)=>err?callback(err):exists?callback(null,{toCwd:relativeToDst,toDst:srcpath}):fs.lstat(srcpath,err2=>err2?(err2.message=err2.message.replace("lstat","ensureSymlink"),callback(err2)):callback(null,{toCwd:srcpath,toDst:path.relative(dstdir,srcpath)})))}}function symlinkPathsSync(srcpath,dstpath){let exists;if(path.isAbsolute(srcpath)){if(exists=fs.existsSync(srcpath),!exists)throw new Error("absolute srcpath does not exist");return{toCwd:srcpath,toDst:srcpath}}else{let dstdir=path.dirname(dstpath),relativeToDst=path.join(dstdir,srcpath);if(exists=fs.existsSync(relativeToDst),exists)return{toCwd:relativeToDst,toDst:srcpath};if(exists=fs.existsSync(srcpath),!exists)throw new Error("relative srcpath does not exist");return{toCwd:srcpath,toDst:path.relative(dstdir,srcpath)}}}module.exports={symlinkPaths,symlinkPathsSync}}});var require_symlink_type=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports,module){"use strict";var fs=require_graceful_fs();function symlinkType(srcpath,type,callback){if(callback=typeof type=="function"?type:callback,type=typeof type=="function"?!1:type,type)return callback(null,type);fs.lstat(srcpath,(err,stats)=>{if(err)return callback(null,"file");type=stats&&stats.isDirectory()?"dir":"file",callback(null,type)})}function symlinkTypeSync(srcpath,type){let stats;if(type)return type;try{stats=fs.lstatSync(srcpath)}catch{return"file"}return stats&&stats.isDirectory()?"dir":"file"}module.exports={symlinkType,symlinkTypeSync}}});var require_symlink=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports,module){"use strict";var u=require_universalify().fromCallback,path=__require("path"),fs=require_graceful_fs(),_mkdirs=require_mkdirs2(),mkdirs=_mkdirs.mkdirs,mkdirsSync=_mkdirs.mkdirsSync,_symlinkPaths=require_symlink_paths(),symlinkPaths=_symlinkPaths.symlinkPaths,symlinkPathsSync=_symlinkPaths.symlinkPathsSync,_symlinkType=require_symlink_type(),symlinkType=_symlinkType.symlinkType,symlinkTypeSync=_symlinkType.symlinkTypeSync,pathExists=require_path_exists().pathExists;function createSymlink(srcpath,dstpath,type,callback){callback=typeof type=="function"?type:callback,type=typeof type=="function"?!1:type,pathExists(dstpath,(err,destinationExists)=>{if(err)return callback(err);if(destinationExists)return callback(null);symlinkPaths(srcpath,dstpath,(err2,relative)=>{if(err2)return callback(err2);srcpath=relative.toDst,symlinkType(relative.toCwd,type,(err3,type2)=>{if(err3)return callback(err3);let dir=path.dirname(dstpath);pathExists(dir,(err4,dirExists)=>{if(err4)return callback(err4);if(dirExists)return fs.symlink(srcpath,dstpath,type2,callback);mkdirs(dir,err5=>{if(err5)return callback(err5);fs.symlink(srcpath,dstpath,type2,callback)})})})})})}function createSymlinkSync(srcpath,dstpath,type){if(fs.existsSync(dstpath))return;let relative=symlinkPathsSync(srcpath,dstpath);srcpath=relative.toDst,type=symlinkTypeSync(relative.toCwd,type);let dir=path.dirname(dstpath);return fs.existsSync(dir)||mkdirsSync(dir),fs.symlinkSync(srcpath,dstpath,type)}module.exports={createSymlink:u(createSymlink),createSymlinkSync}}});var require_ensure=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/ensure/index.js"(exports,module){"use strict";var file=require_file(),link=require_link(),symlink=require_symlink();module.exports={createFile:file.createFile,createFileSync:file.createFileSync,ensureFile:file.createFile,ensureFileSync:file.createFileSync,createLink:link.createLink,createLinkSync:link.createLinkSync,ensureLink:link.createLink,ensureLinkSync:link.createLinkSync,createSymlink:symlink.createSymlink,createSymlinkSync:symlink.createSymlinkSync,ensureSymlink:symlink.createSymlink,ensureSymlinkSync:symlink.createSymlinkSync}}});var require_jsonfile=__commonJS({"../../node_modules/.pnpm/jsonfile@4.0.0/node_modules/jsonfile/index.js"(exports,module){var _fs;try{_fs=require_graceful_fs()}catch{_fs=__require("fs")}function readFile2(file,options,callback){callback==null&&(callback=options,options={}),typeof options=="string"&&(options={encoding:options}),options=options||{};var fs=options.fs||_fs,shouldThrow=!0;"throws"in options&&(shouldThrow=options.throws),fs.readFile(file,options,function(err,data){if(err)return callback(err);data=stripBom(data);var obj;try{obj=JSON.parse(data,options?options.reviver:null)}catch(err2){return shouldThrow?(err2.message=file+": "+err2.message,callback(err2)):callback(null,null)}callback(null,obj)})}function readFileSync(file,options){options=options||{},typeof options=="string"&&(options={encoding:options});var fs=options.fs||_fs,shouldThrow=!0;"throws"in options&&(shouldThrow=options.throws);try{var content=fs.readFileSync(file,options);return content=stripBom(content),JSON.parse(content,options.reviver)}catch(err){if(shouldThrow)throw err.message=file+": "+err.message,err;return null}}function stringify(obj,options){var spaces,EOL=`
|
|
12
|
-
`;typeof options=="object"&&options!==null&&(options.spaces&&(spaces=options.spaces),options.EOL&&(EOL=options.EOL));var str=JSON.stringify(obj,options?options.replacer:null,spaces);return str.replace(/\n/g,EOL)+EOL}function writeFile(file,obj,options,callback){callback==null&&(callback=options,options={}),options=options||{};var fs=options.fs||_fs,str="";try{str=stringify(obj,options)}catch(err){callback&&callback(err,null);return}fs.writeFile(file,str,options,callback)}function writeFileSync(file,obj,options){options=options||{};var fs=options.fs||_fs,str=stringify(obj,options);return fs.writeFileSync(file,str,options)}function stripBom(content){return Buffer.isBuffer(content)&&(content=content.toString("utf8")),content=content.replace(/^\uFEFF/,""),content}var jsonfile={readFile:readFile2,readFileSync,writeFile,writeFileSync};module.exports=jsonfile}});var require_jsonfile2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports,module){"use strict";var u=require_universalify().fromCallback,jsonFile=require_jsonfile();module.exports={readJson:u(jsonFile.readFile),readJsonSync:jsonFile.readFileSync,writeJson:u(jsonFile.writeFile),writeJsonSync:jsonFile.writeFileSync}}});var require_output_json=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/json/output-json.js"(exports,module){"use strict";var path=__require("path"),mkdir=require_mkdirs2(),pathExists=require_path_exists().pathExists,jsonFile=require_jsonfile2();function outputJson(file,data,options,callback){typeof options=="function"&&(callback=options,options={});let dir=path.dirname(file);pathExists(dir,(err,itDoes)=>{if(err)return callback(err);if(itDoes)return jsonFile.writeJson(file,data,options,callback);mkdir.mkdirs(dir,err2=>{if(err2)return callback(err2);jsonFile.writeJson(file,data,options,callback)})})}module.exports=outputJson}});var require_output_json_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports,module){"use strict";var fs=require_graceful_fs(),path=__require("path"),mkdir=require_mkdirs2(),jsonFile=require_jsonfile2();function outputJsonSync(file,data,options){let dir=path.dirname(file);fs.existsSync(dir)||mkdir.mkdirsSync(dir),jsonFile.writeJsonSync(file,data,options)}module.exports=outputJsonSync}});var require_json=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/json/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,jsonFile=require_jsonfile2();jsonFile.outputJson=u(require_output_json());jsonFile.outputJsonSync=require_output_json_sync();jsonFile.outputJSON=jsonFile.outputJson;jsonFile.outputJSONSync=jsonFile.outputJsonSync;jsonFile.writeJSON=jsonFile.writeJson;jsonFile.writeJSONSync=jsonFile.writeJsonSync;jsonFile.readJSON=jsonFile.readJson;jsonFile.readJSONSync=jsonFile.readJsonSync;module.exports=jsonFile}});var require_move_sync=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/move-sync/move-sync.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),copySync=require_copy_sync2().copySync,removeSync=require_remove().removeSync,mkdirpSync=require_mkdirs2().mkdirpSync,stat=require_stat();function moveSync(src,dest,opts){opts=opts||{};let overwrite=opts.overwrite||opts.clobber||!1,{srcStat}=stat.checkPathsSync(src,dest,"move");return stat.checkParentPathsSync(src,srcStat,dest,"move"),mkdirpSync(path.dirname(dest)),doRename(src,dest,overwrite)}function doRename(src,dest,overwrite){if(overwrite)return removeSync(dest),rename(src,dest,overwrite);if(fs.existsSync(dest))throw new Error("dest already exists.");return rename(src,dest,overwrite)}function rename(src,dest,overwrite){try{fs.renameSync(src,dest)}catch(err){if(err.code!=="EXDEV")throw err;return moveAcrossDevice(src,dest,overwrite)}}function moveAcrossDevice(src,dest,overwrite){return copySync(src,dest,{overwrite,errorOnExist:!0}),removeSync(src)}module.exports=moveSync}});var require_move_sync2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/move-sync/index.js"(exports,module){"use strict";module.exports={moveSync:require_move_sync()}}});var require_move=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/move/move.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),copy=require_copy2().copy,remove=require_remove().remove,mkdirp=require_mkdirs2().mkdirp,pathExists=require_path_exists().pathExists,stat=require_stat();function move(src,dest,opts,cb){typeof opts=="function"&&(cb=opts,opts={});let overwrite=opts.overwrite||opts.clobber||!1;stat.checkPaths(src,dest,"move",(err,stats)=>{if(err)return cb(err);let{srcStat}=stats;stat.checkParentPaths(src,srcStat,dest,"move",err2=>{if(err2)return cb(err2);mkdirp(path.dirname(dest),err3=>err3?cb(err3):doRename(src,dest,overwrite,cb))})})}function doRename(src,dest,overwrite,cb){if(overwrite)return remove(dest,err=>err?cb(err):rename(src,dest,overwrite,cb));pathExists(dest,(err,destExists)=>err?cb(err):destExists?cb(new Error("dest already exists.")):rename(src,dest,overwrite,cb))}function rename(src,dest,overwrite,cb){fs.rename(src,dest,err=>err?err.code!=="EXDEV"?cb(err):moveAcrossDevice(src,dest,overwrite,cb):cb())}function moveAcrossDevice(src,dest,overwrite,cb){copy(src,dest,{overwrite,errorOnExist:!0},err=>err?cb(err):remove(src,cb))}module.exports=move}});var require_move2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/move/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback;module.exports={move:u(require_move())}}});var require_output=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/output/index.js"(exports,module){"use strict";var u=require_universalify().fromCallback,fs=require_graceful_fs(),path=__require("path"),mkdir=require_mkdirs2(),pathExists=require_path_exists().pathExists;function outputFile(file,data,encoding,callback){typeof encoding=="function"&&(callback=encoding,encoding="utf8");let dir=path.dirname(file);pathExists(dir,(err,itDoes)=>{if(err)return callback(err);if(itDoes)return fs.writeFile(file,data,encoding,callback);mkdir.mkdirs(dir,err2=>{if(err2)return callback(err2);fs.writeFile(file,data,encoding,callback)})})}function outputFileSync(file,...args){let dir=path.dirname(file);if(fs.existsSync(dir))return fs.writeFileSync(file,...args);mkdir.mkdirsSync(dir),fs.writeFileSync(file,...args)}module.exports={outputFile:u(outputFile),outputFileSync}}});var require_lib2=__commonJS({"../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/index.js"(exports,module){"use strict";module.exports=Object.assign({},require_fs(),require_copy_sync2(),require_copy2(),require_empty(),require_ensure(),require_json(),require_mkdirs2(),require_move_sync2(),require_move2(),require_output(),require_path_exists(),require_remove());var fs=__require("fs");Object.getOwnPropertyDescriptor(fs,"promises")&&Object.defineProperty(module.exports,"promises",{get(){return fs.promises}})}});var require_lib3=__commonJS({"../../node_modules/.pnpm/async-sema@3.0.0/node_modules/async-sema/lib/index.js"(exports){"use strict";var __importDefault=exports&&exports.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});var events_1=__importDefault(__require("events"));function arrayMove(src,srcIndex,dst,dstIndex,len){for(let j=0;j<len;++j)dst[j+dstIndex]=src[j+srcIndex],src[j+srcIndex]=void 0}function pow2AtLeast(n){return n=n>>>0,n=n-1,n=n|n>>1,n=n|n>>2,n=n|n>>4,n=n|n>>8,n=n|n>>16,n+1}function getCapacity(capacity){return pow2AtLeast(Math.min(Math.max(16,capacity),1073741824))}var Deque=class{constructor(capacity){this._capacity=getCapacity(capacity),this._length=0,this._front=0,this.arr=[]}push(item){let length=this._length;this.checkCapacity(length+1);let i=this._front+length&this._capacity-1;return this.arr[i]=item,this._length=length+1,length+1}pop(){let length=this._length;if(length===0)return;let i=this._front+length-1&this._capacity-1,ret=this.arr[i];return this.arr[i]=void 0,this._length=length-1,ret}shift(){let length=this._length;if(length===0)return;let front=this._front,ret=this.arr[front];return this.arr[front]=void 0,this._front=front+1&this._capacity-1,this._length=length-1,ret}get length(){return this._length}checkCapacity(size){this._capacity<size&&this.resizeTo(getCapacity(this._capacity*1.5+16))}resizeTo(capacity){let oldCapacity=this._capacity;this._capacity=capacity;let front=this._front,length=this._length;if(front+length>oldCapacity){let moveItemsCount=front+length&oldCapacity-1;arrayMove(this.arr,0,this.arr,oldCapacity,moveItemsCount)}}},ReleaseEmitter=class extends events_1.default{};function isFn(x){return typeof x=="function"}function defaultInit(){return"1"}var Sema=class{constructor(nr,{initFn=defaultInit,pauseFn,resumeFn,capacity=10}={}){if(isFn(pauseFn)!==isFn(resumeFn))throw new Error("pauseFn and resumeFn must be both set for pausing");this.nrTokens=nr,this.free=new Deque(nr),this.waiting=new Deque(capacity),this.releaseEmitter=new ReleaseEmitter,this.noTokens=initFn===defaultInit,this.pauseFn=pauseFn,this.resumeFn=resumeFn,this.paused=!1,this.releaseEmitter.on("release",token=>{let p=this.waiting.shift();p?p.resolve(token):(this.resumeFn&&this.paused&&(this.paused=!1,this.resumeFn()),this.free.push(token))});for(let i=0;i<nr;i++)this.free.push(initFn())}async acquire(){let token=this.free.pop();return token!==void 0?token:new Promise((resolve,reject)=>{this.pauseFn&&!this.paused&&(this.paused=!0,this.pauseFn()),this.waiting.push({resolve,reject})})}release(token){this.releaseEmitter.emit("release",this.noTokens?"1":token)}drain(){let a=new Array(this.nrTokens);for(let i=0;i<this.nrTokens;i++)a[i]=this.acquire();return Promise.all(a)}nrWaiting(){return this.waiting.length}};exports.Sema=Sema;function RateLimit(rps,{timeUnit=1e3,uniformDistribution=!1}={}){let sema=new Sema(uniformDistribution?1:rps),delay=uniformDistribution?timeUnit/rps:timeUnit;return async function(){await sema.acquire(),setTimeout(()=>sema.release(),delay)}}exports.RateLimit=RateLimit}});var require_hashes=__commonJS({"../client/dist/utils/hashes.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),hashes_exports={};__export(hashes_exports,{hash:()=>hash,hashes:()=>hashes,mapToObject:()=>mapToObject});module.exports=__toCommonJS(hashes_exports);var import_crypto=__require("crypto"),import_fs_extra2=__toESM2(require_lib2()),import_async_sema=require_lib3(),MAX_BUFFER_FILE_SIZE=2**31-1;function hash(buf){return(0,import_crypto.createHash)("sha1").update(Uint8Array.from(buf)).digest("hex")}async function hashFile(path){let digest=(0,import_crypto.createHash)("sha1");for await(let chunk of import_fs_extra2.default.createReadStream(path))digest.update(Uint8Array.from(chunk));return digest.digest("hex")}var mapToObject=map=>{let obj={};for(let[key,value]of map)typeof key>"u"||(obj[key]=value);return obj};async function hashes(files,map=new Map){let semaphore=new import_async_sema.Sema(100);return await Promise.all(files.map(async name=>{await semaphore.acquire();let stat=await import_fs_extra2.default.lstat(name),mode=stat.mode,data,size,isDirectory=stat.isDirectory(),h;if(!isDirectory)if(stat.isSymbolicLink()){let link=await import_fs_extra2.default.readlink(name);data=Buffer.from(link,"utf8"),size=data.length,h=hash(data)}else stat.size>MAX_BUFFER_FILE_SIZE?(size=stat.size,h=await hashFile(name)):(data=await import_fs_extra2.default.readFile(name),size=data.length,h=hash(data));let entry=map.get(h);if(entry){let names=new Set(entry.names);names.add(name),entry.names=[...names]}else map.set(h,{names:[name],data,mode,size});semaphore.release()})),map}}});var require_query_string=__commonJS({"../client/dist/utils/query-string.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),query_string_exports={};__export(query_string_exports,{generateQueryString:()=>generateQueryString});module.exports=__toCommonJS(query_string_exports);var import_url=__require("url");function generateQueryString(clientOptions){let options=new import_url.URLSearchParams;return clientOptions.teamId&&options.set("teamId",clientOptions.teamId),clientOptions.force&&options.set("forceNew","1"),clientOptions.withCache&&options.set("withCache","1"),clientOptions.skipAutoDetectionConfirmation&&options.set("skipAutoDetectionConfirmation","1"),clientOptions.prebuilt&&options.set("prebuilt","1"),Array.from(options.entries()).length?`?${options.toString()}`:""}}});var require_ready_state=__commonJS({"../client/dist/utils/ready-state.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),ready_state_exports={};__export(ready_state_exports,{isAliasAssigned:()=>isAliasAssigned,isAliasError:()=>isAliasError,isDone:()=>isDone,isFailed:()=>isFailed,isReady:()=>isReady});module.exports=__toCommonJS(ready_state_exports);var isReady=({readyState,state})=>readyState==="READY"||state==="READY",isFailed=({readyState,state})=>readyState?readyState.endsWith("_ERROR")||readyState==="ERROR":state?state.endsWith("_ERROR")||state==="ERROR":!1,isDone=buildOrDeployment=>isReady(buildOrDeployment)||isFailed(buildOrDeployment),isAliasAssigned=deployment=>!!deployment.aliasAssigned,isAliasError=deployment=>!!deployment.aliasError}});var require_cjs=__commonJS({"../../node_modules/.pnpm/sleep-promise@8.0.1/node_modules/sleep-promise/build/cjs.js"(exports,module){"use strict";var cachedSetTimeout=setTimeout;function createSleepPromise(a,b){var c=b.useCachedSetTimeout,d=c?cachedSetTimeout:setTimeout;return new Promise(function(b2){d(b2,a)})}function sleep(a){function b(a2){return e.then(function(){return a2})}var c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},d=c.useCachedSetTimeout,e=createSleepPromise(a,{useCachedSetTimeout:d});return b.then=function(){return e.then.apply(e,arguments)},b.catch=Promise.resolve().catch,b}module.exports=sleep}});var require_ignore=__commonJS({"../../node_modules/.pnpm/ignore@4.0.6/node_modules/ignore/index.js"(exports,module){function make_array(subject){return Array.isArray(subject)?subject:[subject]}var REGEX_BLANK_LINE=/^\s+$/,REGEX_LEADING_EXCAPED_EXCLAMATION=/^\\!/,REGEX_LEADING_EXCAPED_HASH=/^\\#/,SLASH="/",KEY_IGNORE=typeof Symbol<"u"?Symbol.for("node-ignore"):"node-ignore",define=(object,key,value)=>Object.defineProperty(object,key,{value}),REGEX_REGEXP_RANGE=/([0-z])-([0-z])/g,sanitizeRange=range=>range.replace(REGEX_REGEXP_RANGE,(match,from,to)=>from.charCodeAt(0)<=to.charCodeAt(0)?match:""),DEFAULT_REPLACER_PREFIX=[[/\\?\s+$/,match=>match.indexOf("\\")===0?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,match=>`\\${match}`],[/\[([^\]/]*)($|\])/g,(match,p1,p2)=>p2==="]"?`[${sanitizeRange(p1)}]`:`\\${match}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"]],DEFAULT_REPLACER_SUFFIX=[[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(match,index,str)=>index+6<str.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)\\\*(?=.+)/g,(match,p1)=>`${p1}[^\\/]*`],[/(\^|\\\/)?\\\*$/,(match,p1)=>`${p1?`${p1}[^/]+`:"[^/]*"}(?=$|\\/$)`],[/\\\\\\/g,()=>"\\"]],POSITIVE_REPLACERS=[...DEFAULT_REPLACER_PREFIX,[/(?:[^*/])$/,match=>`${match}(?=$|\\/)`],...DEFAULT_REPLACER_SUFFIX],NEGATIVE_REPLACERS=[...DEFAULT_REPLACER_PREFIX,[/(?:[^*])$/,match=>`${match}(?=$|\\/$)`],...DEFAULT_REPLACER_SUFFIX],cache=Object.create(null),make_regex=(pattern,negative,ignorecase)=>{let r=cache[pattern];if(r)return r;let source=(negative?NEGATIVE_REPLACERS:POSITIVE_REPLACERS).reduce((prev,current)=>prev.replace(current[0],current[1].bind(pattern)),pattern);return cache[pattern]=ignorecase?new RegExp(source,"i"):new RegExp(source)},checkPattern=pattern=>pattern&&typeof pattern=="string"&&!REGEX_BLANK_LINE.test(pattern)&&pattern.indexOf("#")!==0,createRule=(pattern,ignorecase)=>{let origin=pattern,negative=!1;pattern.indexOf("!")===0&&(negative=!0,pattern=pattern.substr(1)),pattern=pattern.replace(REGEX_LEADING_EXCAPED_EXCLAMATION,"!").replace(REGEX_LEADING_EXCAPED_HASH,"#");let regex=make_regex(pattern,negative,ignorecase);return{origin,pattern,negative,regex}},IgnoreBase=class{constructor({ignorecase=!0}={}){this._rules=[],this._ignorecase=ignorecase,define(this,KEY_IGNORE,!0),this._initCache()}_initCache(){this._cache=Object.create(null)}add(pattern){return this._added=!1,typeof pattern=="string"&&(pattern=pattern.split(/\r?\n/g)),make_array(pattern).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(pattern){return this.add(pattern)}_addPattern(pattern){if(pattern&&pattern[KEY_IGNORE]){this._rules=this._rules.concat(pattern._rules),this._added=!0;return}if(checkPattern(pattern)){let rule=createRule(pattern,this._ignorecase);this._added=!0,this._rules.push(rule)}}filter(paths){return make_array(paths).filter(path=>this._filter(path))}createFilter(){return path=>this._filter(path)}ignores(path){return!this._filter(path)}_filter(path,slices){return path?path in this._cache?this._cache[path]:(slices||(slices=path.split(SLASH)),slices.pop(),this._cache[path]=slices.length?this._filter(slices.join(SLASH)+SLASH,slices)&&this._test(path):this._test(path)):!1}_test(path){let matched=0;return this._rules.forEach(rule=>{matched^rule.negative||(matched=rule.negative^rule.regex.test(path))}),!matched}};if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let filter=IgnoreBase.prototype._filter,make_posix=str=>/^\\\\\?\\/.test(str)||/[^\x00-\x80]+/.test(str)?str:str.replace(/\\/g,"/");IgnoreBase.prototype._filter=function(path,slices){return path=make_posix(path),filter.call(this,path,slices)}}module.exports=options=>new IgnoreBase(options)}});var require_package=__commonJS({"../client/package.json"(exports,module){module.exports={name:"@vercel/client",version:"18.6.0",main:"dist/index.js",typings:"dist/index.d.ts",homepage:"https://vercel.com",license:"Apache-2.0",files:["dist"],repository:{type:"git",url:"https://github.com/vercel/vercel.git",directory:"packages/client"},scripts:{build:"node ../../utils/build.mjs",test:"vitest run --config ./vitest.config.mts","test-e2e":"vitest run --config ./vitest.config.mts tests/integration-","type-check":"tsc --noEmit","test-unit":"vitest run --config ./vitest.config.mts tests/unit."},engines:{node:">= 20"},devDependencies:{"@types/async-retry":"1.4.5","@types/fs-extra":"7.0.0","@types/minimatch":"3.0.5","@types/ms":"0.7.30","@types/node":"20.11.0","@types/recursive-readdir":"2.2.0","@types/tar-fs":"1.16.1",vitest:"4.1.10"},dependencies:{"@vercel/build-utils":"workspace:*","@vercel/error-utils":"workspace:*","@vercel/microfrontends":"2.4.0","@vercel/routing-utils":"workspace:*","async-retry":"1.2.3","async-sema":"3.0.0","fs-extra":"8.0.1",ignore:"4.0.6",minimatch:"5.0.1",ms:"2.1.2",querystring:"^0.2.0","sleep-promise":"8.0.1","tar-fs":"1.16.3"}}}});var require_pkg=__commonJS({"../client/dist/pkg.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),pkg_exports={};__export(pkg_exports,{pkgVersion:()=>pkgVersion});module.exports=__toCommonJS(pkg_exports);var pkg=require_package(),pkgVersion=pkg.version}});var require_readdir_recursive=__commonJS({"../client/dist/utils/readdir-recursive.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),readdir_recursive_exports={};__export(readdir_recursive_exports,{default:()=>readdir});module.exports=__toCommonJS(readdir_recursive_exports);var import_fs=__toESM2(__require("fs")),import_path2=__toESM2(__require("path")),import_minimatch=__toESM2(require_minimatch());function patternMatcher(pattern){return function(path,stats){let minimatcher=new import_minimatch.default.Minimatch(pattern,{matchBase:!0});return(!minimatcher.negate||stats.isFile())&&minimatcher.match(path)}}function toMatcherFunction(ignoreEntry){return typeof ignoreEntry=="function"?ignoreEntry:patternMatcher(ignoreEntry)}function readdir(path,ignores){ignores=ignores.map(toMatcherFunction);let list=[];return new Promise(function(resolve,reject){import_fs.default.readdir(path,function(err,files){if(err)return reject(err);let pending=files.length;if(!pending)return resolve(list);files.forEach(function(file){let filePath=import_path2.default.join(path,file);import_fs.default.lstat(filePath,function(_err,stats){if(_err)return reject(_err);if(ignores.some(matcher=>matcher(filePath,stats)))return pending-=1,pending?null:resolve(list);if(stats.isDirectory())readdir(filePath,ignores).then(function(res){if(res.length===0&&list.push(filePath),list=list.concat(res),pending-=1,!pending)return resolve(list)}).catch(reject);else if(list.push(filePath),pending-=1,!pending)return resolve(list)})})})})}}});var require_utils=__commonJS({"../client/dist/utils/index.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),utils_exports={};__export(utils_exports,{API_FILES:()=>API_FILES,EVENTS:()=>EVENTS,buildFileTree:()=>buildFileTree2,createDebug:()=>createDebug,fetchApi:()=>fetchApi,getApiDeploymentsUrl:()=>getApiDeploymentsUrl,getVercelIgnore:()=>getVercelIgnore2,parseVercelConfig:()=>parseVercelConfig,prepareFiles:()=>prepareFiles,shouldInlineStaticFiles:()=>shouldInlineStaticFiles});module.exports=__toCommonJS(utils_exports);var import_path2=__require("path"),import_stream=__require("stream"),import_url=__require("url"),import_ignore=__toESM2(require_ignore()),import_pkg=require_pkg(),import_build_utils=__require("@vercel/build-utils"),import_async_sema=require_lib3(),import_fs_extra2=require_lib2(),import_readdir_recursive=__toESM2(require_readdir_recursive()),semaphore=new import_async_sema.Sema(10),API_FILES="/v2/files",EVENTS_ARRAY=["hashes-calculated","file-count","file-uploaded","all-files-uploaded","created","building","ready","alias-assigned","warning","error","notice","tip","canceled","checks-registered","checks-completed","checks-running","checks-conclusion-succeeded","checks-conclusion-failed","checks-conclusion-skipped","checks-conclusion-canceled","checks-v2-failed"],EVENTS=new Set(EVENTS_ARRAY);function getApiDeploymentsUrl(){return"/v13/deployments"}async function parseVercelConfig(filePath){if(!filePath)return{};try{let jsonString=await(0,import_fs_extra2.readFile)(filePath,"utf8");return JSON.parse(jsonString)}catch(e){return console.error(e),{}}}var maybeRead=async function(path,default_){try{return await(0,import_fs_extra2.readFile)(path,"utf8")}catch{return default_}};async function getUserIgnore(cwd){let[vercelignore,nowignore]=await Promise.all([maybeRead((0,import_path2.join)(cwd,".vercelignore"),""),maybeRead((0,import_path2.join)(cwd,".nowignore"),"")]);if(vercelignore&&nowignore)throw new import_build_utils.NowBuildError({code:"CONFLICTING_IGNORE_FILES",message:"Cannot use both a `.vercelignore` and `.nowignore` file. Please delete the `.nowignore` file.",link:"https://vercel.link/combining-old-and-new-config"});let ignoreFile=vercelignore||nowignore;return ignoreFile?{ig:(0,import_ignore.default)().add(clearRelative(ignoreFile)),ignoreFile,ignoreFileName:vercelignore?".vercelignore":".nowignore"}:null}var FILEPATHMAP_VERCELIGNORE_EXCEPTIONS=["node_modules",".next",".yarn/cache",".pnp*",".venv","venv","__pycache__","/target"],filePathMapVercelignoreExceptions=(0,import_ignore.default)().add(FILEPATHMAP_VERCELIGNORE_EXCEPTIONS.join(`
|
|
13
|
-
`));function isFilePathMapIgnoreException(posixRel){return filePathMapVercelignoreExceptions.ignores(posixRel)}var FILEPATHMAP_IGNORE_WARNING_LIST_LIMIT=100;function findMatchingIgnoreRule(ignoreFile,posixRel){let matcher=(0,import_ignore.default)(),wasIgnored=!1,match={};for(let[index,rule]of ignoreFile.split(/\r?\n/).entries()){matcher.add(clearRelative(rule));let isIgnored=matcher.ignores(posixRel);!wasIgnored&&isIgnored?match={rule,line:index+1}:wasIgnored&&!isIgnored&&(match={}),wasIgnored=isIgnored}return match}function formatFilePathMapIgnoreWarning(entries,ignoreFileName,truncated=!1){let shown=entries.slice(0,FILEPATHMAP_IGNORE_WARNING_LIST_LIMIT),lines=shown.map(({path,rule,line})=>rule&&line?` ${path} (matched \`${ignoreFileName}:${line}\`: \`${rule}\`)`:` ${path}`);truncated&&lines.push(" \u2026and more");let count=truncated?`at least ${shown.length}`:String(entries.length),fileWord=!truncated&&entries.length===1?"file":"files";return[`${ignoreFileName===".nowignore"?`\`${ignoreFileName}\` (deprecated)`:`\`${ignoreFileName}\``} excludes ${count} ${fileWord} the prebuilt functions need. Uploading without them may fail with ENOENT.`,"",...lines,"",`Remove the colliding rules from \`${ignoreFileName}\`, or exclude those paths from tracing with \`outputFileTracingExcludes\`.`].join(`
|
|
14
|
-
`)}async function buildFileTree2(path,{isDirectory,prebuilt,vercelOutputDir,rootDirectory,projectName,bulkRedirectsPath},debug){let ignoreList=[],fileList,warning,{ig,ignores}=await getVercelIgnore2(path,prebuilt,vercelOutputDir);if(debug(`Found ${ignores.length} rules in .vercelignore`),debug("Building file tree..."),isDirectory&&!Array.isArray(path)){let ignores2=absPath=>{let rel=(0,import_path2.relative)(path,absPath),ignored=ig.ignores(rel);return ignored&&ignoreList.push(rel),ignored};fileList=await(0,import_readdir_recursive.default)(path,[ignores2]);let refs=new Set;if(prebuilt){let vcConfigFilePaths=fileList.filter(file=>(0,import_path2.basename)(file)===".vc-config.json"),userIg=await getUserIgnore(path),ignoredFilePathMap=new Map,ignoredFilePathMapTruncated=!1,vcConfigs=await Promise.all(vcConfigFilePaths.map(async p=>{let configJson=await(0,import_fs_extra2.readFile)(p,"utf8");return JSON.parse(configJson)}));for(let config of vcConfigs)if(config.filePathMap)for(let v of Object.values(config.filePathMap)){let absPath=(0,import_path2.join)(path,v),rel=(0,import_path2.relative)(path,absPath),posixRel=rel.split(import_path2.sep).join("/");if(rel.startsWith("..")||(0,import_path2.isAbsolute)(rel)){debug(`Ignoring "filePathMap" entry "${v}": resolves outside the deployment root`);continue}if(userIg&&userIg.ig.ignores(posixRel))if(isFilePathMapIgnoreException(posixRel))debug(`Keeping "filePathMap" entry "${v}": matches a default-ignored dependency/output path`);else{if(ignoredFilePathMap.has(posixRel))continue;if(fileList.includes(absPath)){debug(`Skipping "filePathMap" entry "${v}": already in the upload set`);continue}else if(ignoredFilePathMap.size>=FILEPATHMAP_IGNORE_WARNING_LIST_LIMIT){ignoredFilePathMapTruncated=!0;continue}else{ignoredFilePathMap.set(posixRel,findMatchingIgnoreRule(userIg.ignoreFile,posixRel));continue}}refs.add(absPath)}if(ignoredFilePathMap.size>0){let violations=[...ignoredFilePathMap.entries()].sort(([a],[b])=>a.localeCompare(b)).map(([ignoredPath,match])=>({path:ignoredPath,...match}));warning=formatFilePathMapIgnoreWarning(violations,userIg?.ignoreFileName||".vercelignore",ignoredFilePathMapTruncated)}try{let{findConfig:findMicrofrontendsConfig,inferMicrofrontendsLocation}=await import("./utils-5BFO5HC4.js"),customConfigFilename=void 0,microfrontendConfigPath=findMicrofrontendsConfig({dir:(0,import_path2.join)(path,rootDirectory||""),customConfigFilename});!microfrontendConfigPath&&!rootDirectory&&projectName&&(microfrontendConfigPath=findMicrofrontendsConfig({dir:inferMicrofrontendsLocation({repositoryRoot:path,applicationContext:{name:projectName},customConfigFilename}),customConfigFilename})),microfrontendConfigPath&&refs.add(microfrontendConfigPath)}catch(e){debug(`Error detecting microfrontend config: ${e}`)}}try{let routesJsonPath=(0,import_path2.join)(path,".vercel","routes.json");await maybeRead(routesJsonPath,null)!==null&&(refs.add(routesJsonPath),debug("Including .vercel/routes.json in deployment"))}catch(e){debug(`Error checking for .vercel/routes.json: ${e}`)}if(prebuilt&&bulkRedirectsPath)try{let projectRoot=path,bulkRedirectsFullPath=(0,import_path2.join)(projectRoot,rootDirectory||"",bulkRedirectsPath);if((0,import_path2.relative)(projectRoot,bulkRedirectsFullPath).startsWith(".."))debug(`Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`);else try{let stats=await(0,import_fs_extra2.stat)(bulkRedirectsFullPath);if(stats.isDirectory()){let dirFiles=await(0,import_readdir_recursive.default)(bulkRedirectsFullPath,[]);for(let file of dirFiles)refs.add(file);debug(`Including ${dirFiles.length} files from bulk redirects directory "${bulkRedirectsPath}" in deployment`)}else stats.isFile()&&(refs.add(bulkRedirectsFullPath),debug(`Including bulk redirects file "${bulkRedirectsPath}" in deployment`))}catch{debug(`Bulk redirects path "${bulkRedirectsPath}" not found`)}}catch(e){debug(`Error checking for bulk redirects path: ${e}`)}refs.size>0&&(fileList=fileList.concat(Array.from(refs))),debug(`Found ${fileList.length} files in the specified directory`)}else Array.isArray(path)?(fileList=path,debug(`Assigned ${fileList.length} files provided explicitly`)):(fileList=[path],debug("Deploying the provided path as single file"));return{fileList,ignoreList,warning}}async function getVercelIgnore2(cwd,prebuilt,vercelOutputDir){let ig=(0,import_ignore.default)(),ignores;if(prebuilt){if(typeof vercelOutputDir!="string")throw new Error('Missing required `vercelOutputDir` parameter when "prebuilt" is true');if(typeof cwd!="string")throw new Error('`cwd` must be a "string"');let relOutputDir=(0,import_path2.relative)(cwd,vercelOutputDir);ignores=["*"];let parts=relOutputDir.split(import_path2.sep);parts.forEach((_,i)=>{let level=parts.slice(0,i+1).join("/");ignores.push(`!/${level}`)}),ignores.push(`!/${parts.join("/")}/**`),ig.add(ignores.join(`
|
|
15
|
-
`))}else{ignores=[".hg",".git",".gitmodules",".svn",".cache",".next",".now",".vercel",".npmignore",".dockerignore",".gitignore",".*.swp",".DS_Store",".wafpicke-*",".lock-wscript",".env.local",".env.*.local",".venv",".yarn/cache",".pnp*","npm-debug.log","config.gypi","node_modules","__pycache__","venv","CVS"];let cwds=Array.isArray(cwd)?cwd:[cwd],files=await Promise.all(cwds.map(async cwd2=>{let[vercelignore,nowignore]=await Promise.all([maybeRead((0,import_path2.join)(cwd2,".vercelignore"),""),maybeRead((0,import_path2.join)(cwd2,".nowignore"),"")]);if(vercelignore&&nowignore)throw new import_build_utils.NowBuildError({code:"CONFLICTING_IGNORE_FILES",message:"Cannot use both a `.vercelignore` and `.nowignore` file. Please delete the `.nowignore` file.",link:"https://vercel.link/combining-old-and-new-config"});return vercelignore||nowignore}));(await Promise.all(cwds.map(cwd2=>(0,import_fs_extra2.pathExists)((0,import_path2.join)(cwd2,"Cargo.toml"))))).some(Boolean)&&ignores.push("/target");let ignoreFile=files.join(`
|
|
16
|
-
`);ig.add(`${ignores.join(`
|
|
17
|
-
`)}
|
|
18
|
-
${clearRelative(ignoreFile)}`)}return{ig,ignores}}function clearRelative(str){return str.replace(/(\n|^)\.\//g,"$1")}var fetchApi=async(url,token,opts={},debugEnabled)=>{semaphore.acquire();let debug=createDebug(debugEnabled),time;url=`${opts.apiUrl||"https://api.vercel.com"}${url}`,delete opts.apiUrl;let{VERCEL_TEAM_ID}=process.env;if(VERCEL_TEAM_ID&&(url+=`${url.includes("?")?"&":"?"}teamId=${VERCEL_TEAM_ID}`),opts.teamId){let parsedUrl=new import_url.URL(url);parsedUrl.searchParams.set("teamId",opts.teamId),url=parsedUrl.toString(),delete opts.teamId}let userAgent=opts.userAgent||`client-v${import_pkg.pkgVersion}`;delete opts.userAgent,opts.headers={...opts.headers,authorization:`Bearer ${token}`,accept:"application/json","user-agent":userAgent},opts.body instanceof import_stream.Readable&&(opts.duplex="half"),debug(`${opts.method||"GET"} ${url}`),time=Date.now();try{let res=await fetch(url,opts);return debug(`DONE in ${Date.now()-time}ms: ${opts.method||"GET"} ${url}`),res}finally{semaphore.release()}},isWin=process.platform.includes("win"),INLINE_STATIC_EXTENSIONS=[".html",".htm",".md"],MAX_INLINE_FILES=10,MAX_INLINE_TOTAL_BYTES=5*1024*1024,S_IFREG=32768,S_IFMT=61440;function shouldInlineStaticFiles(files){let count=0,totalBytes=0;for(let file of files.values()){if((file.mode&S_IFMT)!==S_IFREG||!file.data)return!1;for(let name of file.names){let lower=name.toLowerCase();if(!INLINE_STATIC_EXTENSIONS.some(ext=>lower.endsWith(ext)))return!1;count+=1,totalBytes+=file.data.byteLength}}return count>0&&count<=MAX_INLINE_FILES&&totalBytes<=MAX_INLINE_TOTAL_BYTES}var prepareFiles=(files,clientOptions)=>{let preparedFiles=[],inlineStaticFiles=shouldInlineStaticFiles(files);for(let[sha,file]of files)for(let name of file.names){let fileName;if(clientOptions.isDirectory)fileName=typeof clientOptions.path=="string"?(0,import_path2.relative)(clientOptions.path,name):name;else{let segments=name.split(import_path2.sep);fileName=segments[segments.length-1]}let normalizedName=isWin?fileName.replace(/\\/g,"/"):fileName;if(inlineStaticFiles&&file.data){preparedFiles.push({file:normalizedName,data:file.data.toString("base64"),encoding:"base64",mode:file.mode});continue}preparedFiles.push({file:normalizedName,size:file.data?.byteLength??file.size,mode:file.mode,sha:sha||void 0})}return preparedFiles};function createDebug(debug){return debug?(...logs)=>{process.stderr.write([`[client-debug] ${new Date().toISOString()}`,...logs].join(" ")+`
|
|
19
|
-
`)}:()=>{}}}});var require_get_polling_delay=__commonJS({"../client/dist/utils/get-polling-delay.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),get_polling_delay_exports={};__export(get_polling_delay_exports,{getPollingDelay:()=>getPollingDelay});module.exports=__toCommonJS(get_polling_delay_exports);var import_ms=__toESM2(require_ms());function getPollingDelay(elapsed){return elapsed<=(0,import_ms.default)("15s")?(0,import_ms.default)("1s"):elapsed<=(0,import_ms.default)("1m")?(0,import_ms.default)("5s"):elapsed<=(0,import_ms.default)("5m")?(0,import_ms.default)("15s"):(0,import_ms.default)("30s")}}});var require_check_deployment_status=__commonJS({"../client/dist/check-deployment-status.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),check_deployment_status_exports={};__export(check_deployment_status_exports,{checkDeploymentStatus:()=>checkDeploymentStatus2,parseRetryAfterMs:()=>parseRetryAfterMs});module.exports=__toCommonJS(check_deployment_status_exports);var import_sleep_promise=__toESM2(require_cjs()),import_utils=require_utils(),import_get_polling_delay=require_get_polling_delay(),import_ready_state=require_ready_state(),import_utils2=require_utils(),RETRY_COUNT=5,RETRY_DELAY_MAX_MS=6e4,RETRY_DELAY_MIN_MS=5e3,RETRY_DELAY_SKEW_MS=3e4,RETRY_DELAY_DEFAULT_MS=5e3;function getAliasAssignedEvent(signal,deploymentId){if(!signal?.aborted)return;let event=signal.reason;if(event?.type==="alias-assigned"&&event.deploymentId===deploymentId&&typeof event.date=="number"&&Array.isArray(event.alias)&&"aliasError"in event&&"aliasWarning"in event)return event}async function sleepUntilAliasAssigned(duration,signal,deploymentId){if(!getAliasAssignedEvent(signal,deploymentId)){if(!signal||signal.aborted){await(0,import_sleep_promise.default)(duration);return}await new Promise(resolve=>{let timeout=setTimeout(finish,duration);function finish(){clearTimeout(timeout),signal?.removeEventListener("abort",onAbort),resolve()}function onAbort(){getAliasAssignedEvent(signal,deploymentId)&&finish()}signal.addEventListener("abort",onAbort,{once:!0})})}}function parseRetryAfterMs(response){if(response.status===429||response.status===503){let header=response.headers.get("Retry-After");if(header==null)return RETRY_DELAY_DEFAULT_MS;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){let retryAfterDateMs=Date.parse(header);Number.isNaN(retryAfterDateMs)?retryAfterMs=RETRY_DELAY_DEFAULT_MS:retryAfterMs=retryAfterDateMs-Date.now()}return Math.min(RETRY_DELAY_MAX_MS,Math.max(RETRY_DELAY_MIN_MS,retryAfterMs))}else return response.status>=500&&response.status<=599?RETRY_DELAY_DEFAULT_MS:null}async function*checkDeploymentStatus2(deployment,clientOptions){let{token,teamId,apiUrl,userAgent}=clientOptions,debug=(0,import_utils2.createDebug)(clientOptions.debug),deploymentState=deployment,deploymentId=deployment.id||deployment.deploymentId,aliasAssignedSignal=clientOptions.aliasAssignedSignal,apiDeployments=(0,import_utils.getApiDeploymentsUrl)();if((0,import_ready_state.isDone)(deploymentState)&&(0,import_ready_state.isAliasAssigned)(deploymentState)){debug("Deployment is already READY and aliases are assigned. Not running status checks");return}debug("Waiting for builds and the deployment to complete...");let finishedEvents=new Set,startTime=Date.now();polling:for(;;){let aliasAssignedEvent=getAliasAssignedEvent(aliasAssignedSignal,deploymentId);if(aliasAssignedEvent)return deploymentState={...deploymentState,readyState:"READY",aliasAssigned:aliasAssignedEvent.date,alias:aliasAssignedEvent.alias,aliasError:aliasAssignedEvent.aliasError,aliasWarning:aliasAssignedEvent.aliasWarning},finishedEvents.has("ready")||(debug("Deployment state changed to READY"),finishedEvents.add("ready"),yield{type:"ready",payload:deploymentState}),debug("Deployment alias assigned from event stream"),yield{type:"alias-assigned",payload:deploymentState};let deploymentResponse,retriesLeft=RETRY_COUNT;for(;;){try{deploymentResponse=await(0,import_utils.fetchApi)(`${apiDeployments}/${deploymentId}${teamId?`?teamId=${teamId}`:""}`,token,{apiUrl,userAgent,dispatcher:clientOptions.dispatcher,signal:aliasAssignedSignal})}catch(error){if(getAliasAssignedEvent(aliasAssignedSignal,deploymentId))continue polling;if(aliasAssignedSignal?.aborted){aliasAssignedSignal=void 0;continue polling}throw error}if(getAliasAssignedEvent(aliasAssignedSignal,deploymentId))continue polling;if(retriesLeft--,retriesLeft==0)break;let retryAfterMs=parseRetryAfterMs(deploymentResponse);if(retryAfterMs!=null){let randomSkewMs=Math.floor(RETRY_DELAY_SKEW_MS*Math.random());if(debug(`Received a transient error or rate limit (HTTP ${deploymentResponse.status}) while querying deployment status, retrying after ${retryAfterMs+randomSkewMs}ms (${retryAfterMs} + ${randomSkewMs}ms of random skew)`),await sleepUntilAliasAssigned(retryAfterMs+randomSkewMs,aliasAssignedSignal,deploymentId),getAliasAssignedEvent(aliasAssignedSignal,deploymentId))continue polling;continue}break}let deploymentUpdate;try{deploymentUpdate=await deploymentResponse.json()}catch(error){if(getAliasAssignedEvent(aliasAssignedSignal,deploymentId))continue;if(aliasAssignedSignal?.aborted){aliasAssignedSignal=void 0;continue}throw error}if(getAliasAssignedEvent(aliasAssignedSignal,deploymentId))continue;if(deploymentUpdate.error)return debug("Deployment status check has errorred"),yield{type:"error",payload:deploymentUpdate.error};if(deploymentState=deploymentUpdate,deploymentUpdate.readyState==="BUILDING"&&!finishedEvents.has("building")&&(debug("Deployment state changed to BUILDING"),finishedEvents.add("building"),yield{type:"building",payload:deploymentUpdate}),deploymentUpdate.readyState==="CANCELED"&&!finishedEvents.has("canceled")&&(debug("Deployment state changed to CANCELED"),finishedEvents.add("canceled"),yield{type:"canceled",payload:deploymentUpdate}),(0,import_ready_state.isReady)(deploymentUpdate)&&!finishedEvents.has("ready")&&(debug("Deployment state changed to READY"),finishedEvents.add("ready"),yield{type:"ready",payload:deploymentUpdate}),deploymentUpdate.checksState!==void 0&&(deploymentUpdate.checksState==="completed"&&!finishedEvents.has("checks-completed")&&(finishedEvents.add("checks-completed"),deploymentUpdate.checksConclusion==="succeeded"?yield{type:"checks-conclusion-succeeded",payload:deploymentUpdate}:deploymentUpdate.checksConclusion==="failed"?yield{type:"checks-conclusion-failed",payload:deploymentUpdate}:deploymentUpdate.checksConclusion==="skipped"?yield{type:"checks-conclusion-skipped",payload:deploymentUpdate}:deploymentUpdate.checksConclusion==="canceled"&&(yield{type:"checks-conclusion-canceled",payload:deploymentUpdate})),deploymentUpdate.checksState==="registered"&&!finishedEvents.has("checks-registered")&&(finishedEvents.add("checks-registered"),yield{type:"checks-registered",payload:deploymentUpdate}),deploymentUpdate.checksState==="running"&&!finishedEvents.has("checks-running")&&(finishedEvents.add("checks-running"),yield{type:"checks-running",payload:deploymentUpdate})),deploymentUpdate.checks?.["deployment-alias"]?.state==="failed"&&!finishedEvents.has("checks-v2-failed"))return debug("v2 deployment-alias check failed"),finishedEvents.add("checks-v2-failed"),yield{type:"checks-v2-failed",payload:deploymentUpdate};if((0,import_ready_state.isAliasAssigned)(deploymentUpdate))return debug("Deployment alias assigned"),yield{type:"alias-assigned",payload:deploymentUpdate};if((0,import_ready_state.isAliasError)(deploymentUpdate))return yield{type:"error",payload:deploymentUpdate.aliasError};if(deploymentUpdate.readyState==="ERROR"&&deploymentUpdate.errorCode==="BUILD_FAILED")return yield{type:"error",payload:deploymentUpdate};if((0,import_ready_state.isFailed)(deploymentUpdate))return yield{type:"error",payload:deploymentUpdate.error||deploymentUpdate};let elapsed=Date.now()-startTime,duration=(0,import_get_polling_delay.getPollingDelay)(elapsed);await sleepUntilAliasAssigned(duration,aliasAssignedSignal,deploymentId)}}}});var require_deploy=__commonJS({"../client/dist/deploy.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),deploy_exports={};__export(deploy_exports,{deploy:()=>deploy});module.exports=__toCommonJS(deploy_exports);var import_query_string=require_query_string(),import_ready_state=require_ready_state(),import_check_deployment_status=require_check_deployment_status(),import_utils=require_utils();async function*postDeployment(files,clientOptions,deploymentOptions){let debug=(0,import_utils.createDebug)(clientOptions.debug),preparedFiles=(0,import_utils.prepareFiles)(files,clientOptions),apiDeployments=(0,import_utils.getApiDeploymentsUrl)();deploymentOptions?.builds&&!deploymentOptions.functions&&(clientOptions.skipAutoDetectionConfirmation=!0),deploymentOptions.target==="preview"&&(deploymentOptions.target=void 0),deploymentOptions.target&&deploymentOptions.target!=="production"&&(deploymentOptions.customEnvironmentSlugOrId=deploymentOptions.target,deploymentOptions.target=void 0),debug("Sending deployment creation API request");try{let response=await(0,import_utils.fetchApi)(`${apiDeployments}${(0,import_query_string.generateQueryString)(clientOptions)}`,clientOptions.token,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({...deploymentOptions,files:preparedFiles}),apiUrl:clientOptions.apiUrl,userAgent:clientOptions.userAgent,dispatcher:clientOptions.dispatcher}),deployment;try{deployment=await response.json()}catch{throw new Error("Invalid JSON response")}if(clientOptions.debug&&debug("Deployment response:",JSON.stringify(deployment)),!response.ok||deployment.error)return debug("Error: Deployment request status is",response.status),yield{type:"error",payload:deployment.error?{...deployment.error,status:response.status}:{...deployment,status:response.status}};let indications=new Set(["warning","notice","tip"]),regex=/^x-(?:vercel|now)-(warning|notice|tip)-(.*)$/;for(let[name,payload]of response.headers.entries()){let match=name.match(regex);if(match){let[,type,identifier]=match,action=response.headers.get(`x-vercel-action-${identifier}`),link=response.headers.get(`x-vercel-link-${identifier}`);indications.has(type)&&(debug(`Deployment created with a ${type}: `,payload),yield{type,payload,action,link})}}yield{type:"created",payload:deployment}}catch(e){return yield{type:"error",payload:e}}}function getDefaultName(files,clientOptions){let debug=(0,import_utils.createDebug)(clientOptions.debug),{isDirectory,path}=clientOptions;if(isDirectory&&typeof path=="string")return debug("Provided path is a directory. Using last segment as default name"),path.split("/").pop()||path;{debug("Provided path is not a directory. Using last segment of the first file as default name");let filePath=Array.from(files.values())[0].names[0];return filePath.split("/").pop()||filePath}}async function*deploy(files,clientOptions,deploymentOptions){let debug=(0,import_utils.createDebug)(clientOptions.debug);!deploymentOptions.name&&files.size>0&&(deploymentOptions.version=2,deploymentOptions.name=files.size===1?"file":getDefaultName(files,clientOptions),deploymentOptions.name==="file"&&debug('Setting deployment name to "file" for single-file deployment')),!deploymentOptions.name&&files.size>0&&(deploymentOptions.name=clientOptions.defaultName||getDefaultName(files,clientOptions),debug("No name provided. Defaulting to",deploymentOptions.name)),clientOptions.withCache&&debug("'withCache' is provided. Force deploy will be performed with cache retention");let deployment;try{debug("Creating deployment");for await(let event of postDeployment(files,clientOptions,deploymentOptions))event.type==="created"&&(debug("Deployment created"),deployment=event.payload),yield event}catch(e){return debug("An unexpected error occurred when creating the deployment"),yield{type:"error",payload:e}}if(clientOptions.manual){debug("Manual mode - skipping ready state check");return}if(deployment){if((0,import_ready_state.isReady)(deployment)&&(0,import_ready_state.isAliasAssigned)(deployment))return debug("Deployment state changed to READY 3"),yield{type:"ready",payload:deployment},debug("Deployment alias assigned"),yield{type:"alias-assigned",payload:deployment};try{debug("Waiting for deployment to be ready...");for await(let event of(0,import_check_deployment_status.checkDeploymentStatus)(deployment,clientOptions))yield event}catch(e){return debug("An unexpected error occurred while waiting for deployment to be ready"),yield{type:"error",payload:e}}}}}});var require_retry_operation=__commonJS({"../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports,module){function RetryOperation(timeouts,options){typeof options=="boolean"&&(options={forever:options}),this._originalTimeouts=JSON.parse(JSON.stringify(timeouts)),this._timeouts=timeouts,this._options=options||{},this._maxRetryTime=options&&options.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}module.exports=RetryOperation;RetryOperation.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(err){if(this._timeout&&clearTimeout(this._timeout),!err)return!1;var currentTime=new Date().getTime();if(err&¤tTime-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(err);var timeout=this._timeouts.shift();if(timeout===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),timeout=this._timeouts.shift();else return!1;var self=this,timer=setTimeout(function(){self._attempts++,self._operationTimeoutCb&&(self._timeout=setTimeout(function(){self._operationTimeoutCb(self._attempts)},self._operationTimeout),self._options.unref&&self._timeout.unref()),self._fn(self._attempts)},timeout);return this._options.unref&&timer.unref(),!0};RetryOperation.prototype.attempt=function(fn,timeoutOps){this._fn=fn,timeoutOps&&(timeoutOps.timeout&&(this._operationTimeout=timeoutOps.timeout),timeoutOps.cb&&(this._operationTimeoutCb=timeoutOps.cb));var self=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){self._operationTimeoutCb()},self._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};RetryOperation.prototype.try=function(fn){console.log("Using RetryOperation.try() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=function(fn){console.log("Using RetryOperation.start() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var counts={},mainError=null,mainErrorCount=0,i=0;i<this._errors.length;i++){var error=this._errors[i],message=error.message,count=(counts[message]||0)+1;counts[message]=count,count>=mainErrorCount&&(mainError=error,mainErrorCount=count)}return mainError}}});var require_retry=__commonJS({"../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/lib/retry.js"(exports){var RetryOperation=require_retry_operation();exports.operation=function(options){var timeouts=exports.timeouts(options);return new RetryOperation(timeouts,{forever:options&&options.forever,unref:options&&options.unref,maxRetryTime:options&&options.maxRetryTime})};exports.timeouts=function(options){if(options instanceof Array)return[].concat(options);var opts={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var key in options)opts[key]=options[key];if(opts.minTimeout>opts.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var timeouts=[],i=0;i<opts.retries;i++)timeouts.push(this.createTimeout(i,opts));return options&&options.forever&&!timeouts.length&&timeouts.push(this.createTimeout(i,opts)),timeouts.sort(function(a,b){return a-b}),timeouts};exports.createTimeout=function(attempt,opts){var random=opts.randomize?Math.random()+1:1,timeout=Math.round(random*opts.minTimeout*Math.pow(opts.factor,attempt));return timeout=Math.min(timeout,opts.maxTimeout),timeout};exports.wrap=function(obj,options,methods){if(options instanceof Array&&(methods=options,options=null),!methods){methods=[];for(var key in obj)typeof obj[key]=="function"&&methods.push(key)}for(var i=0;i<methods.length;i++){var method=methods[i],original=obj[method];obj[method]=function(original2){var op=exports.operation(options),args=Array.prototype.slice.call(arguments,1),callback=args.pop();args.push(function(err){op.retry(err)||(err&&(arguments[0]=op.mainError()),callback.apply(this,arguments))}),op.attempt(function(){original2.apply(obj,args)})}.bind(obj,original),obj[method].options=options}}}});var require_retry2=__commonJS({"../../node_modules/.pnpm/retry@0.12.0/node_modules/retry/index.js"(exports,module){module.exports=require_retry()}});var require_lib4=__commonJS({"../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js"(exports,module){var retrier=require_retry2();function retry(fn,opts){function run(resolve,reject){var options=opts||{},op=retrier.operation(options);function bail(err){reject(err||new Error("Aborted"))}function onError(err,num){if(err.bail){bail(err);return}op.retry(err)?options.onRetry&&options.onRetry(err,num):reject(op.mainError())}function runAttempt(num){var val;try{val=fn(bail,num)}catch(err){onError(err,num);return}Promise.resolve(val).then(resolve).catch(function(err){onError(err,num)})}op.attempt(runAttempt)}return new Promise(run)}module.exports=retry}});var require_errors=__commonJS({"../client/dist/errors.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),errors_exports={};__export(errors_exports,{DeploymentError:()=>DeploymentError});module.exports=__toCommonJS(errors_exports);var DeploymentError=class extends Error{constructor(err){super(err.message),this.code=err.code,this.errorName=err.name,this.name="DeploymentError"}}}});var require_upload=__commonJS({"../client/dist/upload.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),upload_exports={};__export(upload_exports,{UploadProgress:()=>UploadProgress,upload:()=>upload,uploadFiles:()=>uploadFiles});module.exports=__toCommonJS(upload_exports);var import_fs=__require("fs"),import_stream=__require("stream"),import_node_events=__require("node:events"),import_async_retry=__toESM2(require_lib4()),import_async_sema=require_lib3(),import_utils=require_utils(),import_errors=require_errors(),import_deploy=require_deploy(),isClientNetworkError=err=>err instanceof Error?err.message&&(err.message.includes("ETIMEDOUT")||err.message.includes("ECONNREFUSED")||err.message.includes("ENOTFOUND")||err.message.includes("ECONNRESET")||err.message.includes("EAI_FAIL")||err.message.includes("socket hang up")||err.message.includes("network socket disconnected"))?!0:isClientNetworkError(err.cause):!1;async function*upload(files,clientOptions,deploymentOptions){let debug=(0,import_utils.createDebug)(clientOptions.debug);if(!files&&!clientOptions.token&&!clientOptions.teamId){debug("Neither 'files', 'token' nor 'teamId are present. Exiting");return}let shas=[];debug("Determining necessary files for upload...");for await(let event of(0,import_deploy.deploy)(files,clientOptions,deploymentOptions))if(event.type==="error")if(event.payload.code==="missing_files")shas=event.payload.missing,debug(`${shas.length} files are required to upload`);else return yield event;else{if(event.type==="alias-assigned"||event.type==="checks-v2-failed")return debug(event.type==="alias-assigned"?"Deployment succeeded on file check":"v2 deployment-alias check failed on file check"),yield event;yield event}let uploads=shas.map(sha=>new UploadProgress(sha,files.get(sha)));yield{type:"file-count",payload:{total:files,missing:shas,uploads}};let uploadGenerator=uploadFiles({dispatcher:clientOptions.dispatcher,apiUrl:clientOptions.apiUrl,debug:clientOptions.debug,teamId:clientOptions.teamId,token:clientOptions.token,userAgent:clientOptions.userAgent,files,shas,uploads});for await(let event of uploadGenerator){if(event.type==="error")return yield event;yield event}debug("All files uploaded"),yield{type:"all-files-uploaded",payload:files};try{debug("Starting deployment creation");for await(let event of(0,import_deploy.deploy)(files,clientOptions,deploymentOptions)){if(event.type==="alias-assigned"||event.type==="checks-v2-failed")return debug("Deployment is ready"),yield event;yield event}}catch(e){debug("An unexpected error occurred when starting deployment creation"),yield{type:"error",payload:e}}}async function*uploadFiles(options){let debug=(0,import_utils.createDebug)(options.debug),uploadList={};debug("Building an upload list...");let semaphore=new import_async_sema.Sema(50,{capacity:50}),abortControllers=new Set,aborted=!1;for(options.shas.forEach((sha,index)=>{let uploadProgress=options.uploads[index];uploadList[sha]=(0,import_async_retry.default)(async bail=>{let file=options.files.get(sha);if(!file)return debug(`File ${sha} is undefined. Bailing`),bail(new Error(`File ${sha} is undefined`));if(await semaphore.acquire(),aborted)return semaphore.release(),bail(new Error("Upload aborted"));let{data,size,names}=file;uploadProgress.bytesUploaded=0;let body,contentLength,counter=new import_stream.Transform({transform(chunk,_encoding,callback){uploadProgress.bytesUploaded+=chunk.length,uploadProgress.emit("progress"),callback(null,chunk)}});if(typeof data<"u"){contentLength=data.length;let chunkSize=16384;function*chunks(){for(let i=0;i<data.length;i+=chunkSize)yield data.slice(i,i+chunkSize)}let buffered=import_stream.Readable.from(chunks());buffered.on("error",err2=>counter.destroy(err2)),body=buffered.pipe(counter)}else if(typeof size=="number"){contentLength=size;let fileStream=(0,import_fs.createReadStream)(names[0]);fileStream.on("error",err2=>counter.destroy(err2)),counter.on("close",()=>fileStream.destroy()),body=fileStream.pipe(counter)}else{semaphore.release();return}let err,result,abortController=new AbortController;abortControllers.add(abortController);try{let res=await(0,import_utils.fetchApi)(import_utils.API_FILES,options.token,{dispatcher:options.dispatcher,method:"POST",headers:{"Content-Type":"application/octet-stream","Content-Length":String(contentLength),"x-now-digest":sha,"x-now-size":String(contentLength)},body,teamId:options.teamId,apiUrl:options.apiUrl,userAgent:options.userAgent,signal:abortController.signal},options.debug);if(res.status===200)debug(`File ${sha} (${file.names[0]}${file.names.length>1?` +${file.names.length}`:""}) uploaded`),result={type:"file-uploaded",payload:{sha,file}};else if(res.status>200&&res.status<500){debug("An internal error occurred in upload request. Not retrying...");let{error}=await res.json();err=new import_errors.DeploymentError(error)}else{debug("A server error occurred in upload request. Retrying...");let{error}=await res.json();throw new import_errors.DeploymentError(error)}}catch(e){debug(`An unexpected error occurred in upload promise:
|
|
20
|
-
${e}`),err=e instanceof Error?e:new Error(String(e))}if(semaphore.release(),err){if(isClientNetworkError(err))throw debug("Network error, retrying: "+err.message),err;return debug("Other error, bailing: "+err.message),aborted||(aborted=!0,abortControllers.forEach(controller=>controller.abort())),bail(err)}return abortControllers.delete(abortController),result},{retries:5,factor:6,minTimeout:10})}),debug("Starting upload");Object.keys(uploadList).length>0;)try{let event=await Promise.race(Object.values(uploadList));delete uploadList[event.payload.sha],yield event}catch(e){return yield{type:"error",payload:e}}}var UploadProgress=class extends import_node_events.EventEmitter{constructor(sha,file){super(),this.sha=sha,this.file=file,this.bytesUploaded=0}}}});var require_tar_fs=__commonJS({"../../node_modules/.pnpm/tar-fs@1.16.3/node_modules/tar-fs/index.js"(exports){var chownr=require_chownr(),tar=require_tar_stream(),pump=require_pump(),mkdirp=require_mkdirp(),fs=__require("fs"),path=__require("path"),os=__require("os"),win32=os.platform()==="win32",noop=function(){},echo=function(name){return name},normalize=win32?function(name){return name.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:echo,statAll=function(fs2,stat,cwd,ignore,entries,sort){var queue=entries||["."];return function(callback){if(!queue.length)return callback();var next=queue.shift(),nextAbs=path.join(cwd,next);stat(nextAbs,function(err,stat2){if(err)return callback(err);if(!stat2.isDirectory())return callback(null,next,stat2);fs2.readdir(nextAbs,function(err2,files){if(err2)return callback(err2);sort&&files.sort();for(var i=0;i<files.length;i++)ignore(path.join(cwd,next,files[i]))||queue.push(path.join(next,files[i]));callback(null,next,stat2)})})}},strip=function(map,level){return function(header){header.name=header.name.split("/").slice(level).join("/");var linkname=header.linkname;return linkname&&(header.type==="link"||path.isAbsolute(linkname))&&(header.linkname=linkname.split("/").slice(level).join("/")),map(header)}};exports.pack=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs,ignore=opts.ignore||opts.filter||noop,map=opts.map||noop,mapStream=opts.mapStream||echo,statNext=statAll(xfs,opts.dereference?xfs.stat:xfs.lstat,cwd,ignore,opts.entries,opts.sort),strict=opts.strict!==!1,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,pack=opts.pack||tar.pack(),finish=opts.finish||noop;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var onsymlink=function(filename,header){xfs.readlink(path.join(cwd,filename),function(err,linkname){if(err)return pack.destroy(err);header.linkname=normalize(linkname),pack.entry(header,onnextentry)})},onstat=function(err,filename,stat){if(err)return pack.destroy(err);if(!filename)return opts.finalize!==!1&&pack.finalize(),finish(pack);if(stat.isSocket())return onnextentry();var header={name:normalize(filename),mode:(stat.mode|(stat.isDirectory()?dmode:fmode))&umask,mtime:stat.mtime,size:stat.size,type:"file",uid:stat.uid,gid:stat.gid};if(stat.isDirectory())return header.size=0,header.type="directory",header=map(header)||header,pack.entry(header,onnextentry);if(stat.isSymbolicLink())return header.size=0,header.type="symlink",header=map(header)||header,onsymlink(filename,header);if(header=map(header)||header,!stat.isFile())return strict?pack.destroy(new Error("unsupported type for "+filename)):onnextentry();var entry=pack.entry(header,onnextentry);if(entry){var rs=mapStream(xfs.createReadStream(path.join(cwd,filename)),header);rs.on("error",function(err2){entry.destroy(err2)}),pump(rs,entry)}},onnextentry=function(err){if(err)return pack.destroy(err);statNext(onstat)};return onnextentry(),pack};var head=function(list){return list.length?list[list.length-1]:null},processGetuid=function(){return process.getuid?process.getuid():-1},processUmask=function(){return process.umask?process.umask():0};exports.extract=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs,ignore=opts.ignore||opts.filter||noop,map=opts.map||noop,mapStream=opts.mapStream||echo,own=opts.chown!==!1&&!win32&&processGetuid()===0,extract=opts.extract||tar.extract(),stack=[],now=new Date,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,strict=opts.strict!==!1;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var utimesParent=function(name,cb){for(var top;(top=head(stack))&&name.slice(0,top[0].length)!==top[0];)stack.pop();if(!top)return cb();xfs.utimes(top[0],now,top[1],cb)},utimes=function(name,header,cb){if(opts.utimes===!1)return cb();if(header.type==="directory")return xfs.utimes(name,now,header.mtime,cb);if(header.type==="symlink")return utimesParent(name,cb);xfs.utimes(name,now,header.mtime,function(err){if(err)return cb(err);utimesParent(name,cb)})},chperm=function(name,header,cb){var link=header.type==="symlink",chmod=link?xfs.lchmod:xfs.chmod,chown=link?xfs.lchown:xfs.chown;if(!chmod)return cb();var mode=(header.mode|(header.type==="directory"?dmode:fmode))&umask;chmod(name,mode,function(err){if(err)return cb(err);if(!own||!chown)return cb();chown(name,header.uid,header.gid,cb)})};return extract.on("entry",function(header,stream,next){header=map(header)||header,header.name=normalize(header.name);var name=path.join(cwd,path.join("/",header.name));if(ignore(name,header))return stream.resume(),next();var stat=function(err){if(err)return next(err);utimes(name,header,function(err2){if(err2)return next(err2);if(win32)return next();chperm(name,header,next)})},onsymlink=function(){if(win32)return next();xfs.unlink(name,function(){xfs.symlink(header.linkname,name,stat)})},onlink=function(){if(win32)return next();xfs.unlink(name,function(){var srcpath=path.join(cwd,path.join("/",header.linkname));xfs.link(srcpath,name,function(err){if(err&&err.code==="EPERM"&&opts.hardlinkAsFilesFallback)return stream=xfs.createReadStream(srcpath),onfile();stat(err)})})},onfile=function(){var ws=xfs.createWriteStream(name),rs=mapStream(stream,header);ws.on("error",function(err){rs.destroy(err)}),pump(rs,ws,function(err){if(err)return next(err);ws.on("close",stat)})};if(header.type==="directory")return stack.push([name,header.mtime]),mkdirfix(name,{fs:xfs,own,uid:header.uid,gid:header.gid},stat);var dir=path.dirname(name);validate(xfs,dir,path.join(cwd,"."),function(err,valid){if(err)return next(err);if(!valid)return next(new Error(dir+" is not a valid path"));mkdirfix(dir,{fs:xfs,own,uid:header.uid,gid:header.gid},function(err2){if(err2)return next(err2);switch(header.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(strict)return next(new Error("unsupported type for "+name+" ("+header.type+")"));stream.resume(),next()})})}),opts.finish&&extract.on("finish",opts.finish),extract};function validate(fs2,name,root,cb){if(name===root)return cb(null,!0);fs2.lstat(name,function(err,st){if(err&&err.code!=="ENOENT")return cb(err);if(err||st.isDirectory())return validate(fs2,path.join(name,".."),root,cb);cb(null,!1)})}function mkdirfix(name,opts,cb){mkdirp(name,{fs:opts.fs},function(err,made){!err&&made&&opts.own?chownr(made,opts.uid,opts.gid,cb):cb(err)})}}});var require_archive=__commonJS({"../client/dist/utils/archive.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),archive_exports={};__export(archive_exports,{createTgzFiles:()=>createTgzFiles});module.exports=__toCommonJS(archive_exports);var import_node_path=__require("node:path"),import_node_zlib=__require("node:zlib"),import_build_utils=__require("@vercel/build-utils"),import_tar_fs=__toESM2(require_tar_fs()),import_hashes=require_hashes();async function createTgzFiles(workPath,fileList,debug,exclude){let filesToArchive=exclude?fileList.filter(file=>!exclude.includes(file)):fileList;debug?.("Packing tarball");let tarStream=import_tar_fs.default.pack(workPath,{entries:filesToArchive.map(file=>(0,import_node_path.relative)(workPath,file))}).pipe((0,import_node_zlib.createGzip)()),chunkedTarBuffers=await(0,import_build_utils.streamToBufferChunks)(tarStream);return debug?.(`Packed tarball into ${chunkedTarBuffers.length} chunks`),new Map(chunkedTarBuffers.map((chunk,index)=>[(0,import_hashes.hash)(chunk),{names:[(0,import_node_path.join)(workPath,`.vercel/source.tgz.part${index+1}`)],data:chunk,mode:438}]))}}});var require_collect_deployment_files=__commonJS({"../client/dist/collect-deployment-files.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),collect_deployment_files_exports={};__export(collect_deployment_files_exports,{assertDeploymentPath:()=>assertDeploymentPath,collectDeploymentFiles:()=>collectDeploymentFiles});module.exports=__toCommonJS(collect_deployment_files_exports);var import_error_utils2=require_dist(),import_fs_extra2=require_lib2(),import_path2=__require("path"),import_errors=require_errors(),import_utils=require_utils(),import_archive=require_archive(),import_hashes=require_hashes();function assertDeploymentPath(path,debug){if(typeof path!="string"&&!Array.isArray(path))throw debug(`Error: 'path' is expected to be a string or an array. Received ${typeof path}`),new import_errors.DeploymentError({code:"missing_path",message:"Path not provided"})}async function collectDeploymentFiles(path,clientOptions,debug){assertDeploymentPath(path,debug);let isDirectory=!Array.isArray(path)&&(0,import_fs_extra2.lstatSync)(path).isDirectory();if(clientOptions.isDirectory=isDirectory,Array.isArray(path)){for(let filePath of path)if(!(0,import_path2.isAbsolute)(filePath))throw new import_errors.DeploymentError({code:"invalid_path",message:`Provided path ${filePath} is not absolute`})}else if(!(0,import_path2.isAbsolute)(path))throw new import_errors.DeploymentError({code:"invalid_path",message:`Provided path ${path} is not absolute`});isDirectory&&!Array.isArray(path)?debug("Provided 'path' is a directory."):Array.isArray(path)?debug("Provided 'path' is an array of file paths"):debug("Provided 'path' is a single file");let{fileList,ignoreList,warning}=await(0,import_utils.buildFileTree)(path,clientOptions,debug),workPath=typeof path=="string"?path:path[0],filesMap;try{filesMap=clientOptions.archive==="tgz"?await(0,import_archive.createTgzFiles)(workPath,fileList,debug):await(0,import_hashes.hashes)(fileList)}catch(err){if(clientOptions.prebuilt&&(0,import_error_utils2.isErrnoException)(err)&&err.code==="ENOENT"&&err.path){let errPath=(0,import_path2.relative)(workPath,err.path);err.message=`File does not exist: "${(0,import_path2.relative)(workPath,errPath)}"`,errPath.split(import_path2.sep).includes("node_modules")&&(err.message=`Please ensure project dependencies have been installed:
|
|
21
|
-
${err.message}`)}throw err}return{fileList,filesMap,workPath,isDirectory,ignoreList,warning}}}});var require_create_deployment=__commonJS({"../client/dist/create-deployment.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),create_deployment_exports={};__export(create_deployment_exports,{default:()=>buildCreateDeployment});module.exports=__toCommonJS(create_deployment_exports);var import_hashes=require_hashes(),import_deploy=require_deploy(),import_upload=require_upload(),import_utils=require_utils(),import_errors=require_errors(),import_collect_deployment_files=require_collect_deployment_files();function buildCreateDeployment(){return async function*(clientOptions,deploymentOptions={}){let options=Promise.resolve(deploymentOptions);options.catch(()=>{});let{path}=clientOptions,debug=(0,import_utils.createDebug)(clientOptions.debug);if(debug("Creating deployment..."),(0,import_collect_deployment_files.assertDeploymentPath)(path,debug),typeof clientOptions.token!="string")throw debug(`Error: 'token' is expected to be a string. Received ${typeof clientOptions.token}`),new import_errors.DeploymentError({code:"token_not_provided",message:"Options object must include a `token`"});if(clientOptions.manual){if(debug("Manual provisioning mode enabled"),!clientOptions.prebuilt)throw new import_errors.DeploymentError({code:"invalid_options",message:"The `manual` option requires `prebuilt` to be true"});let deploymentOptions2=await options;deploymentOptions2.build=deploymentOptions2.build||{},deploymentOptions2.build.env=deploymentOptions2.build.env||{},deploymentOptions2.build.env.VERCEL_MANUAL_PROVISIONING="1",deploymentOptions2.version=2,debug("Creating deployment with manual provisioning..."),yield*(0,import_deploy.deploy)(new Map,clientOptions,deploymentOptions2);return}let{fileList,filesMap:files,warning}=await(0,import_collect_deployment_files.collectDeploymentFiles)(path,clientOptions,debug);warning&&(debug("Yielding a prebuilt filePathMap ignore warning"),yield{type:"warning",payload:warning,code:"PREBUILT_FILEPATHMAP_IGNORED"}),fileList.length===0&&(debug("Deployment path has no files. Yielding a warning event"),yield{type:"warning",payload:"There are no files inside your deployment."}),debug(`Yielding a 'hashes-calculated' event with ${files.size} hashes`),yield{type:"hashes-calculated",payload:(0,import_hashes.mapToObject)(files)},clientOptions.apiUrl&&debug(`Using provided API URL: ${clientOptions.apiUrl}`),clientOptions.userAgent&&debug(`Using provided user agent: ${clientOptions.userAgent}`);let resolvedOptions=await options;debug("Setting platform version to harcoded value 2"),resolvedOptions.version=2,debug("Creating the deployment and starting upload...");for await(let event of(0,import_upload.upload)(files,clientOptions,resolvedOptions))debug(`Yielding a '${event.type}' event`),yield event}}}});var require_continue=__commonJS({"../client/dist/continue.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),continue_exports={};__export(continue_exports,{continueDeployment:()=>continueDeployment2});module.exports=__toCommonJS(continue_exports);var import_path2=__require("path"),import_fs_extra2=__toESM2(require_lib2()),import_check_deployment_status=require_check_deployment_status(),import_utils=require_utils(),import_hashes=require_hashes(),import_ready_state=require_ready_state(),import_upload=require_upload(),import_errors=require_errors(),import_archive=require_archive();async function*continueDeployment2(options){let debug=(0,import_utils.createDebug)(options.debug);debug(`Continuing deployment: ${options.deploymentId}`);let outputDir=options.vercelOutputDir||(0,import_path2.join)(options.path,".vercel","output");if(!await import_fs_extra2.default.pathExists(outputDir))return yield{type:"error",payload:new import_errors.DeploymentError({code:"output_dir_not_found",message:`Output directory not found at ${outputDir}. Run 'vercel build' first.`})};let{fileList,warning}=await(0,import_utils.buildFileTree)(options.path,{isDirectory:!0,prebuilt:!0,vercelOutputDir:outputDir},debug);warning&&(debug("Yielding a prebuilt filePathMap ignore warning"),yield{type:"warning",payload:warning,code:"PREBUILT_FILEPATHMAP_IGNORED"});let provisionJsonPath=(0,import_path2.join)(outputDir,"provision.json"),unbundledFiles=fileList.filter(f=>f===provisionJsonPath),files;if(options.archive==="tgz"){if(files=await(0,import_archive.createTgzFiles)(options.path,fileList,debug,unbundledFiles),unbundledFiles.length>0){let individualFiles=await(0,import_hashes.hashes)(unbundledFiles);for(let[sha,entry]of individualFiles)files.set(sha,entry)}}else files=await(0,import_hashes.hashes)(fileList);debug(`Calculated ${files.size} unique hashes`),yield{type:"hashes-calculated",payload:(0,import_hashes.mapToObject)(files)};let deployment,result=await postContinue({deploymentId:options.deploymentId,files,outputDir,path:options.path,token:options.token,teamId:options.teamId,apiUrl:options.apiUrl,userAgent:options.userAgent,dispatcher:options.dispatcher,debug:options.debug});if(result.type==="missing_files"){debug(`Uploading ${result.missing.length} missing files...`);let uploads=result.missing.map(sha=>new import_upload.UploadProgress(sha,files.get(sha)));yield{type:"file-count",payload:{total:files,missing:result.missing,uploads}};for await(let event of(0,import_upload.uploadFiles)({dispatcher:options.dispatcher,apiUrl:options.apiUrl,debug:options.debug,teamId:options.teamId,token:options.token,userAgent:options.userAgent,shas:result.missing,files,uploads})){if(event.type==="error")return yield event;yield event}if(yield{type:"all-files-uploaded",payload:files},result=await postContinue({deploymentId:options.deploymentId,files,outputDir,path:options.path,token:options.token,teamId:options.teamId,apiUrl:options.apiUrl,userAgent:options.userAgent,dispatcher:options.dispatcher,debug:options.debug}),result.type==="missing_files")return yield{type:"error",payload:{code:"missing_files",message:"Missing files",missing:result.missing}}}if(result.type==="error")return yield{type:"error",payload:result.error};if(result.type==="success"&&(deployment=result.deployment,yield{type:"created",payload:deployment}),!deployment)return yield{type:"error",payload:new import_errors.DeploymentError({code:"continue_failed",message:"Failed to continue deployment after uploading files"})};if((0,import_ready_state.isReady)(deployment)&&(0,import_ready_state.isAliasAssigned)(deployment))return yield{type:"ready",payload:deployment},yield{type:"alias-assigned",payload:deployment};yield*(0,import_check_deployment_status.checkDeploymentStatus)(deployment,{dispatcher:options.dispatcher,apiUrl:options.apiUrl,debug:options.debug,path:options.path,teamId:options.teamId,token:options.token,userAgent:options.userAgent})}async function postContinue(options){let debug=(0,import_utils.createDebug)(options.debug);debug(`Calling continue deployment endpoint for ${options.deploymentId}`);let response=await(0,import_utils.fetchApi)(`/deployments/${options.deploymentId}/continue${options.teamId?`?teamId=${options.teamId}`:""}`,options.token,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({files:(0,import_utils.prepareFiles)(options.files,{isDirectory:!0,path:options.path,token:options.token})}),apiUrl:options.apiUrl,userAgent:options.userAgent,dispatcher:options.dispatcher}),result;try{result=await response.json()}catch{return{type:"error",error:new Error("Invalid JSON response from continue endpoint")}}return!response.ok||result.error?result.error?.code==="missing_files"||result.code==="missing_files"?(debug(`Continue deployment returned missing_files: ${(result.error?.missing||result.missing||[]).length} files`),{type:"missing_files",missing:result.error?.missing||result.missing||[]}):(debug("Continue deployment request failed"),{type:"error",error:result.error?{...result.error,status:response.status}:{...result,status:response.status}}):(debug("Continue deployment succeeded"),{type:"success",deployment:result})}}});var require_inspect_deployment_files=__commonJS({"../client/dist/inspect-deployment-files.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),inspect_deployment_files_exports={};__export(inspect_deployment_files_exports,{inspectDeploymentFiles:()=>inspectDeploymentFiles2});module.exports=__toCommonJS(inspect_deployment_files_exports);var import_path2=__require("path"),import_collect_deployment_files=require_collect_deployment_files(),import_utils=require_utils();async function inspectDeploymentFiles2(clientOptions){let{path}=clientOptions,debug=(0,import_utils.createDebug)(clientOptions.debug),{filesMap,workPath,isDirectory,ignoreList,warning}=await(0,import_collect_deployment_files.collectDeploymentFiles)(path,{...clientOptions},debug),files=[],totalSize=0;for(let[sha,file]of filesMap){let size=file.data?.byteLength||file.data?.length||0;for(let name of file.names){let deploymentFile={path:(isDirectory?(0,import_path2.relative)(workPath,name):name.split(import_path2.sep).at(-1)||name).split(import_path2.sep).join("/"),size,mode:file.mode};typeof sha<"u"&&(deploymentFile.sha=sha),files.push(deploymentFile),totalSize+=size}}return files.sort((a,b)=>a.path.localeCompare(b.path)),{basePath:workPath,fileCount:files.length,totalSize,ignoredCount:ignoreList.length,files,ignored:ignoreList.sort(),warning}}}});var require_dist2=__commonJS({"../client/dist/index.js"(exports,module){"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toESM2=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{buildFileTree:()=>import_utils.buildFileTree,checkDeploymentStatus:()=>import_check_deployment_status.checkDeploymentStatus,continueDeployment:()=>import_continue.continueDeployment,createDeployment:()=>createDeployment,getVercelIgnore:()=>import_utils.getVercelIgnore,inspectDeploymentFiles:()=>import_inspect_deployment_files.inspectDeploymentFiles});module.exports=__toCommonJS(src_exports);var import_create_deployment=__toESM2(require_create_deployment()),import_continue=require_continue(),import_check_deployment_status=require_check_deployment_status(),import_inspect_deployment_files=require_inspect_deployment_files(),import_utils=require_utils();__reExport(src_exports,require_errors(),module.exports);__reExport(src_exports,require_types(),module.exports);var createDeployment=(0,import_create_deployment.default)()}});var import_fs_extra=__toESM(require_lib(),1);import{join}from"path";var import_error_utils=__toESM(require_dist(),1);async function writeProjectSettings(cwd,project,org,isRepoLinked){let analyticsId;project.analytics?.id&&(!project.analytics.disabledAt||project.analytics.enabledAt&&project.analytics.enabledAt>project.analytics.disabledAt)&&(analyticsId=project.analytics.id);let projectLinkAndSettings={projectId:isRepoLinked?void 0:project.id,orgId:isRepoLinked?void 0:org.id,projectName:isRepoLinked?void 0:project.name,settings:{createdAt:project.createdAt,framework:project.framework,devCommand:project.devCommand,installCommand:project.installCommand,buildCommand:project.buildCommand,outputDirectory:project.outputDirectory,rootDirectory:project.rootDirectory,directoryListing:project.directoryListing,nodeVersion:project.nodeVersion,analyticsId}},path=join(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT);return await(0,import_fs_extra.outputJSON)(path,projectLinkAndSettings,{spaces:2})}async function readProjectSettings(vercelDir){try{return JSON.parse(await(0,import_fs_extra.readFile)(join(vercelDir,VERCEL_DIR_PROJECT),"utf8"))}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code&&["ENOENT","ENOTDIR"].includes(err.code)||(0,import_error_utils.isError)(err)&&err.name==="SyntaxError")return null;throw err}}function pickOverrides(vercelConfig){let overrides={};for(let prop of["buildCommand","devCommand","framework","ignoreCommand","installCommand","outputDirectory"])typeof vercelConfig[prop]<"u"&&(prop==="ignoreCommand"?overrides.commandForIgnoringBuildStep=vercelConfig[prop]:overrides[prop]=vercelConfig[prop]);return overrides}export{require_dist2 as require_dist,writeProjectSettings,readProjectSettings,pickOverrides};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_ms}from"./chunk-QTKJC2O5.js";import{getGlobalPathConfig}from"./chunk-CQ3RAERR.js";import{require_load_json_file}from"./chunk-RCTYVKM5.js";import{require_types}from"./chunk-GHM7V3GG.js";import{inspectTokenRequest,processInspectTokenResponse}from"./chunk-5XJNPXQK.js";import{parseArguments}from"./chunk-LCWCTL6L.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR,findProjectsFromPath,getLinkFromDir,getRepoLink,getVercelDirectory}from"./chunk-7IRKF3ZG.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{require_cli_config}from"./chunk-BRK4OB4B.js";import{getUser}from"./chunk-SM5JI6QM.js";import{getTeamByIdOrSlug}from"./chunk-VOZEB6PD.js";import{ConflictingConfigFiles,DeprecatedNowJson,InvalidLocalConfig,InvalidToken,NowError,TeamDeleted}from"./chunk-RINZXCDJ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function highlight(text){return import_chalk.default.bold.underline(text)}var VERCEL_API_ORIGIN="https://api.vercel.com";async function introspectToken(client){let token=client.authConfig.token;if(!token)throw new Error("No token to introspect");if(new URL(client.apiUrl).origin!==VERCEL_API_ORIGIN)throw new Error("Token introspection is unavailable for custom API origins");let[error,introspection]=await processInspectTokenResponse(await inspectTokenRequest(token));if(error)throw error;return introspection}function isAppPrincipalEnabled(){return!!process.env.APP_PRINCIPAL_ENABLED}function resolveAppFromToken(token){return!token.active||!token.client_id?null:{id:token.client_id,name:token.client_name}}async function resolveAppTokenScope(client,scope){let token=await introspectToken(client).catch(()=>null),app=token?resolveAppFromToken(token):null,team=token?.team;return!app||!team||team.id!==scope&&team.slug!==scope?!1:(client.config.currentTeam=team.id,!0)}var import_cli_config=__toESM(require_cli_config(),1),import_ms=__toESM(require_ms(),1);var import_load_json_file=__toESM(require_load_json_file(),1),config=__toESM(require_cli_config(),1),import_error_utils=__toESM(require_dist(),1),import_types=__toESM(require_types(),1);import{join,basename,dirname}from"path";import{accessSync,constants}from"fs";import{persistCliAuthConfig,readCliAuthConfig}from"@vercel/cli-auth/credentials-store.js";import path from"path";import{existsSync}from"fs";function getLocalPathConfig(prefix,useCompiledConfig=!0){let customPath=parseArguments(process.argv.slice(2),{},{permissive:!0}).flags["--local-config"];if(customPath){if(typeof customPath!="string")throw new InvalidLocalConfig(customPath);return path.resolve(process.cwd(),customPath)}let vercelConfigPath=path.join(prefix,"vercel.json"),vercelTomlPath=path.join(prefix,"vercel.toml"),nowConfigPath=path.join(prefix,"now.json"),vercelConfigExists=existsSync(vercelConfigPath),vercelTomlExists=existsSync(vercelTomlPath),nowConfigExists=existsSync(nowConfigPath),foundConfigs=[];if(vercelConfigExists&&foundConfigs.push(vercelConfigPath),vercelTomlExists&&foundConfigs.push(vercelTomlPath),nowConfigExists)throw new DeprecatedNowJson(nowConfigPath);if(foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs);let compiledConfigPath=path.join(prefix,VERCEL_DIR,"vercel.json"),compiledConfigExists=existsSync(compiledConfigPath);return useCompiledConfig&&compiledConfigExists?compiledConfigPath:vercelConfigPath}var VERCEL_DIR2=getGlobalPathConfig(),CONFIG_FILE_PATH=config.getConfigFilePath(VERCEL_DIR2),AUTH_CONFIG_FILE_PATH=config.getAuthConfigFilePath(VERCEL_DIR2),readConfigFile=()=>config.readGlobalConfigFile(CONFIG_FILE_PATH),writeToConfigFile=stuff=>{try{config.writeGlobalConfigFile(CONFIG_FILE_PATH,stuff)}catch(err){throw(0,import_error_utils.isErrnoException)(err)&&((0,import_error_utils.isErrnoException)(err)&&err.code==="EPERM"?(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (operation not permitted).`),process.exit(1)):err.code==="EBADF"&&(output_manager_default.error(`Not able to create ${highlight(CONFIG_FILE_PATH)} (bad file descriptor).`),process.exit(1))),err}},readAuthConfigFile=_globalConfig=>({...config.getDefaultAuthConfig(),...readCliAuthConfig(VERCEL_DIR2)}),persistAuthConfig=(authConfig,_globalConfig)=>{try{return persistCliAuthConfig(VERCEL_DIR2,authConfig)}catch(err){let wrappedError=new Error(`Not able to create ${humanizePath(AUTH_CONFIG_FILE_PATH)} (${(0,import_error_utils.errorToStringFriendly)(err)}).`);throw wrappedError.cause=err,wrappedError}};function getConfigFilePath2(){return CONFIG_FILE_PATH}function getAuthConfigFilePath2(){return AUTH_CONFIG_FILE_PATH}function readLocalConfig(prefix=process.cwd()){let config2,target="";try{target=getLocalPathConfig(prefix)}catch(err){if(err instanceof NowError)output_manager_default.error(err.message),process.exit(1);else throw err}if(!target)return;try{accessSync(target,constants.F_OK),config2=import_load_json_file.default.sync(target)}catch(err){if(!((0,import_error_utils.isErrnoException)(err)&&err.code==="ENOENT"))if((0,import_error_utils.isError)(err)&&err.name==="JSONError")output_manager_default.error(err.message),process.exit(1);else if((0,import_error_utils.isErrnoException)(err)){let code=err.code?` (${err.code})`:"";output_manager_default.error(`Failed to read config file: ${target}${code}`),process.exit(1)}else output_manager_default.prettyError(err),process.exit(1)}if(!config2)return;if(basename(target)==="vercel.json"&&basename(dirname(target))===VERCEL_DIR){let workPath=dirname(dirname(target)),sourceFile=null;for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);try{accessSync(configPath,constants.F_OK),sourceFile=basename(configPath);break}catch{}}if(!sourceFile){let tomlPath=join(workPath,"vercel.toml");try{accessSync(tomlPath,constants.F_OK),sourceFile="vercel.toml"}catch{}}config2[import_types.fileNameSymbol]=sourceFile||DEFAULT_VERCEL_CONFIG_FILENAME}else config2[import_types.fileNameSymbol]=basename(target);return config2}var TEAM_SLUG_TTL_MS=(0,import_ms.default)("1d");function getCachedTeamSlug(config2,teamId,now=Date.now()){let saved=config2.cachedTeamSlugs?.[teamId];if(!isSavedTeamSlug(saved))return;let age=now-saved.savedAt;return age>=0&&age<TEAM_SLUG_TTL_MS?saved.slug:void 0}function setCachedTeamSlug(client,teamId,slug){if(getCachedTeamSlug(client.config,teamId)===slug)return;let saved={slug,savedAt:Date.now()};updateCachedTeamSlugs(client,slugs=>({...slugs,[teamId]:saved}))}function forgetCachedTeamSlug(client,teamId){let slugs=client.config.cachedTeamSlugs;!slugs||!(teamId in slugs)||updateCachedTeamSlugs(client,saved=>{let rest={...saved};return delete rest[teamId],rest})}function isSavedTeamSlug(value){return typeof value=="object"&&value!==null&&typeof value.slug=="string"&&typeof value.savedAt=="number"}function updateCachedTeamSlugs(client,update){try{let configPath=getConfigFilePath2(),savedConfig=(0,import_cli_config.readGlobalConfigFile)(configPath),cachedTeamSlugs=update(savedConfig.cachedTeamSlugs??{}),config2={...savedConfig,cachedTeamSlugs};(0,import_cli_config.writeGlobalConfigFile)(configPath,config2),client.config.cachedTeamSlugs=cachedTeamSlugs}catch{output_manager_default.debug("Failed to persist cached team slugs.")}}import{relative}from"path";var import_cli_config2=__toESM(require_cli_config(),1);function isEligibleForNativeBinaryAutoOptIn(client){return client.teams?.some(team=>team.slug==="vercel")===!0}function autoOptInNativeBinary(client){let envOverride=process.env.VERCEL_CLI_USE_NATIVE_BINARY;if(!(envOverride==="false"||envOverride==="0"||typeof client.config.useNativeBinary=="boolean"||client.config.nativeBinaryAutoOptIn===!0||!isEligibleForNativeBinaryAutoOptIn(client)))try{let configPath=getConfigFilePath2(),savedConfig=(0,import_cli_config2.readGlobalConfigFile)(configPath);if(typeof savedConfig.useNativeBinary=="boolean"||savedConfig.nativeBinaryAutoOptIn===!0)return;let config2={...savedConfig,nativeBinaryAutoOptIn:!0};(0,import_cli_config2.writeGlobalConfigFile)(configPath,config2),client.config={...client.config,nativeBinaryAutoOptIn:!0}}catch{output_manager_default.debug("Failed to persist automatic native binary enrollment.")}}async function getScope(client,opts={}){let{user,app,token}=await getPrincipal(client);user&&autoOptInNativeBinary(client);let defaultTeamId=user?.version==="northstar"?user.defaultTeamId:void 0,appTeamId=!user&&app?token?.team?.id:void 0;if(!user&&app&&opts.getTeam===!1)throw new Error("App principal scope resolution requires a team lookup.");!user&&app&&(client.config.currentTeam=appTeamId),!client.config.currentTeam&&defaultTeamId&&(client.config.currentTeam=defaultTeamId);let teamId=client.config.currentTeam||defaultTeamId,team=teamId&&opts.getTeam!==!1?await getTeam(client,teamId):null,contextName=team?.slug||user?.username||user?.email;if(!contextName)throw new Error("Unable to determine context name");return opts.resolveLocalScope?resolveLocalScopeContext(client,{user,app,team}):{contextName,team,user,app}}async function getContextName(client,opts={}){let teamId=client.config.currentTeam,cachedSlug=teamId&&!client.authConfig.tokenSource?getCachedTeamSlug(client.config,teamId):void 0;if(cachedSlug&&!(opts.resolveLocalScope&&await hasLocalScope(client)))return output_manager_default.debug(`Using saved name "${cachedSlug}" for team ${teamId}`),cachedSlug;let{contextName,team}=opts.resolveLocalScope?await getScope(client,{resolveLocalScope:!0}):await getScope(client);return team&&!client.authConfig.tokenSource&&setCachedTeamSlug(client,team.id,team.slug),contextName}async function hasLocalScope(client){if(detectExplicitScope(client))return!1;let{localOrgId,isCrossTeamRepo}=await findLocalLink(client);return!!localOrgId||isCrossTeamRepo}async function getPrincipal(client){if(!isAppPrincipalEnabled())return{user:await getUser(client),app:null,token:null};let[userResult,tokenResult]=await Promise.allSettled([getUser(client),introspectToken(client)]),token=tokenResult.status==="fulfilled"?tokenResult.value:null,app=token?resolveAppFromToken(token):null;if(userResult.status==="rejected"&&!(app&&userResult.reason instanceof InvalidToken))throw userResult.reason;return{user:userResult.status==="fulfilled"?userResult.value:null,app,token}}async function resolveLocalScopeContext(client,{user,app,team}){let explicitScopeProvided=detectExplicitScope(client),globalTeamId=client.config.currentTeam,{localOrgId,linkedRepo,isCrossTeamRepo}=await findLocalLink(client),isAppPrincipal=!user&&!!app,effectiveLocalOrgId=isAppPrincipal?void 0:localOrgId,scopeMismatch=!!(effectiveLocalOrgId&&globalTeamId&&globalTeamId!==effectiveLocalOrgId);!isAppPrincipal&&!explicitScopeProvided&&!effectiveLocalOrgId&&isCrossTeamRepo&&output_manager_default.warn("This repository has projects across multiple teams. Use `--scope` to specify which team, or `cd` into a project directory.");let resolvedTeam=!explicitScopeProvided&&effectiveLocalOrgId?await applyLocalOrg(client,effectiveLocalOrgId):team,{org,contextName}=resolveOrg(resolvedTeam,user);return{org,contextName,user,team:resolvedTeam,app,globalTeam:team,linkedRepo,isCrossTeamRepo,localOrgId:effectiveLocalOrgId,scopeMismatch,explicitScopeProvided}}async function applyLocalOrg(client,localOrgId){return client.config.currentTeam=localOrgId.startsWith("team_")?localOrgId:void 0,client.config.currentTeam?await getTeamByIdOrSlug(client,client.config.currentTeam):null}async function getTeam(client,teamId){let team=await getTeamByIdOrSlug(client,teamId);if(!team)throw new TeamDeleted;return team}function resolveOrg(team,user){if(team)return{org:{type:"team",id:team.id,slug:team.slug},contextName:team.slug};if(user)return{org:{type:"user",id:user.id,slug:user.username},contextName:user.username||user.email};throw new Error("Unable to determine scope: no team or personal account is available for this token. Use `--scope` to specify a team.")}async function findLocalLink(client){let[projectLink,repoLink]=await Promise.all([findProjectLink(client),findRepoLink(client)]);return{localOrgId:findLocalOrgId(client.cwd,projectLink,repoLink),linkedRepo:repoLink?.repoConfig?{repoConfig:repoLink.repoConfig,rootPath:repoLink.rootPath}:null,isCrossTeamRepo:detectCrossTeamRepo(repoLink?.repoConfig)}}async function findProjectLink(client){try{return await getLinkFromDir(getVercelDirectory(client.cwd))}catch{return null}}async function findRepoLink(client){try{return await getRepoLink(client,client.cwd)}catch{return null}}function findLocalOrgId(cwd,projectLink,repoLink){if(projectLink)return projectLink.orgId;if(repoLink?.repoConfig)return findRepoOrgId(repoLink.repoConfig,relative(repoLink.rootPath,cwd))}function findRepoOrgId(repoConfig,pathFromRepoRoot){let matchedProjects=findProjectsFromPath(repoConfig.projects,pathFromRepoRoot),projects=matchedProjects.length===0&&pathFromRepoRoot===""?repoConfig.projects:matchedProjects,orgIds=new Set(projects.map(p=>p.orgId??repoConfig.orgId??""));if(orgIds.size!==1)return;let[orgId]=orgIds;return orgId||void 0}function detectExplicitScope(client){let argv=client.argv;for(let arg of argv){if(arg==="--")break;if(arg==="--scope"||arg==="--team"||arg.startsWith("--scope=")||arg.startsWith("--team=")||arg==="-S"||arg==="-T")return!0}return!!client.localConfig?.scope}function detectCrossTeamRepo(repoConfig){if(!repoConfig?.projects||repoConfig.projects.length<2)return!1;let orgIds=new Set;for(let project of repoConfig.projects){let orgId=project.orgId??repoConfig.orgId;orgId&&orgIds.add(orgId)}return orgIds.size>1}export{highlight,introspectToken,isAppPrincipalEnabled,resolveAppFromToken,resolveAppTokenScope,forgetCachedTeamSlug,getScope,getContextName,detectExplicitScope,getLocalPathConfig,readConfigFile,writeToConfigFile,readAuthConfigFile,persistAuthConfig,getConfigFilePath2 as getConfigFilePath,getAuthConfigFilePath2 as getAuthConfigFilePath,readLocalConfig};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{brotliDecompress}from"node:zlib";import{promisify}from"node:util";import{readFile}from"node:fs/promises";import{join}from"node:path";var decompress=promisify(brotliDecompress),embeddedGraphs;function defaultGraphPaths(){return[join(__dirname,"builder-graph.json.br"),join(__dirname,"..","builders","builder-graph.json.br")]}async function readDefaultGraph(){let lastError;for(let path of defaultGraphPaths())try{return await readFile(path)}catch(error){lastError=error}throw lastError}function loadEmbeddedBuilderGraphs(readGraph=readDefaultGraph){return embeddedGraphs??=(async()=>{try{let compressed=await readGraph(),graphs=JSON.parse((await decompress(new Uint8Array(compressed))).toString("utf8"));if(graphs.schemaVersion!==1||!graphs.builders||typeof graphs.builders!="object")throw new Error("invalid schema");return graphs}catch(error){throw embeddedGraphs=void 0,new Error("Could not load the embedded vlt Builder graphs.",{cause:error})}})(),embeddedGraphs}export{loadEmbeddedBuilderGraphs};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
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",API_ERROR:"api_error",RATE_LIMITED:"rate_limited",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",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_COMPLETED:"schedule_completed",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",NOT_TEAM_MEMBER:"not_team_member",INVALID_ROLE_COMBINATION:"invalid_role_combination"},AGENT_ACTION={MISSING_ARGUMENTS:"missing_arguments",CONFIRMATION_REQUIRED:"confirmation_required",LOGIN_REQUIRED:"login_required"};export{AGENT_STATUS,AGENT_REASON,AGENT_ACTION};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{formatOption,jsonOption,projectOption,yesOption}from"./chunk-PV5YI2ZZ.js";import{packageName}from"./chunk-FI772UVH.js";var builtInBody={type:"built-in",name:"Production server errors",triggers:{mode:"selected",items:[{type:"error_anomaly",filter:"statusGroup:5xx AND route:/api/*"}]},matchMinimumSeverityLevel:"high"},patchBody={name:"Critical production errors",matchMinimumSeverityLevel:"critical"},authoringReference={title:"Authoring reference",body:["vercel alerts rules schema --type built-in"]},rulesAddHelpSections=[{title:"Scope",body:["Provide ruleScope in the body or use a scope flag, not both.","--project maps to one included project.","--all maps to every project in the team."]},{title:"Built-in body (rule.json)",body:[...JSON.stringify(builtInBody,null,2).split(`
|
|
8
|
-
`),"","vercel alerts rules create --project my-app --body ./rule.json"]},authoringReference],rulesUpdateHelpSections=[{title:"Update body",body:["Include only the fields to change. type is optional and inferred from the stored rule.","Use --project or --all to change scope with or without --body.","Do not combine a ruleScope field in the body with --project or --all.","--all moves the rule to team-wide scope."]},{title:"Partial body (patch.json)",body:[...JSON.stringify(patchBody,null,2).split(`
|
|
9
|
-
`),"","vercel alerts rules update ar_abc123 --body ./patch.json","vercel alerts rules update ar_abc123 --project my-app"]},authoringReference];var projectScopeOption={...projectOption,shorthand:"p",description:"Use a project by name or ID"},listAllOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List all accessible rules in the selected team"},mutationAllOption={...listAllOption,description:"Apply the rule to all projects in the selected team"},deprecatedItemScopeOptions=[{...projectScopeOption,deprecated:!0},{...listAllOption,deprecated:!0}],bodyOption={name:"body",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read the alert rule body from a JSON file"},rulesLsSubcommand={name:"ls",aliases:["list"],description:"List alert rules for a project or team",arguments:[],options:[projectScopeOption,listAllOption,{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:"Filter by rule type"},formatOption,jsonOption],examples:[{name:"List rules affecting the linked project",value:`${packageName} alerts rules ls`},{name:"List all rules in the selected team",value:`${packageName} alerts rules ls --all`},{name:"Write JSON output",value:`${packageName} alerts rules ls --all --json`}]},rulesSchemaSubcommand={name:"schema",aliases:[],description:"Show alert rule request fields and examples",arguments:[],options:[{name:"type",shorthand:null,type:String,argument:"TYPE",deprecated:!1,description:"Rule type to describe"},formatOption],examples:[{name:"List supported rule types",value:`${packageName} alerts rules schema`},{name:"Show the built-in rule schema",value:`${packageName} alerts rules schema --type built-in`}]},rulesAddSubcommand={name:"create",aliases:["add"],description:"Create an alert rule from a JSON body",helpSections:rulesAddHelpSections,arguments:[],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,bodyOption],examples:[{name:"Create a project-scoped rule",value:`${packageName} alerts rules create --project my-app --body ./rule.json`},{name:"Create a team-wide built-in rule",value:`${packageName} alerts rules create --all --body ./rule.json`}]},rulesInspectSubcommand={name:"inspect",aliases:["get"],description:"Show one alert rule by ID",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption],examples:[{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules inspect ar_abc123 --json`}]},rulesRmSubcommand={name:"rm",aliases:["remove","delete"],description:"Delete an alert rule",arguments:[{name:"ruleId",required:!0}],options:[...deprecatedItemScopeOptions,formatOption,jsonOption,yesOption],examples:[{name:"Delete with confirmation",value:`${packageName} alerts rules rm ar_abc123`},{name:"Delete without a prompt",value:`${packageName} alerts rules rm ar_abc123 --yes`}]},rulesUpdateSubcommand={name:"update",aliases:["patch"],description:"Patch an alert rule or change its scope",helpSections:rulesUpdateHelpSections,arguments:[{name:"ruleId",required:!0}],options:[projectScopeOption,mutationAllOption,formatOption,jsonOption,{...bodyOption,description:"Read the partial update body from a JSON file"}],examples:[{name:"Update fields from a file",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Move a rule to a project",value:`${packageName} alerts rules update ar_abc123 --project my-app`}]},notificationTargetOptions=[{name:"webhook",shorthand:null,type:String,argument:"WEBHOOK_ID",deprecated:!1,description:"Select an account webhook by ID"},{name:"slack-channel",shorthand:null,type:String,argument:"CHANNEL_ID",deprecated:!1,description:"Select a Slack channel by ID"},{name:"slack-installation-id",shorthand:null,type:String,argument:"INSTALLATION_ID",deprecated:!1,description:"Slack installation ID. Optional only when the team has exactly one completed Slack installation."}],criticalOnlyOption={name:"critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Notify only when Vercel Agent escalates an alert to Critical"},noCriticalOnlyOption={name:"no-critical-only",shorthand:null,type:Boolean,deprecated:!1,description:"Deliver every alert matched by the rule"},rulesNotificationsLsSubcommand={name:"ls",aliases:["list"],default:!0,description:"List notification destinations for all readable rules or one alert rule",arguments:[{name:"ruleId",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List notification destinations for all readable rules",value:`${packageName} alerts rules notifications ls`},{name:"List notification destinations for one rule",value:`${packageName} alerts rules notifications ls ar_abc123`},{name:"Write JSON output",value:`${packageName} alerts rules notifications ar_abc123 --json`}]},rulesNotificationsLinkSubcommand={name:"link",aliases:[],description:"Link a Slack channel or account webhook to an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,formatOption,jsonOption],examples:[{name:"Link a Slack channel",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`},{name:"Link a Slack channel from a specific installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123 --slack-installation-id icfg_abc123`},{name:"Link a webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123`},{name:"Link a Critical-only webhook",value:`${packageName} alerts rules notifications link ar_abc123 --webhook wh_abc123 --critical-only`}]},rulesNotificationsUpdateSubcommand={name:"update",aliases:["patch"],description:"Update a notification destination's delivery setting",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,criticalOnlyOption,noCriticalOnlyOption,formatOption,jsonOption],examples:[{name:"Restrict a Slack channel to Critical alerts",value:`${packageName} alerts rules notifications update ar_abc123 --slack-channel C123 --critical-only`},{name:"Restore delivery for every alert matched by the rule",value:`${packageName} alerts rules notifications update ar_abc123 --webhook wh_abc123 --no-critical-only`}]},rulesNotificationsUnlinkSubcommand={name:"unlink",aliases:[],description:"Unlink a Slack channel or account webhook from an alert rule",arguments:[{name:"<ruleId>",required:!0}],options:[...notificationTargetOptions,formatOption,jsonOption],examples:[{name:"Unlink a Slack channel",value:`${packageName} alerts rules notifications unlink ar_abc123 --slack-channel C123`},{name:"Unlink a webhook",value:`${packageName} alerts rules notifications unlink ar_abc123 --webhook wh_abc123`}]},rulesNotificationsAggregateCommand={name:"notifications",aliases:[],description:"List and manage linked Slack and webhook destinations for alert rules",arguments:[],subcommands:[rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand],options:[formatOption,jsonOption],examples:[{name:"List destinations for all readable rules",value:`${packageName} alerts rules notifications`},{name:"List destinations for one rule",value:`${packageName} alerts rules notifications ar_abc123`},{name:"Link Slack with the team's only installation",value:`${packageName} alerts rules notifications link ar_abc123 --slack-channel C123`}]},rulesAggregateCommand={name:"rules",aliases:[],description:"Create, inspect, list, update, and delete alert rules and manage their notification destinations",arguments:[],subcommands:[rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsAggregateCommand],options:[],examples:[{name:"List rules for the linked project",value:`${packageName} alerts rules ls`},{name:"Create a rule",value:`${packageName} alerts rules create --project my-app --body ./rule.json`},{name:"Inspect a rule",value:`${packageName} alerts rules inspect ar_abc123`},{name:"Update a rule",value:`${packageName} alerts rules update ar_abc123 --body ./patch.json`},{name:"Delete a rule",value:`${packageName} alerts rules rm ar_abc123`},{name:"List notification destinations for a rule",value:`${packageName} alerts rules notifications ar_abc123`}]};export{rulesLsSubcommand,rulesSchemaSubcommand,rulesAddSubcommand,rulesInspectSubcommand,rulesRmSubcommand,rulesUpdateSubcommand,rulesNotificationsLsSubcommand,rulesNotificationsLinkSubcommand,rulesNotificationsUpdateSubcommand,rulesNotificationsUnlinkSubcommand,rulesNotificationsAggregateCommand,rulesAggregateCommand};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_lib}from"./chunk-7IRKF3ZG.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep}from"path";async function validateRootDirectory(cwd,path,errorSuffix=""){let pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null),suffix=errorSuffix?` ${errorSuffix}`:"";if(!pathStat)return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} does not exist.${suffix}`),!1;if(!pathStat.isDirectory())return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is a file, but expected a directory.${suffix}`),!1;let base=resolve(cwd),target=resolve(path);return target!==base&&!target.startsWith(base+sep)?(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is outside of the project.${suffix}`),!1):!0}async function validatePaths(client,paths){if(paths.length>1)return output_manager_default.error("Can't deploy more than one path."),{valid:!1,exitCode:1};let path=paths[0],pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null);return pathStat?pathStat.isDirectory()?path===homedir()&&!await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1)?(output_manager_default.print(`Canceled
|
|
8
|
-
`),{valid:!1,exitCode:0}):{valid:!0,path}:(output_manager_default.prettyError({message:"Support for single file deployments has been removed.",link:"https://vercel.link/no-single-file-deployments"}),{valid:!1,exitCode:1}):(output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1})}export{validateRootDirectory,validatePaths};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{projectOption}from"./chunk-PV5YI2ZZ.js";import{packageName}from"./chunk-FI772UVH.js";var CommandTimeout="5 minutes",logsCommand={name:"logs",aliases:["log"],description:`Display request logs for a project.
|
|
8
|
-
|
|
9
|
-
Use --follow to stream live runtime logs from a deployment. By default, --follow prefers the active production deployment and falls back to your latest READY deployment.
|
|
10
|
-
|
|
11
|
-
Source types: \u03BB = serverless, \u03B5 = edge/middleware, \u25C7 = static/external`,arguments:[{name:"url|deploymentId",required:!1}],options:[{...projectOption,shorthand:"p"},{name:"deployment",shorthand:"d",type:String,deprecated:!1,description:"Filter logs to a specific deployment ID or URL (alternative to positional argument)"},{name:"environment",shorthand:null,type:String,deprecated:!1,description:"Filter by environment: production or preview; with --follow, select the active production deployment or your latest preview deployment"},{name:"level",shorthand:null,type:[String],deprecated:!1,description:"Filter by log level: error, warning, info, fatal"},{name:"status-code",shorthand:null,type:String,deprecated:!1,description:"Filter by HTTP status code (e.g., 500, 4xx)"},{name:"source",shorthand:null,type:[String],deprecated:!1,description:"Filter by source: serverless, edge-function, edge-middleware, static"},{name:"since",shorthand:null,type:String,deprecated:!1,description:"Start time (ISO format or relative: 1h, 30m)"},{name:"until",shorthand:null,type:String,deprecated:!1,description:"End time (ISO format or relative, default: now)"},{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of results (default: 100)"},{name:"json",shorthand:"j",type:Boolean,deprecated:!1,description:"Output logs as JSON Lines for piping to other tools"},{name:"follow",shorthand:"f",type:Boolean,deprecated:!1,description:"Stream live runtime logs from a deployment"},{name:"no-follow",shorthand:null,type:Boolean,deprecated:!1,description:"No-op; deployment arguments only stream logs when --follow is set"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:'Advanced search query (supports filter syntax, e.g. "status:500 error")'},{name:"search",shorthand:null,type:String,deprecated:!0,description:'Advanced search query (supports filter syntax, e.g. "status:500 error")'},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID"},{name:"expand",shorthand:"x",type:Boolean,deprecated:!1,description:"Show full log message below each request line (default when output is not a TTY)"},{name:"branch",shorthand:"b",type:String,deprecated:!1,description:"Filter by Git branch; with --follow, require a matching READY deployment"},{name:"no-branch",shorthand:null,type:Boolean,deprecated:!0,description:"Deprecated no-op; use --branch to filter by branch"}],examples:[{name:"Display recent request logs for the linked project",value:`${packageName} logs`},{name:"Display request logs for a specific project",value:`${packageName} logs --project my-app`},{name:"Display request error logs from the last hour",value:`${packageName} logs --level error --since 1h`},{name:"Display request logs for a specific deployment",value:`${packageName} logs dpl_xxxxx`},{name:"Filter request logs by status code and output as JSON",value:`${packageName} logs --status-code 500 --json`},{name:"Search request logs by status and message",value:`${packageName} logs --query 'status:500 error' --json | jq '.message'`},{name:"Display request logs from production",value:`${packageName} logs --environment production`},{name:"Display request logs for a specific request",value:`${packageName} logs --request-id req_xxxxx`},{name:"Display request logs with full message details",value:`${packageName} logs --expand`},{name:"Display request logs for a specific branch",value:`${packageName} logs --branch feature-x`},{name:"Stream runtime logs for the active production deployment",value:`${packageName} logs --follow`},{name:"Stream runtime logs for your latest preview deployment",value:`${packageName} logs --follow --environment preview`},{name:"Stream runtime logs for a specific deployment",value:`${packageName} logs dpl_xxxxx --follow`}]};export{CommandTimeout,logsCommand};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{tracesConfigCommand}from"./chunk-3R66O72V.js";import{deploymentOption,projectOption,protectionBypassOption,yesOption}from"./chunk-PV5YI2ZZ.js";import{packageName}from"./chunk-FI772UVH.js";var spanQueryOptions=[{...projectOption,shorthand:"p",description:"Filter spans to one project (default: all team projects)"},{name:"environment",shorthand:null,type:String,deprecated:!1,description:"Environment: production or preview (case-insensitive)"},{name:"service",shorthand:null,type:String,deprecated:!1,description:"Filter by service name"},{name:"name",shorthand:null,type:String,deprecated:!1,description:"Filter by span name"},{name:"kind",shorthand:null,type:String,deprecated:!1,description:"Filter by span kind: unspecified (0), internal (1), server (2), client (3), producer (4), consumer (5)"},{name:"status",shorthand:null,type:String,deprecated:!1,description:"Status: error, ok, or unset (case-insensitive)"},{name:"deployment-id",shorthand:null,type:String,deprecated:!1,description:"Filter by deployment ID"},{name:"request-id",shorthand:null,type:String,deprecated:!1,description:"Filter by request ID. Some IDs return 404 in traces get. Reuse --scope and --project. See traces get --help."},{name:"trace-id",shorthand:null,type:String,deprecated:!1,description:"Filter by trace ID"},{name:"span-id",shorthand:null,type:String,deprecated:!1,description:"Filter by span ID"},{name:"root",shorthand:null,type:Boolean,deprecated:!1,description:"Show root spans only"},{name:"since",shorthand:null,type:String,deprecated:!1,description:"Start time: 30m, ISO timestamp, or YYYY-MM-DD UTC (default: 1h)"},{name:"until",shorthand:null,type:String,deprecated:!1,description:"End time: same formats as --since (default: now)"}];var requestIdLookupHelp={title:"Request-ID lookup",body:["A request ID in search results does not guarantee traces get can retrieve the trace. Lookup requires a matching root span in the same project within 30 minutes after the request-ID timestamp.","","If no matching root is found, lookup returns 404. Use the same --scope and --project for search and get."]},getSubcommand={name:"get",aliases:[],default:!0,description:"Fetch a captured trace by trace ID or request ID",helpSections:[{title:"Trace-ID lookup",body:["A 32-character hexadecimal ID selects trace-ID lookup. Other IDs select request-ID lookup.","Trace-ID lookup retrieves the trace directly within the trace retention window. Use the same --scope and --project as search."]},requestIdLookupHelp],arguments:[{name:"id",required:!0}],options:[{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Print the raw trace JSON to stdout"},{name:"project",shorthand:null,type:String,argument:"NAME|ID",deprecated:!1,description:"Project name or id to fetch the trace from (overrides the linked project)."},{name:"open",shorthand:null,type:Boolean,deprecated:!1,description:"Open the trace in the Vercel Dashboard instead of printing it."},{name:"view",shorthand:null,type:String,argument:"timeline|tree|waterfall",deprecated:!1,description:"Dashboard view to open. Only valid with --open. Defaults to timeline."}],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces get qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Fetch a trace without the default get subcommand",value:`${packageName} traces e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace from a specific team and project",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00 --scope my-team --project my-app`},{name:"Open the trace in the Vercel Dashboard",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00 --open`},{name:"Open the trace in the Vercel Dashboard with the waterfall view",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00 --open --view waterfall`}]},createSubcommand={name:"create",aliases:[],description:"Capture a session trace for a request (alias for `vercel curl --trace`).",arguments:[{name:"path",required:!0}],options:[deploymentOption,protectionBypassOption,{name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Emit { response, requestId } as JSON on stdout"},{...yesOption,description:"Skip the production confirmation prompt (e.g. in non-interactive mode)"}],examples:[{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Target a specific deployment",value:`${packageName} traces create /api/status --deployment https://your-project-abc123.vercel.app`},{name:"Pass curl flags after the separator",value:`${packageName} traces create /api/test -- --request POST --data '{"name": "John"}'`}]},searchSubcommand={name:"search",aliases:[],description:"Search team spans. Use --project to filter one project. Results are newest first. Duration filters do not sort results.",helpSections:[{title:"Table columns",body:["Available: span.startTime, span.duration, span.name, span.status.code, service.name, environment, request.id, trace.id, span.id, parent.id, span.kind","Default: all except environment, request.id, and span.kind."]},{title:"KQL filters",body:["Fields: project.id, environment, service.name, deployment.id, request.id, user.id, session.id","Span fields: span.name, span.kind, span.id, parent.id, span.isRoot, span.status.code, span.duration","Trace fields: trace.id, trace.state","","Other fields search span attributes first, then resource attributes.","","span.duration uses milliseconds.","span.kind uses the numeric values shown under --kind.","span.status.code uses Error, Ok, or Unset.","Use field:value filters. Plain text search is not supported.","Use NOT to exclude values. End a value with * to match a prefix.","Wrap values with spaces in double quotes. Keep the full query in single quotes."]}],arguments:[],options:[...spanQueryOptions,{name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Maximum number of spans (default: 100)"},{name:"query",shorthand:"q",type:String,deprecated:!1,description:"Filter spans using KQL"},{name:"columns",shorthand:null,argument:"LIST",type:String,deprecated:!1,description:"Columns to show, in order. Separate names with commas. Cannot be used with --json or --non-interactive."},{name:"json",shorthand:"j",type:Boolean,deprecated:!1,description:"Output one JSON object per line"}],examples:[{name:"Find production errors for one service",value:`${packageName} traces search --environment production --service checkout-api --status error --since 1h`},{name:"Use KQL and output JSON Lines",value:`${packageName} traces search --query 'http.route:"/api/checkout"' --kind server --json`},{name:"Exclude span names starting with app/lib/fetch-api",value:`${packageName} traces search --query 'NOT span.name:app/lib/fetch-api*'`},{name:"Exclude exact span names",value:`${packageName} traces search --query 'NOT span.name:("GET /screenshot/v2" OR "middleware GET")'`},{name:"Find spans longer than 2 seconds",value:`${packageName} traces search --query 'span.duration > 2000' --columns span.startTime,span.duration,span.name,span.kind,span.status.code`}]},tracesCommand={name:"traces",aliases:[],description:"Fetch project traces and search spans across a Vercel team.",arguments:[{name:"id",required:!1}],subcommands:[getSubcommand,searchSubcommand,createSubcommand,tracesConfigCommand],options:[],examples:[{name:"Fetch a trace by trace ID",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00`},{name:"Fetch a trace by request ID",value:`${packageName} traces get qb46r-1790847620933-1145d2891a3e`},{name:"Print the raw trace JSON",value:`${packageName} traces get e5c0d1efb3904155472b01692c7f2d00 --json`},{name:"Capture a session trace for a request",value:`${packageName} traces create /api/hello`},{name:"Search recent spans",value:`${packageName} traces search --status error`},{name:"List the trace sampling rules for a project",value:`${packageName} traces config ls`}]};export{getSubcommand,createSubcommand,searchSubcommand,tracesCommand};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{AGENT_STATUS}from"./chunk-CVX5X5RI.js";import{RULE_ENVIRONMENTS}from"./chunk-3R66O72V.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
|
|
8
|
-
`);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
|
|
9
|
-
`)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readProjectTracing({client,teamId,projectId}){let project=await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId}),tracing=project.tracing??null;return{project,tracing,entries:(tracing?.samplingRules??[]).map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,tracing,rules}){let body={tracing:{...tracing??{},samplingRules:rules}};await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:teamId,method:"PATCH",body})}export{writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,hasSameKey,readProjectTracing,writeSamplingRules};
|