@driftsys/markspec 0.11.0 → 0.12.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/README.md +9 -0
- package/esm/ast/normalize.d.ts +4 -5
- package/esm/ast/normalize.d.ts.map +1 -1
- package/esm/ast/normalize.js +6 -37
- package/esm/collect/mod.d.ts +29 -9
- package/esm/collect/mod.d.ts.map +1 -1
- package/esm/collect/mod.js +36 -10
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +2 -6
- package/esm/config/markspec.d.ts +5 -3
- package/esm/config/markspec.d.ts.map +1 -1
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +47 -5
- package/esm/discovery/mod.d.ts +24 -8
- package/esm/discovery/mod.d.ts.map +1 -1
- package/esm/discovery/mod.js +57 -21
- package/esm/discovery/projects.d.ts +111 -0
- package/esm/discovery/projects.d.ts.map +1 -0
- package/esm/discovery/projects.js +242 -0
- package/esm/formatter/entry_body.d.ts +84 -0
- package/esm/formatter/entry_body.d.ts.map +1 -0
- package/esm/formatter/entry_body.js +291 -0
- package/esm/formatter/md_equiv.d.ts +6 -5
- package/esm/formatter/md_equiv.d.ts.map +1 -1
- package/esm/formatter/md_equiv.js +6 -5
- package/esm/formatter/mod.d.ts +16 -9
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +327 -53
- package/esm/formatter/tab_markers.d.ts +15 -0
- package/esm/formatter/tab_markers.d.ts.map +1 -0
- package/esm/formatter/tab_markers.js +133 -0
- package/esm/gates/mod.d.ts.map +1 -1
- package/esm/gates/mod.js +6 -5
- package/esm/lint/runner.d.ts.map +1 -1
- package/esm/lint/runner.js +4 -4
- package/esm/lock/check.d.ts.map +1 -1
- package/esm/lock/check.js +2 -1
- package/esm/lock/edge_drift.d.ts +2 -0
- package/esm/lock/edge_drift.d.ts.map +1 -1
- package/esm/lock/edge_drift.js +4 -0
- package/esm/lock/mod.d.ts +1 -1
- package/esm/lock/mod.d.ts.map +1 -1
- package/esm/lock/mod.js +1 -1
- package/esm/lock/upstream_deps.js +1 -1
- package/esm/mod.d.ts +11 -6
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +9 -6
- package/esm/model/mod.d.ts +22 -1
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +10 -0
- package/esm/parser/code_regions.d.ts +29 -0
- package/esm/parser/code_regions.d.ts.map +1 -0
- package/esm/parser/code_regions.js +38 -0
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +103 -40
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +7 -1
- package/esm/parser/translate.d.ts.map +1 -1
- package/esm/parser/translate.js +5 -0
- package/esm/refs/mod.d.ts +6 -2
- package/esm/refs/mod.d.ts.map +1 -1
- package/esm/refs/mod.js +15 -21
- package/esm/reporter/mod.d.ts.map +1 -1
- package/esm/reporter/mod.js +2 -2
- package/esm/sync/mapping.d.ts +4 -3
- package/esm/sync/mapping.d.ts.map +1 -1
- package/esm/sync/mapping.js +52 -9
- package/esm/util/display_id.d.ts +20 -0
- package/esm/util/display_id.d.ts.map +1 -0
- package/esm/util/display_id.js +19 -0
- package/esm/util/fence.d.ts +20 -29
- package/esm/util/fence.d.ts.map +1 -1
- package/esm/util/fence.js +42 -50
- package/esm/util/modals.d.ts +6 -0
- package/esm/util/modals.d.ts.map +1 -1
- package/esm/util/modals.js +37 -0
- package/esm/validator/body_blocks.d.ts +2 -1
- package/esm/validator/body_blocks.d.ts.map +1 -1
- package/esm/validator/body_blocks.js +80 -2
- package/esm/validator/corpus.d.ts +6 -0
- package/esm/validator/corpus.d.ts.map +1 -1
- package/esm/validator/corpus.js +16 -4
- package/esm/validator/mod.d.ts +1 -1
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +1 -1
- package/esm/validator/pipeline.d.ts +6 -4
- package/esm/validator/pipeline.d.ts.map +1 -1
- package/esm/validator/pipeline.js +24 -19
- package/package.json +1 -1
- package/script/ast/normalize.d.ts +4 -5
- package/script/ast/normalize.d.ts.map +1 -1
- package/script/ast/normalize.js +5 -36
- package/script/collect/mod.d.ts +29 -9
- package/script/collect/mod.d.ts.map +1 -1
- package/script/collect/mod.js +38 -10
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +1 -5
- package/script/config/markspec.d.ts +5 -3
- package/script/config/markspec.d.ts.map +1 -1
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +47 -5
- package/script/discovery/mod.d.ts +24 -8
- package/script/discovery/mod.d.ts.map +1 -1
- package/script/discovery/mod.js +56 -20
- package/script/discovery/projects.d.ts +111 -0
- package/script/discovery/projects.d.ts.map +1 -0
- package/script/discovery/projects.js +250 -0
- package/script/formatter/entry_body.d.ts +84 -0
- package/script/formatter/entry_body.d.ts.map +1 -0
- package/script/formatter/entry_body.js +296 -0
- package/script/formatter/md_equiv.d.ts +6 -5
- package/script/formatter/md_equiv.d.ts.map +1 -1
- package/script/formatter/md_equiv.js +6 -5
- package/script/formatter/mod.d.ts +16 -9
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +324 -50
- package/script/formatter/tab_markers.d.ts +15 -0
- package/script/formatter/tab_markers.d.ts.map +1 -0
- package/script/formatter/tab_markers.js +141 -0
- package/script/gates/mod.d.ts.map +1 -1
- package/script/gates/mod.js +15 -14
- package/script/lint/runner.d.ts.map +1 -1
- package/script/lint/runner.js +3 -3
- package/script/lock/check.d.ts.map +1 -1
- package/script/lock/check.js +2 -1
- package/script/lock/edge_drift.d.ts +2 -0
- package/script/lock/edge_drift.d.ts.map +1 -1
- package/script/lock/edge_drift.js +5 -0
- package/script/lock/mod.d.ts +1 -1
- package/script/lock/mod.d.ts.map +1 -1
- package/script/lock/mod.js +2 -1
- package/script/lock/upstream_deps.js +1 -1
- package/script/mod.d.ts +11 -6
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +23 -5
- package/script/model/mod.d.ts +22 -1
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +11 -0
- package/script/parser/code_regions.d.ts +29 -0
- package/script/parser/code_regions.d.ts.map +1 -0
- package/script/parser/code_regions.js +41 -0
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +102 -39
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +7 -1
- package/script/parser/translate.d.ts.map +1 -1
- package/script/parser/translate.js +5 -0
- package/script/refs/mod.d.ts +6 -2
- package/script/refs/mod.d.ts.map +1 -1
- package/script/refs/mod.js +14 -20
- package/script/reporter/mod.d.ts.map +1 -1
- package/script/reporter/mod.js +1 -1
- package/script/sync/mapping.d.ts +4 -3
- package/script/sync/mapping.d.ts.map +1 -1
- package/script/sync/mapping.js +52 -9
- package/script/util/display_id.d.ts +20 -0
- package/script/util/display_id.d.ts.map +1 -0
- package/script/util/display_id.js +22 -0
- package/script/util/fence.d.ts +20 -29
- package/script/util/fence.d.ts.map +1 -1
- package/script/util/fence.js +47 -54
- package/script/util/modals.d.ts +6 -0
- package/script/util/modals.d.ts.map +1 -1
- package/script/util/modals.js +38 -0
- package/script/validator/body_blocks.d.ts +2 -1
- package/script/validator/body_blocks.d.ts.map +1 -1
- package/script/validator/body_blocks.js +80 -2
- package/script/validator/corpus.d.ts +6 -0
- package/script/validator/corpus.d.ts.map +1 -1
- package/script/validator/corpus.js +16 -3
- package/script/validator/mod.d.ts +1 -1
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +2 -1
- package/script/validator/pipeline.d.ts +6 -4
- package/script/validator/pipeline.d.ts.map +1 -1
- package/script/validator/pipeline.js +24 -19
package/script/discovery/mod.js
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* @module core/discovery
|
|
4
4
|
*
|
|
5
|
-
* Gitignore-aware project file discovery
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* root, honoring (in
|
|
5
|
+
* Gitignore-aware project file discovery shared by CLI scope resolution,
|
|
6
|
+
* LSP indexing, lockfile entry collection and nested-project discovery.
|
|
7
|
+
* Yields absolute paths of MarkSpec-relevant files under a
|
|
8
|
+
* root, unconditionally skipping hidden directories and honoring (in
|
|
9
|
+
* precedence order):
|
|
9
10
|
*
|
|
10
|
-
* 1. built-in skips —
|
|
11
|
-
* 2. `.gitignore` files (root + nested, standard semantics)
|
|
12
|
-
*
|
|
11
|
+
* 1. built-in skips — common build-output directories
|
|
12
|
+
* 2. `.gitignore` files (root + nested, standard semantics), plus, when
|
|
13
|
+
* the caller names an enclosing folder, the `.gitignore` files of the
|
|
14
|
+
* folders from that folder down to the root's parent
|
|
15
|
+
* 3. caller-supplied `exclude` patterns (gitignore syntax, root-anchored),
|
|
16
|
+
* applied last at every directory level, including for negations
|
|
13
17
|
*
|
|
14
18
|
* I/O is injected via {@linkcode DiscoveryIO} so the module stays
|
|
15
19
|
* Node-compatible; entry points supply the Deno implementation.
|
|
@@ -64,9 +68,9 @@ exports.RELEVANT_EXTENSIONS = new Set([
|
|
|
64
68
|
* indexing, spurious `MSL-L212` edge-hash entries).
|
|
65
69
|
*
|
|
66
70
|
* Unlike the hidden-dir skip these are overridable: they are applied as the
|
|
67
|
-
*
|
|
68
|
-
* negated `!target/` entry in either re-includes
|
|
69
|
-
* last-match-wins.
|
|
71
|
+
* lowest-precedence rule layer (before `.gitignore` and `exclude:`), so a
|
|
72
|
+
* negated `!target/` entry in either re-includes that directory under
|
|
73
|
+
* gitignore last-match-wins.
|
|
70
74
|
*/
|
|
71
75
|
const BUILTIN_SKIP_DIRS = [
|
|
72
76
|
"node_modules",
|
|
@@ -84,19 +88,51 @@ const BUILTIN_SKIP_RULES = (0, gitignore_js_1.parseGitignore)(BUILTIN_SKIP_DIRS.
|
|
|
84
88
|
*/
|
|
85
89
|
async function* discoverFiles(root, io, options = {}) {
|
|
86
90
|
const extensions = options.extensions ?? exports.RELEVANT_EXTENSIONS;
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
91
|
+
const inherited = options.inheritGitignoreFrom === undefined
|
|
92
|
+
? { rules: [], prefix: "" }
|
|
93
|
+
: await inheritedGitignoreRules(options.inheritGitignoreFrom, root, io);
|
|
94
|
+
// With inherited rules, every rule is matched against paths relative to
|
|
95
|
+
// the enclosing folder, so `prefix` is the path from it down to `root`.
|
|
96
|
+
const prefix = inherited.prefix;
|
|
97
|
+
const excludeRules = (0, gitignore_js_1.parseGitignore)((options.exclude ?? []).join("\n"), prefix);
|
|
98
|
+
// Carry excludes separately: they must stay after every `.gitignore`,
|
|
99
|
+
// including ones loaded deeper in the walk.
|
|
100
|
+
yield* walk(root, prefix, [...BUILTIN_SKIP_RULES, ...inherited.rules], excludeRules, io, extensions);
|
|
92
101
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Collect the `.gitignore` rules of the folders from `from` down to the
|
|
104
|
+
* parent of `root`, outermost first, each anchored to its own folder.
|
|
105
|
+
* Returns them with the POSIX path from `from` down to `root`. Returns no
|
|
106
|
+
* rules and an empty path when `from` is not a strict ancestor of `root`.
|
|
107
|
+
*/
|
|
108
|
+
async function inheritedGitignoreRules(from, root, io) {
|
|
109
|
+
const rel = (0, path_1.relative)((0, path_1.resolve)(from), (0, path_1.resolve)(root));
|
|
110
|
+
if (rel === "" || rel === ".." || rel.startsWith(`..${path_1.SEPARATOR}`)) {
|
|
111
|
+
return { rules: [], prefix: "" };
|
|
112
|
+
}
|
|
113
|
+
const segments = rel.split(path_1.SEPARATOR);
|
|
114
|
+
const rules = [];
|
|
115
|
+
for (let i = 0; i < segments.length; i++) {
|
|
116
|
+
const raw = await io.readFile((0, path_1.join)(from, ...segments.slice(0, i), ".gitignore"));
|
|
117
|
+
if (raw === undefined || raw.length === 0)
|
|
118
|
+
continue;
|
|
119
|
+
rules.push(...(0, gitignore_js_1.parseGitignore)(raw, segments.slice(0, i).join("/")));
|
|
120
|
+
}
|
|
121
|
+
return { rules, prefix: segments.join("/") };
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Walk `absDir`. `relDir` is the POSIX path of `absDir` relative to the
|
|
125
|
+
* folder the rules are anchored at (the enclosing folder when rules are
|
|
126
|
+
* inherited, else the walk root); `""` for that folder itself.
|
|
127
|
+
*/
|
|
128
|
+
async function* walk(absDir, relDir, rules, excludeRules, io, extensions) {
|
|
129
|
+
// Deeper `.gitignore` rules win over inherited ones. Excludes stay last
|
|
130
|
+
// for this directory's decisions, but are not inherited as gitignore rules.
|
|
96
131
|
const raw = await io.readFile((0, path_1.join)(absDir, ".gitignore"));
|
|
97
|
-
const
|
|
132
|
+
const gitignoreRules = raw !== undefined && raw.length > 0
|
|
98
133
|
? [...rules, ...(0, gitignore_js_1.parseGitignore)(raw, relDir)]
|
|
99
134
|
: rules;
|
|
135
|
+
const active = [...gitignoreRules, ...excludeRules];
|
|
100
136
|
const entries = [];
|
|
101
137
|
try {
|
|
102
138
|
for await (const e of io.readDir(absDir))
|
|
@@ -115,7 +151,7 @@ async function* walk(absDir, relDir, rules, io, extensions) {
|
|
|
115
151
|
// re-included, so pruning here is correct (and fast).
|
|
116
152
|
if ((0, gitignore_js_1.isIgnored)(rel, true, active))
|
|
117
153
|
continue;
|
|
118
|
-
yield* walk((0, path_1.join)(absDir, entry.name), rel,
|
|
154
|
+
yield* walk((0, path_1.join)(absDir, entry.name), rel, gitignoreRules, excludeRules, io, extensions);
|
|
119
155
|
}
|
|
120
156
|
else if (entry.isFile) {
|
|
121
157
|
if (!extensions.has((0, path_1.extname)(entry.name).toLowerCase()))
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/discovery/projects
|
|
3
|
+
*
|
|
4
|
+
* Project-root discovery shared by the CLI, the LSP and the MCP server.
|
|
5
|
+
*
|
|
6
|
+
* A "project root" is a directory that holds a `project.yaml` or a
|
|
7
|
+
* `.markspec.yaml`. {@linkcode discoverProjectRoots} finds the primary
|
|
8
|
+
* root by walking up from a start folder, then every nested root below
|
|
9
|
+
* it with the gitignore-aware file walk.
|
|
10
|
+
*/
|
|
11
|
+
import { type DiscoveryIO } from "./mod.js";
|
|
12
|
+
/** `true` when `path` is `root` itself or lies below it. */
|
|
13
|
+
export declare function isWithin(root: string, path: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Return the deepest root in `roots` that is `dir` itself or an ancestor
|
|
16
|
+
* of `dir`, or `undefined` when none is.
|
|
17
|
+
*/
|
|
18
|
+
export declare function nearestRoot(dir: string, roots: Iterable<string>): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Walk up from `startDir` to the nearest `project.yaml`, else the nearest
|
|
21
|
+
* `.markspec.yaml`. Returns `undefined` when neither exists.
|
|
22
|
+
*
|
|
23
|
+
* The LSP server and the MCP server use this order to find the root
|
|
24
|
+
* above their workspace. The CLI (`check`, `fmt`, `lint`) uses
|
|
25
|
+
* {@linkcode createProjectRootResolver}, which starts from this nearest
|
|
26
|
+
* config root but skips a config that an enclosing project hides (#845).
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveConfigRoot(startDir: string, readFile: (path: string) => Promise<string | undefined>): Promise<string | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* Directories strictly below `root` that a document walk-up would
|
|
31
|
+
* resolve to, found with the gitignore-aware project walk (honouring
|
|
32
|
+
* `exclude`). Each discovered `project.yaml` or `.markspec.yaml` is
|
|
33
|
+
* resolved with {@linkcode resolveConfigRoot} from its own directory, so a
|
|
34
|
+
* `.markspec.yaml` below a `project.yaml` is not a root of its own — the
|
|
35
|
+
* same answer the CLI gives for a file there. Each found root is scanned
|
|
36
|
+
* again with its own exclude list, so its negations can re-include non-hidden
|
|
37
|
+
* folders that the enclosing project's walk skipped. A found root is dropped
|
|
38
|
+
* when the start root's exclude list or the `.markspec.yaml` `exclude:` list
|
|
39
|
+
* of another found root above it covers it: each project's exclude list applies
|
|
40
|
+
* to its own subtree, with patterns relative to that project. The result is sorted.
|
|
41
|
+
*/
|
|
42
|
+
export declare function findNestedProjectRoots(root: string, io: DiscoveryIO, exclude?: readonly string[]): Promise<string[]>;
|
|
43
|
+
/** Options for {@linkcode discoverProjectRoots}. */
|
|
44
|
+
export interface ProjectDiscoveryOptions {
|
|
45
|
+
/** The user's home folder. When the primary root equals this folder, no
|
|
46
|
+
* downward scan runs from it. */
|
|
47
|
+
readonly homeDir?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Find every MarkSpec project reachable from `startDir`.
|
|
51
|
+
*
|
|
52
|
+
* `primaryRoot` is the nearest config root found by walking up from
|
|
53
|
+
* `startDir` (see {@linkcode resolveConfigRoot}), or `startDir` itself
|
|
54
|
+
* when there is none. `roots` holds the primary root (only when it has a
|
|
55
|
+
* config) plus every nested root below it, sorted. The nested scan honours
|
|
56
|
+
* the primary project's `.markspec.yaml` `exclude:` list, and each nested
|
|
57
|
+
* project's own list for the folders below it.
|
|
58
|
+
*
|
|
59
|
+
* When the primary root is a filesystem root or `options.homeDir`, no
|
|
60
|
+
* downward scan runs, even when that folder holds a config: `roots` then
|
|
61
|
+
* holds only the primary root when it has a config, and is empty
|
|
62
|
+
* otherwise.
|
|
63
|
+
*/
|
|
64
|
+
export declare function discoverProjectRoots(startDir: string, io: DiscoveryIO, options?: ProjectDiscoveryOptions): Promise<{
|
|
65
|
+
primaryRoot: string;
|
|
66
|
+
roots: string[];
|
|
67
|
+
}>;
|
|
68
|
+
/** Answers which project root owns a folder; see
|
|
69
|
+
* {@linkcode createProjectRootResolver}. */
|
|
70
|
+
export interface ProjectRootResolver {
|
|
71
|
+
/**
|
|
72
|
+
* The project root that owns files in `dir`, or `undefined` when no
|
|
73
|
+
* `project.yaml` or `.markspec.yaml` is at or above `dir`.
|
|
74
|
+
*/
|
|
75
|
+
ownerOf(dir: string): Promise<string | undefined>;
|
|
76
|
+
/**
|
|
77
|
+
* The nested project roots below `root`
|
|
78
|
+
* ({@linkcode findNestedProjectRoots} with the `.markspec.yaml`
|
|
79
|
+
* `exclude:` list of `root`). Cached per root.
|
|
80
|
+
*/
|
|
81
|
+
nestedRoots(root: string): Promise<string[]>;
|
|
82
|
+
/**
|
|
83
|
+
* The outermost project root at or above `dir`: the root from which the
|
|
84
|
+
* LSP would index `dir` when its workspace is the outermost project. A
|
|
85
|
+
* nested project's walk inherits the `.gitignore` files from this root
|
|
86
|
+
* down (`discoverFiles` option `inheritGitignoreFrom`). `undefined` when
|
|
87
|
+
* no `project.yaml` or `.markspec.yaml` is at or above `dir`.
|
|
88
|
+
*/
|
|
89
|
+
outermostOf(dir: string): Promise<string | undefined>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create a resolver that gives, for any folder, the project root the LSP
|
|
93
|
+
* would give a document in that folder when the editor workspace is the
|
|
94
|
+
* outermost project root above it (#845).
|
|
95
|
+
*
|
|
96
|
+
* The nearest config root {@linkcode resolveConfigRoot} finds is not
|
|
97
|
+
* always the owner: when an enclosing project hides that config (an
|
|
98
|
+
* `exclude:` entry, a `.gitignore` entry, a hidden folder), the LSP and
|
|
99
|
+
* the MCP server never treat it as a root, and its files belong to the
|
|
100
|
+
* enclosing project. So the resolver walks up from the nearest config
|
|
101
|
+
* root to the outermost enclosing one, finds the nested roots below that
|
|
102
|
+
* outermost root the way the LSP does, and returns the deepest of them
|
|
103
|
+
* that contains `dir`.
|
|
104
|
+
*
|
|
105
|
+
* The walk up stops before a filesystem root and before
|
|
106
|
+
* `options.homeDir`: {@linkcode discoverProjectRoots} never scans down
|
|
107
|
+
* from those folders, so a stray config there must not claim every
|
|
108
|
+
* project below it. Results are cached per folder.
|
|
109
|
+
*/
|
|
110
|
+
export declare function createProjectRootResolver(io: DiscoveryIO, options?: ProjectDiscoveryOptions): ProjectRootResolver;
|
|
111
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/discovery/projects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAS3D,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM5D;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GACtB,MAAM,GAAG,SAAS,CAOpB;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,GACtD,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,WAAW,EACf,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CA+CnB;AAgBD,oDAAoD;AACpD,MAAM,WAAW,uBAAuB;IACtC;qCACiC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,WAAW,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAoBnD;AAED;4CAC4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAClD;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C;;;;;;OAMG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,WAAW,EACf,OAAO,GAAE,uBAA4B,GACpC,mBAAmB,CAqErB"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/discovery/projects
|
|
4
|
+
*
|
|
5
|
+
* Project-root discovery shared by the CLI, the LSP and the MCP server.
|
|
6
|
+
*
|
|
7
|
+
* A "project root" is a directory that holds a `project.yaml` or a
|
|
8
|
+
* `.markspec.yaml`. {@linkcode discoverProjectRoots} finds the primary
|
|
9
|
+
* root by walking up from a start folder, then every nested root below
|
|
10
|
+
* it with the gitignore-aware file walk.
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.isWithin = isWithin;
|
|
14
|
+
exports.nearestRoot = nearestRoot;
|
|
15
|
+
exports.resolveConfigRoot = resolveConfigRoot;
|
|
16
|
+
exports.findNestedProjectRoots = findNestedProjectRoots;
|
|
17
|
+
exports.discoverProjectRoots = discoverProjectRoots;
|
|
18
|
+
exports.createProjectRootResolver = createProjectRootResolver;
|
|
19
|
+
const path_1 = require("@std/path");
|
|
20
|
+
const mod_js_1 = require("../config/mod.js");
|
|
21
|
+
const markspec_js_1 = require("../config/markspec.js");
|
|
22
|
+
const mod_js_2 = require("./mod.js");
|
|
23
|
+
const gitignore_js_1 = require("./gitignore.js");
|
|
24
|
+
/** The file names whose directory can be a project root. */
|
|
25
|
+
const CONFIG_BASENAMES = new Set([
|
|
26
|
+
"project.yaml",
|
|
27
|
+
".markspec.yaml",
|
|
28
|
+
]);
|
|
29
|
+
/** `true` when `path` is `root` itself or lies below it. */
|
|
30
|
+
function isWithin(root, path) {
|
|
31
|
+
const rel = (0, path_1.relative)(root, path);
|
|
32
|
+
// A child directory may itself start with `..` (e.g. `..cache`), so
|
|
33
|
+
// compare whole path segments, not a string prefix.
|
|
34
|
+
return rel === "" ||
|
|
35
|
+
(rel !== ".." && !rel.startsWith(`..${path_1.SEPARATOR}`) && !(0, path_1.isAbsolute)(rel));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Return the deepest root in `roots` that is `dir` itself or an ancestor
|
|
39
|
+
* of `dir`, or `undefined` when none is.
|
|
40
|
+
*/
|
|
41
|
+
function nearestRoot(dir, roots) {
|
|
42
|
+
let best;
|
|
43
|
+
for (const root of roots) {
|
|
44
|
+
if (!isWithin(root, dir))
|
|
45
|
+
continue;
|
|
46
|
+
if (best === undefined || root.length > best.length)
|
|
47
|
+
best = root;
|
|
48
|
+
}
|
|
49
|
+
return best;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Walk up from `startDir` to the nearest `project.yaml`, else the nearest
|
|
53
|
+
* `.markspec.yaml`. Returns `undefined` when neither exists.
|
|
54
|
+
*
|
|
55
|
+
* The LSP server and the MCP server use this order to find the root
|
|
56
|
+
* above their workspace. The CLI (`check`, `fmt`, `lint`) uses
|
|
57
|
+
* {@linkcode createProjectRootResolver}, which starts from this nearest
|
|
58
|
+
* config root but skips a config that an enclosing project hides (#845).
|
|
59
|
+
*/
|
|
60
|
+
async function resolveConfigRoot(startDir, readFile) {
|
|
61
|
+
return await (0, mod_js_1.discoverProjectRoot)(startDir, readFile) ??
|
|
62
|
+
await (0, markspec_js_1.discoverMarkspecRoot)(startDir, readFile);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Directories strictly below `root` that a document walk-up would
|
|
66
|
+
* resolve to, found with the gitignore-aware project walk (honouring
|
|
67
|
+
* `exclude`). Each discovered `project.yaml` or `.markspec.yaml` is
|
|
68
|
+
* resolved with {@linkcode resolveConfigRoot} from its own directory, so a
|
|
69
|
+
* `.markspec.yaml` below a `project.yaml` is not a root of its own — the
|
|
70
|
+
* same answer the CLI gives for a file there. Each found root is scanned
|
|
71
|
+
* again with its own exclude list, so its negations can re-include non-hidden
|
|
72
|
+
* folders that the enclosing project's walk skipped. A found root is dropped
|
|
73
|
+
* when the start root's exclude list or the `.markspec.yaml` `exclude:` list
|
|
74
|
+
* of another found root above it covers it: each project's exclude list applies
|
|
75
|
+
* to its own subtree, with patterns relative to that project. The result is sorted.
|
|
76
|
+
*/
|
|
77
|
+
async function findNestedProjectRoots(root, io, exclude) {
|
|
78
|
+
const out = new Set();
|
|
79
|
+
const scans = [{ root, exclude }];
|
|
80
|
+
for (const scan of scans) {
|
|
81
|
+
for await (const path of (0, mod_js_2.discoverFiles)(scan.root, io, {
|
|
82
|
+
extensions: new Set([".yaml"]),
|
|
83
|
+
exclude: scan.exclude,
|
|
84
|
+
inheritGitignoreFrom: root,
|
|
85
|
+
})) {
|
|
86
|
+
if (!CONFIG_BASENAMES.has((0, path_1.basename)(path)))
|
|
87
|
+
continue;
|
|
88
|
+
const dir = (0, path_1.dirname)(path);
|
|
89
|
+
if (dir === scan.root)
|
|
90
|
+
continue;
|
|
91
|
+
const found = await resolveConfigRoot(dir, io.readFile);
|
|
92
|
+
if (found !== undefined && found !== root && isWithin(root, found) &&
|
|
93
|
+
!out.has(found)) {
|
|
94
|
+
out.add(found);
|
|
95
|
+
const { config } = await (0, markspec_js_1.loadToolConfig)(found, io.readFile);
|
|
96
|
+
scans.push({ root: found, exclude: config.exclude });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const nested = [...out];
|
|
101
|
+
const excludeRules = new Map();
|
|
102
|
+
excludeRules.set(root, (0, gitignore_js_1.parseGitignore)((exclude ?? []).join("\n"), ""));
|
|
103
|
+
const kept = [];
|
|
104
|
+
for (const candidate of nested) {
|
|
105
|
+
let covered = false;
|
|
106
|
+
for (const ancestor of [root, ...nested]) {
|
|
107
|
+
if (ancestor === candidate || !isWithin(ancestor, candidate))
|
|
108
|
+
continue;
|
|
109
|
+
let rules = excludeRules.get(ancestor);
|
|
110
|
+
if (rules === undefined) {
|
|
111
|
+
const { config } = await (0, markspec_js_1.loadToolConfig)(ancestor, io.readFile);
|
|
112
|
+
rules = (0, gitignore_js_1.parseGitignore)(config.exclude.join("\n"), "");
|
|
113
|
+
excludeRules.set(ancestor, rules);
|
|
114
|
+
}
|
|
115
|
+
if (isExcludedDir((0, path_1.relative)(ancestor, candidate), rules)) {
|
|
116
|
+
covered = true;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (!covered)
|
|
121
|
+
kept.push(candidate);
|
|
122
|
+
}
|
|
123
|
+
return kept.sort();
|
|
124
|
+
}
|
|
125
|
+
/** `true` when the directory at `rel` (relative, host separators), or any
|
|
126
|
+
* directory above it, matches `rules` — the same pruning the walk does. */
|
|
127
|
+
function isExcludedDir(rel, rules) {
|
|
128
|
+
if (rules.length === 0)
|
|
129
|
+
return false;
|
|
130
|
+
const segments = rel.split(path_1.SEPARATOR);
|
|
131
|
+
for (let i = 1; i <= segments.length; i++) {
|
|
132
|
+
if ((0, gitignore_js_1.isIgnored)(segments.slice(0, i).join("/"), true, rules))
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Find every MarkSpec project reachable from `startDir`.
|
|
139
|
+
*
|
|
140
|
+
* `primaryRoot` is the nearest config root found by walking up from
|
|
141
|
+
* `startDir` (see {@linkcode resolveConfigRoot}), or `startDir` itself
|
|
142
|
+
* when there is none. `roots` holds the primary root (only when it has a
|
|
143
|
+
* config) plus every nested root below it, sorted. The nested scan honours
|
|
144
|
+
* the primary project's `.markspec.yaml` `exclude:` list, and each nested
|
|
145
|
+
* project's own list for the folders below it.
|
|
146
|
+
*
|
|
147
|
+
* When the primary root is a filesystem root or `options.homeDir`, no
|
|
148
|
+
* downward scan runs, even when that folder holds a config: `roots` then
|
|
149
|
+
* holds only the primary root when it has a config, and is empty
|
|
150
|
+
* otherwise.
|
|
151
|
+
*/
|
|
152
|
+
async function discoverProjectRoots(startDir, io, options = {}) {
|
|
153
|
+
const configRoot = await resolveConfigRoot(startDir, io.readFile);
|
|
154
|
+
const primaryRoot = configRoot ?? startDir;
|
|
155
|
+
const isFilesystemRoot = (0, path_1.dirname)(primaryRoot) === primaryRoot;
|
|
156
|
+
if (isFilesystemRoot || primaryRoot === options.homeDir) {
|
|
157
|
+
return {
|
|
158
|
+
primaryRoot,
|
|
159
|
+
roots: configRoot !== undefined ? [primaryRoot] : [],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const { config } = configRoot !== undefined
|
|
163
|
+
? await (0, markspec_js_1.loadToolConfig)(primaryRoot, io.readFile)
|
|
164
|
+
: { config: undefined };
|
|
165
|
+
const nested = await findNestedProjectRoots(primaryRoot, io, config?.exclude);
|
|
166
|
+
const roots = configRoot !== undefined ? [primaryRoot, ...nested] : nested;
|
|
167
|
+
return { primaryRoot, roots: roots.sort() };
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Create a resolver that gives, for any folder, the project root the LSP
|
|
171
|
+
* would give a document in that folder when the editor workspace is the
|
|
172
|
+
* outermost project root above it (#845).
|
|
173
|
+
*
|
|
174
|
+
* The nearest config root {@linkcode resolveConfigRoot} finds is not
|
|
175
|
+
* always the owner: when an enclosing project hides that config (an
|
|
176
|
+
* `exclude:` entry, a `.gitignore` entry, a hidden folder), the LSP and
|
|
177
|
+
* the MCP server never treat it as a root, and its files belong to the
|
|
178
|
+
* enclosing project. So the resolver walks up from the nearest config
|
|
179
|
+
* root to the outermost enclosing one, finds the nested roots below that
|
|
180
|
+
* outermost root the way the LSP does, and returns the deepest of them
|
|
181
|
+
* that contains `dir`.
|
|
182
|
+
*
|
|
183
|
+
* The walk up stops before a filesystem root and before
|
|
184
|
+
* `options.homeDir`: {@linkcode discoverProjectRoots} never scans down
|
|
185
|
+
* from those folders, so a stray config there must not claim every
|
|
186
|
+
* project below it. Results are cached per folder.
|
|
187
|
+
*/
|
|
188
|
+
function createProjectRootResolver(io, options = {}) {
|
|
189
|
+
const owners = new Map();
|
|
190
|
+
const outermosts = new Map();
|
|
191
|
+
const nested = new Map();
|
|
192
|
+
function nestedRoots(root) {
|
|
193
|
+
let found = nested.get(root);
|
|
194
|
+
if (found === undefined) {
|
|
195
|
+
found = (0, markspec_js_1.loadToolConfig)(root, io.readFile).then(({ config }) => findNestedProjectRoots(root, io, config.exclude));
|
|
196
|
+
nested.set(root, found);
|
|
197
|
+
}
|
|
198
|
+
return found;
|
|
199
|
+
}
|
|
200
|
+
function outermostOf(dir) {
|
|
201
|
+
let found = outermosts.get(dir);
|
|
202
|
+
if (found === undefined) {
|
|
203
|
+
found = resolveOutermost(dir);
|
|
204
|
+
outermosts.set(dir, found);
|
|
205
|
+
}
|
|
206
|
+
return found;
|
|
207
|
+
}
|
|
208
|
+
async function resolveOutermost(dir) {
|
|
209
|
+
const nearest = await resolveConfigRoot(dir, io.readFile);
|
|
210
|
+
return nearest === undefined ? undefined : await outermostFrom(nearest);
|
|
211
|
+
}
|
|
212
|
+
/** Walk up from the config root `nearest` to the outermost one. */
|
|
213
|
+
async function outermostFrom(nearest) {
|
|
214
|
+
let outermost = nearest;
|
|
215
|
+
while (true) {
|
|
216
|
+
const parent = (0, path_1.dirname)(outermost);
|
|
217
|
+
if (parent === outermost)
|
|
218
|
+
break;
|
|
219
|
+
const above = await resolveConfigRoot(parent, io.readFile);
|
|
220
|
+
if (above === undefined || (0, path_1.dirname)(above) === above ||
|
|
221
|
+
above === options.homeDir) {
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
outermost = above;
|
|
225
|
+
}
|
|
226
|
+
return outermost;
|
|
227
|
+
}
|
|
228
|
+
async function resolveOwner(dir) {
|
|
229
|
+
const nearest = await resolveConfigRoot(dir, io.readFile);
|
|
230
|
+
if (nearest === undefined)
|
|
231
|
+
return undefined;
|
|
232
|
+
const outermost = await outermostFrom(nearest);
|
|
233
|
+
if (outermost === nearest)
|
|
234
|
+
return nearest;
|
|
235
|
+
const roots = [outermost, ...await nestedRoots(outermost)];
|
|
236
|
+
return nearestRoot(dir, roots) ?? outermost;
|
|
237
|
+
}
|
|
238
|
+
return {
|
|
239
|
+
ownerOf(dir) {
|
|
240
|
+
let owner = owners.get(dir);
|
|
241
|
+
if (owner === undefined) {
|
|
242
|
+
owner = resolveOwner(dir);
|
|
243
|
+
owners.set(dir, owner);
|
|
244
|
+
}
|
|
245
|
+
return owner;
|
|
246
|
+
},
|
|
247
|
+
nestedRoots,
|
|
248
|
+
outermostOf,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module formatter/entry_body
|
|
3
|
+
*
|
|
4
|
+
* Read and replace the body of one entry in a Markdown file text.
|
|
5
|
+
*
|
|
6
|
+
* Splice-only contract: {@linkcode replaceEntryBody} changes only the
|
|
7
|
+
* lines of the target entry's body. Every other line of the file (other
|
|
8
|
+
* entries, prose, front matter, the title, the trailer block, and each
|
|
9
|
+
* line's own line ending) stays byte-for-byte unchanged. After the splice
|
|
10
|
+
* the text is parsed again; when the set of entries differs (a new entry,
|
|
11
|
+
* a lost entry, a changed title or trailer) or the target's body is not
|
|
12
|
+
* the proposal, the edit is refused.
|
|
13
|
+
*
|
|
14
|
+
* The body range starts after the title paragraph (up to the first blank
|
|
15
|
+
* line after the title line, so a soft-wrapped title is skipped) and the
|
|
16
|
+
* blank lines after it. It has as many lines as the parser's
|
|
17
|
+
* `entry.body`, so lazy continuation lines are included, and it must
|
|
18
|
+
* match that body line for line. The body indent is the content column of
|
|
19
|
+
* the list item: the marker column, plus the marker width, plus the spaces
|
|
20
|
+
* after the marker. Lines are split on `\r\n`, a
|
|
21
|
+
* lone `\r`, or `\n`, as in the parser.
|
|
22
|
+
*
|
|
23
|
+
* Pure: no I/O, Node-compatible.
|
|
24
|
+
*/
|
|
25
|
+
/** Why {@linkcode replaceEntryBody} refused an edit. */
|
|
26
|
+
export type EntryBodyRefusal = "entry-not-found" | "body-empty" | "proposal-empty" | "trailer-invalid" | "entries-changed";
|
|
27
|
+
/** Result of {@linkcode replaceEntryBody}. */
|
|
28
|
+
export type EntryBodyEdit = {
|
|
29
|
+
readonly ok: true;
|
|
30
|
+
readonly text: string;
|
|
31
|
+
} | {
|
|
32
|
+
readonly ok: false;
|
|
33
|
+
readonly refusal: EntryBodyRefusal;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 0-based content column of the list item whose marker starts at `marker`
|
|
37
|
+
* on `line`: the marker column, plus 1 for the bullet, plus the whitespace
|
|
38
|
+
* after it. Tabs advance to the next four-column CommonMark tab stop.
|
|
39
|
+
* So `- [ID]` gives 2, `- [ID]` gives 4, and `-\t[ID]` gives 4 at
|
|
40
|
+
* column zero. Ordered lists never hold entries. When there is no bullet
|
|
41
|
+
* followed by whitespace at `marker`, use the marker column plus 2.
|
|
42
|
+
*/
|
|
43
|
+
export declare function contentColumn(line: string, marker: number): number;
|
|
44
|
+
/**
|
|
45
|
+
* Body of the entry `displayId` as written in `text`: dedented, LF line
|
|
46
|
+
* endings, no surrounding blank lines. Returns `""` when the entry has no
|
|
47
|
+
* body and `undefined` when no entry has `displayId`. `file` names a
|
|
48
|
+
* `.md` file. When the body lines cannot be located exactly in `text`,
|
|
49
|
+
* the parser's body is returned (and {@linkcode replaceEntryBody}
|
|
50
|
+
* refuses to edit that entry).
|
|
51
|
+
*/
|
|
52
|
+
export declare function readEntryBody(text: string, file: string, displayId: string): Promise<string | undefined>;
|
|
53
|
+
/**
|
|
54
|
+
* Return `text` with the body of entry `displayId` replaced by `body`,
|
|
55
|
+
* re-indented to the body indent. Every other line stays byte-for-byte
|
|
56
|
+
* unchanged. Inserted lines take the line ending of the title line. In
|
|
57
|
+
* `body`, `\r\n` and a lone `\r` count as line breaks.
|
|
58
|
+
*
|
|
59
|
+
* Refusals: `entry-not-found` (no such entry), `trailer-invalid` (the
|
|
60
|
+
* entry's trailer block did not parse, see below), `body-empty` (the entry
|
|
61
|
+
* has no body), `proposal-empty` (`body` is blank), `entries-changed`
|
|
62
|
+
* (two entries in `text` have `displayId`; or the body lines cannot be
|
|
63
|
+
* located exactly in `text`; or the edited
|
|
64
|
+
* text no longer parses to the same entries, with the same title and
|
|
65
|
+
* trailer for the target, and with the proposal as the target's body;
|
|
66
|
+
* or the parse raises more structural diagnostics of some code, such as
|
|
67
|
+
* MSL-P020, than the original text).
|
|
68
|
+
*
|
|
69
|
+
* `trailer-invalid`: when a trailer line is malformed (for example an
|
|
70
|
+
* empty `Labels:`, a key without a colon, or a lowercase key), the parser
|
|
71
|
+
* reads the whole trailer block, the `Id:` line included, as body. A
|
|
72
|
+
* splice would then delete the `Id:` and trailer lines, and the identity
|
|
73
|
+
* check cannot see it, because the entry has no `id` and no attributes
|
|
74
|
+
* before or after the edit. So the edit is refused when an `MSL-P020`,
|
|
75
|
+
* `MSL-P021` or `MSL-P022` names the entry (the message starts with
|
|
76
|
+
* `<displayId>:`). This is broader than that case: `MSL-P020` also fires
|
|
77
|
+
* when a body paragraph starts with a recognized trailer key, so such an
|
|
78
|
+
* entry is refused too. The file already fails `markspec check` there.
|
|
79
|
+
* An entry whose trailer-looking lines use only unrecognized keys, and
|
|
80
|
+
* that the parser reads as body without a diagnostic, is edited as the
|
|
81
|
+
* parser sees it: those lines are body.
|
|
82
|
+
*/
|
|
83
|
+
export declare function replaceEntryBody(text: string, file: string, displayId: string, body: string): Promise<EntryBodyEdit>;
|
|
84
|
+
//# sourceMappingURL=entry_body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry_body.d.ts","sourceRoot":"","sources":["../../src/formatter/entry_body.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAAC;AA8E/D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAQlE;AAyCD;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAS7B;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,aAAa,CAAC,CAoDxB"}
|