@g3nomaly/analyze 0.0.0-stage → 0.1.1
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/LICENSE +95 -0
- package/README.md +76 -2
- package/dist/THIRD_PARTY_LICENSES.txt +1904 -0
- package/dist/api/bundle-builder.d.ts +94 -0
- package/dist/api/bundle-cache.d.ts +73 -0
- package/dist/api/bundle-loader.d.ts +65 -0
- package/dist/api/create-docs.d.ts +91 -0
- package/dist/api/embedding.d.ts +41 -0
- package/dist/api/errors.d.ts +35 -0
- package/dist/api/list.d.ts +106 -0
- package/dist/api/options.d.ts +74 -0
- package/dist/api/refs.d.ts +136 -0
- package/dist/api/scan.d.ts +56 -0
- package/dist/api/search.d.ts +132 -0
- package/dist/api/services.d.ts +15 -0
- package/dist/api/show.d.ts +100 -0
- package/dist/api/site-reader.d.ts +19 -0
- package/dist/api/site-writer.d.ts +43 -0
- package/dist/api/source.d.ts +57 -0
- package/dist/api/target.d.ts +12 -0
- package/dist/api/template.d.ts +5 -0
- package/dist/assets/tree-sitter-c-sharp.wasm +0 -0
- package/dist/assets/tree-sitter-c.wasm +0 -0
- package/dist/assets/tree-sitter-cpp.wasm +0 -0
- package/dist/assets/tree-sitter-go.wasm +0 -0
- package/dist/assets/tree-sitter-java.wasm +0 -0
- package/dist/assets/tree-sitter-javascript.wasm +0 -0
- package/dist/assets/tree-sitter-kotlin.wasm +0 -0
- package/dist/assets/tree-sitter-php.wasm +0 -0
- package/dist/assets/tree-sitter-python.wasm +0 -0
- package/dist/assets/tree-sitter-ruby.wasm +0 -0
- package/dist/assets/tree-sitter-rust.wasm +0 -0
- package/dist/assets/tree-sitter-scala.wasm +0 -0
- package/dist/assets/tree-sitter-tsx.wasm +0 -0
- package/dist/assets/tree-sitter-typescript.wasm +0 -0
- package/dist/assets/vectors.bin +0 -0
- package/dist/assets/vocab.txt +33731 -0
- package/dist/cli.js +9317 -0
- package/dist/embeddings/abbreviations.d.ts +7 -0
- package/dist/embeddings/index-builder.d.ts +12 -0
- package/dist/embeddings/index.d.ts +10 -0
- package/dist/embeddings/model.d.ts +126 -0
- package/dist/embeddings/searcher.d.ts +84 -0
- package/dist/embeddings/vectors.d.ts +77 -0
- package/dist/embeddings/words.d.ts +46 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8747 -0
- package/dist/model/index.d.ts +788 -0
- package/dist/model/registry.d.ts +687 -0
- package/dist/query/graph.d.ts +123 -0
- package/dist/query/index.d.ts +4 -0
- package/dist/query/name-search.d.ts +65 -0
- package/dist/query/semantic.d.ts +38 -0
- package/dist/query/text.d.ts +22 -0
- package/dist/retrieval/describe.d.ts +33 -0
- package/dist/retrieval/filter.d.ts +36 -0
- package/dist/retrieval/index.d.ts +7 -0
- package/dist/retrieval/markdown.d.ts +17 -0
- package/dist/retrieval/report.d.ts +291 -0
- package/dist/retrieval/resolve.d.ts +31 -0
- package/dist/retrieval/retriever.d.ts +105 -0
- package/dist/retrieval/summary.d.ts +27 -0
- package/dist/scanner/code/doc/clean.d.ts +36 -0
- package/dist/scanner/code/doc/index.d.ts +12 -0
- package/dist/scanner/code/doc/markdown.d.ts +8 -0
- package/dist/scanner/code/doc/python.d.ts +8 -0
- package/dist/scanner/code/doc/tagged.d.ts +19 -0
- package/dist/scanner/code/doc/types.d.ts +33 -0
- package/dist/scanner/code/doc/xml.d.ts +8 -0
- package/dist/scanner/code/example.d.ts +57 -0
- package/dist/scanner/code/extract.d.ts +113 -0
- package/dist/scanner/code/grammar.d.ts +44 -0
- package/dist/scanner/code/language.d.ts +183 -0
- package/dist/scanner/code/languages/c-family.d.ts +5 -0
- package/dist/scanner/code/languages/csharp.d.ts +3 -0
- package/dist/scanner/code/languages/ecmascript.d.ts +7 -0
- package/dist/scanner/code/languages/go.d.ts +3 -0
- package/dist/scanner/code/languages/index.d.ts +33 -0
- package/dist/scanner/code/languages/java.d.ts +3 -0
- package/dist/scanner/code/languages/kotlin.d.ts +3 -0
- package/dist/scanner/code/languages/php.d.ts +3 -0
- package/dist/scanner/code/languages/python.d.ts +3 -0
- package/dist/scanner/code/languages/ruby.d.ts +3 -0
- package/dist/scanner/code/languages/rust.d.ts +3 -0
- package/dist/scanner/code/languages/scala.d.ts +3 -0
- package/dist/scanner/code/languages/shared.d.ts +36 -0
- package/dist/scanner/code/planner.d.ts +107 -0
- package/dist/scanner/code/symbols.d.ts +134 -0
- package/dist/scanner/code/types.d.ts +126 -0
- package/dist/scanner/config.d.ts +42 -0
- package/dist/scanner/content.d.ts +73 -0
- package/dist/scanner/decisions/parse.d.ts +37 -0
- package/dist/scanner/decisions/planner.d.ts +42 -0
- package/dist/scanner/docs.d.ts +69 -0
- package/dist/scanner/files.d.ts +85 -0
- package/dist/scanner/glossary/parse.d.ts +40 -0
- package/dist/scanner/glossary/planner.d.ts +49 -0
- package/dist/scanner/glossary/terms.d.ts +116 -0
- package/dist/scanner/graph/builder.d.ts +114 -0
- package/dist/scanner/highlight.d.ts +54 -0
- package/dist/scanner/ignore.d.ts +25 -0
- package/dist/scanner/index.d.ts +43 -0
- package/dist/scanner/markdown/frontmatter.d.ts +24 -0
- package/dist/scanner/markdown/links.d.ts +60 -0
- package/dist/scanner/markdown/outline.d.ts +35 -0
- package/dist/scanner/markdown/renderer.d.ts +63 -0
- package/dist/scanner/openapi/planner.d.ts +96 -0
- package/dist/scanner/packages.d.ts +28 -0
- package/dist/scanner/reporter.d.ts +10 -0
- package/dist/scanner/scanner.d.ts +66 -0
- package/dist/scanner/schema/definitions.d.ts +79 -0
- package/dist/scanner/schema/describe.d.ts +105 -0
- package/dist/scanner/schema/planner.d.ts +49 -0
- package/dist/scanner/schema/registry.d.ts +68 -0
- package/dist/scanner/skills/classify.d.ts +21 -0
- package/dist/scanner/skills/layout.d.ts +46 -0
- package/dist/scanner/skills/planner.d.ts +61 -0
- package/dist/scanner/specs.d.ts +56 -0
- package/dist/scanner/sql/catalog.d.ts +98 -0
- package/dist/scanner/sql/cursor.d.ts +112 -0
- package/dist/scanner/sql/database.d.ts +51 -0
- package/dist/scanner/sql/parse.d.ts +122 -0
- package/dist/scanner/sql/planner.d.ts +69 -0
- package/dist/scanner/sql/query.d.ts +73 -0
- package/dist/scanner/sql/registry.d.ts +63 -0
- package/dist/scanner/sql/source.d.ts +10 -0
- package/dist/scanner/sql/statements.d.ts +42 -0
- package/dist/scanner/sql/tokens.d.ts +51 -0
- package/dist/scanner/tasks/layout.d.ts +52 -0
- package/dist/scanner/tasks/planner.d.ts +130 -0
- package/dist/scanner/tasks/schema.d.ts +88 -0
- package/dist/scanner/text.d.ts +14 -0
- package/package.json +104 -4
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
import * as z from 'zod/mini';
|
|
2
|
+
/**
|
|
3
|
+
* The role a node kind plays in the site.
|
|
4
|
+
* - `section`: a top-level group.
|
|
5
|
+
* - `folder`: a directory.
|
|
6
|
+
* - `file`: a file with a page of its own.
|
|
7
|
+
* - `source`: a source file, a page whose symbols are its entries.
|
|
8
|
+
* - `symbol`: a declaration in code, shown as an entry.
|
|
9
|
+
* - `entry`: any other block on the page of its file, with an anchor of its own.
|
|
10
|
+
* - `member`: a parameter or a field, a row of its entry.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NodeGroupSchema: z.ZodMiniEnum<{
|
|
13
|
+
entry: "entry";
|
|
14
|
+
file: "file";
|
|
15
|
+
folder: "folder";
|
|
16
|
+
member: "member";
|
|
17
|
+
section: "section";
|
|
18
|
+
source: "source";
|
|
19
|
+
symbol: "symbol";
|
|
20
|
+
}>;
|
|
21
|
+
/** One of the roles of {@link NodeGroupSchema}. */
|
|
22
|
+
export type NodeGroup = z.infer<typeof NodeGroupSchema>;
|
|
23
|
+
/** What the registry states about one node kind. */
|
|
24
|
+
export declare const NodeKindSpecSchema: z.ZodMiniObject<{
|
|
25
|
+
label: z.ZodMiniString<string>;
|
|
26
|
+
description: z.ZodMiniString<string>;
|
|
27
|
+
member: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export type NodeKindSpec = z.infer<typeof NodeKindSpecSchema>;
|
|
30
|
+
export declare const NodeTypeSpecSchema: z.ZodMiniObject<{
|
|
31
|
+
kind: z.ZodMiniString<string>;
|
|
32
|
+
group: z.ZodMiniEnum<{
|
|
33
|
+
entry: "entry";
|
|
34
|
+
file: "file";
|
|
35
|
+
folder: "folder";
|
|
36
|
+
member: "member";
|
|
37
|
+
section: "section";
|
|
38
|
+
source: "source";
|
|
39
|
+
symbol: "symbol";
|
|
40
|
+
}>;
|
|
41
|
+
label: z.ZodMiniString<string>;
|
|
42
|
+
description: z.ZodMiniString<string>;
|
|
43
|
+
letter: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
44
|
+
prose: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
45
|
+
typeLike: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
46
|
+
container: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
47
|
+
described: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
/** The parsed spec of one node kind, with defaults filled in. */
|
|
50
|
+
export type NodeTypeSpec = z.infer<typeof NodeTypeSpecSchema>;
|
|
51
|
+
/** What the registry states about one top-level section. */
|
|
52
|
+
export declare const SectionSpecSchema: z.ZodMiniObject<{
|
|
53
|
+
label: z.ZodMiniString<string>;
|
|
54
|
+
description: z.ZodMiniString<string>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
/** The parsed spec of one section. */
|
|
57
|
+
export type SectionSpec = z.infer<typeof SectionSpecSchema>;
|
|
58
|
+
/** What the registry states about a family of relation kinds that the graph draws in one color. */
|
|
59
|
+
export declare const RelationFamilySpecSchema: z.ZodMiniObject<{
|
|
60
|
+
label: z.ZodMiniString<string>;
|
|
61
|
+
description: z.ZodMiniString<string>;
|
|
62
|
+
colorToken: z.ZodMiniString<string>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
/** The parsed spec of one relation family. */
|
|
65
|
+
export type RelationFamilySpec = z.infer<typeof RelationFamilySpecSchema>;
|
|
66
|
+
/** What the registry states about one relation kind: what it means, which way it points and how it is drawn. */
|
|
67
|
+
export declare const RelationKindSpecSchema: z.ZodMiniObject<{
|
|
68
|
+
label: z.ZodMiniString<string>;
|
|
69
|
+
description: z.ZodMiniString<string>;
|
|
70
|
+
forward: z.ZodMiniString<string>;
|
|
71
|
+
backward: z.ZodMiniString<string>;
|
|
72
|
+
from: z.ZodMiniString<string>;
|
|
73
|
+
to: z.ZodMiniString<string>;
|
|
74
|
+
family: z.ZodMiniString<string>;
|
|
75
|
+
dashed: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
/** The parsed spec of one relation kind, with defaults filled in. */
|
|
78
|
+
export type RelationKindSpec = z.infer<typeof RelationKindSpecSchema>;
|
|
79
|
+
/** The top-level sections, in display order. */
|
|
80
|
+
export declare const SECTION_REGISTRY: {
|
|
81
|
+
readonly skills: {
|
|
82
|
+
readonly label: 'Skills';
|
|
83
|
+
readonly description: 'Every `SKILL.md` inside the directory of an AI tool, such as `.claude`, and the files beside it.';
|
|
84
|
+
};
|
|
85
|
+
readonly docs: {
|
|
86
|
+
readonly label: 'Docs';
|
|
87
|
+
readonly description: 'Markdown files.';
|
|
88
|
+
};
|
|
89
|
+
readonly code: {
|
|
90
|
+
readonly label: 'Code';
|
|
91
|
+
readonly description: 'Source files with their classes and functions, and JSON, TOML and YAML files, OpenAPI documents and JSON Schemas among them.';
|
|
92
|
+
};
|
|
93
|
+
readonly database: {
|
|
94
|
+
readonly label: 'Database';
|
|
95
|
+
readonly description: 'SQL files, as schemas with their tables and as query catalogs.';
|
|
96
|
+
};
|
|
97
|
+
readonly tasks: {
|
|
98
|
+
readonly label: 'Tasks';
|
|
99
|
+
readonly description: 'Plans, their phases and their tasks, as task-manager keeps them.';
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Every node kind, in the order filters and legends list them. Each node type of `NODE_TYPE_REGISTRY` belongs to one.
|
|
104
|
+
* A `member` kind is found by search and filters, which return the node it belongs to instead.
|
|
105
|
+
*/
|
|
106
|
+
export declare const NODE_KIND_REGISTRY: {
|
|
107
|
+
readonly folder: {
|
|
108
|
+
readonly label: 'folder';
|
|
109
|
+
readonly description: 'A directory of the repository.';
|
|
110
|
+
};
|
|
111
|
+
readonly package: {
|
|
112
|
+
readonly label: 'package';
|
|
113
|
+
readonly description: 'A directory with a package manifest: an app, a library or a workspace.';
|
|
114
|
+
};
|
|
115
|
+
readonly file: {
|
|
116
|
+
readonly label: 'file';
|
|
117
|
+
readonly description: 'A file: source code, markdown, JSON, TOML, YAML, a skill, a schema, SQL and the rest.';
|
|
118
|
+
};
|
|
119
|
+
readonly namespace: {
|
|
120
|
+
readonly label: 'namespace';
|
|
121
|
+
readonly description: 'A namespace or a module.';
|
|
122
|
+
};
|
|
123
|
+
readonly class: {
|
|
124
|
+
readonly label: 'class';
|
|
125
|
+
readonly description: 'A class.';
|
|
126
|
+
};
|
|
127
|
+
readonly interface: {
|
|
128
|
+
readonly label: 'interface';
|
|
129
|
+
readonly description: 'An interface or a protocol.';
|
|
130
|
+
};
|
|
131
|
+
readonly struct: {
|
|
132
|
+
readonly label: 'struct';
|
|
133
|
+
readonly description: 'A struct or a record.';
|
|
134
|
+
};
|
|
135
|
+
readonly enum: {
|
|
136
|
+
readonly label: 'enum';
|
|
137
|
+
readonly description: 'An enumeration.';
|
|
138
|
+
};
|
|
139
|
+
readonly trait: {
|
|
140
|
+
readonly label: 'trait';
|
|
141
|
+
readonly description: 'A trait or a mixin.';
|
|
142
|
+
};
|
|
143
|
+
readonly type: {
|
|
144
|
+
readonly label: 'type';
|
|
145
|
+
readonly description: 'A type alias.';
|
|
146
|
+
};
|
|
147
|
+
readonly function: {
|
|
148
|
+
readonly label: 'function';
|
|
149
|
+
readonly description: 'A function or a method.';
|
|
150
|
+
};
|
|
151
|
+
readonly term: {
|
|
152
|
+
readonly label: 'term';
|
|
153
|
+
readonly description: 'A word of the project and what it means.';
|
|
154
|
+
};
|
|
155
|
+
readonly decision: {
|
|
156
|
+
readonly label: 'decision';
|
|
157
|
+
readonly description: 'A choice that is costly to undo, with its reason.';
|
|
158
|
+
};
|
|
159
|
+
readonly table: {
|
|
160
|
+
readonly label: 'table';
|
|
161
|
+
readonly description: 'A table of a SQL schema.';
|
|
162
|
+
};
|
|
163
|
+
readonly query: {
|
|
164
|
+
readonly label: 'query';
|
|
165
|
+
readonly description: 'An entry of a SQL query catalog.';
|
|
166
|
+
};
|
|
167
|
+
readonly plan: {
|
|
168
|
+
readonly label: 'plan';
|
|
169
|
+
readonly description: 'A plan of the task tree.';
|
|
170
|
+
};
|
|
171
|
+
readonly phase: {
|
|
172
|
+
readonly label: 'phase';
|
|
173
|
+
readonly description: 'A phase of a plan.';
|
|
174
|
+
};
|
|
175
|
+
readonly task: {
|
|
176
|
+
readonly label: 'task';
|
|
177
|
+
readonly description: 'One unit of work of a phase, with its status.';
|
|
178
|
+
};
|
|
179
|
+
readonly operation: {
|
|
180
|
+
readonly label: 'operation';
|
|
181
|
+
readonly description: 'A method on a path of an API. Found by search, which returns its file.';
|
|
182
|
+
readonly member: true;
|
|
183
|
+
};
|
|
184
|
+
readonly definition: {
|
|
185
|
+
readonly label: 'definition';
|
|
186
|
+
readonly description: 'A named JSON Schema. Found by search, which returns its file.';
|
|
187
|
+
readonly member: true;
|
|
188
|
+
};
|
|
189
|
+
readonly parameter: {
|
|
190
|
+
readonly label: 'parameter';
|
|
191
|
+
readonly description: 'A parameter of a function, an operation or a query. Found by search, which returns its owner.';
|
|
192
|
+
readonly member: true;
|
|
193
|
+
};
|
|
194
|
+
readonly field: {
|
|
195
|
+
readonly label: 'field';
|
|
196
|
+
readonly description: 'A field of a type, a property, a column or a result column. Found by search, which returns its owner.';
|
|
197
|
+
readonly member: true;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Every node type, in the order the site lists them. A node type decides how the scanner reads a node and how
|
|
202
|
+
* its page renders; `kind` names the node kind it belongs to, which is what queries, filters and the graph use.
|
|
203
|
+
*/
|
|
204
|
+
export declare const NODE_TYPE_REGISTRY: {
|
|
205
|
+
readonly section: {
|
|
206
|
+
readonly kind: 'folder';
|
|
207
|
+
readonly group: 'section';
|
|
208
|
+
readonly label: 'section';
|
|
209
|
+
readonly description: 'A top-level group of the site.';
|
|
210
|
+
};
|
|
211
|
+
readonly folder: {
|
|
212
|
+
readonly kind: 'folder';
|
|
213
|
+
readonly group: 'folder';
|
|
214
|
+
readonly label: 'folder';
|
|
215
|
+
readonly description: 'A directory of the repository.';
|
|
216
|
+
};
|
|
217
|
+
readonly package: {
|
|
218
|
+
readonly kind: 'package';
|
|
219
|
+
readonly group: 'folder';
|
|
220
|
+
readonly label: 'package';
|
|
221
|
+
readonly description: 'A directory with a package manifest: an app, a library or a workspace.';
|
|
222
|
+
};
|
|
223
|
+
readonly skill: {
|
|
224
|
+
readonly kind: 'file';
|
|
225
|
+
readonly group: 'file';
|
|
226
|
+
readonly label: 'skill';
|
|
227
|
+
readonly description: 'A `SKILL.md`. The other files of its directory belong to it.';
|
|
228
|
+
};
|
|
229
|
+
readonly reference: {
|
|
230
|
+
readonly kind: 'file';
|
|
231
|
+
readonly group: 'file';
|
|
232
|
+
readonly label: 'reference';
|
|
233
|
+
readonly description: 'A markdown file of a skill.';
|
|
234
|
+
};
|
|
235
|
+
readonly agent: {
|
|
236
|
+
readonly kind: 'file';
|
|
237
|
+
readonly group: 'file';
|
|
238
|
+
readonly label: 'agent';
|
|
239
|
+
readonly description: 'A file in the `agents/` directory of a skill.';
|
|
240
|
+
};
|
|
241
|
+
readonly hook: {
|
|
242
|
+
readonly kind: 'file';
|
|
243
|
+
readonly group: 'file';
|
|
244
|
+
readonly label: 'hook';
|
|
245
|
+
readonly description: 'A file in the `hooks/` directory of a skill.';
|
|
246
|
+
};
|
|
247
|
+
readonly schema: {
|
|
248
|
+
readonly kind: 'file';
|
|
249
|
+
readonly group: 'file';
|
|
250
|
+
readonly label: 'schema';
|
|
251
|
+
readonly description: 'A JSON Schema, or a schema file of a skill.';
|
|
252
|
+
};
|
|
253
|
+
readonly asset: {
|
|
254
|
+
readonly kind: 'file';
|
|
255
|
+
readonly group: 'file';
|
|
256
|
+
readonly label: 'file';
|
|
257
|
+
readonly description: 'Any other file of a skill.';
|
|
258
|
+
};
|
|
259
|
+
readonly document: {
|
|
260
|
+
readonly kind: 'file';
|
|
261
|
+
readonly group: 'file';
|
|
262
|
+
readonly label: 'document';
|
|
263
|
+
readonly description: 'A markdown file.';
|
|
264
|
+
};
|
|
265
|
+
readonly json: {
|
|
266
|
+
readonly kind: 'file';
|
|
267
|
+
readonly group: 'file';
|
|
268
|
+
readonly label: 'JSON';
|
|
269
|
+
readonly description: 'A JSON file.';
|
|
270
|
+
};
|
|
271
|
+
readonly toml: {
|
|
272
|
+
readonly kind: 'file';
|
|
273
|
+
readonly group: 'file';
|
|
274
|
+
readonly label: 'TOML';
|
|
275
|
+
readonly description: 'A TOML file.';
|
|
276
|
+
};
|
|
277
|
+
readonly yaml: {
|
|
278
|
+
readonly kind: 'file';
|
|
279
|
+
readonly group: 'file';
|
|
280
|
+
readonly label: 'YAML';
|
|
281
|
+
readonly description: 'A YAML file.';
|
|
282
|
+
};
|
|
283
|
+
readonly glossary: {
|
|
284
|
+
readonly kind: 'file';
|
|
285
|
+
readonly group: 'file';
|
|
286
|
+
readonly label: 'glossary';
|
|
287
|
+
readonly description: 'A `glossary.md`. Its terms are its entries.';
|
|
288
|
+
};
|
|
289
|
+
readonly decisions: {
|
|
290
|
+
readonly kind: 'file';
|
|
291
|
+
readonly group: 'file';
|
|
292
|
+
readonly label: 'decisions';
|
|
293
|
+
readonly description: 'A `decisions.md`. Its decisions are its entries.';
|
|
294
|
+
};
|
|
295
|
+
readonly api: {
|
|
296
|
+
readonly kind: 'file';
|
|
297
|
+
readonly group: 'file';
|
|
298
|
+
readonly label: 'API';
|
|
299
|
+
readonly description: 'An OpenAPI document. Its operations and definitions are its entries.';
|
|
300
|
+
};
|
|
301
|
+
readonly database: {
|
|
302
|
+
readonly kind: 'file';
|
|
303
|
+
readonly group: 'file';
|
|
304
|
+
readonly label: 'database';
|
|
305
|
+
readonly description: 'A `.sql` file that creates tables. Its tables are its entries.';
|
|
306
|
+
};
|
|
307
|
+
readonly catalog: {
|
|
308
|
+
readonly kind: 'file';
|
|
309
|
+
readonly group: 'file';
|
|
310
|
+
readonly label: 'catalog';
|
|
311
|
+
readonly description: 'A directory of `.sql` files that create no table. Its queries are its entries.';
|
|
312
|
+
};
|
|
313
|
+
readonly plan: {
|
|
314
|
+
readonly kind: 'plan';
|
|
315
|
+
readonly group: 'file';
|
|
316
|
+
readonly label: 'plan';
|
|
317
|
+
readonly description: 'A plan of the task tree. Its phases are its children.';
|
|
318
|
+
};
|
|
319
|
+
readonly phase: {
|
|
320
|
+
readonly kind: 'phase';
|
|
321
|
+
readonly group: 'file';
|
|
322
|
+
readonly label: 'phase';
|
|
323
|
+
readonly description: 'A phase of a plan. Its tasks are its entries.';
|
|
324
|
+
};
|
|
325
|
+
readonly source: {
|
|
326
|
+
readonly kind: 'file';
|
|
327
|
+
readonly group: 'source';
|
|
328
|
+
readonly label: 'code';
|
|
329
|
+
readonly description: 'A source file. Its classes and functions are its entries.';
|
|
330
|
+
};
|
|
331
|
+
readonly namespace: {
|
|
332
|
+
readonly kind: 'namespace';
|
|
333
|
+
readonly group: 'symbol';
|
|
334
|
+
readonly label: 'namespace';
|
|
335
|
+
readonly description: 'A namespace or a module.';
|
|
336
|
+
readonly letter: 'N';
|
|
337
|
+
readonly container: true;
|
|
338
|
+
};
|
|
339
|
+
readonly class: {
|
|
340
|
+
readonly kind: 'class';
|
|
341
|
+
readonly group: 'symbol';
|
|
342
|
+
readonly label: 'class';
|
|
343
|
+
readonly description: 'A class.';
|
|
344
|
+
readonly letter: 'C';
|
|
345
|
+
readonly typeLike: true;
|
|
346
|
+
readonly container: true;
|
|
347
|
+
};
|
|
348
|
+
readonly interface: {
|
|
349
|
+
readonly kind: 'interface';
|
|
350
|
+
readonly group: 'symbol';
|
|
351
|
+
readonly label: 'interface';
|
|
352
|
+
readonly description: 'An interface or a protocol.';
|
|
353
|
+
readonly letter: 'I';
|
|
354
|
+
readonly typeLike: true;
|
|
355
|
+
readonly container: true;
|
|
356
|
+
};
|
|
357
|
+
readonly struct: {
|
|
358
|
+
readonly kind: 'struct';
|
|
359
|
+
readonly group: 'symbol';
|
|
360
|
+
readonly label: 'struct';
|
|
361
|
+
readonly description: 'A struct or a record.';
|
|
362
|
+
readonly letter: 'S';
|
|
363
|
+
readonly typeLike: true;
|
|
364
|
+
readonly container: true;
|
|
365
|
+
};
|
|
366
|
+
readonly enum: {
|
|
367
|
+
readonly kind: 'enum';
|
|
368
|
+
readonly group: 'symbol';
|
|
369
|
+
readonly label: 'enum';
|
|
370
|
+
readonly description: 'An enumeration.';
|
|
371
|
+
readonly letter: 'E';
|
|
372
|
+
readonly typeLike: true;
|
|
373
|
+
readonly container: true;
|
|
374
|
+
};
|
|
375
|
+
readonly trait: {
|
|
376
|
+
readonly kind: 'trait';
|
|
377
|
+
readonly group: 'symbol';
|
|
378
|
+
readonly label: 'trait';
|
|
379
|
+
readonly description: 'A trait or a mixin.';
|
|
380
|
+
readonly letter: 'T';
|
|
381
|
+
readonly typeLike: true;
|
|
382
|
+
readonly container: true;
|
|
383
|
+
};
|
|
384
|
+
readonly type: {
|
|
385
|
+
readonly kind: 'type';
|
|
386
|
+
readonly group: 'symbol';
|
|
387
|
+
readonly label: 'type';
|
|
388
|
+
readonly description: 'A type alias.';
|
|
389
|
+
readonly letter: 'T';
|
|
390
|
+
readonly typeLike: true;
|
|
391
|
+
readonly container: true;
|
|
392
|
+
};
|
|
393
|
+
readonly function: {
|
|
394
|
+
readonly kind: 'function';
|
|
395
|
+
readonly group: 'symbol';
|
|
396
|
+
readonly label: 'function';
|
|
397
|
+
readonly description: 'A function.';
|
|
398
|
+
readonly letter: 'F';
|
|
399
|
+
};
|
|
400
|
+
readonly method: {
|
|
401
|
+
readonly kind: 'function';
|
|
402
|
+
readonly group: 'symbol';
|
|
403
|
+
readonly label: 'method';
|
|
404
|
+
readonly description: 'A method of a type.';
|
|
405
|
+
readonly letter: 'M';
|
|
406
|
+
};
|
|
407
|
+
readonly term: {
|
|
408
|
+
readonly kind: 'term';
|
|
409
|
+
readonly group: 'entry';
|
|
410
|
+
readonly label: 'term';
|
|
411
|
+
readonly description: 'A word of the project and what it means.';
|
|
412
|
+
readonly prose: true;
|
|
413
|
+
};
|
|
414
|
+
readonly decision: {
|
|
415
|
+
readonly kind: 'decision';
|
|
416
|
+
readonly group: 'entry';
|
|
417
|
+
readonly label: 'decision';
|
|
418
|
+
readonly description: 'A choice that is costly to undo, with its reason.';
|
|
419
|
+
readonly prose: true;
|
|
420
|
+
};
|
|
421
|
+
readonly operation: {
|
|
422
|
+
readonly kind: 'operation';
|
|
423
|
+
readonly group: 'entry';
|
|
424
|
+
readonly label: 'operation';
|
|
425
|
+
readonly description: 'A method on a path of an API.';
|
|
426
|
+
readonly described: true;
|
|
427
|
+
};
|
|
428
|
+
readonly definition: {
|
|
429
|
+
readonly kind: 'definition';
|
|
430
|
+
readonly group: 'entry';
|
|
431
|
+
readonly label: 'definition';
|
|
432
|
+
readonly description: 'A named JSON Schema.';
|
|
433
|
+
readonly described: true;
|
|
434
|
+
};
|
|
435
|
+
readonly table: {
|
|
436
|
+
readonly kind: 'table';
|
|
437
|
+
readonly group: 'entry';
|
|
438
|
+
readonly label: 'table';
|
|
439
|
+
readonly description: 'A table of a SQL schema.';
|
|
440
|
+
readonly described: true;
|
|
441
|
+
};
|
|
442
|
+
readonly query: {
|
|
443
|
+
readonly kind: 'query';
|
|
444
|
+
readonly group: 'entry';
|
|
445
|
+
readonly label: 'query';
|
|
446
|
+
readonly description: 'An entry of a SQL query catalog.';
|
|
447
|
+
readonly described: true;
|
|
448
|
+
};
|
|
449
|
+
readonly task: {
|
|
450
|
+
readonly kind: 'task';
|
|
451
|
+
readonly group: 'entry';
|
|
452
|
+
readonly label: 'task';
|
|
453
|
+
readonly description: 'One unit of work of a phase, with its status.';
|
|
454
|
+
readonly prose: true;
|
|
455
|
+
};
|
|
456
|
+
readonly parameter: {
|
|
457
|
+
readonly kind: 'parameter';
|
|
458
|
+
readonly group: 'member';
|
|
459
|
+
readonly label: 'parameter';
|
|
460
|
+
readonly description: 'A parameter of a function, an operation or a query.';
|
|
461
|
+
};
|
|
462
|
+
readonly field: {
|
|
463
|
+
readonly kind: 'field';
|
|
464
|
+
readonly group: 'member';
|
|
465
|
+
readonly label: 'field';
|
|
466
|
+
readonly description: 'A field of a type, a property, a column or a result column.';
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
/** The relation families, in legend order. */
|
|
470
|
+
export declare const RELATION_FAMILY_REGISTRY: {
|
|
471
|
+
readonly typing: {
|
|
472
|
+
readonly label: 'typing';
|
|
473
|
+
readonly description: 'What a declaration is made of.';
|
|
474
|
+
readonly colorToken: '--edge-typing';
|
|
475
|
+
};
|
|
476
|
+
readonly result: {
|
|
477
|
+
readonly label: 'result';
|
|
478
|
+
readonly description: 'What a call gives back.';
|
|
479
|
+
readonly colorToken: '--edge-result';
|
|
480
|
+
};
|
|
481
|
+
readonly prose: {
|
|
482
|
+
readonly label: 'prose';
|
|
483
|
+
readonly description: 'What a text points at.';
|
|
484
|
+
readonly colorToken: '--edge-prose';
|
|
485
|
+
};
|
|
486
|
+
readonly term: {
|
|
487
|
+
readonly label: 'term';
|
|
488
|
+
readonly description: 'A text that uses a glossary term.';
|
|
489
|
+
readonly colorToken: '--edge-term';
|
|
490
|
+
};
|
|
491
|
+
readonly key: {
|
|
492
|
+
readonly label: 'key';
|
|
493
|
+
readonly description: 'A foreign key between two tables.';
|
|
494
|
+
readonly colorToken: '--edge-key';
|
|
495
|
+
};
|
|
496
|
+
readonly query: {
|
|
497
|
+
readonly label: 'query';
|
|
498
|
+
readonly description: 'A table a query reads or writes.';
|
|
499
|
+
readonly colorToken: '--edge-query';
|
|
500
|
+
};
|
|
501
|
+
readonly task: {
|
|
502
|
+
readonly label: 'task';
|
|
503
|
+
readonly description: 'What a task names, and what it waits for.';
|
|
504
|
+
readonly colorToken: '--edge-task';
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
/** Every relation kind other than `parent`, in the order the site lists them. */
|
|
508
|
+
export declare const RELATION_KIND_REGISTRY: {
|
|
509
|
+
readonly type: {
|
|
510
|
+
readonly label: 'type';
|
|
511
|
+
readonly description: 'A parameter or field has that type, or the request body of an operation has that schema.';
|
|
512
|
+
readonly forward: 'has type';
|
|
513
|
+
readonly backward: 'is the type of';
|
|
514
|
+
readonly from: 'parameter, field, property or operation';
|
|
515
|
+
readonly to: 'type or definition';
|
|
516
|
+
readonly family: 'typing';
|
|
517
|
+
};
|
|
518
|
+
readonly returns: {
|
|
519
|
+
readonly label: 'returns';
|
|
520
|
+
readonly description: 'A function returns that type, or an operation answers with that schema.';
|
|
521
|
+
readonly forward: 'returns';
|
|
522
|
+
readonly backward: 'is returned by';
|
|
523
|
+
readonly from: 'function, method or operation';
|
|
524
|
+
readonly to: 'type or definition';
|
|
525
|
+
readonly family: 'result';
|
|
526
|
+
};
|
|
527
|
+
readonly throws: {
|
|
528
|
+
readonly label: 'throws';
|
|
529
|
+
readonly description: 'A function throws that type, or an operation answers an error with that schema.';
|
|
530
|
+
readonly forward: 'throws';
|
|
531
|
+
readonly backward: 'is thrown by';
|
|
532
|
+
readonly from: 'function, method or operation';
|
|
533
|
+
readonly to: 'type or definition';
|
|
534
|
+
readonly family: 'result';
|
|
535
|
+
readonly dashed: true;
|
|
536
|
+
};
|
|
537
|
+
readonly extends: {
|
|
538
|
+
readonly label: 'extends';
|
|
539
|
+
readonly description: 'A type extends, implements or is composed of that type.';
|
|
540
|
+
readonly forward: 'extends';
|
|
541
|
+
readonly backward: 'is extended by';
|
|
542
|
+
readonly from: 'type or definition';
|
|
543
|
+
readonly to: 'type or definition';
|
|
544
|
+
readonly family: 'typing';
|
|
545
|
+
readonly dashed: true;
|
|
546
|
+
};
|
|
547
|
+
readonly mentions: {
|
|
548
|
+
readonly label: 'mentions';
|
|
549
|
+
readonly description: 'A page or a description links to that node.';
|
|
550
|
+
readonly forward: 'mentions';
|
|
551
|
+
readonly backward: 'is mentioned by';
|
|
552
|
+
readonly from: 'page or entry';
|
|
553
|
+
readonly to: 'any node';
|
|
554
|
+
readonly family: 'prose';
|
|
555
|
+
};
|
|
556
|
+
readonly uses: {
|
|
557
|
+
readonly label: 'uses';
|
|
558
|
+
readonly description: 'A page, a description or a decision uses that glossary term.';
|
|
559
|
+
readonly forward: 'uses';
|
|
560
|
+
readonly backward: 'is used by';
|
|
561
|
+
readonly from: 'page, entry, parameter or field';
|
|
562
|
+
readonly to: 'term';
|
|
563
|
+
readonly family: 'term';
|
|
564
|
+
};
|
|
565
|
+
readonly affects: {
|
|
566
|
+
readonly label: 'affects';
|
|
567
|
+
readonly description: 'A decision is about that node.';
|
|
568
|
+
readonly forward: 'affects';
|
|
569
|
+
readonly backward: 'is affected by';
|
|
570
|
+
readonly from: 'decision';
|
|
571
|
+
readonly to: 'any node';
|
|
572
|
+
readonly family: 'prose';
|
|
573
|
+
readonly dashed: true;
|
|
574
|
+
};
|
|
575
|
+
readonly references: {
|
|
576
|
+
readonly label: 'references';
|
|
577
|
+
readonly description: 'A table has a foreign key to that table.';
|
|
578
|
+
readonly forward: 'references';
|
|
579
|
+
readonly backward: 'is referenced by';
|
|
580
|
+
readonly from: 'table';
|
|
581
|
+
readonly to: 'table';
|
|
582
|
+
readonly family: 'key';
|
|
583
|
+
};
|
|
584
|
+
readonly reads: {
|
|
585
|
+
readonly label: 'reads';
|
|
586
|
+
readonly description: 'A query selects from that table.';
|
|
587
|
+
readonly forward: 'reads';
|
|
588
|
+
readonly backward: 'is read by';
|
|
589
|
+
readonly from: 'query';
|
|
590
|
+
readonly to: 'table';
|
|
591
|
+
readonly family: 'query';
|
|
592
|
+
};
|
|
593
|
+
readonly writes: {
|
|
594
|
+
readonly label: 'writes';
|
|
595
|
+
readonly description: 'A statement inserts into, updates or deletes from that table.';
|
|
596
|
+
readonly forward: 'writes';
|
|
597
|
+
readonly backward: 'is written by';
|
|
598
|
+
readonly from: 'query';
|
|
599
|
+
readonly to: 'table';
|
|
600
|
+
readonly family: 'query';
|
|
601
|
+
readonly dashed: true;
|
|
602
|
+
};
|
|
603
|
+
readonly names: {
|
|
604
|
+
readonly label: 'names';
|
|
605
|
+
readonly description: 'A plan, a phase or a task links to that node or names it in inline code.';
|
|
606
|
+
readonly forward: 'names';
|
|
607
|
+
readonly backward: 'is named by';
|
|
608
|
+
readonly from: 'plan, phase or task';
|
|
609
|
+
readonly to: 'any node';
|
|
610
|
+
readonly family: 'task';
|
|
611
|
+
};
|
|
612
|
+
readonly depends: {
|
|
613
|
+
readonly label: 'depends';
|
|
614
|
+
readonly description: 'A plan, a phase or a task waits for that one to be completed.';
|
|
615
|
+
readonly forward: 'depends on';
|
|
616
|
+
readonly backward: 'is depended on by';
|
|
617
|
+
readonly from: 'plan, phase or task';
|
|
618
|
+
readonly to: 'plan, phase or task';
|
|
619
|
+
readonly family: 'task';
|
|
620
|
+
readonly dashed: true;
|
|
621
|
+
};
|
|
622
|
+
};
|
|
623
|
+
/** Slug of a top-level section, such as `code`. */
|
|
624
|
+
export type Section = keyof typeof SECTION_REGISTRY;
|
|
625
|
+
/** Type of a node, such as `method`, `api` or `table`. Decides how the scanner reads it and how its page renders. */
|
|
626
|
+
export type NodeType = keyof typeof NODE_TYPE_REGISTRY;
|
|
627
|
+
/** Kind of a node, such as `function`, `file` or `table`. What queries, filters and the graph use. */
|
|
628
|
+
export type NodeKind = keyof typeof NODE_KIND_REGISTRY;
|
|
629
|
+
/** Name of a relation family, such as `typing`. */
|
|
630
|
+
export type RelationFamily = keyof typeof RELATION_FAMILY_REGISTRY;
|
|
631
|
+
/** Kind of an edge: any relation kind other than `parent`. */
|
|
632
|
+
export type EdgeKind = keyof typeof RELATION_KIND_REGISTRY;
|
|
633
|
+
/** The node kinds whose group is one of `G`. */
|
|
634
|
+
export type KindsIn<G extends NodeGroup> = {
|
|
635
|
+
[K in NodeType]: (typeof NODE_TYPE_REGISTRY)[K]['group'] extends G ? K : never;
|
|
636
|
+
}[NodeType];
|
|
637
|
+
/** Every node kind with its parsed spec. */
|
|
638
|
+
export declare const NODE_TYPES: Readonly<Record<NodeType, NodeTypeSpec & {
|
|
639
|
+
kind: NodeKind;
|
|
640
|
+
}>>;
|
|
641
|
+
/** Every node kind with its parsed spec. */
|
|
642
|
+
export declare const NODE_KINDS: Readonly<Record<NodeKind, NodeKindSpec>>;
|
|
643
|
+
/** Every section with its parsed spec. */
|
|
644
|
+
export declare const SECTION_SPECS: Readonly<Record<Section, SectionSpec>>;
|
|
645
|
+
/** Every relation family with its parsed spec. */
|
|
646
|
+
export declare const RELATION_FAMILIES: Readonly<Record<RelationFamily, RelationFamilySpec>>;
|
|
647
|
+
/** Every relation kind with its parsed spec. */
|
|
648
|
+
export declare const RELATION_KINDS: Readonly<Record<EdgeKind, RelationKindSpec & {
|
|
649
|
+
family: RelationFamily;
|
|
650
|
+
}>>;
|
|
651
|
+
/** The sections, in display order. */
|
|
652
|
+
export declare const SECTIONS: readonly Section[];
|
|
653
|
+
/** Every node type, in registry order. */
|
|
654
|
+
export declare const ALL_NODE_TYPES: readonly NodeType[];
|
|
655
|
+
/** Every node kind, in registry order. */
|
|
656
|
+
export declare const ALL_NODE_KINDS: readonly NodeKind[];
|
|
657
|
+
/**
|
|
658
|
+
* @brief Names the node kind a node type belongs to.
|
|
659
|
+
*
|
|
660
|
+
* @param type - Type of a node, such as `method`.
|
|
661
|
+
* @returns Its kind, such as `function`.
|
|
662
|
+
*/
|
|
663
|
+
export declare function kindOf(type: NodeType): NodeKind;
|
|
664
|
+
/**
|
|
665
|
+
* @brief Tells whether a node kind is a member kind: found by search and filters, which return the node it belongs to.
|
|
666
|
+
*
|
|
667
|
+
* @param kind - Kind of a node, such as `field`.
|
|
668
|
+
*/
|
|
669
|
+
export declare function isMemberKind(kind: NodeKind): boolean;
|
|
670
|
+
/** Every relation kind, in registry order. */
|
|
671
|
+
export declare const EDGE_KINDS: readonly EdgeKind[];
|
|
672
|
+
/** Every relation family, in legend order. */
|
|
673
|
+
export declare const RELATION_FAMILY_NAMES: readonly RelationFamily[];
|
|
674
|
+
/**
|
|
675
|
+
* Lists the node kinds whose group is one of `groups`, in registry order.
|
|
676
|
+
*
|
|
677
|
+
* @param groups - Groups to keep, such as `symbol` or `entry`.
|
|
678
|
+
* @returns The kinds of those groups.
|
|
679
|
+
*/
|
|
680
|
+
export declare function kindsIn<G extends NodeGroup>(...groups: readonly G[]): readonly KindsIn<G>[];
|
|
681
|
+
/**
|
|
682
|
+
* Lists the node kinds for which a flag of the registry is set.
|
|
683
|
+
*
|
|
684
|
+
* @param flag - Flag of the node kind spec to test.
|
|
685
|
+
* @returns The kinds whose flag is set.
|
|
686
|
+
*/
|
|
687
|
+
export declare function kindsWith(flag: 'typeLike' | 'container' | 'described'): ReadonlySet<NodeType>;
|