@lionweb/validation 0.6.2-beta.0 → 0.6.2

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # The `validation` package
2
2
 
3
+ [![license](https://img.shields.io/badge/License-Apache%202.0-green.svg?style=flat)
4
+ ](./LICENSE)
5
+ [![CI](https://github.com/LionWeb-io/lionweb-typescript/actions/workflows/test.yaml/badge.svg)
6
+ ](https://github.com/LionWeb-io/lionweb-typescript/actions/workflows/test.yaml)
7
+ [![npm](https://img.shields.io/npm/v/%40lionweb%2Fvalidation?label=%40lionweb%2Fvalidation)
8
+ ](https://www.npmjs.com/package/@lionweb/validation)
9
+
3
10
  The code in this package implements validators that check serialization chunks against the [serialization specification](https://github.com/LionWeb-io/specification/blob/main/2023.1/serialization/serialization.adoc).
4
11
  This package is intentionally kept very lightweight, e.g. it uses types instead of classes and has zero dependencies on external libraries/packages.
5
12
 
@@ -1,7 +1,6 @@
1
1
  import { JsonContext } from "../json/JsonContext.js";
2
- import { ValidationIssueKind } from "./ValidationIssueKind.js";
3
2
  export declare abstract class ValidationIssue {
4
- abstract readonly issueType: ValidationIssueKind;
3
+ abstract readonly issueType: string;
5
4
  context: JsonContext;
6
5
  constructor(context: JsonContext);
7
6
  protected abstract msg(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationIssue.d.ts","sourceRoot":"","sources":["../../src/issues/ValidationIssue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAE9D,8BAAsB,eAAe;IACjC,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAA;IAChD,OAAO,EAAE,WAAW,CAAA;gBAER,OAAO,EAAE,WAAW;IAIhC,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM;IAEzB,QAAQ,IAAI,MAAM;CAG5B;AAED,qBAAa,YAAa,SAAQ,eAAe;IAGJ,IAAI,EAAE,MAAM;IAFrD,QAAQ,CAAC,SAAS,kBAAiB;gBAEvB,OAAO,EAAE,WAAW,EAAS,IAAI,EAAE,MAAM;IAIrD,SAAS,CAAC,GAAG,eAAkB;CAClC"}
1
+ {"version":3,"file":"ValidationIssue.d.ts","sourceRoot":"","sources":["../../src/issues/ValidationIssue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,8BAAsB,eAAe;IACjC,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IACnC,OAAO,EAAE,WAAW,CAAA;gBAER,OAAO,EAAE,WAAW;IAIhC,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,MAAM;IAEzB,QAAQ,IAAI,MAAM;CAG5B;AAED,qBAAa,YAAa,SAAQ,eAAe;IAGJ,IAAI,EAAE,MAAM;IAFrD,QAAQ,CAAC,SAAS,kBAAiB;gBAEvB,OAAO,EAAE,WAAW,EAAS,IAAI,EAAE,MAAM;IAIrD,SAAS,CAAC,GAAG,eAAkB;CAClC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationIssue.js","sourceRoot":"","sources":["../../src/issues/ValidationIssue.ts"],"names":[],"mappings":"AAGA,MAAM,OAAgB,eAAe;IAIjC,YAAY,OAAoB;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;IAIM,QAAQ;QACX,OAAO,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,GAAG,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAA;IAC5E,CAAC;CACJ;AAED,MAAM,OAAO,YAAa,SAAQ,eAAe;IAG7C,YAAY,OAAoB,EAAS,IAAY;QACjD,KAAK,CAAC,OAAO,CAAC,CAAA;QADuB,SAAI,GAAJ,IAAI,CAAQ;QAF5C,cAAS,GAAG,cAAc,CAAA;QAMzB,QAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAA;IAF/B,CAAC;CAGJ"}
1
+ {"version":3,"file":"ValidationIssue.js","sourceRoot":"","sources":["../../src/issues/ValidationIssue.ts"],"names":[],"mappings":"AAEA,MAAM,OAAgB,eAAe;IAIjC,YAAY,OAAoB;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;IAIM,QAAQ;QACX,OAAO,GAAG,IAAI,CAAC,SAAS,KAAK,IAAI,CAAC,GAAG,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAA;IAC5E,CAAC;CACJ;AAED,MAAM,OAAO,YAAa,SAAQ,eAAe;IAG7C,YAAY,OAAoB,EAAS,IAAY;QACjD,KAAK,CAAC,OAAO,CAAC,CAAA;QADuB,SAAI,GAAJ,IAAI,CAAQ;QAF5C,cAAS,GAAG,cAAc,CAAA;QAMzB,QAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAA;IAF/B,CAAC;CAGJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lionweb/validation",
3
- "version": "0.6.2-beta.0",
3
+ "version": "0.6.2",
4
4
  "license": "Apache 2.0",
5
5
  "description": "LionWeb Serialization validation",
6
6
  "author": "jos.warmer@openmodeling.nl",
@@ -1,8 +1,7 @@
1
1
  import { JsonContext } from "../json/JsonContext.js"
2
- import { ValidationIssueKind } from "./ValidationIssueKind.js"
3
2
 
4
3
  export abstract class ValidationIssue {
5
- abstract readonly issueType: ValidationIssueKind
4
+ abstract readonly issueType: string
6
5
  context: JsonContext
7
6
 
8
7
  constructor(context: JsonContext) {
@@ -1,2 +0,0 @@
1
- export type IssueKind = "GenericIssue" | "PropertyMissing" | "PropertyUnknown" | "PropertyNull" | "PropertyTypeIncorrect" | "ArrayContainsNull" | "SerializationFormatVersion" | "VersionFormat" | "KeyFormat" | "IdFormat" | "DuplicateNodeId" | "ChildMissingInParent" | "ParentMissingInChild" | "CirculairParent" | "LanguageUnknown" | "Duplicates" | "GenericIssue" | "PropertyValueIncorrect" | "IncorrectPropertyMetaPointer" | "PropertyMetaPointerNotInClass" | "ReferenceMetaPointerNotInClass" | "ContainmentMetaPointerNotInClass" | "IncorrectConceptMetaPointer" | "IncorrectReferenceMetaPointer" | "IncorrectContainmentMetaPointer" | "UnknownReference" | "UnknownContainment" | "UnknownProperty" | "UnknownConcept" | "NumberOfLanguagesUsed" | "MissingM3Language" | "NotLionCoreLanguageKey" | "IncorrectLionCoreVersion" | string;
2
- //# sourceMappingURL=IssueKind.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IssueKind.d.ts","sourceRoot":"","sources":["../../src/issues/IssueKind.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,cAAc,GACZ,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,uBAAuB,GACvB,mBAAmB,GACnB,4BAA4B,GAC5B,eAAe,GACf,WAAW,GACX,UAAU,GACV,iBAAiB,GACjB,sBAAsB,GACtB,sBAAsB,GACtB,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,wBAAwB,GACxB,8BAA8B,GAC9B,+BAA+B,GAC/B,gCAAgC,GAChC,kCAAkC,GAClC,6BAA6B,GAC7B,+BAA+B,GAC/B,iCAAiC,GACjC,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GACjB,gBAAgB,GAChB,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,0BAA0B,GAC1B,MAAM,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=IssueKind.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IssueKind.js","sourceRoot":"","sources":["../../src/issues/IssueKind.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export type ValidationIssueKind = "GenericIssue" | "PropertyMissing" | "PropertyUnknown" | "PropertyNull" | "PropertyTypeIncorrect" | "ArrayContainsNull" | "SerializationFormatVersion" | "VersionFormat" | "KeyFormat" | "IdFormat" | "DuplicateNodeId" | "ChildMissingInParent" | "ParentMissingInChild" | "CirculairParent" | "LanguageUnknown" | "Duplicates" | "GenericIssue" | "PropertyValueIncorrect" | "IncorrectPropertyMetaPointer" | "PropertyMetaPointerNotInClass" | "ReferenceMetaPointerNotInClass" | "ContainmentMetaPointerNotInClass" | "IncorrectConceptMetaPointer" | "IncorrectReferenceMetaPointer" | "IncorrectContainmentMetaPointer" | "UnknownReference" | "UnknownContainment" | "UnknownProperty" | "UnknownConcept" | "NumberOfLanguagesUsed" | "MissingM3Language" | "NotLionCoreLanguageKey" | "IncorrectLionCoreVersion";
2
- //# sourceMappingURL=ValidationIssueKind.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValidationIssueKind.d.ts","sourceRoot":"","sources":["../../src/issues/ValidationIssueKind.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B,cAAc,GACZ,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,uBAAuB,GACvB,mBAAmB,GACnB,4BAA4B,GAC5B,eAAe,GACf,WAAW,GACX,UAAU,GACV,iBAAiB,GACjB,sBAAsB,GACtB,sBAAsB,GACtB,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,wBAAwB,GACxB,8BAA8B,GAC9B,+BAA+B,GAC/B,gCAAgC,GAChC,kCAAkC,GAClC,6BAA6B,GAC7B,+BAA+B,GAC/B,iCAAiC,GACjC,kBAAkB,GAClB,oBAAoB,GACpB,iBAAiB,GACjB,gBAAgB,GAChB,uBAAuB,GACvB,mBAAmB,GACnB,wBAAwB,GACxB,0BAA0B,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=ValidationIssueKind.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValidationIssueKind.js","sourceRoot":"","sources":["../../src/issues/ValidationIssueKind.ts"],"names":[],"mappings":""}
@@ -1,37 +0,0 @@
1
- export type ValidationIssueKind =
2
- "GenericIssue"
3
- | "PropertyMissing"
4
- | "PropertyUnknown"
5
- | "PropertyNull"
6
- | "PropertyTypeIncorrect"
7
- | "ArrayContainsNull"
8
- | "SerializationFormatVersion"
9
- | "VersionFormat"
10
- | "KeyFormat"
11
- | "IdFormat"
12
- | "DuplicateNodeId"
13
- | "ChildMissingInParent"
14
- | "ParentMissingInChild"
15
- | "CirculairParent"
16
- | "LanguageUnknown"
17
- | "Duplicates"
18
- | "GenericIssue"
19
- | "PropertyValueIncorrect"
20
- | "IncorrectPropertyMetaPointer"
21
- | "PropertyMetaPointerNotInClass"
22
- | "ReferenceMetaPointerNotInClass"
23
- | "ContainmentMetaPointerNotInClass"
24
- | "IncorrectConceptMetaPointer"
25
- | "IncorrectReferenceMetaPointer"
26
- | "IncorrectContainmentMetaPointer"
27
- | "UnknownReference"
28
- | "UnknownContainment"
29
- | "UnknownProperty"
30
- | "UnknownConcept"
31
- | "NumberOfLanguagesUsed"
32
- | "MissingM3Language"
33
- | "NotLionCoreLanguageKey"
34
- | "IncorrectLionCoreVersion"
35
-
36
-
37
-