slicejs-cli 2.1.1 → 2.1.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.
package/client.js CHANGED
@@ -21,7 +21,7 @@ const loadConfig = () => {
21
21
  const rawData = fs.readFileSync(configPath, "utf-8");
22
22
  return JSON.parse(rawData);
23
23
  } catch (error) {
24
- console.error(`Error loading configuration: ${error.message}`);
24
+ Print.error(`Loading configuration: ${error.message}`);
25
25
  return null;
26
26
  }
27
27
  };
@@ -33,20 +33,25 @@ const getCategories = () => {
33
33
 
34
34
  // Function to run version check for all commands
35
35
  async function runWithVersionCheck(commandFunction, ...args) {
36
- // Run the command first
37
- const result = await commandFunction(...args);
38
-
39
- // Then check for updates (non-blocking)
40
- setTimeout(() => {
41
- versionChecker.checkForUpdates(false);
42
- }, 100);
43
-
44
- return result;
36
+ try {
37
+ // Run the command first
38
+ const result = await commandFunction(...args);
39
+
40
+ // Then check for updates (non-blocking)
41
+ setTimeout(() => {
42
+ versionChecker.checkForUpdates(true);
43
+ }, 100);
44
+
45
+ return result;
46
+ } catch (error) {
47
+ Print.error(`Command execution: ${error.message}`);
48
+ return false;
49
+ }
45
50
  }
46
51
 
47
52
  const sliceClient = program;
48
53
 
49
- sliceClient.version("2.1.0").description("CLI for managing Slice.js framework components");
54
+ sliceClient.version("2.1.3").description("CLI for managing Slice.js framework components");
50
55
 
51
56
  // INIT COMMAND
52
57
  sliceClient
@@ -80,7 +85,8 @@ componentCommand
80
85
  await runWithVersionCheck(async () => {
81
86
  const categories = getCategories();
82
87
  if (categories.length === 0) {
83
- Print.error("No categories available. Check your configuration.");
88
+ Print.error("No categories available. Check your configuration");
89
+ Print.info("Run 'slice init' to initialize your project");
84
90
  return;
85
91
  }
86
92
 
@@ -96,22 +102,28 @@ componentCommand
96
102
  name: "category",
97
103
  message: "Select the component category:",
98
104
  choices: categories,
99
- }])
100
-
101
- if(validations.getCategoryType(answers.category)==='Visual'){
102
- const properties = await inquirer.prompt([
103
- {
104
- type: "input",
105
- name: "properties",
106
- message: "Enter the properties (comma separated):"
107
- },
108
- ]);
109
- answers.properties = properties.properties.split(",").map((prop) => prop.trim());
110
- } else {
111
- answers.properties = [];
112
105
  }
106
+ ]);
107
+
108
+ if (validations.getCategoryType(answers.category) === 'Visual') {
109
+ const properties = await inquirer.prompt([
110
+ {
111
+ type: "input",
112
+ name: "properties",
113
+ message: "Enter the properties (comma separated):",
114
+ default: ""
115
+ },
116
+ ]);
117
+ answers.properties = properties.properties
118
+ ? properties.properties.split(",").map((prop) => prop.trim()).filter(Boolean)
119
+ : [];
120
+ } else {
121
+ answers.properties = [];
122
+ }
113
123
 
114
124
  if (createComponent(answers.componentName, answers.category, answers.properties)) {
125
+ Print.success(`Component ${answers.componentName} created successfully`);
126
+ Print.info("Listing updated components:");
115
127
  listComponents();
116
128
  }
117
129
  });
@@ -138,11 +150,16 @@ componentCommand
138
150
  await runWithVersionCheck(async () => {
139
151
  const categories = getCategories();
140
152
  if (categories.length === 0) {
141
- Print.error("No categories available. Check your configuration.");
153
+ Print.error("No categories available. Check your configuration");
154
+ Print.info("Run 'slice init' to initialize your project");
142
155
  return;
143
156
  }
144
157
 
145
- deleteComponent();
158
+ try {
159
+ await deleteComponent();
160
+ } catch (error) {
161
+ Print.error(`Deleting component: ${error.message}`);
162
+ }
146
163
  });
