@visulima/vis 1.0.0-alpha.2 → 1.0.0-alpha.21
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 +840 -14
- package/LICENSE.md +7667 -0
- package/README.md +322 -19
- package/dist/bin.js +1 -146
- package/dist/config/index.d.ts +2795 -0
- package/dist/config/index.js +1 -0
- package/dist/generate/index.d.ts +157 -0
- package/dist/generate/index.js +1 -0
- package/dist/packem_chunks/bin.js +1295 -0
- package/dist/packem_chunks/config.js +19 -0
- package/dist/packem_chunks/doctor-probe.js +2 -0
- package/dist/packem_chunks/fix.js +11 -0
- package/dist/packem_chunks/handler.js +1 -0
- package/dist/packem_chunks/handler10.js +1 -0
- package/dist/packem_chunks/handler11.js +5 -0
- package/dist/packem_chunks/handler12.js +1 -0
- package/dist/packem_chunks/handler13.js +27 -0
- package/dist/packem_chunks/handler14.js +5 -0
- package/dist/packem_chunks/handler15.js +1 -0
- package/dist/packem_chunks/handler16.js +1 -0
- package/dist/packem_chunks/handler17.js +1 -0
- package/dist/packem_chunks/handler18.js +1 -0
- package/dist/packem_chunks/handler19.js +1 -0
- package/dist/packem_chunks/handler2.js +2 -0
- package/dist/packem_chunks/handler20.js +5 -0
- package/dist/packem_chunks/handler21.js +2 -0
- package/dist/packem_chunks/handler22.js +2 -0
- package/dist/packem_chunks/handler23.js +18 -0
- package/dist/packem_chunks/handler24.js +1 -0
- package/dist/packem_chunks/handler25.js +1 -0
- package/dist/packem_chunks/handler26.js +5 -0
- package/dist/packem_chunks/handler27.js +1 -0
- package/dist/packem_chunks/handler28.js +3 -0
- package/dist/packem_chunks/handler29.js +1 -0
- package/dist/packem_chunks/handler3.js +4 -0
- package/dist/packem_chunks/handler30.js +7 -0
- package/dist/packem_chunks/handler31.js +33 -0
- package/dist/packem_chunks/handler32.js +3 -0
- package/dist/packem_chunks/handler33.js +1 -0
- package/dist/packem_chunks/handler34.js +26 -0
- package/dist/packem_chunks/handler35.js +3 -0
- package/dist/packem_chunks/handler36.js +7 -0
- package/dist/packem_chunks/handler37.js +22 -0
- package/dist/packem_chunks/handler38.js +428 -0
- package/dist/packem_chunks/handler39.js +6 -0
- package/dist/packem_chunks/handler4.js +8 -0
- package/dist/packem_chunks/handler40.js +24 -0
- package/dist/packem_chunks/handler41.js +10 -0
- package/dist/packem_chunks/handler42.js +153 -0
- package/dist/packem_chunks/handler43.js +25 -0
- package/dist/packem_chunks/handler44.js +24 -0
- package/dist/packem_chunks/handler45.js +213 -0
- package/dist/packem_chunks/handler46.js +3 -0
- package/dist/packem_chunks/handler47.js +27 -0
- package/dist/packem_chunks/handler48.js +167 -0
- package/dist/packem_chunks/handler49.js +34 -0
- package/dist/packem_chunks/handler5.js +1 -0
- package/dist/packem_chunks/handler6.js +1 -0
- package/dist/packem_chunks/handler7.js +1 -0
- package/dist/packem_chunks/handler8.js +1 -0
- package/dist/packem_chunks/handler9.js +2 -0
- package/dist/packem_chunks/heal-accept.js +10 -0
- package/dist/packem_chunks/heal.js +14 -0
- package/dist/packem_chunks/help-command.js +18 -0
- package/dist/packem_chunks/index.js +7 -0
- package/dist/packem_chunks/keys-refresh.js +4 -0
- package/dist/packem_chunks/list.js +3 -0
- package/dist/packem_chunks/loader.js +1 -0
- package/dist/packem_chunks/prune.js +3 -0
- package/dist/packem_chunks/run.js +1 -0
- package/dist/packem_chunks/status.js +2 -0
- package/dist/packem_chunks/sync.js +2 -0
- package/dist/packem_chunks/sync2.js +2 -0
- package/dist/packem_chunks/tar.js +3 -0
- package/dist/packem_chunks/tripwire.js +2 -0
- package/dist/packem_shared/advisories-DsynpacV.js +1 -0
- package/dist/packem_shared/ai-analysis-uYuTIIXi.js +68 -0
- package/dist/packem_shared/ai-cache-DuwHYx2O.js +1 -0
- package/dist/packem_shared/ai-fix-DzrA-dVz.js +43 -0
- package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
- package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
- package/dist/packem_shared/cache-directory-DQak1Vjc.js +1 -0
- package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
- package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
- package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
- package/dist/packem_shared/docker-B-CIN_nj.js +60 -0
- package/dist/packem_shared/failure-log-C3LEMmkq.js +2 -0
- package/dist/packem_shared/flakiness-Dq6K4ymq.js +1 -0
- package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
- package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
- package/dist/packem_shared/index-DH-5hsrC.js +1 -0
- package/dist/packem_shared/lifecycle-Dv3nAtoD.js +2 -0
- package/dist/packem_shared/lockfile-C5DYMHVq.js +1 -0
- package/dist/packem_shared/manifests-B0fMp872.js +1 -0
- package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
- package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
- package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
- package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
- package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
- package/dist/packem_shared/run-summary-utils-BaBGP3bo.js +1 -0
- package/dist/packem_shared/runtime-check-BusAwPb2.js +1 -0
- package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
- package/dist/packem_shared/selectors-B2ISH581.js +3 -0
- package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
- package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
- package/dist/packem_shared/toolchain-Cc3cwyLP.js +5 -0
- package/dist/packem_shared/typosquats-BCeR-sLf.js +1 -0
- package/dist/packem_shared/use-measured-height-DjYgUOKk.js +1 -0
- package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
- package/dist/packem_shared/verify-07kUNTuP.js +1 -0
- package/dist/packem_shared/vis-update-app-CFrlJ3mW.js +1 -0
- package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
- package/index.d.ts +358 -0
- package/index.js +609 -0
- package/package.json +57 -22
- package/schemas/project.schema.json +872 -0
- package/schemas/vis-config.schema.json +4306 -0
- package/skills/vis/SKILL.md +96 -0
- package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
- package/templates/buildkite-ci/template.yml +20 -0
- package/dist/ai-analysis.d.ts +0 -40
- package/dist/ai-cache.d.ts +0 -21
- package/dist/bin.d.ts +0 -1
- package/dist/catalog.d.ts +0 -110
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/migrate/constants.d.ts +0 -12
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -20
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/types.d.ts +0 -20
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config.d.ts +0 -40
- package/dist/config.js +0 -1
- package/dist/package-manager.d.ts +0 -23
- package/dist/workspace.d.ts +0 -58
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,l as f,V as o,y as e,c as n,a as l,j as C,G as g,e as d,r}from"../packem_chunks/config.js";import{definePlugin as T}from"../packem_shared/definePlugin-CWm4Dv_t.js";import{otelPlugin as t}from"../packem_shared/otelPlugin-CJR2T_lk.js";export{s as CONFIG_FILES,f as SECURITY_DEFAULTS,o as TASK_CONFIG_FILES,e as applyDefaults,n as defineConfig,T as definePlugin,l as defineTaskConfig,C as findVisConfigFile,g as findVisTaskConfigFile,d as loadVisConfig,r as loadVisTaskConfig,t as otelPlugin};
|
|
@@ -0,0 +1,157 @@
|
|
|
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
|
+
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
|
+
type StringVariable = VariableBase & {
|
|
26
|
+
type: "string";
|
|
27
|
+
};
|
|
28
|
+
type NumberVariable = VariableBase & {
|
|
29
|
+
type: "number";
|
|
30
|
+
};
|
|
31
|
+
type BooleanVariable = VariableBase & {
|
|
32
|
+
default?: boolean;
|
|
33
|
+
type: "boolean";
|
|
34
|
+
};
|
|
35
|
+
type ArrayVariable = VariableBase & {
|
|
36
|
+
type: "array";
|
|
37
|
+
};
|
|
38
|
+
interface EnumVariable extends VariableBase {
|
|
39
|
+
/** Allow multiple selections (returns `string[]`). */
|
|
40
|
+
multiple?: boolean;
|
|
41
|
+
type: "enum";
|
|
42
|
+
/** Selectable values. */
|
|
43
|
+
values: string[];
|
|
44
|
+
}
|
|
45
|
+
type Variable = ArrayVariable | BooleanVariable | EnumVariable | NumberVariable | StringVariable;
|
|
46
|
+
/** Map of variable name → spec, as authors declare them. */
|
|
47
|
+
type VariableMap = Record<string, Variable>;
|
|
48
|
+
/** Resolved option values passed to `produce()`. */
|
|
49
|
+
type Options = Record<string, unknown>;
|
|
50
|
+
/** A file in a Creation can be a string, a Buffer (binary asset), or a nested directory. */
|
|
51
|
+
type CreationFile = Buffer | string;
|
|
52
|
+
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
|
+
type Script = ScriptObject | string;
|
|
61
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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: "builtin" | "config" | "moon" | "native" | "remote";
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Identity helper for type inference. Authors get autocomplete + checks
|
|
154
|
+
* without having to annotate the export.
|
|
155
|
+
*/
|
|
156
|
+
declare const createTemplate: (template: Template) => Template;
|
|
157
|
+
export { type ArrayVariable, type BooleanVariable, type BuiltinVars, type Creation, type CreationDirectory, type CreationFile, type DiscoveredTemplate, type EnumVariable, type FileMeta, type NumberVariable, type Options, type Script, type ScriptObject, type StringVariable, type Template, type TemplateAbout, type TemplateContext, type Variable, type VariableMap, type VariableType, createTemplate };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=Object.defineProperty;var r=(e,a)=>t(e,"name",{value:a,configurable:!0});var c=Object.defineProperty,l=r((e,a)=>c(e,"name",{value:a,configurable:!0}),"a");const o=l(e=>e,"createTemplate");export{o as createTemplate};
|