133 Commits

Author SHA1 Message Date
Joel Wetzell 8e98be1611 Merge pull request #260 from jwetzell/dependabot/npm_and_yarn/biomejs/biome-2.5.7
Bump @biomejs/biome from 2.5.6 to 2.5.7
2026-08-12 08:14:26 -05:00
Joel Wetzell 30d8263c14 Merge pull request #261 from jwetzell/dependabot/npm_and_yarn/globals-17.9.0
Bump globals from 17.8.0 to 17.9.0
2026-08-12 08:13:37 -05:00
dependabot[bot] 0ea5d443bc Bump globals from 17.8.0 to 17.9.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.8.0 to 17.9.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.8.0...v17.9.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.9.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 12:33:32 +00:00
dependabot[bot] 878130bef5 Bump @biomejs/biome from 2.5.6 to 2.5.7
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.5.6 to 2.5.7.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.7/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.5.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-10 12:33:27 +00:00
Joel Wetzell 07194e10af Merge pull request #259 from jwetzell/dependabot/npm_and_yarn/biomejs/biome-2.5.6
Bump @biomejs/biome from 2.5.5 to 2.5.6
2026-08-06 08:16:25 -05:00
dependabot[bot] e29a118099 Bump @biomejs/biome from 2.5.5 to 2.5.6
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.5.5 to 2.5.6.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.6/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.5.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-03 12:33:31 +00:00
Joel Wetzell 96fbd165c1 Merge pull request #256 from jwetzell/dependabot/npm_and_yarn/tsdown-0.22.14
Bump tsdown from 0.22.7 to 0.22.14
2026-07-29 08:34:21 -05:00
Joel Wetzell 886f37c6fd Merge pull request #257 from jwetzell/dependabot/npm_and_yarn/globals-17.8.0
Bump globals from 17.7.0 to 17.8.0
2026-07-29 08:34:09 -05:00
Joel Wetzell e46b87e330 Merge pull request #258 from jwetzell/dependabot/npm_and_yarn/biomejs/biome-2.5.5
Bump @biomejs/biome from 2.5.3 to 2.5.5
2026-07-29 08:33:35 -05:00
dependabot[bot] 5e3c68a343 Bump @biomejs/biome from 2.5.3 to 2.5.5
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 2.5.3 to 2.5.5.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.5.5/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-version: 2.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 12:33:36 +00:00
dependabot[bot] 8342f6dd31 Bump globals from 17.7.0 to 17.8.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.7.0 to 17.8.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.7.0...v17.8.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 12:33:30 +00:00
dependabot[bot] b0e2e37ba3 Bump tsdown from 0.22.7 to 0.22.14
Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.22.7 to 0.22.14.
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.22.7...v0.22.14)

---
updated-dependencies:
- dependency-name: tsdown
  dependency-version: 0.22.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 12:33:23 +00:00
Joel Wetzell 302d8ab407 Merge pull request #251 from jwetzell/dependabot/npm_and_yarn/typescript-7.0.2
Bump typescript from 6.0.3 to 7.0.2
2026-07-13 14:16:19 -05:00
Joel Wetzell 68db557090 linting 2026-07-13 14:15:47 -05:00
dependabot[bot] 899ae4a3a1 Bump typescript from 6.0.3 to 7.0.2
Bumps [typescript](https://github.com/microsoft/TypeScript) from 6.0.3 to 7.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 7.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 19:11:57 +00:00
Joel Wetzell 466228fb4a format 2026-07-13 14:09:21 -05:00
Joel Wetzell 4bb1e87e03 switch to biome 2026-07-13 14:05:42 -05:00
Joel Wetzell fbe6c5bdab update typescript-eslint 2026-07-13 13:53:15 -05:00
Joel Wetzell 3ddb33d65b Merge pull request #247 from jwetzell/dependabot/npm_and_yarn/globals-17.7.0
Bump globals from 17.6.0 to 17.7.0
2026-07-13 13:51:00 -05:00
dependabot[bot] 7fa6a17caf Bump globals from 17.6.0 to 17.7.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.6.0 to 17.7.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.6.0...v17.7.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 18:30:47 +00:00
Joel Wetzell 57946b4d44 Merge pull request #250 from jwetzell/dependabot/npm_and_yarn/prettier-3.9.5
Bump prettier from 3.8.4 to 3.9.5
2026-07-13 13:30:10 -05:00
Joel Wetzell 824b2640ec Merge pull request #252 from jwetzell/dependabot/npm_and_yarn/eslint-10.7.0
Bump eslint from 10.5.0 to 10.7.0
2026-07-13 13:28:45 -05:00
Joel Wetzell 63ac2a2c39 Merge pull request #253 from jwetzell/dependabot/npm_and_yarn/tsdown-0.22.7
Bump tsdown from 0.22.2 to 0.22.7
2026-07-13 13:28:34 -05:00
dependabot[bot] 5c518d95fa Bump tsdown from 0.22.2 to 0.22.7
Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.22.2 to 0.22.7.
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.22.2...v0.22.7)

---
updated-dependencies:
- dependency-name: tsdown
  dependency-version: 0.22.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 12:33:52 +00:00
dependabot[bot] ba64ac1525 Bump eslint from 10.5.0 to 10.7.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.5.0 to 10.7.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.5.0...v10.7.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.7.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 12:33:37 +00:00
dependabot[bot] 3fd0c506ad Bump prettier from 3.8.4 to 3.9.5
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.4 to 3.9.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.4...3.9.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.5
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 12:33:13 +00:00
Joel Wetzell 8678e8a07c Merge pull request #249 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.62.0
Bump typescript-eslint from 8.61.0 to 8.62.0
2026-07-09 14:03:48 -05:00
dependabot[bot] a11c137bed Bump typescript-eslint from 8.61.0 to 8.62.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.61.0 to 8.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.62.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.62.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-29 12:33:40 +00:00
Joel Wetzell 3410f72873 bump version 2026-06-21 12:56:37 -05:00
Joel Wetzell 7a9c414785 Merge pull request #241 from jwetzell/dependabot/npm_and_yarn/eslint-10.5.0 2026-06-21 10:41:59 -05:00
Joel Wetzell 3556fb7eb6 Merge pull request #242 from jwetzell/dependabot/npm_and_yarn/prettier-3.8.4 2026-06-21 10:41:46 -05:00
Joel Wetzell 063e0612ea Merge pull request #243 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.61.0 2026-06-21 10:41:34 -05:00
dependabot[bot] 5d4eb92204 Bump typescript-eslint from 8.60.1 to 8.61.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.60.1 to 8.61.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.61.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.61.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 12:33:48 +00:00
dependabot[bot] 45a672c89f Bump prettier from 3.8.3 to 3.8.4
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.3 to 3.8.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.3...3.8.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 12:33:34 +00:00
dependabot[bot] 848d8c2f21 Bump eslint from 10.4.1 to 10.5.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.4.1 to 10.5.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.4.1...v10.5.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 12:33:27 +00:00
Joel Wetzell c2b0047748 Merge pull request #240 from jwetzell/dependabot/npm_and_yarn/tsdown-0.22.2
Bump tsdown from 0.22.1 to 0.22.2
2026-06-10 11:26:57 -05:00
dependabot[bot] 964c87c555 Bump tsdown from 0.22.1 to 0.22.2
Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.22.1...v0.22.2)

---
updated-dependencies:
- dependency-name: tsdown
  dependency-version: 0.22.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 12:33:29 +00:00
