@fastly/expressly 1.4.0 → 2.0.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/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
yarnPath: .yarn/releases/yarn-classic.cjs
|
|
@@ -5,6 +5,7 @@ declare class ERequestBase extends Request {
|
|
|
5
5
|
private config;
|
|
6
6
|
private readonly event;
|
|
7
7
|
readonly clientInfo: ClientInfo;
|
|
8
|
+
readonly waitUntil: (promise: Promise<any>) => void;
|
|
8
9
|
urlObj: URL;
|
|
9
10
|
query: URLSearchParams;
|
|
10
11
|
params: {
|
|
@@ -14,6 +15,7 @@ declare class ERequestBase extends Request {
|
|
|
14
15
|
constructor(config: EConfig, event: FetchEvent);
|
|
15
16
|
get path(): string;
|
|
16
17
|
get ip(): string;
|
|
18
|
+
get geo(): any;
|
|
17
19
|
get protocol(): string;
|
|
18
20
|
get secure(): boolean;
|
|
19
21
|
get subdomains(): Array<string>;
|
|
@@ -6,6 +6,7 @@ class ERequestBase extends Request {
|
|
|
6
6
|
this.config = config;
|
|
7
7
|
this.event = event;
|
|
8
8
|
this.params = {};
|
|
9
|
+
this.waitUntil = event.waitUntil.bind(event);
|
|
9
10
|
this.clientInfo = this.event.client;
|
|
10
11
|
this.urlObj = new URL(this.url);
|
|
11
12
|
this.query = this.urlObj.searchParams;
|
|
@@ -26,6 +27,9 @@ class ERequestBase extends Request {
|
|
|
26
27
|
get ip() {
|
|
27
28
|
return this.clientInfo.address;
|
|
28
29
|
}
|
|
30
|
+
get geo() {
|
|
31
|
+
return this.clientInfo.geo;
|
|
32
|
+
}
|
|
29
33
|
get protocol() {
|
|
30
34
|
return this.urlObj.protocol;
|
|
31
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastly/expressly",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Express-style router for Fastly's Compute@Edge.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"author": "oss@fastly.com",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^18.
|
|
33
|
-
"auto": "^
|
|
32
|
+
"@types/node": "^18.17.1",
|
|
33
|
+
"auto": "^11.0.1",
|
|
34
34
|
"husky": "^8.0.3",
|
|
35
|
-
"prettier": "^
|
|
35
|
+
"prettier": "^3.0.1",
|
|
36
36
|
"pretty-quick": "^3.1.3",
|
|
37
|
-
"ts-loader": "^9.4.
|
|
38
|
-
"typescript": "^5.
|
|
37
|
+
"ts-loader": "^9.4.4",
|
|
38
|
+
"typescript": "^5.1.6"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@fastly/js-compute": "^
|
|
42
|
-
"core-js": "^3.30.0",
|
|
41
|
+
"@fastly/js-compute": "^3.2.0",
|
|
43
42
|
"cookie": "^0.5.0",
|
|
43
|
+
"core-js": "^3.32.0",
|
|
44
44
|
"path-to-regexp": "^6.2.1"
|
|
45
45
|
},
|
|
46
46
|
"auto": {
|