@icarusmx/creta 1.5.9 → 1.5.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.
- package/bin/creta.js +55 -3
- package/package.json +1 -1
package/bin/creta.js
CHANGED
|
@@ -13,6 +13,7 @@ import { CommandHelpExecutor } from '../lib/executors/CommandHelpExecutor.js'
|
|
|
13
13
|
import { PapersExecutor } from '../lib/papers/PapersExecutor.js'
|
|
14
14
|
import { ExercisesExecutor } from '../lib/executors/ExercisesExecutor.js'
|
|
15
15
|
import { executeSintaxis } from '../lib/executors/sintaxis-executor.js'
|
|
16
|
+
import { UserState } from '../lib/utils/user-state.js'
|
|
16
17
|
import { LessonBuilder } from '../lib/builders/LessonBuilder.js'
|
|
17
18
|
import { LESSON_1_SYSTEM_DECOMPOSITION } from '../lib/data/lessons/lesson1-system-decomposition.js'
|
|
18
19
|
import { LESSON_2_OBJECT_REQUESTS } from '../lib/data/lessons/lesson2-object-requests.js'
|
|
@@ -122,6 +123,24 @@ if (command.startsWith('portafolio')) {
|
|
|
122
123
|
// Show AWS billing detective guide
|
|
123
124
|
const viewer = new AWSGuideViewer()
|
|
124
125
|
await viewer.start()
|
|
126
|
+
} else if (command === 'reset') {
|
|
127
|
+
// Reset user state with confirmation
|
|
128
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout })
|
|
129
|
+
const answer = await new Promise(resolve => {
|
|
130
|
+
rl.question('⚠️ ¿Estás seguro de eliminar tu progreso? (s/N): ', resolve)
|
|
131
|
+
})
|
|
132
|
+
rl.close()
|
|
133
|
+
|
|
134
|
+
if (answer.toLowerCase() === 's' || answer.toLowerCase() === 'si') {
|
|
135
|
+
UserState.reset()
|
|
136
|
+
console.log('✅ Estado de usuario reiniciado')
|
|
137
|
+
console.log(' Se eliminó ~/.creta/user.json')
|
|
138
|
+
} else {
|
|
139
|
+
console.log('❌ Cancelado')
|
|
140
|
+
}
|
|
141
|
+
} else if (command === 'privacy' || command === 'privacidad') {
|
|
142
|
+
// Show privacy information
|
|
143
|
+
showPrivacyInfo()
|
|
125
144
|
} else if (command === 'help' || command === 'ayuda') {
|
|
126
145
|
// Show available commands
|
|
127
146
|
showHelp()
|
|
@@ -611,9 +630,9 @@ async function unstuckProject(level) {
|
|
|
611
630
|
}
|
|
612
631
|
|
|
613
632
|
function showHelp() {
|
|
614
|
-
console.log("\nCreta es una herramienta de CLI
|
|
615
|
-
console.log("El propósito
|
|
616
|
-
console.log("
|
|
633
|
+
console.log("\nCreta es una herramienta de CLI para el taller de software.")
|
|
634
|
+
console.log("El propósito es acompañar a aprendices y constructores")
|
|
635
|
+
console.log("en su camino de aprendizaje.\n")
|
|
617
636
|
|
|
618
637
|
console.log("📖 Documentación de comandos:")
|
|
619
638
|
console.log(" creta ls - Documentación en español del comando ls")
|
|
@@ -631,9 +650,42 @@ function showHelp() {
|
|
|
631
650
|
console.log(" creta portafolio - Crea tu portafolio personal")
|
|
632
651
|
console.log(" creta code - Sesión interactiva de programación con IA\n")
|
|
633
652
|
|
|
653
|
+
console.log("🔧 Utilidades:")
|
|
654
|
+
console.log(" creta reset - Reinicia tu progreso (elimina ~/.creta/user.json)")
|
|
655
|
+
console.log(" creta privacy - Explica qué datos guarda Creta y dónde\n")
|
|
656
|
+
|
|
634
657
|
console.log("💡 Usa 'creta' sin argumentos para ver el menú principal.")
|
|
635
658
|
}
|
|
636
659
|
|
|
660
|
+
function showPrivacyInfo() {
|
|
661
|
+
console.log('\n🔒 Privacidad y Datos en Creta\n')
|
|
662
|
+
console.log('Creta almacena datos localmente en tu computadora:')
|
|
663
|
+
console.log('')
|
|
664
|
+
console.log('📍 Ubicación: ~/.creta/')
|
|
665
|
+
console.log('')
|
|
666
|
+
console.log('📄 Archivos:')
|
|
667
|
+
console.log(' • user.json - Tu progreso y preferencias')
|
|
668
|
+
console.log('')
|
|
669
|
+
console.log('📊 ¿Qué se guarda?')
|
|
670
|
+
console.log(' • Nombre (opcional)')
|
|
671
|
+
console.log(' • Lecciones completadas')
|
|
672
|
+
console.log(' • Proyectos creados')
|
|
673
|
+
console.log(' • Papers completados')
|
|
674
|
+
console.log(' • Estadísticas de uso (sesiones, última visita)')
|
|
675
|
+
console.log('')
|
|
676
|
+
console.log('🔐 ¿Es privado?')
|
|
677
|
+
console.log(' • SÍ - Todo permanece en tu máquina')
|
|
678
|
+
console.log(' • No se envía nada a servidores externos')
|
|
679
|
+
console.log(' • No hay telemetría ni tracking')
|
|
680
|
+
console.log(' • Tú controlas tus datos')
|
|
681
|
+
console.log('')
|
|
682
|
+
console.log('🗑️ ¿Cómo borrarlo?')
|
|
683
|
+
console.log(' • creta reset - Elimina user.json')
|
|
684
|
+
console.log(' • rm -rf ~/.creta - Elimina todo manualmente')
|
|
685
|
+
console.log('')
|
|
686
|
+
console.log('💡 Filosofía: Tu progreso es tuyo. Local-first siempre.')
|
|
687
|
+
}
|
|
688
|
+
|
|
637
689
|
async function startMainMenu() {
|
|
638
690
|
// Always try interactive mode first, fall back only if it fails
|
|
639
691
|
try {
|