@blockml/validator 0.3.0 → 0.5.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.
@@ -21,8 +21,7 @@
21
21
  xmlns:validator="org.blockml.bml.compiler.validator"
22
22
  xmlns:valcap="org.blockml.bml.compiler.validator.capability"
23
23
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
24
- xmlns:bomdocumentation="org.blockml.bml.bom.documentation"
25
- xmlns:fwdocumentation="org.blockml.bml.framework.documentation">
24
+ xmlns:bomdocumentation="org.blockml.bml.bom.documentation">
26
25
 
27
26
  <name>Library</name>
28
27
  <type>validator:Library</type>
@@ -36,7 +35,7 @@
36
35
  (@blockml/bom). Membership is defined exclusively by this blocks list.
37
36
  </documentation>
38
37
 
39
- <version>0.1.0</version>
38
+ <version>0.5.0</version>
40
39
 
41
40
  <language>
42
41
  <English />
@@ -69,6 +68,7 @@
69
68
  <composition><validator:ValidatorType /></composition>
70
69
  <composition><valcap:Validate /></composition>
71
70
  <composition><valdocumentation:Introduction /></composition>
71
+ <composition><valdocumentation:ValidityContract /></composition>
72
72
  <composition><valdocumentation:LayerSeparation /></composition>
73
73
  <composition><valdocumentation:ValidationPipeline /></composition>
74
74
  <composition><valdocumentation:PublicApi /></composition>
@@ -21,8 +21,7 @@
21
21
  xmlns:validator="org.blockml.bml.compiler.validator"
22
22
  xmlns:valcap="org.blockml.bml.compiler.validator.capability"
23
23
  xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
24
- xmlns:bomdocumentation="org.blockml.bml.bom.documentation"
25
- xmlns:fwdocumentation="org.blockml.bml.framework.documentation">
24
+ xmlns:bomdocumentation="org.blockml.bml.bom.documentation">
26
25
 
27
26
  <name>README</name>
28
27
  <type>blockml:README</type>
@@ -43,6 +43,9 @@
43
43
  Bootstrap modes: bootstrapPaths (corpus flat scan) or libraryPaths (Library.bml graph).
44
44
  validateVersions runs after validateTypes and before validateConstraints.
45
45
 
46
+ Unknown instance memberValues and unresolved type FQNs are errors (not warnings).
47
+ Missing libraries are errors. Domain types must be registered like framework types.
48
+
46
49
  No throw on validation failure — aligns with B26 sync diagnostic API across parser,
47
50
  serializer, validator, and compiler.</documentation>
48
51
 
@@ -39,10 +39,13 @@
39
39
  optional pragmaticModel. Consumed by @blockml/cli, @blockml/lsp (V2), and hosts.
40
40
 
41
41
  Validator never mutates the input Urmodell. Abort-on-error is a host concern — not
42
- enforced inside the validator package.</documentation>
42
+ enforced inside the validator package.
43
+
44
+ Validity without XSD: well-formed XML + structural BML + semantic BML against a
45
+ complete TypeRegistry. CLI validate and LSP share this engine.</documentation>
43
46
 
44
47
  <references>
45
- <see type="valdocumentation:LayerSeparation" relation="ReadNext"></see>
48
+ <see type="valdocumentation:ValidityContract" relation="ReadNext"></see>
46
49
  <see type="bomdocumentation:Introduction" relation="SeeAlso"></see>
47
50
  </references>
48
51
 
@@ -0,0 +1,55 @@
1
+ <!--
2
+ Validator Documentation — ValidityContract
3
+ FQN: org.blockml.bml.compiler.validator.documentation.ValidityContract
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
+ "
10
+ xmlns:blockml="org.blockml.bml"
11
+ xmlns:bom="org.blockml.bml.bom"
12
+ xmlns:bomapi="org.blockml.bml.bom.api"
13
+ xmlns:bomcommon="org.blockml.bml.bom.common"
14
+ xmlns:bomdoc="org.blockml.bml.bom.document"
15
+ xmlns:core="org.blockml.bml.core"
16
+ xmlns:def="org.blockml.bml.definition"
17
+ xmlns:framework="org.blockml.bml.framework"
18
+ xmlns:fwcap="org.blockml.bml.framework.capability"
19
+ xmlns:fwdocumentation="org.blockml.bml.framework.documentation"
20
+ xmlns:type="org.blockml.bml.type"
21
+ xmlns:validator="org.blockml.bml.compiler.validator"
22
+ xmlns:valcap="org.blockml.bml.compiler.validator.capability"
23
+ xmlns:valdocumentation="org.blockml.bml.compiler.validator.documentation"
24
+ xmlns:pardocumentation="org.blockml.bml.compiler.parser.documentation"
25
+ xmlns:doc="org.blockml.bml.documentation">
26
+
27
+ <name>ValidityContract</name>
28
+ <type>valdocumentation:ValidityContract</type>
29
+ <baseType>core:Documentation</baseType>
30
+ <is>What counts as valid BlockML without XSD</is>
31
+
32
+ <documentation>valid BlockML = well-formed XML + valid BML structure + valid BML semantics.
33
+
34
+ CLI blockml validate and LSP analyzeDocument consume the same parse + validate engine.
35
+ Generated XSD is a non-authoritative render-target projection and is not consulted.
36
+
37
+ Severity: error = not valid BlockML; warning = valid but problematic (deprecation);
38
+ info = hint. Unknown element, attribute, member, type, block, or missing library is error.
39
+
40
+ Semantic checks (this package / framework): every type FQN must resolve in the
41
+ TypeRegistry or be a well-known primitive; instance typeFqn and memberValues keys
42
+ must match effective members. Unresolved references are errors. A missing library
43
+ is BML_LIBRARY_RESOLVE_ERROR — analogous to a Java class without its Maven artifact.
44
+
45
+ Structural/semantic errors are node-local: they set success=false but keep the BOM
46
+ (preserve-on-error). XML syntax errors may yield document null.
47
+
48
+ Unknown instance members stay in memberValues plus BML_UNKNOWN_PROPERTY error.</documentation>
49
+
50
+ <references>
51
+ <see type="pardocumentation:StructuralGrammar" relation="SeeAlso"></see>
52
+ <see type="valdocumentation:ValidationPipeline" relation="ReadNext"></see>
53
+ </references>
54
+
55
+ </block>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockml/validator",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "BlockML validator — semantic validation of BOM documents",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -32,9 +32,9 @@
32
32
  "test": "vitest run packages/validator/test"
33
33
  },
34
34
  "dependencies": {
35
- "@blockml/bom": "^0.3.0",
36
- "@blockml/core": "^1.0.3",
37
- "@blockml/framework": "^0.3.0"
35
+ "@blockml/bom": "^0.5.0",
36
+ "@blockml/core": "^1.0.5",
37
+ "@blockml/framework": "^0.5.0"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=20"