@blockml/compiler 0.9.4 → 0.9.6
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/blocks/org/blockml/bml/compiler/runtime/Library.bml +19 -26
- package/blocks/org/blockml/bml/compiler/runtime/README.bml +14 -21
- package/blocks/org/blockml/bml/compiler/runtime/RuntimeType.bml +16 -18
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileBomOptions.bml +34 -22
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileInput.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileOptions.bml +29 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileRequest.bml +23 -19
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileScope.bml +38 -22
- package/blocks/org/blockml/bml/compiler/runtime/api/CompileScopeKind.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/CompilerResult.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderContext.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderOutput.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderOutputFile.bml +23 -19
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderSession.bml +49 -25
- package/blocks/org/blockml/bml/compiler/runtime/api/RenderTarget.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/ResolvedScope.bml +33 -21
- package/blocks/org/blockml/bml/compiler/runtime/api/ScopeConfigHints.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/api/ValidateRegistryResult.bml +28 -20
- package/blocks/org/blockml/bml/compiler/runtime/capability/BuildRenderSession.bml +20 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/ClearTargets.bml +13 -20
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBmlToBom.bml +22 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBmlToOutput.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileBomToOutput.bml +27 -27
- package/blocks/org/blockml/bml/compiler/runtime/capability/CompileToOutput.bml +28 -24
- package/blocks/org/blockml/bml/compiler/runtime/capability/CreateRenderContext.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/GetTarget.bml +19 -21
- package/blocks/org/blockml/bml/compiler/runtime/capability/RegisterTarget.bml +17 -21
- package/blocks/org/blockml/bml/compiler/runtime/capability/RegisteredTargetNames.bml +16 -19
- package/blocks/org/blockml/bml/compiler/runtime/capability/ResolveScope.bml +25 -23
- package/blocks/org/blockml/bml/compiler/runtime/capability/ScopeAccepts.bml +22 -22
- package/blocks/org/blockml/bml/compiler/runtime/capability/ValidateRegistryDocuments.bml +23 -23
- package/blocks/org/blockml/bml/compiler/runtime/config/RuntimeConstants.bml +39 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ArchitectureOverview.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileIO.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/CompileScopeRules.bml +15 -21
- package/blocks/org/blockml/bml/compiler/runtime/documentation/DesignDecisions.bml +17 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Diagnostics.bml +17 -23
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ExternalTargetContract.bml +18 -22
- package/blocks/org/blockml/bml/compiler/runtime/documentation/Introduction.bml +16 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/LayerSeparation.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PackageOwnership.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/PublicApi.bml +15 -19
- package/blocks/org/blockml/bml/compiler/runtime/documentation/RenderContextRules.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/ScopeExclusions.bml +14 -18
- package/blocks/org/blockml/bml/compiler/runtime/documentation/TargetRegistry.bml +14 -20
- package/blocks/org/blockml/bml/compiler/runtime/documentation/V1Scope.bml +15 -19
- package/package.json +6 -6
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — PackageOwnership
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.PackageOwnership-->
|
|
3
|
+
<rundocumentation:PackageOwnership xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,21 +20,23 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
What belongs in @blockml/compiler vs neighbors
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
Owns: compileToOutput and sugar, Target Registry API, ResolveScope/ScopeAccepts,
|
|
35
31
|
RenderContext/Session, CompileRequest/Options, CompilerResult, C1–C7 contracts,
|
|
36
32
|
orchestration of parse/validate/bootstrap for Stage-3.
|
|
37
|
-
|
|
33
|
+
|
|
38
34
|
Does not own: CLI commands, file write, exit codes, C5/C6 (cli);
|
|
39
35
|
parser/serializer/validator algorithms; framework TypeRegistry internals;
|
|
40
|
-
target Options and emit; MachineBlocks SCAD NativeBlock
|
|
36
|
+
target Options and emit; MachineBlocks SCAD NativeBlock.
|
|
37
|
+
</documentation>
|
|
41
38
|
<references>
|
|
42
39
|
<see type="rundocumentation:ScopeExclusions" relation="ReadNext" />
|
|
43
40
|
<see type="cli:Library" relation="SeeAlso" />
|
|
44
41
|
</references>
|
|
45
|
-
|
|
46
|
-
</block>
|
|
42
|
+
</rundocumentation:PackageOwnership>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — PublicApi
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.PublicApi-->
|
|
3
|
+
<rundocumentation:PublicApi xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,12 +20,14 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Public TypeScript surface mirrored in this library
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
Exports (packages/compiler/src/index.ts):
|
|
35
31
|
Types: CompileScopeKind, CompileInput, CompileScope, CompileRequest, CompileOptions,
|
|
36
32
|
CompileBomOptions, CompilerResult, ValidateRegistryResult, RenderOutput, RenderOutputFile, RenderSession,
|
|
37
33
|
RenderContext, RenderTarget, ScopeConfigHints, ResolvedScope.
|
|
@@ -40,13 +36,13 @@
|
|
|
40
36
|
Stage 1–2 helpers: compileBmlToBom, validateRegistryDocuments.
|
|
41
37
|
Facade: compileToOutput, compileBomToOutput, compileBmlToOutput.
|
|
42
38
|
Context: createRenderContext, buildRenderSession.
|
|
43
|
-
|
|
44
|
-
Modeled as api/*, config/RuntimeConstants, and capability/* on Library.blocks
|
|
39
|
+
|
|
40
|
+
Modeled as api/*, config/RuntimeConstants, and capability/* on Library.blocks.
|
|
41
|
+
</documentation>
|
|
45
42
|
<references>
|
|
46
43
|
<see type="rundocumentation:CompileIO" relation="ReadNext" />
|
|
47
44
|
<see type="runapi:CompileRequest" relation="SeeAlso" />
|
|
48
45
|
<see type="runcap:CompileToOutput" relation="SeeAlso" />
|
|
49
46
|
<see type="runapi:RenderTarget" relation="SeeAlso" />
|
|
50
47
|
</references>
|
|
51
|
-
|
|
52
|
-
</block>
|
|
48
|
+
</rundocumentation:PublicApi>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — RenderContextRules
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.RenderContextRules-->
|
|
3
|
+
<rundocumentation:RenderContextRules xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,23 +20,24 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
RenderSession and RenderContext (C1)
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# RenderSession and RenderContext (C1)
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
RenderSession is immutable per compile after BuildRenderSession.
|
|
38
|
-
|
|
33
|
+
|
|
39
34
|
Stable session fields for registry targets: typeRegistry, sourceFilePath, outputBasePath,
|
|
40
35
|
targetName, scopeKind, libraryPaths?, corpusRoots?.
|
|
41
|
-
|
|
36
|
+
|
|
42
37
|
RenderContext holds session + blockFqn + outputRelativePath; child(overrides) forks a new
|
|
43
38
|
context sharing the same session. Per-node fields are for composition/domain renderers;
|
|
44
39
|
registry targets may ignore them and rely on request.scope plus session.
|
|
45
|
-
|
|
40
|
+
|
|
46
41
|
CreateRenderContext defaults empty FQN and relative path for the root call into target.render.
|
|
47
42
|
</documentation>
|
|
48
43
|
<references>
|
|
@@ -50,5 +45,4 @@
|
|
|
50
45
|
<see type="runcap:BuildRenderSession" relation="SeeAlso" />
|
|
51
46
|
<see type="runcap:CreateRenderContext" relation="SeeAlso" />
|
|
52
47
|
</references>
|
|
53
|
-
|
|
54
|
-
</block>
|
|
48
|
+
</rundocumentation:RenderContextRules>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — ScopeExclusions
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.ScopeExclusions-->
|
|
3
|
+
<rundocumentation:ScopeExclusions xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,18 +20,20 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Explicitly out of compiler runtime V1 library scope
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
Out of scope for this library / V1:
|
|
35
31
|
• CLI targets[] bootstrap order and dual CLI model
|
|
36
32
|
• Writing RenderOutput files to disk
|
|
37
33
|
• Incremental .bom-cache (C5) and thumbnails (C6)
|
|
38
34
|
• Target-specific targetOptions schemas and emit
|
|
39
35
|
• Parser/serializer/validator mapping and constraint algorithms
|
|
40
36
|
• SCAD NativeBlock / engine-maker processors
|
|
41
|
-
• Codegen from BML to TypeScript (structural SSOT only)
|
|
42
|
-
|
|
43
|
-
</
|
|
37
|
+
• Codegen from BML to TypeScript (structural SSOT only)
|
|
38
|
+
</documentation>
|
|
39
|
+
</rundocumentation:ScopeExclusions>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — TargetRegistry
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.TargetRegistry-->
|
|
3
|
+
<rundocumentation:TargetRegistry xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,24 +20,25 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
Target Registry contract (C3)
|
|
28
|
+
</is>
|
|
34
29
|
<documentation>
|
|
35
30
|
# Target Registry contract (C3)
|
|
36
|
-
|
|
31
|
+
|
|
37
32
|
In-memory Map of name → RenderTarget. registerTarget overwrites; getTarget may miss;
|
|
38
33
|
clearTargets empties; registeredTargetNames lists keys.
|
|
39
|
-
|
|
34
|
+
|
|
40
35
|
No default targets ship in @blockml/compiler. Hosts (CLI bootstrapTargets, tests, browsers)
|
|
41
36
|
call registerTarget before compileToOutput.
|
|
42
|
-
|
|
37
|
+
|
|
43
38
|
registerTarget validates: non-empty name; non-empty accepts with only valid CompileScopeKind
|
|
44
39
|
values; render is a function; validateRequest if present is a function. Invalid hosts throw
|
|
45
40
|
(programming error — not a BML authoring diagnostic).
|
|
46
|
-
|
|
41
|
+
|
|
47
42
|
Config targets[] and package loading order are CLI-owned (SeeAlso RuntimeBootstrap).
|
|
48
43
|
</documentation>
|
|
49
44
|
<references>
|
|
@@ -51,5 +46,4 @@
|
|
|
51
46
|
<see type="runcap:RegisterTarget" relation="SeeAlso" />
|
|
52
47
|
<see type="cli:Library" relation="SeeAlso" />
|
|
53
48
|
</references>
|
|
54
|
-
|
|
55
|
-
</block>
|
|
49
|
+
</rundocumentation:TargetRegistry>
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<block
|
|
6
|
-
xmlns="http://blockml.org/bml"
|
|
7
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
8
|
-
xsi:schemaLocation="http://blockml.org/bml https://blockml.org/schemas/bml.xsd
|
|
9
|
-
"
|
|
1
|
+
<!--Compiler Runtime Documentation — V1Scope
|
|
2
|
+
FQN: org.blockml.bml.compiler.runtime.documentation.V1Scope-->
|
|
3
|
+
<rundocumentation:V1Scope xmlns="http://blockml.org/bml"
|
|
10
4
|
xmlns:blockml="org.blockml.bml"
|
|
11
5
|
xmlns:bom="org.blockml.bml.bom"
|
|
12
6
|
xmlns:bomapi="org.blockml.bml.bom.api"
|
|
@@ -26,12 +20,14 @@
|
|
|
26
20
|
xmlns:validator="org.blockml.bml.compiler.validator"
|
|
27
21
|
xmlns:doc="org.blockml.bml.documentation">
|
|
28
22
|
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<is>
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
<baseType>
|
|
24
|
+
core:Documentation
|
|
25
|
+
</baseType>
|
|
26
|
+
<is>
|
|
27
|
+
What V1 delivers
|
|
28
|
+
</is>
|
|
29
|
+
<documentation>
|
|
30
|
+
V1 includes:
|
|
35
31
|
• compileToOutput / compileBmlToOutput; compileBomToOutput BOM-first with required TypeRegistry
|
|
36
32
|
• In-memory Target Registry with no built-in targets; registerTarget validates contract
|
|
37
33
|
• Scope kinds document | library | corpus | auto with ScopeConfigHints merge
|
|
@@ -40,11 +36,11 @@
|
|
|
40
36
|
• Diagnostics BML_UNKNOWN_TARGET, BML_TARGET_SCOPE_MISMATCH, BML_COMPILE_SCOPE_EMPTY,
|
|
41
37
|
BML_MISSING_TYPE_REGISTRY
|
|
42
38
|
• Browser-safe package surface (no Node-only APIs in public contracts)
|
|
43
|
-
|
|
39
|
+
|
|
44
40
|
V1 does NOT include CLI targets[] bootstrap, file I/O, incremental cache (C5),
|
|
45
|
-
thumbnails (C6), or target-specific emit
|
|
41
|
+
thumbnails (C6), or target-specific emit.
|
|
42
|
+
</documentation>
|
|
46
43
|
<references>
|
|
47
44
|
<see type="rundocumentation:PublicApi" relation="ReadNext" />
|
|
48
45
|
</references>
|
|
49
|
-
|
|
50
|
-
</block>
|
|
46
|
+
</rundocumentation:V1Scope>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockml/compiler",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "BlockML compiler — facade, target registry, render pipeline",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"test": "vitest run packages/compiler/test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@blockml/bom": "^0.9.
|
|
36
|
-
"@blockml/core": "^1.
|
|
37
|
-
"@blockml/framework": "^0.9.
|
|
38
|
-
"@blockml/parser": "^0.9.
|
|
39
|
-
"@blockml/validator": "^0.9.
|
|
35
|
+
"@blockml/bom": "^0.9.6",
|
|
36
|
+
"@blockml/core": "^1.3.0",
|
|
37
|
+
"@blockml/framework": "^0.9.6",
|
|
38
|
+
"@blockml/parser": "^0.9.6",
|
|
39
|
+
"@blockml/validator": "^0.9.6"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20"
|