Joel Wetzell 6b0605769b Merge pull request #236 from jwetzell/dependabot/npm_and_yarn/tsdown-0.22.1
Bump tsdown from 0.22.0 to 0.22.1
2026-06-03 21:15:41 -05:00
Joel Wetzell f7572ebcc4 Merge pull request #237 from jwetzell/dependabot/npm_and_yarn/eslint-plugin-prettier-5.5.6
Bump eslint-plugin-prettier from 5.5.5 to 5.5.6
2026-06-03 21:15:25 -05:00
Joel Wetzell afc9ca250a Merge pull request #238 from jwetzell/dependabot/npm_and_yarn/eslint-10.4.1
Bump eslint from 10.4.0 to 10.4.1
2026-06-03 21:15:13 -05:00
Joel Wetzell 868c32f2c0 Merge pull request #239 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.60.1
Bump typescript-eslint from 8.60.0 to 8.60.1
2026-06-03 21:15:01 -05:00
dependabot[bot] 156de1ecb4 Bump typescript-eslint from 8.60.0 to 8.60.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.60.0 to 8.60.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.60.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.60.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 12:30:13 +00:00
dependabot[bot] 87bc731cb7 Bump eslint from 10.4.0 to 10.4.1
Bumps [eslint](https://github.com/eslint/eslint) from 10.4.0 to 10.4.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.4.0...v10.4.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.4.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 12:29:59 +00:00
dependabot[bot] 61208d8696 Bump eslint-plugin-prettier from 5.5.5 to 5.5.6
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.5.5 to 5.5.6.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.5.5...v5.5.6)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 12:29:51 +00:00
dependabot[bot] ae4eb8cc44 Bump tsdown from 0.22.0 to 0.22.1
Bumps [tsdown](https://github.com/rolldown/tsdown) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](https://github.com/rolldown/tsdown/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: tsdown
  dependency-version: 0.22.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 12:29:44 +00:00
Joel Wetzell af7b465971 Merge pull request #235 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.60.0
Bump typescript-eslint from 8.59.4 to 8.60.0
2026-05-27 15:29:15 -05:00
dependabot[bot] 5b3a526bb3 Bump typescript-eslint from 8.59.4 to 8.60.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.59.4 to 8.60.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.60.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.60.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 18:30:50 +00:00
Joel Wetzell 41397c22e4 Merge pull request #233 from jwetzell/dependabot/npm_and_yarn/eslint-10.4.0
Bump eslint from 10.3.0 to 10.4.0
2026-05-19 14:29:09 -05:00
Joel Wetzell 76b0ed3353 Merge pull request #234 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.59.4
Bump typescript-eslint from 8.59.3 to 8.59.4
2026-05-19 14:28:53 -05:00
dependabot[bot] 928843ff14 Bump typescript-eslint from 8.59.3 to 8.59.4
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.59.3 to 8.59.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.4/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.59.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-18 22:12:35 +00:00
dependabot[bot] 48b9e6286a Bump eslint from 10.3.0 to 10.4.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.3.0...v10.4.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-18 22:12:23 +00:00
Joel Wetzell 720785fffa update node 2026-05-15 12:08:17 -05:00
Joel Wetzell 9d534161dd Merge pull request #224 from jwetzell/dependabot/npm_and_yarn/typescript-6.0.3
Bump typescript from 5.9.3 to 6.0.3
2026-05-15 12:07:56 -05:00
Joel Wetzell 69209e51a0 switch tests to mjs 2026-05-15 12:04:27 -05:00
dependabot[bot] 075c66c0c4 Bump typescript from 5.9.3 to 6.0.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.3
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-15 16:58:40 +00:00
Joel Wetzell ef9e364e80 Merge pull request #232 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.59.3
Bump typescript-eslint from 8.59.1 to 8.59.3
2026-05-15 11:57:24 -05:00
Joel Wetzell b0bd30cf3b switch build to tsdown 2026-05-15 11:57:01 -05:00
dependabot[bot] 293309c225 Bump typescript-eslint from 8.59.1 to 8.59.3
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.59.1 to 8.59.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.3/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.59.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 19:43:23 +00:00
Joel Wetzell bb78037ca2 Merge pull request #231 from jwetzell/dependabot/npm_and_yarn/eslint-10.3.0
Bump eslint from 10.2.1 to 10.3.0
2026-05-06 08:26:42 -05:00
Joel Wetzell b51f286334 Merge pull request #230 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.59.1
Bump typescript-eslint from 8.58.2 to 8.59.1
2026-05-06 08:26:33 -05:00
Joel Wetzell 974d45827e Merge pull request #229 from jwetzell/dependabot/npm_and_yarn/globals-17.6.0
Bump globals from 17.5.0 to 17.6.0
2026-05-06 08:26:23 -05:00
dependabot[bot] a57995e999 Bump eslint from 10.2.1 to 10.3.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.2.1 to 10.3.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.2.1...v10.3.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 15:56:11 +00:00
dependabot[bot] dffe8fda60 Bump typescript-eslint from 8.58.2 to 8.59.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.58.2 to 8.59.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.59.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.59.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 15:53:38 +00:00
dependabot[bot] 4c95cc38c9 Bump globals from 17.5.0 to 17.6.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.5.0 to 17.6.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.5.0...v17.6.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-04 15:53:24 +00:00
Joel Wetzell 60fc6989de Merge pull request #225 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.58.2
Bump typescript-eslint from 8.58.1 to 8.58.2
2026-04-27 08:53:06 -05:00
Joel Wetzell ea1e789ed7 Merge pull request #226 from jwetzell/dependabot/npm_and_yarn/prettier-3.8.3
Bump prettier from 3.8.2 to 3.8.3
2026-04-27 08:52:59 -05:00
Joel Wetzell ed10affeab Merge pull request #227 from jwetzell/dependabot/npm_and_yarn/eslint-10.2.1
Bump eslint from 10.2.0 to 10.2.1
2026-04-27 08:52:50 -05:00
dependabot[bot] c877780d43 Bump eslint from 10.2.0 to 10.2.1
Bumps [eslint](https://github.com/eslint/eslint) from 10.2.0 to 10.2.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.2.0...v10.2.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.2.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 14:29:14 +00:00
dependabot[bot] 6ed1ee75fb Bump prettier from 3.8.2 to 3.8.3
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.2...3.8.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 14:29:07 +00:00
dependabot[bot] 491ad74761 Bump typescript-eslint from 8.58.1 to 8.58.2
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.58.1 to 8.58.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.58.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 14:29:00 +00:00
Joel Wetzell 1d5d03016e Merge pull request #221 from jwetzell/dependabot/npm_and_yarn/globals-17.5.0
Bump globals from 17.4.0 to 17.5.0
2026-04-13 08:43:00 -05:00
dependabot[bot] a0db39f0f1 Bump globals from 17.4.0 to 17.5.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.4.0 to 17.5.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.4.0...v17.5.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 13:40:55 +00:00
Joel Wetzell e249715f44 Merge pull request #222 from jwetzell/dependabot/npm_and_yarn/prettier-3.8.2
Bump prettier from 3.8.1 to 3.8.2
2026-04-13 08:39:54 -05:00
Joel Wetzell e1b30b617c Merge pull request #223 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.58.1
Bump typescript-eslint from 8.58.0 to 8.58.1
2026-04-13 08:39:46 -05:00
dependabot[bot] 69b62cea24 Bump typescript-eslint from 8.58.0 to 8.58.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.58.0 to 8.58.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.58.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 13:21:00 +00:00
dependabot[bot] c03953ac7f Bump prettier from 3.8.1 to 3.8.2
Bumps [prettier](https://github.com/prettier/prettier) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.1...3.8.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 13:20:46 +00:00
Joel Wetzell 999177854a Merge pull request #219 from jwetzell/dependabot/npm_and_yarn/eslint-10.2.0
Bump eslint from 10.1.0 to 10.2.0
2026-04-06 11:29:11 -05:00
Joel Wetzell e7c19f11c3 Merge pull request #220 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.58.0
Bump typescript-eslint from 8.57.2 to 8.58.0
2026-04-06 11:29:00 -05:00
dependabot[bot] 188276eb26 Bump typescript-eslint from 8.57.2 to 8.58.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.57.2 to 8.58.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.58.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 12:34:30 +00:00
dependabot[bot] d47e4b6525 Bump eslint from 10.1.0 to 10.2.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.1.0...v10.2.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-06 12:34:18 +00:00
Joel Wetzell c22fa93c32 Merge pull request #218 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.57.2
Bump typescript-eslint from 8.57.1 to 8.57.2
2026-03-30 12:22:15 -05:00
dependabot[bot] 3972b872ea Bump typescript-eslint from 8.57.1 to 8.57.2
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.57.1 to 8.57.2.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.2/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.57.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 13:17:25 +00:00
Joel Wetzell bfb4d06a27 Merge pull request #215 from jwetzell/dependabot/npm_and_yarn/eslint-10.1.0
Bump eslint from 10.0.3 to 10.1.0
2026-03-23 11:19:38 -05:00
Joel Wetzell 6b8e88f685 Merge pull request #216 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.57.1
Bump typescript-eslint from 8.57.0 to 8.57.1
2026-03-23 11:19:28 -05:00
dependabot[bot] 5c9053c49b Bump typescript-eslint from 8.57.0 to 8.57.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.57.0 to 8.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.57.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-23 12:34:44 +00:00
dependabot[bot] 460a3a4c0a Bump eslint from 10.0.3 to 10.1.0
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.0.3...v10.1.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-23 12:34:30 +00:00
Joel Wetzell 2c56132816 Merge pull request #214 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.57.0
Bump typescript-eslint from 8.56.1 to 8.57.0
2026-03-17 12:08:56 -05:00
dependabot[bot] c1fa93e7f3 Bump typescript-eslint from 8.56.1 to 8.57.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.56.1 to 8.57.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.57.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.57.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-16 12:34:48 +00:00
Joel Wetzell b2a82b3291 Merge pull request #213 from jwetzell/dependabot/npm_and_yarn/eslint-10.0.3
Bump eslint from 10.0.2 to 10.0.3
2026-03-11 10:10:22 -05:00
dependabot[bot] 3e7339f857 Bump eslint from 10.0.2 to 10.0.3
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.0.2...v10.0.3)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 12:59:55 +00:00
Joel Wetzell 349a068605 Merge pull request #204 from jwetzell/dependabot/npm_and_yarn/eslint/js-10.0.1
Bump @eslint/js from 9.39.2 to 10.0.1
2026-03-03 08:46:27 -06:00
dependabot[bot] d673d8e1b5 Bump @eslint/js from 9.39.2 to 10.0.1
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.39.2 to 10.0.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/HEAD/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 14:45:26 +00:00
Joel Wetzell 376b406756 Merge pull request #211 from jwetzell/dependabot/npm_and_yarn/eslint-10.0.2
Bump eslint from 9.18.0 to 10.0.2
2026-03-03 08:44:16 -06:00
Joel Wetzell c16645b08d Update check-build.yml 2026-03-03 08:39:30 -06:00
dependabot[bot] 76581a3361 Bump eslint from 9.18.0 to 10.0.2
Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 10.0.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v10.0.2)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-03 14:36:07 +00:00
Joel Wetzell 70af26b977 Merge pull request #210 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.56.1
Bump typescript-eslint from 8.55.0 to 8.56.1
2026-03-03 08:35:11 -06:00
Joel Wetzell 5c36bff9d8 Merge pull request #212 from jwetzell/dependabot/npm_and_yarn/globals-17.4.0
Bump globals from 17.3.0 to 17.4.0
2026-03-03 08:35:01 -06:00
dependabot[bot] 1e83eada7f Bump globals from 17.3.0 to 17.4.0
Bumps [globals](https://github.com/sindresorhus/globals) from 17.3.0 to 17.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 13:18:50 +00:00
dependabot[bot] 9e8fd7a328 Bump typescript-eslint from 8.55.0 to 8.56.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.55.0 to 8.56.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.56.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.56.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 13:18:36 +00:00
Joel Wetzell 99fd068dac Merge pull request #205 from jwetzell/dependabot/npm_and_yarn/rimraf-6.1.3
Bump rimraf from 6.1.2 to 6.1.3
2026-02-16 11:57:52 -06:00
Joel Wetzell 6abbf34919 Merge pull request #207 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.55.0
Bump typescript-eslint from 8.54.0 to 8.55.0
2026-02-16 11:57:43 -06:00
dependabot[bot] 0a869e0380 Bump typescript-eslint from 8.54.0 to 8.55.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.54.0 to 8.55.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.55.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.55.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 13:36:16 +00:00
dependabot[bot] acde66f68c Bump rimraf from 6.1.2 to 6.1.3
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.2 to 6.1.3.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.1.2...v6.1.3)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 13:35:55 +00:00
Joel Wetzell bcc211025a Merge pull request #200 from jwetzell/dependabot/npm_and_yarn/prettier-3.8.1
Bump prettier from 3.7.4 to 3.8.1
2026-02-02 09:36:51 -06:00
Joel Wetzell 3c3ee7c843 Merge pull request #196 from jwetzell/dependabot/npm_and_yarn/eslint-plugin-prettier-5.5.5
Bump eslint-plugin-prettier from 5.5.4 to 5.5.5
2026-02-02 09:36:45 -06:00
dependabot[bot] afe35e46ab Bump prettier from 3.7.4 to 3.8.1
Bumps [prettier](https://github.com/prettier/prettier) from 3.7.4 to 3.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 15:33:09 +00:00
dependabot[bot] 4ad2aee7d1 Bump eslint-plugin-prettier from 5.5.4 to 5.5.5
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.5.4 to 5.5.5.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.5.4...v5.5.5)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-version: 5.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 15:33:09 +00:00
Joel Wetzell 6f11dafa39 Merge pull request #202 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.54.0
Bump typescript-eslint from 8.50.0 to 8.54.0
2026-02-02 09:32:06 -06:00
Joel Wetzell efa8aa1975 Merge pull request #203 from jwetzell/dependabot/npm_and_yarn/globals-17.3.0
Bump globals from 16.5.0 to 17.3.0
2026-02-02 09:31:54 -06:00
dependabot[bot] b337c02aa3 Bump globals from 16.5.0 to 17.3.0
Bumps [globals](https://github.com/sindresorhus/globals) from 16.5.0 to 17.3.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.5.0...v17.3.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 13:55:28 +00:00
dependabot[bot] 1b4fc1fbf5 Bump typescript-eslint from 8.50.0 to 8.54.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.50.0 to 8.54.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.54.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.54.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-02 13:55:20 +00:00
Joel Wetzell a086e394dc Merge pull request #190 from jwetzell/dependabot/npm_and_yarn/eslint/js-9.39.2
Bump @eslint/js from 9.39.1 to 9.39.2
2025-12-23 14:19:37 -06:00
Joel Wetzell 9c83da1aa7 Merge pull request #191 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.50.0
Bump typescript-eslint from 8.48.1 to 8.50.0
2025-12-23 14:19:28 -06:00
dependabot[bot] df9631c48d Bump typescript-eslint from 8.48.1 to 8.50.0
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.48.1 to 8.50.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.50.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-22 12:07:15 +00:00
dependabot[bot] a0b95903a5 Bump @eslint/js from 9.39.1 to 9.39.2
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.39.1 to 9.39.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.2/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 12:10:17 +00:00
Joel Wetzell 52ed1a1134 Merge pull request #184 from jwetzell/dependabot/npm_and_yarn/rimraf-6.1.2
Bump rimraf from 6.1.0 to 6.1.2
2025-12-11 15:03:49 -06:00
dependabot[bot] f54c3e202b Bump rimraf from 6.1.0 to 6.1.2
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.0 to 6.1.2.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.1.0...v6.1.2)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-11 21:02:40 +00:00
Joel Wetzell 3292f20449 Merge pull request #187 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.48.1
Bump typescript-eslint from 8.46.4 to 8.48.1
2025-12-11 15:01:42 -06:00
Joel Wetzell 4b63f5d6f3 Merge pull request #188 from jwetzell/dependabot/npm_and_yarn/prettier-3.7.4
Bump prettier from 3.6.2 to 3.7.4
2025-12-11 15:01:31 -06:00
dependabot[bot] a2dfb93086 Bump prettier from 3.6.2 to 3.7.4
Bumps [prettier](https://github.com/prettier/prettier) from 3.6.2 to 3.7.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.6.2...3.7.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.7.4
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 12:09:57 +00:00
dependabot[bot] 4e49d5fca2 Bump typescript-eslint from 8.46.4 to 8.48.1
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.46.4 to 8.48.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.48.1/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.48.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-08 12:09:50 +00:00
Joel Wetzell c87d472a10 Merge pull request #171 from jwetzell/dependabot/npm_and_yarn/typescript-5.9.3
Bump typescript from 5.9.2 to 5.9.3
2025-11-17 08:59:59 -06:00
dependabot[bot] 94906dce03 Bump typescript from 5.9.2 to 5.9.3
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.2 to 5.9.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.2...v5.9.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 14:58:09 +00:00
jwetzell 7a7d2e2526 Merge pull request #182 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.46.4
Bump typescript-eslint from 8.46.3 to 8.46.4
2025-11-17 08:34:26 -06:00
dependabot[bot] 315e685fab Bump typescript-eslint from 8.46.3 to 8.46.4
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.46.3 to 8.46.4.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.4/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.46.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-17 12:16:15 +00:00
jwetzell 98dd7c4a35 Merge pull request #179 from jwetzell/dependabot/npm_and_yarn/typescript-eslint-8.46.3
Bump typescript-eslint from 8.46.0 to 8.46.3
2025-11-13 14:27:27 -06:00
jwetzell c2c13865c3 Merge pull request #180 from jwetzell/dependabot/npm_and_yarn/globals-16.5.0
Bump globals from 16.4.0 to 16.5.0
2025-11-13 14:27:17 -06:00
jwetzell b65f48ce92 Merge pull request #181 from jwetzell/dependabot/npm_and_yarn/eslint/js-9.39.1
Bump @eslint/js from 9.34.0 to 9.39.1
2025-11-13 14:27:09 -06:00
dependabot[bot] 2145f2a965 Bump @eslint/js from 9.34.0 to 9.39.1
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.34.0 to 9.39.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.39.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.39.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 14:00:09 +00:00
dependabot[bot] c184273d34 Bump globals from 16.4.0 to 16.5.0
Bumps [globals](https://github.com/sindresorhus/globals) from 16.4.0 to 16.5.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.4.0...v16.5.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.5.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 14:00:03 +00:00
dependabot[bot] c799f2d75b Bump typescript-eslint from 8.46.0 to 8.46.3
Bumps [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) from 8.46.0 to 8.46.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.3/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: typescript-eslint
  dependency-version: 8.46.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-10 13:59:57 +00:00
jwetzell 839d523953 Merge pull request #177 from jwetzell/dependabot/npm_and_yarn/rimraf-6.1.0
Bump rimraf from 6.0.1 to 6.1.0
2025-11-08 11:01:17 -06:00
dependabot[bot] d42d78a04d Bump rimraf from 6.0.1 to 6.1.0
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.0.1 to 6.1.0.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 12:14:37 +00:00
73 changed files with 4192 additions and 4096 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ on:
branches: branches:
- main - main
jobs: jobs:
build-psn: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository
+1 -1
View File
@@ -1 +1 @@
v24.10.0 v24.15.0
-2
View File
@@ -1,2 +0,0 @@
*.md
*.min.*
-8
View File
@@ -1,8 +0,0 @@
module.exports = {
trailingComma: 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
bracketSameLine: true,
printWidth: 120,
};
+1 -3
View File
@@ -1,8 +1,6 @@
{ {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll": "explicit", "source.fixAll": "explicit"
"source.organizeImports": "explicit"
} }
} }
+35
View File
@@ -0,0 +1,35 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
-13
View File
@@ -1,13 +0,0 @@
import pluginJs from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
];
+9 -6
View File
@@ -3,14 +3,17 @@ const { Decoder } = require('../dist/cjs');
const decoder = new Decoder(); const decoder = new Decoder();
const infoPacketBuffer = new Uint8Array([ const infoPacketBuffer = new Uint8Array([
0x56, 0x67, 0x34, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x01, 0x56, 0x67, 0x34, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0x0b, 0x00, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x0b, 0x00, 0x53, 0x65,
0x80, 0x01, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x09, 0x00, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x20, 0x31, 0x72, 0x76, 0x65, 0x72, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x02, 0x00, 0x11, 0x80,
0x01, 0x00, 0x0d, 0x80, 0x00, 0x00, 0x09, 0x00, 0x54, 0x72, 0x61, 0x63, 0x6b,
0x65, 0x72, 0x20, 0x31,
]); ]);
const dataPacketBuffer = new Uint8Array([ const dataPacketBuffer = new Uint8Array([
0x55, 0x67, 0x28, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x01, 0x55, 0x67, 0x28, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
0x01, 0x01, 0x00, 0x14, 0x80, 0x01, 0x00, 0x10, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x01, 0x01, 0x01, 0x00, 0x14, 0x80, 0x01, 0x00,
0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x10, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80,
0x3f, 0x00, 0x00, 0x80, 0x3f,
]); ]);
decoder.decode(infoPacketBuffer); decoder.decode(infoPacketBuffer);
+17 -7
View File
@@ -1,6 +1,6 @@
// recreation of psn_client.cpp example from https://github.com/vyv/psn-cpp // recreation of psn_client.cpp example from https://github.com/vyv/psn-cpp
const dgram = require('dgram'); const dgram = require('node:dgram');
const { Decoder } = require('../dist/cjs'); const { Decoder } = require('@jwetzell/posistagenet');
const client = dgram.createSocket('udp4'); const client = dgram.createSocket('udp4');
const decoder = new Decoder(); const decoder = new Decoder();
@@ -26,15 +26,21 @@ setInterval(() => {
const trackerName = decoder.trackers[trackerId]?.name; const trackerName = decoder.trackers[trackerId]?.name;
console.log(`Tracker - id: ${trackerId} | name: ${trackerName || ''}`); console.log(`Tracker - id: ${trackerId} | name: ${trackerName || ''}`);
if (tracker.pos) { if (tracker.pos) {
console.log(`\tpos: ${tracker.pos.x}, ${tracker.pos.x}, ${tracker.pos.x}`); console.log(
`\tpos: ${tracker.pos.x}, ${tracker.pos.x}, ${tracker.pos.x}`
);
} }
if (tracker.speed) { if (tracker.speed) {
console.log(`\tspeed: ${tracker.speed.x}, ${tracker.speed.y}, ${tracker.speed.z}`); console.log(
`\tspeed: ${tracker.speed.x}, ${tracker.speed.y}, ${tracker.speed.z}`
);
} }
if (tracker.ori) { if (tracker.ori) {
console.log(`\tori: ${tracker.ori.x}, ${tracker.ori.y}, ${tracker.ori.z}`); console.log(
`\tori: ${tracker.ori.x}, ${tracker.ori.y}, ${tracker.ori.z}`
);
} }
if (tracker.status) { if (tracker.status) {
@@ -42,11 +48,15 @@ setInterval(() => {
} }
if (tracker.accel) { if (tracker.accel) {
console.log(`\taccel: ${tracker.accel.x}, ${tracker.accel.y}, ${tracker.accel.z}`); console.log(
`\taccel: ${tracker.accel.x}, ${tracker.accel.y}, ${tracker.accel.z}`
);
} }
if (tracker.trgtpos) { if (tracker.trgtpos) {
console.log(`\ttrgtpos: ${tracker.trgtpos.x}, ${tracker.trgtpos.y}, ${tracker.trgtpos.z}`); console.log(
`\ttrgtpos: ${tracker.trgtpos.x}, ${tracker.trgtpos.y}, ${tracker.trgtpos.z}`
);
} }
if (tracker.timestamp) { if (tracker.timestamp) {
+6 -4
View File
@@ -1,6 +1,6 @@
// recreation of psn_server.cpp example from https://github.com/vyv/psn-cpp // recreation of psn_server.cpp example from https://github.com/vyv/psn-cpp
const dgram = require('dgram'); const dgram = require('node:dgram');
const { Encoder, Tracker } = require('../dist/cjs'); const { Encoder, Tracker } = require('@jwetzell/posistagenet');
const client = dgram.createSocket('udp4'); const client = dgram.createSocket('udp4');
const encoder = new Encoder('Test PSN Server', 2, 0); const encoder = new Encoder('Test PSN Server', 2, 0);
@@ -19,11 +19,13 @@ trackers.push(new Tracker(8, 'Neptune'));
trackers.push(new Tracker(9, 'Pluto')); trackers.push(new Tracker(9, 'Pluto'));
const orbits = [1.0, 88.0, 224.7, 365.2, 687, 4332, 10760, 30700, 60200, 90600]; const orbits = [1.0, 88.0, 224.7, 365.2, 687, 4332, 10760, 30700, 60200, 90600];
const distFromSun = [0, 0.58, 1.08, 1.5, 2.28, 7.78, 14.29, 28.71, 45.04, 59.13]; const distFromSun = [
0, 0.58, 1.08, 1.5, 2.28, 7.78, 14.29, 28.71, 45.04, 59.13,
];
let timestamp = 0; let timestamp = 0;
setInterval(() => { setInterval(() => {
orbits.forEach((orbit, index) => { orbits.forEach((_, index) => {
const a = 1.0 / orbits[index]; const a = 1.0 / orbits[index];
const b = distFromSun[index]; const b = distFromSun[index];
const x = timestamp; const x = timestamp;
+1662 -1878
View File
File diff suppressed because it is too large Load Diff
+19 -24
View File
@@ -1,29 +1,27 @@
{ {
"name": "@jwetzell/posistagenet", "name": "@jwetzell/posistagenet",
"version": "2.1.1", "version": "2.1.2",
"description": "", "description": "",
"main": "./dist/cjs/index.js", "main": "./dist/index.cjs",
"module": "./dist/esm/index.js", "module": "./dist/index.mjs",
"types": "./dist/types/index.d.ts", "types": "./dist/index.d.cts",
"exports": { "exports": {
".": { ".": {
"import": "./dist/esm/index.js", "import": "./dist/index.mjs",
"require": "./dist/cjs/index.js", "require": "./dist/index.cjs"
"types": "./dist/types/index.d.ts" },
} "./package.json": "./package.json"
}, },
"scripts": { "scripts": {
"prebuild": "rimraf dist", "prebuild": "rimraf dist",
"build": "npm run build:cjs && npm run build:esm && npm run build:types", "build": "tsdown",
"build:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json",
"build:esm": "tsc -p tsconfig.esm.json && echo '{\"type\": \"module\"}' > dist/esm/package.json",
"build:types": "tsc -p tsconfig.types.json",
"example:client": "node examples/psn_client.js", "example:client": "node examples/psn_client.js",
"example:server": "node examples/psn_server.js", "example:server": "node examples/psn_server.js",
"prepublishOnly": "npm run build", "prepublishOnly": "npm run build",
"lint:check": "eslint ./src", "lint:check": "biome lint",
"format:check": "prettier ./ --check", "lint:write": "biome lint --write",
"format:write": "prettier ./ --write", "format:check": "biome format",
"format:write": "biome format --write",
"pretest": "npm run build", "pretest": "npm run build",
"test": "node --test --experimental-test-coverage" "test": "node --test --experimental-test-coverage"
}, },
@@ -38,15 +36,12 @@
"repository": "https://github.com/jwetzell/psn-js", "repository": "https://github.com/jwetzell/psn-js",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@eslint/js": "9.34.0", "@biomejs/biome": "2.5.7",
"@eslint/js": "10.0.1",
"@types/node": "24.7.2", "@types/node": "24.7.2",
"eslint": "9.18.0", "globals": "17.9.0",
"eslint-config-prettier": "10.1.8", "rimraf": "6.1.3",
"eslint-plugin-prettier": "5.5.4", "tsdown": "0.22.14",
"globals": "16.4.0", "typescript": "7.0.2"
"prettier": "3.6.2",
"rimraf": "6.0.1",
"typescript": "5.9.2",
"typescript-eslint": "8.46.0"
} }
} }
+32 -13
View File
@@ -1,5 +1,11 @@
import { Decoders } from './index.js'; import { Decoders } from './index.js';
import { DataPacketChunk, InfoPacketChunk, Tracker, TrackerFromData, TrackerFromInfo } from './models/index.js'; import {
type DataPacketChunk,
type InfoPacketChunk,
type Tracker,
TrackerFromData,
TrackerFromInfo,
} from './models/index.js';
export class Decoder { export class Decoder {
infoPacketFrames: { [key: number]: InfoPacketChunk[] } = {}; infoPacketFrames: { [key: number]: InfoPacketChunk[] } = {};
@@ -9,7 +15,6 @@ export class Decoder {
trackers: { [key: string]: Tracker } = {}; trackers: { [key: string]: Tracker } = {};
systemName: string = ''; systemName: string = '';
constructor() {}
updateInfo(framePackets: InfoPacketChunk[]) { updateInfo(framePackets: InfoPacketChunk[]) {
framePackets.forEach((packet) => { framePackets.forEach((packet) => {
@@ -58,7 +63,7 @@ export class Decoder {
if (packet.header.id === 0x6756) { if (packet.header.id === 0x6756) {
const infoPacket = Decoders.InfoPacketChunk(packetBuf); const infoPacket = Decoders.InfoPacketChunk(packetBuf);
if (infoPacket && infoPacket.chunk.header.hasSubchunks) { if (infoPacket?.chunk.header.hasSubchunks) {
const currentInfoPacketHeader = infoPacket.data.packetHeader; const currentInfoPacketHeader = infoPacket.data.packetHeader;
if (!currentInfoPacketHeader) { if (!currentInfoPacketHeader) {
// NOTE(jwetzell): not sure that info packets without a header subchunk are valid? // NOTE(jwetzell): not sure that info packets without a header subchunk are valid?
@@ -71,16 +76,23 @@ export class Decoder {
throw new Error('malformed packet'); throw new Error('malformed packet');
} }
if (currentInfoPacketHeader.data.frameId) { if (currentInfoPacketHeader.data.frameId) {
if (this.infoPacketFrames[currentInfoPacketHeader.data.frameId] === undefined) { if (
this.infoPacketFrames[currentInfoPacketHeader.data.frameId] ===
undefined
) {
this.infoPacketFrames[currentInfoPacketHeader.data.frameId] = []; this.infoPacketFrames[currentInfoPacketHeader.data.frameId] = [];
} }
this.infoPacketFrames[currentInfoPacketHeader.data.frameId].push(infoPacket); this.infoPacketFrames[currentInfoPacketHeader.data.frameId].push(
infoPacket
);
if ( if (
this.infoPacketFrames[currentInfoPacketHeader.data.frameId].length === this.infoPacketFrames[currentInfoPacketHeader.data.frameId]
currentInfoPacketHeader.data.framePacketCount .length === currentInfoPacketHeader.data.framePacketCount
) { ) {
this.updateInfo(this.infoPacketFrames[currentInfoPacketHeader.data.frameId]); this.updateInfo(
this.infoPacketFrames[currentInfoPacketHeader.data.frameId]
);
delete this.infoPacketFrames[currentInfoPacketHeader.data.frameId]; delete this.infoPacketFrames[currentInfoPacketHeader.data.frameId];
} }
} }
@@ -95,15 +107,22 @@ export class Decoder {
} }
if (currentDataPacketHeader.data.frameId) { if (currentDataPacketHeader.data.frameId) {
if (this.dataPacketFrames[currentDataPacketHeader.data.frameId] === undefined) { if (
this.dataPacketFrames[currentDataPacketHeader.data.frameId] ===
undefined
) {
this.dataPacketFrames[currentDataPacketHeader.data.frameId] = []; this.dataPacketFrames[currentDataPacketHeader.data.frameId] = [];
} }
this.dataPacketFrames[currentDataPacketHeader.data.frameId].push(dataPacket); this.dataPacketFrames[currentDataPacketHeader.data.frameId].push(
dataPacket
);
if ( if (
this.dataPacketFrames[currentDataPacketHeader.data.frameId].length === this.dataPacketFrames[currentDataPacketHeader.data.frameId]
currentDataPacketHeader.data.framePacketCount .length === currentDataPacketHeader.data.framePacketCount
) { ) {
this.updateData(this.dataPacketFrames[currentDataPacketHeader.data.frameId]); this.updateData(
this.dataPacketFrames[currentDataPacketHeader.data.frameId]
);
delete this.dataPacketFrames[currentDataPacketHeader.data.frameId]; delete this.dataPacketFrames[currentDataPacketHeader.data.frameId];
} }
} }
+4 -2
View File
@@ -1,4 +1,4 @@
import { Chunk } from '../models/chunk.js'; import type { Chunk } from '../models/chunk.js';
export default (buffer: Uint8Array): Chunk => { export default (buffer: Uint8Array): Chunk => {
if (buffer.length < 4) { if (buffer.length < 4) {
@@ -10,7 +10,9 @@ export default (buffer: Uint8Array): Chunk => {
// NOTE(jwetzell): this data is split up as 1 bit for hasSubchunks and 15 bits for the dataLen // NOTE(jwetzell): this data is split up as 1 bit for hasSubchunks and 15 bits for the dataLen
const combinedLengthAndFlag = (buffer[3] << 8) + buffer[2]; const combinedLengthAndFlag = (buffer[3] << 8) + buffer[2];
const hasSubchunks = combinedLengthAndFlag > 32768; const hasSubchunks = combinedLengthAndFlag > 32768;
const dataLen = hasSubchunks ? combinedLengthAndFlag - 32768 : combinedLengthAndFlag; const dataLen = hasSubchunks
? combinedLengthAndFlag - 32768
: combinedLengthAndFlag;
const header = { const header = {
id, id,
+13 -4
View File
@@ -1,5 +1,8 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { DataPacketChunk, DataPacketChunkData } from '../../models/data/data-packet-chunk.js'; import type {
DataPacketChunk,
DataPacketChunkData,
} from '../../models/data/data-packet-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataPacketChunk => { export default (buffer: Uint8Array): DataPacketChunk => {
@@ -10,17 +13,23 @@ export default (buffer: Uint8Array): DataPacketChunk => {
if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) { if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) {
let offset = 0; let offset = 0;
while (offset < chunk.header.dataLen) { while (offset < chunk.header.dataLen) {
const chunkId = (chunk.chunkData.subarray(offset)[1] << 8) + chunk.chunkData.subarray(offset)[0]; const chunkId =
(chunk.chunkData.subarray(offset)[1] << 8) +
chunk.chunkData.subarray(offset)[0];
switch (chunkId) { switch (chunkId) {
case 0x0000: case 0x0000:
data.packetHeader = Decoders.PacketHeaderChunk(chunk.chunkData.subarray(offset)); data.packetHeader = Decoders.PacketHeaderChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.packetHeader.chunk.header.dataLen) { if (data.packetHeader.chunk.header.dataLen) {
offset += data.packetHeader.chunk.header.dataLen; offset += data.packetHeader.chunk.header.dataLen;
} }
break; break;
case 0x0001: case 0x0001:
data.trackerList = Decoders.DataTrackerListChunk(chunk.chunkData.subarray(offset)); data.trackerList = Decoders.DataTrackerListChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.trackerList.chunk.header.dataLen) { if (data.trackerList.chunk.header.dataLen) {
offset += data.trackerList.chunk.header.dataLen; offset += data.trackerList.chunk.header.dataLen;
+28 -9
View File
@@ -1,5 +1,8 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { DataTrackerChunk, DataTrackerChunkData } from '../../models/data/data-tracker-chunk.js'; import type {
DataTrackerChunk,
DataTrackerChunkData,
} from '../../models/data/data-tracker-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataTrackerChunk => { export default (buffer: Uint8Array): DataTrackerChunk => {
@@ -8,28 +11,44 @@ export default (buffer: Uint8Array): DataTrackerChunk => {
if (chunk.chunkData && chunk.header.dataLen) { if (chunk.chunkData && chunk.header.dataLen) {
let offset = 0; let offset = 0;
while (offset < chunk.header.dataLen) { while (offset < chunk.header.dataLen) {
const trackerFieldChunk = Decoders.Chunk(chunk.chunkData.subarray(offset)); const trackerFieldChunk = Decoders.Chunk(
chunk.chunkData.subarray(offset)
);
switch (trackerFieldChunk.header.id) { switch (trackerFieldChunk.header.id) {
case 0x0000: case 0x0000:
data.pos = Decoders.DataTrackerXYZChunk(chunk.chunkData.subarray(offset)); data.pos = Decoders.DataTrackerXYZChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0001: case 0x0001:
data.speed = Decoders.DataTrackerXYZChunk(chunk.chunkData.subarray(offset)); data.speed = Decoders.DataTrackerXYZChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0002: case 0x0002:
data.ori = Decoders.DataTrackerXYZChunk(chunk.chunkData.subarray(offset)); data.ori = Decoders.DataTrackerXYZChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0003: case 0x0003:
data.status = Decoders.DataTrackerStatusChunk(chunk.chunkData.subarray(offset)); data.status = Decoders.DataTrackerStatusChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0004: case 0x0004:
data.accel = Decoders.DataTrackerXYZChunk(chunk.chunkData.subarray(offset)); data.accel = Decoders.DataTrackerXYZChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0005: case 0x0005:
data.trgtpos = Decoders.DataTrackerXYZChunk(chunk.chunkData.subarray(offset)); data.trgtpos = Decoders.DataTrackerXYZChunk(
chunk.chunkData.subarray(offset)
);
break; break;
case 0x0006: case 0x0006:
data.timestamp = Decoders.DataTrackerTimestampChunk(chunk.chunkData.subarray(offset)); data.timestamp = Decoders.DataTrackerTimestampChunk(
chunk.chunkData.subarray(offset)
);
break; break;
default: default:
break; break;
+8 -3
View File
@@ -1,6 +1,9 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { DataTrackerListChunk, DataTrackerListChunkData } from '../../models/data/data-tracker-list-chunk.js'; import type {
import { DataTrackerChunk } from '../../models/index.js'; DataTrackerListChunk,
DataTrackerListChunkData,
} from '../../models/data/data-tracker-list-chunk.js';
import type { DataTrackerChunk } from '../../models/index.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataTrackerListChunk => { export default (buffer: Uint8Array): DataTrackerListChunk => {
@@ -11,7 +14,9 @@ export default (buffer: Uint8Array): DataTrackerListChunk => {
if (chunk.chunkData) { if (chunk.chunkData) {
let offset = 0; let offset = 0;
while (offset < chunk.chunkData.length) { while (offset < chunk.chunkData.length) {
const trackerChunk = Decoders.DataTrackerChunk(chunk.chunkData.subarray(offset)); const trackerChunk = Decoders.DataTrackerChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (trackerChunk.chunk.header.dataLen) { if (trackerChunk.chunk.header.dataLen) {
offset += trackerChunk.chunk.header.dataLen; offset += trackerChunk.chunk.header.dataLen;
@@ -1,10 +1,17 @@
import { DataTrackerStatusChunk, DataTrackerStatusChunkData } from '../../models/data/data-tracker-status-chunk.js'; import type {
DataTrackerStatusChunk,
DataTrackerStatusChunkData,
} from '../../models/data/data-tracker-status-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataTrackerStatusChunk => { export default (buffer: Uint8Array): DataTrackerStatusChunk => {
const chunk = Decoders.Chunk(buffer); const chunk = Decoders.Chunk(buffer);
const view = new DataView(chunk.chunkData.buffer, chunk.chunkData.byteOffset, chunk.chunkData.byteLength); const view = new DataView(
chunk.chunkData.buffer,
chunk.chunkData.byteOffset,
chunk.chunkData.byteLength
);
const validity = view.getFloat32(0, true); const validity = view.getFloat32(0, true);
const data: DataTrackerStatusChunkData = { const data: DataTrackerStatusChunkData = {
@@ -1,4 +1,4 @@
import { import type {
DataTrackerTimestampChunk, DataTrackerTimestampChunk,
DataTrackerTimestampChunkData, DataTrackerTimestampChunkData,
} from '../../models/data/data-tracker-timestamp-chunk.js'; } from '../../models/data/data-tracker-timestamp-chunk.js';
@@ -7,7 +7,11 @@ import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataTrackerTimestampChunk => { export default (buffer: Uint8Array): DataTrackerTimestampChunk => {
const chunk = Decoders.Chunk(buffer); const chunk = Decoders.Chunk(buffer);
const view = new DataView(chunk.chunkData.buffer, chunk.chunkData.byteOffset, chunk.chunkData.byteLength); const view = new DataView(
chunk.chunkData.buffer,
chunk.chunkData.byteOffset,
chunk.chunkData.byteLength
);
const timestamp = view.getBigUint64(0, true); const timestamp = view.getBigUint64(0, true);
const data: DataTrackerTimestampChunkData = { const data: DataTrackerTimestampChunkData = {
+9 -2
View File
@@ -1,11 +1,18 @@
import { DataTrackerXYZChunk, DataTrackerXYZChunkData } from '../../models/data/data-tracker-xyz-chunk.js'; import type {
DataTrackerXYZChunk,
DataTrackerXYZChunkData,
} from '../../models/data/data-tracker-xyz-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): DataTrackerXYZChunk => { export default (buffer: Uint8Array): DataTrackerXYZChunk => {
const chunk = Decoders.Chunk(buffer); const chunk = Decoders.Chunk(buffer);
// TODO(jwetzell): add error handling // TODO(jwetzell): add error handling
const view = new DataView(chunk.chunkData.buffer, chunk.chunkData.byteOffset, chunk.chunkData.byteLength); const view = new DataView(
chunk.chunkData.buffer,
chunk.chunkData.byteOffset,
chunk.chunkData.byteLength
);
const data: DataTrackerXYZChunkData = { const data: DataTrackerXYZChunkData = {
x: view.getFloat32(0, true), x: view.getFloat32(0, true),
+16 -5
View File
@@ -1,5 +1,8 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { InfoPacketChunk, InfoPacketChunkData } from '../../models/info/info-packet-chunk.js'; import type {
InfoPacketChunk,
InfoPacketChunkData,
} from '../../models/info/info-packet-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): InfoPacketChunk => { export default (buffer: Uint8Array): InfoPacketChunk => {
@@ -10,24 +13,32 @@ export default (buffer: Uint8Array): InfoPacketChunk => {
if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) { if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) {
let offset = 0; let offset = 0;
while (offset < chunk.header.dataLen) { while (offset < chunk.header.dataLen) {
const chunkId = (chunk.chunkData.subarray(offset)[1] << 8) + chunk.chunkData.subarray(offset)[0]; const chunkId =
(chunk.chunkData.subarray(offset)[1] << 8) +
chunk.chunkData.subarray(offset)[0];
switch (chunkId) { switch (chunkId) {
case 0x0000: case 0x0000:
data.packetHeader = Decoders.PacketHeaderChunk(chunk.chunkData.subarray(offset)); data.packetHeader = Decoders.PacketHeaderChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.packetHeader?.chunk.header.dataLen) { if (data.packetHeader?.chunk.header.dataLen) {
offset += data.packetHeader.chunk.header.dataLen; offset += data.packetHeader.chunk.header.dataLen;
} }
break; break;
case 0x0001: case 0x0001:
data.systemName = Decoders.InfoSystemNameChunk(chunk.chunkData.subarray(offset)); data.systemName = Decoders.InfoSystemNameChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.systemName?.chunk.header.dataLen) { if (data.systemName?.chunk.header.dataLen) {
offset += data.systemName?.chunk.header.dataLen; offset += data.systemName?.chunk.header.dataLen;
} }
break; break;
case 0x0002: case 0x0002:
data.trackerList = Decoders.InfoTrackerListChunk(chunk.chunkData.subarray(offset)); data.trackerList = Decoders.InfoTrackerListChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.trackerList?.chunk.header.dataLen) { if (data.trackerList?.chunk.header.dataLen) {
offset += data.trackerList.chunk.header.dataLen; offset += data.trackerList.chunk.header.dataLen;
+7 -2
View File
@@ -1,4 +1,7 @@
import { InfoSystemNameChunk, InfoSystemNameChunkData } from '../../models/info/info-system-name-chunk.js'; import type {
InfoSystemNameChunk,
InfoSystemNameChunkData,
} from '../../models/info/info-system-name-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
const nameDecoder = new TextDecoder(); const nameDecoder = new TextDecoder();
@@ -6,7 +9,9 @@ export default (buffer: Uint8Array): InfoSystemNameChunk => {
const chunk = Decoders.Chunk(buffer); const chunk = Decoders.Chunk(buffer);
const data: InfoSystemNameChunkData = { const data: InfoSystemNameChunkData = {
systemName: nameDecoder.decode(chunk.chunkData.subarray(0, chunk.header.dataLen)), systemName: nameDecoder.decode(
chunk.chunkData.subarray(0, chunk.header.dataLen)
),
}; };
return { return {
+10 -3
View File
@@ -1,5 +1,8 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { InfoTrackerChunk, InfoTrackerChunkData } from '../../models/info/info-tracker-chunk.js'; import type {
InfoTrackerChunk,
InfoTrackerChunkData,
} from '../../models/info/info-tracker-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): InfoTrackerChunk => { export default (buffer: Uint8Array): InfoTrackerChunk => {
@@ -8,11 +11,15 @@ export default (buffer: Uint8Array): InfoTrackerChunk => {
if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) { if (chunk.header.hasSubchunks && chunk.chunkData && chunk.header.dataLen) {
let offset = 0; let offset = 0;
while (offset < chunk.header.dataLen) { while (offset < chunk.header.dataLen) {
const chunkId = (chunk.chunkData.subarray(offset)[1] << 8) + chunk.chunkData.subarray(offset)[0]; const chunkId =
(chunk.chunkData.subarray(offset)[1] << 8) +
chunk.chunkData.subarray(offset)[0];
switch (chunkId) { switch (chunkId) {
case 0x0000: { case 0x0000: {
const data: InfoTrackerChunkData = { const data: InfoTrackerChunkData = {
trackerName: Decoders.InfoTrackerNameChunk(chunk.chunkData.subarray(offset)), trackerName: Decoders.InfoTrackerNameChunk(
chunk.chunkData.subarray(offset)
),
}; };
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (data.trackerName.chunk.header.dataLen) { if (data.trackerName.chunk.header.dataLen) {
+8 -3
View File
@@ -1,6 +1,9 @@
import { Constants } from '../../constants.js'; import { Constants } from '../../constants.js';
import { InfoTrackerChunk } from '../../models/info/info-tracker-chunk.js'; import type { InfoTrackerChunk } from '../../models/info/info-tracker-chunk.js';
import { InfoTrackerListChunk, InfoTrackerListChunkData } from '../../models/info/info-tracker-list-chunk.js'; import type {
InfoTrackerListChunk,
InfoTrackerListChunkData,
} from '../../models/info/info-tracker-list-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
export default (buffer: Uint8Array): InfoTrackerListChunk => { export default (buffer: Uint8Array): InfoTrackerListChunk => {
@@ -12,7 +15,9 @@ export default (buffer: Uint8Array): InfoTrackerListChunk => {
let offset = 0; let offset = 0;
if (chunk.header.dataLen) { if (chunk.header.dataLen) {
while (offset < chunk.header.dataLen) { while (offset < chunk.header.dataLen) {
const trackerChunk = Decoders.InfoTrackerChunk(chunk.chunkData.subarray(offset)); const trackerChunk = Decoders.InfoTrackerChunk(
chunk.chunkData.subarray(offset)
);
offset += Constants.CHUNK_HEADER_SIZE; offset += Constants.CHUNK_HEADER_SIZE;
if (trackerChunk.chunk.header.dataLen) { if (trackerChunk.chunk.header.dataLen) {
offset += trackerChunk.chunk.header.dataLen; offset += trackerChunk.chunk.header.dataLen;
+7 -2
View File
@@ -1,4 +1,7 @@
import { InfoTrackerNameChunk, InfoTrackerNameChunkData } from '../../models/info/info-tracker-name-chunk.js'; import type {
InfoTrackerNameChunk,
InfoTrackerNameChunkData,
} from '../../models/info/info-tracker-name-chunk.js';
import { Decoders } from '../index.js'; import { Decoders } from '../index.js';
const nameDecoder = new TextDecoder(); const nameDecoder = new TextDecoder();
@@ -6,7 +9,9 @@ export default (buffer: Uint8Array): InfoTrackerNameChunk => {
const chunk = Decoders.Chunk(buffer); const chunk = Decoders.Chunk(buffer);
const data: InfoTrackerNameChunkData = { const data: InfoTrackerNameChunkData = {
trackerName: nameDecoder.decode(chunk.chunkData.subarray(0, chunk.header.dataLen)), trackerName: nameDecoder.decode(
chunk.chunkData.subarray(0, chunk.header.dataLen)
),
}; };
return { return {
+4 -1
View File
@@ -1,4 +1,7 @@
import { PacketHeaderChunk, PacketHeaderChunkData } from '../models/packet-header-chunk.js'; import type {
PacketHeaderChunk,
PacketHeaderChunkData,
} from '../models/packet-header-chunk.js';
import { Decoders } from './index.js'; import { Decoders } from './index.js';
export default (buffer: Uint8Array): PacketHeaderChunk => { export default (buffer: Uint8Array): PacketHeaderChunk => {
+34 -9
View File
@@ -1,5 +1,5 @@
import { Constants } from './constants.js'; import { Constants } from './constants.js';
import { Encoders, Tracker } from './index.js'; import { Encoders, type Tracker } from './index.js';
export class Encoder { export class Encoder {
private systemName: string; private systemName: string;
@@ -7,7 +7,11 @@ export class Encoder {
private versionLow: number; private versionLow: number;
dataFrameId: number = 1; dataFrameId: number = 1;
infoFrameId: number = 1; infoFrameId: number = 1;
constructor(systemName: string, versionHigh: number = 2, versionLow: number = 3) { constructor(
systemName: string,
versionHigh: number = 2,
versionLow: number = 3
) {
this.systemName = systemName; this.systemName = systemName;
this.versionHigh = versionHigh; this.versionHigh = versionHigh;
this.versionLow = versionLow; this.versionLow = versionLow;
@@ -45,17 +49,25 @@ export class Encoder {
const systemNameChunk = Encoders.InfoSystemNameChunk(this.systemName); const systemNameChunk = Encoders.InfoSystemNameChunk(this.systemName);
const trackerChunks = trackers.map((tracker: Tracker) => tracker.getInfoChunk()); const trackerChunks = trackers.map((tracker: Tracker) =>
tracker.getInfoChunk()
);
const infoPackets: Uint8Array[] = []; const infoPackets: Uint8Array[] = [];
const trackerChunksLists: Uint8Array[][] = []; const trackerChunksLists: Uint8Array[][] = [];
let currentTrackerList: Uint8Array[] = []; let currentTrackerList: Uint8Array[] = [];
let currentInfoPacketSize = Constants.PACKET_HEADER_SIZE + systemNameChunk.length + Constants.CHUNK_HEADER_SIZE; let currentInfoPacketSize =
Constants.PACKET_HEADER_SIZE +
systemNameChunk.length +
Constants.CHUNK_HEADER_SIZE;
trackerChunks.forEach((trackerChunk: Uint8Array) => { trackerChunks.forEach((trackerChunk: Uint8Array) => {
if (currentInfoPacketSize + trackerChunk.length > Constants.MAX_UDP_PACKET_SIZE) { if (
currentInfoPacketSize + trackerChunk.length >
Constants.MAX_UDP_PACKET_SIZE
) {
trackerChunksLists.push(currentTrackerList); trackerChunksLists.push(currentTrackerList);
currentTrackerList = []; currentTrackerList = [];
currentInfoPacketSize = 0; currentInfoPacketSize = 0;
@@ -73,7 +85,11 @@ export class Encoder {
); );
trackerChunksLists.forEach((trackerChunkList) => { trackerChunksLists.forEach((trackerChunkList) => {
infoPackets.push( infoPackets.push(
Encoders.InfoPacketChunk(header, systemNameChunk, Encoders.InfoTrackerListChunk(trackerChunkList)) Encoders.InfoPacketChunk(
header,
systemNameChunk,
Encoders.InfoTrackerListChunk(trackerChunkList)
)
); );
}); });
this.infoFrameId += 1; this.infoFrameId += 1;
@@ -100,10 +116,14 @@ export class Encoder {
const trackerChunksLists: Uint8Array[][] = []; const trackerChunksLists: Uint8Array[][] = [];
let currentTrackerList: Uint8Array[] = []; let currentTrackerList: Uint8Array[] = [];
let currentDataPacketSize = Constants.PACKET_HEADER_SIZE + Constants.CHUNK_HEADER_SIZE; let currentDataPacketSize =
Constants.PACKET_HEADER_SIZE + Constants.CHUNK_HEADER_SIZE;
allTrackerChunks.forEach((trackerChunk) => { allTrackerChunks.forEach((trackerChunk) => {
if (currentDataPacketSize + trackerChunk.length > Constants.MAX_UDP_PACKET_SIZE) { if (
currentDataPacketSize + trackerChunk.length >
Constants.MAX_UDP_PACKET_SIZE
) {
trackerChunksLists.push(currentTrackerList); trackerChunksLists.push(currentTrackerList);
currentTrackerList = []; currentTrackerList = [];
currentDataPacketSize = 0; currentDataPacketSize = 0;
@@ -121,7 +141,12 @@ export class Encoder {
trackerChunksLists.length trackerChunksLists.length
); );
trackerChunksLists.forEach((trackerChunks) => { trackerChunksLists.forEach((trackerChunks) => {
dataPackets.push(Encoders.DataPacketChunk(header, Encoders.DataTrackerListChunk(trackerChunks))); dataPackets.push(
Encoders.DataPacketChunk(
header,
Encoders.DataTrackerListChunk(trackerChunks)
)
);
}); });
this.dataFrameId += 1; this.dataFrameId += 1;
if (this.dataFrameId > 255) { if (this.dataFrameId > 255) {
+5 -1
View File
@@ -1,5 +1,9 @@
const header = new DataView(new ArrayBuffer(4)); const header = new DataView(new ArrayBuffer(4));
export default (id: number, chunkData: Uint8Array, hasSubchunks: boolean): Uint8Array => { export default (
id: number,
chunkData: Uint8Array,
hasSubchunks: boolean
): Uint8Array => {
if (!Number.isInteger(id)) { if (!Number.isInteger(id)) {
throw new Error('chunk id must be an integer'); throw new Error('chunk id must be an integer');
} }
+7 -2
View File
@@ -1,6 +1,11 @@
import chunk from '../chunk.js'; import chunk from '../chunk.js';
export default (packetHeaderChunk: Uint8Array, trackerListChunk: Uint8Array): Uint8Array => { export default (
const chunkData = new Uint8Array(packetHeaderChunk.length + trackerListChunk.length); packetHeaderChunk: Uint8Array,
trackerListChunk: Uint8Array
): Uint8Array => {
const chunkData = new Uint8Array(
packetHeaderChunk.length + trackerListChunk.length
);
chunkData.set(packetHeaderChunk); chunkData.set(packetHeaderChunk);
chunkData.set(trackerListChunk, packetHeaderChunk.length); chunkData.set(trackerListChunk, packetHeaderChunk.length);
return chunk(0x6755, chunkData, true); return chunk(0x6755, chunkData, true);
+7 -2
View File
@@ -5,10 +5,15 @@ export default (
systemNameChunk: Uint8Array, systemNameChunk: Uint8Array,
trackerListChunk: Uint8Array trackerListChunk: Uint8Array
): Uint8Array => { ): Uint8Array => {
const chunkData = new Uint8Array(packetHeaderChunk.length + systemNameChunk.length + trackerListChunk.length); const chunkData = new Uint8Array(
packetHeaderChunk.length + systemNameChunk.length + trackerListChunk.length
);
chunkData.set(packetHeaderChunk); chunkData.set(packetHeaderChunk);
chunkData.set(systemNameChunk, packetHeaderChunk.length); chunkData.set(systemNameChunk, packetHeaderChunk.length);
chunkData.set(trackerListChunk, packetHeaderChunk.length + systemNameChunk.length); chunkData.set(
trackerListChunk,
packetHeaderChunk.length + systemNameChunk.length
);
return chunk(0x6756, chunkData, true); return chunk(0x6756, chunkData, true);
}; };
+2 -1
View File
@@ -1,3 +1,4 @@
import chunk from '../chunk.js'; import chunk from '../chunk.js';
const nameEncoder = new TextEncoder(); const nameEncoder = new TextEncoder();
export default (systemName: string): Uint8Array => chunk(0x0001, nameEncoder.encode(systemName), false); export default (systemName: string): Uint8Array =>
chunk(0x0001, nameEncoder.encode(systemName), false);
+2 -1
View File
@@ -1,4 +1,5 @@
import chunk from '../chunk.js'; import chunk from '../chunk.js';
const nameEncoder = new TextEncoder(); const nameEncoder = new TextEncoder();
export default (trackerName: string) => chunk(0x0000, nameEncoder.encode(trackerName), false); export default (trackerName: string) =>
chunk(0x0000, nameEncoder.encode(trackerName), false);
+3 -3
View File
@@ -1,6 +1,6 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { PacketHeaderChunk } from '../packet-header-chunk.js'; import type { PacketHeaderChunk } from '../packet-header-chunk.js';
import { DataTrackerListChunk } from './data-tracker-list-chunk.js'; import type { DataTrackerListChunk } from './data-tracker-list-chunk.js';
export interface DataPacketChunkData { export interface DataPacketChunkData {
packetHeader?: PacketHeaderChunk; packetHeader?: PacketHeaderChunk;
+4 -4
View File
@@ -1,7 +1,7 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { DataTrackerStatusChunk } from './data-tracker-status-chunk.js'; import type { DataTrackerStatusChunk } from './data-tracker-status-chunk.js';
import { DataTrackerTimestampChunk } from './data-tracker-timestamp-chunk.js'; import type { DataTrackerTimestampChunk } from './data-tracker-timestamp-chunk.js';
import { DataTrackerXYZChunk } from './data-tracker-xyz-chunk.js'; import type { DataTrackerXYZChunk } from './data-tracker-xyz-chunk.js';
export interface DataTrackerChunkData { export interface DataTrackerChunkData {
pos?: DataTrackerXYZChunk; pos?: DataTrackerXYZChunk;
+2 -2
View File
@@ -1,5 +1,5 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { DataTrackerChunk } from './data-tracker-chunk.js'; import type { DataTrackerChunk } from './data-tracker-chunk.js';
export interface DataTrackerListChunkData { export interface DataTrackerListChunkData {
trackers: DataTrackerChunk[]; trackers: DataTrackerChunk[];
+1 -1
View File
@@ -1,4 +1,4 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
export interface DataTrackerStatusChunkData { export interface DataTrackerStatusChunkData {
validity: number; validity: number;
@@ -1,4 +1,4 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
export interface DataTrackerTimestampChunkData { export interface DataTrackerTimestampChunkData {
timestamp: bigint; timestamp: bigint;
+1 -1
View File
@@ -1,4 +1,4 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
export interface DataTrackerXYZChunkData { export interface DataTrackerXYZChunkData {
x: number; x: number;
+4 -4
View File
@@ -1,7 +1,7 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { PacketHeaderChunk } from '../packet-header-chunk.js'; import type { PacketHeaderChunk } from '../packet-header-chunk.js';
import { InfoSystemNameChunk } from './info-system-name-chunk.js'; import type { InfoSystemNameChunk } from './info-system-name-chunk.js';
import { InfoTrackerListChunk } from './info-tracker-list-chunk.js'; import type { InfoTrackerListChunk } from './info-tracker-list-chunk.js';
export interface InfoPacketChunkData { export interface InfoPacketChunkData {
packetHeader?: PacketHeaderChunk; packetHeader?: PacketHeaderChunk;
+1 -1
View File
@@ -1,4 +1,4 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
export interface InfoSystemNameChunkData { export interface InfoSystemNameChunkData {
systemName: string; systemName: string;
+2 -2
View File
@@ -1,5 +1,5 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { InfoTrackerNameChunk } from './info-tracker-name-chunk.js'; import type { InfoTrackerNameChunk } from './info-tracker-name-chunk.js';
export interface InfoTrackerChunkData { export interface InfoTrackerChunkData {
trackerName: InfoTrackerNameChunk; trackerName: InfoTrackerNameChunk;
+2 -2
View File
@@ -1,5 +1,5 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
import { InfoTrackerChunk } from './info-tracker-chunk.js'; import type { InfoTrackerChunk } from './info-tracker-chunk.js';
export interface InfoTrackerListChunkData { export interface InfoTrackerListChunkData {
trackers: InfoTrackerChunk[]; trackers: InfoTrackerChunk[];
+1 -1
View File
@@ -1,4 +1,4 @@
import { Chunk } from '../chunk.js'; import type { Chunk } from '../chunk.js';
export interface InfoTrackerNameChunkData { export interface InfoTrackerNameChunkData {
trackerName: string; trackerName: string;
+1 -1
View File
@@ -1,4 +1,4 @@
import { Chunk } from './chunk.js'; import type { Chunk } from './chunk.js';
export interface PacketHeaderChunkData { export interface PacketHeaderChunkData {
packetTimestamp: bigint; packetTimestamp: bigint;
+25 -8
View File
@@ -8,8 +8,8 @@ import dataTrackerTimestampChunk from '../encoders/data/data-tracker-timestamp-c
import dataTrackerTrgtposChunk from '../encoders/data/data-tracker-trgtpos-chunk.js'; import dataTrackerTrgtposChunk from '../encoders/data/data-tracker-trgtpos-chunk.js';
import infoTrackerChunk from '../encoders/info/info-tracker-chunk.js'; import infoTrackerChunk from '../encoders/info/info-tracker-chunk.js';
import infoTrackerNameChunk from '../encoders/info/info-tracker-name-chunk.js'; import infoTrackerNameChunk from '../encoders/info/info-tracker-name-chunk.js';
import { DataTrackerChunk } from './data/data-tracker-chunk.js'; import type { DataTrackerChunk } from './data/data-tracker-chunk.js';
import { InfoTrackerChunk } from './info/info-tracker-chunk.js'; import type { InfoTrackerChunk } from './info/info-tracker-chunk.js';
export type XYZData = { export type XYZData = {
x: number; x: number;
@@ -126,7 +126,9 @@ export class Tracker {
} }
if (this.speed) { if (this.speed) {
fieldChunks.push(dataTrackerSpeedChunk(this.speed.x, this.speed.y, this.speed.z)); fieldChunks.push(
dataTrackerSpeedChunk(this.speed.x, this.speed.y, this.speed.z)
);
} }
if (this.ori) { if (this.ori) {
@@ -138,11 +140,15 @@ export class Tracker {
} }
if (this.accel) { if (this.accel) {
fieldChunks.push(dataTrackerAccelChunk(this.accel.x, this.accel.y, this.accel.z)); fieldChunks.push(
dataTrackerAccelChunk(this.accel.x, this.accel.y, this.accel.z)
);
} }
if (this.trgtpos) { if (this.trgtpos) {
fieldChunks.push(dataTrackerTrgtposChunk(this.trgtpos.x, this.trgtpos.y, this.trgtpos.z)); fieldChunks.push(
dataTrackerTrgtposChunk(this.trgtpos.x, this.trgtpos.y, this.trgtpos.z)
);
} }
if (this.timestamp) { if (this.timestamp) {
@@ -164,7 +170,11 @@ export class Tracker {
updateData(dataTrackerChunk: DataTrackerChunk) { updateData(dataTrackerChunk: DataTrackerChunk) {
if (dataTrackerChunk.data.pos) { if (dataTrackerChunk.data.pos) {
this.setPos(dataTrackerChunk.data.pos.data.x, dataTrackerChunk.data.pos.data.y, dataTrackerChunk.data.pos.data.z); this.setPos(
dataTrackerChunk.data.pos.data.x,
dataTrackerChunk.data.pos.data.y,
dataTrackerChunk.data.pos.data.z
);
} }
if (dataTrackerChunk.data.speed) { if (dataTrackerChunk.data.speed) {
@@ -176,7 +186,11 @@ export class Tracker {
} }
if (dataTrackerChunk.data.ori) { if (dataTrackerChunk.data.ori) {
this.setOri(dataTrackerChunk.data.ori.data.x, dataTrackerChunk.data.ori.data.y, dataTrackerChunk.data.ori.data.z); this.setOri(
dataTrackerChunk.data.ori.data.x,
dataTrackerChunk.data.ori.data.y,
dataTrackerChunk.data.ori.data.z
);
} }
if (dataTrackerChunk.data.status) { if (dataTrackerChunk.data.status) {
@@ -207,7 +221,10 @@ export class Tracker {
export function TrackerFromInfo(infoTrackerChunk: InfoTrackerChunk) { export function TrackerFromInfo(infoTrackerChunk: InfoTrackerChunk) {
if (infoTrackerChunk.data) { if (infoTrackerChunk.data) {
return new Tracker(infoTrackerChunk.chunk.header.id, infoTrackerChunk.data.trackerName.data.trackerName); return new Tracker(
infoTrackerChunk.chunk.header.id,
infoTrackerChunk.data.trackerName.data.trackerName
);
} }
return undefined; return undefined;
} }
-647
View File
@@ -1,647 +0,0 @@
const { deepEqual, throws } = require('assert');
const { describe, it } = require('node:test');
const { Decoders } = require('../dist/cjs/decoders');
const goodTests = [
{
description: 'DataTrackerPosChunk',
bytes: new Uint8Array([0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerSpeedChunk',
bytes: new Uint8Array([1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerOriChunk',
bytes: new Uint8Array([2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerStatusChunk',
bytes: new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
decoder: Decoders.DataTrackerStatusChunk,
},
{
description: 'DataTrackerAccelChunk',
bytes: new Uint8Array([4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerTrgtPosChunk',
bytes: new Uint8Array([5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerTimestampChunk',
bytes: new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
expected: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
decoder: Decoders.DataTrackerTimestampChunk,
},
{
description: 'DataTrackerChunk',
bytes: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0,
0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2,
150, 73, 0, 0, 0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0, 128, 63,
0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73,
0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
decoder: Decoders.DataTrackerChunk,
},
{
description: 'DataTrackerListChunk',
bytes: new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63,
0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8,
0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0,
64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8,
0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 104, id: 1, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0,
64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0,
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0,
8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
],
},
},
decoder: Decoders.DataTrackerListChunk,
},
{
description: 'DataPacketChunk',
bytes: new Uint8Array([
85, 103, 124, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 104, 128, 1, 0, 100, 128, 0, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0,
64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 124, id: 26453, hasSubchunks: true },
},
data: {
packetHeader: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
trackerList: {
chunk: {
chunkData: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0,
0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 104, id: 1, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0,
0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64,
64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
],
},
},
},
},
decoder: Decoders.DataPacketChunk,
},
{
description: 'InfoTrackerNameChunk',
bytes: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
expected: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
decoder: Decoders.InfoTrackerNameChunk,
},
{
description: 'InfoSystemNameChunk',
bytes: new Uint8Array([1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114]),
expected: {
chunk: {
chunkData: new Uint8Array([80, 83, 78, 32, 83, 101, 114, 118, 101, 114]),
header: { dataLen: 10, id: 1, hasSubchunks: false },
},
data: {
systemName: 'PSN Server',
},
},
decoder: Decoders.InfoSystemNameChunk,
},
{
description: 'InfoTrackerChunk',
bytes: new Uint8Array([1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
decoder: Decoders.InfoTrackerChunk,
},
{
description: 'InfoTrackerListChunk',
bytes: new Uint8Array([2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
expected: {
chunk: {
chunkData: new Uint8Array([1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 17, id: 2, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
],
},
},
decoder: Decoders.InfoTrackerListChunk,
},
{
description: 'PacketHeaderChunk',
bytes: new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
expected: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
decoder: Decoders.PacketHeaderChunk,
},
{
description: 'InfoPacketChunk',
bytes: new Uint8Array([
86, 103, 51, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 10, 0, 80, 83, 78, 32, 83, 101,
114, 118, 101, 114, 2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101,
114, 2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 51, id: 26454, hasSubchunks: true },
},
data: {
packetHeader: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
systemName: {
chunk: {
chunkData: new Uint8Array([80, 83, 78, 32, 83, 101, 114, 118, 101, 114]),
header: { dataLen: 10, id: 1, hasSubchunks: false },
},
data: {
systemName: 'PSN Server',
},
},
trackerList: {
chunk: {
chunkData: new Uint8Array([1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 17, id: 2, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
],
},
},
},
},
decoder: Decoders.InfoPacketChunk,
},
];
describe('PSN Bytes Decoding', () => {
goodTests.forEach((bytesTest) => {
it(bytesTest.description, () => {
const decoded = bytesTest.decoder(bytesTest.bytes);
deepEqual(decoded, bytesTest.expected);
});
});
});
// TODO(jwetzell): add error tests
const badTests = [];
describe('PSN Bytes Decoding Throws', () => {
badTests.forEach((bytesTest) => {
it(bytesTest.description, () => {
throws(() => {
bytesTest.decoder(bytesTest.bytes);
}, bytesTest.throwsMessage);
});
});
});
+738
View File
@@ -0,0 +1,738 @@
import { Decoders } from '@jwetzell/posistagenet';
import { deepEqual, throws } from 'node:assert';
import { describe, it } from 'node:test';
const goodTests = [
{
description: 'DataTrackerPosChunk',
bytes: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerSpeedChunk',
bytes: new Uint8Array([
1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerOriChunk',
bytes: new Uint8Array([
2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerStatusChunk',
bytes: new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
decoder: Decoders.DataTrackerStatusChunk,
},
{
description: 'DataTrackerAccelChunk',
bytes: new Uint8Array([
4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerTrgtPosChunk',
bytes: new Uint8Array([
5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
expected: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
decoder: Decoders.DataTrackerXYZChunk,
},
{
description: 'DataTrackerTimestampChunk',
bytes: new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
expected: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
decoder: Decoders.DataTrackerTimestampChunk,
},
{
description: 'DataTrackerChunk',
bytes: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63,
0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0,
0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0,
0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
decoder: Decoders.DataTrackerChunk,
},
{
description: 'DataTrackerListChunk',
bytes: new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128,
63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0,
0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0,
0, 0,
]),
header: { dataLen: 104, id: 1, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63,
4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2,
150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
],
},
},
decoder: Decoders.DataTrackerListChunk,
},
{
description: 'DataPacketChunk',
bytes: new Uint8Array([
85, 103, 124, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128,
63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0,
0, 0,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 104,
128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0,
64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0,
128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2,
150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 124, id: 26453, hasSubchunks: true },
},
data: {
packetHeader: {
chunk: {
chunkData: new Uint8Array([
210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
trackerList: {
chunk: {
chunkData: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64,
64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0,
128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0,
210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 104, id: 1, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0,
0, 128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0,
64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64,
64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
header: { dataLen: 100, id: 1, hasSubchunks: true },
},
data: {
pos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
speed: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 1, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
ori: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 2, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
status: {
chunk: {
chunkData: new Uint8Array([0, 0, 128, 63]),
header: { dataLen: 4, id: 3, hasSubchunks: false },
},
data: {
validity: 1.0,
},
},
accel: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 4, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
trgtpos: {
chunk: {
chunkData: new Uint8Array([
0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
header: { dataLen: 12, id: 5, hasSubchunks: false },
},
data: {
x: 1.0,
y: 2.0,
z: 3.0,
},
},
timestamp: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0]),
header: { dataLen: 8, id: 6, hasSubchunks: false },
},
data: {
timestamp: 1234567890n,
},
},
},
},
],
},
},
},
},
decoder: Decoders.DataPacketChunk,
},
{
description: 'InfoTrackerNameChunk',
bytes: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
expected: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
decoder: Decoders.InfoTrackerNameChunk,
},
{
description: 'InfoSystemNameChunk',
bytes: new Uint8Array([
1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
80, 83, 78, 32, 83, 101, 114, 118, 101, 114,
]),
header: { dataLen: 10, id: 1, hasSubchunks: false },
},
data: {
systemName: 'PSN Server',
},
},
decoder: Decoders.InfoSystemNameChunk,
},
{
description: 'InfoTrackerChunk',
bytes: new Uint8Array([
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([84, 114, 97, 99, 107, 101, 114, 32, 49]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
decoder: Decoders.InfoTrackerChunk,
},
{
description: 'InfoTrackerListChunk',
bytes: new Uint8Array([
2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114,
32, 49,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 17, id: 2, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([
84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
],
},
},
decoder: Decoders.InfoTrackerListChunk,
},
{
description: 'PacketHeaderChunk',
bytes: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
]),
expected: {
chunk: {
chunkData: new Uint8Array([210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
decoder: Decoders.PacketHeaderChunk,
},
{
description: 'InfoPacketChunk',
bytes: new Uint8Array([
86, 103, 51, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114, 2, 0, 17, 128,
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
expected: {
chunk: {
chunkData: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 10, 0,
80, 83, 78, 32, 83, 101, 114, 118, 101, 114, 2, 0, 17, 128, 1, 0, 13,
128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 51, id: 26454, hasSubchunks: true },
},
data: {
packetHeader: {
chunk: {
chunkData: new Uint8Array([
210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
]),
header: { dataLen: 12, id: 0, hasSubchunks: false },
},
data: {
packetTimestamp: 1234567890n,
versionHigh: 2,
versionLow: 3,
frameId: 1,
framePacketCount: 123,
},
},
systemName: {
chunk: {
chunkData: new Uint8Array([
80, 83, 78, 32, 83, 101, 114, 118, 101, 114,
]),
header: { dataLen: 10, id: 1, hasSubchunks: false },
},
data: {
systemName: 'PSN Server',
},
},
trackerList: {
chunk: {
chunkData: new Uint8Array([
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 17, id: 2, hasSubchunks: true },
},
data: {
trackers: [
{
chunk: {
chunkData: new Uint8Array([
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 13, id: 1, hasSubchunks: true },
},
data: {
trackerName: {
chunk: {
chunkData: new Uint8Array([
84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
header: { dataLen: 9, id: 0, hasSubchunks: false },
},
data: {
trackerName: 'Tracker 1',
},
},
},
},
],
},
},
},
},
decoder: Decoders.InfoPacketChunk,
},
];
describe('PSN Bytes Decoding', () => {
goodTests.forEach((bytesTest) => {
it(bytesTest.description, () => {
const decoded = bytesTest.decoder(bytesTest.bytes);
deepEqual(decoded, bytesTest.expected);
});
});
});
// TODO(jwetzell): add error tests
const badTests = [];
describe('PSN Bytes Decoding Throws', () => {
badTests.forEach((bytesTest) => {
it(bytesTest.description, () => {
throws(() => {
bytesTest.decoder(bytesTest.bytes);
}, bytesTest.throwsMessage);
});
});
});
-152
View File
@@ -1,152 +0,0 @@
const { deepEqual, throws, equal } = require('assert');
const { describe, it } = require('node:test');
const { Encoders } = require('../dist/cjs/encoders');
const goodTests = [
{
description: 'DataTrackerPosChunk',
expected: new Uint8Array([0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
bytes: Encoders.DataTrackerPosChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerSpeedChunk',
expected: new Uint8Array([1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
bytes: Encoders.DataTrackerSpeedChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerOriChunk',
expected: new Uint8Array([2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
bytes: Encoders.DataTrackerOriChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerStatusChunk',
expected: new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
bytes: Encoders.DataTrackerStatusChunk(1.0),
},
{
description: 'DataTrackerAccelChunk',
expected: new Uint8Array([4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
bytes: Encoders.DataTrackerAccelChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerTrgtposChunk',
expected: new Uint8Array([5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
bytes: Encoders.DataTrackerTrgtposChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerTimestampChunk',
expected: new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
bytes: Encoders.DataTrackerTimestampChunk(1234567890n),
},
{
description: 'DataTrackerChunk',
expected: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0,
0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2,
150, 73, 0, 0, 0, 0,
]),
bytes: Encoders.DataTrackerChunk(1, [
new Uint8Array([0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
new Uint8Array([4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
]),
},
{
description: 'DataTrackerListChunk',
expected: new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63,
0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8,
0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
bytes: Encoders.DataTrackerListChunk([
new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210,
2, 150, 73, 0, 0, 0, 0,
]),
]),
},
{
description: 'DataPacketChunk',
expected: new Uint8Array([
85, 103, 124, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 104, 128, 1, 0, 100, 128, 0, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
bytes: Encoders.DataPacketChunk(
new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128,
63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63,
4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6,
0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
])
),
},
{
description: 'InfoTrackerNameChunk',
expected: new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
bytes: Encoders.InfoTrackerNameChunk('Tracker 1'),
},
{
description: 'InfoSystemNameChunk',
expected: new Uint8Array([1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114]),
bytes: Encoders.InfoSystemNameChunk('PSN Server'),
},
{
description: 'InfoTrackerChunk',
expected: new Uint8Array([1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
bytes: Encoders.InfoTrackerChunk(1, new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49])),
},
{
description: 'InfoTrackerListChunk',
expected: new Uint8Array([2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
bytes: Encoders.InfoTrackerListChunk([
new Uint8Array([1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49]),
]),
},
{
description: 'PacketHeaderChunk',
expected: new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
bytes: Encoders.PacketHeaderChunk(1234567890n, 2, 3, 1, 123),
},
{
description: 'InfoPacketChunk',
expected: new Uint8Array([
86, 103, 51, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123, 1, 0, 10, 0, 80, 83, 78, 32, 83, 101,
114, 118, 101, 114, 2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
bytes: Encoders.InfoPacketChunk(
new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
new Uint8Array([1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114]),
new Uint8Array([2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49])
),
},
];
describe('PSN Message Encoding', () => {
goodTests.forEach((messageTest) => {
it(messageTest.description, () => {
deepEqual(messageTest.bytes, messageTest.expected);
});
});
});
//TODO(jwetzell): add tests that handle errors
const badTests = [];
describe('PSN Message Encoding Throws', () => {
badTests.forEach((messageTest) => {
it(messageTest.description, () => {
throws(() => {}, messageTest.throwsMessage);
});
});
});
+193
View File
@@ -0,0 +1,193 @@
import { deepEqual, throws } from 'node:assert';
import { describe, it } from 'node:test';
import { Encoders } from '@jwetzell/posistagenet';
const goodTests = [
{
description: 'DataTrackerPosChunk',
expected: new Uint8Array([
0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
bytes: Encoders.DataTrackerPosChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerSpeedChunk',
expected: new Uint8Array([
1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
bytes: Encoders.DataTrackerSpeedChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerOriChunk',
expected: new Uint8Array([
2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
bytes: Encoders.DataTrackerOriChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerStatusChunk',
expected: new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
bytes: Encoders.DataTrackerStatusChunk(1.0),
},
{
description: 'DataTrackerAccelChunk',
expected: new Uint8Array([
4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
bytes: Encoders.DataTrackerAccelChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerTrgtposChunk',
expected: new Uint8Array([
5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
]),
bytes: Encoders.DataTrackerTrgtposChunk(1.0, 2.0, 3.0),
},
{
description: 'DataTrackerTimestampChunk',
expected: new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
bytes: Encoders.DataTrackerTimestampChunk(1234567890n),
},
{
description: 'DataTrackerChunk',
expected: new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 1,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0, 0,
128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0, 12,
0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128, 63,
0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
bytes: Encoders.DataTrackerChunk(1, [
new Uint8Array([0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([2, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([3, 0, 4, 0, 0, 0, 128, 63]),
new Uint8Array([4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([5, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64]),
new Uint8Array([6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0]),
]),
},
{
description: 'DataTrackerListChunk',
expected: new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128,
63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0,
0, 0,
]),
bytes: Encoders.DataTrackerListChunk([
new Uint8Array([
1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64,
1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128, 63, 4, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0, 0, 128,
63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0, 0, 0,
]),
]),
},
{
description: 'DataPacketChunk',
expected: new Uint8Array([
85, 103, 124, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0, 128,
63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0, 12, 0, 0,
0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2, 150, 73, 0, 0,
0, 0,
]),
bytes: Encoders.DataPacketChunk(
new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
new Uint8Array([
1, 0, 104, 128, 1, 0, 100, 128, 0, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64,
0, 0, 64, 64, 1, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 2,
0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 3, 0, 4, 0, 0, 0,
128, 63, 4, 0, 12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 5, 0,
12, 0, 0, 0, 128, 63, 0, 0, 0, 64, 0, 0, 64, 64, 6, 0, 8, 0, 210, 2,
150, 73, 0, 0, 0, 0,
])
),
},
{
description: 'InfoTrackerNameChunk',
expected: new Uint8Array([
0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
bytes: Encoders.InfoTrackerNameChunk('Tracker 1'),
},
{
description: 'InfoSystemNameChunk',
expected: new Uint8Array([
1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114,
]),
bytes: Encoders.InfoSystemNameChunk('PSN Server'),
},
{
description: 'InfoTrackerChunk',
expected: new Uint8Array([
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
bytes: Encoders.InfoTrackerChunk(
1,
new Uint8Array([0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49])
),
},
{
description: 'InfoTrackerListChunk',
expected: new Uint8Array([
2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114,
32, 49,
]),
bytes: Encoders.InfoTrackerListChunk([
new Uint8Array([
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
]),
},
{
description: 'PacketHeaderChunk',
expected: new Uint8Array([
0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
]),
bytes: Encoders.PacketHeaderChunk(1234567890n, 2, 3, 1, 123),
},
{
description: 'InfoPacketChunk',
expected: new Uint8Array([
86, 103, 51, 128, 0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123,
1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114, 2, 0, 17, 128,
1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101, 114, 32, 49,
]),
bytes: Encoders.InfoPacketChunk(
new Uint8Array([0, 0, 12, 0, 210, 2, 150, 73, 0, 0, 0, 0, 2, 3, 1, 123]),
new Uint8Array([
1, 0, 10, 0, 80, 83, 78, 32, 83, 101, 114, 118, 101, 114,
]),
new Uint8Array([
2, 0, 17, 128, 1, 0, 13, 128, 0, 0, 9, 0, 84, 114, 97, 99, 107, 101,
114, 32, 49,
])
),
},
];
describe('PSN Message Encoding', () => {
goodTests.forEach((messageTest) => {
it(messageTest.description, () => {
deepEqual(messageTest.bytes, messageTest.expected);
});
});
});
//TODO(jwetzell): add tests that handle errors
const badTests = [];
describe('PSN Message Encoding Throws', () => {
badTests.forEach((messageTest) => {
it(messageTest.description, () => {
throws(() => {}, messageTest.throwsMessage);
});
});
});
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"declaration": false,
"outDir": "./dist/cjs"
}
}
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ESNext",
"declaration": false,
"outDir": "./dist/esm"
}
}
+14 -6
View File
@@ -1,12 +1,20 @@
{ {
"compilerOptions": { "compilerOptions": {
"moduleResolution": "Node", "target": "esnext",
"lib": ["ESNext"], "lib": ["es2023"],
"target": "ESNext", "moduleDetection": "force",
"module": "preserve",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"types": ["node"],
"strict": true,
"noUnusedLocals": true,
"declaration": true,
"emitDeclarationOnly": true,
"esModuleInterop": true, "esModuleInterop": true,
"isolatedModules": true, "isolatedModules": true,
"rootDir": "src/", "verbatimModuleSyntax": true,
"strict": true "skipLibCheck": true
}, },
"include": ["src/"] "include": ["src"]
} }
-8
View File
@@ -1,8 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"emitDeclarationOnly": true,
"declaration": true,
"outDir": "./dist/types"
}
}
+10
View File
@@ -0,0 +1,10 @@
import { defineConfig } from 'tsdown';
export default defineConfig({
entry: 'src/index.ts',
exports: true,
format: {
esm: {},
cjs: {},
},
});