@visulima/vis 1.0.0-alpha.10 → 1.0.0-alpha.11

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +95 -42
  2. package/LICENSE.md +213 -0
  3. package/README.md +8 -4
  4. package/dist/bin.js +9 -1
  5. package/dist/config/index.d.ts +1818 -0
  6. package/dist/config/index.js +2 -0
  7. package/dist/generate/index.d.ts +1 -1
  8. package/dist/generate/index.js +3 -1
  9. package/dist/packem_chunks/applyDefaults.js +336 -0
  10. package/dist/packem_chunks/bin.js +9554 -64
  11. package/dist/packem_chunks/doctor-probe.js +112 -0
  12. package/dist/packem_chunks/fix.js +229 -48
  13. package/dist/packem_chunks/handler.js +99 -1
  14. package/dist/packem_chunks/handler10.js +53 -1
  15. package/dist/packem_chunks/handler11.js +32 -1
  16. package/dist/packem_chunks/handler12.js +100 -2
  17. package/dist/packem_chunks/handler13.js +25 -1
  18. package/dist/packem_chunks/handler14.js +916 -5
  19. package/dist/packem_chunks/handler15.js +206 -1
  20. package/dist/packem_chunks/handler16.js +122 -18
  21. package/dist/packem_chunks/handler17.js +13 -1
  22. package/dist/packem_chunks/handler18.js +106 -1
  23. package/dist/packem_chunks/handler19.js +19 -1
  24. package/dist/packem_chunks/handler2.js +75 -1
  25. package/dist/packem_chunks/handler20.js +29 -1
  26. package/dist/packem_chunks/handler21.js +222 -1
  27. package/dist/packem_chunks/handler22.js +237 -5
  28. package/dist/packem_chunks/handler23.js +101 -1
  29. package/dist/packem_chunks/handler24.js +110 -1
  30. package/dist/packem_chunks/handler25.js +402 -5
  31. package/dist/packem_chunks/handler26.js +13 -1
  32. package/dist/packem_chunks/handler27.js +63 -3
  33. package/dist/packem_chunks/handler28.js +34 -1
  34. package/dist/packem_chunks/handler29.js +458 -7
  35. package/dist/packem_chunks/handler3.js +95 -2
  36. package/dist/packem_chunks/handler30.js +168 -21
  37. package/dist/packem_chunks/handler31.js +530 -3
  38. package/dist/packem_chunks/handler32.js +214 -2
  39. package/dist/packem_chunks/handler33.js +119 -24
  40. package/dist/packem_chunks/handler34.js +630 -2
  41. package/dist/packem_chunks/handler35.js +283 -19
  42. package/dist/packem_chunks/handler36.js +521 -407
  43. package/dist/packem_chunks/handler37.js +762 -22
  44. package/dist/packem_chunks/handler38.js +989 -22
  45. package/dist/packem_chunks/handler39.js +574 -22
  46. package/dist/packem_chunks/handler4.js +90 -4
  47. package/dist/packem_chunks/handler40.js +1685 -3
  48. package/dist/packem_chunks/handler41.js +1088 -10
  49. package/dist/packem_chunks/handler42.js +785 -141
  50. package/dist/packem_chunks/handler43.js +2658 -42
  51. package/dist/packem_chunks/handler44.js +3886 -3
  52. package/dist/packem_chunks/handler45.js +2568 -21
  53. package/dist/packem_chunks/handler46.js +3769 -0
  54. package/dist/packem_chunks/handler47.js +1491 -0
  55. package/dist/packem_chunks/handler5.js +174 -2
  56. package/dist/packem_chunks/handler6.js +95 -13
  57. package/dist/packem_chunks/handler7.js +115 -8
  58. package/dist/packem_chunks/handler8.js +12 -1
  59. package/dist/packem_chunks/handler9.js +29 -1
  60. package/dist/packem_chunks/heal-accept.js +522 -0
  61. package/dist/packem_chunks/heal.js +673 -0
  62. package/dist/packem_chunks/index.js +873 -7
  63. package/dist/packem_chunks/loader.js +23 -1
  64. package/dist/packem_shared/VisUpdateApp-D-Yz_wvg.js +1316 -0
  65. package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +5 -0
  66. package/dist/packem_shared/ai-analysis-CHeB1joD.js +367 -0
  67. package/dist/packem_shared/ai-cache-Be_jexe4.js +142 -0
  68. package/dist/packem_shared/ai-fix-B9iQVcD2.js +379 -0
  69. package/dist/packem_shared/cache-directory-2qvs4goY.js +98 -0
  70. package/dist/packem_shared/catalog-BJTtyi-O.js +1371 -0
  71. package/dist/packem_shared/dependency-scan-A0KSklpG.js +188 -0
  72. package/dist/packem_shared/docker-2iZzc280.js +181 -0
  73. package/dist/packem_shared/failure-log-Cz3Z4SKL.js +100 -0
  74. package/dist/packem_shared/flakiness-goTxXuCX.js +180 -0
  75. package/dist/packem_shared/otel-DCvqCTz_.js +158 -0
  76. package/dist/packem_shared/otelPlugin-DFaLDvJf.js +3 -0
  77. package/dist/packem_shared/registry-CbqXI0rc.js +272 -0
  78. package/dist/packem_shared/run-summary-utils-PVMl4aIh.js +130 -0
  79. package/dist/packem_shared/runtime-check-Cobi3p6l.js +127 -0
  80. package/dist/packem_shared/selectors-SM69TfqC.js +194 -0
  81. package/dist/packem_shared/symbols-Ta7g2nU-.js +14 -0
  82. package/dist/packem_shared/toolchain-BdZd9eBi.js +975 -0
  83. package/dist/packem_shared/typosquats-C-bCh3PX.js +1210 -0
  84. package/dist/packem_shared/use-measured-height-CNP0vT4M.js +20 -0
  85. package/dist/packem_shared/utils-CthVdBPS.js +40 -0
  86. package/dist/packem_shared/xxh3-Ck8mXNg1.js +239 -0
  87. package/index.js +727 -555
  88. package/package.json +35 -17
  89. package/schemas/project.schema.json +8 -10
  90. package/schemas/vis-config.schema.json +132 -8
  91. package/skills/vis/SKILL.md +96 -0
  92. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  93. package/templates/buildkite-ci/template.yml +20 -0
  94. package/dist/errors/index.d.ts +0 -26
  95. package/dist/errors/index.js +0 -1
  96. package/dist/packem_chunks/config.js +0 -2
  97. package/dist/packem_shared/VisConfigCycleError-CAYNC7d-.js +0 -1
  98. package/dist/packem_shared/VisConfigError-B5LP1zRf.js +0 -1
  99. package/dist/packem_shared/VisConfigLoadError-CeqBSd2Z.js +0 -2
  100. package/dist/packem_shared/VisConfigNotFoundError-DZ9KC527.js +0 -5
  101. package/dist/packem_shared/VisUpdateApp-D-L4_-Iu.js +0 -1
  102. package/dist/packem_shared/_commonjsHelpers-D6W6KoPK.js +0 -1
  103. package/dist/packem_shared/ai-analysis-CGuy7dfE.js +0 -67
  104. package/dist/packem_shared/ai-cache-Bynt6Y9x.js +0 -1
  105. package/dist/packem_shared/cache-directory-D72ZEag2.js +0 -1
  106. package/dist/packem_shared/catalog-BVPerCwG.js +0 -12
  107. package/dist/packem_shared/dependency-scan-Du0tBu64.js +0 -2
  108. package/dist/packem_shared/docker-BcfqH4Av.js +0 -2
  109. package/dist/packem_shared/failure-log-DqYen0LC.js +0 -2
  110. package/dist/packem_shared/flakiness-DSIHZGBT.js +0 -1
  111. package/dist/packem_shared/run-summary-utils-C24Aaf9E.js +0 -1
  112. package/dist/packem_shared/runtime-check-CGHal8SO.js +0 -1
  113. package/dist/packem_shared/selectors-CfH9ZY08.js +0 -3
  114. package/dist/packem_shared/symbols-CQmER5MT.js +0 -1
  115. package/dist/packem_shared/target-merge-DNa-6eWu.js +0 -1
  116. package/dist/packem_shared/toolchain-DQfTQY8E.js +0 -5
  117. package/dist/packem_shared/typosquats-DOR8izpX.js +0 -1
  118. package/dist/packem_shared/use-measured-height-DjYgUOKk.js +0 -1
  119. package/dist/packem_shared/utils-DrNg0XTR.js +0 -1
  120. package/dist/packem_shared/xxh3-DrAUNq4n.js +0 -1
