@tsed/cli-generate-http-client 6.6.3 → 7.0.0-alpha.2

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.
@@ -1,11 +1,10 @@
1
- import { __decorate } from "tslib";
2
- import path, { join, resolve } from "node:path";
3
- import { CliFs, Command, constant, inject, Type } from "@tsed/cli-core";
1
+ import { join, resolve } from "node:path";
2
+ import { CliFs, command, constant, inject, Type } from "@tsed/cli-core";
4
3
  import { isString } from "@tsed/core";
5
4
  import { InjectorService } from "@tsed/di";
6
5
  import { camelCase } from "change-case";
7
6
  import { generateApi } from "swagger-typescript-api";
8
- let GenerateHttpClientCmd = class GenerateHttpClientCmd {
7
+ export class GenerateHttpClientCmd {
9
8
  constructor() {
10
9
  this.fs = inject(CliFs);
11
10
  this.serverModule = constant("server");
@@ -120,36 +119,33 @@ let GenerateHttpClientCmd = class GenerateHttpClientCmd {
120
119
  raw.operationId = name;
121
120
  return routeNameInfo;
122
121
  }
123
- };
124
- GenerateHttpClientCmd = __decorate([
125
- Command({
126
- name: "generate-http-client",
127
- description: "Generate the client API from swagger spec",
128
- options: {
129
- "-s, --suffix <suffix>": {
130
- required: false,
131
- type: String,
132
- defaultValue: "Model",
133
- description: "The suffix applied on model"
134
- },
135
- "-t, --type <type>": {
136
- required: false,
137
- type: String,
138
- defaultValue: "axios",
139
- description: "The client type by the Http client (axios or fetch)"
140
- },
141
- "-n, --name <name>": {
142
- required: false,
143
- type: String,
144
- defaultValue: "ApiClient",
145
- description: "The class name of the generated client"
146
- },
147
- "-o, --output <output>": {
148
- required: true,
149
- type: String,
150
- description: "Path to generate files"
151
- }
122
+ }
123
+ command(GenerateHttpClientCmd, {
124
+ name: "generate-http-client",
125
+ description: "Generate the client API from swagger spec",
126
+ options: {
127
+ "-s, --suffix <suffix>": {
128
+ required: false,
129
+ type: String,
130
+ defaultValue: "Model",
131
+ description: "The suffix applied on model"
132
+ },
133
+ "-t, --type <type>": {
134
+ required: false,
135
+ type: String,
136
+ defaultValue: "axios",
137
+ description: "The client type by the Http client (axios or fetch)"
138
+ },
139
+ "-n, --name <name>": {
140
+ required: false,
141
+ type: String,
142
+ defaultValue: "ApiClient",
143
+ description: "The class name of the generated client"
144
+ },
145
+ "-o, --output <output>": {
146
+ required: true,
147
+ type: String,
148
+ description: "Path to generate files"
152
149
  }
153
- })
154
- ], GenerateHttpClientCmd);
155
- export { GenerateHttpClientCmd };
150
+ }
151
+ });
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.6.3",
4
+ "version": "7.0.0-alpha.2",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -26,9 +26,9 @@
26
26
  "tslib": "2.7.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@tsed/cli": "6.6.3",
30
- "@tsed/cli-core": "6.6.3",
31
- "@tsed/typescript": "6.6.3",
29
+ "@tsed/cli": "7.0.0-alpha.2",
30
+ "@tsed/cli-core": "7.0.0-alpha.2",
31
+ "@tsed/typescript": "7.0.0-alpha.2",
32
32
  "cross-env": "7.0.3",
33
33
  "swagger-typescript-api": "^13.0.22",
34
34
  "typescript": "5.6.2",
@@ -53,5 +53,8 @@
53
53
  },
54
54
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-generate-http-client",
55
55
  "author": "Romain Lenzotti",
56
- "license": "MIT"
56
+ "license": "MIT",
57
+ "publishConfig": {
58
+ "tag": "alpha"
59
+ }
57
60
  }