patchwork-os 0.2.0-beta.13.canary.311 → 0.2.0-beta.13.canary.314

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/index.js CHANGED
@@ -4017,10 +4017,23 @@ if (process.argv[2] === "outcomes") {
4017
4017
  const args = process.argv.slice(3);
4018
4018
  (async () => {
4019
4019
  try {
4020
+ // `outcomes pending` — the confirm queue (join over runs + dispositions).
4021
+ // Handled here (not in the pure runOutcomesCli) because it needs the run
4022
+ // log + worker manifests, which live behind the shadow readers.
4023
+ if (args[0] === "pending") {
4024
+ const { computePendingConfirmations, formatPendingConfirmations } = await import("./workers/runWorkerShadow.js");
4025
+ const pending = computePendingConfirmations();
4026
+ if (args.includes("--json")) {
4027
+ process.stdout.write(`${JSON.stringify(pending, null, 2)}\n`);
4028
+ }
4029
+ else {
4030
+ process.stdout.write(formatPendingConfirmations(pending));
4031
+ }
4032
+ process.exit(0);
4033
+ }
4020
4034
  const { runOutcomesCli } = await import("./workers/outcomesCli.js");
4021
- const { OutcomeStore } = await import("./workers/outcomeStore.js");
4022
- const patchworkDir = process.env.PATCHWORK_HOME ?? path.join(os.homedir(), ".patchwork");
4023
- const store = new OutcomeStore(patchworkDir);
4035
+ const { OutcomeStore, resolveOutcomeLogDir } = await import("./workers/outcomeStore.js");
4036
+ const store = new OutcomeStore(resolveOutcomeLogDir());
4024
4037
  const res = runOutcomesCli(args, { store, now: Date.now() });
4025
4038
  if (res.stdout)
4026
4039
  process.stdout.write(res.stdout);