Skip to content

Commit a2c068d

Browse files
authored
fix formdata in node environment (#28)
FormData is not available natively in node so for the node runtime the `form-data` npm module is used
1 parent 861cd11 commit a2c068d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "whop-sdk-ts",
3-
"version": "0.0.4-canary.3",
3+
"version": "0.0.4-canary.4",
44
"private": true,
55
"workspaces": [
66
"apps/*",

packages/core/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@
4242
"browser": "./browser/index.mjs",
4343
"optionalDependencies": {
4444
"undici": "5.14.0"
45+
},
46+
"dependencies": {
47+
"form-data": "4.0.0"
4548
}
4649
}

packages/core/request/node/core/request.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { CancelablePromise } from "../../core/CancelablePromise";
88
import type { OnCancel } from "../../core/CancelablePromise";
99
import type { OpenAPIConfig } from "../../core/OpenAPI";
1010
import type { Response as UndiciResponse } from "undici";
11+
import FormData from "form-data";
1112

1213
type FullResponse = Response | UndiciResponse;
1314

pnpm-lock.yaml

+3-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)