slicejs-cli 2.1.9 → 2.1.10
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.
|
@@ -274,7 +274,7 @@ class ComponentRegistry {
|
|
|
274
274
|
{
|
|
275
275
|
type: 'confirm',
|
|
276
276
|
name: 'overwrite',
|
|
277
|
-
message: `
|
|
277
|
+
message: `El componente '${componentName}' ya existe localmente. ¿Deseas sobrescribirlo con la versión del repositorio?`,
|
|
278
278
|
default: false
|
|
279
279
|
}
|
|
280
280
|
]);
|
|
@@ -336,22 +336,30 @@ class ComponentRegistry {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
async updateAllComponents(force = false) {
|
|
339
|
-
Print.info('Looking for updatable components...');
|
|
339
|
+
Print.info('Looking for updatable Visual components...');
|
|
340
340
|
|
|
341
|
-
const
|
|
341
|
+
const allUpdatableComponents = await this.findUpdatableComponents();
|
|
342
|
+
|
|
343
|
+
// ✅ NUEVO: Filtrar solo componentes Visual
|
|
344
|
+
const updatableComponents = allUpdatableComponents.filter(comp => comp.category === 'Visual');
|
|
342
345
|
|
|
343
346
|
if (updatableComponents.length === 0) {
|
|
344
|
-
Print.info('No local components found that match the official repository');
|
|
345
|
-
Print.info('Use "
|
|
347
|
+
Print.info('No local Visual components found that match the official repository');
|
|
348
|
+
Print.info('Use "slice browse" to see available components');
|
|
346
349
|
return true;
|
|
347
350
|
}
|
|
348
351
|
|
|
352
|
+
// Mostrar estadísticas si hay componentes Service que no se sincronizarán
|
|
353
|
+
const serviceComponents = allUpdatableComponents.filter(comp => comp.category === 'Service');
|
|
354
|
+
if (serviceComponents.length > 0) {
|
|
355
|
+
Print.info(`Found ${serviceComponents.length} Service components (skipped - sync only affects Visual components)`);
|
|
356
|
+
}
|
|
357
|
+
|
|
349
358
|
Print.newLine();
|
|
350
|
-
Print.subtitle(`Found ${updatableComponents.length} updatable components:`);
|
|
359
|
+
Print.subtitle(`Found ${updatableComponents.length} updatable Visual components:`);
|
|
351
360
|
Print.newLine();
|
|
352
361
|
updatableComponents.forEach(comp => {
|
|
353
|
-
|
|
354
|
-
console.log(`${icon} ${comp.name} (${comp.category})`);
|
|
362
|
+
console.log(`🎨 ${comp.name} (${comp.category})`);
|
|
355
363
|
});
|
|
356
364
|
|
|
357
365
|
if (!force) {
|
|
@@ -359,7 +367,7 @@ class ComponentRegistry {
|
|
|
359
367
|
{
|
|
360
368
|
type: 'confirm',
|
|
361
369
|
name: 'confirmUpdate',
|
|
362
|
-
message: `Do you want to update
|
|
370
|
+
message: `Do you want to update these Visual components to the repository versions?`,
|
|
363
371
|
default: true
|
|
364
372
|
}
|
|
365
373
|
]);
|
|
@@ -370,38 +378,32 @@ class ComponentRegistry {
|
|
|
370
378
|
}
|
|
371
379
|
}
|
|
372
380
|
|
|
373
|
-
//
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
// Update Visual components
|
|
380
|
-
if (visualComponents.length > 0) {
|
|
381
|
-
Print.info(`Updating ${visualComponents.length} Visual components...`);
|
|
382
|
-
const visualResults = await this.installMultipleComponents(visualComponents, 'Visual', true);
|
|
383
|
-
allResults = allResults.concat(visualResults);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
// Update Service components
|
|
387
|
-
if (serviceComponents.length > 0) {
|
|
388
|
-
Print.info(`Updating ${serviceComponents.length} Service components...`);
|
|
389
|
-
const serviceResults = await this.installMultipleComponents(serviceComponents, 'Service', true);
|
|
390
|
-
allResults = allResults.concat(serviceResults);
|
|
391
|
-
}
|
|
381
|
+
// ✅ SIMPLIFICADO: Solo actualizar componentes Visual
|
|
382
|
+
const visualComponentNames = updatableComponents.map(c => c.name);
|
|
383
|
+
|
|
384
|
+
Print.info(`Updating ${visualComponentNames.length} Visual components...`);
|
|
385
|
+
const results = await this.installMultipleComponents(visualComponentNames, 'Visual', true);
|
|
392
386
|
|
|
393
387
|
// Final summary
|
|
394
|
-
const totalSuccessful =
|
|
395
|
-
const totalFailed =
|
|
388
|
+
const totalSuccessful = results.filter(r => r.success).length;
|
|
389
|
+
const totalFailed = results.filter(r => !r.success).length;
|
|
396
390
|
|
|
397
391
|
Print.newLine();
|
|
398
|
-
Print.title('
|
|
399
|
-
Print.success(`
|
|
392
|
+
Print.title('Visual Components Sync Summary');
|
|
393
|
+
Print.success(`Visual components updated: ${totalSuccessful}`);
|
|
400
394
|
|
|
401
395
|
if (totalFailed > 0) {
|
|
402
|
-
Print.error(`
|
|
396
|
+
Print.error(`Visual components failed: ${totalFailed}`);
|
|
403
397
|
} else {
|
|
404
|
-
Print.success('All your components are now updated to the latest official versions!');
|
|
398
|
+
Print.success('All your Visual components are now updated to the latest official versions!');
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
// Información adicional sobre Service components
|
|
402
|
+
if (serviceComponents.length > 0) {
|
|
403
|
+
Print.newLine();
|
|
404
|
+
Print.info(`Note: ${serviceComponents.length} Service components were found but not updated`);
|
|
405
|
+
Print.info('Service components maintain manual versioning - update them individually if needed');
|
|
406
|
+
Print.commandExample('Update Service component manually', 'slice get FetchManager --service --force');
|
|
405
407
|
}
|
|
406
408
|
|
|
407
409
|
return totalFailed === 0;
|