@zero-server/sdk 0.9.2 → 0.9.5

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 CHANGED
@@ -13,13 +13,13 @@
13
13
  <p align="center">
14
14
  <a href="https://github.com/tonywied17/zero-server/actions"><img src="https://img.shields.io/github/actions/workflow/status/tonywied17/zero-server/ci.yml?branch=main&style=flat-square&logo=githubactions&logoColor=white&label=CI" alt="CI"></a>
15
15
  <a href="https://github.com/tonywied17/zero-server/actions"><img src="https://img.shields.io/badge/tests-7443%20passing-brightgreen?style=flat-square&logo=vitest&logoColor=white" alt="tests"></a>
16
- <a href="https://github.com/tonywied17/zero-server"><img src="https://img.shields.io/badge/coverage-55.35%25-yellow?style=flat-square&logo=vitest&logoColor=white" alt="coverage"></a>
16
+ <a href="https://github.com/tonywied17/zero-server"><img src="https://img.shields.io/badge/coverage-96.97%25-brightgreen?style=flat-square&logo=vitest&logoColor=white" alt="coverage"></a>
17
17
  <a href="https://z-server.dev"><img src="https://img.shields.io/badge/docs-z--server.dev-00d8e0?style=flat-square&logo=readthedocs&logoColor=white" alt="docs"></a>
18
18
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-00d8e0?style=flat-square&logo=opensourceinitiative&logoColor=white" alt="MIT"></a>
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 from a single `require`.**
22
+ > **Zero-dependency backend framework for Node.js — routing, ORM, auth, WebSocket, SSE, observability, and 20+ middleware as a set of focused, standalone scoped packages.**
23
23
 
24
24
  <p align="center">
25
25
  <strong>
@@ -31,15 +31,15 @@
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
+
34
36
  ```bash
35
- npm install @zero-server/sdk
37
+ npm install @zero-server/core @zero-server/body @zero-server/middleware
36
38
  ```
37
39
 
38
40
  Requires Node.js 18+. No external dependencies — everything is built on Node.js core APIs.
39
41
 
40
- ### Or install only what you need (scoped packages)
41
-
42
- `@zero-server/sdk` is the meta-package that re-exports every module. If you want a smaller install footprint, every section of the SDK is also published as its own scoped package and re-exports just that surface from the SDK:
42
+ ### Packages
43
43
 
44
44
  | Package | Surface |
45
45
  |---|---|
@@ -57,18 +57,30 @@ Requires Node.js 18+. No external dependencies — everything is built on Node.j
57
57
  | `@zero-server/errors` | every typed `HttpError` class plus ORM/framework errors |
58
58
  | `@zero-server/cli` | programmatic `CLI` / `runCLI` entry points for `zh` / `zs` |
59
59
 
60
+ > Each scoped package is fully standalone at runtime — its own `index.js`, its own bundled lib, its own types. Install any combination; versions stay aligned across the `@zero-server/*` release set.
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
+
60
66
  ```bash
61
- npm install @zero-server/core @zero-server/body @zero-server/middleware
67
+ npm install @zero-server/sdk
62
68
  ```
63
69
 
64
- > All scoped packages depend on `@zero-server/sdk` and pin to the same version, so mixing-and-matching is safe.
70
+ ```js
71
+ const { createApp, json } = require('@zero-server/sdk')
72
+ ```
73
+
74
+ Production apps and libraries should prefer the focused scoped packages above.
65
75
 
66
76
  ---
67
77
 
68
78
  ## Quick Start
69
79
 
70
80
  ```js
71
- const { createApp, json } = require('@zero-server/sdk')
81
+ const { createApp } = require('@zero-server/core')
82
+ const { json } = require('@zero-server/body')
83
+
72
84
  const app = createApp()
73
85
 
74
86
  app.use(json())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zero-server/sdk",
3
- "version": "0.9.2",
3
+ "version": "0.9.5",
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": {
@@ -0,0 +1,14 @@
1
+ // Re-exports for @zero-server/body — body parser types
2
+ export {
3
+ BodyParserOptions,
4
+ JsonParserOptions,
5
+ UrlencodedParserOptions,
6
+ TextParserOptions,
7
+ MultipartOptions,
8
+ MultipartFile,
9
+ json,
10
+ urlencoded,
11
+ text,
12
+ raw,
13
+ multipart,
14
+ } from './middleware';
package/types/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Re-exports for @zero-server/cli — CLI runner types
2
+ export { CLI, runCLI } from './orm';