slicejs-cli 2.2.0 → 2.2.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.
|
@@ -412,34 +412,35 @@ export async function buildCommand(options = {}) {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
|
-
* Verifica que las dependencias de build estén instaladas
|
|
415
|
+
* Verifica que las dependencias de build estén instaladas en el CLI
|
|
416
416
|
*/
|
|
417
417
|
async function checkBuildDependencies() {
|
|
418
418
|
try {
|
|
419
419
|
Print.info('Checking build dependencies...');
|
|
420
420
|
|
|
421
|
-
|
|
421
|
+
// Verificar dependencias en el CLI en lugar del proyecto
|
|
422
|
+
const cliPackageJsonPath = path.join(__dirname, '../../package.json');
|
|
422
423
|
|
|
423
|
-
if (!await fs.pathExists(
|
|
424
|
-
throw new Error('package.json not found');
|
|
424
|
+
if (!await fs.pathExists(cliPackageJsonPath)) {
|
|
425
|
+
throw new Error('CLI package.json not found');
|
|
425
426
|
}
|
|
426
427
|
|
|
427
|
-
const
|
|
428
|
-
const deps = { ...
|
|
428
|
+
const cliPackageJson = await fs.readJson(cliPackageJsonPath);
|
|
429
|
+
const deps = { ...cliPackageJson.dependencies, ...cliPackageJson.devDependencies };
|
|
429
430
|
|
|
430
431
|
const requiredDeps = ['terser', 'clean-css', 'html-minifier-terser'];
|
|
431
432
|
const missing = requiredDeps.filter(dep => !deps[dep]);
|
|
432
433
|
|
|
433
434
|
if (missing.length > 0) {
|
|
434
|
-
Print.error('Missing build dependencies:');
|
|
435
|
+
Print.error('Missing build dependencies in CLI:');
|
|
435
436
|
missing.forEach(dep => console.log(` • ${dep}`));
|
|
436
437
|
Print.newLine();
|
|
437
|
-
Print.info('
|
|
438
|
-
console.log(
|
|
438
|
+
Print.info('Please update slicejs-cli to the latest version:');
|
|
439
|
+
console.log('npm install -g slicejs-cli@latest');
|
|
439
440
|
return false;
|
|
440
441
|
}
|
|
441
442
|
|
|
442
|
-
Print.success('All build dependencies are
|
|
443
|
+
Print.success('All build dependencies are available in CLI');
|
|
443
444
|
return true;
|
|
444
445
|
|
|
445
446
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slicejs-cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Command client for developing web applications with Slice.js framework",
|
|
5
5
|
"main": "client.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,9 +17,12 @@
|
|
|
17
17
|
"type": "module",
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"clean-css": "^5.3.3",
|
|
20
21
|
"commander": "^12.0.0",
|
|
21
22
|
"fs-extra": "^11.2.0",
|
|
23
|
+
"html-minifier-terser": "^7.2.0",
|
|
22
24
|
"inquirer": "^12.4.2",
|
|
23
|
-
"slicejs-web-framework": "latest"
|
|
25
|
+
"slicejs-web-framework": "latest",
|
|
26
|
+
"terser": "^5.43.1"
|
|
24
27
|
}
|
|
25
28
|
}
|