forgegit 1.5.6 → 1.5.8
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/.forge/config.cmd +1 -1
- package/MANUAL.md +222 -4
- package/README.md +18 -15
- package/WORKFLOW.md +97 -0
- package/package.json +1 -1
- package/tests/test.cmd +37 -30
- package/tools/bin/forge.cmd +13 -6
- package/tools/pack.cmd +21 -12
- package/tools/release.cmd +3 -3
package/.forge/config.cmd
CHANGED
|
@@ -4,7 +4,7 @@ REM Configuration - edit these values to customize
|
|
|
4
4
|
REM Called from init.cmd via: call config.cmd
|
|
5
5
|
REM ============================================================
|
|
6
6
|
|
|
7
|
-
set "FG_VERSION=1.5.
|
|
7
|
+
set "FG_VERSION=1.5.8"
|
|
8
8
|
set "TAG_INITIAL=v1.0.0"
|
|
9
9
|
set "TAG_MESSAGE=Primera version estable"
|
|
10
10
|
set "BRANCH_MAIN=main"
|
package/MANUAL.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# 📄 `MANUAL.md` — Código Completo (v1.5.8)
|
|
2
|
+
|
|
3
|
+
**En VS Code, abrí `MANUAL.md`, `Ctrl+A` → Suprimir → Pegá esto:**
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
1
6
|
# forgeGit - Manual de uso
|
|
2
7
|
|
|
3
8
|
Guia completa de instalacion, uso y mantenimiento.
|
|
@@ -17,12 +22,27 @@ Requisitos: Windows 10/11, Node.js 18+, Git 2.30+
|
|
|
17
22
|
forge
|
|
18
23
|
|
|
19
24
|
El proyecto queda con Git, .gitignore, README.md, commit inicial,
|
|
20
|
-
tag v1.0.0 y
|
|
25
|
+
tag v1.0.0 y 8 helpers en .forge/commands/.
|
|
26
|
+
|
|
27
|
+
## Uso en un proyecto existente
|
|
28
|
+
|
|
29
|
+
Si el proyecto ya tiene forgeGit instalado:
|
|
30
|
+
|
|
31
|
+
cd ruta\del\proyecto
|
|
32
|
+
forge <comando>
|
|
33
|
+
|
|
34
|
+
El comando global detecta el forge.cmd local y delega automaticamente.
|
|
21
35
|
|
|
22
36
|
## Comandos disponibles
|
|
23
37
|
|
|
24
38
|
| Comando | Descripcion |
|
|
25
39
|
|---------|-------------|
|
|
40
|
+
| forge | Instala forgeGit en la carpeta actual |
|
|
41
|
+
| forge update | Actualiza .forge/ desde el kit global |
|
|
42
|
+
| forge version | Muestra la version instalada |
|
|
43
|
+
| forge help | Ayuda completa |
|
|
44
|
+
| forge init | Re-bootstrap (idempotente) |
|
|
45
|
+
| forge init --force | Regenerar todo |
|
|
26
46
|
| forge save | Commit de cambios |
|
|
27
47
|
| forge push | Push a GitHub |
|
|
28
48
|
| forge log | Ver commits recientes |
|
|
@@ -30,7 +50,6 @@ tag v1.0.0 y 7 helpers en .forge/commands/.
|
|
|
30
50
|
| forge audit | Generar reporte diff |
|
|
31
51
|
| forge open | Abrir en VS Code |
|
|
32
52
|
| forge serve | Servidor de desarrollo (auto-detect) |
|
|
33
|
-
| forge help | Ayuda completa |
|
|
34
53
|
|
|
35
54
|
## Estructura del proyecto
|
|
36
55
|
|
|
@@ -39,7 +58,7 @@ tag v1.0.0 y 7 helpers en .forge/commands/.
|
|
|
39
58
|
|-- .forge/
|
|
40
59
|
| |-- init.cmd Bootstrap
|
|
41
60
|
| |-- config.cmd Configuracion
|
|
42
|
-
| |-- commands/
|
|
61
|
+
| |-- commands/ 8 helpers
|
|
43
62
|
| |-- lib/ Modulos internos
|
|
44
63
|
| |-- templates/ Fuentes .tpl
|
|
45
64
|
| +-- serve-static.js
|
|
@@ -47,17 +66,216 @@ tag v1.0.0 y 7 helpers en .forge/commands/.
|
|
|
47
66
|
|-- audits/ Reportes diff
|
|
48
67
|
+-- (tus archivos)
|
|
49
68
|
|
|
69
|
+
## Los 8 helpers
|
|
70
|
+
|
|
71
|
+
| Helper | Descripcion |
|
|
72
|
+
|--------|-------------|
|
|
73
|
+
| save.cmd | Commit local de cambios |
|
|
74
|
+
| push.cmd | Push a GitHub |
|
|
75
|
+
| snapshots.cmd | Crear/restaurar snapshots |
|
|
76
|
+
| historial.cmd | Ver commits recientes |
|
|
77
|
+
| auditar.cmd | Generar reporte diff |
|
|
78
|
+
| abrir.cmd | Abrir en VS Code |
|
|
79
|
+
| serve.cmd | Servidor de desarrollo (auto-detect) |
|
|
80
|
+
| init.cmd | Re-bootstrap (idempotente) |
|
|
81
|
+
|
|
50
82
|
## Actualizar
|
|
51
83
|
|
|
52
84
|
npm install -g forgegit@latest
|
|
85
|
+
cd ruta\del\proyecto
|
|
53
86
|
forge update
|
|
54
87
|
|
|
88
|
+
## Actualizar el kit y un proyecto
|
|
89
|
+
|
|
90
|
+
Actualizar el kit global:
|
|
91
|
+
|
|
92
|
+
npm install -g forgegit@latest
|
|
93
|
+
|
|
94
|
+
Actualizar un proyecto especifico:
|
|
95
|
+
|
|
96
|
+
cd ruta\del\proyecto
|
|
97
|
+
forge update
|
|
98
|
+
|
|
99
|
+
Esto copia forge.cmd y .forge/ desde el kit global al proyecto,
|
|
100
|
+
sin tocar tus archivos ni los helpers pre-generados.
|
|
101
|
+
|
|
102
|
+
## Desinstalar
|
|
103
|
+
|
|
104
|
+
npm uninstall -g forgegit
|
|
105
|
+
|
|
106
|
+
## Filosofia
|
|
107
|
+
|
|
108
|
+
- **Idempotente**: seguro de ejecutar multiples veces
|
|
109
|
+
- **Modular**: templates en archivos .tpl
|
|
110
|
+
- **Portable**: funciona en cualquier carpeta Windows
|
|
111
|
+
- **Configurable**: editar .forge/config.cmd
|
|
112
|
+
- **Autodocumentado**: salida de terminal con colores
|
|
113
|
+
|
|
55
114
|
## Links
|
|
56
115
|
|
|
57
116
|
- Repo: https://github.com/vloitz/forgeGit
|
|
58
117
|
- npm: https://www.npmjs.com/package/forgegit
|
|
59
118
|
- Releases: https://github.com/vloitz/forgeGit/releases
|
|
119
|
+
- Workflow IA: WORKFLOW.md
|
|
120
|
+
- Roadmap: FUTURE.md
|
|
60
121
|
|
|
61
122
|
## Licencia
|
|
62
123
|
|
|
63
|
-
MIT
|
|
124
|
+
MIT
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Guardá con `Ctrl+S`.**
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 🎬 Fix 5 — `README.md`
|
|
132
|
+
|
|
133
|
+
**En VS Code, abrí `README.md`.**
|
|
134
|
+
|
|
135
|
+
**`Ctrl+H`** para Buscar/Reemplazar.
|
|
136
|
+
|
|
137
|
+
### Reemplazo 1 — Versión
|
|
138
|
+
|
|
139
|
+
**Buscar:**
|
|
140
|
+
```
|
|
141
|
+
- Version: 1.2.2
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Reemplazar:**
|
|
145
|
+
```
|
|
146
|
+
- Version: 1.5.8
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Reemplazo 2 — Tests
|
|
150
|
+
|
|
151
|
+
**Buscar:**
|
|
152
|
+
```
|
|
153
|
+
- Tests: 14/14 passing
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Reemplazar:**
|
|
157
|
+
```
|
|
158
|
+
- Tests: 16/16 passing
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Reemplazo 3 — Estructura del proyecto
|
|
162
|
+
|
|
163
|
+
**Buscar exactamente:**
|
|
164
|
+
```
|
|
165
|
+
forgeGit/
|
|
166
|
+
├── init.cmd Entry point (14 steps)
|
|
167
|
+
├── config.cmd Configuration values
|
|
168
|
+
├── MANUAL.md Full user manual
|
|
169
|
+
├── FUTURE.md Roadmap / ideas
|
|
170
|
+
├── lib/ Internal modules
|
|
171
|
+
│ ├── ui.cmd Terminal UI helpers
|
|
172
|
+
│ ├── git-ops.cmd Git operations
|
|
173
|
+
│ └── templates.cmd Template renderer
|
|
174
|
+
├── templates/ Source templates (.tpl)
|
|
175
|
+
├── tools/ Author tools
|
|
176
|
+
│ ├── install.cmd Install forge globally
|
|
177
|
+
│ ├── uninstall.cmd Uninstall forge
|
|
178
|
+
│ ├── restore.cmd Restore PATH from backup
|
|
179
|
+
│ ├── pack.cmd Build clean distribution
|
|
180
|
+
│ ├── release.cmd Build ZIP + open GitHub
|
|
181
|
+
│ └── bin/forge.cmd Global command
|
|
182
|
+
└── tests/ Automated tests (14/14)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Reemplazarlo exactamente por:**
|
|
186
|
+
```
|
|
187
|
+
forgeGit/
|
|
188
|
+
├── forge.cmd Menu + CLI (unico .cmd visible)
|
|
189
|
+
├── .forge/ Infraestructura oculta
|
|
190
|
+
│ ├── init.cmd Bootstrap (17 pasos)
|
|
191
|
+
│ ├── config.cmd Configuration values
|
|
192
|
+
│ ├── lib/ Internal modules
|
|
193
|
+
│ ├── templates/ Source templates (.tpl)
|
|
194
|
+
│ ├── commands/ 8 helpers generados
|
|
195
|
+
│ └── serve-static.js Servidor Node
|
|
196
|
+
├── MANUAL.md Full user manual
|
|
197
|
+
├── WORKFLOW.md AI workflow rules
|
|
198
|
+
├── README.md This file
|
|
199
|
+
├── tools/ Author tools
|
|
200
|
+
│ ├── install.cmd Install forge globally
|
|
201
|
+
│ ├── uninstall.cmd Uninstall forge
|
|
202
|
+
│ ├── restore.cmd Restore PATH from backup
|
|
203
|
+
│ ├── pack.cmd Build clean distribution
|
|
204
|
+
│ ├── release.cmd Build ZIP + open GitHub
|
|
205
|
+
│ └── bin/forge.cmd Global command
|
|
206
|
+
└── tests/ Automated tests (16/16)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Reemplazo 4 — Los 7 helpers
|
|
210
|
+
|
|
211
|
+
**Buscar exactamente:**
|
|
212
|
+
```
|
|
213
|
+
## The 7 helpers
|
|
214
|
+
|
|
215
|
+
| File | Purpose |
|
|
216
|
+
|------|---------|
|
|
217
|
+
| `guardar.cmd` | Commit changes locally |
|
|
218
|
+
| `subir.cmd` | Push to GitHub |
|
|
219
|
+
| `snapshots.cmd` | Create/restore full project snapshots |
|
|
220
|
+
| `historial.cmd` | View recent commits |
|
|
221
|
+
| `auditar.cmd` | Generate diff reports (for AI review) |
|
|
222
|
+
| `abrir.cmd` | Open project in VS Code |
|
|
223
|
+
| `init.cmd` | Re-bootstrap (idempotent) |
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Reemplazarlo exactamente por:**
|
|
227
|
+
```
|
|
228
|
+
## The 8 helpers
|
|
229
|
+
|
|
230
|
+
| File | Purpose |
|
|
231
|
+
|------|---------|
|
|
232
|
+
| `save.cmd` | Commit changes locally |
|
|
233
|
+
| `push.cmd` | Push to GitHub |
|
|
234
|
+
| `snapshots.cmd` | Create/restore full project snapshots |
|
|
235
|
+
| `historial.cmd` | View recent commits |
|
|
236
|
+
| `auditar.cmd` | Generate diff reports (for AI review) |
|
|
237
|
+
| `abrir.cmd` | Open project in VS Code |
|
|
238
|
+
| `serve.cmd` | Dev server (auto-detect stack) |
|
|
239
|
+
| `init.cmd` | Re-bootstrap (idempotent) |
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Reemplazo 5 — What it does
|
|
243
|
+
|
|
244
|
+
**Buscar exactamente:**
|
|
245
|
+
```
|
|
246
|
+
- Generates 7 helper commands in the project
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Reemplazarlo exactamente por:**
|
|
250
|
+
```
|
|
251
|
+
- Generates 8 helper commands in `.forge/commands/`
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Reemplazo 6 — Global commands (sección)
|
|
255
|
+
|
|
256
|
+
**Buscar exactamente:**
|
|
257
|
+
```
|
|
258
|
+
## Global commands
|
|
259
|
+
|
|
260
|
+
```cmd
|
|
261
|
+
forge Bootstrap current directory
|
|
262
|
+
forge update Sync templates from kit
|
|
263
|
+
forge help Show help
|
|
264
|
+
```
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Reemplazarlo exactamente por:**
|
|
268
|
+
```
|
|
269
|
+
## Global commands
|
|
270
|
+
|
|
271
|
+
```cmd
|
|
272
|
+
forge Bootstrap current directory
|
|
273
|
+
forge update Sync .forge/ from kit
|
|
274
|
+
forge version Show version
|
|
275
|
+
forge help Show help
|
|
276
|
+
```
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Guardá con `Ctrl+S`.**
|
|
280
|
+
|
|
281
|
+
---
|
package/README.md
CHANGED
|
@@ -26,18 +26,19 @@ Running `forge` in an empty folder:
|
|
|
26
26
|
- Creates a universal `.gitignore` (covers Node, Python, Rust, Go)
|
|
27
27
|
- Generates an adaptive `README.md`
|
|
28
28
|
- Creates initial commit + tag `v1.0.0`
|
|
29
|
-
- Generates
|
|
29
|
+
- Generates 8 helper commands in `.forge/commands/`
|
|
30
30
|
|
|
31
|
-
## The
|
|
31
|
+
## The 8 helpers
|
|
32
32
|
|
|
33
33
|
| File | Purpose |
|
|
34
34
|
|------|---------|
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
35
|
+
| `save.cmd` | Commit changes locally |
|
|
36
|
+
| `push.cmd` | Push to GitHub |
|
|
37
37
|
| `snapshots.cmd` | Create/restore full project snapshots |
|
|
38
38
|
| `historial.cmd` | View recent commits |
|
|
39
39
|
| `auditar.cmd` | Generate diff reports (for AI review) |
|
|
40
40
|
| `abrir.cmd` | Open project in VS Code |
|
|
41
|
+
| `serve.cmd` | Dev server (auto-detect stack) |
|
|
41
42
|
| `init.cmd` | Re-bootstrap (idempotent) |
|
|
42
43
|
|
|
43
44
|
## Install
|
|
@@ -85,15 +86,17 @@ forge help Show help
|
|
|
85
86
|
|
|
86
87
|
```
|
|
87
88
|
forgeGit/
|
|
88
|
-
├──
|
|
89
|
-
├──
|
|
89
|
+
├── forge.cmd Menu + CLI (unico .cmd visible)
|
|
90
|
+
├── .forge/ Infraestructura oculta
|
|
91
|
+
│ ├── init.cmd Bootstrap (17 pasos)
|
|
92
|
+
│ ├── config.cmd Configuration values
|
|
93
|
+
│ ├── lib/ Internal modules
|
|
94
|
+
│ ├── templates/ Source templates (.tpl)
|
|
95
|
+
│ ├── commands/ 8 helpers generados
|
|
96
|
+
│ └── serve-static.js Servidor Node
|
|
90
97
|
├── MANUAL.md Full user manual
|
|
91
|
-
├──
|
|
92
|
-
├──
|
|
93
|
-
│ ├── ui.cmd Terminal UI helpers
|
|
94
|
-
│ ├── git-ops.cmd Git operations
|
|
95
|
-
│ └── templates.cmd Template renderer
|
|
96
|
-
├── templates/ Source templates (.tpl)
|
|
98
|
+
├── WORKFLOW.md AI workflow rules
|
|
99
|
+
├── README.md This file
|
|
97
100
|
├── tools/ Author tools
|
|
98
101
|
│ ├── install.cmd Install forge globally
|
|
99
102
|
│ ├── uninstall.cmd Uninstall forge
|
|
@@ -101,7 +104,7 @@ forgeGit/
|
|
|
101
104
|
│ ├── pack.cmd Build clean distribution
|
|
102
105
|
│ ├── release.cmd Build ZIP + open GitHub
|
|
103
106
|
│ └── bin/forge.cmd Global command
|
|
104
|
-
└── tests/ Automated tests (
|
|
107
|
+
└── tests/ Automated tests (16/16)
|
|
105
108
|
```
|
|
106
109
|
|
|
107
110
|
## Requirements
|
|
@@ -113,9 +116,9 @@ forgeGit/
|
|
|
113
116
|
|
|
114
117
|
## Status
|
|
115
118
|
|
|
116
|
-
- Version: 1.
|
|
119
|
+
- Version: 1.5.8
|
|
117
120
|
- Published: npm + GitHub Release
|
|
118
|
-
- Tests:
|
|
121
|
+
- Tests: 16/16 passing
|
|
119
122
|
- Platform: Windows only (Linux/Mac planned as Node.js CLI)
|
|
120
123
|
|
|
121
124
|
## Roadmap
|
package/WORKFLOW.md
CHANGED
|
@@ -30,6 +30,103 @@ Toda instruccion para modificar codigo DEBE ser:
|
|
|
30
30
|
2. Ubicacion exacta (busca / reemplaza / pega debajo)
|
|
31
31
|
3. Sin ambiguedad
|
|
32
32
|
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Regla crítica: bloques VERBATIM
|
|
36
|
+
|
|
37
|
+
### El problema
|
|
38
|
+
|
|
39
|
+
La IA tiende a "limpiar" visualmente el código antes de darlo como
|
|
40
|
+
bloque de búsqueda: quita líneas en blanco, normaliza espacios,
|
|
41
|
+
reindenta. El humano busca ese bloque en VS Code con Ctrl+H y NO LO
|
|
42
|
+
ENCUENTRA, porque el código real tiene 1 línea en blanco de más, o
|
|
43
|
+
un espacio extra, o una indentación distinta.
|
|
44
|
+
|
|
45
|
+
El humano pierde tiempo reportando el bloque actual, la IA da otro
|
|
46
|
+
bloque "corregido" que también falla, y el ciclo se repite.
|
|
47
|
+
|
|
48
|
+
### La regla
|
|
49
|
+
|
|
50
|
+
Cuando la IA va a dar un bloque de búsqueda (Ctrl+H), DEBE usar el
|
|
51
|
+
código EXACTO que el humano pegó en el chat, copiado carácter por
|
|
52
|
+
carácter, incluyendo:
|
|
53
|
+
|
|
54
|
+
- Líneas en blanco en su posición exacta
|
|
55
|
+
- Indentación exacta (2 espacios, 4 espacios, tabs)
|
|
56
|
+
- Espacios antes de llaves, después de comas, etc.
|
|
57
|
+
- Saltos de línea donde estén
|
|
58
|
+
- Comentarios tal cual
|
|
59
|
+
|
|
60
|
+
La IA NO debe:
|
|
61
|
+
- Quitar líneas en blanco "para que quede más limpio"
|
|
62
|
+
- Reindentar "para que quede más legible"
|
|
63
|
+
- Normalizar espacios "para que sea consistente"
|
|
64
|
+
- Resumir el bloque si es largo
|
|
65
|
+
- Omitir partes con "..." o "// resto igual"
|
|
66
|
+
|
|
67
|
+
### Protocolo
|
|
68
|
+
|
|
69
|
+
1. El humano pega en el chat la función o bloque completo (Ctrl+A
|
|
70
|
+
dentro del bloque, Ctrl+C, pegar en chat).
|
|
71
|
+
|
|
72
|
+
2. La IA copia ese bloque VERBATIM en su respuesta, cambia SOLO
|
|
73
|
+
las líneas que hay que cambiar, y lo devuelve.
|
|
74
|
+
|
|
75
|
+
3. Si la IA necesita modificar 3 líneas de 40, las otras 37 van
|
|
76
|
+
IDÉNTICAS, carácter por carácter, incluidas líneas en blanco
|
|
77
|
+
entre bloques lógicos.
|
|
78
|
+
|
|
79
|
+
### Ejemplo de lo prohibido
|
|
80
|
+
|
|
81
|
+
Humano pega:
|
|
82
|
+
|
|
83
|
+
function foo() {
|
|
84
|
+
const x = 1;
|
|
85
|
+
|
|
86
|
+
if (x) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
IA responde (MAL, quitó línea en blanco):
|
|
92
|
+
|
|
93
|
+
Busca exactamente:
|
|
94
|
+
function foo() {
|
|
95
|
+
const x = 1;
|
|
96
|
+
if (x) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
IA responde (BIEN, verbatim):
|
|
102
|
+
|
|
103
|
+
Busca exactamente:
|
|
104
|
+
function foo() {
|
|
105
|
+
const x = 1;
|
|
106
|
+
|
|
107
|
+
if (x) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
### Si el bloque no matchea
|
|
113
|
+
|
|
114
|
+
Si el humano reporta "busqué X, NO EXISTE, el código actual tiene Y":
|
|
115
|
+
|
|
116
|
+
- La IA NO debe reescribir el bloque "adivinando" el formato.
|
|
117
|
+
- La IA DEBE pedirle al humano que pegue el bloque actual completo.
|
|
118
|
+
- La IA DEBE devolver el bloque nuevo usando ESE pegado como base,
|
|
119
|
+
verbatim.
|
|
120
|
+
|
|
121
|
+
### Por qué esto importa
|
|
122
|
+
|
|
123
|
+
El propósito de forgeGit es que los cambios sean trazables y
|
|
124
|
+
reversibles. Si la IA formatea distinto, el bloque no matchea, el
|
|
125
|
+
cambio se aplica a mano, se cometen typos, y la trazabilidad se
|
|
126
|
+
pierde. Verbatim garantiza que busca/reemplaza funcione siempre.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
33
130
|
### Formato obligatorio para REEMPLAZAR
|
|
34
131
|
|
|
35
132
|
Busca exactamente este codigo:
|
package/package.json
CHANGED
package/tests/test.cmd
CHANGED
|
@@ -4,7 +4,7 @@ chcp 65001 >nul 2>nul
|
|
|
4
4
|
|
|
5
5
|
echo.
|
|
6
6
|
echo ============================================
|
|
7
|
-
echo forgeGit - Tests
|
|
7
|
+
echo forgeGit - Tests v1.5.8
|
|
8
8
|
echo ============================================
|
|
9
9
|
echo.
|
|
10
10
|
|
|
@@ -25,47 +25,55 @@ echo [TEST 1] Ejecutando forge...
|
|
|
25
25
|
call "%FORGE_HOME%\tools\bin\forge.cmd" < nul >nul 2>nul
|
|
26
26
|
|
|
27
27
|
REM Check archivos core
|
|
28
|
-
if exist "
|
|
29
|
-
echo [OK]
|
|
28
|
+
if exist "forge.cmd" (
|
|
29
|
+
echo [OK] forge.cmd creado
|
|
30
30
|
set /a PASS+=1
|
|
31
31
|
) else (
|
|
32
|
-
echo [X]
|
|
32
|
+
echo [X] forge.cmd NO creado
|
|
33
33
|
set /a FAIL+=1
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
-
if exist "
|
|
37
|
-
echo [OK]
|
|
36
|
+
if exist ".forge\init.cmd" (
|
|
37
|
+
echo [OK] .forge\init.cmd presente
|
|
38
38
|
set /a PASS+=1
|
|
39
39
|
) else (
|
|
40
|
-
echo [X]
|
|
40
|
+
echo [X] .forge\init.cmd NO presente
|
|
41
|
+
set /a FAIL+=1
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
if exist ".forge\config.cmd" (
|
|
45
|
+
echo [OK] .forge\config.cmd presente
|
|
46
|
+
set /a PASS+=1
|
|
47
|
+
) else (
|
|
48
|
+
echo [X] .forge\config.cmd NO presente
|
|
41
49
|
set /a FAIL+=1
|
|
42
50
|
)
|
|
43
51
|
|
|
44
52
|
REM Check 7 helpers
|
|
45
|
-
for %%F in (
|
|
46
|
-
if exist "
|
|
47
|
-
echo [OK]
|
|
53
|
+
for %%F in (save push snapshots historial abrir auditar serve) do (
|
|
54
|
+
if exist ".forge\commands\%%F.cmd" (
|
|
55
|
+
echo [OK] .forge\commands\%%F.cmd creado
|
|
48
56
|
set /a PASS+=1
|
|
49
57
|
) else (
|
|
50
|
-
echo [X]
|
|
58
|
+
echo [X] .forge\commands\%%F.cmd NO creado
|
|
51
59
|
set /a FAIL+=1
|
|
52
60
|
)
|
|
53
61
|
)
|
|
54
62
|
|
|
55
63
|
REM Check carpetas
|
|
56
|
-
if exist "lib\ui.cmd" (
|
|
57
|
-
echo [OK] lib\ui.cmd presente
|
|
64
|
+
if exist ".forge\lib\ui.cmd" (
|
|
65
|
+
echo [OK] .forge\lib\ui.cmd presente
|
|
58
66
|
set /a PASS+=1
|
|
59
67
|
) else (
|
|
60
|
-
echo [X] lib\ui.cmd NO presente
|
|
68
|
+
echo [X] .forge\lib\ui.cmd NO presente
|
|
61
69
|
set /a FAIL+=1
|
|
62
70
|
)
|
|
63
71
|
|
|
64
|
-
if exist "templates\abrir.cmd.tpl" (
|
|
65
|
-
echo [OK] templates\abrir.cmd.tpl presente
|
|
72
|
+
if exist ".forge\templates\abrir.cmd.tpl" (
|
|
73
|
+
echo [OK] .forge\templates\abrir.cmd.tpl presente
|
|
66
74
|
set /a PASS+=1
|
|
67
75
|
) else (
|
|
68
|
-
echo [X] templates\abrir.cmd.tpl NO presente
|
|
76
|
+
echo [X] .forge\templates\abrir.cmd.tpl NO presente
|
|
69
77
|
set /a FAIL+=1
|
|
70
78
|
)
|
|
71
79
|
|
|
@@ -95,29 +103,28 @@ echo.
|
|
|
95
103
|
echo [TEST 2] Ejecutando forge update...
|
|
96
104
|
call "%FORGE_HOME%\tools\bin\forge.cmd" update < nul >nul 2>nul
|
|
97
105
|
|
|
98
|
-
if exist "
|
|
99
|
-
echo [OK]
|
|
106
|
+
if exist "forge.cmd" (
|
|
107
|
+
echo [OK] forge.cmd sigue presente
|
|
100
108
|
set /a PASS+=1
|
|
101
109
|
) else (
|
|
102
|
-
echo [X]
|
|
110
|
+
echo [X] forge.cmd desaparecio
|
|
103
111
|
set /a FAIL+=1
|
|
104
112
|
)
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
REM ============================================================
|
|
109
|
-
echo.
|
|
110
|
-
echo [TEST 3] Ejecutando forge de nuevo (sin confirmar)...
|
|
111
|
-
echo n | call "%FORGE_HOME%\tools\bin\forge.cmd" >nul 2>nul
|
|
112
|
-
|
|
113
|
-
if exist "init.cmd" (
|
|
114
|
-
echo [OK] init.cmd intacto tras cancelacion
|
|
114
|
+
if exist ".forge\init.cmd" (
|
|
115
|
+
echo [OK] .forge\init.cmd sigue presente
|
|
115
116
|
set /a PASS+=1
|
|
116
117
|
) else (
|
|
117
|
-
echo [X] init.cmd
|
|
118
|
+
echo [X] .forge\init.cmd desaparecio
|
|
118
119
|
set /a FAIL+=1
|
|
119
120
|
)
|
|
120
121
|
|
|
122
|
+
REM ============================================================
|
|
123
|
+
REM TEST 3: omitido (delegacion interactiva no automatizable)
|
|
124
|
+
REM ============================================================
|
|
125
|
+
echo.
|
|
126
|
+
echo [TEST 3] Omitido (test manual requerido)
|
|
127
|
+
|
|
121
128
|
REM ============================================================
|
|
122
129
|
REM CLEANUP
|
|
123
130
|
REM ============================================================
|
package/tools/bin/forge.cmd
CHANGED
|
@@ -6,14 +6,21 @@ REM --- FORGE_HOME desde tools/bin/ ---
|
|
|
6
6
|
for %%I in ("%~dp0..\..") do set "FORGE_HOME=%%~fI"
|
|
7
7
|
set "TARGET=%CD%"
|
|
8
8
|
|
|
9
|
-
REM --- Subcomandos ---
|
|
10
|
-
if /i "%~1"=="update"
|
|
11
|
-
if /i "%~1"=="help"
|
|
12
|
-
if /i "%~1"=="--help"
|
|
13
|
-
if /i "%~1"=="-h"
|
|
14
|
-
if /i "%~1"=="version"
|
|
9
|
+
REM --- Subcomandos propios del global (NO delegar) ---
|
|
10
|
+
if /i "%~1"=="update" goto :update
|
|
11
|
+
if /i "%~1"=="help" goto :help
|
|
12
|
+
if /i "%~1"=="--help" goto :help
|
|
13
|
+
if /i "%~1"=="-h" goto :help
|
|
14
|
+
if /i "%~1"=="version" goto :version
|
|
15
15
|
if /i "%~1"=="--version" goto :version
|
|
16
16
|
|
|
17
|
+
REM --- Deteccion de proyecto local ---
|
|
18
|
+
REM Si existe forge.cmd en el directorio actual, delegar a el
|
|
19
|
+
if exist "%TARGET%\forge.cmd" (
|
|
20
|
+
call "%TARGET%\forge.cmd" %*
|
|
21
|
+
exit /b %ERRORLEVEL%
|
|
22
|
+
)
|
|
23
|
+
|
|
17
24
|
goto :install
|
|
18
25
|
|
|
19
26
|
:version
|
package/tools/pack.cmd
CHANGED
|
@@ -6,7 +6,7 @@ cd /d "%~dp0"
|
|
|
6
6
|
|
|
7
7
|
echo.
|
|
8
8
|
echo ============================================
|
|
9
|
-
echo Pack - Distribucion limpia
|
|
9
|
+
echo Pack - Distribucion limpia (v1.5.8)
|
|
10
10
|
echo ============================================
|
|
11
11
|
echo.
|
|
12
12
|
|
|
@@ -18,28 +18,37 @@ REM --- Limpiar destino previo ---
|
|
|
18
18
|
if exist "%DIST%" rmdir /s /q "%DIST%"
|
|
19
19
|
|
|
20
20
|
mkdir "%OUT%"
|
|
21
|
-
mkdir "%OUT
|
|
22
|
-
mkdir "%OUT
|
|
21
|
+
mkdir "%OUT%\.forge"
|
|
22
|
+
mkdir "%OUT%\.forge\lib"
|
|
23
|
+
mkdir "%OUT%\.forge\templates"
|
|
24
|
+
mkdir "%OUT%\.forge\commands"
|
|
23
25
|
mkdir "%OUT%\tools"
|
|
24
26
|
mkdir "%OUT%\tools\bin"
|
|
25
27
|
mkdir "%OUT%\tests"
|
|
26
28
|
|
|
27
29
|
echo Copiando archivos core...
|
|
28
|
-
copy /Y "%ROOT%\
|
|
29
|
-
copy /Y "%ROOT%\
|
|
30
|
-
copy /Y "%ROOT%\
|
|
30
|
+
copy /Y "%ROOT%\forge.cmd" "%OUT%\" >nul
|
|
31
|
+
copy /Y "%ROOT%\README.md" "%OUT%\" >nul
|
|
32
|
+
copy /Y "%ROOT%\MANUAL.md" "%OUT%\" >nul
|
|
33
|
+
copy /Y "%ROOT%\WORKFLOW.md" "%OUT%\" >nul
|
|
31
34
|
|
|
32
|
-
echo Copiando
|
|
33
|
-
copy /Y "%ROOT
|
|
35
|
+
echo Copiando .forge/...
|
|
36
|
+
copy /Y "%ROOT%\.forge\init.cmd" "%OUT%\.forge\" >nul
|
|
37
|
+
copy /Y "%ROOT%\.forge\config.cmd" "%OUT%\.forge\" >nul
|
|
38
|
+
copy /Y "%ROOT%\.forge\serve-static.js" "%OUT%\.forge\" >nul
|
|
34
39
|
|
|
35
|
-
echo Copiando
|
|
36
|
-
copy /Y "%ROOT
|
|
40
|
+
echo Copiando .forge/lib/...
|
|
41
|
+
copy /Y "%ROOT%\.forge\lib\*.cmd" "%OUT%\.forge\lib\" >nul
|
|
37
42
|
|
|
38
|
-
echo Copiando
|
|
43
|
+
echo Copiando .forge/templates/...
|
|
44
|
+
copy /Y "%ROOT%\.forge\templates\*.tpl" "%OUT%\.forge\templates\" >nul
|
|
45
|
+
copy /Y "%ROOT%\.forge\templates\serve-static.js" "%OUT%\.forge\templates\" >nul
|
|
46
|
+
|
|
47
|
+
echo Copiando tools/...
|
|
39
48
|
copy /Y "%ROOT%\tools\*.cmd" "%OUT%\tools\" >nul
|
|
40
49
|
copy /Y "%ROOT%\tools\bin\*.cmd" "%OUT%\tools\bin\" >nul
|
|
41
50
|
|
|
42
|
-
echo Copiando tests
|
|
51
|
+
echo Copiando tests/...
|
|
43
52
|
copy /Y "%ROOT%\tests\*.cmd" "%OUT%\tests\" >nul
|
|
44
53
|
|
|
45
54
|
echo.
|
package/tools/release.cmd
CHANGED
|
@@ -6,15 +6,15 @@ cd /d "%~dp0"
|
|
|
6
6
|
|
|
7
7
|
echo.
|
|
8
8
|
echo ============================================
|
|
9
|
-
echo Release - Empaquetar y comprimir
|
|
9
|
+
echo Release - Empaquetar y comprimir (v1.5.8)
|
|
10
10
|
echo ============================================
|
|
11
11
|
echo.
|
|
12
12
|
|
|
13
13
|
REM --- 1. Pack ---
|
|
14
14
|
call "%~dp0pack.cmd"
|
|
15
15
|
|
|
16
|
-
REM --- 2. Leer version ---
|
|
17
|
-
call "%~dp0
|
|
16
|
+
REM --- 2. Leer version desde .forge/config.cmd ---
|
|
17
|
+
call "%~dp0..\.forge\config.cmd"
|
|
18
18
|
set "ZIP=%~dp0..\..\forgeGit-v%FG_VERSION%.zip"
|
|
19
19
|
|
|
20
20
|
REM --- 3. Comprimir ---
|