@airframes/acars-decoder 1.4.7 → 1.6.0
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/.github/FUNDING.yml +1 -1
- package/.github/workflows/yarn-test.yml +11 -4
- package/README.md +32 -0
- package/index.d.ts +17 -0
- package/index.ts +2 -0
- package/package.json +7 -15
- package/tsconfig.json +3 -3
- package/yarn-error.log +3354 -0
- package/coverage/clover.xml +0 -1799
- package/coverage/coverage-final.json +0 -24
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -131
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -2278
- package/dist/DateTimeUtils.d.ts +0 -8
- package/dist/DateTimeUtils.js +0 -27
- package/dist/DecoderPlugin.d.ts +0 -18
- package/dist/DecoderPlugin.js +0 -71
- package/dist/DecoderPluginInterface.d.ts +0 -7
- package/dist/DecoderPluginInterface.js +0 -3
- package/dist/IcaoDecoder.d.ts +0 -10
- package/dist/IcaoDecoder.js +0 -111
- package/dist/MessageDecoder.d.ts +0 -14
- package/dist/MessageDecoder.js +0 -129
- package/dist/bin/acars-decoder-test.d.ts +0 -2
- package/dist/bin/acars-decoder-test.js +0 -53
- package/dist/bin/acars-decoder.d.ts +0 -2
- package/dist/bin/acars-decoder.js +0 -20
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -20
- package/dist/plugins/Label_15.d.ts +0 -11
- package/dist/plugins/Label_15.js +0 -40
- package/dist/plugins/Label_16_N_Space.d.ts +0 -11
- package/dist/plugins/Label_16_N_Space.js +0 -80
- package/dist/plugins/Label_16_N_Space.test.d.ts +0 -1
- package/dist/plugins/Label_16_N_Space.test.js +0 -84
- package/dist/plugins/Label_1M_Slash.d.ts +0 -11
- package/dist/plugins/Label_1M_Slash.js +0 -61
- package/dist/plugins/Label_1M_Slash.test.d.ts +0 -1
- package/dist/plugins/Label_1M_Slash.test.js +0 -43
- package/dist/plugins/Label_20_CFB.01.d.ts +0 -11
- package/dist/plugins/Label_20_CFB.01.js +0 -69
- package/dist/plugins/Label_20_POS.d.ts +0 -11
- package/dist/plugins/Label_20_POS.js +0 -62
- package/dist/plugins/Label_30_Slash_EA.d.ts +0 -11
- package/dist/plugins/Label_30_Slash_EA.js +0 -54
- package/dist/plugins/Label_30_Slash_EA.test.d.ts +0 -1
- package/dist/plugins/Label_30_Slash_EA.test.js +0 -35
- package/dist/plugins/Label_44_ETA.d.ts +0 -11
- package/dist/plugins/Label_44_ETA.js +0 -69
- package/dist/plugins/Label_44_IN.d.ts +0 -11
- package/dist/plugins/Label_44_IN.js +0 -69
- package/dist/plugins/Label_44_OFF.d.ts +0 -11
- package/dist/plugins/Label_44_OFF.js +0 -74
- package/dist/plugins/Label_44_ON.d.ts +0 -11
- package/dist/plugins/Label_44_ON.js +0 -69
- package/dist/plugins/Label_44_POS.d.ts +0 -11
- package/dist/plugins/Label_44_POS.js +0 -81
- package/dist/plugins/Label_5Z.d.ts +0 -11
- package/dist/plugins/Label_5Z.js +0 -120
- package/dist/plugins/Label_80.d.ts +0 -12
- package/dist/plugins/Label_80.js +0 -203
- package/dist/plugins/Label_8E.d.ts +0 -10
- package/dist/plugins/Label_8E.js +0 -48
- package/dist/plugins/Label_8E.test.d.ts +0 -1
- package/dist/plugins/Label_8E.test.js +0 -32
- package/dist/plugins/Label_B6.d.ts +0 -11
- package/dist/plugins/Label_B6.js +0 -26
- package/dist/plugins/Label_ColonComma.d.ts +0 -10
- package/dist/plugins/Label_ColonComma.js +0 -28
- package/dist/plugins/Label_H1.d.ts +0 -9
- package/dist/plugins/Label_H1.js +0 -18
- package/dist/plugins/Label_H1_M1BPOS.d.ts +0 -11
- package/dist/plugins/Label_H1_M1BPOS.js +0 -54
- package/dist/plugins/Label_H1_M1BPRG.d.ts +0 -11
- package/dist/plugins/Label_H1_M1BPRG.js +0 -36
- package/dist/plugins/Label_QP.d.ts +0 -10
- package/dist/plugins/Label_QP.js +0 -49
- package/dist/plugins/Label_QQ.d.ts +0 -10
- package/dist/plugins/Label_QQ.js +0 -49
- package/dist/plugins/Label_QR.d.ts +0 -10
- package/dist/plugins/Label_QR.js +0 -49
- package/dist/plugins/Label_QS.d.ts +0 -10
- package/dist/plugins/Label_QS.js +0 -49
- package/dist/plugins/Label_SQ.d.ts +0 -10
- package/dist/plugins/Label_SQ.js +0 -104
- package/dist/plugins/official.d.ts +0 -22
- package/dist/plugins/official.js +0 -38
- package/src/DateTimeUtils.ts +0 -26
- package/src/DecoderPlugin.ts +0 -83
- package/src/DecoderPluginInterface.ts +0 -9
- package/src/IcaoDecoder.ts +0 -137
- package/src/MessageDecoder.ts +0 -117
- package/src/bin/acars-decoder-test.ts +0 -67
- package/src/bin/acars-decoder.ts +0 -23
- package/src/index.d.ts +0 -15
- package/src/index.ts +0 -4
- package/src/plugins/Label_15.ts +0 -45
- package/src/plugins/Label_16_N_Space.test.ts +0 -94
- package/src/plugins/Label_16_N_Space.ts +0 -91
- package/src/plugins/Label_1M_Slash.test.ts +0 -45
- package/src/plugins/Label_1M_Slash.ts +0 -69
- package/src/plugins/Label_20_CFB.01.ts +0 -81
- package/src/plugins/Label_20_POS.ts +0 -68
- package/src/plugins/Label_30_Slash_EA.test.ts +0 -37
- package/src/plugins/Label_30_Slash_EA.ts +0 -60
- package/src/plugins/Label_44_ETA.ts +0 -81
- package/src/plugins/Label_44_IN.ts +0 -81
- package/src/plugins/Label_44_OFF.ts +0 -88
- package/src/plugins/Label_44_ON.ts +0 -81
- package/src/plugins/Label_44_POS.ts +0 -96
- package/src/plugins/Label_5Z.ts +0 -125
- package/src/plugins/Label_80.ts +0 -215
- package/src/plugins/Label_8E.test.ts +0 -34
- package/src/plugins/Label_8E.ts +0 -55
- package/src/plugins/Label_B6.ts +0 -28
- package/src/plugins/Label_ColonComma.ts +0 -32
- package/src/plugins/Label_H1.ts +0 -18
- package/src/plugins/Label_H1_M1BPOS.ts +0 -60
- package/src/plugins/Label_H1_M1BPRG.ts +0 -40
- package/src/plugins/Label_QP.ts +0 -54
- package/src/plugins/Label_QQ.ts +0 -54
- package/src/plugins/Label_QR.ts +0 -54
- package/src/plugins/Label_QS.ts +0 -54
- package/src/plugins/Label_SQ.ts +0 -111
- package/src/plugins/official.ts +0 -22
package/.github/FUNDING.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# These are supported funding model platforms
|
|
2
2
|
|
|
3
3
|
github: [kevinelliott]
|
|
4
|
-
|
|
4
|
+
patreon: Airframes
|
|
5
5
|
open_collective: # Replace with a single Open Collective username
|
|
6
6
|
ko_fi: # Replace with a single Ko-fi username
|
|
7
7
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
name: Yarn Test CI
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
4
9
|
|
|
5
10
|
jobs:
|
|
6
11
|
build:
|
|
@@ -9,13 +14,15 @@ jobs:
|
|
|
9
14
|
|
|
10
15
|
strategy:
|
|
11
16
|
matrix:
|
|
12
|
-
node
|
|
17
|
+
# build against all active LTS and latest node
|
|
18
|
+
node-version: [18.x, 20.x, latest]
|
|
13
19
|
|
|
14
20
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
21
|
+
- uses: actions/checkout@v4
|
|
16
22
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
-
uses: actions/setup-node@
|
|
23
|
+
uses: actions/setup-node@v4
|
|
18
24
|
with:
|
|
19
25
|
node-version: ${{ matrix.node-version }}
|
|
26
|
+
cache: yarn
|
|
20
27
|
- run: yarn install
|
|
21
28
|
- run: yarn test
|
package/README.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
ACARS is an aircraft communications messaging protocol that has been in use worldwide for a few decades. This library exists to specifically decode the text portion of the ACARS message payload.
|
|
4
4
|
|
|
5
|
+
The library is built around research and discoveries from the [ACARS Message Documentation](https://github.com/airframesio/acars-message-documentation), a community effort to document the details of the ACARS message label/text payload.
|
|
6
|
+
|
|
5
7
|
It has been written in TypeScript (which compiles to Javascript) and is published as an NPM package.
|
|
6
8
|
|
|
7
9
|
You are welcome to contribute (please see https://github.com/airframesio/acars-message-documentation where we collaborate to research and document the various types of messages), and while it was primarily developed to power Airframes, you may use this library in your own applications freely.
|
|
10
|
+
|
|
11
|
+
# Installation
|
|
12
|
+
|
|
13
|
+
Add the `@airframes/acars-decoder` library to your JavaScript or TypeScript project.
|
|
14
|
+
|
|
15
|
+
With `yarn`:
|
|
16
|
+
```
|
|
17
|
+
yarn add @airframes/acars-decoder
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
With `npm`:
|
|
21
|
+
```
|
|
22
|
+
npm install @airframes/acars-decoder
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
# Usage
|
|
26
|
+
|
|
27
|
+
Documentation coming soon.
|
|
28
|
+
|
|
29
|
+
# Contributions
|
|
30
|
+
|
|
31
|
+
Contributions are welcome! Please follow the [ACARS Message Documentation](https://github.com/airframesio/acars-message-documentation) when implementing. Most find that this makes things a lot easier. Submit a Pull Request and we will gratefully review and merge.
|
|
32
|
+
|
|
33
|
+
# Contributors
|
|
34
|
+
|
|
35
|
+
| Contributor | Description |
|
|
36
|
+
| ----------- | ----------- |
|
|
37
|
+
| [Kevin Elliott](https://github.com/kevinelliott) | Primary Airframes contributor |
|
|
38
|
+
| [Michael Johnson](https://github.com/johnsom) | Decoder plugins, testing framework |
|
|
39
|
+
| [Mark Bumiller](https://github.com/makrsmark) | Decoder plugins, tests, utilities |
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MessageDecoder } from './lib/MessageDecoder';
|
|
2
|
+
declare namespace AcarsDecoder {
|
|
3
|
+
interface DecoderPlugin {
|
|
4
|
+
decode: (data: string) => string;
|
|
5
|
+
coordinateString: (coords: any) => string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface MessageDecoder {
|
|
9
|
+
constructor(): MessageDecoder;
|
|
10
|
+
registerPlugin(plugin: DecoderPlugin): boolean;
|
|
11
|
+
decode: (data: string, options: any) => string;
|
|
12
|
+
lookupAirportByIata: (iata: string) => string;
|
|
13
|
+
name: string;
|
|
14
|
+
plugins: Array<DecoderPlugin>;
|
|
15
|
+
debug: boolean;
|
|
16
|
+
}
|
|
17
|
+
}
|
package/index.ts
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@airframes/acars-decoder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "ACARS Message Decoder for TypeScript/JavaScript",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"acars-decoder": "./dist/bin/acars-decoder.js",
|
|
9
9
|
"acars-decoder-test": "./dist/bin/acars-decoder-test.js"
|
|
@@ -20,19 +20,11 @@
|
|
|
20
20
|
"url": "https://github.com/airframesio/acars-decoder-typescript/issues"
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/airframesio/acars-decoder-typescript#readme",
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"decoder",
|
|
26
|
-
"airframes",
|
|
27
|
-
"airframes.io",
|
|
28
|
-
"airframesio",
|
|
29
|
-
"ts",
|
|
30
|
-
"typescript"
|
|
31
|
-
],
|
|
32
|
-
"author": "Kevin Elliott <kevin@airframes.io>",
|
|
33
|
-
"license": "MIT",
|
|
23
|
+
"author": "Kevin Elliott <kevin@welikeinc.com>",
|
|
24
|
+
"license": "UNLICENSED",
|
|
34
25
|
"dependencies": {
|
|
35
|
-
"@types/node": "^14.14.22"
|
|
26
|
+
"@types/node": "^14.14.22",
|
|
27
|
+
"base85": "^3.1.0"
|
|
36
28
|
},
|
|
37
29
|
"devDependencies": {
|
|
38
30
|
"@babel/core": "^7.18.13",
|
package/tsconfig.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"target": "esNext",
|
|
4
4
|
"module": "commonjs",
|
|
5
5
|
"declaration": true,
|
|
6
|
-
"outDir": "dist",
|
|
7
|
-
"esModuleInterop": true,
|
|
6
|
+
"outDir": "./dist",
|
|
8
7
|
"strict": true
|
|
9
8
|
},
|
|
10
9
|
"include": [
|
|
11
|
-
"
|
|
10
|
+
"lib/*.ts",
|
|
11
|
+
"lib/**/*.ts",
|
|
12
12
|
],
|
|
13
13
|
"exclude": [
|
|
14
14
|
"node_modules"
|