@arkstack/driver-h3 0.12.6 → 0.12.7
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.
|
@@ -35,14 +35,50 @@ declare class H3EventResponse {
|
|
|
35
35
|
constructor(response: Response);
|
|
36
36
|
get headers(): Headers;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The H3Driver class implements the ArkstackKitDriver contract for the H3 framework.
|
|
40
|
+
*/
|
|
38
41
|
declare class H3Driver extends ArkstackKitDriver<H3, H3Middleware> {
|
|
39
42
|
readonly name = "h3";
|
|
40
43
|
private readonly options;
|
|
44
|
+
/**
|
|
45
|
+
* Creates an instance of H3Driver.
|
|
46
|
+
*
|
|
47
|
+
* @param options
|
|
48
|
+
*/
|
|
41
49
|
constructor(options: H3DriverOptions);
|
|
50
|
+
/**
|
|
51
|
+
* Creates an H3 application instance.
|
|
52
|
+
*
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
42
55
|
createApp(): H3;
|
|
56
|
+
/**
|
|
57
|
+
* Mounts static assets from the specified public path to the H3 application.
|
|
58
|
+
*
|
|
59
|
+
* @param app
|
|
60
|
+
* @param publicPath
|
|
61
|
+
*/
|
|
43
62
|
mountPublicAssets(app: H3, publicPath: string): PromiseOrValue<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Binds the router to the H3 application using the provided bindRouter function.
|
|
65
|
+
*
|
|
66
|
+
* @param app
|
|
67
|
+
*/
|
|
44
68
|
bindRouter(app: H3): PromiseOrValue<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Applies middleware to the H3 application.
|
|
71
|
+
*
|
|
72
|
+
* @param app
|
|
73
|
+
* @param middleware
|
|
74
|
+
*/
|
|
45
75
|
applyMiddleware(app: H3, middleware: H3Middleware | ArkstackMiddlewareConfig<H3Middleware>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Starts the H3 server on the specified port.
|
|
78
|
+
*
|
|
79
|
+
* @param app
|
|
80
|
+
* @param port
|
|
81
|
+
*/
|
|
46
82
|
start(app: H3, port: number): void;
|
|
47
83
|
}
|
|
48
84
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference path="./app.d.ts" />
|
|
2
|
-
import { a as Router, i as H3Middleware, n as H3DriverOptions, o as defaultErrorHandler, r as H3EventResponse, t as H3Driver } from "./index-
|
|
2
|
+
import { a as Router, i as H3Middleware, n as H3DriverOptions, o as defaultErrorHandler, r as H3EventResponse, t as H3Driver } from "./index-CDLqKB-5.js";
|
|
3
3
|
export { H3Driver, H3DriverOptions, H3EventResponse, H3Middleware, Router, defaultErrorHandler };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as H3Middleware } from "../index-
|
|
1
|
+
import { i as H3Middleware } from "../index-CDLqKB-5.js";
|
|
2
2
|
import * as _$h3 from "h3";
|
|
3
3
|
import { H3Event } from "h3";
|
|
4
4
|
import { NextFunction } from "clear-router/types/h3";
|
|
@@ -19,6 +19,13 @@ declare const cors: (options?: {
|
|
|
19
19
|
}) => (event: H3Event, next: NextFunction) => Promise<void>;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/middlewares/request-logger.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* Middleware to log incoming requests and their response times.
|
|
24
|
+
*
|
|
25
|
+
* @param config Configuration options for the request logger middleware.
|
|
26
|
+
* @param config.allowInProduction If true, the logger will also log requests in production environment. Default is false.
|
|
27
|
+
* @returns H3Middleware function
|
|
28
|
+
*/
|
|
22
29
|
declare const requestLogger: ({
|
|
23
30
|
allowInProduction
|
|
24
31
|
}?: {
|
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Router } from "clear-router/h3";
|
|
|
5
5
|
import { H3App, Handler, HttpContext, Middleware } from "clear-router/types/h3";
|
|
6
6
|
import { Route } from "clear-router";
|
|
7
7
|
|
|
8
|
-
//#region dist/index-
|
|
8
|
+
//#region dist/index-CDLqKB-5.d.ts
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/index.d.ts
|
|
11
11
|
type H3Middleware = Middleware | [Middleware, Record<string, any>];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/driver-h3",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "H3 driver for Arkstack, providing H3-based runtime integration for the framework.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"clear-router": "^2.8.0",
|
|
41
41
|
"@resora/plugin-clear-router": "^1.0.34",
|
|
42
42
|
"resora": "^1.3.6",
|
|
43
|
-
"@arkstack/contract": "^0.12.
|
|
43
|
+
"@arkstack/contract": "^0.12.7"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"h3": "2.0.1-rc.22",
|
|
47
|
-
"@arkstack/
|
|
48
|
-
"@arkstack/
|
|
49
|
-
"@arkstack/foundry": "^0.12.
|
|
47
|
+
"@arkstack/common": "^0.12.7",
|
|
48
|
+
"@arkstack/auth": "^0.12.7",
|
|
49
|
+
"@arkstack/foundry": "^0.12.7"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@arkstack/auth": {
|