Skip to content

Commit 57df826

Browse files
Okapi wrapper updates to typescript (#403)
1 parent 92adda0 commit 57df826

48 files changed

Lines changed: 15381 additions & 33999 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-wasm.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,33 @@ on:
2121
jobs:
2222
build_test:
2323
name: Build, Test
24-
runs-on: macos-latest
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
os: [ ubuntu-latest, macos-latest ] # windows-latest has issues with wasm-pack.exe
29+
node-version: [ 14, 16 ]
30+
target: [ 'node', 'browser' ]
2531
defaults:
2632
run:
2733
working-directory: ./wasm
2834
steps:
29-
- uses: actions/[email protected]
30-
# ESLint and Prettier must be in `package.json`
31-
- name: Install Node.js dependencies
32-
run: npm ci
33-
# - name: Run linters
34-
# uses: wearerequired/[email protected]
35-
# with:
36-
# eslint: true
37-
# eslint_dir: wasm/
38-
# eslint_args: "--ext .ts,.tsx"
39-
- name: Run linters
40-
run: npm run lint
35+
- uses: actions/checkout@v3
4136
- uses: jetli/[email protected]
4237
with:
4338
version: 'latest'
39+
- uses: actions/setup-node@v3
40+
name: Setup Node v${{ matrix.node-version }}
41+
with:
42+
node-version: ${{ matrix.node-version }}
4443
- run: |
4544
rustup toolchain uninstall stable
4645
rustup toolchain install stable
4746
rustup toolchain install stable --target wasm32-unknown-unknown
48-
- run: npm run start
49-
- run: npm run build
50-
- run: npm run test
47+
- run: |
48+
npm install
49+
npm run build:proto
50+
npm run build:wasm:${{ matrix.target }}
51+
npm run test:${{ matrix.target }}
52+
shell: pwsh
53+
working-directory: ./wasm/packages/okapi

.github/workflows/release-wasm.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
overrideVersion: ${{ github.event.inputs.packageVersion }}
4040
- run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
4141
- run: |
42-
npm run start
43-
npx lerna version ${{ steps.setversion.outputs.packageVersion }} --no-git-tag-version --yes
42+
npm install
43+
npm version ${{ steps.setversion.outputs.packageVersion }} --no-git-tag-version --yes
4444
npm run build
45-
npx lerna publish ${{ steps.setversion.outputs.packageVersion }} --no-git-tag-version --yes --no-verify-access
45+
npm publish ${{ steps.setversion.outputs.packageVersion }} --no-git-tag-version --yes --no-verify-access
46+
shell: pwsh
47+
working-directory: ./wasm/packages/okapi

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,4 +456,6 @@ go/vendor/
456456

457457
python/lib64
458458

459-
.venv
459+
.venv
460+
wasm/packages/okapi/src/native_browser/
461+
wasm/packages/okapi/src/native_node/

wasm/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name = "okapi-wasm"
33
version = "0.1.0"
44
authors = ["Tomislav Markovski <[email protected]>"]
55
edition = "2018"
6+
description = "WASM Bindings for Okapi"
7+
repository = "https://github.com/trinsic-id/okapi/tree/main/wasm"
8+
license = "Apache 2.0"
69

710
[lib]
811
name = "okapi_wasm"

wasm/Generate-Proto.ps1

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)