@visulima/vis 1.0.0-alpha.8 → 1.0.0-alpha.9

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 (280) hide show
  1. package/CHANGELOG.md +90 -57
  2. package/LICENSE.md +44 -1
  3. package/README.md +56 -0
  4. package/dist/bin.js +1 -1003
  5. package/dist/config.d.ts +1073 -68
  6. package/dist/config.js +1 -1
  7. package/dist/generate/index.d.ts +155 -30
  8. package/dist/packem_chunks/handler.js +1 -0
  9. package/dist/packem_chunks/handler10.js +1 -0
  10. package/dist/packem_chunks/handler11.js +1 -0
  11. package/dist/packem_chunks/handler12.js +153 -0
  12. package/dist/packem_chunks/handler13.js +1 -0
  13. package/dist/packem_chunks/handler14.js +3 -0
  14. package/dist/packem_chunks/handler15.js +1 -0
  15. package/dist/packem_chunks/handler16.js +2 -0
  16. package/dist/packem_chunks/handler17.js +7 -0
  17. package/dist/packem_chunks/handler18.js +1 -0
  18. package/dist/packem_chunks/handler19.js +19 -0
  19. package/dist/packem_chunks/handler2.js +1 -0
  20. package/dist/packem_chunks/handler20.js +428 -0
  21. package/dist/packem_chunks/handler21.js +22 -0
  22. package/dist/packem_chunks/handler22.js +3 -0
  23. package/dist/packem_chunks/handler23.js +5 -0
  24. package/dist/packem_chunks/handler24.js +1 -0
  25. package/dist/packem_chunks/handler25.js +20 -0
  26. package/dist/packem_chunks/handler26.js +1 -0
  27. package/dist/packem_chunks/handler27.js +1 -0
  28. package/dist/packem_chunks/handler28.js +1 -0
  29. package/dist/packem_chunks/handler29.js +2 -0
  30. package/dist/packem_chunks/handler3.js +2 -0
  31. package/dist/packem_chunks/handler30.js +22 -0
  32. package/dist/packem_chunks/handler31.js +1 -0
  33. package/dist/packem_chunks/handler32.js +1 -0
  34. package/dist/packem_chunks/handler33.js +37 -0
  35. package/dist/packem_chunks/handler34.js +3 -0
  36. package/dist/packem_chunks/handler35.js +23 -0
  37. package/dist/packem_chunks/handler36.js +5 -0
  38. package/dist/packem_chunks/handler37.js +27 -0
  39. package/dist/packem_chunks/handler38.js +1 -0
  40. package/dist/packem_chunks/handler39.js +2 -0
  41. package/dist/packem_chunks/handler4.js +5 -0
  42. package/dist/packem_chunks/handler40.js +1 -0
  43. package/dist/packem_chunks/handler41.js +5 -0
  44. package/dist/packem_chunks/handler42.js +1 -0
  45. package/dist/packem_chunks/handler43.js +24 -0
  46. package/dist/packem_chunks/handler44.js +3 -0
  47. package/dist/packem_chunks/handler45.js +1 -0
  48. package/dist/packem_chunks/handler5.js +4 -0
  49. package/dist/packem_chunks/handler6.js +2 -0
  50. package/dist/packem_chunks/handler7.js +24 -0
  51. package/dist/packem_chunks/handler8.js +6 -0
  52. package/dist/packem_chunks/handler9.js +8 -0
  53. package/dist/packem_shared/VisUpdateApp-BBx3idMI.js +1 -0
  54. package/dist/packem_shared/ai-analysis-DDqXRFxY.js +67 -0
  55. package/dist/packem_shared/bin-BaZZ32BK.js +93 -0
  56. package/dist/packem_shared/cache-directory-DL8hfXeG.js +1 -0
  57. package/dist/packem_shared/catalog-CuSpuB_R.js +12 -0
  58. package/dist/packem_shared/dependency-scan-BoLG2Fez.js +1 -0
  59. package/dist/packem_shared/docker-BcfqH4Av.js +2 -0
  60. package/dist/packem_shared/flakiness-DSIHZGBT.js +1 -0
  61. package/dist/packem_shared/otelPlugin-DxyvBcXO.js +1 -0
  62. package/dist/packem_shared/runtime-check-CGHal8SO.js +1 -0
  63. package/dist/packem_shared/selectors-CfH9ZY08.js +3 -0
  64. package/dist/packem_shared/symbols-CIMw60-G.js +1 -0
  65. package/dist/packem_shared/toolchain-C3ZG0o_X.js +5 -0
  66. package/dist/packem_shared/typosquats-Bpq4zcWL.js +1 -0
  67. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  68. package/index.js +555 -727
  69. package/package.json +27 -19
  70. package/schemas/project.schema.json +1 -1
  71. package/schemas/vis-config.schema.json +47 -1
  72. package/dist/ai-analysis.d.ts +0 -26
  73. package/dist/ai-cache.d.ts +0 -21
  74. package/dist/ai-types.d.ts +0 -16
  75. package/dist/audit-config.d.ts +0 -24
  76. package/dist/bin.d.ts +0 -1
  77. package/dist/cache-directory.d.ts +0 -73
  78. package/dist/catalog.d.ts +0 -136
  79. package/dist/codeowners.d.ts +0 -30
  80. package/dist/commands/action-graph.d.ts +0 -8
  81. package/dist/commands/add.d.ts +0 -3
  82. package/dist/commands/affected.d.ts +0 -3
  83. package/dist/commands/ai.d.ts +0 -3
  84. package/dist/commands/analyze.d.ts +0 -3
  85. package/dist/commands/approve-builds.d.ts +0 -3
  86. package/dist/commands/audit.d.ts +0 -23
  87. package/dist/commands/cache.d.ts +0 -86
  88. package/dist/commands/check.d.ts +0 -3
  89. package/dist/commands/ci.d.ts +0 -19
  90. package/dist/commands/clean.d.ts +0 -3
  91. package/dist/commands/create/discovery.d.ts +0 -42
  92. package/dist/commands/create/index.d.ts +0 -13
  93. package/dist/commands/create/prompts.d.ts +0 -31
  94. package/dist/commands/create/random-name.d.ts +0 -15
  95. package/dist/commands/create/templates/builtin.d.ts +0 -15
  96. package/dist/commands/create/templates/generator.d.ts +0 -14
  97. package/dist/commands/create/templates/index.d.ts +0 -13
  98. package/dist/commands/create/templates/monorepo.d.ts +0 -16
  99. package/dist/commands/create/templates/remote.d.ts +0 -41
  100. package/dist/commands/create/templates/types.d.ts +0 -46
  101. package/dist/commands/create/utils.d.ts +0 -42
  102. package/dist/commands/dedupe.d.ts +0 -3
  103. package/dist/commands/devcontainer.d.ts +0 -3
  104. package/dist/commands/dlx.d.ts +0 -3
  105. package/dist/commands/docker.d.ts +0 -22
  106. package/dist/commands/doctor.d.ts +0 -15
  107. package/dist/commands/exec.d.ts +0 -3
  108. package/dist/commands/generate.d.ts +0 -10
  109. package/dist/commands/graph.d.ts +0 -3
  110. package/dist/commands/hook/constants.d.ts +0 -13
  111. package/dist/commands/hook/index.d.ts +0 -3
  112. package/dist/commands/hook/install.d.ts +0 -7
  113. package/dist/commands/hook/list.d.ts +0 -28
  114. package/dist/commands/hook/migrate.d.ts +0 -30
  115. package/dist/commands/hook/prek-builtins.d.ts +0 -8
  116. package/dist/commands/hook/prek.d.ts +0 -129
  117. package/dist/commands/hook/run.d.ts +0 -21
  118. package/dist/commands/hook/uninstall.d.ts +0 -3
  119. package/dist/commands/hook/validate.d.ts +0 -17
  120. package/dist/commands/ignore-helpers.d.ts +0 -157
  121. package/dist/commands/ignore.d.ts +0 -17
  122. package/dist/commands/implode.d.ts +0 -3
  123. package/dist/commands/info.d.ts +0 -3
  124. package/dist/commands/init.d.ts +0 -14
  125. package/dist/commands/install.d.ts +0 -3
  126. package/dist/commands/link.d.ts +0 -3
  127. package/dist/commands/list.d.ts +0 -3
  128. package/dist/commands/migrate/backup.d.ts +0 -8
  129. package/dist/commands/migrate/constants.d.ts +0 -16
  130. package/dist/commands/migrate/deps.d.ts +0 -32
  131. package/dist/commands/migrate/gitleaks.d.ts +0 -29
  132. package/dist/commands/migrate/index.d.ts +0 -3
  133. package/dist/commands/migrate/json.d.ts +0 -22
  134. package/dist/commands/migrate/kingfisher.d.ts +0 -14
  135. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  136. package/dist/commands/migrate/moon.d.ts +0 -5
  137. package/dist/commands/migrate/nano-staged.d.ts +0 -30
  138. package/dist/commands/migrate/nx.d.ts +0 -12
  139. package/dist/commands/migrate/prompt.d.ts +0 -2
  140. package/dist/commands/migrate/secretlint.d.ts +0 -14
  141. package/dist/commands/migrate/shared.d.ts +0 -29
  142. package/dist/commands/migrate/turborepo.d.ts +0 -11
  143. package/dist/commands/migrate/types.d.ts +0 -27
  144. package/dist/commands/migrate/verify.d.ts +0 -12
  145. package/dist/commands/optimize.d.ts +0 -38
  146. package/dist/commands/pm.d.ts +0 -3
  147. package/dist/commands/remove.d.ts +0 -3
  148. package/dist/commands/run.d.ts +0 -16
  149. package/dist/commands/sbom.d.ts +0 -10
  150. package/dist/commands/secrets.d.ts +0 -3
  151. package/dist/commands/sort-package-json.d.ts +0 -3
  152. package/dist/commands/staged.d.ts +0 -10
  153. package/dist/commands/status.d.ts +0 -3
  154. package/dist/commands/sync.d.ts +0 -16
  155. package/dist/commands/task-why.d.ts +0 -3
  156. package/dist/commands/unlink.d.ts +0 -3
  157. package/dist/commands/update.d.ts +0 -3
  158. package/dist/commands/upgrade.d.ts +0 -3
  159. package/dist/commands/why.d.ts +0 -3
  160. package/dist/docker.d.ts +0 -73
  161. package/dist/flakiness.d.ts +0 -40
  162. package/dist/generate/discover.d.ts +0 -29
  163. package/dist/generate/loader.d.ts +0 -15
  164. package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
  165. package/dist/generate/moon-adapter/filters.d.ts +0 -22
  166. package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
  167. package/dist/generate/moon-adapter/index.d.ts +0 -19
  168. package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
  169. package/dist/generate/moon-adapter/util.d.ts +0 -14
  170. package/dist/generate/prompts.d.ts +0 -25
  171. package/dist/generate/remote.d.ts +0 -43
  172. package/dist/generate/runner.d.ts +0 -37
  173. package/dist/generate/types.d.ts +0 -152
  174. package/dist/hooks.d.ts +0 -118
  175. package/dist/native-binding.d.ts +0 -158
  176. package/dist/output.d.ts +0 -40
  177. package/dist/overrides.d.ts +0 -82
  178. package/dist/package-manager.d.ts +0 -23
  179. package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
  180. package/dist/plugins/config-loader.d.ts +0 -3
  181. package/dist/plugins/otel.d.ts +0 -63
  182. package/dist/plugins/post-command.d.ts +0 -3
  183. package/dist/plugins/security-enforcement.d.ts +0 -3
  184. package/dist/pm-runner.d.ts +0 -44
  185. package/dist/run-report.d.ts +0 -40
  186. package/dist/runtime-check.d.ts +0 -27
  187. package/dist/sbom/cyclonedx.d.ts +0 -39
  188. package/dist/sbom/installed-package.d.ts +0 -49
  189. package/dist/sbom/license.d.ts +0 -31
  190. package/dist/sbom/lockfile.d.ts +0 -34
  191. package/dist/sbom/purl.d.ts +0 -25
  192. package/dist/sbom/resolve-specifier.d.ts +0 -24
  193. package/dist/sbom/types.d.ts +0 -196
  194. package/dist/secrets/baseline.d.ts +0 -20
  195. package/dist/secrets/format.d.ts +0 -14
  196. package/dist/secrets/git.d.ts +0 -6
  197. package/dist/secrets/spinner.d.ts +0 -9
  198. package/dist/security.d.ts +0 -64
  199. package/dist/selectors.d.ts +0 -81
  200. package/dist/shell-history.d.ts +0 -16
  201. package/dist/socket-security.d.ts +0 -129
  202. package/dist/staged/cli-parse.d.ts +0 -18
  203. package/dist/staged/config.d.ts +0 -14
  204. package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
  205. package/dist/staged/errors/config-error.d.ts +0 -4
  206. package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
  207. package/dist/staged/errors/git-error.d.ts +0 -6
  208. package/dist/staged/errors/index.d.ts +0 -12
  209. package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
  210. package/dist/staged/errors/staged-error.d.ts +0 -8
  211. package/dist/staged/errors/task-error.d.ts +0 -6
  212. package/dist/staged/git/diff.d.ts +0 -76
  213. package/dist/staged/git/exec.d.ts +0 -43
  214. package/dist/staged/git/index.d.ts +0 -77
  215. package/dist/staged/git/stash.d.ts +0 -37
  216. package/dist/staged/index.d.ts +0 -13
  217. package/dist/staged/match.d.ts +0 -12
  218. package/dist/staged/renderer/index.d.ts +0 -9
  219. package/dist/staged/renderer/ink/index.d.ts +0 -4
  220. package/dist/staged/renderer/plain.d.ts +0 -12
  221. package/dist/staged/tasks/build.d.ts +0 -13
  222. package/dist/staged/tasks/exec.d.ts +0 -56
  223. package/dist/staged/tasks/run.d.ts +0 -26
  224. package/dist/staged/types.d.ts +0 -173
  225. package/dist/target-discovery.d.ts +0 -59
  226. package/dist/target-options.d.ts +0 -261
  227. package/dist/tips.d.ts +0 -41
  228. package/dist/tui/components/CheckProgressApp.d.ts +0 -6
  229. package/dist/tui/components/CommandSummary.d.ts +0 -17
  230. package/dist/tui/components/Header.d.ts +0 -13
  231. package/dist/tui/components/OutputPanel.d.ts +0 -17
  232. package/dist/tui/components/QuitDialog.d.ts +0 -15
  233. package/dist/tui/components/TaskListPanel.d.ts +0 -19
  234. package/dist/tui/components/TaskRow.d.ts +0 -12
  235. package/dist/tui/components/TaskStore.d.ts +0 -80
  236. package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
  237. package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
  238. package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
  239. package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
  240. package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
  241. package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
  242. package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
  243. package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
  244. package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
  245. package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
  246. package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
  247. package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
  248. package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
  249. package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
  250. package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
  251. package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
  252. package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
  253. package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
  254. package/dist/tui/components/devcontainer/types.d.ts +0 -53
  255. package/dist/tui/components/devcontainer/validate.d.ts +0 -16
  256. package/dist/tui/components/graph/GraphStore.d.ts +0 -42
  257. package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
  258. package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
  259. package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
  260. package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
  261. package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
  262. package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
  263. package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
  264. package/dist/tui/components/optimize/constants.d.ts +0 -7
  265. package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
  266. package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
  267. package/dist/tui/components/update/UpdateStore.d.ts +0 -62
  268. package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
  269. package/dist/tui/dynamic-life-cycle.d.ts +0 -22
  270. package/dist/tui/formatting-utils.d.ts +0 -17
  271. package/dist/tui/pretty-time.d.ts +0 -8
  272. package/dist/tui/static-life-cycle.d.ts +0 -28
  273. package/dist/tui/status-utils.d.ts +0 -20
  274. package/dist/tui/symbols.d.ts +0 -7
  275. package/dist/tui/types.d.ts +0 -11
  276. package/dist/typosquats.d.ts +0 -70
  277. package/dist/upgrade-check.d.ts +0 -30
  278. package/dist/utils.d.ts +0 -22
  279. package/dist/watch.d.ts +0 -65
  280. package/dist/workspace.d.ts +0 -675
