@arcjet/bun 1.14.1 → 1.15.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/README.md +13 -4
- package/dist/index.js +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -326,13 +326,21 @@ if (decision.isDenied() && decision.reason.isRateLimit()) {
|
|
|
326
326
|
|
|
327
327
|
## Sensitive information detection
|
|
328
328
|
|
|
329
|
-
Detect and block PII in request content
|
|
330
|
-
`
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
Detect and block PII in request content on-device with
|
|
330
|
+
[`@arcjet/sensitive-info-rampart`](https://www.npmjs.com/package/@arcjet/sensitive-info-rampart),
|
|
331
|
+
which runs the Rampart named-entity-recognition model locally, so no data
|
|
332
|
+
leaves your environment. Pass the content to scan via `sensitiveInfoValue` on
|
|
333
|
+
each `protect()` call. Rampart detects names, addresses, government and
|
|
334
|
+
financial identifiers, email addresses, phone numbers, IP addresses, and card
|
|
335
|
+
numbers. Add a recognizer to detect custom patterns.
|
|
336
|
+
|
|
337
|
+
```sh
|
|
338
|
+
bun add @arcjet/sensitive-info-rampart
|
|
339
|
+
```
|
|
333
340
|
|
|
334
341
|
```ts
|
|
335
342
|
import arcjet, { sensitiveInfo } from "@arcjet/bun";
|
|
343
|
+
import { rampart } from "@arcjet/sensitive-info-rampart";
|
|
336
344
|
import { env } from "bun";
|
|
337
345
|
|
|
338
346
|
const aj = arcjet({
|
|
@@ -341,6 +349,7 @@ const aj = arcjet({
|
|
|
341
349
|
sensitiveInfo({
|
|
342
350
|
mode: "LIVE", // Blocks requests. Use "DRY_RUN" to log only
|
|
343
351
|
deny: ["CREDIT_CARD_NUMBER", "EMAIL", "PHONE_NUMBER"],
|
|
352
|
+
backend: rampart(),
|
|
344
353
|
}),
|
|
345
354
|
],
|
|
346
355
|
});
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { env } from "bun";
|
|
|
10
10
|
export * from "arcjet";
|
|
11
11
|
//#region src/index.ts
|
|
12
12
|
/** SDK version. Updated by the release process. */
|
|
13
|
-
const VERSION = "1.
|
|
13
|
+
const VERSION = "1.15.0";
|
|
14
14
|
let warnedForAutomaticBodyRead = false;
|
|
15
15
|
/**
|
|
16
16
|
* Create a remote client.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcjet/bun",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Arcjet runtime security SDK for Bun — bot protection, rate limiting, prompt injection detection, PII blocking, and WAF",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -59,20 +59,20 @@
|
|
|
59
59
|
"test": "npm run build"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@arcjet/body": "1.
|
|
63
|
-
"@arcjet/env": "1.
|
|
64
|
-
"@arcjet/headers": "1.
|
|
65
|
-
"@arcjet/ip": "1.
|
|
66
|
-
"@arcjet/logger": "1.
|
|
67
|
-
"@arcjet/protocol": "1.
|
|
68
|
-
"@arcjet/transport": "1.
|
|
69
|
-
"arcjet": "1.
|
|
62
|
+
"@arcjet/body": "1.15.0",
|
|
63
|
+
"@arcjet/env": "1.15.0",
|
|
64
|
+
"@arcjet/headers": "1.15.0",
|
|
65
|
+
"@arcjet/ip": "1.15.0",
|
|
66
|
+
"@arcjet/logger": "1.15.0",
|
|
67
|
+
"@arcjet/protocol": "1.15.0",
|
|
68
|
+
"@arcjet/transport": "1.15.0",
|
|
69
|
+
"arcjet": "1.15.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"bun-types": "1.4.
|
|
73
|
-
"tsdown": "0.23.
|
|
72
|
+
"bun-types": "1.4.3",
|
|
73
|
+
"tsdown": "0.23.1",
|
|
74
74
|
"typescript": "7.0.2",
|
|
75
|
-
"undici-types": "7.
|
|
75
|
+
"undici-types": "7.30.1"
|
|
76
76
|
},
|
|
77
77
|
"engines": {}
|
|
78
78
|
}
|