@visulima/vis 1.0.0-alpha.7 → 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.
- package/CHANGELOG.md +107 -47
- package/LICENSE.md +44 -1
- package/README.md +56 -0
- package/dist/bin.js +1 -991
- package/dist/config.d.ts +1073 -68
- package/dist/config.js +1 -1
- package/dist/generate/index.d.ts +155 -30
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +1 -0
- package/dist/packem_chunks/handler12.js +153 -0
- package/dist/packem_chunks/handler13.js +1 -0
- package/dist/packem_chunks/handler14.js +3 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +2 -0
- package/dist/packem_chunks/handler17.js +7 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +19 -0
- package/dist/packem_chunks/handler2.js +1 -0
- package/dist/packem_chunks/handler20.js +428 -0
- package/dist/packem_chunks/handler21.js +22 -0
- package/dist/packem_chunks/handler22.js +3 -0
- package/dist/packem_chunks/handler23.js +5 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +20 -0
- package/dist/packem_chunks/handler26.js +1 -0
- package/dist/packem_chunks/handler27.js +1 -0
- package/dist/packem_chunks/handler28.js +1 -0
- package/dist/packem_chunks/handler29.js +2 -0
- package/dist/packem_chunks/handler3.js +2 -0
- package/dist/packem_chunks/handler30.js +22 -0
- package/dist/packem_chunks/handler31.js +1 -0
- package/dist/packem_chunks/handler32.js +1 -0
- package/dist/packem_chunks/handler33.js +37 -0
- package/dist/packem_chunks/handler34.js +3 -0
- package/dist/packem_chunks/handler35.js +23 -0
- package/dist/packem_chunks/handler36.js +5 -0
- package/dist/packem_chunks/handler37.js +27 -0
- package/dist/packem_chunks/handler38.js +1 -0
- package/dist/packem_chunks/handler39.js +2 -0
- package/dist/packem_chunks/handler4.js +5 -0
- package/dist/packem_chunks/handler40.js +1 -0
- package/dist/packem_chunks/handler41.js +5 -0
- package/dist/packem_chunks/handler42.js +1 -0
- package/dist/packem_chunks/handler43.js +24 -0
- package/dist/packem_chunks/handler44.js +3 -0
- package/dist/packem_chunks/handler45.js +1 -0
- package/dist/packem_chunks/handler5.js +4 -0
- package/dist/packem_chunks/handler6.js +2 -0
- package/dist/packem_chunks/handler7.js +24 -0
- package/dist/packem_chunks/handler8.js +6 -0
- package/dist/packem_chunks/handler9.js +8 -0
- package/dist/packem_shared/VisUpdateApp-BBx3idMI.js +1 -0
- package/dist/packem_shared/ai-analysis-DDqXRFxY.js +67 -0
- package/dist/packem_shared/bin-BaZZ32BK.js +93 -0
- package/dist/packem_shared/cache-directory-DL8hfXeG.js +1 -0
- package/dist/packem_shared/catalog-CuSpuB_R.js +12 -0
- package/dist/packem_shared/dependency-scan-BoLG2Fez.js +1 -0
- package/dist/packem_shared/docker-BcfqH4Av.js +2 -0
- package/dist/packem_shared/flakiness-DSIHZGBT.js +1 -0
- package/dist/packem_shared/otelPlugin-DxyvBcXO.js +1 -0
- package/dist/packem_shared/runtime-check-CGHal8SO.js +1 -0
- package/dist/packem_shared/selectors-CfH9ZY08.js +3 -0
- package/dist/packem_shared/symbols-CIMw60-G.js +1 -0
- package/dist/packem_shared/toolchain-C3ZG0o_X.js +5 -0
- package/dist/packem_shared/typosquats-Bpq4zcWL.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/index.js +555 -727
- package/package.json +29 -19
- package/schemas/project.schema.json +1 -1
- package/schemas/vis-config.schema.json +47 -1
- package/dist/ai-analysis.d.ts +0 -26
- package/dist/ai-cache.d.ts +0 -21
- package/dist/ai-types.d.ts +0 -16
- package/dist/audit-config.d.ts +0 -24
- package/dist/bin.d.ts +0 -1
- package/dist/cache-directory.d.ts +0 -73
- package/dist/catalog.d.ts +0 -136
- package/dist/codeowners.d.ts +0 -30
- package/dist/commands/action-graph.d.ts +0 -8
- package/dist/commands/add.d.ts +0 -3
- 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/approve-builds.d.ts +0 -3
- package/dist/commands/audit.d.ts +0 -23
- package/dist/commands/cache.d.ts +0 -86
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/ci.d.ts +0 -19
- package/dist/commands/clean.d.ts +0 -3
- package/dist/commands/create/discovery.d.ts +0 -42
- package/dist/commands/create/index.d.ts +0 -13
- package/dist/commands/create/prompts.d.ts +0 -31
- package/dist/commands/create/random-name.d.ts +0 -15
- package/dist/commands/create/templates/builtin.d.ts +0 -15
- package/dist/commands/create/templates/generator.d.ts +0 -14
- package/dist/commands/create/templates/index.d.ts +0 -13
- package/dist/commands/create/templates/monorepo.d.ts +0 -16
- package/dist/commands/create/templates/remote.d.ts +0 -41
- package/dist/commands/create/templates/types.d.ts +0 -46
- package/dist/commands/create/utils.d.ts +0 -42
- package/dist/commands/dedupe.d.ts +0 -3
- package/dist/commands/devcontainer.d.ts +0 -3
- package/dist/commands/dlx.d.ts +0 -3
- package/dist/commands/docker.d.ts +0 -22
- package/dist/commands/doctor.d.ts +0 -15
- package/dist/commands/exec.d.ts +0 -3
- package/dist/commands/generate.d.ts +0 -10
- 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/ignore-helpers.d.ts +0 -157
- package/dist/commands/ignore.d.ts +0 -17
- package/dist/commands/implode.d.ts +0 -3
- package/dist/commands/info.d.ts +0 -3
- package/dist/commands/init.d.ts +0 -14
- package/dist/commands/install.d.ts +0 -3
- package/dist/commands/link.d.ts +0 -3
- package/dist/commands/list.d.ts +0 -3
- package/dist/commands/migrate/backup.d.ts +0 -8
- package/dist/commands/migrate/constants.d.ts +0 -16
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/gitleaks.d.ts +0 -29
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -22
- package/dist/commands/migrate/kingfisher.d.ts +0 -14
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/moon.d.ts +0 -5
- package/dist/commands/migrate/nano-staged.d.ts +0 -30
- package/dist/commands/migrate/nx.d.ts +0 -12
- package/dist/commands/migrate/prompt.d.ts +0 -2
- package/dist/commands/migrate/secretlint.d.ts +0 -14
- package/dist/commands/migrate/shared.d.ts +0 -29
- package/dist/commands/migrate/turborepo.d.ts +0 -11
- package/dist/commands/migrate/types.d.ts +0 -27
- package/dist/commands/migrate/verify.d.ts +0 -12
- package/dist/commands/optimize.d.ts +0 -38
- package/dist/commands/pm.d.ts +0 -3
- package/dist/commands/remove.d.ts +0 -3
- package/dist/commands/run.d.ts +0 -16
- package/dist/commands/sbom.d.ts +0 -10
- package/dist/commands/secrets.d.ts +0 -3
- package/dist/commands/sort-package-json.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -10
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/sync.d.ts +0 -16
- package/dist/commands/task-why.d.ts +0 -3
- package/dist/commands/unlink.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/commands/upgrade.d.ts +0 -3
- package/dist/commands/why.d.ts +0 -3
- package/dist/docker.d.ts +0 -73
- package/dist/flakiness.d.ts +0 -40
- package/dist/generate/discover.d.ts +0 -29
- package/dist/generate/loader.d.ts +0 -15
- package/dist/generate/moon-adapter/filename-interp.d.ts +0 -42
- package/dist/generate/moon-adapter/filters.d.ts +0 -22
- package/dist/generate/moon-adapter/frontmatter.d.ts +0 -39
- package/dist/generate/moon-adapter/index.d.ts +0 -19
- package/dist/generate/moon-adapter/tera-subset.d.ts +0 -85
- package/dist/generate/moon-adapter/util.d.ts +0 -14
- package/dist/generate/prompts.d.ts +0 -25
- package/dist/generate/remote.d.ts +0 -43
- package/dist/generate/runner.d.ts +0 -37
- package/dist/generate/types.d.ts +0 -152
- package/dist/hooks.d.ts +0 -118
- package/dist/native-binding.d.ts +0 -158
- package/dist/output.d.ts +0 -40
- package/dist/overrides.d.ts +0 -82
- package/dist/package-manager.d.ts +0 -23
- package/dist/packem_shared/otelPlugin-CJLkguJ8.js +0 -1
- package/dist/plugins/config-loader.d.ts +0 -3
- package/dist/plugins/otel.d.ts +0 -63
- package/dist/plugins/post-command.d.ts +0 -3
- package/dist/plugins/security-enforcement.d.ts +0 -3
- package/dist/pm-runner.d.ts +0 -44
- package/dist/run-report.d.ts +0 -40
- package/dist/runtime-check.d.ts +0 -27
- package/dist/sbom/cyclonedx.d.ts +0 -39
- package/dist/sbom/installed-package.d.ts +0 -49
- package/dist/sbom/license.d.ts +0 -31
- package/dist/sbom/lockfile.d.ts +0 -34
- package/dist/sbom/purl.d.ts +0 -25
- package/dist/sbom/resolve-specifier.d.ts +0 -24
- package/dist/sbom/types.d.ts +0 -196
- package/dist/secrets/baseline.d.ts +0 -20
- package/dist/secrets/format.d.ts +0 -14
- package/dist/secrets/git.d.ts +0 -6
- package/dist/secrets/spinner.d.ts +0 -9
- package/dist/security.d.ts +0 -64
- package/dist/selectors.d.ts +0 -81
- package/dist/shell-history.d.ts +0 -16
- package/dist/socket-security.d.ts +0 -129
- package/dist/staged/cli-parse.d.ts +0 -18
- package/dist/staged/config.d.ts +0 -14
- package/dist/staged/errors/apply-empty-commit-error.d.ts +0 -4
- package/dist/staged/errors/config-error.d.ts +0 -4
- package/dist/staged/errors/get-backup-stash-error.d.ts +0 -4
- package/dist/staged/errors/git-error.d.ts +0 -6
- package/dist/staged/errors/index.d.ts +0 -12
- package/dist/staged/errors/restore-original-state-error.d.ts +0 -4
- package/dist/staged/errors/staged-error.d.ts +0 -8
- package/dist/staged/errors/task-error.d.ts +0 -6
- package/dist/staged/git/diff.d.ts +0 -76
- package/dist/staged/git/exec.d.ts +0 -43
- package/dist/staged/git/index.d.ts +0 -77
- package/dist/staged/git/stash.d.ts +0 -37
- package/dist/staged/index.d.ts +0 -13
- package/dist/staged/match.d.ts +0 -12
- package/dist/staged/renderer/index.d.ts +0 -9
- package/dist/staged/renderer/ink/index.d.ts +0 -4
- package/dist/staged/renderer/plain.d.ts +0 -12
- package/dist/staged/tasks/build.d.ts +0 -13
- package/dist/staged/tasks/exec.d.ts +0 -56
- package/dist/staged/tasks/run.d.ts +0 -26
- package/dist/staged/types.d.ts +0 -173
- package/dist/target-discovery.d.ts +0 -59
- package/dist/target-options.d.ts +0 -261
- package/dist/tips.d.ts +0 -41
- package/dist/tui/components/CheckProgressApp.d.ts +0 -6
- package/dist/tui/components/CommandSummary.d.ts +0 -17
- package/dist/tui/components/Header.d.ts +0 -13
- package/dist/tui/components/OutputPanel.d.ts +0 -17
- package/dist/tui/components/QuitDialog.d.ts +0 -15
- package/dist/tui/components/TaskListPanel.d.ts +0 -19
- package/dist/tui/components/TaskRow.d.ts +0 -12
- package/dist/tui/components/TaskStore.d.ts +0 -80
- package/dist/tui/components/VisTaskRunnerApp.d.ts +0 -17
- package/dist/tui/components/devcontainer/DevcontainerStore.d.ts +0 -66
- package/dist/tui/components/devcontainer/VisDevcontainerApp.d.ts +0 -9
- package/dist/tui/components/devcontainer/catalogs/extensions.d.ts +0 -8
- package/dist/tui/components/devcontainer/catalogs/features.d.ts +0 -8
- package/dist/tui/components/devcontainer/catalogs/filters.d.ts +0 -4
- package/dist/tui/components/devcontainer/catalogs/mount-suggestions.d.ts +0 -19
- package/dist/tui/components/devcontainer/catalogs/templates.d.ts +0 -8
- package/dist/tui/components/devcontainer/devcontainer-io.d.ts +0 -14
- package/dist/tui/components/devcontainer/sections/DockerComposeSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/EnvironmentSection.d.ts +0 -16
- package/dist/tui/components/devcontainer/sections/ExtensionsSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/FeaturesSection.d.ts +0 -11
- package/dist/tui/components/devcontainer/sections/GeneralSection.d.ts +0 -12
- package/dist/tui/components/devcontainer/sections/LifecycleSection.d.ts +0 -13
- package/dist/tui/components/devcontainer/sections/MountsSection.d.ts +0 -16
- package/dist/tui/components/devcontainer/sections/PortsSection.d.ts +0 -10
- package/dist/tui/components/devcontainer/sections/PreviewPanel.d.ts +0 -11
- package/dist/tui/components/devcontainer/types.d.ts +0 -53
- package/dist/tui/components/devcontainer/validate.d.ts +0 -16
- package/dist/tui/components/graph/GraphStore.d.ts +0 -42
- package/dist/tui/components/graph/ProjectDetailPanel.d.ts +0 -10
- package/dist/tui/components/graph/ProjectListPanel.d.ts +0 -20
- package/dist/tui/components/graph/VisGraphApp.d.ts +0 -8
- package/dist/tui/components/optimize/OptimizeDetailPanel.d.ts +0 -9
- package/dist/tui/components/optimize/OptimizeListPanel.d.ts +0 -16
- package/dist/tui/components/optimize/OptimizeStore.d.ts +0 -50
- package/dist/tui/components/optimize/VisOptimizeApp.d.ts +0 -8
- package/dist/tui/components/optimize/constants.d.ts +0 -7
- package/dist/tui/components/update/PackageDetailPanel.d.ts +0 -12
- package/dist/tui/components/update/PackageListPanel.d.ts +0 -21
- package/dist/tui/components/update/UpdateStore.d.ts +0 -62
- package/dist/tui/components/update/VisUpdateApp.d.ts +0 -18
- package/dist/tui/dynamic-life-cycle.d.ts +0 -22
- package/dist/tui/formatting-utils.d.ts +0 -17
- package/dist/tui/pretty-time.d.ts +0 -8
- package/dist/tui/static-life-cycle.d.ts +0 -28
- package/dist/tui/status-utils.d.ts +0 -20
- package/dist/tui/symbols.d.ts +0 -7
- package/dist/tui/types.d.ts +0 -11
- package/dist/typosquats.d.ts +0 -70
- package/dist/upgrade-check.d.ts +0 -30
- package/dist/utils.d.ts +0 -22
- package/dist/watch.d.ts +0 -65
- package/dist/workspace.d.ts +0 -675
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure helpers for `vis ignore`. Split from `ignore.ts` so tests can
|
|
3
|
-
* exercise them without pulling in `@visulima/task-runner`, which
|
|
4
|
-
* otherwise drags the whole run-graph module through ESM evaluation.
|
|
5
|
-
*/
|
|
6
|
-
/** Commit-message tokens that unconditionally skip the build. */
|
|
7
|
-
declare const SKIP_TOKENS: readonly ["[skip ci]", "[ci skip]", "[no ci]", "[vis skip]", "[nx skip]"];
|
|
8
|
-
/** Commit-message tokens that unconditionally force the build. */
|
|
9
|
-
declare const FORCE_TOKENS: readonly ["[vis deploy]", "[nx deploy]"];
|
|
10
|
-
/**
|
|
11
|
-
* Token prefixes accepted for per-project commit-message gating. `vis` is
|
|
12
|
-
* the canonical form; `nx` is kept so teams migrating from `nx-ignore`
|
|
13
|
-
* don't have to rewrite their commit automation.
|
|
14
|
-
*/
|
|
15
|
-
declare const PER_PROJECT_TOKEN_PREFIXES: readonly ["vis", "nx"];
|
|
16
|
-
/**
|
|
17
|
-
* CI-provider environment variables carrying the previously deployed SHA,
|
|
18
|
-
* probed in priority order. Only providers that *actually* invoke a custom
|
|
19
|
-
* ignore script (Vercel, Netlify) or that we commonly wrap manually in a
|
|
20
|
-
* preflight CI step (GitHub Actions, GitLab CI) are listed here.
|
|
21
|
-
*
|
|
22
|
-
* Cloudflare Pages / Render / Amplify are intentionally absent: they have
|
|
23
|
-
* no custom-command hook, so shipping env detection for them would only
|
|
24
|
-
* create the illusion of support.
|
|
25
|
-
*/
|
|
26
|
-
declare const CI_BASE_SHA_ENV_VARS: readonly ["CACHED_COMMIT_REF", "VERCEL_GIT_PREVIOUS_SHA", "GITHUB_BASE_REF", "CI_COMMIT_BEFORE_SHA"];
|
|
27
|
-
/** Machine-readable reason codes for the ignore decision. */
|
|
28
|
-
type IgnoreReason = "commit-force-deploy" | "commit-skip" | "missing-project-argument" | "no-changes" | "project-affected" | "project-not-affected" | "project-unknown" | "workspace-error";
|
|
29
|
-
/**
|
|
30
|
-
* Structured decision record emitted on stdout in `--json` mode and
|
|
31
|
-
* rendered as human text otherwise.
|
|
32
|
-
*/
|
|
33
|
-
interface IgnoreDecision {
|
|
34
|
-
/** "build" continues the deployment, "skip" cancels it. */
|
|
35
|
-
action: "build" | "skip";
|
|
36
|
-
/** The affected-project list, when the comparison actually ran. */
|
|
37
|
-
affectedProjects?: string[];
|
|
38
|
-
/** Base ref used for the affected comparison, if any. */
|
|
39
|
-
base?: string;
|
|
40
|
-
/** Head ref used for the affected comparison, if any. */
|
|
41
|
-
head?: string;
|
|
42
|
-
/** Human-readable reason message. */
|
|
43
|
-
message: string;
|
|
44
|
-
/** The project the decision applies to. */
|
|
45
|
-
project: string;
|
|
46
|
-
/** Stable reason code for scripting / analytics. */
|
|
47
|
-
reason: IgnoreReason;
|
|
48
|
-
}
|
|
49
|
-
/** Extra fields that decisions from the affected-detection path carry. */
|
|
50
|
-
type DecisionExtras = Partial<Pick<IgnoreDecision, "affectedProjects" | "base" | "head">>;
|
|
51
|
-
/**
|
|
52
|
-
* Returns the first non-empty value from the CI env var priority list,
|
|
53
|
-
* or `undefined` if nothing is set. Reads from `env` (defaults to
|
|
54
|
-
* `process.env`) so tests can inject fixtures without clobbering globals.
|
|
55
|
-
* @param env Environment dictionary to probe. Defaults to `process.env`.
|
|
56
|
-
* @returns The resolved base SHA (trimmed) or `undefined` if no known CI env var is set.
|
|
57
|
-
*/
|
|
58
|
-
declare const resolveCiBaseSha: (env?: NodeJS.ProcessEnv) => string | undefined;
|
|
59
|
-
/**
|
|
60
|
-
* Throws if the given string contains characters outside the safe git-ref
|
|
61
|
-
* alphabet or begins with a dash. Mirrors the validation used by
|
|
62
|
-
* task-runner's affected logic and additionally rejects leading dashes to
|
|
63
|
-
* prevent `git` option injection when the ref is passed as a positional
|
|
64
|
-
* argument to `execFile("git", [...])`.
|
|
65
|
-
* @param ref The git ref to validate (e.g. `"HEAD"`, `"main"`, `"abc123"`).
|
|
66
|
-
* @throws {Error} If `ref` does not match `GIT_REF_RE`. Returns `void` on success.
|
|
67
|
-
*/
|
|
68
|
-
declare const validateGitRef: (ref: string) => void;
|
|
69
|
-
/**
|
|
70
|
-
* Returns `true` if `ref` resolves to a commit object in the given repo.
|
|
71
|
-
* Used to detect unreachable base refs (e.g. Vercel's shallow clone) so
|
|
72
|
-
* we can silently fall back to `HEAD~1`.
|
|
73
|
-
* @param cwd Absolute path to the git repository's working directory.
|
|
74
|
-
* @param ref The git ref to probe. Should already be validated by `validateGitRef` to avoid `git` option injection.
|
|
75
|
-
* @returns `true` if the ref resolves to a commit, `false` otherwise (including when `git` itself fails or is unavailable).
|
|
76
|
-
*/
|
|
77
|
-
declare const isRefReachable: (cwd: string, ref: string) => Promise<boolean>;
|
|
78
|
-
/**
|
|
79
|
-
* Reads the subject+body of the most recent commit. Returns an empty
|
|
80
|
-
* string on any failure — the caller treats missing messages as "no
|
|
81
|
-
* keywords present" rather than erroring out.
|
|
82
|
-
* @param cwd Absolute path to the git repository's working directory.
|
|
83
|
-
* @returns The raw commit message (subject + body), or `""` on failure.
|
|
84
|
-
*/
|
|
85
|
-
declare const readLastCommitMessage: (cwd: string) => Promise<string>;
|
|
86
|
-
/**
|
|
87
|
-
* Returns `true` if the commit message contains a per-project token of
|
|
88
|
-
* the form `[<prefix> <verb> <project>]` for any of the supported
|
|
89
|
-
* prefixes (`vis` or the legacy `nx`).
|
|
90
|
-
* @param message Raw commit message to scan.
|
|
91
|
-
* @param verb The action verb embedded in the token (`"skip"` or `"deploy"`).
|
|
92
|
-
* @param project The project name the token is scoped to.
|
|
93
|
-
* @returns `true` on the first matching token, `false` otherwise.
|
|
94
|
-
*/
|
|
95
|
-
declare const matchesPerProjectToken: (message: string, verb: "deploy" | "skip", project: string) => boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Returns `true` if the commit message contains any skip token,
|
|
98
|
-
* including the per-project form `[vis skip <project>]`. Accepts both
|
|
99
|
-
* `vis` and legacy `nx` tokens so users migrating from nx-ignore don't
|
|
100
|
-
* need to rewrite their commit automation.
|
|
101
|
-
* @param message Raw commit message to scan.
|
|
102
|
-
* @param project The project whose per-project tokens should also match.
|
|
103
|
-
* @returns `true` if any skip token is present, `false` otherwise.
|
|
104
|
-
*/
|
|
105
|
-
declare const commitHasSkipMessage: (message: string, project: string) => boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Returns `true` if the commit message contains any force-deploy token,
|
|
108
|
-
* including the per-project form `[vis deploy <project>]`.
|
|
109
|
-
* @param message Raw commit message to scan.
|
|
110
|
-
* @param project The project whose per-project tokens should also match.
|
|
111
|
-
* @returns `true` if any force-deploy token is present, `false` otherwise.
|
|
112
|
-
*/
|
|
113
|
-
declare const commitHasForceDeployMessage: (message: string, project: string) => boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Builds a `"build"` decision record. Factory helper that collapses the
|
|
116
|
-
* otherwise-repetitive object literals in `ignore.ts`.
|
|
117
|
-
* @param project The project the decision applies to.
|
|
118
|
-
* @param reason Stable reason code.
|
|
119
|
-
* @param message Human-readable message.
|
|
120
|
-
* @param extra Optional base/head/affectedProjects when available.
|
|
121
|
-
* @returns A fully-populated `IgnoreDecision` with `action: "build"`.
|
|
122
|
-
*/
|
|
123
|
-
declare const decideBuild: (project: string, reason: IgnoreReason, message: string, extra?: DecisionExtras) => IgnoreDecision;
|
|
124
|
-
/**
|
|
125
|
-
* Builds a `"skip"` decision record. Companion to `decideBuild`.
|
|
126
|
-
* @param project The project the decision applies to.
|
|
127
|
-
* @param reason Stable reason code.
|
|
128
|
-
* @param message Human-readable message.
|
|
129
|
-
* @param extra Optional base/head/affectedProjects when available.
|
|
130
|
-
* @returns A fully-populated `IgnoreDecision` with `action: "skip"`.
|
|
131
|
-
*/
|
|
132
|
-
declare const decideSkip: (project: string, reason: IgnoreReason, message: string, extra?: DecisionExtras) => IgnoreDecision;
|
|
133
|
-
/**
|
|
134
|
-
* Renders a decision as a single human-readable line. Pure formatter;
|
|
135
|
-
* doesn't print anything itself.
|
|
136
|
-
* @param decision The decision to format.
|
|
137
|
-
* @returns A one-line string with an emoji prefix and the message.
|
|
138
|
-
*/
|
|
139
|
-
declare const formatDecisionLine: (decision: IgnoreDecision) => string;
|
|
140
|
-
/**
|
|
141
|
-
* Maps a decision to its process exit code, honoring
|
|
142
|
-
* `--exit-zero-on-build` for users who want normal exit semantics.
|
|
143
|
-
*
|
|
144
|
-
* Default:
|
|
145
|
-
* skip → 0 (platform cancels)
|
|
146
|
-
* build → 1 (platform continues)
|
|
147
|
-
*
|
|
148
|
-
* With --exit-zero-on-build:
|
|
149
|
-
* skip → 0
|
|
150
|
-
* build → 0
|
|
151
|
-
* @param decision The decision to map.
|
|
152
|
-
* @param exitZeroOnBuild If `true`, builds exit with `0` instead of `1`.
|
|
153
|
-
* @returns The literal exit code (`0` or `1`).
|
|
154
|
-
*/
|
|
155
|
-
declare const exitCodeFor: (decision: IgnoreDecision, exitZeroOnBuild: boolean) => 0 | 1;
|
|
156
|
-
export type { IgnoreDecision, IgnoreReason };
|
|
157
|
-
export { CI_BASE_SHA_ENV_VARS, commitHasForceDeployMessage, commitHasSkipMessage, decideBuild, decideSkip, exitCodeFor, FORCE_TOKENS, formatDecisionLine, isRefReachable, matchesPerProjectToken, PER_PROJECT_TOKEN_PREFIXES, readLastCommitMessage, resolveCiBaseSha, SKIP_TOKENS, validateGitRef, };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `vis ignore <project>` — CI build gating for deployment platforms.
|
|
3
|
-
*
|
|
4
|
-
* Exits with inverted codes so it can be wired directly into Vercel's
|
|
5
|
-
* "Ignored Build Step" field or Netlify's `ignore` command:
|
|
6
|
-
*
|
|
7
|
-
* exit 0 → platform cancels the build (project is NOT affected)
|
|
8
|
-
* exit 1 → platform continues the build (project IS affected)
|
|
9
|
-
*
|
|
10
|
-
* Inspired by `nx-ignore` from nrwl/nx-labs, but reuses vis's own
|
|
11
|
-
* `getAffectedProjects` so it doesn't need to bootstrap a parallel
|
|
12
|
-
* Nx installation on the deploy runner. Pure helpers live in
|
|
13
|
-
* `./ignore-helpers` for test isolation.
|
|
14
|
-
*/
|
|
15
|
-
import type { Command } from "@visulima/cerebro";
|
|
16
|
-
declare const ignore: Command;
|
|
17
|
-
export default ignore;
|
package/dist/commands/info.d.ts
DELETED
package/dist/commands/init.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Command } from "@visulima/cerebro";
|
|
2
|
-
/**
|
|
3
|
-
* `vis init` — initialize vis configuration with secure defaults.
|
|
4
|
-
*
|
|
5
|
-
* In interactive mode (`--interactive` or TTY default), guides the user through:
|
|
6
|
-
* 1. Socket.dev security scanning (opt-in)
|
|
7
|
-
* 2. Build script approval (scans node_modules)
|
|
8
|
-
* 3. Git hooks / lint-staged setup
|
|
9
|
-
* 4. Native PM config sync
|
|
10
|
-
*
|
|
11
|
-
* In non-interactive mode (CI, piped), creates a minimal config with secure defaults.
|
|
12
|
-
*/
|
|
13
|
-
declare const init: Command;
|
|
14
|
-
export default init;
|
package/dist/commands/link.d.ts
DELETED
package/dist/commands/list.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { MigrationReport } from "./types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Create a `.bak` sibling alongside `path` before we mutate/delete it. We only
|
|
4
|
-
* back up on first touch — subsequent writes to the same file in a single
|
|
5
|
-
* migration run don't clobber the original snapshot. When `report` is provided
|
|
6
|
-
* the backup path is recorded for the migration summary.
|
|
7
|
-
*/
|
|
8
|
-
export declare const backupFile: (path: string, report?: MigrationReport) => void;
|
|
@@ -1,16 +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 NANO_STAGED_JSON_CONFIG_FILES: readonly [".nano-staged.json", ".nanostagedrc"];
|
|
6
|
-
declare const NANO_STAGED_OTHER_CONFIG_FILES: readonly [".nano-staged.mjs", ".nano-staged.cjs", ".nano-staged.js", "nano-staged.config.mjs", "nano-staged.config.cjs", "nano-staged.config.js", "nano-staged.config.mts", "nano-staged.config.cts", "nano-staged.config.ts"];
|
|
7
|
-
declare const NANO_STAGED_ALL_CONFIG_FILES: ReadonlyArray<string>;
|
|
8
|
-
declare const STALE_NANO_STAGED_PATTERNS: ReadonlyArray<RegExp>;
|
|
9
|
-
declare const REPLACED_PACKAGES: readonly ["husky", "lint-staged", "nano-staged"];
|
|
10
|
-
declare const HUSKY_SCRIPT_PATTERNS: ReadonlyArray<RegExp>;
|
|
11
|
-
/**
|
|
12
|
-
* Remove husky references from a single script value.
|
|
13
|
-
* Returns the cleaned script, or undefined if the entire script should be removed.
|
|
14
|
-
*/
|
|
15
|
-
declare const cleanHuskyFromScript: (scriptValue: string) => string | undefined;
|
|
16
|
-
export { cleanHuskyFromScript, HUSKY_SCRIPT_PATTERNS, LINT_STAGED_ALL_CONFIG_FILES, LINT_STAGED_JSON_CONFIG_FILES, LINT_STAGED_OTHER_CONFIG_FILES, NANO_STAGED_ALL_CONFIG_FILES, NANO_STAGED_JSON_CONFIG_FILES, NANO_STAGED_OTHER_CONFIG_FILES, REPLACED_PACKAGES, STALE_LINT_STAGED_PATTERNS, STALE_NANO_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,29 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
interface GitleaksUpstreamFinding {
|
|
3
|
-
Author?: string;
|
|
4
|
-
Commit?: string;
|
|
5
|
-
Date?: string;
|
|
6
|
-
Description?: string;
|
|
7
|
-
Email?: string;
|
|
8
|
-
EndColumn?: number;
|
|
9
|
-
EndLine?: number;
|
|
10
|
-
Entropy?: number;
|
|
11
|
-
File?: string;
|
|
12
|
-
Fingerprint?: string;
|
|
13
|
-
Match?: string;
|
|
14
|
-
Message?: string;
|
|
15
|
-
RuleID?: string;
|
|
16
|
-
Secret?: string;
|
|
17
|
-
StartColumn?: number;
|
|
18
|
-
StartLine?: number;
|
|
19
|
-
Tags?: string[];
|
|
20
|
-
}
|
|
21
|
-
declare const detectGitleaksConfig: (root: string) => string | undefined;
|
|
22
|
-
declare const detectGitleaksIgnore: (root: string) => string | undefined;
|
|
23
|
-
declare const detectGitleaksBaseline: (root: string) => string | undefined;
|
|
24
|
-
declare const convertBaseline: (upstream: GitleaksUpstreamFinding[]) => unknown[];
|
|
25
|
-
declare const migrateGitleaks: (root: string, options: {
|
|
26
|
-
dryRun: boolean;
|
|
27
|
-
silent?: boolean;
|
|
28
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
29
|
-
export { convertBaseline, detectGitleaksBaseline, detectGitleaksConfig, detectGitleaksIgnore, migrateGitleaks };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { MigrationReport } from "./types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Reads and parses a JSON file. Returns undefined if the file doesn't exist or isn't valid JSON.
|
|
4
|
-
*/
|
|
5
|
-
declare const readJsonFile: <T>(filePath: string) => T | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* Checks if a file exists and contains valid JSON.
|
|
8
|
-
*/
|
|
9
|
-
declare const isJsonFile: (filePath: string) => boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Detect the indentation used in a JSON file by looking at the first indented line.
|
|
12
|
-
*/
|
|
13
|
-
declare const detectJsonIndent: (content: string) => number;
|
|
14
|
-
/**
|
|
15
|
-
* Edits a JSON file in place using a mutator function.
|
|
16
|
-
* The mutator receives the parsed data and should return the modified data,
|
|
17
|
-
* or undefined to skip writing. Returns true if the file was modified.
|
|
18
|
-
* Preserves the original indentation style. When `report` is provided, a
|
|
19
|
-
* `.bak` snapshot is taken before the write.
|
|
20
|
-
*/
|
|
21
|
-
declare const editJsonFile: <T>(filePath: string, mutator: (data: T) => T | undefined, report?: MigrationReport) => boolean;
|
|
22
|
-
export { detectJsonIndent, editJsonFile, isJsonFile, readJsonFile };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
interface KingfisherBaselineRecord {
|
|
3
|
-
filepath: string;
|
|
4
|
-
fingerprint: string;
|
|
5
|
-
linenum: number;
|
|
6
|
-
}
|
|
7
|
-
declare const detectKingfisherBaseline: (root: string) => string | undefined;
|
|
8
|
-
declare const detectKingfisherRules: (root: string) => string | undefined;
|
|
9
|
-
declare const parseKingfisherBaseline: (text: string) => KingfisherBaselineRecord[];
|
|
10
|
-
declare const migrateKingfisher: (root: string, options: {
|
|
11
|
-
dryRun: boolean;
|
|
12
|
-
silent?: boolean;
|
|
13
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
14
|
-
export { detectKingfisherBaseline, detectKingfisherRules, migrateKingfisher, parseKingfisherBaseline };
|
|
@@ -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,30 +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
|
-
declare const hasStandaloneNanoStagedConfig: (root: string) => boolean;
|
|
7
|
-
declare const hasUnsupportedNanoStagedConfig: (root: string) => boolean;
|
|
8
|
-
declare const hasStagedConfigInVisConfig: (root: string) => boolean;
|
|
9
|
-
declare const detectNanoStagedConfig: (root: string) => string | undefined;
|
|
10
|
-
declare const extractNanoStagedFromPackageJson: (root: string) => Record<string, string | string[]> | undefined;
|
|
11
|
-
declare const parseNanoStagedJsonFile: (filePath: string) => Record<string, string | string[]> | undefined;
|
|
12
|
-
declare const generateStagedConfigSnippet: (config: Record<string, string | string[]>) => string;
|
|
13
|
-
declare const insertStagedIntoVisConfig: (root: string, config: Record<string, string | string[]>, logger: MigrateLogger) => boolean;
|
|
14
|
-
declare const removeNanoStagedFromPackageJson: (root: string) => {
|
|
15
|
-
configRemoved: boolean;
|
|
16
|
-
dependencyRemoved: boolean;
|
|
17
|
-
};
|
|
18
|
-
declare const removeNanoStagedConfigFiles: (root: string, report: MigrationReport) => void;
|
|
19
|
-
declare const rewritePreCommitHook: (root: string, hooksDirectory: string) => boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Migrates nano-staged configuration to the `staged` block in `vis.config.ts`.
|
|
22
|
-
* Mirrors the lint-staged migrator: detects configs from package.json or
|
|
23
|
-
* standalone `.nano-staged.*` files, inlines the mapping, then cleans up
|
|
24
|
-
* the source, dev-dependency entry, and pre-commit hook invocations.
|
|
25
|
-
*/
|
|
26
|
-
declare const migrateNanoStaged: (root: string, options: {
|
|
27
|
-
dryRun: boolean;
|
|
28
|
-
silent?: boolean;
|
|
29
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
30
|
-
export { detectNanoStagedConfig, extractNanoStagedFromPackageJson, generateStagedConfigSnippet, hasStagedConfigInVisConfig, hasStandaloneNanoStagedConfig, hasUnsupportedNanoStagedConfig, insertStagedIntoVisConfig, migrateNanoStaged, parseNanoStagedJsonFile, removeNanoStagedConfigFiles, removeNanoStagedFromPackageJson, rewritePreCommitHook, };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Translates an `nx.json` into a `vis.config.ts`. Per-project
|
|
4
|
-
* `project.json` files are left untouched — vis reads them natively.
|
|
5
|
-
* @param workspaceRoot Absolute workspace root path.
|
|
6
|
-
* @param options Migration options.
|
|
7
|
-
* @param logger Logger for user feedback.
|
|
8
|
-
* @param report Migration report to append manual steps and warnings.
|
|
9
|
-
*/
|
|
10
|
-
export declare const migrateNx: (workspaceRoot: string, options: {
|
|
11
|
-
dryRun?: boolean;
|
|
12
|
-
}, logger: MigrateLogger, report: MigrationReport) => void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
declare const detectSecretlintConfig: (root: string) => string | undefined;
|
|
3
|
-
declare const detectSecretlintIgnore: (root: string) => string | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* Extract the set of rule / preset IDs from a secretlint config. Only parses
|
|
6
|
-
* JSON-style configs confidently; for .js/.mjs/.cjs we warn and leave the file
|
|
7
|
-
* for the user to inspect.
|
|
8
|
-
*/
|
|
9
|
-
declare const extractRuleIds: (root: string, file: string, report: MigrationReport) => string[];
|
|
10
|
-
declare const migrateSecretlint: (root: string, options: {
|
|
11
|
-
dryRun: boolean;
|
|
12
|
-
silent?: boolean;
|
|
13
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
14
|
-
export { detectSecretlintConfig, detectSecretlintIgnore, extractRuleIds, migrateSecretlint };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Serialises a config object to a pretty-printed TypeScript string with
|
|
4
|
-
* unquoted keys (idiomatic TS style).
|
|
5
|
-
* @param obj The configuration object to serialise.
|
|
6
|
-
* @returns A JSON string with keys unquoted for TS readability.
|
|
7
|
-
*/
|
|
8
|
-
export declare const serializeConfigObject: (obj: Record<string, unknown>) => string;
|
|
9
|
-
/**
|
|
10
|
-
* Writes (or previews) a rendered `vis.config.ts`. Guards against
|
|
11
|
-
* overwriting an existing file and logs the outcome.
|
|
12
|
-
* @param workspaceRoot Absolute workspace root path.
|
|
13
|
-
* @param rendered The full file content to write.
|
|
14
|
-
* @param options Migration options (`dryRun` controls preview mode).
|
|
15
|
-
* @param logger Logger for user feedback.
|
|
16
|
-
* @param report Migration report to append warnings to.
|
|
17
|
-
* @returns `true` if written (or previewed in dry-run), `false` if skipped.
|
|
18
|
-
*/
|
|
19
|
-
export declare const writeVisConfig: (workspaceRoot: string, rendered: string, options: {
|
|
20
|
-
dryRun?: boolean;
|
|
21
|
-
}, logger: MigrateLogger, report: MigrationReport) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Reads and parses a JSON config file from the workspace root.
|
|
24
|
-
* @param workspaceRoot Absolute workspace root path.
|
|
25
|
-
* @param fileName File name relative to the workspace root.
|
|
26
|
-
* @returns The parsed object, or `undefined` if the file doesn't exist.
|
|
27
|
-
* @throws On JSON parse errors.
|
|
28
|
-
*/
|
|
29
|
-
export declare const readJsonConfig: <T>(workspaceRoot: string, fileName: string) => T | undefined;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger, MigrationReport } from "./types.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Translates a `turbo.json` into a `vis.config.ts`.
|
|
4
|
-
* @param workspaceRoot Absolute workspace root path.
|
|
5
|
-
* @param options Migration options.
|
|
6
|
-
* @param logger Logger for user feedback.
|
|
7
|
-
* @param report Migration report to append manual steps and warnings.
|
|
8
|
-
*/
|
|
9
|
-
export declare const migrateTurborepo: (workspaceRoot: string, options: {
|
|
10
|
-
dryRun?: boolean;
|
|
11
|
-
}, logger: MigrateLogger, report: MigrationReport) => void;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface MigrateLogger {
|
|
2
|
-
info: (message: string) => void;
|
|
3
|
-
warn: (message: string) => void;
|
|
4
|
-
}
|
|
5
|
-
interface MigrationReport {
|
|
6
|
-
backupsCreated: string[];
|
|
7
|
-
gitHooksConfigured: boolean;
|
|
8
|
-
inlinedLintStagedConfigCount: number;
|
|
9
|
-
manualSteps: string[];
|
|
10
|
-
mergedStagedConfigCount: number;
|
|
11
|
-
perMigration: Record<string, {
|
|
12
|
-
removedConfigCount: number;
|
|
13
|
-
removedPackageCount: number;
|
|
14
|
-
rewrittenScriptCount: number;
|
|
15
|
-
}>;
|
|
16
|
-
removedConfigCount: number;
|
|
17
|
-
removedPackageCount: number;
|
|
18
|
-
rewrittenScriptCount: number;
|
|
19
|
-
warnings: string[];
|
|
20
|
-
}
|
|
21
|
-
declare const createMigrationReport: () => MigrationReport;
|
|
22
|
-
declare const addMigrationWarning: (report: MigrationReport | undefined, warning: string) => void;
|
|
23
|
-
declare const addManualStep: (report: MigrationReport | undefined, step: string) => void;
|
|
24
|
-
declare const bumpPerMigration: (report: MigrationReport, migration: string, field: "removedConfigCount" | "removedPackageCount" | "rewrittenScriptCount", delta?: number) => void;
|
|
25
|
-
type PackageManagerType = "bun" | "npm" | "pnpm" | "yarn";
|
|
26
|
-
export type { MigrateLogger, MigrationReport, PackageManagerType };
|
|
27
|
-
export { addManualStep, addMigrationWarning, bumpPerMigration, createMigrationReport };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MigrateLogger } from "./types.d.ts";
|
|
2
|
-
export interface VerificationIssue {
|
|
3
|
-
detail: string;
|
|
4
|
-
kind: "config" | "script" | "hook" | "devDep";
|
|
5
|
-
location: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Check that a prior `vis migrate gitleaks` / `secretlint` run was complete:
|
|
9
|
-
* no stray scripts, devDependencies, hooks, or configs referencing the old
|
|
10
|
-
* tools. Safe to run repeatedly — purely read-only.
|
|
11
|
-
*/
|
|
12
|
-
export declare const verifyMigration: (root: string, logger: MigrateLogger) => VerificationIssue[];
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Command } from "@visulima/cerebro";
|
|
2
|
-
import type { PmInfo } from "../overrides.d.ts";
|
|
3
|
-
import type { OptimizeEntry } from "../tui/components/optimize/OptimizeStore.d.ts";
|
|
4
|
-
/** Collects dependency names from a `package.json`. */
|
|
5
|
-
declare const collectDepsFromPkgJson: (pkgJsonPath: string, productionOnly: boolean) => Set<string>;
|
|
6
|
-
/** Discovers workspace package directories. */
|
|
7
|
-
declare const discoverWorkspacePackages: (workspaceRoot: string) => string[];
|
|
8
|
-
/** Scans deps against e18e module-replacements manifests. */
|
|
9
|
-
declare const buildE18eEntries: (allDeps: Set<string>) => OptimizeEntry[];
|
|
10
|
-
/** Scans deps against @socketregistry manifest. */
|
|
11
|
-
declare const buildSocketEntries: (allDeps: Set<string>, lockText: string, pm: PmInfo, pin: boolean) => OptimizeEntry[];
|
|
12
|
-
/** Marks e18e entries that have codemods available. */
|
|
13
|
-
declare const markCodemodAvailability: (entries: OptimizeEntry[]) => Promise<void>;
|
|
14
|
-
interface CodemodResult {
|
|
15
|
-
filesChanged: number;
|
|
16
|
-
packageName: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Runs a codemod for a single package across all source files in the project.
|
|
20
|
-
* Returns the number of files modified.
|
|
21
|
-
*/
|
|
22
|
-
declare const runCodemod: (workspaceRoot: string, packageName: string) => Promise<CodemodResult>;
|
|
23
|
-
/**
|
|
24
|
-
* `vis optimize` — two-phase dependency optimization with interactive TUI.
|
|
25
|
-
*
|
|
26
|
-
* **Phase 1 (e18e):** Identifies packages replaceable with native builtins or lighter
|
|
27
|
-
* alternatives using `module-replacements` manifests. Runs source code codemods via
|
|
28
|
-
* `module-replacements-codemods` for selected entries.
|
|
29
|
-
*
|
|
30
|
-
* **Phase 2 (Socket.dev):** Writes override/resolution entries for packages that have
|
|
31
|
-
* security-hardened `@socketregistry` alternatives.
|
|
32
|
-
*
|
|
33
|
-
* In TTY mode, presents an interactive TUI (like `vis update`) where users select
|
|
34
|
-
* which optimizations to apply. In non-TTY/CI mode, outputs a static report.
|
|
35
|
-
*/
|
|
36
|
-
declare const optimize: Command;
|
|
37
|
-
export default optimize;
|
|
38
|
-
export { buildE18eEntries, buildSocketEntries, collectDepsFromPkgJson, discoverWorkspacePackages, markCodemodAvailability, runCodemod };
|
package/dist/commands/pm.d.ts
DELETED
package/dist/commands/run.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Command } from "@visulima/cerebro";
|
|
2
|
-
/**
|
|
3
|
-
* Shared counter for the global `--retry-budget` flag. Tasks consult
|
|
4
|
-
* `claim(requested)` at launch to grab up to `requested` retries; the
|
|
5
|
-
* budget is decremented conservatively by the claim (not by actual
|
|
6
|
-
* retries consumed) to keep the bound simple to reason about. Once
|
|
7
|
-
* the budget is exhausted, subsequent tasks run with no retries —
|
|
8
|
-
* surfacing flakiness instead of silently burning CI time.
|
|
9
|
-
*/
|
|
10
|
-
export interface RetryBudget {
|
|
11
|
-
claim: (requested: number) => number;
|
|
12
|
-
readonly remaining: number;
|
|
13
|
-
}
|
|
14
|
-
export declare const createRetryBudget: (limit: number) => RetryBudget;
|
|
15
|
-
declare const run: Command;
|
|
16
|
-
export default run;
|