shokupan 0.15.2 → 0.16.1
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 +10 -2
- package/dist/analyzer.impl-5aCqtook.cjs.map +1 -1
- package/dist/analyzer.impl-COdN69gL.js.map +1 -1
- package/dist/cli.cjs +11 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +11 -1
- package/dist/cli.js.map +1 -1
- package/dist/context.d.ts +14 -0
- package/dist/decorators/hooks.d.ts +4 -0
- package/dist/{index-BsMp6pBd.js → index-ChPMpHCt.js} +5421 -5076
- package/dist/index-ChPMpHCt.js.map +1 -0
- package/dist/{index-B-bQ7kZy.cjs → index-DGW-KI1t.cjs} +7276 -6929
- package/dist/index-DGW-KI1t.cjs.map +1 -0
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +122 -119
- package/dist/{level-C8w1C6JX.cjs → level-14ZzYhXc.cjs} +3 -5
- package/dist/level-14ZzYhXc.cjs.map +1 -0
- package/dist/{level-BH1qmHgY.js → level-B47sUPce.js} +3 -5
- package/dist/level-B47sUPce.js.map +1 -0
- package/dist/plugins/application/dashboard/plugin.d.ts +3 -0
- package/dist/plugins/application/graceful-shutdown/index.d.ts +1 -0
- package/dist/plugins/application/graceful-shutdown/plugin.d.ts +28 -0
- package/dist/plugins/application/scalar.d.ts +1 -1
- package/dist/router.d.ts +10 -1
- package/dist/shokupan.d.ts +4 -9
- package/dist/{sqlite-C2dVWOnw.js → sqlite-CKullarQ.js} +12 -10
- package/dist/sqlite-CKullarQ.js.map +1 -0
- package/dist/{sqlite-Bf3Y44PF.cjs → sqlite-Z7Jt65XL.cjs} +34 -10
- package/dist/sqlite-Z7Jt65XL.cjs.map +1 -0
- package/dist/{surreal-Ctjsrb6S.cjs → surreal-BglaabNG.cjs} +3 -4
- package/dist/surreal-BglaabNG.cjs.map +1 -0
- package/dist/{surreal-C6kHsjO6.js → surreal-CblXhCcZ.js} +3 -4
- package/dist/surreal-CblXhCcZ.js.map +1 -0
- package/dist/util/adapter/bun.d.ts +4 -1
- package/dist/util/adapter/interface.d.ts +2 -1
- package/dist/util/adapter/node.d.ts +4 -1
- package/dist/util/dev-ssl.d.ts +10 -0
- package/dist/util/logger.d.ts +46 -4
- package/dist/util/symbol.d.ts +1 -0
- package/dist/util/types.d.ts +16 -2
- package/dist/websocket.d.ts +17 -1
- package/package.json +19 -34
- package/dist/index-B-bQ7kZy.cjs.map +0 -1
- package/dist/index-BsMp6pBd.js.map +0 -1
- package/dist/knex-CnHqFsjZ.js +0 -218
- package/dist/knex-CnHqFsjZ.js.map +0 -1
- package/dist/knex-DYPtgZG5.cjs +0 -240
- package/dist/knex-DYPtgZG5.cjs.map +0 -1
- package/dist/level-BH1qmHgY.js.map +0 -1
- package/dist/level-C8w1C6JX.cjs.map +0 -1
- package/dist/sqlite-Bf3Y44PF.cjs.map +0 -1
- package/dist/sqlite-C2dVWOnw.js.map +0 -1
- package/dist/surreal-C6kHsjO6.js.map +0 -1
- package/dist/surreal-Ctjsrb6S.cjs.map +0 -1
- package/dist/util/adapter/datastore/knex.d.ts +0 -29
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Shokupan is designed to make building APIs delightful again. With zero-config de
|
|
|
13
13
|
## ✨ Features
|
|
14
14
|
|
|
15
15
|
- 🎯 **TypeScript First** - End-to-end type safety with decorators and generics. No manual types needed.
|
|
16
|
-
- 🛠️ **Zero Config** - Works effectively out of the box.
|
|
16
|
+
- 🛠️ **Zero Config** - Works effectively out of the box. Automatically serves over Local HTTPS with a Debug Dashboard and API Explorer in Dev Mode.
|
|
17
17
|
- 🚀 **Built for Bun** - Native [Bun](https://bun.sh/) performance with instant startup.
|
|
18
18
|
- 🔍 **Debug Dashboard** - Visual inspector for your routes, middleware, and request flow.
|
|
19
19
|
- 📝 **Auto OpenAPI** - Generate [OpenAPI](https://www.openapis.org/) specs automatically from routes.
|
|
@@ -47,7 +47,15 @@ app.mount('/scalar', new ScalarPlugin({
|
|
|
47
47
|
app.listen();
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
That's it!
|
|
50
|
+
That's it! In development mode, your server is automatically running securely at `https://localhost:3000` 🎉
|
|
51
|
+
|
|
52
|
+
### Development Mode
|
|
53
|
+
|
|
54
|
+
By default, when `NODE_ENV` is not `production` (or `development: true` in config), Shokupan automatically enhances your developer experience:
|
|
55
|
+
- **Local HTTPS:** Generates and trusts a local CA to serve your API over `https://localhost:3000` automatically.
|
|
56
|
+
- **Debug Dashboard:** Mounted at `https://localhost:3000/dashboard` to inspect requests and middleware.
|
|
57
|
+
- **API Explorer:** Mounted at `https://localhost:3000/dashboard/explorer` to interact with your OpenAPI spec.
|
|
58
|
+
- **Detailed Errors:** Uncaught exceptions render a beautiful HTML stack trace instead of a plain text 500.
|
|
51
59
|
|
|
52
60
|
## 💡 Core Concepts
|
|
53
61
|
|