@postxl/cli 1.4.1 → 1.4.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.
|
@@ -66,15 +66,18 @@ const tsConfig = {
|
|
|
66
66
|
};
|
|
67
67
|
const generators = [
|
|
68
68
|
'backendActionsGenerator',
|
|
69
|
+
'backendAiGenerator',
|
|
69
70
|
'backendAuthenticationGenerator',
|
|
70
71
|
'backendDataManagementGenerator',
|
|
71
72
|
'backendE2eGenerator',
|
|
72
73
|
'backendGenerator',
|
|
73
74
|
'backendImportGenerator',
|
|
75
|
+
'backendExcelIoGenerator',
|
|
74
76
|
'backendModuleXlPortGenerator',
|
|
75
77
|
'backendRepositoriesGenerator',
|
|
76
78
|
'backendRestApiGenerator',
|
|
77
79
|
'backendS3Generator',
|
|
80
|
+
'backendUploadGenerator',
|
|
78
81
|
'backendSeedGenerator',
|
|
79
82
|
'backendTrpcRouterGenerator',
|
|
80
83
|
'backendUpdateGenerator',
|
|
@@ -87,6 +90,7 @@ const generators = [
|
|
|
87
90
|
'databasePrismaGenerator',
|
|
88
91
|
'decodersGenerator',
|
|
89
92
|
'e2eGenerator',
|
|
93
|
+
'frontendActionsGenerator',
|
|
90
94
|
'frontendAdminGenerator',
|
|
91
95
|
{ imports: 'Frontend', code: 'Frontend.configureFrontendGenerator(Frontend.all)' },
|
|
92
96
|
'frontendTablesGenerator',
|
|
@@ -160,14 +160,32 @@ async function resolveProjectPath({ slug, projectPath, }) {
|
|
|
160
160
|
return projectGenerationPath;
|
|
161
161
|
}
|
|
162
162
|
async function createFolderOrThrow(targetPath) {
|
|
163
|
+
let stat;
|
|
163
164
|
try {
|
|
164
|
-
await fs.
|
|
165
|
-
|
|
165
|
+
stat = await fs.stat(targetPath);
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT') {
|
|
169
|
+
await fs.mkdir(targetPath, { recursive: true });
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
console.error(`Cannot access target path "${targetPath}": ${error instanceof Error ? error.message : error}`);
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
if (!stat.isDirectory()) {
|
|
176
|
+
console.error(`Target path "${targetPath}" already exists and is not a directory! Please choose a different path.`);
|
|
166
177
|
process.exit(1);
|
|
167
178
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
179
|
+
try {
|
|
180
|
+
const entries = await fs.readdir(targetPath);
|
|
181
|
+
if (entries.length > 0) {
|
|
182
|
+
console.error(`Target path "${targetPath}" already exists and is not empty! Please choose a different path.`);
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
console.error(`Cannot read target path "${targetPath}": ${error instanceof Error ? error.message : error}`);
|
|
188
|
+
process.exit(1);
|
|
171
189
|
}
|
|
172
190
|
}
|
|
173
191
|
async function createProjectStructure({ name, slug, schema, projectPath, }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postxl/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Command-line interface for PostXL code generation framework",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"dotenv": "17.3.1",
|
|
46
46
|
"zod-validation-error": "5.0.0",
|
|
47
47
|
"@postxl/generator": "^1.3.6",
|
|
48
|
-
"@postxl/
|
|
49
|
-
"@postxl/
|
|
48
|
+
"@postxl/schema": "^1.7.0",
|
|
49
|
+
"@postxl/generators": "^1.20.0",
|
|
50
50
|
"@postxl/utils": "^1.3.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {},
|