@zero-server/sdk 0.9.5 → 0.9.6
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 +13 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square&logo=nodedotjs&logoColor=white" alt="node >=18"></a>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
|
-
> **Zero-dependency backend framework for Node.js — routing, ORM, auth, WebSocket, SSE, observability, and 20+ middleware as
|
|
22
|
+
> **Zero-dependency backend framework for Node.js — routing, ORM, auth, WebSocket, SSE, observability, and 20+ middleware as one SDK or focused scoped packages.**
|
|
23
23
|
|
|
24
24
|
<p align="center">
|
|
25
25
|
<strong>
|
|
@@ -31,15 +31,21 @@
|
|
|
31
31
|
|
|
32
32
|
## Install
|
|
33
33
|
|
|
34
|
-
zero-server is published as a set of focused, standalone scoped packages under `@zero-server/*`. Install only the surfaces you actually use:
|
|
35
|
-
|
|
36
34
|
```bash
|
|
37
|
-
npm install @zero-server/
|
|
35
|
+
npm install @zero-server/sdk
|
|
38
36
|
```
|
|
39
37
|
|
|
40
38
|
Requires Node.js 18+. No external dependencies — everything is built on Node.js core APIs.
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
`@zero-server/sdk` is the recommended install — it re-exports the entire framework from a single import. Use it for new projects, demos, and most production apps.
|
|
41
|
+
|
|
42
|
+
### Or install only what you need (scoped packages)
|
|
43
|
+
|
|
44
|
+
Every section of the framework is also published as its own standalone scoped package, so libraries and microservices that only touch a slice of the surface can install just those packages and skip the rest:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install @zero-server/core @zero-server/body @zero-server/middleware
|
|
48
|
+
```
|
|
43
49
|
|
|
44
50
|
| Package | Surface |
|
|
45
51
|
|---|---|
|
|
@@ -57,30 +63,14 @@ Requires Node.js 18+. No external dependencies — everything is built on Node.j
|
|
|
57
63
|
| `@zero-server/errors` | every typed `HttpError` class plus ORM/framework errors |
|
|
58
64
|
| `@zero-server/cli` | programmatic `CLI` / `runCLI` entry points for `zh` / `zs` |
|
|
59
65
|
|
|
60
|
-
> Each scoped package is fully standalone at runtime — its own `index.js`, its own bundled lib, its own types.
|
|
61
|
-
|
|
62
|
-
### Aggregate install (optional)
|
|
63
|
-
|
|
64
|
-
For demos, scratch projects, or apps that touch most of the surface, `@zero-server/sdk` is a convenience aggregate that re-exports the entire public API in one install:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
npm install @zero-server/sdk
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
```js
|
|
71
|
-
const { createApp, json } = require('@zero-server/sdk')
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Production apps and libraries should prefer the focused scoped packages above.
|
|
66
|
+
> Each scoped package is fully standalone at runtime — its own `index.js`, its own bundled lib, its own types. Mix and match freely; versions stay aligned across the `@zero-server/*` release set.
|
|
75
67
|
|
|
76
68
|
---
|
|
77
69
|
|
|
78
70
|
## Quick Start
|
|
79
71
|
|
|
80
72
|
```js
|
|
81
|
-
const { createApp } = require('@zero-server/
|
|
82
|
-
const { json } = require('@zero-server/body')
|
|
83
|
-
|
|
73
|
+
const { createApp, json } = require('@zero-server/sdk')
|
|
84
74
|
const app = createApp()
|
|
85
75
|
|
|
86
76
|
app.use(json())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zero-server/sdk",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "Zero-dependency backend framework for Node.js — routing, ORM, auth, WebSocket, SSE, gRPC, observability, and 20+ middleware. Distributed as a single SDK and as scoped @zero-server/* packages.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|