@tsed/cli-generate-http-client 6.2.1 → 6.4.0

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.
@@ -39,7 +39,15 @@ let GenerateHttpClientCmd = class GenerateHttpClientCmd {
39
39
  }
40
40
  }
41
41
  catch (er) { }
42
- throw new Error("Unsupported platform. Please use Express.js or Koa.js platform.");
42
+ try {
43
+ // @ts-ignore
44
+ const platform = await import("@tsed/platform-fastify");
45
+ if (platform) {
46
+ return platform.PlatformFastify;
47
+ }
48
+ }
49
+ catch (er) { }
50
+ throw new Error("Unsupported platform. Please use Express.js, Koa.js or Fastify.js platform.");
43
51
  }
44
52
  async generate($ctx) {
45
53
  const Platform = await this.loadPlatformModule();
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": "6.2.1",
4
+ "version": "6.4.0",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -9,6 +9,7 @@
9
9
  "typings": "./lib/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
+ "cli-tsed-source": "./src/index.ts",
12
13
  "types": "./lib/types/index.d.ts",
13
14
  "import": "./lib/esm/index.js",
14
15
  "default": "./lib/esm/index.js"
@@ -16,7 +17,7 @@
16
17
  },
17
18
  "scripts": {
18
19
  "build": "yarn build:ts",
19
- "build:ts": "tsc --build tsconfig.json",
20
+ "build:ts": "tsc --build tsconfig.esm.json",
20
21
  "/test": "vitest run",
21
22
  "/test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
22
23
  },
@@ -25,13 +26,13 @@
25
26
  "tslib": "2.7.0"
26
27
  },
27
28
  "devDependencies": {
28
- "@tsed/cli": "6.2.1",
29
- "@tsed/cli-core": "6.2.1",
30
- "@tsed/typescript": "6.2.1",
29
+ "@tsed/cli": "6.4.0",
30
+ "@tsed/cli-core": "6.4.0",
31
+ "@tsed/typescript": "6.4.0",
31
32
  "cross-env": "7.0.3",
32
33
  "swagger-typescript-api": "^13.0.22",
33
34
  "typescript": "5.6.2",
34
- "vitest": "2.1.1"
35
+ "vitest": "3.0.9"
35
36
  },
36
37
  "peerDependencies": {
37
38
  "@tsed/platform-http": ">=7.14.2",