@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 +1 @@
|
|
|
1
|
-
import{createRequire as
|
|
1
|
+
import{createRequire as A}from"node:module";import{J as P,F as _,X as F,r as I}from"../packem_shared/index.server-CwSgbeN7.js";import{e as q}from"../packem_shared/index-DHD8wb6Z.js";import{c as b,p,O as N}from"./cli-main.js";import{c as B,h as z,d as H,r as U,x as W}from"./catalog.js";import{a as G,c as V,n as X}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as Y,a as J}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as j,a as K,p as Q,b as Z}from"../packem_shared/resolve-explicit-COmP7eqr.js";import{D as ee,e as y,f as te,h as S,i as re,j as se,s as ne}from"../packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js";import{r as oe}from"../packem_shared/typosquats-D8ppc5kr.js";import{p as R,t as C}from"../packem_shared/utils-DQFHJn72.js";import{p as ae}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";import{T as ce}from"../packem_shared/target-merge-D1xbylFw.js";let L;const T=r=>(L??=A(import.meta.url))(r),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=r=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[i,e]=w.versions.node.split(".").map(Number);if(i>22||i===22&&e>=3||i===20&&e>=16)return w.getBuiltinModule(r)}return T(r)},{createInterface:O}=M("node:readline"),x=r=>r==="default"?"catalog:":`catalog:${r}`,v=r=>r==="default"?"default catalog":`catalog "${r}"`,ie=(r,i)=>{const e=[];for(const[t,s]of i)t.includes(":")||s.has(r)&&e.push(t);if(e.length===0)return;if(e.length===1){const[t]=e;return{source:v(t),spec:x(t)}}const o=e.find(t=>t==="default")??e[0],a=e.filter(t=>t!==o);return{candidates:[...e],conflict:!0,source:`${v(o)} (also in: ${a.map(t=>v(t)).join(", ")})`,spec:x(o)}},le=(r,i)=>{const e=new Map;for(const[c,u]of i){if(!c.includes(":"))continue;const f=u.get(r);f!==void 0&&e.set(f,(e.get(f)??0)+1)}if(e.size===0)return;const o=[...e.entries()],a=o.reduce((c,[,u])=>c+u,0);if(o.length===1){const[[c]]=o;return{source:`siblings (${String(a)} pkg${a===1?"":"s"} on ${c})`,spec:c}}const t=[...o].sort((c,u)=>u[1]-c[1]),[s,n]=t[0],l=t.slice(1).map(([c,u])=>`${c} (×${String(u)})`);return{candidates:t.map(([c])=>c),conflict:!0,source:`siblings (most common: ${s} ×${String(n)}; conflicts: ${l.join(", ")})`,spec:s}},fe=(r,i)=>{const e=ie(r,i);return e||le(r,i)},pe=(r,i,e)=>{const o=[];for(const a of r.values()){const{overall:t}=a.score,s=ne(t),n=`${String(Math.round(t*100))}%`,l=a.alerts.length,c=y(a),u=te(c,a.version,e),f=s==="red"?F:s==="yellow"?I:P;if(u?p.info(` ${f(n)} ${S(a)} ${_(`[accepted: ${u.reason}]`)}`):p.info(` ${f(n)} ${S(a)}`),l>0){const m=a.alerts.filter(d=>d.severity==="critical"||d.severity==="high").length;m>0&&p.warn(` ${String(m)} critical/high alert${m===1?"":"s"}`)}t<i&&!u&&o.push(a)}return o},ue=async(r,i)=>{const e=O({input:process.stdin,output:process.stdout}),o=n=>new Promise(l=>{e.question(n,c=>{l(c.trim())})}),a=String(Math.round(i*100));p.warn(""),p.warn(`${String(r.length)} package${r.length===1?"":"s"} scored below the minimum threshold (${a}%):`);for(const n of r){const l=y(n),c=`${String(Math.round(n.score.overall*100))}%`;p.warn(` • ${l}@${n.version} — score: ${c} (${re(n.score.overall)})`)}p.warn("");const t=await o("Continue adding these packages? [y/N] ");if(t.toLowerCase()!=="y"&&t.toLowerCase()!=="yes")return e.close(),!1;const s=await o("Remember this decision? (prints config snippet) [y/N] ");if(e.close(),s.toLowerCase()==="y"||s.toLowerCase()==="yes"){p.notice(""),p.notice("Add the following to security.acceptedRisks in vis.config.ts:"),p.notice("");for(const n of r){const l=y(n),c=se(l,n.version,n.score.overall,"Reviewed and accepted");p.notice(c)}p.notice("")}return!0},de=async(r,i,e,o)=>{const a=await j(r);if(a.length===0)return!0;p.info(""),p.info(`${i.map(n=>n.displayName).join(" + ")} security check:`);const t=await z(i,a);if(t.size===0)return p.info(" Could not fetch security data. Proceeding."),!0;const s=pe(t,e,o);return s.length===0?(p.info(""),!0):process.stdin.isTTY?ue(s,e):(p.warn(`Aborting: ${String(s.length)} package${s.length===1?"":"s"} below minimum score. Use --no-socket-check to skip.`),!1)},me=["dependencies","devDependencies","peerDependencies","optionalDependencies"],ge=r=>r.savePeer?"peerDependencies":r.saveOptional?"optionalDependencies":r.saveDev?"devDependencies":"dependencies",D=(r,i)=>r.startsWith("catalog:")||!i?r:r.replace(/^[\^~]/,""),he=async(r,i)=>{const e=[];for(const t of r){const{name:s,versionSpec:n}=R(t);if(!s)continue;if(n!==void 0){e.push({explicit:n,name:s});continue}const l=fe(s,i);if(l){l.conflict&&p.warn(`${s}: ambiguous constraint — picking ${l.spec} (${l.source}). Pass ${s}@<version> to override.`),e.push({entry:{name:s,source:l.source,spec:l.spec},kind:"resolved",name:s});continue}e.push({kind:"missing",name:s})}const o=e.filter(t=>"kind"in t&&t.kind==="missing").map(t=>t.name),a=o.length>0?await Z(o):new Map;return e.map(t=>{if("explicit"in t)return{name:t.name,source:"explicit",spec:t.explicit};if(t.kind==="resolved")return t.entry;const s=a.get(t.name);if(s===void 0)throw new Error(`--to: cannot resolve a version for "${t.name}" (not in any catalog or sibling, and registry lookup failed). Pass ${t.name}@<version> explicitly.`);const n=`^${s}`;return p.info(`${t.name}: no existing constraint — using registry latest (${n}). Add to a catalog to share this version across workspace packages.`),{name:t.name,source:"registry latest",spec:n}})},ke=(r,i,e,o)=>{for(const{name:a,spec:t}of i){const s=D(t,o);for(const l of me){if(l===e)continue;const c=r[l];c?.[a]!==void 0&&(delete c[a],Object.keys(c).length===0&&delete r[l])}let n=r[e];n===void 0&&(n={},r[e]=n),n[a]=s}},we=async({ignoreScripts:r,logger:i,options:e,packages:o,pm:a,target:t,visConfig:s,workspaceRoot:n})=>{const{workspace:l}=H(n,s??{}),c=l.projects[t];if(!c){const g=Object.keys(l.projects).sort();throw new Error(`--to: workspace package "${t}" not found. Available: ${g.length>0?g.slice(0,10).join(", "):"(none)"}${g.length>10?`, ... (${String(g.length-10)} more)`:""}.`)}const u=q(n,c.root,"package.json"),{packageManager:f}=N(n),m=U(n,f),d=ge(e),k=e.exact??!1,h=await he(o,m);if(h.length===0)return 0;const $=ae(u);ke($,h,d,k),ce(u,$,{indent:W(u,{useEditorconfig:s?.editorconfig??!0}),overwrite:!0});for(const g of h){const E=D(g.spec,k);p.info(`${P("+")} ${g.name}@${E} → ${t}/${d} (${_(g.source)})`)}return X(a,{dev:!1,filter:[],force:!1,frozenLockfile:!1,ignoreScripts:r,lockfileOnly:!1,noOptional:!1,offline:!1,prod:!1,recursive:!1,silent:!1,workspaceRoot:!1},n,i)},Ae=async({argument:r,logger:i,options:e,visConfig:o,workspaceRoot:a})=>{let t=r;if(!t||t.length===0)throw new Error("No packages specified. Usage: vis add <packages...>");if(e.typosquatCheck!==!1){const f=t.map(d=>R(d)),m=await oe(f.map(d=>d.name),o?.security?.typosquatAllowlist);if(!m.ok){process.exitCode=1;return}t=f.map((d,k)=>{const h=m.packages[k];return h!==d.name?d.versionSpec?`${h}@${d.versionSpec}`:h??"":t[k]??""})}if(e.marshallCheck!==!1){const f=await j(t);if(f.length>0){const m=await K(f,{config:o?.security?.marshalls,workspaceRoot:a});if(!await Q(m)){process.exitCode=1;return}}}if(e.socketCheck!==!1){const f=new Set;b("socket")&&f.add("socket"),b("depsDev")&&f.add("deps-dev");const m=B(o?.security,{disabled:f,minimumScore:o?.security?.policies?.score?.minimum});if(m.length>0){const d=o?.security?.policies?.score?.minimum??ee;if(!await de(t,m,d,o?.security?.acceptedRisks)){process.exitCode=1;return}}}const s=process.cwd(),n=Y({logger:i,options:e,visConfig:o},a??s),l=G(a??s,{backend:J(n),configBackend:o?.install?.backend,configCorepack:o?.install?.corepack}),c=!e.runScripts;if(e.to){if(e.global||e.workspaceRoot)throw new Error("--to is incompatible with --global / --workspace-root.");if(e.filter&&C(e.filter).length>0)throw new Error("--to and --filter are mutually exclusive — --to already targets one package.");if(!a)throw new Error("--to requires a monorepo workspace. Run from inside a pnpm/bun/yarn/npm workspace.");const f=await we({ignoreScripts:c,logger:i,options:e,packages:t,pm:l,target:e.to,visConfig:o,workspaceRoot:a});f!==0&&(process.exitCode=f);return}const u=V(l,{exact:e.exact||!1,filter:C(e.filter),global:e.global||!1,optional:e.saveOptional||!1,packages:t,peer:e.savePeer||!1,saveDev:e.saveDev||!1,workspace:e.workspace||!1,workspaceRoot:e.workspaceRoot||!1},s,i,{autoInstallPeers:e.autoInstallPeers||!1,ignoreScripts:c});u!==0&&(process.exitCode=u)};export{Ae as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as m,i}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as p,a as k}from"../packem_shared/command-runtime-CiLVo4ED.js";const w=async({argument:o,logger:a,options:t,visConfig:e,workspaceRoot:s})=>{const r=o?.[0]??null,c=s??process.cwd(),l=p({logger:a,options:t,visConfig:e},c),d=m(c,{backend:k(l),configBackend:e?.install?.backend,configCorepack:e?.install?.corepack}),n=i(d,r,c,a);n!==0&&(process.exitCode=n)};export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as w,j as b}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as f,a as h}from"../packem_shared/command-runtime-CiLVo4ED.js";const R=async({argument:r,logger:c,options:i,rawUnknown:l,visConfig:o,workspaceRoot:d})=>{const e=r;if(!e||e.length===0)throw new Error("No subcommand specified. Available: cache, publish, audit, list, view, config, whoami, login, logout, pack, owner, dist-tag, search, fund, ping, token, deprecate, rebuild, prune, plugin");const[m,...s]=e,t=l??[],p=t[0]==="--"?s:[...s,...t],n=d??process.cwd(),u=f({logger:c,options:i,visConfig:o},n),k=w(n,{backend:h(u),configBackend:o?.install?.backend,configCorepack:o?.install?.corepack}),a=b(k,m,p,n,c);a!==0&&(process.exitCode=a)};export{R as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as d,k as f}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as i,a as p}from"../packem_shared/command-runtime-CiLVo4ED.js";import{m as v,t as g}from"../packem_shared/utils-DQFHJn72.js";const R=async({argument:l,logger:s,options:e,rawUnknown:n,visConfig:a,workspaceRoot:c})=>{const o=v(l,n);if(o.length===0)throw new Error("No packages specified. Usage: vis remove <packages...>");const r=process.cwd(),m=i({logger:s,options:e,visConfig:a},c??r),k=d(c??r,{backend:p(m),configBackend:a?.install?.backend,configCorepack:a?.install?.corepack}),t=f(k,{filter:g(e.filter),global:e.global||!1,packages:o,recursive:e.recursive||!1,saveDev:e.saveDev||!1,workspaceRoot:e.workspaceRoot||!1},r,s);t!==0&&(process.exitCode=t)};export{R as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{readLastRunSummary as
|
|
2
|
-
`)},
|
|
3
|
-
`),process.exitCode=1;return}
|
|
4
|
-
`),process.exitCode=1;return}
|
|
5
|
-
`);return}if(o!==void 0){
|
|
1
|
+
import{readLastRunSummary as S,getLastRunSummaryPath as I}from"@visulima/task-runner";import{p as f,l as x,d as w}from"./cli-main.js";import{c as $,d as m}from"../packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js";const T=new Set(["json","table"]),k=(t,e)=>t??e,h=t=>t===void 0?"-":t<1e3?`${String(t)}ms`:`${(t/1e3).toFixed(2)}s`,p=t=>t.exitCode===void 0?t.cacheStatus:t.exitCode===0?t.cacheStatus==="MISS"?"OK":t.cacheStatus:`FAIL(${String(t.exitCode)})`,s=(t,e)=>t.length>=e?t:t+" ".repeat(e-t.length),v=t=>t.exitCode!==void 0&&t.exitCode!==0,l=(t,e)=>{e.info(`Run ${t.id}`),e.info(` start: ${t.startTime}`),e.info(` end: ${t.endTime}`),e.info(` duration: ${h(t.duration)}`),e.info(` totals: ${String(t.stats.total)} total · ${String(t.stats.succeeded)} ok · ${String(t.stats.cached)} cached · ${String(t.stats.skipped)} skipped · ${String(t.stats.failed)} failed`),e.info(` env: node ${t.environment.nodeVersion} · ${t.environment.platform}/${t.environment.arch}`),e.info("")},C=(t,e)=>{if(t.length===0){e.info("(no tasks match the current filter)");return}const i=t.map(n=>({duration:h(n.duration),hash:n.hash?n.hash.slice(0,12):"-",status:p(n),taskId:n.taskId})),a={duration:Math.max(8,...i.map(n=>n.duration.length)),hash:Math.max(4,...i.map(n=>n.hash.length)),status:Math.max(6,...i.map(n=>n.status.length)),taskId:Math.max(4,...i.map(n=>n.taskId.length))};e.info(` ${s("task",a.taskId)} ${s("status",a.status)} ${s("duration",a.duration)} ${s("hash",a.hash)}`),e.info(` ${"-".repeat(a.taskId)} ${"-".repeat(a.status)} ${"-".repeat(a.duration)} ${"-".repeat(a.hash)}`);for(const n of i)e.info(` ${s(n.taskId,a.taskId)} ${s(n.status,a.status)} ${s(n.duration,a.duration)} ${s(n.hash,a.hash)}`)},R=(t,e,i)=>{l(t,i),i.info(`Task ${e.taskId}`),i.info(` status: ${p(e)}`),i.info(` cache: ${e.cacheStatus}`),i.info(` duration: ${h(e.duration)}`),i.info(` exit: ${e.exitCode===void 0?"-":String(e.exitCode)}`),i.info(` hash: ${e.hash??"(none)"}`),i.info(` start: ${e.startTime??"-"}`),i.info(` end: ${e.endTime??"-"}`),e.dependencies.length>0&&i.info(` deps: ${e.dependencies.join(", ")}`),i.info(""),f.info(`Drill into hash inputs with: vis cache why ${e.taskId} --run ${t.id}`)},D=t=>{process.stdout.write(`${JSON.stringify(t.map(e=>({id:e.id,mtime:new Date(e.mtimeMs).toISOString(),path:e.path})),void 0,2)}
|
|
2
|
+
`)},M=(t,e,i)=>{if(t.length===0){f.info(`No recorded runs found in ${m(e)}/. Run with --summarize to record a run.`);return}const a={id:Math.max(2,...t.map(n=>n.id.length)),mtime:24};i.info(` ${s("id",a.id)} ${s("mtime",a.mtime)}`),i.info(` ${"-".repeat(a.id)} ${"-".repeat(a.mtime)}`);for(const n of t)i.info(` ${s(n.id,a.id)} ${new Date(n.mtimeMs).toISOString()}`)},O=(t,e)=>{let{tasks:i}=t;return e.task!==void 0&&(i=i.filter(a=>a.taskId===e.task)),e.failed&&(i=i.filter(a=>v(a))),i},j=async(t,e)=>{const{failed:i,format:a,runId:n,task:o,workspaceRoot:d}=t,r=n===void 0?await S(d,{dataDirectory:$(d)}):await w(d,n);if(!r){if(a==="json"){process.stdout.write(`${JSON.stringify({error:"no-summary",runId:n??null},void 0,2)}
|
|
3
|
+
`),process.exitCode=1;return}n===void 0?f.error(`No previous run summary found. Run a task first to populate \`${I(d,{dataDirectory:$(d)})}\`.`):f.error(`Run summary "${n}" not found in ${m(d)}/.`),process.exitCode=1;return}const c=O(r,{failed:i,task:o});if(o!==void 0&&c.length===0){if(a==="json"){process.stdout.write(`${JSON.stringify({error:"task-not-in-summary",runId:r.id,taskId:o},void 0,2)}
|
|
4
|
+
`),process.exitCode=1;return}f.error(`Task "${o}" was not part of run ${r.id}.`),process.exitCode=1;return}if(r.stats.failed>0&&(process.exitCode=1),a==="json"){process.stdout.write(`${JSON.stringify({duration:r.duration,endTime:r.endTime,environment:r.environment,runId:r.id,startTime:r.startTime,stats:r.stats,tasks:c.map(u=>({cacheStatus:u.cacheStatus,dependencies:u.dependencies,duration:u.duration,endTime:u.endTime,exitCode:u.exitCode,hash:u.hash??null,startTime:u.startTime,taskId:u.taskId}))},void 0,2)}
|
|
5
|
+
`);return}if(o!==void 0){R(r,c[0],e);return}l(r,e),C(c,e)},b=async({logger:t,options:e,process:i,workspaceRoot:a})=>{const n=k(a,i.cwd),o=e.format??"table";if(!T.has(o)){f.error(`Invalid --format: ${o}. Expected "table" or "json".`),process.exitCode=1;return}if(e.list===!0){const d=await x(n);if(o==="json"){D(d);return}M(d,n,t);return}await j({failed:e.failed===!0,format:o,runId:e.run,task:e.task,workspaceRoot:n},t)};export{b as default,b as replayExecute,j as runReplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createTaskGraph as $}from"@visulima/task-runner";import{
|
|
1
|
+
import{createTaskGraph as $}from"@visulima/task-runner";import{d as b,b as O}from"./catalog.js";import{f as P}from"../packem_shared/project-name-filter-BeREbPMI.js";import{r as S,f as E,a as G}from"../packem_shared/selectors-B7lSFz7l.js";const T=(l,s,t)=>{const a=[],e=new Set,n=(r,u)=>{if(e.has(r))return;e.add(r);const m=s[r]??[];for(const d of m)n(d,u+1);const o=t[r],h=" ".repeat(u);a.push(`${h}${r}${o?.cache===!1?" (no-cache)":""}`)};for(const r of l)n(r,0);return a},x=(l,s,t)=>({roots:l,tasks:Object.fromEntries(Object.entries(t).map(([a,e])=>[a,{cache:e.cache,dependsOn:s[a]??[],outputs:e.outputs,parallelism:e.parallelism,projectRoot:e.projectRoot,target:e.target}]))}),C=async({argument:l,logger:s,options:t,process:a,visConfig:e,workspaceRoot:n})=>{const r=l[0];if(!r)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!n)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:u,packageJsons:m,workspace:o}=b(n,e),h=O(n,o,m),d=await S(r,o,a.cwd,n),{target:f}=d;let i=d.projects;t.projects!==void 0&&(i=P(i,String(t.projects),Object.keys(o.projects))),t.query&&(i=E(i,o,t.query)),i=G(i,o,t.tag);const k=i.filter(p=>o.projects[p]?.targets?.[f]!==void 0);if(k.length===0){s.info(`No projects have a "${f}" target.`);return}const y=k.map(p=>{const g=o.projects[p],j=g.targets?.[f],v={project:p,target:f};return{cache:j?.cache,id:`${p}:${f}`,outputs:j?.outputs??[],overrides:{command:j?.command},parallelism:j?.parallelism,projectRoot:g.root,target:v}}),c=$(y,{projectGraph:h,targetDefaults:u.tasks,workspace:o});if(t.json){s.info(JSON.stringify(x(c.roots,c.dependencies,c.tasks),null,2));return}const w=T(c.roots,c.dependencies,c.tasks);s.info(`Execution plan (${Object.keys(c.tasks).length} task(s), ${c.roots.length} root(s)):`),s.info("");for(const p of w)s.info(p)};export{C as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,m=e.output??(
|
|
1
|
+
import{U as k,m as j}from"../packem_shared/index-DHD8wb6Z.js";import{d as B,b as $}from"./catalog.js";import{p}from"./cli-main.js";import{b as g,s as v}from"../packem_shared/cyclonedx-C_ezHg8b.js";import{h as y}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";const d=["json","xml"],C=s=>d.includes(s),M=async({fs:s,options:e,visConfig:l,workspaceRoot:o})=>{if(!o)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:u,workspace:c}=B(o,l),f=$(o,c,u),i=e.focus,w=i?i.split(",").map(h=>h.trim()).filter(Boolean):void 0,t=(e.format??"json").toLowerCase();if(!C(t))throw new Error(`Unknown --format: "${t}". Expected one of: ${d.join(", ")}.`);const n=g({focus:w,includeDev:!!e.includeDev,projectGraph:f,workspace:c,workspaceRoot:o}),a=t==="xml"?v(n):`${JSON.stringify(n,void 0,2)}
|
|
2
|
+
`,m=e.output??(t==="xml"?"sbom.cdx.xml":"sbom.cdx.json");if(m==="-"){process.stdout.write(a);return}const r=k(o,m);y(j(r)),await s.writeFile(r,a,"utf8");const x=n.components?.length??0,b=n.dependencies?.length??0;p.success(`SBOM written to ${r}`),p.notice(`${x} components, ${b} dependency edges`)};export{M as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
`);return}if(t.length===0){c.info("No running services registered for this workspace.");return}const
|
|
1
|
+
import{createRequire as C}from"node:module";import"../packem_shared/index-DHD8wb6Z.js";import{w as A,d as I}from"./catalog.js";import{p as c,h as N}from"./cli-main.js";import{p as L,i as R,r as v,g as H,s as M,a as b,S as W,b as O,c as P,d as U,e as D}from"../packem_shared/lifecycle-CfTZQHOG.js";import{r as q,l as z}from"../packem_shared/target-options-d_rIrLyq.js";let T;const _=s=>(T??=C(import.meta.url))(s),w=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,j=s=>{if(typeof w<"u"&&w.versions&&w.versions.node){const[e,r]=w.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return w.getBuiltinModule(s)}return _(s)},{open:E,stat:$,watch:F}=j("node:fs/promises"),h=async s=>{const e=s?.plugins;if(!e||e.length===0)return;const r=U();return await D(r,e),{callHook:async(d,...o)=>{try{await r.callHook(d,...o)}catch(t){const a=t instanceof Error?t.message:String(t);c.warn(`Plugin error in ${d}: ${a}`)}}}},V=s=>{const e=s.trim(),r=e.lastIndexOf(":");if(!(r<=0||r===e.length-1))return{project:e.slice(0,r),target:e.slice(r+1)}},y=async(s,e,r)=>{const d=V(r);if(!d){c.error(`Invalid target id "${r}". Expected "<project>:<target>", e.g. "@my/api:db".`);return}const o=await A(s),{projectOptions:t,workspace:a}=I(s,e,o),i=a.projects[d.project],n=t.get(d.project)?.[d.target];if(!i||!n){c.error(`Target "${r}" not found in this workspace.`);return}const p=n.options?.service;if(!p){c.error(`Target "${r}" is not a service. Add an \`options.service\` block to make it eligible for \`vis service\`.`);return}if(!n.command){c.error(`Target "${r}" has no command — services must be runnable.`);return}const g=q(s,i.root,n.options?.runFromWorkspaceRoot===!0),u=n.options?.envFile?z(g,n.options.envFile):{};return{command:n.command,cwd:g,env:{...u,...p.env},service:p,target:n,targetId:r}},m=s=>{if(!s)throw new Error("Could not determine workspace root. Run `vis service` inside a workspace.");return s},re=async({argument:s,options:e,visConfig:r,workspaceRoot:d})=>{const o=m(d),t=s[0]?.trim();if(!t){c.error("Missing target id. Usage: vis service start <project>:<target>"),process.exitCode=1;return}const a=await y(o,r,t);if(!a){process.exitCode=1;return}try{const{entry:i}=await b({command:a.command,config:a.service,cwd:a.cwd,env:a.env,id:t,readinessTimeoutMs:e.timeout,skipReadiness:e.readiness===!1,workspaceRoot:o});await(await h(r))?.callHook("service:start",i),c.success(`Started ${t} (pid ${String(i.pid)})`),c.info(` log: ${i.logFile}`)}catch(i){const n=i instanceof Error?i.message:String(i);i instanceof W?c.error(`Readiness probe failed for ${t}: ${n}`):c.error(`Failed to start ${t}: ${n}`),process.exitCode=1}},S=async({graceMs:s,hookSink:e,id:r,workspaceRoot:d})=>{const o=await v(d,r),{stopped:t}=await M({graceMs:s,id:r,workspaceRoot:d});return t?(o&&await e?.callHook("service:stop",o),c.success(`Stopped ${r}`),!0):(c.info(`No running service registered for ${r}`),!1)},se=async({argument:s,options:e,visConfig:r,workspaceRoot:d})=>{const o=m(d),{graceMs:t}=e,a=s[0]?.trim(),i=await h(r);if(e.all===!0){if(a){c.error("Cannot combine --all with a target id. Use one or the other."),process.exitCode=1;return}const p=await P(o);if(p.length===0){c.info("No running services registered for this workspace.");return}for(const g of p)await S({graceMs:t,hookSink:i,id:g.id,workspaceRoot:o});return}if(!a){c.error("Missing target id. Usage: vis service stop <project>:<target> | --all"),process.exitCode=1;return}await S({graceMs:t,hookSink:i,id:a,workspaceRoot:o})||(process.exitCode=1)},B=s=>{const e=s.config.readiness?.tcp.port??s.config.port;return e===void 0?"—":String(e)},x=new Set(["json","table"]),oe=async({logger:s,options:e,workspaceRoot:r})=>{const d=m(r),o=e.format??"table";if(!x.has(o)){c.error(`Invalid --format "${o}". Expected one of: ${[...x].sort().join(", ")}.`),process.exitCode=1;return}const{surviving:t}=await L(d);if(o==="json"){const l=Date.now();process.stdout.write(`${JSON.stringify(t.map(f=>{const k=Date.parse(f.startedAt);return{ageMs:Number.isFinite(k)?l-k:null,alive:R(f.pid),command:f.command,cwd:f.cwd,env:f.env,id:f.id,logFile:f.logFile,pid:f.pid,port:f.config.readiness?.tcp.port??f.config.port??null,startedAt:f.startedAt,visVersion:f.visVersion}}),void 0,2)}
|
|
2
|
+
`);return}if(t.length===0){c.info("No running services registered for this workspace.");return}const a=Date.now(),i=t.map(l=>{const f=Date.parse(l.startedAt);return{age:Number.isFinite(f)?N(f,a):"?",id:l.id,log:l.logFile,pid:String(l.pid),port:B(l)}}),n=Math.max(2,...i.map(l=>l.id.length)),p=Math.max(3,...i.map(l=>l.pid.length)),g=Math.max(4,...i.map(l=>l.port.length)),u=Math.max(3,...i.map(l=>l.age.length));s.info(` ${"id".padEnd(n)} ${"pid".padEnd(p)} ${"port".padEnd(g)} ${"age".padEnd(u)} log`),s.info(` ${"-".repeat(n)} ${"-".repeat(p)} ${"-".repeat(g)} ${"-".repeat(u)} ---`);for(const l of i)s.info(` ${l.id.padEnd(n)} ${l.pid.padEnd(p)} ${l.port.padEnd(g)} ${l.age.padEnd(u)} ${l.log}`)},ie=async({argument:s,options:e,workspaceRoot:r})=>{const d=m(r),o=s[0]?.trim();if(!o){c.error("Missing target id. Usage: vis service status <project>:<target>"),process.exitCode=1;return}const t=await v(d,o);if(!t){c.error(`No service registered for ${o}.`),process.exitCode=1;return}if(!R(t.pid)){c.error(`Service ${o} is not running (pid ${String(t.pid)} is dead). Run \`vis service start ${o}\` to recover.`),process.exitCode=1;return}try{await O(t.config,{timeoutMs:e.timeout}),c.success(`${o} healthy (pid ${String(t.pid)})`)}catch(a){const i=a instanceof Error?a.message:String(a);c.error(`${o} probe failed: ${i}`),process.exitCode=1}},ae=async({argument:s,options:e,visConfig:r,workspaceRoot:d})=>{const o=m(d),t=s[0]?.trim();if(!t){c.error("Missing target id. Usage: vis service restart <project>:<target>"),process.exitCode=1;return}const a=await h(r),i=await v(o,t);(await M({graceMs:e.graceMs,id:t,workspaceRoot:o})).stopped&&i&&await a?.callHook("service:stop",i);const p=await y(o,r,t);if(!p){process.exitCode=1;return}try{const{entry:g}=await b({command:p.command,config:p.service,cwd:p.cwd,env:p.env,id:t,readinessTimeoutMs:e.timeout,skipReadiness:e.readiness===!1,workspaceRoot:o});await a?.callHook("service:start",g),c.success(`Restarted ${t} (pid ${String(g.pid)})`)}catch(g){const u=g instanceof Error?g.message:String(g);c.error(`Failed to restart ${t}: ${u}`),process.exitCode=1}},G=200,J=1024*1024,K=async s=>{let e=0;try{e=(await $(s)).size}catch{e=0}const r=new AbortController;let d=!1;const o=()=>{d=!0,r.abort()},t=()=>{r.abort()};process.on("SIGINT",o),process.on("SIGTERM",t);let a=!1;const i=async()=>{if(!a){a=!0;try{const n=await $(s).catch(()=>{});if(!n||(n.size<e&&(e=0),n.size===e))return;const p=n.size-e,g=Math.min(p,J),u=await E(s,"r");try{const l=Buffer.alloc(g);await u.read(l,0,g,e),process.stdout.write(l),e+=g}finally{await u.close().catch(()=>{})}}finally{a=!1}}};try{const n=(async()=>{try{const p=F(s,{signal:r.signal});for(;!(await p.next()).done;)await i()}catch{}})();for(;!r.signal.aborted;)await i(),await new Promise(p=>{const g=setTimeout(p,G);r.signal.addEventListener("abort",()=>{clearTimeout(g),p()},{once:!0})});await n.catch(()=>{}),await i().catch(()=>{})}finally{process.off("SIGINT",o),process.off("SIGTERM",t)}d&&(process.exitCode=130)},ne=async({argument:s,options:e,workspaceRoot:r})=>{const d=m(r),o=s[0]?.trim();if(!o){c.error("Missing target id. Usage: vis service logs <project>:<target>"),process.exitCode=1;return}const t=await v(d,o);if(!t){c.error(`No service registered for ${o}.`),process.exitCode=1;return}if(!await H(t.logFile)){c.warn(`Log file is missing for ${o}: ${t.logFile}`),process.exitCode=1;return}if(e.follow===!0){await K(t.logFile);return}const a=await E(t.logFile,"r");try{const i=a.createReadStream();await new Promise((n,p)=>{i.on("end",n),i.on("error",p),i.pipe(process.stdout,{end:!1})})}finally{await a.close().catch(()=>{})}};export{oe as serviceListExecute,ne as serviceLogsExecute,ae as serviceRestartExecute,re as serviceStartExecute,ie as serviceStatusExecute,se as serviceStopExecute};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
"${
|
|
1
|
+
import{createRequire as p}from"node:module";import{m as h,e as l}from"../packem_shared/index-DHD8wb6Z.js";let v;const g=e=>(v??=p(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[s,t]=a.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return a.getBuiltinModule(e)}return g(e)},{chmodSync:$}=f("node:fs"),{createRequire:_}=f("node:module"),m=["npm","npx","pnpm","pnpx","yarn","yarnpkg"],o=process.platform==="win32",u=e=>l(e.process.cwd,".vis","shims"),w=()=>{const{report:e}=process;if(typeof e?.getReport!="function")return!1;const s=e.getReport();return Array.isArray(s.sharedObjects)?s.sharedObjects.some(t=>t.includes("libc.musl-")||t.includes("ld-musl-")):!s.header?.glibcVersionRuntime},y={"darwin:arm64":"darwin-arm64","darwin:x64":"darwin-x64","win32:arm64":"win32-arm64-msvc","win32:x64":"win32-x64-msvc"},T=()=>{const{arch:e,platform:s}=process;return s==="linux"?e==="arm64"||e==="x64"?`linux-${e}-${w()?"musl":"gnu"}`:void 0:y[`${s}:${e}`]},A=async(e,s)=>{const t=async d=>e.fs.stat(d).then(()=>!0).catch(()=>!1),i=process.env.VIS_NATIVE_BIN;if(i!==void 0&&i!==""&&await t(i))return i;const c=o?"vis-native-cli.exe":"vis-native-cli",r=l(s,c);if(await t(r))return r;const n=T();if(n!==void 0)try{return _(import.meta.url).resolve(`@visulima/vis-binding-${n}/${c}`)}catch{return}},P=(e,s,t,i)=>o?t===void 0?`@echo off\r
|
|
2
|
+
"${e}" "${s}" __pm-shim ${i} %*\r
|
|
3
3
|
`:`@echo off\r
|
|
4
4
|
if exist "${t}" (\r
|
|
5
|
-
"${t}" __pm-shim ${
|
|
5
|
+
"${t}" __pm-shim ${i} %*\r
|
|
6
6
|
exit /b %errorlevel%\r
|
|
7
7
|
)\r
|
|
8
|
-
"${
|
|
8
|
+
"${e}" "${s}" __pm-shim ${i} %*\r
|
|
9
9
|
`:t===void 0?`#!/bin/sh
|
|
10
|
-
exec "${
|
|
10
|
+
exec "${e}" "${s}" __pm-shim ${i} "$@"
|
|
11
11
|
`:`#!/bin/sh
|
|
12
|
-
[ -x "${t}" ] && exec "${t}" __pm-shim ${
|
|
13
|
-
exec "${
|
|
14
|
-
`,
|
|
12
|
+
[ -x "${t}" ] && exec "${t}" __pm-shim ${i} "$@"
|
|
13
|
+
exec "${e}" "${s}" __pm-shim ${i} "$@"
|
|
14
|
+
`,j=async e=>{const s=process.argv[1];if(s===void 0){e.console.error("vis shim install: could not resolve the vis entry path."),e.process.exit(1);return}const t=process.execPath,i=u(e),c=await A(e,h(h(s)));await e.fs.mkdir(i,{recursive:!0});for(const r of m){const n=l(i,o?`${r}.cmd`:r);await e.fs.writeFile(n,P(t,s,c,r)),o||$(n,493)}e.console.log(`Installed ${String(m.length)} PM shims in ${i}`),e.console.log(""),e.console.log("Add the shim dir to PATH (project-local) to activate the PM guard, e.g. in .envrc:"),e.console.log(` export PATH="${i}:$PATH"`),e.console.log("Remove with `vis shim uninstall`.")},I=async e=>{const s=u(e);await e.fs.rm(s,{force:!0,recursive:!0}),e.console.log(`Removed ${s}.`),e.console.log("If you added it to PATH (e.g. .envrc), remove that line too.")},M=async e=>{const s=u(e);if(!await e.fs.stat(s).then(r=>r.isDirectory()).catch(()=>!1)){e.console.log("PM shims: not installed. Run `vis shim install`.");return}const i=[];for(const r of m){const n=l(s,o?`${r}.cmd`:r);await e.fs.stat(n).then(()=>!0).catch(()=>!1)||i.push(r)}const c=(e.process.env.PATH??"").split(o?";":":").includes(s);e.console.log(`PM shims: installed in ${s}`),i.length>0&&e.console.log(`WARNING: ${String(i.length)} shim(s) missing (${i.join(", ")}). Re-run \`vis shim install\`.`),e.console.log(c?"PATH: active (shim dir is on PATH).":"PATH: NOT on PATH — the guard is inactive until you add it.")};export{j as shimInstallExecute,M as shimStatusExecute,I as shimUninstallExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{F as v}from"../packem_shared/index.server-CwSgbeN7.js";import{v as R,e as y}from"../packem_shared/index-DHD8wb6Z.js";import{d as j}from"./catalog.js";import{a as C,b as g,s as x,i as B,c as D,p as P,d as E,r as N,e as A}from"../packem_shared/subtree-DtmcKAJK.js";import{s as W,n as k}from"../packem_shared/utils-DQFHJn72.js";const z=async(u,m,t)=>{const e=m[u];if(e?.root)return{pkgName:u,relativeDir:k(e.root)};const o=k(u);if(o.length>0&&await t(o))return{pkgName:o.split("/").pop()??o,relativeDir:o}},K=async({argument:u,fs:m,logger:t,options:e,process:o,visConfig:h,workspaceRoot:b})=>{const p=u[0];if(!p)throw new Error("Missing <package>. Pass a project name or a workspace-relative path.");if(!e.dryRun&&!e.output)throw new Error("Missing --output <dir>. Pass the destination directory for the new repo (or use --dry-run).");const r=b??o.cwd;C(r);const{workspace:$}=j(r,h),w=async i=>{try{return await m.access(i),!0}catch{return!1}},l=await z(p,$.projects,i=>w(y(r,i,"package.json")));if(!l){const i=Object.keys($.projects).sort().join(", ");throw new Error(`Unknown package "${p}". Known projects: ${i||"(none)"}.`)}const{pkgName:f,relativeDir:n}=l,s=e.branch??h?.defaultBase??"main",d=`vis/split/${W(n.replaceAll("/","-"))}`,c=e.output?R(e.output)?e.output:y(r,e.output):void 0;if(e.dryRun){t.info("Dry run — no changes will be made. Planned git commands:"),t.info(` git subtree split --prefix=${n}${e.annotate?` --annotate=(${f}) `:""} -b ${d}`),c&&(t.info(` git -C ${c} init -b ${s}`),t.info(` git -C ${c} pull ${r} ${d}`)),e.remote&&t.info(` git -C ${c??"<output>"} remote add origin ${e.remote}`),e.push&&t.info(` git -C ${c??"<output>"} push -u origin ${s}`),e.remove&&t.info(` git rm -r ${n} && git commit (in ${r})`);return}const a=c;if(await w(a)){if((await m.readdir(a)).length>0&&!e.force)throw new Error(`${a} is not empty. Re-run with --force to use it anyway.`)}else await m.mkdir(a,{recursive:!0});e.remove&&g(r),t.info(`Splitting ${v(n)} → ${a} ...`);try{x({annotate:e.annotate?`(${f}) `:void 0,branch:d,cwd:r,prefix:n}),B({branch:s,source:r,sourceBranch:d,target:a}),e.remote?(D("origin",e.remote,a),e.push&&P("origin",s,a)):e.push&&t.warn("--push ignored: no --remote provided.");const i=E(s,a);t.info(`✓ Extracted ${f} with ${i} commit(s) to ${a}`),e.remove&&(N(n,`chore(${f}): split out to standalone repo`,r),t.info(`✓ Removed ${n} from the monorepo (committed).`)),e.remote||t.info(v(`Next: cd ${a} && git remote add origin <url> && git push -u origin ${s}`))}finally{try{A(d,r)}catch{}}};export{K as default,z as resolvePackageDirectory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{F as T,J as a,r as S,X as y}from"../packem_shared/index.server-CwSgbeN7.js";import{e as V}from"../packem_shared/index-DHD8wb6Z.js";import{enforceProjectConstraints as v}from"@visulima/task-runner";import{d as x,b as J}from"./catalog.js";import{j as w}from"./cli-main.js";import{c as z}from"../packem_shared/runtime-check-BklgEMkC.js";import{d as D}from"../packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js";import{y as G}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{p as H}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";const e=c=>c?a("✓"):y("✗"),N=async({fs:c,logger:t,options:g,visConfig:C,workspaceRoot:n})=>{if(!n)throw new Error("Could not determine workspace root.");const{config:h,packageJsons:O,workspace:f}=x(n,C),b=J(n,f,O),k=Object.keys(f.projects).length,d=new Set(Object.values(f.projects).flatMap($=>Object.keys($.targets??{}))).size,i=z(n);let s=0;h.constraints&&(s=v(b,h.constraints).length);const o=w(n,{minRuns:2});let r;const l=D(n);if(G(l)){const F=(await c.readdir(l)).filter(u=>u.endsWith(".json")).sort();let p=0,j=0;for(const u of F.slice(-20))try{const m=H(V(l,u));m.stats&&(p+=m.stats.total??0,j+=m.stats.cached??0)}catch{continue}p>0&&(r=`${(j/p*100).toFixed(0)}%`)}if(g.json){t.info(JSON.stringify({cacheHitRate:r??null,constraintViolations:s,flakyTasks:o.length,projects:k,runtimeIssues:i.length,targets:d},null,2));return}t.info(""),t.info(` ${T("VIS STATUS")}`),t.info(""),t.info(` ${e(!0)} ${String(k)} projects · ${String(d)} unique targets`),t.info(` ${e(i.length===0)} Runtime: ${i.length===0?a("OK"):S(`${String(i.length)} issue(s)`)}`),t.info(` ${e(s===0)} Constraints: ${s===0?a("OK"):y(`${String(s)} violation(s)`)}`),t.info(` ${e(o.length===0)} Flaky tasks: ${o.length===0?a("none"):S(String(o.length))}`),r&&t.info(` ${e(!0)} Cache hit rate: ${r} (last 20 runs)`),t.info("")};export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createTaskGraph as
|
|
1
|
+
import{createTaskGraph as m}from"@visulima/task-runner";import{d as b,b as v}from"./catalog.js";const y=(a,t)=>{const s=new Map;for(const[i,o]of Object.entries(a.dependencies))for(const p of o){const c=s.get(p)??[];c.push(i),s.set(p,c)}if(!a.tasks[t])return;const r=new Set([t]),e=[{node:t,path:[t]}];for(;e.length>0;){const i=e.shift();if(a.roots.includes(i.node))return i.path;for(const o of s.get(i.node)??[])r.has(o)||(r.add(o),e.push({node:o,path:[o,...i.path]}))}return[t]},E=(a,t)=>{const s=[];for(const[r,e]of Object.entries(a.dependencies))e.includes(t)&&s.push(r);return s.sort()},I=async({argument:a,logger:t,visConfig:s,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root.");const e=a[0];if(!e)throw new Error("No task ID specified. Usage: vis task-why <project>:<target>");if(!e.includes(":"))throw new Error(`Invalid task ID "${e}" — expected format "project:target".`);const{packageJsons:i,workspace:o}=b(r,s),p=v(r,o,i),[c,j]=e.split(":",2),$=o.projects[c];if(!$)throw new Error(`Unknown project "${c}".`);if(!$.targets?.[j])throw new Error(`Project "${c}" has no target "${j}".`);const l=Object.entries(o.projects).flatMap(([n,w])=>Object.keys(w.targets??{}).map(d=>({id:`${n}:${d}`,outputs:[],overrides:{},target:{project:n,target:d}}))),f=m(l,{projectGraph:p,workspace:o});if(!f.tasks[e])throw new Error(`Task "${e}" is not reachable in the graph.`);const h=y(f,e),u=E(f,e);if(t.info(""),t.info(`Why ${e}?`),t.info(""),h&&h.length>1){t.info("Shortest path from a root to this task:");for(const[n,w]of h.entries()){const d=n===0?" ":`${" ".repeat(n+1)}└─ `;t.info(`${d}${w}`)}t.info("")}else t.info(" This task is itself a root — nothing upstream depends on it."),t.info("");if(u.length>0){t.info(`Directly depended on by ${u.length} task(s):`);for(const n of u)t.info(` - ${n}`);t.info("")}const k=f.dependencies[e]??[];if(k.length>0){t.info(`This task depends on ${k.length} task(s):`);for(const n of[...k].sort())t.info(` - ${n}`);t.info("")}};export{I as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
`);return}
|
|
3
|
-
`)}catch(m){t.error(`Failed to write .nvmrc: ${m.message}`),process.exitCode=1;return}t.success(`Wrote ${o.version} to .nvmrc.`),t.notice(" nvm is a shell function — run `nvm use` to activate it in this shell.");return}if(
|
|
4
|
-
`)},
|
|
5
|
-
`)}
|
|
1
|
+
import{createRequire as P}from"node:module";import{F as d,J as k,X as W,r as A}from"../packem_shared/index.server-CwSgbeN7.js";import{e as S}from"../packem_shared/index-DHD8wb6Z.js";import{p as t}from"./cli-main.js";import{p as R,g as C,S as x,w,b as B,a as O,f as j,c as M,d as q,u as b,e as H,h as K}from"../packem_shared/toolchain-DY11tPCw.js";let I;const F=e=>(I??=P(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,N=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[n,i]=h.versions.node.split(".").map(Number);if(n>22||n===22&&i>=3||n===20&&i>=16)return h.getBuiltinModule(e)}return F(e)},{spawnSync:U}=N("node:child_process"),y=["aube","bun","deno","go","node","npm","pnpm","python","ruby","rust","yarn"],L=e=>y.includes(e),v=e=>e?k("✓"):W("✗"),_=A("⚠"),D=e=>{if(e.installed){const n=e.version?` v${e.version}`:"",i=e.configFiles.length>0?` (${e.configFiles.join(", ")})`:"";return`${v(!0)} ${e.name}${n}${i}`}return`${_} ${e.name} — referenced by ${e.configFiles.join(", ")} but not installed`},J=e=>{if(e.matches)return"";const{manager:n}=e;return n.name==="none"?d("→ (no manager)"):n.name==="self-activate"?"":n.installed?d(`→ ${n.name}`):d(`→ ${n.name} (missing)`)},z=e=>e.matches?v(!0):e.actual?_:v(!1),G=e=>{if(t.info(""),t.info(d("── Toolchain ───────────────────────")),e.detected.length===0)t.info(` ${v(!1)} No version manager detected`),t.notice(` Install one of: ${x.join(", ")}`);else for(const n of e.detected)t.info(` ${D(n)}`);if(t.info(""),e.tools.length===0){t.info(` ${d("No tool pins found — add engines.node, .nvmrc, or a manager config file.")}`);return}t.info(d("── Tools ───────────────────────────"));for(const n of e.tools){const i=`${n.expected.tool} ${n.expected.version}`,r=n.actual?`actual ${n.actual}`:"not installed",c=n.matches?"":d(` [${n.expected.source}]`),o=J(n),g=o===""?"":` ${o}`;t.info(` ${z(n)} ${i} — ${r}${c}${g}`),n.manager.note&&t.notice(` ${n.manager.note}`)}},X=(e,n,i)=>{const r=C(e,n);if(i.json){process.stdout.write(`${JSON.stringify({detected:r.detected.map(o=>({binPath:o.binPath??null,configFiles:o.configFiles,installed:o.installed,name:o.name,version:o.version??null})),tools:r.tools.map(o=>({actual:o.actual??null,expected:o.expected.version,manager:o.manager.name,managerInstalled:o.manager.installed,matches:o.matches,note:o.manager.note??null,source:o.expected.source,tool:o.expected.tool}))},void 0,2)}
|
|
2
|
+
`);return}G(r);const c=r.tools.filter(o=>!o.matches);c.length>0&&(t.info(""),t.notice(" Run `vis toolchain install` to install pinned versions.")),i.exitCode&&c.length>0&&(process.exitCode=1)},Q=e=>{const n=new Map;for(const i of e){const r=n.get(i.manager.name);r?r.push(i):n.set(i.manager.name,[i])}return n},E=(e,n,i)=>U(e,n,{cwd:i,stdio:"inherit"}).status??1,V=(e,n,i)=>{const r=C(e,n),c=r.tools.filter(f=>!f.matches);if(c.length===0){t.success("Everything already matches — nothing to install.");return}const o=c.some(f=>f.manager.name!=="self-activate"&&f.manager.name!=="none");if(r.detected.length===0&&o){t.error(`No version manager detected. Install one of: ${x.join(", ")}.`),process.exitCode=1;return}const g=Q(c);let l=!1,a=0;for(const[f,u]of g){if(f==="self-activate"){for(const{expected:s}of u){if(s.source==="packageManager")t.info(`${d("$")} (${s.tool} will self-activate from packageManager on next invocation)`);else if(t.info(`${d("$")} Writing packageManager=${s.tool}@${s.version}`),i.dryRun)l=!0;else try{w(e,s),l=!0}catch(p){t.error(p.message),a=1}t.notice(` ${s.tool} ${s.version} — no install needed`)}continue}if(f==="none"){for(const{expected:s}of u)t.warn(`Cannot install ${s.tool} ${s.version} — no manager can handle it.`);a=1;continue}if(!r.detected.find(s=>s.name===f)?.installed){t.error(`${f} is referenced but not on PATH — install it first, then rerun \`vis toolchain install\`.`),a=1;continue}const T=u.map(s=>B(f,s.expected)).filter(Boolean);for(const s of T){if(!s)continue;if(s.bin==="nvm"&&s.args.length===0){t.error("nvm is a shell function — run `nvm install` in your shell, then rerun `vis toolchain install`."),s.hint&&t.notice(` ${s.hint}`),a=1;continue}if(t.info(`${d("$")} ${s.bin} ${s.args.join(" ")}`),s.hint&&t.notice(` ${s.hint}`),i.dryRun){l=!0;continue}const p=E(s.bin,s.args,e);if(l=!0,p!==0){a=p;break}}}if(a!==0){process.exitCode=a;return}l&&t.success("Toolchain installed.")},Y=async(e,n,i,r,c)=>{if(!r)throw new Error("Usage: vis toolchain use <tool>@<version> (e.g. vis toolchain use node@22.13.0)");const o=O(r);if(!o)throw new Error(`Could not parse "${r}". Expected "<tool>@<version>" where <tool> is one of ${y.join(", ")}.`);const g=j(n),l=M(o,g,i);if(l.name==="none"){t.error(`No manager can pin ${o.tool}. Install one of: ${x.join(", ")}.`),process.exitCode=1;return}if(!l.installed){t.error(`The best manager for ${o.tool} (${l.name}) is not on PATH. ${l.note??""}`),process.exitCode=1;return}const a=q(l.name,o);if(!a){t.error(`${l.name} cannot pin ${o.tool}. Use a different manager, or set \`toolchain.tools.${o.tool}\` in vis.config.ts.`),process.exitCode=1;return}if(l.name==="self-activate"){if(t.info(`${d("→")} Writing packageManager field to package.json...`),c.dryRun){t.notice(` Would set packageManager: "${o.tool}@${o.version}"`);return}try{const u=w(n,o);if(!u){t.error(`Refusing to pin non-package-manager tool ${o.tool} via the packageManager field.`),process.exitCode=1;return}if(t.success(`Set packageManager: "${u}" — ${o.tool} will activate this version on next invocation.`),c.engines!==!1){const m=b(n,o);m&&t.success(`Updated package.json engines.${o.tool} → ${m}.`)}}catch(u){t.error(u.message),process.exitCode=1}return}if(a.args.length===0&&l.name==="nvm"&&o.tool==="node"){const u=S(n,".nvmrc");if(t.info(`${d("→")} Writing ${u}...`),c.dryRun){t.notice(` Would write ${o.version} to .nvmrc`);return}try{await e.writeFile(u,`${o.version}
|
|
3
|
+
`)}catch(m){t.error(`Failed to write .nvmrc: ${m.message}`),process.exitCode=1;return}t.success(`Wrote ${o.version} to .nvmrc.`),t.notice(" nvm is a shell function — run `nvm use` to activate it in this shell.");return}if(a.args.length===0){t.error(`${l.name} cannot pin ${o.tool} from a subprocess. ${a.configChange?.hint??""}`),a.configChange&&t.notice(` Edit ${a.configChange.file} by hand and rerun \`vis toolchain status\` to verify.`),process.exitCode=1;return}if(t.info(`${d("$")} ${a.bin} ${a.args.join(" ")}`),a.configChange&&t.notice(` Will update ${a.configChange.file} — ${a.configChange.hint}`),c.dryRun)return;const f=E(a.bin,a.args,n);if(f!==0){process.exitCode=f;return}if(t.success(`Pinned ${o.tool} to ${o.version}.`),c.engines!==!1)try{const u=b(n,o);u&&t.success(`Updated package.json engines.${o.tool} → ${u}.`)}catch(u){t.warn(`Could not update engines.${o.tool}: ${u.message}`)}},Z=(e,n,i)=>{if(!i)throw new Error("Usage: vis toolchain which <tool> (e.g. vis toolchain which node)");const r=i.toLowerCase();if(!L(r))throw new Error(`Unknown tool "${i}". Known: ${y.join(", ")}.`);const c=j(e),o=M({source:"vis.config.ts",tool:r,version:"*"},c,n),g=o.installed&&o.name!=="self-activate"&&o.name!=="none"?c.find(a=>a.name===o.name):void 0,l=g?H(g,r):K(r);if(!l){t.error(`${i} not found in PATH${g?` or via ${g.name}`:""}.`),process.exitCode=1;return}process.stdout.write(`${l}
|
|
4
|
+
`)},ee=(e,n)=>{const i=R(e,n);process.stdout.write(`${i.name}
|
|
5
|
+
`)},$=e=>{if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");return e},re=async({options:e,visConfig:n,workspaceRoot:i})=>{X($(i),n?.toolchain,e)},ae=async({visConfig:e,workspaceRoot:n})=>{ee($(n),e?.toolchain)},ce=async({options:e,visConfig:n,workspaceRoot:i})=>{V($(i),n?.toolchain,e)},le=async({argument:e,fs:n,options:i,visConfig:r,workspaceRoot:c})=>{await Y(n,$(c),r?.toolchain,e[0],i)},ue=async({argument:e,visConfig:n,workspaceRoot:i})=>{Z($(i),n?.toolchain,e[0])};export{ae as detectExecute,ce as installExecute,re as statusExecute,le as useExecute,ue as whichExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as k,l as p}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as i,a as u}from"../packem_shared/command-runtime-CiLVo4ED.js";import{m as f}from"../packem_shared/utils-DQFHJn72.js";const B=async({argument:o,logger:c,options:s,rawUnknown:n,visConfig:e,workspaceRoot:t})=>{const m=f(o,n),a=t??process.cwd(),l=i({logger:c,options:s,visConfig:e},a),d=k(a,{backend:u(l),configBackend:e?.install?.backend,configCorepack:e?.install?.corepack}),r=p(d,m,s.recursive||!1,a,c);r!==0&&(process.exitCode=r)};export{B as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{m}from"../packem_shared/package-version-
|
|
2
|
-
✓ Already up to date (${
|
|
3
|
-
✓ Updated @visulima/vis from ${
|
|
1
|
+
import{createRequire as u}from"node:module";import{g as m}from"../packem_shared/package-version-BJkg7-6H.js";let a;const f=t=>(a??=u(import.meta.url))(t),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=t=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,s]=r.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return r.getBuiltinModule(t)}return f(t)},{execSync:l,spawnSync:p}=d("node:child_process"),y=async({argument:t,logger:e,options:s})=>{const o=t?.[0];e.info("info: checking for updates...");const i=m();let n;try{const c=l("npm view @visulima/vis version",{encoding:"utf8"}).trim();n=o??c}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(i===n&&!s.force){e.info(`
|
|
2
|
+
✓ Already up to date (${i})`);return}if(s.check){i===n?e.info(`✓ Already up to date (${i})`):e.info(`info: found @visulima/vis@${n} (current: ${i})`);return}if(e.info(`info: found @visulima/vis@${n} (current: ${i})`),e.info("info: installing..."),p("npm",["install","-g",`@visulima/vis@${n}`],{encoding:"utf8",stdio:"inherit"}).status!==0)throw new Error("Failed to update. Try running with sudo or fix npm permissions.");e.info(`
|
|
3
|
+
✓ Updated @visulima/vis from ${i} → ${n}`)};export{y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as p,m as k}from"../packem_shared/pm-runner-de-jCq8q.js";import{r as g,a as i}from"../packem_shared/command-runtime-CiLVo4ED.js";import{m as u,t as b}from"../packem_shared/utils-DQFHJn72.js";const y=async({argument:d,logger:l,options:e,process:t,rawUnknown:o,visConfig:a,workspaceRoot:n})=>{const c=u(d,o);if(c.length===0)throw new Error("No packages specified. Usage: vis why <package...>");const r=n??t.cwd,f=g({logger:l,options:e,visConfig:a},r),m=p(r,{backend:i(f),configBackend:a?.install?.backend,configCorepack:a?.install?.corepack}),s=k(m,{depth:e.depth===void 0?void 0:Number(e.depth),dev:e.dev||!1,filter:b(e.filter),global:e.global||!1,json:e.json||!1,long:e.long||!1,noOptional:e.optional===!1,packages:c,parseable:e.parseable||!1,prod:e.prod||!1,recursive:e.recursive||!1},r,l);s!==0&&s!==1&&(process.exitCode=s)};export{y as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{d as l,b as g}from"./catalog.js";import{V as m}from"../packem_shared/vis-user-error-jhNwmkZp.js";import{s as j}from"../packem_shared/affected-selection-DPQR-Bd3.js";import{f as h,a as k}from"../packem_shared/selectors-B7lSFz7l.js";const P=r=>{const e=r.indexOf("affected",2);return e===-1?[]:r.slice(e+1)},A=async({argument:r,options:e,runtime:u,visConfig:c,workspaceRoot:d})=>{if(!r[0])throw new m("Missing target. Usage: vis affected <target>");if(!d)throw new m("Could not determine workspace root. Run this command inside a monorepo.");if(e.sparseCheckout){const s=d,{packageJsons:i,workspace:t}=l(s,c),p=g(s,t,i),w=await j({base:e.base,downstream:e.downstream,head:e.head,uncommitted:e.uncommitted,upstream:e.upstream},{projectGraph:p,projects:t.projects,workspaceRoot:s},{defaultBase:c?.defaultBase});let o=h(w.affectedProjects,t,e.query);o=k(o,t,e.tag);const n=[...new Set(o.map(f=>t.projects[f]?.root??f))].sort();process.stdout.write(n.length>0?`${n.join(`
|
|
2
2
|
`)}
|
|
3
|
-
`:"");return}const
|
|
3
|
+
`:"");return}const a=P(process.argv);await u.runCommand("run",{argv:a.includes("--affected")?a:[...a,"--affected"]})};export{A as default,P as forwardedArgv};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{v,
|
|
1
|
+
import{v as u,U as w}from"../packem_shared/index-DHD8wb6Z.js";import{r as v}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as x}from"../packem_shared/run-file-jMngGQhs.js";const R=async({argument:t,logger:r,options:i,rawUnknown:c,visConfig:n,workspaceRoot:a})=>{const m=t??[],[o,...f]=m;if(o===void 0)throw new Error("No file specified. Usage: vis x <file> [args...]");const s=process.cwd(),p=u(o)?o:w(s,o),l=[...f,...c??[]],{runtime:d}=v({logger:r,options:i,visConfig:n},a??s),e=await x(p,l,d,s);e!==0&&(process.exitCode=e)};export{R as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as
|
|
2
|
-
`)[0]?.slice(0,80)??""}`))};export{
|
|
1
|
+
import{createRequire as j}from"node:module";import{DEFAULT_CHANGES_DIR as C}from"./DEFAULT_CLEAN_KEEP.js";import{b as B,f as D}from"./orchestrator.js";import{r as E}from"../packem_shared/slug-OBHcH7wV.js";import{VisReleaseError as g}from"../packem_shared/VisReleaseError-DZtgcKf8.js";let I;const S=e=>(I??=j(import.meta.url))(e),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[n,a]=l.versions.node.split(".").map(Number);if(n>22||n===22&&a>=3||n===20&&a>=16)return l.getBuiltinModule(e)}return S(e)},{mkdir:V,writeFile:O}=_("node:fs/promises"),{resolve:k,sep:v,join:T}=_("node:path");let w;const X=e=>{w=e},$=async()=>w||(await import("./shell-runner.js")).createShellRunner(),y=e=>!e||!/^[\dv]/i.test(e)?!1:/^[\d.+\-a-z]+$/i.test(e),A=e=>{const n=e.trim(),t=/^(?:[a-z]+(?:\([^)]+\))?:\s+)?[Bb]ump\s+(?<dep>\S+)\s+from\s+(?<fromVersion>\S+)\s+to\s+(?<toVersion>\S+)(?:\s+in\s+\S+)?$/.exec(n);if(t?.groups){const s=t.groups.toVersion;return y(s)?{dep:t.groups.dep,fromVersion:t.groups.fromVersion,toVersion:s}:void 0}const o=/^(?:[a-z]+(?:\([^)]+\))?:\s+)?[Uu]pdate\s+(?:dependency|module)\s+(?<dep>\S+)\s+to\s+(?<toVersion>\S+)(?:\s+\S.*)?$/.exec(n);if(o?.groups){const s=o.groups.toVersion;return y(s)?{dep:o.groups.dep,fromVersion:"",toVersion:s}:void 0}},F=async e=>{const n=process.env.PR_NUMBER;if(n&&/^\d+$/.test(n))return Number.parseInt(n,10);const a=process.env.GITHUB_REF;if(a){const t=/^refs\/pull\/(\d+)\//.exec(a);if(t)return Number.parseInt(t[1],10)}try{const r=await(await $()).run("gh",["pr","view","--json","number"],{cwd:e,silent:!0});if(r.exitCode===0){const o=JSON.parse(r.stdout.trim());if(typeof o.number=="number")return o.number}}catch{}},L=async(e,n)=>{try{const t=await(await $()).run("gh",["pr","view",String(n),"--json","title,body,author"],{cwd:e,silent:!0});return t.exitCode!==0?void 0:JSON.parse(t.stdout.trim())}catch{return}},U=(e,n)=>{const a=[];for(const t of n){const{manifest:r}=t;(Object.hasOwn(r.dependencies??{},e)||Object.hasOwn(r.devDependencies??{},e)||Object.hasOwn(r.peerDependencies??{},e)||Object.hasOwn(r.optionalDependencies??{},e))&&a.push(t.name)}return a},M=e=>{const n={};for(const a of e.split(",")){const t=a.trim();if(!t)continue;const r=t.lastIndexOf(":");if(r<1)throw new g({code:"BUMP_FILE_INVALID",message:`Invalid --packages entry: ${JSON.stringify(t)}. Expected "package:level".`});const o=t.slice(0,r).trim(),s=t.slice(r+1).trim();if(s!=="major"&&s!=="minor"&&s!=="patch"&&s!=="none")throw new g({code:"BUMP_FILE_INVALID",message:`Invalid bump level: ${JSON.stringify(s)}. Expected major|minor|patch|none.`});n[o]=s}return n},W=async e=>{const{multiSelectPrompt:n,selectPrompt:a,textPrompt:t}=await import("./prompts.js"),r=await n("Which packages to bump?",e.map(p=>({label:p,value:p}))),o={};for(const p of r){const m=await a(`Bump level for ${p}?`,[{label:"patch — bug fixes only",value:"patch"},{label:"minor — new feature, backward-compatible",value:"minor"},{label:"major — breaking change",value:"major"},{label:"none — acknowledged, no direct bump",value:"none"}]);o[p]=m}const s=await t("Changelog entry (markdown):","");return{bumps:o,message:s}},K=async({logger:e,options:n,workspaceRoot:a})=>{const t=a??process.cwd(),r=await B({cwd:t,skipRegistryLookup:!0});let o={},s=n.message??"";if(n.fromBotPr){const c=await F(t);if(c===void 0){e.error("No PR found. Set PR_NUMBER, run inside a GitHub Actions PR workflow, or check `gh pr view` works on this branch."),process.exitCode=1;return}const i=await L(t,c);if(!i||typeof i.title!="string"){e.error(`Could not fetch PR #${c} via \`gh pr view\`. Ensure gh is on PATH and authenticated.`),process.exitCode=1;return}const d=A(i.title);if(!d){e.info(`PR #${c} title is not a recognised Dependabot / Renovate pattern; skipping.`),e.info(`Title: ${i.title}`),process.exitCode=0;return}const b=U(d.dep,r.packages),N=d.fromVersion?`from ${d.fromVersion} to ${d.toVersion}`:`to ${d.toVersion}`;if(s=s||`Updated ${d.dep} ${N}`,b.length===0){const h=r.packages[0]?.name;if(!h){e.error("Workspace has no packages — cannot author an acknowledging change file."),process.exitCode=1;return}o={[h]:"none"},s=`${s} (no workspace package depends on ${d.dep})`}else for(const h of b)o[h]="patch"}else if(n.empty)o={},s=s||"Empty change file (no release).";else if(n.packages){o=M(n.packages);const c=new Set(r.packages.map(i=>i.name));for(const i of Object.keys(o))if(!c.has(i))throw new g({code:"BUMP_FILE_INVALID",message:`Unknown workspace package in --packages: ${JSON.stringify(i)}.`,packageName:i})}else{if(!process.stdout.isTTY){e.error("--packages is required when stdin is not a TTY."),e.error("Example: vis release add --packages '@scope/cerebro:minor' --message 'Add X'"),process.exitCode=1;return}const c=await W(r.packages.map(i=>i.name));o=c.bumps,s=s||c.message}if(Object.keys(o).length===0){e.error("No bumps specified."),process.exitCode=1;return}const p=r.config.changesDir??C,m=(n.name??E()).replaceAll(/[^a-z0-9-]/gi,"-"),u=k(t),x=u.endsWith(v)?u:`${u}${v}`,f=k(t,p);if(f!==u&&!f.startsWith(x))throw new g({code:"CONFIG_INVALID",message:`changesDir resolves outside the workspace: ${f} (workspace: ${u}).`});const R=T(f,`${m}.md`),P=D({bumps:o},s);await V(f,{recursive:!0}),await O(R,P,{flag:"wx"}),e.info(`Created ${p}/${m}.md`),e.info("");for(const[c,i]of Object.entries(o))e.info(` ${c}: ${i}`);s&&(e.info(""),e.info(` Body: ${s.split(`
|
|
2
|
+
`)[0]?.slice(0,80)??""}`))};export{X as __setBotPrRunnerForTests,K as default,A as parseBotPrTitle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{releaseChangelog as
|
|
2
|
-
`),
|
|
1
|
+
import{releaseChangelog as i}from"../packem_shared/ReleaseClient-DAvbxCdo.js";const f=async({logger:e,options:t,workspaceRoot:r})=>{const s=r??process.cwd(),c=t.filter?t.filter.split(",").map(n=>n.trim()).filter(Boolean):void 0,o=await i({channel:t.channel,cwd:s,projects:c});if(t.json){process.stdout.write(`${JSON.stringify(o,null,2)}
|
|
2
|
+
`),o.projectChangelogs.length===0&&(process.exitCode=1);return}if(o.projectChangelogs.length===0){e.info("No pending releases — no changelog entries to render."),process.exitCode=1;return}for(const n of o.projectChangelogs)e.info(`# ${n.package} → ${n.file}`),e.info(""),e.info(n.content),e.info("")};export{f as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_CHANGES_DIR as R}from"./DEFAULT_CLEAN_KEEP.js";import{b as D,c as
|
|
2
|
-
`).map(e=>e.trim()).filter(Boolean);if(
|
|
1
|
+
import{DEFAULT_CHANGES_DIR as R}from"./DEFAULT_CLEAN_KEEP.js";import{b as D,c as b,d as B}from"./orchestrator.js";import{createShellRunner as y}from"./shell-runner.js";const T=async({logger:t,options:l,workspaceRoot:w})=>{const a=w??process.cwd(),p=l.noFail===!0,g=l.strict===!0,s=await D({cwd:a}),{printConfigIfRequested:x}=await import("./print-config.js");if(x(l,s,t))return;const{files:o}=await b({changesDir:s.config.changesDir,cwd:a});if(o.length===0){g?(t.error("No change files present and --strict is set."),t.error(`Run \`vis release add\` to author one in ${s.config.changesDir??R}.`),process.exitCode=p?0:1):(t.warn("No change files present. PR will not produce a release."),process.exitCode=0);return}if(!g){t.info(`${o.length} change file(s) present. ✓`),process.exitCode=0;return}const m=s.config.baseBranch??"main",d=await y().run("git",["diff","--name-only",`${m}...HEAD`],{cwd:a,silent:!0});if(d.exitCode!==0){t.warn(`Could not run git diff vs ${m}: ${d.stderr}`),process.exitCode=0;return}const h=d.stdout.split(`
|
|
2
|
+
`).map(e=>e.trim()).filter(Boolean);if(h.length===0){t.info("No source files changed. ✓"),process.exitCode=0;return}const{default:P}=await import("./index.js"),$=s.config.changedFilePatterns??["**"],v=(e,n,f)=>{if(!e.startsWith(`${n}/`))return!1;const k=e.slice(n.length+1);return f.some(u=>P(u,k))},C=new Set(B(o).keys()),c=new Set;for(const e of h){const n=s.packages.find(i=>{const r=i.dir.startsWith(a)?i.dir.slice(a.length).replace(/^[/\\]/,""):i.dir;return e===`${r}/package.json`||e.startsWith(`${r}/`)});for(const i of s.packages){const r=s.perPackageConfig.get(i.name)?.additionalPaths;!r||r.length===0||r.some(F=>P(F,e))&&!C.has(i.name)&&c.add(i.name)}if(!n)continue;const f=n.dir.startsWith(a)?n.dir.slice(a.length).replace(/^[/\\]/,""):n.dir,u=s.perPackageConfig.get(n.name)?.changedFilePatterns??$;!(e===`${f}/package.json`)&&!v(e,f,u)||C.has(n.name)||c.add(n.name)}if(c.size>0){t.error("The following packages have changes but no covering change file:");for(const e of c)t.error(` - ${e}`);t.error("Run `vis release add` to author one."),process.exitCode=p?0:1;return}t.info(`${o.length} change file(s); ${h.length} changed file(s) all covered. ✓`),process.exitCode=0};export{T as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{b as
|
|
2
|
-
`);const
|
|
3
|
-
`)},
|
|
1
|
+
import{b as m}from"./orchestrator.js";import{escapeMarkdown as h}from"./security.js";import{createShellRunner as g}from"./shell-runner.js";import{d as w,a as R,u as $}from"../packem_shared/sticky-comment-DjhyCIZt.js";const C=(n,i)=>{const e=["### 🚀 Release Plan",""];if(i&&(e.push(`Channel: \`${i}\``),e.push("")),n.releases.length===0)return e.push("_No pending releases._ (Add a change file via `vis release add` to mark this PR as releasing.)"),e.join(`
|
|
2
|
+
`);const r={major:[],minor:[],patch:[]};for(const s of n.releases)r[s.type].push(s);for(const s of["major","minor","patch"])if(r[s].length!==0){e.push(`#### ${s.charAt(0).toUpperCase()}${s.slice(1)}`),e.push("");for(const t of r[s]){const o=[];t.isCascadeBump&&o.push("cascade"),t.isGroupBump&&o.push("group"),t.isDependencyBump&&!t.isCascadeBump&&o.push("dep-bump");const a=o.length>0?` _(${o.join(", ")})_`:"";e.push(`- \`${t.name}\`: ${t.oldVersion} → **${t.newVersion}**${a}`)}e.push("")}if(n.warnings.length>0){e.push("#### ⚠️ Warnings"),e.push("");for(const s of n.warnings)e.push(`- ${h(s)}`)}return e.join(`
|
|
3
|
+
`)},b=async({logger:n,options:i,workspaceRoot:e})=>{const r=e??process.cwd(),s=i.noFail===!0,t=i.strict===!0,o=g(),a=await w(o,r),p=R(process.env);(!a||!p)&&n.warn("Not running in a PR context (GITHUB_REF / PR_NUMBER missing or `gh repo view` failed). Falling back to local print.");const c=await m({cwd:r,skipRegistryLookup:!0}),{printConfigIfRequested:d}=await import("./print-config.js");if(d(i,c,n))return;const f=c.config.versionPr?.commentMarker??"<!-- vis-release-comment -->",l=C(c.plan,c.channel?.tag);if(a&&p){const u=await $({body:l,cwd:r,issueNumber:p,marker:f,repo:a,runner:o});if(u)n.info(`${u.created?"Posted":"Updated"} release-plan comment on PR #${p} (id: ${u.id}).`);else{n.error("Failed to post / update PR comment."),process.exitCode=s?0:1;return}}else n.info(l);t&&c.plan.releases.length===0&&(n.error("--strict and no pending releases."),process.exitCode=s?0:1)};export{b as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{createRequire as d}from"node:module";import{b as
|
|
2
|
-
`);const
|
|
3
|
-
${JSON.stringify(
|
|
4
|
-
__VIS_RELEASE_EOF__`];try{
|
|
1
|
+
import{createRequire as d}from"node:module";import{b as y}from"./orchestrator.js";let m;const f=s=>(m??=d(import.meta.url))(s),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[o,r]=t.versions.node.split(".").map(Number);if(o>22||o===22&&r>=3||o===20&&r>=16)return t.getBuiltinModule(s)}return f(s)},{appendFileSync:h}=g("node:fs"),j=async({logger:s,options:o,workspaceRoot:r})=>{const u=r??process.cwd(),n=await y({cwd:u,skipRegistryLookup:!0}),{printConfigIfRequested:l}=await import("./print-config.js");if(l(o,n,s))return;const i=n.plan.releases.length===0?"nothing":n.channel?.mode==="version-pr"?"version-pr":"publish",a=n.plan.releases.map(e=>e.name),c={channel:n.channel?.tag,mode:i,packages:a,plan:n.plan.releases.map(e=>({isCascadeBump:e.isCascadeBump,isDependencyBump:e.isDependencyBump,isGroupBump:e.isGroupBump,name:e.name,newVersion:e.newVersion,oldVersion:e.oldVersion,type:e.type})),prerelease:n.channel?.prerelease,warnings:n.plan.warnings};process.stdout.write(`${JSON.stringify(c,null,2)}
|
|
2
|
+
`);const p=process.env.GITHUB_OUTPUT;if(p){const e=[`mode=${i}`,`packages=${a.join(",")}`,`json<<__VIS_RELEASE_EOF__
|
|
3
|
+
${JSON.stringify(c)}
|
|
4
|
+
__VIS_RELEASE_EOF__`];try{h(p,`${e.join(`
|
|
5
5
|
`)}
|
|
6
|
-
`)}catch(_){
|
|
6
|
+
`)}catch(_){s.warn(`Could not write $GITHUB_OUTPUT: ${_.message}`)}}};export{j as default};
|