@guren/server 1.0.0-rc.21 → 1.0.0-rc.23
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/{Application-BC-zq6d0.d.ts → Application-D4_90raL.d.ts} +14 -4
- package/dist/{ConsoleKernel-BXy1SCyy.d.ts → ConsoleKernel-BPYcP-2f.d.ts} +1 -1
- package/dist/{I18nManager-Dtgzsf5n.d.ts → I18nManager-BiSoczfV.d.ts} +6 -1
- package/dist/{chunk-A2AZXY4M.js → chunk-A3ISJVEV.js} +1 -1
- package/dist/{chunk-CDLEYDHE.js → chunk-NFGDKY3L.js} +3 -3
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +29 -8
- package/dist/lambda/index.d.ts +3 -3
- package/dist/mcp/index.d.ts +2 -2
- package/dist/notifications/index.d.ts +3 -3
- package/dist/queue/index.d.ts +3 -3
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as hono from 'hono';
|
|
2
|
-
import { Context, MiddlewareHandler, Hono, ExecutionContext } from 'hono';
|
|
2
|
+
import { Context, MiddlewareHandler, Hono, Next, ExecutionContext } from 'hono';
|
|
3
3
|
import { A as AuthManager, O as OAuthManager, a as AuthContext, b as ApiToken, C as CreateSessionMiddlewareOptions } from './api-token-BGOsfuI9.js';
|
|
4
4
|
import { InlineConfig, ViteDevServer } from 'vite';
|
|
5
5
|
import { E as EventManager } from './EventManager-CmIoLt7r.js';
|
|
6
6
|
import { C as CacheManager } from './CacheManager-BkvHEOZX.js';
|
|
7
7
|
import { M as MailManager } from './MailManager-DpMvYiP9.js';
|
|
8
8
|
import { L as LogManager } from './LogManager-7mxnkaPM.js';
|
|
9
|
-
import { I as I18nManager } from './I18nManager-
|
|
9
|
+
import { I as I18nManager } from './I18nManager-BiSoczfV.js';
|
|
10
10
|
import { B as BroadcastManager } from './BroadcastManager-CGWl9rUO.js';
|
|
11
11
|
import { E as Encrypter, A as AppKeyring } from './app-key-CsBfRC_Q.js';
|
|
12
12
|
import { S as StorageManager } from './StorageManager-oZTHqaza.js';
|
|
@@ -129,6 +129,14 @@ type SharedPropsDefault = Record<string, unknown>;
|
|
|
129
129
|
type ResolvedSharedInertiaProps = InertiaSharedProps extends Record<string, unknown> ? InertiaSharedProps : SharedPropsDefault;
|
|
130
130
|
type SharedInertiaPropsResolver<Props extends Record<string, unknown> = ResolvedSharedInertiaProps> = (ctx: Context) => Promise<Props> | Props;
|
|
131
131
|
declare function setInertiaSharedProps<Props extends Record<string, unknown> = ResolvedSharedInertiaProps>(resolverFn: SharedInertiaPropsResolver<Props> | null): void;
|
|
132
|
+
declare function getInertiaSharedPropsResolver(): SharedInertiaPropsResolver<ResolvedSharedInertiaProps> | null;
|
|
133
|
+
/**
|
|
134
|
+
* Register additional shared props without replacing resolvers registered
|
|
135
|
+
* earlier — the new resolver's props are merged over the previous ones.
|
|
136
|
+
* Use this from app providers so multiple providers can each contribute
|
|
137
|
+
* shared props (setInertiaSharedProps replaces the resolver wholesale).
|
|
138
|
+
*/
|
|
139
|
+
declare function shareInertiaProps<Props extends Record<string, unknown>>(resolverFn: SharedInertiaPropsResolver<Props>): void;
|
|
132
140
|
|
|
133
141
|
/**
|
|
134
142
|
* Parses the incoming request payload supporting both JSON bodies and form submissions.
|
|
@@ -1761,8 +1769,10 @@ type ControllerAction<C extends ControllerConstructor = ControllerConstructor> =
|
|
|
1761
1769
|
type RouteResult = Response | string | number | boolean | Record<string, unknown> | Array<unknown> | null | void;
|
|
1762
1770
|
/**
|
|
1763
1771
|
* Handler for a route - either an inline function or a controller action tuple.
|
|
1772
|
+
* Inline handlers receive `next`, so any Hono middleware (e.g.
|
|
1773
|
+
* `broadcast.sseMiddleware()`) can be mounted directly as a terminal handler.
|
|
1764
1774
|
*/
|
|
1765
|
-
type RouteHandler<C extends ControllerConstructor = ControllerConstructor> = ((c: Context) => RouteResult | Promise<RouteResult>) | ControllerAction<C>;
|
|
1775
|
+
type RouteHandler<C extends ControllerConstructor = ControllerConstructor> = ((c: Context, next: Next) => RouteResult | Promise<RouteResult>) | ControllerAction<C>;
|
|
1766
1776
|
/**
|
|
1767
1777
|
* Model binding resolver function.
|
|
1768
1778
|
*/
|
|
@@ -2167,4 +2177,4 @@ declare class Application {
|
|
|
2167
2177
|
}
|
|
2168
2178
|
declare function createApp(options?: ApplicationOptions): Application;
|
|
2169
2179
|
|
|
2170
|
-
export { type NotificationChannelFactory as $, Application as A, type InertiaSharedProps as B, Container as C, type DevBannerOptions as D, type ErrorResponse as E, type FailedJob as F, GUREN_ASCII_ART as G, type HostAuthorizationOptions as H, type InertiaOptions as I, type InertiaSsrContext as J, type InertiaSsrOptions as K, type InertiaSsrRenderer as L, type InertiaSsrResult as M, NotificationManager as N, type InferInertiaProps as O, type Provider as P, QueueManager as Q, Job as R, ServiceProvider as S, type JobClass as T, type JobFailureHandler as U, type JobHandler as V, type JobOptions as W, type Notifiable as X, Notification as Y, type NotificationAttachment as Z, type NotificationChannel as _, type StartViteDevServerOptions as a,
|
|
2180
|
+
export { type NotificationChannelFactory as $, Application as A, type InertiaSharedProps as B, Container as C, type DevBannerOptions as D, type ErrorResponse as E, type FailedJob as F, GUREN_ASCII_ART as G, type HostAuthorizationOptions as H, type InertiaOptions as I, type InertiaSsrContext as J, type InertiaSsrOptions as K, type InertiaSsrRenderer as L, type InertiaSsrResult as M, NotificationManager as N, type InferInertiaProps as O, type Provider as P, QueueManager as Q, Job as R, ServiceProvider as S, type JobClass as T, type JobFailureHandler as U, type JobHandler as V, type JobOptions as W, type Notifiable as X, Notification as Y, type NotificationAttachment as Z, type NotificationChannel as _, type StartViteDevServerOptions as a, setNotificationManager as a$, type NotificationClass as a0, type NotificationMailMessage as a1, type NotificationManagerOptions as a2, ProviderManager as a3, type QueueConfig as a4, type QueueDriver as a5, type QueueDriverFactory as a6, type QueuedJob as a7, type RendererRegistration as a8, type ResolvedSharedInertiaProps as a9, clearJobRegistry as aA, createApp as aB, createContainer as aC, createCsrfMiddleware as aD, createExceptionHandler as aE, createHostAuthorizationMiddleware as aF, createNotificationManager as aG, createQueueManager as aH, createSecurityHeaders as aI, csrfField as aJ, formatValidationErrors as aK, getContainer as aL, getCsrfToken as aM, getExceptionHandler as aN, getInertiaSharedPropsResolver as aO, getJob as aP, getNotificationManager as aQ, getQueueDriver as aR, getRegisteredJobs as aS, getValidatedData as aT, inertia as aU, parseRequestPayload as aV, registerJob as aW, resolve as aX, setContainer as aY, setExceptionHandler as aZ, setInertiaSharedProps as a_, type ResourceRouteOptions as aa, type RouteBuilder as ab, type RouteContractOptions as ac, type RouteDefinition as ad, type RouteOpenApiMetadata as ae, type ResourceAction as af, Router as ag, type SecurityHeadersOptions as ah, type SentNotification as ai, type ServiceBinding as aj, type ServiceClass as ak, type ServiceFactory as al, type ServiceProviderClass as am, type ServiceProviderConstructor as an, type ServiceProviderOptions as ao, type SharedInertiaPropsResolver as ap, type SlackAttachment as aq, type SlackBlock as ar, type SlackMessage as as, VALIDATED_DATA_KEY as at, type ValidateRequestOptions as au, type ValidationSchema as av, type WorkerOptions as aw, abort as ax, abortIf as ay, abortUnless as az, type StartedViteDevServer as b, setQueueDriver as b0, shareInertiaProps as b1, validate as b2, validateRequest as b3, validateRequestWith as b4, validateSafe as b5, verifyCsrfToken as b6, type ServiceBindings as c, type ApplicationListenOptions as d, type AuthPayload as e, CSRF_FORM_FIELD as f, CSRF_HEADER_NAME as g, CSRF_TOKEN_KEY as h, type ContextualBinding as i, type ContextualBindingBuilder as j, type ContextualNeedsBuilder as k, logDevServerBanner as l, Controller as m, type ControllerInertiaProps as n, type CsrfOptions as o, type DatabaseChannelOptions as p, type DatabaseNotification as q, type ExceptionClass as r, startViteDevServer as s, ExceptionHandler as t, type ExceptionHandlerOptions as u, type ExceptionRenderer as v, type ExceptionReporter as w, type HstsOptions as x, type InertiaPagePayload as y, type InertiaResponse as z };
|
|
@@ -71,9 +71,14 @@ interface I18nConfig {
|
|
|
71
71
|
*/
|
|
72
72
|
fallbackLocale?: string;
|
|
73
73
|
/**
|
|
74
|
-
* Path to translation files.
|
|
74
|
+
* Path to translation files (constructs a JsonLoader internally).
|
|
75
75
|
*/
|
|
76
76
|
path?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Custom translation loader (e.g. JsonLoader, MemoryLoader).
|
|
79
|
+
* Takes precedence over `path`.
|
|
80
|
+
*/
|
|
81
|
+
loader?: TranslationLoader;
|
|
77
82
|
/**
|
|
78
83
|
* Preloaded messages.
|
|
79
84
|
*/
|
|
@@ -363,7 +363,7 @@ var I18nManager = class {
|
|
|
363
363
|
loadedLocales = /* @__PURE__ */ new Set();
|
|
364
364
|
constructor(config) {
|
|
365
365
|
this.config = config;
|
|
366
|
-
this.loader = config.path ? new JsonLoader(config.path) : null;
|
|
366
|
+
this.loader = config.loader ?? (config.path ? new JsonLoader(config.path) : null);
|
|
367
367
|
this.translator = new Translator({
|
|
368
368
|
locale: config.locale,
|
|
369
369
|
fallbackLocale: config.fallbackLocale,
|
|
@@ -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: "1.0.0-rc.
|
|
9
|
+
version: "1.0.0-rc.23",
|
|
10
10
|
type: "module",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
repository: {
|
|
@@ -111,8 +111,8 @@ var package_default = {
|
|
|
111
111
|
test: "bun test"
|
|
112
112
|
},
|
|
113
113
|
dependencies: {
|
|
114
|
-
"@guren/inertia-client": "^1.0.0-rc.
|
|
115
|
-
"@guren/orm": "^1.0.0-rc.
|
|
114
|
+
"@guren/inertia-client": "^1.0.0-rc.22",
|
|
115
|
+
"@guren/orm": "^1.0.0-rc.24",
|
|
116
116
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
117
117
|
chalk: "^5.3.0",
|
|
118
118
|
consola: "^3.4.2",
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PluralizationRule, T as TranslationLoader, c as TranslationMessages } from '../I18nManager-
|
|
2
|
-
export { a as I18nConfig, I as I18nManager, R as ReplacementValues, b as TranslationLoaderFactory, d as Translator, e as TranslatorOptions, f as createI18n, g as getI18n, s as setI18n, t, h as tc } from '../I18nManager-
|
|
1
|
+
import { P as PluralizationRule, T as TranslationLoader, c as TranslationMessages } from '../I18nManager-BiSoczfV.js';
|
|
2
|
+
export { a as I18nConfig, I as I18nManager, R as ReplacementValues, b as TranslationLoaderFactory, d as Translator, e as TranslatorOptions, f as createI18n, g as getI18n, s as setI18n, t, h as tc } from '../I18nManager-BiSoczfV.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Default pluralization rules for common languages.
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as ErrorResponse, S as ServiceProvider, C as Container, c as ServiceBindings, Q as QueueManager, N as NotificationManager } from './Application-
|
|
2
|
-
export { A as Application, d as ApplicationListenOptions, e as AuthPayload, f as CSRF_FORM_FIELD, g as CSRF_HEADER_NAME, h as CSRF_TOKEN_KEY, P as ContainerProvider, i as ContextualBinding, j as ContextualBindingBuilder, k as ContextualNeedsBuilder, m as Controller, n as ControllerInertiaProps, o as CsrfOptions, p as DatabaseChannelOptions, q as DatabaseNotification, r as ExceptionClass, t as ExceptionHandler, u as ExceptionHandlerOptions, v as ExceptionRenderer, w as ExceptionReporter, F as FailedJob, H as HostAuthorizationOptions, x as HstsOptions, I as InertiaOptions, y as InertiaPagePayload, z as InertiaResponse, B as InertiaSharedProps, J as InertiaSsrContext, K as InertiaSsrOptions, L as InertiaSsrRenderer, M as InertiaSsrResult, O as InferInertiaProps, R as Job, T as JobClass, U as JobFailureHandler, V as JobHandler, W as JobOptions, X as Notifiable, Y as Notification, Z as NotificationAttachment, _ as NotificationChannel, $ as NotificationChannelFactory, a0 as NotificationClass, a1 as NotificationMailMessage, a2 as NotificationManagerOptions, a3 as ProviderManager, a4 as QueueConfig, a5 as QueueDriver, a6 as QueueDriverFactory, a7 as QueuedJob, a8 as RendererRegistration, a9 as ResolvedSharedInertiaProps, aa as ResourceRouteOptions, ab as RouteBuilder, ac as RouteContractOptions, ad as RouteDefinition, ae as RouteOpenApiMetadata, af as RouteResourceAction, ag as Router, ah as SecurityHeadersOptions, ai as SentNotification, aj as ServiceBinding, ak as ServiceClass, al as ServiceFactory, am as ServiceProviderClass, an as ServiceProviderConstructor, ao as ServiceProviderOptions, ap as SharedInertiaPropsResolver, aq as SlackAttachment, ar as SlackBlock, as as SlackMessage, at as VALIDATED_DATA_KEY, au as ValidateRequestOptions, av as ValidationSchema, aw as WorkerOptions, ax as abort, ay as abortIf, az as abortUnless, aA as clearJobRegistry, aB as createApp, aC as createContainer, aD as createCsrfMiddleware, aE as createExceptionHandler, aF as createHostAuthorizationMiddleware, aG as createNotificationManager, aH as createQueueManager, aI as createSecurityHeaders, aJ as csrfField, aK as formatValidationErrors, aL as getContainer, aM as getCsrfToken, aN as getExceptionHandler, aO as
|
|
1
|
+
import { E as ErrorResponse, S as ServiceProvider, C as Container, c as ServiceBindings, Q as QueueManager, N as NotificationManager } from './Application-D4_90raL.js';
|
|
2
|
+
export { A as Application, d as ApplicationListenOptions, e as AuthPayload, f as CSRF_FORM_FIELD, g as CSRF_HEADER_NAME, h as CSRF_TOKEN_KEY, P as ContainerProvider, i as ContextualBinding, j as ContextualBindingBuilder, k as ContextualNeedsBuilder, m as Controller, n as ControllerInertiaProps, o as CsrfOptions, p as DatabaseChannelOptions, q as DatabaseNotification, r as ExceptionClass, t as ExceptionHandler, u as ExceptionHandlerOptions, v as ExceptionRenderer, w as ExceptionReporter, F as FailedJob, H as HostAuthorizationOptions, x as HstsOptions, I as InertiaOptions, y as InertiaPagePayload, z as InertiaResponse, B as InertiaSharedProps, J as InertiaSsrContext, K as InertiaSsrOptions, L as InertiaSsrRenderer, M as InertiaSsrResult, O as InferInertiaProps, R as Job, T as JobClass, U as JobFailureHandler, V as JobHandler, W as JobOptions, X as Notifiable, Y as Notification, Z as NotificationAttachment, _ as NotificationChannel, $ as NotificationChannelFactory, a0 as NotificationClass, a1 as NotificationMailMessage, a2 as NotificationManagerOptions, a3 as ProviderManager, a4 as QueueConfig, a5 as QueueDriver, a6 as QueueDriverFactory, a7 as QueuedJob, a8 as RendererRegistration, a9 as ResolvedSharedInertiaProps, aa as ResourceRouteOptions, ab as RouteBuilder, ac as RouteContractOptions, ad as RouteDefinition, ae as RouteOpenApiMetadata, af as RouteResourceAction, ag as Router, ah as SecurityHeadersOptions, ai as SentNotification, aj as ServiceBinding, ak as ServiceClass, al as ServiceFactory, am as ServiceProviderClass, an as ServiceProviderConstructor, ao as ServiceProviderOptions, ap as SharedInertiaPropsResolver, aq as SlackAttachment, ar as SlackBlock, as as SlackMessage, at as VALIDATED_DATA_KEY, au as ValidateRequestOptions, av as ValidationSchema, aw as WorkerOptions, ax as abort, ay as abortIf, az as abortUnless, aA as clearJobRegistry, aB as createApp, aC as createContainer, aD as createCsrfMiddleware, aE as createExceptionHandler, aF as createHostAuthorizationMiddleware, aG as createNotificationManager, aH as createQueueManager, aI as createSecurityHeaders, aJ as csrfField, aK as formatValidationErrors, aL as getContainer, aM as getCsrfToken, aN as getExceptionHandler, aO as getInertiaSharedPropsResolver, aP as getJob, aQ as getNotificationManager, aR as getQueueDriver, aS as getRegisteredJobs, aT as getValidatedData, aU as inertia, aV as parseRequestPayload, aW as registerJob, aX as resolve, aY as setContainer, aZ as setExceptionHandler, a_ as setInertiaSharedProps, a$ as setNotificationManager, b0 as setQueueDriver, b1 as shareInertiaProps, b2 as validate, b3 as validateRequest, b4 as validateRequestWith, b5 as validateSafe, b6 as verifyCsrfToken } from './Application-D4_90raL.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Context, MiddlewareHandler } from 'hono';
|
|
5
5
|
export { Context } from 'hono';
|
|
@@ -26,8 +26,8 @@ export { getNextOccurrence, getNextOccurrences, isDue, isDueInTimezone, matchesC
|
|
|
26
26
|
import { L as LogManager } from './LogManager-7mxnkaPM.js';
|
|
27
27
|
export { C as ConsoleChannelConfig, D as DailyFileChannelConfig, F as FileChannelConfig, a as LOG_LEVEL_PRIORITY, b as LogChannel, c as LogChannelConfig, d as LogChannelFactory, e as LogConfig, f as LogContext, g as LogEntry, h as LogFormatter, i as LogLevel, j as Logger, k as LoggerOptions, S as StackChannelConfig, l as createLogManager, m as filterSensitiveData, n as getLogManager, s as setLogManager } from './LogManager-7mxnkaPM.js';
|
|
28
28
|
export { ConsoleChannel, DailyFileChannel, FileChannel } from './logging/index.js';
|
|
29
|
-
import { I as I18nManager } from './I18nManager-
|
|
30
|
-
export { a as I18nConfig, P as PluralizationRule, R as ReplacementValues, T as TranslationLoader, b as TranslationLoaderFactory, c as TranslationMessages, d as Translator, e as TranslatorOptions, f as createI18n, g as getI18n, s as setI18n, t, h as tc } from './I18nManager-
|
|
29
|
+
import { I as I18nManager } from './I18nManager-BiSoczfV.js';
|
|
30
|
+
export { a as I18nConfig, P as PluralizationRule, R as ReplacementValues, T as TranslationLoader, b as TranslationLoaderFactory, c as TranslationMessages, d as Translator, e as TranslatorOptions, f as createI18n, g as getI18n, s as setI18n, t, h as tc } from './I18nManager-BiSoczfV.js';
|
|
31
31
|
export { JsonLoader, MemoryLoader, getPluralizationRule, pluralizationRules, selectPluralForm } from './i18n/index.js';
|
|
32
32
|
export { C as CheckResult, a as HealthCheck, b as HealthCheckOptions, H as HealthManager, c as HealthMiddlewareOptions, d as HealthReport, e as HealthStatus, f as createHealthManager } from './HealthManager-DUyMIzsZ.js';
|
|
33
33
|
export { CacheCheck, CacheCheckOptions, CacheStoreInterface, CustomCheck, CustomCheckCallback, DatabaseCheck, DatabaseCheckOptions, DatabaseConnection, MemoryCheck, MemoryCheckOptions, RedisCheck, RedisCheckOptions, RedisClient, StorageCheck, StorageCheckOptions, StorageDriverInterface, customCheck } from './health/index.js';
|
|
@@ -35,8 +35,8 @@ export { DatabaseChannel, MailChannel, MailChannelOptions, MemoryChannel, SlackC
|
|
|
35
35
|
import { B as BroadcastManager } from './BroadcastManager-CGWl9rUO.js';
|
|
36
36
|
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-CGWl9rUO.js';
|
|
37
37
|
export { RedisClient as BroadcastRedisClient, RedisDriverOptions as BroadcastRedisDriverOptions, MemoryDriver as MemoryBroadcastDriver, RedisDriver as RedisBroadcastDriver, createTypedBroadcaster } from './broadcasting/index.js';
|
|
38
|
-
import { I as InputInterface, P as ParsedSignature, O as OptionDefinition, a as CommandInstance, b as OutputInterface } from './ConsoleKernel-
|
|
39
|
-
export { A as ArgumentDefinition, c as CommandClass, C as ConsoleKernel, d as ConsoleKernelOptions, e as ProgressInterface, f as PromptInterface, S as ScheduledCommand, g as createConsoleKernel } from './ConsoleKernel-
|
|
38
|
+
import { I as InputInterface, P as ParsedSignature, O as OptionDefinition, a as CommandInstance, b as OutputInterface } from './ConsoleKernel-BPYcP-2f.js';
|
|
39
|
+
export { A as ArgumentDefinition, c as CommandClass, C as ConsoleKernel, d as ConsoleKernelOptions, e as ProgressInterface, f as PromptInterface, S as ScheduledCommand, g as createConsoleKernel } from './ConsoleKernel-BPYcP-2f.js';
|
|
40
40
|
import * as readline from 'readline';
|
|
41
41
|
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';
|
|
42
42
|
export { AuthorizedContext, Policy, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, definePolicy, withAuthorization } from './authorization/index.js';
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
setI18n,
|
|
33
33
|
t,
|
|
34
34
|
tc
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-A3ISJVEV.js";
|
|
36
36
|
import {
|
|
37
37
|
ConsoleChannel,
|
|
38
38
|
DailyFileChannel,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
logDevServerBanner,
|
|
103
103
|
parseImportMap,
|
|
104
104
|
startViteDevServer
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-NFGDKY3L.js";
|
|
106
106
|
import {
|
|
107
107
|
API_TOKEN_KEY,
|
|
108
108
|
AuthManager,
|
|
@@ -754,12 +754,15 @@ function resolveHandler(action, modelBindings, container, routeBindings, path) {
|
|
|
754
754
|
const resolvedBindings = modelBindings.size > 0 ? await resolveModelBindings(c, modelBindings, path) : [];
|
|
755
755
|
const args = resolvedBindings.length > 0 ? [c, ...resolvedBindings] : [c];
|
|
756
756
|
const result = await method.apply(controller, args);
|
|
757
|
-
return ensureResponse(result);
|
|
757
|
+
return ensureResponse(result, c);
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
return async (c) => {
|
|
761
|
-
const result = await action(c);
|
|
762
|
-
|
|
760
|
+
return async (c, next) => {
|
|
761
|
+
const result = await action(c, next);
|
|
762
|
+
if (result === void 0 && c.finalized) {
|
|
763
|
+
return c.res;
|
|
764
|
+
}
|
|
765
|
+
return ensureResponse(result, c);
|
|
763
766
|
};
|
|
764
767
|
}
|
|
765
768
|
async function resolveModelBindings(c, modelBindings, path) {
|
|
@@ -780,7 +783,14 @@ async function resolveModelBindings(c, modelBindings, path) {
|
|
|
780
783
|
}
|
|
781
784
|
return resolved;
|
|
782
785
|
}
|
|
783
|
-
function ensureResponse(result) {
|
|
786
|
+
function ensureResponse(result, c) {
|
|
787
|
+
const response = buildResponse(result);
|
|
788
|
+
if (c) {
|
|
789
|
+
return c.newResponse(response.body, response);
|
|
790
|
+
}
|
|
791
|
+
return response;
|
|
792
|
+
}
|
|
793
|
+
function buildResponse(result) {
|
|
784
794
|
if (result instanceof Response) {
|
|
785
795
|
return result;
|
|
786
796
|
}
|
|
@@ -957,7 +967,8 @@ function setXsrfCookie(ctx, token, options = {}) {
|
|
|
957
967
|
const { path = "/", secure = DEFAULT_COOKIE_SECURE, sameSite = "Lax" } = options;
|
|
958
968
|
ctx.header(
|
|
959
969
|
"Set-Cookie",
|
|
960
|
-
`${XSRF_COOKIE_NAME}=${encodeURIComponent(token)}; Path=${path}; SameSite=${sameSite}${secure ? "; Secure" : ""}
|
|
970
|
+
`${XSRF_COOKIE_NAME}=${encodeURIComponent(token)}; Path=${path}; SameSite=${sameSite}${secure ? "; Secure" : ""}`,
|
|
971
|
+
{ append: true }
|
|
961
972
|
);
|
|
962
973
|
}
|
|
963
974
|
|
|
@@ -2314,6 +2325,14 @@ function setInertiaSharedProps(resolverFn) {
|
|
|
2314
2325
|
function getInertiaSharedPropsResolver() {
|
|
2315
2326
|
return resolver;
|
|
2316
2327
|
}
|
|
2328
|
+
function shareInertiaProps(resolverFn) {
|
|
2329
|
+
const previous = resolver;
|
|
2330
|
+
resolver = async (ctx) => {
|
|
2331
|
+
const prev = previous ? await previous(ctx) : {};
|
|
2332
|
+
const next = await resolverFn(ctx);
|
|
2333
|
+
return { ...prev, ...next };
|
|
2334
|
+
};
|
|
2335
|
+
}
|
|
2317
2336
|
async function resolveSharedInertiaProps(ctx) {
|
|
2318
2337
|
if (!resolver) return {};
|
|
2319
2338
|
const shared = await resolver(ctx);
|
|
@@ -6500,6 +6519,7 @@ export {
|
|
|
6500
6519
|
getExceptionHandler,
|
|
6501
6520
|
getGate,
|
|
6502
6521
|
getI18n,
|
|
6522
|
+
getInertiaSharedPropsResolver,
|
|
6503
6523
|
getJob,
|
|
6504
6524
|
getLogManager,
|
|
6505
6525
|
getMailManager,
|
|
@@ -6600,6 +6620,7 @@ export {
|
|
|
6600
6620
|
setQueueDriver,
|
|
6601
6621
|
sha256,
|
|
6602
6622
|
sha512,
|
|
6623
|
+
shareInertiaProps,
|
|
6603
6624
|
shuffle,
|
|
6604
6625
|
signUrl,
|
|
6605
6626
|
size,
|
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 '../Application-
|
|
3
|
+
import { A as Application } from '../Application-D4_90raL.js';
|
|
4
4
|
import { S as Scheduler } from '../Scheduler-BstvSca7.js';
|
|
5
|
-
import { C as ConsoleKernel } from '../ConsoleKernel-
|
|
5
|
+
import { C as ConsoleKernel } from '../ConsoleKernel-BPYcP-2f.js';
|
|
6
6
|
import 'hono';
|
|
7
7
|
import '../api-token-BGOsfuI9.js';
|
|
8
8
|
import '@guren/orm';
|
|
@@ -11,7 +11,7 @@ import '../EventManager-CmIoLt7r.js';
|
|
|
11
11
|
import '../CacheManager-BkvHEOZX.js';
|
|
12
12
|
import '../MailManager-DpMvYiP9.js';
|
|
13
13
|
import '../LogManager-7mxnkaPM.js';
|
|
14
|
-
import '../I18nManager-
|
|
14
|
+
import '../I18nManager-BiSoczfV.js';
|
|
15
15
|
import '../BroadcastManager-CGWl9rUO.js';
|
|
16
16
|
import '../index-9_Jzj5jo.js';
|
|
17
17
|
import '../app-key-CsBfRC_Q.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 '../Application-
|
|
2
|
+
import { S as ServiceProvider } from '../Application-D4_90raL.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-BGOsfuI9.js';
|
|
5
5
|
import '@guren/orm';
|
|
@@ -8,7 +8,7 @@ import '../EventManager-CmIoLt7r.js';
|
|
|
8
8
|
import '../CacheManager-BkvHEOZX.js';
|
|
9
9
|
import '../MailManager-DpMvYiP9.js';
|
|
10
10
|
import '../LogManager-7mxnkaPM.js';
|
|
11
|
-
import '../I18nManager-
|
|
11
|
+
import '../I18nManager-BiSoczfV.js';
|
|
12
12
|
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as NotificationChannel, X as Notifiable, Y as Notification, q as DatabaseNotification, p as DatabaseChannelOptions, as as SlackMessage, ai as SentNotification } from '../Application-
|
|
2
|
-
export { Z as NotificationAttachment, $ as NotificationChannelFactory, a0 as NotificationClass, a1 as NotificationMailMessage, N as NotificationManager, a2 as NotificationManagerOptions, aq as SlackAttachment, ar as SlackBlock, aG as createNotificationManager,
|
|
1
|
+
import { _ as NotificationChannel, X as Notifiable, Y as Notification, q as DatabaseNotification, p as DatabaseChannelOptions, as as SlackMessage, ai as SentNotification } from '../Application-D4_90raL.js';
|
|
2
|
+
export { Z as NotificationAttachment, $ as NotificationChannelFactory, a0 as NotificationClass, a1 as NotificationMailMessage, N as NotificationManager, a2 as NotificationManagerOptions, aq as SlackAttachment, ar as SlackBlock, aG as createNotificationManager, aQ as getNotificationManager, a$ as setNotificationManager } from '../Application-D4_90raL.js';
|
|
3
3
|
import { M as MailManager } from '../MailManager-DpMvYiP9.js';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import '../api-token-BGOsfuI9.js';
|
|
@@ -8,7 +8,7 @@ import 'vite';
|
|
|
8
8
|
import '../EventManager-CmIoLt7r.js';
|
|
9
9
|
import '../CacheManager-BkvHEOZX.js';
|
|
10
10
|
import '../LogManager-7mxnkaPM.js';
|
|
11
|
-
import '../I18nManager-
|
|
11
|
+
import '../I18nManager-BiSoczfV.js';
|
|
12
12
|
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
package/dist/queue/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a5 as QueueDriver, a7 as QueuedJob, F as FailedJob, aw as WorkerOptions } from '../Application-
|
|
2
|
-
export { R as Job, T as JobClass, U as JobFailureHandler, V as JobHandler, W as JobOptions, a4 as QueueConfig, a6 as QueueDriverFactory, Q as QueueManager, aA as clearJobRegistry, aH as createQueueManager,
|
|
1
|
+
import { a5 as QueueDriver, a7 as QueuedJob, F as FailedJob, aw as WorkerOptions } from '../Application-D4_90raL.js';
|
|
2
|
+
export { R as Job, T as JobClass, U as JobFailureHandler, V as JobHandler, W as JobOptions, a4 as QueueConfig, a6 as QueueDriverFactory, Q as QueueManager, aA as clearJobRegistry, aH as createQueueManager, aP as getJob, aR as getQueueDriver, aS as getRegisteredJobs, aW as registerJob, b0 as setQueueDriver } from '../Application-D4_90raL.js';
|
|
3
3
|
import { Redis } from 'ioredis';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import '../api-token-BGOsfuI9.js';
|
|
@@ -9,7 +9,7 @@ import '../EventManager-CmIoLt7r.js';
|
|
|
9
9
|
import '../CacheManager-BkvHEOZX.js';
|
|
10
10
|
import '../MailManager-DpMvYiP9.js';
|
|
11
11
|
import '../LogManager-7mxnkaPM.js';
|
|
12
|
-
import '../I18nManager-
|
|
12
|
+
import '../I18nManager-BiSoczfV.js';
|
|
13
13
|
import '../BroadcastManager-CGWl9rUO.js';
|
|
14
14
|
import '../index-9_Jzj5jo.js';
|
|
15
15
|
import '../app-key-CsBfRC_Q.js';
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Application } from '../Application-
|
|
2
|
-
export { D as DevBannerOptions, G as GUREN_ASCII_ART, a as StartViteDevServerOptions, b as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../Application-
|
|
1
|
+
import { A as Application } from '../Application-D4_90raL.js';
|
|
2
|
+
export { D as DevBannerOptions, G as GUREN_ASCII_ART, a as StartViteDevServerOptions, b as StartedViteDevServer, l as logDevServerBanner, s as startViteDevServer } from '../Application-D4_90raL.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-BGOsfuI9.js';
|
|
5
5
|
import '@guren/orm';
|
|
@@ -8,7 +8,7 @@ import '../EventManager-CmIoLt7r.js';
|
|
|
8
8
|
import '../CacheManager-BkvHEOZX.js';
|
|
9
9
|
import '../MailManager-DpMvYiP9.js';
|
|
10
10
|
import '../LogManager-7mxnkaPM.js';
|
|
11
|
-
import '../I18nManager-
|
|
11
|
+
import '../I18nManager-BiSoczfV.js';
|
|
12
12
|
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
package/dist/runtime/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guren/server",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"test": "bun test"
|
|
106
106
|
},
|
|
107
107
|
"dependencies": {
|
|
108
|
-
"@guren/inertia-client": "^1.0.0-rc.
|
|
109
|
-
"@guren/orm": "^1.0.0-rc.
|
|
108
|
+
"@guren/inertia-client": "^1.0.0-rc.22",
|
|
109
|
+
"@guren/orm": "^1.0.0-rc.24",
|
|
110
110
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
111
111
|
"chalk": "^5.3.0",
|
|
112
112
|
"consola": "^3.4.2",
|