@cfworker/web 1.12.1 → 1.12.4
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/req.d.ts +1 -1
- package/dist/req.js +1 -1
- package/dist/router.d.ts +2 -2
- package/package.json +15 -15
- package/src/req.ts +1 -1
- package/src/router.ts +1 -1
package/dist/req.d.ts
CHANGED
package/dist/req.js
CHANGED
package/dist/router.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const Options: ({ req }: Context) => boolean;
|
|
|
13
13
|
export declare const Header: (header: string, value: string) => ({ req }: Context) => boolean;
|
|
14
14
|
export declare const Host: (host: string) => ({ req }: Context) => boolean;
|
|
15
15
|
export declare const Referer: (host: string) => ({ req }: Context) => boolean;
|
|
16
|
-
export declare const Path: (pattern: string, options?: PathToRegExpOptions
|
|
16
|
+
export declare const Path: (pattern: string, options?: PathToRegExpOptions) => ({ req: { url, params } }: Context) => boolean;
|
|
17
17
|
export declare type RouteCondition = (context: Context) => boolean;
|
|
18
18
|
export interface Route {
|
|
19
19
|
conditions: RouteCondition[];
|
|
@@ -36,5 +36,5 @@ export declare class Router {
|
|
|
36
36
|
all(pathname: string, ...middleware: Middleware[]): this;
|
|
37
37
|
middleware: Middleware;
|
|
38
38
|
compose(conditions: RouteCondition[], ...middleware: Middleware[]): this;
|
|
39
|
-
|
|
39
|
+
resolve(ctx: Context): Route | undefined;
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfworker/web",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "Web framework for Cloudflare Workers and service workers, inspired by Koa and fastify",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"middleware",
|
|
@@ -34,26 +34,26 @@
|
|
|
34
34
|
"test": "cfworker test test/**/*.spec.ts --nocheck"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@cfworker/json-schema": "^1.12.
|
|
38
|
-
"@cfworker/worker-types": "^1.12.
|
|
37
|
+
"@cfworker/json-schema": "^1.12.4",
|
|
38
|
+
"@cfworker/worker-types": "^1.12.2",
|
|
39
39
|
"@cloudflare/workers-types": "^2.2.2",
|
|
40
|
-
"@types/cookie": "^0.
|
|
40
|
+
"@types/cookie": "^0.5.1",
|
|
41
41
|
"@types/html-escaper": "^3.0.0",
|
|
42
42
|
"@types/statuses": "^2.0.0",
|
|
43
|
-
"cookie": "^0.
|
|
43
|
+
"cookie": "^0.5.0",
|
|
44
44
|
"html-escaper": "^3.0.3",
|
|
45
|
-
"negotiator": "^0.6.
|
|
46
|
-
"path-to-regexp": "^6.2.
|
|
47
|
-
"secure-json-parse": "^2.
|
|
45
|
+
"negotiator": "^0.6.3",
|
|
46
|
+
"path-to-regexp": "^6.2.1",
|
|
47
|
+
"secure-json-parse": "^2.5.0",
|
|
48
48
|
"statuses": "^2.0.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@cfworker/dev": "^1.
|
|
52
|
-
"@types/chai": "^4.3.
|
|
53
|
-
"@types/mocha": "^9.1.
|
|
54
|
-
"chai": "^4.3.
|
|
55
|
-
"jsonpointer": "^5.0.
|
|
56
|
-
"mocha": "^
|
|
57
|
-
"typescript": "^4.
|
|
51
|
+
"@cfworker/dev": "^1.14.1",
|
|
52
|
+
"@types/chai": "^4.3.3",
|
|
53
|
+
"@types/mocha": "^9.1.1",
|
|
54
|
+
"chai": "^4.3.6",
|
|
55
|
+
"jsonpointer": "^5.0.1",
|
|
56
|
+
"mocha": "^10.0.0",
|
|
57
|
+
"typescript": "^4.7.4"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/req.ts
CHANGED
package/src/router.ts
CHANGED