@guren/server 2.10.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{McpServiceProvider-BoAN-UcD.js → McpServiceProvider-D6D9nhgn.js} +1 -1
- package/dist/encryption/index.js +1 -1
- package/dist/{encryption-fOWQaKqX.js → encryption-DJtkkhiw.js} +35 -15
- package/dist/{errors-quJOkkCn.js → errors-BgeOl_DC.js} +1 -1
- package/dist/http/resources/Resource.d.ts +23 -3
- package/dist/http/vite-assets.d.ts +50 -0
- package/dist/http/vite-manifest.d.ts +80 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +174 -9
- package/dist/jsx-dev-runtime.d.ts +6 -0
- package/dist/jsx-dev-runtime.js +2 -0
- package/dist/jsx-runtime.d.ts +12 -0
- package/dist/jsx-runtime.js +8 -0
- package/dist/mcp/index.js +1 -1
- package/dist/mvc/Controller.d.ts +23 -0
- package/dist/mvc/view.d.ts +15 -0
- package/dist/rolldown-runtime-B4FMCO8f.js +28 -0
- package/dist/runtime/index.js +13 -51
- package/dist/storage/drivers/LocalDriver.d.ts +2 -1
- package/dist/storage/drivers/S3Driver.d.ts +17 -2
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/storage/types.d.ts +61 -1
- package/dist/{storage-tWHMv2H_.js → storage-TLD9t0Q2.js} +101 -24
- package/dist/vite-manifest-BKuV1kfv.js +251 -0
- package/package.json +10 -2
- package/dist/rolldown-runtime-8H4AJuhK.js +0 -14
- package/dist/vite-dev-server-CpCUqmiC.js +0 -131
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
2
|
import { r as ServiceProvider } from "./loopback-guard-D0Kc7-xc.js";
|
|
3
3
|
import { n as createMcpAccessGuard, r as isMcpEndpointEnabled, t as MCP_ENDPOINT_PATH } from "./endpoint-D-20PiHY.js";
|
|
4
4
|
import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
|
package/dist/encryption/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as generateAppKey, c as parseAppKey, i as encodeDerivedKey, l as parsePreviousAppKeys, n as deriveAppKey, o as getAppKeyringFromEnv, r as deriveAppKeyring, s as normalizeAppKey, t as MessageSigner } from "../MessageSigner-Bd25ZJAV.js";
|
|
2
2
|
import { a as md5, c as sha256, d as verifyPassword, i as hmac, l as sha512, n as hash, o as needsRehash, r as hashPassword, s as secureCompare, t as check, u as verifyHmac } from "../Hash-CzrwKeDp.js";
|
|
3
3
|
import { a as random, c as randomHex, d as sample, f as shuffle, i as pick, l as randomInt, m as uuid, n as generatePassword, o as randomBase64, p as urlSafeToken, r as generateSlug, s as randomBase64Url, t as generateOtp, u as randomString } from "../Random-DbIJ22KQ.js";
|
|
4
|
-
import { a as decrypt, c as getEncrypter, i as createEncrypter, l as setEncrypter, n as verifySignedUrl, o as encrypt, r as Encrypter, s as generateKey, t as signUrl } from "../encryption-
|
|
4
|
+
import { a as decrypt, c as getEncrypter, i as createEncrypter, l as setEncrypter, n as verifySignedUrl, o as encrypt, r as Encrypter, s as generateKey, t as signUrl } from "../encryption-DJtkkhiw.js";
|
|
5
5
|
export { Encrypter, MessageSigner, check, createEncrypter, decrypt, deriveAppKey, deriveAppKeyring, encodeDerivedKey, encrypt, generateAppKey, generateKey, generateOtp, generatePassword, generateSlug, getAppKeyringFromEnv, getEncrypter, hash, hashPassword, hmac, md5, needsRehash, normalizeAppKey, parseAppKey, parsePreviousAppKeys, pick, random, randomBase64, randomBase64Url, randomHex, randomInt, randomString, sample, secureCompare, setEncrypter, sha256, sha512, shuffle, signUrl, urlSafeToken, uuid, verifyHmac, verifyPassword, verifySignedUrl };
|
|
@@ -217,33 +217,53 @@ function decrypt(payload, options) {
|
|
|
217
217
|
const PURPOSE = "signed-url";
|
|
218
218
|
const SIGNATURE_PARAM = "signature";
|
|
219
219
|
const EXPIRES_PARAM = "expires";
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
url.search = "";
|
|
225
|
-
for (const [key, paramValue] of params) url.searchParams.append(key, paramValue);
|
|
220
|
+
const RELATIVE_BASE = "https://relative.invalid";
|
|
221
|
+
const EXPIRES_SHAPE = /^[0-9]{1,15}$/;
|
|
222
|
+
function parseUrl(value) {
|
|
223
|
+
const relative = value.startsWith("/");
|
|
226
224
|
return {
|
|
227
|
-
|
|
228
|
-
|
|
225
|
+
url: relative ? new URL(value, RELATIVE_BASE) : new URL(value),
|
|
226
|
+
relative
|
|
229
227
|
};
|
|
230
228
|
}
|
|
229
|
+
function serializeUrl(url, relative) {
|
|
230
|
+
return relative ? `${url.pathname}${url.search}` : url.toString();
|
|
231
|
+
}
|
|
232
|
+
function canonicalizeUrl(url) {
|
|
233
|
+
const canonical = new URL(url.toString());
|
|
234
|
+
canonical.searchParams.delete(SIGNATURE_PARAM);
|
|
235
|
+
const params = Array.from(canonical.searchParams.entries()).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
|
|
236
|
+
canonical.search = "";
|
|
237
|
+
for (const [key, paramValue] of params) canonical.searchParams.append(key, paramValue);
|
|
238
|
+
return `${canonical.pathname}${canonical.search}`;
|
|
239
|
+
}
|
|
231
240
|
function signUrl(value, keyring, options = {}) {
|
|
232
|
-
const url =
|
|
233
|
-
if (typeof options.expiresIn === "number")
|
|
234
|
-
|
|
241
|
+
const { url, relative } = parseUrl(value);
|
|
242
|
+
if (typeof options.expiresIn === "number") {
|
|
243
|
+
if (!Number.isFinite(options.expiresIn)) throw new TypeError(`signUrl: expiresIn must be a finite number of milliseconds, got ${options.expiresIn}`);
|
|
244
|
+
url.searchParams.set(EXPIRES_PARAM, String(Math.floor((Date.now() + options.expiresIn) / 1e3)));
|
|
245
|
+
}
|
|
246
|
+
const canonical = canonicalizeUrl(url);
|
|
235
247
|
const signature = new MessageSigner(keyring).sign({ url: canonical }, { purpose: PURPOSE });
|
|
236
248
|
url.searchParams.set(SIGNATURE_PARAM, signature);
|
|
237
|
-
return url
|
|
249
|
+
return serializeUrl(url, relative);
|
|
238
250
|
}
|
|
239
251
|
function verifySignedUrl(value, keyring, options = {}) {
|
|
240
|
-
|
|
252
|
+
let url;
|
|
253
|
+
try {
|
|
254
|
+
url = parseUrl(value).url;
|
|
255
|
+
} catch {
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
241
258
|
const signature = url.searchParams.get(SIGNATURE_PARAM);
|
|
242
259
|
if (!signature) return false;
|
|
243
260
|
const expires = url.searchParams.get(EXPIRES_PARAM);
|
|
244
261
|
if (options.requireExpiration && !expires) return false;
|
|
245
|
-
if (expires
|
|
246
|
-
|
|
262
|
+
if (expires !== null) {
|
|
263
|
+
if (!EXPIRES_SHAPE.test(expires)) return false;
|
|
264
|
+
if (Number(expires) < Math.floor(Date.now() / 1e3)) return false;
|
|
265
|
+
}
|
|
266
|
+
const canonical = canonicalizeUrl(url);
|
|
247
267
|
return new MessageSigner(keyring).verify(signature, { purpose: PURPOSE })?.url === canonical;
|
|
248
268
|
}
|
|
249
269
|
//#endregion
|
|
@@ -2,8 +2,28 @@ import type { ResourceData, ResourceClass } from './types.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Abstract base class for API resources.
|
|
4
4
|
* Transforms model data into API response format.
|
|
5
|
+
*
|
|
6
|
+
* `TData` names the payload `toArray()` builds, so `toJSON()` reports it too:
|
|
7
|
+
* `class PostResource extends Resource<PostRecord, PostResourceData>`. Without
|
|
8
|
+
* it every subclass had to restate the payload in an override whose only body
|
|
9
|
+
* was `return super.toJSON() as PostResourceData` — a cast that says nothing a
|
|
10
|
+
* type parameter cannot, and one nothing checks against the `toArray()` right
|
|
11
|
+
* above it.
|
|
12
|
+
*
|
|
13
|
+
* It defaults to `ResourceData` so `Resource<T>` and those overrides keep
|
|
14
|
+
* compiling: an override narrowing the return type stays assignable to the
|
|
15
|
+
* base. The polymorphic alternative (`toJSON(): ReturnType<this['toArray']>`)
|
|
16
|
+
* needs no parameter at all but rejects every existing override, which is a
|
|
17
|
+
* breaking change for code the scaffolds have been emitting all along.
|
|
18
|
+
*
|
|
19
|
+
* `TData` is a claim about `toArray()`, not about `toJSON()`'s every key:
|
|
20
|
+
* `additional()` takes arbitrary `ResourceData` and is spread *after* the
|
|
21
|
+
* payload, so a key that collides overwrites a typed field while the return
|
|
22
|
+
* type still reads `TData`. That hole is not new — it is what the
|
|
23
|
+
* `super.toJSON() as PostResourceData` override asserted past — but the type
|
|
24
|
+
* parameter does not close it. `additional()` is for keys beside the payload.
|
|
5
25
|
*/
|
|
6
|
-
export declare abstract class Resource<T> {
|
|
26
|
+
export declare abstract class Resource<T, TData extends ResourceData = ResourceData> {
|
|
7
27
|
/**
|
|
8
28
|
* The underlying resource.
|
|
9
29
|
*/
|
|
@@ -17,11 +37,11 @@ export declare abstract class Resource<T> {
|
|
|
17
37
|
* Transform the resource into an array/object.
|
|
18
38
|
* Must be implemented by subclasses.
|
|
19
39
|
*/
|
|
20
|
-
abstract toArray():
|
|
40
|
+
abstract toArray(): TData;
|
|
21
41
|
/**
|
|
22
42
|
* Transform the resource to JSON.
|
|
23
43
|
*/
|
|
24
|
-
toJSON():
|
|
44
|
+
toJSON(): TData;
|
|
25
45
|
/**
|
|
26
46
|
* Add additional data to the resource.
|
|
27
47
|
*/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for {@link viteAsset}. Ordinary applications call
|
|
3
|
+
* `viteAsset(entry)` with no options; `manifestPaths` exists for tests and
|
|
4
|
+
* unusual layouts.
|
|
5
|
+
*/
|
|
6
|
+
export interface ViteAssetOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Vite manifest candidate paths (absolute, or relative to the working
|
|
9
|
+
* directory). Defaults to the standard build output locations.
|
|
10
|
+
*/
|
|
11
|
+
manifestPaths?: string[];
|
|
12
|
+
}
|
|
13
|
+
/** @internal Test seam — clears the memoized manifest reads. */
|
|
14
|
+
export declare function __resetViteAssetCache(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the public URL of a Vite build input, for server-rendered content
|
|
17
|
+
* pages (RFC 0014). The URL is environment-dependent and this helper owns
|
|
18
|
+
* both branches:
|
|
19
|
+
*
|
|
20
|
+
* - **Development** (a dev server is configured, or `NODE_ENV` is not
|
|
21
|
+
* `production`): the Vite dev server serves the source path directly, so
|
|
22
|
+
* this returns `${devServerUrl}/${entry}`.
|
|
23
|
+
* - **Production**: the entry is looked up in the Vite build manifest and the
|
|
24
|
+
* hashed output file is returned under the `/public/assets/` route that
|
|
25
|
+
* `configureInertiaAssets` serves with immutable caching.
|
|
26
|
+
*
|
|
27
|
+
* Fails loudly: an unresolvable manifest or an entry the manifest does not
|
|
28
|
+
* record throws with the paths tried and the likely fix — never a silent
|
|
29
|
+
* empty string.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <link rel="stylesheet" href={viteAsset('resources/css/app.css')} />
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* Note a CSS file bundled *through* a JS entry (imported from `app.tsx`) has
|
|
37
|
+
* no manifest key of its own — declare it as an explicit build input in
|
|
38
|
+
* `vite.config.ts` (`build.rollupOptions.input`) so Vite emits and records
|
|
39
|
+
* it.
|
|
40
|
+
*
|
|
41
|
+
* **Serverless targets:** production resolution prefers a build-time
|
|
42
|
+
* injected manifest over the filesystem — when `GUREN_VITE_MANIFEST` holds
|
|
43
|
+
* the client manifest JSON, entries resolve from it and no file is read. The
|
|
44
|
+
* deploy plugins (`@guren/plugin-cloudflare`, `@guren/plugin-vercel`,
|
|
45
|
+
* `@guren/plugin-lambda`) populate it during their build step, so `view()`
|
|
46
|
+
* pages work on targets whose runtime never sees
|
|
47
|
+
* `public/assets/manifest.json`. An explicit `manifestPaths` still reads the
|
|
48
|
+
* named files — a caller stating paths is asking for exactly those.
|
|
49
|
+
*/
|
|
50
|
+
export declare function viteAsset(entry: string, options?: ViteAssetOptions): string;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one rule for how Vite build output is found and addressed, shared
|
|
3
|
+
* between the Inertia asset wiring (`inertia-assets.ts`) and the content-page
|
|
4
|
+
* `viteAsset()` helper (`vite-assets.ts`, RFC 0014): what counts as a
|
|
5
|
+
* manifest, where one may live (a filesystem path, or the build-time
|
|
6
|
+
* `GUREN_VITE_MANIFEST` injection for runtimes without one), which URL prefix
|
|
7
|
+
* serves the hashed files, and what "the dev server is on" means. Factored
|
|
8
|
+
* out so the two consumers cannot drift on any of it.
|
|
9
|
+
*/
|
|
10
|
+
/** Where `configureInertiaAssets` serves hashed build output from. */
|
|
11
|
+
export declare const PUBLIC_ASSETS_URL_PREFIX = "/public/assets/";
|
|
12
|
+
/** The Vite default the framework assumes when no dev-server URL is set. */
|
|
13
|
+
export declare const DEFAULT_DEV_SERVER_URL = "http://localhost:5173";
|
|
14
|
+
/**
|
|
15
|
+
* Production for *asset* purposes: `NODE_ENV` says so and no dev server is
|
|
16
|
+
* configured — a configured dev server means dev asset serving even when
|
|
17
|
+
* `NODE_ENV` is `production` (E2E runs do exactly this).
|
|
18
|
+
*/
|
|
19
|
+
export declare function isViteProduction(devServerUrl?: string | undefined): boolean;
|
|
20
|
+
export declare function normalizeDevServerUrl(value: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Candidate client-manifest locations under a project root, in preference
|
|
23
|
+
* order: `.vite/manifest.json` first, because Vite >= 5 writes it there — a
|
|
24
|
+
* flat `manifest.json` beside it is most likely a stale leftover from an
|
|
25
|
+
* older Vite config. The deploy plugins locate the same pair through
|
|
26
|
+
* `@guren/core`'s deploy-build helpers, and the two orders must agree, or an
|
|
27
|
+
* app with both layouts resolves different asset versions locally than after
|
|
28
|
+
* a serverless deploy; `tests/http/vite-manifest.test.ts` pins the agreement.
|
|
29
|
+
*
|
|
30
|
+
* `baseDir` defaults to the working directory (`viteAsset()`'s anchor); the
|
|
31
|
+
* Inertia wiring passes the root it derives from the app entry module.
|
|
32
|
+
*/
|
|
33
|
+
export declare function clientManifestCandidates(baseDir?: string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* `__path__` label for a manifest injected through {@link injectedClientManifest},
|
|
36
|
+
* so "entry not in the manifest" errors name the real source instead of a
|
|
37
|
+
* filesystem path that was never read.
|
|
38
|
+
*/
|
|
39
|
+
export declare const INJECTED_CLIENT_MANIFEST_SOURCE = "GUREN_VITE_MANIFEST (injected by the deploy build)";
|
|
40
|
+
/**
|
|
41
|
+
* The client manifest a deploy build injected for runtimes that do not ship
|
|
42
|
+
* `public/assets/manifest.json`: `GUREN_VITE_MANIFEST` holds the manifest
|
|
43
|
+
* *JSON text* (not a path). The deploy plugins populate it during their build
|
|
44
|
+
* step — Workers and Lambda as an assignment in their generated entry module,
|
|
45
|
+
* Vercel by substituting the read at bundle time.
|
|
46
|
+
*
|
|
47
|
+
* Fails loudly on a value that is set but not a manifest: falling through to
|
|
48
|
+
* the filesystem would end in "run `bunx vite build`", a diagnosis pointing
|
|
49
|
+
* away from the variable that is actually broken.
|
|
50
|
+
*/
|
|
51
|
+
export declare function injectedClientManifest(): ViteManifest | undefined;
|
|
52
|
+
export type ViteManifestEntryObject = {
|
|
53
|
+
file: string;
|
|
54
|
+
css?: string[];
|
|
55
|
+
assets?: string[];
|
|
56
|
+
imports?: string[];
|
|
57
|
+
dynamicImports?: string[];
|
|
58
|
+
};
|
|
59
|
+
export type ViteManifestValue = ViteManifestEntryObject | string[];
|
|
60
|
+
export type ViteManifest = Record<string, ViteManifestValue> & {
|
|
61
|
+
__path__?: string;
|
|
62
|
+
__raw__?: string;
|
|
63
|
+
};
|
|
64
|
+
export interface LoadViteManifestOptions {
|
|
65
|
+
/**
|
|
66
|
+
* Emit console warnings when no manifest is found (the Inertia wiring's
|
|
67
|
+
* behavior). `viteAsset()` passes `false` and throws its own error instead
|
|
68
|
+
* — a warning can scroll past, a missing stylesheet URL cannot.
|
|
69
|
+
*/
|
|
70
|
+
warnOnMissing?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Retain the raw manifest text as `__raw__` on the result. Off by default:
|
|
73
|
+
* only the Inertia wiring hashes it (for the build id), and long-lived
|
|
74
|
+
* caches should not pin hundreds of KB of JSON text nothing reads.
|
|
75
|
+
*/
|
|
76
|
+
includeRaw?: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare function loadViteManifest(candidatePaths: string[], label: 'client' | 'SSR', options?: LoadViteManifestOptions): ViteManifest | undefined;
|
|
79
|
+
export declare function getManifestFile(entry: ViteManifestValue | string | undefined): string | undefined;
|
|
80
|
+
export declare function getManifestCss(entry: ViteManifestValue | string | undefined): string[] | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ export type { Context, ApplicationListenOptions, ListenAddress, ServiceProviderC
|
|
|
3
3
|
export { parseRequestPayload, formatValidationErrors } from './http/request.js';
|
|
4
4
|
export { Controller } from './mvc/Controller.js';
|
|
5
5
|
export type { InertiaResponse, InferInertiaProps, ControllerInertiaProps, AuthPayload } from './mvc/Controller.js';
|
|
6
|
+
export { renderDocument } from './mvc/view.js';
|
|
7
|
+
export type { ViewOptions } from './mvc/view.js';
|
|
8
|
+
export type { FC, PropsWithChildren } from 'hono/jsx';
|
|
9
|
+
export { viteAsset } from './http/vite-assets.js';
|
|
10
|
+
export type { ViteAssetOptions } from './http/vite-assets.js';
|
|
6
11
|
export { Router } from './mvc/Router.js';
|
|
7
12
|
export type { BindableModel, RouteBuilder, RouteContractOptions, RouteDefinition, RouteMiddlewareInput, RouteModelBinding, RouteOpenApiMetadata, ResourceAction as RouteResourceAction, ResourceResponseHint, ResourceResponseShape, ResourceRouteOptions, } from './mvc/Router.js';
|
|
8
13
|
export { ViewEngine } from './mvc/ViewEngine.js';
|
|
@@ -28,7 +33,7 @@ export type { MailAddress, MailAttachment, MailMessage, SendResult, MailTranspor
|
|
|
28
33
|
export { CacheManager, MemoryStore as MemoryCacheStore, RedisStore as RedisCacheStore, FileStore as FileCacheStore, TaggedCache, createCacheManager, } from './cache/index.js';
|
|
29
34
|
export type { CacheStore, CacheConfig, CacheStoreFactory, } from './cache/index.js';
|
|
30
35
|
export { StorageManager, LocalDriver as LocalStorageDriver, MemoryDriver as MemoryStorageDriver, S3Driver, createStorageManager, } from './storage/index.js';
|
|
31
|
-
export type { StorageDriver, StorageConfig, DiskConfig, StorageDriverFactory, PutOptions, FileMetadata, } from './storage/index.js';
|
|
36
|
+
export type { StorageDriver, StorageConfig, DiskConfig, StorageDriverFactory, PutOptions, FileMetadata, TemporaryUrlOptions, GetStreamOptions, StorageDriverCapabilities, } from './storage/index.js';
|
|
32
37
|
export { Scheduler, Schedule, PendingSchedule, ScheduledTask, parseCron, matchesCron, getNextOccurrence, getNextOccurrences, isDue, isDueInTimezone, toTimezone, createScheduler, } from './scheduling/index.js';
|
|
33
38
|
export type { TaskCallback, TaskDefinition, SchedulerOptions, ParsedCron, JobClass as ScheduledJobClass, } from './scheduling/index.js';
|
|
34
39
|
export { Logger, filterSensitiveData, LogManager, ConsoleChannel, FileChannel, DailyFileChannel, LOG_LEVEL_PRIORITY, createLogManager, setLogManager, getLogManager, } from './logging/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as setBroadcastManager, c as PresenceChannel, d as flattenRequestQueries, f as formatValidationErrors, i as getBroadcastManager, l as PrivateChannel, n as BroadcastManager, o as RedisDriver, p as parseRequestPayload, r as createBroadcastManager, s as MemoryDriver, t as createTypedBroadcaster, u as Channel } from "./broadcasting-Dw-FhyjN.js";
|
|
2
2
|
import { t as HttpException } from "./HttpException-BkS3euNG.js";
|
|
3
|
-
import { n as ValidationException } from "./errors-
|
|
3
|
+
import { n as ValidationException } from "./errors-BgeOl_DC.js";
|
|
4
4
|
import { t as trimSlashes } from "./trim-slashes-ZJ_VsY5s.js";
|
|
5
5
|
import { a as getRegisteredJobs, c as setQueueDriver, d as getContainer, f as resolve, i as getQueueDriver, l as Container, n as clearJobRegistry, o as registerJob, p as setContainer, r as getJob, s as resolveJobName, t as Job, u as createContainer } from "./Job-BVT813DO.js";
|
|
6
6
|
import { n as ProviderManager, r as ServiceProvider } from "./loopback-guard-D0Kc7-xc.js";
|
|
@@ -11,8 +11,9 @@ import { r as isMcpEndpointEnabled } from "./endpoint-D-20PiHY.js";
|
|
|
11
11
|
import { n as isHotReloadRuntime, r as matchingOpenParen, t as claimHotDisposable } from "./hot-disposables-WsTX2ySN.js";
|
|
12
12
|
import { a as setI18n, c as tryGetI18n, d as getPluralizationRule, f as pluralizationRules, i as getI18n, l as JsonLoader, n as I18nManager, o as t, p as selectPluralForm, r as createI18n, s as tc, t as MemoryLoader, u as Translator } from "./i18n-mcWi7LCd.js";
|
|
13
13
|
import { _ as AuthorizationException, a as Policy, c as Response$1, d as cannot, f as createGate, g as setGate, i as withAuthorization, l as authorize, m as getGate, n as authorizeMiddleware, o as definePolicy, p as defineGate, r as authorizeResourceMiddleware, s as Gate, t as authorizeAllMiddleware, u as can } from "./authorization-Dbcuc5ZK.js";
|
|
14
|
-
import {
|
|
14
|
+
import { _ as parseImportMap, c as isViteProduction, d as startViteDevServer, g as DEFAULT_DEV_STYLES_ENTRY, h as logDevServerBanner, i as clientManifestCandidates, l as loadViteManifest, m as isWildcardHost, n as INJECTED_CLIENT_MANIFEST_SOURCE, o as getManifestFile, p as formatHostPort, r as PUBLIC_ASSETS_URL_PREFIX, s as injectedClientManifest, u as normalizeDevServerUrl } from "./vite-manifest-BKuV1kfv.js";
|
|
15
15
|
import { r as isDocsViewerEnabled } from "./endpoint-D6GIqOpe.js";
|
|
16
|
+
import { t as jsx_runtime_exports } from "./jsx-runtime.js";
|
|
16
17
|
import { a as RequestFinished, c as UserLoggedOut, d as createEventManager, f as Event, i as JobProcessed, l as Listener, n as ApplicationStarted, o as RequestReceived, r as JobFailed, s as UserAuthenticated, t as ApplicationShutdown, u as EventManager } from "./events-aIH_bWRx.js";
|
|
17
18
|
import { a as RedisStore, i as FileStore, n as createCacheManager, o as MemoryStore, r as TaggedCache, t as CacheManager } from "./cache-BYnZf2FR.js";
|
|
18
19
|
import { a as processJob, c as RedisDriver$1, i as Worker, l as SyncDriver, n as createQueueManager, o as SqsDriver, r as FailedJobReporter, s as createSqsAdapter, t as QueueManager, u as MemoryDriver$1 } from "./queue-CXrRK85G.js";
|
|
@@ -20,8 +21,8 @@ import { a as MailManager, c as MemoryTransport, i as setMailManager, l as Resen
|
|
|
20
21
|
import { a as DailyFileChannel, c as Logger, i as setLogManager, l as filterSensitiveData, n as createLogManager, o as FileChannel, r as getLogManager, s as ConsoleChannel, t as LogManager, u as LOG_LEVEL_PRIORITY } from "./logging-CPaRMuPP.js";
|
|
21
22
|
import { a as NotificationManager, c as setNotificationManager, d as getNotification, f as registerNotification, i as MailChannel, l as resolveNotifiableType, n as SlackChannel, o as createNotificationManager, p as Notification, r as DatabaseChannel, s as getNotificationManager, t as MemoryChannel, u as clearNotificationRegistry } from "./notifications-BGqmUNZ8.js";
|
|
22
23
|
import { a as random, c as randomHex, d as sample, f as shuffle, i as pick, l as randomInt, m as uuid, n as generatePassword, o as randomBase64, p as urlSafeToken, r as generateSlug, s as randomBase64Url, t as generateOtp, u as randomString } from "./Random-DbIJ22KQ.js";
|
|
23
|
-
import { a as decrypt, c as getEncrypter, i as createEncrypter, l as setEncrypter, n as verifySignedUrl, o as encrypt, r as Encrypter, s as generateKey, t as signUrl } from "./encryption-
|
|
24
|
-
import { a as LocalDriver, i as S3Driver, n as createStorageManager, o as warnOnce, r as MemoryDriver$2, t as StorageManager } from "./storage-
|
|
24
|
+
import { a as decrypt, c as getEncrypter, i as createEncrypter, l as setEncrypter, n as verifySignedUrl, o as encrypt, r as Encrypter, s as generateKey, t as signUrl } from "./encryption-DJtkkhiw.js";
|
|
25
|
+
import { a as LocalDriver, i as S3Driver, n as createStorageManager, o as warnOnce, r as MemoryDriver$2, t as StorageManager } from "./storage-TLD9t0Q2.js";
|
|
25
26
|
import { a as CacheCheck, c as HealthManager, i as StorageCheck, l as createHealthManager, n as customCheck, o as RedisCheck, r as MemoryCheck, s as DatabaseCheck, t as CustomCheck, u as HealthCheck } from "./health-VWdWXRwh.js";
|
|
26
27
|
import { a as ScheduledTask, c as isDue, d as parseCron, f as toTimezone, i as Schedule, l as isDueInTimezone, n as createScheduler, o as getNextOccurrence, r as PendingSchedule, s as getNextOccurrences, t as Scheduler, u as matchesCron } from "./scheduling-CPiEdtQd.js";
|
|
27
28
|
import { n as createRedisClient } from "./client-Dd7vLcqp.js";
|
|
@@ -2829,7 +2830,7 @@ async function inertia(component, props, options = {}) {
|
|
|
2829
2830
|
...options.headers
|
|
2830
2831
|
}
|
|
2831
2832
|
});
|
|
2832
|
-
const html = await renderDocument(page, options);
|
|
2833
|
+
const html = await renderDocument$1(page, options);
|
|
2833
2834
|
return new Response(html, {
|
|
2834
2835
|
status: options.status ?? 200,
|
|
2835
2836
|
headers: {
|
|
@@ -2851,7 +2852,7 @@ function inertiaPageUrl(request) {
|
|
|
2851
2852
|
const { pathname, search } = new URL(request.url);
|
|
2852
2853
|
return `${pathname}${search}`;
|
|
2853
2854
|
}
|
|
2854
|
-
async function renderDocument(page, options) {
|
|
2855
|
+
async function renderDocument$1(page, options) {
|
|
2855
2856
|
const defaultEntry = process.env.GUREN_INERTIA_ENTRY ?? "/resources/js/app.tsx";
|
|
2856
2857
|
const entry = options.entry ?? defaultEntry;
|
|
2857
2858
|
const title = escapeHtml$1(options.title ?? DEFAULT_TITLE);
|
|
@@ -3577,7 +3578,7 @@ var Application = class {
|
|
|
3577
3578
|
await this.providerManager.registerAll();
|
|
3578
3579
|
await this.options.boot?.(this.hono);
|
|
3579
3580
|
await this.mountRoutes();
|
|
3580
|
-
await this.mountDevEndpoint(isMcpEndpointEnabled(), async () => (await import("./McpServiceProvider-
|
|
3581
|
+
await this.mountDevEndpoint(isMcpEndpointEnabled(), async () => (await import("./McpServiceProvider-D6D9nhgn.js").then((n) => n.n)).McpServiceProvider, "GUREN_MCP=1 but the MCP endpoint could not load — is @modelcontextprotocol/sdk installed?");
|
|
3581
3582
|
await this.mountDevEndpoint(isDocsViewerEnabled(), async () => (await import("./DocsViewerServiceProvider-qFCaeiUv.js")).DocsViewerServiceProvider, "GUREN_DOCS=1 but the docs viewer could not load — is @guren/cli resolvable from this app?");
|
|
3582
3583
|
await this.providerManager.bootAll();
|
|
3583
3584
|
}
|
|
@@ -3849,6 +3850,54 @@ function createApp(options = {}) {
|
|
|
3849
3850
|
return new Application(options);
|
|
3850
3851
|
}
|
|
3851
3852
|
//#endregion
|
|
3853
|
+
//#region src/mvc/view.ts
|
|
3854
|
+
/**
|
|
3855
|
+
* Does the rendered output begin with an `<html>` root, allowing leading
|
|
3856
|
+
* whitespace and complete comments? A hand-rolled linear scan rather than a
|
|
3857
|
+
* regex: the equivalent pattern (`(?:\s|<!--.*?-->)*<html`) backtracks
|
|
3858
|
+
* exponentially on adversarial comment runs (CodeQL js/redos), and the body
|
|
3859
|
+
* being scanned can embed user-influenced raw markup.
|
|
3860
|
+
*/
|
|
3861
|
+
function startsWithHtmlRoot(body) {
|
|
3862
|
+
let i = 0;
|
|
3863
|
+
while (i < body.length) {
|
|
3864
|
+
const ch = body.charCodeAt(i);
|
|
3865
|
+
if (ch === 32 || ch >= 9 && ch <= 13) {
|
|
3866
|
+
i++;
|
|
3867
|
+
continue;
|
|
3868
|
+
}
|
|
3869
|
+
if (body.startsWith("<!--", i)) {
|
|
3870
|
+
const end = body.indexOf("-->", i + 4);
|
|
3871
|
+
if (end === -1) return false;
|
|
3872
|
+
i = end + 3;
|
|
3873
|
+
continue;
|
|
3874
|
+
}
|
|
3875
|
+
break;
|
|
3876
|
+
}
|
|
3877
|
+
if (body.slice(i, i + 5).toLowerCase() !== "<html") return false;
|
|
3878
|
+
const next = body.charCodeAt(i + 5);
|
|
3879
|
+
return next === 62 || next === 32 || next >= 9 && next <= 13;
|
|
3880
|
+
}
|
|
3881
|
+
/**
|
|
3882
|
+
* Render a `hono/jsx` component to a plain server-rendered HTML `Response` —
|
|
3883
|
+
* the engine behind `Controller.view()` (RFC 0014), separated the way
|
|
3884
|
+
* `inertia()` is from `Controller.inertia()`.
|
|
3885
|
+
*/
|
|
3886
|
+
async function renderDocument(component, props, options = {}) {
|
|
3887
|
+
const body = String(await (0, jsx_runtime_exports.jsx)(component, props, void 0).toString());
|
|
3888
|
+
if (options.doctype !== false && !startsWithHtmlRoot(body)) {
|
|
3889
|
+
const name = component.displayName ?? component.name ?? "component";
|
|
3890
|
+
throw new Error(`view(): ${name} rendered a fragment, not a document. Wrap the page in your Layout (an <html> root), or pass { doctype: false } for an intentional fragment response. Without <html>/<head>, <title> and <meta> tags are not hoisted and the page ships unstyled.`);
|
|
3891
|
+
}
|
|
3892
|
+
const { doctype, headers: headersInit, ...init } = options;
|
|
3893
|
+
const headers = new Headers(headersInit);
|
|
3894
|
+
if (!headers.has("content-type")) headers.set("content-type", "text/html; charset=utf-8");
|
|
3895
|
+
return new Response((doctype === false ? "" : "<!doctype html>") + body, {
|
|
3896
|
+
...init,
|
|
3897
|
+
headers
|
|
3898
|
+
});
|
|
3899
|
+
}
|
|
3900
|
+
//#endregion
|
|
3852
3901
|
//#region src/mvc/Controller.ts
|
|
3853
3902
|
/**
|
|
3854
3903
|
* Base controller inspired by Laravel's expressive API. Subclasses can access
|
|
@@ -4012,6 +4061,29 @@ var Controller = class {
|
|
|
4012
4061
|
if (!auth) return null;
|
|
4013
4062
|
return await auth.user();
|
|
4014
4063
|
}
|
|
4064
|
+
/**
|
|
4065
|
+
* Render a `hono/jsx` component to a plain server-rendered HTML response —
|
|
4066
|
+
* the non-hydrating counterpart to {@link inertia} for public content pages
|
|
4067
|
+
* (RFC 0014). Takes the component and its props separately so controllers
|
|
4068
|
+
* stay plain `.ts` and the props are type-checked at the call site.
|
|
4069
|
+
*
|
|
4070
|
+
* Escaping covers markup: text children and attribute values are escaped,
|
|
4071
|
+
* so tag and attribute breakout cannot occur. It does **not** validate URL
|
|
4072
|
+
* schemes — a `javascript:` href built from user data is emitted verbatim.
|
|
4073
|
+
* Sanitize user-supplied URLs upstream (e.g. `@guren/plugin-markdown`'s
|
|
4074
|
+
* allowlist) before they reach a View.
|
|
4075
|
+
*
|
|
4076
|
+
* @example
|
|
4077
|
+
* ```typescript
|
|
4078
|
+
* async show() {
|
|
4079
|
+
* const post = await Post.findOrFail(id)
|
|
4080
|
+
* return this.view(PostPage, { post })
|
|
4081
|
+
* }
|
|
4082
|
+
* ```
|
|
4083
|
+
*/
|
|
4084
|
+
view(component, props, options) {
|
|
4085
|
+
return renderDocument(component, props, options);
|
|
4086
|
+
}
|
|
4015
4087
|
async inertia(componentOrPage, props, options = {}) {
|
|
4016
4088
|
const ctx = this.ctx;
|
|
4017
4089
|
const component = typeof componentOrPage === "string" ? componentOrPage : componentOrPage.component ?? componentOrPage.id;
|
|
@@ -4291,6 +4363,79 @@ var Controller = class {
|
|
|
4291
4363
|
}
|
|
4292
4364
|
};
|
|
4293
4365
|
//#endregion
|
|
4366
|
+
//#region src/http/vite-assets.ts
|
|
4367
|
+
let defaultCandidates;
|
|
4368
|
+
const manifestCache = /* @__PURE__ */ new Map();
|
|
4369
|
+
/**
|
|
4370
|
+
* One manifest resolution, memoized until {@link __resetViteAssetCache}.
|
|
4371
|
+
* `null` records "looked and found nothing" so absence is not re-probed per
|
|
4372
|
+
* render. The injected manifest shares the cache under its fixed source
|
|
4373
|
+
* label, which cannot collide with the other keys — those are joined
|
|
4374
|
+
* absolute paths.
|
|
4375
|
+
*/
|
|
4376
|
+
function memoizedManifest(key, load) {
|
|
4377
|
+
let manifest = manifestCache.get(key);
|
|
4378
|
+
if (manifest === void 0) {
|
|
4379
|
+
manifest = load() ?? null;
|
|
4380
|
+
manifestCache.set(key, manifest);
|
|
4381
|
+
}
|
|
4382
|
+
return manifest;
|
|
4383
|
+
}
|
|
4384
|
+
/** The production tail: hashed output file → served URL, or the loud throw. */
|
|
4385
|
+
function manifestAssetUrl(manifest, normalizedEntry) {
|
|
4386
|
+
const file = getManifestFile(manifest[normalizedEntry]);
|
|
4387
|
+
if (!file) throw new Error(`viteAsset(): "${normalizedEntry}" is not in the Vite manifest at ${manifest.__path__ ?? "an unknown path"}. Declare it as a build input in vite.config.ts (build.rollupOptions.input) so Vite emits and records it.`);
|
|
4388
|
+
return `${PUBLIC_ASSETS_URL_PREFIX}${trimSlashes(file)}`;
|
|
4389
|
+
}
|
|
4390
|
+
/**
|
|
4391
|
+
* Resolve the public URL of a Vite build input, for server-rendered content
|
|
4392
|
+
* pages (RFC 0014). The URL is environment-dependent and this helper owns
|
|
4393
|
+
* both branches:
|
|
4394
|
+
*
|
|
4395
|
+
* - **Development** (a dev server is configured, or `NODE_ENV` is not
|
|
4396
|
+
* `production`): the Vite dev server serves the source path directly, so
|
|
4397
|
+
* this returns `${devServerUrl}/${entry}`.
|
|
4398
|
+
* - **Production**: the entry is looked up in the Vite build manifest and the
|
|
4399
|
+
* hashed output file is returned under the `/public/assets/` route that
|
|
4400
|
+
* `configureInertiaAssets` serves with immutable caching.
|
|
4401
|
+
*
|
|
4402
|
+
* Fails loudly: an unresolvable manifest or an entry the manifest does not
|
|
4403
|
+
* record throws with the paths tried and the likely fix — never a silent
|
|
4404
|
+
* empty string.
|
|
4405
|
+
*
|
|
4406
|
+
* @example
|
|
4407
|
+
* ```tsx
|
|
4408
|
+
* <link rel="stylesheet" href={viteAsset('resources/css/app.css')} />
|
|
4409
|
+
* ```
|
|
4410
|
+
*
|
|
4411
|
+
* Note a CSS file bundled *through* a JS entry (imported from `app.tsx`) has
|
|
4412
|
+
* no manifest key of its own — declare it as an explicit build input in
|
|
4413
|
+
* `vite.config.ts` (`build.rollupOptions.input`) so Vite emits and records
|
|
4414
|
+
* it.
|
|
4415
|
+
*
|
|
4416
|
+
* **Serverless targets:** production resolution prefers a build-time
|
|
4417
|
+
* injected manifest over the filesystem — when `GUREN_VITE_MANIFEST` holds
|
|
4418
|
+
* the client manifest JSON, entries resolve from it and no file is read. The
|
|
4419
|
+
* deploy plugins (`@guren/plugin-cloudflare`, `@guren/plugin-vercel`,
|
|
4420
|
+
* `@guren/plugin-lambda`) populate it during their build step, so `view()`
|
|
4421
|
+
* pages work on targets whose runtime never sees
|
|
4422
|
+
* `public/assets/manifest.json`. An explicit `manifestPaths` still reads the
|
|
4423
|
+
* named files — a caller stating paths is asking for exactly those.
|
|
4424
|
+
*/
|
|
4425
|
+
function viteAsset(entry, options = {}) {
|
|
4426
|
+
const normalizedEntry = trimSlashes(entry);
|
|
4427
|
+
const devServerUrl = process.env.VITE_DEV_SERVER_URL;
|
|
4428
|
+
if (!isViteProduction(devServerUrl)) return `${normalizeDevServerUrl(devServerUrl ?? "http://localhost:5173")}/${normalizedEntry}`;
|
|
4429
|
+
if (!options.manifestPaths) {
|
|
4430
|
+
const injected = memoizedManifest(INJECTED_CLIENT_MANIFEST_SOURCE, injectedClientManifest);
|
|
4431
|
+
if (injected) return manifestAssetUrl(injected, normalizedEntry);
|
|
4432
|
+
}
|
|
4433
|
+
const candidates = options.manifestPaths ? options.manifestPaths.map((path) => resolve$1(path)) : defaultCandidates ??= clientManifestCandidates();
|
|
4434
|
+
const manifest = memoizedManifest(candidates.join("\n"), () => loadViteManifest(candidates, "client", { warnOnMissing: false }));
|
|
4435
|
+
if (!manifest) throw new Error(`viteAsset(): no Vite manifest found. Checked:\n${candidates.map((path) => ` - ${path}`).join("\n")}\nRun \`bunx vite build\` before starting in production, or pass { manifestPaths } pointing at the build output.`);
|
|
4436
|
+
return manifestAssetUrl(manifest, normalizedEntry);
|
|
4437
|
+
}
|
|
4438
|
+
//#endregion
|
|
4294
4439
|
//#region src/providers/OAuthServiceProvider.ts
|
|
4295
4440
|
/**
|
|
4296
4441
|
* Binds OAuthManager as a singleton in the container.
|
|
@@ -4631,7 +4776,7 @@ var Validator = class Validator {
|
|
|
4631
4776
|
async validateOrThrow(data) {
|
|
4632
4777
|
const result = await this.validate(data);
|
|
4633
4778
|
if (!result.success) {
|
|
4634
|
-
const { ValidationException } = await import("./errors-
|
|
4779
|
+
const { ValidationException } = await import("./errors-BgeOl_DC.js").then((n) => n.t);
|
|
4635
4780
|
throw new ValidationException(result.errors);
|
|
4636
4781
|
}
|
|
4637
4782
|
return result.data;
|
|
@@ -5661,6 +5806,26 @@ function createSeederRunner(options) {
|
|
|
5661
5806
|
/**
|
|
5662
5807
|
* Abstract base class for API resources.
|
|
5663
5808
|
* Transforms model data into API response format.
|
|
5809
|
+
*
|
|
5810
|
+
* `TData` names the payload `toArray()` builds, so `toJSON()` reports it too:
|
|
5811
|
+
* `class PostResource extends Resource<PostRecord, PostResourceData>`. Without
|
|
5812
|
+
* it every subclass had to restate the payload in an override whose only body
|
|
5813
|
+
* was `return super.toJSON() as PostResourceData` — a cast that says nothing a
|
|
5814
|
+
* type parameter cannot, and one nothing checks against the `toArray()` right
|
|
5815
|
+
* above it.
|
|
5816
|
+
*
|
|
5817
|
+
* It defaults to `ResourceData` so `Resource<T>` and those overrides keep
|
|
5818
|
+
* compiling: an override narrowing the return type stays assignable to the
|
|
5819
|
+
* base. The polymorphic alternative (`toJSON(): ReturnType<this['toArray']>`)
|
|
5820
|
+
* needs no parameter at all but rejects every existing override, which is a
|
|
5821
|
+
* breaking change for code the scaffolds have been emitting all along.
|
|
5822
|
+
*
|
|
5823
|
+
* `TData` is a claim about `toArray()`, not about `toJSON()`'s every key:
|
|
5824
|
+
* `additional()` takes arbitrary `ResourceData` and is spread *after* the
|
|
5825
|
+
* payload, so a key that collides overwrites a typed field while the return
|
|
5826
|
+
* type still reads `TData`. That hole is not new — it is what the
|
|
5827
|
+
* `super.toJSON() as PostResourceData` override asserted past — but the type
|
|
5828
|
+
* parameter does not close it. `additional()` is for keys beside the payload.
|
|
5664
5829
|
*/
|
|
5665
5830
|
var Resource = class {
|
|
5666
5831
|
/**
|
|
@@ -8008,4 +8173,4 @@ var DefaultHasher = class {
|
|
|
8008
8173
|
//#region src/index.ts
|
|
8009
8174
|
ensureErrorStackTracePolyfill();
|
|
8010
8175
|
//#endregion
|
|
8011
|
-
export { API_TOKEN_KEY, AUTH_CONTEXT_KEY, Application, ApplicationShutdown, ApplicationStarted, AuthManager, Response$1 as AuthResponse, AuthServiceProvider, AuthenticatableModel, AuthenticationException, AuthorizationException, AuthorizationServiceProvider, AutoDiscovery, BaseFactory, BaseFactory as Factory, BaseSeeder, BaseSeeder as Seeder, BaseUserProvider, BroadcastManager, BroadcastServiceProvider, BufferedOutput, CSP_NONCE_KEY, CSRF_FORM_FIELD, CSRF_HEADER_NAME, CSRF_TOKEN_KEY, CacheCheck, CacheManager, CacheServiceProvider, Channel, Command, ConsoleChannel, ConsoleKernel, Container, Controller, CursorPaginator, CustomCheck, DailyFileChannel, DatabaseChannel, DatabaseCheck, DefaultHasher, DefaultHasher as Hash, Encrypter, EncryptionServiceProvider, ErrorServiceProvider, Event, EventManager, EventServiceProvider, ExceptionHandler, FailedJobReporter, FieldValidator, FileStore as FileCacheStore, FileChannel, FormRequest, Gate, HealthCheck, HealthManager, HealthServiceProvider, HttpException, I18nManager, I18nServiceProvider, InertiaServiceProvider, Input, Job, JobFailed, JobProcessed, JsonLoader, JsonResource, LOCALE_CONTEXT_KEY, LOG_LEVEL_PRIORITY, Listener, LocalDriver as LocalStorageDriver, LogManager, LogServiceProvider, LogTransport, Logger, Mail, MailChannel, MailManager, MailServiceProvider, MemoryApiTokenStore, MemoryDriver as MemoryBroadcastDriver, MemoryStore as MemoryCacheStore, MemoryChannel, MemoryCheck, MemoryDriver$1 as MemoryDriver, MemoryDriver$1 as MemoryQueueDriver, MemoryEmailVerificationStore, MemoryLoader, MemoryOAuthStateStore, MemoryPasswordResetStore, MemoryRateLimitStore, MemorySessionStore, MemoryDriver$2 as MemoryStorageDriver, MemoryTransport, MessageSigner, MethodNotAllowedException, ModelUserProvider, NodeHasher, NotFoundHttpException, Notification, NotificationManager, NotificationServiceProvider, OAUTH_SESSION_BINDING_KEY, OAuthManager, OAuthServiceProvider, Output, Paginator, PendingSchedule, Policy, PresenceChannel, PrivateChannel, ProviderManager, QueueManager, QueueServiceProvider, RedisDriver as RedisBroadcastDriver, RedisStore as RedisCacheStore, RedisCheck, RedisDriver$1 as RedisDriver, RedisDriver$1 as RedisQueueDriver, RequestFinished, RequestReceived, ResendTransport, Resource, ResourceCollection, Router, S3Driver, Schedule, ScheduledTask, Scheduler, SchedulingServiceProvider, ScryptHasher, SeederRunner, ServiceProvider, SessionGuard, SlackChannel, SlidingWindowRateLimitStore, SmtpTransport, SqsDriver, StorageCheck, StorageManager, StorageServiceProvider, SyncDriver, SyncDriver as SyncQueueDriver, TaggedCache, Translator, UserAuthenticated, UserLoggedOut, VALIDATED_DATA_KEY, ValidationException, Validator, ViewEngine, Worker, abort, abortIf, abortUnless, after, afterOrEqual, alpha, alphaDash, alphaNum, array as arrayRule, attachAuthContext, authorize as authorizeAbility, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, before, beforeOrEqual, between, boolean as booleanRule, buildOAuthAuthorizeUrl, buildOAuthRedirectUrl, buildPasswordResetUrl, buildVerificationUrl, can, cannot, check as checkHash, clearJobRegistry, clearNotificationRegistry, collect, completeEmailVerification, completePasswordReset, confirmed, createApiToken, createApp, createBearerTokenMiddleware, createBroadcastManager, createCacheManager, createConsoleKernel, createContainer, createCorsMiddleware, createCspMiddleware, createCsrfMiddleware, createDiscordOAuthProviderConfig, createEmailVerificationToken, createEncrypter, createEventManager, createExceptionHandler, createFacade, createFacades, createForceHttpsMiddleware, createGate, createGitHubOAuthProviderConfig, createGoogleOAuthProviderConfig, createHealthManager, createHostAuthorizationMiddleware, createI18n, createLogManager, createMailManager, createNotificationManager, createOAuthManager, createOAuthState, createPasswordResetToken, createQueueManager, createRateLimitMiddleware, createRedirectSafetyMiddleware, createRedisClient, createScheduler, createSecurityHeaders, createSeederRunner, createSessionMiddleware, createSqsAdapter, createStorageManager, createTypedBroadcaster, createValidator, csrfField, cursorPaginate, custom, customCheck, dateFormat, date as dateRule, debugErrorMiddleware, decodeCursor, decrypt, defineFactory, defineGate, defineMiddleware, defineModule, definePlugin, definePolicy, deriveAppKey, deriveAppKeyring, detectLocaleMiddleware, different, email as emailRule, encodeCursor, encrypt, endsWith, exchangeOAuthCode, exists, fetchOAuthUserProfile, file as fileRule, filterSensitiveData, formatValidationErrors, generateAppKey, generateKey, generateOtp, generatePassword, generateSlug, getApiToken, getApiTokenOrFail, getAppKeyringFromEnv, getBroadcastManager, getContainer, getCspNonce, getCsrfToken, getEncrypter, getExceptionHandler, getGate, getI18n, getInertiaSharedPropsResolver, getJob, getLogManager, getMailManager, getNextOccurrence, getNextOccurrences, getNotification, getNotificationManager, getPluralizationRule, getQueueDriver, getRateLimitInfo, getRegisteredJobs, getRequestLocale, getRequestTranslator, getSessionFromContext, getUserApiTokens, getValidatedData, hash, hashPassword, hmac, image as imageRule, inValues, inertia, integer, ip, ipv4, ipv6, isDue, isDueInTimezone, isEmailVerified, isSafeRedirectUrl, jsonResponse, json as jsonRule, mail, matchesCron, max, maxFileSize, md5, mimes, min, minFileSize, mountModuleRoutes, needsRehash, normalizeAppKey, notIn, nullable, numeric, object as objectRule, paginate, parseApiToken, parseAppKey, parseCron, parseOAuthRedirectUrl, parsePasswordResetUrl, parsePreviousAppKeys, parseRequestPayload, parseSignature, parseVerificationUrl, pick, pluralizationRules, processJob, quickValidate, quickValidateOrThrow, random, randomBase64, randomBase64Url, randomHex, randomInt, randomString, regex, registerJob, registerNotification, renderDebugPage, renderErrorPage, requestIdMiddleware, requestLoggingMiddleware, requireAuthenticated, requireGuest, requireVerifiedEmail, required, requiredIf, requiredUnless, requiredWith, requiredWithout, resetCalledSeeders, resetRateLimit, resolve, resolveJobName, resolveNotifiableType, revokeAllApiTokens, revokeApiToken, same, sample, sanitizeOAuthRedirect, secureCompare, selectPluralForm, setBroadcastManager, setContainer, setEncrypter, setExceptionHandler, setGate, setI18n, setInertiaDocument, setInertiaSharedProps, setInertiaSsrRenderer, setLogManager, setMailManager, setNotificationManager, setQueueDriver, sha256, sha512, shareInertiaProps, shuffle, signUrl, size, startsWith, string as stringRule, t, tc, toTimezone, tokenCan, tokenCanAll, tokenCanAny, tryGetI18n, unique, url as urlRule, urlSafeToken, uuid, uuid$1 as uuidRule, validate, validateRequest, validateRequestWith, validateSafe, verifyApiToken, verifyCsrfToken, verifyEmailToken, verifyHmac, verifyOAuthState, verifyPassword, verifyPasswordResetToken, verifySignedUrl, withAuthorization };
|
|
8176
|
+
export { API_TOKEN_KEY, AUTH_CONTEXT_KEY, Application, ApplicationShutdown, ApplicationStarted, AuthManager, Response$1 as AuthResponse, AuthServiceProvider, AuthenticatableModel, AuthenticationException, AuthorizationException, AuthorizationServiceProvider, AutoDiscovery, BaseFactory, BaseFactory as Factory, BaseSeeder, BaseSeeder as Seeder, BaseUserProvider, BroadcastManager, BroadcastServiceProvider, BufferedOutput, CSP_NONCE_KEY, CSRF_FORM_FIELD, CSRF_HEADER_NAME, CSRF_TOKEN_KEY, CacheCheck, CacheManager, CacheServiceProvider, Channel, Command, ConsoleChannel, ConsoleKernel, Container, Controller, CursorPaginator, CustomCheck, DailyFileChannel, DatabaseChannel, DatabaseCheck, DefaultHasher, DefaultHasher as Hash, Encrypter, EncryptionServiceProvider, ErrorServiceProvider, Event, EventManager, EventServiceProvider, ExceptionHandler, FailedJobReporter, FieldValidator, FileStore as FileCacheStore, FileChannel, FormRequest, Gate, HealthCheck, HealthManager, HealthServiceProvider, HttpException, I18nManager, I18nServiceProvider, InertiaServiceProvider, Input, Job, JobFailed, JobProcessed, JsonLoader, JsonResource, LOCALE_CONTEXT_KEY, LOG_LEVEL_PRIORITY, Listener, LocalDriver as LocalStorageDriver, LogManager, LogServiceProvider, LogTransport, Logger, Mail, MailChannel, MailManager, MailServiceProvider, MemoryApiTokenStore, MemoryDriver as MemoryBroadcastDriver, MemoryStore as MemoryCacheStore, MemoryChannel, MemoryCheck, MemoryDriver$1 as MemoryDriver, MemoryDriver$1 as MemoryQueueDriver, MemoryEmailVerificationStore, MemoryLoader, MemoryOAuthStateStore, MemoryPasswordResetStore, MemoryRateLimitStore, MemorySessionStore, MemoryDriver$2 as MemoryStorageDriver, MemoryTransport, MessageSigner, MethodNotAllowedException, ModelUserProvider, NodeHasher, NotFoundHttpException, Notification, NotificationManager, NotificationServiceProvider, OAUTH_SESSION_BINDING_KEY, OAuthManager, OAuthServiceProvider, Output, Paginator, PendingSchedule, Policy, PresenceChannel, PrivateChannel, ProviderManager, QueueManager, QueueServiceProvider, RedisDriver as RedisBroadcastDriver, RedisStore as RedisCacheStore, RedisCheck, RedisDriver$1 as RedisDriver, RedisDriver$1 as RedisQueueDriver, RequestFinished, RequestReceived, ResendTransport, Resource, ResourceCollection, Router, S3Driver, Schedule, ScheduledTask, Scheduler, SchedulingServiceProvider, ScryptHasher, SeederRunner, ServiceProvider, SessionGuard, SlackChannel, SlidingWindowRateLimitStore, SmtpTransport, SqsDriver, StorageCheck, StorageManager, StorageServiceProvider, SyncDriver, SyncDriver as SyncQueueDriver, TaggedCache, Translator, UserAuthenticated, UserLoggedOut, VALIDATED_DATA_KEY, ValidationException, Validator, ViewEngine, Worker, abort, abortIf, abortUnless, after, afterOrEqual, alpha, alphaDash, alphaNum, array as arrayRule, attachAuthContext, authorize as authorizeAbility, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, before, beforeOrEqual, between, boolean as booleanRule, buildOAuthAuthorizeUrl, buildOAuthRedirectUrl, buildPasswordResetUrl, buildVerificationUrl, can, cannot, check as checkHash, clearJobRegistry, clearNotificationRegistry, collect, completeEmailVerification, completePasswordReset, confirmed, createApiToken, createApp, createBearerTokenMiddleware, createBroadcastManager, createCacheManager, createConsoleKernel, createContainer, createCorsMiddleware, createCspMiddleware, createCsrfMiddleware, createDiscordOAuthProviderConfig, createEmailVerificationToken, createEncrypter, createEventManager, createExceptionHandler, createFacade, createFacades, createForceHttpsMiddleware, createGate, createGitHubOAuthProviderConfig, createGoogleOAuthProviderConfig, createHealthManager, createHostAuthorizationMiddleware, createI18n, createLogManager, createMailManager, createNotificationManager, createOAuthManager, createOAuthState, createPasswordResetToken, createQueueManager, createRateLimitMiddleware, createRedirectSafetyMiddleware, createRedisClient, createScheduler, createSecurityHeaders, createSeederRunner, createSessionMiddleware, createSqsAdapter, createStorageManager, createTypedBroadcaster, createValidator, csrfField, cursorPaginate, custom, customCheck, dateFormat, date as dateRule, debugErrorMiddleware, decodeCursor, decrypt, defineFactory, defineGate, defineMiddleware, defineModule, definePlugin, definePolicy, deriveAppKey, deriveAppKeyring, detectLocaleMiddleware, different, email as emailRule, encodeCursor, encrypt, endsWith, exchangeOAuthCode, exists, fetchOAuthUserProfile, file as fileRule, filterSensitiveData, formatValidationErrors, generateAppKey, generateKey, generateOtp, generatePassword, generateSlug, getApiToken, getApiTokenOrFail, getAppKeyringFromEnv, getBroadcastManager, getContainer, getCspNonce, getCsrfToken, getEncrypter, getExceptionHandler, getGate, getI18n, getInertiaSharedPropsResolver, getJob, getLogManager, getMailManager, getNextOccurrence, getNextOccurrences, getNotification, getNotificationManager, getPluralizationRule, getQueueDriver, getRateLimitInfo, getRegisteredJobs, getRequestLocale, getRequestTranslator, getSessionFromContext, getUserApiTokens, getValidatedData, hash, hashPassword, hmac, image as imageRule, inValues, inertia, integer, ip, ipv4, ipv6, isDue, isDueInTimezone, isEmailVerified, isSafeRedirectUrl, jsonResponse, json as jsonRule, mail, matchesCron, max, maxFileSize, md5, mimes, min, minFileSize, mountModuleRoutes, needsRehash, normalizeAppKey, notIn, nullable, numeric, object as objectRule, paginate, parseApiToken, parseAppKey, parseCron, parseOAuthRedirectUrl, parsePasswordResetUrl, parsePreviousAppKeys, parseRequestPayload, parseSignature, parseVerificationUrl, pick, pluralizationRules, processJob, quickValidate, quickValidateOrThrow, random, randomBase64, randomBase64Url, randomHex, randomInt, randomString, regex, registerJob, registerNotification, renderDebugPage, renderDocument, renderErrorPage, requestIdMiddleware, requestLoggingMiddleware, requireAuthenticated, requireGuest, requireVerifiedEmail, required, requiredIf, requiredUnless, requiredWith, requiredWithout, resetCalledSeeders, resetRateLimit, resolve, resolveJobName, resolveNotifiableType, revokeAllApiTokens, revokeApiToken, same, sample, sanitizeOAuthRedirect, secureCompare, selectPluralForm, setBroadcastManager, setContainer, setEncrypter, setExceptionHandler, setGate, setI18n, setInertiaDocument, setInertiaSharedProps, setInertiaSsrRenderer, setLogManager, setMailManager, setNotificationManager, setQueueDriver, sha256, sha512, shareInertiaProps, shuffle, signUrl, size, startsWith, string as stringRule, t, tc, toTimezone, tokenCan, tokenCanAll, tokenCanAny, tryGetI18n, unique, url as urlRule, urlSafeToken, uuid, uuid$1 as uuidRule, validate, validateRequest, validateRequestWith, validateSafe, verifyApiToken, verifyCsrfToken, verifyEmailToken, verifyHmac, verifyOAuthState, verifyPassword, verifyPasswordResetToken, verifySignedUrl, viteAsset, withAuthorization };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app-facing JSX runtime for server-rendered content views (RFC 0014).
|
|
3
|
+
*
|
|
4
|
+
* Application View files opt in with a per-file `@jsxImportSource` pragma
|
|
5
|
+
* pointing at `@guren/core`, which the compiler resolves to
|
|
6
|
+
* `@guren/core/jsx-runtime` → here → hono. Routing the pragma through the
|
|
7
|
+
* framework rather than at `hono/jsx` directly means applications never
|
|
8
|
+
* declare hono themselves, and the runtime that compiles their JSX is the
|
|
9
|
+
* same hono copy `Controller.view()` renders with — by construction, not by
|
|
10
|
+
* install-layout luck.
|
|
11
|
+
*/
|
|
12
|
+
export * from 'hono/jsx/jsx-runtime';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-B4FMCO8f.js";
|
|
2
|
+
export * from "hono/jsx/jsx-runtime";
|
|
3
|
+
//#region src/jsx-runtime.ts
|
|
4
|
+
var jsx_runtime_exports = /* @__PURE__ */ __exportAll({});
|
|
5
|
+
import * as import_hono_jsx_jsx_runtime from "hono/jsx/jsx-runtime";
|
|
6
|
+
__reExport(jsx_runtime_exports, import_hono_jsx_jsx_runtime);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { jsx_runtime_exports as t };
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as createMcpServer, t as McpServiceProvider } from "../McpServiceProvider-
|
|
1
|
+
import { r as createMcpServer, t as McpServiceProvider } from "../McpServiceProvider-D6D9nhgn.js";
|
|
2
2
|
export { McpServiceProvider, createMcpServer };
|