metar-taf-parser 3.1.2 → 4.0.2
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/README.md +1 -1
- package/{dist/locale → locale}/de.d.ts +0 -0
- package/{dist/locale → locale}/de.js +3 -3
- package/{dist/locale → locale}/en.d.ts +0 -0
- package/{dist/locale → locale}/en.js +3 -3
- package/{dist/locale → locale}/fr.d.ts +0 -0
- package/{dist/locale → locale}/fr.js +3 -3
- package/{dist/locale → locale}/it.d.ts +0 -0
- package/{dist/locale → locale}/it.js +3 -3
- package/{dist/locale → locale}/pl.d.ts +0 -0
- package/{dist/locale → locale}/pl.js +3 -3
- package/{dist/locale → locale}/zh-CN.d.ts +0 -0
- package/{dist/locale → locale}/zh-CN.js +3 -3
- package/metar-taf-parser.d.ts +1325 -0
- package/metar-taf-parser.js +2703 -0
- package/package.json +23 -16
- package/dist/command/common.d.ts +0 -54
- package/dist/command/common.js +0 -243
- package/dist/command/metar/AltimeterCommand.d.ts +0 -7
- package/dist/command/metar/AltimeterCommand.js +0 -26
- package/dist/command/metar/AltimeterMercuryCommand.d.ts +0 -7
- package/dist/command/metar/AltimeterMercuryCommand.js +0 -51
- package/dist/command/metar/RunwayCommand.d.ts +0 -7
- package/dist/command/metar/RunwayCommand.js +0 -60
- package/dist/command/metar/TemperatureCommand.d.ts +0 -7
- package/dist/command/metar/TemperatureCommand.js +0 -51
- package/dist/command/metar.d.ts +0 -9
- package/dist/command/metar.js +0 -31
- package/dist/command/remark/CeilingHeightCommand.d.ts +0 -18
- package/dist/command/remark/CeilingHeightCommand.js +0 -40
- package/dist/command/remark/CeilingSecondLocationCommand.d.ts +0 -12
- package/dist/command/remark/CeilingSecondLocationCommand.js +0 -40
- package/dist/command/remark/Command.d.ts +0 -8
- package/dist/command/remark/Command.js +0 -9
- package/dist/command/remark/DefaultCommand.d.ts +0 -11
- package/dist/command/remark/DefaultCommand.js +0 -38
- package/dist/command/remark/HailSizeCommand.d.ts +0 -11
- package/dist/command/remark/HailSizeCommand.js +0 -38
- package/dist/command/remark/HourlyMaximumMinimumTemperatureCommand.d.ts +0 -18
- package/dist/command/remark/HourlyMaximumMinimumTemperatureCommand.js +0 -39
- package/dist/command/remark/HourlyMaximumTemperatureCommand.d.ts +0 -14
- package/dist/command/remark/HourlyMaximumTemperatureCommand.js +0 -38
- package/dist/command/remark/HourlyMinimumTemperatureCommand.d.ts +0 -14
- package/dist/command/remark/HourlyMinimumTemperatureCommand.js +0 -38
- package/dist/command/remark/HourlyPrecipitationAmountCommand.d.ts +0 -14
- package/dist/command/remark/HourlyPrecipitationAmountCommand.js +0 -38
- package/dist/command/remark/HourlyPressureCommand.d.ts +0 -32
- package/dist/command/remark/HourlyPressureCommand.js +0 -40
- package/dist/command/remark/HourlyTemperatureDewPointCommand.d.ts +0 -18
- package/dist/command/remark/HourlyTemperatureDewPointCommand.js +0 -52
- package/dist/command/remark/IceAccretionCommand.d.ts +0 -15
- package/dist/command/remark/IceAccretionCommand.js +0 -38
- package/dist/command/remark/ObscurationCommand.d.ts +0 -14
- package/dist/command/remark/ObscurationCommand.js +0 -44
- package/dist/command/remark/PrecipitationAmount24HourCommand.d.ts +0 -14
- package/dist/command/remark/PrecipitationAmount24HourCommand.js +0 -39
- package/dist/command/remark/PrecipitationAmount36HourCommand.d.ts +0 -15
- package/dist/command/remark/PrecipitationAmount36HourCommand.js +0 -41
- package/dist/command/remark/PrecipitationBegCommand.d.ts +0 -15
- package/dist/command/remark/PrecipitationBegCommand.js +0 -45
- package/dist/command/remark/PrecipitationBegEndCommand.d.ts +0 -17
- package/dist/command/remark/PrecipitationBegEndCommand.js +0 -46
- package/dist/command/remark/PrecipitationEndCommand.d.ts +0 -15
- package/dist/command/remark/PrecipitationEndCommand.js +0 -45
- package/dist/command/remark/PrevailingVisibilityCommand.d.ts +0 -12
- package/dist/command/remark/PrevailingVisibilityCommand.js +0 -41
- package/dist/command/remark/SeaLevelPressureCommand.d.ts +0 -11
- package/dist/command/remark/SeaLevelPressureCommand.js +0 -39
- package/dist/command/remark/SecondLocationVisibilityCommand.d.ts +0 -12
- package/dist/command/remark/SecondLocationVisibilityCommand.js +0 -41
- package/dist/command/remark/SectorVisibilityCommand.d.ts +0 -13
- package/dist/command/remark/SectorVisibilityCommand.js +0 -42
- package/dist/command/remark/SmallHailSizeCommand.d.ts +0 -11
- package/dist/command/remark/SmallHailSizeCommand.js +0 -38
- package/dist/command/remark/SnowDepthCommand.d.ts +0 -11
- package/dist/command/remark/SnowDepthCommand.js +0 -38
- package/dist/command/remark/SnowIncreaseCommand.d.ts +0 -12
- package/dist/command/remark/SnowIncreaseCommand.js +0 -40
- package/dist/command/remark/SnowPelletsCommand.d.ts +0 -11
- package/dist/command/remark/SnowPelletsCommand.js +0 -37
- package/dist/command/remark/SunshineDurationCommand.d.ts +0 -11
- package/dist/command/remark/SunshineDurationCommand.js +0 -38
- package/dist/command/remark/SurfaceVisibilityCommand.d.ts +0 -11
- package/dist/command/remark/SurfaceVisibilityCommand.js +0 -39
- package/dist/command/remark/ThunderStormLocationCommand.d.ts +0 -12
- package/dist/command/remark/ThunderStormLocationCommand.js +0 -40
- package/dist/command/remark/ThunderStormLocationMovingCommand.d.ts +0 -19
- package/dist/command/remark/ThunderStormLocationMovingCommand.js +0 -42
- package/dist/command/remark/TornadicActivityBegCommand.d.ts +0 -16
- package/dist/command/remark/TornadicActivityBegCommand.js +0 -44
- package/dist/command/remark/TornadicActivityBegEndCommand.d.ts +0 -18
- package/dist/command/remark/TornadicActivityBegEndCommand.js +0 -46
- package/dist/command/remark/TornadicActivityEndCommand.d.ts +0 -16
- package/dist/command/remark/TornadicActivityEndCommand.js +0 -44
- package/dist/command/remark/TowerVisibilityCommand.d.ts +0 -11
- package/dist/command/remark/TowerVisibilityCommand.js +0 -39
- package/dist/command/remark/VariableSkyCommand.d.ts +0 -12
- package/dist/command/remark/VariableSkyCommand.js +0 -41
- package/dist/command/remark/VariableSkyHeightCommand.d.ts +0 -13
- package/dist/command/remark/VariableSkyHeightCommand.js +0 -43
- package/dist/command/remark/VirgaDirectionCommand.d.ts +0 -12
- package/dist/command/remark/VirgaDirectionCommand.js +0 -40
- package/dist/command/remark/WaterEquivalentSnowCommand.d.ts +0 -11
- package/dist/command/remark/WaterEquivalentSnowCommand.js +0 -38
- package/dist/command/remark/WindPeakCommandCommand.d.ts +0 -17
- package/dist/command/remark/WindPeakCommandCommand.js +0 -42
- package/dist/command/remark/WindShiftCommand.d.ts +0 -12
- package/dist/command/remark/WindShiftCommand.js +0 -38
- package/dist/command/remark/WindShiftFropaCommand.d.ts +0 -12
- package/dist/command/remark/WindShiftFropaCommand.js +0 -38
- package/dist/command/remark.d.ts +0 -109
- package/dist/command/remark.js +0 -152
- package/dist/commons/converter.d.ts +0 -21
- package/dist/commons/converter.js +0 -108
- package/dist/commons/errors.d.ts +0 -24
- package/dist/commons/errors.js +0 -46
- package/dist/commons/i18n.d.ts +0 -12
- package/dist/commons/i18n.js +0 -30
- package/dist/dates/metar.d.ts +0 -5
- package/dist/dates/metar.js +0 -8
- package/dist/dates/taf.d.ts +0 -28
- package/dist/dates/taf.js +0 -17
- package/dist/forecast/forecast.d.ts +0 -36
- package/dist/forecast/forecast.js +0 -72
- package/dist/helpers/date.d.ts +0 -11
- package/dist/helpers/date.js +0 -56
- package/dist/helpers/helpers.d.ts +0 -17
- package/dist/helpers/helpers.js +0 -46
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -62
- package/dist/model/enum.d.ts +0 -265
- package/dist/model/enum.js +0 -280
- package/dist/model/model.d.ts +0 -188
- package/dist/model/model.js +0 -11
- package/dist/parser/parser.d.ts +0 -111
- package/dist/parser/parser.js +0 -480
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _VariableSkyCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.VariableSkyCommand = void 0;
|
|
10
|
-
const helpers_1 = require("../../helpers/helpers");
|
|
11
|
-
const i18n_1 = require("../../commons/i18n");
|
|
12
|
-
const errors_1 = require("../../commons/errors");
|
|
13
|
-
const enum_1 = require("../../model/enum");
|
|
14
|
-
const remark_1 = require("../remark");
|
|
15
|
-
const Command_1 = require("./Command");
|
|
16
|
-
class VariableSkyCommand extends Command_1.Command {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
_VariableSkyCommand_regex.set(this, /^([A-Z]{3}) V ([A-Z]{3})/);
|
|
20
|
-
}
|
|
21
|
-
canParse(code) {
|
|
22
|
-
return __classPrivateFieldGet(this, _VariableSkyCommand_regex, "f").test(code);
|
|
23
|
-
}
|
|
24
|
-
execute(code, remark) {
|
|
25
|
-
const matches = code.match(__classPrivateFieldGet(this, _VariableSkyCommand_regex, "f"));
|
|
26
|
-
if (!matches)
|
|
27
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
28
|
-
const firstQuantity = (0, helpers_1.as)(matches[1], enum_1.CloudQuantity);
|
|
29
|
-
const secondQuantity = (0, helpers_1.as)(matches[2], enum_1.CloudQuantity);
|
|
30
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.Variable.Sky.Condition.0", this.locale), (0, i18n_1._)(`CloudQuantity.${firstQuantity}`, this.locale), (0, i18n_1._)(`CloudQuantity.${secondQuantity}`, this.locale));
|
|
31
|
-
remark.push({
|
|
32
|
-
type: remark_1.RemarkType.VariableSky,
|
|
33
|
-
description,
|
|
34
|
-
raw: matches[0],
|
|
35
|
-
cloudQuantityRange: [firstQuantity, secondQuantity],
|
|
36
|
-
});
|
|
37
|
-
return [code.replace(__classPrivateFieldGet(this, _VariableSkyCommand_regex, "f"), "").trim(), remark];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.VariableSkyCommand = VariableSkyCommand;
|
|
41
|
-
_VariableSkyCommand_regex = new WeakMap();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CloudQuantity } from "../../model/enum";
|
|
2
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
3
|
-
import { Command } from "./Command";
|
|
4
|
-
export interface IVariableSkyHeightRemark extends IBaseRemark {
|
|
5
|
-
type: RemarkType.VariableSkyHeight;
|
|
6
|
-
height: number;
|
|
7
|
-
cloudQuantityRange: [CloudQuantity, CloudQuantity];
|
|
8
|
-
}
|
|
9
|
-
export declare class VariableSkyHeightCommand extends Command {
|
|
10
|
-
#private;
|
|
11
|
-
canParse(code: string): boolean;
|
|
12
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
13
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _VariableSkyHeightCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.VariableSkyHeightCommand = void 0;
|
|
10
|
-
const helpers_1 = require("../../helpers/helpers");
|
|
11
|
-
const i18n_1 = require("../../commons/i18n");
|
|
12
|
-
const errors_1 = require("../../commons/errors");
|
|
13
|
-
const enum_1 = require("../../model/enum");
|
|
14
|
-
const remark_1 = require("../remark");
|
|
15
|
-
const Command_1 = require("./Command");
|
|
16
|
-
class VariableSkyHeightCommand extends Command_1.Command {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
_VariableSkyHeightCommand_regex.set(this, /^([A-Z]{3})(\d{3}) V ([A-Z]{3})/);
|
|
20
|
-
}
|
|
21
|
-
canParse(code) {
|
|
22
|
-
return __classPrivateFieldGet(this, _VariableSkyHeightCommand_regex, "f").test(code);
|
|
23
|
-
}
|
|
24
|
-
execute(code, remark) {
|
|
25
|
-
const matches = code.match(__classPrivateFieldGet(this, _VariableSkyHeightCommand_regex, "f"));
|
|
26
|
-
if (!matches)
|
|
27
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
28
|
-
const firstQuantity = (0, helpers_1.as)(matches[1], enum_1.CloudQuantity);
|
|
29
|
-
const secondQuantity = (0, helpers_1.as)(matches[3], enum_1.CloudQuantity);
|
|
30
|
-
const height = 100 * +matches[2];
|
|
31
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.Variable.Sky.Condition.Height", this.locale), height, (0, i18n_1._)(`CloudQuantity.${firstQuantity}`, this.locale), (0, i18n_1._)(`CloudQuantity.${secondQuantity}`, this.locale));
|
|
32
|
-
remark.push({
|
|
33
|
-
type: remark_1.RemarkType.VariableSkyHeight,
|
|
34
|
-
description,
|
|
35
|
-
raw: matches[0],
|
|
36
|
-
height,
|
|
37
|
-
cloudQuantityRange: [firstQuantity, secondQuantity],
|
|
38
|
-
});
|
|
39
|
-
return [code.replace(__classPrivateFieldGet(this, _VariableSkyHeightCommand_regex, "f"), "").trim(), remark];
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.VariableSkyHeightCommand = VariableSkyHeightCommand;
|
|
43
|
-
_VariableSkyHeightCommand_regex = new WeakMap();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Direction } from "../../model/enum";
|
|
2
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
3
|
-
import { Command } from "./Command";
|
|
4
|
-
export interface IVirgaDirectionRemark extends IBaseRemark {
|
|
5
|
-
type: RemarkType.VirgaDirection;
|
|
6
|
-
direction: Direction;
|
|
7
|
-
}
|
|
8
|
-
export declare class VirgaDirectionCommand extends Command {
|
|
9
|
-
#private;
|
|
10
|
-
canParse(code: string): boolean;
|
|
11
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
12
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _VirgaDirectionCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.VirgaDirectionCommand = void 0;
|
|
10
|
-
const helpers_1 = require("../../helpers/helpers");
|
|
11
|
-
const i18n_1 = require("../../commons/i18n");
|
|
12
|
-
const errors_1 = require("../../commons/errors");
|
|
13
|
-
const enum_1 = require("../../model/enum");
|
|
14
|
-
const remark_1 = require("../remark");
|
|
15
|
-
const Command_1 = require("./Command");
|
|
16
|
-
class VirgaDirectionCommand extends Command_1.Command {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
_VirgaDirectionCommand_regex.set(this, /^VIRGA ([A-Z]{2})/);
|
|
20
|
-
}
|
|
21
|
-
canParse(code) {
|
|
22
|
-
return __classPrivateFieldGet(this, _VirgaDirectionCommand_regex, "f").test(code);
|
|
23
|
-
}
|
|
24
|
-
execute(code, remark) {
|
|
25
|
-
const matches = code.match(__classPrivateFieldGet(this, _VirgaDirectionCommand_regex, "f"));
|
|
26
|
-
if (!matches)
|
|
27
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
28
|
-
const direction = (0, helpers_1.as)(matches[1], enum_1.Direction);
|
|
29
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.Virga.Direction", this.locale), (0, i18n_1._)(`Converter.${direction}`, this.locale));
|
|
30
|
-
remark.push({
|
|
31
|
-
type: remark_1.RemarkType.VirgaDirection,
|
|
32
|
-
description,
|
|
33
|
-
raw: matches[0],
|
|
34
|
-
direction,
|
|
35
|
-
});
|
|
36
|
-
return [code.replace(__classPrivateFieldGet(this, _VirgaDirectionCommand_regex, "f"), "").trim(), remark];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.VirgaDirectionCommand = VirgaDirectionCommand;
|
|
40
|
-
_VirgaDirectionCommand_regex = new WeakMap();
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
2
|
-
import { Command } from "./Command";
|
|
3
|
-
export interface IWaterEquivalentSnowRemark extends IBaseRemark {
|
|
4
|
-
type: RemarkType.WaterEquivalentSnow;
|
|
5
|
-
amount: number;
|
|
6
|
-
}
|
|
7
|
-
export declare class WaterEquivalentSnowCommand extends Command {
|
|
8
|
-
#private;
|
|
9
|
-
canParse(code: string): boolean;
|
|
10
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
11
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _WaterEquivalentSnowCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WaterEquivalentSnowCommand = void 0;
|
|
10
|
-
const i18n_1 = require("../../commons/i18n");
|
|
11
|
-
const errors_1 = require("../../commons/errors");
|
|
12
|
-
const remark_1 = require("../remark");
|
|
13
|
-
const Command_1 = require("./Command");
|
|
14
|
-
class WaterEquivalentSnowCommand extends Command_1.Command {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
_WaterEquivalentSnowCommand_regex.set(this, /^933(\d{3})\b/);
|
|
18
|
-
}
|
|
19
|
-
canParse(code) {
|
|
20
|
-
return __classPrivateFieldGet(this, _WaterEquivalentSnowCommand_regex, "f").test(code);
|
|
21
|
-
}
|
|
22
|
-
execute(code, remark) {
|
|
23
|
-
const matches = code.match(__classPrivateFieldGet(this, _WaterEquivalentSnowCommand_regex, "f"));
|
|
24
|
-
if (!matches)
|
|
25
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
26
|
-
const amount = +matches[1] / 10;
|
|
27
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.Water.Equivalent.Snow.Ground", this.locale), amount);
|
|
28
|
-
remark.push({
|
|
29
|
-
type: remark_1.RemarkType.WaterEquivalentSnow,
|
|
30
|
-
description,
|
|
31
|
-
raw: matches[0],
|
|
32
|
-
amount,
|
|
33
|
-
});
|
|
34
|
-
return [code.replace(__classPrivateFieldGet(this, _WaterEquivalentSnowCommand_regex, "f"), "").trim(), remark];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.WaterEquivalentSnowCommand = WaterEquivalentSnowCommand;
|
|
38
|
-
_WaterEquivalentSnowCommand_regex = new WeakMap();
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
2
|
-
import { Command } from "./Command";
|
|
3
|
-
export interface IWindPeakCommandRemark extends IBaseRemark {
|
|
4
|
-
type: RemarkType.WindPeak;
|
|
5
|
-
/**
|
|
6
|
-
* In knots
|
|
7
|
-
*/
|
|
8
|
-
speed: number;
|
|
9
|
-
degrees: number;
|
|
10
|
-
startHour?: number;
|
|
11
|
-
startMinute: number;
|
|
12
|
-
}
|
|
13
|
-
export declare class WindPeakCommand extends Command {
|
|
14
|
-
#private;
|
|
15
|
-
canParse(code: string): boolean;
|
|
16
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
17
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _WindPeakCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WindPeakCommand = void 0;
|
|
10
|
-
const i18n_1 = require("../../commons/i18n");
|
|
11
|
-
const errors_1 = require("../../commons/errors");
|
|
12
|
-
const remark_1 = require("../remark");
|
|
13
|
-
const Command_1 = require("./Command");
|
|
14
|
-
class WindPeakCommand extends Command_1.Command {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
_WindPeakCommand_regex.set(this, /^PK WND (\d{3})(\d{2,3})\/(\d{2})?(\d{2})/);
|
|
18
|
-
}
|
|
19
|
-
canParse(code) {
|
|
20
|
-
return __classPrivateFieldGet(this, _WindPeakCommand_regex, "f").test(code);
|
|
21
|
-
}
|
|
22
|
-
execute(code, remark) {
|
|
23
|
-
const matches = code.match(__classPrivateFieldGet(this, _WindPeakCommand_regex, "f"));
|
|
24
|
-
if (!matches)
|
|
25
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
26
|
-
const degrees = +matches[1];
|
|
27
|
-
const speed = +matches[2];
|
|
28
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.PeakWind", this.locale), degrees, speed, matches[3] || "", matches[4]);
|
|
29
|
-
remark.push({
|
|
30
|
-
type: remark_1.RemarkType.WindPeak,
|
|
31
|
-
description,
|
|
32
|
-
raw: matches[0],
|
|
33
|
-
speed,
|
|
34
|
-
degrees,
|
|
35
|
-
startHour: matches[3] ? +matches[3] : undefined,
|
|
36
|
-
startMinute: +matches[4],
|
|
37
|
-
});
|
|
38
|
-
return [code.replace(__classPrivateFieldGet(this, _WindPeakCommand_regex, "f"), "").trim(), remark];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.WindPeakCommand = WindPeakCommand;
|
|
42
|
-
_WindPeakCommand_regex = new WeakMap();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
2
|
-
import { Command } from "./Command";
|
|
3
|
-
export interface IWindShiftRemark extends IBaseRemark {
|
|
4
|
-
type: RemarkType.WindShift;
|
|
5
|
-
startHour?: number;
|
|
6
|
-
startMinute: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class WindShiftCommand extends Command {
|
|
9
|
-
#private;
|
|
10
|
-
canParse(code: string): boolean;
|
|
11
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
12
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _WindShiftCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WindShiftCommand = void 0;
|
|
10
|
-
const i18n_1 = require("../../commons/i18n");
|
|
11
|
-
const errors_1 = require("../../commons/errors");
|
|
12
|
-
const remark_1 = require("../remark");
|
|
13
|
-
const Command_1 = require("./Command");
|
|
14
|
-
class WindShiftCommand extends Command_1.Command {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
_WindShiftCommand_regex.set(this, /^WSHFT (\d{2})?(\d{2})/);
|
|
18
|
-
}
|
|
19
|
-
canParse(code) {
|
|
20
|
-
return __classPrivateFieldGet(this, _WindShiftCommand_regex, "f").test(code);
|
|
21
|
-
}
|
|
22
|
-
execute(code, remark) {
|
|
23
|
-
const matches = code.match(__classPrivateFieldGet(this, _WindShiftCommand_regex, "f"));
|
|
24
|
-
if (!matches)
|
|
25
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
26
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.WindShift.0", this.locale), matches[1] || "", matches[2]);
|
|
27
|
-
remark.push({
|
|
28
|
-
type: remark_1.RemarkType.WindShift,
|
|
29
|
-
description,
|
|
30
|
-
raw: matches[0],
|
|
31
|
-
startHour: matches[1] ? +matches[1] : undefined,
|
|
32
|
-
startMinute: +matches[2],
|
|
33
|
-
});
|
|
34
|
-
return [code.replace(__classPrivateFieldGet(this, _WindShiftCommand_regex, "f"), "").trim(), remark];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.WindShiftCommand = WindShiftCommand;
|
|
38
|
-
_WindShiftCommand_regex = new WeakMap();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IBaseRemark, RemarkType, Remark } from "../remark";
|
|
2
|
-
import { Command } from "./Command";
|
|
3
|
-
export interface IWindShiftFropaRemark extends IBaseRemark {
|
|
4
|
-
type: RemarkType.WindShiftFropa;
|
|
5
|
-
startHour?: number;
|
|
6
|
-
startMinute: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class WindShiftFropaCommand extends Command {
|
|
9
|
-
#private;
|
|
10
|
-
canParse(code: string): boolean;
|
|
11
|
-
execute(code: string, remark: Remark[]): [string, Remark[]];
|
|
12
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var _WindShiftFropaCommand_regex;
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.WindShiftFropaCommand = void 0;
|
|
10
|
-
const i18n_1 = require("../../commons/i18n");
|
|
11
|
-
const errors_1 = require("../../commons/errors");
|
|
12
|
-
const remark_1 = require("../remark");
|
|
13
|
-
const Command_1 = require("./Command");
|
|
14
|
-
class WindShiftFropaCommand extends Command_1.Command {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
_WindShiftFropaCommand_regex.set(this, /^WSHFT (\d{2})?(\d{2}) FROPA/);
|
|
18
|
-
}
|
|
19
|
-
canParse(code) {
|
|
20
|
-
return __classPrivateFieldGet(this, _WindShiftFropaCommand_regex, "f").test(code);
|
|
21
|
-
}
|
|
22
|
-
execute(code, remark) {
|
|
23
|
-
const matches = code.match(__classPrivateFieldGet(this, _WindShiftFropaCommand_regex, "f"));
|
|
24
|
-
if (!matches)
|
|
25
|
-
throw new errors_1.UnexpectedParseError("Match not found");
|
|
26
|
-
const description = (0, i18n_1.format)((0, i18n_1._)("Remark.WindShift.FROPA", this.locale), matches[1] || "", matches[2]);
|
|
27
|
-
remark.push({
|
|
28
|
-
type: remark_1.RemarkType.WindShiftFropa,
|
|
29
|
-
description,
|
|
30
|
-
raw: matches[0],
|
|
31
|
-
startHour: matches[1] ? +matches[1] : undefined,
|
|
32
|
-
startMinute: +matches[2],
|
|
33
|
-
});
|
|
34
|
-
return [code.replace(__classPrivateFieldGet(this, _WindShiftFropaCommand_regex, "f"), "").trim(), remark];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.WindShiftFropaCommand = WindShiftFropaCommand;
|
|
38
|
-
_WindShiftFropaCommand_regex = new WeakMap();
|
package/dist/command/remark.d.ts
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Locale } from "../commons/i18n";
|
|
2
|
-
import { ICeilingHeightRemark } from "./remark/CeilingHeightCommand";
|
|
3
|
-
import { ICeilingSecondLocationRemark } from "./remark/CeilingSecondLocationCommand";
|
|
4
|
-
import { IHailSizeRemark } from "./remark/HailSizeCommand";
|
|
5
|
-
import { IHourlyMaximumMinimumTemperatureRemark } from "./remark/HourlyMaximumMinimumTemperatureCommand";
|
|
6
|
-
import { IHourlyMaximumTemperatureRemark } from "./remark/HourlyMaximumTemperatureCommand";
|
|
7
|
-
import { IHourlyMinimumTemperatureRemark } from "./remark/HourlyMinimumTemperatureCommand";
|
|
8
|
-
import { IHourlyPrecipitationAmountRemark } from "./remark/HourlyPrecipitationAmountCommand";
|
|
9
|
-
import { IHourlyPressureRemark } from "./remark/HourlyPressureCommand";
|
|
10
|
-
import { IHourlyTemperatureDewPointRemark } from "./remark/HourlyTemperatureDewPointCommand";
|
|
11
|
-
import { IIceAccretionRemark } from "./remark/IceAccretionCommand";
|
|
12
|
-
import { IObscurationRemark } from "./remark/ObscurationCommand";
|
|
13
|
-
import { IPrecipitationAmount24HourRemark } from "./remark/PrecipitationAmount24HourCommand";
|
|
14
|
-
import { IPrecipitationAmount36HourRemark } from "./remark/PrecipitationAmount36HourCommand";
|
|
15
|
-
import { IPrecipitationBegEndRemark } from "./remark/PrecipitationBegEndCommand";
|
|
16
|
-
import { IPrevailingVisibilityRemark } from "./remark/PrevailingVisibilityCommand";
|
|
17
|
-
import { ISeaLevelPressureRemark } from "./remark/SeaLevelPressureCommand";
|
|
18
|
-
import { ISecondLocationVisibilityRemark } from "./remark/SecondLocationVisibilityCommand";
|
|
19
|
-
import { ISectorVisibilityRemark } from "./remark/SectorVisibilityCommand";
|
|
20
|
-
import { ISmallHailSizeRemark } from "./remark/SmallHailSizeCommand";
|
|
21
|
-
import { ISnowDepthRemark } from "./remark/SnowDepthCommand";
|
|
22
|
-
import { ISnowIncreaseRemark } from "./remark/SnowIncreaseCommand";
|
|
23
|
-
import { ISnowPelletsRemark } from "./remark/SnowPelletsCommand";
|
|
24
|
-
import { ISunshineDurationRemark } from "./remark/SunshineDurationCommand";
|
|
25
|
-
import { ISurfaceVisibilityRemark } from "./remark/SurfaceVisibilityCommand";
|
|
26
|
-
import { IThunderStormLocationRemark } from "./remark/ThunderStormLocationCommand";
|
|
27
|
-
import { IThunderStormLocationMovingRemark } from "./remark/ThunderStormLocationMovingCommand";
|
|
28
|
-
import { ITornadicActivityBegRemark } from "./remark/TornadicActivityBegCommand";
|
|
29
|
-
import { ITornadicActivityBegEndRemark } from "./remark/TornadicActivityBegEndCommand";
|
|
30
|
-
import { ITornadicActivityEndRemark } from "./remark/TornadicActivityEndCommand";
|
|
31
|
-
import { ITowerVisibilityRemark } from "./remark/TowerVisibilityCommand";
|
|
32
|
-
import { IVariableSkyRemark } from "./remark/VariableSkyCommand";
|
|
33
|
-
import { IVariableSkyHeightRemark } from "./remark/VariableSkyHeightCommand";
|
|
34
|
-
import { IVirgaDirectionRemark } from "./remark/VirgaDirectionCommand";
|
|
35
|
-
import { IWaterEquivalentSnowRemark } from "./remark/WaterEquivalentSnowCommand";
|
|
36
|
-
import { IWindPeakCommandRemark } from "./remark/WindPeakCommandCommand";
|
|
37
|
-
import { IWindShiftRemark } from "./remark/WindShiftCommand";
|
|
38
|
-
import { IWindShiftFropaRemark } from "./remark/WindShiftFropaCommand";
|
|
39
|
-
import { Command } from "./remark/Command";
|
|
40
|
-
import { IDefaultCommandRemark } from "./remark/DefaultCommand";
|
|
41
|
-
import { IPrecipitationBegRemark } from "./remark/PrecipitationBegCommand";
|
|
42
|
-
import { IPrecipitationEndRemark } from "./remark/PrecipitationEndCommand";
|
|
43
|
-
export type { ICeilingHeightRemark, ICeilingSecondLocationRemark, IHourlyMaximumMinimumTemperatureRemark, IHourlyMaximumTemperatureRemark, IHourlyMinimumTemperatureRemark, IHourlyPrecipitationAmountRemark, IHourlyPressureRemark, IHourlyTemperatureDewPointRemark, IIceAccretionRemark, IObscurationRemark, IPrecipitationAmount24HourRemark, IPrecipitationAmount36HourRemark, IPrecipitationBegEndRemark, IPrevailingVisibilityRemark, ISeaLevelPressureRemark, ISecondLocationVisibilityRemark, ISectorVisibilityRemark, ISmallHailSizeRemark, ISnowIncreaseRemark, ISnowPelletsRemark, ISunshineDurationRemark, ISurfaceVisibilityRemark, IThunderStormLocationRemark, IThunderStormLocationMovingRemark, ITornadicActivityBegRemark, ITornadicActivityBegEndRemark, ITornadicActivityEndRemark, ITowerVisibilityRemark, IVariableSkyRemark, IVariableSkyHeightRemark, IVirgaDirectionRemark, IWaterEquivalentSnowRemark, IWindPeakCommandRemark, IWindShiftFropaRemark, };
|
|
44
|
-
export interface IBaseRemark {
|
|
45
|
-
type: RemarkType;
|
|
46
|
-
description?: string;
|
|
47
|
-
raw: string;
|
|
48
|
-
}
|
|
49
|
-
export interface IUnknownRemark extends IBaseRemark {
|
|
50
|
-
type: RemarkType.Unknown;
|
|
51
|
-
}
|
|
52
|
-
export declare class RemarkCommandSupplier {
|
|
53
|
-
private locale;
|
|
54
|
-
defaultCommand: Command;
|
|
55
|
-
commandList: Command[];
|
|
56
|
-
constructor(locale: Locale);
|
|
57
|
-
get(code: string): Command;
|
|
58
|
-
}
|
|
59
|
-
export declare enum RemarkType {
|
|
60
|
-
Unknown = "Unknown",
|
|
61
|
-
AO1 = "AO1",
|
|
62
|
-
AO2 = "AO2",
|
|
63
|
-
PRESFR = "PRESFR",
|
|
64
|
-
PRESRR = "PRESRR",
|
|
65
|
-
TORNADO = "TORNADO",
|
|
66
|
-
FUNNELCLOUD = "FUNNELCLOUD",
|
|
67
|
-
WATERSPOUT = "WATERSPOUT",
|
|
68
|
-
VIRGA = "VIRGA",
|
|
69
|
-
WindPeak = "WindPeak",
|
|
70
|
-
WindShiftFropa = "WindShiftFropa",
|
|
71
|
-
WindShift = "WindShift",
|
|
72
|
-
TowerVisibility = "TowerVisibility",
|
|
73
|
-
SurfaceVisibility = "SurfaceVisibility",
|
|
74
|
-
PrevailingVisibility = "PrevailingVisibility",
|
|
75
|
-
SecondLocationVisibility = "SecondLocationVisibility",
|
|
76
|
-
SectorVisibility = "SectorVisibility",
|
|
77
|
-
TornadicActivityBegEnd = "TornadicActivityBegEnd",
|
|
78
|
-
TornadicActivityBeg = "TornadicActivityBeg",
|
|
79
|
-
TornadicActivityEnd = "TornadicActivityEnd",
|
|
80
|
-
PrecipitationBeg = "PrecipitationBeg",
|
|
81
|
-
PrecipitationBegEnd = "PrecipitationBegEnd",
|
|
82
|
-
PrecipitationEnd = "PrecipitationEnd",
|
|
83
|
-
ThunderStormLocationMoving = "ThunderStormLocationMoving",
|
|
84
|
-
ThunderStormLocation = "ThunderStormLocation",
|
|
85
|
-
SmallHailSize = "SmallHailSize",
|
|
86
|
-
HailSize = "HailSize",
|
|
87
|
-
SnowPellets = "SnowPellets",
|
|
88
|
-
VirgaDirection = "VirgaDirection",
|
|
89
|
-
CeilingHeight = "CeilingHeight",
|
|
90
|
-
Obscuration = "Obscuration",
|
|
91
|
-
VariableSkyHeight = "VariableSkyHeight",
|
|
92
|
-
VariableSky = "VariableSky",
|
|
93
|
-
CeilingSecondLocation = "CeilingSecondLocation",
|
|
94
|
-
SeaLevelPressure = "SeaLevelPressure",
|
|
95
|
-
SnowIncrease = "SnowIncrease",
|
|
96
|
-
HourlyMaximumMinimumTemperature = "HourlyMaximumMinimumTemperature",
|
|
97
|
-
HourlyMaximumTemperature = "HourlyMaximumTemperature",
|
|
98
|
-
HourlyMinimumTemperature = "HourlyMinimumTemperature",
|
|
99
|
-
HourlyPrecipitationAmount = "HourlyPrecipitationAmount",
|
|
100
|
-
HourlyTemperatureDewPoint = "HourlyTemperatureDewPoint",
|
|
101
|
-
HourlyPressure = "HourlyPressure",
|
|
102
|
-
IceAccretion = "IceAccretion",
|
|
103
|
-
PrecipitationAmount36Hour = "PrecipitationAmount36Hour",
|
|
104
|
-
PrecipitationAmount24Hour = "PrecipitationAmount24Hour",
|
|
105
|
-
SnowDepth = "SnowDepth",
|
|
106
|
-
SunshineDuration = "SunshineDuration",
|
|
107
|
-
WaterEquivalentSnow = "WaterEquivalentSnow"
|
|
108
|
-
}
|
|
109
|
-
export declare type Remark = IUnknownRemark | IDefaultCommandRemark | ICeilingHeightRemark | ICeilingSecondLocationRemark | IHailSizeRemark | IHourlyMaximumMinimumTemperatureRemark | IHourlyMaximumTemperatureRemark | IHourlyMinimumTemperatureRemark | IHourlyPrecipitationAmountRemark | IHourlyPressureRemark | IHourlyTemperatureDewPointRemark | IIceAccretionRemark | IObscurationRemark | IPrecipitationAmount24HourRemark | IPrecipitationAmount36HourRemark | IPrecipitationAmount36HourRemark | IPrecipitationBegRemark | IPrecipitationBegEndRemark | IPrecipitationEndRemark | IPrevailingVisibilityRemark | ISeaLevelPressureRemark | ISecondLocationVisibilityRemark | ISectorVisibilityRemark | ISmallHailSizeRemark | ISnowDepthRemark | ISnowIncreaseRemark | ISnowPelletsRemark | ISunshineDurationRemark | ISurfaceVisibilityRemark | IThunderStormLocationRemark | IThunderStormLocationMovingRemark | ITornadicActivityBegRemark | ITornadicActivityBegEndRemark | ITornadicActivityEndRemark | ITowerVisibilityRemark | IVariableSkyRemark | IVariableSkyHeightRemark | IVirgaDirectionRemark | IWaterEquivalentSnowRemark | IWindPeakCommandRemark | IWindShiftRemark | IWindShiftFropaRemark;
|
package/dist/command/remark.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RemarkType = exports.RemarkCommandSupplier = void 0;
|
|
4
|
-
const CeilingHeightCommand_1 = require("./remark/CeilingHeightCommand");
|
|
5
|
-
const CeilingSecondLocationCommand_1 = require("./remark/CeilingSecondLocationCommand");
|
|
6
|
-
const HailSizeCommand_1 = require("./remark/HailSizeCommand");
|
|
7
|
-
const HourlyMaximumMinimumTemperatureCommand_1 = require("./remark/HourlyMaximumMinimumTemperatureCommand");
|
|
8
|
-
const HourlyMaximumTemperatureCommand_1 = require("./remark/HourlyMaximumTemperatureCommand");
|
|
9
|
-
const HourlyMinimumTemperatureCommand_1 = require("./remark/HourlyMinimumTemperatureCommand");
|
|
10
|
-
const HourlyPrecipitationAmountCommand_1 = require("./remark/HourlyPrecipitationAmountCommand");
|
|
11
|
-
const HourlyPressureCommand_1 = require("./remark/HourlyPressureCommand");
|
|
12
|
-
const HourlyTemperatureDewPointCommand_1 = require("./remark/HourlyTemperatureDewPointCommand");
|
|
13
|
-
const IceAccretionCommand_1 = require("./remark/IceAccretionCommand");
|
|
14
|
-
const ObscurationCommand_1 = require("./remark/ObscurationCommand");
|
|
15
|
-
const PrecipitationAmount24HourCommand_1 = require("./remark/PrecipitationAmount24HourCommand");
|
|
16
|
-
const PrecipitationAmount36HourCommand_1 = require("./remark/PrecipitationAmount36HourCommand");
|
|
17
|
-
const PrecipitationBegEndCommand_1 = require("./remark/PrecipitationBegEndCommand");
|
|
18
|
-
const PrevailingVisibilityCommand_1 = require("./remark/PrevailingVisibilityCommand");
|
|
19
|
-
const SeaLevelPressureCommand_1 = require("./remark/SeaLevelPressureCommand");
|
|
20
|
-
const SecondLocationVisibilityCommand_1 = require("./remark/SecondLocationVisibilityCommand");
|
|
21
|
-
const SectorVisibilityCommand_1 = require("./remark/SectorVisibilityCommand");
|
|
22
|
-
const SmallHailSizeCommand_1 = require("./remark/SmallHailSizeCommand");
|
|
23
|
-
const SnowDepthCommand_1 = require("./remark/SnowDepthCommand");
|
|
24
|
-
const SnowIncreaseCommand_1 = require("./remark/SnowIncreaseCommand");
|
|
25
|
-
const SnowPelletsCommand_1 = require("./remark/SnowPelletsCommand");
|
|
26
|
-
const SunshineDurationCommand_1 = require("./remark/SunshineDurationCommand");
|
|
27
|
-
const SurfaceVisibilityCommand_1 = require("./remark/SurfaceVisibilityCommand");
|
|
28
|
-
const ThunderStormLocationCommand_1 = require("./remark/ThunderStormLocationCommand");
|
|
29
|
-
const ThunderStormLocationMovingCommand_1 = require("./remark/ThunderStormLocationMovingCommand");
|
|
30
|
-
const TornadicActivityBegCommand_1 = require("./remark/TornadicActivityBegCommand");
|
|
31
|
-
const TornadicActivityBegEndCommand_1 = require("./remark/TornadicActivityBegEndCommand");
|
|
32
|
-
const TornadicActivityEndCommand_1 = require("./remark/TornadicActivityEndCommand");
|
|
33
|
-
const TowerVisibilityCommand_1 = require("./remark/TowerVisibilityCommand");
|
|
34
|
-
const VariableSkyCommand_1 = require("./remark/VariableSkyCommand");
|
|
35
|
-
const VariableSkyHeightCommand_1 = require("./remark/VariableSkyHeightCommand");
|
|
36
|
-
const VirgaDirectionCommand_1 = require("./remark/VirgaDirectionCommand");
|
|
37
|
-
const WaterEquivalentSnowCommand_1 = require("./remark/WaterEquivalentSnowCommand");
|
|
38
|
-
const WindPeakCommandCommand_1 = require("./remark/WindPeakCommandCommand");
|
|
39
|
-
const WindShiftCommand_1 = require("./remark/WindShiftCommand");
|
|
40
|
-
const WindShiftFropaCommand_1 = require("./remark/WindShiftFropaCommand");
|
|
41
|
-
const DefaultCommand_1 = require("./remark/DefaultCommand");
|
|
42
|
-
const PrecipitationBegCommand_1 = require("./remark/PrecipitationBegCommand");
|
|
43
|
-
const PrecipitationEndCommand_1 = require("./remark/PrecipitationEndCommand");
|
|
44
|
-
class RemarkCommandSupplier {
|
|
45
|
-
constructor(locale) {
|
|
46
|
-
this.locale = locale;
|
|
47
|
-
this.defaultCommand = new DefaultCommand_1.DefaultCommand(locale);
|
|
48
|
-
this.commandList = [
|
|
49
|
-
new WindPeakCommandCommand_1.WindPeakCommand(locale),
|
|
50
|
-
new WindShiftFropaCommand_1.WindShiftFropaCommand(locale),
|
|
51
|
-
new WindShiftCommand_1.WindShiftCommand(locale),
|
|
52
|
-
new TowerVisibilityCommand_1.TowerVisibilityCommand(locale),
|
|
53
|
-
new SurfaceVisibilityCommand_1.SurfaceVisibilityCommand(locale),
|
|
54
|
-
new PrevailingVisibilityCommand_1.PrevailingVisibilityCommand(locale),
|
|
55
|
-
new SecondLocationVisibilityCommand_1.SecondLocationVisibilityCommand(locale),
|
|
56
|
-
new SectorVisibilityCommand_1.SectorVisibilityCommand(locale),
|
|
57
|
-
new TornadicActivityBegEndCommand_1.TornadicActivityBegEndCommand(locale),
|
|
58
|
-
new TornadicActivityBegCommand_1.TornadicActivityBegCommand(locale),
|
|
59
|
-
new TornadicActivityEndCommand_1.TornadicActivityEndCommand(locale),
|
|
60
|
-
new PrecipitationBegEndCommand_1.PrecipitationBegEndCommand(locale),
|
|
61
|
-
new PrecipitationBegCommand_1.PrecipitationBegCommand(locale),
|
|
62
|
-
new PrecipitationEndCommand_1.PrecipitationEndCommand(locale),
|
|
63
|
-
new ThunderStormLocationMovingCommand_1.ThunderStormLocationMovingCommand(locale),
|
|
64
|
-
new ThunderStormLocationCommand_1.ThunderStormLocationCommand(locale),
|
|
65
|
-
new SmallHailSizeCommand_1.SmallHailSizeCommand(locale),
|
|
66
|
-
new HailSizeCommand_1.HailSizeCommand(locale),
|
|
67
|
-
new SnowPelletsCommand_1.SnowPelletsCommand(locale),
|
|
68
|
-
new VirgaDirectionCommand_1.VirgaDirectionCommand(locale),
|
|
69
|
-
new CeilingHeightCommand_1.CeilingHeightCommand(locale),
|
|
70
|
-
new ObscurationCommand_1.ObscurationCommand(locale),
|
|
71
|
-
new VariableSkyHeightCommand_1.VariableSkyHeightCommand(locale),
|
|
72
|
-
new VariableSkyCommand_1.VariableSkyCommand(locale),
|
|
73
|
-
new CeilingSecondLocationCommand_1.CeilingSecondLocationCommand(locale),
|
|
74
|
-
new SeaLevelPressureCommand_1.SeaLevelPressureCommand(locale),
|
|
75
|
-
new SnowIncreaseCommand_1.SnowIncreaseCommand(locale),
|
|
76
|
-
new HourlyMaximumMinimumTemperatureCommand_1.HourlyMaximumMinimumTemperatureCommand(locale),
|
|
77
|
-
new HourlyMaximumTemperatureCommand_1.HourlyMaximumTemperatureCommand(locale),
|
|
78
|
-
new HourlyMinimumTemperatureCommand_1.HourlyMinimumTemperatureCommand(locale),
|
|
79
|
-
new HourlyPrecipitationAmountCommand_1.HourlyPrecipitationAmountCommand(locale),
|
|
80
|
-
new HourlyTemperatureDewPointCommand_1.HourlyTemperatureDewPointCommand(locale),
|
|
81
|
-
new HourlyPressureCommand_1.HourlyPressureCommand(locale),
|
|
82
|
-
new IceAccretionCommand_1.IceAccretionCommand(locale),
|
|
83
|
-
new PrecipitationAmount36HourCommand_1.PrecipitationAmount36HourCommand(locale),
|
|
84
|
-
new PrecipitationAmount24HourCommand_1.PrecipitationAmount24HourCommand(locale),
|
|
85
|
-
new SnowDepthCommand_1.SnowDepthCommand(locale),
|
|
86
|
-
new SunshineDurationCommand_1.SunshineDurationCommand(locale),
|
|
87
|
-
new WaterEquivalentSnowCommand_1.WaterEquivalentSnowCommand(locale),
|
|
88
|
-
];
|
|
89
|
-
}
|
|
90
|
-
get(code) {
|
|
91
|
-
for (const command of this.commandList) {
|
|
92
|
-
if (command.canParse(code))
|
|
93
|
-
return command;
|
|
94
|
-
}
|
|
95
|
-
return this.defaultCommand;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.RemarkCommandSupplier = RemarkCommandSupplier;
|
|
99
|
-
var RemarkType;
|
|
100
|
-
(function (RemarkType) {
|
|
101
|
-
// Unknown processed with default command
|
|
102
|
-
RemarkType["Unknown"] = "Unknown";
|
|
103
|
-
// Processed with default command
|
|
104
|
-
RemarkType["AO1"] = "AO1";
|
|
105
|
-
RemarkType["AO2"] = "AO2";
|
|
106
|
-
RemarkType["PRESFR"] = "PRESFR";
|
|
107
|
-
RemarkType["PRESRR"] = "PRESRR";
|
|
108
|
-
RemarkType["TORNADO"] = "TORNADO";
|
|
109
|
-
RemarkType["FUNNELCLOUD"] = "FUNNELCLOUD";
|
|
110
|
-
RemarkType["WATERSPOUT"] = "WATERSPOUT";
|
|
111
|
-
RemarkType["VIRGA"] = "VIRGA";
|
|
112
|
-
// Regular commands below
|
|
113
|
-
RemarkType["WindPeak"] = "WindPeak";
|
|
114
|
-
RemarkType["WindShiftFropa"] = "WindShiftFropa";
|
|
115
|
-
RemarkType["WindShift"] = "WindShift";
|
|
116
|
-
RemarkType["TowerVisibility"] = "TowerVisibility";
|
|
117
|
-
RemarkType["SurfaceVisibility"] = "SurfaceVisibility";
|
|
118
|
-
RemarkType["PrevailingVisibility"] = "PrevailingVisibility";
|
|
119
|
-
RemarkType["SecondLocationVisibility"] = "SecondLocationVisibility";
|
|
120
|
-
RemarkType["SectorVisibility"] = "SectorVisibility";
|
|
121
|
-
RemarkType["TornadicActivityBegEnd"] = "TornadicActivityBegEnd";
|
|
122
|
-
RemarkType["TornadicActivityBeg"] = "TornadicActivityBeg";
|
|
123
|
-
RemarkType["TornadicActivityEnd"] = "TornadicActivityEnd";
|
|
124
|
-
RemarkType["PrecipitationBeg"] = "PrecipitationBeg";
|
|
125
|
-
RemarkType["PrecipitationBegEnd"] = "PrecipitationBegEnd";
|
|
126
|
-
RemarkType["PrecipitationEnd"] = "PrecipitationEnd";
|
|
127
|
-
RemarkType["ThunderStormLocationMoving"] = "ThunderStormLocationMoving";
|
|
128
|
-
RemarkType["ThunderStormLocation"] = "ThunderStormLocation";
|
|
129
|
-
RemarkType["SmallHailSize"] = "SmallHailSize";
|
|
130
|
-
RemarkType["HailSize"] = "HailSize";
|
|
131
|
-
RemarkType["SnowPellets"] = "SnowPellets";
|
|
132
|
-
RemarkType["VirgaDirection"] = "VirgaDirection";
|
|
133
|
-
RemarkType["CeilingHeight"] = "CeilingHeight";
|
|
134
|
-
RemarkType["Obscuration"] = "Obscuration";
|
|
135
|
-
RemarkType["VariableSkyHeight"] = "VariableSkyHeight";
|
|
136
|
-
RemarkType["VariableSky"] = "VariableSky";
|
|
137
|
-
RemarkType["CeilingSecondLocation"] = "CeilingSecondLocation";
|
|
138
|
-
RemarkType["SeaLevelPressure"] = "SeaLevelPressure";
|
|
139
|
-
RemarkType["SnowIncrease"] = "SnowIncrease";
|
|
140
|
-
RemarkType["HourlyMaximumMinimumTemperature"] = "HourlyMaximumMinimumTemperature";
|
|
141
|
-
RemarkType["HourlyMaximumTemperature"] = "HourlyMaximumTemperature";
|
|
142
|
-
RemarkType["HourlyMinimumTemperature"] = "HourlyMinimumTemperature";
|
|
143
|
-
RemarkType["HourlyPrecipitationAmount"] = "HourlyPrecipitationAmount";
|
|
144
|
-
RemarkType["HourlyTemperatureDewPoint"] = "HourlyTemperatureDewPoint";
|
|
145
|
-
RemarkType["HourlyPressure"] = "HourlyPressure";
|
|
146
|
-
RemarkType["IceAccretion"] = "IceAccretion";
|
|
147
|
-
RemarkType["PrecipitationAmount36Hour"] = "PrecipitationAmount36Hour";
|
|
148
|
-
RemarkType["PrecipitationAmount24Hour"] = "PrecipitationAmount24Hour";
|
|
149
|
-
RemarkType["SnowDepth"] = "SnowDepth";
|
|
150
|
-
RemarkType["SunshineDuration"] = "SunshineDuration";
|
|
151
|
-
RemarkType["WaterEquivalentSnow"] = "WaterEquivalentSnow";
|
|
152
|
-
})(RemarkType = exports.RemarkType || (exports.RemarkType = {}));
|