@postxl/cli 1.1.0 → 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.
|
@@ -126,7 +126,6 @@ async function createProject(options) {
|
|
|
126
126
|
devDependencies,
|
|
127
127
|
scripts,
|
|
128
128
|
isInPostXlWorkspace: false,
|
|
129
|
-
packageManager: 'pnpm@10.26.1',
|
|
130
129
|
};
|
|
131
130
|
await fs.writeFile(path.join(targetPath, 'package.json'), await (0, generator_1.format)({ path: 'package.json', content: Generator.generatePackageJson(packageJsonConfig) }));
|
|
132
131
|
const envContent = `DATABASE_CONNECTION=postgresql://postgres:postgres@localhost:5432/${slug}`;
|
|
@@ -311,15 +311,20 @@ async function initializeGitRepository(targetPath) {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
|
-
* Throws if is less than what .
|
|
314
|
+
* Throws if Node.js version is less than what package.json devEngines.runtime requires
|
|
315
315
|
*/
|
|
316
316
|
async function checkNodeVersion() {
|
|
317
317
|
try {
|
|
318
318
|
const repositoryRoot = process.cwd();
|
|
319
|
-
const
|
|
320
|
-
// Read the required version from .
|
|
321
|
-
const
|
|
322
|
-
const
|
|
319
|
+
const packageJsonPath = path.join(repositoryRoot, 'package.json');
|
|
320
|
+
// Read the required version from package.json devEngines.runtime
|
|
321
|
+
const packageJsonContent = await fs.readFile(packageJsonPath, 'utf-8');
|
|
322
|
+
const packageJson = JSON.parse(packageJsonContent);
|
|
323
|
+
const requiredVersion = packageJson.devEngines?.runtime?.version;
|
|
324
|
+
if (!requiredVersion) {
|
|
325
|
+
// No devEngines.runtime.version specified, skip check
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
323
328
|
// Get current Node.js version
|
|
324
329
|
const currentVersion = process.version.replace(/^v/, '');
|
|
325
330
|
// Compare major versions
|
|
@@ -331,7 +336,7 @@ async function checkNodeVersion() {
|
|
|
331
336
|
}
|
|
332
337
|
catch (error) {
|
|
333
338
|
if (error.code === 'ENOENT') {
|
|
334
|
-
// .
|
|
339
|
+
// package.json not found, skip check
|
|
335
340
|
return;
|
|
336
341
|
}
|
|
337
342
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postxl/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Command-line interface for PostXL code generation framework",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"commander": "14.0.2",
|
|
45
45
|
"dotenv": "17.2.3",
|
|
46
46
|
"zod-validation-error": "3.4.0",
|
|
47
|
-
"@postxl/generator": "^1.0
|
|
48
|
-
"@postxl/generators": "^1.
|
|
49
|
-
"@postxl/schema": "^1.0
|
|
50
|
-
"@postxl/utils": "^1.0
|
|
47
|
+
"@postxl/generator": "^1.1.0",
|
|
48
|
+
"@postxl/generators": "^1.3.0",
|
|
49
|
+
"@postxl/schema": "^1.1.0",
|
|
50
|
+
"@postxl/utils": "^1.1.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {},
|
|
53
53
|
"wallaby": {
|