@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,100 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
rmSync
|
|
22
|
-
} = __cjs_getBuiltinModule("node:fs");
|
|
23
|
-
const {
|
|
24
|
-
homedir
|
|
25
|
-
} = __cjs_getBuiltinModule("node:os");
|
|
26
|
-
const {
|
|
27
|
-
createInterface
|
|
28
|
-
} = __cjs_getBuiltinModule("node:readline");
|
|
29
|
-
import { isAccessibleSync, readFileSync, writeFileSync } from '@visulima/fs';
|
|
30
|
-
import { join } from '@visulima/path';
|
|
31
|
-
|
|
32
|
-
const VIS_HOME = join(homedir(), ".vis");
|
|
33
|
-
const SHELL_PROFILES = [
|
|
34
|
-
join(homedir(), ".zshrc"),
|
|
35
|
-
join(homedir(), ".zshenv"),
|
|
36
|
-
join(homedir(), ".bashrc"),
|
|
37
|
-
join(homedir(), ".bash_profile"),
|
|
38
|
-
join(homedir(), ".profile"),
|
|
39
|
-
join(homedir(), ".config", "fish", "config.fish")
|
|
40
|
-
];
|
|
41
|
-
const cleanShellProfiles = (logger) => {
|
|
42
|
-
const cleaned = [];
|
|
43
|
-
for (const profile of SHELL_PROFILES) {
|
|
44
|
-
if (!isAccessibleSync(profile)) {
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
try {
|
|
48
|
-
const content = readFileSync(profile);
|
|
49
|
-
const lines = content.split("\n");
|
|
50
|
-
const filtered = lines.filter((line) => !line.includes(".vis/bin") && !line.includes("VIS_HOME") && !line.includes("# vis "));
|
|
51
|
-
if (filtered.length !== lines.length) {
|
|
52
|
-
writeFileSync(profile, filtered.join("\n"));
|
|
53
|
-
cleaned.push(profile);
|
|
54
|
-
}
|
|
55
|
-
} catch {
|
|
56
|
-
logger.warn(`warning: could not clean ${profile}`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return cleaned;
|
|
60
|
-
};
|
|
61
|
-
const execute = async ({ logger, options }) => {
|
|
62
|
-
if (!isAccessibleSync(VIS_HOME)) {
|
|
63
|
-
logger.info("vis is not installed (no ~/.vis directory found).");
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
logger.info("This will remove:");
|
|
67
|
-
logger.info(` ${VIS_HOME}/`);
|
|
68
|
-
const shellFiles = SHELL_PROFILES.filter((p) => isAccessibleSync(p) && readFileSync(p).includes(".vis"));
|
|
69
|
-
for (const file of shellFiles) {
|
|
70
|
-
logger.info(` Lines in ${file}`);
|
|
71
|
-
}
|
|
72
|
-
if (!options.yes) {
|
|
73
|
-
if (!process.stdin.isTTY) {
|
|
74
|
-
throw new Error("Non-interactive terminal. Use --yes to confirm.");
|
|
75
|
-
}
|
|
76
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
77
|
-
const answer = await new Promise((resolve) => {
|
|
78
|
-
rl.question('\nType "uninstall" to confirm: ', resolve);
|
|
79
|
-
});
|
|
80
|
-
rl.close();
|
|
81
|
-
if (answer.trim() !== "uninstall") {
|
|
82
|
-
logger.info("Aborted.");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const cleaned = cleanShellProfiles(logger);
|
|
87
|
-
for (const file of cleaned) {
|
|
88
|
-
logger.info(`Cleaned ${file}`);
|
|
89
|
-
}
|
|
90
|
-
try {
|
|
91
|
-
rmSync(VIS_HOME, { force: true, recursive: true });
|
|
92
|
-
logger.info(`
|
|
93
|
-
✓ Removed ${VIS_HOME}`);
|
|
94
|
-
} catch (error) {
|
|
95
|
-
throw new Error(`Failed to remove ${VIS_HOME}: ${error instanceof Error ? error.message : String(error)}`);
|
|
96
|
-
}
|
|
97
|
-
logger.info("✓ vis has been uninstalled.");
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export { execute as default };
|
|
1
|
+
var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as y}from"node:module";import{isAccessibleSync as u,readFileSync as p,writeFileSync as j}from"@visulima/fs";import{join as r}from"@visulima/path";const _=y(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return _(e)},"__cjs_getBuiltinModule"),{rmSync:b}=d("node:fs"),{homedir:o}=d("node:os"),{createInterface:w}=d("node:readline");var S=Object.defineProperty,m=a((e,i)=>S(e,"name",{value:i,configurable:!0}),"l");const f=r(o(),".vis"),h=[r(o(),".zshrc"),r(o(),".zshenv"),r(o(),".bashrc"),r(o(),".bash_profile"),r(o(),".profile"),r(o(),".config","fish","config.fish")],T=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
|
|
2
|
+
`),n=l.filter(t=>!t.includes(".vis/bin")&&!t.includes("VIS_HOME")&&!t.includes("# vis "));n.length!==l.length&&(j(s,n.join(`
|
|
3
|
+
`)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),F=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(n=>u(n)&&p(n).includes(".vis"));for(const n of s)e.info(` Lines in ${n}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const n=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{n.question(`
|
|
4
|
+
Type "uninstall" to confirm: `,v)});if(n.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=T(e);for(const n of l)e.info(`Cleaned ${n}`);try{b(f,{force:!0,recursive:!0}),e.info(`
|
|
5
|
+
✓ Removed ${f}`)}catch(n){throw new Error(`Failed to remove ${f}: ${n instanceof Error?n.message:String(n)}`,{cause:n})}e.info("✓ vis has been uninstalled.")},"execute");export{F as default};
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const execute = async ({ argument, logger, options, visConfig, workspaceRoot: wsRoot }) => {
|
|
4
|
-
if (!argument || argument.length === 0) {
|
|
5
|
-
throw new Error("No package specified. Usage: vis info <package> [field...]");
|
|
6
|
-
}
|
|
7
|
-
const [pkg, ...fields] = argument;
|
|
8
|
-
const cwd = wsRoot ?? process.cwd();
|
|
9
|
-
const pm = resolveInstaller(cwd, { configBackend: visConfig?.install?.backend });
|
|
10
|
-
const code = runInfo(
|
|
11
|
-
pm,
|
|
12
|
-
{
|
|
13
|
-
fields,
|
|
14
|
-
json: options.json || false,
|
|
15
|
-
package: pkg
|
|
16
|
-
},
|
|
17
|
-
cwd,
|
|
18
|
-
logger
|
|
19
|
-
);
|
|
20
|
-
if (code !== 0 && code !== 1) {
|
|
21
|
-
process.exitCode = code;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export { execute as default };
|
|
1
|
+
var l=Object.defineProperty;var r=(e,a)=>l(e,"name",{value:a,configurable:!0});import{m as g,D as d}from"./bin.js";var k=Object.defineProperty,m=r((e,a)=>k(e,"name",{value:a,configurable:!0}),"t");const w=m(async({argument:e,logger:a,options:c,visConfig:s,workspaceRoot:i})=>{if(!e||e.length===0)throw new Error("No package specified. Usage: vis info <package> [field...]");const[t,...f]=e,n=i??process.cwd(),p=g(n,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),o=d(p,{fields:f,json:c.json||!1,package:t},n,a);o!==0&&o!==1&&(process.exitCode=o)},"execute");export{w as default};
|