@powercalc/power-router 1.0.39 → 1.0.42

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.
Files changed (53) hide show
  1. package/README.md +6 -0
  2. package/dist/app.d.ts +1 -1
  3. package/dist/app.js +26 -26
  4. package/dist/config/countrydata.json +265 -265
  5. package/dist/converter.d.ts +8 -8
  6. package/dist/converter.js +56 -59
  7. package/dist/converter.js.map +1 -1
  8. package/dist/genTypes.d.ts +4 -4
  9. package/dist/genTypes.js +53 -53
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +5 -5
  12. package/dist/load.d.ts +7 -7
  13. package/dist/load.js +31 -31
  14. package/dist/router/config/countries.json +194 -0
  15. package/dist/router/config/countrydata.json +266 -0
  16. package/dist/router/config/types.json +333 -0
  17. package/dist/router/controllers/LoadAndParse.d.ts +10 -10
  18. package/dist/router/controllers/LoadAndParse.js +57 -57
  19. package/dist/router/controllers/Router.d.ts +7 -7
  20. package/dist/router/controllers/Router.js +105 -105
  21. package/dist/router/index.d.ts +2 -2
  22. package/dist/router/index.js +5 -5
  23. package/dist/router/interfaces/config.d.ts +5 -5
  24. package/dist/router/interfaces/config.js +2 -2
  25. package/dist/router/interfaces/entsoe.d.ts +50 -50
  26. package/dist/router/interfaces/entsoe.js +2 -2
  27. package/dist/router/interfaces/queryoptions.d.ts +15 -15
  28. package/dist/router/interfaces/queryoptions.js +15 -15
  29. package/dist/router/interfaces/types.d.ts +12 -12
  30. package/dist/router/interfaces/types.js +2 -2
  31. package/dist/router/services/CommonTimestamps.d.ts +15 -15
  32. package/dist/router/services/CommonTimestamps.js +185 -173
  33. package/dist/router/services/CommonTimestamps.js.map +1 -1
  34. package/dist/router/services/Eurostat.d.ts +10 -10
  35. package/dist/router/services/Eurostat.js +72 -72
  36. package/dist/router/services/Eurostat.js.map +1 -1
  37. package/dist/router/services/LoadService.d.ts +27 -27
  38. package/dist/router/services/LoadService.js +82 -82
  39. package/dist/router/services/Loader.d.ts +38 -38
  40. package/dist/router/services/Loader.js +119 -121
  41. package/dist/router/services/Loader.js.map +1 -1
  42. package/dist/router/services/ParseEdifact.d.ts +28 -28
  43. package/dist/router/services/ParseEdifact.js +159 -159
  44. package/dist/router/services/ParseInstalled.d.ts +9 -9
  45. package/dist/router/services/ParseInstalled.js +45 -45
  46. package/dist/router/services/batch/maxHydrofill.d.ts +10 -10
  47. package/dist/router/services/batch/maxHydrofill.js +65 -65
  48. package/package.json +53 -53
  49. package/src/converter.ts +61 -64
  50. package/src/router/config/countrydata.json +265 -265
  51. package/src/router/services/CommonTimestamps.ts +90 -54
  52. package/src/router/services/Eurostat.ts +3 -3
  53. package/src/router/services/Loader.ts +2 -5
package/README.md CHANGED
@@ -8,4 +8,10 @@ const config: Config = {
8
8
  }
9
9
  app.use('/entsoe', PowerRouter.init(config));
10
10
 
