@tsed/cli-generate-http-client 7.3.1 → 7.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -86,7 +86,6 @@ export class GenerateHttpClientCmd {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
const promises = files.map((file) => {
|
|
89
|
-
const name = file.fileName;
|
|
90
89
|
file.fileContent = file.fileContent
|
|
91
90
|
.replace("class Api", `class ${$ctx.name}`)
|
|
92
91
|
.replace(".then((response) => response.data)", ".then((response) => response.data as T)")
|
|
@@ -94,8 +93,7 @@ export class GenerateHttpClientCmd {
|
|
|
94
93
|
.replace("requestParams.headers.post = {};", "")
|
|
95
94
|
.replace("requestParams.headers.put = {};", "")
|
|
96
95
|
.replace("(this.instance.defaults.headers || {})", "((this.instance.defaults.headers || {}) as any)");
|
|
97
|
-
|
|
98
|
-
return this.fs.writeFile(`${$ctx.output}/${$ctx.name}.ts`, finalContent, { encoding: "utf8" });
|
|
96
|
+
return this.fs.writeFile(`${$ctx.output}/${$ctx.name}.ts`, file.fileContent, { encoding: "utf8" });
|
|
99
97
|
});
|
|
100
98
|
return Promise.all(promises);
|
|
101
99
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-generate-http-client",
|
|
3
3
|
"description": "Ts.ED CLI plugin. Export a command that generate an HTTP Client (axios or fetch) from your Ts.ED controllers and OS3 spec.",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"tslib": "2.7.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@tsed/cli": "7.3.
|
|
30
|
-
"@tsed/cli-core": "7.3.
|
|
31
|
-
"@tsed/typescript": "7.3.
|
|
29
|
+
"@tsed/cli": "7.3.3",
|
|
30
|
+
"@tsed/cli-core": "7.3.3",
|
|
31
|
+
"@tsed/typescript": "7.3.3",
|
|
32
32
|
"cross-env": "7.0.3",
|
|
33
|
-
"swagger-typescript-api": "
|
|
33
|
+
"swagger-typescript-api": "13.6.5",
|
|
34
34
|
"typescript": "5.6.2",
|
|
35
|
-
"vitest": "
|
|
35
|
+
"vitest": "4.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@tsed/platform-http": ">=7.14.2",
|