@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.
Files changed (131) hide show
  1. package/.github/FUNDING.yml +1 -1
  2. package/.github/workflows/yarn-test.yml +11 -4
  3. package/README.md +32 -0
  4. package/index.d.ts +17 -0
  5. package/index.ts +2 -0
  6. package/package.json +7 -15
  7. package/tsconfig.json +3 -3
  8. package/yarn-error.log +3354 -0
  9. package/coverage/clover.xml +0 -1799
  10. package/coverage/coverage-final.json +0 -24
  11. package/coverage/lcov-report/base.css +0 -224
  12. package/coverage/lcov-report/block-navigation.js +0 -87
  13. package/coverage/lcov-report/favicon.png +0 -0
  14. package/coverage/lcov-report/index.html +0 -131
  15. package/coverage/lcov-report/prettify.css +0 -1
  16. package/coverage/lcov-report/prettify.js +0 -2
  17. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  18. package/coverage/lcov-report/sorter.js +0 -196
  19. package/coverage/lcov.info +0 -2278
  20. package/dist/DateTimeUtils.d.ts +0 -8
  21. package/dist/DateTimeUtils.js +0 -27
  22. package/dist/DecoderPlugin.d.ts +0 -18
  23. package/dist/DecoderPlugin.js +0 -71
  24. package/dist/DecoderPluginInterface.d.ts +0 -7
  25. package/dist/DecoderPluginInterface.js +0 -3
  26. package/dist/IcaoDecoder.d.ts +0 -10
  27. package/dist/IcaoDecoder.js +0 -111
  28. package/dist/MessageDecoder.d.ts +0 -14
  29. package/dist/MessageDecoder.js +0 -129
  30. package/dist/bin/acars-decoder-test.d.ts +0 -2
  31. package/dist/bin/acars-decoder-test.js +0 -53
  32. package/dist/bin/acars-decoder.d.ts +0 -2
  33. package/dist/bin/acars-decoder.js +0 -20
  34. package/dist/index.d.ts +0 -4
  35. package/dist/index.js +0 -20
  36. package/dist/plugins/Label_15.d.ts +0 -11
  37. package/dist/plugins/Label_15.js +0 -40
  38. package/dist/plugins/Label_16_N_Space.d.ts +0 -11
  39. package/dist/plugins/Label_16_N_Space.js +0 -80
  40. package/dist/plugins/Label_16_N_Space.test.d.ts +0 -1
  41. package/dist/plugins/Label_16_N_Space.test.js +0 -84
  42. package/dist/plugins/Label_1M_Slash.d.ts +0 -11
  43. package/dist/plugins/Label_1M_Slash.js +0 -61
  44. package/dist/plugins/Label_1M_Slash.test.d.ts +0 -1
  45. package/dist/plugins/Label_1M_Slash.test.js +0 -43
  46. package/dist/plugins/Label_20_CFB.01.d.ts +0 -11
  47. package/dist/plugins/Label_20_CFB.01.js +0 -69
  48. package/dist/plugins/Label_20_POS.d.ts +0 -11
  49. package/dist/plugins/Label_20_POS.js +0 -62
  50. package/dist/plugins/Label_30_Slash_EA.d.ts +0 -11
  51. package/dist/plugins/Label_30_Slash_EA.js +0 -54
  52. package/dist/plugins/Label_30_Slash_EA.test.d.ts +0 -1
  53. package/dist/plugins/Label_30_Slash_EA.test.js +0 -35
  54. package/dist/plugins/Label_44_ETA.d.ts +0 -11
  55. package/dist/plugins/Label_44_ETA.js +0 -69
  56. package/dist/plugins/Label_44_IN.d.ts +0 -11
  57. package/dist/plugins/Label_44_IN.js +0 -69
  58. package/dist/plugins/Label_44_OFF.d.ts +0 -11
  59. package/dist/plugins/Label_44_OFF.js +0 -74
  60. package/dist/plugins/Label_44_ON.d.ts +0 -11
  61. package/dist/plugins/Label_44_ON.js +0 -69
  62. package/dist/plugins/Label_44_POS.d.ts +0 -11
  63. package/dist/plugins/Label_44_POS.js +0 -81
  64. package/dist/plugins/Label_5Z.d.ts +0 -11
  65. package/dist/plugins/Label_5Z.js +0 -120
  66. package/dist/plugins/Label_80.d.ts +0 -12
  67. package/dist/plugins/Label_80.js +0 -203
  68. package/dist/plugins/Label_8E.d.ts +0 -10
  69. package/dist/plugins/Label_8E.js +0 -48
  70. package/dist/plugins/Label_8E.test.d.ts +0 -1
  71. package/dist/plugins/Label_8E.test.js +0 -32
  72. package/dist/plugins/Label_B6.d.ts +0 -11
  73. package/dist/plugins/Label_B6.js +0 -26
  74. package/dist/plugins/Label_ColonComma.d.ts +0 -10
  75. package/dist/plugins/Label_ColonComma.js +0 -28
  76. package/dist/plugins/Label_H1.d.ts +0 -9
  77. package/dist/plugins/Label_H1.js +0 -18
  78. package/dist/plugins/Label_H1_M1BPOS.d.ts +0 -11
  79. package/dist/plugins/Label_H1_M1BPOS.js +0 -54
  80. package/dist/plugins/Label_H1_M1BPRG.d.ts +0 -11
  81. package/dist/plugins/Label_H1_M1BPRG.js +0 -36
  82. package/dist/plugins/Label_QP.d.ts +0 -10
  83. package/dist/plugins/Label_QP.js +0 -49
  84. package/dist/plugins/Label_QQ.d.ts +0 -10
  85. package/dist/plugins/Label_QQ.js +0 -49
  86. package/dist/plugins/Label_QR.d.ts +0 -10
  87. package/dist/plugins/Label_QR.js +0 -49
  88. package/dist/plugins/Label_QS.d.ts +0 -10
  89. package/dist/plugins/Label_QS.js +0 -49
  90. package/dist/plugins/Label_SQ.d.ts +0 -10
  91. package/dist/plugins/Label_SQ.js +0 -104
  92. package/dist/plugins/official.d.ts +0 -22
  93. package/dist/plugins/official.js +0 -38
  94. package/src/DateTimeUtils.ts +0 -26
  95. package/src/DecoderPlugin.ts +0 -83
  96. package/src/DecoderPluginInterface.ts +0 -9
  97. package/src/IcaoDecoder.ts +0 -137
  98. package/src/MessageDecoder.ts +0 -117
  99. package/src/bin/acars-decoder-test.ts +0 -67
  100. package/src/bin/acars-decoder.ts +0 -23
  101. package/src/index.d.ts +0 -15
  102. package/src/index.ts +0 -4
  103. package/src/plugins/Label_15.ts +0 -45
  104. package/src/plugins/Label_16_N_Space.test.ts +0 -94
  105. package/src/plugins/Label_16_N_Space.ts +0 -91
  106. package/src/plugins/Label_1M_Slash.test.ts +0 -45
  107. package/src/plugins/Label_1M_Slash.ts +0 -69
  108. package/src/plugins/Label_20_CFB.01.ts +0 -81
  109. package/src/plugins/Label_20_POS.ts +0 -68
  110. package/src/plugins/Label_30_Slash_EA.test.ts +0 -37
  111. package/src/plugins/Label_30_Slash_EA.ts +0 -60
  112. package/src/plugins/Label_44_ETA.ts +0 -81
  113. package/src/plugins/Label_44_IN.ts +0 -81
  114. package/src/plugins/Label_44_OFF.ts +0 -88
  115. package/src/plugins/Label_44_ON.ts +0 -81
  116. package/src/plugins/Label_44_POS.ts +0 -96
  117. package/src/plugins/Label_5Z.ts +0 -125
  118. package/src/plugins/Label_80.ts +0 -215
  119. package/src/plugins/Label_8E.test.ts +0 -34
  120. package/src/plugins/Label_8E.ts +0 -55
  121. package/src/plugins/Label_B6.ts +0 -28
  122. package/src/plugins/Label_ColonComma.ts +0 -32
  123. package/src/plugins/Label_H1.ts +0 -18
  124. package/src/plugins/Label_H1_M1BPOS.ts +0 -60
  125. package/src/plugins/Label_H1_M1BPRG.ts +0 -40
  126. package/src/plugins/Label_QP.ts +0 -54
  127. package/src/plugins/Label_QQ.ts +0 -54
  128. package/src/plugins/Label_QR.ts +0 -54
  129. package/src/plugins/Label_QS.ts +0 -54
  130. package/src/plugins/Label_SQ.ts +0 -111
  131. package/src/plugins/official.ts +0 -22
@@ -1,7 +1,7 @@
1
1
  # These are supported funding model platforms
2
2
 
3
3
  github: [kevinelliott]
4
- #patreon: kevinelliott
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: [push]
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-version: [18.x]
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@v2
21
+ - uses: actions/checkout@v4
16
22
  - name: Use Node.js ${{ matrix.node-version }}
17
- uses: actions/setup-node@v1
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
@@ -0,0 +1,2 @@
1
+ export * from './lib/IcaoDecoder';
2
+ export * from './lib/MessageDecoder';
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@airframes/acars-decoder",
3
- "version": "1.4.7",
3
+ "version": "1.6.0",
4
4
  "description": "ACARS Message Decoder for TypeScript/JavaScript",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
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
- "keywords": [
24
- "acars",
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
- "src",
10
+ "lib/*.ts",
11
+ "lib/**/*.ts",
12
12
  ],
13
13
  "exclude": [
14
14
  "node_modules"