@blazen-dev/wasi 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -11
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,30 +1,51 @@
1
1
  # @blazen-dev/wasi
2
2
 
3
- Thin re-export alias for [`@blazen-dev/blazen-wasm32-wasi`](https://www.npmjs.com/package/@blazen-dev/blazen-wasm32-wasi) — the WASI build of the Blazen Node binding. Use it in Cloudflare Workers, Deno, or any other WASI host where you'd rather pin the WASI sidecar explicitly than rely on the umbrella `blazen` package's automatic platform resolution.
3
+ The single-install Blazen package for Cloudflare Workers, Deno, and any other WASI host. Re-exports [`@blazen-dev/blazen-wasm32-wasi`](https://www.npmjs.com/package/@blazen-dev/blazen-wasm32-wasi) — the napi-rs WASI build of Blazen and lists the wasm sidecar as a regular dependency so `pnpm add @blazen-dev/wasi` is all you need.
4
4
 
5
- ## Recommended path
6
-
7
- Just install the umbrella package and let it resolve the right sidecar for your host:
5
+ ## Install
8
6
 
9
7
  ```bash
10
- npm install blazen
8
+ pnpm add @blazen-dev/wasi
9
+ # or
10
+ npm install @blazen-dev/wasi
11
11
  ```
12
12
 
13
- The `blazen` umbrella package already pulls in `@blazen-dev/blazen-wasm32-wasi` automatically when no native binary matches the host (e.g. Cloudflare Workers, Deno, WASI runtimes). You do **not** need this alias for that case.
13
+ The wasm sidecar (`@blazen-dev/blazen-wasm32-wasi`) is pulled in automatically as a transitive dependency. No second install, no Vite/Rollup workaround plugins, no `ssr.external` lists, no `manualChunks`. Works out of the box with wrangler ≥ 3.15 and `@cloudflare/vite-plugin`.
14
+
15
+ ## Usage
16
+
17
+ ```js
18
+ import {
19
+ CompletionModel,
20
+ EmbeddingModel,
21
+ AnthropicProvider,
22
+ Workflow,
23
+ } from '@blazen-dev/wasi';
24
+ ```
14
25
 
15
- ## When to use this alias
26
+ The export surface is identical to the main `blazen` package; only the binding implementation differs (wasm32-wasi build instead of a per-platform `.node` binary).
16
27
 
17
- Install `@blazen-dev/wasi` only when you want an explicit pin on the WASI build — e.g. you're authoring a library that must run on Workers and you want the dep graph to declare that intent unambiguously, or you want to skip umbrella resolution entirely.
28
+ ## When to use this instead of `blazen`
29
+
30
+ The umbrella `blazen` package targets Node servers and installs a per-platform native `.node` binary. The wasm sidecar is an *optional* peer-dependency there, intentionally kept out of Node-only install footprints. Use this package when:
31
+
32
+ - You're deploying to Cloudflare Workers, Deno Deploy, Fastly Compute, or another WASI host where the native `.node` binary won't load.
33
+ - You want a single `pnpm add` line that pulls everything needed for the target runtime.
34
+ - You want the dependency graph to clearly declare your Workers/edge intent.
35
+
36
+ ## Alternative: `blazen/workers` subpath
37
+
38
+ If you'd rather list `blazen` in your dependency tree (mirroring a Node deployment) and explicitly pin the wasm sidecar yourself:
18
39
 
19
40
  ```bash
20
- npm install @blazen-dev/wasi
41
+ pnpm add blazen @blazen-dev/blazen-wasm32-wasi
21
42
  ```
22
43
 
23
44
  ```js
24
- import { /* your APIs */ } from '@blazen-dev/wasi';
45
+ import { CompletionModel } from 'blazen/workers';
25
46
  ```
26
47
 
27
- The exports are identical to `@blazen-dev/blazen-wasm32-wasi`; this package only re-exports.
48
+ Both installs are required because the wasm sidecar is an optional peer-dependency on `blazen`. The `blazen/workers` subpath uses the same wrangler-static `import wasm from '@blazen-dev/blazen-wasm32-wasi/blazen.wasm32-wasi.wasm'` loader under the hood as this alias.
28
49
 
29
50
  ## Documentation
30
51
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blazen-dev/wasi",
3
- "version": "0.5.1",
4
- "description": "Blazen wasi build of the Node binding thin re-export of @blazen-dev/blazen-wasm32-wasi for explicit installs in Cloudflare Workers / Deno / any WASI host. The umbrella `blazen` package auto-resolves the wasi sidecar without this alias; install this only if you want an explicit pin.",
3
+ "version": "0.5.2",
4
+ "description": "Single-install Blazen package for Cloudflare Workers, Deno, and any WASI host. Re-exports @blazen-dev/blazen-wasm32-wasi and lists the wasm sidecar as a regular dependency, so `pnpm add @blazen-dev/wasi` is all that's needed. The umbrella `blazen` package targets Node servers and keeps the wasm sidecar out of the default install footprint.",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
7
7
  "main": "index.cjs",
@@ -13,7 +13,7 @@
13
13
  "index.d.ts"
14
14
  ],
15
15
  "dependencies": {
16
- "@blazen-dev/blazen-wasm32-wasi": "0.5.1"
16
+ "@blazen-dev/blazen-wasm32-wasi": "0.5.2"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"