Files
OpenShell/crates/openshell-sdk-node/package.json
T
Max Dubrinsky d7b306349c feat(sdk-node): add napi-rs TypeScript binding (@openshell/sdk)
Per RFC 0005, ship openshell-sdk-node as a napi-rs wrapper over the
openshell-sdk crate, exposing the same surface to TypeScript/Node
consumers as @openshell/sdk.

- New crate openshell-sdk-node binds OpenShellClient, OidcRefresher,
  the edge-tunnel dialer, and the sandbox/exec API through napi-rs.
- Generated index.d.ts and index.js are committed; the per-platform
  .node binary is gitignored and rebuilt with `napi build` per host.
- lib.mjs provides a small ESM facade with named exports plus the
  errorCode() helper for typed error discrimination.

Tests: 5-case smoke suite that exercises exports, typed connect errors,
and OidcRefresher single-flight semantics.
2026-06-25 13:41:49 -04:00

56 lines
1.2 KiB
JSON

{
"name": "@openshell/sdk",
"version": "0.0.0-alpha.0",
"description": "TypeScript SDK for OpenShell gateways. Wraps the openshell-sdk Rust core via napi-rs.",
"main": "index.js",
"types": "index.d.ts",
"exports": {
".": {
"import": {
"types": "./lib.d.ts",
"default": "./lib.mjs"
},
"require": {
"types": "./index.d.ts",
"default": "./index.js"
}
},
"./package.json": "./package.json"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/NVIDIA/OpenShell.git",
"directory": "crates/openshell-sdk-node"
},
"engines": {
"node": ">= 18"
},
"files": [
"index.js",
"index.d.ts",
"lib.mjs",
"lib.d.ts"
],
"napi": {
"binaryName": "openshell-sdk",
"targets": [
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu",
"x86_64-pc-windows-msvc",
"aarch64-pc-windows-msvc"
]
},
"scripts": {
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"test": "node test/smoke.mjs",
"prepublishOnly": "napi prepublish -t npm"
},
"devDependencies": {
"@napi-rs/cli": "^3"
}
}