@arcjet/analyze 1.0.0 → 1.1.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.
Files changed (2) hide show
  1. package/index.d.ts +44 -11
  2. package/package.json +7 -8
package/index.d.ts CHANGED
@@ -4,17 +4,50 @@ interface AnalyzeContext {
4
4
  log: ArcjetLogger;
5
5
  characteristics: string[];
6
6
  }
7
- type AnalyzeRequest = {
8
- ip?: string;
9
- method?: string;
10
- protocol?: string;
11
- host?: string;
12
- path?: string;
13
- headers?: Record<string, string>;
14
- cookies?: string;
15
- query?: string;
16
- extra?: Record<string, string>;
17
- };
7
+ /**
8
+ * Request passed as a JSON string into WebAssembly.
9
+ *
10
+ * This is like `ArcjetRequestDetails` from `@arcjet/protocol`,
11
+ * but fields are often optional across the boundary.
12
+ */
13
+ export interface AnalyzeRequest {
14
+ /**
15
+ * IP address (IPv4 or IPv6).
16
+ */
17
+ ip?: string | undefined;
18
+ /**
19
+ * HTTP method (such as `GET`).
20
+ */
21
+ method?: string | undefined;
22
+ /**
23
+ * Protocol (such as `"http:"`).
24
+ */
25
+ protocol?: string | undefined;
26
+ /**
27
+ * Hostname (such as `"example.com"`).
28
+ */
29
+ host?: string | undefined;
30
+ /**
31
+ * Path (such as `"/path/to/resource"`).
32
+ */
33
+ path?: string | undefined;
34
+ /**
35
+ * Headers of the request.
36
+ */
37
+ headers?: Record<string, string> | undefined;
38
+ /**
39
+ * Cookies of the request (such as `"cookie1=value1; cookie2=value2"`).
40
+ */
41
+ cookies?: string | undefined;
42
+ /**
43
+ * Query string of the request (such as `"?q=alpha"`).
44
+ */
45
+ query?: string | undefined;
46
+ /**
47
+ * Extra info.
48
+ */
49
+ extra?: Record<string, string> | undefined;
50
+ }
18
51
  export { type EmailValidationConfig, type BotConfig, type FilterResult, type SensitiveInfoEntity, type DetectedSensitiveInfoEntity, };
19
52
  /**
20
53
  * Generate a fingerprint.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/analyze",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Arcjet local analysis engine",
5
5
  "keywords": [
6
6
  "analyze",
@@ -39,21 +39,20 @@
39
39
  "scripts": {
40
40
  "build": "rollup --config rollup.config.js",
41
41
  "lint": "eslint .",
42
- "prepublishOnly": "npm run build",
43
42
  "test-api": "node --test -- test/*.test.js",
44
43
  "test-coverage": "node --experimental-test-coverage --test -- test/*.test.js",
45
44
  "test": "npm run build && npm run lint && npm run test-coverage"
46
45
  },
47
46
  "dependencies": {
48
- "@arcjet/analyze-wasm": "1.0.0",
49
- "@arcjet/protocol": "1.0.0"
47
+ "@arcjet/analyze-wasm": "1.1.0",
48
+ "@arcjet/protocol": "1.1.0"
50
49
  },
51
50
  "devDependencies": {
52
- "@arcjet/eslint-config": "1.0.0",
53
- "@arcjet/rollup-config": "1.0.0",
51
+ "@arcjet/eslint-config": "1.1.0",
52
+ "@arcjet/rollup-config": "1.1.0",
54
53
  "@bytecodealliance/jco": "1.5.0",
55
- "@rollup/wasm-node": "4.55.1",
56
- "@types/node": "25.0.8",
54
+ "@rollup/wasm-node": "4.57.0",
55
+ "@types/node": "25.1.0",
57
56
  "eslint": "9.39.2",
58
57
  "typescript": "5.9.3"
59
58
  },