Skip to content

Commit

Permalink
Publish node compatible sdk (#1115)
Browse files Browse the repository at this point in the history
## 🎟️ 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
  • Loading branch information
Hinton authored Oct 4, 2024
1 parent 5dd9909 commit 16a8496
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/bitwarden-wasm-internal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ if [ "$1" != "-r" ]; then
# Dev
cargo build -p bitwarden-wasm-internal --target wasm32-unknown-unknown
wasm-bindgen --target bundler --out-dir languages/js/sdk-internal ./target/wasm32-unknown-unknown/debug/bitwarden_wasm_internal.wasm
wasm-bindgen --target nodejs --out-dir languages/js/sdk-internal/node ./target/wasm32-unknown-unknown/debug/bitwarden_wasm_internal.wasm
else
# Release
cargo build -p bitwarden-wasm-internal --target wasm32-unknown-unknown --release
wasm-bindgen --target bundler --out-dir languages/js/sdk-internal ./target/wasm32-unknown-unknown/release/bitwarden_wasm_internal.wasm
wasm-bindgen --target nodejs --out-dir languages/js/sdk-internal/node ./target/wasm32-unknown-unknown/release/bitwarden_wasm_internal.wasm
fi

# Format
Expand Down
7 changes: 6 additions & 1 deletion languages/js/sdk-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@
"bitwarden_wasm_internal_bg.wasm.js",
"bitwarden_wasm_internal.d.ts",
"bitwarden_wasm_internal.js",
"index.js"
"index.js",
"node/bitwarden_wasm_internal_bg.wasm",
"node/bitwarden_wasm_internal_bg.wasm.d.ts",
"node/bitwarden_wasm_internal.d.ts",
"node/bitwarden_wasm_internal.js"
],
"main": "node/bitwarden_wasm_internal.js",
"module": "index.js",
"types": "bitwarden_wasm_internal.d.ts",
"scripts": {},
Expand Down

0 comments on commit 16a8496

Please sign in to comment.