From fee14a51b73c8e571e64d69d982606ecf53cb225 Mon Sep 17 00:00:00 2001 From: NagyVikt Date: Fri, 24 Apr 2026 02:48:30 +0200 Subject: [PATCH] Make CLI publish harder to mistype The scoped package must be published from apps/cli/release, but running npm publish at the repo root targets the private monorepo package. Add a short script that always rebuilds the release directory and publishes that target. Constraint: npm does not dispatch bare npm p to package scripts Rejected: Make the root package public | that would expose the monorepo tarball Confidence: high Scope-risk: narrow Directive: Keep publish shortcuts pointed at apps/cli/release, not repo root Tested: npm run publish:cli:dry-run Tested: git diff --check --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 8ca02cd..3d42d9a 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,9 @@ "lint:fix": "biome check --write .", "format": "biome format --write .", "clean": "pnpm -r exec rm -rf dist && rm -rf node_modules/.cache", + "p": "pnpm run publish:cli", + "publish:cli": "pnpm --filter @imdeadpool/colony pack:release && npm publish apps/cli/release --access public --cache /tmp/agents-hivemind-npm-cache", + "publish:cli:dry-run": "pnpm --filter @imdeadpool/colony pack:release && npm publish apps/cli/release --dry-run --access public --cache /tmp/agents-hivemind-npm-cache", "release": "changeset publish" }, "devDependencies": {