@arcjet/bun 1.0.0-alpha.20 → 1.0.0-alpha.21

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 +3 -6
  2. package/index.ts +2 -5
  3. package/package.json +13 -13
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import { createConnectTransport } from '@connectrpc/connect-node';
2
1
  import core__default from 'arcjet';
3
2
  export * from 'arcjet';
4
3
  import findIP from '@arcjet/ip';
@@ -7,6 +6,7 @@ import { env } from 'bun';
7
6
  import { logLevel, baseUrl, isDevelopment, platform } from '@arcjet/env';
8
7
  import { Logger } from '@arcjet/logger';
9
8
  import { createClient } from '@arcjet/protocol/client.js';
9
+ import { createTransport } from '@arcjet/transport';
10
10
 
11
11
  /// <reference types="bun-types/bun.d.ts" />
12
12
  function createRemoteClient(options) {
@@ -17,12 +17,9 @@ function createRemoteClient(options) {
17
17
  // in production so calls fail open.
18
18
  const timeout = options?.timeout ?? (isDevelopment(env) ? 1000 : 500);
19
19
  // Transport is the HTTP client that the client uses to make requests.
20
- const transport = createConnectTransport({
21
- baseUrl: url,
22
- httpVersion: "1.1",
23
- });
20
+ const transport = createTransport(url);
24
21
  const sdkStack = "BUN";
25
- const sdkVersion = "1.0.0-alpha.20";
22
+ const sdkVersion = "1.0.0-alpha.21";
26
23
  return createClient({
27
24
  transport,
28
25
  baseUrl: url,
package/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  /// <reference types="bun-types/bun.d.ts" />
2
- import { createConnectTransport } from "@connectrpc/connect-node";
3
2
  import core from "arcjet";
4
3
  import type {
5
4
  ArcjetDecision,
@@ -18,6 +17,7 @@ import { env } from "bun";
18
17
  import { baseUrl, isDevelopment, logLevel, platform } from "@arcjet/env";
19
18
  import { Logger } from "@arcjet/logger";
20
19
  import { createClient } from "@arcjet/protocol/client.js";
20
+ import { createTransport } from "@arcjet/transport";
21
21
 
22
22
  // Re-export all named exports from the generic SDK
23
23
  export * from "arcjet";
@@ -74,10 +74,7 @@ export function createRemoteClient(options?: RemoteClientOptions) {
74
74
  const timeout = options?.timeout ?? (isDevelopment(env) ? 1000 : 500);
75
75
 
76
76
  // Transport is the HTTP client that the client uses to make requests.
77
- const transport = createConnectTransport({
78
- baseUrl: url,
79
- httpVersion: "1.1",
80
- });
77
+ const transport = createTransport(url);
81
78
 
82
79
  const sdkStack = "BUN";
83
80
  const sdkVersion = "__ARCJET_SDK_VERSION__";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/bun",
3
- "version": "1.0.0-alpha.20",
3
+ "version": "1.0.0-alpha.21",
4
4
  "description": "Arcjet SDK for Bun.sh",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://arcjet.com",
@@ -38,22 +38,22 @@
38
38
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --passWithNoTests"
39
39
  },
40
40
  "dependencies": {
41
- "@arcjet/env": "1.0.0-alpha.20",
42
- "@arcjet/headers": "1.0.0-alpha.20",
43
- "@arcjet/ip": "1.0.0-alpha.20",
44
- "@arcjet/logger": "1.0.0-alpha.20",
45
- "@arcjet/protocol": "1.0.0-alpha.20",
46
- "@connectrpc/connect-node": "1.4.0",
47
- "arcjet": "1.0.0-alpha.20"
41
+ "@arcjet/env": "1.0.0-alpha.21",
42
+ "@arcjet/headers": "1.0.0-alpha.21",
43
+ "@arcjet/ip": "1.0.0-alpha.21",
44
+ "@arcjet/logger": "1.0.0-alpha.21",
45
+ "@arcjet/protocol": "1.0.0-alpha.21",
46
+ "@arcjet/transport": "1.0.0-alpha.21",
47
+ "arcjet": "1.0.0-alpha.21"
48
48
  },
49
49
  "devDependencies": {
50
- "@arcjet/eslint-config": "1.0.0-alpha.20",
51
- "@arcjet/rollup-config": "1.0.0-alpha.20",
52
- "@arcjet/tsconfig": "1.0.0-alpha.20",
50
+ "@arcjet/eslint-config": "1.0.0-alpha.21",
51
+ "@arcjet/rollup-config": "1.0.0-alpha.21",
52
+ "@arcjet/tsconfig": "1.0.0-alpha.21",
53
53
  "@jest/globals": "29.7.0",
54
54
  "@types/node": "20.12.12",
55
- "@rollup/wasm-node": "4.19.0",
56
- "bun-types": "1.1.20",
55
+ "@rollup/wasm-node": "4.20.0",
56
+ "bun-types": "1.1.21",
57
57
  "jest": "29.7.0",
58
58
  "typescript": "5.5.4"
59
59
  },