metar-taf-parser 6.1.2 → 6.1.3
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/locale/en.d.ts +1 -0
- package/locale/en.js +1 -0
- package/metar-taf-parser.d.ts +3 -7
- package/metar-taf-parser.js +4 -7
- package/package.json +1 -1
package/locale/en.d.ts
CHANGED
package/locale/en.js
CHANGED
package/metar-taf-parser.d.ts
CHANGED
|
@@ -114,7 +114,8 @@ declare enum Phenomenon {
|
|
|
114
114
|
THUNDERSTORM = "TS",
|
|
115
115
|
DUSTSTORM = "DS",
|
|
116
116
|
SANDSTORM = "SS",
|
|
117
|
-
FUNNEL_CLOUD = "FC"
|
|
117
|
+
FUNNEL_CLOUD = "FC",
|
|
118
|
+
NO_SIGNIFICANT_WEATHER = "NSW"
|
|
118
119
|
}
|
|
119
120
|
declare enum TimeIndicator {
|
|
120
121
|
AT = "AT",
|
|
@@ -407,6 +408,7 @@ declare const _default: {
|
|
|
407
408
|
TS: string;
|
|
408
409
|
UP: string;
|
|
409
410
|
VA: string;
|
|
411
|
+
NSW: string;
|
|
410
412
|
};
|
|
411
413
|
Remark: {
|
|
412
414
|
ALQDS: string;
|
|
@@ -1190,12 +1192,6 @@ interface ITAF extends IAbstractWeatherCode {
|
|
|
1190
1192
|
interface IAbstractTrend extends IAbstractWeatherContainer {
|
|
1191
1193
|
type: WeatherChangeType;
|
|
1192
1194
|
raw: string;
|
|
1193
|
-
/**
|
|
1194
|
-
* No Significant Weather
|
|
1195
|
-
*
|
|
1196
|
-
* Flag indicates that previous weather conditions have stopped
|
|
1197
|
-
*/
|
|
1198
|
-
nsw?: true;
|
|
1199
1195
|
}
|
|
1200
1196
|
interface IMetarTrendTime extends ITime {
|
|
1201
1197
|
type: TimeIndicator;
|
package/metar-taf-parser.js
CHANGED
|
@@ -305,6 +305,7 @@ var Phenomenon;
|
|
|
305
305
|
Phenomenon["DUSTSTORM"] = "DS";
|
|
306
306
|
Phenomenon["SANDSTORM"] = "SS";
|
|
307
307
|
Phenomenon["FUNNEL_CLOUD"] = "FC";
|
|
308
|
+
Phenomenon["NO_SIGNIFICANT_WEATHER"] = "NSW";
|
|
308
309
|
})(Phenomenon || (Phenomenon = {}));
|
|
309
310
|
var TimeIndicator;
|
|
310
311
|
(function (TimeIndicator) {
|
|
@@ -1776,6 +1777,8 @@ class CloudCommand {
|
|
|
1776
1777
|
return false;
|
|
1777
1778
|
}
|
|
1778
1779
|
canParse(cloudString) {
|
|
1780
|
+
if (cloudString === "NSW")
|
|
1781
|
+
return false;
|
|
1779
1782
|
return __classPrivateFieldGet(this, _CloudCommand_cloudRegex, "f").test(cloudString);
|
|
1780
1783
|
}
|
|
1781
1784
|
}
|
|
@@ -2341,7 +2344,6 @@ class TAFParser extends AbstractParser {
|
|
|
2341
2344
|
this.PROB = "PROB";
|
|
2342
2345
|
this.TX = "TX";
|
|
2343
2346
|
this.TN = "TN";
|
|
2344
|
-
this.NSW = "NSW";
|
|
2345
2347
|
_TAFParser_validityPattern.set(this, /^\d{4}\/\d{4}$/);
|
|
2346
2348
|
}
|
|
2347
2349
|
/**
|
|
@@ -2515,8 +2517,6 @@ class TAFParser extends AbstractParser {
|
|
|
2515
2517
|
parseRemark(trend, line, i, this.locale);
|
|
2516
2518
|
break;
|
|
2517
2519
|
}
|
|
2518
|
-
else if (line[i] === this.NSW)
|
|
2519
|
-
trend.nsw = true;
|
|
2520
2520
|
// already parsed
|
|
2521
2521
|
else if (__classPrivateFieldGet(this, _TAFParser_validityPattern, "f").test(line[i]))
|
|
2522
2522
|
continue;
|
|
@@ -2760,16 +2760,13 @@ function hydrateWithPreviousContextIfNeeded(forecast, context) {
|
|
|
2760
2760
|
context = { ...context };
|
|
2761
2761
|
delete context.remark;
|
|
2762
2762
|
context.remarks = [];
|
|
2763
|
-
delete context.nsw;
|
|
2764
2763
|
forecast = {
|
|
2765
2764
|
...context,
|
|
2766
2765
|
...forecast,
|
|
2767
2766
|
};
|
|
2768
2767
|
if (!forecast.clouds.length)
|
|
2769
2768
|
forecast.clouds = context.clouds;
|
|
2770
|
-
|
|
2771
|
-
// not be carried over
|
|
2772
|
-
if (!forecast.weatherConditions.length && !forecast.nsw)
|
|
2769
|
+
if (!forecast.weatherConditions.length)
|
|
2773
2770
|
forecast.weatherConditions = context.weatherConditions;
|
|
2774
2771
|
return forecast;
|
|
2775
2772
|
}
|