@timekast/factory 1.8.0 → 1.9.0
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/dist/commands/add.js +3 -0
- package/dist/commands/update.js +8 -2
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/commands/add.js
CHANGED
|
@@ -90,6 +90,9 @@ export async function runAdd(flags = { core: false, full: false }) {
|
|
|
90
90
|
// A legacy `add` redirect is never a beta channel operation.
|
|
91
91
|
beta: false,
|
|
92
92
|
stable: false,
|
|
93
|
+
// `add` is interactive: keep the legacy confirm prompt. Only the GUI/headless
|
|
94
|
+
// caller passes `--yes` (via `update` directly), never this redirect.
|
|
95
|
+
yes: false,
|
|
93
96
|
});
|
|
94
97
|
return;
|
|
95
98
|
}
|
package/dist/commands/update.js
CHANGED
|
@@ -62,6 +62,7 @@ export function parseUpdateFlags(argv) {
|
|
|
62
62
|
noCommit: argv.includes('--no-commit'),
|
|
63
63
|
beta: argv.includes('--beta'),
|
|
64
64
|
stable: argv.includes('--stable'),
|
|
65
|
+
yes: argv.includes('--yes') || argv.includes('-y'),
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
/** Default acquire: download the sticky-profile tarball, stage + validate it. */
|
|
@@ -454,7 +455,7 @@ export async function runUpdate(flags, deps = {}) {
|
|
|
454
455
|
if (legacy) {
|
|
455
456
|
profile = flags.full ? PROFILES.full : flags.core ? PROFILES.core : detectProfile(rootDir);
|
|
456
457
|
oldLock = { version: '0.0.0', profile, files: [] };
|
|
457
|
-
await confirmLegacy(profile);
|
|
458
|
+
await confirmLegacy(profile, flags.yes);
|
|
458
459
|
}
|
|
459
460
|
else {
|
|
460
461
|
oldLock = readLockfile(rootDir);
|
|
@@ -576,7 +577,12 @@ async function guardChannelChange(oldLock, flags) {
|
|
|
576
577
|
}
|
|
577
578
|
}
|
|
578
579
|
/** Warn the dev before a legacy auto-register sync (design §8 edge case). */
|
|
579
|
-
async function confirmLegacy(profile) {
|
|
580
|
+
async function confirmLegacy(profile, assumeYes) {
|
|
581
|
+
// `--yes` (GUI launcher / headless): skip the interactive confirm. The caller
|
|
582
|
+
// already surfaced the overwrite warning (the app shows it as a native dialog).
|
|
583
|
+
// An interactive terminal run without `--yes` still gets the prompt below.
|
|
584
|
+
if (assumeYes)
|
|
585
|
+
return;
|
|
580
586
|
const detected = profile === PROFILES.full
|
|
581
587
|
? 'Detectado como derivado del Factory (`factoryVersion` en package.json) → perfil `full` ' +
|
|
582
588
|
'(incluye sk-* + SK.md). Usa `--core` si quieres solo el cerebro base.'
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,8 @@ Sobre \`update\`:
|
|
|
59
59
|
--verify Reporta diferencias disco-vs-lockfile sin modificar nada
|
|
60
60
|
--beta Entra al canal beta (instala el último pre-release \`-beta.N\`)
|
|
61
61
|
--stable Sale del canal beta y baja al estable (limpia \`beta\` del lockfile)
|
|
62
|
+
--yes / -y Auto-confirma el auto-registro de un repo legacy (sin lockfile) —
|
|
63
|
+
para lanzadores GUI / headless; en terminal interactiva sigue preguntando
|
|
62
64
|
Un \`update\` sin \`--beta\` sobre un lockfile beta pide confirmación (y en headless
|
|
63
65
|
rechaza, sin degradar en silencio).
|
|
64
66
|
|