katax-cli 1.1.4 → 1.2.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.
- package/dist/commands/add-endpoint.d.ts.map +1 -1
- package/dist/commands/add-endpoint.js +121 -97
- package/dist/commands/add-endpoint.js.map +1 -1
- package/dist/commands/deploy.d.ts +3 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +287 -153
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/generate-crud.d.ts.map +1 -1
- package/dist/commands/generate-crud.js +60 -56
- package/dist/commands/generate-crud.js.map +1 -1
- package/dist/commands/generate-docs.d.ts +8 -0
- package/dist/commands/generate-docs.d.ts.map +1 -0
- package/dist/commands/generate-docs.js +159 -0
- package/dist/commands/generate-docs.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +281 -17
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +83 -69
- package/dist/index.js.map +1 -1
- package/dist/services/openapi-generator.service.d.ts +37 -0
- package/dist/services/openapi-generator.service.d.ts.map +1 -0
- package/dist/services/openapi-generator.service.js +333 -0
- package/dist/services/openapi-generator.service.js.map +1 -0
- package/dist/templates/generators/swagger-template.d.ts +3 -0
- package/dist/templates/generators/swagger-template.d.ts.map +1 -0
- package/dist/templates/generators/swagger-template.js +117 -0
- package/dist/templates/generators/swagger-template.js.map +1 -0
- package/dist/types/index.d.ts +19 -10
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-endpoint.d.ts","sourceRoot":"","sources":["../../src/commands/add-endpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-endpoint.d.ts","sourceRoot":"","sources":["../../src/commands/add-endpoint.ts"],"names":[],"mappings":"AAUA,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,kBAAuB,iBAkRjC"}
|
|
@@ -1,66 +1,67 @@
|
|
|
1
|
-
import inquirer from
|
|
2
|
-
import ora from
|
|
3
|
-
import path from
|
|
4
|
-
import { success, error, warning, gray, title, info } from
|
|
5
|
-
import { fileExists } from
|
|
6
|
-
import { codeGenerationService } from
|
|
1
|
+
import inquirer from "inquirer";
|
|
2
|
+
import ora from "ora";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { success, error, warning, gray, title, info } from "../utils/logger.js";
|
|
5
|
+
import { fileExists } from "../utils/file-utils.js";
|
|
6
|
+
import { codeGenerationService } from "../services/code-generation.service.js";
|
|
7
|
+
import { autoRegenerateDocs } from "./generate-docs.js";
|
|
7
8
|
export async function addEndpointCommand(name, options = {}) {
|
|
8
9
|
title(`🎯 Add Endpoint: ${name}`);
|
|
9
|
-
if (!fileExists(path.join(process.cwd(),
|
|
10
|
-
error(
|
|
11
|
-
gray(
|
|
10
|
+
if (!fileExists(path.join(process.cwd(), "package.json"))) {
|
|
11
|
+
error("Not in a project directory!");
|
|
12
|
+
gray("Run this command from your project root\n");
|
|
12
13
|
process.exit(1);
|
|
13
14
|
}
|
|
14
|
-
const packageJsonPath = path.join(process.cwd(),
|
|
15
|
-
const packageJson = JSON.parse(await import(
|
|
16
|
-
const hasKataxCore = packageJson.dependencies?.[
|
|
15
|
+
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
16
|
+
const packageJson = JSON.parse(await import("fs").then((fs) => fs.promises.readFile(packageJsonPath, "utf-8")));
|
|
17
|
+
const hasKataxCore = packageJson.dependencies?.["katax-core"];
|
|
17
18
|
if (!hasKataxCore) {
|
|
18
|
-
warning(
|
|
19
|
+
warning("katax-core is not installed in this project");
|
|
19
20
|
const { install } = await inquirer.prompt([
|
|
20
21
|
{
|
|
21
|
-
type:
|
|
22
|
-
name:
|
|
23
|
-
message:
|
|
24
|
-
default: true
|
|
25
|
-
}
|
|
22
|
+
type: "confirm",
|
|
23
|
+
name: "install",
|
|
24
|
+
message: "Would you like to install katax-core?",
|
|
25
|
+
default: true,
|
|
26
|
+
},
|
|
26
27
|
]);
|
|
27
28
|
if (!install) {
|
|
28
|
-
error(
|
|
29
|
+
error("Cannot create endpoint without validation library");
|
|
29
30
|
process.exit(1);
|
|
30
31
|
}
|
|
31
|
-
const spinner = ora(
|
|
32
|
-
const { execa } = await import(
|
|
33
|
-
await execa(
|
|
34
|
-
spinner.succeed(
|
|
32
|
+
const spinner = ora("Installing katax-core...").start();
|
|
33
|
+
const { execa } = await import("execa");
|
|
34
|
+
await execa("npm", ["install", "katax-core"], { cwd: process.cwd() });
|
|
35
|
+
spinner.succeed("katax-core installed");
|
|
35
36
|
}
|
|
36
37
|
const answers = await inquirer.prompt([
|
|
37
38
|
{
|
|
38
|
-
type:
|
|
39
|
-
name:
|
|
40
|
-
message:
|
|
41
|
-
choices: [
|
|
42
|
-
default: options.method?.toUpperCase() ||
|
|
43
|
-
when: !options.method
|
|
39
|
+
type: "list",
|
|
40
|
+
name: "method",
|
|
41
|
+
message: "HTTP Method:",
|
|
42
|
+
choices: ["GET", "POST", "PUT", "PATCH", "DELETE"],
|
|
43
|
+
default: options.method?.toUpperCase() || "POST",
|
|
44
|
+
when: !options.method,
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
|
-
type:
|
|
47
|
-
name:
|
|
48
|
-
message:
|
|
47
|
+
type: "input",
|
|
48
|
+
name: "path",
|
|
49
|
+
message: "Route path:",
|
|
49
50
|
default: `/api/${name.toLowerCase()}`,
|
|
50
51
|
when: !options.path,
|
|
51
52
|
validate: (input) => {
|
|
52
|
-
if (!input.startsWith(
|
|
53
|
-
return
|
|
53
|
+
if (!input.startsWith("/")) {
|
|
54
|
+
return "Path must start with /";
|
|
54
55
|
}
|
|
55
56
|
return true;
|
|
56
|
-
}
|
|
57
|
+
},
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
|
-
type:
|
|
60
|
-
name:
|
|
61
|
-
message:
|
|
62
|
-
default: true
|
|
63
|
-
}
|
|
60
|
+
type: "confirm",
|
|
61
|
+
name: "addValidation",
|
|
62
|
+
message: "Add validation?",
|
|
63
|
+
default: true,
|
|
64
|
+
},
|
|
64
65
|
]);
|
|
65
66
|
const config = {
|
|
66
67
|
name,
|
|
@@ -69,24 +70,26 @@ export async function addEndpointCommand(name, options = {}) {
|
|
|
69
70
|
addValidation: answers.addValidation,
|
|
70
71
|
fields: [],
|
|
71
72
|
addAsyncValidators: false,
|
|
72
|
-
dbOperations: []
|
|
73
|
+
dbOperations: [],
|
|
73
74
|
};
|
|
74
|
-
if (config.addValidation &&
|
|
75
|
-
|
|
75
|
+
if (config.addValidation &&
|
|
76
|
+
config.method !== "GET" &&
|
|
77
|
+
config.method !== "DELETE") {
|
|
78
|
+
info("\nDefine request body fields:");
|
|
76
79
|
let addingFields = true;
|
|
77
80
|
while (addingFields) {
|
|
78
81
|
const fieldAnswers = await inquirer.prompt([
|
|
79
82
|
{
|
|
80
|
-
type:
|
|
81
|
-
name:
|
|
82
|
-
message:
|
|
83
|
+
type: "input",
|
|
84
|
+
name: "fieldName",
|
|
85
|
+
message: "Field name (press Enter to finish):",
|
|
83
86
|
validate: (input) => {
|
|
84
87
|
if (input && !/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(input)) {
|
|
85
|
-
return
|
|
88
|
+
return "Field name must be a valid identifier";
|
|
86
89
|
}
|
|
87
90
|
return true;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
91
|
+
},
|
|
92
|
+
},
|
|
90
93
|
]);
|
|
91
94
|
if (!fieldAnswers.fieldName) {
|
|
92
95
|
addingFields = false;
|
|
@@ -94,66 +97,86 @@ export async function addEndpointCommand(name, options = {}) {
|
|
|
94
97
|
}
|
|
95
98
|
const fieldConfig = await inquirer.prompt([
|
|
96
99
|
{
|
|
97
|
-
type:
|
|
98
|
-
name:
|
|
100
|
+
type: "list",
|
|
101
|
+
name: "type",
|
|
99
102
|
message: `Type for "${fieldAnswers.fieldName}":`,
|
|
100
|
-
choices: [
|
|
103
|
+
choices: [
|
|
104
|
+
"string",
|
|
105
|
+
"number",
|
|
106
|
+
"boolean",
|
|
107
|
+
"date",
|
|
108
|
+
"email",
|
|
109
|
+
"array",
|
|
110
|
+
"object",
|
|
111
|
+
],
|
|
101
112
|
},
|
|
102
113
|
{
|
|
103
|
-
type:
|
|
104
|
-
name:
|
|
105
|
-
message:
|
|
106
|
-
default: true
|
|
107
|
-
}
|
|
114
|
+
type: "confirm",
|
|
115
|
+
name: "required",
|
|
116
|
+
message: "Required?",
|
|
117
|
+
default: true,
|
|
118
|
+
},
|
|
108
119
|
]);
|
|
109
120
|
const field = {
|
|
110
121
|
name: fieldAnswers.fieldName,
|
|
111
122
|
type: fieldConfig.type,
|
|
112
123
|
required: fieldConfig.required,
|
|
113
|
-
rules: []
|
|
124
|
+
rules: [],
|
|
114
125
|
};
|
|
115
|
-
if (fieldConfig.type ===
|
|
126
|
+
if (fieldConfig.type === "string" || fieldConfig.type === "email") {
|
|
116
127
|
const stringRules = await inquirer.prompt([
|
|
117
128
|
{
|
|
118
|
-
type:
|
|
119
|
-
name:
|
|
120
|
-
message:
|
|
121
|
-
validate: (input) => !input || !isNaN(parseInt(input)) ||
|
|
129
|
+
type: "input",
|
|
130
|
+
name: "minLength",
|
|
131
|
+
message: "Minimum length (press Enter to skip):",
|
|
132
|
+
validate: (input) => !input || !isNaN(parseInt(input)) || "Must be a number",
|
|
122
133
|
},
|
|
123
134
|
{
|
|
124
|
-
type:
|
|
125
|
-
name:
|
|
126
|
-
message:
|
|
127
|
-
validate: (input) => !input || !isNaN(parseInt(input)) ||
|
|
128
|
-
}
|
|
135
|
+
type: "input",
|
|
136
|
+
name: "maxLength",
|
|
137
|
+
message: "Maximum length (press Enter to skip):",
|
|
138
|
+
validate: (input) => !input || !isNaN(parseInt(input)) || "Must be a number",
|
|
139
|
+
},
|
|
129
140
|
]);
|
|
130
141
|
if (stringRules.minLength) {
|
|
131
|
-
field.rules.push({
|
|
142
|
+
field.rules.push({
|
|
143
|
+
type: "minLength",
|
|
144
|
+
value: parseInt(stringRules.minLength),
|
|
145
|
+
});
|
|
132
146
|
}
|
|
133
147
|
if (stringRules.maxLength) {
|
|
134
|
-
field.rules.push({
|
|
148
|
+
field.rules.push({
|
|
149
|
+
type: "maxLength",
|
|
150
|
+
value: parseInt(stringRules.maxLength),
|
|
151
|
+
});
|
|
135
152
|
}
|
|
136
153
|
}
|
|
137
|
-
if (fieldConfig.type ===
|
|
154
|
+
if (fieldConfig.type === "number") {
|
|
138
155
|
const numberRules = await inquirer.prompt([
|
|
139
156
|
{
|
|
140
|
-
type:
|
|
141
|
-
name:
|
|
142
|
-
message:
|
|
143
|
-
validate: (input) => !input || !isNaN(parseFloat(input)) ||
|
|
157
|
+
type: "input",
|
|
158
|
+
name: "min",
|
|
159
|
+
message: "Minimum value (press Enter to skip):",
|
|
160
|
+
validate: (input) => !input || !isNaN(parseFloat(input)) || "Must be a number",
|
|
144
161
|
},
|
|
145
162
|
{
|
|
146
|
-
type:
|
|
147
|
-
name:
|
|
148
|
-
message:
|
|
149
|
-
validate: (input) => !input || !isNaN(parseFloat(input)) ||
|
|
150
|
-
}
|
|
163
|
+
type: "input",
|
|
164
|
+
name: "max",
|
|
165
|
+
message: "Maximum value (press Enter to skip):",
|
|
166
|
+
validate: (input) => !input || !isNaN(parseFloat(input)) || "Must be a number",
|
|
167
|
+
},
|
|
151
168
|
]);
|
|
152
169
|
if (numberRules.min) {
|
|
153
|
-
field.rules.push({
|
|
170
|
+
field.rules.push({
|
|
171
|
+
type: "min",
|
|
172
|
+
value: parseFloat(numberRules.min),
|
|
173
|
+
});
|
|
154
174
|
}
|
|
155
175
|
if (numberRules.max) {
|
|
156
|
-
field.rules.push({
|
|
176
|
+
field.rules.push({
|
|
177
|
+
type: "max",
|
|
178
|
+
value: parseFloat(numberRules.max),
|
|
179
|
+
});
|
|
157
180
|
}
|
|
158
181
|
}
|
|
159
182
|
config.fields.push(field);
|
|
@@ -162,45 +185,46 @@ export async function addEndpointCommand(name, options = {}) {
|
|
|
162
185
|
if (config.fields.length > 0) {
|
|
163
186
|
const { addAsync } = await inquirer.prompt([
|
|
164
187
|
{
|
|
165
|
-
type:
|
|
166
|
-
name:
|
|
167
|
-
message:
|
|
168
|
-
default: false
|
|
169
|
-
}
|
|
188
|
+
type: "confirm",
|
|
189
|
+
name: "addAsync",
|
|
190
|
+
message: "Add async validators (e.g., unique email)?",
|
|
191
|
+
default: false,
|
|
192
|
+
},
|
|
170
193
|
]);
|
|
171
194
|
config.addAsyncValidators = addAsync;
|
|
172
195
|
}
|
|
173
196
|
}
|
|
174
|
-
const spinner = ora(
|
|
197
|
+
const spinner = ora("Generating endpoint files...").start();
|
|
175
198
|
try {
|
|
176
|
-
const packageJsonPath = path.join(process.cwd(),
|
|
199
|
+
const packageJsonPath = path.join(process.cwd(), "package.json");
|
|
177
200
|
let database;
|
|
178
201
|
try {
|
|
179
|
-
const packageJson = JSON.parse(await import(
|
|
202
|
+
const packageJson = JSON.parse(await import("fs").then((fs) => fs.promises.readFile(packageJsonPath, "utf-8")));
|
|
180
203
|
if (packageJson.dependencies?.pg)
|
|
181
|
-
database =
|
|
204
|
+
database = "postgresql";
|
|
182
205
|
else if (packageJson.dependencies?.mysql2)
|
|
183
|
-
database =
|
|
206
|
+
database = "mysql";
|
|
184
207
|
else if (packageJson.dependencies?.mongodb)
|
|
185
|
-
database =
|
|
208
|
+
database = "mongodb";
|
|
186
209
|
}
|
|
187
210
|
catch (err) {
|
|
188
211
|
}
|
|
189
212
|
const files = await codeGenerationService.generateEndpoint(config, process.cwd(), database);
|
|
190
|
-
spinner.succeed(
|
|
213
|
+
spinner.succeed("Endpoint files generated");
|
|
191
214
|
success(`\n✨ Endpoint "${name}" created successfully!\n`);
|
|
192
|
-
info(
|
|
215
|
+
info("Generated files:");
|
|
193
216
|
gray(` src/api/${name.toLowerCase()}/${name.toLowerCase()}.validator.ts`);
|
|
194
217
|
gray(` src/api/${name.toLowerCase()}/${name.toLowerCase()}.controller.ts`);
|
|
195
218
|
gray(` src/api/${name.toLowerCase()}/${name.toLowerCase()}.handler.ts`);
|
|
196
219
|
gray(` src/api/${name.toLowerCase()}/${name.toLowerCase()}.routes.ts`);
|
|
197
220
|
gray(` Updated: src/api/routes.ts\n`);
|
|
198
221
|
gray(` Updated: src/api/routes.ts\n`);
|
|
199
|
-
info(
|
|
222
|
+
info("Test your endpoint:");
|
|
200
223
|
gray(` ${config.method} ${config.path}\n`);
|
|
224
|
+
await autoRegenerateDocs(process.cwd());
|
|
201
225
|
}
|
|
202
226
|
catch (err) {
|
|
203
|
-
error(
|
|
227
|
+
error("Failed to add endpoint");
|
|
204
228
|
console.error(err);
|
|
205
229
|
process.exit(1);
|
|
206
230
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-endpoint.js","sourceRoot":"","sources":["../../src/commands/add-endpoint.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"add-endpoint.js","sourceRoot":"","sources":["../../src/commands/add-endpoint.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,UAAU,EAA6B,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAO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AAC,aAAa,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;QAC5E,IAAI,CAAC,aAAa,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;QACzE,IAAI,CAAC,aAAa,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QACxE,IAAI,CAAC,gCAAgC,CAAC,CAAC;QACvC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAEvC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;QAG5C,MAAM,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -2,13 +2,16 @@ export declare function deployInitCommand(): Promise<void>;
|
|
|
2
2
|
export declare function deployUpdateCommand(options: {
|
|
3
3
|
branch?: string;
|
|
4
4
|
hard?: boolean;
|
|
5
|
+
appName?: string;
|
|
5
6
|
}): Promise<void>;
|
|
6
7
|
export declare function deployRollbackCommand(options: {
|
|
7
8
|
commits?: number;
|
|
9
|
+
appName?: string;
|
|
8
10
|
}): Promise<void>;
|
|
9
11
|
export declare function deployLogsCommand(options: {
|
|
10
12
|
lines?: number;
|
|
11
13
|
follow?: boolean;
|
|
14
|
+
appName?: string;
|
|
12
15
|
}): Promise<void>;
|
|
13
16
|
export declare function deployStatusCommand(): Promise<void>;
|
|
14
17
|
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAuBA,wBAAsB,iBAAiB,kBAgHtC;AAKD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAuBA,wBAAsB,iBAAiB,kBAgHtC;AAKD,wBAAsB,mBAAmB,CAAC,OAAO,EAAE;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,iBAuGA;AAKD,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,iBAsDA;AAKD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,iBA4CA;AAKD,wBAAsB,mBAAmB,kBASxC"}
|