@oakbun/ws 3.0.0 → 4.0.0

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/dist/index.d.ts +6 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1236,6 +1236,12 @@ interface Plugin<TCtx, TAdd extends object> {
1236
1236
  * GET /nav returns these filtered by the plugin's permissions for the current user.
1237
1237
  */
1238
1238
  nav?: NavItem[];
1239
+ /**
1240
+ * Optional guards applied to all routes contributed via .modules().
1241
+ * Run after global guards, before module-level guards.
1242
+ * Return null to pass, return a Response to block.
1243
+ */
1244
+ guards?: Guard<any>[];
1239
1245
  install?: (hooks: HookExecutor) => Promise<void> | void;
1240
1246
  request: (ctx: TCtx) => Promise<TCtx & TAdd> | (TCtx & TAdd);
1241
1247
  teardown?: () => Promise<void> | void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oakbun/ws",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "WebSocket plugin for the OakBun framework.",
5
5
  "author": "René (SchildW3rk)",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "prepublishOnly": "bun run build"
42
42
  },
43
43
  "peerDependencies": {
44
- "oakbun": ">=0.4.0",
44
+ "oakbun": ">=0.5.0",
45
45
  "zod": "^3.0.0 || ^4.0.0"
46
46
  },
47
47
  "devDependencies": {