pigmalion-setup 0.1.6 → 0.1.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/bin/cli.js +29 -14
- package/package.json +1 -1
- package/templates/CODEX.md +3 -3
package/bin/cli.js
CHANGED
|
@@ -155,23 +155,33 @@ function buildCodexProcess(codexCmd, prompt) {
|
|
|
155
155
|
return { cmd: codexCmd, args: [], options: { shell: useShell } };
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
async function runCodex(codexCmd) {
|
|
158
|
+
async async function runCodex(codexCmd) {
|
|
159
159
|
const setupPath = path.join(TARGET_DIR, "SETUP.md");
|
|
160
160
|
|
|
161
161
|
log("");
|
|
162
|
-
log("
|
|
163
|
-
log(`
|
|
164
|
-
log("");
|
|
165
|
-
log("Y pega el siguiente prompt:");
|
|
166
|
-
log("");
|
|
167
|
-
const prompt = [
|
|
168
|
-
`Lee y sigue estrictamente SETUP.md en: ${setupPath}`,
|
|
169
|
-
"Inicia el flujo base con el usuario para definir vision general, documentacion y ROADMAP.",
|
|
170
|
-
"No toques codigo todavia. Solo documentacion, roadmap y arquitectura.",
|
|
171
|
-
"Comienza ahora."
|
|
172
|
-
].join("\n");
|
|
173
|
-
log(prompt);
|
|
162
|
+
log("Iniciando Codex en modo interactivo...");
|
|
163
|
+
log(`Usando: ${codexCmd}`);
|
|
174
164
|
log("");
|
|
165
|
+
|
|
166
|
+
const ext = path.extname(codexCmd).toLowerCase();
|
|
167
|
+
const useShell = process.platform === "win32" && (ext === ".cmd" || ext === ".ps1");
|
|
168
|
+
|
|
169
|
+
const child = spawn(codexCmd, [], {
|
|
170
|
+
stdio: 'inherit',
|
|
171
|
+
shell: useShell,
|
|
172
|
+
cwd: TARGET_DIR
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
return new Promise((resolve) => {
|
|
176
|
+
child.on('close', (code) => {
|
|
177
|
+
log(`Codex terminó con código ${code}.`);
|
|
178
|
+
resolve();
|
|
179
|
+
});
|
|
180
|
+
child.on('error', (err) => {
|
|
181
|
+
log(`Error al iniciar Codex: ${err.message}`);
|
|
182
|
+
resolve();
|
|
183
|
+
});
|
|
184
|
+
});
|
|
175
185
|
}
|
|
176
186
|
|
|
177
187
|
function findCodexInBinDir(binDir) {
|
|
@@ -405,8 +415,13 @@ async function main() {
|
|
|
405
415
|
}
|
|
406
416
|
await runCodex(codexCmd);
|
|
407
417
|
await copyTemplates(POST_FILES, { allowOverwrite: true });
|
|
418
|
+
try {
|
|
419
|
+
await fsPromises.unlink(path.join(TARGET_DIR, "SETUP.md"));
|
|
420
|
+
} catch {
|
|
421
|
+
// ignore if file does not exist
|
|
422
|
+
}
|
|
408
423
|
log("");
|
|
409
|
-
log("Listo. Puedes revisar
|
|
424
|
+
log("Listo. Puedes revisar los docs generados por Codex.");
|
|
410
425
|
}
|
|
411
426
|
|
|
412
427
|
main().catch((err) => {
|
package/package.json
CHANGED
package/templates/CODEX.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CODING NORMS
|
|
2
2
|
|
|
3
|
-
## Stack base
|
|
3
|
+
## Default Stack base
|
|
4
4
|
|
|
5
5
|
- Backend: Express puerto 3001, db.json
|
|
6
6
|
- Frontend: React + Vite puerto 3002
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
|
|
26
26
|
## Documentacion
|
|
27
27
|
|
|
28
|
-
- README.md describe
|
|
29
|
-
- ROADMAP.md mantiene el plan de trabajo.
|
|
28
|
+
- README.md describe instalación, instrucciones de uso, arquitectura, endpoints... (depende del proyecto)
|
|
29
|
+
- ROADMAP.md mantiene el plan de trabajo.
|