@arcjet/astro 1.0.0-beta.15 → 1.0.0-beta.16

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/index.d.ts CHANGED
@@ -34,7 +34,7 @@ type IntegrationRule<Characteristics extends readonly string[]> = {
34
34
  * @template Characteristics
35
35
  * Characteristics to track a user by.
36
36
  */
37
- type ArcjetIntegrationOptions<Characteristics extends readonly string[]> = {
37
+ export type ArcjetOptions<Characteristics extends readonly string[]> = {
38
38
  /**
39
39
  * Integration rules to apply when protecting a request (required).
40
40
  *
@@ -326,5 +326,5 @@ export declare function createRemoteClient(options?: RemoteClientOptions | undef
326
326
  * @returns
327
327
  * Astro integration of Arcjet.
328
328
  */
329
- export default function arcjet<Characteristics extends readonly string[]>(options?: ArcjetIntegrationOptions<Characteristics>): AstroIntegration;
329
+ export default function arcjet<Characteristics extends readonly string[]>(options?: ArcjetOptions<Characteristics>): AstroIntegration;
330
330
  export {};
package/index.js CHANGED
@@ -514,6 +514,21 @@ function arcjet(options = { rules: [] }) {
514
514
  access: "public",
515
515
  optional: true,
516
516
  },
517
+ FIREBASE_CONFIG: {
518
+ access: "public",
519
+ context: "server",
520
+ optional: true,
521
+ type: "string",
522
+ },
523
+ // No `MODE`, that is a vite value on `import.meta.env.MODE`,
524
+ // it is inferred in `internal.ts` directly.
525
+ // No `NODE_ENV`.
526
+ RENDER: {
527
+ access: "public",
528
+ context: "server",
529
+ optional: true,
530
+ type: "string",
531
+ },
517
532
  },
518
533
  },
519
534
  vite: {
package/internal.js CHANGED
@@ -6,7 +6,7 @@ import { baseUrl, isDevelopment, logLevel, platform } from '@arcjet/env';
6
6
  import { Logger } from '@arcjet/logger';
7
7
  import { createClient } from '@arcjet/protocol/client.js';
8
8
  import { createTransport } from '@arcjet/transport';
9
- import { VERCEL, FLY_APP_NAME, ARCJET_LOG_LEVEL, ARCJET_KEY, ARCJET_ENV, ARCJET_BASE_URL } from 'astro:env/server';
9
+ import { VERCEL, RENDER, FLY_APP_NAME, FIREBASE_CONFIG, ARCJET_LOG_LEVEL, ARCJET_KEY, ARCJET_ENV, ARCJET_BASE_URL } from 'astro:env/server';
10
10
 
11
11
  // We use a middleware to store the IP address on a `Request` with this symbol.
12
12
  // This is due to Astro inconsistently using `Symbol.for("astro.clientAddress")`
@@ -17,10 +17,12 @@ const env = {
17
17
  ARCJET_ENV,
18
18
  ARCJET_KEY,
19
19
  ARCJET_LOG_LEVEL,
20
+ FIREBASE_CONFIG,
20
21
  FLY_APP_NAME,
21
- VERCEL,
22
22
  // `MODE` is only set on `import.meta.env`.
23
23
  MODE: import.meta.env.MODE,
24
+ RENDER,
25
+ VERCEL,
24
26
  };
25
27
  // TODO: Deduplicate with other packages
26
28
  function errorMessage(err) {
@@ -50,7 +52,7 @@ function createRemoteClient(options) {
50
52
  // Transport is the HTTP client that the client uses to make requests.
51
53
  const transport = createTransport(url);
52
54
  const sdkStack = "ASTRO";
53
- const sdkVersion = "1.0.0-beta.15";
55
+ const sdkVersion = "1.0.0-beta.16";
54
56
  return createClient({
55
57
  transport,
56
58
  baseUrl: url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcjet/astro",
3
- "version": "1.0.0-beta.15",
3
+ "version": "1.0.0-beta.16",
4
4
  "description": "Arcjet helps developers protect their Astro sites in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.",
5
5
  "keywords": [
6
6
  "analyze",
@@ -52,23 +52,23 @@
52
52
  "test": "npm run build && npm run lint && npm run test-coverage"
53
53
  },
54
54
  "dependencies": {
55
- "@arcjet/env": "1.0.0-beta.15",
56
- "@arcjet/headers": "1.0.0-beta.15",
57
- "@arcjet/ip": "1.0.0-beta.15",
58
- "@arcjet/logger": "1.0.0-beta.15",
59
- "@arcjet/protocol": "1.0.0-beta.15",
60
- "@arcjet/transport": "1.0.0-beta.15",
61
- "arcjet": "1.0.0-beta.15"
55
+ "@arcjet/env": "1.0.0-beta.16",
56
+ "@arcjet/headers": "1.0.0-beta.16",
57
+ "@arcjet/ip": "1.0.0-beta.16",
58
+ "@arcjet/logger": "1.0.0-beta.16",
59
+ "@arcjet/protocol": "1.0.0-beta.16",
60
+ "@arcjet/transport": "1.0.0-beta.16",
61
+ "arcjet": "1.0.0-beta.16"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "astro": "^5.9.3"
65
65
  },
66
66
  "devDependencies": {
67
- "@arcjet/eslint-config": "1.0.0-beta.15",
68
- "@arcjet/rollup-config": "1.0.0-beta.15",
69
- "@rollup/wasm-node": "4.52.5",
70
- "astro": "5.15.1",
71
- "eslint": "9.38.0",
67
+ "@arcjet/eslint-config": "1.0.0-beta.16",
68
+ "@arcjet/rollup-config": "1.0.0-beta.16",
69
+ "@rollup/wasm-node": "4.54.0",
70
+ "astro": "5.16.6",
71
+ "eslint": "9.39.2",
72
72
  "typescript": "5.9.3"
73
73
  },
74
74
  "publishConfig": {