@arcjet/node 1.0.0-alpha.26 → 1.0.0-alpha.28
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/index.js +5 -2
- package/index.ts +7 -1
- package/package.json +14 -14
package/index.js
CHANGED
|
@@ -32,7 +32,7 @@ function createRemoteClient(options) {
|
|
|
32
32
|
// Transport is the HTTP client that the client uses to make requests.
|
|
33
33
|
const transport = createTransport(url);
|
|
34
34
|
const sdkStack = "NODEJS";
|
|
35
|
-
const sdkVersion = "1.0.0-alpha.
|
|
35
|
+
const sdkVersion = "1.0.0-alpha.28";
|
|
36
36
|
return createClient({
|
|
37
37
|
transport,
|
|
38
38
|
baseUrl: url,
|
|
@@ -71,7 +71,10 @@ function arcjet(options) {
|
|
|
71
71
|
const cookies = cookiesToString(request.headers?.cookie);
|
|
72
72
|
// We construct an ArcjetHeaders to normalize over Headers
|
|
73
73
|
const headers = new ArcjetHeaders(request.headers);
|
|
74
|
-
let ip = findIP(
|
|
74
|
+
let ip = findIP({
|
|
75
|
+
socket: request.socket,
|
|
76
|
+
headers,
|
|
77
|
+
}, { platform: platform(process.env) });
|
|
75
78
|
if (ip === "") {
|
|
76
79
|
// If the `ip` is empty but we're in development mode, we default the IP
|
|
77
80
|
// so the request doesn't fail.
|
package/index.ts
CHANGED
|
@@ -205,7 +205,13 @@ export default function arcjet<
|
|
|
205
205
|
// We construct an ArcjetHeaders to normalize over Headers
|
|
206
206
|
const headers = new ArcjetHeaders(request.headers);
|
|
207
207
|
|
|
208
|
-
let ip = findIP(
|
|
208
|
+
let ip = findIP(
|
|
209
|
+
{
|
|
210
|
+
socket: request.socket,
|
|
211
|
+
headers,
|
|
212
|
+
},
|
|
213
|
+
{ platform: platform(process.env) },
|
|
214
|
+
);
|
|
209
215
|
if (ip === "") {
|
|
210
216
|
// If the `ip` is empty but we're in development mode, we default the IP
|
|
211
217
|
// so the request doesn't fail.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcjet/node",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.28",
|
|
4
4
|
"description": "Arcjet SDK for Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://arcjet.com",
|
|
@@ -40,24 +40,24 @@
|
|
|
40
40
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@arcjet/env": "1.0.0-alpha.
|
|
44
|
-
"@arcjet/headers": "1.0.0-alpha.
|
|
45
|
-
"@arcjet/ip": "1.0.0-alpha.
|
|
46
|
-
"@arcjet/logger": "1.0.0-alpha.
|
|
47
|
-
"@arcjet/protocol": "1.0.0-alpha.
|
|
48
|
-
"@arcjet/transport": "1.0.0-alpha.
|
|
49
|
-
"@arcjet/body": "1.0.0-alpha.
|
|
50
|
-
"arcjet": "1.0.0-alpha.
|
|
43
|
+
"@arcjet/env": "1.0.0-alpha.28",
|
|
44
|
+
"@arcjet/headers": "1.0.0-alpha.28",
|
|
45
|
+
"@arcjet/ip": "1.0.0-alpha.28",
|
|
46
|
+
"@arcjet/logger": "1.0.0-alpha.28",
|
|
47
|
+
"@arcjet/protocol": "1.0.0-alpha.28",
|
|
48
|
+
"@arcjet/transport": "1.0.0-alpha.28",
|
|
49
|
+
"@arcjet/body": "1.0.0-alpha.28",
|
|
50
|
+
"arcjet": "1.0.0-alpha.28"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@arcjet/eslint-config": "1.0.0-alpha.
|
|
54
|
-
"@arcjet/rollup-config": "1.0.0-alpha.
|
|
55
|
-
"@arcjet/tsconfig": "1.0.0-alpha.
|
|
53
|
+
"@arcjet/eslint-config": "1.0.0-alpha.28",
|
|
54
|
+
"@arcjet/rollup-config": "1.0.0-alpha.28",
|
|
55
|
+
"@arcjet/tsconfig": "1.0.0-alpha.28",
|
|
56
56
|
"@jest/globals": "29.7.0",
|
|
57
57
|
"@types/node": "18.18.0",
|
|
58
|
-
"@rollup/wasm-node": "4.
|
|
58
|
+
"@rollup/wasm-node": "4.24.0",
|
|
59
59
|
"jest": "29.7.0",
|
|
60
|
-
"typescript": "5.6.
|
|
60
|
+
"typescript": "5.6.3"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public",
|