@mokup/runtime 1.0.0 → 1.0.2
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/index.d.cts +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -78,8 +78,10 @@ interface RuntimeResult {
|
|
|
78
78
|
headers: Record<string, string>;
|
|
79
79
|
body: string | Uint8Array | null;
|
|
80
80
|
}
|
|
81
|
-
type
|
|
82
|
-
type
|
|
81
|
+
type RouteStaticResponse = string | number | boolean | bigint | symbol | null | undefined | object;
|
|
82
|
+
type RouteHandlerResult = RouteStaticResponse | Response;
|
|
83
|
+
type RequestHandler = (context: Context) => RouteHandlerResult | Promise<RouteHandlerResult>;
|
|
84
|
+
type RouteResponse = RouteStaticResponse | RequestHandler;
|
|
83
85
|
|
|
84
86
|
interface RuntimeOptions {
|
|
85
87
|
manifest: Manifest | (() => Promise<Manifest>);
|
package/dist/index.d.mts
CHANGED
|
@@ -78,8 +78,10 @@ interface RuntimeResult {
|
|
|
78
78
|
headers: Record<string, string>;
|
|
79
79
|
body: string | Uint8Array | null;
|
|
80
80
|
}
|
|
81
|
-
type
|
|
82
|
-
type
|
|
81
|
+
type RouteStaticResponse = string | number | boolean | bigint | symbol | null | undefined | object;
|
|
82
|
+
type RouteHandlerResult = RouteStaticResponse | Response;
|
|
83
|
+
type RequestHandler = (context: Context) => RouteHandlerResult | Promise<RouteHandlerResult>;
|
|
84
|
+
type RouteResponse = RouteStaticResponse | RequestHandler;
|
|
83
85
|
|
|
84
86
|
interface RuntimeOptions {
|
|
85
87
|
manifest: Manifest | (() => Promise<Manifest>);
|
package/dist/index.d.ts
CHANGED
|
@@ -78,8 +78,10 @@ interface RuntimeResult {
|
|
|
78
78
|
headers: Record<string, string>;
|
|
79
79
|
body: string | Uint8Array | null;
|
|
80
80
|
}
|
|
81
|
-
type
|
|
82
|
-
type
|
|
81
|
+
type RouteStaticResponse = string | number | boolean | bigint | symbol | null | undefined | object;
|
|
82
|
+
type RouteHandlerResult = RouteStaticResponse | Response;
|
|
83
|
+
type RequestHandler = (context: Context) => RouteHandlerResult | Promise<RouteHandlerResult>;
|
|
84
|
+
type RouteResponse = RouteStaticResponse | RequestHandler;
|
|
83
85
|
|
|
84
86
|
interface RuntimeOptions {
|
|
85
87
|
manifest: Manifest | (() => Promise<Manifest>);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mokup/runtime",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Cross-runtime mock matching and response handling for mokup.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://mokup.icebreaker.top",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@mokup/shared": "1.0.
|
|
30
|
+
"@mokup/shared": "1.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "^5.9.3",
|