@visulima/vis 1.0.0-alpha.11 → 1.0.0-alpha.13
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 +101 -0
- package/LICENSE.md +559 -186
- package/README.md +18 -0
- package/dist/bin.js +1 -9
- package/dist/config/index.d.ts +477 -556
- package/dist/config/index.js +1 -2
- package/dist/generate/index.js +1 -3
- package/dist/packem_chunks/applyDefaults.js +2 -336
- package/dist/packem_chunks/bin.js +234 -9552
- package/dist/packem_chunks/doctor-probe.js +2 -112
- package/dist/packem_chunks/fix.js +11 -234
- package/dist/packem_chunks/handler.js +1 -99
- package/dist/packem_chunks/handler10.js +2 -53
- package/dist/packem_chunks/handler11.js +1 -32
- package/dist/packem_chunks/handler12.js +5 -100
- package/dist/packem_chunks/handler13.js +1 -25
- package/dist/packem_chunks/handler14.js +18 -916
- package/dist/packem_chunks/handler15.js +15 -201
- package/dist/packem_chunks/handler16.js +1 -124
- package/dist/packem_chunks/handler17.js +1 -13
- package/dist/packem_chunks/handler18.js +1 -106
- package/dist/packem_chunks/handler19.js +1 -19
- package/dist/packem_chunks/handler2.js +2 -75
- package/dist/packem_chunks/handler20.js +5 -29
- package/dist/packem_chunks/handler21.js +1 -222
- package/dist/packem_chunks/handler22.js +1 -237
- package/dist/packem_chunks/handler23.js +5 -101
- package/dist/packem_chunks/handler24.js +1 -110
- package/dist/packem_chunks/handler25.js +3 -402
- package/dist/packem_chunks/handler26.js +1 -13
- package/dist/packem_chunks/handler27.js +1 -63
- package/dist/packem_chunks/handler28.js +7 -34
- package/dist/packem_chunks/handler29.js +21 -456
- package/dist/packem_chunks/handler3.js +4 -95
- package/dist/packem_chunks/handler30.js +3 -170
- package/dist/packem_chunks/handler31.js +1 -530
- package/dist/packem_chunks/handler32.js +2 -214
- package/dist/packem_chunks/handler33.js +25 -119
- package/dist/packem_chunks/handler34.js +2 -630
- package/dist/packem_chunks/handler35.js +3 -283
- package/dist/packem_chunks/handler36.js +22 -542
- package/dist/packem_chunks/handler37.js +410 -744
- package/dist/packem_chunks/handler38.js +22 -989
- package/dist/packem_chunks/handler39.js +22 -574
- package/dist/packem_chunks/handler4.js +2 -90
- package/dist/packem_chunks/handler40.js +22 -1685
- package/dist/packem_chunks/handler41.js +6 -1088
- package/dist/packem_chunks/handler42.js +5 -797
- package/dist/packem_chunks/handler43.js +10 -2658
- package/dist/packem_chunks/handler44.js +51 -3784
- package/dist/packem_chunks/handler45.js +25 -2574
- package/dist/packem_chunks/handler46.js +3 -3769
- package/dist/packem_chunks/handler47.js +21 -1485
- package/dist/packem_chunks/handler48.js +42 -0
- package/dist/packem_chunks/handler5.js +8 -174
- package/dist/packem_chunks/handler6.js +1 -95
- package/dist/packem_chunks/handler7.js +1 -115
- package/dist/packem_chunks/handler8.js +1 -12
- package/dist/packem_chunks/handler9.js +1 -29
- package/dist/packem_chunks/heal-accept.js +10 -522
- package/dist/packem_chunks/heal.js +14 -673
- package/dist/packem_chunks/index.js +7 -873
- package/dist/packem_chunks/loader.js +1 -23
- package/dist/packem_chunks/tar.js +3 -0
- package/dist/packem_shared/ai-analysis-hm8d2W7z.js +67 -0
- package/dist/packem_shared/ai-cache-DoiF80AR.js +1 -0
- package/dist/packem_shared/ai-fix-nn4zOE95.js +43 -0
- package/dist/packem_shared/cache-directory-CwHlJhgx.js +1 -0
- package/dist/packem_shared/dependency-scan-COr5n63B.js +2 -0
- package/dist/packem_shared/docker-D6OGr5_S.js +2 -0
- package/dist/packem_shared/failure-log-iUVLf6ts.js +2 -0
- package/dist/packem_shared/flakiness-D9wf0t56.js +1 -0
- package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
- package/dist/packem_shared/index-DH-5hsrC.js +1 -0
- package/dist/packem_shared/otel-DxDUPJJH.js +6 -0
- package/dist/packem_shared/otelPlugin-CQq6poq8.js +1 -0
- package/dist/packem_shared/registry-CkubDdiY.js +2 -0
- package/dist/packem_shared/run-summary-utils-BfBvjzhY.js +1 -0
- package/dist/packem_shared/runtime-check-BXZ43CBW.js +1 -0
- package/dist/packem_shared/selectors-BylODRiM.js +3 -0
- package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
- package/dist/packem_shared/toolchain-BgBOUHII.js +5 -0
- package/dist/packem_shared/typosquats-CcZl99B1.js +1 -0
- package/dist/packem_shared/use-measured-height-DjYgUOKk.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/dist/packem_shared/verify-Baj5mFJ7.js +1 -0
- package/dist/packem_shared/vis-update-app-D1jl0UZZ.js +1 -0
- package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
- package/index.js +556 -727
- package/package.json +19 -29
- package/schemas/project.schema.json +739 -297
- package/schemas/vis-config.schema.json +3365 -384
- package/templates/buildkite-ci/template.yml +20 -20
- package/dist/packem_shared/VisUpdateApp-D-Yz_wvg.js +0 -1316
- package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +0 -5
- package/dist/packem_shared/ai-analysis-CHeB1joD.js +0 -367
- package/dist/packem_shared/ai-cache-Be_jexe4.js +0 -142
- package/dist/packem_shared/ai-fix-B9iQVcD2.js +0 -379
- package/dist/packem_shared/cache-directory-2qvs4goY.js +0 -98
- package/dist/packem_shared/catalog-BJTtyi-O.js +0 -1371
- package/dist/packem_shared/dependency-scan-A0KSklpG.js +0 -188
- package/dist/packem_shared/docker-2iZzc280.js +0 -181
- package/dist/packem_shared/failure-log-Cz3Z4SKL.js +0 -100
- package/dist/packem_shared/flakiness-goTxXuCX.js +0 -180
- package/dist/packem_shared/otel-DCvqCTz_.js +0 -158
- package/dist/packem_shared/otelPlugin-DFaLDvJf.js +0 -3
- package/dist/packem_shared/registry-CbqXI0rc.js +0 -272
- package/dist/packem_shared/run-summary-utils-PVMl4aIh.js +0 -130
- package/dist/packem_shared/runtime-check-Cobi3p6l.js +0 -127
- package/dist/packem_shared/selectors-SM69TfqC.js +0 -194
- package/dist/packem_shared/symbols-Ta7g2nU-.js +0 -14
- package/dist/packem_shared/toolchain-BdZd9eBi.js +0 -975
- package/dist/packem_shared/typosquats-C-bCh3PX.js +0 -1210
- package/dist/packem_shared/use-measured-height-CNP0vT4M.js +0 -20
- package/dist/packem_shared/utils-CthVdBPS.js +0 -40
- package/dist/packem_shared/xxh3-Ck8mXNg1.js +0 -239
|
@@ -1,90 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const __cjs_require = __cjs_createRequire(import.meta.url);
|
|
4
|
-
|
|
5
|
-
const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
|
|
6
|
-
|
|
7
|
-
const __cjs_getBuiltinModule = (module) => {
|
|
8
|
-
// Check if we're in Node.js and version supports getBuiltinModule
|
|
9
|
-
if (typeof __cjs_getProcess !== "undefined" && __cjs_getProcess.versions && __cjs_getProcess.versions.node) {
|
|
10
|
-
const [major, minor] = __cjs_getProcess.versions.node.split(".").map(Number);
|
|
11
|
-
// Node.js 20.16.0+ and 22.3.0+
|
|
12
|
-
if (major > 22 || (major === 22 && minor >= 3) || (major === 20 && minor >= 16)) {
|
|
13
|
-
return __cjs_getProcess.getBuiltinModule(module);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
// Fallback to createRequire
|
|
17
|
-
return __cjs_require(module);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const {
|
|
21
|
-
spawnSync
|
|
22
|
-
} = __cjs_getBuiltinModule("node:child_process");
|
|
23
|
-
import { c as detectPm, p as pail, s as scanUnapprovedBuildScripts, e as syncAllowBuildsToNativeConfig } from './bin.js';
|
|
24
|
-
|
|
25
|
-
const execute = async ({ options, visConfig, workspaceRoot: wsRoot }) => {
|
|
26
|
-
const cwd = wsRoot ?? process.cwd();
|
|
27
|
-
const pm = detectPm(cwd);
|
|
28
|
-
if (pm.name === "pnpm" && !options.scan) {
|
|
29
|
-
pail.info("Delegating to pnpm approve-builds...");
|
|
30
|
-
const pnpmArgs = ["approve-builds"];
|
|
31
|
-
if (options.all) {
|
|
32
|
-
pnpmArgs.push("--all");
|
|
33
|
-
}
|
|
34
|
-
const result = spawnSync("pnpm", pnpmArgs, { cwd, stdio: "inherit" });
|
|
35
|
-
if (result.error) {
|
|
36
|
-
throw new Error(`Failed to run pnpm approve-builds: ${result.error.message}`);
|
|
37
|
-
}
|
|
38
|
-
if (result.status !== 0 && result.status !== null) {
|
|
39
|
-
pail.error(`pnpm approve-builds exited with code ${result.status}`);
|
|
40
|
-
process.exitCode = result.status;
|
|
41
|
-
}
|
|
42
|
-
if (!options.syncNative) {
|
|
43
|
-
pail.notice("");
|
|
44
|
-
pail.notice("Tip: vis.config.ts security.allowBuilds may now be out of sync with pnpm-workspace.yaml.");
|
|
45
|
-
pail.notice("Run 'vis check --security-config' to compare, or copy the new entries into vis.config.ts.");
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
} else {
|
|
49
|
-
const allowBuilds = visConfig?.security?.allowBuilds ?? {};
|
|
50
|
-
const unapproved = scanUnapprovedBuildScripts(cwd, allowBuilds);
|
|
51
|
-
if (unapproved.length === 0) {
|
|
52
|
-
pail.success("No unapproved build scripts found.");
|
|
53
|
-
} else {
|
|
54
|
-
pail.warn(`Found ${unapproved.length} package${unapproved.length === 1 ? "" : "s"} with unapproved build scripts:
|
|
55
|
-
`);
|
|
56
|
-
for (const pkg of unapproved) {
|
|
57
|
-
pail.info(` ${pkg}`);
|
|
58
|
-
}
|
|
59
|
-
pail.notice("");
|
|
60
|
-
pail.notice("To approve these packages, add them to vis.config.ts:");
|
|
61
|
-
pail.notice("");
|
|
62
|
-
pail.notice(" security: {");
|
|
63
|
-
pail.notice(" allowBuilds: {");
|
|
64
|
-
for (const pkg of unapproved) {
|
|
65
|
-
const name = pkg.split(" (")[0];
|
|
66
|
-
pail.notice(` "${name}": true,`);
|
|
67
|
-
}
|
|
68
|
-
pail.notice(" },");
|
|
69
|
-
pail.notice(" },");
|
|
70
|
-
if (pm.name === "pnpm") {
|
|
71
|
-
pail.notice("");
|
|
72
|
-
pail.notice("Or run 'pnpm approve-builds' to update pnpm-workspace.yaml directly.");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (options.syncNative) {
|
|
77
|
-
const allowBuilds = visConfig?.security?.allowBuilds ?? {};
|
|
78
|
-
if (Object.keys(allowBuilds).length === 0) {
|
|
79
|
-
pail.warn("No security.allowBuilds configured in vis.config.ts. Nothing to sync.");
|
|
80
|
-
} else {
|
|
81
|
-
const actions = syncAllowBuildsToNativeConfig(pm.name, cwd, allowBuilds);
|
|
82
|
-
pail.info("");
|
|
83
|
-
for (const action of actions) {
|
|
84
|
-
pail.success(action);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export { execute as default };
|
|
1
|
+
var d=Object.defineProperty;var l=(s,t)=>d(s,"name",{value:t,configurable:!0});import{createRequire as f}from"node:module";import{A as y,p as e,I as w,T as h}from"./bin.js";const m=f(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=l(s=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[t,r]=c.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return c.getBuiltinModule(s)}return m(s)},"__cjs_getBuiltinModule"),{spawnSync:v}=g("node:child_process");var b=Object.defineProperty,_=l((s,t)=>b(s,"name",{value:t,configurable:!0}),"p");const N=_(async({options:s,visConfig:t,workspaceRoot:r})=>{const p=r??process.cwd(),a=y(p);if(a.name==="pnpm"&&!s.scan){e.info("Delegating to pnpm approve-builds...");const i=["approve-builds"];s.all&&i.push("--all");const o=v("pnpm",i,{cwd:p,stdio:"inherit"});if(o.error)throw new Error(`Failed to run pnpm approve-builds: ${o.error.message}`);if(o.status!==0&&o.status!==null&&(e.error(`pnpm approve-builds exited with code ${o.status}`),process.exitCode=o.status),!s.syncNative){e.notice(""),e.notice("Tip: vis.config.ts security.allowBuilds may now be out of sync with pnpm-workspace.yaml."),e.notice("Run 'vis check --security-config' to compare, or copy the new entries into vis.config.ts.");return}}else{const i=t?.security?.allowBuilds??{},o=w(p,i);if(o.length===0)e.success("No unapproved build scripts found.");else{e.warn(`Found ${o.length} package${o.length===1?"":"s"} with unapproved build scripts:
|
|
2
|
+
`);for(const n of o)e.info(` ${n}`);e.notice(""),e.notice("To approve these packages, add them to vis.config.ts:"),e.notice(""),e.notice(" security: {"),e.notice(" allowBuilds: {");for(const n of o){const u=n.split(" (")[0];e.notice(` "${u}": true,`)}e.notice(" },"),e.notice(" },"),a.name==="pnpm"&&(e.notice(""),e.notice("Or run 'pnpm approve-builds' to update pnpm-workspace.yaml directly."))}}if(s.syncNative){const i=t?.security?.allowBuilds??{};if(Object.keys(i).length===0)e.warn("No security.allowBuilds configured in vis.config.ts. Nothing to sync.");else{const o=h(a.name,p,i);e.info("");for(const n of o)e.success(n)}}},"execute");export{N as default};
|