@loomcycle/client 0.10.0 → 0.10.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.
- package/README.md +18 -0
- package/dist/cjs/client.js +734 -0
- package/dist/cjs/errors.js +246 -0
- package/dist/cjs/fetch-helpers.js +253 -0
- package/dist/cjs/index.js +91 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/stream.js +84 -0
- package/dist/cjs/types.js +11 -0
- package/dist/errors.d.ts +50 -0
- package/dist/errors.js +50 -0
- package/dist/fetch-helpers.js +29 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -27,6 +27,24 @@ npm install @loomcycle/client
|
|
|
27
27
|
|
|
28
28
|
Requires Node ≥ 18. Bun and Deno likely work but are untested. Browser support is not a target — for browser-side operator control, use loomcycle's built-in Web UI at `/ui`.
|
|
29
29
|
|
|
30
|
+
### Module systems
|
|
31
|
+
|
|
32
|
+
From v0.10.1 the package ships as a **dual ESM + CommonJS** distribution:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// ESM (recommended)
|
|
36
|
+
import { LoomcycleClient } from "@loomcycle/client";
|
|
37
|
+
|
|
38
|
+
// CommonJS (legacy consumers — n8n's community-node loader, older Node
|
|
39
|
+
// scripts, anything not yet on ESM)
|
|
40
|
+
const { LoomcycleClient } = require("@loomcycle/client");
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `exports` field routes each consumer to the right build:
|
|
44
|
+
- `import` → `dist/index.js` (ESM)
|
|
45
|
+
- `require` → `dist/cjs/index.js` (CJS)
|
|
46
|
+
- `types` → `dist/index.d.ts` (single .d.ts set; works for both)
|
|
47
|
+
|
|
30
48
|
## Quick start
|
|
31
49
|
|
|
32
50
|
```ts
|