@zenstackhq/server 3.5.5 → 3.6.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/api.cjs +2729 -4451
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +219 -207
- package/dist/api.d.mts +249 -0
- package/dist/api.mjs +2745 -0
- package/dist/api.mjs.map +1 -0
- package/dist/common-BjzwQE8S.d.mts +16 -0
- package/dist/common-Cdj4rLFr.mjs +9 -0
- package/dist/common-Cdj4rLFr.mjs.map +1 -0
- package/dist/common-D2RyWTAZ.cjs +14 -0
- package/dist/common-D2RyWTAZ.cjs.map +1 -0
- package/dist/common-D3fx-IHt.d.cts +16 -0
- package/dist/elysia.cjs +46 -114
- package/dist/elysia.cjs.map +1 -1
- package/dist/elysia.d.cts +37 -36
- package/dist/elysia.d.mts +54 -0
- package/dist/elysia.mjs +48 -0
- package/dist/elysia.mjs.map +1 -0
- package/dist/express.cjs +40 -110
- package/dist/express.cjs.map +1 -1
- package/dist/express.d.cts +21 -20
- package/dist/express.d.mts +32 -0
- package/dist/express.mjs +42 -0
- package/dist/express.mjs.map +1 -0
- package/dist/fastify.cjs +36 -100
- package/dist/fastify.cjs.map +1 -1
- package/dist/fastify.d.cts +15 -14
- package/dist/fastify.d.mts +23 -0
- package/dist/fastify.mjs +36 -0
- package/dist/fastify.mjs.map +1 -0
- package/dist/hono.cjs +31 -108
- package/dist/hono.cjs.map +1 -1
- package/dist/hono.d.cts +11 -10
- package/dist/hono.d.mts +19 -0
- package/dist/hono.mjs +33 -0
- package/dist/hono.mjs.map +1 -0
- package/dist/next.cjs +81 -169
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +32 -29
- package/dist/{next.d.ts → next.d.mts} +32 -29
- package/dist/next.mjs +86 -0
- package/dist/next.mjs.map +1 -0
- package/dist/nuxt.cjs +414 -104
- package/dist/nuxt.cjs.map +1 -1
- package/dist/nuxt.d.cts +538 -12
- package/dist/nuxt.d.mts +545 -0
- package/dist/nuxt.mjs +416 -0
- package/dist/nuxt.mjs.map +1 -0
- package/dist/openapi-BPFL4Hn6.mjs +585 -0
- package/dist/openapi-BPFL4Hn6.mjs.map +1 -0
- package/dist/openapi-BUzfCKi-.cjs +586 -0
- package/dist/openapi-BUzfCKi-.cjs.map +1 -0
- package/dist/spec-utils-C7vlChMD.cjs +278 -0
- package/dist/spec-utils-C7vlChMD.cjs.map +1 -0
- package/dist/spec-utils-Syk4SLCX.mjs +200 -0
- package/dist/spec-utils-Syk4SLCX.mjs.map +1 -0
- package/dist/sveltekit.cjs +87 -188
- package/dist/sveltekit.cjs.map +1 -1
- package/dist/sveltekit.d.cts +24 -22
- package/dist/sveltekit.d.mts +43 -0
- package/dist/sveltekit.mjs +88 -0
- package/dist/sveltekit.mjs.map +1 -0
- package/dist/tanstack-start.cjs +59 -133
- package/dist/tanstack-start.cjs.map +1 -1
- package/dist/tanstack-start.d.cts +19 -14
- package/dist/tanstack-start.d.mts +37 -0
- package/dist/tanstack-start.mjs +60 -0
- package/dist/tanstack-start.mjs.map +1 -0
- package/dist/types-6NFtxov5.d.mts +74 -0
- package/dist/types-DYdFPTkH.d.cts +74 -0
- package/dist/utils-B9NX7OcP.cjs +85 -0
- package/dist/utils-B9NX7OcP.cjs.map +1 -0
- package/dist/utils-Doc_CQNd.mjs +39 -0
- package/dist/utils-Doc_CQNd.mjs.map +1 -0
- package/package.json +28 -27
- package/dist/api.d.ts +0 -237
- package/dist/api.js +0 -4437
- package/dist/api.js.map +0 -1
- package/dist/common-Cuu8bjzK.d.cts +0 -14
- package/dist/common-WHbiInuf.d.ts +0 -14
- package/dist/elysia.d.ts +0 -53
- package/dist/elysia.js +0 -82
- package/dist/elysia.js.map +0 -1
- package/dist/express.d.ts +0 -31
- package/dist/express.js +0 -78
- package/dist/express.js.map +0 -1
- package/dist/fastify.d.ts +0 -22
- package/dist/fastify.js +0 -68
- package/dist/fastify.js.map +0 -1
- package/dist/hono.d.ts +0 -18
- package/dist/hono.js +0 -76
- package/dist/hono.js.map +0 -1
- package/dist/next.js +0 -140
- package/dist/next.js.map +0 -1
- package/dist/nuxt.d.ts +0 -19
- package/dist/nuxt.js +0 -73
- package/dist/nuxt.js.map +0 -1
- package/dist/sveltekit.d.ts +0 -41
- package/dist/sveltekit.js +0 -156
- package/dist/sveltekit.js.map +0 -1
- package/dist/tanstack-start.d.ts +0 -32
- package/dist/tanstack-start.js +0 -104
- package/dist/tanstack-start.js.map +0 -1
- package/dist/types-CU_PWKr9.d.cts +0 -72
- package/dist/types-CU_PWKr9.d.ts +0 -72
package/dist/express.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"express.cjs","names":[],"sources":["../src/adapter/express/middleware.ts"],"sourcesContent":["import type { ClientContract } from '@zenstackhq/orm';\nimport type { SchemaDef } from '@zenstackhq/orm/schema';\nimport type { Handler, Request, Response } from 'express';\nimport { logInternalError, type CommonAdapterOptions } from '../common';\n\n/**\n * Express middleware options\n */\nexport interface ExpressMiddlewareOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {\n /**\n * Callback for getting a ZenStackClient for the given request\n */\n getClient: (req: Request, res: Response) => ClientContract<Schema> | Promise<ClientContract<Schema>>;\n\n /**\n * Controls if the middleware directly sends a response. If set to false,\n * the response is stored in the `res.locals` object and then the middleware\n * calls the `next()` function to pass the control to the next middleware.\n * Subsequent middleware or request handlers need to make sure to send\n * a response.\n *\n * Defaults to true;\n */\n sendResponse?: boolean;\n}\n\n/**\n * Creates an Express middleware for handling CRUD requests.\n */\nconst factory = <Schema extends SchemaDef>(options: ExpressMiddlewareOptions<Schema>): Handler => {\n const requestHandler = options.apiHandler;\n\n return async (request, response, next) => {\n const client = await options.getClient(request, response);\n const { sendResponse } = options;\n\n if (sendResponse === false && !client) {\n throw new Error('unable to get ZenStackClient from request context');\n }\n\n if (!client) {\n return response.status(500).json({ message: 'unable to get ZenStackClient from request context' });\n }\n\n // express converts query parameters with square brackets into object\n // e.g.: filter[foo]=bar is parsed to { filter: { foo: 'bar' } }\n // we need to revert this behavior and reconstruct params from original URL\n const url = request.protocol + '://' + request.get('host') + request.originalUrl;\n const searchParams = new URL(url).searchParams;\n const query = Object.fromEntries(searchParams);\n\n try {\n const r = await requestHandler.handleRequest({\n method: request.method,\n path: request.path,\n query,\n requestBody: request.body,\n client,\n });\n if (sendResponse === false) {\n // attach response and pass control to the next middleware\n response.locals['zenstack'] = {\n status: r.status,\n body: r.body,\n };\n return next();\n }\n return response.status(r.status).json(r.body);\n } catch (err) {\n if (sendResponse === false) {\n throw err;\n }\n logInternalError(options.apiHandler.log, err);\n return response.status(500).json({ message: `An internal server error occurred` });\n }\n };\n};\n\nexport default factory;\n\nexport { factory as ZenStackMiddleware };\n"],"mappings":";;;;;;AA6BA,MAAM,WAAqC,YAAuD;CAC9F,MAAM,iBAAiB,QAAQ;AAE/B,QAAO,OAAO,SAAS,UAAU,SAAS;EACtC,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,SAAS;EACzD,MAAM,EAAE,iBAAiB;AAEzB,MAAI,iBAAiB,SAAS,CAAC,OAC3B,OAAM,IAAI,MAAM,oDAAoD;AAGxE,MAAI,CAAC,OACD,QAAO,SAAS,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qDAAqD,CAAC;EAMtG,MAAM,MAAM,QAAQ,WAAW,QAAQ,QAAQ,IAAI,OAAO,GAAG,QAAQ;EACrE,MAAM,eAAe,IAAI,IAAI,IAAI,CAAC;EAClC,MAAM,QAAQ,OAAO,YAAY,aAAa;AAE9C,MAAI;GACA,MAAM,IAAI,MAAM,eAAe,cAAc;IACzC,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd;IACA,aAAa,QAAQ;IACrB;IACH,CAAC;AACF,OAAI,iBAAiB,OAAO;AAExB,aAAS,OAAO,cAAc;KAC1B,QAAQ,EAAE;KACV,MAAM,EAAE;KACX;AACD,WAAO,MAAM;;AAEjB,UAAO,SAAS,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK;WACxC,KAAK;AACV,OAAI,iBAAiB,MACjB,OAAM;AAEV,kBAAA,iBAAiB,QAAQ,WAAW,KAAK,IAAI;AAC7C,UAAO,SAAS,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qCAAqC,CAAC"}
|
package/dist/express.d.cts
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './types-CU_PWKr9.cjs';
|
|
1
|
+
import { t as CommonAdapterOptions } from "./common-D3fx-IHt.cjs";
|
|
2
|
+
import { ClientContract } from "@zenstackhq/orm";
|
|
3
|
+
import { SchemaDef } from "@zenstackhq/orm/schema";
|
|
4
|
+
import { Handler, Request, Response } from "express";
|
|
6
5
|
|
|
6
|
+
//#region src/adapter/express/middleware.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Express middleware options
|
|
9
9
|
*/
|
|
10
10
|
interface ExpressMiddlewareOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Callback for getting a ZenStackClient for the given request
|
|
13
|
+
*/
|
|
14
|
+
getClient: (req: Request, res: Response) => ClientContract<Schema> | Promise<ClientContract<Schema>>;
|
|
15
|
+
/**
|
|
16
|
+
* Controls if the middleware directly sends a response. If set to false,
|
|
17
|
+
* the response is stored in the `res.locals` object and then the middleware
|
|
18
|
+
* calls the `next()` function to pass the control to the next middleware.
|
|
19
|
+
* Subsequent middleware or request handlers need to make sure to send
|
|
20
|
+
* a response.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to true;
|
|
23
|
+
*/
|
|
24
|
+
sendResponse?: boolean;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Creates an Express middleware for handling CRUD requests.
|
|
28
28
|
*/
|
|
29
29
|
declare const factory: <Schema extends SchemaDef>(options: ExpressMiddlewareOptions<Schema>) => Handler;
|
|
30
|
-
|
|
30
|
+
//#endregion
|
|
31
31
|
export { type ExpressMiddlewareOptions, factory as ZenStackMiddleware };
|
|
32
|
+
//# sourceMappingURL=express.d.cts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { t as CommonAdapterOptions } from "./common-BjzwQE8S.mjs";
|
|
2
|
+
import { ClientContract } from "@zenstackhq/orm";
|
|
3
|
+
import { SchemaDef } from "@zenstackhq/orm/schema";
|
|
4
|
+
import { Handler, Request, Response } from "express";
|
|
5
|
+
|
|
6
|
+
//#region src/adapter/express/middleware.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Express middleware options
|
|
9
|
+
*/
|
|
10
|
+
interface ExpressMiddlewareOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {
|
|
11
|
+
/**
|
|
12
|
+
* Callback for getting a ZenStackClient for the given request
|
|
13
|
+
*/
|
|
14
|
+
getClient: (req: Request, res: Response) => ClientContract<Schema> | Promise<ClientContract<Schema>>;
|
|
15
|
+
/**
|
|
16
|
+
* Controls if the middleware directly sends a response. If set to false,
|
|
17
|
+
* the response is stored in the `res.locals` object and then the middleware
|
|
18
|
+
* calls the `next()` function to pass the control to the next middleware.
|
|
19
|
+
* Subsequent middleware or request handlers need to make sure to send
|
|
20
|
+
* a response.
|
|
21
|
+
*
|
|
22
|
+
* Defaults to true;
|
|
23
|
+
*/
|
|
24
|
+
sendResponse?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates an Express middleware for handling CRUD requests.
|
|
28
|
+
*/
|
|
29
|
+
declare const factory: <Schema extends SchemaDef>(options: ExpressMiddlewareOptions<Schema>) => Handler;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { type ExpressMiddlewareOptions, factory as ZenStackMiddleware };
|
|
32
|
+
//# sourceMappingURL=express.d.mts.map
|
package/dist/express.mjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { t as logInternalError } from "./common-Cdj4rLFr.mjs";
|
|
2
|
+
//#region src/adapter/express/middleware.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates an Express middleware for handling CRUD requests.
|
|
5
|
+
*/
|
|
6
|
+
const factory = (options) => {
|
|
7
|
+
const requestHandler = options.apiHandler;
|
|
8
|
+
return async (request, response, next) => {
|
|
9
|
+
const client = await options.getClient(request, response);
|
|
10
|
+
const { sendResponse } = options;
|
|
11
|
+
if (sendResponse === false && !client) throw new Error("unable to get ZenStackClient from request context");
|
|
12
|
+
if (!client) return response.status(500).json({ message: "unable to get ZenStackClient from request context" });
|
|
13
|
+
const url = request.protocol + "://" + request.get("host") + request.originalUrl;
|
|
14
|
+
const searchParams = new URL(url).searchParams;
|
|
15
|
+
const query = Object.fromEntries(searchParams);
|
|
16
|
+
try {
|
|
17
|
+
const r = await requestHandler.handleRequest({
|
|
18
|
+
method: request.method,
|
|
19
|
+
path: request.path,
|
|
20
|
+
query,
|
|
21
|
+
requestBody: request.body,
|
|
22
|
+
client
|
|
23
|
+
});
|
|
24
|
+
if (sendResponse === false) {
|
|
25
|
+
response.locals["zenstack"] = {
|
|
26
|
+
status: r.status,
|
|
27
|
+
body: r.body
|
|
28
|
+
};
|
|
29
|
+
return next();
|
|
30
|
+
}
|
|
31
|
+
return response.status(r.status).json(r.body);
|
|
32
|
+
} catch (err) {
|
|
33
|
+
if (sendResponse === false) throw err;
|
|
34
|
+
logInternalError(options.apiHandler.log, err);
|
|
35
|
+
return response.status(500).json({ message: `An internal server error occurred` });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { factory as ZenStackMiddleware };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=express.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"express.mjs","names":[],"sources":["../src/adapter/express/middleware.ts"],"sourcesContent":["import type { ClientContract } from '@zenstackhq/orm';\nimport type { SchemaDef } from '@zenstackhq/orm/schema';\nimport type { Handler, Request, Response } from 'express';\nimport { logInternalError, type CommonAdapterOptions } from '../common';\n\n/**\n * Express middleware options\n */\nexport interface ExpressMiddlewareOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {\n /**\n * Callback for getting a ZenStackClient for the given request\n */\n getClient: (req: Request, res: Response) => ClientContract<Schema> | Promise<ClientContract<Schema>>;\n\n /**\n * Controls if the middleware directly sends a response. If set to false,\n * the response is stored in the `res.locals` object and then the middleware\n * calls the `next()` function to pass the control to the next middleware.\n * Subsequent middleware or request handlers need to make sure to send\n * a response.\n *\n * Defaults to true;\n */\n sendResponse?: boolean;\n}\n\n/**\n * Creates an Express middleware for handling CRUD requests.\n */\nconst factory = <Schema extends SchemaDef>(options: ExpressMiddlewareOptions<Schema>): Handler => {\n const requestHandler = options.apiHandler;\n\n return async (request, response, next) => {\n const client = await options.getClient(request, response);\n const { sendResponse } = options;\n\n if (sendResponse === false && !client) {\n throw new Error('unable to get ZenStackClient from request context');\n }\n\n if (!client) {\n return response.status(500).json({ message: 'unable to get ZenStackClient from request context' });\n }\n\n // express converts query parameters with square brackets into object\n // e.g.: filter[foo]=bar is parsed to { filter: { foo: 'bar' } }\n // we need to revert this behavior and reconstruct params from original URL\n const url = request.protocol + '://' + request.get('host') + request.originalUrl;\n const searchParams = new URL(url).searchParams;\n const query = Object.fromEntries(searchParams);\n\n try {\n const r = await requestHandler.handleRequest({\n method: request.method,\n path: request.path,\n query,\n requestBody: request.body,\n client,\n });\n if (sendResponse === false) {\n // attach response and pass control to the next middleware\n response.locals['zenstack'] = {\n status: r.status,\n body: r.body,\n };\n return next();\n }\n return response.status(r.status).json(r.body);\n } catch (err) {\n if (sendResponse === false) {\n throw err;\n }\n logInternalError(options.apiHandler.log, err);\n return response.status(500).json({ message: `An internal server error occurred` });\n }\n };\n};\n\nexport default factory;\n\nexport { factory as ZenStackMiddleware };\n"],"mappings":";;;;;AA6BA,MAAM,WAAqC,YAAuD;CAC9F,MAAM,iBAAiB,QAAQ;AAE/B,QAAO,OAAO,SAAS,UAAU,SAAS;EACtC,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,SAAS;EACzD,MAAM,EAAE,iBAAiB;AAEzB,MAAI,iBAAiB,SAAS,CAAC,OAC3B,OAAM,IAAI,MAAM,oDAAoD;AAGxE,MAAI,CAAC,OACD,QAAO,SAAS,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qDAAqD,CAAC;EAMtG,MAAM,MAAM,QAAQ,WAAW,QAAQ,QAAQ,IAAI,OAAO,GAAG,QAAQ;EACrE,MAAM,eAAe,IAAI,IAAI,IAAI,CAAC;EAClC,MAAM,QAAQ,OAAO,YAAY,aAAa;AAE9C,MAAI;GACA,MAAM,IAAI,MAAM,eAAe,cAAc;IACzC,QAAQ,QAAQ;IAChB,MAAM,QAAQ;IACd;IACA,aAAa,QAAQ;IACrB;IACH,CAAC;AACF,OAAI,iBAAiB,OAAO;AAExB,aAAS,OAAO,cAAc;KAC1B,QAAQ,EAAE;KACV,MAAM,EAAE;KACX;AACD,WAAO,MAAM;;AAEjB,UAAO,SAAS,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK;WACxC,KAAK;AACV,OAAI,iBAAiB,MACjB,OAAM;AAEV,oBAAiB,QAAQ,WAAW,KAAK,IAAI;AAC7C,UAAO,SAAS,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qCAAqC,CAAC"}
|
package/dist/fastify.cjs
CHANGED
|
@@ -1,103 +1,39 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_utils = require("./utils-B9NX7OcP.cjs");
|
|
3
|
+
const require_common = require("./common-D2RyWTAZ.cjs");
|
|
4
|
+
let fastify_plugin = require("fastify-plugin");
|
|
5
|
+
fastify_plugin = require_utils.__toESM(fastify_plugin, 1);
|
|
6
|
+
//#region src/adapter/fastify/plugin.ts
|
|
7
|
+
/**
|
|
8
|
+
* Fastify plugin for handling CRUD requests.
|
|
9
|
+
*/
|
|
10
|
+
const pluginHandler = (fastify, options, done) => {
|
|
11
|
+
const prefix = options.prefix ?? "";
|
|
12
|
+
fastify.all(`${prefix}/*`, async (request, reply) => {
|
|
13
|
+
const client = await options.getClient(request, reply);
|
|
14
|
+
if (!client) {
|
|
15
|
+
reply.status(500).send({ message: "unable to get ZenStackClient from request context" });
|
|
16
|
+
return reply;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const response = await options.apiHandler.handleRequest({
|
|
20
|
+
method: request.method,
|
|
21
|
+
path: request.params["*"],
|
|
22
|
+
query: request.query,
|
|
23
|
+
requestBody: request.body,
|
|
24
|
+
client
|
|
25
|
+
});
|
|
26
|
+
reply.status(response.status).send(response.body);
|
|
27
|
+
} catch (err) {
|
|
28
|
+
require_common.logInternalError(options.apiHandler.log, err);
|
|
29
|
+
reply.status(500).send({ message: `An internal server error occurred` });
|
|
30
|
+
}
|
|
31
|
+
return reply;
|
|
32
|
+
});
|
|
33
|
+
done();
|
|
12
34
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/adapter/fastify/index.ts
|
|
32
|
-
var fastify_exports = {};
|
|
33
|
-
__export(fastify_exports, {
|
|
34
|
-
ZenStackFastifyPlugin: () => plugin
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(fastify_exports);
|
|
37
|
-
|
|
38
|
-
// src/adapter/fastify/plugin.ts
|
|
39
|
-
var import_fastify_plugin = __toESM(require("fastify-plugin"), 1);
|
|
40
|
-
|
|
41
|
-
// src/api/utils.ts
|
|
42
|
-
var import_decimal = require("decimal.js");
|
|
43
|
-
var import_superjson = __toESM(require("superjson"), 1);
|
|
44
|
-
var import_ts_pattern = require("ts-pattern");
|
|
45
|
-
var import_v3 = require("zod-validation-error/v3");
|
|
46
|
-
var import_v4 = require("zod-validation-error/v4");
|
|
47
|
-
function log(logger, level, message, error) {
|
|
48
|
-
if (!logger) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
const getMessage = typeof message === "function" ? message : () => message;
|
|
52
|
-
if (typeof logger === "function") {
|
|
53
|
-
logger(level, getMessage(), error);
|
|
54
|
-
} else if (logger.includes(level)) {
|
|
55
|
-
const logFn = (0, import_ts_pattern.match)(level).with("debug", () => console.debug).with("info", () => console.info).with("warn", () => console.warn).with("error", () => console.error).exhaustive();
|
|
56
|
-
logFn(`@zenstackhq/server: [${level}] ${getMessage()}${error ? `
|
|
57
|
-
${error}` : ""}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
__name(log, "log");
|
|
61
|
-
|
|
62
|
-
// src/adapter/common.ts
|
|
63
|
-
function logInternalError(logger, err) {
|
|
64
|
-
log(logger, "error", `An unhandled error occurred while processing the request: ${err}${err instanceof Error ? "\n" + err.stack : ""}`);
|
|
65
|
-
}
|
|
66
|
-
__name(logInternalError, "logInternalError");
|
|
35
|
+
const plugin = (0, fastify_plugin.default)(pluginHandler);
|
|
36
|
+
//#endregion
|
|
37
|
+
exports.ZenStackFastifyPlugin = plugin;
|
|
67
38
|
|
|
68
|
-
// src/adapter/fastify/plugin.ts
|
|
69
|
-
var pluginHandler = /* @__PURE__ */ __name((fastify, options, done) => {
|
|
70
|
-
const prefix = options.prefix ?? "";
|
|
71
|
-
fastify.all(`${prefix}/*`, async (request, reply) => {
|
|
72
|
-
const client = await options.getClient(request, reply);
|
|
73
|
-
if (!client) {
|
|
74
|
-
reply.status(500).send({
|
|
75
|
-
message: "unable to get ZenStackClient from request context"
|
|
76
|
-
});
|
|
77
|
-
return reply;
|
|
78
|
-
}
|
|
79
|
-
try {
|
|
80
|
-
const response = await options.apiHandler.handleRequest({
|
|
81
|
-
method: request.method,
|
|
82
|
-
path: request.params["*"],
|
|
83
|
-
query: request.query,
|
|
84
|
-
requestBody: request.body,
|
|
85
|
-
client
|
|
86
|
-
});
|
|
87
|
-
reply.status(response.status).send(response.body);
|
|
88
|
-
} catch (err) {
|
|
89
|
-
logInternalError(options.apiHandler.log, err);
|
|
90
|
-
reply.status(500).send({
|
|
91
|
-
message: `An internal server error occurred`
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
return reply;
|
|
95
|
-
});
|
|
96
|
-
done();
|
|
97
|
-
}, "pluginHandler");
|
|
98
|
-
var plugin = (0, import_fastify_plugin.default)(pluginHandler);
|
|
99
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
-
0 && (module.exports = {
|
|
101
|
-
ZenStackFastifyPlugin
|
|
102
|
-
});
|
|
103
39
|
//# sourceMappingURL=fastify.cjs.map
|
package/dist/fastify.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"fastify.cjs","names":[],"sources":["../src/adapter/fastify/plugin.ts"],"sourcesContent":["import type { ClientContract } from '@zenstackhq/orm';\nimport type { SchemaDef } from '@zenstackhq/orm/schema';\nimport type { FastifyPluginCallback, FastifyReply, FastifyRequest } from 'fastify';\nimport fp from 'fastify-plugin';\nimport { logInternalError, type CommonAdapterOptions } from '../common';\n\n/**\n * Fastify plugin options\n */\nexport interface FastifyPluginOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {\n /**\n * Url prefix, e.g.: /api\n */\n prefix: string;\n\n /**\n * Callback for getting a ZenStackClient for the given request\n */\n getClient: (\n request: FastifyRequest,\n reply: FastifyReply,\n ) => ClientContract<Schema> | Promise<ClientContract<Schema>>;\n}\n\n/**\n * Fastify plugin for handling CRUD requests.\n */\nconst pluginHandler: FastifyPluginCallback<FastifyPluginOptions<SchemaDef>> = (fastify, options, done) => {\n const prefix = options.prefix ?? '';\n\n fastify.all(`${prefix}/*`, async (request, reply) => {\n const client = await options.getClient(request, reply);\n if (!client) {\n reply.status(500).send({ message: 'unable to get ZenStackClient from request context' });\n return reply;\n }\n\n try {\n const response = await options.apiHandler.handleRequest({\n method: request.method,\n path: (request.params as any)['*'],\n query: request.query as Record<string, string | string[]>,\n requestBody: request.body,\n client,\n });\n reply.status(response.status).send(response.body);\n } catch (err) {\n logInternalError(options.apiHandler.log, err);\n reply.status(500).send({ message: `An internal server error occurred` });\n }\n\n return reply;\n });\n\n done();\n};\n\nconst plugin = fp(pluginHandler);\n\nexport { plugin as ZenStackFastifyPlugin };\n"],"mappings":";;;;;;;;;AA2BA,MAAM,iBAAyE,SAAS,SAAS,SAAS;CACtG,MAAM,SAAS,QAAQ,UAAU;AAEjC,SAAQ,IAAI,GAAG,OAAO,KAAK,OAAO,SAAS,UAAU;EACjD,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,MAAM;AACtD,MAAI,CAAC,QAAQ;AACT,SAAM,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qDAAqD,CAAC;AACxF,UAAO;;AAGX,MAAI;GACA,MAAM,WAAW,MAAM,QAAQ,WAAW,cAAc;IACpD,QAAQ,QAAQ;IAChB,MAAO,QAAQ,OAAe;IAC9B,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB;IACH,CAAC;AACF,SAAM,OAAO,SAAS,OAAO,CAAC,KAAK,SAAS,KAAK;WAC5C,KAAK;AACV,kBAAA,iBAAiB,QAAQ,WAAW,KAAK,IAAI;AAC7C,SAAM,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qCAAqC,CAAC;;AAG5E,SAAO;GACT;AAEF,OAAM;;AAGV,MAAM,UAAA,GAAA,eAAA,SAAY,cAAc"}
|
package/dist/fastify.d.cts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './types-CU_PWKr9.cjs';
|
|
1
|
+
import { t as CommonAdapterOptions } from "./common-D3fx-IHt.cjs";
|
|
2
|
+
import { ClientContract } from "@zenstackhq/orm";
|
|
3
|
+
import { SchemaDef } from "@zenstackhq/orm/schema";
|
|
4
|
+
import { FastifyPluginCallback, FastifyReply, FastifyRequest } from "fastify";
|
|
6
5
|
|
|
6
|
+
//#region src/adapter/fastify/plugin.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* Fastify plugin options
|
|
9
9
|
*/
|
|
10
10
|
interface FastifyPluginOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Url prefix, e.g.: /api
|
|
13
|
+
*/
|
|
14
|
+
prefix: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback for getting a ZenStackClient for the given request
|
|
17
|
+
*/
|
|
18
|
+
getClient: (request: FastifyRequest, reply: FastifyReply) => ClientContract<Schema> | Promise<ClientContract<Schema>>;
|
|
19
19
|
}
|
|
20
20
|
declare const plugin: FastifyPluginCallback<FastifyPluginOptions<SchemaDef>>;
|
|
21
|
-
|
|
21
|
+
//#endregion
|
|
22
22
|
export { type FastifyPluginOptions, plugin as ZenStackFastifyPlugin };
|
|
23
|
+
//# sourceMappingURL=fastify.d.cts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { t as CommonAdapterOptions } from "./common-BjzwQE8S.mjs";
|
|
2
|
+
import { ClientContract } from "@zenstackhq/orm";
|
|
3
|
+
import { SchemaDef } from "@zenstackhq/orm/schema";
|
|
4
|
+
import { FastifyPluginCallback, FastifyReply, FastifyRequest } from "fastify";
|
|
5
|
+
|
|
6
|
+
//#region src/adapter/fastify/plugin.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Fastify plugin options
|
|
9
|
+
*/
|
|
10
|
+
interface FastifyPluginOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {
|
|
11
|
+
/**
|
|
12
|
+
* Url prefix, e.g.: /api
|
|
13
|
+
*/
|
|
14
|
+
prefix: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callback for getting a ZenStackClient for the given request
|
|
17
|
+
*/
|
|
18
|
+
getClient: (request: FastifyRequest, reply: FastifyReply) => ClientContract<Schema> | Promise<ClientContract<Schema>>;
|
|
19
|
+
}
|
|
20
|
+
declare const plugin: FastifyPluginCallback<FastifyPluginOptions<SchemaDef>>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { type FastifyPluginOptions, plugin as ZenStackFastifyPlugin };
|
|
23
|
+
//# sourceMappingURL=fastify.d.mts.map
|
package/dist/fastify.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { t as logInternalError } from "./common-Cdj4rLFr.mjs";
|
|
2
|
+
import fp from "fastify-plugin";
|
|
3
|
+
//#region src/adapter/fastify/plugin.ts
|
|
4
|
+
/**
|
|
5
|
+
* Fastify plugin for handling CRUD requests.
|
|
6
|
+
*/
|
|
7
|
+
const pluginHandler = (fastify, options, done) => {
|
|
8
|
+
const prefix = options.prefix ?? "";
|
|
9
|
+
fastify.all(`${prefix}/*`, async (request, reply) => {
|
|
10
|
+
const client = await options.getClient(request, reply);
|
|
11
|
+
if (!client) {
|
|
12
|
+
reply.status(500).send({ message: "unable to get ZenStackClient from request context" });
|
|
13
|
+
return reply;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const response = await options.apiHandler.handleRequest({
|
|
17
|
+
method: request.method,
|
|
18
|
+
path: request.params["*"],
|
|
19
|
+
query: request.query,
|
|
20
|
+
requestBody: request.body,
|
|
21
|
+
client
|
|
22
|
+
});
|
|
23
|
+
reply.status(response.status).send(response.body);
|
|
24
|
+
} catch (err) {
|
|
25
|
+
logInternalError(options.apiHandler.log, err);
|
|
26
|
+
reply.status(500).send({ message: `An internal server error occurred` });
|
|
27
|
+
}
|
|
28
|
+
return reply;
|
|
29
|
+
});
|
|
30
|
+
done();
|
|
31
|
+
};
|
|
32
|
+
const plugin = fp(pluginHandler);
|
|
33
|
+
//#endregion
|
|
34
|
+
export { plugin as ZenStackFastifyPlugin };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=fastify.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fastify.mjs","names":[],"sources":["../src/adapter/fastify/plugin.ts"],"sourcesContent":["import type { ClientContract } from '@zenstackhq/orm';\nimport type { SchemaDef } from '@zenstackhq/orm/schema';\nimport type { FastifyPluginCallback, FastifyReply, FastifyRequest } from 'fastify';\nimport fp from 'fastify-plugin';\nimport { logInternalError, type CommonAdapterOptions } from '../common';\n\n/**\n * Fastify plugin options\n */\nexport interface FastifyPluginOptions<Schema extends SchemaDef> extends CommonAdapterOptions<Schema> {\n /**\n * Url prefix, e.g.: /api\n */\n prefix: string;\n\n /**\n * Callback for getting a ZenStackClient for the given request\n */\n getClient: (\n request: FastifyRequest,\n reply: FastifyReply,\n ) => ClientContract<Schema> | Promise<ClientContract<Schema>>;\n}\n\n/**\n * Fastify plugin for handling CRUD requests.\n */\nconst pluginHandler: FastifyPluginCallback<FastifyPluginOptions<SchemaDef>> = (fastify, options, done) => {\n const prefix = options.prefix ?? '';\n\n fastify.all(`${prefix}/*`, async (request, reply) => {\n const client = await options.getClient(request, reply);\n if (!client) {\n reply.status(500).send({ message: 'unable to get ZenStackClient from request context' });\n return reply;\n }\n\n try {\n const response = await options.apiHandler.handleRequest({\n method: request.method,\n path: (request.params as any)['*'],\n query: request.query as Record<string, string | string[]>,\n requestBody: request.body,\n client,\n });\n reply.status(response.status).send(response.body);\n } catch (err) {\n logInternalError(options.apiHandler.log, err);\n reply.status(500).send({ message: `An internal server error occurred` });\n }\n\n return reply;\n });\n\n done();\n};\n\nconst plugin = fp(pluginHandler);\n\nexport { plugin as ZenStackFastifyPlugin };\n"],"mappings":";;;;;;AA2BA,MAAM,iBAAyE,SAAS,SAAS,SAAS;CACtG,MAAM,SAAS,QAAQ,UAAU;AAEjC,SAAQ,IAAI,GAAG,OAAO,KAAK,OAAO,SAAS,UAAU;EACjD,MAAM,SAAS,MAAM,QAAQ,UAAU,SAAS,MAAM;AACtD,MAAI,CAAC,QAAQ;AACT,SAAM,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qDAAqD,CAAC;AACxF,UAAO;;AAGX,MAAI;GACA,MAAM,WAAW,MAAM,QAAQ,WAAW,cAAc;IACpD,QAAQ,QAAQ;IAChB,MAAO,QAAQ,OAAe;IAC9B,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB;IACH,CAAC;AACF,SAAM,OAAO,SAAS,OAAO,CAAC,KAAK,SAAS,KAAK;WAC5C,KAAK;AACV,oBAAiB,QAAQ,WAAW,KAAK,IAAI;AAC7C,SAAM,OAAO,IAAI,CAAC,KAAK,EAAE,SAAS,qCAAqC,CAAC;;AAG5E,SAAO;GACT;AAEF,OAAM;;AAGV,MAAM,SAAS,GAAG,cAAc"}
|
package/dist/hono.cjs
CHANGED
|
@@ -1,111 +1,34 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/adapter/hono/index.ts
|
|
32
|
-
var hono_exports = {};
|
|
33
|
-
__export(hono_exports, {
|
|
34
|
-
createHonoHandler: () => createHonoHandler
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(hono_exports);
|
|
37
|
-
|
|
38
|
-
// src/api/utils.ts
|
|
39
|
-
var import_decimal = require("decimal.js");
|
|
40
|
-
var import_superjson = __toESM(require("superjson"), 1);
|
|
41
|
-
var import_ts_pattern = require("ts-pattern");
|
|
42
|
-
var import_v3 = require("zod-validation-error/v3");
|
|
43
|
-
var import_v4 = require("zod-validation-error/v4");
|
|
44
|
-
function log(logger, level, message, error) {
|
|
45
|
-
if (!logger) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const getMessage = typeof message === "function" ? message : () => message;
|
|
49
|
-
if (typeof logger === "function") {
|
|
50
|
-
logger(level, getMessage(), error);
|
|
51
|
-
} else if (logger.includes(level)) {
|
|
52
|
-
const logFn = (0, import_ts_pattern.match)(level).with("debug", () => console.debug).with("info", () => console.info).with("warn", () => console.warn).with("error", () => console.error).exhaustive();
|
|
53
|
-
logFn(`@zenstackhq/server: [${level}] ${getMessage()}${error ? `
|
|
54
|
-
${error}` : ""}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
__name(log, "log");
|
|
58
|
-
|
|
59
|
-
// src/adapter/common.ts
|
|
60
|
-
function logInternalError(logger, err) {
|
|
61
|
-
log(logger, "error", `An unhandled error occurred while processing the request: ${err}${err instanceof Error ? "\n" + err.stack : ""}`);
|
|
62
|
-
}
|
|
63
|
-
__name(logInternalError, "logInternalError");
|
|
64
|
-
|
|
65
|
-
// src/adapter/hono/handler.ts
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_common = require("./common-D2RyWTAZ.cjs");
|
|
3
|
+
//#region src/adapter/hono/handler.ts
|
|
66
4
|
function createHonoHandler(options) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
path,
|
|
93
|
-
query,
|
|
94
|
-
requestBody,
|
|
95
|
-
client
|
|
96
|
-
});
|
|
97
|
-
return ctx.json(r.body, r.status);
|
|
98
|
-
} catch (err) {
|
|
99
|
-
logInternalError(options.apiHandler.log, err);
|
|
100
|
-
return ctx.json({
|
|
101
|
-
message: `An internal server error occurred`
|
|
102
|
-
}, 500);
|
|
103
|
-
}
|
|
104
|
-
};
|
|
5
|
+
return async (ctx) => {
|
|
6
|
+
const client = await options.getClient(ctx);
|
|
7
|
+
if (!client) return ctx.json({ message: "unable to get ZenStackClient from request context" }, 500);
|
|
8
|
+
const url = new URL(ctx.req.url);
|
|
9
|
+
const query = Object.fromEntries(url.searchParams);
|
|
10
|
+
const path = ctx.req.path.substring(ctx.req.routePath.length - 1);
|
|
11
|
+
if (!path) return ctx.json({ message: "missing path parameter" }, 400);
|
|
12
|
+
let requestBody;
|
|
13
|
+
if (ctx.req.raw.body) try {
|
|
14
|
+
requestBody = await ctx.req.json();
|
|
15
|
+
} catch {}
|
|
16
|
+
try {
|
|
17
|
+
const r = await options.apiHandler.handleRequest({
|
|
18
|
+
method: ctx.req.method,
|
|
19
|
+
path,
|
|
20
|
+
query,
|
|
21
|
+
requestBody,
|
|
22
|
+
client
|
|
23
|
+
});
|
|
24
|
+
return ctx.json(r.body, r.status);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
require_common.logInternalError(options.apiHandler.log, err);
|
|
27
|
+
return ctx.json({ message: `An internal server error occurred` }, 500);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
105
30
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
createHonoHandler
|
|
110
|
-
});
|
|
31
|
+
//#endregion
|
|
32
|
+
exports.createHonoHandler = createHonoHandler;
|
|
33
|
+
|
|
111
34
|
//# sourceMappingURL=hono.cjs.map
|