-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Javascript interface and implementation of API based upon RFC 0…
…01 (#2) * chore: ignore DS_Store files * build: create base navdata-sdk module * build: fix build with navdata-sdk * build: include navdata-sdk in tsconfig * refactor: add msfstypes to ts library * wip(feat/restructure): centralized function call, raw sql query heavy wip * refactor: clean up queue processing * refactor: move lint and lint to root * refactor: centralize communications between wasm and js, and cleanups also improves performance for deleting existing downloaded package * refactor: apply clippy changes * refactor: rename Request to Task to not confuse with network requests * refactor: download status update flow * refactor: move phase matching logic * refactor: add typescript interface typings * refactor: use string values for NavigraphFunction enum * refactor: use serde for all commbus related things makes code cleaner and less prone to error * docs: add note about the navdata interface construction * refactor: switch instead of if chain * chore: add temp. CommBus types, use types lib * refactor: avoid array with `any` callbacks * refactor: strongly type `callWasmFunction` name param Using string parameter instead of enum to increase discoverability * chore: use lowercase for type declaration file * refactor: improve error handling * refactor: move msfstypes to base package * feat: add get airport function * fix: use string literal instead of enum * chore: format * feat: unit tests and project refactor (#1) * start node running of interface * refactors * fix: update `memoryBuffer` after `malloc` * refactor: add `test_out` directory, fix our path type implementation * refactor: project structure * feat: jest test environment * fix: stop lifecycle once tests completed * feat: automatic download * remove unnecessary package * refactor: Cleanup setup.ts * fix: make sh files executable * fix: have build run with docker * feat: test workflow * fix: make test.sh executable * Update test.sh * test * Update setup.ts * Create push.yml * Update push.yml * general fixes * fix: workspace issues --------- Co-authored-by: Jack Lavigne <[email protected]> * fix: use params and support number fields in raw sql query * start new API * feat: get airports in range * feat: Airways by ident * feat: Airways by range * formatting * feat: Departures query * fix: sim issues * refactor: Move database out of wasm module * refactor: switch to fully snake_case and other spec compliance * feat: arrivals * refactor: procedure mapping * feat: get_database_info * refactor: remove uneccesary serde renames * feat: Approaches * fix: fix airport_ident * pad out tests * feat: Waypoint and VhfNavaid queries * refactor: Generic range query generator * feat: get runways at airport * feat: Waypoint/VhfNavaid range queries * feat: ndb navaids * feat: navaid and waypoint airport queries * feat: get airways at fix * feat: comments * feat: Airspace range queries * fix: missing Database Info type * fix: approach * feat: gates * feat: communications * feat: Gls navaids * feat: pathpoints * improved documentation * Update README.md * Update README.md * Update NavigraphLogin.tsx * fix: js interface return types * general fixes * refactor workflow env * Revert "refactor workflow env" This reverts commit dafb9ef. * refactors and comments in js * feat: click on qr code to login * test verbose * test * test * Update pr.yml * ci: run tests without docker * ci: run jest directly * ci: update actions, bump node version * ci: disable cone mode for sparse-checkout * ci: exclude blobs instead of sparse * ci: skip installing packages in docker This should cause the tests to fail right? I guess the reason it works locally is because it uses the dependencies installed by us on the windows-side... * ci: run correct test script * ci: temporarily skip WASM builds * ci: explicit node version, install deps * ci: install deps inside docker * ci: make sure both commands run inside docker * ci: revert to incorrect (but working) script This configuration seems to result in successful test runs for some reason ¯\_(ツ)_/¯ * ci: reintroduce WASM build step * ci: move test run to separate line for clarity * Delete DOCS.md --------- Co-authored-by: Malte Hallström <[email protected]> Co-authored-by: Jack Lavigne <[email protected]>
- Loading branch information
1 parent
a2b04fc
commit 29ffffb
Showing
122 changed files
with
14,397 additions
and
6,853 deletions.
There are no files selected for viewing
20 changes: 10 additions & 10 deletions
20
...wasm_navdata_interface/.cargo/config.toml → .cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[target.wasm32-wasi] | ||
rustflags = [ | ||
"-Clink-arg=--export-table", | ||
"-Clink-arg=--export=malloc", | ||
"-Clink-arg=--export=free", | ||
"-Clink-arg=-L/usr/lib/llvm-15/lib/clang/15.0.7/lib/wasi", | ||
"-Clink-arg=-lclang_rt.builtins-wasm32" | ||
] | ||
|
||
[build] | ||
[target.wasm32-wasi] | ||
rustflags = [ | ||
"-Clink-arg=--export-table", | ||
"-Clink-arg=--export=malloc", | ||
"-Clink-arg=--export=free", | ||
"-Clink-arg=-L/usr/lib/llvm-15/lib/clang/15.0.7/lib/wasi", | ||
"-Clink-arg=-lclang_rt.builtins-wasm32" | ||
] | ||
|
||
[build] | ||
target = "wasm32-wasi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: create env file | ||
run: | | ||
touch .env | ||
echo NAVDATA_SIGNED_URL=${{ secrets.NAVDATA_SIGNED_URL }} >> .env | ||
- name: Build WASM module | ||
run: npm run build:wasm-workflow | ||
- name: Test | ||
run: npm run test-workflow | ||
- name: Upload WASM module to GitHub | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: msfs_navdata_interface.wasm | ||
path: ./out/msfs_navdata_interface.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Rollup | ||
.rollup.cache | ||
|
||
package-lock.json | ||
|
||
*.gltf | ||
*.json | ||
*.yml |
File renamed without changes.
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[workspace] | ||
resolver = "2" | ||
|
||
members = ["src/wasm", "src/database"] | ||
|
||
[profile.release] | ||
lto = true | ||
strip = true | ||
|
||
[patch.crates-io] | ||
rusqlite = { git = "https://github.com/navigraph/rusqlite", rev = "7921774" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.