@visulima/vis 2.0.2 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/LICENSE.md +5395 -4307
- package/dist/bin.js +1 -1
- package/dist/binx.js +2 -2
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/CONFIG_FILES.js +6 -6
- package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -1
- package/dist/packem_chunks/agent-instructions.js +7 -7
- package/dist/packem_chunks/bloom-status.js +2 -2
- package/dist/packem_chunks/bloom-sync.js +2 -2
- package/dist/packem_chunks/cache-attestation.js +1 -1
- package/dist/packem_chunks/catalog-detector.js +1 -1
- package/dist/packem_chunks/catalog.js +87 -111
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +192 -217
- package/dist/packem_chunks/defineReleasePlugin.js +3 -3
- package/dist/packem_chunks/detect.js +8 -3
- package/dist/packem_chunks/devtools.js +1 -1
- package/dist/packem_chunks/discord.js +4 -4
- package/dist/packem_chunks/dispatch.js +4 -4
- package/dist/packem_chunks/doctor-probe.js +2 -2
- package/dist/packem_chunks/extra-files.js +3 -3
- package/dist/packem_chunks/fix.js +11 -11
- package/dist/packem_chunks/git.js +3 -3
- package/dist/packem_chunks/group-tags.js +1 -1
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +5 -5
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +16 -16
- package/dist/packem_chunks/handler13.js +5 -5
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +5 -5
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -2
- package/dist/packem_chunks/handler21.js +2 -2
- package/dist/packem_chunks/handler22.js +8 -8
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +5 -5
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +3 -3
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +2 -2
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler31.js +2 -2
- package/dist/packem_chunks/handler32.js +2 -2
- package/dist/packem_chunks/handler33.js +2 -2
- package/dist/packem_chunks/handler34.js +3 -3
- package/dist/packem_chunks/handler35.js +5 -5
- package/dist/packem_chunks/handler36.js +1 -1
- package/dist/packem_chunks/handler37.js +2 -2
- package/dist/packem_chunks/handler38.js +6 -6
- package/dist/packem_chunks/handler39.js +8 -8
- package/dist/packem_chunks/handler4.js +4 -4
- package/dist/packem_chunks/handler40.js +34 -34
- package/dist/packem_chunks/handler41.js +5 -5
- package/dist/packem_chunks/handler42.js +4 -4
- package/dist/packem_chunks/handler43.js +3 -3
- package/dist/packem_chunks/handler44.js +2 -2
- package/dist/packem_chunks/handler45.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +3 -3
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler5.js +6 -6
- package/dist/packem_chunks/handler50.js +6 -6
- package/dist/packem_chunks/handler51.js +13 -13
- package/dist/packem_chunks/handler52.js +3 -3
- package/dist/packem_chunks/handler53.js +5 -5
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler56.js +4 -4
- package/dist/packem_chunks/handler57.js +5 -5
- package/dist/packem_chunks/handler58.js +5 -5
- package/dist/packem_chunks/handler59.js +8 -8
- package/dist/packem_chunks/handler6.js +7 -7
- package/dist/packem_chunks/handler60.js +3 -3
- package/dist/packem_chunks/handler61.js +21 -21
- package/dist/packem_chunks/handler62.js +12 -12
- package/dist/packem_chunks/handler63.js +3 -3
- package/dist/packem_chunks/handler64.js +5 -5
- package/dist/packem_chunks/handler65.js +8 -8
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +21 -21
- package/dist/packem_chunks/handler68.js +21 -21
- package/dist/packem_chunks/handler69.js +30 -30
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +9 -9
- package/dist/packem_chunks/handler71.js +17 -17
- package/dist/packem_chunks/handler72.js +104 -104
- package/dist/packem_chunks/handler73.js +20 -20
- package/dist/packem_chunks/handler74.js +45 -45
- package/dist/packem_chunks/handler75.js +27 -3
- package/dist/packem_chunks/handler76.js +3 -27
- package/dist/packem_chunks/handler77.js +68 -68
- package/dist/packem_chunks/handler78.js +30 -30
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +9 -9
- package/dist/packem_chunks/heal.js +11 -11
- package/dist/packem_chunks/help-command.js +7 -63
- package/dist/packem_chunks/index.js +1 -1
- package/dist/packem_chunks/index2.js +48 -802
- package/dist/packem_chunks/index3.js +3 -7
- package/dist/packem_chunks/index4.js +803 -134
- package/dist/packem_chunks/index5.js +7 -73
- package/dist/packem_chunks/index6.js +73 -0
- package/dist/packem_chunks/index7.js +135 -0
- package/dist/packem_chunks/interface.js +2 -2
- package/dist/packem_chunks/keys-refresh.js +4 -4
- package/dist/packem_chunks/lean.js +3 -3
- package/dist/packem_chunks/list.js +3 -3
- package/dist/packem_chunks/loader.js +4 -4
- package/dist/packem_chunks/loader2.js +1 -1
- package/dist/packem_chunks/orchestrator.js +27 -27
- package/dist/packem_chunks/pre-mode.js +2 -2
- package/dist/packem_chunks/print-config.js +1 -1
- package/dist/packem_chunks/prompts.js +7 -7
- package/dist/packem_chunks/prune.js +3 -3
- package/dist/packem_chunks/publish-guards.js +1 -1
- package/dist/packem_chunks/resolveFormatter.js +5 -5
- package/dist/packem_chunks/run.js +1 -1
- package/dist/packem_chunks/security.js +1 -1
- package/dist/packem_chunks/shell-runner.js +1 -1
- package/dist/packem_chunks/slack.js +2 -2
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/stage-publisher.js +1 -1
- package/dist/packem_chunks/staged-registry.js +2 -2
- package/dist/packem_chunks/state.js +3 -3
- package/dist/packem_chunks/status.js +2 -2
- package/dist/packem_chunks/success-walk.js +4 -4
- package/dist/packem_chunks/sync.js +2 -2
- package/dist/packem_chunks/sync2.js +2 -2
- package/dist/packem_chunks/tar.js +3 -3
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +5 -9
- package/dist/packem_chunks/verify-lockfile.js +2 -2
- package/dist/packem_chunks/version-resolver.js +2 -2
- package/dist/packem_chunks/webhook.js +1 -1
- package/dist/packem_chunks/workflow-templates.js +5 -5
- package/dist/packem_chunks/workspace.js +2 -2
- package/dist/packem_shared/ReleaseClient-DAvbxCdo.js +1 -0
- package/dist/packem_shared/Table-DyORjLji-CC9cYgCG.js +11 -0
- package/dist/packem_shared/{VisReleaseError-DMGRBTNO.js → VisReleaseError-DZtgcKf8.js} +1 -1
- package/dist/packem_shared/_commonjsHelpers-DTfxOvZk.js +1 -0
- package/dist/packem_shared/advisories-CyDqzi5j.js +1 -0
- package/dist/packem_shared/affected-selection-DPQR-Bd3.js +1 -0
- package/dist/packem_shared/affected-shas-Dd0P7fGD.js +1 -0
- package/dist/packem_shared/ai-analysis-DSQQDFU9.js +68 -0
- package/dist/packem_shared/ai-fix-6nXZbecQ.js +43 -0
- package/dist/packem_shared/augment-COAiXSIx.js +4 -0
- package/dist/packem_shared/bin-wafzkjaB.js +1 -0
- package/dist/packem_shared/build-scripts-pdVmqXRm.js +1 -0
- package/dist/packem_shared/clean-DRiLimTx.js +1 -0
- package/dist/packem_shared/command-runtime-CiLVo4ED.js +1 -0
- package/dist/packem_shared/{compile-cache-B_Vf_WxT.js → compile-cache-DoMHRsRZ.js} +1 -1
- package/dist/packem_shared/createAdapter-F7GidOzU.js +1 -0
- package/dist/packem_shared/createVersionActions-ByaJ1Nbv.js +1 -0
- package/dist/packem_shared/cyclonedx-C_ezHg8b.js +4 -0
- package/dist/packem_shared/dependency-scan-DBH2Qo4I.js +1 -0
- package/dist/packem_shared/docker-Br_iFmI-.js +59 -0
- package/dist/packem_shared/failure-log-D92tM0ie.js +2 -0
- package/dist/packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js +4 -0
- package/dist/packem_shared/getRandomSpinner-4ZEcbTYv-DCyIuj19.js +1 -0
- package/dist/packem_shared/giget-CVyyR7x8.js +2 -0
- package/dist/packem_shared/glob-Cyk1H9ZL-ox19CSsT.js +1 -0
- package/dist/packem_shared/index-B4AjSxHU.js +1 -0
- package/dist/packem_shared/index-BisalDCf.js +39 -0
- package/dist/packem_shared/{index-BWl4DbMp.js → index-BjdW45xX.js} +1 -1
- package/dist/packem_shared/index-DHD8wb6Z.js +22 -0
- package/dist/packem_shared/index-DXPSWMbG.js +1 -0
- package/dist/packem_shared/index.server-CwSgbeN7.js +2 -0
- package/dist/packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js +1 -0
- package/dist/packem_shared/license-DvlYdo6T.js +1 -0
- package/dist/packem_shared/lifecycle-CfTZQHOG.js +2 -0
- package/dist/packem_shared/lockfile-35RFsJDs.js +1 -0
- package/dist/packem_shared/lockfile-DhHAaHN5.js +1 -0
- package/dist/packem_shared/main-BjJN8kWj.js +1 -0
- package/dist/packem_shared/manifests-BNSmpPF_.js +1 -0
- package/dist/packem_shared/min-release-age-ChzTC7_I.js +34 -0
- package/dist/packem_shared/missing-package-json-C0keIt78.js +1 -0
- package/dist/packem_shared/native-config-sync-BSzU4qUO.js +21 -0
- package/dist/packem_shared/osv-bloom-5wDAoZ1e.js +2 -0
- package/dist/packem_shared/otelPlugin-D8LL2-4L.js +1 -0
- package/dist/packem_shared/package-version-BJkg7-6H.js +4 -0
- package/dist/packem_shared/packument-C55kVxcQ.js +1 -0
- package/dist/packem_shared/{peer-warnings-BXAzXqY3.js → peer-warnings-CmYSxvql.js} +1 -1
- package/dist/packem_shared/pm-runner-de-jCq8q.js +1 -0
- package/dist/packem_shared/project-name-filter-BeREbPMI.js +7 -0
- package/dist/packem_shared/{prompt-BSAy8SMH.js → prompt-DMzaQEVa.js} +1 -1
- package/dist/packem_shared/provenance-CvfQEJPQ.js +1 -0
- package/dist/packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js +1 -0
- package/dist/packem_shared/registry-keys-DmBrAlhg.js +1 -0
- package/dist/packem_shared/resolve-explicit-COmP7eqr.js +5 -0
- package/dist/packem_shared/resolve-runtime-C7NBCA1C.js +1 -0
- package/dist/packem_shared/run-file-jMngGQhs.js +1 -0
- package/dist/packem_shared/runtime-check-BklgEMkC.js +1 -0
- package/dist/packem_shared/s1ngularity-RZOHbGrE.js +1 -0
- package/dist/packem_shared/scan-progress-C9nMDLis.js +2 -0
- package/dist/packem_shared/selectors-B7lSFz7l.js +3 -0
- package/dist/packem_shared/signatures-oZ_2IneN.js +2 -0
- package/dist/packem_shared/{slug-DoueYuLo.js → slug-OBHcH7wV.js} +1 -1
- package/dist/packem_shared/spinner-CbJfWYwB.js +1 -0
- package/dist/packem_shared/sticky-comment-DjhyCIZt.js +1 -0
- package/dist/packem_shared/subtree-DtmcKAJK.js +2 -0
- package/dist/packem_shared/symbols-BXDZ_sKt.js +1 -0
- package/dist/packem_shared/tabs-BilwonkM.js +1 -0
- package/dist/packem_shared/target-merge-D1xbylFw.js +4 -0
- package/dist/packem_shared/target-options-d_rIrLyq.js +1 -0
- package/dist/packem_shared/toolchain-DY11tPCw.js +5 -0
- package/dist/packem_shared/typosquats-D8ppc5kr.js +1 -0
- package/dist/packem_shared/use-measured-height-BPQg2q_p.js +1 -0
- package/dist/packem_shared/utils-DQFHJn72.js +1 -0
- package/dist/packem_shared/verify-D8wYvB85.js +1 -0
- package/dist/packem_shared/vis-update-app-ngwL2mRv.js +1 -0
- package/dist/packem_shared/vis-user-error-jhNwmkZp.js +30 -0
- package/dist/packem_shared/watch-Dswvj6Zp.js +1 -0
- package/dist/packem_shared/watch-loop-COWvvSbR.js +11 -0
- package/dist/packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js +1 -0
- package/dist/release/core/changelog/index.d.ts +62 -2
- package/dist/release/core/package-managers/index.d.ts +25 -1
- package/dist/release/core/package-managers/index.js +1 -1
- package/dist/release/core/version-actions/index.d.ts +47 -2
- package/dist/release/core/version-actions/index.js +1 -1
- package/dist/release/index.d.ts +100 -1
- package/dist/release/index.js +1 -1
- package/dist/release/plugin-sdk.d.ts +16 -1
- package/dist/release/plugin-sdk.js +1 -1
- package/dist/release/presets.js +1 -1
- package/dist/release/types.js +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +26 -26
- package/package.json +13 -13
- package/dist/packem_chunks/detect2.js +0 -8
- package/dist/packem_chunks/registry.js +0 -48
- package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +0 -1
- package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +0 -1
- package/dist/packem_shared/advisories-CCBGdU8U.js +0 -1
- package/dist/packem_shared/affected-selection-Dj-ymxhw.js +0 -1
- package/dist/packem_shared/affected-shas-PwkVbPch.js +0 -1
- package/dist/packem_shared/ai-analysis-bGCAc1jR.js +0 -68
- package/dist/packem_shared/ai-fix-DV5-dHBY.js +0 -43
- package/dist/packem_shared/augment-24KX2nkI.js +0 -4
- package/dist/packem_shared/bin-CtzhnYMp.js +0 -1
- package/dist/packem_shared/build-scripts-w4SNeR7D.js +0 -1
- package/dist/packem_shared/clean-DWjQl14S.js +0 -1
- package/dist/packem_shared/command-runtime-BLFPUYAT.js +0 -1
- package/dist/packem_shared/createAdapter-bU4DIP3F.js +0 -1
- package/dist/packem_shared/createVersionActions-BK43SNDH.js +0 -1
- package/dist/packem_shared/cyclonedx-C4KaVTn1.js +0 -4
- package/dist/packem_shared/dependency-scan-D_ona0Qm.js +0 -1
- package/dist/packem_shared/docker-DaVs-9wK.js +0 -59
- package/dist/packem_shared/en-D3CfXlO7.js +0 -27
- package/dist/packem_shared/failure-log-CTneNcio.js +0 -2
- package/dist/packem_shared/giget-CAxjpwew.js +0 -2
- package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +0 -1
- package/dist/packem_shared/index-BAe6e0XE.js +0 -1
- package/dist/packem_shared/index-CTMU29dI.js +0 -1
- package/dist/packem_shared/index-uBVnF4ji.js +0 -35
- package/dist/packem_shared/index.server-CusjRLCh.js +0 -2
- package/dist/packem_shared/license-t5KnNX6v.js +0 -1
- package/dist/packem_shared/lifecycle-B8A2T3gx.js +0 -2
- package/dist/packem_shared/lockfile-Bccery3L.js +0 -1
- package/dist/packem_shared/main-D_cam4hv.js +0 -1
- package/dist/packem_shared/manifests-BDkwiVbh.js +0 -1
- package/dist/packem_shared/min-release-age-OaYpLwux.js +0 -34
- package/dist/packem_shared/missing-package-json-BqS-OnKd.js +0 -1
- package/dist/packem_shared/native-config-sync-Ds1FtcrM.js +0 -21
- package/dist/packem_shared/osv-bloom-pKp7urSB.js +0 -2
- package/dist/packem_shared/otelPlugin-DmKDBaPo.js +0 -1
- package/dist/packem_shared/package-version-C47v64aB.js +0 -4
- package/dist/packem_shared/packument-HBVbyf7x.js +0 -1
- package/dist/packem_shared/pm-runner-C6eTANt1.js +0 -1
- package/dist/packem_shared/project-name-filter-CJ3XX2TI.js +0 -7
- package/dist/packem_shared/provenance-D4Cza8cp.js +0 -1
- package/dist/packem_shared/public-api-WqUCiyIe.js +0 -131
- package/dist/packem_shared/readJsonSync-DweZd5ZA-0eZh9sGm.js +0 -1
- package/dist/packem_shared/registry-keys-C0ez2VND.js +0 -1
- package/dist/packem_shared/resolve-explicit-BbT764KS.js +0 -5
- package/dist/packem_shared/resolve-runtime-D_vZovbB.js +0 -1
- package/dist/packem_shared/run-file-DyPFFN9U.js +0 -1
- package/dist/packem_shared/runtime-check-D4um-yQq.js +0 -1
- package/dist/packem_shared/s1ngularity-St6dhKiq.js +0 -1
- package/dist/packem_shared/scan-progress-q-N2JtIp.js +0 -2
- package/dist/packem_shared/selectors-Ce_6UAoY.js +0 -3
- package/dist/packem_shared/signatures-Dyeyg1q9.js +0 -2
- package/dist/packem_shared/sticky-comment-D6_7-w8T.js +0 -1
- package/dist/packem_shared/subtree-DSm0QEoE.js +0 -2
- package/dist/packem_shared/symbols-DPTlrJ3B.js +0 -1
- package/dist/packem_shared/target-merge-Cfy7c__2.js +0 -11
- package/dist/packem_shared/target-options-7XcbqGDe.js +0 -1
- package/dist/packem_shared/toolchain-C_pNMBM6.js +0 -5
- package/dist/packem_shared/typosquats-xzcAGPiM.js +0 -1
- package/dist/packem_shared/use-measured-height-CBjN0fle.js +0 -1
- package/dist/packem_shared/utils-CRueU43T.js +0 -1
- package/dist/packem_shared/verify-Dve9PQj3.js +0 -1
- package/dist/packem_shared/vis-update-app-DMAC2pPf.js +0 -1
- package/dist/packem_shared/vis-user-error-xmha3L4n.js +0 -30
- package/dist/packem_shared/watch-BXOOX7lx.js +0 -1
- package/dist/packem_shared/watch-loop-Q7UpkVbr.js +0 -11
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{createRequire as co}from"node:module";let fo;const go=e=>(fo??=co(import.meta.url))(e),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mo=e=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[t,o]=be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return be.getBuiltinModule(e)}return go(e)},{createRequire:ho}=mo("node:module");let bo;const vo=e=>(bo??=ho(import.meta.url))(e),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zt=e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,o]=me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return me.getBuiltinModule(e)}return vo(e)},{homedir:yo,tmpdir:gt}=Zt("node:os"),{env:ot,cwd:xo,platform:wt}=me,{createRequire:k}=Zt("node:module"),Ao=0,Yt=2,Ro=Symbol("findUpStop"),_o=/^[A-Z]:\//i,st=(e="")=>e&&e.replaceAll("\\","/").replace(_o,t=>t.toUpperCase()),Eo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,To=/^[A-Z]:$/i,Co=/.(\.[^./]+)$/,So=/^[/\\]|^[a-z]:[/\\]/i,$o=/\/$/,wo=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",ko=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},rt=e=>Eo.test(e),dt=function(...e){e=e.map(c=>st(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:wo();!p||p.length===0||(t=`${p}/${t}`,o=rt(p))}return t=ko(t,!o),o&&!rt(t)?`/${t}`:t.length>0?t:"."},Oo=function(e){return Co.exec(st(e))?.[1]??""},Vt=e=>{const t=st(e).replace($o,""),o=t.lastIndexOf("/");if(o===-1)return rt(e)?"/":".";const c=t.slice(0,o);return To.test(c)?`${c}/`:c||(rt(e)?"/":".")},Ho=(e,t)=>{const o=st(e);return o.slice(o.lastIndexOf("/")+1)},No=function(e){const t=So.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Ho(e),c=Oo(o);return{base:o,dir:Vt(e),ext:c,name:o.slice(0,o.length-c.length),root:t}},Lo=k(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,o]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ve.getBuiltinModule(e)}return Lo(e)},{fileURLToPath:Mo}=Bo("node:url");function Io(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kt,Ot;function Do(){return Ot||(Ot=1,kt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),kt}var Go=Do();const zo=Io(Go);new Set(zo);const lt=e=>st(e instanceof URL?Mo(e):e),Jt=e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},Po=k(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,o]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ye.getBuiltinModule(e)}return Po(e)};Uo("node:fs/promises");const jo=k(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fo=e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,o]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return xe.getBuiltinModule(e)}return jo(e)};Fo("node:fs");const Ht=e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},Ko=k(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xo=e=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[t,o]=Ae.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ae.getBuiltinModule(e)}return Ko(e)};Xo("node:fs/promises");const Wo=k(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Qo=e=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[t,o]=Re.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Re.getBuiltinModule(e)}return Wo(e)},{lstatSync:Nt,mkdirSync:qo}=Qo("node:fs"),_e=e=>{Jt(e);try{const t=Nt(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=Nt(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ht(o))}'`,{cause:t})}},Zo=k(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yo=e=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[t,o]=Ee.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ee.getBuiltinModule(e)}return Zo(e)};Yo("node:fs/promises");const Vo=k(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jo=e=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[t,o]=Te.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Te.getBuiltinModule(e)}return Vo(e)};Jo("node:fs");const er=k(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tr=e=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[t,o]=Ce.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ce.getBuiltinModule(e)}return er(e)};tr("node:fs/promises");const or=k(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rr=e=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[t,o]=Se.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Se.getBuiltinModule(e)}return or(e)};rr("node:fs");const sr=k(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,o]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return $e.getBuiltinModule(e)}return sr(e)};nr("node:fs/promises");const ur=k(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,o]=we.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return we.getBuiltinModule(e)}return ur(e)};ir("node:fs");k(import.meta.url);const ar=k(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lr=e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,o]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ke.getBuiltinModule(e)}return ar(e)};lr("node:fs/promises");const pr=k(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,o]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Oe.getBuiltinModule(e)}return pr(e)};cr("node:fs");const fr=k(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gr=e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,o]=He.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return He.getBuiltinModule(e)}return fr(e)};gr("node:fs/promises");const dr=k(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=e=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[t,o]=Ne.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ne.getBuiltinModule(e)}return dr(e)},{statSync:hr,lstatSync:br}=mr("node:fs"),vr=(e,t={})=>{const o=t.cwd?lt(t.cwd):process.cwd();let c=dt(o);const{root:p}=No(c),r=lt(t.stopAt??p),i=dt(c,r),l=t.type??"file",f=function(d){return[e]};t.allowSymlinks??=!0;const x=t.allowSymlinks?hr:br;for(;c&&c!==i&&c!==p;){for(let d of f()){if(d===Ro)return;if(d===void 0)continue;Buffer.isBuffer(d)?d=d.toString():d instanceof URL&&(d=lt(d));const T=rt(d)?d:dt(c,d);try{const C=x(T);if(l==="file"&&C.isFile()||l==="directory"&&C.isDirectory())return T}catch{}}c=Vt(c)}};function Tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lt={},mt,Bt;function ct(){if(Bt)return mt;Bt=1;const e="[^\\\\/]",t=Symbol("unignore"),o="\\.",c="\\+",p="\\?",r="\\/",i="(?=.)",l="[^/]",f=`(?:${r}|$)`,x=`(?:^|${r})`,d=`${o}{1,2}${f}`,T=`(?!${o})`,C=`(?!${x}${d})`,_=`(?!${o}{0,1}${f})`,B=`(?!${d})`,te=`[^.${r}]`,q=`${l}*?`,K="/",m={DOT_LITERAL:o,PLUS_LITERAL:c,QMARK_LITERAL:p,SLASH_LITERAL:r,ONE_CHAR:i,QMARK:l,END_ANCHOR:f,DOTS_SLASH:d,NO_DOT:T,NO_DOTS:C,NO_DOT_SLASH:_,NO_DOTS_SLASH:B,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:x,SEP:K},b={...m,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},s={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return mt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:s,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(v){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${v.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(v){return v===!0?b:m}},mt}var Mt;function ft(){return Mt||(Mt=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:p}=ct();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>c.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(p,"\\$1"),e.toPosixSlashes=r=>r.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=r=>r.replace(o,i=>i==="\\"?"":i),e.escapeLast=(r,i,l)=>{const f=r.lastIndexOf(i,l);return f===-1?r:r[f-1]==="\\"?e.escapeLast(r,i,f-1):`${r.slice(0,f)}\\${r.slice(f)}`},e.removePrefix=(r,i={})=>{let l=r;return l.startsWith("./")&&(l=l.slice(2),i.prefix="./"),l},e.wrapOutput=(r,i={},l={})=>{const f=l.contains?"":"^",x=l.contains?"":"$";let d=`${f}(?:${r})${x}`;return i.negated===!0&&(d=`(?:^(?!${d}).*$)`),d},e.basename=(r,{windows:i}={})=>{const l=r.split(i?/[\\/]/:"/"),f=l[l.length-1];return f===""?l[l.length-2]:f}})(Lt)),Lt}var ht,It;function yr(){if(It)return ht;It=1;const e=ft(),{CHAR_ASTERISK:t,CHAR_AT:o,CHAR_BACKWARD_SLASH:c,CHAR_COMMA:p,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:i,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:x,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:T,CHAR_QUESTION_MARK:C,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:B,CHAR_RIGHT_SQUARE_BRACKET:te}=ct(),q=m=>m===l||m===c,K=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return ht=(m,b)=>{const s=b||{},v=m.length-1,A=s.parts===!0||s.scanToEnd===!0,R=[],y=[],O=[];let X=m,Z=-1,P=0,re=0,W=!1,se=!1,I=!1,le=!1,ge=!1,ne=!1,L=!1,ue=!1,de=!1,Q=!1,F=0,V,E,w={value:"",depth:0,isGlob:!1};const a=()=>Z>=v,Y=()=>X.charCodeAt(Z+1),U=()=>(V=E,X.charCodeAt(++Z));for(;Z<v;){E=U();let H;if(E===c){L=w.backslashes=!0,E=U(),E===f&&(ne=!0);continue}if(ne===!0||E===f){for(F++;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,U();continue}if(E===f){F++;continue}if(ne!==!0&&E===r&&(E=U())===r){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(ne!==!0&&E===p){if(W=w.isBrace=!0,I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===_&&(F--,F===0)){ne=!1,W=w.isBrace=!0,Q=!0;break}}if(A===!0)continue;break}if(E===l){if(R.push(Z),y.push(w),w={value:"",depth:0,isGlob:!1},Q===!0)continue;if(V===r&&Z===P+1){P+=2;continue}re=Z+1;continue}if(s.noext!==!0&&(E===T||E===o||E===t||E===C||E===i)&&Y()===x){if(I=w.isGlob=!0,le=w.isExtglob=!0,Q=!0,E===i&&Z===P&&(de=!0),A===!0){for(;a()!==!0&&(E=U());){if(E===c){L=w.backslashes=!0,E=U();continue}if(E===B){I=w.isGlob=!0,Q=!0;break}}continue}break}if(E===t){if(V===t&&(ge=w.isGlobstar=!0),I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===C){if(I=w.isGlob=!0,Q=!0,A===!0)continue;break}if(E===d){for(;a()!==!0&&(H=U());){if(H===c){L=w.backslashes=!0,U();continue}if(H===te){se=w.isBracket=!0,I=w.isGlob=!0,Q=!0;break}}if(A===!0)continue;break}if(s.nonegate!==!0&&E===i&&Z===P){ue=w.negated=!0,P++;continue}if(s.noparen!==!0&&E===x){if(I=w.isGlob=!0,A===!0){for(;a()!==!0&&(E=U());){if(E===x){L=w.backslashes=!0,E=U();continue}if(E===B){Q=!0;break}}continue}break}if(I===!0){if(Q=!0,A===!0)continue;break}}s.noext===!0&&(le=!1,I=!1);let z=X,n="",u="";P>0&&(n=X.slice(0,P),X=X.slice(P),re-=P),z&&I===!0&&re>0?(z=X.slice(0,re),u=X.slice(re)):I===!0?(z="",u=X):z=X,z&&z!==""&&z!=="/"&&z!==X&&q(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),s.unescape===!0&&(u&&(u=e.removeBackslashes(u)),z&&L===!0&&(z=e.removeBackslashes(z)));const ee={prefix:n,input:m,start:P,base:z,glob:u,isBrace:W,isBracket:se,isGlob:I,isExtglob:le,isGlobstar:ge,negated:ue,negatedExtglob:de};if(s.tokens===!0&&(ee.maxDepth=0,q(E)||y.push(w),ee.tokens=y),s.parts===!0||s.tokens===!0){let H;for(let D=0;D<R.length;D++){const pe=H?H+1:P,J=R[D],ce=m.slice(pe,J);s.tokens&&(D===0&&P!==0?(y[D].isPrefix=!0,y[D].value=n):y[D].value=ce,K(y[D]),ee.maxDepth+=y[D].depth),(D!==0||ce!=="")&&O.push(ce),H=J}if(H&&H+1<m.length){const D=m.slice(H+1);O.push(D),s.tokens&&(y[y.length-1].value=D,K(y[y.length-1]),ee.maxDepth+=y[y.length-1].depth)}ee.slashes=R,ee.parts=O}return ee},ht}var bt,Dt;function xr(){if(Dt)return bt;Dt=1;const e=ct(),t=ft(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:c,REGEX_NON_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:i}=e,l=(m,b)=>typeof b.expandRange=="function"?b.expandRange(...m,b):(m.sort(),`[${m.join("-")}]`),f=(m,b)=>`Missing ${m}: "${b}" - use "\\\\${b}" to match literal characters`,x=m=>{const b=[];let s=0,v=0,A=0,R="",y=!1;for(const O of m){if(y===!0){R+=O,y=!1;continue}if(O==="\\"){R+=O,y=!0;continue}if(O==='"'){A=A===1?0:1,R+=O;continue}if(A===0){if(O==="[")s++;else if(O==="]"&&s>0)s--;else if(s===0){if(O==="(")v++;else if(O===")"&&v>0)v--;else if(O==="|"&&v===0){b.push(R),R="";continue}}}R+=O}return b.push(R),b},d=m=>{let b=!1;for(const s of m){if(b===!0){b=!1;continue}if(s==="\\"){b=!0;continue}if(/[?*+@!()[\]{}]/.test(s))return!1}return!0},T=m=>{let b=m.trim(),s=!0;for(;s===!0;)s=!1,/^@\([^\\()[\]{}|]+\)$/.test(b)&&(b=b.slice(2,-1),s=!0);if(d(b))return b.replace(/\\(.)/g,"$1")},C=m=>{const b=m.map(T).filter(Boolean);for(let s=0;s<b.length;s++)for(let v=s+1;v<b.length;v++){const A=b[s],R=b[v],y=A[0];if(!(!y||A!==y.repeat(A.length)||R!==y.repeat(R.length))&&(A===R||A.startsWith(R)||R.startsWith(A)))return!0}return!1},_=(m,b=!0)=>{if(m[0]!=="+"&&m[0]!=="*"||m[1]!=="(")return;let s=0,v=0,A=0,R=!1;for(let y=1;y<m.length;y++){const O=m[y];if(R===!0){R=!1;continue}if(O==="\\"){R=!0;continue}if(O==='"'){A=A===1?0:1;continue}if(A!==1){if(O==="["){s++;continue}if(O==="]"&&s>0){s--;continue}if(!(s>0)){if(O==="("){v++;continue}if(O===")"&&(v--,v===0))return b===!0&&y!==m.length-1?void 0:{type:m[0],body:m.slice(2,y),end:y}}}}},B=m=>{let b=0;const s=[];for(;b<m.length;){const v=_(m.slice(b),!1);if(!v||v.type!=="*")return;const A=x(v.body).map(y=>y.trim());if(A.length!==1)return;const R=T(A[0]);if(!R||R.length!==1)return;s.push(R),b+=v.end+1}return s.length<1?void 0:`${s.length===1?t.escapeRegex(s[0]):`[${s.map(v=>t.escapeRegex(v)).join("")}]`}*`},te=m=>{let b=0,s=m.trim(),v=_(s);for(;v;)b++,s=v.body.trim(),v=_(s);return b},q=(m,b)=>{if(b.maxExtglobRecursion===!1)return{risky:!1};const s=typeof b.maxExtglobRecursion=="number"?b.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,v=x(m).map(A=>A.trim());if(v.length>1&&(v.some(A=>A==="")||v.some(A=>/^[*?]+$/.test(A))||C(v)))return{risky:!0};for(const A of v){const R=B(A);if(R)return{risky:!0,safeOutput:R};if(te(A)>s)return{risky:!0}}return{risky:!1}},K=(m,b)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=i[m]||m;const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o;let A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);const R={type:"bos",value:"",output:s.prepend||""},y=[R],O=s.capture?"":"?:",X=e.globChars(s.windows),Z=e.extglobChars(X),{DOT_LITERAL:P,PLUS_LITERAL:re,SLASH_LITERAL:W,ONE_CHAR:se,DOTS_SLASH:I,NO_DOT:le,NO_DOT_SLASH:ge,NO_DOTS_SLASH:ne,QMARK:L,QMARK_NO_DOT:ue,STAR:de,START_ANCHOR:Q}=X,F=h=>`(${O}(?:(?!${Q}${h.dot?I:P}).)*?)`,V=s.dot?"":le,E=s.dot?L:ue;let w=s.bash===!0?F(s):de;s.capture&&(w=`(${w})`),typeof s.noext=="boolean"&&(s.noextglob=s.noext);const a={input:m,index:-1,start:0,dot:s.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};m=t.removePrefix(m,a),A=m.length;const Y=[],U=[],z=[];let n=R,u;const ee=()=>a.index===A-1,H=a.peek=(h=1)=>m[a.index+h],D=a.advance=()=>m[++a.index]||"",pe=()=>m.slice(a.index+1),J=(h="",M=0)=>{a.consumed+=h,a.index+=M},ce=h=>{a.output+=h.output!=null?h.output:h.value,J(h.value)},lo=()=>{let h=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)D(),a.start++,h++;return h%2===0?!1:(a.negated=!0,a.start++,!0)},it=h=>{a[h]++,z.push(h)},fe=h=>{a[h]--,z.pop()},S=h=>{if(n.type==="globstar"){const M=a.braces>0&&(h.type==="comma"||h.type==="brace"),g=h.extglob===!0||Y.length&&(h.type==="pipe"||h.type==="paren");h.type!=="slash"&&h.type!=="paren"&&!M&&!g&&(a.output=a.output.slice(0,-n.output.length),n.type="star",n.value="*",n.output=w,a.output+=n.output)}if(Y.length&&h.type!=="paren"&&(Y[Y.length-1].inner+=h.value),(h.value||h.output)&&ce(h),n&&n.type==="text"&&h.type==="text"){n.output=(n.output||n.value)+h.value,n.value+=h.value;return}h.prev=n,y.push(h),n=h},at=(h,M)=>{const g={...Z[M],conditions:1,inner:""};g.prev=n,g.parens=a.parens,g.output=a.output,g.startIndex=a.index,g.tokensIndex=y.length;const $=(s.capture?"(":"")+g.open;it("parens"),S({type:h,value:M,output:a.output?"":se}),S({type:"paren",extglob:!0,value:D(),output:$}),Y.push(g)},po=h=>{const M=m.slice(h.startIndex,a.index+1),g=m.slice(h.startIndex+2,a.index),$=q(g,s);if((h.type==="plus"||h.type==="star")&&$.risky){const N=$.safeOutput?(h.output?"":se)+(s.capture?`(${$.safeOutput})`:$.safeOutput):void 0,ie=y[h.tokensIndex];ie.type="text",ie.value=M,ie.output=N||t.escapeRegex(M);for(let ae=h.tokensIndex+1;ae<y.length;ae++)y[ae].value="",y[ae].output="",delete y[ae].suffix;a.output=h.output+ie.output,a.backtrack=!0,S({type:"paren",extglob:!0,value:u,output:""}),fe("parens");return}let G=h.close+(s.capture?")":""),j;if(h.type==="negate"){let N=w;if(h.inner&&h.inner.length>1&&h.inner.includes("/")&&(N=F(s)),(N!==w||ee()||/^\)+$/.test(pe()))&&(G=h.close=`)$))${N}`),h.inner.includes("*")&&(j=pe())&&/^\.[^\\/.]+$/.test(j)){const ie=K(j,{...b,fastpaths:!1}).output;G=h.close=`)${ie})${N})`}h.prev.type==="bos"&&(a.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:u,output:G}),fe("parens")};if(s.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let h=!1,M=m.replace(r,(g,$,G,j,N,ie)=>j==="\\"?(h=!0,g):j==="?"?$?$+j+(N?L.repeat(N.length):""):ie===0?E+(N?L.repeat(N.length):""):L.repeat(G.length):j==="."?P.repeat(G.length):j==="*"?$?$+j+(N?w:""):w:$?g:`\\${g}`);return h===!0&&(s.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,g=>g.length%2===0?"\\\\":g?"\\":"")),M===m&&s.contains===!0?(a.output=m,a):(a.output=t.wrapOutput(M,a,b),a)}for(;!ee();){if(u=D(),u==="\0")continue;if(u==="\\"){const g=H();if(g==="/"&&s.bash!==!0||g==="."||g===";")continue;if(!g){u+="\\",S({type:"text",value:u});continue}const $=/^\\+/.exec(pe());let G=0;if($&&$[0].length>2&&(G=$[0].length,a.index+=G,G%2!==0&&(u+="\\")),s.unescape===!0?u=D():u+=D(),a.brackets===0){S({type:"text",value:u});continue}}if(a.brackets>0&&(u!=="]"||n.value==="["||n.value==="[^")){if(s.posix!==!1&&u===":"){const g=n.value.slice(1);if(g.includes("[")&&(n.posix=!0,g.includes(":"))){const $=n.value.lastIndexOf("["),G=n.value.slice(0,$),j=n.value.slice($+2),N=c[j];if(N){n.value=G+N,a.backtrack=!0,D(),!R.output&&y.indexOf(n)===1&&(R.output=se);continue}}}(u==="["&&H()!==":"||u==="-"&&H()==="]")&&(u=`\\${u}`),u==="]"&&(n.value==="["||n.value==="[^")&&(u=`\\${u}`),s.posix===!0&&u==="!"&&n.value==="["&&(u="^"),n.value+=u,ce({value:u});continue}if(a.quotes===1&&u!=='"'){u=t.escapeRegex(u),n.value+=u,ce({value:u});continue}if(u==='"'){a.quotes=a.quotes===1?0:1,s.keepQuotes===!0&&S({type:"text",value:u});continue}if(u==="("){it("parens"),S({type:"paren",value:u});continue}if(u===")"){if(a.parens===0&&s.strictBrackets===!0)throw new SyntaxError(f("opening","("));const g=Y[Y.length-1];if(g&&a.parens===g.parens+1){po(Y.pop());continue}S({type:"paren",value:u,output:a.parens?")":"\\)"}),fe("parens");continue}if(u==="["){if(s.nobracket===!0||!pe().includes("]")){if(s.nobracket!==!0&&s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));u=`\\${u}`}else it("brackets");S({type:"bracket",value:u});continue}if(u==="]"){if(s.nobracket===!0||n&&n.type==="bracket"&&n.value.length===1){S({type:"text",value:u,output:`\\${u}`});continue}if(a.brackets===0){if(s.strictBrackets===!0)throw new SyntaxError(f("opening","["));S({type:"text",value:u,output:`\\${u}`});continue}fe("brackets");const g=n.value.slice(1);if(n.posix!==!0&&g[0]==="^"&&!g.includes("/")&&(u=`/${u}`),n.value+=u,ce({value:u}),s.literalBrackets===!1||t.hasRegexChars(g))continue;const $=t.escapeRegex(n.value);if(a.output=a.output.slice(0,-n.value.length),s.literalBrackets===!0){a.output+=$,n.value=$;continue}n.value=`(${O}${$}|${n.value})`,a.output+=n.value;continue}if(u==="{"&&s.nobrace!==!0){it("braces");const g={type:"brace",value:u,output:"(",outputIndex:a.output.length,tokensIndex:a.tokens.length};U.push(g),S(g);continue}if(u==="}"){const g=U[U.length-1];if(s.nobrace===!0||!g){S({type:"text",value:u,output:u});continue}let $=")";if(g.dots===!0){const G=y.slice(),j=[];for(let N=G.length-1;N>=0&&(y.pop(),G[N].type!=="brace");N--)G[N].type!=="dots"&&j.unshift(G[N].value);$=l(j,s),a.backtrack=!0}if(g.comma!==!0&&g.dots!==!0){const G=a.output.slice(0,g.outputIndex),j=a.tokens.slice(g.tokensIndex);g.value=g.output="\\{",u=$="\\}",a.output=G;for(const N of j)a.output+=N.output||N.value}S({type:"brace",value:u,output:$}),fe("braces"),U.pop();continue}if(u==="|"){Y.length>0&&Y[Y.length-1].conditions++,S({type:"text",value:u});continue}if(u===","){let g=u;const $=U[U.length-1];$&&z[z.length-1]==="braces"&&($.comma=!0,g="|"),S({type:"comma",value:u,output:g});continue}if(u==="/"){if(n.type==="dot"&&a.index===a.start+1){a.start=a.index+1,a.consumed="",a.output="",y.pop(),n=R;continue}S({type:"slash",value:u,output:W});continue}if(u==="."){if(a.braces>0&&n.type==="dot"){n.value==="."&&(n.output=P);const g=U[U.length-1];n.type="dots",n.output+=u,n.value+=u,g.dots=!0;continue}if(a.braces+a.parens===0&&n.type!=="bos"&&n.type!=="slash"){S({type:"text",value:u,output:P});continue}S({type:"dot",value:u,output:P});continue}if(u==="?"){if(!(n&&n.value==="(")&&s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("qmark",u);continue}if(n&&n.type==="paren"){const g=H();let $=u;(n.value==="("&&!/[!=<:]/.test(g)||g==="<"&&!/<([!=]|\w+>)/.test(pe()))&&($=`\\${u}`),S({type:"text",value:u,output:$});continue}if(s.dot!==!0&&(n.type==="slash"||n.type==="bos")){S({type:"qmark",value:u,output:ue});continue}S({type:"qmark",value:u,output:L});continue}if(u==="!"){if(s.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){at("negate",u);continue}if(s.nonegate!==!0&&a.index===0){lo();continue}}if(u==="+"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){at("plus",u);continue}if(n&&n.value==="("||s.regex===!1){S({type:"plus",value:u,output:re});continue}if(n&&(n.type==="bracket"||n.type==="paren"||n.type==="brace")||a.parens>0){S({type:"plus",value:u});continue}S({type:"plus",value:re});continue}if(u==="@"){if(s.noextglob!==!0&&H()==="("&&H(2)!=="?"){S({type:"at",extglob:!0,value:u,output:""});continue}S({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const g=p.exec(pe());g&&(u+=g[0],a.index+=g[0].length),S({type:"text",value:u});continue}if(n&&(n.type==="globstar"||n.star===!0)){n.type="star",n.star=!0,n.value+=u,n.output=w,a.backtrack=!0,a.globstar=!0,J(u);continue}let h=pe();if(s.noextglob!==!0&&/^\([^?]/.test(h)){at("star",u);continue}if(n.type==="star"){if(s.noglobstar===!0){J(u);continue}const g=n.prev,$=g.prev,G=g.type==="slash"||g.type==="bos",j=$&&($.type==="star"||$.type==="globstar");if(s.bash===!0&&(!G||h[0]&&h[0]!=="/")){S({type:"star",value:u,output:""});continue}const N=a.braces>0&&(g.type==="comma"||g.type==="brace"),ie=Y.length&&(g.type==="pipe"||g.type==="paren");if(!G&&g.type!=="paren"&&!N&&!ie){S({type:"star",value:u,output:""});continue}for(;h.slice(0,3)==="/**";){const ae=m[a.index+4];if(ae&&ae!=="/")break;h=h.slice(3),J("/**",3)}if(g.type==="bos"&&ee()){n.type="globstar",n.value+=u,n.output=F(s),a.output=n.output,a.globstar=!0,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&!j&&ee()){a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=F(s)+(s.strictSlashes?")":"|$)"),n.value+=u,a.globstar=!0,a.output+=g.output+n.output,J(u);continue}if(g.type==="slash"&&g.prev.type!=="bos"&&h[0]==="/"){const ae=h[1]!==void 0?"|$":"";a.output=a.output.slice(0,-(g.output+n.output).length),g.output=`(?:${g.output}`,n.type="globstar",n.output=`${F(s)}${W}|${W}${ae})`,n.value+=u,a.output+=g.output+n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(g.type==="bos"&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}if(N&&h[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${W}|${F(s)}${W})`,a.output+=n.output,a.globstar=!0,J(u+D()),S({type:"slash",value:"/",output:""});continue}a.output=a.output.slice(0,-n.output.length),n.type="globstar",n.output=F(s),n.value+=u,a.output+=n.output,a.globstar=!0,J(u);continue}const M={type:"star",value:u,output:w};if(s.bash===!0){M.output=".*?",(n.type==="bos"||n.type==="slash")&&(M.output=V+M.output),S(M);continue}if(n&&(n.type==="bracket"||n.type==="paren")&&s.regex===!0){M.output=u,S(M);continue}(a.index===a.start||n.type==="slash"||n.type==="dot")&&(n.type==="dot"?(a.output+=ge,n.output+=ge):s.dot===!0?(a.output+=ne,n.output+=ne):(a.output+=V,n.output+=V),H()!=="*"&&(a.output+=se,n.output+=se)),S(M)}for(;a.brackets>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","]"));a.output=t.escapeLast(a.output,"["),fe("brackets")}for(;a.parens>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing",")"));a.output=t.escapeLast(a.output,"("),fe("parens")}for(;a.braces>0;){if(s.strictBrackets===!0)throw new SyntaxError(f("closing","}"));a.output=t.escapeLast(a.output,"{"),fe("braces")}if(s.strictSlashes!==!0&&(n.type==="star"||n.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${W}?`}),a.backtrack===!0){a.output="";for(const h of a.tokens)a.output+=h.output!=null?h.output:h.value,h.suffix&&(a.output+=h.suffix)}return a};return K.fastpaths=(m,b)=>{const s={...b},v=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o,A=m.length;if(A>v)throw new SyntaxError(`Input length: ${A}, exceeds maximum allowed length: ${v}`);m=i[m]||m;const{DOT_LITERAL:R,SLASH_LITERAL:y,ONE_CHAR:O,DOTS_SLASH:X,NO_DOT:Z,NO_DOTS:P,NO_DOTS_SLASH:re,STAR:W,START_ANCHOR:se}=e.globChars(s.windows),I=s.dot?P:Z,le=s.dot?re:Z,ge=s.capture?"":"?:",ne={negated:!1,prefix:""};let L=s.bash===!0?".*?":W;s.capture&&(L=`(${L})`);const ue=V=>V.noglobstar===!0?L:`(${ge}(?:(?!${se}${V.dot?X:R}).)*?)`,de=V=>{switch(V){case"*":return`${I}${O}${L}`;case".*":return`${R}${O}${L}`;case"*.*":return`${I}${L}${R}${O}${L}`;case"*/*":return`${I}${L}${y}${O}${le}${L}`;case"**":return I+ue(s);case"**/*":return`(?:${I}${ue(s)}${y})?${le}${O}${L}`;case"**/*.*":return`(?:${I}${ue(s)}${y})?${le}${L}${R}${O}${L}`;case"**/.*":return`(?:${I}${ue(s)}${y})?${R}${O}${L}`;default:{const E=/^(.*?)\.(\w+)$/.exec(V);if(!E)return;const w=de(E[1]);return w?w+R+E[2]:void 0}}},Q=t.removePrefix(m,ne);let F=de(Q);return F&&s.strictSlashes!==!0&&(F+=`${y}?`),F},bt=K,bt}var vt,Gt;function Ar(){if(Gt)return vt;Gt=1;const e=yr(),t=xr(),o=ft(),c=ct(),p=i=>i&&typeof i=="object"&&!Array.isArray(i),r=(i,l,f=!1)=>{if(Array.isArray(i)){const q=i.map(K=>r(K,l,f));return K=>{for(const m of q){const b=m(K);if(b)return b}return!1}}const x=p(i)&&i.tokens&&i.input;if(i===""||typeof i!="string"&&!x)throw new TypeError("Expected pattern to be a non-empty string");const d=l||{},T=d.windows,C=x?r.compileRe(i,l):r.makeRe(i,l,!1,!0),_=C.state;delete C.state;let B=()=>!1;if(d.ignore){const q={...l,ignore:null,onMatch:null,onResult:null};B=r(d.ignore,q,f)}const te=(q,K=!1)=>{const{isMatch:m,match:b,output:s}=r.test(q,C,l,{glob:i,posix:T}),v={glob:i,state:_,regex:C,posix:T,input:q,output:s,match:b,isMatch:m};if(typeof d.onResult=="function"&&d.onResult(v),m===!1)return v.isMatch=!1,K?v:!1;e:if(B(q)){if(typeof d.onIgnore=="function"&&d.onIgnore(v)===c.UNIGNORE){v.isMatch=!0;break e}return v.isMatch=!1,K?v:!1}return typeof d.onMatch=="function"&&d.onMatch(v),K?v:!0};return f&&(te.state=_),te};return r.test=(i,l,f,{glob:x,posix:d}={})=>{if(typeof i!="string")throw new TypeError("Expected input to be a string");if(i==="")return{isMatch:!1,output:""};const T=f||{},C=T.format||(d?o.toPosixSlashes:null);let _=i===x,B=_&&C?C(i):i;return _===!1&&(B=C?C(i):i,_=B===x),(_===!1||T.capture===!0)&&(T.matchBase===!0||T.basename===!0?_=r.matchBase(i,l,f,d):_=l.exec(B)),{isMatch:!!_,match:_,output:B}},r.matchBase=(i,l,f)=>(l instanceof RegExp?l:r.makeRe(l,f)).test(o.basename(i)),r.isMatch=(i,l,f)=>r(l,f)(i),r.parse=(i,l)=>Array.isArray(i)?i.map(f=>r.parse(f,l)):t(i,{...l,fastpaths:!1}),r.scan=(i,l)=>e(i,l),r.compileRe=(i,l,f=!1,x=!1)=>{if(f===!0)return i.output;const d=l||{},T=d.contains?"":"^",C=d.contains?"":"$";let _=`${T}(?:${i.output})${C}`;i&&i.negated===!0&&(_=`^(?!${_}).*$`);const B=r.toRegex(_,l);return x===!0&&(B.state=i),B},r.makeRe=(i,l={},f=!1,x=!1)=>{if(!i||typeof i!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(i[0]==="."||i[0]==="*")&&(d.output=t.fastpaths(i,l)),d.output||(d=t(i,l)),r.compileRe(d,l,f,x)},r.toRegex=(i,l)=>{try{const f=l||{};return new RegExp(i,f.flags||(f.nocase?"i":""))}catch(f){if(l&&l.debug===!0)throw f;return/$^/}},r.constants=c,vt=r,vt}var yt,zt;function Rr(){if(zt)return yt;zt=1;const e=Ar(),t=ft();function o(c,p,r=!1){return p&&(p.windows===null||p.windows===void 0)&&(p={...p,windows:t.isWindows()}),e(c,p,r)}return Object.assign(o,e),yt=o,yt}var _r=Rr();Tt(_r);const Er=k(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nt=e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,o]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Le.getBuiltinModule(e)}return Er(e)};nt("fs");nt("fs");nt("path");nt("url");const{createRequire:Tr}=nt("module");var Pt=Tr(import.meta.url);try{Pt.resolve("picomatch"),Pt("picomatch")}catch{}var xt,Ut;function Cr(){if(Ut)return xt;Ut=1;/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/return xt=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},xt}var At,jt;function eo(){if(jt)return At;jt=1;/*!
|
|
7
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/var e=Cr(),t={"{":"}","(":")","[":"]"},o=function(p){if(p[0]==="!")return!0;for(var r=0,i=-2,l=-2,f=-2,x=-2,d=-2;r<p.length;){if(p[r]==="*"||p[r+1]==="?"&&/[\].+)]/.test(p[r])||l!==-1&&p[r]==="["&&p[r+1]!=="]"&&(l<r&&(l=p.indexOf("]",r)),l>r&&(d===-1||d>l||(d=p.indexOf("\\",r),d===-1||d>l)))||f!==-1&&p[r]==="{"&&p[r+1]!=="}"&&(f=p.indexOf("}",r),f>r&&(d=p.indexOf("\\",r),d===-1||d>f))||x!==-1&&p[r]==="("&&p[r+1]==="?"&&/[:!=]/.test(p[r+2])&&p[r+3]!==")"&&(x=p.indexOf(")",r),x>r&&(d=p.indexOf("\\",r),d===-1||d>x))||i!==-1&&p[r]==="("&&p[r+1]!=="|"&&(i<r&&(i=p.indexOf("|",r)),i!==-1&&p[i+1]!==")"&&(x=p.indexOf(")",i),x>i&&(d=p.indexOf("\\",i),d===-1||d>x))))return!0;if(p[r]==="\\"){var T=p[r+1];r+=2;var C=t[T];if(C){var _=p.indexOf(C,r);_!==-1&&(r=_+1)}if(p[r]==="!")return!0}else r++}return!1},c=function(p){if(p[0]==="!")return!0;for(var r=0;r<p.length;){if(/[*?{}()[\]]/.test(p[r]))return!0;if(p[r]==="\\"){var i=p[r+1];r+=2;var l=t[i];if(l){var f=p.indexOf(l,r);f!==-1&&(r=f+1)}if(p[r]==="!")return!0}else r++}return!1};return At=function(p,r){if(typeof p!="string"||p==="")return!1;if(e(p))return!0;var i=o;return r&&r.strict===!1&&(i=c),i(p)},At}const Sr=k(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,to=e=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[t,o]=Be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Be.getBuiltinModule(e)}return Sr(e)},$r=to("path"),wr=to("os");var Rt,Ft;function kr(){if(Ft)return Rt;Ft=1;var e=eo(),t=$r.posix.dirname,o=wr.platform()==="win32",c="/",p=/\\/g,r=/\\([!*?|[\](){}])/g;Rt=function(f,x){var d=Object.assign({flipBackslashes:!0},x);d.flipBackslashes&&o&&f.indexOf(c)<0&&(f=f.replace(p,c)),i(f)&&(f+=c),f+="a";do f=t(f);while(l(f));return f.replace(r,"$1")};function i(f){var x=f.slice(-1),d;switch(x){case"}":d="{";break;case"]":d="[";break;default:return!1}var T=f.indexOf(d);return T<0?!1:f.slice(T+1,-1).includes(c)}function l(f){return/\([^()]+$/.test(f)||f[0]==="{"||f[0]==="["||/[^\\][{[]/.test(f)?!0:e(f)}return Rt}var Or=kr();Tt(Or);const Hr=k(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Nr=e=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[t,o]=Me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Me.getBuiltinModule(e)}return Hr(e)};Nr("node:fs/promises");const Lr=k(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Br=e=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[t,o]=Ie.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ie.getBuiltinModule(e)}return Lr(e)},{accessSync:Mr}=Br("node:fs");function pt(e,t=Ao){Jt(e),e=lt(e);try{return Mr(e,t),!0}catch{return!1}}var Ir=eo();Tt(Ir);const Dr=k(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oo=e=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[t,o]=De.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return De.getBuiltinModule(e)}return Dr(e)};oo("node:fs/promises");oo("node:fs");let Gr=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};const zr=k(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,o]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ge.getBuiltinModule(e)}return zr(e)};ro("node:fs/promises");ro("node:zlib");const Pr=k(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,so=e=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[t,o]=ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ze.getBuiltinModule(e)}return Pr(e)};so("node:fs");so("node:zlib");const Ur=k(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jr=e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,o]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Pe.getBuiltinModule(e)}return Ur(e)},{createRequire:no}=jr("node:module"),Fr=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&Fr.set("AggregateError",AggregateError);const Kr=no(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xr=e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,o]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ue.getBuiltinModule(e)}return Kr(e)};Xr("node:util");const Wr=no(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ct=e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,o]=je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return je.getBuiltinModule(e)}return Wr(e)};Ct("node:fs");Ct("node:path");Ct("node:url");const Qr=k(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=e=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[t,o]=Fe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Fe.getBuiltinModule(e)}return Qr(e)};uo("node:fs");uo("node:fs/promises");const qr=k(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zr=e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,o]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ke.getBuiltinModule(e)}return qr(e)};Zr("node:fs");const Yr=k(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,o]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Xe.getBuiltinModule(e)}return Yr(e)};Vr("node:fs/promises");const Jr=k(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,es=e=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[t,o]=We.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return We.getBuiltinModule(e)}return Jr(e)};es("node:fs");k(import.meta.url);const ts=k(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,os=e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,o]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Qe.getBuiltinModule(e)}return ts(e)};os("node:crypto");new TextEncoder;const rs=k(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ss=e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,o]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return qe.getBuiltinModule(e)}return rs(e)};ss("node:fs/promises");const ns=k(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,us=e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,o]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ze.getBuiltinModule(e)}return ns(e)};us("node:fs");const is=k(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,o]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ye.getBuiltinModule(e)}return is(e)};as("node:fs/promises");const ls=k(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,o]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ve.getBuiltinModule(e)}return ls(e)};ps("node:fs");const cs=k(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,o]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Je.getBuiltinModule(e)}return cs(e)},fs=St("fs"),gs=St("os"),ds=St("path");var _t={},Kt;function ms(){if(Kt)return _t;Kt=1;var e=Object.defineProperty,t=(d,T)=>e(d,"name",{value:T,configurable:!0}),o=fs,c=gs,p=ds;const r=t(d=>{let T="";for(let C=0;C<d.length;C+=1){const _=d[C],B=_.toUpperCase();T+=_===B?_.toLowerCase():B}return T},"invertCase"),i=new Map,l=t((d,T)=>{const C=p.join(d,`.is-fs-case-sensitive-test-${process.pid}`);try{return T.writeFileSync(C,""),!T.existsSync(r(C))}finally{try{T.unlinkSync(C)}catch{}}},"checkDirectoryCaseWithWrite"),f=t((d,T,C)=>{try{return l(d,C)}catch(_){if(T===void 0)return l(c.tmpdir(),C);throw _}},"checkDirectoryCaseWithFallback"),x=t((d,T=o,C=!0)=>{const _=d??process.cwd();if(C&&i.has(_))return i.get(_);let B;const te=r(_);return te!==_&&T.existsSync(_)?B=!T.existsSync(te):B=f(_,d,T),C&&i.set(_,B),B},"isFsCaseSensitive");return _t.isFsCaseSensitive=x,_t}ms();const hs=/^[A-Z]:\//i,ut=(e="")=>e&&e.replaceAll("\\","/").replace(hs,t=>t.toUpperCase()),bs=/^[/\\]{2}/,vs=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,$t=/^[A-Z]:$/i,ys=/\/$/,xs=()=>{if(typeof process.cwd=="function")try{const e=process.cwd();if(typeof e=="string")return ut(e)}catch{}return"/"},Et="/",io=(e,t)=>{let o="",c=0,p=-1,r=0,i;for(let l=0;l<=e.length;++l){if(l<e.length)i=e[l];else{if(i==="/")break;i="/"}if(i==="/"){if(!(p===l-1||r===1))if(r===2){if(o.length<2||c!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",c=0):(o=o.slice(0,f),c=o.length-1-o.lastIndexOf("/")),p=l,r=0;continue}else if(o.length>0){o="",c=0,p=l,r=0;continue}}t&&(o+=o.length>0?"/..":"..",c=2)}else o.length>0?o+=`/${e.slice(p+1,l)}`:o=e.slice(p+1,l),c=l-p-1;p=l,r=0}else i==="."&&r!==-1?++r:r=-1}return o},he=e=>vs.test(e),As=function(e){if(e.length===0)return".";e=ut(e);const t=bs.exec(e),o=he(e),c=e.at(-1)==="/";return e=io(e,!o),e.length===0?o?"/":c?"./":".":(c&&(e+="/"),$t.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!he(e)?`/${e}`:e)},oe=(...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const c=t.at(-1)==="/",p=o[0]==="/";c&&p?t+=o.slice(1):t+=c||p?o:`/${o}`}else t+=o;return As(t)},Rs=function(...e){e=e.map(c=>ut(c));let t="",o=!1;for(let c=e.length-1;c>=-1&&!o;c--){const p=c>=0?e[c]:xs();!p||p.length===0||(t=`${p}/${t}`,o=he(p))}return t=io(t,!o),$t.test(t)?`${t}/`:o&&!he(t)?`/${t}`:t.length>0?t:"."},_s=e=>{const t=ut(e).replace(ys,""),o=t.lastIndexOf("/");if(o===-1)return he(e)?"/":".";const c=t.slice(0,o);return $t.test(c)?`${c}/`:c||(he(e)?"/":".")};let Es;const Ts=e=>(Es??=k(import.meta.url))(e),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,o]=et.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return et.getBuiltinModule(e)}return Ts(e)},{fileURLToPath:Ss}=Cs("node:url");function $s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt,Wt;function ws(){return Wt||(Wt=1,Xt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Xt}var ks=ws();const Os=$s(ks);new Set(Os);const ao=e=>ut(e instanceof URL?Ss(e):e),Qt=e=>{const t=yo();if(wt==="win32"){const r=ot.LOCALAPPDATA,i=t?oe(t,"AppData","Local"):gt(),l=r&&r.length>0?r:i;return oe(l,e,"Cache")}if(wt==="darwin"){const r=t?oe(t,"Library","Caches"):gt();return oe(r,e)}const o=ot.XDG_CACHE_HOME,c=t?oe(t,".cache"):gt(),p=o&&o.length>0?o:c;return oe(p,e)},Hs=e=>{if(e.length===0)return;const t=e.map(r=>Rs(ao(r)).split(Et));let o=Number.POSITIVE_INFINITY;for(const r of t)r.length<o&&(o=r.length);const c=[];for(let r=0;r<o;r+=1){const i=t[0][r];if(t.every(l=>l[r]===i))c.push(i);else break}const p=c.join(Et);return p===""?Et:p},tt=(e,t)=>{if(e!==void 0)return t?(...o)=>oe(e,...o):e},Ns=e=>{if(e?.files&&e.files.length>0){const t=Hs(e.files);if(t!==void 0)return t}return e?.cwd??xo()},Ls=e=>new Gr(`No package.json found searching upwards from '${ao(e)}'.`),Bs=e=>!pt(e,Yt)&&pt(e),Ms=(e,t)=>{if(ot.CACHE_DIR&&!["0","1","false","true"].includes(ot.CACHE_DIR)){const x=oe(ot.CACHE_DIR,e);return t?.create&&_e(x),tt(x,t?.thunk)}const o=Ns(t),c=vr("package.json",{cwd:o,type:"file"});if(!c){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}if(t?.throwError)throw Ls(o);return}const p=_s(c),r=oe(p,"node_modules"),i=oe(r,".cache"),l=oe(i,e);if(pt(l,Yt))return t?.create&&_e(l),tt(l,t?.thunk);const f=[l,i,r];if(pt(r)||f.push(p),f.some(x=>Bs(x))){if(t?.useGlobalCacheFallback){const x=Qt(e);return t.create&&_e(x),tt(x,t.thunk)}return}return t?.create&&_e(l),tt(l,t?.thunk)},zs=Ms,qt="@inherit",Is=["aliases","dependsOn","inputs","outputs"],Ds=(e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(qt))return[...t];const o=[];for(const c of t){if(c===qt){e!==void 0&&o.push(...e);continue}o.push(c)}return o},Ps=(e,t)=>{const o={...e,...t};for(const c of Is){const p=e?.[c],r=t?.[c],i=Ds(p,r);i===void 0?delete o[c]:o[c]=i}return o};export{zs as F,Ps as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{v as m,w as v,l as I,z as j}from"./index-uBVnF4ji.js";let y;const b=e=>(y??=_(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,r]=h.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return h.getBuiltinModule(e)}return b(e)},{platform:C}=T("node:os"),x={server:{cache:!1,interactive:!1,persistent:!0,runInCI:!1},utility:{cache:!1,runInCI:!1}},q=e=>{const s=e.preset??e.options?.preset;if(!s)return e;const r=x[s];if(!r)return e;const{cache:n,...t}=r;return{...e,cache:e.cache??n,options:{...t,...e.options}}},$=()=>{const e=C();return e==="darwin"?"macos":e==="win32"?"windows":"linux"},k=(e,s)=>{if(!s||s.size===0)return!0;const r=e?.runnerTags;return!r||r.length===0?!0:r.some(n=>s.has(n))},A=(e,s,r=!0)=>{const n=e?.runInCI??!0;return n===!0||n==="always"?!0:n===!1?!s:n==="affected"?!s||r:!0},z=(e,s,r)=>r||!s?e:m(s)?s:v(e,s),B=(e,s)=>{if(s===!1)return{};const r=s===!0?O("production"):Array.isArray(s)?s:[s],n={};for(const t of r)Object.assign(n,R(e,t,n));return n},g=(e,s)=>{const r=t=>{const c=s[t];return c!==void 0?c:process.env[t]??""};let n="";for(let t=0;t<e.length;t+=1){const c=e[t];if(c==="\\"&&e[t+1]==="$"){n+="$",t+=1;continue}if(c!=="$"){n+=c;continue}const a=e[t+1];if(a==="{"){let o=1,l=t+2;for(;l<e.length;){const d=e[l];if(d==="}"){if(o-=1,o===0)break}else d==="{"&&e[l-1]==="$"&&(o+=1);l+=1}if(o!==0){n+=e.slice(t);break}const f=l,i=e.slice(t+2,f),u=i.indexOf(":-");if(u===-1)n+=r(i);else{const d=i.slice(0,u),w=i.slice(u+2),p=s[d]??process.env[d];n+=p!==void 0&&p!==""?p:g(w,s)}t=f;continue}if(a!==void 0&&/[A-Z_]/i.test(a)){let o=t+1;for(;o<e.length&&/\w/.test(e[o]);)o+=1;n+=r(e.slice(t+1,o)),t=o-1;continue}n+=c}return n},O=e=>{const s=[".env"];return e&&s.push(`.env.${e}`),e!=="test"&&s.push(".env.local"),e&&e!=="test"&&s.push(`.env.${e}.local`),s},R=(e,s,r={})=>{const n=m(s)?s:v(e,s);if(!I(n))return{};let t;try{t=j(n)}catch{return{}}const c={};for(const a of t.split(/\r?\n/)){const o=a.trim();if(o===""||o.startsWith("#"))continue;const l=o.indexOf("=");if(l===-1)continue;const f=o.slice(0,l).trim();if(f==="")continue;let i=o.slice(l+1).trim();const u=i.length>=2&&i.startsWith("'")&&i.endsWith("'");(i.startsWith('"')&&i.endsWith('"')||u)&&(i=i.slice(1,-1)),u||(i=g(i,{...r,...c})),c[f]=i}return c},F=(e,s=$())=>{if(e)return s==="windows"&&e.windowsShell?e.windowsShell:(s==="linux"||s==="macos")&&e.unixShell?e.unixShell:e.shell},M=e=>{if(e==="run")return!1;if(e==="build"||e==="test")return!0};export{F as a,M as b,q as c,$ as d,B as l,k as m,z as r,A as s};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{createRequire as F}from"node:module";import{w as v,l as m,a as J,z as y}from"./index-uBVnF4ji.js";import{a as W}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let D;const q=o=>(D??=F(import.meta.url))(o),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=o=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[e,n]=w.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return w.getBuiltinModule(o)}return q(o)},{execFileSync:x}=M("node:child_process"),{randomBytes:B}=M("node:crypto"),{writeFileSync:I,renameSync:R,unlinkSync:U}=M("node:fs"),{delimiter:z}=M("node:path"),H=["proto","mise","fnm","volta","asdf","nvm","corepack"],Z={asdf:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],corepack:["npm","pnpm","yarn"],fnm:["node"],mise:["aube","bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],nvm:["node"],proto:["bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],volta:["node","npm","pnpm","yarn"]},X=["proto","mise","fnm","volta","asdf","nvm","corepack"],A={asdf:[".tool-versions"],corepack:[],fnm:[".nvmrc",".node-version"],mise:[".mise.toml",".config/mise.toml","mise.toml"],nvm:[".nvmrc"],proto:[".prototools"],volta:[]},b=new Map,h=o=>{const e=b.get(o);if(e!==void 0||b.has(o))return e;const n=process.env.PATH;if(!n){b.set(o,void 0);return}const t=process.platform==="win32"?["",...(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").split(";")]:[""];for(const r of n.split(z)){const i=r.replaceAll(/^["']|["']$/g,"").trim();if(i!=="")for(const l of t){const s=`${i}${J}${o}${l}`;if(m(s))return b.set(o,s),s}}b.set(o,void 0)},S=(o,e=["--version"])=>{try{const n=x(o,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}),t=/\d+\.\d+(?:\.\d+)?/.exec(n);return t?t[0]:n.trim()||void 0}catch{return}},T=(o,e)=>{const n=v(o,"package.json");if(!m(n))return[];try{const t=W(n)[e];if(e==="volta"&&typeof t=="object"&&t!==null&&Object.keys(t).length>0)return["package.json"];if(e==="packageManager"&&typeof t=="string"&&t.length>0)return["package.json"]}catch{}return[]},G=(o,e)=>o==="volta"?T(e,"volta"):o==="corepack"?T(e,"packageManager"):A[o].filter(n=>m(v(e,n))),_=new Map,L=()=>{_.clear(),b.clear()},O=(o,e)=>{{const i=_.get(o);if(i)return i}const n=[],t=!!h("pnpm")||!!h("yarn");for(const i of X){const l=i==="nvm"?void 0:h(i),s=i==="nvm"&&!!process.env.NVM_DIR,c=G(i,o),a=!!l||s;i==="corepack"&&!a&&(!(c.length>0)||t)||!a&&c.length===0||n.push({binPath:l,configFiles:c,installed:a,name:i,version:l?S(l):void 0})}const r=Object.freeze(n);return _.set(o,r),r},de=(o,e,n)=>{const t=O(o);return e?.preferredManager&&e.preferredManager!=="none"?t.find(r=>r.name===e.preferredManager)??{configFiles:[],installed:!1,name:e.preferredManager}:t.find(r=>r.installed&&r.configFiles.length>0)??t.find(r=>r.installed)??t.find(r=>r.configFiles.length>0)??{configFiles:[],installed:!1,name:"none"}},V=(o,e)=>{for(const n of e){const t=v(o,n);if(m(t))try{const r=y(t).trim();if(r!=="")return{name:n,value:r.replace(/^v/,"")}}catch{}}},K=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,Y=o=>{const e=v(o,".prototools");if(!m(e))return[];const n=y(e),t=[];let r=!1;for(const i of n.split(/\r?\n/)){const l=i.trim();if(l===""||l.startsWith("#"))continue;if(l.startsWith("[")){r=!0;continue}if(r)continue;const s=K.exec(l);if(!s)continue;const[,c,a]=s,p=g(c);p&&t.push({source:".prototools",tool:p,version:a.trim()})}return t},Q=/^\[tools\]\s*$/i,ee=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,oe=o=>{for(const e of A.mise){const n=v(o,e);if(!m(n))continue;const t=[],r=y(n);let i=!1;for(const l of r.split(/\r?\n/)){const s=l.trim();if(s===""||s.startsWith("#"))continue;if(s.startsWith("[")){i=Q.test(s);continue}if(!i)continue;const c=ee.exec(s);if(!c)continue;const[,a,p]=c,d=g(a);d&&t.push({source:".mise.toml",tool:d,version:p.trim()})}if(t.length>0)return t}return[]},ne=o=>{const e=v(o,".tool-versions");if(!m(e))return[];const n=y(e),t=[];for(const r of n.split(/\r?\n/)){const i=r.trim();if(i===""||i.startsWith("#"))continue;const l=i.split(/\s+/);if(l.length<2)continue;const[s,...c]=l,a=g(s);a&&c[0]&&t.push({source:".tool-versions",tool:a,version:c[0]})}return t},g=o=>{switch(o.toLowerCase()){case"aube":return"aube";case"bun":return"bun";case"deno":return"deno";case"go":case"golang":return"go";case"node":case"nodejs":return"node";case"npm":return"npm";case"pnpm":return"pnpm";case"python":case"python3":return"python";case"ruby":return"ruby";case"rust":case"rustc":return"rust";case"yarn":return"yarn";default:return}},te=o=>{const[e]=o.split("+",1),n=/^(pnpm|yarn|npm|bun)@(.+)$/.exec(e??"");if(!n)return;const t=g(n[1]);if(t)return{source:"packageManager",tool:t,version:n[2]}},re=(o,e)=>{const n=new Map,t=s=>{n.set(s.tool,s)},r=v(o,"package.json");let i={};try{m(r)&&(i=W(r))}catch{}if(i.engines)for(const[s,c]of Object.entries(i.engines)){const a=g(s);a&&typeof c=="string"&&t({source:"engines",tool:a,version:c})}if(i.packageManager){const s=te(i.packageManager);s&&t(s)}if(i.volta)for(const[s,c]of Object.entries(i.volta)){const a=g(s);a&&typeof c=="string"&&t({source:"volta",tool:a,version:c})}const l=V(o,[".nvmrc",".node-version"]);l&&t({source:l.name===".nvmrc"?".nvmrc":".node-version",tool:"node",version:l.value});for(const s of ne(o))t(s);for(const s of oe(o))t(s);for(const s of Y(o))t(s);if(e?.tools)for(const[s,c]of Object.entries(e.tools)){const a=g(s);a&&typeof c=="string"&&t({source:"vis.config.ts",tool:a,version:c})}return[...n.values()]},P={aube:{args:["--version"],binaries:["aube"]},bun:{args:["--version"],binaries:["bun"]},deno:{args:["--version"],binaries:["deno"]},go:{args:["version"],binaries:["go"]},node:{args:["--version"],binaries:["node"]},npm:{args:["--version"],binaries:["npm"]},pnpm:{args:["--version"],binaries:["pnpm"]},python:{args:["--version"],binaries:["python","python3"]},ruby:{args:["--version"],binaries:["ruby"]},rust:{args:["--version"],binaries:["rustc"]},yarn:{args:["--version"],binaries:["yarn"]}},E=o=>{const e=P[o];for(const n of e.binaries){const t=h(n);if(t)return S(t,e.args)}if(o==="node")return process.versions.node},N=(o,e)=>{const n=e.trim();if(n===""||n==="*"||n==="latest")return!0;if(/^\d[\d.]*$/.test(n))return o===n||o.startsWith(`${n}.`);const t=s=>s.split(/[.\-+]/).map(c=>Number.parseInt(c,10)||0),r=(s,c)=>{const a=t(s),p=t(c),d=Math.max(a.length,p.length);for(let f=0;f<d;f++){const $=a[f]??0,u=p[f]??0;if($!==u)return $-u}return 0},i=s=>{for(const c of s)if(c.startsWith(">=")){if(r(o,c.slice(2).trim())<0)return!1}else if(c.startsWith("<=")){if(r(o,c.slice(2).trim())>0)return!1}else if(c.startsWith(">")){if(r(o,c.slice(1).trim())<=0)return!1}else if(c.startsWith("<")){if(r(o,c.slice(1).trim())>=0)return!1}else if(c.startsWith("^")||c.startsWith("~")){const a=c.slice(1).trim(),[p,d]=t(a),[f,$]=t(o);if(f!==p||c.startsWith("~")&&$!==d||r(o,a)<0)return!1}return!0},l=n.split("||").map(s=>s.trim().split(/\s+/).filter(Boolean)).filter(s=>s.length>0);return l.length===0?!0:l.some(s=>i(s))},se=(o,e)=>{switch(o){case".mise.toml":return["mise"];case".node-version":case".nvmrc":return["fnm","nvm","volta","proto","mise","asdf"];case".prototools":return["proto"];case".tool-versions":return["asdf","mise"];case"packageManager":return e==="pnpm"||e==="yarn"?["self-activate","volta","proto","mise","corepack"]:e==="npm"?["volta","proto","mise","asdf","corepack"]:e==="aube"?["mise"]:e==="bun"?["proto","mise","asdf"]:["volta","proto","mise"];case"volta":return["volta"];default:return["proto","mise","fnm","volta","asdf","nvm","corepack"]}},ie=(o,e,n)=>{if(n?.preferredManager&&n.preferredManager!=="none"&&j(n.preferredManager,o.tool)){const r=e.find(i=>i.name===n.preferredManager);return r?{installed:r.installed,name:r.name}:{installed:!1,name:n.preferredManager,note:`${n.preferredManager} is the preferred manager but isn't on PATH`}}const t=se(o.source,o.tool);for(const r of t){if(r==="self-activate"){if((o.tool==="pnpm"||o.tool==="yarn")&&h(o.tool))return{installed:!0,name:"self-activate",note:`${o.tool} will activate ${o.version} from the packageManager field on next invocation`};continue}if(j(r,o.tool)&&e.find(i=>i.name===r)?.installed)return{installed:!0,name:r}}for(const r of t)if(!(r==="self-activate"||!j(r,o.tool)))return{installed:!1,name:r,note:`${r} can install ${o.tool} — run \`vis toolchain install\` after adding it to PATH`};return{installed:!1,name:"none",note:"No manager knows how to install this tool"}},j=(o,e)=>o==="none"?!1:o==="self-activate"?e==="pnpm"||e==="yarn":Z[o].includes(e),ae=(o,e)=>{const n=O(o),t=re(o,e).map(r=>{const i=E(r.tool),l=i!==void 0&&N(i,r.version),s=ie(r,n,e);return{actual:i,expected:r,manager:s,matches:l}});return{detected:n,tools:t}},ce=(o,e)=>{switch(o){case"asdf":return e?{args:["install",e.tool,e.version],bin:"asdf"}:void 0;case"corepack":return e?{args:["prepare",`${e.tool}@${e.version}`,"--activate"],bin:"corepack"}:{args:["prepare","--activate"],bin:"corepack",hint:"reads the packageManager field in package.json"};case"fnm":return e?.tool!=="node"?void 0:{args:["install",e.version],bin:"fnm"};case"mise":return e?{args:["install",`${e.tool}@${e.version}`],bin:"mise"}:void 0;case"none":return;case"nvm":return{args:[],bin:"nvm",hint:"nvm is a shell function — run `nvm install` / `nvm use` from your shell"};case"proto":return e?{args:["install",e.tool,e.version],bin:"proto"}:void 0;case"self-activate":return{args:[],bin:e?.tool??"pnpm",hint:`${e?.tool??"pnpm"} will self-activate on next invocation — no install needed`};case"volta":return e?{args:["install",`${e.tool}@${e.version}`],bin:"volta"}:{args:["install","node@lts"],bin:"volta",hint:"volta pins per-tool; specify <tool>@<version>"};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},ge=(o,e)=>{switch(o){case"asdf":return{args:["local",e.tool,e.version],bin:"asdf",configChange:{file:".tool-versions",hint:`Pins ${e.tool} ${e.version}`}};case"corepack":return e.tool!=="npm"&&e.tool!=="pnpm"&&e.tool!=="yarn"?void 0:{args:["use",`${e.tool}@${e.version}`],bin:"corepack",configChange:{file:"package.json",hint:`Writes packageManager: "${e.tool}@${e.version}"`}};case"fnm":return e.tool==="node"?{args:["use",e.version],bin:"fnm"}:void 0;case"mise":return{args:["use","--",`${e.tool}@${e.version}`],bin:"mise",configChange:{file:".mise.toml",hint:`Pins ${e.tool} ${e.version}`}};case"none":return;case"nvm":return e.tool==="node"?{args:[],bin:"nvm",configChange:{file:".nvmrc",hint:"Write version to .nvmrc manually (nvm doesn't persist)."}}:void 0;case"proto":return{args:["pin",e.tool,e.version],bin:"proto",configChange:{file:".prototools",hint:`Pins ${e.tool} ${e.version}`}};case"self-activate":return{args:[],bin:e.tool,configChange:{file:"package.json",hint:`Set packageManager: "${e.tool}@${e.version}" — ${e.tool} will self-activate on next invocation`}};case"volta":return{args:["pin",`${e.tool}@${e.version}`],bin:"volta",configChange:{file:"package.json",hint:`Writes volta.${e.tool}`}};default:{const n=o;throw new Error(`Unknown manager: ${n}`)}}},he=o=>{for(const e of P[o].binaries){const n=h(e);if(n)return n}},$e=(o,e)=>{const n=P[e].binaries;if(o.installed&&o.binPath&&(o.name==="proto"||o.name==="mise"||o.name==="asdf"||o.name==="volta"||o.name==="fnm"))for(const t of n)try{const r=x(o.binPath,["which",t],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}).trim();if(r)return r}catch{}for(const t of n){const r=h(t);if(r)return r}},C=(o,e)=>{const n=`${o}.${process.pid}.${B(6).toString("hex")}.tmp`;I(n,e);try{R(n,o)}catch(t){try{U(n)}catch{}throw t}},le=(o,e)=>{if("packageManager"in o)return o.packageManager=e,o;const n={};let t=!1;for(const[r,i]of Object.entries(o))!t&&(r==="dependencies"||r==="devDependencies"||r==="peerDependencies"||r==="optionalDependencies")&&(n.packageManager=e,t=!0),n[r]=i;return t||(n.packageManager=e),n},be=(o,e)=>{if(e.tool!=="pnpm"&&e.tool!=="yarn"&&e.tool!=="npm"&&e.tool!=="bun")return;const n=v(o,"package.json");if(!m(n))throw new Error(`Cannot pin ${e.tool}: ${n} does not exist.`);const t=y(n),r=/\n([ \t]+)/.exec(t)?.[1]??" ";let i;try{i=JSON.parse(t)}catch(a){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${a.message}`,{cause:a})}const l=`${e.tool}@${e.version}`,s=le(i,l),c=t.endsWith(`
|
|
2
|
-
`)?`
|
|
3
|
-
`:"";return C(n,`${JSON.stringify(s,void 0,r)}${c}`),l},ye=(o,e)=>{const n=v(o,"package.json");if(!m(n))return;const t=y(n);let r;try{r=JSON.parse(t)}catch(s){throw new Error(`${n} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${s.message}`,{cause:s})}if(r.engines?.[e.tool]===void 0||r.engines[e.tool]===e.version)return;r.engines[e.tool]=e.version;const i=/\n([ \t]+)/.exec(t)?.[1]??" ",l=t.endsWith(`
|
|
4
|
-
`)?`
|
|
5
|
-
`:"";return C(n,`${JSON.stringify(r,void 0,i)}${l}`),e.version},ke=o=>{const e=/^([a-z][\w-]*)@(.+)$/i.exec(o.trim());if(!e)return;const n=g(e[1]);if(n)return{source:"vis.config.ts",tool:n,version:e[2]}},fe=async(o,e,n)=>{const t=ae(o,e),r=t.tools.filter(a=>!a.matches);if(r.length===0)return{attempted:[],failed:[],upToDate:!0};const i=t.detected.some(a=>a.installed);if(!(e?.autoInstall??i))return{attempted:[],failed:[],upToDate:!1};const l=[],s=[],c=new Map;for(const a of r){const p=c.get(a.manager.name);p?p.push(a):c.set(a.manager.name,[a])}for(const[a,p]of c){if(a==="self-activate"){for(const{expected:f}of p)n.info(`toolchain: ${f.tool} ${f.version} will self-activate on next ${f.tool} invocation`),l.push(f);continue}if(a==="none"){for(const{expected:f}of p)s.push({error:`no manager can install ${f.tool} — install one of ${H.join(", ")}`,spec:f});continue}if(!t.detected.find(f=>f.name===a)?.installed){for(const{expected:f}of p)s.push({error:`${a} is not on PATH`,spec:f});continue}const d=p.map(f=>({invocation:ce(a,f.expected),tool:f})).filter(f=>f.invocation!==void 0);for(const{invocation:f,tool:$}of d){const{expected:u}=$;if(f.bin==="nvm"&&f.args.length===0){const k=E(u.tool);if(k!==void 0&&N(k,u.version)){n.info(`toolchain: ${u.tool} ${k} already satisfies ${u.version}; skipping nvm shell activation`),l.push(u);continue}n.warn(`toolchain: nvm requires a shell-side activation for ${u.tool} ${u.version}. Run \`nvm install\` / \`nvm use\` manually.`),s.push({error:"nvm requires shell-side activation",spec:u});continue}n.info(`toolchain: $ ${f.bin} ${f.args.join(" ")}`);try{x(f.bin,f.args,{cwd:o,stdio:"inherit"}),l.push(u),a==="fnm"&&pe(f.bin,n)}catch(k){s.push({error:k.message,spec:u});break}}}return L(),{attempted:l,failed:s,upToDate:!1}},we=async(o,e,n,t=!1)=>{if(t)return;const r=await fe(o,e,n);for(const i of r.failed)n.warn(`toolchain: ${i.spec.tool} ${i.spec.version} — ${i.error}`)},pe=(o,e)=>{const n=process.platform==="win32"?"powershell":"bash";try{const t=x(o,["env","--shell",n],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});for(const r of t.split(/\r?\n/)){const i=r.trim();if(i==="")continue;const l=/^\$env:([A-Z_]\w*)\s*=\s*(.+)$/i.exec(i);if(l){const[,a,p]=l;process.env[a]=p.replaceAll(/^["']|["']$/g,"");continue}const s=/^set\s+"?([A-Z_]\w*)=(.*?)"?$/i.exec(i);if(s){const[,a,p]=s;process.env[a]=p;continue}const c=/^(?:export\s+)?([A-Z_]\w*)=(.+)$/i.exec(i);if(c){const[,a,p]=c;process.env[a]=p.replaceAll(/^["']|["']$/g,"")}}}catch(t){e.warn(`toolchain: could not activate fnm env (${t.message}). Subsequent tasks may use the previous Node version.`)}};export{H as S,ke as a,ce as b,ie as c,ge as d,$e as e,O as f,ae as g,he as h,de as p,we as r,ye as u,be as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as q}from"node:module";import{V as j,s as b}from"./index.server-CusjRLCh.js";import{w as T,l as A}from"./index-uBVnF4ji.js";import{g as C}from"./_commonjsHelpers-B5Y90VFO.js";import{i as g,p as c}from"../packem_chunks/cli-main.js";import{a as D}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let $;const _=e=>($??=q(import.meta.url))(e),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=e=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[s,r]=d.versions.node.split(".").map(Number);if(s>22||s===22&&r>=3||s===20&&r>=16)return d.getBuiltinModule(e)}return _(e)},{createInterface:M}=z("node:readline");var O=["aj","aju","av","avj","ejv","jav","jv"],R=["angula","angular-node","angularjs"],N=["auto-prefixer"],S=["aaxios","aios","axio","axioos","axios-node","axioss","axis","axiso","axois","axos","axxios"],B=["abel","babbel","babe","babel-js","babel-node","babl","bable","bbael","bebel"],F=["bcrpyt","bcrypt-node","brcypt","crypt","dcrypt"],P=["bcryptjs-node","dcryptjs"],W=["bunan","bunya","bunyan-node","buynan"],E=["cai","cha","chaijs","chal","chi","chia","hai"],L=["cahlk","calk","cchalk","ch4lk","cha1k","chaalk","chaik","chak","chakl","chalk-node","chalkk","challk","chhalk","chlak","chlk","halk","hcalk"],U=["cheero","cherio"],V=["c0lor","ccolor","clor","colo","coloor","color-js","colorjs","colorr","colr","coolor","coolr"],I=["ccolors","colors-node","colorss","colorz","colrs","coolors"],Y=["c0mmander","ccommander","cmmander","cmomander","co-mmander","comamnder","comander","comm4nder","commaander","commader","commadner","commamder","command3r","commandder","commande","commandeer","commander-js","commanderr","commandr","commandre","commanedr","commaner","commannder","commender","commmander","commnader","commnder","coommander","ocmmander","ommander"],G=["cor","corss","cos","cosr","cros","crs","ors"],H=["days"],J=["d3bug","dbeug","dbug","ddebug","debbug","debg","debgu","debu","debu9","debug-js","debug-node","debugg","debugjs","debuug","deebug","deubg","deug","ebug","edbug"],K=["dot-env","dotenv-node","dotenvjs","dotevn"],Q=["3lectron","eectron","eelctron","eelectron","el3ctron","elcetron","elctron","elecctron","elecron","elecrton","electon","electorn","electr0n","electrn","electrno","electro","electrom","electron-node","electronn","electroon","electrron","electtron","eleectron","eletcron","eletron","ellectron","lectron","leectron"],X=["asbuild","ebuild","esbuild-node","esbuildjs","ezbuild","sbuild"],Z=["aslint","elint","eslint-js","eslint-node","eslit","ezlint","slint"],ee=["eexpress","epress","epxress","experss","expess","exppress","expreess","expres","express-node","expressjs","expresss","exprress","exprses","exprss","exress","exrpess","exxpress","xepress","xpress"],oe=["astify"],se=["firebasejs"],re=["form1dable"],ae=["glb","glo","glob-js","globjs","gob","golb","lob"],te=["go","goot","gotjs","gott","gt","gto","ogt","ot","qot"],ne=["helmetjs","helnet"],ce=["homo","hon","hoo","hoon","ohno","ono"],ie=["inquire","inquirer-js","nquirer"],de=["iredis"],me=["ejst","est","jast","jes","jestjs","jestt","jet","jets","jst"],le=["imp","jim","jip","jmp"],pe=["ji","jio","jo","joii","jol","oi","oji"],ue=["jdom","jsdm","jsdo","jsdom-js","jsdon","jsom","sdom"],ve=["jsonwebtoken-js","jsonwebtoken-node"],he=["ka","kao","ko","koaa","koajs","koe","oa","oka"],je=["1odash","iodash","l0dash","ldash","ldoash","llodash","lo-dash","loadsh","loash","lobash","lod4sh","lodaash","lodah","lodahs","lodas","lodash-node","lodashh","lodassh","loddash","lodesh","lodsah","lodsh","loodash","odash","oldash"],be=["luca","luci","lucie"],ke=["luon","luxo","luxon-js"],ge=["imcromatch","mciromatch","micormatch","micrmoatch","micro-match","microamtch","micromacth","micromathc","micromtach","mircomatch"],fe=["minimath"],ye=["mcha","mmocha","moca","moch","mocha-js","moha","nocha","ocha"],xe=["m0ment","mment","mmoent","mmoment","moemnt","moent","mom3nt","momeent","momemt","momen","momen7","momennt","moment-js","momentjs","momentt","momet","mometn","momment","momnet","momnt","monent","mooment","oment","omment"],we=["mognoose","mogoose","mongoos","mongose","monqoose","moongoose"],qe=["moran","organ"],$e=["muler","multer-js","muter"],_e=["mysql"],ze=["ext","mext","n3xt","naxt","net","netx","nex","next-js","next-node","nextjs","nxt"],Me=["node-mailer","nodemailer-js"],Te=["nodemo","nodemonjs","nodmeon"],Ae=["oar","or","ora-node","ore","ra","roa"],Ce=["arcel","parce","parceljs"],De=["passport-js"],Oe=["phase","phaser-node"],Re=["ino","pimo","pin","pino-node","pinojs","pio","pion"],Ne=["playright","playwright-js"],Se=["postcss-js","postcss-node","potscss"],Be=["pettier","pprettier","pretier","prettierjs","prettierr","prtetier"],Fe=["prima","prism","prisma-js","prismajs","prizma"],Pe=["pupeteer"],We=["rada","rama","ramd","randa"],Ee=["eact","eract","r3act","raact","ract","raect","re4ct","reaact","reac","reac7","reacct","react-node","reactjs","reactt","reat","reatc","recat","rect","reeact","reect","rreact"],Le=["erdis","radis","rdis","redi","redis-js","redis-node","rediss","rediz","reds","reis","rredis"],Ue=["resen","rsend"],Ve=["ollup","rollup-js","rollup-node"],Ie=["ass","asss","sas","sass-node","sess","ssas","sss"],Ye=["emver","seemver","semver-node","semvre","senver","sever"],Ge=["sequelize-js","sequelize-node"],He=["harp","shap","shar","sharp-js","sharpjs"],Je=["stipe","strip","stripe-node","tripe"],Ke=["supabase-js"],Qe=["suelte","svelt3","svelte-js","sveltejs","velte"],Xe=["tailwindcss-js"],Ze=["auri","taui"],eo=["hree","htree","thee","there","three-js","three-node","tree"],oo=["stx","sx","ts","tsxx","ttsx","tx","txs","tzx"],so=["ttypescript","typecript","typescipt","typescript-node","typescriptjs","typescrit","typescritp"],ro=["udnerscore","undercore","underscoer","underscore-node","underscroe","undersocre","undesrcore"],ao=["uid","uud","uudi","uui","uuid-js","uuid-node","uuidjs","vuid"],to=["ite","vie","vit","vita","vite-node","vitee","vlte","vte"],no=["itest","uitest","vitestjs","vitezt","vittest","vtest"],co=["ue","uue","uve","ve","veu","vu","vu3","vua","vue-node","vuee","vuejs","vuue","vve","vvue"],io=["web-pack","weback","webpac","webpack-node","webpackjs","webpak","weebpack","wepack","wepback"],mo=["winson","winston-js","winstoon"],lo=["up","uyp","yp","yu","yupjs","yupp"],po=["od","zd","zdo","zo","zob","zod-js","zodjs"];const uo={ajv:O,angular:R,autoprefixer:N,"aws-sdk":["awssdk","ews-sdk"],axios:S,babel:B,bcrypt:F,bcryptjs:P,"body-parser":["body-paresr","body-parse","body-parser-js","body_parser"],bunyan:W,chai:E,chalk:L,cheerio:U,color:V,colors:I,commander:Y,"cookie-parser":["cookie-parse","cookieparser"],cors:G,"cross-env":["crossenv"],"date-fns":["data-fns","date-fn"],dayjs:H,debug:J,dotenv:K,electron:Q,esbuild:X,eslint:Z,express:ee,fastify:oe,firebase:se,formidable:re,glob:ae,got:te,helmet:ne,hono:ce,inquirer:ie,ioredis:de,jest:me,jimp:le,joi:pe,jsdom:ue,jsonwebtoken:ve,koa:he,lodash:je,lucia:be,luxon:ke,micromatch:ge,minimatch:fe,mocha:ye,moment:xe,mongoose:we,morgan:qe,multer:$e,mysql2:_e,next:ze,"node-fetch":["node-fecth","node-fethc","node.fetch"],nodemailer:Me,nodemon:Te,ora:Ae,parcel:Ce,passport:De,phaser:Oe,pino:Re,playwright:Ne,postcss:Se,prettier:Be,prisma:Fe,puppeteer:Pe,ramda:We,react:Ee,"react-dom":["eact-dom","eract-dom","r3act-dom","ract-dom","raect-dom","re4ct-dom","reaact-dom","reac-dom","reac7-dom","reacct-dom","react-bom","react-d0m","react-ddom","react-dm","react-dmo","react-do","react-domm","react-don","react-doom","react-odm","react-om","react.dom","reactdom","reactt-dom","reat-dom","reatc-dom","recat-dom","rect-dom","reeact-dom","rreact-dom"],redis:Le,resend:Ue,rollup:Ve,sass:Ie,semver:Ye,sequelize:Ge,sharp:He,"socket.io":["ocket.io","oscket.io","scket.io","scoket.io","soccket.io","socekt.io","socet.io","sock3t.io","socke.io","socke7.io","sockeet.io","socket.1o","socket.i","socket.iio","socket.ioo","socket.lo","socket.o","socket.oi","sockett.io","sockket.io","sockt.io","sockte.io","sokcet.io","soket.io","soocket.io","ssocket.io"],stripe:Je,supabase:Ke,svelte:Qe,tailwindcss:Xe,tauri:Ze,three:eo,"ts-node":["tts-node"],tsx:oo,typescript:so,underscore:ro,uuid:ao,vite:to,vitest:no,vue:co,webpack:io,winston:mo,yup:lo,zod:po};var u,k;function vo(){return k||(k=1,u={"@tanstack/start":["start-tanstack-app","tanstack","tanstack-app","tanstack-start"]}),u}var ho=vo();const jo=C(ho),bo={a:["4","e"],b:["d"],d:["b"],e:["3","a"],g:["9","q"],i:["1","l"],l:["1","i"],m:["n"],n:["m"],o:["0"],s:["5","z"],t:["7"],u:["v"],v:["u"]},ko=["app","cli","core","kit","lib","pkg","sdk"],go=e=>{const s=new Set;if(e.length<3)return s;for(let o=0;o<e.length;o++){const a=e[o],t=a==="-"||a==="."||a==="_";if(t||s.add(e.slice(0,o)+e.slice(o+1)),t||s.add(e.slice(0,o)+a+e.slice(o)),o<e.length-1&&e[o]!==e[o+1]){const p=e[o+1]==="-"||e[o+1]==="."||e[o+1]==="_";if(!t&&!p){const i=[...e];[i[o],i[o+1]]=[i[o+1],i[o]],s.add(i.join(""))}}const n=e[o].toLowerCase(),h=bo[n];if(h)for(const p of h)s.add(e.slice(0,o)+p+e.slice(o+1))}const r=/[-._]/g;if(r.test(e))s.add(e.replaceAll(r,"")),s.add(e.replaceAll(r,"-")),s.add(e.replaceAll(r,".")),s.add(e.replaceAll(r,"_"));else if(e.length>5)for(let o=2;o<e.length-2;o++)s.add(`${e.slice(0,o)}-${e.slice(o)}`),s.add(`${e.slice(0,o)}.${e.slice(o)}`),s.add(`${e.slice(0,o)}_${e.slice(o)}`);if(e.startsWith("@")||(s.add(`${e}-js`),s.add(`${e}js`),s.add(`${e}-node`)),e.startsWith("@")){const o=e.indexOf("/");if(o>1&&o<e.length-1){const a=e.slice(1,o),t=e.slice(o+1);a.length>=3&&s.add(a);for(const n of["","-",".","_"])s.add(`${a}${n}${t}`),s.add(`${t}${n}${a}`);for(const n of ko)s.add(`${a}-${n}`),s.add(`${t}-${a}-${n}`),s.add(`${n}-${a}-${t}`)}}return s.delete(e),s};let v,l,m;const f=()=>{if(!v){const e={};for(const s of[uo,jo])for(const[r,o]of Object.entries(s)){const a=e[r]??(e[r]=[]);for(const t of o)a.includes(t)||a.push(t)}v=e}return v},fo=()=>{if(!l){l=new Map;for(const[e,s]of Object.entries(f()))for(const r of s)l.set(r,e)}return l},yo=()=>{if(!m){m=new Map;for(const e of Object.keys(f()))for(const s of go(e))m.has(s)||m.set(s,e)}return m},xo=e=>e.startsWith("@")?e.split("/")[1]??e:e,wo=e=>{const s=xo(e),r=fo().get(s);if(r)return{input:e,legitimate:r,method:"blocklist"};const o=yo().get(s);if(o)return{input:e,legitimate:o,method:"heuristic"}},y=(e,s)=>{const r=s?new Set(s):void 0,o=[];for(const a of e){if(r?.has(a))continue;const t=wo(a);t&&o.push(t)}return o},x=(e,s)=>{c.warn(""),c.warn(j(`Possible typosquat${e.length===1?"":"s"} ${s}:`));for(const r of e){const o=r.method==="blocklist"?"known typosquat":"similar name";c.warn(` ${b("⚠")} ${j(r.input)} — did you mean ${b(r.legitimate)}? (${o})`)}c.warn("")},w=async e=>{if(!process.stdin.isTTY){c.warn("Aborting: potential typosquat detected in non-interactive mode. Use --no-typosquat-check to skip.");return}const s=M({input:process.stdin,output:process.stdout}),r=await new Promise(o=>{s.question(e,a=>{o(a.trim().toLowerCase())})});return s.close(),r},Oo=async(e,s)=>{if(g("typosquats"))return{ok:!0,packages:e};const r=y(e,s);if(r.length===0)return{ok:!0,packages:e};x(r,"detected");const o=await w(`Use suggested package${r.length===1?"":"s"} instead? [S]uggested / [y]es, keep original / [N]o, abort (default: N) `);if(o===void 0)return{ok:!1,packages:e};if(o==="s"||o==="suggested"){const a=new Map(r.map(t=>[t.input,t.legitimate]));return{ok:!0,packages:e.map(t=>a.get(t)??t)}}return o==="y"||o==="yes"?{ok:!0,packages:e}:{ok:!1,packages:e}},qo=/^(?:npm|pnpm|yarn):(.+?)(?:@.*)?$/,$o=e=>qo.exec(e)?.[1],_o=e=>{if(!A(e))return[];const s=D(e),r={...s.dependencies,...s.devDependencies,...s.optionalDependencies,...s.peerDependencies},o=new Set;for(const[a,t]of Object.entries(r)){o.add(a);const n=$o(t);n&&o.add(n)}return[...o]},Ro=async(e,s)=>{if(g("typosquats"))return!0;const r=T(e,"package.json"),o=_o(r);if(o.length===0)return!0;const a=y(o,s);if(a.length===0)return!0;x(a,"in package.json dependencies"),c.warn("Fix the package name in package.json before proceeding.");const t=await w("Continue anyway? [y/N] ");return t==="y"||t==="yes"};export{Oo as r,Ro as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,Y as a}from"../packem_chunks/catalog.js";import"./en-D3CfXlO7.js";const f=(s,o)=>{const t=r.useRef(null),[u,n]=r.useState(s);return r.useLayoutEffect(()=>{if(!t.current)return;const{height:e}=a(t.current);e>0&&e!==u&&(n(e),o?.(e))}),{measuredHeight:u,ref:t}};export{f as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const o=e=>e?Array.isArray(e)?e:[e]:[],a=(e,r)=>{const c=r??[];return c[0]==="--"?[...e??[]]:[...e??[],...c]},p=e=>e instanceof Error?e.message:typeof e=="string"?e:String(e),n=e=>e.replace(/^\.\//,"").replace(/\/+$/,""),t=/[\u0000-\u001F\u007F ~^:?*[\\]/g,u=e=>{const r=e.replaceAll("@{","-").replaceAll("..","-").replaceAll(t,"-").replace(/\.lock$/i,"").replace(/^[./-]+/,"").replace(/[./-]+$/,"");return r.length>0?r:"split"},l=/^(.+?)(?:@(.+))?$/,v=e=>{if(e.startsWith("@")){const c=e.indexOf("/");if(c===-1)return{name:e,versionSpec:void 0};const s=e.slice(c+1),i=s.indexOf("@");return i===-1?{name:e,versionSpec:void 0}:{name:e.slice(0,c+1+i),versionSpec:s.slice(i+1)}}const r=l.exec(e);return r?{name:r[1]??e,versionSpec:r[2]}:{name:e,versionSpec:void 0}};export{n as a,a as c,u as d,v as f,o as i,p as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{w as i,l as a,z as d,u as b}from"./index-uBVnF4ji.js";import"./public-api-WqUCiyIe.js";let h;const u=n=>(h??=g(import.meta.url))(n),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,m=n=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[s,e]=p.versions.node.split(".").map(Number);if(s>22||s===22&&e>=3||s===20&&e>=16)return p.getBuiltinModule(n)}return u(n)},{readdirSync:j}=m("node:fs"),v=[".husky/pre-commit",".vis/hooks/pre-commit",".git/hooks/pre-commit"],$=[".secretlintrc",".secretlintrc.json",".secretlintrc.js",".secretlintrc.mjs",".secretlintrc.cjs",".secretlintrc.yml",".secretlintrc.yaml"],w=[".syncpackrc",".syncpackrc.json",".syncpackrc.yaml",".syncpackrc.yml",".syncpackrc.cjs",".syncpackrc.js",".syncpackrc.mjs",".syncpackrc.ts","syncpack.config.cjs","syncpack.config.js","syncpack.config.mjs","syncpack.config.ts"],_=n=>{const s=i(n,"package.json");if(!a(s))return[];let e;try{e=JSON.parse(d(s))}catch{return[]}const o=[];if(e.scripts)for(const[t,c]of Object.entries(e.scripts))typeof c=="string"&&(/\bgitleaks\b/.test(c)&&o.push({detail:`Script "${t}" still invokes gitleaks: ${c}`,kind:"script",location:"package.json",tool:"gitleaks"}),/\bsecretlint\b/.test(c)&&o.push({detail:`Script "${t}" still invokes secretlint: ${c}`,kind:"script",location:"package.json",tool:"secretlint"}),/\bsyncpack\b/.test(c)&&o.push({detail:`Script "${t}" still invokes syncpack: ${c}`,kind:"script",location:"package.json",tool:"syncpack"}),/\bsherif\b/.test(c)&&o.push({detail:`Script "${t}" still invokes sherif: ${c}`,kind:"script",location:"package.json",tool:"sherif"}));if(e.devDependencies)for(const t of Object.keys(e.devDependencies))(t==="gitleaks"||t==="@gitleaks/cli")&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"gitleaks"}),(t==="secretlint"||t.startsWith("@secretlint/"))&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"secretlint"}),t==="syncpack"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"syncpack"}),t==="sherif"&&o.push({detail:`devDependency \`${t}\` is still installed`,kind:"devDep",location:"package.json",tool:"sherif"});return e.sherif&&o.push({detail:"`sherif` config block still present in package.json",kind:"config",location:"package.json",tool:"sherif"}),o},D=n=>{const s=[];for(const e of v){const o=i(n,e);if(!a(o))continue;const t=d(o);/\bgitleaks\b/.test(t)&&s.push({detail:"gitleaks invocation still present in hook",kind:"hook",location:e,tool:"gitleaks"}),/\bsecretlint\b/.test(t)&&s.push({detail:"secretlint invocation still present in hook",kind:"hook",location:e,tool:"secretlint"}),/\bsyncpack\b/.test(t)&&s.push({detail:"syncpack invocation still present in hook",kind:"hook",location:e,tool:"syncpack"}),/\bsherif\b/.test(t)&&s.push({detail:"sherif invocation still present in hook",kind:"hook",location:e,tool:"sherif"})}return s},S=n=>{const s=[];for(const e of $)a(i(n,e))&&s.push({detail:"secretlint config should be removed after migration",kind:"config",location:e,tool:"secretlint"});for(const e of w)a(i(n,e))&&s.push({detail:"syncpack config should be removed after migration",kind:"config",location:e,tool:"syncpack"});return s},O=[".github/workflows",".gitlab-ci.yml",".circleci/config.yml",".woodpecker.yml",".drone.yml"],q=n=>{const s=[],e=o=>{const t=i(n,o);if(!a(t))return;const c=d(t);/\bsyncpack\b/.test(c)&&s.push({detail:"syncpack invocation still present in CI",kind:"ci",location:o,tool:"syncpack"}),/\bsherif\b/.test(c)&&s.push({detail:"sherif invocation still present in CI",kind:"ci",location:o,tool:"sherif"})};for(const o of O){const t=i(n,o);if(a(t)){if(o===".github/workflows"){try{for(const c of j(t))(c.endsWith(".yml")||c.endsWith(".yaml"))&&e(`.github/workflows/${c}`)}catch{}continue}e(o)}}return s},M=n=>{const s=[],e=i(n,"pnpm-workspace.yaml");if(a(e)){let t;try{t=b(e)}catch{t=void 0}if(t&&typeof t=="object"){const c=t.catalog;c&&typeof c.syncpack=="string"&&s.push({detail:"`syncpack` still listed in pnpm-workspace.yaml#catalog",kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"});const l=t.catalogs;if(l&&typeof l=="object")for(const[k,r]of Object.entries(l))r&&typeof r.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in pnpm-workspace.yaml#catalogs.${k}`,kind:"catalog",location:"pnpm-workspace.yaml",tool:"syncpack"})}}const o=i(n,"package.json");if(a(o)){let t;try{t=JSON.parse(d(o))}catch{return s}const c=t.workspaces;if(c&&typeof c=="object"&&!Array.isArray(c)){const k=c.catalog;k&&typeof k.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#workspaces.catalog",kind:"catalog",location:"package.json",tool:"syncpack"});const r=c.catalogs;if(r&&typeof r=="object")for(const[y,f]of Object.entries(r))f&&typeof f.syncpack=="string"&&s.push({detail:`\`syncpack\` still listed in package.json#workspaces.catalogs.${y}`,kind:"catalog",location:"package.json",tool:"syncpack"})}const l=t.catalog;l&&typeof l.syncpack=="string"&&s.push({detail:"`syncpack` still listed in package.json#catalog",kind:"catalog",location:"package.json",tool:"syncpack"})}return s},N=n=>[..._(n),...D(n),...S(n),...q(n),...M(n)],W=(n,s)=>{const e=N(n);if(e.length===0)return s.info("✓ No unmigrated gitleaks/secretlint/sherif/syncpack references found."),[];s.warn(`Found ${String(e.length)} unmigrated reference(s):`);for(const o of e)s.warn(` [${o.kind}] ${o.location} — ${o.detail}`);return e};export{N as s,W as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e,m as l,i as r,r as g}from"../packem_chunks/catalog.js";import{I as ae,J as je,K as ge,M as ne}from"../packem_chunks/cli-main.js";import{Spinner as me}from"@visulima/tui-kit/spinner";import{Dialog as J}from"@visulima/tui-kit/dialog";import{ScrollView as fe}from"@visulima/tui-kit/scroll-view";import{B as ue}from"./en-D3CfXlO7.js";import{ScrollBar as ye}from"@visulima/tui-kit/scroll-bar";import{Tab as we}from"@visulima/tui-kit/tab";import{Tabs as Ce}from"@visulima/tui-kit/tabs";import{u as ke}from"./use-measured-height-CBjN0fle.js";const We=({current:a,total:t})=>{const{columns:i}=ae(),s=i||80,d=t>0?Math.min(1,a/t):0,h=`${String(Math.round(d*100)).padStart(3)}%`,f=`${String(a)}/${String(t)}`,y=Math.max(10,s-2-h.length-1),p=Math.round(y*d),j=y-p;return e.jsxs(l,{flexDirection:"column",paddingX:1,children:[e.jsxs(l,{children:[e.jsx(me,{type:"dots"}),e.jsx(r,{children:" Checking catalog dependencies "}),e.jsx(r,{dimColor:!0,children:f})]}),e.jsxs(l,{children:[e.jsx(r,{color:"cyan",children:"━".repeat(p)}),e.jsx(r,{dimColor:!0,children:"─".repeat(j)}),e.jsxs(r,{dimColor:!0,children:[" ",h]})]})]})},_=["default","name","updateType","severity"],ce=a=>{const t=a.vulnerabilities?.map(i=>i.severity)??[];return t.includes("CRITICAL")?4:t.includes("HIGH")?3:t.includes("MODERATE")?2:t.includes("LOW")?1:0},de={digest:0,major:3,minor:2,patch:1,pin:0,unknown:0},he=(a,t)=>{if(t==="default")return a;const i=[...a];return t==="name"?i.sort((s,d)=>s.packageName.localeCompare(d.packageName)):t==="updateType"?i.sort((s,d)=>(de[d.updateType]??0)-(de[s.updateType]??0)||s.packageName.localeCompare(d.packageName)):i.sort((s,d)=>ce(d)-ce(s)||s.packageName.localeCompare(d.packageName)),i},Z=a=>`${a.ecosystem}|${a.file}:${String(a.line)}|${a.name}`,A=a=>`${a.catalogName} ${a.packageName}`,Y=a=>{const t=new Map;for(const i of a){const s=t.get(i.catalogName);s?s.push(i):t.set(i.catalogName,[i])}return t},G=(a,t,i)=>{let s=a;if(t!=="all"&&(s=t==="security"?s.filter(d=>d.vulnerabilities&&d.vulnerabilities.length>0||d.socketReport&&d.socketReport.alerts.length>0):s.filter(d=>d.updateType===t)),i){const d=i.toLowerCase();s=s.filter(h=>h.packageName.toLowerCase().includes(d))}return s};class ze{#e;#l=new Set;#t;#s;#i=null;constructor(t,i=null,s=[]){this.#t=t,this.#s=s,i&&(this.#i=new Map(i.recommendations.map(d=>[d.package,d]))),this.#e={aiResult:i,allChecked:!0,applyProgress:null,checkedEcosystemKeys:new Set(s.map(d=>Z(d))),checkedEntries:new Set(t.map(d=>A(d))),ecosystemEntries:s,entries:t,error:null,filterActive:!1,filterText:"",filterType:"all",focusedPanel:"list",groupedByCatalog:Y(t),phase:"browsing",selectedIndex:0,sortMode:"default"}}getSnapshot=()=>this.#e;subscribe=t=>(this.#l.add(t),()=>{this.#l.delete(t)});getFilteredEntries(){return he(G(this.#t,this.#e.filterType,this.#e.filterText),this.#e.sortMode)}setSortMode(t){if(t===this.#e.sortMode)return;const i=this.getFilteredEntries()[this.#e.selectedIndex]?.packageName,s=he(G(this.#t,this.#e.filterType,this.#e.filterText),t),d=i?Math.max(0,s.findIndex(h=>h.packageName===i)):0;this.#r({...this.#e,selectedIndex:d,sortMode:t})}cycleSortMode(){const t=_.indexOf(this.#e.sortMode),i=_[(t+1)%_.length]??"default";this.setSortMode(i)}getRecommendation(t){return this.#i?.get(t)}getCheckedEntries(){return this.#t.filter(t=>this.#e.checkedEntries.has(A(t)))}getCheckedEcosystemEntries(){return this.#s.filter(t=>this.#e.checkedEcosystemKeys.has(Z(t)))}toggleEcosystemCheck(t){const i=new Set(this.#e.checkedEcosystemKeys);i.has(t)?i.delete(t):i.add(t),this.#r({...this.#e,checkedEcosystemKeys:i})}checkAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set(this.#s.map(t=>Z(t)))})}uncheckAllEcosystem(){this.#r({...this.#e,checkedEcosystemKeys:new Set})}setSelectedIndex(t){const i=this.getFilteredEntries(),s=Math.max(0,Math.min(t,i.length-1));s!==this.#e.selectedIndex&&this.#r({...this.#e,selectedIndex:s})}setFocusedPanel(t){t!==this.#e.focusedPanel&&this.#r({...this.#e,focusedPanel:t})}setFilterType(t){if(t!==this.#e.filterType){const i=G(this.#t,t,this.#e.filterText);this.#r({...this.#e,entries:i,filterType:t,groupedByCatalog:Y(i),selectedIndex:0})}}setFilter(t){const i=G(this.#t,this.#e.filterType,t);this.#r({...this.#e,entries:i,filterText:t,groupedByCatalog:Y(i),selectedIndex:0})}setFilterActive(t){if(t!==this.#e.filterActive)if(t)this.#r({...this.#e,filterActive:!0});else{const i=G(this.#t,this.#e.filterType,"");this.#r({...this.#e,entries:i,filterActive:!1,filterText:"",groupedByCatalog:Y(i),selectedIndex:0})}}toggleCheck(t){const i=A(t),s=new Set(this.#e.checkedEntries);s.has(i)?s.delete(i):s.add(i),this.#r({...this.#e,allChecked:s.size===this.#t.length,checkedEntries:s})}checkAll(){this.#r({...this.#e,allChecked:!0,checkedEntries:new Set(this.#t.map(t=>A(t)))})}uncheckAll(){this.#r({...this.#e,allChecked:!1,checkedEntries:new Set})}toggleAll(){this.#e.allChecked?this.uncheckAll():this.checkAll()}startApply(){const t=this.getCheckedEntries();this.#r({...this.#e,applyProgress:{current:0,total:t.length},phase:"applying"})}updateApplyProgress(t){this.#e.applyProgress&&this.#r({...this.#e,applyProgress:{...this.#e.applyProgress,current:t}})}markDone(){this.#r({...this.#e,phase:"done"})}setError(t){this.#r({...this.#e,error:t,phase:"error"})}#r(t){this.#e=t;for(const i of this.#l)try{i()}catch{}}}const be={major:"red",minor:"yellow",patch:"green"},Te={CRITICAL:"red",HIGH:"red",LOW:"gray",MODERATE:"yellow",UNKNOWN:"gray"},Se={critical:"red",high:"red",low:"gray",medium:"yellow"},Ee={critical:"red",high:"red",low:"green",medium:"yellow"},ve={defer:"gray",review:"yellow",skip:"red",update:"green"},Re=({changelogUrl:a,entry:t,focused:i,recommendation:s,scrollRef:d})=>{const h=i?"white":"gray";if(!t)return e.jsx(l,{alignItems:"center",borderColor:"gray",borderStyle:"single",flexDirection:"column",flexGrow:1,justifyContent:"center",children:e.jsx(r,{dimColor:!0,children:"No package selected"})});const f=be[t.updateType]??"white",y=t.vulnerabilities&&t.vulnerabilities.length>0,p=t.socketReport?.score.overall??0,j=t.socketReport?ue(p):"gray";return e.jsxs(l,{borderColor:h,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsx(l,{flexShrink:0,paddingTop:1,paddingX:2,children:e.jsx(r,{bold:!0,color:"white",children:t.displayName??t.packageName})}),e.jsxs(fe,{flexGrow:1,flexShrink:1,paddingX:2,ref:d,scrollbar:!0,scrollbarColor:"gray",scrollbarStyle:"block",children:[e.jsx(r,{}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Current:"})}),e.jsx(r,{children:t.currentRange})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Target:"})}),e.jsx(r,{children:t.newRange}),e.jsxs(r,{bold:!0,color:f,children:[" ","(",t.updateType,")"]})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:"Version:"})}),e.jsx(r,{children:t.targetVersion})]}),e.jsxs(l,{children:[e.jsx(l,{width:12,children:e.jsx(r,{dimColor:!0,children:t.kind==="ecosystem"?"Source:":"Catalog:"})}),e.jsx(r,{color:t.kind==="ecosystem"?"cyan":void 0,children:t.catalogName})]}),t.acceptedRisk&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{color:"gray",children:"── "}),e.jsx(r,{bold:!0,color:"gray",children:"ACKNOWLEDGED RISK"}),e.jsxs(l,{flexDirection:"column",paddingLeft:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Reason: "}),e.jsx(r,{children:t.acceptedRisk.reason})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Accepted: "}),e.jsx(r,{children:t.acceptedRisk.acceptedAt.slice(0,10)})]})]})]}),y&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"red",children:"SECURITY"}),e.jsx(r,{}),t.vulnerabilities.map(n=>e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{gap:1,children:[e.jsxs(r,{bold:!0,color:Te[n.severity]??"gray",children:["⚠"," ",n.severity]}),e.jsx(r,{bold:!0,children:n.id})]}),e.jsx(l,{paddingLeft:2,children:e.jsx(r,{children:n.summary})}),e.jsxs(l,{gap:2,paddingLeft:2,children:[n.cvssScore!==void 0&&e.jsxs(r,{dimColor:!0,children:["CVSS:",String(n.cvssScore)]}),n.fixedVersions.length>0&&e.jsxs(r,{dimColor:!0,children:["Fixed in:",n.fixedVersions.join(", ")]})]})]},n.id))]}),t.socketReport&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"cyan",children:"SOCKET.DEV"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Overall: "}),e.jsxs(r,{bold:!0,color:j,children:[String(Math.round(p*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Supply Chain: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.supplyChain*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Quality: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.quality*100)),"%"]})]})]}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Maintenance: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.maintenance*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Vulnerability: "}),e.jsxs(r,{children:[String(Math.round(t.socketReport.score.vulnerability*100)),"%"]})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"License: "}),e.jsxs(r,{children:[t.socketReport.license||"unknown"," ","(",String(Math.round(t.socketReport.score.license*100)),"%)"]})]})]}),t.socketReport.alerts.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsxs(r,{bold:!0,color:"yellow",children:["⚠"," ",String(t.socketReport.alerts.length)," ","alert",t.socketReport.alerts.length===1?"":"s",":"]}),t.socketReport.alerts.map(n=>e.jsxs(l,{gap:1,paddingLeft:2,children:[e.jsxs(r,{bold:!0,color:Se[n.severity]??"gray",children:["[",n.severity.toUpperCase(),"]"]}),e.jsx(r,{children:n.type}),e.jsxs(r,{dimColor:!0,children:["(",n.category,")"]})]},n.key))]})]}),s&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"AI ANALYSIS"}),e.jsx(r,{}),e.jsxs(l,{gap:2,children:[e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Action: "}),e.jsx(r,{bold:!0,color:ve[s.action]??"white",children:s.action})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Risk: "}),e.jsx(r,{bold:!0,color:Ee[s.riskLevel]??"white",children:s.riskLevel})]}),e.jsxs(l,{children:[e.jsx(r,{dimColor:!0,children:"Effort: "}),e.jsx(r,{bold:!0,children:s.effort})]})]}),s.reason&&e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{children:s.reason})}),s.breakingChanges.length>0&&e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[e.jsx(r,{bold:!0,color:"yellow",children:"Breaking changes:"}),s.breakingChanges.map((n,I)=>e.jsxs(r,{children:[" ","•"," ",n]},String(I)))]})]}),a&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"CHANGELOG"}),e.jsx(l,{marginTop:1,paddingLeft:2,children:e.jsx(r,{color:"cyan",underline:!0,children:a})})]}),e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"LINKS"}),e.jsx(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:t.kind==="ecosystem"?e.jsx(r,{color:"cyan",underline:!0,children:t.detailUrl??t.displayName??t.packageName}):e.jsxs(r,{color:"cyan",underline:!0,children:["https://npmx.dev/",t.packageName]})})]}),!s&&t.kind!=="ecosystem"&&e.jsxs(l,{flexDirection:"column",marginTop:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"GUIDANCE"}),e.jsxs(l,{flexDirection:"column",marginTop:1,paddingLeft:2,children:[t.updateType==="major"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"red",children:["⚠"," ","Major update — likely contains breaking changes."]}),e.jsx(r,{dimColor:!0,children:" Review the changelog before updating."}),e.jsx(r,{dimColor:!0,children:" Use --changelog to fetch release URLs."})]}),t.updateType==="minor"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"yellow",children:["ℹ"," ","Minor update — new features, backward compatible."]}),e.jsx(r,{dimColor:!0,children:" Generally safe to update."})]}),t.updateType==="patch"&&e.jsxs(e.Fragment,{children:[e.jsxs(r,{color:"green",children:["✓"," ","Patch update — bug fixes only."]}),e.jsx(r,{dimColor:!0,children:" Safe to update."})]}),!s&&e.jsx(r,{dimColor:!0,children:" Use --ai to get AI-powered analysis."})]})]})]})]})},Ae={major:"red",minor:"yellow",patch:"green"},Ie=[{id:"all",label:"All"},{id:"major",label:"Major"},{id:"minor",label:"Minor"},{id:"patch",label:"Patch"},{id:"security",label:"Security"}],De=({checked:a,entry:t,isSelected:i})=>{const s=Ae[t.updateType]??"white",d=t.vulnerabilities&&t.vulnerabilities.length>0,h=t.socketReport&&t.socketReport.alerts.length>0,f=!!t.acceptedRisk,y=a?"☑":"☐",p=t.socketReport?`${String(Math.round(t.socketReport.score.overall*100))}%`:"",j=t.socketReport?ue(t.socketReport.score.overall):"gray";return e.jsxs(l,{flexShrink:0,height:1,children:[e.jsx(r,{children:i?">":" "}),e.jsxs(r,{color:a?"white":"gray",children:[" ",y," "]}),d||h?e.jsx(r,{color:f?"gray":"red",children:f?"✓ ":"⚠ "}):e.jsx(r,{children:" "}),e.jsx(l,{flexGrow:1,children:e.jsxs(r,{bold:i,inverse:i,wrap:"truncate",children:[t.displayName??t.packageName,f?" [ack]":""]})}),p&&e.jsxs(r,{color:j,children:[" ",p]}),e.jsxs(r,{dimColor:!0,children:[" ",t.currentRange]}),e.jsxs(r,{dimColor:!0,children:[" ","→"," "]}),e.jsxs(r,{children:[t.newRange," "]}),e.jsx(r,{bold:!0,color:s,children:t.updateType})]})},Me=({count:a,ecosystem:t=!1,name:i})=>e.jsxs(l,{flexShrink:0,height:1,marginTop:1,children:[e.jsxs(r,{color:t?"cyan":void 0,dimColor:!t,children:[t?"◈":"▼"," "]}),e.jsx(r,{bold:!0,color:t?"cyan":"white",children:i.toUpperCase()}),e.jsxs(r,{dimColor:!0,children:[" ","(",a,")"]}),t&&e.jsxs(r,{color:"cyan",dimColor:!0,children:[" ","ci/cd refs"]})]}),Ne=({checkedEntries:a,entries:t,filterActive:i,filteredOutCount:s,filterText:d,filterType:h,focused:f,groupedByCatalog:y,isDryRun:p,onViewportHeightChange:j,scrollOffset:n,selectedIndex:I,totalCatalogEntries:D,totalChecked:E,totalEntries:H,viewportHeight:L})=>{const P=f?"white":"gray",{measuredHeight:m,ref:v}=ke(L,j);let F=0,S=0,M=0,R=0;for(const x of t)x.updateType==="major"?F++:x.updateType==="minor"?S++:M++,(x.vulnerabilities&&x.vulnerabilities.length>0||x.socketReport&&x.socketReport.alerts.length>0)&&R++;const C=[];F>0&&C.push(`${F} major`),S>0&&C.push(`${S} minor`),M>0&&C.push(`${M} patch`),R>0&&C.push(`${R} vulnerable`);const N=C.length>0?` (${C.join(", ")})`:"",w=t.filter(x=>x.kind==="ecosystem").length,k=t.length-w;let O=0;for(const x of t)a.has(A(x))&&O++;const U=[];let $=0;for(const[x,b]of y){U.push(e.jsx(Me,{count:b.length,ecosystem:b[0]?.kind==="ecosystem",name:x},`hdr-${x}`));for(const T of b){const W=$;U.push(e.jsx(De,{checked:a.has(A(T)),entry:T,isSelected:W===I},A(T))),$++}}let B=0;for(const[,x]of y)B+=2+x.length;const V=B>m&&m>0;return e.jsxs(l,{borderColor:P,borderStyle:"single",flexDirection:"column",flexGrow:1,children:[e.jsxs(l,{flexShrink:0,gap:1,paddingX:1,children:[e.jsx(r,{bold:!0,inverse:!0,children:" VIS "}),e.jsxs(r,{wrap:"truncate",children:[w>0?k:H,E>0?`/${E}`:""," ",w>0?"pkgs":"outdated",N,D>E?` · ${D-E} dupes`:""]}),w>0&&e.jsxs(r,{color:"cyan",children:[" ","◈",w," ","ci/cd"]}),!p&&O>0&&e.jsxs(r,{dimColor:!0,children:[" ","—",O," ","selected"]})]}),e.jsx(l,{flexShrink:0,paddingX:1,paddingY:1,children:e.jsx(Ce,{isFocused:f,keyMap:{next:[],previous:[],useNumbers:!1,useTab:!1},onChange:()=>{},showIndex:!1,value:h,children:Ie.map(({id:x,label:b})=>e.jsx(we,{name:x,children:b},x))})}),i&&e.jsxs(l,{flexShrink:0,paddingX:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/ "}),e.jsx(r,{children:d}),e.jsx(r,{inverse:!0,children:" "})]}),s>0&&e.jsx(l,{flexShrink:0,paddingX:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",s," ","package",s===1?"":"s"," ","filtered out by target constraint — press"," ",e.jsx(r,{bold:!0,color:"white",children:"f"})," ","to view"]})}),e.jsxs(l,{flexDirection:"row",flexGrow:1,overflow:"hidden",ref:v,children:[e.jsx(l,{flexDirection:"column",flexGrow:1,overflow:"hidden",paddingLeft:1,children:e.jsx(l,{flexDirection:"column",marginTop:-n,children:U})}),V&&e.jsx(l,{flexShrink:0,marginLeft:1,marginRight:1,children:e.jsx(ye,{contentHeight:B,placement:"inset",scrollOffset:n,style:"block",viewportHeight:m})})]},`list-${h}-${d}`)]})},Be=100,Le=40,Pe=10,Fe=[],K=["all","major","minor","patch","security"],Qe=({autoExitSeconds:a=0,changelogUrls:t,checkedCount:i=0,filteredOutEntries:s=Fe,isDryRun:d,store:h,totalCatalogEntries:f=0})=>{const{exit:y}=je(),{columns:p,rows:j}=ae(),n=g.useSyncExternalStore(h.subscribe,h.getSnapshot),[I,D]=g.useState(!1),[E,H]=g.useState(!1),L=g.useRef(null),P=g.useRef(null),m=g.useRef(null),v=g.useRef(null),[F,S]=g.useState(0),[M,R]=g.useState(!1),[C,N]=g.useState(!1),w=g.useMemo(()=>h.getFilteredEntries(),[n.entries,n.filterType,n.filterText,n.sortMode]),k=w[n.selectedIndex]??null,O=k?h.getRecommendation(k.packageName):void 0,U=k&&t?t.get(k.packageName):void 0,$=g.useCallback(o=>{let c=0,u=0;for(const[,Q]of n.groupedByCatalog){c+=2;for(let oe=0;oe<Q.length;oe++){if(u===o)return c;c+=1,u++}}return c},[n.groupedByCatalog]),B=Math.max(1,j-8-(n.filterActive?1:0)),[V,x]=g.useState(B),b=V>0?V:B,T=g.useCallback(o=>{const c=$(o);S(u=>c>u+b-2?Math.max(0,c-b+2):c<u+1?Math.max(0,c-1):u)},[$,b]);if(g.useEffect(()=>{m.current?.scrollToTop()},[k?.packageName]),ge((o,c)=>{if(o==="c"&&c.ctrl){y();return}if(!C){if(E){c.escape||o==="f"||o==="q"?H(!1):c.downArrow||o==="j"?P.current?.scrollBy(1):(c.upArrow||o==="k")&&P.current?.scrollBy(-1);return}if(M){o==="u"||c.return?(R(!1),h.startApply(),y(h.getCheckedEntries())):c.escape||o==="q"?R(!1):c.downArrow||o==="j"?v.current?.scrollBy(1):c.upArrow||o==="k"?v.current?.scrollBy(-1):c.pageDown?v.current?.scrollBy(5):c.pageUp&&v.current?.scrollBy(-5);return}if(I){c.escape||o==="?"?D(!1):o==="q"?(D(!1),N(!0)):c.downArrow||o==="j"?L.current?.scrollBy(1):(c.upArrow||o==="k")&&L.current?.scrollBy(-1);return}if(o==="?"){D(!0);return}if(o==="q"){N(!0);return}if(c.tab){h.setFocusedPanel(n.focusedPanel==="list"?"detail":"list");return}if(n.focusedPanel==="list"&&(c.leftArrow||c.rightArrow)){const u=K.indexOf(n.filterType),Q=c.rightArrow?(u+1)%K.length:(u-1+K.length)%K.length;S(0),m.current?.scrollToTop(),h.setFilterType(K[Q]);return}if(o==="f"&&s.length>0){H(u=>!u);return}if(n.filterActive){if(c.escape){h.setFilterActive(!1);return}if(c.return){h.setFilterActive(!1);return}if(c.backspace){S(0),h.setFilter(n.filterText.slice(0,-1));return}if(o&&!c.ctrl&&!c.meta){S(0),h.setFilter(n.filterText+o);return}return}if(n.focusedPanel==="list"){if(c.downArrow||o==="j"){const u=Math.min(n.selectedIndex+1,w.length-1);h.setSelectedIndex(u),T(u);return}if(c.upArrow||o==="k"){const u=Math.max(n.selectedIndex-1,0);h.setSelectedIndex(u),T(u);return}if(c.pageDown){const u=Math.min(n.selectedIndex+10,w.length-1);h.setSelectedIndex(u),T(u);return}if(c.pageUp){const u=Math.max(n.selectedIndex-10,0);h.setSelectedIndex(u),T(u);return}if(c.home){h.setSelectedIndex(0),S(0);return}if(c.end){const u=w.length-1;h.setSelectedIndex(u),T(u);return}if(o===" "||c.return){k&&h.toggleCheck(k);return}if(o==="a"){h.toggleAll();return}if(o==="s"){h.cycleSortMode(),T(h.getSnapshot().selectedIndex);return}if(o==="/"){h.setFilterActive(!0);return}if(o==="u"&&!d&&n.checkedEntries.size>0){R(!0);return}if(c.rightArrow){h.setFocusedPanel("detail");return}return}if(n.focusedPanel==="detail"){if(c.escape||c.leftArrow){h.setFocusedPanel("list");return}if(c.downArrow||o==="j"){m.current?.scrollBy(1);return}if(c.upArrow||o==="k"){m.current?.scrollBy(-1);return}if(c.pageDown){m.current?.scrollBy(10);return}if(c.pageUp){m.current?.scrollBy(-10);return}if(c.home){m.current?.scrollToTop();return}c.end&&m.current?.scrollToBottom()}}},{isActive:!0}),p<Le||j<Pe)return e.jsx(l,{alignItems:"center",height:j,justifyContent:"center",width:p,children:e.jsxs(r,{color:"yellow",children:["Terminal too small (",p,"x",j,")"]})});const W=p>=Be,q=[e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"q"}),e.jsx(r,{dimColor:!0,children:"QUIT"})]},"q"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"?"}),e.jsx(r,{dimColor:!0,children:"HELP"})]},"?"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"}),e.jsx(r,{dimColor:!0,children:"NAV"})]},"nav"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Space"}),e.jsx(r,{dimColor:!0,children:"CHECK"})]},"sp"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"a"}),e.jsx(r,{dimColor:!0,children:"ALL"})]},"a")];!d&&n.checkedEntries.size>0&&q.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"green",children:"u"}),e.jsx(r,{dimColor:!0,children:"APPLY"})]},"u")),s.length>0&&q.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"yellow",children:"f"}),e.jsxs(r,{dimColor:!0,children:["FILTERED (",s.length,")"]})]},"fo")),q.push(e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"←→"}),e.jsx(r,{dimColor:!0,children:"FILTER"})]},"lr"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"/"}),e.jsx(r,{dimColor:!0,children:"SEARCH"})]},"f"),e.jsxs(l,{gap:1,children:[e.jsx(r,{bold:!0,color:"white",children:"Tab"}),e.jsx(r,{dimColor:!0,children:"PANEL"})]},"t"));const ee=e.jsx(l,{borderBottom:!1,borderColor:"gray",borderLeft:!1,borderRight:!1,borderStyle:"single",flexShrink:0,children:e.jsx(l,{flexWrap:"wrap",gap:2,paddingX:1,children:q})}),re=e.jsxs(J,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"?"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:L,title:"KEYBOARD SHORTCUTS",visible:I,width:52,children:[e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"NAVIGATION"})]}),e.jsxs(l,{children:[e.jsx(l,{width:24,children:e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↑","/k"]}),e.jsx(r,{dimColor:!0,children:" Move up"})]})}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","↓","/j"]}),e.jsx(r,{dimColor:!0,children:" Move down"})]})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Tab"]}),e.jsx(r,{dimColor:!0,children:" Switch panel"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","→","/","←"]}),e.jsx(r,{dimColor:!0,children:" Focus detail/list"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"SELECTION"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","Space"]}),e.jsx(r,{dimColor:!0,children:" Toggle check on package"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","a"]}),e.jsx(r,{dimColor:!0,children:" Toggle check all"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","s"]}),e.jsx(r,{dimColor:!0,children:" Cycle sort (default / name / type / severity)"})]})]}),e.jsxs(l,{flexDirection:"column",marginBottom:1,children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"FILTERS"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","←→"]}),e.jsx(r,{dimColor:!0,children:" Switch filter tab"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","/"]}),e.jsx(r,{dimColor:!0,children:" Text filter"})]}),s.length>0&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","f"]}),e.jsx(r,{dimColor:!0,children:" View filtered-out packages"})]})]}),e.jsxs(l,{flexDirection:"column",children:[e.jsxs(l,{marginBottom:1,children:[e.jsx(r,{dimColor:!0,children:"── "}),e.jsx(r,{bold:!0,color:"white",children:"ACTIONS"})]}),!d&&e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","u"]}),e.jsx(r,{dimColor:!0,children:" Apply selected updates"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","q"]}),e.jsx(r,{dimColor:!0,children:" Quit"})]}),e.jsxs(r,{children:[e.jsxs(r,{bold:!0,color:"white",children:[" ","?"]}),e.jsx(r,{dimColor:!0,children:" Toggle help"})]})]})]}),X=h.getCheckedEntries(),z=X.filter(o=>o.updateType==="major").length,xe=e.jsxs(l,{alignItems:"center",flexDirection:"column",children:[z>0&&e.jsx(l,{marginBottom:1,marginTop:1,children:e.jsxs(r,{color:"yellow",children:["⚠"," ",z," ","major update",z===1?"":"s"," ","— review breaking changes"]})}),e.jsxs(r,{dimColor:!0,children:["Press"," ",e.jsx(r,{bold:!0,color:"white",children:"u"})," ","or"," ",e.jsx(r,{bold:!0,color:"white",children:"Enter"})," ","to confirm,"," ",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","to cancel"]})]}),te=e.jsx(J,{footer:xe,scrollRef:v,title:`Apply ${X.length} update${X.length===1?"":"s"}?`,visible:M,width:70,children:X.map(o=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",o.displayName??o.packageName]}),e.jsxs(r,{dimColor:!0,children:[o.currentRange," ","→"," ",o.newRange]}),e.jsx(r,{bold:!0,color:o.updateType==="major"?"red":o.updateType==="minor"?"yellow":"green",children:o.updateType})]},o.packageName))}),le=s.length>0?e.jsx(J,{footer:e.jsxs(r,{dimColor:!0,children:[e.jsx(r,{bold:!0,color:"white",children:"↑↓"})," ","scroll"," ",e.jsx(r,{bold:!0,color:"white",children:"f"}),"/",e.jsx(r,{bold:!0,color:"white",children:"Esc"})," ","close"]}),scrollRef:P,title:`${s.length} PACKAGE${s.length===1?"":"S"} FILTERED BY TARGET`,visible:E,width:70,children:e.jsxs(l,{flexDirection:"column",children:[e.jsx(l,{marginBottom:1,children:e.jsxs(r,{dimColor:!0,children:["These packages have newer versions available but are excluded by the current target constraint. Use"," ",e.jsx(r,{bold:!0,color:"white",children:"--target latest"})," ","to include them."]})}),s.map(o=>e.jsxs(l,{gap:1,children:[e.jsxs(r,{children:[" ",o.packageName]}),e.jsxs(r,{dimColor:!0,children:[o.currentRange," ","→"," ",o.newRange]}),e.jsx(r,{bold:!0,color:o.updateType==="major"?"red":o.updateType==="minor"?"yellow":"green",children:o.updateType})]},o.packageName))]})}):null,se=e.jsx(Ne,{checkedEntries:n.checkedEntries,entries:w,filterActive:n.filterActive,filteredOutCount:s.length,filterText:n.filterText,filterType:n.filterType,focused:n.focusedPanel==="list",groupedByCatalog:n.groupedByCatalog,isDryRun:d,onViewportHeightChange:x,scrollOffset:F,selectedIndex:n.selectedIndex,totalCatalogEntries:f,totalChecked:i,totalEntries:w.length,viewportHeight:b}),ie=e.jsx(Re,{changelogUrl:U,entry:k,focused:n.focusedPanel==="detail",recommendation:O,scrollRef:m});if(W){const o=Math.floor(p*.35);return e.jsxs(l,{flexDirection:"column",height:j,width:p,children:[e.jsxs(l,{flexDirection:"row",flexGrow:1,children:[e.jsx(l,{flexGrow:1,children:se}),e.jsx(l,{width:o,children:ie})]}),ee,te,le,e.jsx(ne,{autoExitSeconds:a||3,onCancel:()=>{N(!1)},visible:C}),re]})}const pe=Math.floor(j*.55);return e.jsxs(l,{flexDirection:"column",height:j,width:p,children:[e.jsx(l,{height:pe,children:se}),e.jsx(l,{flexGrow:1,children:ie}),ee,te,le,e.jsx(ne,{autoExitSeconds:a||3,onCancel:()=>{N(!1)},visible:C}),re]})};export{ze as U,Qe as b,Z as e,We as u};
|