@timekast/factory 1.19.0 → 1.21.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.
@@ -36,7 +36,7 @@ import { applyPlan, defaultBackupDir, validateStagedManifest } from '../lib/atom
36
36
  import { CLIError } from '../lib/cli-error.js';
37
37
  import { CLAUDE_MD_FILE, PROFILES } from '../lib/constants.js';
38
38
  import { hasLockfile, writeInitialLockfile } from '../lib/lockfile.js';
39
- import { detectProfile, insertFactoryUpdateScript, } from '../lib/package-json.js';
39
+ import { detectProfile, emptyShippedE2EPort, insertFactoryUpdateScript, } from '../lib/package-json.js';
40
40
  import { runPreflight } from '../lib/preflight.js';
41
41
  import { detectRepo } from '../lib/repo-detection.js';
42
42
  import { downloadProfileTarball, stageProfileTarball } from '../lib/unpack.js';
@@ -163,6 +163,10 @@ export async function runAdd(flags = { core: false, full: false }) {
163
163
  if (existsSync(pkgPath)) {
164
164
  try {
165
165
  scriptAction = insertFactoryUpdateScript(pkgPath).action;
166
+ // Same maintenance `update` does: a repo that adopts the brain now gets the shipped
167
+ // `ports.e2e: 3006` emptied here, instead of waiting for a later `factory update`.
168
+ // Conditional — a port the dev chose is never touched.
169
+ emptyShippedE2EPort(pkgPath);
166
170
  }
167
171
  catch {
168
172
  scriptAction = 'none'; // invalid package.json — skip the alias, brain still installed