@driftsys/markspec 0.2.0 → 0.4.0
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 +32 -8
- package/esm/compiler/inverses.d.ts +22 -0
- package/esm/compiler/inverses.d.ts.map +1 -0
- package/esm/compiler/inverses.js +147 -0
- package/esm/compiler/link_target.d.ts +19 -0
- package/esm/compiler/link_target.d.ts.map +1 -0
- package/esm/compiler/link_target.js +66 -0
- package/esm/compiler/mod.d.ts +7 -1
- package/esm/compiler/mod.d.ts.map +1 -1
- package/esm/compiler/mod.js +61 -14
- package/esm/compiler/schema.d.ts.map +1 -1
- package/esm/compiler/schema.js +20 -1
- package/esm/config/markspec.d.ts +51 -0
- package/esm/config/markspec.d.ts.map +1 -0
- package/esm/config/markspec.js +216 -0
- package/esm/config/mod.d.ts +4 -0
- package/esm/config/mod.d.ts.map +1 -1
- package/esm/config/mod.js +27 -16
- package/esm/formatter/mod.d.ts +19 -4
- package/esm/formatter/mod.d.ts.map +1 -1
- package/esm/formatter/mod.js +139 -29
- package/esm/mod.d.ts +11 -7
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +6 -3
- package/esm/model/attributes.d.ts +47 -0
- package/esm/model/attributes.d.ts.map +1 -0
- package/esm/model/attributes.js +97 -0
- package/esm/model/mod.d.ts +257 -26
- package/esm/model/mod.d.ts.map +1 -1
- package/esm/model/mod.js +28 -1
- package/esm/model/palette.d.ts +18 -0
- package/esm/model/palette.d.ts.map +1 -0
- package/esm/model/palette.js +23 -0
- package/esm/model/profile.d.ts +189 -0
- package/esm/model/profile.d.ts.map +1 -0
- package/esm/model/profile.js +31 -0
- package/esm/parser/attributes.d.ts +13 -1
- package/esm/parser/attributes.d.ts.map +1 -1
- package/esm/parser/attributes.js +47 -0
- package/esm/parser/frontmatter.d.ts +53 -0
- package/esm/parser/frontmatter.d.ts.map +1 -0
- package/esm/parser/frontmatter.js +185 -0
- package/esm/parser/grammars.js +11 -2
- package/esm/parser/markdown.d.ts +21 -7
- package/esm/parser/markdown.d.ts.map +1 -1
- package/esm/parser/markdown.js +101 -40
- package/esm/parser/mod.d.ts +26 -10
- package/esm/parser/mod.d.ts.map +1 -1
- package/esm/parser/mod.js +40 -10
- package/esm/parser/source.d.ts +12 -8
- package/esm/parser/source.d.ts.map +1 -1
- package/esm/parser/source.js +21 -14
- package/esm/profile/cache.d.ts +29 -0
- package/esm/profile/cache.d.ts.map +1 -0
- package/esm/profile/cache.js +45 -0
- package/esm/profile/chain.d.ts +42 -0
- package/esm/profile/chain.d.ts.map +1 -0
- package/esm/profile/chain.js +193 -0
- package/esm/profile/colors.d.ts +26 -0
- package/esm/profile/colors.d.ts.map +1 -0
- package/esm/profile/colors.js +46 -0
- package/esm/profile/git-cache.d.ts +73 -0
- package/esm/profile/git-cache.d.ts.map +1 -0
- package/esm/profile/git-cache.js +96 -0
- package/esm/profile/load.d.ts +28 -0
- package/esm/profile/load.d.ts.map +1 -0
- package/esm/profile/load.js +50 -0
- package/esm/profile/manifest.d.ts +21 -0
- package/esm/profile/manifest.d.ts.map +1 -0
- package/esm/profile/manifest.js +815 -0
- package/esm/profile/merge.d.ts +26 -0
- package/esm/profile/merge.d.ts.map +1 -0
- package/esm/profile/merge.js +518 -0
- package/esm/profile/mod.d.ts +24 -0
- package/esm/profile/mod.d.ts.map +1 -0
- package/esm/profile/mod.js +15 -0
- package/esm/profile/npm.d.ts +51 -0
- package/esm/profile/npm.d.ts.map +1 -0
- package/esm/profile/npm.js +186 -0
- package/esm/profile/resolver.d.ts +60 -0
- package/esm/profile/resolver.d.ts.map +1 -0
- package/esm/profile/resolver.js +132 -0
- package/esm/reporter/mod.js +14 -27
- package/esm/validator/attributes.d.ts +43 -0
- package/esm/validator/attributes.d.ts.map +1 -0
- package/esm/validator/attributes.js +169 -0
- package/esm/validator/mod.d.ts +27 -6
- package/esm/validator/mod.d.ts.map +1 -1
- package/esm/validator/mod.js +132 -124
- package/esm/validator/normalize.d.ts +21 -0
- package/esm/validator/normalize.d.ts.map +1 -0
- package/esm/validator/normalize.js +58 -0
- package/esm/validator/pattern.d.ts +23 -0
- package/esm/validator/pattern.d.ts.map +1 -0
- package/esm/validator/pattern.js +44 -0
- package/esm/validator/pipeline.d.ts +30 -0
- package/esm/validator/pipeline.d.ts.map +1 -0
- package/esm/validator/pipeline.js +115 -0
- package/esm/validator/traceability.d.ts +48 -0
- package/esm/validator/traceability.d.ts.map +1 -0
- package/esm/validator/traceability.js +141 -0
- package/esm/validator/types.d.ts +48 -0
- package/esm/validator/types.d.ts.map +1 -0
- package/esm/validator/types.js +140 -0
- package/esm/validator/value_types.d.ts +20 -0
- package/esm/validator/value_types.d.ts.map +1 -0
- package/esm/validator/value_types.js +126 -0
- package/package.json +1 -1
- package/script/compiler/inverses.d.ts +22 -0
- package/script/compiler/inverses.d.ts.map +1 -0
- package/script/compiler/inverses.js +150 -0
- package/script/compiler/link_target.d.ts +19 -0
- package/script/compiler/link_target.d.ts.map +1 -0
- package/script/compiler/link_target.js +69 -0
- package/script/compiler/mod.d.ts +7 -1
- package/script/compiler/mod.d.ts.map +1 -1
- package/script/compiler/mod.js +62 -14
- package/script/compiler/schema.d.ts.map +1 -1
- package/script/compiler/schema.js +20 -1
- package/script/config/markspec.d.ts +51 -0
- package/script/config/markspec.d.ts.map +1 -0
- package/script/config/markspec.js +222 -0
- package/script/config/mod.d.ts +4 -0
- package/script/config/mod.d.ts.map +1 -1
- package/script/config/mod.js +28 -16
- package/script/formatter/mod.d.ts +19 -4
- package/script/formatter/mod.d.ts.map +1 -1
- package/script/formatter/mod.js +140 -29
- package/script/mod.d.ts +11 -7
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +50 -19
- package/script/model/attributes.d.ts +47 -0
- package/script/model/attributes.d.ts.map +1 -0
- package/script/model/attributes.js +101 -0
- package/script/model/mod.d.ts +257 -26
- package/script/model/mod.d.ts.map +1 -1
- package/script/model/mod.js +37 -2
- package/script/model/palette.d.ts +18 -0
- package/script/model/palette.d.ts.map +1 -0
- package/script/model/palette.js +26 -0
- package/script/model/profile.d.ts +189 -0
- package/script/model/profile.d.ts.map +1 -0
- package/script/model/profile.js +34 -0
- package/script/parser/attributes.d.ts +13 -1
- package/script/parser/attributes.d.ts.map +1 -1
- package/script/parser/attributes.js +48 -0
- package/script/parser/frontmatter.d.ts +53 -0
- package/script/parser/frontmatter.d.ts.map +1 -0
- package/script/parser/frontmatter.js +188 -0
- package/script/parser/grammars.js +11 -2
- package/script/parser/markdown.d.ts +21 -7
- package/script/parser/markdown.d.ts.map +1 -1
- package/script/parser/markdown.js +100 -39
- package/script/parser/mod.d.ts +26 -10
- package/script/parser/mod.d.ts.map +1 -1
- package/script/parser/mod.js +42 -11
- package/script/parser/source.d.ts +12 -8
- package/script/parser/source.d.ts.map +1 -1
- package/script/parser/source.js +21 -14
- package/script/profile/cache.d.ts +29 -0
- package/script/profile/cache.d.ts.map +1 -0
- package/script/profile/cache.js +48 -0
- package/script/profile/chain.d.ts +42 -0
- package/script/profile/chain.d.ts.map +1 -0
- package/script/profile/chain.js +229 -0
- package/script/profile/colors.d.ts +26 -0
- package/script/profile/colors.d.ts.map +1 -0
- package/script/profile/colors.js +49 -0
- package/script/profile/git-cache.d.ts +73 -0
- package/script/profile/git-cache.d.ts.map +1 -0
- package/script/profile/git-cache.js +104 -0
- package/script/profile/load.d.ts +28 -0
- package/script/profile/load.d.ts.map +1 -0
- package/script/profile/load.js +53 -0
- package/script/profile/manifest.d.ts +21 -0
- package/script/profile/manifest.d.ts.map +1 -0
- package/script/profile/manifest.js +818 -0
- package/script/profile/merge.d.ts +26 -0
- package/script/profile/merge.d.ts.map +1 -0
- package/script/profile/merge.js +521 -0
- package/script/profile/mod.d.ts +24 -0
- package/script/profile/mod.d.ts.map +1 -0
- package/script/profile/mod.js +33 -0
- package/script/profile/npm.d.ts +51 -0
- package/script/profile/npm.d.ts.map +1 -0
- package/script/profile/npm.js +191 -0
- package/script/profile/resolver.d.ts +60 -0
- package/script/profile/resolver.d.ts.map +1 -0
- package/script/profile/resolver.js +136 -0
- package/script/reporter/mod.js +14 -27
- package/script/validator/attributes.d.ts +43 -0
- package/script/validator/attributes.d.ts.map +1 -0
- package/script/validator/attributes.js +173 -0
- package/script/validator/mod.d.ts +27 -6
- package/script/validator/mod.d.ts.map +1 -1
- package/script/validator/mod.js +145 -123
- package/script/validator/normalize.d.ts +21 -0
- package/script/validator/normalize.d.ts.map +1 -0
- package/script/validator/normalize.js +61 -0
- package/script/validator/pattern.d.ts +23 -0
- package/script/validator/pattern.d.ts.map +1 -0
- package/script/validator/pattern.js +47 -0
- package/script/validator/pipeline.d.ts +30 -0
- package/script/validator/pipeline.d.ts.map +1 -0
- package/script/validator/pipeline.js +118 -0
- package/script/validator/traceability.d.ts +48 -0
- package/script/validator/traceability.d.ts.map +1 -0
- package/script/validator/traceability.js +146 -0
- package/script/validator/types.d.ts +48 -0
- package/script/validator/types.d.ts.map +1 -0
- package/script/validator/types.js +144 -0
- package/script/validator/value_types.d.ts +20 -0
- package/script/validator/value_types.d.ts.map +1 -0
- package/script/validator/value_types.js +129 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/chain
|
|
3
|
+
*
|
|
4
|
+
* Profile chain loader. Walks the `extends:` pointer from a leaf specifier
|
|
5
|
+
* up to the root, producing a multi-tier {@linkcode ProfileChain} ordered
|
|
6
|
+
* root → leaf.
|
|
7
|
+
*
|
|
8
|
+
* Supports both local and git specifiers, with cycle + depth detection. Git
|
|
9
|
+
* specifiers route through {@linkcode resolveGitSpecifier} (per-project
|
|
10
|
+
* shallow+sparse clone cache); local specifiers route through
|
|
11
|
+
* {@linkcode resolveLocalSpecifier}. The chain's {@linkcode EffectiveProfile}
|
|
12
|
+
* is produced by {@linkcode mergeChain}.
|
|
13
|
+
*/
|
|
14
|
+
import { resolve as resolvePath } from "@std/path";
|
|
15
|
+
import { parseManifest } from "./manifest.js";
|
|
16
|
+
import { mergeChain } from "./merge.js";
|
|
17
|
+
import { resolveGitSpecifier, resolveLocalSpecifier, } from "./resolver.js";
|
|
18
|
+
/** Maximum number of tiers allowed in an `extends:` chain. */
|
|
19
|
+
const MAX_CHAIN_DEPTH = 20;
|
|
20
|
+
/**
|
|
21
|
+
* Load a profile chain from a specifier, walking the `extends:` pointer up
|
|
22
|
+
* to the root. The returned chain's tiers are ordered root → leaf, so
|
|
23
|
+
* `tiers[0]` is the ultimate ancestor and `tiers[last]` is the leaf
|
|
24
|
+
* specified by the caller.
|
|
25
|
+
*
|
|
26
|
+
* @param specifier - The leaf specifier (from `.markspec.yaml`)
|
|
27
|
+
* @param contextDir - Directory the specifier was declared in (for local
|
|
28
|
+
* path resolution)
|
|
29
|
+
* @param projectRoot - Absolute path of the project root (used to locate
|
|
30
|
+
* the `.markspec/cache/` directory for git specifiers)
|
|
31
|
+
* @param readFile - File reader abstraction
|
|
32
|
+
* @param opts - Injectable runners for git-cache operations (optional)
|
|
33
|
+
*/
|
|
34
|
+
export async function loadChain(specifier, contextDir, projectRoot, readFile, opts = {}) {
|
|
35
|
+
const diagnostics = [];
|
|
36
|
+
// Walk extends: chain. Accumulate tiers leaf-first, reverse at the end.
|
|
37
|
+
const tiersLeafFirst = [];
|
|
38
|
+
const visited = new Set(); // canonical specifier key
|
|
39
|
+
let cursorSpec = specifier;
|
|
40
|
+
let cursorDir = contextDir;
|
|
41
|
+
while (cursorSpec !== undefined) {
|
|
42
|
+
const key = specifierKey(cursorSpec, cursorDir);
|
|
43
|
+
if (visited.has(key)) {
|
|
44
|
+
diagnostics.push({
|
|
45
|
+
code: "PROFILE-LOAD-004",
|
|
46
|
+
severity: "error",
|
|
47
|
+
message: `profile extends: cycle detected at ${stringifySpec(cursorSpec)} ` +
|
|
48
|
+
`(already visited in this chain)`,
|
|
49
|
+
location: { file: "<specifier>", line: 1, column: 1 },
|
|
50
|
+
});
|
|
51
|
+
return { chain: null, diagnostics };
|
|
52
|
+
}
|
|
53
|
+
visited.add(key);
|
|
54
|
+
if (tiersLeafFirst.length >= MAX_CHAIN_DEPTH) {
|
|
55
|
+
diagnostics.push({
|
|
56
|
+
code: "PROFILE-LOAD-005",
|
|
57
|
+
severity: "error",
|
|
58
|
+
message: `profile extends: chain exceeds maximum depth (${MAX_CHAIN_DEPTH})`,
|
|
59
|
+
location: { file: "<specifier>", line: 1, column: 1 },
|
|
60
|
+
});
|
|
61
|
+
return { chain: null, diagnostics };
|
|
62
|
+
}
|
|
63
|
+
let resolved;
|
|
64
|
+
if (cursorSpec.kind === "git") {
|
|
65
|
+
resolved = await resolveGitSpecifier(cursorSpec, projectRoot, readFile, diagnostics, { runGit: opts.runGit, appendFile: opts.appendFile });
|
|
66
|
+
}
|
|
67
|
+
else if (cursorSpec.kind === "npm") {
|
|
68
|
+
const { resolveNpmSpecifier } = await import("./npm.js");
|
|
69
|
+
const { cacheDir: cacheDirFn } = await import("./cache.js");
|
|
70
|
+
resolved = await resolveNpmSpecifier(cursorSpec, diagnostics, {
|
|
71
|
+
cacheRoot: cacheDirFn(),
|
|
72
|
+
readFile,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
resolved = await resolveLocalSpecifier(cursorSpec, cursorDir, readFile, diagnostics);
|
|
77
|
+
}
|
|
78
|
+
if (!resolved) {
|
|
79
|
+
return { chain: null, diagnostics };
|
|
80
|
+
}
|
|
81
|
+
const parsed = parseManifest(resolved.rawYaml, resolved.sourcePath);
|
|
82
|
+
diagnostics.push(...parsed.diagnostics);
|
|
83
|
+
if (!parsed.manifest) {
|
|
84
|
+
return { chain: null, diagnostics };
|
|
85
|
+
}
|
|
86
|
+
const tier = {
|
|
87
|
+
id: parsed.manifest.id,
|
|
88
|
+
version: parsed.manifest.version,
|
|
89
|
+
specifier: cursorSpec,
|
|
90
|
+
manifest: parsed.manifest,
|
|
91
|
+
sourcePath: resolved.sourcePath,
|
|
92
|
+
baseDir: resolved.baseDir,
|
|
93
|
+
};
|
|
94
|
+
tiersLeafFirst.push(tier);
|
|
95
|
+
// Advance cursor to the parent, if any.
|
|
96
|
+
if (parsed.manifest.extends !== undefined) {
|
|
97
|
+
cursorSpec = parsed.manifest.extends;
|
|
98
|
+
cursorDir = resolved.baseDir;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
cursorSpec = undefined;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
// Reverse so tiers[0] = root parent, tiers[last] = leaf child.
|
|
105
|
+
const tiers = tiersLeafFirst.reverse();
|
|
106
|
+
// Build a temporary chain shape to feed into mergeChain. It reads only
|
|
107
|
+
// .tiers; the placeholder effective is ignored by merge.
|
|
108
|
+
const stubChain = {
|
|
109
|
+
tiers,
|
|
110
|
+
effective: buildPlaceholderEffective(tiers),
|
|
111
|
+
};
|
|
112
|
+
const mergeResult = mergeChain(stubChain);
|
|
113
|
+
diagnostics.push(...mergeResult.diagnostics);
|
|
114
|
+
if (!mergeResult.effective) {
|
|
115
|
+
return { chain: null, diagnostics };
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
chain: { tiers, effective: mergeResult.effective },
|
|
119
|
+
diagnostics,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Canonical cycle-detection key for a resolved specifier. Two specifiers that
|
|
124
|
+
* resolve to the same tier are canonicalized to the same key:
|
|
125
|
+
*
|
|
126
|
+
* - Local specifiers key on the absolute resolved directory (after
|
|
127
|
+
* normalization of `.` / `..`).
|
|
128
|
+
* - Git specifiers key on `(repo, tag, subpath)`, which is what the git cache
|
|
129
|
+
* itself uses — two specifiers that hit the same cache entry are the same
|
|
130
|
+
* tier.
|
|
131
|
+
*
|
|
132
|
+
* Note: this does NOT canonicalize symlinks for local specifiers. Two
|
|
133
|
+
* different symlinked paths pointing at the same profile will only be caught
|
|
134
|
+
* by MAX_CHAIN_DEPTH, which emits PROFILE-LOAD-005 instead of
|
|
135
|
+
* PROFILE-LOAD-004. Acceptable for v1 since `Deno.realPath` would require an
|
|
136
|
+
* additional I/O round-trip and a filesystem shim for the test mock reader.
|
|
137
|
+
*/
|
|
138
|
+
function specifierKey(spec, contextDir) {
|
|
139
|
+
if (spec.kind === "local") {
|
|
140
|
+
return `local:${resolvePath(contextDir, spec.path)}`;
|
|
141
|
+
}
|
|
142
|
+
if (spec.kind === "git") {
|
|
143
|
+
return `git:${spec.repo}#${spec.tag}|${spec.subpath ?? ""}`;
|
|
144
|
+
}
|
|
145
|
+
if (spec.kind === "npm") {
|
|
146
|
+
const pkg = spec.scope ? `${spec.scope}/${spec.name}` : spec.name;
|
|
147
|
+
return `npm:${pkg}@${spec.range}`;
|
|
148
|
+
}
|
|
149
|
+
const _exhaustive = spec;
|
|
150
|
+
throw new Error(`Unknown specifier kind`);
|
|
151
|
+
}
|
|
152
|
+
/** Human-readable one-liner for a specifier (used in diagnostic messages). */
|
|
153
|
+
function stringifySpec(spec) {
|
|
154
|
+
if (spec.kind === "local") {
|
|
155
|
+
return spec.path;
|
|
156
|
+
}
|
|
157
|
+
if (spec.kind === "git") {
|
|
158
|
+
return `git+${spec.repo}#${spec.tag}`;
|
|
159
|
+
}
|
|
160
|
+
if (spec.kind === "npm") {
|
|
161
|
+
const pkg = spec.scope ? `${spec.scope}/${spec.name}` : spec.name;
|
|
162
|
+
return `npm:${pkg}@${spec.range}`;
|
|
163
|
+
}
|
|
164
|
+
const _exhaustive = spec;
|
|
165
|
+
throw new Error(`Unknown specifier kind`);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Build a placeholder EffectiveProfile used only as a stub input when
|
|
169
|
+
* constructing the {@linkcode ProfileChain} shape we hand to
|
|
170
|
+
* {@linkcode mergeChain}. `mergeChain` reads only `.tiers`, so the stub
|
|
171
|
+
* contents are irrelevant.
|
|
172
|
+
*/
|
|
173
|
+
function buildPlaceholderEffective(tiers) {
|
|
174
|
+
const leafOrigin = tiers[tiers.length - 1]?.id ?? "<unknown>";
|
|
175
|
+
return {
|
|
176
|
+
required: { value: [], origin: leafOrigin },
|
|
177
|
+
attributes: new Map(),
|
|
178
|
+
labels: { value: [], origin: leafOrigin },
|
|
179
|
+
colors: new Map(),
|
|
180
|
+
identified: {
|
|
181
|
+
required: { value: [], origin: leafOrigin },
|
|
182
|
+
attributes: new Map(),
|
|
183
|
+
traceability: new Map(),
|
|
184
|
+
},
|
|
185
|
+
referenced: {
|
|
186
|
+
required: { value: [], origin: leafOrigin },
|
|
187
|
+
attributes: new Map(),
|
|
188
|
+
traceability: new Map(),
|
|
189
|
+
},
|
|
190
|
+
types: new Map(),
|
|
191
|
+
documents: { types: new Map(), frontMatter: new Map() },
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/colors
|
|
3
|
+
*
|
|
4
|
+
* Profile-driven entry color resolution. Pure function that maps an entry
|
|
5
|
+
* and the active profile to a palette hue name (or `null` for uncolored).
|
|
6
|
+
*
|
|
7
|
+
* Lives in core/profile so both rendering layers (Typst PDF and HTML book)
|
|
8
|
+
* can call it without crossing the peer-module boundary defined in AGENTS.md.
|
|
9
|
+
*
|
|
10
|
+
* See docs/superpowers/specs/2026-05-06-profile-driven-entry-colors-design.md
|
|
11
|
+
* for the resolution table.
|
|
12
|
+
*/
|
|
13
|
+
import type { EffectiveProfile, Entry } from "../model/mod.js";
|
|
14
|
+
import { type PaletteHue } from "../model/palette.js";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the palette hue for an entry under the active profile.
|
|
17
|
+
*
|
|
18
|
+
* Returns `null` for referenced-shape entries (uncolored block).
|
|
19
|
+
* Returns a palette hue name for identified entries — using the type's
|
|
20
|
+
* declared color when available, falling back to `"blue"` otherwise.
|
|
21
|
+
*
|
|
22
|
+
* The fallback is the palette hue directly (not the `primary` semantic
|
|
23
|
+
* name) so the renderer works for files compiled without a profile.
|
|
24
|
+
*/
|
|
25
|
+
export declare function resolveEntryColor(entry: Entry, profile: EffectiveProfile | undefined): PaletteHue | null;
|
|
26
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/profile/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKpE;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,gBAAgB,GAAG,SAAS,GACpC,UAAU,GAAG,IAAI,CAmBnB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/colors
|
|
3
|
+
*
|
|
4
|
+
* Profile-driven entry color resolution. Pure function that maps an entry
|
|
5
|
+
* and the active profile to a palette hue name (or `null` for uncolored).
|
|
6
|
+
*
|
|
7
|
+
* Lives in core/profile so both rendering layers (Typst PDF and HTML book)
|
|
8
|
+
* can call it without crossing the peer-module boundary defined in AGENTS.md.
|
|
9
|
+
*
|
|
10
|
+
* See docs/superpowers/specs/2026-05-06-profile-driven-entry-colors-design.md
|
|
11
|
+
* for the resolution table.
|
|
12
|
+
*/
|
|
13
|
+
import { PALETTE_HUES } from "../model/palette.js";
|
|
14
|
+
/** Default identified-entry hue when no profile / no type color resolves. */
|
|
15
|
+
const DEFAULT_HUE = "blue";
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the palette hue for an entry under the active profile.
|
|
18
|
+
*
|
|
19
|
+
* Returns `null` for referenced-shape entries (uncolored block).
|
|
20
|
+
* Returns a palette hue name for identified entries — using the type's
|
|
21
|
+
* declared color when available, falling back to `"blue"` otherwise.
|
|
22
|
+
*
|
|
23
|
+
* The fallback is the palette hue directly (not the `primary` semantic
|
|
24
|
+
* name) so the renderer works for files compiled without a profile.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveEntryColor(entry, profile) {
|
|
27
|
+
if (entry.shape === "referenced")
|
|
28
|
+
return null;
|
|
29
|
+
if (!profile || !entry.type)
|
|
30
|
+
return DEFAULT_HUE;
|
|
31
|
+
const typeDef = profile.types.get(entry.type);
|
|
32
|
+
const colorName = typeDef?.value.color.value;
|
|
33
|
+
if (!colorName)
|
|
34
|
+
return DEFAULT_HUE;
|
|
35
|
+
const hueEntry = profile.colors.get(colorName);
|
|
36
|
+
if (!hueEntry)
|
|
37
|
+
return DEFAULT_HUE;
|
|
38
|
+
// Defense in depth: the manifest parser already enforces PALETTE_HUES, but
|
|
39
|
+
// EffectiveProfile can in principle be constructed programmatically (tests,
|
|
40
|
+
// future APIs) without going through parseManifest. Guard the cast so an
|
|
41
|
+
// invalid hue can never reach downstream interpolation.
|
|
42
|
+
const hue = hueEntry.value;
|
|
43
|
+
if (!PALETTE_HUES.includes(hue))
|
|
44
|
+
return DEFAULT_HUE;
|
|
45
|
+
return hue;
|
|
46
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/git-cache
|
|
3
|
+
*
|
|
4
|
+
* Cache + `git` CLI infrastructure for git-specifier resolution.
|
|
5
|
+
*
|
|
6
|
+
* The cache lives under `<project-root>/.markspec/cache/<sha>/` where `<sha>`
|
|
7
|
+
* is the sha256 of a canonical `(host, repo, subpath, tag)` tuple. Because
|
|
8
|
+
* the spec requires tag-only specifiers and tags are (by convention)
|
|
9
|
+
* immutable, cached content never needs refresh: either the cache directory
|
|
10
|
+
* exists and contains `markspec.yaml`, or we clone afresh.
|
|
11
|
+
*/
|
|
12
|
+
/** Components of a git specifier that contribute to the cache key. */
|
|
13
|
+
export interface GitCacheKeyInput {
|
|
14
|
+
readonly repo: string;
|
|
15
|
+
readonly subpath: string | undefined;
|
|
16
|
+
readonly tag: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Stable sha256 hex digest of the canonical `(repo, subpath, tag)` tuple.
|
|
20
|
+
* Same inputs → same digest, always.
|
|
21
|
+
*/
|
|
22
|
+
export declare function computeCacheKey(input: GitCacheKeyInput): Promise<string>;
|
|
23
|
+
/** Resolved paths for a cache-backed specifier. */
|
|
24
|
+
export interface CacheLocation {
|
|
25
|
+
/** sha256 hex key for the specifier. */
|
|
26
|
+
readonly key: string;
|
|
27
|
+
/** Absolute cache directory — where the clone lives (top-level repo). */
|
|
28
|
+
readonly dir: string;
|
|
29
|
+
/** Absolute path of the `markspec.yaml` the resolver needs to read. */
|
|
30
|
+
readonly manifestPath: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Compute the cache location for a git specifier relative to a project root.
|
|
34
|
+
*/
|
|
35
|
+
export declare function computeCacheLocation(projectRoot: string, input: GitCacheKeyInput): Promise<CacheLocation>;
|
|
36
|
+
/** Result of running a git subcommand — captures exit code + output streams. */
|
|
37
|
+
export interface RunGitResult {
|
|
38
|
+
readonly code: number;
|
|
39
|
+
readonly stdout: string;
|
|
40
|
+
readonly stderr: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Inject this into the resolver to stub git invocations in unit tests.
|
|
44
|
+
* Production code uses {@linkcode defaultRunGit}.
|
|
45
|
+
*/
|
|
46
|
+
export type RunGit = (args: readonly string[], cwd?: string) => Promise<RunGitResult>;
|
|
47
|
+
/**
|
|
48
|
+
* Default implementation backed by `Deno.Command("git", …)`. Captures stdout
|
|
49
|
+
* and stderr; never throws for nonzero exit — callers inspect `result.code`.
|
|
50
|
+
*
|
|
51
|
+
* Requires `--allow-run=git` at the Deno CLI level.
|
|
52
|
+
*/
|
|
53
|
+
export declare const defaultRunGit: RunGit;
|
|
54
|
+
/** Injectable appender for {@linkcode ensureCacheGitignored}. */
|
|
55
|
+
export type AppendFile = (path: string, content: string) => Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Idempotently add `.markspec/cache/` to the project's `.gitignore` if that
|
|
58
|
+
* file exists. No-op when `.gitignore` is absent.
|
|
59
|
+
*
|
|
60
|
+
* Treats `.markspec/`, `.markspec/cache`, and `.markspec/cache/` as already
|
|
61
|
+
* ignored (broadest pattern wins).
|
|
62
|
+
*
|
|
63
|
+
* @param projectRoot - Absolute path containing the `.gitignore`
|
|
64
|
+
* @param readFile - Abstraction matching `core/config/mod.ts` `ReadFile`
|
|
65
|
+
* @param appendFile - Abstraction that appends a string to a file
|
|
66
|
+
*/
|
|
67
|
+
export declare function ensureCacheGitignored(projectRoot: string, readFile: (path: string) => Promise<string | undefined>, appendFile: AppendFile): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Default `AppendFile` backed by `Deno.writeTextFile` with `{ append: true }`.
|
|
70
|
+
* Requires `--allow-write`.
|
|
71
|
+
*/
|
|
72
|
+
export declare const defaultAppendFile: AppendFile;
|
|
73
|
+
//# sourceMappingURL=git-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-cache.d.ts","sourceRoot":"","sources":["../../src/profile/git-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,MAAM,CAAC,CAWjB;AAED,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,aAAa,CAAC,CAOxB;AAED,gFAAgF;AAChF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,CACnB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,CAAC,EAAE,MAAM,KACT,OAAO,CAAC,YAAY,CAAC,CAAC;AAI3B;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAa3B,CAAC;AAEF,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,EACvD,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAE/B,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/git-cache
|
|
3
|
+
*
|
|
4
|
+
* Cache + `git` CLI infrastructure for git-specifier resolution.
|
|
5
|
+
*
|
|
6
|
+
* The cache lives under `<project-root>/.markspec/cache/<sha>/` where `<sha>`
|
|
7
|
+
* is the sha256 of a canonical `(host, repo, subpath, tag)` tuple. Because
|
|
8
|
+
* the spec requires tag-only specifiers and tags are (by convention)
|
|
9
|
+
* immutable, cached content never needs refresh: either the cache directory
|
|
10
|
+
* exists and contains `markspec.yaml`, or we clone afresh.
|
|
11
|
+
*/
|
|
12
|
+
import { join } from "@std/path";
|
|
13
|
+
/**
|
|
14
|
+
* Stable sha256 hex digest of the canonical `(repo, subpath, tag)` tuple.
|
|
15
|
+
* Same inputs → same digest, always.
|
|
16
|
+
*/
|
|
17
|
+
export async function computeCacheKey(input) {
|
|
18
|
+
const canonical = JSON.stringify([
|
|
19
|
+
input.repo,
|
|
20
|
+
input.subpath ?? "",
|
|
21
|
+
input.tag,
|
|
22
|
+
]);
|
|
23
|
+
const bytes = new TextEncoder().encode(canonical);
|
|
24
|
+
const digest = await crypto.subtle.digest("SHA-256", bytes);
|
|
25
|
+
return [...new Uint8Array(digest)]
|
|
26
|
+
.map((b) => b.toString(16).padStart(2, "0"))
|
|
27
|
+
.join("");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Compute the cache location for a git specifier relative to a project root.
|
|
31
|
+
*/
|
|
32
|
+
export async function computeCacheLocation(projectRoot, input) {
|
|
33
|
+
const key = await computeCacheKey(input);
|
|
34
|
+
const dir = join(projectRoot, ".markspec", "cache", key);
|
|
35
|
+
const manifestPath = input.subpath !== undefined
|
|
36
|
+
? join(dir, input.subpath, "markspec.yaml")
|
|
37
|
+
: join(dir, "markspec.yaml");
|
|
38
|
+
return { key, dir, manifestPath };
|
|
39
|
+
}
|
|
40
|
+
const textDecoder = new TextDecoder();
|
|
41
|
+
/**
|
|
42
|
+
* Default implementation backed by `Deno.Command("git", …)`. Captures stdout
|
|
43
|
+
* and stderr; never throws for nonzero exit — callers inspect `result.code`.
|
|
44
|
+
*
|
|
45
|
+
* Requires `--allow-run=git` at the Deno CLI level.
|
|
46
|
+
*/
|
|
47
|
+
export const defaultRunGit = async (args, cwd) => {
|
|
48
|
+
const cmd = new Deno.Command("git", {
|
|
49
|
+
args: [...args],
|
|
50
|
+
cwd,
|
|
51
|
+
stdout: "piped",
|
|
52
|
+
stderr: "piped",
|
|
53
|
+
});
|
|
54
|
+
const { code, stdout, stderr } = await cmd.output();
|
|
55
|
+
return {
|
|
56
|
+
code,
|
|
57
|
+
stdout: textDecoder.decode(stdout),
|
|
58
|
+
stderr: textDecoder.decode(stderr),
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Idempotently add `.markspec/cache/` to the project's `.gitignore` if that
|
|
63
|
+
* file exists. No-op when `.gitignore` is absent.
|
|
64
|
+
*
|
|
65
|
+
* Treats `.markspec/`, `.markspec/cache`, and `.markspec/cache/` as already
|
|
66
|
+
* ignored (broadest pattern wins).
|
|
67
|
+
*
|
|
68
|
+
* @param projectRoot - Absolute path containing the `.gitignore`
|
|
69
|
+
* @param readFile - Abstraction matching `core/config/mod.ts` `ReadFile`
|
|
70
|
+
* @param appendFile - Abstraction that appends a string to a file
|
|
71
|
+
*/
|
|
72
|
+
export async function ensureCacheGitignored(projectRoot, readFile, appendFile) {
|
|
73
|
+
const gitignorePath = join(projectRoot, ".gitignore");
|
|
74
|
+
const current = await readFile(gitignorePath);
|
|
75
|
+
if (current === undefined) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// Treat any of these patterns as "already ignored" and skip.
|
|
79
|
+
const lines = current.split("\n").map((l) => l.trim());
|
|
80
|
+
const ignored = lines.some((l) => l === ".markspec/" ||
|
|
81
|
+
l === ".markspec/cache/" ||
|
|
82
|
+
l === ".markspec/cache");
|
|
83
|
+
if (ignored) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const needsLeadingNewline = current.length > 0 && !current.endsWith("\n");
|
|
87
|
+
const content = (needsLeadingNewline ? "\n" : "") + ".markspec/cache/\n";
|
|
88
|
+
await appendFile(gitignorePath, content);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Default `AppendFile` backed by `Deno.writeTextFile` with `{ append: true }`.
|
|
92
|
+
* Requires `--allow-write`.
|
|
93
|
+
*/
|
|
94
|
+
export const defaultAppendFile = async (path, content) => {
|
|
95
|
+
await Deno.writeTextFile(path, content, { append: true });
|
|
96
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/load
|
|
3
|
+
*
|
|
4
|
+
* The CLI-facing profile loader. Discovers `.markspec.yaml`, validates it,
|
|
5
|
+
* resolves the active profile specifier, loads the chain, and surfaces any
|
|
6
|
+
* diagnostics. Single entry point consumed by every profile-aware `markspec`
|
|
7
|
+
* subcommand.
|
|
8
|
+
*/
|
|
9
|
+
import type { ReadFile } from "../config/mod.js";
|
|
10
|
+
import type { Diagnostic, ProfileChain } from "../model/mod.js";
|
|
11
|
+
/** Result of `loadProfileForCommand`. */
|
|
12
|
+
export interface LoadProfileForCommandResult {
|
|
13
|
+
/** The active profile chain, or `null` when no profile is declared / resolvable. */
|
|
14
|
+
readonly chain: ProfileChain | null;
|
|
15
|
+
/** All diagnostics gathered during loading. */
|
|
16
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Load the active profile chain for the project at `projectRoot`.
|
|
20
|
+
*
|
|
21
|
+
* Discovery: looks for `.markspec.yaml` at the project root (sibling of
|
|
22
|
+
* `project.yaml`). Absent or empty → `chain: null` (core-only mode).
|
|
23
|
+
*
|
|
24
|
+
* v1 constraint: at most **one** content-bearing profile per project. Two or
|
|
25
|
+
* more entries in `profiles:` produces `PROFILE-LOAD-006` and no chain.
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadProfileForCommand(projectRoot: string, readFile: ReadFile): Promise<LoadProfileForCommandResult>;
|
|
28
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/profile/load.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGhE,yCAAyC;AACzC,MAAM,WAAW,2BAA2B;IAC1C,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAAC,2BAA2B,CAAC,CAuCtC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/load
|
|
3
|
+
*
|
|
4
|
+
* The CLI-facing profile loader. Discovers `.markspec.yaml`, validates it,
|
|
5
|
+
* resolves the active profile specifier, loads the chain, and surfaces any
|
|
6
|
+
* diagnostics. Single entry point consumed by every profile-aware `markspec`
|
|
7
|
+
* subcommand.
|
|
8
|
+
*/
|
|
9
|
+
import { join } from "@std/path";
|
|
10
|
+
import { MARKSPEC_YAML_FILENAME, parseMarkspecYaml, readMarkspecYaml, } from "../config/markspec.js";
|
|
11
|
+
import { loadChain } from "./chain.js";
|
|
12
|
+
/**
|
|
13
|
+
* Load the active profile chain for the project at `projectRoot`.
|
|
14
|
+
*
|
|
15
|
+
* Discovery: looks for `.markspec.yaml` at the project root (sibling of
|
|
16
|
+
* `project.yaml`). Absent or empty → `chain: null` (core-only mode).
|
|
17
|
+
*
|
|
18
|
+
* v1 constraint: at most **one** content-bearing profile per project. Two or
|
|
19
|
+
* more entries in `profiles:` produces `PROFILE-LOAD-006` and no chain.
|
|
20
|
+
*/
|
|
21
|
+
export async function loadProfileForCommand(projectRoot, readFile) {
|
|
22
|
+
const diagnostics = [];
|
|
23
|
+
const rawYaml = await readMarkspecYaml(projectRoot, readFile);
|
|
24
|
+
if (rawYaml === null) {
|
|
25
|
+
return { chain: null, diagnostics };
|
|
26
|
+
}
|
|
27
|
+
const sourcePath = join(projectRoot, MARKSPEC_YAML_FILENAME);
|
|
28
|
+
const parsed = parseMarkspecYaml(rawYaml, sourcePath);
|
|
29
|
+
diagnostics.push(...parsed.diagnostics);
|
|
30
|
+
if (!parsed.config) {
|
|
31
|
+
return { chain: null, diagnostics };
|
|
32
|
+
}
|
|
33
|
+
const { profiles } = parsed.config;
|
|
34
|
+
if (profiles.length === 0) {
|
|
35
|
+
return { chain: null, diagnostics };
|
|
36
|
+
}
|
|
37
|
+
if (profiles.length > 1) {
|
|
38
|
+
diagnostics.push({
|
|
39
|
+
code: "PROFILE-LOAD-006",
|
|
40
|
+
severity: "error",
|
|
41
|
+
message: `.markspec.yaml declares ${profiles.length} profiles; ` +
|
|
42
|
+
"v1 accepts at most one content-bearing profile per project",
|
|
43
|
+
location: { file: sourcePath, line: 1, column: 1 },
|
|
44
|
+
});
|
|
45
|
+
return { chain: null, diagnostics };
|
|
46
|
+
}
|
|
47
|
+
const chainResult = await loadChain(profiles[0], projectRoot, projectRoot, readFile);
|
|
48
|
+
diagnostics.push(...chainResult.diagnostics);
|
|
49
|
+
return { chain: chainResult.chain, diagnostics };
|
|
50
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module core/profile/manifest
|
|
3
|
+
*
|
|
4
|
+
* Parse a markspec.yaml manifest string into a validated ProfileManifest.
|
|
5
|
+
* Emits PROFILE-LOAD-002 for YAML parse errors and PROFILE-LOAD-003 for
|
|
6
|
+
* schema violations.
|
|
7
|
+
*/
|
|
8
|
+
import type { Diagnostic, ProfileManifest } from "../model/mod.js";
|
|
9
|
+
/** Result of parsing a profile manifest. */
|
|
10
|
+
export interface ParseManifestResult {
|
|
11
|
+
readonly manifest: ProfileManifest | null;
|
|
12
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Parse and validate a raw markspec.yaml string.
|
|
16
|
+
*
|
|
17
|
+
* @param rawYaml - File contents as a UTF-8 string
|
|
18
|
+
* @param sourcePath - Optional file path for diagnostic location
|
|
19
|
+
*/
|
|
20
|
+
export declare function parseManifest(rawYaml: string, sourcePath?: string): ParseManifestResult;
|
|
21
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/profile/manifest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAyGnE,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CAC7C;AA4tBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,UAAU,SAAoB,GAC7B,mBAAmB,CAkNrB"}
|