@@ -1,2 +1,100 @@
1
- var g=Object.defineProperty;var p=(t,o)=>g(t,"name",{value:o,configurable:!0});import{join as d}from"@visulima/path";import{r as k,s as v}from"./bin.js";import{s as h,p as j}from"../packem_shared/docker-BcfqH4Av.js";var x=Object.defineProperty,E=p((t,o)=>x(t,"name",{value:o,configurable:!0}),"m");const P=E(async({argument:t,logger:o,options:s,visConfig:l,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:m,workspace:c}=k(e,l);if(n==="scaffold"){const a=v(e,c,m),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const i=r.split(",").map(w=>w.trim()).filter(Boolean);if(i.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const f=d(e,s.out??".vis/docker"),{projects:u}=h({focus:i,includeSources:!!s.includeSources,outDir:f,projectGraph:a,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${u.length} project(s) into ${f}`),o.info(`Focus closure: ${u.sort().join(", ")}`);return}if(n==="prune"){const a=d(e,s.context??".vis/docker"),{removed:r}=j({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
2
- `));return}throw new Error(`Unknown subcommand: "${n}". Expected scaffold or prune.`)},"execute");export{P as default};
1
+ import { createRequire as __cjs_createRequire } from "node:module";
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
+ 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 +1,25 @@
1
- var p=Object.defineProperty;var c=(o,r)=>p(o,"name",{value:r,configurable:!0});import{J as m,l as g}from"./bin.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,w=c((o,r)=>v(o,"name",{value:r,configurable:!0}),"l");const b=w(async({argument:o,logger:r,options:e,visConfig:t,workspaceRoot:n})=>{const s=o;if(!s||s.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=s,a=n??process.cwd(),d=m(a,{configBackend:t?.install?.backend}),l=g(d,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},a,r);l!==0&&(process.exitCode=l)},"execute");export{b as default};
1
+ import { r as resolveInstaller, n as runInfo } from './bin.js';
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 };