@getstrata/cli 2.2.18 → 2.2.21

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @getstrata/cli changelog
2
2
 
3
+ ## 2.2.21
4
+
5
+ Make registered queue/outbox workers discoverable in CLI help and generated startup guidance. Announce polling after boot and when it stops without claiming dependency health, printing secrets, or starting workers automatically. Preserve explicit process ownership, delivery semantics and graceful lifecycle; cover idle, boot/runtime/cleanup failures and real SIGTERM draining.
6
+
7
+ ## 2.2.20
8
+
9
+ Validate complete migration definitions before callbacks, locks or database effects; reject malformed exports and duplicate names with source diagnostics. Refuse fresh with missing applied definitions and rollback with incomplete latest batches; preserve partial forward migration and remove blanket history deletion. Cover physical schema/data/history preservation and reset recovery on real Postgres, MySQL and SQLite, plus loader and preflight regressions; document safe missing-file recovery and unchanged atomicity limits.
10
+
11
+ ## 2.2.19
12
+
13
+ Fix explicit development fresh resets with unfinished outbox deliveries while preserving ordinary rollback guards. Record each completed reset down immediately so later refusal leaves recoverable migration progress; document partial-DDL/crash limits and old-history reconciliation. Add independent outbox-state and reset failure/migrate/retry regressions on real Postgres, MySQL and SQLite, history-write/reapplication fault injection, and a documented stateful regression review flow.
14
+
3
15
  ## 2.2.18
4
16
 
5
17
  Add optional typed guardMigrationRollback for application-owned rollback history predicates; skip history reads only during explicit development fresh resets, propagate predicate failures, and reuse the contract for encryption-checkpoint archival protection. Document guard placement and unchanged reset/rollback safety; cover type, runner and real SQLite history regressions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/cli",
3
- "version": "2.2.18",
3
+ "version": "2.2.21",
4
4
  "description": "Strata CLI: framework commands for Bun apps (dev, start, migrate, run)",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -54,8 +54,8 @@
54
54
  ],
55
55
  "scripts": {},
56
56
  "peerDependencies": {
57
- "@getstrata/bootstrap": "^2.2.18",
58
- "@getstrata/core": "^2.2.18"
57
+ "@getstrata/bootstrap": "^2.2.21",
58
+ "@getstrata/core": "^2.2.21"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public"
@@ -1,7 +1,22 @@
1
1
  function printHelp(commandNames: string[]): void {
2
2
  const unique = [...new Set(commandNames)].sort();
3
- const list = unique.map((name) => `- ${name}`).join("\n");
4
- console.log(`Available commands:\n${list}`);
3
+ const descriptions: Record<string, string> = {
4
+ dev: "HTTP development server; workers run separately",
5
+ start: "HTTP server; workers run separately",
6
+ "queue:work": "Poll Redis for queued jobs; requires REDIS_URL",
7
+ "outbox:work":
8
+ "Poll SQL for durable listener deliveries; requires migrations and registered listeners",
9
+ };
10
+ const list = unique
11
+ .map(
12
+ (name) => `- ${name}${Object.hasOwn(descriptions, name) ? ` — ${descriptions[name]}` : ""}`,
13
+ )
14
+ .join("\n");
15
+ const workers = unique.filter((name) => name === "queue:work" || name === "outbox:work");
16
+ const guidance = workers.length
17
+ ? `\n\nBackground workers are explicit. Run ${workers.map((name) => `strata ${name}`).join(" and ")} in separate terminals when your app uses those mechanisms. Use the same application configuration as HTTP. dev/start do not start workers. Idle polling is normal; startup output is not a dependency health check.`
18
+ : "";
19
+ console.log(`Available commands:\n${list}${guidance}`);
5
20
  }
6
21
 
7
22
  export { printHelp };
@@ -43,6 +43,7 @@ async function runOutboxWorkerCommand(options: OutboxWorkerOptions): Promise<voi
43
43
  async () => {
44
44
  await booting?.catch(() => {});
45
45
  await running?.catch(() => {});
46
+ if (running) console.log("[outbox:work] Polling stopped.");
46
47
  await options.drain?.();
47
48
  },
48
49
  "drain",
@@ -69,6 +70,9 @@ async function runOutboxWorkerCommand(options: OutboxWorkerOptions): Promise<voi
69
70
  await booting;
70
71
  if (!stopping && !lifecycle.isShuttingDown) {
71
72
  const outbox = options.outbox ?? new SqlOutbox({ listeners: options.listeners ?? [] });
73
+ console.log(
74
+ "[outbox:work] Starting SQL outbox polling; idle until deliveries are available.",
75
+ );
72
76
  running = outbox.work({ signal: admission.signal });
73
77
  await running;
74
78
  }
@@ -38,6 +38,7 @@ async function runQueueWorkerCommand(options: {
38
38
  // Completion, including failed startup/run, means no admitted worker remains.
39
39
  await booting?.catch(() => {});
40
40
  await running?.catch(() => {});
41
+ if (running) console.log("[queue:work] Polling stopped.");
41
42
  await options.drain?.();
42
43
  },
43
44
  "drain",
@@ -78,10 +79,9 @@ async function runQueueWorkerCommand(options: {
78
79
  await booting;
79
80
  if (!stopping && !lifecycle.isShuttingDown) {
80
81
  worker = createQueueWorker(redisUrl, options.failedJobs ?? createFailedJobService());
81
- console.log("[queue:work] Listening for jobs on Redis...");
82
+ console.log("[queue:work] Starting Redis queue polling; idle until jobs are available.");
82
83
  running = worker.run();
83
84
  await running;
84
- console.log("[queue:work] Worker stopped.");
85
85
  }
86
86
  } catch (error) {
87
87
  failed = true;