147
164
  });
148
165
 
@@ -191,17 +208,16 @@ registryCommand
191
208
  // SHORTCUTS - Top-level convenient commands
192
209
  sliceClient
193
210
  .command("get [components...]")
194
- .description("🚀 Quick install components from registry (shortcut for registry get)")
211
+ .description("Quick install components from registry")
195
212
  .option("-f, --force", "Force overwrite existing components")
196
213
  .option("-s, --service", "Install Service components instead of Visual")
197
214
  .action(async (components, options) => {
198
215
  await runWithVersionCheck(async () => {
199
216
  if (!components || components.length === 0) {
200
- Print.info("💡 Tip: Use 'slice registry list' to see available components");
201
- Print.info("📖 Usage examples:");
202
- console.log(" slice get Button Card Input");
203
- console.log(" slice get FetchManager --service");
204
- console.log(" slice registry list");
217
+ Print.info("Use 'slice registry list' to see available components");
218
+ Print.commandExample("Get multiple components", "slice get Button Card Input");
219
+ Print.commandExample("Get service component", "slice get FetchManager --service");
220
+ Print.commandExample("Browse components", "slice browse");
205
221
  return;
206
222
  }
207
223
 
@@ -214,7 +230,7 @@ sliceClient
214
230
 
215
231
  sliceClient
216
232
  .command("browse")
217
- .description("📚 Quick browse available components (shortcut for registry list)")
233
+ .description("Quick browse available components")
218
234
  .action(async () => {
219
235
  await runWithVersionCheck(async () => {
220
236
  await listRemoteComponents();
@@ -223,7 +239,7 @@ sliceClient
223
239
 
224
240
  sliceClient
225
241
  .command("sync")
226
- .description("🔄 Quick sync local components (shortcut for registry sync)")
242
+ .description("Quick sync local components to latest versions")
227
243
  .option("-f, --force", "Force update without confirmation")
228
244
  .action(async (options) => {
229
245
  await runWithVersionCheck(async () => {
@@ -239,15 +255,22 @@ sliceClient
239
255
  .alias("upgrade")
240
256
  .description("Check for and show available updates for CLI and framework")
241
257
  .action(async () => {
242
- Print.info("🔄 Checking for updates...");
243
- const updateInfo = await versionChecker.checkForUpdates(false);
258
+ Print.info("Checking for updates...");
244
259
 
245
- if (updateInfo) {
246
- if (updateInfo.cli.status === 'current' && updateInfo.framework.status === 'current') {
247
- Print.success("✅ All components are up to date!");
260
+ try {
261
+ const updateInfo = await versionChecker.checkForUpdates(false);
262
+
263
+ if (updateInfo) {
264
+ if (updateInfo.cli.status === 'current' && updateInfo.framework.status === 'current') {
265
+ Print.success("All components are up to date!");
266
+ } else {
267
+ Print.info("Updates available - see details above");
268
+ }
269
+ } else {
270
+ Print.error("Could not check for updates. Please check your internet connection");
248
271
  }
249
- } else {
250
- Print.warning("⚠️ Could not check for updates. Please check your internet connection.");
272
+ } catch (error) {
273
+ Print.error(`Checking updates: ${error.message}`);
251
274
  }
252
275
  });
253
276
 
@@ -259,9 +282,9 @@ sliceClient
259
282
  subcommandTerm: (cmd) => cmd.name() + ' ' + cmd.usage()
260
283
  });
261
284
 
262
- // Custom help
285
+ // Custom help - usando Print para consistencia
263
286
  sliceClient.addHelpText('after', `
264
- 💡 Common Usage Examples:
287
+ Common Usage Examples:
265
288
  slice init - Initialize new Slice.js project
266
289
  slice get Button Card Input - Install Visual components from registry
267
290
  slice get FetchManager -s - Install Service component from registry
@@ -270,18 +293,28 @@ sliceClient.addHelpText('after', `
270
293
  slice component create - Create new local component
271
294
  slice update - Check for CLI/framework updates
272
295
 
273
- 📚 Command Categories:
296
+ Command Categories:
274
297
  • init, version, update - Project setup and maintenance
275
298
  • get, browse, sync - Quick registry shortcuts
276
299
  • component <cmd> - Local component management
277
300
  • registry <cmd> - Official repository operations
278
301
 
279
- 🔗 More info: https://slice-js-docs.vercel.app/
302
+ More info: https://slice-js-docs.vercel.app/
280
303
  `);
281
304
 
282
- // Default action
305
+ // Default action with better messaging
283
306
  if (!process.argv.slice(2).length) {
284
307
  program.outputHelp();
308
+ Print.newLine();
309
+ Print.info("Start with: slice init");
310
+ Print.commandExample("View available components", "slice browse");
285
311
  }
286
312
 
313
+ // Error handling for unknown commands
314
+ program.on('command:*', () => {
315
+ Print.error('Invalid command. See available commands above');
316
+ Print.info("Use 'slice --help' for help");
317
+ process.exit(1);
318
+ });
319
+
287
320
  program.parse();
package/commands/Print.js CHANGED
@@ -1,12 +1,93 @@
1
- export default class Print{
2
- constructor(){}
1
+ export default class Print {
2
+ constructor() {}
3
3
 
4
- static error(message) {
4
+ static error(message) {
5
5
  console.error('\x1b[31m', `❌ Error: ${message}`, '\x1b[0m');
6
6
  }
7
7
 
8
8
  static success(message) {
9
9
  console.log('\x1b[32m', `✅ Success: ${message}`, '\x1b[0m');
10
10
  }
11
-
11
+
12
+ static warning(message) {
13
+ console.log('\x1b[33m', `⚠️ Warning: ${message}`, '\x1b[0m');
14
+ }
15
+
16
+ static info(message) {
17
+ console.log('\x1b[36m', `ℹ️ Info: ${message}`, '\x1b[0m');
18
+ }
19
+
20
+ static title(message) {
21
+ console.log('\x1b[35m\x1b[1m', `🎯 ${message}`, '\x1b[0m');
22
+ }
23
+
24
+ static subtitle(message) {
25
+ console.log('\x1b[34m', `📋 ${message}`, '\x1b[0m');
26
+ }
27
+
28
+ static step(stepNumber, message) {
29
+ console.log('\x1b[36m', `${stepNumber}. ${message}`, '\x1b[0m');
30
+ }
31
+
32
+ static highlight(message) {
33
+ console.log('\x1b[43m\x1b[30m', ` ${message} `, '\x1b[0m');
34
+ }
35
+
36
+ static newLine() {
37
+ console.log('');
38
+ }
39
+
40
+ static separator() {
41
+ console.log('\x1b[90m', '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', '\x1b[0m');
42
+ }
43
+
44
+ // Métodos para el contexto específico del CLI
45
+ static componentSuccess(componentName, action = 'processed') {
46
+ console.log('\x1b[32m', `✅ ${componentName} ${action} successfully!`, '\x1b[0m');
47
+ }
48
+
49
+ static componentError(componentName, action = 'processing', error) {
50
+ console.error('\x1b[31m', `❌ Error ${action} ${componentName}: ${error}`, '\x1b[0m');
51
+ }
52
+
53
+ static downloadProgress(fileName) {
54
+ console.log('\x1b[36m', ` 📥 Downloading ${fileName}...`, '\x1b[0m');
55
+ }
56
+
57
+ static downloadSuccess(fileName) {
58
+ console.log('\x1b[32m', ` ✅ ${fileName}`, '\x1b[0m');
59
+ }
60
+
61
+ static downloadError(fileName, error) {
62
+ console.error('\x1b[31m', ` ❌ Error downloading ${fileName}: ${error}`, '\x1b[0m');
63
+ }
64
+
65
+ static registryUpdate(message) {
66
+ console.log('\x1b[35m', `📝 Registry: ${message}`, '\x1b[0m');
67
+ }
68
+
69
+ static versionInfo(component, currentVersion, latestVersion = null) {
70
+ if (latestVersion && currentVersion !== latestVersion) {
71
+ console.log('\x1b[33m', `🔄 ${component}: v${currentVersion} → v${latestVersion}`, '\x1b[0m');
72
+ } else {
73
+ console.log('\x1b[32m', `✅ ${component}: v${currentVersion}`, '\x1b[0m');
74
+ }
75
+ }
76
+
77
+ static commandExample(description, command) {
78
+ console.log('\x1b[90m', `💡 ${description}:`, '\x1b[0m');
79
+ console.log('\x1b[37m', ` ${command}`, '\x1b[0m');
80
+ }
81
+
82
+ static summary(successful, failed, total) {
83
+ Print.separator();
84
+ console.log('\x1b[1m', '📊 Summary:', '\x1b[0m');
85
+ if (successful > 0) {
86
+ Print.success(`Successful: ${successful}/${total}`);
87
+ }
88
+ if (failed > 0) {
89
+ Print.error(`Failed: ${failed}/${total}`);
90
+ }
91
+ Print.separator();
92
+ }
12
93
  }
@@ -19,7 +19,7 @@ class ComponentRegistry {
19
19
  }
20
20
 
21
21
  async loadRegistry() {
22
- Print.info('📡 Cargando registro de componentes del repositorio oficial...');
22
+ Print.info('Loading component registry from official repository...');
23
23
 
24
24
  try {
25
25
  const response = await fetch(COMPONENTS_REGISTRY_URL);
@@ -37,11 +37,11 @@ class ComponentRegistry {
37
37
  }
38
38
 
39
39
  this.componentsRegistry = eval('(' + match[1] + ')');
40
- Print.success(' Registro de componentes cargado exitosamente');
40
+ Print.success('Component registry loaded successfully');
41
41
 
42
42
  } catch (error) {
43
- Print.error(`❌ Error cargando registro de componentes: ${error.message}`);
44
- Print.info('💡 Verifica tu conexión a internet y que el repositorio sea accesible');
43
+ Print.error(`Loading component registry: ${error.message}`);
44
+ Print.info('Check your internet connection and repository accessibility');
45
45
  throw error;
46
46
  }
47
47
  }
@@ -154,7 +154,7 @@ class ComponentRegistry {
154
154
  }
155
155
 
156
156
  const downloadedFiles = [];
157
- Print.info(`📥 Descargando ${componentName} desde el repositorio oficial...`);
157
+ Print.info(`Downloading ${componentName} from official repository...`);
158
158
 
159
159
  for (const fileName of component.files) {
160
160
  const githubUrl = `${DOCS_REPO_BASE_URL}/${category}/${componentName}/${fileName}`;
@@ -164,16 +164,16 @@ class ComponentRegistry {
164
164
  const response = await fetch(githubUrl);
165
165
 
166
166
  if (!response.ok) {
167
- throw new Error(`HTTP ${response.status}: ${response.statusText} para ${fileName}`);
167
+ throw new Error(`HTTP ${response.status}: ${response.statusText} for ${fileName}`);
168
168
  }
169
169
 
170
170
  const content = await response.text();
171
171
  await fs.writeFile(localPath, content, 'utf8');
172
172
  downloadedFiles.push(fileName);
173
173
 
174
- console.log(` ✅ ${fileName}`);
174
+ Print.downloadSuccess(fileName);
175
175
  } catch (error) {
176
- Print.error(` ❌ Error descargando ${fileName}: ${error.message}`);
176
+ Print.downloadError(fileName, error.message);
177
177
  throw error;
178
178
  }
179
179
  }
@@ -215,13 +215,13 @@ class ComponentRegistry {
215
215
  const newContent = `const components = ${newComponentsString}; export default components;`;
216
216
 
217
217
  await fs.writeFile(componentsPath, newContent, 'utf8');
218
- Print.success(`📝 Registrado ${componentName} en components.js local`);
218
+ Print.registryUpdate(`Registered ${componentName} in local components.js`);
219
219
  } else {
220
- Print.info(`📄 ${componentName} ya existe en el registro local`);
220
+ Print.info(`${componentName} already exists in local registry`);
221
221
  }
222
222
 
223
223
  } catch (error) {
224
- Print.error(`❌ Error actualizando components.js local: ${error.message}`);
224
+ Print.error(`Updating local components.js: ${error.message}`);
225
225
  throw error;
226
226
  }
227
227
  }
@@ -248,7 +248,7 @@ class ComponentRegistry {
248
248
  ]);
249
249
 
250
250
  if (!overwrite) {
251
- Print.info('⏭️ Instalación cancelada por el usuario');
251
+ Print.info('Installation cancelled by user');
252
252
  return false;
253
253
  }
254
254
  }
@@ -263,14 +263,14 @@ class ComponentRegistry {
263
263
  // Update components registry
264
264
  await this.updateLocalRegistry(componentName, category);
265
265
 
266
- Print.success(`✅ ${componentName} actualizado exitosamente desde el repositorio oficial!`);
267
- console.log(`📁 Ubicación: src/${categoryPath}/${componentName}/`);
268
- console.log(`📄 Archivos: ${downloadedFiles.join(', ')}`);
266
+ Print.success(`${componentName} updated successfully from official repository!`);
267
+ console.log(`📁 Location: src/${categoryPath}/${componentName}/`);
268
+ console.log(`📄 Files: ${downloadedFiles.join(', ')}`);
269
269
 
270
270
  return true;
271
271
 
272
272
  } catch (error) {
273
- Print.error(`❌ Error actualizando ${componentName}: ${error.message}`);
273
+ Print.error(`Error updating ${componentName}: ${error.message}`);
274
274
  // Clean up partial installation
275
275
  if (await fs.pathExists(targetPath)) {
276
276
  await fs.remove(targetPath);
@@ -281,14 +281,14 @@ class ComponentRegistry {
281
281
 
282
282
  async installMultipleComponents(componentNames, category = 'Visual', force = false) {
283
283
  const results = [];
284
- Print.info(`🚀 Obteniendo ${componentNames.length} componentes ${category} del repositorio oficial...\n`);
284
+ Print.info(`Getting ${componentNames.length} ${category} components from official repository...`);
285
285
 
286
286
  for (const componentName of componentNames) {
287
287
  try {
288
288
  const result = await this.installComponent(componentName, category, force);
289
289
  results.push({ name: componentName, success: result });
290
290
  } catch (error) {
291
- Print.error(`❌ Error con ${componentName}: ${error.message}\n`);
291
+ Print.componentError(componentName, 'getting', error.message);
292
292
  results.push({ name: componentName, success: false, error: error.message });
293
293
  }
294
294
  }
@@ -297,30 +297,26 @@ class ComponentRegistry {
297
297
  const successful = results.filter(r => r.success).length;
298
298
  const failed = results.filter(r => !r.success).length;
299
299
 
300
- console.log(`\n📊 Resumen de instalación:`);
301
- Print.success(`✅ Exitosos: ${successful}`);
302
- if (failed > 0) {
303
- Print.error(`❌ Fallidos: ${failed}`);
304
- results.filter(r => !r.success).forEach(r => {
305
- console.log(` • ${r.name}: ${r.error}`);
306
- });
307
- }
300
+ Print.newLine();
301
+ Print.summary(successful, failed, componentNames.length);
308
302
 
309
303
  return results;
310
304
  }
311
305
 
312
306
  async updateAllComponents(force = false) {
313
- Print.info('🔄 Buscando componentes actualizables...');
307
+ Print.info('Looking for updatable components...');
314
308
 
315
309
  const updatableComponents = await this.findUpdatableComponents();
316
310
 
317
311
  if (updatableComponents.length === 0) {
318
- Print.info('No se encontraron componentes locales que coincidan con el repositorio oficial');
319
- Print.info('💡 Usa "npm run slice:browse" para ver componentes disponibles');
312
+ Print.info('No local components found that match the official repository');
313
+ Print.info('Use "npm run slice:browse" to see available components');
320
314
  return true;
321
315
  }
322
316
 
323
- console.log(`\n📦 Encontrados ${updatableComponents.length} componentes actualizables:\n`);
317
+ Print.newLine();
318
+ Print.subtitle(`Found ${updatableComponents.length} updatable components:`);
319
+ Print.newLine();
324
320
  updatableComponents.forEach(comp => {
325
321
  const icon = comp.category === 'Visual' ? '🎨' : '⚙️';
326
322
  console.log(`${icon} ${comp.name} (${comp.category})`);
@@ -331,13 +327,13 @@ class ComponentRegistry {
331
327
  {
332
328
  type: 'confirm',
333
329
  name: 'confirmUpdate',
334
- message: `¿Deseas actualizar todos estos componentes a las versiones del repositorio oficial?`,
330
+ message: `Do you want to update all these components to the repository versions?`,
335
331
  default: true
336
332
  }
337
333
  ]);
338
334
 
339
335
  if (!confirmUpdate) {
340
- Print.info('⏭️ Actualización cancelada por el usuario');
336
+ Print.info('Update cancelled by user');
341
337
  return false;
342
338
  }
343
339
  }
@@ -350,14 +346,14 @@ class ComponentRegistry {
350
346
 
351
347
  // Update Visual components
352
348
  if (visualComponents.length > 0) {
353
- Print.info(`\n🎨 Actualizando ${visualComponents.length} componentes Visual...`);
349
+ Print.info(`Updating ${visualComponents.length} Visual components...`);
354
350
  const visualResults = await this.installMultipleComponents(visualComponents, 'Visual', true);
355
351
  allResults = allResults.concat(visualResults);
356
352
  }
357
353
 
358
354
  // Update Service components
359
355
  if (serviceComponents.length > 0) {
360
- Print.info(`\n⚙️ Actualizando ${serviceComponents.length} componentes Service...`);
356
+ Print.info(`Updating ${serviceComponents.length} Service components...`);
361
357
  const serviceResults = await this.installMultipleComponents(serviceComponents, 'Service', true);
362
358
  allResults = allResults.concat(serviceResults);
363
359
  }
@@ -366,13 +362,14 @@ class ComponentRegistry {
366
362
  const totalSuccessful = allResults.filter(r => r.success).length;
367
363
  const totalFailed = allResults.filter(r => !r.success).length;
368
364
 
369
- console.log(`\n🎯 Resumen final de actualización:`);
370
- Print.success(`✅ Componentes actualizados: ${totalSuccessful}`);
365
+ Print.newLine();
366
+ Print.title('Final Update Summary');
367
+ Print.success(`Components updated: ${totalSuccessful}`);
371
368
 
372
369
  if (totalFailed > 0) {
373
- Print.error(`❌ Componentes fallidos: ${totalFailed}`);
370
+ Print.error(`Components failed: ${totalFailed}`);
374
371
  } else {
375
- Print.success(`🚀 ¡Todos tus componentes están ahora actualizados a las últimas versiones oficiales!`);
372
+ Print.success('All your components are now updated to the latest official versions!');
376
373
  }
377
374
 
378
375
  return totalFailed === 0;
@@ -503,8 +500,8 @@ async function getComponents(componentNames = [], options = {}) {
503
500
  try {
504
501
  await registry.loadRegistry();
505
502
  } catch (error) {
506
- Print.error('No se pudo cargar el registro de componentes del repositorio oficial');
507
- Print.info('💡 Verifica tu conexión a internet y vuelve a intentar');
503
+ Print.error('Could not load component registry from official repository');
504
+ Print.info('Check your internet connection and try again');
508
505
  return false;
509
506
  }
510
507
 
@@ -522,8 +519,8 @@ async function getComponents(componentNames = [], options = {}) {
522
519
  const componentInfo = registry.findComponentInRegistry(componentNames[0]);
523
520
 
524
521
  if (!componentInfo) {
525
- Print.error(`Componente '${componentNames[0]}' no encontrado en el repositorio oficial`);
526
- Print.info('💡 Usa "npm run slice:browse" para ver componentes disponibles');
522
+ Print.error(`Component '${componentNames[0]}' not found in official repository`);
523
+ Print.commandExample('View available components', 'npm run slice:browse');
527
524
  return false;
528
525
  }
529
526
 
@@ -534,7 +531,7 @@ async function getComponents(componentNames = [], options = {}) {
534
531
  await registry.installComponent(componentInfo.name, actualCategory, options.force);
535
532
  return true;
536
533
  } catch (error) {
537
- Print.error(`Error: ${error.message}`);
534
+ Print.error(`${error.message}`);
538
535
  return false;
539
536
  }
540
537
  } else {
@@ -547,7 +544,7 @@ async function getComponents(componentNames = [], options = {}) {
547
544
  await registry.installMultipleComponents(normalizedComponents, category, options.force);
548
545
  return true;
549
546
  } catch (error) {
550
- Print.error(`Error: ${error.message}`);
547
+ Print.error(`${error.message}`);
551
548
  return false;
552
549
  }
553
550
  }
@@ -562,8 +559,8 @@ async function listComponents() {
562
559
  registry.displayAvailableComponents();
563
560
  return true;
564
561
  } catch (error) {
565
- Print.error('No se pudo cargar el registro de componentes del repositorio oficial');
566
- Print.info('💡 Verifica tu conexión a internet y vuelve a intentar');
562
+ Print.error('Could not load component registry from official repository');
563
+ Print.info('Check your internet connection and try again');
567
564
  return false;
568
565
  }
569
566
  }
@@ -576,8 +573,8 @@ async function syncComponents(options = {}) {
576
573
  await registry.loadRegistry();
577
574
  return await registry.updateAllComponents(options.force);
578
575
  } catch (error) {
579
- Print.error('No se pudo cargar el registro de componentes del repositorio oficial');
580
- Print.info('💡 Verifica tu conexión a internet y vuelve a intentar');
576
+ Print.error('Could not load component registry from official repository');
577
+ Print.info('Check your internet connection and try again');
581
578
  return false;
582
579
  }
583
580
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slicejs-cli",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Command client for developing web applications with Slice.js framework",
5
5
  "main": "client.js",
6
6
  "scripts": {
package/post.js CHANGED
@@ -50,7 +50,7 @@ fs.promises.access(projectPackageJsonPath, fs.constants.F_OK)
50
50
  // Module configuration
51
51
  projectPackageJson.type = 'module';
52
52
  projectPackageJson.engines = {
53
- "node": "20.x"
53
+ "node": ">=20.0.0"
54
54
  };
55
55
 
56
56
  // Write the new content to package.json
@@ -85,7 +85,7 @@ fs.promises.access(projectPackageJsonPath, fs.constants.F_OK)
85
85
  scripts: {
86
86
  // Main commands
87
87
  'slice:init': 'node node_modules/slicejs-cli/client.js init',
88
- 'slice:start': 'node node_modules/slicejs-cli/client.js start',
88
+ 'slice:start': 'node api/index.js',
89
89
  'slice:version': 'node node_modules/slicejs-cli/client.js version',
90
90
  'slice:update': 'node node_modules/slicejs-cli/client.js update',
91
91
 
@@ -112,7 +112,7 @@ fs.promises.access(projectPackageJsonPath, fs.constants.F_OK)
112
112
  license: 'ISC',
113
113
  type: 'module',
114
114
  engines: {
115
- "node": "20.x"
115
+ "node": ">=20.0.0"
116
116
  }
117
117
  };
118
118