@asterflow/fs 1.0.3 → 1.0.5
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/cjs/index.cjs +1 -1
- package/dist/mjs/index.js +1 -1
- package/dist/types/index.d.ts +29 -0
- package/package.json +7 -4
package/dist/cjs/index.cjs
CHANGED
package/dist/mjs/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
+
import { Runtime } from '@asterflow/adapter';
|
|
3
4
|
import { Plugin } from '@asterflow/plugin';
|
|
5
|
+
import { Responders } from '@asterflow/response';
|
|
6
|
+
import { AnySchema, MethodHandler, MethodKeys, MethodOptions, Middleware, MiddlewareOutput, RouteHandler, RouterOptions, SchemaDynamic } from '@asterflow/router';
|
|
7
|
+
import { AnyAsterflow } from 'asterflow';
|
|
4
8
|
|
|
9
|
+
declare module "@asterflow/router" {
|
|
10
|
+
type MethodOptionsFS<Responder extends Responders, Path extends string = string, Drive extends Runtime = Runtime, Method extends MethodKeys = MethodKeys, Schema extends AnySchema = AnySchema, Middlewares extends readonly Middleware<Responder, Schema, string, Record<string, unknown>>[] = [
|
|
11
|
+
], Context extends MiddlewareOutput<Middlewares> = MiddlewareOutput<Middlewares>, Instance extends AnyAsterflow = AnyAsterflow, Handler extends MethodHandler<Path, Drive, Responder, Schema, Middlewares, Context, Instance> = MethodHandler<Path, Drive, Responder, Schema, Middlewares, Context, Instance>> = Omit<MethodOptions<Responder, Path, Drive, Method, Schema, Middlewares, Context, Instance, Handler>, "path"> & {
|
|
12
|
+
path?: Path;
|
|
13
|
+
param?: Path;
|
|
14
|
+
};
|
|
15
|
+
type RouterOptionsFS<Path extends string, Schema extends SchemaDynamic<MethodKeys>, Responder extends Responders, Middlewares extends readonly Middleware<Responder, AnySchema, string, Record<string, unknown>>[], Context extends MiddlewareOutput<Middlewares>, Routers extends {
|
|
16
|
+
[Method in MethodKeys]?: RouteHandler<Path, Responder, Method, Schema, Middlewares, Context>;
|
|
17
|
+
}> = Omit<RouterOptions<Path, Schema, Responder, Middlewares, Context, Routers>, "path"> & {
|
|
18
|
+
path?: Path;
|
|
19
|
+
param?: Path;
|
|
20
|
+
};
|
|
21
|
+
export class Method<Responder extends Responders, const Path extends string = string, const Drive extends Runtime = Runtime, const Method extends MethodKeys = MethodKeys, const Schema extends AnySchema = AnySchema, const Middlewares extends readonly Middleware<Responder, Schema, string, Record<string, unknown>>[] = [
|
|
22
|
+
], const Context extends MiddlewareOutput<Middlewares> = MiddlewareOutput<Middlewares>, const Instance extends AnyAsterflow = AnyAsterflow, const Handler extends MethodHandler<Path, Drive, Responder, Schema, Middlewares, Context, Instance> = MethodHandler<Path, Drive, Responder, Schema, Middlewares, Context, Instance>> extends OriginalMethod<Responder, Path, Drive, Method, Schema, Middlewares, Context, Instance, Handler> {
|
|
23
|
+
constructor(options: MethodOptionsFS<Responder, Path, Drive, Method, Schema, Middlewares, Context, Instance, Handler>);
|
|
24
|
+
}
|
|
25
|
+
export class Router<Responder extends Responders, const Path extends string = string, const Schema extends SchemaDynamic<MethodKeys> = SchemaDynamic<MethodKeys>, const Middlewares extends readonly Middleware<Responder, AnySchema, string, Record<string, unknown>>[] = [
|
|
26
|
+
], const Context extends MiddlewareOutput<Middlewares> = MiddlewareOutput<Middlewares>, const Routers extends {
|
|
27
|
+
[Method in MethodKeys]?: RouteHandler<Path, Responder, Method, Schema, Middlewares, Context>;
|
|
28
|
+
} = {
|
|
29
|
+
[Method in MethodKeys]?: RouteHandler<Path, Responder, Method, Schema, Middlewares, Context>;
|
|
30
|
+
}> extends OriginalRouter<Responder, Path, Schema, Middlewares, Context, Routers> {
|
|
31
|
+
constructor(options: RouterOptionsFS<Path, Schema, Responder, Middlewares, Context, Routers>);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
5
34
|
export declare const fsRoutingPlugin: Plugin<"fs-routing", import("asterflow").AnyAsterflow, {
|
|
6
35
|
path: string;
|
|
7
36
|
defaultConfig: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asterflow/fs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"main": "dist/cjs/index.cjs",
|
|
5
5
|
"module": "dist/mjs/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -27,8 +27,11 @@
|
|
|
27
27
|
"node": ">=20"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@asterflow/plugin": "^1.0.
|
|
31
|
-
"@asterflow/router": "^1.0.
|
|
32
|
-
"@asterflow/url-parser": "^2.0.
|
|
30
|
+
"@asterflow/plugin": "^1.0.6",
|
|
31
|
+
"@asterflow/router": "^1.0.10",
|
|
32
|
+
"@asterflow/url-parser": "^2.0.3"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"asterflow": "^0.0.2"
|
|
33
36
|
}
|
|
34
37
|
}
|