Skip to content

Commit

Permalink
Merge branch 'main' of github.com:arcjet/arcjet-js into eoin/deprecat…
Browse files Browse the repository at this point in the history
…e-reason-for-allow
  • Loading branch information
e-moran committed Jan 10, 2025
2 parents 312655b + e0d6ec7 commit 0caefa4
Show file tree
Hide file tree
Showing 74 changed files with 1,331 additions and 1,379 deletions.
4 changes: 2 additions & 2 deletions analyze-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@bytecodealliance/jco": "1.5.0",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions analyze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@bytecodealliance/jco": "1.5.0",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
6 changes: 3 additions & 3 deletions arcjet-bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@types/node": "20.12.12",
"@rollup/wasm-node": "4.28.1",
"bun-types": "1.1.38",
"@rollup/wasm-node": "4.30.1",
"bun-types": "1.1.43",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions arcjet-deno/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@types/deno": "2.0.0",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions arcjet-nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@nestjs/common": "^10.4.15",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
6 changes: 3 additions & 3 deletions arcjet-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@types/node": "18.18.0",
"@rollup/wasm-node": "4.28.1",
"next": "15.1.0",
"typescript": "5.7.2"
"@rollup/wasm-node": "4.30.1",
"next": "15.1.4",
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions arcjet-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@types/node": "18.18.0",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions arcjet-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions arcjet-sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@types/node": "18.18.0",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
31 changes: 18 additions & 13 deletions arcjet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -484,36 +484,41 @@ const validateShieldOptions = createValidator({
validations: [{ key: "mode", required: false, validate: validateMode }],
});

type TokenBucketRateLimitOptions<Characteristics extends readonly string[]> = {
export type TokenBucketRateLimitOptions<
Characteristics extends readonly string[],
> = {
mode?: ArcjetMode;
characteristics?: Characteristics;
refillRate: number;
interval: string | number;
capacity: number;
};

type FixedWindowRateLimitOptions<Characteristics extends readonly string[]> = {
export type FixedWindowRateLimitOptions<
Characteristics extends readonly string[],
> = {
mode?: ArcjetMode;
characteristics?: Characteristics;
window: string | number;
max: number;
};

type SlidingWindowRateLimitOptions<Characteristics extends readonly string[]> =
{
mode?: ArcjetMode;
characteristics?: Characteristics;
interval: string | number;
max: number;
};
export type SlidingWindowRateLimitOptions<
Characteristics extends readonly string[],
> = {
mode?: ArcjetMode;
characteristics?: Characteristics;
interval: string | number;
max: number;
};

type BotOptionsAllow = {
export type BotOptionsAllow = {
mode?: ArcjetMode;
allow: Array<ArcjetWellKnownBot | ArcjetBotCategory>;
deny?: never;
};

type BotOptionsDeny = {
export type BotOptionsDeny = {
mode?: ArcjetMode;
allow?: never;
deny: Array<ArcjetWellKnownBot | ArcjetBotCategory>;
Expand Down Expand Up @@ -546,15 +551,15 @@ type ValidEntities<Detect> = Array<
: never
>;

type SensitiveInfoOptionsAllow<Detect> = {
export type SensitiveInfoOptionsAllow<Detect> = {
allow: ValidEntities<Detect>;
deny?: never;
contextWindowSize?: number;
mode?: ArcjetMode;
detect?: Detect;
};

type SensitiveInfoOptionsDeny<Detect> = {
export type SensitiveInfoOptionsDeny<Detect> = {
allow?: never;
deny: ValidEntities<Detect>;
contextWindowSize?: number;
Expand Down
4 changes: 2 additions & 2 deletions arcjet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions body/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions decorate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions duration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"@types/node": "18.18.0",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"@arcjet/eslint-config": "1.0.0-alpha.34",
"@arcjet/rollup-config": "1.0.0-alpha.34",
"@arcjet/tsconfig": "1.0.0-alpha.34",
"@rollup/wasm-node": "4.28.1",
"@rollup/wasm-node": "4.30.1",
"expect": "29.7.0",
"typescript": "5.7.2"
"typescript": "5.7.3"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"lint": "eslint ."
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.18.0",
"@typescript-eslint/parser": "8.18.0",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"eslint-config-prettier": "9.1.0",
"eslint-config-turbo": "2.3.3"
},
Expand Down
Loading

0 comments on commit 0caefa4

Please sign in to comment.