@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,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/profile/git-cache
|
|
4
|
+
*
|
|
5
|
+
* Cache + `git` CLI infrastructure for git-specifier resolution.
|
|
6
|
+
*
|
|
7
|
+
* The cache lives under `<project-root>/.markspec/cache/<sha>/` where `<sha>`
|
|
8
|
+
* is the sha256 of a canonical `(host, repo, subpath, tag)` tuple. Because
|
|
9
|
+
* the spec requires tag-only specifiers and tags are (by convention)
|
|
10
|
+
* immutable, cached content never needs refresh: either the cache directory
|
|
11
|
+
* exists and contains `markspec.yaml`, or we clone afresh.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.defaultAppendFile = exports.defaultRunGit = void 0;
|
|
15
|
+
exports.computeCacheKey = computeCacheKey;
|
|
16
|
+
exports.computeCacheLocation = computeCacheLocation;
|
|
17
|
+
exports.ensureCacheGitignored = ensureCacheGitignored;
|
|
18
|
+
const path_1 = require("@std/path");
|
|
19
|
+
/**
|
|
20
|
+
* Stable sha256 hex digest of the canonical `(repo, subpath, tag)` tuple.
|
|
21
|
+
* Same inputs → same digest, always.
|
|
22
|
+
*/
|
|
23
|
+
async function computeCacheKey(input) {
|
|
24
|
+
const canonical = JSON.stringify([
|
|
25
|
+
input.repo,
|
|
26
|
+
input.subpath ?? "",
|
|
27
|
+
input.tag,
|
|
28
|
+
]);
|
|
29
|
+
const bytes = new TextEncoder().encode(canonical);
|
|
30
|
+
const digest = await crypto.subtle.digest("SHA-256", bytes);
|
|
31
|
+
return [...new Uint8Array(digest)]
|
|
32
|
+
.map((b) => b.toString(16).padStart(2, "0"))
|
|
33
|
+
.join("");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Compute the cache location for a git specifier relative to a project root.
|
|
37
|
+
*/
|
|
38
|
+
async function computeCacheLocation(projectRoot, input) {
|
|
39
|
+
const key = await computeCacheKey(input);
|
|
40
|
+
const dir = (0, path_1.join)(projectRoot, ".markspec", "cache", key);
|
|
41
|
+
const manifestPath = input.subpath !== undefined
|
|
42
|
+
? (0, path_1.join)(dir, input.subpath, "markspec.yaml")
|
|
43
|
+
: (0, path_1.join)(dir, "markspec.yaml");
|
|
44
|
+
return { key, dir, manifestPath };
|
|
45
|
+
}
|
|
46
|
+
const textDecoder = new TextDecoder();
|
|
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
|
+
const defaultRunGit = async (args, cwd) => {
|
|
54
|
+
const cmd = new Deno.Command("git", {
|
|
55
|
+
args: [...args],
|
|
56
|
+
cwd,
|
|
57
|
+
stdout: "piped",
|
|
58
|
+
stderr: "piped",
|
|
59
|
+
});
|
|
60
|
+
const { code, stdout, stderr } = await cmd.output();
|
|
61
|
+
return {
|
|
62
|
+
code,
|
|
63
|
+
stdout: textDecoder.decode(stdout),
|
|
64
|
+
stderr: textDecoder.decode(stderr),
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
exports.defaultRunGit = defaultRunGit;
|
|
68
|
+
/**
|
|
69
|
+
* Idempotently add `.markspec/cache/` to the project's `.gitignore` if that
|
|
70
|
+
* file exists. No-op when `.gitignore` is absent.
|
|
71
|
+
*
|
|
72
|
+
* Treats `.markspec/`, `.markspec/cache`, and `.markspec/cache/` as already
|
|
73
|
+
* ignored (broadest pattern wins).
|
|
74
|
+
*
|
|
75
|
+
* @param projectRoot - Absolute path containing the `.gitignore`
|
|
76
|
+
* @param readFile - Abstraction matching `core/config/mod.ts` `ReadFile`
|
|
77
|
+
* @param appendFile - Abstraction that appends a string to a file
|
|
78
|
+
*/
|
|
79
|
+
async function ensureCacheGitignored(projectRoot, readFile, appendFile) {
|
|
80
|
+
const gitignorePath = (0, path_1.join)(projectRoot, ".gitignore");
|
|
81
|
+
const current = await readFile(gitignorePath);
|
|
82
|
+
if (current === undefined) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
// Treat any of these patterns as "already ignored" and skip.
|
|
86
|
+
const lines = current.split("\n").map((l) => l.trim());
|
|
87
|
+
const ignored = lines.some((l) => l === ".markspec/" ||
|
|
88
|
+
l === ".markspec/cache/" ||
|
|
89
|
+
l === ".markspec/cache");
|
|
90
|
+
if (ignored) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const needsLeadingNewline = current.length > 0 && !current.endsWith("\n");
|
|
94
|
+
const content = (needsLeadingNewline ? "\n" : "") + ".markspec/cache/\n";
|
|
95
|
+
await appendFile(gitignorePath, content);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Default `AppendFile` backed by `Deno.writeTextFile` with `{ append: true }`.
|
|
99
|
+
* Requires `--allow-write`.
|
|
100
|
+
*/
|
|
101
|
+
const defaultAppendFile = async (path, content) => {
|
|
102
|
+
await Deno.writeTextFile(path, content, { append: true });
|
|
103
|
+
};
|
|
104
|
+
exports.defaultAppendFile = defaultAppendFile;
|
|
@@ -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,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @module core/profile/load
|
|
4
|
+
*
|
|
5
|
+
* The CLI-facing profile loader. Discovers `.markspec.yaml`, validates it,
|
|
6
|
+
* resolves the active profile specifier, loads the chain, and surfaces any
|
|
7
|
+
* diagnostics. Single entry point consumed by every profile-aware `markspec`
|
|
8
|
+
* subcommand.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.loadProfileForCommand = loadProfileForCommand;
|
|
12
|
+
const path_1 = require("@std/path");
|
|
13
|
+
const markspec_js_1 = require("../config/markspec.js");
|
|
14
|
+
const chain_js_1 = require("./chain.js");
|
|
15
|
+
/**
|
|
16
|
+
* Load the active profile chain for the project at `projectRoot`.
|
|
17
|
+
*
|
|
18
|
+
* Discovery: looks for `.markspec.yaml` at the project root (sibling of
|
|
19
|
+
* `project.yaml`). Absent or empty → `chain: null` (core-only mode).
|
|
20
|
+
*
|
|
21
|
+
* v1 constraint: at most **one** content-bearing profile per project. Two or
|
|
22
|
+
* more entries in `profiles:` produces `PROFILE-LOAD-006` and no chain.
|
|
23
|
+
*/
|
|
24
|
+
async function loadProfileForCommand(projectRoot, readFile) {
|
|
25
|
+
const diagnostics = [];
|
|
26
|
+
const rawYaml = await (0, markspec_js_1.readMarkspecYaml)(projectRoot, readFile);
|
|
27
|
+
if (rawYaml === null) {
|
|
28
|
+
return { chain: null, diagnostics };
|
|
29
|
+
}
|
|
30
|
+
const sourcePath = (0, path_1.join)(projectRoot, markspec_js_1.MARKSPEC_YAML_FILENAME);
|
|
31
|
+
const parsed = (0, markspec_js_1.parseMarkspecYaml)(rawYaml, sourcePath);
|
|
32
|
+
diagnostics.push(...parsed.diagnostics);
|
|
33
|
+
if (!parsed.config) {
|
|
34
|
+
return { chain: null, diagnostics };
|
|
35
|
+
}
|
|
36
|
+
const { profiles } = parsed.config;
|
|
37
|
+
if (profiles.length === 0) {
|
|
38
|
+
return { chain: null, diagnostics };
|
|
39
|
+
}
|
|
40
|
+
if (profiles.length > 1) {
|
|
41
|
+
diagnostics.push({
|
|
42
|
+
code: "PROFILE-LOAD-006",
|
|
43
|
+
severity: "error",
|
|
44
|
+
message: `.markspec.yaml declares ${profiles.length} profiles; ` +
|
|
45
|
+
"v1 accepts at most one content-bearing profile per project",
|
|
46
|
+
location: { file: sourcePath, line: 1, column: 1 },
|
|
47
|
+
});
|
|
48
|
+
return { chain: null, diagnostics };
|
|
49
|
+
}
|
|
50
|
+
const chainResult = await (0, chain_js_1.loadChain)(profiles[0], projectRoot, projectRoot, readFile);
|
|
51
|
+
diagnostics.push(...chainResult.diagnostics);
|
|
52
|
+
return { chain: chainResult.chain, diagnostics };
|
|
53
|
+
}
|
|
@@ -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"}
|