@arcjet/bun 1.12.0 → 1.14.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/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ type MaybeProperties<T> = { [P in keyof T]?: T[P]; } extends T ? [properties?: T
15
15
  /**
16
16
  * Configuration for {@linkcode createRemoteClient}.
17
17
  */
18
- type RemoteClientOptions = {
18
+ export type RemoteClientOptions = {
19
19
  /**
20
20
  * Base URI for HTTP requests to Decide API (optional).
21
21
  *
@@ -38,7 +38,7 @@ type RemoteClientOptions = {
38
38
  * @returns
39
39
  * Client.
40
40
  */
41
- declare function createRemoteClient(options?: RemoteClientOptions): ReturnType<typeof createClient>;
41
+ export declare function createRemoteClient(options?: RemoteClientOptions): ReturnType<typeof createClient>;
42
42
  /**
43
43
  * Configuration for the Bun integration of Arcjet.
44
44
  *
@@ -47,7 +47,7 @@ declare function createRemoteClient(options?: RemoteClientOptions): ReturnType<t
47
47
  * @template Characteristics
48
48
  * Characteristics to track a user by.
49
49
  */
50
- type ArcjetOptions<Rules extends [...Array<Primitive | Product>], Characteristics extends readonly string[]> = Simplify<ArcjetOptions$1<Rules, Characteristics> & {
50
+ export type ArcjetOptions<Rules extends [...Array<Primitive | Product>], Characteristics extends readonly string[]> = Simplify<ArcjetOptions$1<Rules, Characteristics> & {
51
51
  /**
52
52
  * IP addresses and CIDR ranges of trusted load balancers and proxies
53
53
  * (optional, example: `["100.100.100.100", "100.100.100.0/24"]`).
@@ -67,7 +67,7 @@ type ArcjetOptions<Rules extends [...Array<Primitive | Product>], Characteristic
67
67
  * @template Props
68
68
  * Configuration.
69
69
  */
70
- interface ArcjetBun<Props extends PlainObject> {
70
+ export interface ArcjetBun<Props extends PlainObject> {
71
71
  /**
72
72
  * Make a decision about how to handle a request.
73
73
  *
@@ -129,6 +129,6 @@ interface ArcjetBun<Props extends PlainObject> {
129
129
  * @returns
130
130
  * Bun integration of Arcjet.
131
131
  */
132
- declare function arcjet<const Rules extends (Primitive | Product)[], const Characteristics extends readonly string[]>(options: ArcjetOptions<Rules, Characteristics>): ArcjetBun<ExtraProps<Rules> & CharacteristicProps<Characteristics>>;
132
+ export default function arcjet<const Rules extends (Primitive | Product)[], const Characteristics extends readonly string[]>(options: ArcjetOptions<Rules, Characteristics>): ArcjetBun<ExtraProps<Rules> & CharacteristicProps<Characteristics>>;
133
133
  //#endregion
134
- export { ArcjetBun, ArcjetOptions, type ProxyService, RemoteClientOptions, cloudflare, createRemoteClient, arcjet as default };
134
+ export { type ProxyService, cloudflare };
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.12.0";
13
+ const VERSION = "1.14.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.12.0",
3
+ "version": "1.14.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.12.0",
63
- "@arcjet/env": "1.12.0",
64
- "@arcjet/headers": "1.12.0",
65
- "@arcjet/ip": "1.12.0",
66
- "@arcjet/logger": "1.12.0",
67
- "@arcjet/protocol": "1.12.0",
68
- "@arcjet/transport": "1.12.0",
69
- "arcjet": "1.12.0"
62
+ "@arcjet/body": "1.14.0",
63
+ "@arcjet/env": "1.14.0",
64
+ "@arcjet/headers": "1.14.0",
65
+ "@arcjet/ip": "1.14.0",
66
+ "@arcjet/logger": "1.14.0",
67
+ "@arcjet/protocol": "1.14.0",
68
+ "@arcjet/transport": "1.14.0",
69
+ "arcjet": "1.14.0"
70
70
  },
71
71
  "devDependencies": {
72
- "bun-types": "1.3.14",
73
- "tsdown": "0.22.14",
72
+ "bun-types": "1.4.2",
73
+ "tsdown": "0.23.0",
74
74
  "typescript": "7.0.2",
75
- "undici-types": "7.29.0"
75
+ "undici-types": "7.29.1"
76
76
  },
77
77
  "engines": {}
78
78
  }