Skip to content

Commit 16a8496

Browse files
authored
Publish node compatible sdk (#1115)
## 🎟️ Tracking <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes
1 parent 5dd9909 commit 16a8496

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

crates/bitwarden-wasm-internal/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ if [ "$1" != "-r" ]; then
66
# Dev
77
cargo build -p bitwarden-wasm-internal --target wasm32-unknown-unknown
88
wasm-bindgen --target bundler --out-dir languages/js/sdk-internal ./target/wasm32-unknown-unknown/debug/bitwarden_wasm_internal.wasm
9+
wasm-bindgen --target nodejs --out-dir languages/js/sdk-internal/node ./target/wasm32-unknown-unknown/debug/bitwarden_wasm_internal.wasm
910
else
1011
# Release
1112
cargo build -p bitwarden-wasm-internal --target wasm32-unknown-unknown --release
1213
wasm-bindgen --target bundler --out-dir languages/js/sdk-internal ./target/wasm32-unknown-unknown/release/bitwarden_wasm_internal.wasm
14+
wasm-bindgen --target nodejs --out-dir languages/js/sdk-internal/node ./target/wasm32-unknown-unknown/release/bitwarden_wasm_internal.wasm
1315
fi
1416

1517
# Format

languages/js/sdk-internal/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@
99
"bitwarden_wasm_internal_bg.wasm.js",
1010
"bitwarden_wasm_internal.d.ts",
1111
"bitwarden_wasm_internal.js",
12-
"index.js"
12+
"index.js",
13+
"node/bitwarden_wasm_internal_bg.wasm",
14+
"node/bitwarden_wasm_internal_bg.wasm.d.ts",
15+
"node/bitwarden_wasm_internal.d.ts",
16+
"node/bitwarden_wasm_internal.js"
1317
],
18+
"main": "node/bitwarden_wasm_internal.js",
1419
"module": "index.js",
1520
"types": "bitwarden_wasm_internal.d.ts",
1621
"scripts": {},

0 commit comments

Comments
 (0)