@guren/server 2.0.0 → 2.1.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/dist/{ConsoleKernel-DlK9j2Lu.d.ts → ConsoleKernel-CJg975mp.d.ts} +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-4DW4GRWF.js → chunk-5SZTEZ22.js} +2 -2
- package/dist/{chunk-HONCNQXZ.js → chunk-J6ETA476.js} +4 -5
- package/dist/{email-verification-D8N7P6Pu.d.ts → email-verification-Dx426KLn.d.ts} +11 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +60 -27
- package/dist/lambda/index.d.ts +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/notifications/index.d.ts +2 -2
- package/dist/queue/index.d.ts +2 -2
- package/dist/redis/index.d.ts +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +1 -1
- package/dist/{validation-CDR7lRE8.d.ts → validation-yAL53e1S.d.ts} +32 -7
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CommandClass, a as Container, O as OutputInterface, b as ConsoleKernelOptions } from './validation-
|
|
1
|
+
import { C as CommandClass, a as Container, O as OutputInterface, b as ConsoleKernelOptions } from './validation-yAL53e1S.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Console kernel for managing and executing commands.
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { A as AuthManager, B as BaseUserProvider, M as ModelUserProvider } from
|
|
|
3
3
|
import { A as Authenticatable, e as Guard, U as UserProvider, F as Session, a as AuthCredentials } from '../api-token-D24VPr_E.js';
|
|
4
4
|
export { m as API_TOKEN_KEY, j as ApiToken, i as ApiTokenStore, f as AttachContextOptions, g as AuthContext, b as AuthManagerContract, c as AuthManagerOptions, B as BearerTokenMiddlewareOptions, n as CreateApiTokenOptions, o as CreateApiTokenResult, D as DefaultSanitizedKeys, d as GuardContext, G as GuardFactory, M as MemoryApiTokenStore, p as MemoryOAuthStateStore, r as OAuthAuthorizeOptions, s as OAuthCallbackPayload, t as OAuthFallbackEmail, l as OAuthManager, u as OAuthManagerOptions, v as OAuthProviderConfig, w as OAuthProviderFactoryInput, x as OAuthStateConfig, k as OAuthStatePayload, O as OAuthStateStore, y as OAuthTokenResult, z as OAuthUserProfile, P as ProviderFactory, E as Sanitized, H as buildOAuthAuthorizeUrl, I as buildOAuthRedirectUrl, J as createApiToken, K as createBearerTokenMiddleware, L as createDiscordOAuthProviderConfig, N as createGitHubOAuthProviderConfig, Q as createGoogleOAuthProviderConfig, R as createOAuthManager, T as createOAuthState, W as exchangeOAuthCode, X as fetchOAuthUserProfile, Y as getApiToken, Z as getApiTokenOrFail, $ as getUserApiTokens, a0 as parseApiToken, a1 as parseOAuthRedirectUrl, a2 as revokeAllApiTokens, a3 as revokeApiToken, a4 as sanitizeOAuthRedirect, a5 as tokenCan, a6 as tokenCanAll, a7 as tokenCanAny, a8 as verifyApiToken, a9 as verifyOAuthState } from '../api-token-D24VPr_E.js';
|
|
5
5
|
import { PlainObject, Model } from '@guren/orm';
|
|
6
|
-
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, q as buildTokenUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, s as generateId, t as generateToken, u as hashToken, m as isEmailVerified, p as parsePasswordResetUrl, w as parseTokenUrl, n as parseVerificationUrl, r as requireVerifiedEmail, x as secureCompare, y as secureStringCompare, v as verifyEmailToken, o as verifyPasswordResetToken } from '../email-verification-
|
|
6
|
+
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, q as buildTokenUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, s as generateId, t as generateToken, u as hashToken, m as isEmailVerified, p as parsePasswordResetUrl, w as parseTokenUrl, n as parseVerificationUrl, r as requireVerifiedEmail, x as secureCompare, y as secureStringCompare, v as verifyEmailToken, o as verifyPasswordResetToken } from '../email-verification-Dx426KLn.js';
|
|
7
7
|
import 'hono';
|
|
8
8
|
|
|
9
9
|
interface NodeHasherOptions {
|
package/dist/auth/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import standard from "figlet/importable-fonts/Standard.js";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@guren/server",
|
|
9
|
-
version: "2.
|
|
9
|
+
version: "2.1.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
repository: {
|
|
@@ -115,7 +115,7 @@ var package_default = {
|
|
|
115
115
|
test: "bun test"
|
|
116
116
|
},
|
|
117
117
|
dependencies: {
|
|
118
|
-
"@guren/orm": "^2.
|
|
118
|
+
"@guren/orm": "^2.1.0",
|
|
119
119
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
120
120
|
chalk: "^5.3.0",
|
|
121
121
|
consola: "^3.4.2",
|
|
@@ -561,11 +561,10 @@ function generateId() {
|
|
|
561
561
|
}
|
|
562
562
|
function secureCompare(a, b) {
|
|
563
563
|
if (a.length !== b.length) return false;
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}
|
|
564
|
+
const bufA = Buffer.from(a, "hex");
|
|
565
|
+
const bufB = Buffer.from(b, "hex");
|
|
566
|
+
if (bufA.length !== a.length / 2 || bufB.length !== b.length / 2) return false;
|
|
567
|
+
return timingSafeEqual2(bufA, bufB);
|
|
569
568
|
}
|
|
570
569
|
function secureStringCompare(a, b) {
|
|
571
570
|
const bufA = Buffer.from(a, "utf8");
|
|
@@ -14,6 +14,13 @@ declare function generateToken(length?: number): string;
|
|
|
14
14
|
declare function generateId(): string;
|
|
15
15
|
/**
|
|
16
16
|
* Securely compare two hex strings using timing-safe comparison.
|
|
17
|
+
*
|
|
18
|
+
* Input that is not strict, even-length hex is rejected rather than compared:
|
|
19
|
+
* `Buffer.from(value, 'hex')` stops at the first invalid pair, so 'zzzz' and
|
|
20
|
+
* 'yyyy' both decode to nothing — and 'abcz' and 'abdz' both decode to the
|
|
21
|
+
* one byte they share — and would compare equal. A short decode is how the
|
|
22
|
+
* decoder reports that, which beats restating its grammar in a regex here.
|
|
23
|
+
* Use `secureStringCompare` for values that are not hex.
|
|
17
24
|
*/
|
|
18
25
|
declare function secureCompare(a: string, b: string): boolean;
|
|
19
26
|
/**
|
|
@@ -316,11 +323,13 @@ declare function isEmailVerified(user: {
|
|
|
316
323
|
*/
|
|
317
324
|
declare function requireVerifiedEmail(options?: {
|
|
318
325
|
redirectTo?: string;
|
|
319
|
-
getUser?: (ctx:
|
|
326
|
+
getUser?: (ctx: {
|
|
327
|
+
get: <T = unknown>(key: string) => T;
|
|
328
|
+
}) => Promise<{
|
|
320
329
|
emailVerifiedAt?: Date | null;
|
|
321
330
|
} | null>;
|
|
322
331
|
}): (ctx: {
|
|
323
|
-
get: (key: string) =>
|
|
332
|
+
get: <T = unknown>(key: string) => T;
|
|
324
333
|
redirect: (url: string) => Response;
|
|
325
334
|
}, next: () => Promise<void>) => Promise<Response | undefined>;
|
|
326
335
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { E as ErrorResponse, S as ServiceProvider, a as Container, e as ServiceProviderConstructor, I as InputInterface, P as ParsedSignature, f as OptionDefinition, g as CommandInstance, O as OutputInterface, h as ServiceBindings, Q as QueueManager, N as NotificationManager } from './validation-
|
|
2
|
-
export { A as Application, i as ApplicationListenOptions, j as ApplicationOptions, k as ArgumentDefinition, m as AuthPayload, n as AuthPluginOptions, o as CSRF_FORM_FIELD, p as CSRF_HEADER_NAME, q as CSRF_TOKEN_KEY, C as CommandClass, b as ConsoleKernelOptions, r as ContainerProvider, t as ContextualBinding, u as ContextualBindingBuilder, v as ContextualNeedsBuilder, w as Controller, x as ControllerInertiaProps, y as CsrfOptions, z as DatabaseChannelOptions, B as DatabaseNotification, F as ExceptionClass, H as ExceptionHandler, J as ExceptionHandlerOptions, K as ExceptionRenderer, L as ExceptionReporter, M as FailedJob, R as GurenModule, T as HostAuthorizationOptions, U as HstsOptions, V as InertiaDocumentContext, W as InertiaDocumentOptions, X as InertiaOptions, Y as InertiaPagePayload, Z as InertiaResponse, _ as InertiaSharedProps, $ as InertiaSsrContext, a0 as InertiaSsrOptions, a1 as InertiaSsrRenderer, a2 as InertiaSsrResult, a3 as InferInertiaProps, a4 as Job, a5 as JobClass, a6 as JobFailureHandler, a7 as JobHandler, a8 as JobOptions, a9 as ModuleDefinition, aa as Notifiable, ab as Notification, ac as NotificationAttachment, ad as NotificationChannel, ae as NotificationChannelFactory, af as NotificationClass, ag as NotificationMailMessage, ah as NotificationManagerOptions, ai as ProgressInterface, aj as PromptInterface, ak as ProviderManager, al as QueueConfig, am as QueueDriver, an as QueueDriverFactory, ao as QueuedJob, ap as RendererRegistration, aq as ResolvedSharedInertiaProps, ar as ResourceRouteOptions, as as RouteBuilder, at as RouteContractOptions, au as RouteDefinition, av as
|
|
1
|
+
import { E as ErrorResponse, S as ServiceProvider, a as Container, e as ServiceProviderConstructor, I as InputInterface, P as ParsedSignature, f as OptionDefinition, g as CommandInstance, O as OutputInterface, h as ServiceBindings, Q as QueueManager, N as NotificationManager } from './validation-yAL53e1S.js';
|
|
2
|
+
export { A as Application, i as ApplicationListenOptions, j as ApplicationOptions, k as ArgumentDefinition, m as AuthPayload, n as AuthPluginOptions, o as CSRF_FORM_FIELD, p as CSRF_HEADER_NAME, q as CSRF_TOKEN_KEY, C as CommandClass, b as ConsoleKernelOptions, r as ContainerProvider, t as ContextualBinding, u as ContextualBindingBuilder, v as ContextualNeedsBuilder, w as Controller, x as ControllerInertiaProps, y as CsrfOptions, z as DatabaseChannelOptions, B as DatabaseNotification, F as ExceptionClass, H as ExceptionHandler, J as ExceptionHandlerOptions, K as ExceptionRenderer, L as ExceptionReporter, M as FailedJob, R as GurenModule, T as HostAuthorizationOptions, U as HstsOptions, V as InertiaDocumentContext, W as InertiaDocumentOptions, X as InertiaOptions, Y as InertiaPagePayload, Z as InertiaResponse, _ as InertiaSharedProps, $ as InertiaSsrContext, a0 as InertiaSsrOptions, a1 as InertiaSsrRenderer, a2 as InertiaSsrResult, a3 as InferInertiaProps, a4 as Job, a5 as JobClass, a6 as JobFailureHandler, a7 as JobHandler, a8 as JobOptions, a9 as ModuleDefinition, aa as Notifiable, ab as Notification, ac as NotificationAttachment, ad as NotificationChannel, ae as NotificationChannelFactory, af as NotificationClass, ag as NotificationMailMessage, ah as NotificationManagerOptions, ai as ProgressInterface, aj as PromptInterface, ak as ProviderManager, al as QueueConfig, am as QueueDriver, an as QueueDriverFactory, ao as QueuedJob, ap as RendererRegistration, aq as ResolvedSharedInertiaProps, ar as ResourceRouteOptions, as as RouteBuilder, at as RouteContractOptions, au as RouteDefinition, av as RouteMiddlewareInput, aw as RouteOpenApiMetadata, ax as RouteResourceAction, ay as Router, az as ScheduledCommand, aA as SecurityHeadersOptions, aB as SentNotification, aC as ServiceBinding, aD as ServiceClass, aE as ServiceFactory, aF as ServiceProviderClass, aG as ServiceProviderOptions, aH as SharedInertiaPropsResolver, aI as SlackAttachment, aJ as SlackBlock, aK as SlackMessage, aL as VALIDATED_DATA_KEY, aM as ValidateRequestOptions, aN as ValidationSchema, aO as WorkerOptions, aP as abort, aQ as abortIf, aR as abortUnless, aS as clearJobRegistry, aT as createApp, aU as createContainer, aV as createCsrfMiddleware, aW as createExceptionHandler, aX as createHostAuthorizationMiddleware, aY as createNotificationManager, aZ as createQueueManager, a_ as createSecurityHeaders, a$ as csrfField, b0 as defineModule, b1 as formatValidationErrors, b2 as getContainer, b3 as getCsrfToken, b4 as getExceptionHandler, b5 as getInertiaSharedPropsResolver, b6 as getJob, b7 as getNotificationManager, b8 as getQueueDriver, b9 as getRegisteredJobs, ba as getValidatedData, bb as inertia, bc as mountModuleRoutes, bd as parseRequestPayload, be as registerJob, bf as resolve, bg as resolveJobName, bh as setContainer, bi as setExceptionHandler, bj as setInertiaDocument, bk as setInertiaSharedProps, bl as setInertiaSsrRenderer, bm as setNotificationManager, bn as setQueueDriver, bo as shareInertiaProps, bp as validate, bq as validateRequest, br as validateRequestWith, bs as validateSafe, bt as verifyCsrfToken } from './validation-yAL53e1S.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Context, MiddlewareHandler } from 'hono';
|
|
5
5
|
export { Context } from 'hono';
|
|
6
6
|
import { P as PasswordHasher } from './AuthManager-DBP4KYsx.js';
|
|
7
7
|
export { A as AuthManager, B as BaseUserProvider, M as ModelUserProvider } from './AuthManager-DBP4KYsx.js';
|
|
8
8
|
export { AuthenticatableModel, NodeHasher, ScryptHasher, SessionGuard } from './auth/index.js';
|
|
9
|
-
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, m as isEmailVerified, p as parsePasswordResetUrl, n as parseVerificationUrl, r as requireVerifiedEmail, v as verifyEmailToken, o as verifyPasswordResetToken } from './email-verification-
|
|
9
|
+
export { b as EmailVerificationConfig, a as EmailVerificationToken, c as EmailVerificationTokenResult, E as EmailVerificationTokenStore, M as MemoryEmailVerificationStore, d as MemoryPasswordResetStore, e as PasswordResetConfig, f as PasswordResetTokenResult, P as PasswordResetTokenStore, g as buildPasswordResetUrl, h as buildVerificationUrl, i as completeEmailVerification, j as completePasswordReset, k as createEmailVerificationToken, l as createPasswordResetToken, m as isEmailVerified, p as parsePasswordResetUrl, n as parseVerificationUrl, r as requireVerifiedEmail, v as verifyEmailToken, o as verifyPasswordResetToken } from './email-verification-Dx426KLn.js';
|
|
10
10
|
import { g as AuthContext } from './api-token-D24VPr_E.js';
|
|
11
11
|
export { m as API_TOKEN_KEY, j as ApiToken, i as ApiTokenStore, a as AuthCredentials, c as AuthManagerOptions, A as Authenticatable, B as BearerTokenMiddlewareOptions, n as CreateApiTokenOptions, o as CreateApiTokenResult, D as DefaultSanitizedKeys, e as Guard, d as GuardContext, G as GuardFactory, M as MemoryApiTokenStore, p as MemoryOAuthStateStore, q as MemorySessionStore, r as OAuthAuthorizeOptions, s as OAuthCallbackPayload, t as OAuthFallbackEmail, l as OAuthManager, u as OAuthManagerOptions, v as OAuthProviderConfig, w as OAuthProviderFactoryInput, x as OAuthStateConfig, k as OAuthStatePayload, O as OAuthStateStore, y as OAuthTokenResult, z as OAuthUserProfile, P as ProviderFactory, E as Sanitized, F as Session, h as SessionData, S as SessionStore, U as UserProvider, H as buildOAuthAuthorizeUrl, I as buildOAuthRedirectUrl, J as createApiToken, K as createBearerTokenMiddleware, L as createDiscordOAuthProviderConfig, N as createGitHubOAuthProviderConfig, Q as createGoogleOAuthProviderConfig, R as createOAuthManager, T as createOAuthState, V as createSessionMiddleware, W as exchangeOAuthCode, X as fetchOAuthUserProfile, Y as getApiToken, Z as getApiTokenOrFail, _ as getSessionFromContext, $ as getUserApiTokens, a0 as parseApiToken, a1 as parseOAuthRedirectUrl, a2 as revokeAllApiTokens, a3 as revokeApiToken, a4 as sanitizeOAuthRedirect, a5 as tokenCan, a6 as tokenCanAll, a7 as tokenCanAny, a8 as verifyApiToken, a9 as verifyOAuthState } from './api-token-D24VPr_E.js';
|
|
12
12
|
export { M as Middleware, d as defineMiddleware, j as jsonResponse } from './index-9_Jzj5jo.js';
|
|
@@ -39,7 +39,7 @@ import { B as BroadcastManager } from './BroadcastManager-D8KoJxiV.js';
|
|
|
39
39
|
export { A as AuthMiddlewareOptions, a as BroadcastDriver, b as BroadcastDriverFactory, c as BroadcastEvent, d as BroadcastManagerOptions, e as BroadcastableEvent, C as Channel, f as ChannelAuthorizer, g as ChannelRegistration, P as PresenceBroadcastDriver, h as PresenceChannel, i as PresenceChannelAuthorizer, j as PresenceMember, k as PrivateChannel, S as SSEClient, l as SSEMiddlewareOptions, W as WebSocketClient, m as createBroadcastManager, n as getBroadcastManager, s as setBroadcastManager } from './BroadcastManager-D8KoJxiV.js';
|
|
40
40
|
export { RedisClient as BroadcastRedisClient, RedisDriverOptions as BroadcastRedisDriverOptions, MemoryDriver as MemoryBroadcastDriver, RedisDriver as RedisBroadcastDriver, createTypedBroadcaster } from './broadcasting/index.js';
|
|
41
41
|
import * as readline from 'readline';
|
|
42
|
-
export { C as ConsoleKernel, c as createConsoleKernel } from './ConsoleKernel-
|
|
42
|
+
export { C as ConsoleKernel, c as createConsoleKernel } from './ConsoleKernel-CJg975mp.js';
|
|
43
43
|
export { R as AuthResponse, A as AuthUser, a as AuthorizationResponse, b as AuthorizeOptions, G as Gate, c as GateCallback, d as GateDefinition, e as GateOptions, P as PolicyClass, f as PolicyInterface, g as PolicyMethod, h as PolicyRegistration, i as ResourceAction, j as ResponseBuilder, k as authorizeAbility, l as can, m as cannot, n as createGate, o as defineGate, p as getGate, s as setGate } from './Gate-CynjZCtS.js';
|
|
44
44
|
export { AuthorizedContext, Policy, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, definePolicy, withAuthorization } from './authorization/index.js';
|
|
45
45
|
export { A as AppKeyring, D as DecryptOptions, a as EncryptOptions, b as EncryptedPayload, E as Encrypter, c as EncrypterConfig, H as HashAlgorithm, d as HmacOptions, P as PasswordHashOptions, R as RandomStringOptions, e as createEncrypter, f as decrypt, g as deriveAppKey, h as deriveAppKeyring, i as encrypt, j as generateAppKey, k as generateKey, l as getAppKeyringFromEnv, m as getEncrypter, n as normalizeAppKey, p as parseAppKey, o as parsePreviousAppKeys, s as setEncrypter } from './app-key-CsBfRC_Q.js';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
logDevServerBanner,
|
|
3
3
|
parseImportMap,
|
|
4
4
|
startViteDevServer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5SZTEZ22.js";
|
|
6
6
|
import {
|
|
7
7
|
PendingSchedule,
|
|
8
8
|
Schedule,
|
|
@@ -178,7 +178,7 @@ import {
|
|
|
178
178
|
verifyEmailToken,
|
|
179
179
|
verifyOAuthState,
|
|
180
180
|
verifyPasswordResetToken
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-J6ETA476.js";
|
|
182
182
|
import {
|
|
183
183
|
Gate,
|
|
184
184
|
Policy,
|
|
@@ -400,6 +400,21 @@ function capabilitiesOf(handler) {
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
// src/mvc/Router.ts
|
|
403
|
+
function assertSyncGroupCallback(result, method) {
|
|
404
|
+
if (typeof result?.then !== "function") return;
|
|
405
|
+
throw new Error(
|
|
406
|
+
`Router.${method}() callback returned a promise. Group scopes are applied synchronously, so routes registered after an await would silently lose the group's prefix and middleware. Register the routes synchronously, and await anything they depend on before opening the group.`
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
function partitionMiddleware(items) {
|
|
410
|
+
const names = [];
|
|
411
|
+
const handlers = [];
|
|
412
|
+
for (const item of items) {
|
|
413
|
+
if (typeof item === "string") names.push(item);
|
|
414
|
+
else handlers.push(item);
|
|
415
|
+
}
|
|
416
|
+
return { names, handlers };
|
|
417
|
+
}
|
|
403
418
|
var RESOURCE_ACTIONS = [
|
|
404
419
|
{ method: "index", suffix: "", httpMethod: "get" },
|
|
405
420
|
{ method: "create", suffix: "/create", httpMethod: "get" },
|
|
@@ -427,8 +442,12 @@ var Router = class {
|
|
|
427
442
|
this.middlewareGroups.set(name, middlewareNames);
|
|
428
443
|
return this;
|
|
429
444
|
}
|
|
430
|
-
|
|
431
|
-
|
|
445
|
+
/**
|
|
446
|
+
* Open a middleware scope for the routes registered through the returned
|
|
447
|
+
* builder. See {@link RouteMiddlewareInput}.
|
|
448
|
+
*/
|
|
449
|
+
middleware(...items) {
|
|
450
|
+
return new RouterMiddlewareGroupBuilder(this, items);
|
|
432
451
|
}
|
|
433
452
|
bind(param, modelOrResolver) {
|
|
434
453
|
if (typeof modelOrResolver === "function" && "findOrFail" in modelOrResolver) {
|
|
@@ -467,8 +486,11 @@ var Router = class {
|
|
|
467
486
|
}
|
|
468
487
|
group(prefix, callback) {
|
|
469
488
|
this.prefixStack.push(prefix);
|
|
470
|
-
|
|
471
|
-
|
|
489
|
+
try {
|
|
490
|
+
assertSyncGroupCallback(callback(this), "group");
|
|
491
|
+
} finally {
|
|
492
|
+
this.prefixStack.pop();
|
|
493
|
+
}
|
|
472
494
|
return this;
|
|
473
495
|
}
|
|
474
496
|
route(name, params = {}) {
|
|
@@ -501,7 +523,8 @@ var Router = class {
|
|
|
501
523
|
const resolvedMiddlewares = this.resolveMiddlewareNames(route.routeMiddlewareNames);
|
|
502
524
|
const handler = resolveHandler(route.handler, this.modelBindings, options.container, route.bindings, route.path);
|
|
503
525
|
const contractMiddleware = createContractValidationMiddleware(route);
|
|
504
|
-
const
|
|
526
|
+
const inlineMiddlewares = [...route.scopedMiddlewares, ...route.middlewares];
|
|
527
|
+
const allMiddlewares = contractMiddleware ? [...resolvedMiddlewares, ...inlineMiddlewares, contractMiddleware, handler] : [...resolvedMiddlewares, ...inlineMiddlewares, handler];
|
|
505
528
|
mountRoute(app, route.method, route.path, ...allMiddlewares);
|
|
506
529
|
}
|
|
507
530
|
}
|
|
@@ -518,21 +541,24 @@ var Router = class {
|
|
|
518
541
|
this.modelBindingNames.clear();
|
|
519
542
|
}
|
|
520
543
|
definitions() {
|
|
521
|
-
return this.registry.map(({ method, path, name, schemas, openapi, routeMiddlewareNames, middlewares, handler, bindings }) => ({
|
|
544
|
+
return this.registry.map(({ method, path, name, schemas, openapi, routeMiddlewareNames, middlewares, scopedMiddlewares, handler, bindings }) => ({
|
|
522
545
|
method,
|
|
523
546
|
path,
|
|
524
547
|
name,
|
|
525
548
|
schemas,
|
|
526
549
|
middlewareNames: [...routeMiddlewareNames],
|
|
550
|
+
// Route-local only, so a group-scoped handler does not make every route
|
|
551
|
+
// in the group report middleware it never attached (`guren audit` warns
|
|
552
|
+
// per route on this flag). Capabilities still see the whole chain.
|
|
527
553
|
hasInlineMiddleware: middlewares.length > 0,
|
|
528
|
-
capabilities: this.aggregateCapabilities(routeMiddlewareNames, middlewares),
|
|
554
|
+
capabilities: this.aggregateCapabilities(routeMiddlewareNames, [...scopedMiddlewares, ...middlewares]),
|
|
529
555
|
controller: isControllerAction(handler) ? { name: handler[0].name, action: String(handler[1]) } : void 0,
|
|
530
556
|
bindings: serializeBindings(path, bindings, this.modelBindingNames),
|
|
531
557
|
...openapi
|
|
532
558
|
}));
|
|
533
559
|
}
|
|
534
|
-
applyMiddlewareScope(
|
|
535
|
-
this.middlewareStack.push(
|
|
560
|
+
applyMiddlewareScope(items, callback) {
|
|
561
|
+
this.middlewareStack.push([...items]);
|
|
536
562
|
try {
|
|
537
563
|
return callback();
|
|
538
564
|
} finally {
|
|
@@ -567,13 +593,16 @@ var Router = class {
|
|
|
567
593
|
}
|
|
568
594
|
add(method, path, handler, middlewares = []) {
|
|
569
595
|
const fullPath = joinPaths(this.prefixStack, path);
|
|
570
|
-
const
|
|
596
|
+
const scope = partitionMiddleware(this.middlewareStack.flat());
|
|
571
597
|
const route = {
|
|
572
598
|
method,
|
|
573
599
|
path: fullPath,
|
|
574
600
|
handler,
|
|
575
|
-
|
|
576
|
-
|
|
601
|
+
// Copied, never aliased: `RouteBuilder.middleware()` pushes here, and the
|
|
602
|
+
// caller's `options.middlewares` array may be shared across routes.
|
|
603
|
+
middlewares: [...middlewares],
|
|
604
|
+
scopedMiddlewares: scope.handlers,
|
|
605
|
+
routeMiddlewareNames: scope.names
|
|
577
606
|
};
|
|
578
607
|
this.registry.push(route);
|
|
579
608
|
return createRouteBuilder(route, this.namedRoutes);
|
|
@@ -647,32 +676,32 @@ function applyRouteContract(route, options) {
|
|
|
647
676
|
}
|
|
648
677
|
}
|
|
649
678
|
var RouterMiddlewareGroupBuilder = class {
|
|
650
|
-
constructor(router,
|
|
679
|
+
constructor(router, items) {
|
|
651
680
|
this.router = router;
|
|
652
|
-
this.
|
|
681
|
+
this.items = items;
|
|
653
682
|
}
|
|
654
683
|
router;
|
|
655
|
-
|
|
684
|
+
items;
|
|
656
685
|
group(callback) {
|
|
657
|
-
return this.router.applyMiddlewareScope(this.
|
|
658
|
-
callback(this.router);
|
|
686
|
+
return this.router.applyMiddlewareScope(this.items, () => {
|
|
687
|
+
assertSyncGroupCallback(callback(this.router), "middleware(...).group");
|
|
659
688
|
return this.router;
|
|
660
689
|
});
|
|
661
690
|
}
|
|
662
691
|
get(path, handlerOrOptions, ...rest) {
|
|
663
|
-
return this.router.applyMiddlewareScope(this.
|
|
692
|
+
return this.router.applyMiddlewareScope(this.items, () => this.router.get(path, handlerOrOptions, ...rest));
|
|
664
693
|
}
|
|
665
694
|
post(path, handlerOrOptions, ...rest) {
|
|
666
|
-
return this.router.applyMiddlewareScope(this.
|
|
695
|
+
return this.router.applyMiddlewareScope(this.items, () => this.router.post(path, handlerOrOptions, ...rest));
|
|
667
696
|
}
|
|
668
697
|
put(path, handlerOrOptions, ...rest) {
|
|
669
|
-
return this.router.applyMiddlewareScope(this.
|
|
698
|
+
return this.router.applyMiddlewareScope(this.items, () => this.router.put(path, handlerOrOptions, ...rest));
|
|
670
699
|
}
|
|
671
700
|
patch(path, handlerOrOptions, ...rest) {
|
|
672
|
-
return this.router.applyMiddlewareScope(this.
|
|
701
|
+
return this.router.applyMiddlewareScope(this.items, () => this.router.patch(path, handlerOrOptions, ...rest));
|
|
673
702
|
}
|
|
674
703
|
delete(path, handlerOrOptions, ...rest) {
|
|
675
|
-
return this.router.applyMiddlewareScope(this.
|
|
704
|
+
return this.router.applyMiddlewareScope(this.items, () => this.router.delete(path, handlerOrOptions, ...rest));
|
|
676
705
|
}
|
|
677
706
|
};
|
|
678
707
|
function createRouteBuilder(route, namedRoutes) {
|
|
@@ -682,8 +711,10 @@ function createRouteBuilder(route, namedRoutes) {
|
|
|
682
711
|
namedRoutes.set(routeName, route);
|
|
683
712
|
return this;
|
|
684
713
|
},
|
|
685
|
-
middleware(...
|
|
714
|
+
middleware(...items) {
|
|
715
|
+
const { names, handlers } = partitionMiddleware(items);
|
|
686
716
|
route.routeMiddlewareNames.push(...names);
|
|
717
|
+
route.middlewares.push(...handlers);
|
|
687
718
|
return this;
|
|
688
719
|
}
|
|
689
720
|
};
|
|
@@ -1533,7 +1564,7 @@ function createHostAuthorizationMiddleware(options) {
|
|
|
1533
1564
|
const { allowedHosts, exclude = [], onError } = options;
|
|
1534
1565
|
const matchers = allowedHosts.map(compileHostMatcher);
|
|
1535
1566
|
return async (ctx, next) => {
|
|
1536
|
-
const path =
|
|
1567
|
+
const path = ctx.req.path;
|
|
1537
1568
|
if (isExcluded2(path, exclude)) {
|
|
1538
1569
|
await next();
|
|
1539
1570
|
return;
|
|
@@ -1569,7 +1600,9 @@ function compileHostMatcher(pattern) {
|
|
|
1569
1600
|
const hostname = pattern.slice(0, -2).toLowerCase();
|
|
1570
1601
|
return (host) => {
|
|
1571
1602
|
const h = host.toLowerCase();
|
|
1572
|
-
|
|
1603
|
+
if (h === hostname) return true;
|
|
1604
|
+
if (!h.startsWith(hostname + ":")) return false;
|
|
1605
|
+
return /^\d+$/.test(h.slice(hostname.length + 1));
|
|
1573
1606
|
};
|
|
1574
1607
|
}
|
|
1575
1608
|
const lower = pattern.toLowerCase();
|
package/dist/lambda/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as hono_aws_lambda from 'hono/aws-lambda';
|
|
2
2
|
export { APIGatewayProxyResult, LambdaEvent } from 'hono/aws-lambda';
|
|
3
|
-
import { A as Application } from '../validation-
|
|
3
|
+
import { A as Application } from '../validation-yAL53e1S.js';
|
|
4
4
|
import { S as Scheduler } from '../Scheduler-pZiT8i57.js';
|
|
5
|
-
import { C as ConsoleKernel } from '../ConsoleKernel-
|
|
5
|
+
import { C as ConsoleKernel } from '../ConsoleKernel-CJg975mp.js';
|
|
6
6
|
import 'hono';
|
|
7
7
|
import '../api-token-D24VPr_E.js';
|
|
8
8
|
import '../AuthManager-DBP4KYsx.js';
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { S as ServiceProvider } from '../validation-
|
|
2
|
+
import { S as ServiceProvider } from '../validation-yAL53e1S.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-D24VPr_E.js';
|
|
5
5
|
import '../AuthManager-DBP4KYsx.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ab as Notification, aa as Notifiable, ad as NotificationChannel, B as DatabaseNotification, z as DatabaseChannelOptions,
|
|
2
|
-
export { ac as NotificationAttachment, ae as NotificationChannelFactory, af as NotificationClass, ag as NotificationMailMessage, N as NotificationManager, ah as NotificationManagerOptions,
|
|
1
|
+
import { ab as Notification, aa as Notifiable, ad as NotificationChannel, B as DatabaseNotification, z as DatabaseChannelOptions, aK as SlackMessage, aB as SentNotification } from '../validation-yAL53e1S.js';
|
|
2
|
+
export { ac as NotificationAttachment, ae as NotificationChannelFactory, af as NotificationClass, ag as NotificationMailMessage, N as NotificationManager, ah as NotificationManagerOptions, aI as SlackAttachment, aJ as SlackBlock, aY as createNotificationManager, b7 as getNotificationManager, bm as setNotificationManager } from '../validation-yAL53e1S.js';
|
|
3
3
|
import { M as MailManager } from '../MailManager-DpMvYiP9.js';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import '../api-token-D24VPr_E.js';
|
package/dist/queue/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { am as QueueDriver, ao as QueuedJob, M as FailedJob,
|
|
2
|
-
export { a4 as Job, a5 as JobClass, a6 as JobFailureHandler, a7 as JobHandler, a8 as JobOptions, al as QueueConfig, an as QueueDriverFactory, Q as QueueManager,
|
|
1
|
+
import { am as QueueDriver, ao as QueuedJob, M as FailedJob, aO as WorkerOptions } from '../validation-yAL53e1S.js';
|
|
2
|
+
export { a4 as Job, a5 as JobClass, a6 as JobFailureHandler, a7 as JobHandler, a8 as JobOptions, al as QueueConfig, an as QueueDriverFactory, Q as QueueManager, aS as clearJobRegistry, aZ as createQueueManager, b6 as getJob, b8 as getQueueDriver, b9 as getRegisteredJobs, be as registerJob, bg as resolveJobName, bn as setQueueDriver } from '../validation-yAL53e1S.js';
|
|
3
3
|
import { Redis } from 'ioredis';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import '../api-token-D24VPr_E.js';
|
package/dist/redis/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { b as RedisClientOptions, c as createRedisClient } from '../rate-limit-D
|
|
|
3
3
|
import { Redis } from 'ioredis';
|
|
4
4
|
export { default as Redis, RedisOptions } from 'ioredis';
|
|
5
5
|
import { S as SessionStore, h as SessionData, i as ApiTokenStore, j as ApiToken, O as OAuthStateStore, k as OAuthStatePayload } from '../api-token-D24VPr_E.js';
|
|
6
|
-
import { P as PasswordResetTokenStore, E as EmailVerificationTokenStore, a as EmailVerificationToken } from '../email-verification-
|
|
6
|
+
import { P as PasswordResetTokenStore, E as EmailVerificationTokenStore, a as EmailVerificationToken } from '../email-verification-Dx426KLn.js';
|
|
7
7
|
import 'hono';
|
|
8
8
|
|
|
9
9
|
/**
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Application } from '../validation-
|
|
2
|
-
export { D as DevBannerOptions, G as GUREN_ASCII_ART, c as StartViteDevServerOptions, d as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../validation-
|
|
1
|
+
import { A as Application } from '../validation-yAL53e1S.js';
|
|
2
|
+
export { D as DevBannerOptions, G as GUREN_ASCII_ART, c as StartViteDevServerOptions, d as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../validation-yAL53e1S.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-D24VPr_E.js';
|
|
5
5
|
import '../AuthManager-DBP4KYsx.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -2157,9 +2157,25 @@ interface RouteDefinition {
|
|
|
2157
2157
|
interface RouteBuilder<M extends string = never> {
|
|
2158
2158
|
/** Set the route name for URL generation. */
|
|
2159
2159
|
name(routeName: string): RouteBuilder<M>;
|
|
2160
|
-
/** Attach
|
|
2161
|
-
middleware(...
|
|
2160
|
+
/** Attach middleware to this specific route. See {@link RouteMiddlewareInput}. */
|
|
2161
|
+
middleware(...items: RouteMiddlewareInput<M>[]): RouteBuilder<M>;
|
|
2162
2162
|
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Accepted by `.middleware()`: a registered alias name or a handler function.
|
|
2165
|
+
*
|
|
2166
|
+
* Resolution is by kind, not by position: every name in a route's chain runs
|
|
2167
|
+
* before every handler, across scopes as well as within one call. So an inline
|
|
2168
|
+
* handler on an outer group runs *after* a named one on an inner group, the
|
|
2169
|
+
* reverse of how they read. Use aliases throughout when relative order matters.
|
|
2170
|
+
*
|
|
2171
|
+
* Aliases are also the only form that lands in `RouteDefinition.middlewareNames`,
|
|
2172
|
+
* which is how `guren audit` reports middleware it cannot otherwise identify.
|
|
2173
|
+
* Guards the framework stamps with a capability (`requireAuthenticated`,
|
|
2174
|
+
* `requireGuest`) are recognized either way.
|
|
2175
|
+
*/
|
|
2176
|
+
type RouteMiddlewareInput<M extends string = never> = M | MiddlewareHandler;
|
|
2177
|
+
/** Storage form of {@link RouteMiddlewareInput}, unparameterized by alias union. */
|
|
2178
|
+
type MiddlewareScopeEntry = string | MiddlewareHandler;
|
|
2163
2179
|
interface RouterMountOptions {
|
|
2164
2180
|
container?: Container;
|
|
2165
2181
|
}
|
|
@@ -2192,7 +2208,11 @@ declare class Router<M extends string = never> {
|
|
|
2192
2208
|
private readonly modelBindingNames;
|
|
2193
2209
|
aliasMiddleware<N extends string>(name: N, handler: MiddlewareHandler): Router<M | N>;
|
|
2194
2210
|
groupMiddleware<N extends string>(name: N, middlewareNames: M[]): Router<M | N>;
|
|
2195
|
-
|
|
2211
|
+
/**
|
|
2212
|
+
* Open a middleware scope for the routes registered through the returned
|
|
2213
|
+
* builder. See {@link RouteMiddlewareInput}.
|
|
2214
|
+
*/
|
|
2215
|
+
middleware(...items: RouteMiddlewareInput<M>[]): RouterMiddlewareGroupBuilder<M>;
|
|
2196
2216
|
bind(param: string, modelOrResolver: BindableModel | ModelBindingResolver): this;
|
|
2197
2217
|
on<C extends ControllerConstructor>(method: string, path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2198
2218
|
on<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(method: string, path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
@@ -2220,7 +2240,7 @@ declare class Router<M extends string = never> {
|
|
|
2220
2240
|
clear(): void;
|
|
2221
2241
|
resetMiddleware(): void;
|
|
2222
2242
|
definitions(): RouteDefinition[];
|
|
2223
|
-
applyMiddlewareScope<T>(
|
|
2243
|
+
applyMiddlewareScope<T>(items: readonly MiddlewareScopeEntry[], callback: () => T): T;
|
|
2224
2244
|
private register;
|
|
2225
2245
|
private add;
|
|
2226
2246
|
/**
|
|
@@ -2236,19 +2256,24 @@ declare class Router<M extends string = never> {
|
|
|
2236
2256
|
}
|
|
2237
2257
|
declare class RouterMiddlewareGroupBuilder<M extends string = never> {
|
|
2238
2258
|
private readonly router;
|
|
2239
|
-
private readonly
|
|
2240
|
-
constructor(router: Router<M>,
|
|
2259
|
+
private readonly items;
|
|
2260
|
+
constructor(router: Router<M>, items: readonly MiddlewareScopeEntry[]);
|
|
2241
2261
|
group(callback: (router: Router<M>) => void): Router<M>;
|
|
2242
2262
|
get<C extends ControllerConstructor>(path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2243
2263
|
get<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
2264
|
+
get<C extends ControllerConstructor, TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: ControllerAction<C>): RouteBuilder<M>;
|
|
2244
2265
|
post<C extends ControllerConstructor>(path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2245
2266
|
post<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
2267
|
+
post<C extends ControllerConstructor, TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: ControllerAction<C>): RouteBuilder<M>;
|
|
2246
2268
|
put<C extends ControllerConstructor>(path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2247
2269
|
put<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
2270
|
+
put<C extends ControllerConstructor, TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: ControllerAction<C>): RouteBuilder<M>;
|
|
2248
2271
|
patch<C extends ControllerConstructor>(path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2249
2272
|
patch<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
2273
|
+
patch<C extends ControllerConstructor, TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: ControllerAction<C>): RouteBuilder<M>;
|
|
2250
2274
|
delete<C extends ControllerConstructor>(path: string, handler: RouteHandler<C>, ...middlewares: MiddlewareHandler[]): RouteBuilder<M>;
|
|
2251
2275
|
delete<TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: TypedRouteHandler<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>): RouteBuilder<M>;
|
|
2276
|
+
delete<C extends ControllerConstructor, TParamsSchema extends SchemaLike<unknown>, TQuerySchema extends SchemaLike<unknown>, TBodySchema extends SchemaLike<unknown>, TOutputSchema extends SchemaLike<unknown>>(path: string, options: RouteContractOptions<TParamsSchema, TQuerySchema, TBodySchema, TOutputSchema>, handler: ControllerAction<C>): RouteBuilder<M>;
|
|
2252
2277
|
}
|
|
2253
2278
|
|
|
2254
2279
|
interface HstsOptions {
|
|
@@ -2582,4 +2607,4 @@ declare function validateSafe<T>(schema: ValidationSchema<T>, data: unknown): {
|
|
|
2582
2607
|
errors: Record<string, string>;
|
|
2583
2608
|
};
|
|
2584
2609
|
|
|
2585
|
-
export { type InertiaSsrContext as $, Application as A, type DatabaseNotification as B, type CommandClass as C, type DevBannerOptions as D, type ErrorResponse as E, type ExceptionClass as F, GUREN_ASCII_ART as G, ExceptionHandler as H, type InputInterface as I, type ExceptionHandlerOptions as J, type ExceptionRenderer as K, type ExceptionReporter as L, type FailedJob as M, NotificationManager as N, type OutputInterface as O, type ParsedSignature as P, QueueManager as Q, type GurenModule as R, ServiceProvider as S, type HostAuthorizationOptions as T, type HstsOptions as U, type InertiaDocumentContext as V, type InertiaDocumentOptions as W, type InertiaOptions as X, type InertiaPagePayload as Y, type InertiaResponse as Z, type InertiaSharedProps as _, Container as a,
|
|
2610
|
+
export { type InertiaSsrContext as $, Application as A, type DatabaseNotification as B, type CommandClass as C, type DevBannerOptions as D, type ErrorResponse as E, type ExceptionClass as F, GUREN_ASCII_ART as G, ExceptionHandler as H, type InputInterface as I, type ExceptionHandlerOptions as J, type ExceptionRenderer as K, type ExceptionReporter as L, type FailedJob as M, NotificationManager as N, type OutputInterface as O, type ParsedSignature as P, QueueManager as Q, type GurenModule as R, ServiceProvider as S, type HostAuthorizationOptions as T, type HstsOptions as U, type InertiaDocumentContext as V, type InertiaDocumentOptions as W, type InertiaOptions as X, type InertiaPagePayload as Y, type InertiaResponse as Z, type InertiaSharedProps as _, Container as a, csrfField as a$, type InertiaSsrOptions as a0, type InertiaSsrRenderer as a1, type InertiaSsrResult as a2, type InferInertiaProps as a3, Job as a4, type JobClass as a5, type JobFailureHandler as a6, type JobHandler as a7, type JobOptions as a8, type ModuleDefinition as a9, type SecurityHeadersOptions as aA, type SentNotification as aB, type ServiceBinding as aC, type ServiceClass as aD, type ServiceFactory as aE, type ServiceProviderClass as aF, type ServiceProviderOptions as aG, type SharedInertiaPropsResolver as aH, type SlackAttachment as aI, type SlackBlock as aJ, type SlackMessage as aK, VALIDATED_DATA_KEY as aL, type ValidateRequestOptions as aM, type ValidationSchema as aN, type WorkerOptions as aO, abort as aP, abortIf as aQ, abortUnless as aR, clearJobRegistry as aS, createApp as aT, createContainer as aU, createCsrfMiddleware as aV, createExceptionHandler as aW, createHostAuthorizationMiddleware as aX, createNotificationManager as aY, createQueueManager as aZ, createSecurityHeaders as a_, type Notifiable as aa, Notification as ab, type NotificationAttachment as ac, type NotificationChannel as ad, type NotificationChannelFactory as ae, type NotificationClass as af, type NotificationMailMessage as ag, type NotificationManagerOptions as ah, type ProgressInterface as ai, type PromptInterface as aj, ProviderManager as ak, type QueueConfig as al, type QueueDriver as am, type QueueDriverFactory as an, type QueuedJob as ao, type RendererRegistration as ap, type ResolvedSharedInertiaProps as aq, type ResourceRouteOptions as ar, type RouteBuilder as as, type RouteContractOptions as at, type RouteDefinition as au, type RouteMiddlewareInput as av, type RouteOpenApiMetadata as aw, type ResourceAction as ax, Router as ay, type ScheduledCommand as az, type ConsoleKernelOptions as b, defineModule as b0, formatValidationErrors as b1, getContainer as b2, getCsrfToken as b3, getExceptionHandler as b4, getInertiaSharedPropsResolver as b5, getJob as b6, getNotificationManager as b7, getQueueDriver as b8, getRegisteredJobs as b9, getValidatedData as ba, inertia as bb, mountModuleRoutes as bc, parseRequestPayload as bd, registerJob as be, resolve as bf, resolveJobName as bg, setContainer as bh, setExceptionHandler as bi, setInertiaDocument as bj, setInertiaSharedProps as bk, setInertiaSsrRenderer as bl, setNotificationManager as bm, setQueueDriver as bn, shareInertiaProps as bo, validate as bp, validateRequest as bq, validateRequestWith as br, validateSafe as bs, verifyCsrfToken as bt, type StartViteDevServerOptions as c, type StartedViteDevServer as d, type ServiceProviderConstructor as e, type OptionDefinition as f, type CommandInstance as g, type ServiceBindings as h, type ApplicationListenOptions as i, type ApplicationOptions as j, type ArgumentDefinition as k, logDevServerBanner as l, type AuthPayload as m, type AuthPluginOptions as n, CSRF_FORM_FIELD as o, CSRF_HEADER_NAME as p, CSRF_TOKEN_KEY as q, type Provider as r, startViteDevServer as s, type ContextualBinding as t, type ContextualBindingBuilder as u, type ContextualNeedsBuilder as v, Controller as w, type ControllerInertiaProps as x, type CsrfOptions as y, type DatabaseChannelOptions as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"test": "bun test"
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
-
"@guren/orm": "^2.
|
|
112
|
+
"@guren/orm": "^2.1.0",
|
|
113
113
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
114
114
|
"chalk": "^5.3.0",
|
|
115
115
|
"consola": "^3.4.2",
|