@lionweb/validation 0.6.0-beta.1 → 0.6.0-beta.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 +2 -0
- package/dist/diff/LionWebJsonDiff.d.ts +1 -1
- package/dist/diff/LionWebJsonDiff.d.ts.map +1 -1
- package/dist/diff/LionWebJsonDiff.js +26 -24
- package/dist/diff/LionWebJsonDiff.js.map +1 -1
- package/dist/diff/changes/ContainmentChange.d.ts +10 -3
- package/dist/diff/changes/ContainmentChange.d.ts.map +1 -1
- package/dist/diff/changes/ContainmentChange.js +12 -3
- package/dist/diff/changes/ContainmentChange.js.map +1 -1
- package/dist/diff/changes/NodeChange.d.ts +4 -4
- package/dist/diff/changes/NodeChange.d.ts.map +1 -1
- package/dist/diff/changes/NodeChange.js +4 -4
- package/dist/diff/changes/NodeChange.js.map +1 -1
- package/dist/diff/changes/PropertyChange.d.ts +10 -2
- package/dist/diff/changes/PropertyChange.d.ts.map +1 -1
- package/dist/diff/changes/PropertyChange.js +12 -3
- package/dist/diff/changes/PropertyChange.js.map +1 -1
- package/dist/diff/changes/ReferenceChange.d.ts +5 -5
- package/dist/diff/changes/ReferenceChange.d.ts.map +1 -1
- package/dist/diff/changes/ReferenceChange.js +6 -6
- package/dist/diff/changes/ReferenceChange.js.map +1 -1
- package/dist/json/LionWebJsonChunkWrapper.d.ts.map +1 -1
- package/dist/json/LionWebJsonChunkWrapper.js +6 -0
- package/dist/json/LionWebJsonChunkWrapper.js.map +1 -1
- package/package.json +1 -2
- package/src/diff/LionWebJsonDiff.ts +26 -24
- package/src/diff/changes/ContainmentChange.ts +11 -3
- package/src/diff/changes/NodeChange.ts +4 -4
- package/src/diff/changes/PropertyChange.ts +12 -2
- package/src/diff/changes/ReferenceChange.ts +6 -6
- package/src/json/LionWebJsonChunkWrapper.ts +6 -0
package/README.md
CHANGED
|
@@ -20,6 +20,8 @@ npm run testInvalidWithLanguage
|
|
|
20
20
|
|
|
21
21
|
This will run the tests in the respective folders in the `testset/` folder in `lionweb-integration-testing`.
|
|
22
22
|
|
|
23
|
+
The commands `npm run publish-local` and `npm run unpublish-local` are used to do a release on a _local_ npm registry (in our case `verdaccio`), for use in other local projects. This ensures that we do not have to do contineous releases when we develop two packages depending on aech other'
|
|
24
|
+
|
|
23
25
|
Notes:
|
|
24
26
|
- Testing with enums is not implemented yet.
|
|
25
27
|
- All tests in the test set with duplicates (which used to be considered invalid), are not invalid anymore, as decided in the meeting on 23-08-2023.
|
|
@@ -18,7 +18,7 @@ export declare class LionWebJsonDiff {
|
|
|
18
18
|
diffLwNode(ctx: JsonContext, beforeNode: LionWebJsonNode, afterNode: LionWebJsonNode): void;
|
|
19
19
|
diffLwChunk(beforeChunk: LionWebJsonChunk, afterChunk: LionWebJsonChunk): void;
|
|
20
20
|
diffContainment(ctx: JsonContext, node: LionWebJsonNode, beforeContainment: LionWebJsonContainment, afterContainment: LionWebJsonContainment): void;
|
|
21
|
-
diffLwReference(ctx: JsonContext,
|
|
21
|
+
diffLwReference(ctx: JsonContext, node: LionWebJsonNode, beforeRef: LionWebJsonReference, afterRef: LionWebJsonReference): void;
|
|
22
22
|
private diffLwUsedLanguage;
|
|
23
23
|
private diffLwProperty;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionWebJsonDiff.d.ts","sourceRoot":"","sources":["../../src/diff/LionWebJsonDiff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAGH,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAEf,oBAAoB,EAGvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,MAAM,EAAiB,MAAM,qBAAqB,CAAA;AAI3D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C;;GAEG;AACH,qBAAa,eAAe;IACxB,UAAU,aAAmB;;IAI7B,MAAM,CAAC,MAAM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EAAE,eAAe,EACrB,iBAAiB,EAAE,sBAAsB,EACzC,gBAAgB,EAAE,sBAAsB,GACzC,IAAI;IAwBP,eAAe,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI;IAwB/H,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,cAAc;CAiBzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonContext } from "../issues/index.js";
|
|
2
|
-
import { ChunkUtils, isEqualMetaPointer, NodeUtils
|
|
2
|
+
import { ChunkUtils, isEqualMetaPointer, NodeUtils } from "../json/index.js";
|
|
3
3
|
import { GenericChange } from "./changes/Change.js";
|
|
4
4
|
import { LanguageAdded, LanguageRemoved, NodeAdded, NodeRemoved, SerializationFormatChange } from "./changes/ChunkChange.js";
|
|
5
5
|
import { ChildAdded, ChildRemoved } from "./changes/ContainmentChange.js";
|
|
@@ -28,7 +28,7 @@ export class LionWebJsonDiff {
|
|
|
28
28
|
*/
|
|
29
29
|
diffLwNode(ctx, beforeNode, afterNode) {
|
|
30
30
|
if (!isEqualMetaPointer(beforeNode.classifier, afterNode.classifier)) {
|
|
31
|
-
this.change(new NodeClassifierChanged(ctx.concat("classifier"), beforeNode, beforeNode.classifier
|
|
31
|
+
this.change(new NodeClassifierChanged(ctx.concat("classifier"), beforeNode, beforeNode.classifier, afterNode.classifier));
|
|
32
32
|
}
|
|
33
33
|
if (beforeNode.parent !== afterNode.parent) {
|
|
34
34
|
this.change(new ParentChanged(ctx, beforeNode, beforeNode.parent, afterNode.parent));
|
|
@@ -38,7 +38,7 @@ export class LionWebJsonDiff {
|
|
|
38
38
|
const key = beforeProperty.property.key;
|
|
39
39
|
const afterProperty = NodeUtils.findLwProperty(afterNode, key);
|
|
40
40
|
if (afterProperty === null) {
|
|
41
|
-
this.change(new PropertyValueChanged(ctx.concat("properties", index), beforeNode.id, beforeProperty.property
|
|
41
|
+
this.change(new PropertyValueChanged(ctx.concat("properties", index), beforeNode.id, beforeProperty.property, beforeProperty.value, undefined));
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
44
|
this.diffLwProperty(ctx.concat("properties", index), beforeNode, beforeProperty, afterProperty);
|
|
@@ -48,7 +48,7 @@ export class LionWebJsonDiff {
|
|
|
48
48
|
const key = afterProperty.property.key;
|
|
49
49
|
const beforeProperty = NodeUtils.findLwProperty(beforeNode, key);
|
|
50
50
|
if (beforeProperty === null) {
|
|
51
|
-
this.change(new PropertyValueChanged(ctx.concat("properties", index), beforeNode.id, afterProperty.property
|
|
51
|
+
this.change(new PropertyValueChanged(ctx.concat("properties", index), beforeNode.id, afterProperty.property, undefined, afterProperty.value));
|
|
52
52
|
}
|
|
53
53
|
// no else, if the property exists in both nodes, the diff has been claculated in the loop before this one
|
|
54
54
|
});
|
|
@@ -59,7 +59,7 @@ export class LionWebJsonDiff {
|
|
|
59
59
|
// NB No containment is considered equivalent to a containment with empty _children_
|
|
60
60
|
if (beforeContainment.children.length !== 0) {
|
|
61
61
|
beforeContainment.children.forEach(childId => {
|
|
62
|
-
this.change(new ChildRemoved(ctx.concat("containments", index), beforeNode, beforeContainment.containment
|
|
62
|
+
this.change(new ChildRemoved(ctx.concat("containments", index), beforeNode, beforeContainment.containment, childId));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -73,7 +73,7 @@ export class LionWebJsonDiff {
|
|
|
73
73
|
if (beforeContainment === null) {
|
|
74
74
|
if (afterContainment.children.length !== 0) {
|
|
75
75
|
afterContainment.children.forEach(childId => {
|
|
76
|
-
this.change(new ChildAdded(ctx.concat("containments", index), afterNode, afterContainment.containment
|
|
76
|
+
this.change(new ChildAdded(ctx.concat("containments", index), afterNode, afterContainment.containment, childId));
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
}
|
|
@@ -85,12 +85,12 @@ export class LionWebJsonDiff {
|
|
|
85
85
|
if (afterReference === null) {
|
|
86
86
|
if (beforeReference.targets.length !== 0) {
|
|
87
87
|
beforeReference.targets.forEach(target => {
|
|
88
|
-
this.change(new TargetRemoved(ctx.concat("references", index), afterNode, beforeReference.reference
|
|
88
|
+
this.change(new TargetRemoved(ctx.concat("references", index), afterNode, beforeReference.reference, target.reference));
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
|
-
this.diffLwReference(ctx.concat("references", index), beforeReference, afterReference);
|
|
93
|
+
this.diffLwReference(ctx.concat("references", index), beforeNode, beforeReference, afterReference);
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
afterNode.references.forEach((afterReference, index) => {
|
|
@@ -99,7 +99,7 @@ export class LionWebJsonDiff {
|
|
|
99
99
|
if (beforeReference === null) {
|
|
100
100
|
if (afterReference.targets.length !== 0) {
|
|
101
101
|
afterReference.targets.forEach(target => {
|
|
102
|
-
this.change(new TargetAdded(ctx.concat("references", index), afterNode, afterReference.reference
|
|
102
|
+
this.change(new TargetAdded(ctx.concat("references", index), afterNode, afterReference.reference, target.reference));
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -154,33 +154,35 @@ export class LionWebJsonDiff {
|
|
|
154
154
|
// TODO Also check for the order that can be changed!!!
|
|
155
155
|
for (const childId1 of beforeContainment.children) {
|
|
156
156
|
if (!afterContainment.children.includes(childId1)) {
|
|
157
|
-
this.change(new ChildRemoved(ctx, node, beforeContainment.containment
|
|
157
|
+
this.change(new ChildRemoved(ctx, node, beforeContainment.containment, childId1));
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
for (const childId2 of afterContainment.children) {
|
|
161
161
|
if (!beforeContainment.children.includes(childId2)) {
|
|
162
|
-
this.change(new ChildAdded(ctx, node, beforeContainment.containment
|
|
162
|
+
this.change(new ChildAdded(ctx, node, beforeContainment.containment, childId2));
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
|
-
diffLwReference(ctx,
|
|
167
|
-
if (!isEqualMetaPointer(
|
|
166
|
+
diffLwReference(ctx, node, beforeRef, afterRef) {
|
|
167
|
+
if (!isEqualMetaPointer(beforeRef.reference, afterRef.reference)) {
|
|
168
168
|
console.error("diffContainment: MetaPointers of containments should be identical");
|
|
169
|
-
this.diff(ctx, `Reference has concept ${JSON.stringify(
|
|
169
|
+
this.diff(ctx, `Reference has concept ${JSON.stringify(beforeRef.reference)} vs ${JSON.stringify(afterRef.reference)}`);
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
this.
|
|
171
|
+
beforeRef.targets.forEach((beforeTarget, index) => {
|
|
172
|
+
const afterTarget = NodeUtils.findLwReferenceTarget(afterRef.targets, beforeTarget);
|
|
173
|
+
if (afterTarget === null) {
|
|
174
|
+
// this.change(new TargetRemoved(ctx.concat("targets", index), node, target))
|
|
175
|
+
// this.diff(ctx, `REFERENCE Target ${JSON.stringify(beforeTarget)} missing in second `)
|
|
176
|
+
this.change(new TargetRemoved(ctx.concat("targets", index), node, beforeRef.reference, beforeTarget.reference));
|
|
175
177
|
}
|
|
176
178
|
else {
|
|
177
|
-
if (
|
|
178
|
-
this.diff(ctx, `REFERENCE target ${JSON.stringify(
|
|
179
|
+
if (beforeTarget.reference !== afterTarget.reference || beforeTarget.resolveInfo !== afterTarget.resolveInfo) {
|
|
180
|
+
this.diff(ctx.concat("targets", index), `REFERENCE target ${JSON.stringify(beforeTarget)} vs ${JSON.stringify(afterTarget)}`);
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
}
|
|
182
|
-
for (const target of
|
|
183
|
-
if (NodeUtils.findLwReferenceTarget(
|
|
183
|
+
});
|
|
184
|
+
for (const target of afterRef.targets) {
|
|
185
|
+
if (NodeUtils.findLwReferenceTarget(beforeRef.targets, target) === null) {
|
|
184
186
|
this.diff(ctx, `REFERENCE Target ${JSON.stringify(target)} missing in first `);
|
|
185
187
|
}
|
|
186
188
|
}
|
|
@@ -196,7 +198,7 @@ export class LionWebJsonDiff {
|
|
|
196
198
|
this.diff(ctx, `Property Object has concept ${JSON.stringify(beforeProperty.property)} vs ${JSON.stringify(afterProperty.property)}`);
|
|
197
199
|
}
|
|
198
200
|
if (beforeProperty.value !== afterProperty.value) {
|
|
199
|
-
this.change(new PropertyValueChanged(ctx, node.id, beforeProperty.property
|
|
201
|
+
this.change(new PropertyValueChanged(ctx, node.id, beforeProperty.property, beforeProperty.value, afterProperty.value));
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionWebJsonDiff.js","sourceRoot":"","sources":["../../src/diff/LionWebJsonDiff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EACH,UAAU,EACV,kBAAkB,EAOlB,SAAS,
|
|
1
|
+
{"version":3,"file":"LionWebJsonDiff.js","sourceRoot":"","sources":["../../src/diff/LionWebJsonDiff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EACH,UAAU,EACV,kBAAkB,EAOlB,SAAS,EACZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAU,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AAC5H,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6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AAC;IAEO,kBAAkB,CAAC,GAAgB,EAAE,IAAwB,EAAE,IAAwB;QAC3F,IAAI,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;YACzD,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,4BAA4B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACjG,CAAC;IACL,CAAC;IAEO,cAAc,CAClB,GAAgB,EAChB,IAAqB,EACrB,cAAmC,EACnC,aAAkC;QAElC,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvE,OAAO,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAA;YAClF,IAAI,CAAC,IAAI,CACL,GAAG,EACH,+BAA+B,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CACxH,CAAA;QACL,CAAC;QACD,IAAI,cAAc,CAAC,KAAK,KAAK,aAAa,CAAC,KAAK,EAAE,CAAC;YAC/C,IAAI,CAAC,MAAM,CAAC,IAAI,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;QAC3H,CAAC;IACL,CAAC;CACJ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js";
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js";
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js";
|
|
3
3
|
import { Change } from "./Change.js";
|
|
4
4
|
export declare abstract class ContainmentChange extends Change {
|
|
5
5
|
context: JsonContext;
|
|
6
6
|
parentNode: LionWebJsonNode;
|
|
7
|
-
|
|
7
|
+
containment: LionWebJsonMetaPointer;
|
|
8
8
|
childId: string;
|
|
9
|
-
constructor(context: JsonContext, parentNode: LionWebJsonNode,
|
|
9
|
+
constructor(context: JsonContext, parentNode: LionWebJsonNode, containment: LionWebJsonMetaPointer, childId: string);
|
|
10
10
|
}
|
|
11
11
|
export declare class ChildAdded extends ContainmentChange {
|
|
12
12
|
readonly id = "ChildAdded";
|
|
@@ -16,4 +16,11 @@ export declare class ChildRemoved extends ContainmentChange {
|
|
|
16
16
|
readonly id = "ChildRemoved";
|
|
17
17
|
protected msg: () => string;
|
|
18
18
|
}
|
|
19
|
+
export declare class ContainmentAdded extends Change {
|
|
20
|
+
node: LionWebJsonNode;
|
|
21
|
+
containment: LionWebJsonMetaPointer;
|
|
22
|
+
readonly id = "ContainmentAdded";
|
|
23
|
+
constructor(ctx: JsonContext, node: LionWebJsonNode, containment: LionWebJsonMetaPointer);
|
|
24
|
+
protected msg: () => string;
|
|
25
|
+
}
|
|
19
26
|
//# sourceMappingURL=ContainmentChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainmentChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/ContainmentChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"ContainmentChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/ContainmentChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,8BAAsB,iBAAkB,SAAQ,MAAM;IAEvC,OAAO,EAAE,WAAW;IACpB,UAAU,EAAE,eAAe;IAC3B,WAAW,EAAE,sBAAsB;IACnC,OAAO,EAAE,MAAM;gBAHf,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,sBAAsB,EACnC,OAAO,EAAE,MAAM;CAI7B;AAED,qBAAa,UAAW,SAAQ,iBAAiB;IAC7C,QAAQ,CAAC,EAAE,gBAAe;IAC1B,SAAS,CAAC,GAAG,eAA4G;CAC5H;AAED,qBAAa,YAAa,SAAQ,iBAAiB;IAC/C,QAAQ,CAAC,EAAE,kBAAiB;IAC5B,SAAS,CAAC,GAAG,eAAuE;CACvF;AAED,qBAAa,gBAAiB,SAAQ,MAAM;IAEH,IAAI,EAAE,eAAe;IAAS,WAAW,EAAE,sBAAsB;IADtG,QAAQ,CAAC,EAAE,sBAAsB;gBACrB,GAAG,EAAE,WAAW,EAAS,IAAI,EAAE,eAAe,EAAS,WAAW,EAAE,sBAAsB;IAItG,SAAS,CAAC,GAAG,eAA0F;CAC1G"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Change } from "./Change.js";
|
|
2
2
|
export class ContainmentChange extends Change {
|
|
3
|
-
constructor(context, parentNode,
|
|
3
|
+
constructor(context, parentNode, containment, childId) {
|
|
4
4
|
super(context);
|
|
5
5
|
this.context = context;
|
|
6
6
|
this.parentNode = parentNode;
|
|
7
|
-
this.
|
|
7
|
+
this.containment = containment;
|
|
8
8
|
this.childId = childId;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -12,7 +12,7 @@ export class ChildAdded extends ContainmentChange {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.id = "ChildAdded";
|
|
15
|
-
this.msg = () => `Node "${this.parentNode.id}" added child "${this.childId}" to containment ${this.
|
|
15
|
+
this.msg = () => `Node "${this.parentNode.id}" added child "${this.childId}" to containment ${this.containment.key}`;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export class ChildRemoved extends ContainmentChange {
|
|
@@ -22,4 +22,13 @@ export class ChildRemoved extends ContainmentChange {
|
|
|
22
22
|
this.msg = () => `Node "${this.parentNode.id}" removed child "${this.childId}"`;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
+
export class ContainmentAdded extends Change {
|
|
26
|
+
constructor(ctx, node, containment) {
|
|
27
|
+
super(ctx);
|
|
28
|
+
this.node = node;
|
|
29
|
+
this.containment = containment;
|
|
30
|
+
this.id = "ContainmentAdded";
|
|
31
|
+
this.msg = () => `Node "${this.node.id}" containment added: "${JSON.stringify(this.containment)}"`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
25
34
|
//# sourceMappingURL=ContainmentChange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainmentChange.js","sourceRoot":"","sources":["../../../src/diff/changes/ContainmentChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAgB,iBAAkB,SAAQ,MAAM;IAClD,YACW,OAAoB,EACpB,UAA2B,EAC3B,
|
|
1
|
+
{"version":3,"file":"ContainmentChange.js","sourceRoot":"","sources":["../../../src/diff/changes/ContainmentChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAgB,iBAAkB,SAAQ,MAAM;IAClD,YACW,OAAoB,EACpB,UAA2B,EAC3B,WAAmC,EACnC,OAAe;QAEtB,KAAK,CAAC,OAAO,CAAC,CAAA;QALP,YAAO,GAAP,OAAO,CAAa;QACpB,eAAU,GAAV,UAAU,CAAiB;QAC3B,gBAAW,GAAX,WAAW,CAAwB;QACnC,YAAO,GAAP,OAAO,CAAQ;IAG1B,CAAC;CACJ;AAED,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAAjD;;QACa,OAAE,GAAG,YAAY,CAAA;QAChB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,EAAE,kBAAkB,IAAI,CAAC,OAAO,oBAAoB,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,CAAA;IAC7H,CAAC;CAAA;AAED,MAAM,OAAO,YAAa,SAAQ,iBAAiB;IAAnD;;QACa,OAAE,GAAG,cAAc,CAAA;QAClB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,EAAE,oBAAoB,IAAI,CAAC,OAAO,GAAG,CAAA;IACxF,CAAC;CAAA;AAED,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAExC,YAAY,GAAgB,EAAS,IAAqB,EAAS,WAAmC;QAClG,KAAK,CAAC,GAAG,CAAC,CAAA;QADuB,SAAI,GAAJ,IAAI,CAAiB;QAAS,gBAAW,GAAX,WAAW,CAAwB;QAD7F,OAAE,GAAG,kBAAkB,CAAC;QAKvB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAA;IAFvG,CAAC;CAGJ"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js";
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js";
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js";
|
|
3
3
|
import { Change, ChangeType } from "./Change.js";
|
|
4
4
|
export declare class NodeClassifierChanged extends Change {
|
|
5
5
|
context: JsonContext;
|
|
6
6
|
node: LionWebJsonNode;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
oldClassifier: LionWebJsonMetaPointer;
|
|
8
|
+
newClassifier: LionWebJsonMetaPointer;
|
|
9
9
|
readonly id: ChangeType;
|
|
10
|
-
constructor(context: JsonContext, node: LionWebJsonNode,
|
|
10
|
+
constructor(context: JsonContext, node: LionWebJsonNode, oldClassifier: LionWebJsonMetaPointer, newClassifier: LionWebJsonMetaPointer);
|
|
11
11
|
protected msg: () => string;
|
|
12
12
|
}
|
|
13
13
|
export declare class ParentChanged extends Change {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/NodeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"NodeChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/NodeChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEhD,qBAAa,qBAAsB,SAAQ,MAAM;IAIlC,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,eAAe;IACrB,aAAa,EAAE,sBAAsB;IACrC,aAAa,EAAE,sBAAsB;IANhD,QAAQ,CAAC,EAAE,EAAE,UAAU,CAA0B;gBAGtC,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,sBAAsB,EACrC,aAAa,EAAE,sBAAsB;IAIhD,SAAS,CAAC,GAAG,eAAoH;CACpI;AAED,qBAAa,aAAc,SAAQ,MAAM;IAI1B,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,eAAe;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI;IAC7B,aAAa,EAAE,MAAM,GAAG,IAAI;IANvC,QAAQ,CAAC,EAAE,mBAAkB;gBAGlB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,eAAe,EACrB,cAAc,EAAE,MAAM,GAAG,IAAI,EAC7B,aAAa,EAAE,MAAM,GAAG,IAAI;IAKvC,SAAS,CAAC,GAAG,eAAwG;CACxH"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Change } from "./Change.js";
|
|
2
2
|
export class NodeClassifierChanged extends Change {
|
|
3
|
-
constructor(context, node,
|
|
3
|
+
constructor(context, node, oldClassifier, newClassifier) {
|
|
4
4
|
super(context);
|
|
5
5
|
this.context = context;
|
|
6
6
|
this.node = node;
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
7
|
+
this.oldClassifier = oldClassifier;
|
|
8
|
+
this.newClassifier = newClassifier;
|
|
9
9
|
this.id = "NodeClassifierChanged";
|
|
10
|
-
this.msg = () => `Object ${this.node.id} has classifier changed from ${this.
|
|
10
|
+
this.msg = () => `Object ${this.node.id} has classifier changed from ${this.oldClassifier.key} to ${this.newClassifier.key}`;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
export class ParentChanged extends Change {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeChange.js","sourceRoot":"","sources":["../../../src/diff/changes/NodeChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAEhD,MAAM,OAAO,qBAAsB,SAAQ,MAAM;IAG7C,YACW,OAAoB,EACpB,IAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"NodeChange.js","sourceRoot":"","sources":["../../../src/diff/changes/NodeChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAc,MAAM,aAAa,CAAA;AAEhD,MAAM,OAAO,qBAAsB,SAAQ,MAAM;IAG7C,YACW,OAAoB,EACpB,IAAqB,EACrB,aAAqC,EACrC,aAAqC;QAE5C,KAAK,CAAC,OAAO,CAAC,CAAA;QALP,YAAO,GAAP,OAAO,CAAa;QACpB,SAAI,GAAJ,IAAI,CAAiB;QACrB,kBAAa,GAAb,aAAa,CAAwB;QACrC,kBAAa,GAAb,aAAa,CAAwB;QANvC,OAAE,GAAe,uBAAuB,CAAA;QAUvC,QAAG,GAAG,GAAG,EAAE,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,EAAE,gCAAgC,IAAI,CAAC,aAAa,CAAC,GAAG,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,CAAA;IADjI,CAAC;CAEJ;AAED,MAAM,OAAO,aAAc,SAAQ,MAAM;IAGrC,YACW,OAAoB,EACpB,IAAqB,EACrB,cAA6B,EAC7B,aAA4B;QAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;QALP,YAAO,GAAP,OAAO,CAAa;QACpB,SAAI,GAAJ,IAAI,CAAiB;QACrB,mBAAc,GAAd,cAAc,CAAe;QAC7B,kBAAa,GAAb,aAAa,CAAe;QAN9B,OAAE,GAAG,eAAe,CAAA;QAWnB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,0BAA0B,IAAI,CAAC,cAAc,SAAS,IAAI,CAAC,aAAa,EAAE,CAAA;IAFrH,CAAC;CAGJ"}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js";
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js";
|
|
2
3
|
import { Change } from "./Change.js";
|
|
3
4
|
export declare abstract class PropertyChange extends Change {
|
|
4
5
|
context: JsonContext;
|
|
5
6
|
nodeId: string;
|
|
6
|
-
|
|
7
|
+
property: LionWebJsonMetaPointer;
|
|
7
8
|
oldValue: string | undefined;
|
|
8
9
|
newValue: string | undefined;
|
|
9
|
-
constructor(context: JsonContext, nodeId: string,
|
|
10
|
+
constructor(context: JsonContext, nodeId: string, property: LionWebJsonMetaPointer, oldValue: string | undefined, newValue: string | undefined);
|
|
10
11
|
}
|
|
11
12
|
export declare class PropertyValueChanged extends PropertyChange {
|
|
12
13
|
readonly id = "PropertyValueChanged";
|
|
13
14
|
protected msg: () => string;
|
|
14
15
|
}
|
|
16
|
+
export declare class PropertyAdded extends Change {
|
|
17
|
+
node: LionWebJsonNode;
|
|
18
|
+
property: LionWebJsonMetaPointer;
|
|
19
|
+
readonly id = "PropertyAdded";
|
|
20
|
+
constructor(ctx: JsonContext, node: LionWebJsonNode, property: LionWebJsonMetaPointer);
|
|
21
|
+
protected msg: () => string;
|
|
22
|
+
}
|
|
15
23
|
//# sourceMappingURL=PropertyChange.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/PropertyChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,8BAAsB,cAAe,SAAQ,MAAM;IAEpC,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,MAAM;IACd,
|
|
1
|
+
{"version":3,"file":"PropertyChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/PropertyChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,8BAAsB,cAAe,SAAQ,MAAM;IAEpC,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,sBAAsB;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS;gBAJ5B,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS;CAI1C;AAED,qBAAa,oBAAqB,SAAQ,cAAc;IACpD,QAAQ,CAAC,EAAE,0BAAyB;IACpC,SAAS,CAAC,GAAG,eAA8H;CAC9I;AAED,qBAAa,aAAc,SAAQ,MAAM;IAEA,IAAI,EAAE,eAAe;IAAS,QAAQ,EAAE,sBAAsB;IADnG,QAAQ,CAAC,EAAE,mBAAmB;gBAClB,GAAG,EAAE,WAAW,EAAS,IAAI,EAAE,eAAe,EAAS,QAAQ,EAAE,sBAAsB;IAInG,SAAS,CAAC,GAAG,eAAuF;CACvG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Change } from "./Change.js";
|
|
2
2
|
export class PropertyChange extends Change {
|
|
3
|
-
constructor(context, nodeId,
|
|
3
|
+
constructor(context, nodeId, property, oldValue, newValue) {
|
|
4
4
|
super(context);
|
|
5
5
|
this.context = context;
|
|
6
6
|
this.nodeId = nodeId;
|
|
7
|
-
this.
|
|
7
|
+
this.property = property;
|
|
8
8
|
this.oldValue = oldValue;
|
|
9
9
|
this.newValue = newValue;
|
|
10
10
|
}
|
|
@@ -13,7 +13,16 @@ export class PropertyValueChanged extends PropertyChange {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.id = "PropertyValueChanged";
|
|
16
|
-
this.msg = () => `Node "${this.nodeId} changed value of property "${this.
|
|
16
|
+
this.msg = () => `Node "${this.nodeId} changed value of property "${this.property.key}" from "${this.oldValue}" to "${this.newValue}"`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class PropertyAdded extends Change {
|
|
20
|
+
constructor(ctx, node, property) {
|
|
21
|
+
super(ctx);
|
|
22
|
+
this.node = node;
|
|
23
|
+
this.property = property;
|
|
24
|
+
this.id = "PropertyAdded";
|
|
25
|
+
this.msg = () => `Node "${this.node.id}" containment added: "${JSON.stringify(this.property)}"`;
|
|
17
26
|
}
|
|
18
27
|
}
|
|
19
28
|
//# sourceMappingURL=PropertyChange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyChange.js","sourceRoot":"","sources":["../../../src/diff/changes/PropertyChange.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropertyChange.js","sourceRoot":"","sources":["../../../src/diff/changes/PropertyChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAgB,cAAe,SAAQ,MAAM;IAC/C,YACW,OAAoB,EACpB,MAAc,EACd,QAAgC,EAChC,QAA4B,EAC5B,QAA4B;QAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;QANP,YAAO,GAAP,OAAO,CAAa;QACpB,WAAM,GAAN,MAAM,CAAQ;QACd,aAAQ,GAAR,QAAQ,CAAwB;QAChC,aAAQ,GAAR,QAAQ,CAAoB;QAC5B,aAAQ,GAAR,QAAQ,CAAoB;IAGvC,CAAC;CACJ;AAED,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAAxD;;QACa,OAAE,GAAG,sBAAsB,CAAA;QAC1B,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,MAAM,+BAA+B,IAAI,CAAC,QAAQ,CAAC,GAAG,WAAW,IAAI,CAAC,QAAQ,SAAS,IAAI,CAAC,QAAQ,GAAG,CAAA;IAC/I,CAAC;CAAA;AAED,MAAM,OAAO,aAAc,SAAQ,MAAM;IAErC,YAAY,GAAgB,EAAS,IAAqB,EAAS,QAAgC;QAC/F,KAAK,CAAC,GAAG,CAAC,CAAA;QADuB,SAAI,GAAJ,IAAI,CAAiB;QAAS,aAAQ,GAAR,QAAQ,CAAwB;QAD1F,OAAE,GAAG,eAAe,CAAC;QAKpB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,yBAAyB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAA;IAFpG,CAAC;CAGJ"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js";
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js";
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js";
|
|
3
3
|
import { Change } from "./Change.js";
|
|
4
4
|
export declare abstract class ReferenceChange extends Change {
|
|
5
5
|
context: JsonContext;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
constructor(context: JsonContext,
|
|
6
|
+
node: LionWebJsonNode;
|
|
7
|
+
reference: LionWebJsonMetaPointer;
|
|
8
|
+
targetId: string;
|
|
9
|
+
constructor(context: JsonContext, node: LionWebJsonNode, reference: LionWebJsonMetaPointer, targetId: string);
|
|
10
10
|
}
|
|
11
11
|
export declare class TargetAdded extends ReferenceChange {
|
|
12
12
|
readonly id = "TargetAdded";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/ReferenceChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"ReferenceChange.d.ts","sourceRoot":"","sources":["../../../src/diff/changes/ReferenceChange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,8BAAsB,eAAgB,SAAQ,MAAM;IAErC,OAAO,EAAE,WAAW;IACpB,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,sBAAsB;IACjC,QAAQ,EAAE,MAAM;gBAHhB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,eAAe,EACrB,SAAS,EAAE,sBAAsB,EACjC,QAAQ,EAAE,MAAM;CAI9B;AAED,qBAAa,WAAY,SAAQ,eAAe;IAC5C,QAAQ,CAAC,EAAE,iBAAgB;IAC3B,SAAS,CAAC,GAAG,eAAsG;CACtH;AAED,qBAAa,aAAc,SAAQ,eAAe;IAC9C,QAAQ,CAAC,EAAE,mBAAkB;IAC7B,SAAS,CAAC,GAAG,eAA0G;CAC1H"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Change } from "./Change.js";
|
|
2
2
|
export class ReferenceChange extends Change {
|
|
3
|
-
constructor(context,
|
|
3
|
+
constructor(context, node, reference, targetId) {
|
|
4
4
|
super(context);
|
|
5
5
|
this.context = context;
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
8
|
-
this.
|
|
6
|
+
this.node = node;
|
|
7
|
+
this.reference = reference;
|
|
8
|
+
this.targetId = targetId;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
export class TargetAdded extends ReferenceChange {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
this.id = "TargetAdded";
|
|
15
|
-
this.msg = () => `Node "${this.
|
|
15
|
+
this.msg = () => `Node "${this.node.id}" added target "${this.targetId}" to reference "${this.reference.key}"`;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
export class TargetRemoved extends ReferenceChange {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
this.id = "TargetRemoved";
|
|
22
|
-
this.msg = () => `Node "${this.
|
|
22
|
+
this.msg = () => `Node "${this.node.id}" removed target "${this.targetId}" from reference "${this.reference.key}"`;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=ReferenceChange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceChange.js","sourceRoot":"","sources":["../../../src/diff/changes/ReferenceChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAgB,eAAgB,SAAQ,MAAM;IAChD,YACW,OAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"ReferenceChange.js","sourceRoot":"","sources":["../../../src/diff/changes/ReferenceChange.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,OAAgB,eAAgB,SAAQ,MAAM;IAChD,YACW,OAAoB,EACpB,IAAqB,EACrB,SAAiC,EACjC,QAAgB;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAA;QALP,YAAO,GAAP,OAAO,CAAa;QACpB,SAAI,GAAJ,IAAI,CAAiB;QACrB,cAAS,GAAT,SAAS,CAAwB;QACjC,aAAQ,GAAR,QAAQ,CAAQ;IAG3B,CAAC;CACJ;AAED,MAAM,OAAO,WAAY,SAAQ,eAAe;IAAhD;;QACa,OAAE,GAAG,aAAa,CAAA;QACjB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,mBAAmB,IAAI,CAAC,QAAQ,mBAAmB,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,CAAA;IACvH,CAAC;CAAA;AAED,MAAM,OAAO,aAAc,SAAQ,eAAe;IAAlD;;QACa,OAAE,GAAG,eAAe,CAAA;QACnB,QAAG,GAAG,GAAG,EAAE,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,EAAE,qBAAqB,IAAI,CAAC,QAAQ,qBAAqB,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,CAAA;IAC3H,CAAC;CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionWebJsonChunkWrapper.d.ts","sourceRoot":"","sources":["../../src/json/LionWebJsonChunkWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,EACT,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAG1E;;;GAGG;AACH,qBAAa,uBAAuB;IAChC,SAAS,EAAE,gBAAgB,CAAA;IA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WAAW,EAAE,sBAAsB,GAAG,sBAAsB,GAAG,SAAS;IAM/G,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,sBAAsB,GAAG,mBAAmB,GAAG,SAAS;IAMtG,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,EAAE;IAIzD,aAAa,CAAC,WAAW,EAAE,eAAe,GAAG,mBAAmB,EAAE;IAgBlE,QAAQ,IAAI,MAAM;IAUlB,OAAO,CAAC,iBAAiB;CA4B5B"}
|
|
@@ -71,6 +71,12 @@ export class LionWebJsonChunkWrapper {
|
|
|
71
71
|
});
|
|
72
72
|
const name = nameProperty === undefined ? "" : " " + nameProperty.value;
|
|
73
73
|
result += Array(depth).join(" ") + "(" + node.id + ")" + name + "\n";
|
|
74
|
+
node.properties.filter(p => p !== nameProperty).forEach(property => {
|
|
75
|
+
result += Array(depth + 1).join(" ") + "*" + property.property.key + "*: " + property.value + "\n";
|
|
76
|
+
});
|
|
77
|
+
node.references.forEach(ref => {
|
|
78
|
+
result += Array(depth + 1).join(" ") + "*" + ref.reference.key + "*: " + JSON.stringify(ref.targets) + "\n";
|
|
79
|
+
});
|
|
74
80
|
node.containments.forEach(cont => {
|
|
75
81
|
if (cont.children.length !== 0) {
|
|
76
82
|
result += Array(depth + 1).join(" ") + "*" + cont.containment.key + "*" + "\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionWebJsonChunkWrapper.js","sourceRoot":"","sources":["../../src/json/LionWebJsonChunkWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,kBAAkB,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,oBAAoB,EAOnG,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE1C;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAShC,YAAY,KAAc;QAP1B,aAAQ,GAAqC,IAAI,CAAA;QACjD;;;WAGG;QACO,eAAU,GAA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MAAM,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,CAAA;QAClH,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC7B,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAA;gBACjF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;oBACvB,MAAM,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;gBACjE,CAAC,CAAC,CAAA;YACN,CAAC;QACL,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACjB,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lionweb/validation",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.2",
|
|
4
4
|
"license": "Apache 2.0",
|
|
5
5
|
"description": "LionWeb Serialization validation",
|
|
6
6
|
"author": "jos.warmer@openmodeling.nl",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"testInvalidWithLanguage": "node dist/runners/RunCheckFolderWithLanguage.js ../../../lionweb-integration-testing/testset/withLanguage/invalid/ ../../../lionweb-integration-testing/testset/withLanguage/myLang.language.json",
|
|
21
21
|
"testValidWithLanguage": "node dist/runners/RunCheckFolderWithLanguage.js ../../../lionweb-integration-testing/testset/withLanguage/valid/ ../../../lionweb-integration-testing/testset/withLanguage/myLang.language.json",
|
|
22
22
|
"test": "mocha",
|
|
23
|
-
"release": "npm publish",
|
|
24
23
|
"publish-local": "npm publish --registry http://localhost:4873",
|
|
25
24
|
"unpublish-local": "npm unpublish --force --registry http://localhost:4873",
|
|
26
25
|
"republish-local": "yarn unpublish-local && yarn publish-local"
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
LionWebJsonProperty,
|
|
9
9
|
LionWebJsonReference,
|
|
10
10
|
LwJsonUsedLanguage,
|
|
11
|
-
NodeUtils,
|
|
11
|
+
NodeUtils, LionWebJsonReferenceTarget
|
|
12
12
|
} from "../json/index.js"
|
|
13
13
|
import { Change, GenericChange } from "./changes/Change.js"
|
|
14
14
|
import { LanguageAdded, LanguageRemoved, NodeAdded, NodeRemoved, SerializationFormatChange } from "./changes/ChunkChange.js"
|
|
@@ -43,7 +43,7 @@ export class LionWebJsonDiff {
|
|
|
43
43
|
diffLwNode(ctx: JsonContext, beforeNode: LionWebJsonNode, afterNode: LionWebJsonNode): void {
|
|
44
44
|
if (!isEqualMetaPointer(beforeNode.classifier, afterNode.classifier)) {
|
|
45
45
|
this.change(
|
|
46
|
-
new NodeClassifierChanged(ctx.concat("classifier"), beforeNode, beforeNode.classifier
|
|
46
|
+
new NodeClassifierChanged(ctx.concat("classifier"), beforeNode, beforeNode.classifier, afterNode.classifier),
|
|
47
47
|
)
|
|
48
48
|
}
|
|
49
49
|
if (beforeNode.parent !== afterNode.parent) {
|
|
@@ -58,7 +58,7 @@ export class LionWebJsonDiff {
|
|
|
58
58
|
new PropertyValueChanged(
|
|
59
59
|
ctx.concat("properties", index),
|
|
60
60
|
beforeNode.id,
|
|
61
|
-
beforeProperty.property
|
|
61
|
+
beforeProperty.property,
|
|
62
62
|
beforeProperty.value,
|
|
63
63
|
undefined,
|
|
64
64
|
),
|
|
@@ -75,7 +75,7 @@ export class LionWebJsonDiff {
|
|
|
75
75
|
new PropertyValueChanged(
|
|
76
76
|
ctx.concat("properties", index),
|
|
77
77
|
beforeNode.id,
|
|
78
|
-
afterProperty.property
|
|
78
|
+
afterProperty.property,
|
|
79
79
|
undefined,
|
|
80
80
|
afterProperty.value,
|
|
81
81
|
),
|
|
@@ -90,7 +90,7 @@ export class LionWebJsonDiff {
|
|
|
90
90
|
// NB No containment is considered equivalent to a containment with empty _children_
|
|
91
91
|
if (beforeContainment.children.length !== 0) {
|
|
92
92
|
beforeContainment.children.forEach(childId => {
|
|
93
|
-
this.change(new ChildRemoved(ctx.concat("containments", index), beforeNode, beforeContainment.containment
|
|
93
|
+
this.change(new ChildRemoved(ctx.concat("containments", index), beforeNode, beforeContainment.containment, childId))
|
|
94
94
|
})
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
@@ -103,7 +103,7 @@ export class LionWebJsonDiff {
|
|
|
103
103
|
if (beforeContainment === null) {
|
|
104
104
|
if (afterContainment.children.length !== 0) {
|
|
105
105
|
afterContainment.children.forEach(childId => {
|
|
106
|
-
this.change(new ChildAdded(ctx.concat("containments", index), afterNode, afterContainment.containment
|
|
106
|
+
this.change(new ChildAdded(ctx.concat("containments", index), afterNode, afterContainment.containment, childId))
|
|
107
107
|
})
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -115,11 +115,11 @@ export class LionWebJsonDiff {
|
|
|
115
115
|
if (afterReference === null) {
|
|
116
116
|
if (beforeReference.targets.length !== 0) {
|
|
117
117
|
beforeReference.targets.forEach(target => {
|
|
118
|
-
this.change(new TargetRemoved(ctx.concat("references", index), afterNode, beforeReference.reference
|
|
118
|
+
this.change(new TargetRemoved(ctx.concat("references", index), afterNode, beforeReference.reference, target.reference))
|
|
119
119
|
})
|
|
120
120
|
}
|
|
121
121
|
} else {
|
|
122
|
-
this.diffLwReference(ctx.concat("references", index), beforeReference, afterReference)
|
|
122
|
+
this.diffLwReference(ctx.concat("references", index), beforeNode, beforeReference, afterReference)
|
|
123
123
|
}
|
|
124
124
|
})
|
|
125
125
|
afterNode.references.forEach((afterReference: LionWebJsonReference, index: number) => {
|
|
@@ -128,7 +128,7 @@ export class LionWebJsonDiff {
|
|
|
128
128
|
if (beforeReference === null) {
|
|
129
129
|
if (afterReference.targets.length !== 0) {
|
|
130
130
|
afterReference.targets.forEach(target => {
|
|
131
|
-
this.change(new TargetAdded(ctx.concat("references", index), afterNode, afterReference.reference
|
|
131
|
+
this.change(new TargetAdded(ctx.concat("references", index), afterNode, afterReference.reference, target.reference))
|
|
132
132
|
})
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -199,33 +199,35 @@ export class LionWebJsonDiff {
|
|
|
199
199
|
// TODO Also check for the order that can be changed!!!
|
|
200
200
|
for (const childId1 of beforeContainment.children) {
|
|
201
201
|
if (!afterContainment.children.includes(childId1)) {
|
|
202
|
-
this.change(new ChildRemoved(ctx, node, beforeContainment.containment
|
|
202
|
+
this.change(new ChildRemoved(ctx, node, beforeContainment.containment, childId1))
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
for (const childId2 of afterContainment.children) {
|
|
206
206
|
if (!beforeContainment.children.includes(childId2)) {
|
|
207
|
-
this.change(new ChildAdded(ctx, node, beforeContainment.containment
|
|
207
|
+
this.change(new ChildAdded(ctx, node, beforeContainment.containment, childId2))
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
diffLwReference(ctx: JsonContext,
|
|
213
|
-
if (!isEqualMetaPointer(
|
|
212
|
+
diffLwReference(ctx: JsonContext, node: LionWebJsonNode, beforeRef: LionWebJsonReference, afterRef: LionWebJsonReference): void {
|
|
213
|
+
if (!isEqualMetaPointer(beforeRef.reference, afterRef.reference)) {
|
|
214
214
|
console.error("diffContainment: MetaPointers of containments should be identical")
|
|
215
|
-
this.diff(ctx, `Reference has concept ${JSON.stringify(
|
|
215
|
+
this.diff(ctx, `Reference has concept ${JSON.stringify(beforeRef.reference)} vs ${JSON.stringify(afterRef.reference)}`)
|
|
216
216
|
}
|
|
217
|
-
|
|
218
|
-
const
|
|
219
|
-
if (
|
|
220
|
-
this.
|
|
217
|
+
beforeRef.targets.forEach((beforeTarget: LionWebJsonReferenceTarget, index: number) => {
|
|
218
|
+
const afterTarget = NodeUtils.findLwReferenceTarget(afterRef.targets, beforeTarget)
|
|
219
|
+
if (afterTarget === null) {
|
|
220
|
+
// this.change(new TargetRemoved(ctx.concat("targets", index), node, target))
|
|
221
|
+
// this.diff(ctx, `REFERENCE Target ${JSON.stringify(beforeTarget)} missing in second `)
|
|
222
|
+
this.change(new TargetRemoved(ctx.concat("targets", index), node, beforeRef.reference, beforeTarget.reference))
|
|
221
223
|
} else {
|
|
222
|
-
if (
|
|
223
|
-
this.diff(ctx, `REFERENCE target ${JSON.stringify(
|
|
224
|
+
if (beforeTarget.reference !== afterTarget.reference || beforeTarget.resolveInfo !== afterTarget.resolveInfo) {
|
|
225
|
+
this.diff(ctx.concat("targets", index), `REFERENCE target ${JSON.stringify(beforeTarget)} vs ${JSON.stringify(afterTarget)}`)
|
|
224
226
|
}
|
|
225
227
|
}
|
|
226
|
-
}
|
|
227
|
-
for (const target of
|
|
228
|
-
if (NodeUtils.findLwReferenceTarget(
|
|
228
|
+
})
|
|
229
|
+
for (const target of afterRef.targets) {
|
|
230
|
+
if (NodeUtils.findLwReferenceTarget(beforeRef.targets, target) === null) {
|
|
229
231
|
this.diff(ctx, `REFERENCE Target ${JSON.stringify(target)} missing in first `)
|
|
230
232
|
}
|
|
231
233
|
}
|
|
@@ -251,7 +253,7 @@ export class LionWebJsonDiff {
|
|
|
251
253
|
)
|
|
252
254
|
}
|
|
253
255
|
if (beforeProperty.value !== afterProperty.value) {
|
|
254
|
-
this.change(new PropertyValueChanged(ctx, node.id, beforeProperty.property
|
|
256
|
+
this.change(new PropertyValueChanged(ctx, node.id, beforeProperty.property, beforeProperty.value, afterProperty.value))
|
|
255
257
|
}
|
|
256
258
|
}
|
|
257
259
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js"
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js"
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js"
|
|
3
3
|
import { Change } from "./Change.js"
|
|
4
4
|
|
|
5
5
|
export abstract class ContainmentChange extends Change {
|
|
6
6
|
constructor(
|
|
7
7
|
public context: JsonContext,
|
|
8
8
|
public parentNode: LionWebJsonNode,
|
|
9
|
-
public
|
|
9
|
+
public containment: LionWebJsonMetaPointer,
|
|
10
10
|
public childId: string,
|
|
11
11
|
) {
|
|
12
12
|
super(context)
|
|
@@ -15,7 +15,7 @@ export abstract class ContainmentChange extends Change {
|
|
|
15
15
|
|
|
16
16
|
export class ChildAdded extends ContainmentChange {
|
|
17
17
|
readonly id = "ChildAdded"
|
|
18
|
-
protected msg = () => `Node "${this.parentNode.id}" added child "${this.childId}" to containment ${this.
|
|
18
|
+
protected msg = () => `Node "${this.parentNode.id}" added child "${this.childId}" to containment ${this.containment.key}`
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export class ChildRemoved extends ContainmentChange {
|
|
@@ -23,4 +23,12 @@ export class ChildRemoved extends ContainmentChange {
|
|
|
23
23
|
protected msg = () => `Node "${this.parentNode.id}" removed child "${this.childId}"`
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
export class ContainmentAdded extends Change {
|
|
27
|
+
readonly id = "ContainmentAdded";
|
|
28
|
+
constructor(ctx: JsonContext, public node: LionWebJsonNode, public containment: LionWebJsonMetaPointer) {
|
|
29
|
+
super(ctx)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
protected msg = () => `Node "${this.node.id}" containment added: "${JSON.stringify(this.containment)}"`
|
|
33
|
+
}
|
|
26
34
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js"
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js"
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js"
|
|
3
3
|
import { Change, ChangeType } from "./Change.js"
|
|
4
4
|
|
|
5
5
|
export class NodeClassifierChanged extends Change {
|
|
@@ -8,12 +8,12 @@ export class NodeClassifierChanged extends Change {
|
|
|
8
8
|
constructor(
|
|
9
9
|
public context: JsonContext,
|
|
10
10
|
public node: LionWebJsonNode,
|
|
11
|
-
public
|
|
12
|
-
public
|
|
11
|
+
public oldClassifier: LionWebJsonMetaPointer,
|
|
12
|
+
public newClassifier: LionWebJsonMetaPointer,
|
|
13
13
|
) {
|
|
14
14
|
super(context)
|
|
15
15
|
}
|
|
16
|
-
protected msg = () => `Object ${this.node.id} has classifier changed from ${this.
|
|
16
|
+
protected msg = () => `Object ${this.node.id} has classifier changed from ${this.oldClassifier.key} to ${this.newClassifier.key}`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export class ParentChanged extends Change {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js"
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js"
|
|
2
3
|
import { Change } from "./Change.js"
|
|
3
4
|
|
|
4
5
|
export abstract class PropertyChange extends Change {
|
|
5
6
|
constructor(
|
|
6
7
|
public context: JsonContext,
|
|
7
8
|
public nodeId: string,
|
|
8
|
-
public
|
|
9
|
+
public property: LionWebJsonMetaPointer,
|
|
9
10
|
public oldValue: string | undefined,
|
|
10
11
|
public newValue: string | undefined,
|
|
11
12
|
) {
|
|
@@ -15,5 +16,14 @@ export abstract class PropertyChange extends Change {
|
|
|
15
16
|
|
|
16
17
|
export class PropertyValueChanged extends PropertyChange {
|
|
17
18
|
readonly id = "PropertyValueChanged"
|
|
18
|
-
protected msg = () => `Node "${this.nodeId} changed value of property "${this.
|
|
19
|
+
protected msg = () => `Node "${this.nodeId} changed value of property "${this.property.key}" from "${this.oldValue}" to "${this.newValue}"`
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class PropertyAdded extends Change {
|
|
23
|
+
readonly id = "PropertyAdded";
|
|
24
|
+
constructor(ctx: JsonContext, public node: LionWebJsonNode, public property: LionWebJsonMetaPointer) {
|
|
25
|
+
super(ctx)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
protected msg = () => `Node "${this.node.id}" containment added: "${JSON.stringify(this.property)}"`
|
|
19
29
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { JsonContext } from "../../issues/index.js"
|
|
2
|
-
import { LionWebJsonNode } from "../../json/index.js"
|
|
2
|
+
import { LionWebJsonMetaPointer, LionWebJsonNode } from "../../json/index.js"
|
|
3
3
|
import { Change } from "./Change.js"
|
|
4
4
|
|
|
5
5
|
export abstract class ReferenceChange extends Change {
|
|
6
6
|
constructor(
|
|
7
7
|
public context: JsonContext,
|
|
8
|
-
public
|
|
9
|
-
public
|
|
10
|
-
public
|
|
8
|
+
public node: LionWebJsonNode,
|
|
9
|
+
public reference: LionWebJsonMetaPointer,
|
|
10
|
+
public targetId: string,
|
|
11
11
|
) {
|
|
12
12
|
super(context)
|
|
13
13
|
}
|
|
@@ -15,10 +15,10 @@ export abstract class ReferenceChange extends Change {
|
|
|
15
15
|
|
|
16
16
|
export class TargetAdded extends ReferenceChange {
|
|
17
17
|
readonly id = "TargetAdded"
|
|
18
|
-
protected msg = () => `Node "${this.
|
|
18
|
+
protected msg = () => `Node "${this.node.id}" added target "${this.targetId}" to reference "${this.reference.key}"`
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export class TargetRemoved extends ReferenceChange {
|
|
22
22
|
readonly id = "TargetRemoved"
|
|
23
|
-
protected msg = () => `Node "${this.
|
|
23
|
+
protected msg = () => `Node "${this.node.id}" removed target "${this.targetId}" from reference "${this.reference.key}"`
|
|
24
24
|
}
|
|
@@ -95,6 +95,12 @@ export class LionWebJsonChunkWrapper {
|
|
|
95
95
|
})
|
|
96
96
|
const name = nameProperty === undefined ? "" : " " + nameProperty.value
|
|
97
97
|
result += Array(depth).join(" ") + "(" + node.id + ")" + name + "\n"
|
|
98
|
+
node.properties.filter(p => p !== nameProperty).forEach(property => {
|
|
99
|
+
result += Array(depth + 1).join(" ") + "*" + property.property.key + "*: " + property.value + "\n"
|
|
100
|
+
})
|
|
101
|
+
node.references.forEach(ref => {
|
|
102
|
+
result += Array(depth + 1).join(" ") + "*" + ref.reference.key + "*: " + JSON.stringify(ref.targets) + "\n"
|
|
103
|
+
})
|
|
98
104
|
node.containments.forEach(cont => {
|
|
99
105
|
if (cont.children.length !== 0) {
|
|
100
106
|
result += Array(depth + 1).join(" ") + "*" + cont.containment.key + "*" + "\n"
|