@visulima/vis 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +96 -0
- package/dist/packem_chunks/CONFIG_FILES.js +3 -3
- package/dist/packem_chunks/bloom-status.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/cargo-plan.js +3 -0
- package/dist/packem_chunks/catalog.js +46 -46
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +138 -138
- package/dist/packem_chunks/composer-projects.js +2 -0
- package/dist/packem_chunks/dart-plan.js +1 -0
- package/dist/packem_chunks/dart-projects.js +1 -0
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +8 -8
- package/dist/packem_chunks/gem-plan.js +2 -0
- package/dist/packem_chunks/gem-projects.js +1 -0
- package/dist/packem_chunks/git.js +5 -5
- package/dist/packem_chunks/go-plan.js +1 -0
- package/dist/packem_chunks/go-projects.js +2 -0
- package/dist/packem_chunks/gradle-plan.js +1 -0
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +3 -3
- package/dist/packem_chunks/handler11.js +1 -1
- package/dist/packem_chunks/handler12.js +2 -2
- package/dist/packem_chunks/handler13.js +1 -1
- 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 +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +2 -2
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler39.js +6 -6
- package/dist/packem_chunks/handler4.js +3 -3
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler53.js +1 -1
- package/dist/packem_chunks/handler54.js +2 -2
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +2 -2
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +5 -5
- package/dist/packem_chunks/handler60.js +8 -8
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +16 -16
- package/dist/packem_chunks/handler63.js +2 -2
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +4 -4
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +3 -3
- package/dist/packem_chunks/handler68.js +2 -2
- package/dist/packem_chunks/handler69.js +3 -3
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +4 -4
- package/dist/packem_chunks/handler71.js +5 -5
- package/dist/packem_chunks/handler72.js +2 -2
- package/dist/packem_chunks/handler73.js +87 -86
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +33 -33
- package/dist/packem_chunks/handler76.js +6 -6
- package/dist/packem_chunks/handler77.js +2 -2
- package/dist/packem_chunks/handler78.js +19 -19
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -1
- package/dist/packem_chunks/heal-accept.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/hex-plan.js +3 -0
- package/dist/packem_chunks/hex-projects.js +1 -0
- package/dist/packem_chunks/index2.js +52 -42
- package/dist/packem_chunks/index4.js +58 -802
- package/dist/packem_chunks/index5.js +802 -7
- package/dist/packem_chunks/index6.js +7 -58
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/lean.js +1 -1
- package/dist/packem_chunks/list.js +2 -2
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/maven-plan.js +1 -0
- package/dist/packem_chunks/maven-projects.js +1 -0
- package/dist/packem_chunks/nuget-plan.js +1 -0
- package/dist/packem_chunks/nuget-projects.js +1 -0
- package/dist/packem_chunks/orchestrator.js +33 -33
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/python-plan.js +3 -0
- package/dist/packem_chunks/python-projects.js +1 -0
- package/dist/packem_chunks/security.js +1 -1
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/swift-projects.js +1 -0
- package/dist/packem_chunks/sync.js +3 -2
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/ts-loader.js +5 -5
- package/dist/packem_chunks/verify-lockfile.js +2 -2
- package/dist/packem_chunks/version-resolver.js +3 -3
- package/dist/packem_chunks/zig-plan.js +1 -0
- package/dist/packem_chunks/zig-projects.js +1 -0
- package/dist/packem_shared/{affected-selection-M7riOi5-.js → affected-selection-BzIbfpA1.js} +1 -1
- package/dist/packem_shared/{affected-shas-CAwpSPmP.js → affected-shas-B2V84O0g.js} +1 -1
- package/dist/packem_shared/{ai-analysis-DSQQDFU9.js → ai-analysis-Cfj24UAy.js} +1 -1
- package/dist/packem_shared/{ai-fix-BTm1Z5og.js → ai-fix-DeRUtT-s.js} +1 -1
- package/dist/packem_shared/{augment-CBv1hwMR.js → augment-B9kSZuvW.js} +1 -1
- package/dist/packem_shared/{bin-Cbs_ix6l.js → bin-D9TsVhq2.js} +1 -1
- package/dist/packem_shared/build-scripts-CEDx_nJp.js +1 -0
- package/dist/packem_shared/{command-runtime-BD-4UmPB.js → command-runtime-p4IXiIf6.js} +1 -1
- package/dist/packem_shared/composer-DR3D-Psb.js +1 -0
- package/dist/packem_shared/dart-pubspec-BK_cK2EP.js +2 -0
- package/dist/packem_shared/dependency-scan-B8jroa1D.js +1 -0
- package/dist/packem_shared/{docker-1jgKW5Wd.js → docker-DXqV-07f.js} +3 -3
- package/dist/packem_shared/ecosystem-gate-1M3wnsTr.js +6 -0
- package/dist/packem_shared/failure-log-D2x5BT8S.js +2 -0
- package/dist/packem_shared/formatBytes-BHAzNIrn-CrusHOew.js +4 -0
- package/dist/packem_shared/gemspec-K7N05xxc.js +3 -0
- package/dist/packem_shared/go-modules-BsVqtyeC.js +1 -0
- package/dist/packem_shared/gradle-build-CHZDHyjI.js +8 -0
- package/dist/packem_shared/index-BO8qIogg.js +1 -0
- package/dist/packem_shared/index-BzhrR_iC.js +22 -0
- package/dist/packem_shared/{index-Cq-J2MdB.js → index-CNYv9D8g.js} +1 -1
- package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-K2xhg6sV.js → isAccessibleSync-DYKTrrvc-C-_5cgwu.js} +1 -1
- package/dist/packem_shared/lifecycle-D6PMPor-.js +2 -0
- package/dist/packem_shared/lockfile-CiUtEbnt.js +1 -0
- package/dist/packem_shared/manifests-Du4yKlf_.js +1 -0
- package/dist/packem_shared/maven-pom-B0KG9kJQ.js +1 -0
- package/dist/packem_shared/{min-release-age-Da4V046o.js → min-release-age-JViyQuBM.js} +7 -7
- package/dist/packem_shared/missing-package-json-DnHMxRnG.js +1 -0
- package/dist/packem_shared/mix-project-RYvdZp3_.js +2 -0
- package/dist/packem_shared/multi-eco-lockfiles-CUUxUjHK.js +1 -0
- package/dist/packem_shared/{native-config-sync-CEB0rWlk.js → native-config-sync-TdTWjVgI.js} +1 -1
- package/dist/packem_shared/nuget-project-RApYSW_y.js +4 -0
- package/dist/packem_shared/{osv-bloom-BRacgzs7.js → osv-bloom-BCAX5ARR.js} +1 -1
- package/dist/packem_shared/package-version-DUcG-b7S.js +4 -0
- package/dist/packem_shared/packument-CyGSNquL.js +1 -0
- package/dist/packem_shared/pm-runner-CMSml1Bj.js +1 -0
- package/dist/packem_shared/{project-name-filter-zrdrEQbu.js → project-name-filter--bq-FL2f.js} +1 -1
- package/dist/packem_shared/{provenance-CFPT_FQA.js → provenance-DyF0b6KX.js} +1 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-EWl7_7KX.js +1 -0
- package/dist/packem_shared/registry-keys-DwB3ZXS_.js +1 -0
- package/dist/packem_shared/{resolve-explicit-opfIkxoY.js → resolve-explicit-BjCEm0s-.js} +1 -1
- package/dist/packem_shared/resolve-runtime-CNiHcVtx.js +1 -0
- package/dist/packem_shared/run-file-UBukWaha.js +1 -0
- package/dist/packem_shared/runtime-check-1U8HrQd9.js +1 -0
- package/dist/packem_shared/s1ngularity-YfmkD_AH.js +1 -0
- package/dist/packem_shared/{scan-progress-BGB9hIrD.js → scan-progress-C_zaZjyY.js} +2 -2
- package/dist/packem_shared/{selectors-CjIZ3gy2.js → selectors-edwcgNl3.js} +1 -1
- package/dist/packem_shared/{signatures-DpqZVmmU.js → signatures-CL3ckp_Y.js} +1 -1
- package/dist/packem_shared/spinner-DuB0K0Am.js +1 -0
- package/dist/packem_shared/swift-package-B6X5kzQE.js +1 -0
- package/dist/packem_shared/{tabs-Dz6xVpfX.js → tabs-RZd_e1M0.js} +1 -1
- package/dist/packem_shared/{target-merge-hsawesT4.js → target-merge-DVJl-7Qz.js} +1 -1
- package/dist/packem_shared/target-options-DsHFmRZH.js +1 -0
- package/dist/packem_shared/toolchain-BRdpaAC4.js +5 -0
- package/dist/packem_shared/typosquats-8u0drCqQ.js +1 -0
- package/dist/packem_shared/{use-measured-height-BPQg2q_p.js → use-measured-height-DWkDV9Dj.js} +1 -1
- package/dist/packem_shared/verify-B_MblU_Q.js +1 -0
- package/dist/packem_shared/{vis-update-app-D9KWJ9Ir.js → vis-update-app-D73C__fx.js} +1 -1
- package/dist/packem_shared/{vis-user-error-Bdg9NRuJ.js → vis-user-error-Cpg2FqA4.js} +1 -1
- package/dist/packem_shared/watch-CcTketln.js +1 -0
- package/dist/packem_shared/watch-loop-qRn0IHPG.js +11 -0
- package/dist/packem_shared/{writeFileSync-DJoHk3Ks-O9zOKqeM.js → writeFileSync-DJoHk3Ks-BPRoepNw.js} +1 -1
- package/dist/packem_shared/zig-manifest-P7ydLEOa.js +7 -0
- package/dist/release/plugin-sdk.d.ts +1 -1
- package/dist/release/types.d.ts +133 -7
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +52 -52
- package/package.json +11 -11
- package/schemas/vis-config.schema.json +265 -5
- package/schemas/vis-release-config.schema.json +132 -5
- package/dist/packem_shared/advisories-BSpzRIXP.js +0 -1
- package/dist/packem_shared/build-scripts-BIgkWVgY.js +0 -1
- package/dist/packem_shared/cyclonedx-CT1rtKxV.js +0 -4
- package/dist/packem_shared/dependency-scan-W9b2X0a1.js +0 -1
- package/dist/packem_shared/failure-log-B91LvYWw.js +0 -2
- package/dist/packem_shared/formatBytes-BHAzNIrn-CLYsxlUj.js +0 -4
- package/dist/packem_shared/index-CVBR-Kit.js +0 -22
- package/dist/packem_shared/index-onibYJkv.js +0 -1
- package/dist/packem_shared/lifecycle-DDJzp-4H.js +0 -2
- package/dist/packem_shared/lockfile-Bi1mw9jJ.js +0 -1
- package/dist/packem_shared/manifests-D671Sb1T.js +0 -1
- package/dist/packem_shared/missing-package-json-CMoHdvmj.js +0 -1
- package/dist/packem_shared/package-version-C5EPMgRw.js +0 -4
- package/dist/packem_shared/packument-DuEV-qSE.js +0 -1
- package/dist/packem_shared/path-CxEa27Rz-pjheKk6v.js +0 -1
- package/dist/packem_shared/pm-runner-9L6ocnu2.js +0 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-BxKjDZnF.js +0 -1
- package/dist/packem_shared/registry-keys-C3EsP_s4.js +0 -1
- package/dist/packem_shared/resolve-runtime-lJ5L9gU4.js +0 -1
- package/dist/packem_shared/run-file-DZff6GqY.js +0 -1
- package/dist/packem_shared/runtime-check-DAbveBr_.js +0 -1
- package/dist/packem_shared/s1ngularity-DTvrfWIM.js +0 -1
- package/dist/packem_shared/spinner-BVCEMm3G.js +0 -1
- package/dist/packem_shared/target-options-Bxb0Y5qa.js +0 -1
- package/dist/packem_shared/toolchain-887JoquG.js +0 -5
- package/dist/packem_shared/typosquats-Xv6dN4sr.js +0 -1
- package/dist/packem_shared/verify-BLoaI7En.js +0 -1
- package/dist/packem_shared/watch-BTZw2Y8Q.js +0 -1
- package/dist/packem_shared/watch-loop-Cjh2wlUl.js +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## @visulima/vis [4.3.0](https://github.com/visulima/visulima/compare/@visulima/vis@4.2.0...@visulima/vis@4.3.0) (2026-10-13)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **vis:** release, task, audit and SBOM support for all languages ([#954](https://github.com/visulima/visulima/issues/954)) ([3bbd816](https://github.com/visulima/visulima/commit/3bbd816777b409d841bb6a2501ebc96db9bf0233)), closes [#947](https://github.com/visulima/visulima/issues/947)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Dependencies
|
|
9
|
+
|
|
10
|
+
* **@visulima/tui:** upgraded to 4.0.30
|
|
11
|
+
* **@visulima/tui-kit:** upgraded to 1.0.33
|
|
12
|
+
* **@visulima/cerebro:** upgraded to 3.1.3
|
|
13
|
+
* **@visulima/colorize:** upgraded to 2.2.0
|
|
14
|
+
* **@visulima/fs:** upgraded to 6.1.0
|
|
15
|
+
* **@visulima/package:** upgraded to 5.0.43
|
|
16
|
+
* **@visulima/pail:** upgraded to 5.0.1
|
|
17
|
+
* **@visulima/tsconfig:** upgraded to 3.2.37
|
|
18
|
+
|
|
1
19
|
## @visulima/vis [4.2.0](https://github.com/visulima/visulima/compare/@visulima/vis@4.1.20...@visulima/vis@4.2.0) (2026-10-09)
|
|
2
20
|
|
|
3
21
|
### Features
|
package/dist/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-
|
|
1
|
+
import"./packem_shared/compile-cache-DoMHRsRZ.js";import"./packem_shared/bin-D9TsVhq2.js";
|
package/dist/binx.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-
|
|
2
|
+
import{a as r,x as i,i as c,d as a,r as d}from"./packem_shared/vis-user-error-Cpg2FqA4.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-DUcG-b7S.js";process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o()}
|
|
3
3
|
`),process.exit(0));process.argv.splice(2,0,"dlx");n();const e=r("visx",{packageName:"visx",packageVersion:o()}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(i({concise:c,detailed:p,exitOnError:!1}));e.addCommand(a);d(e);
|
package/dist/config/index.d.ts
CHANGED
|
@@ -934,6 +934,13 @@ interface VisConfig {
|
|
|
934
934
|
* renders the generated CODEOWNERS file.
|
|
935
935
|
*/
|
|
936
936
|
codeowners?: CodeownersConfig;
|
|
937
|
+
/**
|
|
938
|
+
* Composer packages as task projects. Off by default: a `composer.json` in a
|
|
939
|
+
* subdirectory gets validate and, when its scripts define them, test and lint targets.
|
|
940
|
+
*/
|
|
941
|
+
composer?: {
|
|
942
|
+
discover?: boolean;
|
|
943
|
+
};
|
|
937
944
|
/**
|
|
938
945
|
* Project dependency constraints.
|
|
939
946
|
* Enforced after building the project graph, before running tasks.
|
|
@@ -1005,6 +1012,14 @@ interface VisConfig {
|
|
|
1005
1012
|
*/
|
|
1006
1013
|
templates?: Record<string, string>;
|
|
1007
1014
|
};
|
|
1015
|
+
/**
|
|
1016
|
+
* Dart pub workspace members as task projects. Off by default: each member listed
|
|
1017
|
+
* under the root `pubspec.yaml`'s `workspace:` gets analyze, test and format-check
|
|
1018
|
+
* targets only when this is set.
|
|
1019
|
+
*/
|
|
1020
|
+
dart?: {
|
|
1021
|
+
discover?: boolean;
|
|
1022
|
+
};
|
|
1008
1023
|
/**
|
|
1009
1024
|
* Default base branch used by `vis affected`, `vis ci`, and `vis run --affected`
|
|
1010
1025
|
* when no explicit `--base` is passed and no CI smart-resolver fires.
|
|
@@ -1096,6 +1111,15 @@ interface VisConfig {
|
|
|
1096
1111
|
*/
|
|
1097
1112
|
order?: FmtAdapterId[];
|
|
1098
1113
|
};
|
|
1114
|
+
/**
|
|
1115
|
+
* Gems as task projects. Off by default: each `*.gemspec` directory (except `vendor`,
|
|
1116
|
+
* `node_modules` and `.bundle`) gets build, test and lint targets when this is set. The
|
|
1117
|
+
* root directory is not a task project. POSIX only: the inferred commands are not verified
|
|
1118
|
+
* on Windows.
|
|
1119
|
+
*/
|
|
1120
|
+
gem?: {
|
|
1121
|
+
discover?: boolean;
|
|
1122
|
+
};
|
|
1099
1123
|
/**
|
|
1100
1124
|
* Configuration for the `vis generate` in-repo scaffolding command.
|
|
1101
1125
|
* Points at additional template directories beyond the defaults
|
|
@@ -1127,6 +1151,28 @@ interface VisConfig {
|
|
|
1127
1151
|
*/
|
|
1128
1152
|
templates?: string[];
|
|
1129
1153
|
};
|
|
1154
|
+
/**
|
|
1155
|
+
* Go modules (the `use` entries of `go.work`) as task projects. Off by default.
|
|
1156
|
+
* The root module is not a task project.
|
|
1157
|
+
*/
|
|
1158
|
+
go?: {
|
|
1159
|
+
discover?: boolean;
|
|
1160
|
+
};
|
|
1161
|
+
/**
|
|
1162
|
+
* Gradle projects as task projects. Off by default: a `settings.gradle(.kts)`
|
|
1163
|
+
* with a build script for each module gets build and test targets only when this is set.
|
|
1164
|
+
*/
|
|
1165
|
+
gradle?: {
|
|
1166
|
+
discover?: boolean;
|
|
1167
|
+
};
|
|
1168
|
+
/**
|
|
1169
|
+
* Hex apps as task projects. Off by default: each `<apps_path>/*` app of an umbrella
|
|
1170
|
+
* `mix.exs` gets build, test and format-check targets when this is set. The root project
|
|
1171
|
+
* is not a task project. POSIX only: the inferred commands are not verified on Windows.
|
|
1172
|
+
*/
|
|
1173
|
+
hex?: {
|
|
1174
|
+
discover?: boolean;
|
|
1175
|
+
};
|
|
1130
1176
|
/**
|
|
1131
1177
|
* Auto-create targets from detected config files (Project Crystal-style).
|
|
1132
1178
|
* Detectors run by default; set `false` to disable them entirely, or use
|
|
@@ -1293,6 +1339,13 @@ interface VisConfig {
|
|
|
1293
1339
|
*/
|
|
1294
1340
|
order?: LintAdapterId[];
|
|
1295
1341
|
};
|
|
1342
|
+
/**
|
|
1343
|
+
* Maven modules as task projects. Off by default: a directory with a
|
|
1344
|
+
* `pom.xml` (and a project-root `artifactId`) gets build and test targets only when this is set.
|
|
1345
|
+
*/
|
|
1346
|
+
maven?: {
|
|
1347
|
+
discover?: boolean;
|
|
1348
|
+
};
|
|
1296
1349
|
/**
|
|
1297
1350
|
* `vis-mcp` promotion notice shown after successful commands when an
|
|
1298
1351
|
* AI CLI (Claude Code, Cursor, Windsurf, Continue, Zed, Cline) is
|
|
@@ -1319,6 +1372,14 @@ interface VisConfig {
|
|
|
1319
1372
|
* to task-runner's `namedInputs` but configurable from the vis config.
|
|
1320
1373
|
*/
|
|
1321
1374
|
namedInputs?: NamedInputs;
|
|
1375
|
+
/**
|
|
1376
|
+
* NuGet projects as task projects. Off by default: each directory with one `*.csproj` or
|
|
1377
|
+
* `*.fsproj` (outside `bin`, `obj` and `node_modules`) gets build, test and format:check
|
|
1378
|
+
* targets when this is set. POSIX only: the inferred commands are not verified on Windows.
|
|
1379
|
+
*/
|
|
1380
|
+
nuget?: {
|
|
1381
|
+
discover?: boolean;
|
|
1382
|
+
};
|
|
1322
1383
|
/** Package override mappings applied during migration (e.g., `{ "lodash": "lodash-es" }`) */
|
|
1323
1384
|
overrides?: Record<string, string>;
|
|
1324
1385
|
/**
|
|
@@ -1628,6 +1689,13 @@ interface VisConfig {
|
|
|
1628
1689
|
*/
|
|
1629
1690
|
lockfile?: boolean;
|
|
1630
1691
|
};
|
|
1692
|
+
/**
|
|
1693
|
+
* Python projects as task projects. Off by default: a directory with a
|
|
1694
|
+
* `pyproject.toml` (and `[project]`) gets an inferred build target only when this is set.
|
|
1695
|
+
*/
|
|
1696
|
+
python?: {
|
|
1697
|
+
discover?: boolean;
|
|
1698
|
+
};
|
|
1631
1699
|
/**
|
|
1632
1700
|
* Configuration for the `vis release` subsystem. Controls change-file
|
|
1633
1701
|
* authoring, version computation, channel routing, publish behavior,
|
|
@@ -1698,6 +1766,19 @@ interface VisConfig {
|
|
|
1698
1766
|
* cross-runtime multi-tool (see `rfc/design-runtime-multitool.md`).
|
|
1699
1767
|
*/
|
|
1700
1768
|
runtime?: RuntimeId;
|
|
1769
|
+
/**
|
|
1770
|
+
* Options for `vis sbom`. `ecosystems` opts in ecosystems that the BOM otherwise leaves out:
|
|
1771
|
+
* Maven, Gradle, Hex, Go, Dart, Swift, NuGet and Zig. An ecosystem is also included when its
|
|
1772
|
+
* discover key (`maven.discover`, `go.discover`, ...) is on. Presence of a lock file or manifest
|
|
1773
|
+
* alone does not include it; `vis sbom` reports such ecosystems on stderr instead.
|
|
1774
|
+
* @example
|
|
1775
|
+
* ```
|
|
1776
|
+
* sbom: { ecosystems: ["go", "zig"] }
|
|
1777
|
+
* ```
|
|
1778
|
+
*/
|
|
1779
|
+
sbom?: {
|
|
1780
|
+
ecosystems?: ("dart" | "go" | "gradle" | "hex" | "maven" | "nuget" | "swift" | "zig")[];
|
|
1781
|
+
};
|
|
1701
1782
|
/**
|
|
1702
1783
|
* Cascading scoped-task blocks. Each block may narrow its tasks to a
|
|
1703
1784
|
* subset of projects via `match`. Blocks are evaluated in order; later
|
|
@@ -2524,6 +2605,13 @@ interface VisConfig {
|
|
|
2524
2605
|
* @default false
|
|
2525
2606
|
*/
|
|
2526
2607
|
strictEnv?: boolean;
|
|
2608
|
+
/**
|
|
2609
|
+
* Swift packages (a `Package.swift` directory under the root) as task projects.
|
|
2610
|
+
* Off by default. Commands are `swift build`, `swift test`, and a `swift-format lint --strict` check.
|
|
2611
|
+
*/
|
|
2612
|
+
swift?: {
|
|
2613
|
+
discover?: boolean;
|
|
2614
|
+
};
|
|
2527
2615
|
/**
|
|
2528
2616
|
* Named bundles of target dependencies, referenceable from any task's
|
|
2529
2617
|
* `dependsOn`. `dependsOn: [{ group: "lint" }]` expands to every entry
|
|
@@ -2663,6 +2751,14 @@ interface VisConfig {
|
|
|
2663
2751
|
* @example ">=1.0.0"
|
|
2664
2752
|
*/
|
|
2665
2753
|
versionConstraint?: string;
|
|
2754
|
+
/**
|
|
2755
|
+
* Zig packages as task projects. Off by default: the workspace root's
|
|
2756
|
+
* `build.zig.zon` and its in-workspace `.path` dependencies get build, test and
|
|
2757
|
+
* format-check targets only when this is set. The root itself is not a task project.
|
|
2758
|
+
*/
|
|
2759
|
+
zig?: {
|
|
2760
|
+
discover?: boolean;
|
|
2761
|
+
};
|
|
2666
2762
|
}
|
|
2667
2763
|
/**
|
|
2668
2764
|
* @since 1.0.0
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{createRequire as I}from"node:module";import{L as x,m as K,T as O}from"../packem_shared/target-merge-
|
|
1
|
+
import{createRequire as I}from"node:module";import{L as x,m as K,T as O}from"../packem_shared/target-merge-DVJl-7Qz.js";import{v as _,e as a,m as C}from"../packem_shared/index-BzhrR_iC.js";import{i as M}from"./ts-loader.js";import{otelPlugin as _e}from"../packem_shared/otelPlugin-D8LL2-4L.js";import{definePlugin as Ee}from"../packem_shared/definePlugin-DoUcoYSy.js";import{y as d}from"../packem_shared/isAccessibleSync-DYKTrrvc-C-_5cgwu.js";import{h as m}from"../packem_shared/writeFileSync-DJoHk3Ks-BPRoepNw.js";import{p as S}from"../packem_shared/readJsonSync-CbryXYxN-EWl7_7KX.js";let N;const F=e=>(N??=I(import.meta.url))(e),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=e=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[s,t]=l.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return l.getBuiltinModule(e)}return F(e)},{createHash:w}=v("node:crypto"),{readdirSync:$,readFileSync:L}=v("node:fs"),{createRequire:q}=v("node:module");class p extends Error{chain;constructor(s,t,o){super(s,o),this.name=this.constructor.name,this.chain=t}}class P extends p{constructor(s,t){const o=[...t,`${s} (re-enters)`].join(" → ");super(`Config cycle: ${o}`,t)}}class E extends p{filePath;removedKeys;constructor(s,t,o){const r=[`${s} uses removed keys.`,""];for(const n of o){const c=n.location?` (at ${n.location})`:"";r.push(` • ${n.name}${c} → renamed to \`${n.renamedTo}\``);for(const i of n.children??[])r.push(` ↳ ${i.name} → renamed to \`${i.renamedTo}\``)}r.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(r.join(`
|
|
2
2
|
`),t),this.filePath=s,this.removedKeys=o}}class T extends p{constructor(s,t,o){const r=o instanceof Error?o.message:String(o),n=t.length>0?`
|
|
3
3
|
Chain: ${t.join(" → ")}`:"";super(`Failed to load ${s}: ${r}${n}`,t,{cause:o})}}const U=e=>e.join(" → ");class k extends p{constructor(s,t,o){const r=t.length>0?t[t.length-1]:"<unknown>",n=o.length>0?`
|
|
4
4
|
Tried:
|
|
5
5
|
${o.join(`
|
|
6
6
|
`)}`:"";super(`Cannot resolve "${s}" extended from ${r}.${n}
|
|
7
7
|
Chain: ${U(t)}`,t)}}class W extends p{filePath;violations;constructor(s,t,o){const r=[`${s} has an invalid value.`,""];for(const n of o)r.push(` • ${n.location} — expected ${n.expected}, found ${n.found}`);r.push("","See https://visulima.com/docs/packages/vis/configuration for the expected shape."),super(r.join(`
|
|
8
|
-
`),t),this.filePath=s,this.violations=o}}const z=e=>{const s=[];if(Object.hasOwn(e,"targetDefaults")&&s.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&s.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:t}=e,o=[];if(Array.isArray(t))for(const[r,n]of t.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&o.push({location:`taskDefaults[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&o.push({location:`taskDefaults[${r}].targets`,name:"targets",renamedTo:"tasks"}));s.push({children:o.length>0?o:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[t,o]of e.scopedTasks.entries())o&&typeof o=="object"&&(Object.hasOwn(o,"scope")&&s.push({location:`scopedTasks[${t}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(o,"targets")&&s.push({location:`scopedTasks[${t}].targets`,name:"targets",renamedTo:"tasks"}));return s},B=e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],H=(e,s,t)=>{if(!t||typeof t!="object")return;const o=z(t);if(o.length>0)throw new E(e,s,o)},Y=(e,s,t)=>{if(!t||typeof t!="object")return;const o=B(t);if(o.length>0)throw new E(e,s,o)},h=e=>{if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e=="object"){const s=Object.keys(e);return s.length>0?`an object with { ${s.join(", ")} }`:"an empty object"}return typeof e},g=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),J=e=>{const s=[];if(!Object.hasOwn(e,"scopedTasks")||e.scopedTasks===void 0)return s;const{scopedTasks:t}=e;if(!Array.isArray(t))return s.push({expected:"an array of `{ match?, tasks }` blocks",found:h(t),location:"scopedTasks"}),s;for(const[o,r]of t.entries()){const n=`scopedTasks[${o}]`;if(!g(r)){s.push({expected:"a `{ match?, tasks }` block",found:h(r),location:n});continue}g(r.tasks)||s.push({expected:"`tasks` to be an object keyed by target name",found:r.tasks===void 0?`a block with { ${Object.keys(r).join(", ")} }`:h(r.tasks),location:`${n}.tasks`}),r.match!==void 0&&!g(r.match)&&s.push({expected:"`match` to be an object of project constraints",found:h(r.match),location:`${n}.match`})}return s},Q=(e,s,t)=>{if(!t||typeof t!="object")return;const o=J(t);if(o.length>0)throw new W(e,s,o)},D=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],X=new Set(D),A=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Z=new Set(A),
|
|
9
|
-
`);return s.digest("hex")},ne=e=>{const s=a(e,"node_modules");if(d(s)){const o=a(s,".cache","vis");return m(o),a(o,"vis-config-cache.json")}const t=x("vis",{create:!0,cwd:e});return t?a(t,"vis-config-cache.json"):void 0},re=(e,s)=>{if(d(e))try{const t=S(e);if(t.hash===s)return t.config}catch{}},ce=(e,s,t)=>{try{m(C(e)),O(e,{config:t,hash:s})}catch{}},ie=e=>e===void 0?[]:Array.isArray(e)?e:[e],ae=(e,s,t)=>{if(_(e))throw new k(e,[...t,s],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const o=[];if(e.startsWith("./")||e.startsWith("../")){const r=C(s),n=a(r,e);if(o.push(n),d(n))return n;throw new k(e,[...t,s],o)}try{return q(s).resolve(e)}catch{throw o.push(`require.resolve("${e}") from ${s}`),new k(e,[...t,s],o)}},G=async(e,s)=>{let t;try{t=(await M(e)).default??{}}catch(o){throw new T(e,s,o)}try{return(typeof t=="function"?await t()??{}:t)??{}}catch(o){throw new T(e,s,o)}},fe=(e,s)=>{const t={...e,...s};if(e.tasks||s.tasks){const o=new Set([...Object.keys(e.tasks??{}),...Object.keys(s.tasks??{})]),r={};for(const n of o)r[n]=K(e.tasks?.[n],s.tasks?.[n]);t.tasks=r}if((e.scopedTasks||s.scopedTasks)&&(t.scopedTasks=[...e.scopedTasks??[],...s.scopedTasks??[]]),(e.fileGroups||s.fileGroups)&&(t.fileGroups={...e.fileGroups,...s.fileGroups}),(e.taskGroups||s.taskGroups)&&(t.taskGroups={...e.taskGroups,...s.taskGroups}),e.security||s.security){const o=e.security?.policies??{},r=s.security?.policies??{},n={...o,...r};for(const c of Object.keys(o)){const i=o[c],f=r[c];i!==void 0&&f!==void 0&&(n[c]={...i,...f})}t.security={...e.security,...s.security,acceptedRisks:{...e.security?.acceptedRisks,...s.security?.acceptedRisks},policies:n}}return(e.update||s.update)&&(t.update={...e.update,...s.update}),(e.taskRunner||s.taskRunner)&&(t.taskRunner={...e.taskRunner,...s.taskRunner}),delete t.extends,t},R=async(e,s,t,o,r)=>{if(t.has(e))throw new P(e,s);if(!o.has(e)){t.add(e);try{const n=await G(e,s);H(e,s,n),Q(e,s,n);const c=ie(n.extends);for(const i of c){const f=ae(i,e,s);await R(f,[...s,e],t,o,r)}o.set(e,n),r.push(e)}finally{t.delete(e)}}},
|
|
8
|
+
`),t),this.filePath=s,this.violations=o}}const z=e=>{const s=[];if(Object.hasOwn(e,"targetDefaults")&&s.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&s.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:t}=e,o=[];if(Array.isArray(t))for(const[r,n]of t.entries())n&&typeof n=="object"&&(Object.hasOwn(n,"scope")&&o.push({location:`taskDefaults[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(n,"targets")&&o.push({location:`taskDefaults[${r}].targets`,name:"targets",renamedTo:"tasks"}));s.push({children:o.length>0?o:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[t,o]of e.scopedTasks.entries())o&&typeof o=="object"&&(Object.hasOwn(o,"scope")&&s.push({location:`scopedTasks[${t}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(o,"targets")&&s.push({location:`scopedTasks[${t}].targets`,name:"targets",renamedTo:"tasks"}));return s},B=e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],H=(e,s,t)=>{if(!t||typeof t!="object")return;const o=z(t);if(o.length>0)throw new E(e,s,o)},Y=(e,s,t)=>{if(!t||typeof t!="object")return;const o=B(t);if(o.length>0)throw new E(e,s,o)},h=e=>{if(e===null)return"null";if(Array.isArray(e))return"an array";if(typeof e=="object"){const s=Object.keys(e);return s.length>0?`an object with { ${s.join(", ")} }`:"an empty object"}return typeof e},g=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),J=e=>{const s=[];if(!Object.hasOwn(e,"scopedTasks")||e.scopedTasks===void 0)return s;const{scopedTasks:t}=e;if(!Array.isArray(t))return s.push({expected:"an array of `{ match?, tasks }` blocks",found:h(t),location:"scopedTasks"}),s;for(const[o,r]of t.entries()){const n=`scopedTasks[${o}]`;if(!g(r)){s.push({expected:"a `{ match?, tasks }` block",found:h(r),location:n});continue}g(r.tasks)||s.push({expected:"`tasks` to be an object keyed by target name",found:r.tasks===void 0?`a block with { ${Object.keys(r).join(", ")} }`:h(r.tasks),location:`${n}.tasks`}),r.match!==void 0&&!g(r.match)&&s.push({expected:"`match` to be an object of project constraints",found:h(r.match),location:`${n}.match`})}return s},Q=(e,s,t)=>{if(!t||typeof t!="object")return;const o=J(t);if(o.length>0)throw new W(e,s,o)},D=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],X=new Set(D),A=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Z=new Set(A),je=2880,y={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},ee=e=>{if(!e)return{...y};const s=y.policies??{},t=e.policies??{},o={...s,...t};for(const r of Object.keys(s)){const n=s[r],c=t[r];n!==void 0&&c!==void 0&&(o[r]={...n,...c})}return{...y,...e,policies:o}},b=e=>({...e,security:ee(e.security),update:{security:!0,target:"minor",...e.update}}),se=e=>{let s;try{s=$(e)}catch{return}const t=new Set(s.filter(o=>X.has(o)));for(const o of D)if(t.has(o))return a(e,o)},te=e=>{let s;try{s=$(e)}catch{return}const t=new Set(s.filter(o=>Z.has(o)));for(const o of A)if(t.has(o))return a(e,o)},V=e=>w("sha256").update(L(e)).digest("hex"),oe=e=>{const s=w("sha256"),t=[...e].sort();for(const o of t)s.update(o),s.update(":"),s.update(V(o)),s.update(`
|
|
9
|
+
`);return s.digest("hex")},ne=e=>{const s=a(e,"node_modules");if(d(s)){const o=a(s,".cache","vis");return m(o),a(o,"vis-config-cache.json")}const t=x("vis",{create:!0,cwd:e});return t?a(t,"vis-config-cache.json"):void 0},re=(e,s)=>{if(d(e))try{const t=S(e);if(t.hash===s)return t.config}catch{}},ce=(e,s,t)=>{try{m(C(e)),O(e,{config:t,hash:s})}catch{}},ie=e=>e===void 0?[]:Array.isArray(e)?e:[e],ae=(e,s,t)=>{if(_(e))throw new k(e,[...t,s],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const o=[];if(e.startsWith("./")||e.startsWith("../")){const r=C(s),n=a(r,e);if(o.push(n),d(n))return n;throw new k(e,[...t,s],o)}try{return q(s).resolve(e)}catch{throw o.push(`require.resolve("${e}") from ${s}`),new k(e,[...t,s],o)}},G=async(e,s)=>{let t;try{t=(await M(e)).default??{}}catch(o){throw new T(e,s,o)}try{return(typeof t=="function"?await t()??{}:t)??{}}catch(o){throw new T(e,s,o)}},fe=(e,s)=>{const t={...e,...s};if(e.tasks||s.tasks){const o=new Set([...Object.keys(e.tasks??{}),...Object.keys(s.tasks??{})]),r={};for(const n of o)r[n]=K(e.tasks?.[n],s.tasks?.[n]);t.tasks=r}if((e.scopedTasks||s.scopedTasks)&&(t.scopedTasks=[...e.scopedTasks??[],...s.scopedTasks??[]]),(e.fileGroups||s.fileGroups)&&(t.fileGroups={...e.fileGroups,...s.fileGroups}),(e.taskGroups||s.taskGroups)&&(t.taskGroups={...e.taskGroups,...s.taskGroups}),e.security||s.security){const o=e.security?.policies??{},r=s.security?.policies??{},n={...o,...r};for(const c of Object.keys(o)){const i=o[c],f=r[c];i!==void 0&&f!==void 0&&(n[c]={...i,...f})}t.security={...e.security,...s.security,acceptedRisks:{...e.security?.acceptedRisks,...s.security?.acceptedRisks},policies:n}}return(e.update||s.update)&&(t.update={...e.update,...s.update}),(e.taskRunner||s.taskRunner)&&(t.taskRunner={...e.taskRunner,...s.taskRunner}),delete t.extends,t},R=async(e,s,t,o,r)=>{if(t.has(e))throw new P(e,s);if(!o.has(e)){t.add(e);try{const n=await G(e,s);H(e,s,n),Q(e,s,n);const c=ie(n.extends);for(const i of c){const f=ae(i,e,s);await R(f,[...s,e],t,o,r)}o.set(e,n),r.push(e)}finally{t.delete(e)}}},Te=async(e,s)=>{let t;if(s?.explicitConfigPath){const u=_(s.explicitConfigPath)?s.explicitConfigPath:a(e,s.explicitConfigPath);if(!d(u))throw new Error(`Cannot find config file at ${u}`);t=u}else t=se(e);if(!t)return b({});const o=new Set,r=new Map,n=[];await R(t,[],o,r,n);const c=oe(n),i=ne(e);if(i){const u=re(i,c);if(u)return u}let f={};for(const u of n)f=fe(f,r.get(u));const j=b(f);return i&&ce(i,c,j),j},ue=e=>e.replaceAll(/[^\w.-]+/g,"_"),de=(e,s)=>{const t=a(e,"node_modules"),o=ue(s);if(d(t)){const n=a(t,".cache","vis","task-configs");return m(n),a(n,`${o}.json`)}const r=x("vis",{create:!0,cwd:e});return r?a(r,"task-configs",`${o}.json`):void 0},le=(e,s)=>{if(d(e))try{const t=S(e);if(t.hash===s)return t.config}catch{}},pe=(e,s,t)=>{try{m(C(e)),O(e,{config:t,hash:s})}catch{}},be=async(e,s,t)=>{const o=te(s);if(!o)return;const r=V(o),n=de(e,t);if(n){const f=le(n,r);if(f)return f}const c=await G(o,[]);Y(o,[],c);const i=c;return n&&pe(n,r,i),i},we=e=>e,$e=e=>e;export{D as CONFIG_FILES,je as DEFAULT_MIN_RELEASE_AGE_MINUTES,y as SECURITY_DEFAULTS,A as TASK_CONFIG_FILES,b as applyDefaults,$e as defineConfig,Ee as definePlugin,we as defineTaskConfig,se as findVisConfigFile,te as findVisTaskConfigFile,Te as loadVisConfig,be as loadVisTaskConfig,_e as otelPlugin};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f,F as s,J as c}from"../packem_shared/index.server-sXNQYpsl.js";import{p as r}from"./cli-main.js";import{g as u}from"../packem_shared/osv-bloom-
|
|
1
|
+
import{b as f,F as s,J as c}from"../packem_shared/index.server-sXNQYpsl.js";import{p as r}from"./cli-main.js";import{g as u}from"../packem_shared/osv-bloom-BCAX5ARR.js";const a=t=>{if(!t)return"never";const i=Date.parse(t);if(Number.isNaN(i))return t;const e=Date.now()-i;if(e<0)return t;const n=Math.floor(e/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const o=Math.floor(n/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`},m=t=>t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`,l=async({options:t,workspaceRoot:i})=>{if(!i)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const e=await u(i,t.cacheDir);if(t.format==="json"){process.stdout.write(`${JSON.stringify(e,void 0,2)}
|
|
2
2
|
`);return}if(r.info(`Cache: ${e.cacheDir}`),!e.present){r.warn(`No osv-bloom filter yet. Run ${f("vis advisories bloom sync")} to populate.`);return}if(e.manifest){const{manifest:o}=e;r.info(`Built: ${o.builtAtRfc3339} (${a(o.builtAtRfc3339)})`),r.info(`Fetch: ${e.fetchedAtIso??s("—")} (${a(e.fetchedAtIso)})`),r.info(`Filter: ${c(m(o.bloomByteLen))} m=${o.bloomMBits.toLocaleString()} bits k=${String(o.bloomKHashes)}`),r.info(`Set: ${o.entryCount.toLocaleString()} entries from ${o.advisoryCount.toLocaleString()} advisories (target FPR ${o.targetFpr})`),r.info(s(`Digest: ${o.setDigestSha256}`))}else r.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},g=l;export{g as advisoriesBloomStatusExecute};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F as f}from"../packem_shared/index.server-sXNQYpsl.js";import{p as i}from"./cli-main.js";import{s as d}from"../packem_shared/scan-progress-
|
|
1
|
+
import{F as f}from"../packem_shared/index.server-sXNQYpsl.js";import{p as i}from"./cli-main.js";import{s as d}from"../packem_shared/scan-progress-C_zaZjyY.js";import{D as p,s as D}from"../packem_shared/osv-bloom-BCAX5ARR.js";const h=o=>o?.security?.audit?.advisories?.bloom??{},u=o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,$=o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,b=async({options:o,visConfig:m,workspaceRoot:n})=>{if(!n)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const a=o.format==="json",c=h(m),l=o.source??c.source??p,r=d([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!a});let e,t;try{r.start("bloom");const s=Date.now();e=await D({allowedHosts:c.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:l,workspaceRoot:n}),e.upToDate?r.finish("bloom","ok",`up to date · ${u(Date.now()-s)}`):r.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${u(e.durationMs)}`)}catch(s){t=s instanceof Error?s.message:String(s),r.finish("bloom","error",t)}finally{r.stop()}a?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:t??null,manifest:e?.manifest??null,source:l,upToDate:e?.upToDate??!1},void 0,2)}
|
|
2
2
|
`):e&&(i.info(f(`Cache: ${e.cacheDir}`)),i.info(f(`Built: ${e.manifest.builtAtRfc3339}`)),t||i.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),t&&(process.exitCode=1)},g=b;export{g as advisoriesBloomSyncExecute};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{createRequire as S}from"node:module";import{s as P}from"../packem_shared/index-B4AjSxHU.js";import{VisReleaseError as R}from"../packem_shared/VisReleaseError-DZtgcKf8.js";import{e as b,i as j,f as L,s as F,g as x}from"./index2.js";let O;const q=a=>(O??=S(import.meta.url))(a),_=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,M=a=>{if(typeof _<"u"&&_.versions&&_.versions.node){const[n,s]=_.versions.node.split(".").map(Number);if(n>22||n===22&&s>=3||n===20&&s>=16)return _.getBuiltinModule(a)}return q(a)},{readFile:B}=M("node:fs/promises"),{dirname:$,join:D,resolve:E}=M("node:path"),G=new Set(["package"]),K=new Set(["workspace.package"]),y=new Set(["build-dependencies","dependencies","dev-dependencies"]),V=async(a,n)=>a.get(n)??B(n,"utf8"),I=async(a,n,s)=>{const o=x(n);let i=x(a);for(;;){const d=D(i,"Cargo.toml"),r=await V(s,d).catch(()=>{});if(r!==void 0&&typeof(await b(r,d)).workspace?.package?.version=="string")return d;if(i===o)return;const u=$(i);if(u===i)return;i=u}},W=(a,n)=>{const s=/^([\^~=])?\s*(.+)$/.exec(a.trim());if(!s)return;const o=s[1]??"",i=s[2];if(i.includes("*"))return;const d=o===""?`^${i}`:`${o}${i}`;if(P.validRange(d)&&!P.satisfies(n,d))return`${o}${n}`},T=a=>{const n=a.split(".").map(d=>d.trim()),s=n[n.length-1]??"",o=n[0]==="target"||n[0]==="workspace"||n.length===1||y.has(n[0]??"");if(y.has(s)&&o)return{kind:"table"};const i=n[n.length-2]??"";return y.has(i)&&(n[0]==="target"||n[0]==="workspace"||n.length===2)?{key:s,kind:"dep"}:{kind:"none"}},C=/(version\s*=\s*)(["'])([^"']*)\2/,H=(a,n,s)=>{const o=a.split(`
|
|
2
|
+
`),i=[];let d=!1,r={kind:"none"};const u=(l,f,v,p)=>{if(f===void 0)return;if(f.includes(",")){i.push(`cargo-deps: ${p} has a compound requirement "${f}" in ${n}; left unchanged.`);return}const e=W(f,v);e!==void 0&&(o[l]=o[l].replace(C,(t,c,h)=>`${c}${h}${e}${h}`),d=!0)},w=()=>{if(r.kind!=="dep"||r.path===void 0||r.versionLine===void 0||r.version===void 0)return;const l=s.get(E(n,r.path));l!==void 0&&u(r.versionLine,r.version,l,r.key)};for(const[l,f]of o.entries()){const v=/^\s*\[\[?\s*([^\]]+?)\s*\]\]?\s*(?:#.*)?$/.exec(f);if(v){w(),r=T(v[1].replaceAll(/\s+/g,""));continue}if(r.kind==="table"){const p=/^\s*([^=\s]+)\s*=\s*\{(.*)\}\s*$/.exec(f);if(!p)continue;const e=/path\s*=\s*"([^"]*)"/.exec(p[2])?.[1],t=C.exec(p[2])?.[3];if(e===void 0||t===void 0)continue;const c=s.get(E(n,e));c!==void 0&&u(l,t,c,p[1]);continue}if(r.kind==="dep"){const p=/^\s*path\s*=\s*"([^"]*)"/.exec(f)?.[1];if(p!==void 0){r.path=p;continue}const e=C.exec(f);e&&(r.versionLine=l,r.version=e.at(3))}}return w(),d?{content:o.join(`
|
|
3
|
+
`),warnings:i}:{warnings:i}},X=async a=>{const{crateManifests:n,cwd:s,pending:o,releases:i,rewriteDependents:d=!0,scanManifests:r}=a,u=new Set,w=[],l=new Map,f=new Map;for(const e of i)for(const t of e.manifestPaths)l.set($(t),e.newVersion),f.set(t,e.newVersion);const v=new Map;for(const e of i){if(e.ecosystem!=="cargo")continue;const t=e.manifestPaths[0];if(t===void 0)continue;const c=await V(o,t),h=await b(c,t);if(!j(h.package?.version)){const g=L(c,e.newVersion,G);g.content!==void 0&&(o.set(t,g.content),u.add(t));continue}const m=await I($(t),s,o);if(m===void 0)throw new R({code:"CONFIG_INVALID",file:t,message:`${t} inherits its version, but no ancestor Cargo.toml declares [workspace.package].version.`});const k=v.get(m)??{members:[],version:e.newVersion};k.members.push(t),v.set(m,k)}for(const[e,t]of v){const c=[];for(const g of n){const A=await V(o,g).catch(()=>{});if(A===void 0)continue;const N=await b(A,g);j(N.package?.version)&&await I($(g),s,o)===e&&c.push(g)}const h=c.filter(g=>f.get(g)!==t.version);if(h.length>0)throw new R({code:"CONFIG_INVALID",file:e,message:`Crates inherit [workspace.package].version from ${e}, so they must release together at ${t.version}. Not released at that version: ${h.join(", ")}.`});const m=await V(o,e),k=L(m,t.version,K);k.content!==void 0&&(o.set(e,k.content),u.add(e))}for(const e of d?r:[]){const t=await V(o,e).catch(()=>{});if(t===void 0)continue;const c=H(t,$(e),l);w.push(...c.warnings),c.content!==void 0&&(o.set(e,c.content),u.add(e))}const p=i.flatMap(e=>e.manifestPaths.map(t=>({manifestPath:t,newVersion:e.newVersion})));if(p.length>0){const e=await F({entries:p,pending:o,workspaceRoot:s});w.push(...e.warnings);for(const t of e.writes)u.add(t.path)}return{touched:u,warnings:w}};export{W as nextRequirement,X as planCargoWorkspace,H as rewriteCargoRequirements};
|