@guren/server 1.0.0-rc.19 → 1.0.0-rc.21
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-CddorcPa.d.ts → Application-BC-zq6d0.d.ts} +23 -1
- package/dist/{BroadcastManager-AkIWUGJo.d.ts → BroadcastManager-CGWl9rUO.d.ts} +5 -0
- package/dist/{ConsoleKernel-BlCJEZTR.d.ts → ConsoleKernel-BXy1SCyy.d.ts} +1 -1
- package/dist/broadcasting/index.d.ts +2 -2
- package/dist/broadcasting/index.js +1 -1
- package/dist/{chunk-2IP4LFVT.js → chunk-AFI3A6GB.js} +21 -3
- package/dist/{chunk-ORR2IYRD.js → chunk-CDLEYDHE.js} +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.js +34 -2
- 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
|
@@ -7,7 +7,7 @@ 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
9
|
import { I as I18nManager } from './I18nManager-Dtgzsf5n.js';
|
|
10
|
-
import { B as BroadcastManager } from './BroadcastManager-
|
|
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';
|
|
13
13
|
import { H as HealthManager } from './HealthManager-DUyMIzsZ.js';
|
|
@@ -1362,6 +1362,28 @@ declare class Controller {
|
|
|
1362
1362
|
}>(modelClass: T): Awaited<ReturnType<T['findOrFail']>>;
|
|
1363
1363
|
protected get ctx(): Context;
|
|
1364
1364
|
protected get request(): hono.HonoRequest<any, unknown>;
|
|
1365
|
+
/**
|
|
1366
|
+
* Get an uploaded file from a multipart request.
|
|
1367
|
+
*
|
|
1368
|
+
* Returns null when the field is missing, is not a file, or the upload is
|
|
1369
|
+
* empty. Hono caches the parsed body, so this composes with other body
|
|
1370
|
+
* reads in the same request.
|
|
1371
|
+
*
|
|
1372
|
+
* @example
|
|
1373
|
+
* ```typescript
|
|
1374
|
+
* const avatar = await this.file('avatar')
|
|
1375
|
+
* if (!avatar) {
|
|
1376
|
+
* throw ValidationException.withMessages({ avatar: 'Choose a file.' })
|
|
1377
|
+
* }
|
|
1378
|
+
* await storage.disk().put(`avatars/${avatar.name}`, Buffer.from(await avatar.arrayBuffer()))
|
|
1379
|
+
* ```
|
|
1380
|
+
*/
|
|
1381
|
+
protected file(name: string): Promise<File | null>;
|
|
1382
|
+
/**
|
|
1383
|
+
* Get all uploaded files for a multipart field (e.g. `<input multiple>`).
|
|
1384
|
+
* Returns an empty array when none were uploaded.
|
|
1385
|
+
*/
|
|
1386
|
+
protected files(name: string): Promise<File[]>;
|
|
1365
1387
|
protected get auth(): AuthContext;
|
|
1366
1388
|
protected make<K extends keyof ServiceBindings>(key: K): ServiceBindings[K];
|
|
1367
1389
|
protected make<T>(key: string): T;
|
|
@@ -123,6 +123,11 @@ interface SSEMiddlewareOptions {
|
|
|
123
123
|
* Retry delay for SSE reconnection.
|
|
124
124
|
*/
|
|
125
125
|
retry?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Function to get the user from the request context, used to authorize
|
|
128
|
+
* channels requested via the `?channels=` query parameter.
|
|
129
|
+
*/
|
|
130
|
+
getUser?: (ctx: unknown) => unknown | Promise<unknown>;
|
|
126
131
|
}
|
|
127
132
|
/**
|
|
128
133
|
* Auth middleware options.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BroadcastManager, P as PresenceBroadcastDriver, c as BroadcastEvent, j as PresenceMember } from '../BroadcastManager-
|
|
2
|
-
export { A as AuthMiddlewareOptions, a as BroadcastDriver, b as BroadcastDriverFactory, d as BroadcastManagerOptions, e as BroadcastableEvent, C as Channel, f as ChannelAuthorizer, g as ChannelRegistration, h as PresenceChannel, i as PresenceChannelAuthorizer, k as PrivateChannel, S as SSEClient, l as SSEMiddlewareOptions, W as WebSocketClient, m as createBroadcastManager, n as getBroadcastManager, s as setBroadcastManager } from '../BroadcastManager-
|
|
1
|
+
import { B as BroadcastManager, P as PresenceBroadcastDriver, c as BroadcastEvent, j as PresenceMember } from '../BroadcastManager-CGWl9rUO.js';
|
|
2
|
+
export { A as AuthMiddlewareOptions, a as BroadcastDriver, b as BroadcastDriverFactory, d as BroadcastManagerOptions, e as BroadcastableEvent, C as Channel, f as ChannelAuthorizer, g as ChannelRegistration, h as PresenceChannel, i as PresenceChannelAuthorizer, 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';
|
|
3
3
|
import '../index-9_Jzj5jo.js';
|
|
4
4
|
import 'hono';
|
|
5
5
|
|
|
@@ -630,7 +630,7 @@ var BroadcastManager = class {
|
|
|
630
630
|
async authorize(channelName, user) {
|
|
631
631
|
const registration = this.findChannelRegistration(channelName);
|
|
632
632
|
if (!registration) {
|
|
633
|
-
return
|
|
633
|
+
return !(channelName.startsWith("private-") || channelName.startsWith("presence-"));
|
|
634
634
|
}
|
|
635
635
|
if (registration.type === "presence") {
|
|
636
636
|
const presenceAuth = registration.authorizer;
|
|
@@ -664,6 +664,15 @@ var BroadcastManager = class {
|
|
|
664
664
|
const clientId = this.generateClientId();
|
|
665
665
|
const encoder = new TextEncoder();
|
|
666
666
|
const manager = this;
|
|
667
|
+
const requestedChannels = (ctx.req.query("channels") ?? "").split(",").map((value) => value.trim()).filter(Boolean);
|
|
668
|
+
const user = options.getUser ? await options.getUser(ctx) : void 0;
|
|
669
|
+
const authorizedChannels = [];
|
|
670
|
+
for (const channelName of requestedChannels) {
|
|
671
|
+
const authResult = await this.authorize(channelName, user);
|
|
672
|
+
if (authResult !== false && authResult !== null) {
|
|
673
|
+
authorizedChannels.push(channelName);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
667
676
|
let controller = null;
|
|
668
677
|
let client = null;
|
|
669
678
|
let pingTimer = null;
|
|
@@ -708,6 +717,10 @@ data: ${JSON.stringify(data)}
|
|
|
708
717
|
sendRaw(`retry: ${retry}
|
|
709
718
|
|
|
710
719
|
`);
|
|
720
|
+
client.send("connected", { clientId, channels: authorizedChannels });
|
|
721
|
+
for (const channelName of authorizedChannels) {
|
|
722
|
+
manager.subscribeClient(clientId, channelName);
|
|
723
|
+
}
|
|
711
724
|
pingTimer = setInterval(() => {
|
|
712
725
|
try {
|
|
713
726
|
client?.send("ping", { time: Date.now() });
|
|
@@ -743,16 +756,21 @@ data: ${JSON.stringify(data)}
|
|
|
743
756
|
if (channels.length === 0) {
|
|
744
757
|
return ctx.json({ error: "No channel specified" }, 400);
|
|
745
758
|
}
|
|
759
|
+
const clientId = typeof payload.clientId === "string" ? payload.clientId : void 0;
|
|
746
760
|
const results = {};
|
|
747
761
|
for (const ch of channels) {
|
|
748
762
|
const authResult = await this.authorize(ch, user);
|
|
749
763
|
if (authResult === false || authResult === null) {
|
|
750
764
|
results[ch] = { authorized: false };
|
|
751
|
-
|
|
752
|
-
|
|
765
|
+
continue;
|
|
766
|
+
}
|
|
767
|
+
const subscribed = clientId ? this.subscribeClient(clientId, ch) : false;
|
|
768
|
+
if (authResult === true) {
|
|
769
|
+
results[ch] = { authorized: true, subscribed };
|
|
753
770
|
} else {
|
|
754
771
|
results[ch] = {
|
|
755
772
|
authorized: true,
|
|
773
|
+
subscribed,
|
|
756
774
|
member: authResult
|
|
757
775
|
};
|
|
758
776
|
}
|
|
@@ -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.21",
|
|
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.20",
|
|
115
|
+
"@guren/orm": "^1.0.0-rc.22",
|
|
116
116
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
117
117
|
chalk: "^5.3.0",
|
|
118
118
|
consola: "^3.4.2",
|
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 getJob, aP as getNotificationManager, aQ as getQueueDriver, aR as getRegisteredJobs, aS as getValidatedData, aT as inertia, aU as parseRequestPayload, aV as registerJob, aW as resolve, aX as setContainer, aY as setExceptionHandler, aZ as setInertiaSharedProps, a_ as setNotificationManager, a$ as setQueueDriver, b0 as validate, b1 as validateRequest, b2 as validateRequestWith, b3 as validateSafe, b4 as verifyCsrfToken } from './Application-
|
|
1
|
+
import { E as ErrorResponse, S as ServiceProvider, C as Container, c as ServiceBindings, Q as QueueManager, N as NotificationManager } from './Application-BC-zq6d0.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 getJob, aP as getNotificationManager, aQ as getQueueDriver, aR as getRegisteredJobs, aS as getValidatedData, aT as inertia, aU as parseRequestPayload, aV as registerJob, aW as resolve, aX as setContainer, aY as setExceptionHandler, aZ as setInertiaSharedProps, a_ as setNotificationManager, a$ as setQueueDriver, b0 as validate, b1 as validateRequest, b2 as validateRequestWith, b3 as validateSafe, b4 as verifyCsrfToken } from './Application-BC-zq6d0.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Context, MiddlewareHandler } from 'hono';
|
|
5
5
|
export { Context } from 'hono';
|
|
@@ -32,11 +32,11 @@ export { JsonLoader, MemoryLoader, getPluralizationRule, pluralizationRules, sel
|
|
|
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';
|
|
34
34
|
export { DatabaseChannel, MailChannel, MailChannelOptions, MemoryChannel, SlackChannel, SlackChannelOptions } from './notifications/index.js';
|
|
35
|
-
import { B as BroadcastManager } from './BroadcastManager-
|
|
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-
|
|
35
|
+
import { B as BroadcastManager } from './BroadcastManager-CGWl9rUO.js';
|
|
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-BXy1SCyy.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-BXy1SCyy.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
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
logDevServerBanner,
|
|
103
103
|
parseImportMap,
|
|
104
104
|
startViteDevServer
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-CDLEYDHE.js";
|
|
106
106
|
import {
|
|
107
107
|
API_TOKEN_KEY,
|
|
108
108
|
AuthManager,
|
|
@@ -204,7 +204,7 @@ import {
|
|
|
204
204
|
getBroadcastManager,
|
|
205
205
|
parseRequestPayload,
|
|
206
206
|
setBroadcastManager
|
|
207
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-AFI3A6GB.js";
|
|
208
208
|
import {
|
|
209
209
|
CacheManager,
|
|
210
210
|
FileStore,
|
|
@@ -2382,6 +2382,38 @@ var Controller = class {
|
|
|
2382
2382
|
get request() {
|
|
2383
2383
|
return this.ctx.req;
|
|
2384
2384
|
}
|
|
2385
|
+
/**
|
|
2386
|
+
* Get an uploaded file from a multipart request.
|
|
2387
|
+
*
|
|
2388
|
+
* Returns null when the field is missing, is not a file, or the upload is
|
|
2389
|
+
* empty. Hono caches the parsed body, so this composes with other body
|
|
2390
|
+
* reads in the same request.
|
|
2391
|
+
*
|
|
2392
|
+
* @example
|
|
2393
|
+
* ```typescript
|
|
2394
|
+
* const avatar = await this.file('avatar')
|
|
2395
|
+
* if (!avatar) {
|
|
2396
|
+
* throw ValidationException.withMessages({ avatar: 'Choose a file.' })
|
|
2397
|
+
* }
|
|
2398
|
+
* await storage.disk().put(`avatars/${avatar.name}`, Buffer.from(await avatar.arrayBuffer()))
|
|
2399
|
+
* ```
|
|
2400
|
+
*/
|
|
2401
|
+
async file(name) {
|
|
2402
|
+
const body = await this.ctx.req.parseBody({ all: true });
|
|
2403
|
+
const value = body[name];
|
|
2404
|
+
const candidate = Array.isArray(value) ? value[0] : value;
|
|
2405
|
+
return candidate instanceof File && candidate.size > 0 ? candidate : null;
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Get all uploaded files for a multipart field (e.g. `<input multiple>`).
|
|
2409
|
+
* Returns an empty array when none were uploaded.
|
|
2410
|
+
*/
|
|
2411
|
+
async files(name) {
|
|
2412
|
+
const body = await this.ctx.req.parseBody({ all: true });
|
|
2413
|
+
const value = body[name];
|
|
2414
|
+
const values = Array.isArray(value) ? value : value !== void 0 ? [value] : [];
|
|
2415
|
+
return values.filter((item) => item instanceof File && item.size > 0);
|
|
2416
|
+
}
|
|
2385
2417
|
get auth() {
|
|
2386
2418
|
const auth = this.ctx.get(AUTH_CONTEXT_KEY);
|
|
2387
2419
|
if (!auth) {
|
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-BC-zq6d0.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-BXy1SCyy.js';
|
|
6
6
|
import 'hono';
|
|
7
7
|
import '../api-token-BGOsfuI9.js';
|
|
8
8
|
import '@guren/orm';
|
|
@@ -12,7 +12,7 @@ import '../CacheManager-BkvHEOZX.js';
|
|
|
12
12
|
import '../MailManager-DpMvYiP9.js';
|
|
13
13
|
import '../LogManager-7mxnkaPM.js';
|
|
14
14
|
import '../I18nManager-Dtgzsf5n.js';
|
|
15
|
-
import '../BroadcastManager-
|
|
15
|
+
import '../BroadcastManager-CGWl9rUO.js';
|
|
16
16
|
import '../index-9_Jzj5jo.js';
|
|
17
17
|
import '../app-key-CsBfRC_Q.js';
|
|
18
18
|
import '../StorageManager-oZTHqaza.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-BC-zq6d0.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-BGOsfuI9.js';
|
|
5
5
|
import '@guren/orm';
|
|
@@ -9,7 +9,7 @@ import '../CacheManager-BkvHEOZX.js';
|
|
|
9
9
|
import '../MailManager-DpMvYiP9.js';
|
|
10
10
|
import '../LogManager-7mxnkaPM.js';
|
|
11
11
|
import '../I18nManager-Dtgzsf5n.js';
|
|
12
|
-
import '../BroadcastManager-
|
|
12
|
+
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
|
15
15
|
import '../StorageManager-oZTHqaza.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, aP as getNotificationManager, a_ as setNotificationManager } from '../Application-
|
|
1
|
+
import { _ as NotificationChannel, X as Notifiable, Y as Notification, q as DatabaseNotification, p as DatabaseChannelOptions, as as SlackMessage, ai as SentNotification } from '../Application-BC-zq6d0.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, aP as getNotificationManager, a_ as setNotificationManager } from '../Application-BC-zq6d0.js';
|
|
3
3
|
import { M as MailManager } from '../MailManager-DpMvYiP9.js';
|
|
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 '../LogManager-7mxnkaPM.js';
|
|
11
11
|
import '../I18nManager-Dtgzsf5n.js';
|
|
12
|
-
import '../BroadcastManager-
|
|
12
|
+
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
|
15
15
|
import '../StorageManager-oZTHqaza.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, aO as getJob, aQ as getQueueDriver, aR as getRegisteredJobs, aV as registerJob, a$ as setQueueDriver } from '../Application-
|
|
1
|
+
import { a5 as QueueDriver, a7 as QueuedJob, F as FailedJob, aw as WorkerOptions } from '../Application-BC-zq6d0.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, aO as getJob, aQ as getQueueDriver, aR as getRegisteredJobs, aV as registerJob, a$ as setQueueDriver } from '../Application-BC-zq6d0.js';
|
|
3
3
|
import { Redis } from 'ioredis';
|
|
4
4
|
import 'hono';
|
|
5
5
|
import '../api-token-BGOsfuI9.js';
|
|
@@ -10,7 +10,7 @@ import '../CacheManager-BkvHEOZX.js';
|
|
|
10
10
|
import '../MailManager-DpMvYiP9.js';
|
|
11
11
|
import '../LogManager-7mxnkaPM.js';
|
|
12
12
|
import '../I18nManager-Dtgzsf5n.js';
|
|
13
|
-
import '../BroadcastManager-
|
|
13
|
+
import '../BroadcastManager-CGWl9rUO.js';
|
|
14
14
|
import '../index-9_Jzj5jo.js';
|
|
15
15
|
import '../app-key-CsBfRC_Q.js';
|
|
16
16
|
import '../StorageManager-oZTHqaza.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-BC-zq6d0.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-BC-zq6d0.js';
|
|
3
3
|
import 'hono';
|
|
4
4
|
import '../api-token-BGOsfuI9.js';
|
|
5
5
|
import '@guren/orm';
|
|
@@ -9,7 +9,7 @@ import '../CacheManager-BkvHEOZX.js';
|
|
|
9
9
|
import '../MailManager-DpMvYiP9.js';
|
|
10
10
|
import '../LogManager-7mxnkaPM.js';
|
|
11
11
|
import '../I18nManager-Dtgzsf5n.js';
|
|
12
|
-
import '../BroadcastManager-
|
|
12
|
+
import '../BroadcastManager-CGWl9rUO.js';
|
|
13
13
|
import '../index-9_Jzj5jo.js';
|
|
14
14
|
import '../app-key-CsBfRC_Q.js';
|
|
15
15
|
import '../StorageManager-oZTHqaza.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.21",
|
|
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.20",
|
|
109
|
+
"@guren/orm": "^1.0.0-rc.22",
|
|
110
110
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
111
111
|
"chalk": "^5.3.0",
|
|
112
112
|
"consola": "^3.4.2",
|