@@ -1,16 +0,0 @@
1
- import type { FilterType, OptimizeEntry } from "./OptimizeStore.d.ts";
2
- interface OptimizeListPanelProps {
3
- checkedEntries: Set<string>;
4
- entries: OptimizeEntry[];
5
- filterActive: boolean;
6
- filterText: string;
7
- filterType: FilterType;
8
- focused: boolean;
9
- isDryRun: boolean;
10
- scrollOffset: number;
11
- selectedIndex: number;
12
- totalEntries: number;
13
- viewportHeight: number;
14
- }
15
- declare const OptimizeListPanel: ({ checkedEntries, entries, filterActive, filterText, filterType, focused, isDryRun, scrollOffset, selectedIndex, totalEntries, viewportHeight, }: OptimizeListPanelProps) => React.JSX.Element;
16
- export default OptimizeListPanel;
@@ -1,50 +0,0 @@
1
- /** An optimization entry that can be either an e18e module replacement or a Socket.dev override. */
2
- interface OptimizeEntry {
3
- /** Category for filtering and display. */
4
- category: "micro-utility" | "native" | "preferred" | "socket";
5
- /** Whether a codemod is available for this entry (e18e only). */
6
- hasCodemod: boolean;
7
- /** The override spec for socket entries (e.g., "npm:@socketregistry/is-regex@^1"). */
8
- overrideSpec?: string;
9
- /** The original package name. */
10
- packageName: string;
11
- /** Human-readable replacement target description. */
12
- replacement: string;
13
- }
14
- type FilterType = "all" | "micro-utility" | "native" | "preferred" | "socket";
15
- interface OptimizeState {
16
- applyProgress: {
17
- current: number;
18
- total: number;
19
- } | null;
20
- checkedEntries: Set<string>;
21
- entries: OptimizeEntry[];
22
- error: string | null;
23
- filterActive: boolean;
24
- filterText: string;
25
- filterType: FilterType;
26
- focusedPanel: "detail" | "list";
27
- phase: "applying" | "browsing" | "done" | "error";
28
- selectedIndex: number;
29
- }
30
- type Listener = () => void;
31
- declare class OptimizeStore {
32
- #private;
33
- constructor(entries: OptimizeEntry[]);
34
- getSnapshot: () => OptimizeState;
35
- subscribe: (listener: Listener) => (() => void);
36
- getFilteredEntries: () => OptimizeEntry[];
37
- select(index: number): void;
38
- toggleCheck(packageName: string): void;
39
- toggleAll(): void;
40
- setFilter(type: FilterType): void;
41
- setFilterText(text: string): void;
42
- setFilterActive(active: boolean): void;
43
- setFocusedPanel(panel: "detail" | "list"): void;
44
- setPhase(phase: OptimizeState["phase"]): void;
45
- setProgress(current: number, total: number): void;
46
- setError(error: string): void;
47
- getCheckedEntries(): OptimizeEntry[];
48
- }
49
- export type { FilterType, OptimizeEntry, OptimizeState };
50
- export { OptimizeStore };
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import type { OptimizeStore } from "./OptimizeStore.d.ts";
3
- interface VisOptimizeAppProps {
4
- isDryRun: boolean;
5
- store: OptimizeStore;
6
- }
7
- declare const VisOptimizeApp: ({ isDryRun, store }: VisOptimizeAppProps) => React.JSX.Element;
8
- export default VisOptimizeApp;
@@ -1,7 +0,0 @@
1
- /** Category colors for the optimize TUI — shared between list and detail panels. */
2
- declare const CATEGORY_COLORS: Record<string, string>;
3
- /** Short labels for category badges in the list panel. */
4
- declare const CATEGORY_LABELS: Record<string, string>;
5
- /** Human-readable descriptions for each optimization category. */
6
- declare const CATEGORY_DESCRIPTIONS: Record<string, string>;
7
- export { CATEGORY_COLORS, CATEGORY_DESCRIPTIONS, CATEGORY_LABELS };
@@ -1,12 +0,0 @@
1
- import type { ScrollViewRef } from "@visulima/tui";
2
- import type { AiRecommendation } from "../../../ai-analysis.d.ts";
3
- import type { OutdatedEntry } from "../../../catalog.d.ts";
4
- interface PackageDetailPanelProps {
5
- changelogUrl?: string;
6
- entry: OutdatedEntry | null;
7
- focused: boolean;
8
- recommendation?: AiRecommendation;
9
- scrollRef?: React.RefObject<ScrollViewRef | null>;
10
- }
11
- declare const PackageDetailPanel: ({ changelogUrl, entry, focused, recommendation, scrollRef }: PackageDetailPanelProps) => React.JSX.Element;
12
- export default PackageDetailPanel;
@@ -1,21 +0,0 @@
1
- import type { OutdatedEntry } from "../../../catalog.d.ts";
2
- import type { FilterType } from "./UpdateStore.d.ts";
3
- interface PackageListPanelProps {
4
- checkedEntries: Set<string>;
5
- entries: OutdatedEntry[];
6
- filterActive: boolean;
7
- filteredOutCount: number;
8
- filterText: string;
9
- filterType: FilterType;
10
- focused: boolean;
11
- groupedByCatalog: Map<string, OutdatedEntry[]>;
12
- isDryRun: boolean;
13
- scrollOffset: number;
14
- selectedIndex: number;
15
- totalCatalogEntries: number;
16
- totalChecked: number;
17
- totalEntries: number;
18
- viewportHeight: number;
19
- }
20
- declare const PackageListPanel: ({ checkedEntries, entries, filterActive, filteredOutCount, filterText, filterType, focused, groupedByCatalog, isDryRun, scrollOffset, selectedIndex, totalCatalogEntries, totalChecked, totalEntries, viewportHeight, }: PackageListPanelProps) => React.JSX.Element;
21
- export default PackageListPanel;
@@ -1,62 +0,0 @@
1
- import type { AiAnalysisResult, AiRecommendation } from "../../../ai-analysis.d.ts";
2
- import type { OutdatedEntry } from "../../../catalog.d.ts";
3
- export type FilterType = "all" | "major" | "minor" | "patch" | "security";
4
- export type UpdatePhase = "applying" | "browsing" | "done" | "error";
5
- export interface UpdateState {
6
- /** AI analysis result (null if not requested). */
7
- aiResult: AiAnalysisResult | null;
8
- /** Whether all visible entries are checked. */
9
- allChecked: boolean;
10
- /** Progress during apply phase. */
11
- applyProgress: {
12
- current: number;
13
- total: number;
14
- } | null;
15
- /** Set of checked package names for selective apply. */
16
- checkedEntries: Set<string>;
17
- /** All outdated entries. */
18
- entries: OutdatedEntry[];
19
- /** Error message if apply failed. */
20
- error: string | null;
21
- /** Whether the text filter input is active. */
22
- filterActive: boolean;
23
- /** Current filter text (empty = no filter). */
24
- filterText: string;
25
- /** Filter by update type. */
26
- filterType: FilterType;
27
- /** Which panel has keyboard focus. */
28
- focusedPanel: "detail" | "list";
29
- /** Entries grouped by catalog name. */
30
- groupedByCatalog: Map<string, OutdatedEntry[]>;
31
- /** Current lifecycle phase. */
32
- phase: UpdatePhase;
33
- /** Currently highlighted entry index in the filtered list. */
34
- selectedIndex: number;
35
- }
36
- type Listener = () => void;
37
- export declare class UpdateStore {
38
- #private;
39
- constructor(entries: OutdatedEntry[], aiResult?: AiAnalysisResult | null);
40
- getSnapshot: () => UpdateState;
41
- subscribe: (listener: Listener) => (() => void);
42
- /** Get the currently filtered + visible entries. */
43
- getFilteredEntries(): OutdatedEntry[];
44
- /** Get AI recommendation for a specific package. */
45
- getRecommendation(packageName: string): AiRecommendation | undefined;
46
- /** Get the list of checked entries (for apply). */
47
- getCheckedEntries(): OutdatedEntry[];
48
- setSelectedIndex(index: number): void;
49
- setFocusedPanel(panel: "detail" | "list"): void;
50
- setFilterType(type: FilterType): void;
51
- setFilter(text: string): void;
52
- setFilterActive(active: boolean): void;
53
- toggleCheck(packageName: string): void;
54
- checkAll(): void;
55
- uncheckAll(): void;
56
- toggleAll(): void;
57
- startApply(): void;
58
- updateApplyProgress(current: number): void;
59
- markDone(): void;
60
- setError(error: string): void;
61
- }
62
- export {};
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import type { OutdatedEntry } from "../../../catalog.d.ts";
3
- import type { UpdateStore } from "./UpdateStore.d.ts";
4
- interface VisUpdateAppProps {
5
- /** 0 = no auto-exit (default), >0 = countdown seconds */
6
- autoExitSeconds?: number;
7
- changelogUrls?: Map<string, string>;
8
- /** Total unique packages checked by the registry. */
9
- checkedCount?: number;
10
- /** Packages that have newer versions but were filtered out by the target constraint. */
11
- filteredOutEntries?: OutdatedEntry[];
12
- isDryRun: boolean;
13
- store: UpdateStore;
14
- /** Total catalog entries (before deduplication). */
15
- totalCatalogEntries?: number;
16
- }
17
- declare const VisUpdateApp: ({ autoExitSeconds, changelogUrls, checkedCount, filteredOutEntries, isDryRun, store, totalCatalogEntries, }: VisUpdateAppProps) => React.JSX.Element;
18
- export default VisUpdateApp;
@@ -1,22 +0,0 @@
1
- import type { LifeCycleInterface, Task } from "@visulima/task-runner";
2
- import { TaskStore } from "./components/TaskStore.d.ts";
3
- import type { StdinEntry } from "./types.d.ts";
4
- interface DynamicOutputOptions {
5
- args: {
6
- parallel?: boolean | number;
7
- targets: string[];
8
- };
9
- /** Auto-exit config: false = stay open, true = 3s countdown, number = custom seconds */
10
- autoExit?: boolean | number;
11
- projectNames: string[];
12
- /** Registry of writable stdin entries keyed by task ID, for interactive input. */
13
- stdinRegistry?: Map<string, StdinEntry>;
14
- tasks: Task[];
15
- }
16
- interface DynamicOutputResult {
17
- lifeCycle: LifeCycleInterface;
18
- renderIsDone: Promise<void>;
19
- store: TaskStore;
20
- }
21
- export declare const createDynamicOutputRenderer: (options: DynamicOutputOptions) => DynamicOutputResult;
22
- export {};
@@ -1,17 +0,0 @@
1
- import type { Task } from "@visulima/task-runner";
2
- /**
3
- * Formats a CLI flag for display output.
4
- * @param leftPad Padding string
5
- * @param flag The flag name
6
- * @param value The flag value
7
- */
8
- export declare const formatFlags: (leftPad: string, flag: string, value: unknown) => string;
9
- /**
10
- * Generates a human-readable description of the targets and projects being executed.
11
- *
12
- * Examples:
13
- * - "target build for project my-app"
14
- * - "targets build, test for 5 projects"
15
- * - "target build for 3 projects and 2 tasks they depend on"
16
- */
17
- export declare const formatTargetsAndProjects: (projectNames: string[], targets: string[], tasks: Task[]) => string;
@@ -1,8 +0,0 @@
1
- /**
2
- * Formats a process.hrtime() tuple into a compact string like "1s 234ms".
3
- */
4
- export declare const formatHrtime: (hrtime: [number, number]) => string;
5
- /**
6
- * Formats milliseconds into a compact string like "1s 300ms", "340ms", "1m 5s".
7
- */
8
- export declare const formatMs: (ms: number) => string;
@@ -1,28 +0,0 @@
1
- import type { LifeCycleInterface, LogReporter, Task, TaskResult, TaskStatus } from "@visulima/task-runner";
2
- interface StaticOutputOptions {
3
- args: {
4
- targets: string[];
5
- };
6
- /**
7
- * Optional {@link LogReporter} that takes over `printTaskTerminalOutput`
8
- * when the user picks a `--log` mode. Absent, the CI-style
9
- * separator+status formatting is kept (vis's default).
10
- */
11
- logReporter?: LogReporter;
12
- projectNames: string[];
13
- tasks: Task[];
14
- }
15
- /**
16
- * A lifecycle handler for CI environments that produces static, append-only output.
17
- * No cursor manipulation — just linear log lines.
18
- */
19
- export declare class StaticOutputLifeCycle implements LifeCycleInterface {
20
- #private;
21
- constructor(options: StaticOutputOptions);
22
- startCommand(): void;
23
- startTasks(tasks: Task[]): void;
24
- endTasks(taskResults: TaskResult[]): void;
25
- printTaskTerminalOutput(task: Task, status: TaskStatus, terminalOutput: string): void;
26
- endCommand(): void;
27
- }
28
- export {};
@@ -1,20 +0,0 @@
1
- import type { TaskStatus } from "@visulima/task-runner";
2
- export declare const isCacheStatus: (status: string) => boolean;
3
- export interface StatusInfo {
4
- color: string;
5
- icon: string;
6
- }
7
- export declare const getStatusInfo: (status: TaskStatus) => StatusInfo;
8
- /**
9
- * Returns the colored status icon as an ANSI string (for raw stdout writes).
10
- */
11
- export declare const getStatusIcon: (status: TaskStatus) => string;
12
- /**
13
- * Returns a colored prefix string for a status (for raw stdout writes).
14
- */
15
- export declare const getStatusPrefix: (status: TaskStatus) => string;
16
- /**
17
- * Logs task terminal output with formatting.
18
- * Uses GitHub Actions grouping when available.
19
- */
20
- export declare const logCommandOutputCI: (taskId: string, status: TaskStatus, output: string) => void;
@@ -1,7 +0,0 @@
1
- /**
2
- * Unicode symbols for TUI output with ASCII fallbacks.
3
- */
4
- export declare const TICK: string;
5
- export declare const CROSS: string;
6
- export declare const ELLIPSIS: string;
7
- export declare const DASH: string;
@@ -1,11 +0,0 @@
1
- /**
2
- * Represents a writable stdin entry for interactive PTY input.
3
- */
4
- export interface StdinEntry {
5
- /** Kill the child process/PTY. */
6
- kill?: (signal?: string) => void;
7
- /** Resize the child's PTY (only available for PTY-backed processes). */
8
- resize?: (cols: number, rows: number) => void;
9
- /** Write data to the child's stdin or PTY. */
10
- write: (data: string) => void;
11
- }
@@ -1,70 +0,0 @@
1
- /**
2
- * Typosquat detection for package names.
3
- *
4
- * Uses a curated blocklist of known typosquats (data/typosquats.json) and
5
- * runtime heuristics (character substitution, transposition, omission) to
6
- * warn users before they install a potentially malicious package.
7
- */
8
- export type Blocklist = Record<string, string[]>;
9
- export interface TyposquatMatch {
10
- /** The package name that was checked. */
11
- input: string;
12
- /** The legitimate package this appears to be a typosquat of. */
13
- legitimate: string;
14
- /** How the match was detected: "blocklist" (exact match in JSON) or "heuristic" (generated variant). */
15
- method: "blocklist" | "heuristic";
16
- }
17
- export interface TyposquatCheckResult {
18
- /** Whether the operation should proceed. */
19
- ok: boolean;
20
- /**
21
- * The (possibly corrected) package names to use.
22
- * When the user chooses "use suggested name", the typosquat names are
23
- * replaced with their legitimate counterparts.
24
- */
25
- packages: string[];
26
- }
27
- /**
28
- * Generates typosquat variants of a package name using common attack patterns:
29
- * - Character omission (dropping one character)
30
- * - Adjacent character transposition (swapping neighbors)
31
- * - Character duplication (repeating one character)
32
- * - Homoglyph / keyboard substitution
33
- * - Separator manipulation (dash/dot/underscore swaps)
34
- * - Common suffixes (-js, -node)
35
- *
36
- * Separators (`-`, `.`, `_`) are preserved during omission and duplication passes.
37
- * Transposition is skipped when either character is a separator.
38
- * Names shorter than 3 characters return an empty set.
39
- * @param name The package name to generate variants for.
40
- * @returns A set of unique variant strings (never includes the original name).
41
- */
42
- export declare const generateVariants: (name: string) => Set<string>;
43
- /**
44
- * Check a single package name against the typosquat blocklist.
45
- * Returns a match if the name is a known typosquat, or `undefined` if safe.
46
- */
47
- export declare const checkTyposquat: (packageName: string) => TyposquatMatch | undefined;
48
- /** Check multiple package names. Returns only the matches (empty if all safe). */
49
- export declare const checkTyposquats: (packageNames: string[], allowlist?: string[]) => TyposquatMatch[];
50
- /**
51
- * Display typosquat warnings and prompt the user.
52
- *
53
- * Choices:
54
- * - **S** (suggested): replace the typosquat names with the correct packages and continue
55
- * - **y** (yes): continue with the original (potentially dangerous) names
56
- * - **N** (no, default): abort the operation
57
- *
58
- * Non-interactive mode always aborts.
59
- */
60
- export declare const runTyposquatCheck: (packageNames: string[], allowlist?: string[]) => Promise<TyposquatCheckResult>;
61
- /**
62
- * Scan package.json dependencies for potential typosquats.
63
- *
64
- * Unlike `runTyposquatCheck` (used by `add`), this cannot replace names because
65
- * they live in package.json. It warns the user and asks whether to proceed.
66
- *
67
- * In non-interactive mode, always aborts.
68
- * @returns `true` to proceed, `false` to abort.
69
- */
70
- export declare const scanDepsForTyposquats: (cwd: string, allowlist?: string[]) => Promise<boolean>;
@@ -1,30 +0,0 @@
1
- /**
2
- * Background upgrade check - non-intrusive update notification.
3
- *
4
- * Per vite-plus upgrade-check RFC:
5
- * - Spawns async registry check while command runs (no latency impact)
6
- * - Shows single-line notice at most once per 24 hours
7
- * - Cached at ~/.vis/.upgrade-check.json
8
- * - Skipped in CI, test, quiet, non-TTY, and excluded commands
9
- * - 500ms timeout prevents network from delaying exit
10
- */
11
- /** Commands that should NOT trigger upgrade checks. */
12
- declare const EXCLUDED_COMMANDS: Set<string>;
13
- /**
14
- * Compares two semver version strings.
15
- * Returns true if `latest` is newer than `current`.
16
- */
17
- declare const isNewerVersion: (current: string, latest: string) => boolean;
18
- /**
19
- * Determines if the upgrade check should run for this invocation.
20
- */
21
- declare const shouldCheck: (command: string) => boolean;
22
- /**
23
- * Runs the background upgrade check. Non-blocking.
24
- *
25
- * 1. Check if we need to query the registry (24h cooldown)
26
- * 2. If yes, fetch latest version asynchronously
27
- * 3. Return a promise that resolves with the check function to call after command
28
- */
29
- declare const startUpgradeCheck: (currentVersion: string, command: string) => (() => void) | undefined;
30
- export { EXCLUDED_COMMANDS, isNewerVersion, shouldCheck, startUpgradeCheck };
package/dist/utils.d.ts DELETED
@@ -1,22 +0,0 @@
1
- /**
2
- * Shared utility for option parsing across command handlers.
3
- */
4
- /**
5
- * Converts a CLI option value (which may be undefined, a single string,
6
- * or an array of strings) into a normalized string array.
7
- */
8
- declare const toStringArray: (value: unknown) => string[];
9
- /**
10
- * Safely extracts an error message from an unknown caught value.
11
- * Handles Error instances, strings, and other types.
12
- */
13
- declare const errorMessage: (error: unknown) => string;
14
- /**
15
- * Extracts the package name and optional version specifier from a CLI argument
16
- * like "react", "react@19", "@scope/pkg@^2".
17
- */
18
- declare const parsePackageArgument: (argument: string) => {
19
- name: string;
20
- versionSpec: string | undefined;
21
- };
22
- export { errorMessage, parsePackageArgument, toStringArray };
package/dist/watch.d.ts DELETED
@@ -1,65 +0,0 @@
1
- import type { TaskResults } from "@visulima/task-runner";
2
- /**
3
- * Debounced multi-directory file watcher. Watches one or more project
4
- * roots recursively and invokes `onChange` at most once per debounce
5
- * window. Ignores edits inside `node_modules` and `.git`.
6
- *
7
- * `node:fs.watch({ recursive: true })` is supported on Linux, macOS,
8
- * and Windows since Node 20+, so no additional dependency is needed.
9
- */
10
- export interface WatchHandle {
11
- close: () => void;
12
- }
13
- export interface WatchOptions {
14
- /** Debounce window in milliseconds. Defaults to 150 ms. */
15
- debounceMs?: number;
16
- /**
17
- * Optional predicate invoked against every raw file event
18
- * (relative path as provided by `node:fs.watch`). Used by
19
- * tracked-access watch mode to drop changes to files the last
20
- * run didn't actually read. Return `false` to discard the event.
21
- */
22
- filter?: (path: string) => boolean;
23
- /** Fired when a watched file changes (after debounce). */
24
- onChange: (changedPaths: string[]) => void | Promise<void>;
25
- /** Project roots to watch, resolved to absolute paths. */
26
- paths: string[];
27
- }
28
- /**
29
- * The set of workspace-relative paths that a run actually read, plus
30
- * the minimal set of directories that contain them. Used by
31
- * tracked-access watch mode to only re-trigger runs when a file the
32
- * previous run actually consumed changes — drops noise from unrelated
33
- * edits under the project roots.
34
- *
35
- * `files` stays workspace-relative because `node:fs.watch` emits
36
- * paths relative to the watched root.
37
- */
38
- export interface TrackedWatchTargets {
39
- directories: string[];
40
- files: Set<string>;
41
- }
42
- /**
43
- * Extracts the set of files every task in `results` reported as an
44
- * input. Returns empty sets when no task carries hash details — the
45
- * caller falls back to watching project roots in that case.
46
- *
47
- * Directories are deduplicated and pruned so a parent dir shadows its
48
- * descendants — watching both would double-fire events.
49
- */
50
- export declare const collectTrackedWatchTargets: (results: TaskResults, workspaceRoot: string) => TrackedWatchTargets;
51
- /**
52
- * Translates a set of workspace-relative tracked paths into a filter
53
- * suitable for {@link startWatcher}. The watcher emits paths relative
54
- * to its watched root — which, after pruning, may be any ancestor
55
- * directory — so we match on the **suffix** of the tracked path
56
- * instead of an exact comparison.
57
- */
58
- export declare const createTrackedFileFilter: (trackedFiles: Set<string>, workspaceRoot: string, watchedDirectories: string[]) => ((path: string) => boolean);
59
- /**
60
- * Starts recursive file watchers on the given paths and invokes
61
- * {@link WatchOptions.onChange} after a debounce window.
62
- * @param options Watcher configuration.
63
- * @returns A handle to close all watchers.
64
- */
65
- export declare const startWatcher: (options: WatchOptions) => WatchHandle;