@arcjet/bun 1.1.0-rc → 1.2.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 (3) hide show
  1. package/index.d.ts +2 -2
  2. package/index.js +2 -2
  3. package/package.json +14 -15
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ArcjetDecision, ArcjetOptions as CoreOptions, Primitive, Product, ExtraProps, CharacteristicProps } from "arcjet";
1
+ import type { ArcjetDecision, ArcjetOptions as CoreOptions, ArcjetRule, Primitive, Product, ExtraProps, CharacteristicProps } from "arcjet";
2
2
  import type { Server } from "bun";
3
3
  export * from "arcjet";
4
4
  type Simplify<T> = {
@@ -104,7 +104,7 @@ export interface ArcjetBun<Props extends PlainObject> {
104
104
  * @returns
105
105
  * Arcjet instance augmented with the given rule.
106
106
  */
107
- withRule<ChildProperties extends PlainObject>(rule: Primitive<ChildProperties> | Product<ChildProperties>): ArcjetBun<Props & ChildProperties>;
107
+ withRule<Rule extends ArcjetRule>(rule: Array<Rule>): ArcjetBun<Props & (Rule extends ArcjetRule<infer P> ? P : {})>;
108
108
  /**
109
109
  * Wrap the Bun `fetch` handler to provide additional details when calling
110
110
  * the `protect()` method.
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as core from 'arcjet';
2
2
  import core__default from 'arcjet';
3
3
  export * from 'arcjet';
4
- import findIp, { parseProxy } from '@arcjet/ip';
4
+ import { parseProxy, findIp } from '@arcjet/ip';
5
5
  import { ArcjetHeaders } from '@arcjet/headers';
6
6
  import { env } from 'bun';
7
7
  import { readBodyWeb } from '@arcjet/body';
@@ -26,7 +26,7 @@ function createRemoteClient(options) {
26
26
  // Transport is the HTTP client that the client uses to make requests.
27
27
  const transport = createTransport(url);
28
28
  const sdkStack = "BUN";
29
- const sdkVersion = "1.1.0-rc";
29
+ const sdkVersion = "1.2.0";
30
30
  return createClient({
31
31
  transport,
32
32
  baseUrl: url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/bun",
3
- "version": "1.1.0-rc",
3
+ "version": "1.2.0",
4
4
  "description": "Arcjet SDK for Bun",
5
5
  "keywords": [
6
6
  "analyze",
@@ -44,24 +44,23 @@
44
44
  "test": "npm run build && npm run lint"
45
45
  },
46
46
  "dependencies": {
47
- "@arcjet/body": "1.1.0-rc",
48
- "@arcjet/env": "1.1.0-rc",
49
- "@arcjet/headers": "1.1.0-rc",
50
- "@arcjet/ip": "1.1.0-rc",
51
- "@arcjet/logger": "1.1.0-rc",
52
- "@arcjet/protocol": "1.1.0-rc",
53
- "@arcjet/transport": "1.1.0-rc",
54
- "arcjet": "1.1.0-rc"
47
+ "@arcjet/body": "1.2.0",
48
+ "@arcjet/env": "1.2.0",
49
+ "@arcjet/headers": "1.2.0",
50
+ "@arcjet/ip": "1.2.0",
51
+ "@arcjet/logger": "1.2.0",
52
+ "@arcjet/protocol": "1.2.0",
53
+ "@arcjet/transport": "1.2.0",
54
+ "arcjet": "1.2.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@arcjet/cache": "1.1.0-rc",
58
- "@arcjet/eslint-config": "1.1.0-rc",
59
- "@arcjet/rollup-config": "1.1.0-rc",
60
- "@rollup/wasm-node": "4.57.0",
61
- "bun-types": "1.3.7",
57
+ "@arcjet/eslint-config": "1.2.0",
58
+ "@arcjet/rollup-config": "1.2.0",
59
+ "@rollup/wasm-node": "4.57.1",
60
+ "bun-types": "1.3.8",
62
61
  "eslint": "9.39.2",
63
62
  "typescript": "5.9.3",
64
- "undici-types": "7.19.1"
63
+ "undici-types": "7.19.2"
65
64
  },
66
65
  "publishConfig": {
67
66
  "access": "public",