11
+ ```
12
+
13
+ Deploy npm
14
+ ```
15
+ npm build
16
+ npm publish
11
17
  ```
package/dist/app.d.ts CHANGED
@@ -1 +1 @@
1
- import 'reflect-metadata';
1
+ import 'reflect-metadata';
package/dist/app.js CHANGED
@@ -1,27 +1,27 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- require("reflect-metadata");
7
- process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = '0';
8
- const express_1 = __importDefault(require("express"));
9
- const cors_1 = __importDefault(require("cors"));
10
- const path_1 = require("path");
11
- const process_1 = require("process");
12
- const Router_1 = require("./router/controllers/Router");
13
- const app = (0, express_1.default)();
14
- const port = 30000;
15
- const config = {
16
- securityToken: '1c608639-afff-4d73-bfe1-a960fe7ea8da',
17
- cacheDir: (0, path_1.join)((0, process_1.cwd)(), 'data'),
18
- entsoeDomain: "https://web-api.tp.entsoe.eu"
19
- };
20
- app.use((0, cors_1.default)());
21
- app.use('/entsoe', Router_1.PowerRouter.init(config));
22
- app.use('/public', express_1.default.static('public'));
23
- // app.use('/config', express.static('dist/config', { maxAge: 100000 }));
24
- app.listen(port, () => {
25
- console.log(`Server listening on port ${port}`);
26
- });
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ require("reflect-metadata");
7
+ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = '0';
8
+ const express_1 = __importDefault(require("express"));
9
+ const cors_1 = __importDefault(require("cors"));
10
+ const path_1 = require("path");
11
+ const process_1 = require("process");
12
+ const Router_1 = require("./router/controllers/Router");
13
+ const app = (0, express_1.default)();
14
+ const port = 30000;
15
+ const config = {
16
+ securityToken: '1c608639-afff-4d73-bfe1-a960fe7ea8da',
17
+ cacheDir: (0, path_1.join)((0, process_1.cwd)(), 'data'),
18
+ entsoeDomain: "https://web-api.tp.entsoe.eu"
19
+ };
20
+ app.use((0, cors_1.default)());
21
+ app.use('/entsoe', Router_1.PowerRouter.init(config));
22
+ app.use('/public', express_1.default.static('public'));
23
+ // app.use('/config', express.static('dist/config', { maxAge: 100000 }));
24
+ app.listen(port, () => {
25
+ console.log(`Server listening on port ${port}`);
26
+ });
27
27
  //# sourceMappingURL=app.js.map
@@ -1,266 +1,266 @@
1
- [
2
- {
3
- "code": "10YAT-APG------L",
4
- "name": "Austria",
5
- "population": 8955102,
6
- "short": "AT",
7
- "hydrofill": {
8
- "min": 269440,
9
- "max": 2001005
10
- }
11
- },
12
- {
13
- "code": "10YBE----------2",
14
- "name": "Belgium",
15
- "population": 11524454,
16
- "short": "BE"
17
- },
18
- {
19
- "code": "10YBA-JPCC-----D",
20
- "name": "Bosnia and Herzegovina",
21
- "population": 3280819,
22
- "short": "BA"
23
- },
24
- {
25
- "code": "10YCA-BULGARIA-R",
26
- "name": "Bulgaria",
27
- "population": 6951482,
28
- "short": "BG",
29
- "hydrofill": {
30
- "min": 987839,
31
- "max": 2240914
32
- }
33
- },
34
- {
35
- "code": "10YCY-1001A0003J",
36
- "name": "Cyprus",
37
- "population": 1207359,
38
- "short": "CY"
39
- },
40
- {
41
- "code": "10YCZ-CEPS-----N",
42
- "name": "Czech Republic",
43
- "population": 10708981,
44
- "short": "CZ"
45
- },
46
- {
47
- "code": "10Y1001A1001A65H",
48
- "name": "Denmark",
49
- "population": 5793636,
50
- "short": "DK"
51
- },
52
- {
53
- "code": "10Y1001A1001A39I",
54
- "name": "Estonia",
55
- "population": 1328976,
56
- "short": "EE"
57
- },
58
- {
59
- "code": "10YFI-1--------U",
60
- "name": "Finland",
61
- "population": 5540720,
62
- "short": "FI",
63
- "hydrofill": {
64
- "min": 1560000,
65
- "max": 4512000
66
- }
67
- },
68
- {
69
- "code": "10YMK-MEPSO----8",
70
- "name": "North Macedonia",
71
- "population": 2084367,
72
- "short": "MK",
73
- "hydrofill": {
74
- "min": 81108,
75
- "max": 162524
76
- }
77
- },
78
- {
79
- "code": "10YFR-RTE------C",
80
- "name": "France",
81
- "population": 67146000,
82
- "short": "FR",
83
- "hydrofill": {
84
- "min": 586044,
85
- "max": 3100546
86
- }
87
- },
88
- {
89
- "code": "10Y1001A1001A83F",
90
- "name": "Germany",
91
- "population": 83190556,
92
- "short": "DE"
93
- },
94
- {
95
- "code": "10YGR-HTSO-----Y",
96
- "name": "Greece",
97
- "population": 10724599,
98
- "short": "GR",
99
- "hydrofill": {
100
- "min": 1099043,
101
- "max": 3060004
102
- }
103
- },
104
- {
105
- "code": "10YHU-MAVIR----U",
106
- "name": "Hungary",
107
- "population": 9769526,
108
- "short": "HU"
109
- },
110
- {
111
- "code": "10Y1001A1001A59C",
112
- "name": "Ireland",
113
- "population": 4982900,
114
- "short": "IE"
115
- },
116
- {
117
- "code": "10YIT-GRTN-----B",
118
- "name": "Italy",
119
- "population": 60390560,
120
- "short": "IT",
121
- "hydrofill": {
122
- "min": 1837814,
123
- "max": 4408894
124
- }
125
- },
126
- {
127
- "code": "10YLV-1001A00074",
128
- "name": "Latvia",
129
- "population": 1901548,
130
- "short": "LV",
131
- "hydrofill": {
132
- "min": 1775,
133
- "max": 11167
134
- }
135
- },
136
- {
137
- "code": "10YLT-1001A0008Q",
138
- "name": "Lithuania",
139
- "population": 2793471,
140
- "short": "LT",
141
- "hydrofill": {
142
- "min": 395,
143
- "max": 12217
144
- }
145
- },
146
- {
147
- "code": "10YLU-CEGEDEL-NQ",
148
- "name": "Luxembourg",
149
- "population": 626108,
150
- "short": "LU"
151
- },
152
- {
153
- "code": "10YCS-CG-TSO---S",
154
- "name": "Montenegro",
155
- "population": 622359,
156
- "short": "ME",
157
- "hydrofill": {
158
- "min": 555,
159
- "max": 505322
160
- }
161
- },
162
- {
163
- "code": "10YGB----------A",
164
- "name": "United Kingdom",
165
- "population": 68133400,
166
- "short": "GB"
167
- },
168
- {
169
- "code": "10YNL----------L",
170
- "name": "Nederlands",
171
- "population": 17446640,
172
- "short": "NL"
173
- },
174
- {
175
- "code": "10YNO-0--------C",
176
- "name": "Norway",
177
- "population": 5330800,
178
- "short": "NO",
179
- "hydrofill": {
180
- "min": 18328177,
181
- "max": 83251000
182
- }
183
- },
184
- {
185
- "code": "10YPL-AREA-----S",
186
- "name": "Poland",
187
- "population": 38386000,
188
- "short": "PL"
189
- },
190
- {
191
- "code": "10YPT-REN------W",
192
- "name": "Portugal",
193
- "population": 10276617,
194
- "short": "PT",
195
- "hydrofill": {
196
- "min": 974314,
197
- "max": 2897771
198
- }
199
- },
200
- {
201
- "code": "10YRO-TEL------P",
202
- "name": "Romania",
203
- "population": 19238250,
204
- "short": "RO",
205
- "hydrofill": {
206
- "min": 885300,
207
- "max": 2849800
208
- }
209
- },
210
- {
211
- "code": "10YCS-SERBIATSOV",
212
- "name": "Serbia",
213
- "population": 6963764,
214
- "short": "RS",
215
- "hydrofill": {
216
- "min": 159000,
217
- "max": 608000
218
- }
219
- },
220
- {
221
- "code": "10YSK-SEPS-----K",
222
- "name": "Slovakia",
223
- "population": 5459642,
224
- "short": "SK"
225
- },
226
- {
227
- "code": "10YSI-ELES-----O",
228
- "name": "Slovenia",
229
- "population": 2094060,
230
- "short": "SI",
231
- "hydrofill": {
232
- "min": 2600,
233
- "max": 2600
234
- }
235
- },
236
- {
237
- "code": "10YES-REE------0",
238
- "name": "Spain",
239
- "population": 46723749,
240
- "short": "ES",
241
- "hydrofill": {
242
- "min": 4308428,
243
- "max": 13674197
244
- }
245
- },
246
- {
247
- "code": "10YSE-1--------K",
248
- "name": "Sweden",
249
- "population": 10383676,
250
- "short": "SE",
251
- "hydrofill": {
252
- "min": 5672000,
253
- "max": 30694000
254
- }
255
- },
256
- {
257
- "code": "10YCH-SWISSGRIDZ",
258
- "name": "Switzerland",
259
- "population": 8718853,
260
- "short": "CH",
261
- "hydrofill": {
262
- "min": 377710,
263
- "max": 6572889
264
- }
265
- }
1
+ [
2
+ {
3
+ "code": "10YAT-APG------L",
4
+ "name": "Austria",
5
+ "population": 8955102,
6
+ "short": "AT",
7
+ "hydrofill": {
8
+ "min": 269440,
9
+ "max": 2001005
10
+ }
11
+ },
12
+ {
13
+ "code": "10YBE----------2",
14
+ "name": "Belgium",
15
+ "population": 11524454,
16
+ "short": "BE"
17
+ },
18
+ {
19
+ "code": "10YBA-JPCC-----D",
20
+ "name": "Bosnia and Herzegovina",
21
+ "population": 3280819,
22
+ "short": "BA"
23
+ },
24
+ {
25
+ "code": "10YCA-BULGARIA-R",
26
+ "name": "Bulgaria",
27
+ "population": 6951482,
28
+ "short": "BG",
29
+ "hydrofill": {
30
+ "min": 987839,
31
+ "max": 2240914
32
+ }
33
+ },
34
+ {
35
+ "code": "10YCY-1001A0003J",
36
+ "name": "Cyprus",
37
+ "population": 1207359,
38
+ "short": "CY"
39
+ },
40
+ {
41
+ "code": "10YCZ-CEPS-----N",
42
+ "name": "Czech Republic",
43
+ "population": 10708981,
44
+ "short": "CZ"
45
+ },
46
+ {
47
+ "code": "10Y1001A1001A65H",
48
+ "name": "Denmark",
49
+ "population": 5793636,
50
+ "short": "DK"
51
+ },
52
+ {
53
+ "code": "10Y1001A1001A39I",
54
+ "name": "Estonia",
55
+ "population": 1328976,
56
+ "short": "EE"
57
+ },
58
+ {
59
+ "code": "10YFI-1--------U",
60
+ "name": "Finland",
61
+ "population": 5540720,
62
+ "short": "FI",
63
+ "hydrofill": {
64
+ "min": 1560000,
65
+ "max": 4512000
66
+ }
67
+ },
68
+ {
69
+ "code": "10YMK-MEPSO----8",
70
+ "name": "North Macedonia",
71
+ "population": 2084367,
72
+ "short": "MK",
73
+ "hydrofill": {
74
+ "min": 81108,
75
+ "max": 162524
76
+ }
77
+ },
78
+ {
79
+ "code": "10YFR-RTE------C",
80
+ "name": "France",
81
+ "population": 67146000,
82
+ "short": "FR",
83
+ "hydrofill": {
84
+ "min": 586044,
85
+ "max": 3100546
86
+ }
87
+ },
88
+ {
89
+ "code": "10Y1001A1001A83F",
90
+ "name": "Germany",
91
+ "population": 83190556,
92
+ "short": "DE"
93
+ },
94
+ {
95
+ "code": "10YGR-HTSO-----Y",
96
+ "name": "Greece",
97
+ "population": 10724599,
98
+ "short": "GR",
99
+ "hydrofill": {
100
+ "min": 1099043,
101
+ "max": 3060004
102
+ }
103
+ },
104
+ {
105
+ "code": "10YHU-MAVIR----U",
106
+ "name": "Hungary",
107
+ "population": 9769526,
108
+ "short": "HU"
109
+ },
110
+ {
111
+ "code": "10Y1001A1001A59C",
112
+ "name": "Ireland",
113
+ "population": 4982900,
114
+ "short": "IE"
115
+ },
116
+ {
117
+ "code": "10YIT-GRTN-----B",
118
+ "name": "Italy",
119
+ "population": 60390560,
120
+ "short": "IT",
121
+ "hydrofill": {
122
+ "min": 1837814,
123
+ "max": 4408894
124
+ }
125
+ },
126
+ {
127
+ "code": "10YLV-1001A00074",
128
+ "name": "Latvia",
129
+ "population": 1901548,
130
+ "short": "LV",
131
+ "hydrofill": {
132
+ "min": 1775,
133
+ "max": 11167
134
+ }
135
+ },
136
+ {
137
+ "code": "10YLT-1001A0008Q",
138
+ "name": "Lithuania",
139
+ "population": 2793471,
140
+ "short": "LT",
141
+ "hydrofill": {
142
+ "min": 395,
143
+ "max": 12217
144
+ }
145
+ },
146
+ {
147
+ "code": "10YLU-CEGEDEL-NQ",
148
+ "name": "Luxembourg",
149
+ "population": 626108,
150
+ "short": "LU"
151
+ },
152
+ {
153
+ "code": "10YCS-CG-TSO---S",
154
+ "name": "Montenegro",
155
+ "population": 622359,
156
+ "short": "ME",
157
+ "hydrofill": {
158
+ "min": 555,
159
+ "max": 505322
160
+ }
161
+ },
162
+ {
163
+ "code": "10YGB----------A",
164
+ "name": "United Kingdom",
165
+ "population": 68133400,
166
+ "short": "GB"
167
+ },
168
+ {
169
+ "code": "10YNL----------L",
170
+ "name": "Nederlands",
171
+ "population": 17446640,
172
+ "short": "NL"
173
+ },
174
+ {
175
+ "code": "10YNO-0--------C",
176
+ "name": "Norway",
177
+ "population": 5330800,
178
+ "short": "NO",
179
+ "hydrofill": {
180
+ "min": 18328177,
181
+ "max": 83251000
182
+ }
183
+ },
184
+ {
185
+ "code": "10YPL-AREA-----S",
186
+ "name": "Poland",
187
+ "population": 38386000,
188
+ "short": "PL"
189
+ },
190
+ {
191
+ "code": "10YPT-REN------W",
192
+ "name": "Portugal",
193
+ "population": 10276617,
194
+ "short": "PT",
195
+ "hydrofill": {
196
+ "min": 974314,
197
+ "max": 2897771
198
+ }
199
+ },
200
+ {
201
+ "code": "10YRO-TEL------P",
202
+ "name": "Romania",
203
+ "population": 19238250,
204
+ "short": "RO",
205
+ "hydrofill": {
206
+ "min": 885300,
207
+ "max": 2849800
208
+ }
209
+ },
210
+ {
211
+ "code": "10YCS-SERBIATSOV",
212
+ "name": "Serbia",
213
+ "population": 6963764,
214
+ "short": "RS",
215
+ "hydrofill": {
216
+ "min": 159000,
217
+ "max": 608000
218
+ }
219
+ },
220
+ {
221
+ "code": "10YSK-SEPS-----K",
222
+ "name": "Slovakia",
223
+ "population": 5459642,
224
+ "short": "SK"
225
+ },
226
+ {
227
+ "code": "10YSI-ELES-----O",
228
+ "name": "Slovenia",
229
+ "population": 2094060,
230
+ "short": "SI",
231
+ "hydrofill": {
232
+ "min": 2600,
233
+ "max": 2600
234
+ }
235
+ },
236
+ {
237
+ "code": "10YES-REE------0",
238
+ "name": "Spain",
239
+ "population": 46723749,
240
+ "short": "ES",
241
+ "hydrofill": {
242
+ "min": 4308428,
243
+ "max": 13674197
244
+ }
245
+ },
246
+ {
247
+ "code": "10YSE-1--------K",
248
+ "name": "Sweden",
249
+ "population": 10383676,
250
+ "short": "SE",
251
+ "hydrofill": {
252
+ "min": 5672000,
253
+ "max": 30694000
254
+ }
255
+ },
256
+ {
257
+ "code": "10YCH-SWISSGRIDZ",
258
+ "name": "Switzerland",
259
+ "population": 8718853,
260
+ "short": "CH",
261
+ "hydrofill": {
262
+ "min": 377710,
263
+ "max": 6572889
264
+ }
265
+ }
266
266
  ]
@@ -1,8 +1,8 @@
1
- export declare class Convert {
2
- static start(): Promise<void>;
3
- static getCountries(): Promise<any>;
4
- static getGeneration(countryCode: string): Promise<any>;
5
- static getLoad(countryCode: string): Promise<any>;
6
- static getPrice(countryCode: string): Promise<any>;
7
- static getHydrofill(countryCode: string): Promise<any>;
8
- }
1
+ export declare class Convert {
2
+ static start(): Promise<void>;
3
+ static getCountries(): Promise<any>;
4
+ static getGeneration(countryCode: string): Promise<any>;
5
+ static getLoad(countryCode: string): Promise<any>;
6
+ static getPrice(countryCode: string): Promise<any>;
7
+ static getHydrofill(countryCode: string): Promise<any>;
8
+ }