@golemio/fcd 1.2.3-dev.986388148 → 1.2.3-rc.1135148245

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.
@@ -0,0 +1,53 @@
1
+ 'use strict';
2
+
3
+ var dbm;
4
+ var type;
5
+ var seed;
6
+ var fs = require('fs');
7
+ var path = require('path');
8
+ var Promise;
9
+
10
+ /**
11
+ * We receive the dbmigrate dependency from dbmigrate initially.
12
+ * This enables us to not have to rely on NODE_PATH.
13
+ */
14
+ exports.setup = function(options, seedLink) {
15
+ dbm = options.dbmigrate;
16
+ type = dbm.dataType;
17
+ seed = seedLink;
18
+ Promise = options.Promise;
19
+ };
20
+
21
+ exports.up = function(db) {
22
+ var filePath = path.join(__dirname, 'sqls', '20240111105940-pp20240111-up.sql');
23
+ return new Promise( function( resolve, reject ) {
24
+ fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
25
+ if (err) return reject(err);
26
+ console.log('received data: ' + data);
27
+
28
+ resolve(data);
29
+ });
30
+ })
31
+ .then(function(data) {
32
+ return db.runSql(data);
33
+ });
34
+ };
35
+
36
+ exports.down = function(db) {
37
+ var filePath = path.join(__dirname, 'sqls', '20240111105940-pp20240111-down.sql');
38
+ return new Promise( function( resolve, reject ) {
39
+ fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
40
+ if (err) return reject(err);
41
+ console.log('received data: ' + data);
42
+
43
+ resolve(data);
44
+ });
45
+ })
46
+ .then(function(data) {
47
+ return db.runSql(data);
48
+ });
49
+ };
50
+
51
+ exports._meta = {
52
+ "version": 1
53
+ };
@@ -0,0 +1,24 @@
1
+ CREATE TABLE fcd_geos_90 (
2
+ source_identification varchar(100) NOT NULL,
3
+ oriented_route public.geometry NULL,
4
+ CONSTRAINT fcd_geos_90_pkey PRIMARY KEY (source_identification)
5
+ );
6
+ COMMENT ON TABLE fcd_geos_90 IS 'lookup table for Praha Dopravni, data are prepared manually';
7
+
8
+ CREATE TABLE tmc_ltcze90_roads_wgs84 (
9
+ geom public.geometry(multilinestring, 4326) NULL,
10
+ cid int8 NULL,
11
+ tabcd int8 NULL,
12
+ lcd int8 NOT NULL,
13
+ "class" varchar(254) NULL,
14
+ tcd int8 NULL,
15
+ stcd int8 NULL,
16
+ roadnumber varchar(254) NULL,
17
+ roadname varchar(254) NULL,
18
+ firstname varchar(254) NULL,
19
+ secondname varchar(254) NULL,
20
+ area_ref int8 NULL,
21
+ area_name varchar(254) NULL,
22
+ CONSTRAINT tmc_ltcze90_roads_wgs84_pkey PRIMARY KEY (lcd)
23
+ );
24
+ COMMENT ON TABLE tmc_ltcze90_roads_wgs84 IS 'Data for this table are imported manually. Purpose of this table is to show static TMC road net in app Praha Dopravni.';
@@ -0,0 +1,2 @@
1
+ drop table fcd_geos_90;
2
+ drop TABLE tmc_ltcze90_roads_wgs84;
@@ -4,28 +4,28 @@ info:
4
4
  description: >-
5
5
  version: 1.0.1
6
6
  contact:
7
- name: Golemio Prague Data Plaform
7
+ name: Golemio Prague Data Platform
8
8
  email: golemio@operatorict.cz
9
9
  url: https://golemio.cz
10
10
 
11
11
  servers:
12
- - url: https://rabin.golemio.cz/v2
12
+ - url: https://rabin.golemio.cz
13
13
  description: Test (development) server
14
- - url: https://api.golemio.cz/v2
14
+ - url: https://api.golemio.cz
15
15
  description: Main (production) server
16
16
 
17
17
  tags:
18
- - name: 🚢 Floating Car Data
18
+ - name: 🚢 Floating Car Data (v2)
19
19
  description: >-
20
20
  💡 FCD
21
21
 
22
22
  paths:
23
- /fcd/info:
23
+ /v2/fcd/info:
24
24
  get:
25
25
  summary: GET Latest floating Car Data
26
26
  description: ""
27
27
  tags:
28
- - 🚢 Floating Car Data
28
+ - 🚢 Floating Car Data (v2)
29
29
  operationId: getFCD
30
30
  parameters:
31
31
  - name: locationId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/fcd",
3
- "version": "1.2.3-dev.986388148",
3
+ "version": "1.2.3-rc.1135148245",
4
4
  "description": "Golemio Floating Car Data Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -38,8 +38,8 @@
38
38
  "@commitlint/cli": "^11.0.0",
39
39
  "@commitlint/config-conventional": "^11.0.0",
40
40
  "@golemio/cli": "1.5.0",
41
- "@golemio/core": "1.8.11",
42
- "@golemio/db-common": "1.1.1",
41
+ "@golemio/core": "1.9.2",
42
+ "@golemio/db-common": "1.1.2",
43
43
  "@golemio/eslint-config": "1.1.1",
44
44
  "@golemio/traffic-common": "0.1.3",
45
45
  "@types/body-parser-xml": "^1.1.0",
@@ -75,7 +75,7 @@
75
75
  "xml2js": "^0.6.0"
76
76
  },
77
77
  "peerDependencies": {
78
- "@golemio/core": ">=1.8.4",
78
+ "@golemio/core": ">=1.9.0",
79
79
  "@golemio/traffic-common": ">=0.1.0"
80
80
  }
81
81
  }