mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 09:39:25 +00:00
Package preparation through a symlinked source directory must generate the postinstall inventory and pending-install guard instead of silently doing nothing. Match the writer entrypoint through the existing real-path helper while retaining argv-only activation so imports remain inert despite PM2 hints. Add real-subprocess regression coverage for canonical and aliased entrypoints and for imports with absent or same-basename argv and absent or seeded files. AI-assisted with Codex.
11 lines
519 B
JavaScript
11 lines
519 B
JavaScript
#!/usr/bin/env -S node --import tsx
|
|
// Write Package Dist Inventory script supports OpenClaw repository automation.
|
|
|
|
import { fileURLToPath } from "node:url";
|
|
import { isMainModule } from "../src/infra/is-main.ts";
|
|
import { writePackageDistInventoryForPublish } from "./lib/package-dist-inventory.ts";
|
|
|
|
// Match argv only; PM2 hints must not turn an import into a package write.
|
|
if (isMainModule({ currentFile: fileURLToPath(import.meta.url), env: {} })) {
|
|
await writePackageDistInventoryForPublish(process.cwd());
|
|
}
|