@visulima/vis 1.0.0-alpha.2 → 1.0.0-alpha.20
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 +830 -14
- package/LICENSE.md +7667 -0
- package/README.md +322 -19
- package/dist/bin.js +1 -146
- package/dist/config/index.d.ts +2795 -0
- package/dist/config/index.js +1 -0
- package/dist/generate/index.d.ts +157 -0
- package/dist/generate/index.js +1 -0
- package/dist/packem_chunks/bin.js +1295 -0
- package/dist/packem_chunks/config.js +19 -0
- package/dist/packem_chunks/doctor-probe.js +2 -0
- package/dist/packem_chunks/fix.js +11 -0
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +5 -0
- package/dist/packem_chunks/handler12.js +1 -0
- package/dist/packem_chunks/handler13.js +27 -0
- package/dist/packem_chunks/handler14.js +5 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +1 -0
- package/dist/packem_chunks/handler17.js +1 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +1 -0
- package/dist/packem_chunks/handler2.js +2 -0
- package/dist/packem_chunks/handler20.js +5 -0
- package/dist/packem_chunks/handler21.js +2 -0
- package/dist/packem_chunks/handler22.js +2 -0
- package/dist/packem_chunks/handler23.js +18 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +1 -0
- package/dist/packem_chunks/handler26.js +5 -0
- package/dist/packem_chunks/handler27.js +1 -0
- package/dist/packem_chunks/handler28.js +3 -0
- package/dist/packem_chunks/handler29.js +1 -0
- package/dist/packem_chunks/handler3.js +4 -0
- package/dist/packem_chunks/handler30.js +7 -0
- package/dist/packem_chunks/handler31.js +33 -0
- package/dist/packem_chunks/handler32.js +3 -0
- package/dist/packem_chunks/handler33.js +1 -0
- package/dist/packem_chunks/handler34.js +26 -0
- package/dist/packem_chunks/handler35.js +3 -0
- package/dist/packem_chunks/handler36.js +7 -0
- package/dist/packem_chunks/handler37.js +22 -0
- package/dist/packem_chunks/handler38.js +428 -0
- package/dist/packem_chunks/handler39.js +6 -0
- package/dist/packem_chunks/handler4.js +8 -0
- package/dist/packem_chunks/handler40.js +24 -0
- package/dist/packem_chunks/handler41.js +10 -0
- package/dist/packem_chunks/handler42.js +153 -0
- package/dist/packem_chunks/handler43.js +25 -0
- package/dist/packem_chunks/handler44.js +24 -0
- package/dist/packem_chunks/handler45.js +213 -0
- package/dist/packem_chunks/handler46.js +3 -0
- package/dist/packem_chunks/handler47.js +27 -0
- package/dist/packem_chunks/handler48.js +167 -0
- package/dist/packem_chunks/handler49.js +34 -0
- package/dist/packem_chunks/handler5.js +1 -0
- package/dist/packem_chunks/handler6.js +1 -0
- package/dist/packem_chunks/handler7.js +1 -0
- package/dist/packem_chunks/handler8.js +1 -0
- package/dist/packem_chunks/handler9.js +2 -0
- package/dist/packem_chunks/heal-accept.js +10 -0
- package/dist/packem_chunks/heal.js +14 -0
- package/dist/packem_chunks/help-command.js +18 -0
- package/dist/packem_chunks/index.js +7 -0
- package/dist/packem_chunks/keys-refresh.js +4 -0
- package/dist/packem_chunks/list.js +3 -0
- package/dist/packem_chunks/loader.js +1 -0
- package/dist/packem_chunks/prune.js +3 -0
- package/dist/packem_chunks/run.js +1 -0
- package/dist/packem_chunks/status.js +2 -0
- package/dist/packem_chunks/sync.js +2 -0
- package/dist/packem_chunks/sync2.js +2 -0
- package/dist/packem_chunks/tar.js +3 -0
- package/dist/packem_chunks/tripwire.js +2 -0
- package/dist/packem_shared/advisories-DsynpacV.js +1 -0
- package/dist/packem_shared/ai-analysis-uYuTIIXi.js +68 -0
- package/dist/packem_shared/ai-cache-DuwHYx2O.js +1 -0
- package/dist/packem_shared/ai-fix-DzrA-dVz.js +43 -0
- package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
- package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
- package/dist/packem_shared/cache-directory-DQak1Vjc.js +1 -0
- package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
- package/dist/packem_shared/docker-B-CIN_nj.js +60 -0
- package/dist/packem_shared/failure-log-C3LEMmkq.js +2 -0
- package/dist/packem_shared/flakiness-Dq6K4ymq.js +1 -0
- package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
- package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
- package/dist/packem_shared/index-DH-5hsrC.js +1 -0
- package/dist/packem_shared/lifecycle-Dv3nAtoD.js +2 -0
- package/dist/packem_shared/lockfile-C5DYMHVq.js +1 -0
- package/dist/packem_shared/manifests-B0fMp872.js +1 -0
- package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
- package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
- package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
- package/dist/packem_shared/run-summary-utils-BaBGP3bo.js +1 -0
- package/dist/packem_shared/runtime-check-BusAwPb2.js +1 -0
- package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
- package/dist/packem_shared/selectors-B2ISH581.js +3 -0
- package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
- package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
- package/dist/packem_shared/toolchain-Cc3cwyLP.js +5 -0
- package/dist/packem_shared/typosquats-BCeR-sLf.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-07kUNTuP.js +1 -0
- package/dist/packem_shared/vis-update-app-CFrlJ3mW.js +1 -0
- package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
- package/index.d.ts +358 -0
- package/index.js +609 -0
- package/package.json +57 -22
- package/schemas/project.schema.json +872 -0
- package/schemas/vis-config.schema.json +4306 -0
- package/skills/vis/SKILL.md +96 -0
- package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
- package/templates/buildkite-ci/template.yml +20 -0
- package/dist/ai-analysis.d.ts +0 -40
- package/dist/ai-cache.d.ts +0 -21
- package/dist/bin.d.ts +0 -1
- package/dist/catalog.d.ts +0 -110
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/migrate/constants.d.ts +0 -12
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -20
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/types.d.ts +0 -20
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config.d.ts +0 -40
- package/dist/config.js +0 -1
- package/dist/package-manager.d.ts +0 -23
- package/dist/workspace.d.ts +0 -58
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vis
|
|
3
|
+
description: Use when the workspace contains a vis.config.ts (or vis.config.js/json) at the repo root, or when the user mentions "vis", "task-runner", or "@visulima/vis". This skill orchestrates the vis MCP server's eight read-only tools to inspect projects, plan task graphs, and diagnose remote-cache rotations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Working with the `vis` task runner
|
|
7
|
+
|
|
8
|
+
`vis` is the Visulima monorepo task runner — a Turborepo/Nx-class tool with a remote cache, REAPI gRPC backend, and project graph. When this skill is active you have the **`@visulima/vis-mcp` server** mounted, exposing eight read-only tools. Use them in preference to running `vis` shell commands yourself: the tools give you structured JSON and run faster.
|
|
9
|
+
|
|
10
|
+
The MCP server deliberately does NOT execute targets or scaffold templates — Nx-style "agent prepares, human executes". When the user wants to run `<project>:<target>` or `vis generate <template>`, prepare the command (use `list_targets`/`describe_template` to confirm it exists and capture required arguments) and ask the user to run it themselves; afterwards use `get_run_logs` to read the result of any task run.
|
|
11
|
+
|
|
12
|
+
## Tools available
|
|
13
|
+
|
|
14
|
+
| Tool | Purpose |
|
|
15
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| `list_projects` | All projects in the workspace, optionally filtered by a vis query (`tag=frontend`, `type=application`, …) |
|
|
17
|
+
| `describe_project` | Full metadata for one project: language, layer, tags, root path, all targets |
|
|
18
|
+
| `list_targets` | Per-target rows across the workspace, optionally narrowed to a single project |
|
|
19
|
+
| `list_templates` | Scaffolding templates discovered in `.vis/templates/`, `.moon/templates/`, and `vis.config.ts` `generator.templates` |
|
|
20
|
+
| `describe_template` | Variable schema, default destination, and description for a single template — required before suggesting a `vis generate` command |
|
|
21
|
+
| `get_run_logs` | Most recent run summary from `.task-runner/`, or a specific `runId`, optionally filtered to one task |
|
|
22
|
+
| `cache_why` | Diff a task's cache hash against the previous run — pinpoints what changed (command, nodes, runtime, implicit deps) |
|
|
23
|
+
| `cache_hash` | Recorded hash and per-input hash details for a task |
|
|
24
|
+
|
|
25
|
+
## Workflow patterns
|
|
26
|
+
|
|
27
|
+
### Discovery — "what's in this repo?"
|
|
28
|
+
|
|
29
|
+
Default opening move when the user asks about the workspace:
|
|
30
|
+
|
|
31
|
+
1. `list_projects` (no filter). Shows everything with categories and target counts.
|
|
32
|
+
2. If they ask about a specific package, `describe_project` for the full picture rather than re-running list with a filter.
|
|
33
|
+
|
|
34
|
+
### Plan a build
|
|
35
|
+
|
|
36
|
+
1. `list_targets` (optionally with `project: "@scope/name"`) to see what `build`/`test`/`lint`/etc. targets exist.
|
|
37
|
+
2. Tell the user the exact command (`vis run @scope/name:build`) and let them run it.
|
|
38
|
+
3. Use `get_run_logs` afterwards to inspect status, cache hits, and stderr tails.
|
|
39
|
+
|
|
40
|
+
### Investigate a cache miss
|
|
41
|
+
|
|
42
|
+
When a build that should have been cached re-ran:
|
|
43
|
+
|
|
44
|
+
1. `get_run_logs` (no args → latest summary) — surfaces all task statuses for the last run.
|
|
45
|
+
2. For any task with status `success` but `cacheStatus: "miss"`, call `cache_why` with that `taskId`. It diffs hashDetails against the previous run and tells you which input rotated (command string, file content, `implicitDependency`, runtime version, …).
|
|
46
|
+
3. If `cache_why` shows the change but the user wants to see the raw hash inputs, `cache_hash` returns the full per-input breakdown.
|
|
47
|
+
|
|
48
|
+
### Scaffold a new package or component
|
|
49
|
+
|
|
50
|
+
When the user asks for "a new X" / "scaffold Y":
|
|
51
|
+
|
|
52
|
+
1. `list_templates` — pick the template whose `name` or `description` matches the user's request.
|
|
53
|
+
2. `describe_template` with that name — read the `variables[]` schema. Identify which variables are `required` and which have sensible `default` values.
|
|
54
|
+
3. Construct the command: `vis generate <name> -- --var1=value1 --var2=value2`. For interactive prompts, drop the `--` overrides and let the user step through. For `--defaults`-friendly templates, add `--defaults` to skip prompts.
|
|
55
|
+
4. Hand the command to the user to execute. Don't fabricate variable values — if the user hasn't told you what to pass for a required variable, ask.
|
|
56
|
+
|
|
57
|
+
#### Worked example
|
|
58
|
+
|
|
59
|
+
User: _"Scaffold a new React button component called PrimaryButton."_
|
|
60
|
+
|
|
61
|
+
1. Call `list_templates` → response contains an entry `{ "name": "component", "source": "native", "description": "Scaffold a React component" }`. That's the closest match.
|
|
62
|
+
2. Call `describe_template` with `{ "name": "component" }` → response shows `variables`:
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{ "name": "name", "type": "string", "required": true, "prompt": "Component name?" },
|
|
66
|
+
{ "name": "withTest", "type": "boolean", "required": false, "default": true },
|
|
67
|
+
{ "name": "style", "type": "enum", "required": false, "default": "primary", "values": ["primary", "secondary"] }
|
|
68
|
+
]
|
|
69
|
+
```
|
|
70
|
+
3. The user supplied `name` (`PrimaryButton`) and implied `style=primary` (default already matches). `withTest` is unspecified — the default is fine, no need to override.
|
|
71
|
+
4. Suggested command for the user to run:
|
|
72
|
+
```sh
|
|
73
|
+
vis generate component -- --name=PrimaryButton --style=primary
|
|
74
|
+
```
|
|
75
|
+
Do **not** invent values for required variables the user never mentioned — ask first.
|
|
76
|
+
|
|
77
|
+
### Diagnose a failed run
|
|
78
|
+
|
|
79
|
+
1. `get_run_logs` to see which task(s) failed.
|
|
80
|
+
2. `get_run_logs` with `taskId` set to the failing task — returns just that entry, including the captured stderr tail.
|
|
81
|
+
3. Decide: is it a code bug (read the project's source), a cache poisoning issue (`cache_why`), or environmental (look at the run summary's `runtime` block)?
|
|
82
|
+
|
|
83
|
+
## Safety rules
|
|
84
|
+
|
|
85
|
+
- **All tools are read-only.** The server does not execute targets. If the user wants something built/tested/linted, give them the command and let them run it.
|
|
86
|
+
- **All tools run in the directory where `vis-mcp` was launched.** Override at server startup by setting `VIS_MCP_WORKSPACE_ROOT`. You can read that path from the server's stderr boot line: `[vis-mcp] ready (workspace: …)`.
|
|
87
|
+
|
|
88
|
+
## When NOT to use this skill
|
|
89
|
+
|
|
90
|
+
- The user wants to write a `vis.config.ts` — that's editing source, not running the CLI. Use Read/Edit/Write on the config file directly.
|
|
91
|
+
- The user is asking about Turborepo, Nx, or Bazel specifically (not vis). The tools won't help with those.
|
|
92
|
+
- The repo has no `vis.config.*` and no mention of vis. Don't volunteer the tools.
|
|
93
|
+
|
|
94
|
+
## Tool-result conventions
|
|
95
|
+
|
|
96
|
+
All tools return JSON-encoded text in the standard MCP `content[].text` slot. On error, `isError: true` is set and the text payload is `{"error": "<message>"}`. Parse the JSON before reasoning about it — the text field is structured data, not prose.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
to: ".buildkite/pipeline.yml"
|
|
3
|
+
---
|
|
4
|
+
# Generated by `vis generate buildkite-ci`.
|
|
5
|
+
# Run `vis ci` against affected packages on every build.{% if withHeal %}
|
|
6
|
+
# Heal block: on failure, `vis ai heal` posts a Buildkite annotation; an
|
|
7
|
+
# allow-listed maintainer manually unblocks the block step to apply +
|
|
8
|
+
# commit the patch via `vis ai heal accept`. The unblocker email
|
|
9
|
+
# (BUILDKITE_UNBLOCKER_EMAIL) must be listed in `ai.heal.allowedActors`
|
|
10
|
+
# in vis.config.ts or the accept step refuses to commit.{% endif %}
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- label: ":hammer: vis ci"
|
|
14
|
+
key: ci
|
|
15
|
+
timeout_in_minutes: 30
|
|
16
|
+
command: |
|
|
17
|
+
{% if packageManager == "pnpm" %} corepack enable
|
|
18
|
+
pnpm install --frozen-lockfile
|
|
19
|
+
pnpm vis ci {{ targets }}
|
|
20
|
+
{% endif %}{% if packageManager == "npm" %} npm ci
|
|
21
|
+
npx vis ci {{ targets }}
|
|
22
|
+
{% endif %}{% if packageManager == "yarn" %} corepack enable
|
|
23
|
+
yarn install --immutable
|
|
24
|
+
yarn vis ci {{ targets }}
|
|
25
|
+
{% endif %}{% if packageManager == "bun" %} bun install --frozen-lockfile
|
|
26
|
+
bunx vis ci {{ targets }}
|
|
27
|
+
{% endif %} agents:
|
|
28
|
+
queue: {{ agentQueue }}
|
|
29
|
+
{% if withHeal %}
|
|
30
|
+
- label: ":sparkles: vis ai heal"
|
|
31
|
+
key: heal-propose
|
|
32
|
+
depends_on: ci
|
|
33
|
+
timeout_in_minutes: 30
|
|
34
|
+
# Only run when CI failed and the build is for a PR — heal-accept
|
|
35
|
+
# has nowhere to commit on push-event builds.
|
|
36
|
+
if: build.failed_jobs > 0 && build.pull_request.id != null
|
|
37
|
+
command: |
|
|
38
|
+
{% if packageManager == "pnpm" %} corepack enable
|
|
39
|
+
pnpm install --frozen-lockfile
|
|
40
|
+
pnpm vis ai heal
|
|
41
|
+
{% endif %}{% if packageManager == "npm" %} npm ci
|
|
42
|
+
npx vis ai heal
|
|
43
|
+
{% endif %}{% if packageManager == "yarn" %} corepack enable
|
|
44
|
+
yarn install --immutable
|
|
45
|
+
yarn vis ai heal
|
|
46
|
+
{% endif %}{% if packageManager == "bun" %} bun install --frozen-lockfile
|
|
47
|
+
bunx vis ai heal
|
|
48
|
+
{% endif %} agents:
|
|
49
|
+
queue: {{ agentQueue }}
|
|
50
|
+
# Buildkite has no commit API of its own — `vis ai heal accept`
|
|
51
|
+
# derives the upstream provider from BUILDKITE_REPO and commits
|
|
52
|
+
# through GitHub or GitLab. Set GITHUB_TOKEN or GITLAB_TOKEN on
|
|
53
|
+
# the agent (matching your remote) so heal accept can land the patch.
|
|
54
|
+
|
|
55
|
+
- block: ":white_check_mark: Apply AI heal patch?"
|
|
56
|
+
key: heal-gate
|
|
57
|
+
depends_on: heal-propose
|
|
58
|
+
if: build.failed_jobs > 0 && build.pull_request.id != null
|
|
59
|
+
prompt: |
|
|
60
|
+
Unblocking applies and commits the patch from the heal annotation.
|
|
61
|
+
The unblocker email (BUILDKITE_UNBLOCKER_EMAIL) must be listed in
|
|
62
|
+
`ai.heal.allowedActors` in vis.config.ts, otherwise the accept
|
|
63
|
+
step will refuse to commit.
|
|
64
|
+
|
|
65
|
+
- label: ":robot_face: vis ai heal accept"
|
|
66
|
+
key: heal-accept
|
|
67
|
+
depends_on: heal-gate
|
|
68
|
+
timeout_in_minutes: 30
|
|
69
|
+
# Defense in depth — heal-accept can't push to a fork and has no
|
|
70
|
+
# commit target on push-event builds. Refuse early.
|
|
71
|
+
if: build.pull_request.id != null
|
|
72
|
+
command: |
|
|
73
|
+
{% if packageManager == "pnpm" %} corepack enable
|
|
74
|
+
pnpm install --frozen-lockfile
|
|
75
|
+
pnpm vis ai heal accept
|
|
76
|
+
{% endif %}{% if packageManager == "npm" %} npm ci
|
|
77
|
+
npx vis ai heal accept
|
|
78
|
+
{% endif %}{% if packageManager == "yarn" %} corepack enable
|
|
79
|
+
yarn install --immutable
|
|
80
|
+
yarn vis ai heal accept
|
|
81
|
+
{% endif %}{% if packageManager == "bun" %} bun install --frozen-lockfile
|
|
82
|
+
bunx vis ai heal accept
|
|
83
|
+
{% endif %} agents:
|
|
84
|
+
queue: {{ agentQueue }}
|
|
85
|
+
{% endif %}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"title": "Buildkite CI"
|
|
2
|
+
"description": "A Buildkite pipeline.yml that runs `vis ci` against affected packages, with an optional `vis ai heal` block-step flow."
|
|
3
|
+
"variables":
|
|
4
|
+
"targets":
|
|
5
|
+
"type": "string"
|
|
6
|
+
"default": "lint,test,build"
|
|
7
|
+
"prompt": "Comma-separated list of `vis ci` targets to run"
|
|
8
|
+
"packageManager":
|
|
9
|
+
"type": "enum"
|
|
10
|
+
"values": ["pnpm", "npm", "yarn", "bun"]
|
|
11
|
+
"default": "pnpm"
|
|
12
|
+
"prompt": "Package manager (used in the install line)"
|
|
13
|
+
"withHeal":
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
"default": false
|
|
16
|
+
"prompt": "Include the `vis ai heal` propose + block-step accept flow?"
|
|
17
|
+
"agentQueue":
|
|
18
|
+
"type": "string"
|
|
19
|
+
"default": "default"
|
|
20
|
+
"prompt": "Buildkite agent queue to schedule on"
|
package/dist/ai-analysis.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { AiProviderInfo } from "@visulima/find-ai-runner";
|
|
2
|
-
import type { OutdatedEntry } from "./catalog.d.ts";
|
|
3
|
-
interface AiConfig {
|
|
4
|
-
/** Cache TTL in milliseconds. Overrides default (1h / 30min for security). */
|
|
5
|
-
cacheTtl?: number;
|
|
6
|
-
/** Override default provider priority. Higher = preferred. */
|
|
7
|
-
priority?: Record<string, number>;
|
|
8
|
-
/** Use a specific provider, skip auto-detection. */
|
|
9
|
-
provider?: string;
|
|
10
|
-
}
|
|
11
|
-
type AnalysisType = "compatibility" | "impact" | "recommend" | "security";
|
|
12
|
-
declare const DEFAULT_PRIORITY: Record<string, number>;
|
|
13
|
-
/** Resolve which AI provider to use based on config and availability. */
|
|
14
|
-
declare const resolveProvider: (config?: AiConfig) => AiProviderInfo | undefined;
|
|
15
|
-
interface AiRecommendation {
|
|
16
|
-
action: "defer" | "review" | "skip" | "update";
|
|
17
|
-
breakingChanges: string[];
|
|
18
|
-
effort: "high" | "low" | "medium";
|
|
19
|
-
package: string;
|
|
20
|
-
reason: string;
|
|
21
|
-
riskLevel: "critical" | "high" | "low" | "medium";
|
|
22
|
-
}
|
|
23
|
-
interface AiAnalysisResult {
|
|
24
|
-
analysisType: AnalysisType;
|
|
25
|
-
provider: string;
|
|
26
|
-
recommendations: AiRecommendation[];
|
|
27
|
-
summary: string;
|
|
28
|
-
warnings: string[];
|
|
29
|
-
}
|
|
30
|
-
declare const validateAnalysisType: (type: string) => AnalysisType;
|
|
31
|
-
declare const buildAnalysisPrompt: (outdated: OutdatedEntry[], analysisType?: AnalysisType) => string;
|
|
32
|
-
declare const extractJson: (text: string) => unknown | undefined;
|
|
33
|
-
declare const normalizeRecommendation: (raw: Record<string, unknown>) => AiRecommendation;
|
|
34
|
-
declare const parseAiResponse: (text: string, provider: string, analysisType: AnalysisType) => AiAnalysisResult;
|
|
35
|
-
declare const ruleBasedAnalysis: (outdated: OutdatedEntry[], analysisType: AnalysisType) => AiAnalysisResult;
|
|
36
|
-
declare const formatAiAnalysis: (result: AiAnalysisResult) => string;
|
|
37
|
-
declare const formatAiAnalysisJson: (result: AiAnalysisResult) => string;
|
|
38
|
-
declare const runAiAnalysis: (outdated: OutdatedEntry[], logger: Console, config?: AiConfig, analysisType?: AnalysisType) => Promise<AiAnalysisResult>;
|
|
39
|
-
export type { AiAnalysisResult, AiConfig, AiRecommendation, AnalysisType };
|
|
40
|
-
export { buildAnalysisPrompt, DEFAULT_PRIORITY, extractJson, formatAiAnalysis, formatAiAnalysisJson, normalizeRecommendation, parseAiResponse, resolveProvider, ruleBasedAnalysis, runAiAnalysis, validateAnalysisType, };
|
package/dist/ai-cache.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AiAnalysisResult, AnalysisType } from "./ai-analysis.d.ts";
|
|
2
|
-
import type { OutdatedEntry } from "./catalog.d.ts";
|
|
3
|
-
interface CacheEntry {
|
|
4
|
-
createdAt: number;
|
|
5
|
-
result: AiAnalysisResult;
|
|
6
|
-
ttlMs: number;
|
|
7
|
-
}
|
|
8
|
-
interface CacheStats {
|
|
9
|
-
entries: number;
|
|
10
|
-
newestEntry: number | undefined;
|
|
11
|
-
oldestEntry: number | undefined;
|
|
12
|
-
totalSizeBytes: number;
|
|
13
|
-
}
|
|
14
|
-
declare const buildCacheKey: (provider: string, analysisType: string, outdated: Pick<OutdatedEntry, "currentRange" | "packageName" | "targetVersion">[]) => string;
|
|
15
|
-
declare const getCachedAnalysis: (cacheKey: string) => AiAnalysisResult | undefined;
|
|
16
|
-
declare const setCachedAnalysis: (cacheKey: string, result: AiAnalysisResult, ttlMs: number) => void;
|
|
17
|
-
declare const getTtlForAnalysisType: (analysisType: AnalysisType | string, configTtl?: number) => number;
|
|
18
|
-
declare const getCacheStats: () => CacheStats;
|
|
19
|
-
declare const clearCache: () => number;
|
|
20
|
-
export type { CacheEntry, CacheStats };
|
|
21
|
-
export { buildCacheKey, clearCache, getCachedAnalysis, getCacheStats, getTtlForAnalysisType, setCachedAnalysis };
|
package/dist/bin.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/catalog.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
type UpdateTarget = "latest" | "minor" | "patch";
|
|
2
|
-
interface ParsedVersion {
|
|
3
|
-
major: number;
|
|
4
|
-
minor: number;
|
|
5
|
-
patch: number;
|
|
6
|
-
prerelease: string;
|
|
7
|
-
}
|
|
8
|
-
interface SecurityVulnerability {
|
|
9
|
-
cvssScore?: number;
|
|
10
|
-
fixedVersions: string[];
|
|
11
|
-
id: string;
|
|
12
|
-
severity: "CRITICAL" | "HIGH" | "LOW" | "MODERATE" | "UNKNOWN";
|
|
13
|
-
summary: string;
|
|
14
|
-
}
|
|
15
|
-
interface OutdatedEntry {
|
|
16
|
-
catalogName: string;
|
|
17
|
-
currentRange: string;
|
|
18
|
-
newRange: string;
|
|
19
|
-
packageName: string;
|
|
20
|
-
targetVersion: string;
|
|
21
|
-
updateType: "major" | "minor" | "patch";
|
|
22
|
-
vulnerabilities?: SecurityVulnerability[];
|
|
23
|
-
}
|
|
24
|
-
interface CatalogCheckOptions {
|
|
25
|
-
exclude: string[];
|
|
26
|
-
include: string[];
|
|
27
|
-
includePrerelease: boolean;
|
|
28
|
-
security?: boolean;
|
|
29
|
-
target: UpdateTarget;
|
|
30
|
-
}
|
|
31
|
-
interface ReadCatalogOptions {
|
|
32
|
-
dev?: boolean;
|
|
33
|
-
prod?: boolean;
|
|
34
|
-
}
|
|
35
|
-
declare const parseVersion: (input: string) => ParsedVersion | undefined;
|
|
36
|
-
declare const extractPrefix: (range: string) => string;
|
|
37
|
-
declare const getUpdateType: (current: ParsedVersion, target: ParsedVersion) => "major" | "minor" | "none" | "patch";
|
|
38
|
-
declare const isNewer: (current: ParsedVersion, target: ParsedVersion) => boolean;
|
|
39
|
-
declare const matchesPattern: (name: string, pattern: string) => boolean;
|
|
40
|
-
declare const matchesFilters: (name: string, include: string[], exclude: string[]) => boolean;
|
|
41
|
-
declare const parseCatalogsFromYaml: (content: string) => Map<string, Map<string, string>>;
|
|
42
|
-
interface BunPackageJson {
|
|
43
|
-
workspaces?: {
|
|
44
|
-
catalog?: Record<string, string>;
|
|
45
|
-
catalogs?: Record<string, Record<string, string>>;
|
|
46
|
-
packages?: string[];
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
declare const parseBunCatalogs: (pkg: BunPackageJson) => Map<string, Map<string, string>>;
|
|
50
|
-
declare const parseCompositeCatalogName: (name: string) => {
|
|
51
|
-
depType: string;
|
|
52
|
-
relativePath: string;
|
|
53
|
-
} | undefined;
|
|
54
|
-
declare const readPackageJsonDeps: (workspaceRoot: string, options?: ReadCatalogOptions) => Map<string, Map<string, string>>;
|
|
55
|
-
declare const hasPackageJsonDeps: (workspaceRoot: string) => boolean;
|
|
56
|
-
declare const applyPackageJsonUpdates: (workspaceRoot: string, updates: OutdatedEntry[]) => void;
|
|
57
|
-
type CatalogProvider = "bun" | "pnpm";
|
|
58
|
-
declare const hasCatalogs: (workspaceRoot: string, packageManager?: string) => boolean;
|
|
59
|
-
declare const readCatalogs: (workspaceRoot: string, packageManager?: string, options?: ReadCatalogOptions) => Map<string, Map<string, string>>;
|
|
60
|
-
interface NpmrcConfig {
|
|
61
|
-
authTokens: Map<string, string>;
|
|
62
|
-
defaultRegistry: string;
|
|
63
|
-
registries: Map<string, string>;
|
|
64
|
-
}
|
|
65
|
-
declare const parseNpmrc: (content: string) => NpmrcConfig;
|
|
66
|
-
declare const loadNpmrc: (workspaceRoot: string) => NpmrcConfig;
|
|
67
|
-
declare const getRegistryForPackage: (packageName: string, config: NpmrcConfig) => {
|
|
68
|
-
token?: string;
|
|
69
|
-
url: string;
|
|
70
|
-
};
|
|
71
|
-
interface RegistryVersionInfo {
|
|
72
|
-
latest: string;
|
|
73
|
-
versions: string[];
|
|
74
|
-
}
|
|
75
|
-
declare const fetchPackageVersions: (packageName: string, registryConfig?: {
|
|
76
|
-
authToken?: string;
|
|
77
|
-
url: string;
|
|
78
|
-
}, timeoutMs?: number) => Promise<RegistryVersionInfo>;
|
|
79
|
-
declare const fetchVulnerabilities: (packages: {
|
|
80
|
-
name: string;
|
|
81
|
-
version: string;
|
|
82
|
-
}[], timeoutMs?: number) => Promise<Map<string, SecurityVulnerability[]>>;
|
|
83
|
-
declare const findTargetVersion: (versions: string[], latest: string, currentRange: string, target: UpdateTarget, includePrerelease: boolean) => string | undefined;
|
|
84
|
-
interface CheckOutdatedResult {
|
|
85
|
-
failed: string[];
|
|
86
|
-
outdated: OutdatedEntry[];
|
|
87
|
-
}
|
|
88
|
-
declare const checkOutdated: (catalogs: Map<string, Map<string, string>>, options: CatalogCheckOptions, npmrcConfig?: NpmrcConfig, onProgress?: (current: number, total: number) => void) => Promise<CheckOutdatedResult>;
|
|
89
|
-
declare const createBackup: (workspaceRoot: string, packageManager?: string, updates?: OutdatedEntry[]) => string | undefined;
|
|
90
|
-
declare const restoreFromBackup: (workspaceRoot: string, packageManager?: string) => boolean;
|
|
91
|
-
declare const hasBackup: (workspaceRoot: string, packageManager?: string) => boolean;
|
|
92
|
-
type OutputFormat = "json" | "minimal" | "table";
|
|
93
|
-
declare const formatOutdatedJson: (result: CheckOutdatedResult) => string;
|
|
94
|
-
declare const formatOutdatedMinimal: (outdated: OutdatedEntry[]) => string;
|
|
95
|
-
declare const toFilterArray: (value: string | string[] | undefined) => string[];
|
|
96
|
-
declare const groupByCatalog: (entries: OutdatedEntry[]) => Map<string, OutdatedEntry[]>;
|
|
97
|
-
declare const formatOutdatedTable: (outdated: OutdatedEntry[], logger: Console) => void;
|
|
98
|
-
declare const formatSummary: (outdated: OutdatedEntry[]) => string;
|
|
99
|
-
declare const detectJsonIndent: (content: string) => number | string;
|
|
100
|
-
declare const applyCatalogUpdates: (workspaceRoot: string, updates: OutdatedEntry[], packageManager?: string, backup?: boolean) => string | undefined;
|
|
101
|
-
declare const promptPackageSelection: (outdated: OutdatedEntry[]) => Promise<OutdatedEntry[]>;
|
|
102
|
-
interface ChangelogInfo {
|
|
103
|
-
npmUrl: string;
|
|
104
|
-
packageName: string;
|
|
105
|
-
releaseUrl?: string;
|
|
106
|
-
repoUrl?: string;
|
|
107
|
-
}
|
|
108
|
-
declare const fetchChangelogInfo: (packages: OutdatedEntry[], timeoutMs?: number) => Promise<ChangelogInfo[]>;
|
|
109
|
-
export type { CatalogCheckOptions, CatalogProvider, ChangelogInfo, CheckOutdatedResult, NpmrcConfig, OutdatedEntry, OutputFormat, ParsedVersion, ReadCatalogOptions, SecurityVulnerability, UpdateTarget, };
|
|
110
|
-
export { applyCatalogUpdates, applyPackageJsonUpdates, checkOutdated, createBackup, detectJsonIndent, extractPrefix, fetchChangelogInfo, fetchPackageVersions, fetchVulnerabilities, findTargetVersion, formatOutdatedJson, formatOutdatedMinimal, formatOutdatedTable, formatSummary, getRegistryForPackage, getUpdateType, groupByCatalog, hasBackup, hasCatalogs, hasPackageJsonDeps, isNewer, loadNpmrc, matchesFilters, matchesPattern, parseBunCatalogs, parseCatalogsFromYaml, parseCompositeCatalogName, parseNpmrc, parseVersion, promptPackageSelection, readCatalogs, readPackageJsonDeps, restoreFromBackup, toFilterArray, };
|
package/dist/commands/ai.d.ts
DELETED
package/dist/commands/check.d.ts
DELETED
package/dist/commands/graph.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const HOOKS: readonly ["pre-commit", "pre-merge-commit", "prepare-commit-msg", "commit-msg", "post-commit", "applypatch-msg", "pre-applypatch", "post-applypatch", "pre-rebase", "post-rewrite", "post-checkout", "post-merge", "pre-push", "pre-auto-gc"];
|
|
2
|
-
declare const DEFAULT_HOOKS_DIRECTORY = ".vis-hooks";
|
|
3
|
-
interface InstallResult {
|
|
4
|
-
isError: boolean;
|
|
5
|
-
message: string;
|
|
6
|
-
}
|
|
7
|
-
export type { InstallResult };
|
|
8
|
-
export { DEFAULT_HOOKS_DIRECTORY, HOOKS };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { InstallResult } from "./constants.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Generates the shell script that dispatches to user-defined hooks.
|
|
4
|
-
*/
|
|
5
|
-
declare const hookScript: (directory: string) => string;
|
|
6
|
-
declare const installHooks: (directory?: string) => InstallResult;
|
|
7
|
-
export { hookScript, installHooks };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { PackageManagerType } from "../migrate/types.d.ts";
|
|
2
|
-
import type { InstallResult } from "./constants.d.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Detects which husky directory is in use, if any.
|
|
5
|
-
*/
|
|
6
|
-
declare const detectHuskyDirectory: (root: string) => string | undefined;
|
|
7
|
-
/**
|
|
8
|
-
* Transforms a husky hook script for vis.
|
|
9
|
-
* Removes the common.sh sourcing line since vis handles PATH setup in its dispatcher.
|
|
10
|
-
*/
|
|
11
|
-
declare const transformHookScript: (content: string) => string;
|
|
12
|
-
/**
|
|
13
|
-
* Detects the package manager used in the project.
|
|
14
|
-
*/
|
|
15
|
-
declare const detectPackageManager: (root: string) => PackageManagerType;
|
|
16
|
-
/**
|
|
17
|
-
* Cleans husky references from package.json scripts.
|
|
18
|
-
*/
|
|
19
|
-
declare const cleanPackageJsonScripts: (root: string) => {
|
|
20
|
-
modified: boolean;
|
|
21
|
-
removedScriptReferences: string[];
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Migrates from husky to vis hooks.
|
|
25
|
-
*/
|
|
26
|
-
declare const migrateFromHusky: (root: string, hooksDirectory: string, logger: Console) => InstallResult;
|
|
27
|
-
export { cleanPackageJsonScripts, detectHuskyDirectory, detectPackageManager, migrateFromHusky, transformHookScript };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const LINT_STAGED_JSON_CONFIG_FILES: readonly [".lintstagedrc.json", ".lintstagedrc"];
|
|
2
|
-
declare const LINT_STAGED_OTHER_CONFIG_FILES: readonly [".lintstagedrc.yaml", ".lintstagedrc.yml", ".lintstagedrc.mjs", "lint-staged.config.mjs", ".lintstagedrc.cjs", "lint-staged.config.cjs", ".lintstagedrc.js", "lint-staged.config.js", ".lintstagedrc.ts", "lint-staged.config.ts", ".lintstagedrc.mts", "lint-staged.config.mts", ".lintstagedrc.cts", "lint-staged.config.cts"];
|
|
3
|
-
declare const LINT_STAGED_ALL_CONFIG_FILES: ReadonlyArray<string>;
|
|
4
|
-
declare const STALE_LINT_STAGED_PATTERNS: ReadonlyArray<RegExp>;
|
|
5
|
-
declare const REPLACED_PACKAGES: readonly ["husky", "lint-staged"];
|
|
6
|
-
declare const HUSKY_SCRIPT_PATTERNS: ReadonlyArray<RegExp>;
|
|
7
|
-
/**
|
|
8
|
-
* Remove husky references from a single script value.
|
|
9
|
-
* Returns the cleaned script, or undefined if the entire script should be removed.
|
|
10
|
-
*/
|
|
11
|
-
declare const cleanHuskyFromScript: (scriptValue: string) => string | undefined;
|
|
12
|
-
export { cleanHuskyFromScript, HUSKY_SCRIPT_PATTERNS, LINT_STAGED_ALL_CONFIG_FILES, LINT_STAGED_JSON_CONFIG_FILES, LINT_STAGED_OTHER_CONFIG_FILES, REPLACED_PACKAGES, STALE_LINT_STAGED_PATTERNS, };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { VisConfig } from "../../workspace.d.ts";
|
|
2
|
-
import type { MigrationReport, PackageManagerType } from "./types.d.ts";
|
|
3
|
-
interface MigrateLogger {
|
|
4
|
-
info: (message: string) => void;
|
|
5
|
-
warn: (message: string) => void;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Rewrite scripts in package.json to replace husky/lint-staged references.
|
|
9
|
-
*/
|
|
10
|
-
declare const rewriteScripts: (scripts: Record<string, string>, report: MigrationReport) => {
|
|
11
|
-
modified: boolean;
|
|
12
|
-
scripts: Record<string, string>;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Rewrite a single package.json: remove replaced packages, add overrides, rewrite scripts.
|
|
16
|
-
*/
|
|
17
|
-
declare const rewritePackageJson: (root: string, packageManager: PackageManagerType, overrides: Record<string, string>, report: MigrationReport) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Iterate over all workspace packages and rewrite their package.json files.
|
|
20
|
-
*/
|
|
21
|
-
declare const migrateMonorepoPackages: (root: string, packageManager: PackageManagerType, overrides: Record<string, string>, report: MigrationReport) => void;
|
|
22
|
-
/**
|
|
23
|
-
* Update pnpm-workspace.yaml catalog with override entries.
|
|
24
|
-
*/
|
|
25
|
-
declare const updatePnpmWorkspaceCatalog: (root: string, overrides: Record<string, string>) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Top-level orchestrator for dependency migration.
|
|
28
|
-
*/
|
|
29
|
-
declare const migrateDeps: (root: string, packageManager: PackageManagerType, visConfig: VisConfig, options: {
|
|
30
|
-
dryRun: boolean;
|
|
31
|
-
}, logger: MigrateLogger, report: MigrationReport) => void;
|
|
32
|
-
export { migrateDeps, migrateMonorepoPackages, rewritePackageJson, rewriteScripts, updatePnpmWorkspaceCatalog };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads and parses a JSON file. Returns undefined if the file doesn't exist or isn't valid JSON.
|
|
3
|
-
*/
|
|
4
|
-
declare const readJsonFile: <T>(filePath: string) => T | undefined;
|
|
5
|
-
/**
|
|
6
|
-
* Checks if a file exists and contains valid JSON.
|
|
7
|
-
*/
|
|
8
|
-
declare const isJsonFile: (filePath: string) => boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Detect the indentation used in a JSON file by looking at the first indented line.
|
|
11
|
-
*/
|
|
12
|
-
declare const detectJsonIndent: (content: string) => number;
|
|
13
|
-
/**
|
|
14
|
-
* Edits a JSON file in place using a mutator function.
|
|
15
|
-
* The mutator receives the parsed data and should return the modified data,
|
|
16
|
-
* or undefined to skip writing. Returns true if the file was modified.
|
|
17
|
-
* Preserves the original indentation style.
|
|
18
|
-
*/
|
|
19
|
-
declare const editJsonFile: <T>(filePath: string, mutator: (data: T) => T | undefined) => boolean;
|
|
20
|
-
export { detectJsonIndent, editJsonFile, isJsonFile, readJsonFile };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type { MigrationReport } from "./types.d.ts";
|
|
2
|
-
interface MigrateLogger {
|
|
3
|
-
info: (message: string) => void;
|
|
4
|
-
warn: (message: string) => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Check if a standalone lint-staged config file exists.
|
|
8
|
-
*/
|
|
9
|
-
declare const hasStandaloneLintStagedConfig: (root: string) => boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Check if a standalone lint-staged config exists in a format that can't be
|
|
12
|
-
* auto-migrated (non-JSON files like .yaml, .mjs, .cjs, .js, or a non-JSON .lintstagedrc).
|
|
13
|
-
*/
|
|
14
|
-
declare const hasUnsupportedLintStagedConfig: (root: string) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Check if vis.config.ts already has a `staged` config key.
|
|
17
|
-
*/
|
|
18
|
-
declare const hasStagedConfigInVisConfig: (root: string) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Detect lint-staged config: returns the source ("package.json", a filename, or undefined).
|
|
21
|
-
*/
|
|
22
|
-
declare const detectLintStagedConfig: (root: string) => string | undefined;
|
|
23
|
-
/**
|
|
24
|
-
* Extract lint-staged config from package.json.
|
|
25
|
-
*/
|
|
26
|
-
declare const extractLintStagedFromPackageJson: (root: string) => Record<string, string | string[]> | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Parse a JSON lint-staged config file.
|
|
29
|
-
*/
|
|
30
|
-
declare const parseLintStagedJsonFile: (filePath: string) => Record<string, string | string[]> | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Generate a TypeScript snippet for the staged block.
|
|
33
|
-
*/
|
|
34
|
-
declare const generateStagedConfigSnippet: (config: Record<string, string | string[]>) => string;
|
|
35
|
-
/**
|
|
36
|
-
* Insert staged config into vis.config.ts. Creates the file if it doesn't exist.
|
|
37
|
-
*/
|
|
38
|
-
declare const insertStagedIntoVisConfig: (root: string, config: Record<string, string | string[]>, logger: MigrateLogger) => boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Remove `lint-staged` key, config, and dependency from package.json in a single read/write.
|
|
41
|
-
* Returns which removals were performed.
|
|
42
|
-
*/
|
|
43
|
-
declare const removeLintStagedFromPackageJson: (root: string) => {
|
|
44
|
-
configRemoved: boolean;
|
|
45
|
-
dependencyRemoved: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Remove standalone lint-staged config files.
|
|
49
|
-
*/
|
|
50
|
-
declare const removeLintStagedConfigFiles: (root: string, report: MigrationReport) => void;
|
|
51
|
-
/**
|
|
52
|
-
* Rewrite pre-commit hook to replace lint-staged invocations with `vis staged`.
|
|
53
|
-
*/
|
|
54
|
-
declare const rewritePreCommitHook: (root: string, hooksDirectory: string) => boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Migrates lint-staged configuration to vis.config.ts staged block.
|
|
57
|
-
*/
|
|
58
|
-
declare const migrateLintStaged: (root: string, options: {
|
|
59
|
-
dryRun: boolean;
|
|
60
|
-
silent?: boolean;
|
|
61
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
62
|
-
export { detectLintStagedConfig, extractLintStagedFromPackageJson, generateStagedConfigSnippet, hasStagedConfigInVisConfig, hasStandaloneLintStagedConfig, hasUnsupportedLintStagedConfig, insertStagedIntoVisConfig, migrateLintStaged, parseLintStagedJsonFile, removeLintStagedConfigFiles, removeLintStagedFromPackageJson, rewritePreCommitHook, };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface MigrateLogger {
|
|
2
|
-
info: (message: string) => void;
|
|
3
|
-
warn: (message: string) => void;
|
|
4
|
-
}
|
|
5
|
-
interface MigrationReport {
|
|
6
|
-
gitHooksConfigured: boolean;
|
|
7
|
-
inlinedLintStagedConfigCount: number;
|
|
8
|
-
manualSteps: string[];
|
|
9
|
-
mergedStagedConfigCount: number;
|
|
10
|
-
removedConfigCount: number;
|
|
11
|
-
removedPackageCount: number;
|
|
12
|
-
rewrittenScriptCount: number;
|
|
13
|
-
warnings: string[];
|
|
14
|
-
}
|
|
15
|
-
declare const createMigrationReport: () => MigrationReport;
|
|
16
|
-
declare const addMigrationWarning: (report: MigrationReport | undefined, warning: string) => void;
|
|
17
|
-
declare const addManualStep: (report: MigrationReport | undefined, step: string) => void;
|
|
18
|
-
type PackageManagerType = "bun" | "npm" | "pnpm" | "yarn";
|
|
19
|
-
export type { MigrateLogger, MigrationReport, PackageManagerType };
|
|
20
|
-
export { addManualStep, addMigrationWarning, createMigrationReport };
|
package/dist/commands/run.d.ts
DELETED