@spencerboucher/switchyard 0.18.0 → 0.18.1

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/README.md CHANGED
@@ -130,7 +130,7 @@ switchyard up
130
130
  ```sh
131
131
  docker run -d --name switchyard -p 127.0.0.1:7400:7400 -v switchyard-data:/data \
132
132
  -e SWITCHYARD_PUBLIC_URL=https://switchyard.example.com \
133
- ghcr.io/justmytwospence/switchyard:0.18.0
133
+ ghcr.io/justmytwospence/switchyard:0.18.1
134
134
  # Single sign-on is required off localhost: see docs/auth.md
135
135
  ```
136
136
 
@@ -32430,7 +32430,8 @@ var Store2 = class {
32430
32430
  runRetention() {
32431
32431
  return this.tx(() => {
32432
32432
  const cutoff = new Date(this.now().getTime() - this.retentionDays * 864e5).toISOString();
32433
- const r = this.st.get("SELECT MAX(seq) AS m FROM events WHERE at < ?").get(cutoff);
32433
+ const row = this.st.get("SELECT seq FROM events INDEXED BY events_at WHERE at < ? ORDER BY at DESC LIMIT 1").get(cutoff);
32434
+ const r = { m: row?.seq ?? null };
32434
32435
  let deleted = 0;
32435
32436
  let min = this.minRetainedSeq();
32436
32437
  if (r.m !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spencerboucher/switchyard",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Self-hosted hub for Pi coding agents: run them on your machines, drive them from your phone, browser or terminal",
5
5
  "license": "MIT",
6
6
  "type": "module",