Skip to content

Commit 1db11c8

Browse files
author
williamd5
authored
Merge pull request #76 from cloudnode-pro/remove-node-fetch
Remove node fetch
2 parents 925b69d + 7b05f44 commit 1db11c8

File tree

7 files changed

+13
-137
lines changed

7 files changed

+13
-137
lines changed

browser/Cloudnode.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* A client SDK for the Cloudnode API, written in TypeScript. [Documentation](https://github.com/cloudnode-pro/ts-client#documentation)
43
* @class

gen/templates/main.mustache

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Schema from "../gen/Schema";
2-
import fetch from "node-fetch";
32

43
/**
54
* {{{pkg.description}}}
@@ -365,7 +364,7 @@ namespace {{config.name}} {
365364
readonly body: any;
366365
};
367366

368-
public constructor(response: import("node-fetch").Response, request: {operation: Schema.Operation, pathParams: Record<string, string>, queryParams: Record<string, string>, body: any}) {
367+
public constructor(response: Response, request: {operation: Schema.Operation, pathParams: Record<string, string>, queryParams: Record<string, string>, body: any}) {
369368
this.headers = Object.fromEntries([...response.headers.entries()].map(([k, v]) => [k.toLowerCase(), v]));
370369
this.ok = response.ok;
371370
this.redirected = response.redirected;

package-lock.json

Lines changed: 5 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@
3131
"@types/node": "^18.11.8",
3232
"listr-inquirer": "^0.1.0",
3333
"listr2": "^6.0.4",
34-
"mustache": "^4.2.0",
35-
"node-fetch": "^3.2.10"
34+
"mustache": "^4.2.0"
3635
},
3736
"devDependencies": {
3837
"@types/mustache": "^4.2.1",
3938
"terser": "^5.15.1",
4039
"typescript": "^5.0.2"
40+
},
41+
"engines": {
42+
"node": ">=18.15.0",
43+
"npm": ">=9.6.4"
4144
}
4245
}

src/Cloudnode.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ declare namespace Cloudnode {
804804
readonly queryParams: Record<string, string>;
805805
readonly body: any;
806806
};
807-
constructor(response: import("node-fetch").Response, request: {
807+
constructor(response: Response, request: {
808808
operation: Schema.Operation;
809809
pathParams: Record<string, string>;
810810
queryParams: Record<string, string>;

src/Cloudnode.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import fetch from "node-fetch";
21
/**
32
* A client SDK for the Cloudnode API, written in TypeScript. [Documentation](https://github.com/cloudnode-pro/ts-client#documentation)
43
* @class

src/Cloudnode.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Schema from "../gen/Schema";
2-
import fetch from "node-fetch";
32

43
/**
54
* A client SDK for the Cloudnode API, written in TypeScript. [Documentation](https://github.com/cloudnode-pro/ts-client#documentation)
@@ -1044,7 +1043,7 @@ namespace Cloudnode {
10441043
readonly body: any;
10451044
};
10461045

1047-
public constructor(response: import("node-fetch").Response, request: {operation: Schema.Operation, pathParams: Record<string, string>, queryParams: Record<string, string>, body: any}) {
1046+
public constructor(response: Response, request: {operation: Schema.Operation, pathParams: Record<string, string>, queryParams: Record<string, string>, body: any}) {
10481047
this.headers = Object.fromEntries([...response.headers.entries()].map(([k, v]) => [k.toLowerCase(), v]));
10491048
this.ok = response.ok;
10501049
this.redirected = response.redirected;

0 commit comments

Comments
 (0)