@hpcc-js/ddl-shim 2.17.25 → 2.18.1
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/LICENSE +43 -43
- package/dist/cli.js +1048 -1103
- package/dist/cli.js.map +1 -1
- package/dist/index.es6.js +1327 -1406
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +1332 -1411
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +3 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +9 -24
- package/schema/v1.json +26 -78
- package/schema/v2.json +40 -120
- package/src/__package__.ts +2 -2
- package/src/cli.ts +60 -60
- package/src/ddl/v0_0_22.ts +344 -344
- package/src/ddl/v1.ts +313 -313
- package/src/ddl/v2.ts +426 -426
- package/src/ddl/v2_0_23.ts +395 -395
- package/src/ddl/v2_1_0.ts +406 -406
- package/src/dermatology.ts +229 -229
- package/src/index.ts +11 -11
- package/src/upgrade.ts +734 -734
- package/src/validate.ts +39 -39
- package/types/__package__.d.ts +3 -3
- package/types/__package__.d.ts.map +1 -1
- package/types/cli.d.ts +1 -1
- package/types/ddl/v0_0_22.d.ts +270 -270
- package/types/ddl/v1.d.ts +234 -234
- package/types/ddl/v2.d.ts +338 -338
- package/types/ddl/v2_0_23.d.ts +314 -314
- package/types/ddl/v2_1_0.d.ts +321 -321
- package/types/dermatology.d.ts +10 -10
- package/types/index.d.ts +7 -7
- package/types/upgrade.d.ts +3 -3
- package/types/validate.d.ts +7 -7
package/schema/v2.json
CHANGED
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
]
|
|
36
36
|
},
|
|
37
37
|
"Dataset": {
|
|
38
|
-
"items": {
|
|
39
|
-
},
|
|
38
|
+
"items": {},
|
|
40
39
|
"type": "array"
|
|
41
40
|
},
|
|
42
41
|
"DatasourceType": {
|
|
@@ -74,17 +73,6 @@
|
|
|
74
73
|
}
|
|
75
74
|
]
|
|
76
75
|
},
|
|
77
|
-
"IActivityType": {
|
|
78
|
-
"enum": [
|
|
79
|
-
"filter",
|
|
80
|
-
"project",
|
|
81
|
-
"groupby",
|
|
82
|
-
"sort",
|
|
83
|
-
"limit",
|
|
84
|
-
"mappings"
|
|
85
|
-
],
|
|
86
|
-
"type": "string"
|
|
87
|
-
},
|
|
88
76
|
"IAggregate": {
|
|
89
77
|
"additionalProperties": false,
|
|
90
78
|
"properties": {
|
|
@@ -159,9 +147,7 @@
|
|
|
159
147
|
"type": "string"
|
|
160
148
|
},
|
|
161
149
|
"type": {
|
|
162
|
-
"
|
|
163
|
-
"count"
|
|
164
|
-
],
|
|
150
|
+
"const": "count",
|
|
165
151
|
"type": "string"
|
|
166
152
|
}
|
|
167
153
|
},
|
|
@@ -190,9 +176,7 @@
|
|
|
190
176
|
"type": "string"
|
|
191
177
|
},
|
|
192
178
|
"type": {
|
|
193
|
-
"
|
|
194
|
-
"databomb"
|
|
195
|
-
],
|
|
179
|
+
"const": "databomb",
|
|
196
180
|
"type": "string"
|
|
197
181
|
}
|
|
198
182
|
},
|
|
@@ -284,9 +268,7 @@
|
|
|
284
268
|
"type": "array"
|
|
285
269
|
},
|
|
286
270
|
"type": {
|
|
287
|
-
"
|
|
288
|
-
"="
|
|
289
|
-
],
|
|
271
|
+
"const": "=",
|
|
290
272
|
"type": "string"
|
|
291
273
|
}
|
|
292
274
|
},
|
|
@@ -335,9 +317,7 @@
|
|
|
335
317
|
"type": "string"
|
|
336
318
|
},
|
|
337
319
|
"type": {
|
|
338
|
-
"
|
|
339
|
-
"boolean"
|
|
340
|
-
],
|
|
320
|
+
"const": "boolean",
|
|
341
321
|
"type": "string"
|
|
342
322
|
}
|
|
343
323
|
},
|
|
@@ -363,9 +343,7 @@
|
|
|
363
343
|
"type": "string"
|
|
364
344
|
},
|
|
365
345
|
"type": {
|
|
366
|
-
"
|
|
367
|
-
"dataset"
|
|
368
|
-
],
|
|
346
|
+
"const": "dataset",
|
|
369
347
|
"type": "string"
|
|
370
348
|
}
|
|
371
349
|
},
|
|
@@ -386,9 +364,7 @@
|
|
|
386
364
|
"type": "string"
|
|
387
365
|
},
|
|
388
366
|
"type": {
|
|
389
|
-
"
|
|
390
|
-
"number"
|
|
391
|
-
],
|
|
367
|
+
"const": "number",
|
|
392
368
|
"type": "string"
|
|
393
369
|
}
|
|
394
370
|
},
|
|
@@ -408,9 +384,7 @@
|
|
|
408
384
|
"type": "string"
|
|
409
385
|
},
|
|
410
386
|
"type": {
|
|
411
|
-
"
|
|
412
|
-
"number64"
|
|
413
|
-
],
|
|
387
|
+
"const": "number64",
|
|
414
388
|
"type": "string"
|
|
415
389
|
}
|
|
416
390
|
},
|
|
@@ -436,9 +410,7 @@
|
|
|
436
410
|
"type": "string"
|
|
437
411
|
},
|
|
438
412
|
"type": {
|
|
439
|
-
"
|
|
440
|
-
"object"
|
|
441
|
-
],
|
|
413
|
+
"const": "object",
|
|
442
414
|
"type": "string"
|
|
443
415
|
}
|
|
444
416
|
},
|
|
@@ -459,9 +431,7 @@
|
|
|
459
431
|
"type": "string"
|
|
460
432
|
},
|
|
461
433
|
"type": {
|
|
462
|
-
"
|
|
463
|
-
"range"
|
|
464
|
-
],
|
|
434
|
+
"const": "range",
|
|
465
435
|
"type": "string"
|
|
466
436
|
}
|
|
467
437
|
},
|
|
@@ -494,9 +464,7 @@
|
|
|
494
464
|
"type": "string"
|
|
495
465
|
},
|
|
496
466
|
"type": {
|
|
497
|
-
"
|
|
498
|
-
"set"
|
|
499
|
-
],
|
|
467
|
+
"const": "set",
|
|
500
468
|
"type": "string"
|
|
501
469
|
}
|
|
502
470
|
},
|
|
@@ -517,9 +485,7 @@
|
|
|
517
485
|
"type": "string"
|
|
518
486
|
},
|
|
519
487
|
"type": {
|
|
520
|
-
"
|
|
521
|
-
"string"
|
|
522
|
-
],
|
|
488
|
+
"const": "string",
|
|
523
489
|
"type": "string"
|
|
524
490
|
}
|
|
525
491
|
},
|
|
@@ -552,9 +518,7 @@
|
|
|
552
518
|
"type": "array"
|
|
553
519
|
},
|
|
554
520
|
"type": {
|
|
555
|
-
"
|
|
556
|
-
"filter"
|
|
557
|
-
],
|
|
521
|
+
"const": "filter",
|
|
558
522
|
"type": "string"
|
|
559
523
|
}
|
|
560
524
|
},
|
|
@@ -619,9 +583,7 @@
|
|
|
619
583
|
"type": "string"
|
|
620
584
|
},
|
|
621
585
|
"type": {
|
|
622
|
-
"
|
|
623
|
-
"form"
|
|
624
|
-
],
|
|
586
|
+
"const": "form",
|
|
625
587
|
"type": "string"
|
|
626
588
|
}
|
|
627
589
|
},
|
|
@@ -648,9 +610,7 @@
|
|
|
648
610
|
"type": "array"
|
|
649
611
|
},
|
|
650
612
|
"type": {
|
|
651
|
-
"
|
|
652
|
-
"groupby"
|
|
653
|
-
],
|
|
613
|
+
"const": "groupby",
|
|
654
614
|
"type": "string"
|
|
655
615
|
}
|
|
656
616
|
},
|
|
@@ -683,9 +643,7 @@
|
|
|
683
643
|
"type": "string"
|
|
684
644
|
},
|
|
685
645
|
"type": {
|
|
686
|
-
"
|
|
687
|
-
"hipie"
|
|
688
|
-
],
|
|
646
|
+
"const": "hipie",
|
|
689
647
|
"type": "string"
|
|
690
648
|
},
|
|
691
649
|
"url": {
|
|
@@ -722,9 +680,7 @@
|
|
|
722
680
|
"type": "number"
|
|
723
681
|
},
|
|
724
682
|
"type": {
|
|
725
|
-
"
|
|
726
|
-
"limit"
|
|
727
|
-
],
|
|
683
|
+
"const": "limit",
|
|
728
684
|
"type": "string"
|
|
729
685
|
}
|
|
730
686
|
},
|
|
@@ -750,9 +706,7 @@
|
|
|
750
706
|
"type": "string"
|
|
751
707
|
},
|
|
752
708
|
"type": {
|
|
753
|
-
"
|
|
754
|
-
"logicalfile"
|
|
755
|
-
],
|
|
709
|
+
"const": "logicalfile",
|
|
756
710
|
"type": "string"
|
|
757
711
|
},
|
|
758
712
|
"url": {
|
|
@@ -771,8 +725,7 @@
|
|
|
771
725
|
"IMap": {
|
|
772
726
|
"additionalProperties": false,
|
|
773
727
|
"properties": {
|
|
774
|
-
"default": {
|
|
775
|
-
},
|
|
728
|
+
"default": {},
|
|
776
729
|
"fieldID": {
|
|
777
730
|
"type": "string"
|
|
778
731
|
},
|
|
@@ -786,9 +739,7 @@
|
|
|
786
739
|
"type": "string"
|
|
787
740
|
},
|
|
788
741
|
"type": {
|
|
789
|
-
"
|
|
790
|
-
"map"
|
|
791
|
-
],
|
|
742
|
+
"const": "map",
|
|
792
743
|
"type": "string"
|
|
793
744
|
}
|
|
794
745
|
},
|
|
@@ -804,10 +755,8 @@
|
|
|
804
755
|
"IMapMapping": {
|
|
805
756
|
"additionalProperties": false,
|
|
806
757
|
"properties": {
|
|
807
|
-
"newValue": {
|
|
808
|
-
}
|
|
809
|
-
"value": {
|
|
810
|
-
}
|
|
758
|
+
"newValue": {},
|
|
759
|
+
"value": {}
|
|
811
760
|
},
|
|
812
761
|
"required": [
|
|
813
762
|
"value",
|
|
@@ -862,9 +811,7 @@
|
|
|
862
811
|
"type": "array"
|
|
863
812
|
},
|
|
864
813
|
"type": {
|
|
865
|
-
"
|
|
866
|
-
"mappings"
|
|
867
|
-
],
|
|
814
|
+
"const": "mappings",
|
|
868
815
|
"type": "string"
|
|
869
816
|
}
|
|
870
817
|
},
|
|
@@ -887,9 +834,7 @@
|
|
|
887
834
|
"type": "array"
|
|
888
835
|
},
|
|
889
836
|
"type": {
|
|
890
|
-
"
|
|
891
|
-
"multi"
|
|
892
|
-
],
|
|
837
|
+
"const": "multi",
|
|
893
838
|
"type": "string"
|
|
894
839
|
}
|
|
895
840
|
},
|
|
@@ -925,9 +870,7 @@
|
|
|
925
870
|
"type": "array"
|
|
926
871
|
},
|
|
927
872
|
"type": {
|
|
928
|
-
"
|
|
929
|
-
"project"
|
|
930
|
-
],
|
|
873
|
+
"const": "project",
|
|
931
874
|
"type": "string"
|
|
932
875
|
}
|
|
933
876
|
},
|
|
@@ -990,9 +933,7 @@
|
|
|
990
933
|
"$ref": "#/definitions/OutputDict"
|
|
991
934
|
},
|
|
992
935
|
"type": {
|
|
993
|
-
"
|
|
994
|
-
"rest"
|
|
995
|
-
],
|
|
936
|
+
"const": "rest",
|
|
996
937
|
"type": "string"
|
|
997
938
|
},
|
|
998
939
|
"url": {
|
|
@@ -1031,9 +972,7 @@
|
|
|
1031
972
|
"type": "string"
|
|
1032
973
|
},
|
|
1033
974
|
"type": {
|
|
1034
|
-
"
|
|
1035
|
-
"roxie"
|
|
1036
|
-
],
|
|
975
|
+
"const": "roxie",
|
|
1037
976
|
"type": "string"
|
|
1038
977
|
},
|
|
1039
978
|
"url": {
|
|
@@ -1087,9 +1026,7 @@
|
|
|
1087
1026
|
"type": "string"
|
|
1088
1027
|
},
|
|
1089
1028
|
"type": {
|
|
1090
|
-
"
|
|
1091
|
-
"scale"
|
|
1092
|
-
],
|
|
1029
|
+
"const": "scale",
|
|
1093
1030
|
"type": "string"
|
|
1094
1031
|
}
|
|
1095
1032
|
},
|
|
@@ -1111,9 +1048,7 @@
|
|
|
1111
1048
|
"type": "array"
|
|
1112
1049
|
},
|
|
1113
1050
|
"type": {
|
|
1114
|
-
"
|
|
1115
|
-
"sort"
|
|
1116
|
-
],
|
|
1051
|
+
"const": "sort",
|
|
1117
1052
|
"type": "string"
|
|
1118
1053
|
}
|
|
1119
1054
|
},
|
|
@@ -1149,9 +1084,7 @@
|
|
|
1149
1084
|
"type": "string"
|
|
1150
1085
|
},
|
|
1151
1086
|
"type": {
|
|
1152
|
-
"
|
|
1153
|
-
"template"
|
|
1154
|
-
],
|
|
1087
|
+
"const": "template",
|
|
1155
1088
|
"type": "string"
|
|
1156
1089
|
}
|
|
1157
1090
|
},
|
|
@@ -1241,9 +1174,7 @@
|
|
|
1241
1174
|
"$ref": "#/definitions/OutputDict"
|
|
1242
1175
|
},
|
|
1243
1176
|
"type": {
|
|
1244
|
-
"
|
|
1245
|
-
"wuresult"
|
|
1246
|
-
],
|
|
1177
|
+
"const": "wuresult",
|
|
1247
1178
|
"type": "string"
|
|
1248
1179
|
},
|
|
1249
1180
|
"url": {
|
|
@@ -1297,8 +1228,7 @@
|
|
|
1297
1228
|
"type": "boolean"
|
|
1298
1229
|
},
|
|
1299
1230
|
{
|
|
1300
|
-
"not": {
|
|
1301
|
-
}
|
|
1231
|
+
"not": {}
|
|
1302
1232
|
},
|
|
1303
1233
|
{
|
|
1304
1234
|
"$ref": "#/definitions/IWidgetProperties"
|
|
@@ -1360,20 +1290,12 @@
|
|
|
1360
1290
|
]
|
|
1361
1291
|
},
|
|
1362
1292
|
"Range": {
|
|
1363
|
-
"items":
|
|
1364
|
-
|
|
1365
|
-
"
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
"type": [
|
|
1372
|
-
"number",
|
|
1373
|
-
"string"
|
|
1374
|
-
]
|
|
1375
|
-
}
|
|
1376
|
-
],
|
|
1293
|
+
"items": {
|
|
1294
|
+
"type": [
|
|
1295
|
+
"number",
|
|
1296
|
+
"string"
|
|
1297
|
+
]
|
|
1298
|
+
},
|
|
1377
1299
|
"maxItems": 2,
|
|
1378
1300
|
"minItems": 2,
|
|
1379
1301
|
"type": "array"
|
|
@@ -1622,9 +1544,7 @@
|
|
|
1622
1544
|
"$ref": "#/definitions/IProperties"
|
|
1623
1545
|
},
|
|
1624
1546
|
"version": {
|
|
1625
|
-
"
|
|
1626
|
-
"2.2.1"
|
|
1627
|
-
],
|
|
1547
|
+
"const": "2.2.1",
|
|
1628
1548
|
"type": "string"
|
|
1629
1549
|
}
|
|
1630
1550
|
},
|
|
@@ -1644,4 +1564,4 @@
|
|
|
1644
1564
|
"type": "string"
|
|
1645
1565
|
}
|
|
1646
1566
|
}
|
|
1647
|
-
}
|
|
1567
|
+
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/ddl-shim";
|
|
2
|
-
export const PKG_VERSION = "2.
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "2.18.1";
|
|
3
|
+
export const BUILD_VERSION = "2.102.1";
|
package/src/cli.ts
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import * as fs from "fs";
|
|
2
|
-
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
import * as ddl2Schema from "../schema/v2.json";
|
|
5
|
-
import { upgrade } from "./upgrade";
|
|
6
|
-
|
|
7
|
-
const args = process.argv.slice(2);
|
|
8
|
-
|
|
9
|
-
switch (args[0]) {
|
|
10
|
-
case "--echo":
|
|
11
|
-
process.stdout.write(args[1]);
|
|
12
|
-
break;
|
|
13
|
-
case "--schema":
|
|
14
|
-
process.stdout.write(JSON.stringify(ddl2Schema));
|
|
15
|
-
break;
|
|
16
|
-
case "--upgrade":
|
|
17
|
-
case "--upgradeNoLower":
|
|
18
|
-
const srcPath = args[1];
|
|
19
|
-
const destPath = args[2];
|
|
20
|
-
const baseUrl = args[3];
|
|
21
|
-
const wuid = args[4];
|
|
22
|
-
const layoutPath = args[5];
|
|
23
|
-
if (srcPath && destPath && srcPath !== destPath) {
|
|
24
|
-
let layoutJson = {};
|
|
25
|
-
if (layoutPath) {
|
|
26
|
-
try {
|
|
27
|
-
layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());
|
|
28
|
-
} catch (e) {
|
|
29
|
-
console.error(e);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
fs.readFile(srcPath, "utf8", function (err, data) {
|
|
33
|
-
if (err) throw err;
|
|
34
|
-
const ddl2 = upgrade(
|
|
35
|
-
JSON.parse(data),
|
|
36
|
-
baseUrl || "http://localhost:8010",
|
|
37
|
-
wuid || "WUID",
|
|
38
|
-
args[0] === "--upgrade",
|
|
39
|
-
layoutJson
|
|
40
|
-
);
|
|
41
|
-
fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {
|
|
42
|
-
if (err) throw err;
|
|
43
|
-
console.log("complete");
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
break;
|
|
48
|
-
case "--help":
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
process.stdout.write(`
|
|
52
|
-
Usage: <command>
|
|
53
|
-
|
|
54
|
-
where <command> is one of:
|
|
55
|
-
--schema: output DDL2 schmea.
|
|
56
|
-
--upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.
|
|
57
|
-
--upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.
|
|
58
|
-
--help: this message.
|
|
59
|
-
`);
|
|
60
|
-
}
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import * as ddl2Schema from "../schema/v2.json";
|
|
5
|
+
import { upgrade } from "./upgrade";
|
|
6
|
+
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
|
|
9
|
+
switch (args[0]) {
|
|
10
|
+
case "--echo":
|
|
11
|
+
process.stdout.write(args[1]);
|
|
12
|
+
break;
|
|
13
|
+
case "--schema":
|
|
14
|
+
process.stdout.write(JSON.stringify(ddl2Schema));
|
|
15
|
+
break;
|
|
16
|
+
case "--upgrade":
|
|
17
|
+
case "--upgradeNoLower":
|
|
18
|
+
const srcPath = args[1];
|
|
19
|
+
const destPath = args[2];
|
|
20
|
+
const baseUrl = args[3];
|
|
21
|
+
const wuid = args[4];
|
|
22
|
+
const layoutPath = args[5];
|
|
23
|
+
if (srcPath && destPath && srcPath !== destPath) {
|
|
24
|
+
let layoutJson = {};
|
|
25
|
+
if (layoutPath) {
|
|
26
|
+
try {
|
|
27
|
+
layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());
|
|
28
|
+
} catch (e) {
|
|
29
|
+
console.error(e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
fs.readFile(srcPath, "utf8", function (err, data) {
|
|
33
|
+
if (err) throw err;
|
|
34
|
+
const ddl2 = upgrade(
|
|
35
|
+
JSON.parse(data),
|
|
36
|
+
baseUrl || "http://localhost:8010",
|
|
37
|
+
wuid || "WUID",
|
|
38
|
+
args[0] === "--upgrade",
|
|
39
|
+
layoutJson
|
|
40
|
+
);
|
|
41
|
+
fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {
|
|
42
|
+
if (err) throw err;
|
|
43
|
+
console.log("complete");
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
break;
|
|
48
|
+
case "--help":
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
process.stdout.write(`
|
|
52
|
+
Usage: <command>
|
|
53
|
+
|
|
54
|
+
where <command> is one of:
|
|
55
|
+
--schema: output DDL2 schmea.
|
|
56
|
+
--upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.
|
|
57
|
+
--upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.
|
|
58
|
+
--help: this message.
|
|
59
|
+
`);
|
|
60
|
+
}
|