@guren/server 2.29.1 → 2.31.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/{Gate-DFiuutZm.js → Gate-COWQbA96.js} +1 -1
- package/dist/{Job-DsFMcXVk.js → Job-0Prk8k0z.js} +1 -1
- package/dist/{Resource-ZMJH4lyD.js → Resource-CGGEbZfX.js} +6 -5
- package/dist/authorization/index.js +2 -2
- package/dist/{authorization-DUjeyGWh.js → authorization-DEHuBps5.js} +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/{broadcasting-N4cRV42s.js → broadcasting-CcevVE5Y.js} +1 -1
- package/dist/cache/index.js +1 -1
- package/dist/{cache-C2Im3l7t.js → cache-Bi5U8N5P.js} +1 -1
- package/dist/{default-application-DWwscxfW.js → default-application-s9SE-Er7.js} +1 -1
- package/dist/{dev-banner-wz0V_g0R.js → dev-banner-DPSpJwVz.js} +1 -1
- package/dist/{driver-map-CkQc52j-.js → driver-map-BhITaLcy.js} +8 -2
- package/dist/encryption/index.js +1 -1
- package/dist/{encryption-DF8lZkpj.js → encryption-BS-FGkqS.js} +1 -1
- package/dist/errors/debug-page.d.ts +4 -2
- package/dist/events/index.js +1 -1
- package/dist/{events-DQavGm8W.js → events-B6gfJkCH.js} +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{i18n-DmMKcbqj.js → i18n-BShPpJZa.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +559 -540
- package/dist/initial-page-U637q3gO.js +46 -0
- package/dist/internal/inertia-page.d.ts +1 -0
- package/dist/internal/inertia-page.js +2 -0
- package/dist/internal/testing.js +1 -1
- package/dist/introspection/driver-map.d.ts +1 -1
- package/dist/introspection/types.d.ts +12 -1
- package/dist/lambda/index.js +1 -1
- package/dist/logging/index.js +1 -1
- package/dist/{logging-Ci0mBk5k.js → logging-Br9bZlaG.js} +1 -1
- package/dist/mail/index.js +1 -1
- package/dist/{mail-CI2Kfe8P.js → mail-BQ2y2U5c.js} +2 -2
- package/dist/mvc/inertia/initial-page.d.ts +16 -0
- package/dist/notifications/index.js +1 -1
- package/dist/{notifications-Bp2uamzD.js → notifications-R7Uj-aT7.js} +2 -2
- package/dist/queue/index.js +2 -2
- package/dist/{queue-C8s3buYz.js → queue-CO07wib_.js} +2 -2
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/serverless.d.ts +2 -1
- package/dist/storage/StorageManager.d.ts +10 -1
- package/dist/storage/index.js +1 -1
- package/dist/{storage-IlUesK2t.js → storage-YPbsV9ju.js} +12 -4
- package/package.json +6 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as HttpException } from "./HttpException-BlQ2yEmT.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter, i as bindAmbient, n as ambientBinding } from "./default-application-s9SE-Er7.js";
|
|
3
3
|
import { r as getAuthContext } from "./context-af2n5abO.js";
|
|
4
4
|
//#region src/errors/exceptions/AuthorizationException.ts
|
|
5
5
|
/** 403: the user is authenticated but not allowed to perform the action. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolveOptional } from "./resolve-optional-ax6gPWTp.js";
|
|
2
2
|
import { t as warnOnce } from "./warn-once-p-IlMjra.js";
|
|
3
|
-
import {
|
|
3
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter, n as ambientBinding, o as defaultContainer, r as ambientContainer } from "./default-application-s9SE-Er7.js";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
//#region src/support/registry-collision.ts
|
|
6
6
|
const ADVICE = {
|
|
@@ -3,13 +3,14 @@ import { n as getValidatedInput, r as readValidatedInput } from "./validated-inp
|
|
|
3
3
|
import { n as ValidationException } from "./errors-JpkcCjjn.js";
|
|
4
4
|
import { n as parseImportMap, t as DEFAULT_DEV_STYLES_ENTRY } from "./inertia-defaults-BjrcT7za.js";
|
|
5
5
|
import { t as resolveOptional } from "./resolve-optional-ax6gPWTp.js";
|
|
6
|
-
import {
|
|
6
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter } from "./default-application-s9SE-Er7.js";
|
|
7
|
+
import { n as initialPageElement, t as INITIAL_PAGE_SELECTOR } from "./initial-page-U637q3gO.js";
|
|
7
8
|
import { n as ServiceProvider } from "./ServiceProvider-G0YclITd.js";
|
|
8
9
|
import { r as getAuthContext } from "./context-af2n5abO.js";
|
|
9
10
|
import { o as getApiTokenOrFail } from "./api-token-BbgDEd6j.js";
|
|
10
|
-
import { a as resolveI18n } from "./i18n-
|
|
11
|
+
import { a as resolveI18n } from "./i18n-BShPpJZa.js";
|
|
11
12
|
import { r as tryGetRequestContainer } from "./request-container-BbuH0JJy.js";
|
|
12
|
-
import { d as resolveGate } from "./Gate-
|
|
13
|
+
import { d as resolveGate } from "./Gate-COWQbA96.js";
|
|
13
14
|
import { t as jsx_runtime_exports } from "./jsx-runtime.js";
|
|
14
15
|
import { getCookie } from "hono/cookie";
|
|
15
16
|
import { isAbsolute, resolve } from "node:path";
|
|
@@ -343,7 +344,7 @@ async function renderDocument$1(page, options) {
|
|
|
343
344
|
</html>`;
|
|
344
345
|
}
|
|
345
346
|
function pagePayloadElement(page) {
|
|
346
|
-
return
|
|
347
|
+
return initialPageElement(serializePage(page));
|
|
347
348
|
}
|
|
348
349
|
/**
|
|
349
350
|
* `window.__INERTIA_PAGE__` for readers other than the client. Same selector
|
|
@@ -351,7 +352,7 @@ function pagePayloadElement(page) {
|
|
|
351
352
|
* container carrying a non-payload `data-page` is ignored rather than mounted.
|
|
352
353
|
* A classic inline script, so it has run before the module entry does.
|
|
353
354
|
*/
|
|
354
|
-
const PAGE_GLOBAL_FROM_ELEMENT =
|
|
355
|
+
const PAGE_GLOBAL_FROM_ELEMENT = `<script>try{var e=document.querySelector('${INITIAL_PAGE_SELECTOR}')||document.getElementById("app"),p=JSON.parse(e.tagName==="SCRIPT"?e.textContent:e.getAttribute("data-page"));if(p&&p.component)window.__INERTIA_PAGE__=p}catch(_){}<\/script>`;
|
|
355
356
|
async function tryRenderSsr(page, options) {
|
|
356
357
|
const ssrOptions = options.ssr;
|
|
357
358
|
if (ssrOptions?.enabled === false) return;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as withAuthorization, n as authorizeMiddleware, o as Policy, r as authorizeResourceMiddleware, s as definePolicy, t as authorizeAllMiddleware } from "../authorization-
|
|
2
|
-
import { a as cannot, f as setGate, i as can, l as getGate, n as Response, o as createGate, r as authorize, s as defineGate, t as Gate, u as isAuthorizationResponse } from "../Gate-
|
|
1
|
+
import { a as withAuthorization, n as authorizeMiddleware, o as Policy, r as authorizeResourceMiddleware, s as definePolicy, t as authorizeAllMiddleware } from "../authorization-DEHuBps5.js";
|
|
2
|
+
import { a as cannot, f as setGate, i as can, l as getGate, n as Response, o as createGate, r as authorize, s as defineGate, t as Gate, u as isAuthorizationResponse } from "../Gate-COWQbA96.js";
|
|
3
3
|
export { Gate, Policy, Response, authorize, authorizeAllMiddleware, authorizeMiddleware, authorizeResourceMiddleware, can, cannot, createGate, defineGate, definePolicy, getGate, isAuthorizationResponse, setGate, withAuthorization };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as tryGetRequestContainer } from "./request-container-BbuH0JJy.js";
|
|
2
|
-
import { c as denialToException, d as resolveGate, n as Response, p as AuthorizationException } from "./Gate-
|
|
2
|
+
import { c as denialToException, d as resolveGate, n as Response, p as AuthorizationException } from "./Gate-COWQbA96.js";
|
|
3
3
|
//#region src/http/middleware/capabilities.ts
|
|
4
4
|
/**
|
|
5
5
|
* Internal security-capability marker (RFC 0007): built-in middleware
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as setBroadcastManager, c as PresenceChannel, i as getBroadcastManager, l as PrivateChannel, n as BroadcastManager, o as RedisDriver, r as createBroadcastManager, s as MemoryDriver, t as createTypedBroadcaster, u as Channel } from "../broadcasting-
|
|
1
|
+
import { a as setBroadcastManager, c as PresenceChannel, i as getBroadcastManager, l as PrivateChannel, n as BroadcastManager, o as RedisDriver, r as createBroadcastManager, s as MemoryDriver, t as createTypedBroadcaster, u as Channel } from "../broadcasting-CcevVE5Y.js";
|
|
2
2
|
export { BroadcastManager, Channel, MemoryDriver, PresenceChannel, PrivateChannel, RedisDriver, createBroadcastManager, createTypedBroadcaster, getBroadcastManager, setBroadcastManager };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as parseRequestPayload, t as asRecord } from "./request-CLOYytGP.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter, i as bindAmbient, n as ambientBinding } from "./default-application-s9SE-Er7.js";
|
|
3
3
|
import { r as getAuthContext } from "./context-af2n5abO.js";
|
|
4
4
|
import { n as isHotReloadRuntime, t as claimHotDisposable } from "./hot-disposables-W2fH-GID.js";
|
|
5
5
|
import { c as randomHex } from "./Random-S0OvCuR8.js";
|
package/dist/cache/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RedisStore, i as FileStore, n as createCacheManager, o as MemoryStore, r as TaggedCache, t as CacheManager } from "../cache-
|
|
1
|
+
import { a as RedisStore, i as FileStore, n as createCacheManager, o as MemoryStore, r as TaggedCache, t as CacheManager } from "../cache-Bi5U8N5P.js";
|
|
2
2
|
export { CacheManager, FileStore, MemoryStore, RedisStore, TaggedCache, createCacheManager };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as isPromiseLike } from "./Logger-DWXdtLSJ.js";
|
|
2
2
|
import { n as isHotReloadRuntime, t as claimHotDisposable } from "./hot-disposables-W2fH-GID.js";
|
|
3
|
-
import { t as describeDriverMap } from "./driver-map-
|
|
3
|
+
import { t as describeDriverMap } from "./driver-map-BhITaLcy.js";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { copyFile, link, mkdir, readFile, readdir, rename, rm, rmdir, unlink, writeFile } from "node:fs/promises";
|
|
@@ -348,4 +348,4 @@ function warnIfAmbiguous() {
|
|
|
348
348
|
if (ambiguous) warnOnce("ambient-application-ambiguous", AMBIGUOUS_WARNING);
|
|
349
349
|
}
|
|
350
350
|
//#endregion
|
|
351
|
-
export { defaultApplication as a, resolve as c, createContainer as d, getContainer as f, warnDeprecatedSetter as h, bindAmbient as i, useAsDefaultApplication as l,
|
|
351
|
+
export { defaultApplication as a, resolve as c, createContainer as d, getContainer as f, warnDeprecatedSetter as g, warnDeprecatedGetter as h, bindAmbient as i, useAsDefaultApplication as l, warnDeprecated as m, ambientBinding as n, defaultContainer as o, setContainer as p, ambientContainer as r, resetDefaultApplication as s, adoptDefaultApplication as t, Container as u };
|
|
@@ -4,7 +4,7 @@ import chalk from "chalk";
|
|
|
4
4
|
import figlet from "figlet";
|
|
5
5
|
import standard from "figlet/importable-fonts/Standard.js";
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "2.
|
|
7
|
+
var version = "2.31.0";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/http/dev-banner.ts
|
|
10
10
|
var dev_banner_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
//#region src/introspection/driver-map.ts
|
|
2
2
|
/** `DriverMapEntry` from a manager's entries, each with the driver it was configured with or null. */
|
|
3
|
-
function describeDriverMap(defaultName, drivers) {
|
|
3
|
+
function describeDriverMap(defaultName, drivers, bindings = /* @__PURE__ */ new Map()) {
|
|
4
4
|
const entries = {};
|
|
5
|
-
for (const [name, driver] of drivers)
|
|
5
|
+
for (const [name, driver] of drivers) {
|
|
6
|
+
const binding = bindings.get(name);
|
|
7
|
+
entries[name] = binding === void 0 ? { driver } : {
|
|
8
|
+
driver,
|
|
9
|
+
binding
|
|
10
|
+
};
|
|
11
|
+
}
|
|
6
12
|
return {
|
|
7
13
|
default: defaultName,
|
|
8
14
|
entries
|
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-DIUT1Yao.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-D2DFd8xX.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-S0OvCuR8.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-BS-FGkqS.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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as generateAppKey, s as normalizeAppKey, t as MessageSigner } from "./MessageSigner-DIUT1Yao.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter, i as bindAmbient, n as ambientBinding } from "./default-application-s9SE-Er7.js";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes } from "crypto";
|
|
4
4
|
//#region src/encryption/Encrypter.ts
|
|
5
5
|
/**
|
|
@@ -2,7 +2,9 @@ import type { MiddlewareHandler } from 'hono';
|
|
|
2
2
|
/** Development-only error page: exposes the stack trace and request details. */
|
|
3
3
|
export declare function renderDebugPage(error: Error, request?: Request): string;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* @deprecated since 2.30.0, removed in 3.0.0. The ExceptionHandler renders this
|
|
6
|
+
* page itself for a browser request while debug details are on. Hono hands a
|
|
7
|
+
* handler's error to the app's `onError` where it is thrown, so this `catch`
|
|
8
|
+
* never sees one in a Guren app.
|
|
7
9
|
*/
|
|
8
10
|
export declare function debugErrorMiddleware(): MiddlewareHandler;
|
package/dist/events/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RequestFinished, c as UserLoggedOut, d as EventManager, f as createEventManager, i as JobProcessed, l as createQueueEventDispatcher, n as ApplicationStarted, o as RequestReceived, p as Event, r as JobFailed, s as UserAuthenticated, t as ApplicationShutdown, u as Listener } from "../events-
|
|
1
|
+
import { a as RequestFinished, c as UserLoggedOut, d as EventManager, f as createEventManager, i as JobProcessed, l as createQueueEventDispatcher, n as ApplicationStarted, o as RequestReceived, p as Event, r as JobFailed, s as UserAuthenticated, t as ApplicationShutdown, u as Listener } from "../events-B6gfJkCH.js";
|
|
2
2
|
export { ApplicationShutdown, ApplicationStarted, Event, EventManager, JobFailed, JobProcessed, Listener, RequestFinished, RequestReceived, UserAuthenticated, UserLoggedOut, createEventManager, createQueueEventDispatcher };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as warnOnce } from "./warn-once-p-IlMjra.js";
|
|
2
|
-
import { d as resolveQueueDriver, l as registerJob, p as reportRegistryCollision, t as Job } from "./Job-
|
|
2
|
+
import { d as resolveQueueDriver, l as registerJob, p as reportRegistryCollision, t as Job } from "./Job-0Prk8k0z.js";
|
|
3
3
|
//#region src/events/Event.ts
|
|
4
4
|
/** Base class for all application events. */
|
|
5
5
|
var Event = class {
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveI18n, c as tc, d as Translator, f as getPluralizationRule, i as getI18n, l as tryGetI18n, m as selectPluralForm, n as I18nManager, o as setI18n, p as pluralizationRules, r as createI18n, s as t, t as MemoryLoader, u as JsonLoader } from "../i18n-
|
|
1
|
+
import { a as resolveI18n, c as tc, d as Translator, f as getPluralizationRule, i as getI18n, l as tryGetI18n, m as selectPluralForm, n as I18nManager, o as setI18n, p as pluralizationRules, r as createI18n, s as t, t as MemoryLoader, u as JsonLoader } from "../i18n-BShPpJZa.js";
|
|
2
2
|
export { I18nManager, JsonLoader, MemoryLoader, Translator, createI18n, getI18n, getPluralizationRule, pluralizationRules, resolveI18n, selectPluralForm, setI18n, t, tc, tryGetI18n };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as warnDeprecatedSetter, h as warnDeprecatedGetter, i as bindAmbient, n as ambientBinding } from "./default-application-s9SE-Er7.js";
|
|
2
2
|
import { basename, extname, join } from "node:path";
|
|
3
3
|
import { readFile, readdir } from "node:fs/promises";
|
|
4
4
|
//#region src/i18n/pluralization.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { CONTAINER_CONTEXT_KEY, getRequestContainer, tryGetRequestContainer } fr
|
|
|
4
4
|
export type { RequestContextLike } from './http/request-container.js';
|
|
5
5
|
export type { Context, ApplicationListenOptions, ListenAddress, ServiceProviderConstructor, } from './http/Application.js';
|
|
6
6
|
export { isIntrospecting } from './introspection/flag.js';
|
|
7
|
-
export type { AppManifest, AttachmentsDescription, AttachmentsEntry, AuthEntry, AuthProviderEntry, ControllerRef, DriverMapEntry, JsonSchema, ManifestWarning, MiddlewareEntry, ModuleEntry, ProviderEntry, ProviderRegisterOutcome, ProviderSource, RouteEntry, RouteSchemaEntry, SessionEntry, SessionStoreEntry, } from './introspection/types.js';
|
|
7
|
+
export type { AppManifest, AttachmentsDescription, AttachmentsEntry, AuthEntry, AuthProviderEntry, ControllerRef, DatabaseEntry, DriverMapEntry, JsonSchema, ManifestWarning, MiddlewareEntry, ModuleEntry, ProviderEntry, ProviderRegisterOutcome, ProviderSource, RouteEntry, RouteSchemaEntry, SessionEntry, SessionStoreEntry, } from './introspection/types.js';
|
|
8
8
|
export { parseRequestPayload, formatValidationErrors } from './http/request.js';
|
|
9
9
|
export { Controller } from './mvc/Controller.js';
|
|
10
10
|
export type { InertiaResponse, InferInertiaProps, ControllerInertiaProps, AuthPayload } from './mvc/Controller.js';
|