@visulima/vis 4.1.20 → 4.2.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 +24 -0
- package/LICENSE.md +804 -360
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/config/index.d.ts +21 -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/catalog.js +49 -49
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +151 -147
- package/dist/packem_chunks/dispatch.js +1 -1
- package/dist/packem_chunks/fix.js +8 -8
- 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 +2 -2
- package/dist/packem_chunks/handler30.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +3 -3
- 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 +1 -1
- 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 +3 -3
- package/dist/packem_chunks/handler66.js +2 -2
- package/dist/packem_chunks/handler67.js +10 -10
- 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 +3 -3
- package/dist/packem_chunks/handler71.js +2 -2
- package/dist/packem_chunks/handler72.js +2 -2
- package/dist/packem_chunks/handler73.js +2 -2
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +18 -18
- package/dist/packem_chunks/handler76.js +3 -3
- package/dist/packem_chunks/handler77.js +2 -2
- package/dist/packem_chunks/handler78.js +64 -64
- 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 +7 -7
- package/dist/packem_chunks/index5.js +2 -2
- package/dist/packem_chunks/index6.js +7 -8
- 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/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- 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_shared/Table-BB8xHTU5-BLPS917D.js +11 -0
- package/dist/packem_shared/{advisories-0ScpWAHV.js → advisories-BSpzRIXP.js} +1 -1
- package/dist/packem_shared/affected-selection-M7riOi5-.js +1 -0
- package/dist/packem_shared/{affected-shas-Dd0P7fGD.js → affected-shas-CAwpSPmP.js} +1 -1
- package/dist/packem_shared/{ai-fix-BHyx1F1j.js → ai-fix-BTm1Z5og.js} +1 -1
- package/dist/packem_shared/{augment-COAiXSIx.js → augment-CBv1hwMR.js} +1 -1
- package/dist/packem_shared/{bin-Bq3tJmvE.js → bin-Cbs_ix6l.js} +1 -1
- package/dist/packem_shared/build-scripts-BIgkWVgY.js +1 -0
- package/dist/packem_shared/{command-runtime-CiLVo4ED.js → command-runtime-BD-4UmPB.js} +1 -1
- package/dist/packem_shared/{cyclonedx-CX2fFvDi.js → cyclonedx-CT1rtKxV.js} +3 -3
- package/dist/packem_shared/dependency-scan-W9b2X0a1.js +1 -0
- package/dist/packem_shared/{docker-Dy-X_BuM.js → docker-1jgKW5Wd.js} +3 -3
- package/dist/packem_shared/failure-log-B91LvYWw.js +2 -0
- package/dist/packem_shared/formatBytes-BHAzNIrn-CLYsxlUj.js +4 -0
- package/dist/packem_shared/glob-Cyk1H9ZL-Dxlf9Swz.js +1 -0
- package/dist/packem_shared/{index-DHD8wb6Z.js → index-CVBR-Kit.js} +5 -5
- package/dist/packem_shared/{index-Vm90Te96.js → index-Cq-J2MdB.js} +1 -1
- package/dist/packem_shared/index-onibYJkv.js +1 -0
- package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-CSnBISfV.js → isAccessibleSync-DYKTrrvc-K2xhg6sV.js} +1 -1
- package/dist/packem_shared/lifecycle-DDJzp-4H.js +2 -0
- package/dist/packem_shared/lockfile-Bi1mw9jJ.js +1 -0
- package/dist/packem_shared/manifests-D671Sb1T.js +1 -0
- package/dist/packem_shared/{min-release-age-ChzTC7_I.js → min-release-age-Da4V046o.js} +7 -7
- package/dist/packem_shared/missing-package-json-CMoHdvmj.js +1 -0
- package/dist/packem_shared/{native-config-sync-BSzU4qUO.js → native-config-sync-CEB0rWlk.js} +2 -2
- package/dist/packem_shared/{osv-bloom-JYIWcH3F.js → osv-bloom-BRacgzs7.js} +1 -1
- package/dist/packem_shared/{package-version-DFlytdgJ.js → package-version-C5EPMgRw.js} +2 -2
- package/dist/packem_shared/packument-DuEV-qSE.js +1 -0
- package/dist/packem_shared/path-CxEa27Rz-pjheKk6v.js +1 -0
- package/dist/packem_shared/pm-runner-9L6ocnu2.js +1 -0
- package/dist/packem_shared/{project-name-filter-CC5FF49q.js → project-name-filter-zrdrEQbu.js} +1 -1
- package/dist/packem_shared/{provenance-BH80RHXx.js → provenance-CFPT_FQA.js} +1 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-BxKjDZnF.js +1 -0
- package/dist/packem_shared/registry-keys-C3EsP_s4.js +1 -0
- package/dist/packem_shared/{resolve-explicit-DuJ3mbzt.js → resolve-explicit-opfIkxoY.js} +1 -1
- package/dist/packem_shared/resolve-runtime-lJ5L9gU4.js +1 -0
- package/dist/packem_shared/run-file-DZff6GqY.js +1 -0
- package/dist/packem_shared/runtime-check-DAbveBr_.js +1 -0
- package/dist/packem_shared/s1ngularity-DTvrfWIM.js +1 -0
- package/dist/packem_shared/{scan-progress-DRIGQRMr.js → scan-progress-BGB9hIrD.js} +2 -2
- package/dist/packem_shared/{selectors-B7lSFz7l.js → selectors-CjIZ3gy2.js} +1 -1
- package/dist/packem_shared/{signatures-BP042BlB.js → signatures-DpqZVmmU.js} +1 -1
- package/dist/packem_shared/spinner-BVCEMm3G.js +1 -0
- package/dist/packem_shared/{tabs-UDYQ3tqt.js → tabs-Dz6xVpfX.js} +1 -1
- package/dist/packem_shared/{target-merge-B4No-LHM.js → target-merge-hsawesT4.js} +1 -1
- package/dist/packem_shared/target-options-Bxb0Y5qa.js +1 -0
- package/dist/packem_shared/toolchain-887JoquG.js +5 -0
- package/dist/packem_shared/typosquats-Xv6dN4sr.js +1 -0
- package/dist/packem_shared/verify-BLoaI7En.js +1 -0
- package/dist/packem_shared/{vis-update-app-CR21zyht.js → vis-update-app-D9KWJ9Ir.js} +1 -1
- package/dist/packem_shared/{vis-user-error-qqqhLoF6.js → vis-user-error-Bdg9NRuJ.js} +15 -15
- package/dist/packem_shared/watch-BTZw2Y8Q.js +1 -0
- package/dist/packem_shared/watch-loop-Cjh2wlUl.js +11 -0
- package/dist/packem_shared/{writeFileSync-DJoHk3Ks-CgQ-VNNT.js → writeFileSync-DJoHk3Ks-O9zOKqeM.js} +1 -1
- package/dist/runtime/preload.js +1 -1
- package/index.d.ts +204 -204
- package/index.js +26 -26
- package/package.json +10 -10
- package/schemas/vis-config.schema.json +14 -0
- package/dist/packem_shared/Table-kgZ-Cd21-DdNsp69H.js +0 -9
- package/dist/packem_shared/affected-selection-Bt4qkPUb.js +0 -1
- package/dist/packem_shared/build-scripts-pdVmqXRm.js +0 -1
- package/dist/packem_shared/dependency-scan-DBH2Qo4I.js +0 -1
- package/dist/packem_shared/failure-log-3R522Vb5.js +0 -2
- package/dist/packem_shared/formatBytes-BHAzNIrn-XohRrPdt.js +0 -4
- package/dist/packem_shared/glob-Cyk1H9ZL-ox19CSsT.js +0 -1
- package/dist/packem_shared/index-Czrll7SU.js +0 -1
- package/dist/packem_shared/lifecycle-CAIJbxIa.js +0 -2
- package/dist/packem_shared/lockfile-DVFySxTS.js +0 -1
- package/dist/packem_shared/manifests-BNSmpPF_.js +0 -1
- package/dist/packem_shared/missing-package-json-C0keIt78.js +0 -1
- package/dist/packem_shared/packument-DyuhH1Gz.js +0 -1
- package/dist/packem_shared/pm-runner-d93_73O6.js +0 -1
- package/dist/packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js +0 -1
- package/dist/packem_shared/registry-keys-BWHRFWbb.js +0 -1
- package/dist/packem_shared/resolve-runtime-C7NBCA1C.js +0 -1
- package/dist/packem_shared/run-file-jMngGQhs.js +0 -1
- package/dist/packem_shared/runtime-check-BklgEMkC.js +0 -1
- package/dist/packem_shared/s1ngularity-BJ5j2vbJ.js +0 -1
- package/dist/packem_shared/spinner-BM_0Bj6x.js +0 -1
- package/dist/packem_shared/target-options-d_rIrLyq.js +0 -1
- package/dist/packem_shared/toolchain-DY11tPCw.js +0 -5
- package/dist/packem_shared/typosquats-CSkIFgF5.js +0 -1
- package/dist/packem_shared/verify-D8wYvB85.js +0 -1
- package/dist/packem_shared/watch-Dswvj6Zp.js +0 -1
- package/dist/packem_shared/watch-loop-COWvvSbR.js +0 -11
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-Cbs_ix6l.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-Bdg9NRuJ.js";import{t as n}from"./packem_shared/compile-cache-DoMHRsRZ.js";import{g as o}from"./packem_shared/package-version-C5EPMgRw.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
|
@@ -887,6 +887,27 @@ interface ScopedTasksBlock {
|
|
|
887
887
|
tasks: Record<string, Partial<VisTargetConfiguration>>;
|
|
888
888
|
}
|
|
889
889
|
interface VisConfig {
|
|
890
|
+
/**
|
|
891
|
+
* Workspace-relative glob patterns for changed files outside every
|
|
892
|
+
* project that `vis affected`, `vis run --affected`, `vis ci` and
|
|
893
|
+
* `vis ci ignore` should not count as a change.
|
|
894
|
+
*
|
|
895
|
+
* By default a changed file that belongs to no project (a root
|
|
896
|
+
* `tsconfig.json`, `package.json`, …) is a global change and marks every
|
|
897
|
+
* project affected. A changed file matching one of these patterns is
|
|
898
|
+
* skipped instead. The patterns are only checked for files that belong
|
|
899
|
+
* to NO project: a file inside a project root is never filtered, so a
|
|
900
|
+
* broad pattern like `*.md` cannot hide a real package change.
|
|
901
|
+
*
|
|
902
|
+
* Patterns use `path.matchesGlob` syntax, where `*` does not cross `/`:
|
|
903
|
+
* `*.md` matches `README.md` but not `docs/guide.md`.
|
|
904
|
+
*
|
|
905
|
+
* Do NOT list paths whose changes really do affect projects, such as
|
|
906
|
+
* bundler-inlined shared source or the root `tsconfig.json`: an edit
|
|
907
|
+
* there would then run nothing.
|
|
908
|
+
* @example ["api-snapshots/**", "plans/**", "*.md"]
|
|
909
|
+
*/
|
|
910
|
+
affectedIgnore?: string[];
|
|
890
911
|
/** AI analysis configuration */
|
|
891
912
|
ai?: {
|
|
892
913
|
/** Cache TTL in milliseconds. Overrides default (1h / 30min for security). */
|
|
@@ -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-hsawesT4.js";import"../packem_shared/index-CVBR-Kit.js";import{v as _,e as a,m as C}from"../packem_shared/path-CxEa27Rz-pjheKk6v.js";import{i as M}from"./ts-loader.js";import{otelPlugin as Se}from"../packem_shared/otelPlugin-D8LL2-4L.js";import{definePlugin as De}from"../packem_shared/definePlugin-DoUcoYSy.js";import{y as d}from"../packem_shared/isAccessibleSync-DYKTrrvc-K2xhg6sV.js";import{h as m}from"../packem_shared/writeFileSync-DJoHk3Ks-O9zOKqeM.js";import{p as S}from"../packem_shared/readJsonSync-CbryXYxN-BxKjDZnF.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),Te=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)}}},be=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{}},we=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},$e=e=>e,xe=e=>e;export{D as CONFIG_FILES,Te as DEFAULT_MIN_RELEASE_AGE_MINUTES,y as SECURITY_DEFAULTS,A as TASK_CONFIG_FILES,b as applyDefaults,xe as defineConfig,De as definePlugin,$e as defineTaskConfig,se as findVisConfigFile,te as findVisTaskConfigFile,be as loadVisConfig,we as loadVisTaskConfig,Se 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-BRacgzs7.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-BGB9hIrD.js";import{D as p,s as D}from"../packem_shared/osv-bloom-BRacgzs7.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};
|