@arcjet/node 1.0.0-alpha.27 → 1.0.0-alpha.29

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.
Files changed (3) hide show
  1. package/index.js +5 -2
  2. package/index.ts +7 -1
  3. 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.27";
35
+ const sdkVersion = "1.0.0-alpha.29";
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(request, headers, { platform: platform(process.env) });
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(request, headers, { platform: platform(process.env) });
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.27",
3
+ "version": "1.0.0-alpha.29",
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.27",
44
- "@arcjet/headers": "1.0.0-alpha.27",
45
- "@arcjet/ip": "1.0.0-alpha.27",
46
- "@arcjet/logger": "1.0.0-alpha.27",
47
- "@arcjet/protocol": "1.0.0-alpha.27",
48
- "@arcjet/transport": "1.0.0-alpha.27",
49
- "@arcjet/body": "1.0.0-alpha.27",
50
- "arcjet": "1.0.0-alpha.27"
43
+ "@arcjet/env": "1.0.0-alpha.29",
44
+ "@arcjet/headers": "1.0.0-alpha.29",
45
+ "@arcjet/ip": "1.0.0-alpha.29",
46
+ "@arcjet/logger": "1.0.0-alpha.29",
47
+ "@arcjet/protocol": "1.0.0-alpha.29",
48
+ "@arcjet/transport": "1.0.0-alpha.29",
49
+ "@arcjet/body": "1.0.0-alpha.29",
50
+ "arcjet": "1.0.0-alpha.29"
51
51
  },
52
52
  "devDependencies": {
53
- "@arcjet/eslint-config": "1.0.0-alpha.27",
54
- "@arcjet/rollup-config": "1.0.0-alpha.27",
55
- "@arcjet/tsconfig": "1.0.0-alpha.27",
53
+ "@arcjet/eslint-config": "1.0.0-alpha.29",
54
+ "@arcjet/rollup-config": "1.0.0-alpha.29",
55
+ "@arcjet/tsconfig": "1.0.0-alpha.29",
56
56
  "@jest/globals": "29.7.0",
57
57
  "@types/node": "18.18.0",
58
- "@rollup/wasm-node": "4.23.0",
58
+ "@rollup/wasm-node": "4.27.3",
59
59
  "jest": "29.7.0",
60
- "typescript": "5.6.2"
60
+ "typescript": "5.6.3"
61
61
  },
62
62
  "publishConfig": {
63
63
  "access": "public",