@lionweb/validation 0.6.1 → 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.
@@ -1,57 +1,57 @@
1
1
  {
2
2
  "serializationFormatVersion": "2023.1",
3
- "languages": [
3
+ "languages" : [
4
4
  {
5
- "key": "LionCore-M3",
5
+ "key" : "LionCore-M3",
6
6
  "version": "2023.1"
7
7
  },
8
8
  {
9
- "key": "LionCore-builtins",
9
+ "key" : "LionCore-builtins",
10
10
  "version": "2023.1"
11
11
  }
12
12
  ],
13
- "nodes": [
13
+ "nodes" : [
14
14
  {
15
- "id": "LionCore-builtins",
16
- "classifier": {
15
+ "id" : "LionCore-builtins",
16
+ "classifier" : {
17
17
  "language": "LionCore-M3",
18
- "version": "2023.1",
19
- "key": "Language"
18
+ "version" : "2023.1",
19
+ "key" : "Language"
20
20
  },
21
- "properties": [
21
+ "properties" : [
22
22
  {
23
23
  "property": {
24
24
  "language": "LionCore-builtins",
25
- "version": "2023.1",
26
- "key": "LionCore-builtins-INamed-name"
25
+ "version" : "2023.1",
26
+ "key" : "LionCore-builtins-INamed-name"
27
27
  },
28
- "value": "LionCore_builtins"
28
+ "value" : "LionCore_builtins"
29
29
  },
30
30
  {
31
31
  "property": {
32
32
  "language": "LionCore-M3",
33
- "version": "2023.1",
34
- "key": "Language-version"
33
+ "version" : "2023.1",
34
+ "key" : "Language-version"
35
35
  },
36
- "value": "2023.1"
36
+ "value" : "2023.1"
37
37
  },
38
38
  {
39
39
  "property": {
40
40
  "language": "LionCore-M3",
41
- "version": "2023.1",
42
- "key": "IKeyed-key"
41
+ "version" : "2023.1",
42
+ "key" : "IKeyed-key"
43
43
  },
44
- "value": "LionCore-builtins"
44
+ "value" : "LionCore-builtins"
45
45
  }
46
46
  ],
47
47
  "containments": [
48
48
  {
49
49
  "containment": {
50
50
  "language": "LionCore-M3",
51
- "version": "2023.1",
52
- "key": "Language-entities"
51
+ "version" : "2023.1",
52
+ "key" : "Language-entities"
53
53
  },
54
- "children": [
54
+ "children" : [
55
55
  "LionCore-builtins-String",
56
56
  "LionCore-builtins-Boolean",
57
57
  "LionCore-builtins-Integer",
@@ -61,312 +61,312 @@
61
61
  ]
62
62
  }
63
63
  ],
64
- "references": [
64
+ "references" : [
65
65
  {
66
66
  "reference": {
67
67
  "language": "LionCore-M3",
68
- "version": "2023.1",
69
- "key": "Language-dependsOn"
68
+ "version" : "2023.1",
69
+ "key" : "Language-dependsOn"
70
70
  },
71
- "targets": []
71
+ "targets" : []
72
72
  }
73
73
  ],
74
- "annotations": [],
75
- "parent": null
74
+ "annotations" : [],
75
+ "parent" : null
76
76
  },
77
77
  {
78
- "id": "LionCore-builtins-String",
79
- "classifier": {
78
+ "id" : "LionCore-builtins-String",
79
+ "classifier" : {
80
80
  "language": "LionCore-M3",
81
- "version": "2023.1",
82
- "key": "PrimitiveType"
81
+ "version" : "2023.1",
82
+ "key" : "PrimitiveType"
83
83
  },
84
- "properties": [
84
+ "properties" : [
85
85
  {
86
86
  "property": {
87
87
  "language": "LionCore-builtins",
88
- "version": "2023.1",
89
- "key": "LionCore-builtins-INamed-name"
88
+ "version" : "2023.1",
89
+ "key" : "LionCore-builtins-INamed-name"
90
90
  },
91
- "value": "String"
91
+ "value" : "String"
92
92
  },
93
93
  {
94
94
  "property": {
95
95
  "language": "LionCore-M3",
96
- "version": "2023.1",
97
- "key": "IKeyed-key"
96
+ "version" : "2023.1",
97
+ "key" : "IKeyed-key"
98
98
  },
99
- "value": "LionCore-builtins-String"
99
+ "value" : "LionCore-builtins-String"
100
100
  }
101
101
  ],
102
102
  "containments": [],
103
- "references": [],
104
- "annotations": [],
105
- "parent": "LionCore-builtins"
103
+ "references" : [],
104
+ "annotations" : [],
105
+ "parent" : "LionCore-builtins"
106
106
  },
107
107
  {
108
- "id": "LionCore-builtins-Boolean",
109
- "classifier": {
108
+ "id" : "LionCore-builtins-Boolean",
109
+ "classifier" : {
110
110
  "language": "LionCore-M3",
111
- "version": "2023.1",
112
- "key": "PrimitiveType"
111
+ "version" : "2023.1",
112
+ "key" : "PrimitiveType"
113
113
  },
114
- "properties": [
114
+ "properties" : [
115
115
  {
116
116
  "property": {
117
117
  "language": "LionCore-builtins",
118
- "version": "2023.1",
119
- "key": "LionCore-builtins-INamed-name"
118
+ "version" : "2023.1",
119
+ "key" : "LionCore-builtins-INamed-name"
120
120
  },
121
- "value": "Boolean"
121
+ "value" : "Boolean"
122
122
  },
123
123
  {
124
124
  "property": {
125
125
  "language": "LionCore-M3",
126
- "version": "2023.1",
127
- "key": "IKeyed-key"
126
+ "version" : "2023.1",
127
+ "key" : "IKeyed-key"
128
128
  },
129
- "value": "LionCore-builtins-Boolean"
129
+ "value" : "LionCore-builtins-Boolean"
130
130
  }
131
131
  ],
132
132
  "containments": [],
133
- "references": [],
134
- "annotations": [],
135
- "parent": "LionCore-builtins"
133
+ "references" : [],
134
+ "annotations" : [],
135
+ "parent" : "LionCore-builtins"
136
136
  },
137
137
  {
138
- "id": "LionCore-builtins-Integer",
139
- "classifier": {
138
+ "id" : "LionCore-builtins-Integer",
139
+ "classifier" : {
140
140
  "language": "LionCore-M3",
141
- "version": "2023.1",
142
- "key": "PrimitiveType"
141
+ "version" : "2023.1",
142
+ "key" : "PrimitiveType"
143
143
  },
144
- "properties": [
144
+ "properties" : [
145
145
  {
146
146
  "property": {
147
147
  "language": "LionCore-builtins",
148
- "version": "2023.1",
149
- "key": "LionCore-builtins-INamed-name"
148
+ "version" : "2023.1",
149
+ "key" : "LionCore-builtins-INamed-name"
150
150
  },
151
- "value": "Integer"
151
+ "value" : "Integer"
152
152
  },
153
153
  {
154
154
  "property": {
155
155
  "language": "LionCore-M3",
156
- "version": "2023.1",
157
- "key": "IKeyed-key"
156
+ "version" : "2023.1",
157
+ "key" : "IKeyed-key"
158
158
  },
159
- "value": "LionCore-builtins-Integer"
159
+ "value" : "LionCore-builtins-Integer"
160
160
  }
161
161
  ],
162
162
  "containments": [],
163
- "references": [],
164
- "annotations": [],
165
- "parent": "LionCore-builtins"
163
+ "references" : [],
164
+ "annotations" : [],
165
+ "parent" : "LionCore-builtins"
166
166
  },
167
167
  {
168
- "id": "LionCore-builtins-JSON",
169
- "classifier": {
168
+ "id" : "LionCore-builtins-JSON",
169
+ "classifier" : {
170
170
  "language": "LionCore-M3",
171
- "version": "2023.1",
172
- "key": "PrimitiveType"
171
+ "version" : "2023.1",
172
+ "key" : "PrimitiveType"
173
173
  },
174
- "properties": [
174
+ "properties" : [
175
175
  {
176
176
  "property": {
177
177
  "language": "LionCore-builtins",
178
- "version": "2023.1",
179
- "key": "LionCore-builtins-INamed-name"
178
+ "version" : "2023.1",
179
+ "key" : "LionCore-builtins-INamed-name"
180
180
  },
181
- "value": "JSON"
181
+ "value" : "JSON"
182
182
  },
183
183
  {
184
184
  "property": {
185
185
  "language": "LionCore-M3",
186
- "version": "2023.1",
187
- "key": "IKeyed-key"
186
+ "version" : "2023.1",
187
+ "key" : "IKeyed-key"
188
188
  },
189
- "value": "LionCore-builtins-JSON"
189
+ "value" : "LionCore-builtins-JSON"
190
190
  }
191
191
  ],
192
192
  "containments": [],
193
- "references": [],
194
- "annotations": [],
195
- "parent": "LionCore-builtins"
193
+ "references" : [],
194
+ "annotations" : [],
195
+ "parent" : "LionCore-builtins"
196
196
  },
197
197
  {
198
- "id": "LionCore-builtins-Node",
199
- "classifier": {
198
+ "id" : "LionCore-builtins-Node",
199
+ "classifier" : {
200
200
  "language": "LionCore-M3",
201
- "version": "2023.1",
202
- "key": "Concept"
201
+ "version" : "2023.1",
202
+ "key" : "Concept"
203
203
  },
204
- "properties": [
204
+ "properties" : [
205
205
  {
206
206
  "property": {
207
207
  "language": "LionCore-M3",
208
- "version": "2023.1",
209
- "key": "Concept-abstract"
208
+ "version" : "2023.1",
209
+ "key" : "Concept-abstract"
210
210
  },
211
- "value": "true"
211
+ "value" : "true"
212
212
  },
213
213
  {
214
214
  "property": {
215
215
  "language": "LionCore-M3",
216
- "version": "2023.1",
217
- "key": "Concept-partition"
216
+ "version" : "2023.1",
217
+ "key" : "Concept-partition"
218
218
  },
219
- "value": "false"
219
+ "value" : "false"
220
220
  },
221
221
  {
222
222
  "property": {
223
223
  "language": "LionCore-builtins",
224
- "version": "2023.1",
225
- "key": "LionCore-builtins-INamed-name"
224
+ "version" : "2023.1",
225
+ "key" : "LionCore-builtins-INamed-name"
226
226
  },
227
- "value": "Node"
227
+ "value" : "Node"
228
228
  },
229
229
  {
230
230
  "property": {
231
231
  "language": "LionCore-M3",
232
- "version": "2023.1",
233
- "key": "IKeyed-key"
232
+ "version" : "2023.1",
233
+ "key" : "IKeyed-key"
234
234
  },
235
- "value": "LionCore-builtins-Node"
235
+ "value" : "LionCore-builtins-Node"
236
236
  }
237
237
  ],
238
238
  "containments": [
239
239
  {
240
240
  "containment": {
241
241
  "language": "LionCore-M3",
242
- "version": "2023.1",
243
- "key": "Classifier-features"
242
+ "version" : "2023.1",
243
+ "key" : "Classifier-features"
244
244
  },
245
- "children": []
245
+ "children" : []
246
246
  }
247
247
  ],
248
- "references": [
248
+ "references" : [
249
249
  {
250
250
  "reference": {
251
251
  "language": "LionCore-M3",
252
- "version": "2023.1",
253
- "key": "Concept-extends"
252
+ "version" : "2023.1",
253
+ "key" : "Concept-extends"
254
254
  },
255
- "targets": []
255
+ "targets" : []
256
256
  },
257
257
  {
258
258
  "reference": {
259
259
  "language": "LionCore-M3",
260
- "version": "2023.1",
261
- "key": "Concept-implements"
260
+ "version" : "2023.1",
261
+ "key" : "Concept-implements"
262
262
  },
263
- "targets": []
263
+ "targets" : []
264
264
  }
265
265
  ],
266
- "annotations": [],
267
- "parent": "LionCore-builtins"
266
+ "annotations" : [],
267
+ "parent" : "LionCore-builtins"
268
268
  },
269
269
  {
270
- "id": "LionCore-builtins-INamed",
271
- "classifier": {
270
+ "id" : "LionCore-builtins-INamed",
271
+ "classifier" : {
272
272
  "language": "LionCore-M3",
273
- "version": "2023.1",
274
- "key": "Interface"
273
+ "version" : "2023.1",
274
+ "key" : "Interface"
275
275
  },
276
- "properties": [
276
+ "properties" : [
277
277
  {
278
278
  "property": {
279
279
  "language": "LionCore-builtins",
280
- "version": "2023.1",
281
- "key": "LionCore-builtins-INamed-name"
280
+ "version" : "2023.1",
281
+ "key" : "LionCore-builtins-INamed-name"
282
282
  },
283
- "value": "INamed"
283
+ "value" : "INamed"
284
284
  },
285
285
  {
286
286
  "property": {
287
287
  "language": "LionCore-M3",
288
- "version": "2023.1",
289
- "key": "IKeyed-key"
288
+ "version" : "2023.1",
289
+ "key" : "IKeyed-key"
290
290
  },
291
- "value": "LionCore-builtins-INamed"
291
+ "value" : "LionCore-builtins-INamed"
292
292
  }
293
293
  ],
294
294
  "containments": [
295
295
  {
296
296
  "containment": {
297
297
  "language": "LionCore-M3",
298
- "version": "2023.1",
299
- "key": "Classifier-features"
298
+ "version" : "2023.1",
299
+ "key" : "Classifier-features"
300
300
  },
301
- "children": [
301
+ "children" : [
302
302
  "LionCore-builtins-INamed-name"
303
303
  ]
304
304
  }
305
305
  ],
306
- "references": [
306
+ "references" : [
307
307
  {
308
308
  "reference": {
309
309
  "language": "LionCore-M3",
310
- "version": "2023.1",
311
- "key": "Interface-extends"
310
+ "version" : "2023.1",
311
+ "key" : "Interface-extends"
312
312
  },
313
- "targets": []
313
+ "targets" : []
314
314
  }
315
315
  ],
316
- "annotations": [],
317
- "parent": "LionCore-builtins"
316
+ "annotations" : [],
317
+ "parent" : "LionCore-builtins"
318
318
  },
319
319
  {
320
- "id": "LionCore-builtins-INamed-name",
321
- "classifier": {
320
+ "id" : "LionCore-builtins-INamed-name",
321
+ "classifier" : {
322
322
  "language": "LionCore-M3",
323
- "version": "2023.1",
324
- "key": "Property"
323
+ "version" : "2023.1",
324
+ "key" : "Property"
325
325
  },
326
- "properties": [
326
+ "properties" : [
327
327
  {
328
328
  "property": {
329
329
  "language": "LionCore-M3",
330
- "version": "2023.1",
331
- "key": "Feature-optional"
330
+ "version" : "2023.1",
331
+ "key" : "Feature-optional"
332
332
  },
333
- "value": "false"
333
+ "value" : "false"
334
334
  },
335
335
  {
336
336
  "property": {
337
337
  "language": "LionCore-builtins",
338
- "version": "2023.1",
339
- "key": "LionCore-builtins-INamed-name"
338
+ "version" : "2023.1",
339
+ "key" : "LionCore-builtins-INamed-name"
340
340
  },
341
- "value": "name"
341
+ "value" : "name"
342
342
  },
343
343
  {
344
344
  "property": {
345
345
  "language": "LionCore-M3",
346
- "version": "2023.1",
347
- "key": "IKeyed-key"
346
+ "version" : "2023.1",
347
+ "key" : "IKeyed-key"
348
348
  },
349
- "value": "LionCore-builtins-INamed-name"
349
+ "value" : "LionCore-builtins-INamed-name"
350
350
  }
351
351
  ],
352
352
  "containments": [],
353
- "references": [
353
+ "references" : [
354
354
  {
355
355
  "reference": {
356
356
  "language": "LionCore-M3",
357
- "version": "2023.1",
358
- "key": "Property-type"
357
+ "version" : "2023.1",
358
+ "key" : "Property-type"
359
359
  },
360
- "targets": [
360
+ "targets" : [
361
361
  {
362
362
  "resolveInfo": "String",
363
- "reference": "LionCore-builtins-String"
363
+ "reference" : "LionCore-builtins-String"
364
364
  }
365
365
  ]
366
366
  }
367
367
  ],
368
- "annotations": [],
369
- "parent": "LionCore-builtins-INamed"
368
+ "annotations" : [],
369
+ "parent" : "LionCore-builtins-INamed"
370
370
  }
371
371
  ]
372
372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lionweb/validation",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "license": "Apache 2.0",
5
5
  "description": "LionWeb Serialization validation",
6
6
  "author": "jos.warmer@openmodeling.nl",
@@ -15,7 +15,9 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "clean": "rm -rf dist/ lionweb-validation-*.tgz",
18
- "build": "tsc",
18
+ "build": "tsc && npm run copyM3 && npm run copyBuiltins",
19
+ "copyM3": "node -e \"const fs = require('fs'); fs.copyFileSync('./src/languages/LionCore-M3.json', './dist/languages/LionCore-M3.json');\"",
20
+ "copyBuiltins": "node -e \"const fs = require('fs'); fs.copyFileSync('./src/languages/LionCore-builtins.json', './dist/languages/LionCore-builtins.json');\"",
19
21
  "lint": "eslint src",
20
22
  "test-here": "cd ../test && find dist/validation -type d | sed '1!G;h;$!d' | xargs npx mocha",
21
23
  "release": "npm publish",
@@ -1,9 +1,11 @@
1
1
  import { isEqualMetaPointer, LionWebJsonNode, LionWebJsonChunk } from "../json/LionWebJson.js"
2
-
3
2
  import { LION_CORE_M3_KEY, MetaPointers } from "../json/M3definitions.js"
4
3
 
5
- import LionCore_M3 from "./LionCore-M3.json" assert { type: "json" }
6
- import LionCore_builtins from "./LionCore-builtins.json" assert { type: "json" }
4
+ import { createRequire } from 'module';
5
+
6
+ const require = createRequire(import.meta.url);
7
+ const LionCore_M3 = require('./LionCore-M3.json');
8
+ const LionCore_builtins = require('./LionCore-builtins.json');
7
9
 
8
10
  export const LionCore_M3_Json = LionCore_M3 as LionWebJsonChunk
9
11
  export const LionCore_builtins_Json = LionCore_builtins as LionWebJsonChunk