Comparing version 1.0.0-alpha.12 to 1.0.0-alpha.13
@@ -135,2 +135,21 @@ import { ArcjetContext, ArcjetBotType, ArcjetEmailType, ArcjetMode, ArcjetStack, ArcjetDecision, ArcjetRule, ArcjetRequestDetails } from "@arcjet/protocol"; | ||
constructor(init?: HeadersInit | Record<string, string | string[] | undefined>); | ||
/** | ||
* Append a key and value to the headers, while filtering any key named | ||
* `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) | ||
* | ||
* @param key The key to append in the headers | ||
* @param value The value to append for the key in the headers | ||
*/ | ||
append(key: string, value: string): void; | ||
/** | ||
* Set a key and value in the headers, but filtering any key named `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) | ||
* | ||
* @param key The key to set in the headers | ||
* @param value The value to set for the key in the headers | ||
*/ | ||
set(key: string, value: string): void; | ||
} | ||
@@ -137,0 +156,0 @@ type PlainObject = { |
29
index.js
@@ -147,3 +147,3 @@ import { ArcjetRuleResult, ArcjetEmailReason, ArcjetBotType, ArcjetErrorReason, ArcjetBotReason, ArcjetErrorDecision, ArcjetReason, ArcjetDenyDecision } from '@arcjet/protocol'; | ||
const sdkStack = ArcjetStackToProtocol(options?.sdkStack ?? "NODEJS"); | ||
const sdkVersion = "1.0.0-alpha.12"; | ||
const sdkVersion = "1.0.0-alpha.13"; | ||
const client = createPromiseClient(DecideService, options.transport); | ||
@@ -308,2 +308,29 @@ return Object.freeze({ | ||
} | ||
/** | ||
* Append a key and value to the headers, while filtering any key named | ||
* `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) | ||
* | ||
* @param key The key to append in the headers | ||
* @param value The value to append for the key in the headers | ||
*/ | ||
append(key, value) { | ||
if (key.toLowerCase() !== "cookie") { | ||
super.append(key, value); | ||
} | ||
} | ||
/** | ||
* Set a key and value in the headers, but filtering any key named `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) | ||
* | ||
* @param key The key to set in the headers | ||
* @param value The value to set for the key in the headers | ||
*/ | ||
set(key, value) { | ||
if (key.toLowerCase() !== "cookie") { | ||
super.set(key, value); | ||
} | ||
} | ||
} | ||
@@ -310,0 +337,0 @@ const Priority = { |
28
index.ts
@@ -589,2 +589,30 @@ import { | ||
} | ||
/** | ||
* Append a key and value to the headers, while filtering any key named | ||
* `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) | ||
* | ||
* @param key The key to append in the headers | ||
* @param value The value to append for the key in the headers | ||
*/ | ||
append(key: string, value: string): void { | ||
if (key.toLowerCase() !== "cookie") { | ||
super.append(key, value); | ||
} | ||
} | ||
/** | ||
* Set a key and value in the headers, but filtering any key named `cookie`. | ||
* | ||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) | ||
* | ||
* @param key The key to set in the headers | ||
* @param value The value to set for the key in the headers | ||
*/ | ||
set(key: string, value: string): void { | ||
if (key.toLowerCase() !== "cookie") { | ||
super.set(key, value); | ||
} | ||
} | ||
} | ||
@@ -591,0 +619,0 @@ |
{ | ||
"name": "arcjet", | ||
"version": "1.0.0-alpha.12", | ||
"version": "1.0.0-alpha.13", | ||
"description": "Arcjet TypeScript and JavaScript SDK core", | ||
@@ -43,14 +43,14 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@arcjet/analyze": "1.0.0-alpha.12", | ||
"@arcjet/duration": "1.0.0-alpha.12", | ||
"@arcjet/logger": "1.0.0-alpha.12", | ||
"@arcjet/protocol": "1.0.0-alpha.12" | ||
"@arcjet/analyze": "1.0.0-alpha.13", | ||
"@arcjet/duration": "1.0.0-alpha.13", | ||
"@arcjet/logger": "1.0.0-alpha.13", | ||
"@arcjet/protocol": "1.0.0-alpha.13" | ||
}, | ||
"devDependencies": { | ||
"@arcjet/eslint-config": "1.0.0-alpha.12", | ||
"@arcjet/rollup-config": "1.0.0-alpha.12", | ||
"@arcjet/tsconfig": "1.0.0-alpha.12", | ||
"@arcjet/eslint-config": "1.0.0-alpha.13", | ||
"@arcjet/rollup-config": "1.0.0-alpha.13", | ||
"@arcjet/tsconfig": "1.0.0-alpha.13", | ||
"@edge-runtime/jest-environment": "2.3.10", | ||
"@jest/globals": "29.7.0", | ||
"@rollup/wasm-node": "4.14.3", | ||
"@rollup/wasm-node": "4.17.2", | ||
"@types/node": "18.18.0", | ||
@@ -57,0 +57,0 @@ "jest": "29.7.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102402
2418
+ Added@arcjet/analyze@1.0.0-alpha.13(transitive)
+ Added@arcjet/logger@1.0.0-alpha.13(transitive)
+ Added@arcjet/protocol@1.0.0-alpha.13(transitive)
+ Added@bufbuild/protobuf@1.9.0(transitive)
- Removed@arcjet/analyze@1.0.0-alpha.12(transitive)
- Removed@arcjet/logger@1.0.0-alpha.12(transitive)
- Removed@arcjet/protocol@1.0.0-alpha.12(transitive)
- Removed@bufbuild/protobuf@1.8.0(transitive)