@spfn/core 0.3.0-beta.2 → 0.3.0-beta.4
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 +79 -6
- package/dist/app-config/index.d.ts +96 -0
- package/dist/app-config/index.js +58 -0
- package/dist/app-config/index.js.map +1 -0
- package/dist/config/index.d.ts +0 -63
- package/dist/config/index.js +11 -11
- package/dist/config/index.js.map +1 -1
- package/dist/contract/index.d.ts +5 -4
- package/dist/db/index.d.ts +1 -1
- package/dist/db/index.js.map +1 -1
- package/dist/{define-middleware-DfDP39Nq.d.ts → define-middleware-CVKgqo8S.d.ts} +1 -1
- package/dist/middleware/index.d.ts +6 -2
- package/dist/middleware/index.js +1 -1
- package/dist/middleware/index.js.map +1 -1
- package/dist/ops/index.d.ts +4 -3
- package/dist/ops/index.js +1 -1
- package/dist/ops/index.js.map +1 -1
- package/dist/route/index.d.ts +5 -3
- package/dist/route/index.js +1 -1
- package/dist/route/index.js.map +1 -1
- package/dist/{router-Qbssr11H.d.ts → route-builder-2ani2jEI.d.ts} +3 -126
- package/dist/router-DJdpwuB6.d.ts +127 -0
- package/dist/server/index.d.ts +111 -9
- package/dist/server/index.js +561 -30
- package/dist/server/index.js.map +1 -1
- package/dist/{types-D1c57Ko-.d.ts → types-ClQVomgV.d.ts} +1 -1
- package/package.json +6 -1
|
@@ -92,7 +92,7 @@ type NamedMiddlewareFactory<TName extends string = string, TArgs extends any[] =
|
|
|
92
92
|
* .build();
|
|
93
93
|
*
|
|
94
94
|
* // routes.ts - skip by name
|
|
95
|
-
* export const publicRoute = route.get('/
|
|
95
|
+
* export const publicRoute = route.get('/status')
|
|
96
96
|
* .skip(['auth']) // ✅ Type-safe! Autocomplete!
|
|
97
97
|
* .handler(async (c) => c.success({ status: 'ok' }));
|
|
98
98
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Next, MiddlewareHandler } from 'hono';
|
|
2
|
-
import { N as NamedMiddlewareFactory, a as NamedMiddleware } from '../define-middleware-
|
|
2
|
+
import { N as NamedMiddlewareFactory, a as NamedMiddleware } from '../define-middleware-CVKgqo8S.js';
|
|
3
3
|
import { Redis, Cluster } from 'ioredis';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -106,7 +106,11 @@ interface RequestLoggerOptions {
|
|
|
106
106
|
*
|
|
107
107
|
* Supports exact match and prefix match (e.g., '/health' excludes '/health/db').
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* `/_core/health` is where the built-in health endpoint always answers, so a
|
|
110
|
+
* readiness probe usually points there rather than at `/health`. Leaving it
|
|
111
|
+
* out of the default fills the log with one line per probe interval.
|
|
112
|
+
*
|
|
113
|
+
* @default ['/_core/health', '/health', '/ping', '/favicon.ico']
|
|
110
114
|
*
|
|
111
115
|
* @example
|
|
112
116
|
* ```typescript
|
package/dist/middleware/index.js
CHANGED
|
@@ -1326,7 +1326,7 @@ function rateLimitPolicy(name, fallback) {
|
|
|
1326
1326
|
|
|
1327
1327
|
// src/middleware/request-logger.ts
|
|
1328
1328
|
var DEFAULT_CONFIG = {
|
|
1329
|
-
excludePaths: ["/health", "/ping", "/favicon.ico"],
|
|
1329
|
+
excludePaths: ["/_core/health", "/health", "/ping", "/favicon.ico"],
|
|
1330
1330
|
sensitiveFields: ["password", "token", "apiKey", "secret", "authorization"],
|
|
1331
1331
|
slowRequestThreshold: 1e3
|
|
1332
1332
|
};
|