@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.
- package/CHANGELOG.md +90 -57
- package/LICENSE.md +44 -1
- package/README.md +56 -0
- package/dist/bin.js +1 -1003
- 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 +27 -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 -13
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/list.d.ts +0 -28
- package/dist/commands/hook/migrate.d.ts +0 -30
- package/dist/commands/hook/prek-builtins.d.ts +0 -8
- package/dist/commands/hook/prek.d.ts +0 -129
- package/dist/commands/hook/run.d.ts +0 -21
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/hook/validate.d.ts +0 -17
- 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,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Variable-schema → interactive prompts.
|
|
3
|
-
*
|
|
4
|
-
* Builds on the same `node:readline` helpers `vis create` uses (see
|
|
5
|
-
* src/commands/create/prompts.ts). The implementation is minimal — no
|
|
6
|
-
* fancy multi-line UI, no spinner, no terminal control codes — to
|
|
7
|
-
* stay consistent with the rest of the vis CLI surface.
|
|
8
|
-
*/
|
|
9
|
-
import type { Options, VariableMap } from "./types.d.ts";
|
|
10
|
-
interface CollectOptions {
|
|
11
|
-
/** When true, skip prompts and use defaults / overrides only. */
|
|
12
|
-
defaults: boolean;
|
|
13
|
-
/** When false, never prompt — error on missing required values. */
|
|
14
|
-
interactive: boolean;
|
|
15
|
-
/** CLI overrides — variable name → unparsed string from `--name=value`. */
|
|
16
|
-
overrides: Record<string, string>;
|
|
17
|
-
/** Variable schema. */
|
|
18
|
-
variables: VariableMap;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Collect option values from prompts + CLI overrides + defaults, then
|
|
22
|
-
* validate them.
|
|
23
|
-
*/
|
|
24
|
-
export declare const collectOptions: (collectOptionsArguments: CollectOptions) => Promise<Options>;
|
|
25
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remote template fetching for `vis generate`.
|
|
3
|
-
*
|
|
4
|
-
* Reuses giget (already a vis dep, used by `vis create`) to fetch
|
|
5
|
-
* `git://`, `npm://`, and `https://` archive sources into a cache
|
|
6
|
-
* directory before discover/load runs against them.
|
|
7
|
-
*
|
|
8
|
-
* Sources are normalized via the same patterns vis create uses; see
|
|
9
|
-
* `src/commands/create/templates/remote.ts` for the underlying
|
|
10
|
-
* downloadTemplate call.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* True when the input looks like a remote source giget can resolve.
|
|
14
|
-
*/
|
|
15
|
-
export declare const isRemoteSource: (input: string) => boolean;
|
|
16
|
-
interface FetchOptions {
|
|
17
|
-
/** Auth token forwarded to giget for private repos. */
|
|
18
|
-
auth?: string;
|
|
19
|
-
/** Prefer cached templates over re-download. */
|
|
20
|
-
preferOffline?: boolean;
|
|
21
|
-
/** Override the cache/work directory (defaults to a fresh tmp). */
|
|
22
|
-
targetDirectory?: string;
|
|
23
|
-
}
|
|
24
|
-
export interface FetchResult {
|
|
25
|
-
/**
|
|
26
|
-
* Release the tmp directory once the caller has finished loading
|
|
27
|
-
* the template into memory. No-op when the directory was supplied
|
|
28
|
-
* externally via `targetDirectory`.
|
|
29
|
-
*/
|
|
30
|
-
cleanup: () => void;
|
|
31
|
-
/** Absolute directory containing the downloaded template. */
|
|
32
|
-
directory: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Download a remote template and return the directory it lives in.
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* const { directory } = await fetchRemoteTemplate("git://github.com/org/template#main");
|
|
39
|
-
* const template = await loadMoonTemplate(directory, "from-git");
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare const fetchRemoteTemplate: (source: string, options?: FetchOptions) => Promise<FetchResult>;
|
|
43
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Template runner — applies a `Creation` to disk.
|
|
3
|
-
*
|
|
4
|
-
* Walks the recursive `files` tree, prompts for overwrites unless
|
|
5
|
-
* `--force` was passed, runs scripts in phase order, and prints
|
|
6
|
-
* suggestions at the end. `--dry-run` prints the planned writes
|
|
7
|
-
* without touching the filesystem.
|
|
8
|
-
*
|
|
9
|
-
* Every write target is checked against the destination directory to
|
|
10
|
-
* reject `..`-escapes and absolute paths coming from rendered
|
|
11
|
-
* frontmatter `to:` fields or filename interpolation — template
|
|
12
|
-
* authors (or remote templates) must not be able to scribble
|
|
13
|
-
* outside the caller's chosen destination.
|
|
14
|
-
*/
|
|
15
|
-
import type { Template } from "./types.d.ts";
|
|
16
|
-
interface RunnerOptions {
|
|
17
|
-
/** Caller's CWD for `working_dir`. */
|
|
18
|
-
cwd: string;
|
|
19
|
-
/** Destination directory (absolute). */
|
|
20
|
-
destination: string;
|
|
21
|
-
/** When true, print but don't write. */
|
|
22
|
-
dryRun?: boolean;
|
|
23
|
-
/** When true, overwrite existing files without prompting. */
|
|
24
|
-
force?: boolean;
|
|
25
|
-
/** Resolved option values from `collectOptions`. */
|
|
26
|
-
options: Record<string, unknown>;
|
|
27
|
-
/** When true, don't run scripts. */
|
|
28
|
-
skipScripts?: boolean;
|
|
29
|
-
/** Workspace root for `dest_rel_dir`. */
|
|
30
|
-
workspaceRoot: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Run a template end-to-end: invoke `produce`, write files, run scripts,
|
|
34
|
-
* print suggestions.
|
|
35
|
-
*/
|
|
36
|
-
export declare const runTemplate: (template: Template, options: RunnerOptions) => Promise<void>;
|
|
37
|
-
export {};
|
package/dist/generate/types.d.ts
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type definitions for the `vis generate` template runtime.
|
|
3
|
-
*
|
|
4
|
-
* The shape intentionally echoes Bingo's `Template` so a future Bingo
|
|
5
|
-
* adapter (re-exporting `bingo` Templates through this runtime) is a
|
|
6
|
-
* one-pager. Authors do not depend on Bingo to write a vis generator.
|
|
7
|
-
*/
|
|
8
|
-
export type VariableType = "array" | "boolean" | "enum" | "number" | "string";
|
|
9
|
-
/** Common variable fields (all types). */
|
|
10
|
-
interface VariableBase {
|
|
11
|
-
/**
|
|
12
|
-
* Default value when the user accepts the prompt without typing.
|
|
13
|
-
* For `boolean` this is `true|false`; for `enum` it must match `values`.
|
|
14
|
-
*/
|
|
15
|
-
default?: boolean | number | string | string[];
|
|
16
|
-
/** Hide from prompts; can still be set via CLI or `--defaults`. */
|
|
17
|
-
internal?: boolean;
|
|
18
|
-
/** Sort order in prompts (lower first). Defaults to declaration order. */
|
|
19
|
-
order?: number;
|
|
20
|
-
/** Override the prompt text. Defaults to the variable name. */
|
|
21
|
-
prompt?: string;
|
|
22
|
-
/** When true, the user must provide a non-empty value. */
|
|
23
|
-
required?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export type StringVariable = VariableBase & {
|
|
26
|
-
type: "string";
|
|
27
|
-
};
|
|
28
|
-
export type NumberVariable = VariableBase & {
|
|
29
|
-
type: "number";
|
|
30
|
-
};
|
|
31
|
-
export type BooleanVariable = VariableBase & {
|
|
32
|
-
default?: boolean;
|
|
33
|
-
type: "boolean";
|
|
34
|
-
};
|
|
35
|
-
export type ArrayVariable = VariableBase & {
|
|
36
|
-
type: "array";
|
|
37
|
-
};
|
|
38
|
-
export interface EnumVariable extends VariableBase {
|
|
39
|
-
/** Allow multiple selections (returns `string[]`). */
|
|
40
|
-
multiple?: boolean;
|
|
41
|
-
type: "enum";
|
|
42
|
-
/** Selectable values. */
|
|
43
|
-
values: string[];
|
|
44
|
-
}
|
|
45
|
-
export type Variable = ArrayVariable | BooleanVariable | EnumVariable | NumberVariable | StringVariable;
|
|
46
|
-
/** Map of variable name → spec, as authors declare them. */
|
|
47
|
-
export type VariableMap = Record<string, Variable>;
|
|
48
|
-
/** Resolved option values passed to `produce()`. */
|
|
49
|
-
export type Options = Record<string, unknown>;
|
|
50
|
-
/** A file in a Creation can be a string, a Buffer (binary asset), or a nested directory. */
|
|
51
|
-
export type CreationFile = Buffer | string;
|
|
52
|
-
export interface CreationDirectory {
|
|
53
|
-
[key: string]: CreationDirectory | CreationFile;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Script entry produced by `produce()`.
|
|
57
|
-
* - `string`: shell command, runs in the destination directory.
|
|
58
|
-
* - `object`: shell commands with optional phase ordering.
|
|
59
|
-
*/
|
|
60
|
-
export type Script = ScriptObject | string;
|
|
61
|
-
export interface ScriptObject {
|
|
62
|
-
/** Shell command(s) to run sequentially. */
|
|
63
|
-
commands: string[];
|
|
64
|
-
/**
|
|
65
|
-
* Phase ordering. Phases run in ascending order; scripts within
|
|
66
|
-
* the same phase are dispatched concurrently. Default: 0.
|
|
67
|
-
*/
|
|
68
|
-
phase?: number;
|
|
69
|
-
/** Suppress command output. Default: false. */
|
|
70
|
-
silent?: boolean;
|
|
71
|
-
}
|
|
72
|
-
/** Object returned by a template's `produce()` function. */
|
|
73
|
-
export interface Creation {
|
|
74
|
-
/** Recursive directory tree. Keys with `/` are auto-split. */
|
|
75
|
-
files?: CreationDirectory;
|
|
76
|
-
/**
|
|
77
|
-
* Per-file metadata keyed by the *flattened* destination path
|
|
78
|
-
* (e.g. `src/foo.ts`). Optional — native templates usually omit
|
|
79
|
-
* this; the moon adapter populates it from per-file frontmatter
|
|
80
|
-
* so `force: true` survives the trip to the runner without
|
|
81
|
-
* changing the shape of `files`.
|
|
82
|
-
*/
|
|
83
|
-
filesMeta?: Record<string, FileMeta>;
|
|
84
|
-
/** Shell scripts to run after files are written. */
|
|
85
|
-
scripts?: Script[];
|
|
86
|
-
/** User-facing tips printed after the run. */
|
|
87
|
-
suggestions?: string[];
|
|
88
|
-
}
|
|
89
|
-
export interface FileMeta {
|
|
90
|
-
/**
|
|
91
|
-
* Overwrite an existing file at this path without prompting or
|
|
92
|
-
* consulting the global `--force` flag.
|
|
93
|
-
*/
|
|
94
|
-
force?: boolean;
|
|
95
|
-
}
|
|
96
|
-
/** Context object passed to `produce()`. */
|
|
97
|
-
export interface TemplateContext {
|
|
98
|
-
/** Built-in variables: `dest_dir`, `dest_rel_dir`, `working_dir`, `workspace_root`. */
|
|
99
|
-
builtins: BuiltinVars;
|
|
100
|
-
/** Resolved option values (after prompts + CLI overrides + defaults). */
|
|
101
|
-
options: Options;
|
|
102
|
-
}
|
|
103
|
-
export interface BuiltinVars {
|
|
104
|
-
/** Absolute destination directory. */
|
|
105
|
-
dest_dir: string;
|
|
106
|
-
/** Destination relative to the workspace root. */
|
|
107
|
-
dest_rel_dir: string;
|
|
108
|
-
/** Caller's current working directory. */
|
|
109
|
-
working_dir: string;
|
|
110
|
-
/** Absolute workspace root (from `findMonorepoRootSync`, fallback to `working_dir`). */
|
|
111
|
-
workspace_root: string;
|
|
112
|
-
}
|
|
113
|
-
/** Top-level "About" metadata for a template. */
|
|
114
|
-
export interface TemplateAbout {
|
|
115
|
-
/** One-line description. */
|
|
116
|
-
description: string;
|
|
117
|
-
/** Short identifier shown in `vis generate --list` and prompts. */
|
|
118
|
-
name: string;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* The author-facing template shape.
|
|
122
|
-
* Both native (`.vis/templates/<name>.ts`) and moon-adapter outputs
|
|
123
|
-
* normalize to this.
|
|
124
|
-
*/
|
|
125
|
-
export interface Template {
|
|
126
|
-
about: TemplateAbout;
|
|
127
|
-
/**
|
|
128
|
-
* Default destination directory (relative to workspace root unless
|
|
129
|
-
* absolute or starting with `./`). Honored when the user does not
|
|
130
|
-
* pass `--to`. Maps to moon's `template.yml` `destination`.
|
|
131
|
-
*/
|
|
132
|
-
destination?: string;
|
|
133
|
-
/** Variable schema for prompts. */
|
|
134
|
-
options?: VariableMap;
|
|
135
|
-
/** Build the Creation given resolved options and built-in vars. */
|
|
136
|
-
produce: (context: TemplateContext) => Creation | Promise<Creation>;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Discovery record: a Template plus where it came from.
|
|
140
|
-
* Surfaced by `vis generate --list`.
|
|
141
|
-
*/
|
|
142
|
-
export interface DiscoveredTemplate {
|
|
143
|
-
/** Lazy loader — invoke to materialize the Template. */
|
|
144
|
-
load: () => Promise<Template>;
|
|
145
|
-
/** Stable name used by `vis generate <name>`. */
|
|
146
|
-
name: string;
|
|
147
|
-
/** Absolute path on disk (file for native, directory for moon). */
|
|
148
|
-
path: string;
|
|
149
|
-
/** Source classification — affects load + listing. */
|
|
150
|
-
source: "config" | "moon" | "native" | "remote";
|
|
151
|
-
}
|
|
152
|
-
export {};
|
package/dist/hooks.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import type { LifeCycleInterface, Task, TaskResult } from "@visulima/task-runner";
|
|
2
|
-
import type { Hookable } from "hookable";
|
|
3
|
-
/**
|
|
4
|
-
* Typed hook surface exposed to vis plugins.
|
|
5
|
-
*
|
|
6
|
-
* Plugins subscribe via `hooks.hook(name, handler)` — handlers are
|
|
7
|
-
* awaited sequentially in registration order. Returning a promise
|
|
8
|
-
* delays the next hook firing until it resolves, so plugins can
|
|
9
|
-
* safely perform async setup/teardown.
|
|
10
|
-
*
|
|
11
|
-
* Naming deliberately mirrors vite-task / webpack-style verbs:
|
|
12
|
-
* before/after for boundaries, on<Event> for passive observation.
|
|
13
|
-
*/
|
|
14
|
-
export interface VisHooks {
|
|
15
|
-
/**
|
|
16
|
-
* Fired after the entire task graph completes (including any
|
|
17
|
-
* failures). `results` maps task ID → {@link TaskResult}.
|
|
18
|
-
*/
|
|
19
|
-
"run:after": (results: Map<string, TaskResult>) => Promise<void> | void;
|
|
20
|
-
/**
|
|
21
|
-
* Fired once before any task in the graph starts, after workspace
|
|
22
|
-
* discovery and graph construction. Throwing aborts the run.
|
|
23
|
-
*/
|
|
24
|
-
"run:before": (context: {
|
|
25
|
-
tasks: Task[];
|
|
26
|
-
workspaceRoot: string;
|
|
27
|
-
}) => Promise<void> | void;
|
|
28
|
-
/**
|
|
29
|
-
* Fired after a task completes (success, failure, or cache hit).
|
|
30
|
-
* Receives the final {@link TaskResult}.
|
|
31
|
-
*/
|
|
32
|
-
"task:after": (task: Task, result: TaskResult) => Promise<void> | void;
|
|
33
|
-
/**
|
|
34
|
-
* Fired before each task begins execution — after scheduling, before
|
|
35
|
-
* the executor runs the command. Throwing aborts that single task.
|
|
36
|
-
*/
|
|
37
|
-
"task:before": (task: Task) => Promise<void> | void;
|
|
38
|
-
/** Fired when a task hit the local or remote cache. */
|
|
39
|
-
"task:cacheHit": (task: Task, result: TaskResult) => Promise<void> | void;
|
|
40
|
-
/**
|
|
41
|
-
* Fired when auto-fingerprint cache diagnostics reports a miss,
|
|
42
|
-
* carrying the human-readable reason string.
|
|
43
|
-
*/
|
|
44
|
-
"task:cacheMiss": (task: Task, reasons: string) => Promise<void> | void;
|
|
45
|
-
/** Fired when a task exits non-zero. */
|
|
46
|
-
"task:failure": (task: Task, result: TaskResult) => Promise<void> | void;
|
|
47
|
-
/**
|
|
48
|
-
* Fired with a stderr chunk as a running task emits it. Plugins
|
|
49
|
-
* that ship logs live (Slack, Datadog) should prefer this over
|
|
50
|
-
* `task:after` so they don't wait for the full buffer.
|
|
51
|
-
*/
|
|
52
|
-
"task:stderr": (task: Task, chunk: string) => Promise<void> | void;
|
|
53
|
-
/**
|
|
54
|
-
* Fired with a stdout chunk as a running task emits it. See
|
|
55
|
-
* `task:stderr` for semantics.
|
|
56
|
-
*/
|
|
57
|
-
"task:stdout": (task: Task, chunk: string) => Promise<void> | void;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Public plugin contract. Implementations register handlers by
|
|
61
|
-
* returning a partial {@link VisHooks} map from `hooks`, or by
|
|
62
|
-
* mutating the Hookable instance directly via `setup(hooks)` for
|
|
63
|
-
* advanced cases (dynamic registration, removeHook, etc.).
|
|
64
|
-
*
|
|
65
|
-
* Plugins are loaded in the order they appear in `visConfig.plugins`.
|
|
66
|
-
* Handler execution order within a hook follows registration order,
|
|
67
|
-
* so earlier plugins see events first.
|
|
68
|
-
*/
|
|
69
|
-
export interface VisPlugin {
|
|
70
|
-
/**
|
|
71
|
-
* Declarative handlers — the common shape. One entry per hook
|
|
72
|
-
* name; pass a function or an array of functions (all run serially
|
|
73
|
-
* in order).
|
|
74
|
-
*/
|
|
75
|
-
hooks?: Partial<{
|
|
76
|
-
[K in keyof VisHooks]: VisHooks[K] | VisHooks[K][];
|
|
77
|
-
}>;
|
|
78
|
-
/** Plugin name — surfaced in debug logs. */
|
|
79
|
-
name: string;
|
|
80
|
-
/**
|
|
81
|
-
* Imperative setup — receives the shared Hookable instance so the
|
|
82
|
-
* plugin can register hooks conditionally, unregister later, or
|
|
83
|
-
* use advanced APIs like `hookOnce`/`beforeEach`/`afterEach`.
|
|
84
|
-
*/
|
|
85
|
-
setup?: (hooks: Hookable<VisHooks>) => Promise<void> | void;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Optional callback invoked whenever a plugin handler throws. Lets
|
|
89
|
-
* callers surface buggy plugins without crashing the run — pass a
|
|
90
|
-
* logger or re-throw to promote plugin errors to fatals.
|
|
91
|
-
*/
|
|
92
|
-
export type HookErrorHandler = (hookName: keyof VisHooks, error: unknown) => void;
|
|
93
|
-
/**
|
|
94
|
-
* Creates a fresh typed hook registry. One instance is created per
|
|
95
|
-
* `vis run` invocation and passed to every plugin's `setup()`.
|
|
96
|
-
*/
|
|
97
|
-
export declare const createVisHooks: () => Hookable<VisHooks>;
|
|
98
|
-
/**
|
|
99
|
-
* Registers each plugin's handlers against the shared hook instance.
|
|
100
|
-
* Synchronous failures in `setup()` abort plugin loading and propagate.
|
|
101
|
-
*/
|
|
102
|
-
export declare const registerPlugins: (hooks: Hookable<VisHooks>, plugins: VisPlugin[] | undefined) => Promise<void>;
|
|
103
|
-
/**
|
|
104
|
-
* Bridges `LifeCycleInterface` (the task-runner contract) into
|
|
105
|
-
* `VisHooks` events. Register this as a lifecycle alongside the
|
|
106
|
-
* existing UI renderers so plugin authors see the same events the
|
|
107
|
-
* TUI/static output do, without having to understand task-runner's
|
|
108
|
-
* lower-level `LifeCycleInterface` shape.
|
|
109
|
-
*/
|
|
110
|
-
export declare class HookableLifeCycle implements LifeCycleInterface {
|
|
111
|
-
#private;
|
|
112
|
-
constructor(hooks: Hookable<VisHooks>, onError?: HookErrorHandler);
|
|
113
|
-
startTasks(tasks: Task[]): void;
|
|
114
|
-
endTasks(results: TaskResult[]): void;
|
|
115
|
-
printCacheMiss(task: Task, reasons: string): void;
|
|
116
|
-
onTaskStdout(task: Task, chunk: string): void;
|
|
117
|
-
onTaskStderr(task: Task, chunk: string): void;
|
|
118
|
-
}
|
package/dist/native-binding.d.ts
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Native bindings for vis PM operations.
|
|
3
|
-
*
|
|
4
|
-
* The native addon (Rust via napi-rs) provides:
|
|
5
|
-
* - Fast package manager detection (lockfile scanning)
|
|
6
|
-
* - Zero-overhead command resolution across pnpm/npm/yarn/bun
|
|
7
|
-
* - Native process execution via Rust std::process::Command
|
|
8
|
-
* - Binary lookup via `which`
|
|
9
|
-
*
|
|
10
|
-
* Falls back to pure TypeScript implementations when the native
|
|
11
|
-
* addon is not available (not compiled, wrong platform, etc.).
|
|
12
|
-
*
|
|
13
|
-
* Build with: napi build --platform --release --manifest-path native/Cargo.toml --output-dir .
|
|
14
|
-
*/
|
|
15
|
-
interface DetectedPackageManager {
|
|
16
|
-
isWorkspace: boolean;
|
|
17
|
-
name: string;
|
|
18
|
-
/** Version from packageManager field, or undefined if unknown */
|
|
19
|
-
version?: string;
|
|
20
|
-
}
|
|
21
|
-
interface ResolvedCommand {
|
|
22
|
-
args: string[];
|
|
23
|
-
bin: string;
|
|
24
|
-
warnings: string[];
|
|
25
|
-
}
|
|
26
|
-
interface ExecResult {
|
|
27
|
-
code: number;
|
|
28
|
-
stderr: string;
|
|
29
|
-
stdout: string;
|
|
30
|
-
}
|
|
31
|
-
interface InstallOptions {
|
|
32
|
-
dev: boolean;
|
|
33
|
-
filter: string[];
|
|
34
|
-
force: boolean;
|
|
35
|
-
frozenLockfile: boolean;
|
|
36
|
-
ignoreScripts: boolean;
|
|
37
|
-
lockfileOnly: boolean;
|
|
38
|
-
noOptional: boolean;
|
|
39
|
-
offline: boolean;
|
|
40
|
-
prod: boolean;
|
|
41
|
-
recursive: boolean;
|
|
42
|
-
silent: boolean;
|
|
43
|
-
workspaceRoot: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface AddOptions {
|
|
46
|
-
exact: boolean;
|
|
47
|
-
filter: string[];
|
|
48
|
-
global: boolean;
|
|
49
|
-
optional: boolean;
|
|
50
|
-
packages: string[];
|
|
51
|
-
peer: boolean;
|
|
52
|
-
saveDev: boolean;
|
|
53
|
-
workspace: boolean;
|
|
54
|
-
workspaceRoot: boolean;
|
|
55
|
-
}
|
|
56
|
-
interface RemoveOptions {
|
|
57
|
-
filter: string[];
|
|
58
|
-
global: boolean;
|
|
59
|
-
packages: string[];
|
|
60
|
-
recursive: boolean;
|
|
61
|
-
saveDev: boolean;
|
|
62
|
-
workspaceRoot: boolean;
|
|
63
|
-
}
|
|
64
|
-
interface WhyOptions {
|
|
65
|
-
/** Uses Option<i32> in Rust - pass undefined for no depth limit (not null!) */
|
|
66
|
-
depth?: number;
|
|
67
|
-
dev: boolean;
|
|
68
|
-
filter: string[];
|
|
69
|
-
global: boolean;
|
|
70
|
-
json: boolean;
|
|
71
|
-
long: boolean;
|
|
72
|
-
noOptional: boolean;
|
|
73
|
-
packages: string[];
|
|
74
|
-
parseable: boolean;
|
|
75
|
-
prod: boolean;
|
|
76
|
-
recursive: boolean;
|
|
77
|
-
}
|
|
78
|
-
interface OutdatedOptions {
|
|
79
|
-
compatible: boolean;
|
|
80
|
-
dev: boolean;
|
|
81
|
-
filter: string[];
|
|
82
|
-
format: string;
|
|
83
|
-
global: boolean;
|
|
84
|
-
long: boolean;
|
|
85
|
-
noOptional: boolean;
|
|
86
|
-
packages: string[];
|
|
87
|
-
prod: boolean;
|
|
88
|
-
recursive: boolean;
|
|
89
|
-
workspaceRoot: boolean;
|
|
90
|
-
}
|
|
91
|
-
interface DlxOptions {
|
|
92
|
-
additionalPackages: string[];
|
|
93
|
-
args: string[];
|
|
94
|
-
package: string;
|
|
95
|
-
shellMode: boolean;
|
|
96
|
-
silent: boolean;
|
|
97
|
-
}
|
|
98
|
-
interface ExecOptions {
|
|
99
|
-
args: string[];
|
|
100
|
-
command: string;
|
|
101
|
-
filter: string[];
|
|
102
|
-
parallel: boolean;
|
|
103
|
-
recursive: boolean;
|
|
104
|
-
reverse: boolean;
|
|
105
|
-
shellMode: boolean;
|
|
106
|
-
workspaceRoot: boolean;
|
|
107
|
-
}
|
|
108
|
-
interface CleanResult {
|
|
109
|
-
errors: string[];
|
|
110
|
-
lockfilesRemoved: string[];
|
|
111
|
-
removed: string[];
|
|
112
|
-
}
|
|
113
|
-
interface SortPackageJsonOptions {
|
|
114
|
-
/** Enable formatted output with newlines (default: true) */
|
|
115
|
-
pretty?: boolean;
|
|
116
|
-
/** Alphabetize script commands (default: false) */
|
|
117
|
-
sort_scripts?: boolean;
|
|
118
|
-
}
|
|
119
|
-
interface NativeBindings {
|
|
120
|
-
cleanWorkspace: (root: string, removeLockfile: boolean) => CleanResult;
|
|
121
|
-
detectPackageManager: (cwd: string) => DetectedPackageManager;
|
|
122
|
-
execPmCommand: (bin: string, args: string[], cwd: string) => ExecResult;
|
|
123
|
-
execPmCommandInteractive: (bin: string, args: string[], cwd: string) => number;
|
|
124
|
-
/**
|
|
125
|
-
* ABI compatibility version exported from the Rust binding. The TypeScript
|
|
126
|
-
* loader compares this against {@link EXPECTED_NATIVE_BINDING_VERSION} and
|
|
127
|
-
* rejects mismatched addons so a stale `.node` file from before a
|
|
128
|
-
* signature change is not used silently.
|
|
129
|
-
*/
|
|
130
|
-
NATIVE_BINDING_VERSION: number;
|
|
131
|
-
resolveAdd: (pm: string, version: string, options: AddOptions) => ResolvedCommand;
|
|
132
|
-
resolveDedupe: (pm: string, version: string, check: boolean) => ResolvedCommand;
|
|
133
|
-
resolveDlx: (pm: string, version: string, options: DlxOptions) => ResolvedCommand;
|
|
134
|
-
resolveExec: (pm: string, version: string, options: ExecOptions) => ResolvedCommand;
|
|
135
|
-
resolveInstall: (pm: string, version: string, options: InstallOptions) => ResolvedCommand;
|
|
136
|
-
resolveLink: (pm: string, version: string, target: string | null) => ResolvedCommand;
|
|
137
|
-
resolveOutdated: (pm: string, version: string, options: OutdatedOptions) => ResolvedCommand;
|
|
138
|
-
resolvePmCommand: (pm: string, version: string, subcommand: string, extraArgs: string[]) => ResolvedCommand;
|
|
139
|
-
resolveRemove: (pm: string, version: string, options: RemoveOptions) => ResolvedCommand;
|
|
140
|
-
resolveUnlink: (pm: string, version: string, packages: string[], recursive: boolean) => ResolvedCommand;
|
|
141
|
-
resolveWhy: (pm: string, version: string, options: WhyOptions) => ResolvedCommand;
|
|
142
|
-
sortPackageJsonString: (contents: string) => string;
|
|
143
|
-
sortPackageJsonStringWithOptions: (contents: string, options: SortPackageJsonOptions) => string;
|
|
144
|
-
whichBin: (name: string) => string | null;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Attempts to load the native addon. Returns undefined if unavailable.
|
|
148
|
-
* The result is cached after the first attempt.
|
|
149
|
-
*
|
|
150
|
-
* Uses createRequire because the napi-generated index.js is CJS.
|
|
151
|
-
*/
|
|
152
|
-
declare const loadNativeBindings: () => NativeBindings | undefined;
|
|
153
|
-
/**
|
|
154
|
-
* Returns true if the native addon is loaded and available.
|
|
155
|
-
*/
|
|
156
|
-
declare const isNativeAvailable: () => boolean;
|
|
157
|
-
export type { AddOptions, CleanResult, DetectedPackageManager, DlxOptions, ExecOptions, ExecResult, InstallOptions, NativeBindings, OutdatedOptions, RemoveOptions, ResolvedCommand, SortPackageJsonOptions, WhyOptions, };
|
|
158
|
-
export { isNativeAvailable, loadNativeBindings };
|
package/dist/output.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
declare const bold: (s: string) => string;
|
|
2
|
-
declare const dim: (s: string) => string;
|
|
3
|
-
declare const red: (s: string) => string;
|
|
4
|
-
declare const green: (s: string) => string;
|
|
5
|
-
declare const yellow: (s: string) => string;
|
|
6
|
-
declare const cyan: (s: string) => string;
|
|
7
|
-
declare const SYMBOLS: {
|
|
8
|
-
readonly arrow: string;
|
|
9
|
-
readonly dash: string;
|
|
10
|
-
readonly failure: string;
|
|
11
|
-
readonly success: string;
|
|
12
|
-
readonly warning: string;
|
|
13
|
-
};
|
|
14
|
-
/** Informational message with blue bold `info:` prefix */
|
|
15
|
-
declare const info: (message: string) => void;
|
|
16
|
-
/** Warning with yellow bold `warn:` prefix */
|
|
17
|
-
declare const warn: (message: string) => void;
|
|
18
|
-
/** Error with red bold `error:` prefix */
|
|
19
|
-
declare const error: (message: string) => void;
|
|
20
|
-
/** Supplementary information with gray bold `note:` prefix */
|
|
21
|
-
declare const note: (message: string) => void;
|
|
22
|
-
/** Success line with green checkmark */
|
|
23
|
-
declare const success: (message: string) => void;
|
|
24
|
-
/** Failure line with red X */
|
|
25
|
-
declare const failure: (message: string) => void;
|
|
26
|
-
/**
|
|
27
|
-
* Creates a clickable terminal hyperlink using `@visulima/ansi` OSC 8
|
|
28
|
-
* implementation. Falls back to "text (url)" when not in a TTY.
|
|
29
|
-
*/
|
|
30
|
-
declare const link: (text: string, url: string) => string;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the VIS_VERSION environment variable for child processes.
|
|
33
|
-
*/
|
|
34
|
-
declare const injectVersion: () => void;
|
|
35
|
-
/**
|
|
36
|
-
* Set the terminal window title using OSC 0 escape sequence.
|
|
37
|
-
* No-op when stdout is not a TTY, running in CI, or TERM=dumb.
|
|
38
|
-
*/
|
|
39
|
-
declare const setTerminalTitle: (title: string) => void;
|
|
40
|
-
export { bold, cyan, dim, error, failure, green, info, injectVersion, link, note, red, setTerminalTitle, success, SYMBOLS, warn, yellow };
|
package/dist/overrides.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Package manager override and resolution management.
|
|
3
|
-
*
|
|
4
|
-
* Handles the correct override location for each package manager:
|
|
5
|
-
* - **pnpm v10+**: top-level `overrides` in `pnpm-workspace.yaml`
|
|
6
|
-
* - **pnpm v9-**: `pnpm.overrides` in `package.json`
|
|
7
|
-
* - **npm**: `overrides` in `package.json` (uses `$<name>` references
|
|
8
|
-
* for direct dependencies to avoid EOVERRIDE errors)
|
|
9
|
-
* - **yarn / bun**: `resolutions` in `package.json`
|
|
10
|
-
*
|
|
11
|
-
* All overrides are root-level — no PM supports per-workspace overrides.
|
|
12
|
-
* @see https://pnpm.io/settings — pnpm v10+ workspace settings
|
|
13
|
-
* @see https://docs.npmjs.com/cli/v10/configuring-npm/package-json#overrides
|
|
14
|
-
* @see https://yarnpkg.com/configuration/manifest#resolutions
|
|
15
|
-
* @see https://bun.sh/docs/pm/overrides
|
|
16
|
-
*/
|
|
17
|
-
/** Supported package manager names. */
|
|
18
|
-
type PackageManagerName = "bun" | "npm" | "pnpm" | "yarn";
|
|
19
|
-
/** Package manager identity with version for PM-specific behavior. */
|
|
20
|
-
interface PmInfo {
|
|
21
|
-
name: PackageManagerName;
|
|
22
|
-
version: string;
|
|
23
|
-
}
|
|
24
|
-
/** A single override entry mapping an original package to its replacement spec. */
|
|
25
|
-
interface OverrideEntry {
|
|
26
|
-
/** The original package name being overridden (e.g., `"is-regex"`). */
|
|
27
|
-
original: string;
|
|
28
|
-
/** The npm alias spec (e.g., `"npm:@socketregistry/is-regex@^1"`). */
|
|
29
|
-
spec: string;
|
|
30
|
-
}
|
|
31
|
-
/** Result of reading existing overrides from the project. */
|
|
32
|
-
interface OverridesResult {
|
|
33
|
-
/** Current overrides — values may be strings or nested objects (npm supports nested overrides). */
|
|
34
|
-
overrides: Record<string, string | Record<string, string>>;
|
|
35
|
-
/** The file where overrides are stored. */
|
|
36
|
-
source: "package.json" | "pnpm-workspace.yaml";
|
|
37
|
-
}
|
|
38
|
-
/** Result of applying override entries. */
|
|
39
|
-
interface ApplyOverridesResult {
|
|
40
|
-
/** Package names that were newly added. */
|
|
41
|
-
added: string[];
|
|
42
|
-
/** Package names whose specs were changed. */
|
|
43
|
-
updated: string[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Reads existing overrides for the detected package manager, choosing
|
|
47
|
-
* `pnpm-workspace.yaml` for pnpm v10+ and `package.json` for everything else.
|
|
48
|
-
*/
|
|
49
|
-
declare const readOverrides: (workspaceRoot: string, pkgJson: Record<string, unknown>, pm: PmInfo) => OverridesResult;
|
|
50
|
-
/**
|
|
51
|
-
* Applies override entries to the correct config file for the package manager.
|
|
52
|
-
*
|
|
53
|
-
* For npm, direct dependencies use `$<name>` reference syntax to avoid
|
|
54
|
-
* npm's EOVERRIDE error when an override conflicts with a direct dep range.
|
|
55
|
-
* @param workspaceRoot Absolute path to the workspace root directory.
|
|
56
|
-
* @param pkgJsonPath Absolute path to the root `package.json`.
|
|
57
|
-
* @param entries Override entries to apply.
|
|
58
|
-
* @param pm Package manager name and version.
|
|
59
|
-
* @returns Lists of added and updated package names.
|
|
60
|
-
*/
|
|
61
|
-
declare const applyOverrides: (workspaceRoot: string, pkgJsonPath: string, entries: OverrideEntry[], pm: PmInfo) => ApplyOverridesResult;
|
|
62
|
-
/**
|
|
63
|
-
* Reads the lockfile text for a workspace root.
|
|
64
|
-
*
|
|
65
|
-
* Returns the raw text content for regex-based package name scanning.
|
|
66
|
-
* Falls back to an empty string if the lockfile is missing or unreadable.
|
|
67
|
-
* @param workspaceRoot Absolute path to the workspace root.
|
|
68
|
-
* @param pm Package manager name (determines lockfile name).
|
|
69
|
-
*/
|
|
70
|
-
declare const readLockfileText: (workspaceRoot: string, pm: PackageManagerName) => string;
|
|
71
|
-
/**
|
|
72
|
-
* Checks if a package name appears in the lockfile text using PM-specific string patterns.
|
|
73
|
-
*
|
|
74
|
-
* This avoids parsing the entire lockfile — a single `string.includes()` is
|
|
75
|
-
* sufficient for presence checks.
|
|
76
|
-
* @param lockText Raw lockfile content.
|
|
77
|
-
* @param packageName Package name to search for.
|
|
78
|
-
* @param pm Package manager name (determines the search pattern).
|
|
79
|
-
*/
|
|
80
|
-
declare const lockfileContainsPackage: (lockText: string, packageName: string, pm: PackageManagerName) => boolean;
|
|
81
|
-
export type { ApplyOverridesResult, OverrideEntry, OverridesResult, PackageManagerName, PmInfo };
|
|
82
|
-
export { applyOverrides, lockfileContainsPackage, readLockfileText, readOverrides };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
interface UpdateCommandOptions {
|
|
2
|
-
dev: boolean;
|
|
3
|
-
filters: string[];
|
|
4
|
-
global: boolean;
|
|
5
|
-
interactive: boolean;
|
|
6
|
-
latest: boolean;
|
|
7
|
-
noOptional: boolean;
|
|
8
|
-
noSave: boolean;
|
|
9
|
-
packages: string[];
|
|
10
|
-
prod: boolean;
|
|
11
|
-
recursive: boolean;
|
|
12
|
-
workspaceRoot: boolean;
|
|
13
|
-
}
|
|
14
|
-
interface ResolvedCommand {
|
|
15
|
-
args: string[];
|
|
16
|
-
bin: string;
|
|
17
|
-
}
|
|
18
|
-
declare const resolveUpdateCommand: (packageManager: "bun" | "npm" | "pnpm" | "yarn", version: string, options: UpdateCommandOptions) => {
|
|
19
|
-
command: ResolvedCommand;
|
|
20
|
-
warnings: string[];
|
|
21
|
-
};
|
|
22
|
-
export type { ResolvedCommand, UpdateCommandOptions };
|
|
23
|
-
export { resolveUpdateCommand };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{otelPlugin as l}from"../config.js";export{l as otelPlugin};
|