@voyant-travel/hono 0.127.2 → 0.128.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/README.md +5 -4
- package/dist/anonymous-paths.d.ts +2 -2
- package/dist/anonymous-paths.js +1 -1
- package/dist/app.js +5 -5
- package/dist/bundle.d.ts +23 -23
- package/dist/bundle.js +8 -8
- package/dist/composition.d.ts +5 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/lazy-routes.d.ts +1 -1
- package/dist/module.d.ts +10 -10
- package/dist/types.d.ts +5 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @voyant-travel/hono
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
helpers, and
|
|
3
|
+
Voyant's sole server API runtime implementation. Provides `createApp()`,
|
|
4
|
+
middleware, auth helpers, and API bundle expansion for mounting Voyant modules
|
|
5
|
+
behind a Hono app.
|
|
5
6
|
|
|
6
7
|
## Install
|
|
7
8
|
|
|
@@ -52,8 +53,8 @@ The middleware chain is: container → requestId → logger → errorBoundary
|
|
|
52
53
|
| --- | --- |
|
|
53
54
|
| `.` | Barrel re-exports |
|
|
54
55
|
| `./app` | `createApp` factory |
|
|
55
|
-
| `./module` | `
|
|
56
|
-
| `./bundle` | `
|
|
56
|
+
| `./module` | `ApiModule`, `ApiExtension` contracts |
|
|
57
|
+
| `./bundle` | `ApiBundle`, `defineApiBundle`, `expandApiBundles` |
|
|
57
58
|
| `./middleware` | All middleware re-exports |
|
|
58
59
|
| `./middleware/auth` | `requireAuth` session/API-key/JWT auth |
|
|
59
60
|
| `./middleware/cors` | CORS configuration |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiExtension, ApiModule } from "./module.js";
|
|
2
2
|
/**
|
|
3
3
|
* Assemble the anonymous-access allow-list (ADR-0008) from module/extension
|
|
4
4
|
* `anonymous` declarations, unioned with any explicit `publicPaths` the
|
|
@@ -11,4 +11,4 @@ import type { HonoExtension, HonoModule } from "./module.js";
|
|
|
11
11
|
* deterministic, snapshot-auditable result; the global list is what `requireAuth`
|
|
12
12
|
* matches to skip auth (and stamp `actor: "customer"`).
|
|
13
13
|
*/
|
|
14
|
-
export declare function assembleAnonymousPaths(modules: readonly
|
|
14
|
+
export declare function assembleAnonymousPaths(modules: readonly ApiModule[], extensions: readonly ApiExtension[], explicit?: readonly string[]): string[];
|
package/dist/anonymous-paths.js
CHANGED
|
@@ -31,7 +31,7 @@ export function assembleAnonymousPaths(modules, extensions, explicit = []) {
|
|
|
31
31
|
// at `/v1/{name}`, matching the mount in `app.ts`. Parameterized/wildcard paths
|
|
32
32
|
// are skipped (the literal `matchesPublicPath` matcher can't match them) and
|
|
33
33
|
// must be declared via `anonymous` if ever needed.
|
|
34
|
-
// biome-ignore lint/suspicious/noExplicitAny: Hono sub-apps have varied env generics -- owner: hono; mirrors the
|
|
34
|
+
// biome-ignore lint/suspicious/noExplicitAny: Hono sub-apps have varied env generics -- owner: hono; mirrors the ApiModule.webhookRoutes suppression.
|
|
35
35
|
const addWebhooks = (name, routes) => {
|
|
36
36
|
if (!routes)
|
|
37
37
|
return;
|
package/dist/app.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createContainer, createEventBus, createQueryRunner, } from "@voyant-tra
|
|
|
5
5
|
import { createLinkServiceFactory } from "@voyant-travel/db/links";
|
|
6
6
|
import { assembleAnonymousPaths } from "./anonymous-paths.js";
|
|
7
7
|
import { containerToServiceResolver, makeFrameworkLogger, wireWorkflowRuntime, } from "./app-workflows.js";
|
|
8
|
-
import {
|
|
8
|
+
import { expandApiBundles, isLazyApiBundle, } from "./bundle.js";
|
|
9
9
|
import { mountLazyRoutePaths, mountLazyRoutesAt } from "./lazy-routes.js";
|
|
10
10
|
import { mountAuthForwarding } from "./lib/auth-forward.js";
|
|
11
11
|
import { createPathDbSelector } from "./lib/db-selector.js";
|
|
@@ -80,14 +80,14 @@ export function mountApp(config) {
|
|
|
80
80
|
throw new Error(`Duplicate bundle name: "${plugin.name}"`);
|
|
81
81
|
}
|
|
82
82
|
pluginNames.add(plugin.name);
|
|
83
|
-
if (
|
|
83
|
+
if (isLazyApiBundle(plugin))
|
|
84
84
|
lazyPlugins.push(plugin);
|
|
85
85
|
else
|
|
86
86
|
eagerPlugins.push(plugin);
|
|
87
87
|
}
|
|
88
88
|
// Expand eager plugins into their constituent modules/extensions before
|
|
89
89
|
// mounting. Lazy plugins keep only their static metadata in the eager closure.
|
|
90
|
-
const expanded = eagerPlugins.length > 0 ?
|
|
90
|
+
const expanded = eagerPlugins.length > 0 ? expandApiBundles(eagerPlugins) : null;
|
|
91
91
|
const allModules = [...(config.modules ?? []), ...(expanded?.modules ?? [])];
|
|
92
92
|
const allExtensions = [...(config.extensions ?? []), ...(expanded?.extensions ?? [])];
|
|
93
93
|
const linkDefinitions = [...(config.linkDefinitions ?? []), ...(expanded?.links ?? [])];
|
|
@@ -252,7 +252,7 @@ export function mountApp(config) {
|
|
|
252
252
|
const pending = bundles.filter((bundle) => !expandedLazyBundleNames.has(bundle.name));
|
|
253
253
|
if (pending.length === 0)
|
|
254
254
|
return;
|
|
255
|
-
const lazyExpanded =
|
|
255
|
+
const lazyExpanded = expandApiBundles(pending);
|
|
256
256
|
for (const bundle of pending)
|
|
257
257
|
expandedLazyBundleNames.add(bundle.name);
|
|
258
258
|
allModules.push(...lazyExpanded.modules);
|
|
@@ -604,7 +604,7 @@ export function mountApp(config) {
|
|
|
604
604
|
}
|
|
605
605
|
function buildBundleRouteApp(bundle) {
|
|
606
606
|
const pluginRoutes = new OpenAPIHono();
|
|
607
|
-
const bundleExpanded =
|
|
607
|
+
const bundleExpanded = expandApiBundles([bundle]);
|
|
608
608
|
for (const mod of bundleExpanded.modules)
|
|
609
609
|
mountModuleRoutesInto(pluginRoutes, mod);
|
|
610
610
|
for (const ext of bundleExpanded.extensions)
|
package/dist/bundle.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import type { BootstrapHandler, EventFilterDescriptor, LinkDefinition, Subscriber, WorkflowDescriptor } from "@voyant-travel/core";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ApiExtension, ApiModule } from "./module.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Reusable server API contribution surface.
|
|
5
5
|
*
|
|
6
|
-
* `@voyant-travel/hono` is
|
|
7
|
-
* `
|
|
8
|
-
*
|
|
6
|
+
* `@voyant-travel/hono` is Voyant's sole server API runtime implementation.
|
|
7
|
+
* `ApiBundle` describes packages that contribute {@link ApiModule} /
|
|
8
|
+
* {@link ApiExtension} wrappers carrying HTTP routes.
|
|
9
9
|
*
|
|
10
10
|
* Registered via `createApp({ plugins: [...] })` — the app factory expands
|
|
11
11
|
* each bundle into the underlying modules, extensions, subscribers, and link
|
|
12
12
|
* definitions before mounting them.
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface ApiBundle {
|
|
15
15
|
/** Unique bundle identifier (e.g. "payload-cms", "bokun"). */
|
|
16
16
|
name: string;
|
|
17
17
|
/** Optional version tag for diagnostics. */
|
|
18
18
|
version?: string;
|
|
19
19
|
/** Optional lazy runtime bootstrap executed once per app/isolate. */
|
|
20
20
|
bootstrap?: BootstrapHandler;
|
|
21
|
-
/**
|
|
22
|
-
modules?:
|
|
23
|
-
/**
|
|
24
|
-
extensions?:
|
|
21
|
+
/** API modules (module + routes) contributed by the plugin. */
|
|
22
|
+
modules?: ApiModule[];
|
|
23
|
+
/** API extensions (extension + routes) contributed by the plugin. */
|
|
24
|
+
extensions?: ApiExtension[];
|
|
25
25
|
/** Event subscribers wired to the caller's event bus, when provided. */
|
|
26
26
|
subscribers?: Subscriber[];
|
|
27
27
|
/** Link definitions contributed by the plugin. */
|
|
@@ -49,15 +49,15 @@ export interface HonoBundle {
|
|
|
49
49
|
*/
|
|
50
50
|
eventFilters?: readonly EventFilterDescriptor[];
|
|
51
51
|
}
|
|
52
|
-
declare const
|
|
52
|
+
declare const LAZY_API_BUNDLE: unique symbol;
|
|
53
53
|
/**
|
|
54
54
|
* Lazy bundle declaration. The bundle's heavy runtime graph is imported only
|
|
55
55
|
* when a declared route matcher is hit, unless `loadOnBootstrap` asks the app
|
|
56
56
|
* to load it during request/headless bootstrap. `name` and `anonymous` remain
|
|
57
57
|
* eager metadata so duplicate checks and auth allow-lists stay fail-closed.
|
|
58
58
|
*/
|
|
59
|
-
export interface
|
|
60
|
-
readonly [
|
|
59
|
+
export interface LazyApiBundle {
|
|
60
|
+
readonly [LAZY_API_BUNDLE]: true;
|
|
61
61
|
/** Unique bundle identifier matching the loaded bundle's `name`. */
|
|
62
62
|
name: string;
|
|
63
63
|
/** Optional version tag for diagnostics. */
|
|
@@ -94,27 +94,27 @@ export interface LazyHonoBundle {
|
|
|
94
94
|
*/
|
|
95
95
|
loadOnBootstrap?: boolean;
|
|
96
96
|
/** Loads and constructs the real bundle. Memoized by `mountApp`. */
|
|
97
|
-
load: () => Promise<
|
|
97
|
+
load: () => Promise<ApiBundle>;
|
|
98
98
|
}
|
|
99
|
-
export type
|
|
99
|
+
export type ApiBundleInput = ApiBundle | LazyApiBundle;
|
|
100
100
|
/**
|
|
101
101
|
* Identity helper — returns the bundle unchanged, purely for IDE inference.
|
|
102
102
|
*/
|
|
103
|
-
export declare function
|
|
104
|
-
export declare function
|
|
105
|
-
export declare function
|
|
106
|
-
export interface
|
|
107
|
-
modules:
|
|
108
|
-
extensions:
|
|
103
|
+
export declare function defineApiBundle<P extends ApiBundle>(bundle: P): P;
|
|
104
|
+
export declare function defineLazyApiBundle<P extends Omit<LazyApiBundle, typeof LAZY_API_BUNDLE>>(bundle: P): P & LazyApiBundle;
|
|
105
|
+
export declare function isLazyApiBundle(bundle: ApiBundleInput): bundle is LazyApiBundle;
|
|
106
|
+
export interface ExpandedApiBundles {
|
|
107
|
+
modules: ApiModule[];
|
|
108
|
+
extensions: ApiExtension[];
|
|
109
109
|
subscribers: Subscriber[];
|
|
110
110
|
links: LinkDefinition[];
|
|
111
111
|
/** Absolute anonymous-access paths declared by bundles (ADR-0008). */
|
|
112
112
|
anonymousPaths: string[];
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
* Flatten a list of {@link
|
|
115
|
+
* Flatten a list of {@link ApiBundle} values into their constituent pieces.
|
|
116
116
|
*
|
|
117
117
|
* Throws if two bundles declare the same `name`.
|
|
118
118
|
*/
|
|
119
|
-
export declare function
|
|
119
|
+
export declare function expandApiBundles(bundles: ReadonlyArray<ApiBundle>): ExpandedApiBundles;
|
|
120
120
|
export {};
|
package/dist/bundle.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
const
|
|
1
|
+
const LAZY_API_BUNDLE = Symbol.for("voyant.api.lazyBundle");
|
|
2
2
|
/**
|
|
3
3
|
* Identity helper — returns the bundle unchanged, purely for IDE inference.
|
|
4
4
|
*/
|
|
5
|
-
export function
|
|
5
|
+
export function defineApiBundle(bundle) {
|
|
6
6
|
return bundle;
|
|
7
7
|
}
|
|
8
|
-
export function
|
|
9
|
-
return { ...bundle, [
|
|
8
|
+
export function defineLazyApiBundle(bundle) {
|
|
9
|
+
return { ...bundle, [LAZY_API_BUNDLE]: true };
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
12
|
-
return bundle[
|
|
11
|
+
export function isLazyApiBundle(bundle) {
|
|
12
|
+
return bundle[LAZY_API_BUNDLE] === true;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Flatten a list of {@link
|
|
15
|
+
* Flatten a list of {@link ApiBundle} values into their constituent pieces.
|
|
16
16
|
*
|
|
17
17
|
* Throws if two bundles declare the same `name`.
|
|
18
18
|
*/
|
|
19
|
-
export function
|
|
19
|
+
export function expandApiBundles(bundles) {
|
|
20
20
|
const seen = new Set();
|
|
21
21
|
const modules = [];
|
|
22
22
|
const extensions = [];
|
package/dist/composition.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ApiExtension, ApiModule } from "./module.js";
|
|
2
2
|
/**
|
|
3
3
|
* Manifest-driven runtime composition.
|
|
4
4
|
*
|
|
@@ -30,8 +30,8 @@ export interface CompositionContext<TCapabilities> {
|
|
|
30
30
|
capabilities: TCapabilities;
|
|
31
31
|
options: Record<string, unknown>;
|
|
32
32
|
}
|
|
33
|
-
export type ModuleFactory<TCapabilities> = (ctx: CompositionContext<TCapabilities>) =>
|
|
34
|
-
export type ExtensionFactory<TCapabilities> = (ctx: CompositionContext<TCapabilities>) =>
|
|
33
|
+
export type ModuleFactory<TCapabilities> = (ctx: CompositionContext<TCapabilities>) => ApiModule | ApiModule[];
|
|
34
|
+
export type ExtensionFactory<TCapabilities> = (ctx: CompositionContext<TCapabilities>) => ApiExtension;
|
|
35
35
|
/**
|
|
36
36
|
* Maps manifest specifiers to the factory that builds the runtime unit. Keys
|
|
37
37
|
* MUST match the `voyant.config.ts` `modules` / `extensions` specifiers.
|
|
@@ -41,8 +41,8 @@ export interface CompositionRegistry<TCapabilities> {
|
|
|
41
41
|
extensions?: Record<string, ExtensionFactory<TCapabilities>>;
|
|
42
42
|
}
|
|
43
43
|
export interface ComposedApp {
|
|
44
|
-
modules:
|
|
45
|
-
extensions:
|
|
44
|
+
modules: ApiModule[];
|
|
45
|
+
extensions: ApiExtension[];
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Derive the `createApp({ modules, extensions })` arrays from a manifest by
|
package/dist/index.d.ts
CHANGED
|
@@ -3,17 +3,17 @@ export { assembleAnonymousPaths } from "./anonymous-paths.js";
|
|
|
3
3
|
export { mountApp } from "./app.js";
|
|
4
4
|
export type { SessionAuthContext } from "./auth/index.js";
|
|
5
5
|
export { constantTimeEqual, extractBearerToken, generateNumericCode, randomBytesHex, requireUserId, sha256Base64Url, sha256Hex, unsignCookie, verifySession, } from "./auth/index.js";
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
6
|
+
export type { ApiBundle, ApiBundleInput, ExpandedApiBundles, LazyApiBundle, } from "./bundle.js";
|
|
7
|
+
export { defineApiBundle, defineLazyApiBundle, expandApiBundles, isLazyApiBundle, } from "./bundle.js";
|
|
8
8
|
export { type CreateAppConfig, createApp } from "./create-app.js";
|
|
9
9
|
export type { AuthenticatedDocumentDownloadResolver, AuthenticatedDocumentDownloadResolverOptions, DocumentDownloadEnvelope, DocumentDownloadResolution, DocumentDownloadResolver, DocumentDownloadResolverResult, StoredDocumentReference, } from "./document-download.js";
|
|
10
10
|
export { createAuthenticatedDocumentDownloadResolver, encodeStorageKeyPath, resolveStoredDocumentDownload, } from "./document-download.js";
|
|
11
11
|
export { type AsyncMethodProvider, lazyProvider } from "./lazy-provider.js";
|
|
12
|
-
export { createLazyRouteHandler, type
|
|
12
|
+
export { createLazyRouteHandler, type LazyApiRoutes, type LazyRoutesLoader, mountLazyRoutePaths, mountLazyRoutesAt, } from "./lazy-routes.js";
|
|
13
13
|
export { createPathDbSelector, type PathDbSelectorOptions } from "./lib/db-selector.js";
|
|
14
14
|
export type { RateLimitStore } from "./middleware/index.js";
|
|
15
15
|
export { clientIpKey, consoleLoggerProvider, cors, createMemoryRateLimitStore, createRedisRateLimitStore, DEFAULT_IDEMPOTENCY_TTL_MS, db, enforceRateLimit, errorBoundary, handleApiError, type IdempotencyKeyOptions, idempotencyKey, isStaffRbacEnforced, LIVE_LIMITS, logger, purgeExpiredIdempotencyKeys, rateLimit, requestId, requireActor, requireAuth, requirePermission, } from "./middleware/index.js";
|
|
16
|
-
export type {
|
|
16
|
+
export type { ApiExtension, ApiModule } from "./module.js";
|
|
17
17
|
export type { ErrorEvent, Reporter } from "./observability/index.js";
|
|
18
18
|
export { consoleReporter, getRequestId, noopReporter, runWithRequestId, safeCaptureException, } from "./observability/index.js";
|
|
19
19
|
export { stampOpenApiRegistryApiId } from "./openapi-ownership.js";
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { assembleAnonymousPaths } from "./anonymous-paths.js";
|
|
2
2
|
export { mountApp } from "./app.js";
|
|
3
3
|
export { constantTimeEqual, extractBearerToken, generateNumericCode, randomBytesHex, requireUserId, sha256Base64Url, sha256Hex, unsignCookie, verifySession, } from "./auth/index.js";
|
|
4
|
-
export {
|
|
4
|
+
export { defineApiBundle, defineLazyApiBundle, expandApiBundles, isLazyApiBundle, } from "./bundle.js";
|
|
5
5
|
export { createApp } from "./create-app.js";
|
|
6
6
|
export { createAuthenticatedDocumentDownloadResolver, encodeStorageKeyPath, resolveStoredDocumentDownload, } from "./document-download.js";
|
|
7
7
|
export { lazyProvider } from "./lazy-provider.js";
|
package/dist/lazy-routes.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type LazyRoutesLoader = () => Promise<AnyHono>;
|
|
|
38
38
|
* matchers the framework installs up front (no bundle import until a request
|
|
39
39
|
* matches).
|
|
40
40
|
*/
|
|
41
|
-
export interface
|
|
41
|
+
export interface LazyApiRoutes {
|
|
42
42
|
paths: readonly string[];
|
|
43
43
|
load: LazyRoutesLoader;
|
|
44
44
|
}
|
package/dist/module.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Extension, Module } from "@voyant-travel/core";
|
|
2
2
|
import type { Hono } from "hono";
|
|
3
|
-
import type {
|
|
4
|
-
export interface
|
|
3
|
+
import type { LazyApiRoutes, LazyRoutesLoader } from "./lazy-routes.js";
|
|
4
|
+
export interface ApiModule {
|
|
5
5
|
module: Module;
|
|
6
6
|
/** Staff-facing routes — mounted at `/v1/admin/{module.name}`. */
|
|
7
7
|
adminRoutes?: Hono<any>;
|
|
@@ -35,7 +35,7 @@ export interface HonoModule {
|
|
|
35
35
|
* returns ABSOLUTE routes; the framework mounts + caches them with the request
|
|
36
36
|
* context bridged in. Context-preserving replacement for `mountLazyRouteApp`.
|
|
37
37
|
*/
|
|
38
|
-
lazyRoutes?:
|
|
38
|
+
lazyRoutes?: LazyApiRoutes;
|
|
39
39
|
/**
|
|
40
40
|
* Optional override for the public mount path relative to `/v1/public`.
|
|
41
41
|
*
|
|
@@ -69,7 +69,7 @@ export interface HonoModule {
|
|
|
69
69
|
*/
|
|
70
70
|
transactionalPaths?: readonly string[];
|
|
71
71
|
}
|
|
72
|
-
export interface
|
|
72
|
+
export interface ApiExtension {
|
|
73
73
|
extension: Extension;
|
|
74
74
|
/** Staff-facing routes — mounted at `/v1/admin/{extension.module}`. */
|
|
75
75
|
adminRoutes?: Hono<any>;
|
|
@@ -77,15 +77,15 @@ export interface HonoExtension {
|
|
|
77
77
|
publicRoutes?: Hono<any>;
|
|
78
78
|
/**
|
|
79
79
|
* Inbound webhook routes — mounted at `/v1/{extension.module}`, concrete paths
|
|
80
|
-
* auto-added to the anonymous allow-list (ADR-0008). See `
|
|
80
|
+
* auto-added to the anonymous allow-list (ADR-0008). See `ApiModule.webhookRoutes`.
|
|
81
81
|
*/
|
|
82
82
|
webhookRoutes?: Hono<any>;
|
|
83
|
-
/** Lazy variant of `adminRoutes` — mounted at `/v1/admin/{extension.module}` (see
|
|
83
|
+
/** Lazy variant of `adminRoutes` — mounted at `/v1/admin/{extension.module}` (see ApiModule). */
|
|
84
84
|
lazyAdminRoutes?: LazyRoutesLoader;
|
|
85
85
|
/** Lazy variant of `publicRoutes` — mounted at `/v1/public/{publicPath ?? extension.module}`. */
|
|
86
86
|
lazyPublicRoutes?: LazyRoutesLoader;
|
|
87
|
-
/** Deployment-local lazy family at explicit absolute paths (see
|
|
88
|
-
lazyRoutes?:
|
|
87
|
+
/** Deployment-local lazy family at explicit absolute paths (see ApiModule). */
|
|
88
|
+
lazyRoutes?: LazyApiRoutes;
|
|
89
89
|
/**
|
|
90
90
|
* Optional override for the public mount path relative to `/v1/public`.
|
|
91
91
|
*
|
|
@@ -95,13 +95,13 @@ export interface HonoExtension {
|
|
|
95
95
|
publicPath?: string;
|
|
96
96
|
/**
|
|
97
97
|
* Declares which of this extension's PUBLIC routes are reachable without a
|
|
98
|
-
* session (ADR-0008). Same semantics as {@link
|
|
98
|
+
* session (ADR-0008). Same semantics as {@link ApiModule.anonymous}, relative
|
|
99
99
|
* to the extension's public mount.
|
|
100
100
|
*/
|
|
101
101
|
anonymous?: boolean | readonly string[];
|
|
102
102
|
/**
|
|
103
103
|
* Absolute transactional path prefixes — same semantics as
|
|
104
|
-
* {@link
|
|
104
|
+
* {@link ApiModule.transactionalPaths}.
|
|
105
105
|
*/
|
|
106
106
|
transactionalPaths?: readonly string[];
|
|
107
107
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import type { NeonHttpDatabase } from "drizzle-orm/neon-http";
|
|
|
7
7
|
import type { NeonDatabase as NeonWsDatabase } from "drizzle-orm/neon-serverless";
|
|
8
8
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
9
9
|
import type { Handler, Hono } from "hono";
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
10
|
+
import type { ApiBundleInput } from "./bundle.js";
|
|
11
|
+
import type { ApiExtension, ApiModule } from "./module.js";
|
|
12
12
|
import type { Reporter } from "./observability/reporter.js";
|
|
13
13
|
export interface VoyantExecutionContext {
|
|
14
14
|
waitUntil?: (promise: Promise<unknown>) => void;
|
|
@@ -193,9 +193,9 @@ export interface VoyantAppConfig<TBindings extends VoyantBindings = VoyantBindin
|
|
|
193
193
|
* together with `dbTransactional`.
|
|
194
194
|
*/
|
|
195
195
|
dbTransactionalPaths?: string[];
|
|
196
|
-
modules?:
|
|
197
|
-
extensions?:
|
|
198
|
-
plugins?:
|
|
196
|
+
modules?: ApiModule[];
|
|
197
|
+
extensions?: ApiExtension[];
|
|
198
|
+
plugins?: ApiBundleInput[];
|
|
199
199
|
eventBus?: EventBus;
|
|
200
200
|
/**
|
|
201
201
|
* Link definitions activated against each request's resolved database.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/hono",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.128.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -131,17 +131,17 @@
|
|
|
131
131
|
"hono": "^4.12.27",
|
|
132
132
|
"zod": "^4.4.3",
|
|
133
133
|
"@voyant-travel/core": "^0.124.0",
|
|
134
|
-
"@voyant-travel/db": "^0.114.
|
|
134
|
+
"@voyant-travel/db": "^0.114.8",
|
|
135
135
|
"@voyant-travel/types": "^0.109.2",
|
|
136
136
|
"@voyant-travel/utils": "^0.107.1",
|
|
137
|
-
"@voyant-travel/workflows": "^0.
|
|
137
|
+
"@voyant-travel/workflows": "^0.122.0"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
140
|
"@cloudflare/workers-types": "^4.20260702.1",
|
|
141
141
|
"typescript": "^6.0.3",
|
|
142
142
|
"vitest": "^4.1.9",
|
|
143
143
|
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
144
|
-
"@voyant-travel/workflows-orchestrator": "^0.
|
|
144
|
+
"@voyant-travel/workflows-orchestrator": "^0.122.0"
|
|
145
145
|
},
|
|
146
146
|
"files": [
|
|
147
147
|
"dist"
|