@openuji/speculator 0.5.3 → 0.6.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/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/parse/__tests__/assembler.test.js +29 -3
- package/dist/parse/__tests__/assembler.test.js.map +1 -1
- package/dist/parse/__tests__/html-in-markdown.test.d.ts +2 -0
- package/dist/parse/__tests__/html-in-markdown.test.d.ts.map +1 -0
- package/dist/parse/__tests__/html-in-markdown.test.js +83 -0
- package/dist/parse/__tests__/html-in-markdown.test.js.map +1 -0
- package/dist/parse/__tests__/pipeline.test.js +5 -11
- package/dist/parse/__tests__/pipeline.test.js.map +1 -1
- package/dist/parse/__tests__/respec.test.js +9 -9
- package/dist/parse/__tests__/respec.test.js.map +1 -1
- package/dist/parse/__tests__/shorthands.test.d.ts +5 -0
- package/dist/parse/__tests__/shorthands.test.d.ts.map +1 -0
- package/dist/parse/__tests__/shorthands.test.js +96 -0
- package/dist/parse/__tests__/shorthands.test.js.map +1 -0
- package/dist/parse/assembler.d.ts.map +1 -1
- package/dist/parse/assembler.js +35 -0
- package/dist/parse/assembler.js.map +1 -1
- package/dist/parse/html/InlinesHtmlParser.d.ts +2 -2
- package/dist/parse/html/InlinesHtmlParser.d.ts.map +1 -1
- package/dist/parse/html/InlinesHtmlParser.js +7 -75
- package/dist/parse/html/InlinesHtmlParser.js.map +1 -1
- package/dist/parse/html/ReferenceHtmlParser.d.ts +9 -0
- package/dist/parse/html/ReferenceHtmlParser.d.ts.map +1 -0
- package/dist/parse/html/ReferenceHtmlParser.js +128 -0
- package/dist/parse/html/ReferenceHtmlParser.js.map +1 -0
- package/dist/parse/html/parser.d.ts +1 -12
- package/dist/parse/html/parser.d.ts.map +1 -1
- package/dist/parse/html/parser.js +20 -49
- package/dist/parse/html/parser.js.map +1 -1
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/index.d.ts.map +1 -1
- package/dist/parse/index.js.map +1 -1
- package/dist/parse/markdown/HtmlBlockMarkdownParser.d.ts +13 -0
- package/dist/parse/markdown/HtmlBlockMarkdownParser.d.ts.map +1 -0
- package/dist/parse/markdown/HtmlBlockMarkdownParser.js +62 -0
- package/dist/parse/markdown/HtmlBlockMarkdownParser.js.map +1 -0
- package/dist/parse/markdown/HtmlInlinesMarkdownParser.d.ts +12 -0
- package/dist/parse/markdown/HtmlInlinesMarkdownParser.d.ts.map +1 -0
- package/dist/parse/markdown/HtmlInlinesMarkdownParser.js +187 -0
- package/dist/parse/markdown/HtmlInlinesMarkdownParser.js.map +1 -0
- package/dist/parse/markdown/HtmlParagraphMarkdownParser.d.ts +15 -0
- package/dist/parse/markdown/HtmlParagraphMarkdownParser.d.ts.map +1 -0
- package/dist/parse/markdown/HtmlParagraphMarkdownParser.js +67 -0
- package/dist/parse/markdown/HtmlParagraphMarkdownParser.js.map +1 -0
- package/dist/parse/markdown/ShorthandsMarkdownParser.d.ts +29 -0
- package/dist/parse/markdown/ShorthandsMarkdownParser.d.ts.map +1 -0
- package/dist/parse/markdown/ShorthandsMarkdownParser.js +198 -0
- package/dist/parse/markdown/ShorthandsMarkdownParser.js.map +1 -0
- package/dist/parse/markdown/parser.d.ts +3 -14
- package/dist/parse/markdown/parser.d.ts.map +1 -1
- package/dist/parse/markdown/parser.js +76 -49
- package/dist/parse/markdown/parser.js.map +1 -1
- package/dist/parse/parsers.d.ts +4 -1
- package/dist/parse/parsers.d.ts.map +1 -1
- package/dist/parse/parsers.js +13 -3
- package/dist/parse/parsers.js.map +1 -1
- package/dist/parse/pipeline.d.ts.map +1 -1
- package/dist/parse/pipeline.js +9 -21
- package/dist/parse/pipeline.js.map +1 -1
- package/dist/parse/registry.d.ts +53 -90
- package/dist/parse/registry.d.ts.map +1 -1
- package/dist/parse/registry.js +39 -58
- package/dist/parse/registry.js.map +1 -1
- package/dist/parse/types.d.ts +1 -23
- package/dist/parse/types.d.ts.map +1 -1
- package/dist/parse/types.js.map +1 -1
- package/dist/parse/utils/hast-utils.d.ts +33 -0
- package/dist/parse/utils/hast-utils.d.ts.map +1 -0
- package/dist/parse/utils/hast-utils.js +122 -0
- package/dist/parse/utils/hast-utils.js.map +1 -0
- package/dist/pipeline/__tests__/pipeline.test.js +1 -2
- package/dist/pipeline/__tests__/pipeline.test.js.map +1 -1
- package/dist/pipeline/__tests__/workspace.test.js +2 -1
- package/dist/pipeline/__tests__/workspace.test.js.map +1 -1
- package/dist/pipeline/runner.d.ts.map +1 -1
- package/dist/pipeline/runner.js +16 -12
- package/dist/pipeline/runner.js.map +1 -1
- package/dist/postprocess/__tests__/dfn-resolve.test.d.ts +0 -3
- package/dist/postprocess/__tests__/dfn-resolve.test.d.ts.map +1 -1
- package/dist/postprocess/__tests__/dfn-resolve.test.js +147 -127
- package/dist/postprocess/__tests__/dfn-resolve.test.js.map +1 -1
- package/dist/postprocess/__tests__/section-id.test.js +2 -1
- package/dist/postprocess/__tests__/section-id.test.js.map +1 -1
- package/dist/postprocess/__tests__/toc.test.js +3 -1
- package/dist/postprocess/__tests__/toc.test.js.map +1 -1
- package/dist/postprocess/index.d.ts +1 -1
- package/dist/postprocess/index.d.ts.map +1 -1
- package/dist/postprocess/index.js +3 -3
- package/dist/postprocess/index.js.map +1 -1
- package/dist/postprocess/plugins/citation-resolve.d.ts +8 -0
- package/dist/postprocess/plugins/citation-resolve.d.ts.map +1 -0
- package/dist/postprocess/plugins/citation-resolve.js +33 -0
- package/dist/postprocess/plugins/citation-resolve.js.map +1 -0
- package/dist/postprocess/plugins/dfn-index.d.ts.map +1 -1
- package/dist/postprocess/plugins/dfn-index.js +1 -0
- package/dist/postprocess/plugins/dfn-index.js.map +1 -1
- package/dist/postprocess/plugins/reference-resolve.d.ts +4 -4
- package/dist/postprocess/plugins/reference-resolve.d.ts.map +1 -1
- package/dist/postprocess/plugins/reference-resolve.js +28 -7
- package/dist/postprocess/plugins/reference-resolve.js.map +1 -1
- package/dist/postprocess/plugins/section-id.d.ts.map +1 -1
- package/dist/postprocess/plugins/section-id.js +8 -4
- package/dist/postprocess/plugins/section-id.js.map +1 -1
- package/dist/postprocess/plugins/toc.d.ts.map +1 -1
- package/dist/postprocess/plugins/toc.js +11 -4
- package/dist/postprocess/plugins/toc.js.map +1 -1
- package/dist/postprocess/walk-ast.d.ts.map +1 -1
- package/dist/postprocess/walk-ast.js +4 -1
- package/dist/postprocess/walk-ast.js.map +1 -1
- package/dist/preprocess/__tests__/pipeline.test.js +39 -47
- package/dist/preprocess/__tests__/pipeline.test.js.map +1 -1
- package/dist/preprocess/__tests__/resolver.test.js +38 -40
- package/dist/preprocess/__tests__/resolver.test.js.map +1 -1
- package/dist/preprocess/config/__tests__/rules.test.d.ts +2 -0
- package/dist/preprocess/config/__tests__/rules.test.d.ts.map +1 -0
- package/dist/preprocess/config/__tests__/rules.test.js +223 -0
- package/dist/preprocess/config/__tests__/rules.test.js.map +1 -0
- package/dist/preprocess/config/doc-config.js +2 -2
- package/dist/preprocess/config/doc-config.js.map +1 -1
- package/dist/preprocess/config/index.d.ts +3 -4
- package/dist/preprocess/config/index.d.ts.map +1 -1
- package/dist/preprocess/config/index.js +2 -2
- package/dist/preprocess/config/index.js.map +1 -1
- package/dist/preprocess/config/loader.d.ts +12 -48
- package/dist/preprocess/config/loader.d.ts.map +1 -1
- package/dist/preprocess/config/loader.js +23 -13
- package/dist/preprocess/config/loader.js.map +1 -1
- package/dist/preprocess/config/normalize.d.ts +11 -10
- package/dist/preprocess/config/normalize.d.ts.map +1 -1
- package/dist/preprocess/config/normalize.js +61 -18
- package/dist/preprocess/config/normalize.js.map +1 -1
- package/dist/preprocess/config/types.d.ts +57 -22
- package/dist/preprocess/config/types.d.ts.map +1 -1
- package/dist/preprocess/include/index.d.ts +1 -1
- package/dist/preprocess/include/index.d.ts.map +1 -1
- package/dist/preprocess/include/index.js +1 -1
- package/dist/preprocess/include/index.js.map +1 -1
- package/dist/preprocess/include/resolver.d.ts +14 -8
- package/dist/preprocess/include/resolver.d.ts.map +1 -1
- package/dist/preprocess/include/resolver.js +27 -18
- package/dist/preprocess/include/resolver.js.map +1 -1
- package/dist/preprocess/index.d.ts +6 -6
- package/dist/preprocess/index.d.ts.map +1 -1
- package/dist/preprocess/index.js +4 -4
- package/dist/preprocess/index.js.map +1 -1
- package/dist/preprocess/pipeline.d.ts +20 -17
- package/dist/preprocess/pipeline.d.ts.map +1 -1
- package/dist/preprocess/pipeline.js +45 -52
- package/dist/preprocess/pipeline.js.map +1 -1
- package/dist/preprocess/types.d.ts +33 -41
- package/dist/preprocess/types.d.ts.map +1 -1
- package/dist/preprocess/types.js +0 -6
- package/dist/preprocess/types.js.map +1 -1
- package/dist/types/ast.generated.d.ts +84 -34
- package/dist/types/ast.generated.d.ts.map +1 -1
- package/dist/types/ast.generated.js +9 -3
- package/dist/types/ast.generated.js.map +1 -1
- package/dist/workspace/__tests__/sort.test.js +8 -8
- package/dist/workspace/__tests__/sort.test.js.map +1 -1
- package/dist/workspace/builder.d.ts +23 -0
- package/dist/workspace/builder.d.ts.map +1 -0
- package/dist/workspace/builder.js +50 -0
- package/dist/workspace/builder.js.map +1 -0
- package/dist/workspace/index.d.ts +2 -0
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -0
- package/dist/workspace/index.js.map +1 -1
- package/package.json +1 -2
- package/schema/spec-ast.schema.json +161 -68
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Config Loader
|
|
3
3
|
*
|
|
4
|
-
* Loads
|
|
4
|
+
* Loads config.json files for specifications.
|
|
5
5
|
*/
|
|
6
|
-
import { createDiagnostic } from '#src/preprocess/types';
|
|
7
6
|
import { isFileNotFoundError } from '#src/file-provider/types';
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* Error thrown when config loading fails
|
|
9
|
+
*/
|
|
10
|
+
export class ConfigLoadError extends Error {
|
|
11
|
+
code;
|
|
12
|
+
path;
|
|
13
|
+
constructor(message, code, path) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.code = code;
|
|
16
|
+
this.path = path;
|
|
17
|
+
this.name = 'ConfigLoadError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Load a document configuration file (config.json)
|
|
10
22
|
*
|
|
11
23
|
* @param fileProvider - File provider to read from
|
|
12
24
|
* @param configPath - Path to config file
|
|
13
|
-
* @returns Parsed
|
|
25
|
+
* @returns Parsed DocumentConfig
|
|
26
|
+
* @throws ConfigLoadError if loading or parsing fails
|
|
14
27
|
*/
|
|
15
|
-
export async function
|
|
16
|
-
const diagnostics = [];
|
|
28
|
+
export async function loadConfig(fileProvider, configPath) {
|
|
17
29
|
const canonicalPath = fileProvider.canonicalize(configPath);
|
|
18
30
|
let content;
|
|
19
31
|
try {
|
|
@@ -21,20 +33,18 @@ export async function loadRespecConfig(fileProvider, configPath) {
|
|
|
21
33
|
}
|
|
22
34
|
catch (error) {
|
|
23
35
|
if (isFileNotFoundError(error)) {
|
|
24
|
-
|
|
36
|
+
throw new ConfigLoadError(`Configuration file not found: ${canonicalPath}`, 'config-not-found', canonicalPath);
|
|
25
37
|
}
|
|
26
38
|
else {
|
|
27
|
-
|
|
39
|
+
throw new ConfigLoadError(`Failed to read configuration: ${error instanceof Error ? error.message : String(error)}`, 'config-parse-error', canonicalPath);
|
|
28
40
|
}
|
|
29
|
-
return { diagnostics };
|
|
30
41
|
}
|
|
31
42
|
try {
|
|
32
43
|
const config = JSON.parse(content);
|
|
33
|
-
return
|
|
44
|
+
return config;
|
|
34
45
|
}
|
|
35
46
|
catch (error) {
|
|
36
|
-
|
|
37
|
-
return { diagnostics };
|
|
47
|
+
throw new ConfigLoadError(`Invalid JSON in configuration file: ${error instanceof Error ? error.message : String(error)}`, 'config-parse-error', canonicalPath);
|
|
38
48
|
}
|
|
39
49
|
}
|
|
40
50
|
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../src/preprocess/config/loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../../src/preprocess/config/loader.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGlB;IACA;IAHpB,YACI,OAAe,EACC,IAA+C,EAC/C,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAA2C;QAC/C,SAAI,GAAJ,IAAI,CAAQ;QAG5B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAClC,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC5B,YAA0B,EAC1B,UAAkB;IAElB,MAAM,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IAE5D,IAAI,OAAe,CAAC;IACpB,IAAI,CAAC;QACD,OAAO,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,eAAe,CACrB,iCAAiC,aAAa,EAAE,EAChD,kBAAkB,EAClB,aAAa,CAChB,CAAC;QACN,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,eAAe,CACrB,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EACzF,oBAAoB,EACpB,aAAa,CAChB,CAAC;QACN,CAAC;IACL,CAAC;IAED,IAAI,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAmB,CAAC;QACrD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,MAAM,IAAI,eAAe,CACrB,uCAAuC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAC/F,oBAAoB,EACpB,aAAa,CAChB,CAAC;IACN,CAAC;AACL,CAAC"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Config Normalizer
|
|
3
3
|
*
|
|
4
|
-
* Converts raw
|
|
4
|
+
* Converts raw document configuration to normalized internal format.
|
|
5
5
|
*/
|
|
6
6
|
import type { SpecConfig } from '#src/preprocess/types';
|
|
7
|
-
import type {
|
|
7
|
+
import type { ResolvedDocumentConfig } from './types.js';
|
|
8
8
|
/**
|
|
9
|
-
* Normalize
|
|
9
|
+
* Normalize a ResolvedDocumentConfig to internal SpecConfig
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* Priority order (lowest to highest):
|
|
12
|
+
* 1. respec.* - ReSpec-compatible fallback settings
|
|
13
|
+
* 2. Root-level properties (title, lastUpdateDate, maturityLevel)
|
|
14
|
+
* 3. custom.* - Highest priority, overwrites everything
|
|
15
|
+
*
|
|
16
|
+
* @param docConfig - Resolved document config with ID
|
|
12
17
|
* @returns Normalized SpecConfig with defaults applied
|
|
13
18
|
*/
|
|
14
|
-
export declare function
|
|
15
|
-
/**
|
|
16
|
-
* Create a default empty config
|
|
17
|
-
*/
|
|
18
|
-
export declare function createDefaultConfig(): SpecConfig;
|
|
19
|
+
export declare function normalizeConfig(docConfig: ResolvedDocumentConfig): SpecConfig;
|
|
19
20
|
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/preprocess/config/normalize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/preprocess/config/normalize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAA8B,MAAM,uBAAuB,CAAC;AACpF,OAAO,KAAK,EAAE,sBAAsB,EAAkB,MAAM,YAAY,CAAC;AAwCzE;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,sBAAsB,GAAG,UAAU,CA4G7E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Config Normalizer
|
|
3
3
|
*
|
|
4
|
-
* Converts raw
|
|
4
|
+
* Converts raw document configuration to normalized internal format.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
7
|
* Normalize a raw person entry to internal format
|
|
@@ -20,15 +20,45 @@ function normalizePerson(raw) {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Map respec specStatus to maturity level
|
|
24
|
+
*/
|
|
25
|
+
function mapSpecStatusToMaturity(specStatus) {
|
|
26
|
+
const mapping = {
|
|
27
|
+
'ED': 'draft',
|
|
28
|
+
'WD': 'draft',
|
|
29
|
+
'FPWD': 'draft',
|
|
30
|
+
'LCWD': 'prerelease',
|
|
31
|
+
'CR': 'prerelease',
|
|
32
|
+
'PR': 'prerelease',
|
|
33
|
+
'REC': 'stable',
|
|
34
|
+
'NOTE': 'stable',
|
|
35
|
+
'unofficial': 'incubating',
|
|
36
|
+
'CG-DRAFT': 'incubating',
|
|
37
|
+
'CG-FINAL': 'stable',
|
|
38
|
+
};
|
|
39
|
+
return mapping[specStatus];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Normalize a ResolvedDocumentConfig to internal SpecConfig
|
|
43
|
+
*
|
|
44
|
+
* Priority order (lowest to highest):
|
|
45
|
+
* 1. respec.* - ReSpec-compatible fallback settings
|
|
46
|
+
* 2. Root-level properties (title, lastUpdateDate, maturityLevel)
|
|
47
|
+
* 3. custom.* - Highest priority, overwrites everything
|
|
24
48
|
*
|
|
25
|
-
* @param
|
|
49
|
+
* @param docConfig - Resolved document config with ID
|
|
26
50
|
* @returns Normalized SpecConfig with defaults applied
|
|
27
51
|
*/
|
|
28
|
-
export function
|
|
29
|
-
const config = {
|
|
30
|
-
|
|
31
|
-
|
|
52
|
+
export function normalizeConfig(docConfig) {
|
|
53
|
+
const config = {
|
|
54
|
+
id: docConfig.id,
|
|
55
|
+
};
|
|
56
|
+
const raw = docConfig.respec ?? {};
|
|
57
|
+
// Document metadata - Priority: root title > respec.title
|
|
58
|
+
if (docConfig.title !== undefined) {
|
|
59
|
+
config.title = docConfig.title;
|
|
60
|
+
}
|
|
61
|
+
else if (raw.title !== undefined) {
|
|
32
62
|
config.title = raw.title;
|
|
33
63
|
}
|
|
34
64
|
if (raw.shortName !== undefined) {
|
|
@@ -37,13 +67,27 @@ export function normalizeRespecConfig(raw) {
|
|
|
37
67
|
if (raw.subtitle !== undefined) {
|
|
38
68
|
config.subtitle = raw.subtitle;
|
|
39
69
|
}
|
|
40
|
-
// Status and versioning
|
|
70
|
+
// Status and versioning - specStatus is preserved as fallback
|
|
41
71
|
if (raw.specStatus !== undefined) {
|
|
42
72
|
config.status = raw.specStatus;
|
|
43
73
|
}
|
|
74
|
+
// Priority: root maturityLevel > mapped respec.specStatus
|
|
75
|
+
if (docConfig.maturityLevel !== undefined) {
|
|
76
|
+
config.maturityLevel = docConfig.maturityLevel;
|
|
77
|
+
}
|
|
78
|
+
else if (raw.specStatus !== undefined) {
|
|
79
|
+
config.maturityLevel = mapSpecStatusToMaturity(raw.specStatus);
|
|
80
|
+
}
|
|
44
81
|
if (raw.publishDate !== undefined) {
|
|
45
82
|
config.publishDate = raw.publishDate;
|
|
46
83
|
}
|
|
84
|
+
// Priority: root lastUpdateDate > respec.modificationDate
|
|
85
|
+
if (docConfig.lastUpdateDate !== undefined) {
|
|
86
|
+
config.lastUpdateDate = docConfig.lastUpdateDate;
|
|
87
|
+
}
|
|
88
|
+
else if (raw.modificationDate !== undefined) {
|
|
89
|
+
config.lastUpdateDate = raw.modificationDate;
|
|
90
|
+
}
|
|
47
91
|
if (raw.thisVersion !== undefined) {
|
|
48
92
|
config.thisVersion = raw.thisVersion;
|
|
49
93
|
}
|
|
@@ -92,15 +136,14 @@ export function normalizeRespecConfig(raw) {
|
|
|
92
136
|
if (raw.maxTocLevel !== undefined && typeof raw.maxTocLevel === 'number') {
|
|
93
137
|
config.maxTocLevel = raw.maxTocLevel;
|
|
94
138
|
}
|
|
139
|
+
// Bibliography
|
|
140
|
+
if (raw.localBiblio !== undefined) {
|
|
141
|
+
config.localBiblio = raw.localBiblio;
|
|
142
|
+
}
|
|
143
|
+
// Custom overrides - highest priority, applied last
|
|
144
|
+
if (docConfig.custom !== undefined) {
|
|
145
|
+
config.custom = docConfig.custom;
|
|
146
|
+
}
|
|
95
147
|
return config;
|
|
96
148
|
}
|
|
97
|
-
/**
|
|
98
|
-
* Create a default empty config
|
|
99
|
-
*/
|
|
100
|
-
export function createDefaultConfig() {
|
|
101
|
-
return {
|
|
102
|
-
tocEnabled: true,
|
|
103
|
-
maxTocLevel: 4,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
149
|
//# sourceMappingURL=normalize.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../../src/preprocess/config/normalize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH;;GAEG;AACH,SAAS,eAAe,CAAC,GAAmB;IACxC,mBAAmB;IACnB,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO;QACH,IAAI,EAAE,GAAG,CAAC,IA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
|
|
5
5
|
* Used to define document IDs, dependencies, and optional respec configuration.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
export type DocumentId = string;
|
|
8
|
+
export type ISODateString = `${number}-${number}-${number}`;
|
|
9
|
+
export type MaturityLevel = 'incubating' | 'draft' | 'prerelease' | 'stable';
|
|
8
10
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Located in config.json sibling to spec entry files.
|
|
11
|
+
* Raw person entry from ReSpec config
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
deps?: string[];
|
|
21
|
-
/**
|
|
22
|
-
* Optional ReSpec configuration embedded in config.json.
|
|
23
|
-
* If present, this replaces the need for a separate config.respec.json file.
|
|
24
|
-
*/
|
|
25
|
-
respec?: RawRespecConfig;
|
|
13
|
+
export interface RawPersonEntry {
|
|
14
|
+
name: string;
|
|
15
|
+
url?: string;
|
|
16
|
+
company?: string;
|
|
17
|
+
companyURL?: string;
|
|
18
|
+
mailto?: string;
|
|
19
|
+
email?: string;
|
|
26
20
|
}
|
|
27
21
|
/**
|
|
28
|
-
*
|
|
22
|
+
* Raw ReSpec configuration as embedded in config.json
|
|
29
23
|
*/
|
|
24
|
+
export interface RawRespecConfig {
|
|
25
|
+
title?: string;
|
|
26
|
+
shortName?: string;
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
specStatus?: string;
|
|
29
|
+
publishDate?: string;
|
|
30
|
+
modificationDate?: string;
|
|
31
|
+
thisVersion?: string;
|
|
32
|
+
latestVersion?: string;
|
|
33
|
+
prevVersion?: string;
|
|
34
|
+
editors?: RawPersonEntry[];
|
|
35
|
+
authors?: RawPersonEntry[];
|
|
36
|
+
abstract?: string;
|
|
37
|
+
license?: string;
|
|
38
|
+
logos?: Array<{
|
|
39
|
+
src: string;
|
|
40
|
+
alt?: string;
|
|
41
|
+
href?: string;
|
|
42
|
+
url?: string;
|
|
43
|
+
}>;
|
|
44
|
+
noTOC?: boolean;
|
|
45
|
+
maxTocLevel?: number;
|
|
46
|
+
localBiblio?: Record<string, unknown>;
|
|
47
|
+
}
|
|
30
48
|
export interface ResolvedDocumentConfig {
|
|
31
49
|
/** Document ID (from config or auto-generated) */
|
|
32
|
-
id:
|
|
50
|
+
id: DocumentId;
|
|
33
51
|
/** Dependencies (empty array if none) */
|
|
34
|
-
deps:
|
|
52
|
+
deps: DocumentId[];
|
|
53
|
+
/** Document title (core config setting, takes priority over respec.title) */
|
|
54
|
+
title?: string;
|
|
55
|
+
/** Last update date (core config setting, takes priority over respec.modificationDate) */
|
|
56
|
+
lastUpdateDate?: ISODateString;
|
|
57
|
+
/** Maturity level (core config setting, takes priority over mapped respec.specStatus) */
|
|
58
|
+
maturityLevel?: MaturityLevel;
|
|
59
|
+
/** Optional ReSpec configuration embedded in config.json */
|
|
60
|
+
respec?: RawRespecConfig;
|
|
61
|
+
/**
|
|
62
|
+
* Custom user-defined properties.
|
|
63
|
+
* Highest priority - overwrites both root and respec values.
|
|
64
|
+
*/
|
|
65
|
+
custom?: Record<string, unknown>;
|
|
35
66
|
/** Whether the ID was auto-generated */
|
|
36
67
|
autoGenerated: boolean;
|
|
37
|
-
/** Optional respec configuration if present in config.json */
|
|
38
|
-
respec?: RawRespecConfig;
|
|
39
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Raw config as read from config.json:
|
|
71
|
+
* - id and deps are optional
|
|
72
|
+
* - autoGenerated should not be user-provided, so we remove it
|
|
73
|
+
*/
|
|
74
|
+
export type DocumentConfig = Omit<Partial<ResolvedDocumentConfig>, 'autoGenerated'>;
|
|
40
75
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/preprocess/config/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,M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,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAG1E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,sBAAsB;IACrC,kDAAkD;IAClD,EAAE,EAAE,UAAU,CAAC;IAEf,yCAAyC;IACzC,IAAI,EAAE,UAAU,EAAE,CAAC;IAEnB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,0FAA0F;IAC1F,cAAc,CAAC,EAAE,aAAa,CAAC;IAE/B,yFAAyF;IACzF,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B,4DAA4D;IAC5D,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,wCAAwC;IACxC,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACxB,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,eAAe,CAAC,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { scanMarkdownIncludes } from '#src/preprocess/include/scan-markdown';
|
|
5
5
|
export { scanHtmlIncludes } from '#src/preprocess/include/scan-html';
|
|
6
|
-
export { resolveIncludes } from '#src/preprocess/include/resolver';
|
|
6
|
+
export { resolveIncludes, IncludeResolveError } from '#src/preprocess/include/resolver';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/preprocess/include/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/preprocess/include/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { scanMarkdownIncludes } from '#src/preprocess/include/scan-markdown';
|
|
5
5
|
export { scanHtmlIncludes } from '#src/preprocess/include/scan-html';
|
|
6
|
-
export { resolveIncludes } from '#src/preprocess/include/resolver';
|
|
6
|
+
export { resolveIncludes, IncludeResolveError } from '#src/preprocess/include/resolver';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/preprocess/include/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/preprocess/include/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -6,22 +6,31 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Key behaviors:
|
|
8
8
|
* - Deterministic order: includes are processed in encounter order
|
|
9
|
-
* - Cycle detection: prevents infinite loops with clear
|
|
9
|
+
* - Cycle detection: prevents infinite loops with clear errors
|
|
10
10
|
* - Content splitting: preserves sourcePos.file for each fragment
|
|
11
11
|
*/
|
|
12
12
|
import type { FileProvider } from '#src/file-provider/types';
|
|
13
|
-
import type { SourceFormat, CompositeSource
|
|
13
|
+
import type { SourceFormat, CompositeSource } from '#src/preprocess/types';
|
|
14
|
+
/**
|
|
15
|
+
* Error thrown when include resolution fails
|
|
16
|
+
*/
|
|
17
|
+
export declare class IncludeResolveError extends Error {
|
|
18
|
+
readonly code: 'include-cycle' | 'include-not-found';
|
|
19
|
+
readonly path: string;
|
|
20
|
+
constructor(message: string, code: 'include-cycle' | 'include-not-found', path: string);
|
|
21
|
+
}
|
|
14
22
|
/**
|
|
15
23
|
* Resolve all includes from an entry file
|
|
16
24
|
*
|
|
17
25
|
* @param entry - Canonical path to entry file
|
|
18
26
|
* @param entryFormat - Format of entry file (inferred if not provided)
|
|
19
27
|
* @param fileProvider - File provider for reading files
|
|
20
|
-
* @returns CompositeSource with resolved includes
|
|
28
|
+
* @returns CompositeSource with resolved includes
|
|
29
|
+
* @throws IncludeResolveError on cycle detection or file not found
|
|
21
30
|
*
|
|
22
31
|
* @example
|
|
23
32
|
* ```typescript
|
|
24
|
-
* const
|
|
33
|
+
* const source = await resolveIncludes(
|
|
25
34
|
* '/spec/format.md',
|
|
26
35
|
* 'markdown',
|
|
27
36
|
* fileProvider
|
|
@@ -33,8 +42,5 @@ import type { SourceFormat, CompositeSource, Diagnostic } from '#src/preprocess/
|
|
|
33
42
|
* }
|
|
34
43
|
* ```
|
|
35
44
|
*/
|
|
36
|
-
export declare function resolveIncludes(entry: string, entryFormat: SourceFormat | undefined, fileProvider: FileProvider): Promise<
|
|
37
|
-
source: CompositeSource;
|
|
38
|
-
diagnostics: Diagnostic[];
|
|
39
|
-
}>;
|
|
45
|
+
export declare function resolveIncludes(entry: string, entryFormat: SourceFormat | undefined, fileProvider: FileProvider): Promise<CompositeSource>;
|
|
40
46
|
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/preprocess/include/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EACR,YAAY,EAKZ,eAAe,
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/preprocess/include/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,EACR,YAAY,EAKZ,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAK/B;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;aAGtB,IAAI,EAAE,eAAe,GAAG,mBAAmB;aAC3C,IAAI,EAAE,MAAM;gBAF5B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAC3C,IAAI,EAAE,MAAM;CAKnC;AA6KD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,eAAe,CACjC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,YAAY,GAAG,SAAS,EACrC,YAAY,EAAE,YAAY,GAC3B,OAAO,CAAC,eAAe,CAAC,CAmB1B"}
|
|
@@ -6,13 +6,26 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Key behaviors:
|
|
8
8
|
* - Deterministic order: includes are processed in encounter order
|
|
9
|
-
* - Cycle detection: prevents infinite loops with clear
|
|
9
|
+
* - Cycle detection: prevents infinite loops with clear errors
|
|
10
10
|
* - Content splitting: preserves sourcePos.file for each fragment
|
|
11
11
|
*/
|
|
12
12
|
import { isFileNotFoundError } from '#src/file-provider/types';
|
|
13
|
-
import { inferFormat
|
|
13
|
+
import { inferFormat } from '#src/preprocess/types';
|
|
14
14
|
import { scanMarkdownIncludes } from '#src/preprocess/include/scan-markdown';
|
|
15
15
|
import { scanHtmlIncludes } from '#src/preprocess/include/scan-html';
|
|
16
|
+
/**
|
|
17
|
+
* Error thrown when include resolution fails
|
|
18
|
+
*/
|
|
19
|
+
export class IncludeResolveError extends Error {
|
|
20
|
+
code;
|
|
21
|
+
path;
|
|
22
|
+
constructor(message, code, path) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.code = code;
|
|
25
|
+
this.path = path;
|
|
26
|
+
this.name = 'IncludeResolveError';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
16
29
|
/**
|
|
17
30
|
* Count lines up to an offset
|
|
18
31
|
*/
|
|
@@ -37,14 +50,14 @@ function scanIncludes(content, file, format) {
|
|
|
37
50
|
* Split content at include points and recursively resolve
|
|
38
51
|
*
|
|
39
52
|
* Returns SourceUnits in document order (includes expanded in-place)
|
|
53
|
+
* @throws IncludeResolveError on cycle detection or file not found
|
|
40
54
|
*/
|
|
41
55
|
async function resolveFile(file, format, ctx) {
|
|
42
|
-
const { fileProvider, includeGraph,
|
|
56
|
+
const { fileProvider, includeGraph, activePath, visited } = ctx;
|
|
43
57
|
// Cycle detection
|
|
44
58
|
if (activePath.has(file)) {
|
|
45
59
|
const cycle = [...activePath, file];
|
|
46
|
-
|
|
47
|
-
return [];
|
|
60
|
+
throw new IncludeResolveError(`Include cycle detected: ${cycle.join(' → ')}`, 'include-cycle', file);
|
|
48
61
|
}
|
|
49
62
|
// Check if already processed (for diamond includes - A includes B and C, both include D)
|
|
50
63
|
const cached = visited.get(file);
|
|
@@ -64,12 +77,11 @@ async function resolveFile(file, format, ctx) {
|
|
|
64
77
|
}
|
|
65
78
|
catch (error) {
|
|
66
79
|
if (isFileNotFoundError(error)) {
|
|
67
|
-
|
|
80
|
+
throw new IncludeResolveError(`Included file not found: ${file}`, 'include-not-found', file);
|
|
68
81
|
}
|
|
69
82
|
else {
|
|
70
|
-
|
|
83
|
+
throw new IncludeResolveError(`Failed to read included file: ${file} - ${error instanceof Error ? error.message : String(error)}`, 'include-not-found', file);
|
|
71
84
|
}
|
|
72
|
-
return [];
|
|
73
85
|
}
|
|
74
86
|
// Cache for diamond include handling
|
|
75
87
|
visited.set(file, { content, format });
|
|
@@ -147,11 +159,12 @@ async function resolveFile(file, format, ctx) {
|
|
|
147
159
|
* @param entry - Canonical path to entry file
|
|
148
160
|
* @param entryFormat - Format of entry file (inferred if not provided)
|
|
149
161
|
* @param fileProvider - File provider for reading files
|
|
150
|
-
* @returns CompositeSource with resolved includes
|
|
162
|
+
* @returns CompositeSource with resolved includes
|
|
163
|
+
* @throws IncludeResolveError on cycle detection or file not found
|
|
151
164
|
*
|
|
152
165
|
* @example
|
|
153
166
|
* ```typescript
|
|
154
|
-
* const
|
|
167
|
+
* const source = await resolveIncludes(
|
|
155
168
|
* '/spec/format.md',
|
|
156
169
|
* 'markdown',
|
|
157
170
|
* fileProvider
|
|
@@ -169,19 +182,15 @@ export async function resolveIncludes(entry, entryFormat, fileProvider) {
|
|
|
169
182
|
const ctx = {
|
|
170
183
|
fileProvider,
|
|
171
184
|
includeGraph: new Map(),
|
|
172
|
-
diagnostics: [],
|
|
173
185
|
activePath: new Set(),
|
|
174
186
|
visited: new Map(),
|
|
175
187
|
};
|
|
176
188
|
const units = await resolveFile(canonicalEntry, format, ctx);
|
|
177
189
|
return {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
includeGraph: ctx.includeGraph,
|
|
183
|
-
},
|
|
184
|
-
diagnostics: ctx.diagnostics,
|
|
190
|
+
entryFile: canonicalEntry,
|
|
191
|
+
entryFormat: format,
|
|
192
|
+
units,
|
|
193
|
+
includeGraph: ctx.includeGraph,
|
|
185
194
|
};
|
|
186
195
|
}
|
|
187
196
|
//# sourceMappingURL=resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/preprocess/include/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/preprocess/include/resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAS/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAGtB;IACA;IAHpB,YACI,OAAe,EACC,IAA2C,EAC3C,IAAY;QAE5B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,SAAI,GAAJ,IAAI,CAAuC;QAC3C,SAAI,GAAJ,IAAI,CAAQ;QAG5B,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACtC,CAAC;CACJ;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,OAAe,EAAE,MAAc;IACnD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpD,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACtB,KAAK,EAAE,CAAC;QACZ,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,SAAS,YAAY,CAAC,OAAe,EAAE,IAAY,EAAE,MAAoB;IACrE,OAAO,MAAM,KAAK,UAAU;QACxB,CAAC,CAAC,oBA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AC;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,KAAa,EACb,WAAqC,EACrC,YAA0B;IAE1B,MAAM,cAAc,GAAG,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,MAAM,GAAG,WAAW,IAAI,WAAW,CAAC,cAAc,CAAC,CAAC;IAE1D,MAAM,GAAG,GAAmB;QACxB,YAAY;QACZ,YAAY,EAAE,IAAI,GAAG,EAAE;QACvB,UAAU,EAAE,IAAI,GAAG,EAAE;QACrB,OAAO,EAAE,IAAI,GAAG,EAAE;KACrB,CAAC;IAEF,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAE7D,OAAO;QACH,SAAS,EAAE,cAAc;QACzB,WAAW,EAAE,MAAM;QACnB,KAAK;QACL,YAAY,EAAE,GAAG,CAAC,YAAY;KACjC,CAAC;AACN,CAAC"}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* - Resolving includes to produce ordered SourceUnits
|
|
7
7
|
* - Preserving source file information for accurate error reporting
|
|
8
8
|
*/
|
|
9
|
-
export { preprocess, validateEntry } from '#src/preprocess/pipeline';
|
|
9
|
+
export { preprocess, validateEntry, PreprocessError } from '#src/preprocess/pipeline';
|
|
10
10
|
export type { PreprocessOptions } from '#src/preprocess/pipeline';
|
|
11
|
-
export type { SourceFormat, IncludeDirective, SourceUnit, IncludeGraph, IncludeEdge, CompositeSource, PersonEntry, SpecConfig, PreprocessedSpec,
|
|
12
|
-
export { inferFormat
|
|
13
|
-
export {
|
|
14
|
-
export type { RawRespecConfig, RawPersonEntry } from '#src/preprocess/config/index';
|
|
15
|
-
export { scanMarkdownIncludes, scanHtmlIncludes, resolveIncludes, } from '#src/preprocess/include/index';
|
|
11
|
+
export type { SourceFormat, IncludeDirective, SourceUnit, IncludeGraph, IncludeEdge, CompositeSource, PersonEntry, SpecConfig, PreprocessedSpec, MaturityLevel, WorkspaceConfig, } from '#src/preprocess/types';
|
|
12
|
+
export { inferFormat } from '#src/preprocess/types';
|
|
13
|
+
export { loadConfig, normalizeConfig, ConfigLoadError, } from '#src/preprocess/config/index';
|
|
14
|
+
export type { RawRespecConfig, RawPersonEntry, DocumentConfig, ResolvedDocumentConfig } from '#src/preprocess/config/index';
|
|
15
|
+
export { scanMarkdownIncludes, scanHtmlIncludes, resolveIncludes, IncludeResolveError, } from '#src/preprocess/include/index';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/preprocess/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/preprocess/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtF,YAAY,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,YAAY,EACR,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,GAClB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EACH,UAAU,EACV,eAAe,EACf,eAAe,GAClB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAG5H,OAAO,EACH,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACtB,MAAM,+BAA+B,CAAC"}
|
package/dist/preprocess/index.js
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* - Preserving source file information for accurate error reporting
|
|
8
8
|
*/
|
|
9
9
|
// Main orchestrator
|
|
10
|
-
export { preprocess, validateEntry } from '#src/preprocess/pipeline';
|
|
11
|
-
export { inferFormat
|
|
10
|
+
export { preprocess, validateEntry, PreprocessError } from '#src/preprocess/pipeline';
|
|
11
|
+
export { inferFormat } from '#src/preprocess/types';
|
|
12
12
|
// Config submodule (for advanced use)
|
|
13
|
-
export {
|
|
13
|
+
export { loadConfig, normalizeConfig, ConfigLoadError, } from '#src/preprocess/config/index';
|
|
14
14
|
// Include submodule (for advanced use)
|
|
15
|
-
export { scanMarkdownIncludes, scanHtmlIncludes, resolveIncludes, } from '#src/preprocess/include/index';
|
|
15
|
+
export { scanMarkdownIncludes, scanHtmlIncludes, resolveIncludes, IncludeResolveError, } from '#src/preprocess/include/index';
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preprocess/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preprocess/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,oBAAoB;AACpB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAkBtF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,sCAAsC;AACtC,OAAO,EACH,UAAU,EACV,eAAe,EACf,eAAe,GAClB,MAAM,8BAA8B,CAAC;AAGtC,uCAAuC;AACvC,OAAO,EACH,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,GACtB,MAAM,+BAA+B,CAAC"}
|