Skip to content

Commit 7a0eeb3

Browse files
committed
v8.0.0-beta.3
1 parent aaa0572 commit 7a0eeb3

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "8.0.0-beta.2",
2+
"version": "8.0.0-beta.3",
33
"name": "@workos-inc/node",
44
"author": "WorkOS",
55
"description": "A Node wrapper for the WorkOS API",
@@ -77,7 +77,7 @@
7777
"ts-jest": "29.3.1",
7878
"tsup": "^8.5.0",
7979
"tsx": "^4.19.0",
80-
"typescript": "5.8.2",
80+
"typescript": "5.9.2",
8181
"typescript-eslint": "^8.25.0"
8282
},
8383
"exports": {

src/common/crypto/subtle-crypto-provider.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,25 +94,25 @@ export class SubtleCryptoProvider extends CryptoProvider {
9494

9595
const cryptoKey = await this.subtleCrypto.importKey(
9696
'raw',
97-
key,
97+
key as BufferSource,
9898
{ name: 'AES-GCM' },
9999
false,
100100
['encrypt'],
101101
);
102102

103103
const encryptParams: AesGcmParams = {
104104
name: 'AES-GCM',
105-
iv: actualIv,
105+
iv: actualIv as BufferSource,
106106
};
107107

108108
if (aad) {
109-
encryptParams.additionalData = aad;
109+
encryptParams.additionalData = aad as BufferSource;
110110
}
111111

112112
const encryptedData = await this.subtleCrypto.encrypt(
113113
encryptParams,
114114
cryptoKey,
115-
plaintext,
115+
plaintext as BufferSource,
116116
);
117117

118118
const encryptedBytes = new Uint8Array(encryptedData);
@@ -144,19 +144,19 @@ export class SubtleCryptoProvider extends CryptoProvider {
144144

145145
const cryptoKey = await this.subtleCrypto.importKey(
146146
'raw',
147-
key,
147+
key as BufferSource,
148148
{ name: 'AES-GCM' },
149149
false,
150150
['decrypt'],
151151
);
152152

153153
const decryptParams: AesGcmParams = {
154154
name: 'AES-GCM',
155-
iv,
155+
iv: iv as BufferSource,
156156
};
157157

158158
if (aad) {
159-
decryptParams.additionalData = aad;
159+
decryptParams.additionalData = aad as BufferSource;
160160
}
161161

162162
const decryptedData = await this.subtleCrypto.decrypt(

src/sso/__snapshots__/sso.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports[`SSO SSO getProfileAndToken with all information provided sends a reques
2121
"Accept": "application/json, text/plain, */*",
2222
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
2323
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
24-
"User-Agent": "workos-node/8.0.0-beta.2/fetch",
24+
"User-Agent": "workos-node/8.0.0-beta.3/fetch",
2525
}
2626
`;
2727

@@ -65,7 +65,7 @@ exports[`SSO SSO getProfileAndToken without a groups attribute sends a request t
6565
"Accept": "application/json, text/plain, */*",
6666
"Authorization": "Bearer sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU",
6767
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
68-
"User-Agent": "workos-node/8.0.0-beta.2/fetch",
68+
"User-Agent": "workos-node/8.0.0-beta.3/fetch",
6969
}
7070
`;
7171

src/workos.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { CryptoProvider } from './common/crypto/crypto-provider';
4040
import { ParseError } from './common/exceptions/parse-error';
4141
import { getEnv } from './common/utils/env';
4242

43-
const VERSION = '8.0.0-beta.2';
43+
const VERSION = '8.0.0-beta.3';
4444

4545
const DEFAULT_HOSTNAME = 'api.workos.com';
4646

@@ -69,7 +69,10 @@ export class WorkOS {
6969
readonly widgets = new Widgets(this);
7070
readonly vault = new Vault(this);
7171

72-
constructor(readonly key?: string, readonly options: WorkOSOptions = {}) {
72+
constructor(
73+
readonly key?: string,
74+
readonly options: WorkOSOptions = {},
75+
) {
7376
if (!key) {
7477
this.key = getEnv('WORKOS_API_KEY');
7578

0 commit comments

Comments
 (0)