@golemio/pid 2.3.2-dev.660754464 → 2.3.2-dev.660767513
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/db/example/03_ropidgtfs_dump.sql +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.d.ts +1 -0
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +5 -3
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/docs/openapi-input.yaml +7 -0
- package/docs/openapi-output.yaml +51 -66
- package/package.json +6 -1
|
@@ -39,7 +39,7 @@ INSERT INTO ropidgtfs_stop_times (arrival_time, arrival_time_seconds, departure_
|
|
|
39
39
|
|
|
40
40
|
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U953S1', '2', 'U953Z102P', 50.0684400000000025, 14.5071700000000003, 'Skalka', '', 1, 'P', NULL, '2019-05-27 03:20:19.912+00', NULL, NULL, '2019-05-27 03:20:19.912+00', NULL, NULL, NULL, NULL, NULL);
|
|
41
41
|
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U713S1', '2', 'U713Z102P', 50.0733400000000017, 14.4900900000000004, 'Strašnická', '', 1, 'P', NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, NULL, NULL, NULL);
|
|
42
|
-
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U921S1', '2', 'U921Z102P', 50.0785399999999967, 14.4748900000000003, 'Želivského', '', 2, 'P', NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, NULL, NULL, NULL);
|
|
42
|
+
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone, asw_node_id, asw_stop_id) VALUES (0, 'U921S1', '2', 'U921Z102P', 50.0785399999999967, 14.4748900000000003, 'Želivského', '', 2, 'P', NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, '2019-05-27 03:20:18.808+00', NULL, NULL, NULL, NULL, NULL, 921, 102);
|
|
43
43
|
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U118S1', '2', 'U118Z102P', 50.0782900000000026, 14.4618900000000004, 'Flora', '', 2, 'P', NULL, '2019-05-27 03:20:16.491+00', NULL, NULL, '2019-05-27 03:20:16.491+00', NULL, NULL, NULL, NULL, NULL);
|
|
44
44
|
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U209S1', '2', 'U209Z102P', 50.0776400000000024, 14.4500399999999996, 'Jiřího z Poděbrad', '', 2, 'P', NULL, '2019-05-27 03:20:16.491+00', NULL, NULL, '2019-05-27 03:20:16.491+00', NULL, NULL, NULL, NULL, NULL);
|
|
45
45
|
INSERT INTO ropidgtfs_stops (location_type, parent_station, platform_code, stop_id, stop_lat, stop_lon, stop_name, stop_url, wheelchair_boarding, zone_id, create_batch_id, created_at, created_by, update_batch_id, updated_at, updated_by, level_id, stop_code, stop_desc, stop_timezone) VALUES (0, 'U476S1', '2', 'U476Z102P', 50.0754000000000019, 14.4390800000000006, 'Náměstí Míru', '', 2, 'P', NULL, '2019-05-27 03:20:17.945+00', NULL, NULL, '2019-05-27 03:20:17.945+00', NULL, NULL, NULL, NULL, NULL);
|
|
@@ -115,12 +115,12 @@ class GTFSTripsModel extends models_1.SequelizeModel {
|
|
|
115
115
|
* @returns Object of the retrieved record or null
|
|
116
116
|
*/
|
|
117
117
|
this.GetOne = (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
const { stopTimes, stops, shapes } = options;
|
|
118
|
+
const { route, stopTimes, stops, shapes } = options;
|
|
119
119
|
return this.sequelizeModel.findByPk(id, { include: this.GetInclusions(options) }).then((trip) => {
|
|
120
120
|
if (!trip) {
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
|
-
return this.ConvertItem(trip, { stops, shapes, stopTimes });
|
|
123
|
+
return this.ConvertItem(trip, { route, stops, shapes, stopTimes });
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
126
|
/** Prepare ORM query with selected params
|
|
@@ -191,7 +191,9 @@ class GTFSTripsModel extends models_1.SequelizeModel {
|
|
|
191
191
|
*/
|
|
192
192
|
this.ConvertItem = (trip, options) => {
|
|
193
193
|
const _a = trip.toJSON(), { stop_times: stopTimesItems = [], stops: stopItems = [], shapes: shapeItems = [] } = _a, item = __rest(_a, ["stop_times", "stops", "shapes"]);
|
|
194
|
-
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, item), (options.
|
|
194
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, item), (options.route && {
|
|
195
|
+
route: Object.assign(Object.assign({}, item.route), { is_night: item.route.is_night === "1", is_regional: item.route.is_regional === "1", is_substitute_transport: item.route.is_substitute_transport === "1" }),
|
|
196
|
+
})), (options.stops &&
|
|
195
197
|
options.stopTimes && {
|
|
196
198
|
stop_times: stopTimesItems.map((stopTime) => {
|
|
197
199
|
const convertedStopTime = stopTime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTFSTripsModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/ropid-gtfs/models/GTFSTripsModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAuE;AACvE,yEAAiF;AACjF,+DAA4E;AAC5E,qEAA0E;AAC1E,uEAA4C;AAE5C,MAAa,cAAe,SAAQ,uBAAc;IAC9C;QACI,KAAK,CAAC,sBAAS,CAAC,KAAK,CAAC,IAAI,EAAE,sBAAS,CAAC,KAAK,CAAC,WAAW,EAAE,sBAAS,CAAC,KAAK,CAAC,yBAAyB,EAAE;YAChG,MAAM,EAAE,sBAAS,CAAC,QAAQ;SAC7B,CAAC,CAAC;QAGA,cAAS,GAAG,CAAC,MAAW,EAAE,EAAE;YAC/B,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,EAAE;gBAClE,EAAE,EAAE,aAAa;gBACjB,UAAU,EAAE,SAAS;aACxB,CAAC,CAAC;YAEH,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,cAAc,EAAE;gBAClE,EAAE,EAAE,YAAY;gBAChB,UAAU,EAAE,SAAS;aACxB,CAAC,CAAC;YAEH,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,cAAc,EAAE;gBACnE,EAAE,EAAE,SAAS;gBACb,UAAU,EAAE,YAAY;aAC3B,CAAC,CAAC;YAEH,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC,cAAc,EAAE;gBACjE,EAAE,EAAE,OAAO;gBACX,UAAU,EAAE,UAAU;aACzB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AAU,EAAE,UAAU,CAAC,CAAC;oBACnF,OAAO,iBAAiB,CAAC;gBAC7B,CAAC,CAAC;aACL,CAAC,GACH,CAAC,OAAO,CAAC,KAAK;gBACb,CAAC,OAAO,CAAC,SAAS,IAAI;gBAClB,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;aACxF,CAAC,GACH,CAAC,CAAC,OAAO,CAAC,KAAK;gBACd,OAAO,CAAC,SAAS,IAAI;gBACjB,UAAU,EAAE,cAAc;aAC7B,CAAC,GACH,CAAC,OAAO,CAAC,MAAM,IAAI;gBAClB,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;aACpG,CAAC,EACJ;QACN,CAAC,CAAC;QAEF;;WAEG;QACO,kBAAa,GAAG,CAAC,cAAmB,EAAE,OAAe,EAAE,MAAc,EAAE,EAAE;YAC/E,OAAO,IAAA,yBAAmB,EAAC,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACtE,CAAC,CAAC;IA9OF,CAAC;CA+OJ;AApPD,wCAoPC"}
|
package/docs/openapi-input.yaml
CHANGED
package/docs/openapi-output.yaml
CHANGED
|
@@ -379,22 +379,20 @@ paths:
|
|
|
379
379
|
content:
|
|
380
380
|
application/json:
|
|
381
381
|
schema:
|
|
382
|
-
type:
|
|
383
|
-
|
|
384
|
-
type:
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
properties:
|
|
397
|
-
$ref: "#/components/schemas/GTFSStop"
|
|
382
|
+
type: object
|
|
383
|
+
properties:
|
|
384
|
+
type:
|
|
385
|
+
type: string
|
|
386
|
+
example: "FeatureCollection"
|
|
387
|
+
features:
|
|
388
|
+
type: array
|
|
389
|
+
items:
|
|
390
|
+
allOf:
|
|
391
|
+
- $ref: "#/components/schemas/FeaturePoint"
|
|
392
|
+
- type: object
|
|
393
|
+
properties:
|
|
394
|
+
properties:
|
|
395
|
+
$ref: "#/components/schemas/GTFSStop"
|
|
398
396
|
"401":
|
|
399
397
|
$ref: "#/components/responses/UnauthorizedError"
|
|
400
398
|
"404":
|
|
@@ -579,28 +577,26 @@ paths:
|
|
|
579
577
|
content:
|
|
580
578
|
application/json:
|
|
581
579
|
schema:
|
|
582
|
-
type:
|
|
583
|
-
|
|
584
|
-
type:
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
properties:
|
|
597
|
-
$ref: "#/components/schemas/VehiclepositionCompound"
|
|
580
|
+
type: object
|
|
581
|
+
properties:
|
|
582
|
+
type:
|
|
583
|
+
type: string
|
|
584
|
+
example: "FeatureCollection"
|
|
585
|
+
features:
|
|
586
|
+
type: array
|
|
587
|
+
items:
|
|
588
|
+
allOf:
|
|
589
|
+
- $ref: "#/components/schemas/FeaturePoint"
|
|
590
|
+
- type: object
|
|
591
|
+
properties:
|
|
592
|
+
properties:
|
|
593
|
+
$ref: "#/components/schemas/VehiclepositionCompound"
|
|
598
594
|
"401":
|
|
599
595
|
$ref: "#/components/responses/UnauthorizedError"
|
|
600
596
|
"404":
|
|
601
597
|
description: Not found
|
|
602
598
|
|
|
603
|
-
/
|
|
599
|
+
/vehiclepositions/{gtfsTripId}:
|
|
604
600
|
get:
|
|
605
601
|
summary: GET Vehicle Position
|
|
606
602
|
description: ""
|
|
@@ -859,6 +855,7 @@ paths:
|
|
|
859
855
|
example: ["L152", "L177"]
|
|
860
856
|
expiration_date:
|
|
861
857
|
type: string
|
|
858
|
+
nullable: true
|
|
862
859
|
example: "2021-01-07T12:48:06+01:00"
|
|
863
860
|
last_updated:
|
|
864
861
|
type: string
|
|
@@ -882,9 +879,6 @@ components:
|
|
|
882
879
|
title: GTFS Service
|
|
883
880
|
type: object
|
|
884
881
|
properties:
|
|
885
|
-
created_time:
|
|
886
|
-
type: string
|
|
887
|
-
example: "2018-09-09 12:32:45"
|
|
888
882
|
end_date:
|
|
889
883
|
type: string
|
|
890
884
|
example: "20190311"
|
|
@@ -927,7 +921,6 @@ components:
|
|
|
927
921
|
type: string
|
|
928
922
|
example: "20190226"
|
|
929
923
|
required:
|
|
930
|
-
- created_time
|
|
931
924
|
- end_date
|
|
932
925
|
- monday
|
|
933
926
|
- tuesday
|
|
@@ -951,10 +944,6 @@ components:
|
|
|
951
944
|
block_id:
|
|
952
945
|
type: string
|
|
953
946
|
example: ""
|
|
954
|
-
created_time:
|
|
955
|
-
type: string
|
|
956
|
-
example: "2018-09-09 12:32:45"
|
|
957
|
-
nullable: true
|
|
958
947
|
direction_id:
|
|
959
948
|
type: number
|
|
960
949
|
format: int64
|
|
@@ -1002,6 +991,7 @@ components:
|
|
|
1002
991
|
example: 0
|
|
1003
992
|
parent_station:
|
|
1004
993
|
type: string
|
|
994
|
+
nullable: true
|
|
1005
995
|
example: "U118S1"
|
|
1006
996
|
platform_code:
|
|
1007
997
|
type: string
|
|
@@ -1039,9 +1029,6 @@ components:
|
|
|
1039
1029
|
type: number
|
|
1040
1030
|
format: int64
|
|
1041
1031
|
nullable: true
|
|
1042
|
-
created_time:
|
|
1043
|
-
type: string
|
|
1044
|
-
example: "2018-09-09 12:32:45"
|
|
1045
1032
|
departure_time:
|
|
1046
1033
|
type: string
|
|
1047
1034
|
example: "13:12:35"
|
|
@@ -1050,17 +1037,15 @@ components:
|
|
|
1050
1037
|
format: int64
|
|
1051
1038
|
nullable: true
|
|
1052
1039
|
drop_off_type:
|
|
1053
|
-
type:
|
|
1054
|
-
|
|
1055
|
-
example: 0
|
|
1040
|
+
type: string
|
|
1041
|
+
example: "0"
|
|
1056
1042
|
last_modify:
|
|
1057
1043
|
type: string
|
|
1058
1044
|
example: "2018-09-09 12:32:45"
|
|
1059
1045
|
nullable: true
|
|
1060
1046
|
pickup_type:
|
|
1061
|
-
type:
|
|
1062
|
-
|
|
1063
|
-
example: 0
|
|
1047
|
+
type: string
|
|
1048
|
+
example: "0"
|
|
1064
1049
|
shape_dist_traveled:
|
|
1065
1050
|
type: number
|
|
1066
1051
|
format: float
|
|
@@ -1082,7 +1067,6 @@ components:
|
|
|
1082
1067
|
$ref: "#/components/schemas/GTFSStop"
|
|
1083
1068
|
required:
|
|
1084
1069
|
- arrival_time
|
|
1085
|
-
- created_time
|
|
1086
1070
|
- departure_time
|
|
1087
1071
|
- drop_off_type
|
|
1088
1072
|
- pickup_type
|
|
@@ -1118,10 +1102,6 @@ components:
|
|
|
1118
1102
|
agency_id:
|
|
1119
1103
|
type: string
|
|
1120
1104
|
example: "99"
|
|
1121
|
-
created_time:
|
|
1122
|
-
type: string
|
|
1123
|
-
example: "2018-09-09 12:32:45"
|
|
1124
|
-
nullable: true
|
|
1125
1105
|
is_night:
|
|
1126
1106
|
type: boolean
|
|
1127
1107
|
example: false
|
|
@@ -1397,10 +1377,10 @@ components:
|
|
|
1397
1377
|
description: GTFS Static identifier of the last stop passed on the route of the trip
|
|
1398
1378
|
example: "331"
|
|
1399
1379
|
sequence:
|
|
1400
|
-
type:
|
|
1380
|
+
type: number
|
|
1401
1381
|
nullable: true
|
|
1402
1382
|
description: Sequence number of the last stop passed on the route of the trip
|
|
1403
|
-
example:
|
|
1383
|
+
example: 11
|
|
1404
1384
|
arrival_time:
|
|
1405
1385
|
type: string
|
|
1406
1386
|
nullable: true
|
|
@@ -1472,7 +1452,6 @@ components:
|
|
|
1472
1452
|
- bearing
|
|
1473
1453
|
- is_canceled
|
|
1474
1454
|
- origin_timestamp
|
|
1475
|
-
- tracking
|
|
1476
1455
|
|
|
1477
1456
|
PIDDepartureBoard:
|
|
1478
1457
|
title: PID Departure Board
|
|
@@ -1560,6 +1539,7 @@ components:
|
|
|
1560
1539
|
properties:
|
|
1561
1540
|
direction:
|
|
1562
1541
|
type: string
|
|
1542
|
+
nullable: true
|
|
1563
1543
|
description: >-
|
|
1564
1544
|
The equivalent of arrows that are printed on stop signs. Indicates the direction the vehicle will continue at stops where routes split up relative to the direction of motion of the vehicle. Valid values: `null` (do not display the arrow), `top`, `top-right`, `right`, `bottom-right`, `bottom`, `bottom-left`, `left`, `top-left`.
|
|
1565
1545
|
example: "top-left"
|
|
@@ -1585,6 +1565,7 @@ components:
|
|
|
1585
1565
|
example: false
|
|
1586
1566
|
short_name:
|
|
1587
1567
|
type: string
|
|
1568
|
+
nullable: true
|
|
1588
1569
|
description: The number of a particular train, otherwise `null`.
|
|
1589
1570
|
example: "Os 9327"
|
|
1590
1571
|
required:
|
|
@@ -1602,10 +1583,12 @@ components:
|
|
|
1602
1583
|
properties:
|
|
1603
1584
|
name:
|
|
1604
1585
|
type: string
|
|
1586
|
+
nullable: true
|
|
1605
1587
|
description: Name of the last stop the vehicle reported from.
|
|
1606
1588
|
example: "Prosecká"
|
|
1607
1589
|
id:
|
|
1608
1590
|
type: string
|
|
1591
|
+
nullable: true
|
|
1609
1592
|
description: GTFS ID of the stop.
|
|
1610
1593
|
example: "U754Z1P"
|
|
1611
1594
|
required:
|
|
@@ -1618,6 +1601,7 @@ components:
|
|
|
1618
1601
|
properties:
|
|
1619
1602
|
level_id:
|
|
1620
1603
|
type: string
|
|
1604
|
+
nullable: true
|
|
1621
1605
|
description: Level of metro stops.
|
|
1622
1606
|
example: "U118L2"
|
|
1623
1607
|
location_type:
|
|
@@ -1643,8 +1627,7 @@ components:
|
|
|
1643
1627
|
description: Longitude of the stop marker or the center of metro or train station platform.
|
|
1644
1628
|
example: 50.4
|
|
1645
1629
|
asw_id:
|
|
1646
|
-
|
|
1647
|
-
- $ref: "#/components/schemas/ASWid"
|
|
1630
|
+
$ref: "#/components/schemas/ASWid"
|
|
1648
1631
|
description: ASW ID of the stop.
|
|
1649
1632
|
nullable: true
|
|
1650
1633
|
stop_id:
|
|
@@ -1717,13 +1700,15 @@ components:
|
|
|
1717
1700
|
description: True if information about trip's delay is available.
|
|
1718
1701
|
example: false
|
|
1719
1702
|
minutes:
|
|
1720
|
-
type:
|
|
1703
|
+
type: number
|
|
1704
|
+
nullable: true
|
|
1721
1705
|
description: Delay rounded down to minutes.
|
|
1722
|
-
example:
|
|
1706
|
+
example: 3
|
|
1723
1707
|
seconds:
|
|
1724
|
-
type:
|
|
1708
|
+
type: number
|
|
1709
|
+
nullable: true
|
|
1725
1710
|
description: Delay in seconds.
|
|
1726
|
-
example:
|
|
1711
|
+
example: 176
|
|
1727
1712
|
required:
|
|
1728
1713
|
- is_available
|
|
1729
1714
|
|
|
@@ -1756,9 +1741,9 @@ components:
|
|
|
1756
1741
|
description: Route designation used by PID.
|
|
1757
1742
|
example: "140"
|
|
1758
1743
|
type:
|
|
1759
|
-
type:
|
|
1744
|
+
type: number
|
|
1760
1745
|
description: GTFS route type. `0` – tram, `1` – metro, `2` – train, `3` – bus, `4` – ferry, `7` – funicular, `11` – trolleybus
|
|
1761
|
-
example:
|
|
1746
|
+
example: 3
|
|
1762
1747
|
is_night:
|
|
1763
1748
|
type: boolean
|
|
1764
1749
|
description: True if route is a designated night route.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "2.3.2-dev.
|
|
3
|
+
"version": "2.3.2-dev.660767513",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"pretest": "golemio import-db-data",
|
|
12
12
|
"test": "cross-env NODE_ENV='test' TS_NODE_COMPILER='ttypescript' TZ='UTC' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
|
|
13
13
|
"test-debug": "run-s 'test --inspect-brk=9230'",
|
|
14
|
+
"apidocs": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' ts-node -r dotenv/config test/api-docs/index.ts",
|
|
15
|
+
"apidocs-test": "run-s 'apidocs input,output'",
|
|
16
|
+
"apidocs-test-input": "run-s 'apidocs input'",
|
|
17
|
+
"apidocs-test-output": "run-s 'apidocs output'",
|
|
14
18
|
"code-coverage": "nyc run-s 'test -r source-map-support/register'",
|
|
15
19
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
16
20
|
"lint": "eslint --cache \"{src,test}/**/*.ts\""
|
|
@@ -25,6 +29,7 @@
|
|
|
25
29
|
"url": "https://gitlab.com/operator-ict/golemio/code/modules/pid"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
32
|
+
"@apideck/portman": "^1.16.1",
|
|
28
33
|
"@commitlint/cli": "^11.0.0",
|
|
29
34
|
"@commitlint/config-conventional": "^11.0.0",
|
|
30
35
|
"@golemio/cli": "1.3.2",
|