@crvouga/mockingbird-service-resend 3.9.0 → 3.10.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog — @crvouga/mockingbird-service-resend
2
2
 
3
+ ## 3.10.1 (2026-11-02)
4
+
5
+ ### Fixes and improvements
6
+
7
+ - schedule packages whose tasks read another package's files ([7df459d](https://github.com/crvouga/mockingbird/commit/7df459d96132b4f84fa3553b1f907871c7e4f739))
8
+
9
+ ## 3.10.0 (2026-10-24)
10
+
11
+ ### Features
12
+
13
+ - add buffered SQL durability ([288bdcc](https://github.com/crvouga/mockingbird/commit/288bdcca84582787a54c4fdf9e803db9aac0b8d7))
14
+ - add efficient browser durability ([a8be579](https://github.com/crvouga/mockingbird/commit/a8be5799a883ddf6f731208e06f399410de4661a))
15
+
3
16
  ## 3.9.0 (2026-10-21)
4
17
 
5
18
  ### Features
@@ -9,7 +9,7 @@ import {
9
9
  parseFaultHeader,
10
10
  resolveAdminPrefix,
11
11
  restoreClock
12
- } from "./chunk-KSWGDUES.js";
12
+ } from "./chunk-GK4XRO2F.js";
13
13
 
14
14
  // ../../adapters/node/dist/cli.js
15
15
  import { readFile as readFile5 } from "node:fs/promises";
@@ -3057,7 +3057,7 @@ async function preflightFleet(config, options) {
3057
3057
  break;
3058
3058
  }
3059
3059
  }
3060
- targets.set(name, { ...target, packageVersion: packageVersion ?? "3.9.0" });
3060
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.1" });
3061
3061
  } catch (error) {
3062
3062
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3063
3063
  }
@@ -5105,4 +5105,4 @@ export {
5105
5105
  createServer2 as createServer,
5106
5106
  serveTarget
5107
5107
  };
5108
- //# sourceMappingURL=chunk-7OH5OYDQ.js.map
5108
+ //# sourceMappingURL=chunk-BHIGSH3C.js.map
@@ -649,15 +649,24 @@ var Collection = class {
649
649
  sqlite;
650
650
  namespace;
651
651
  collectionName;
652
+ statements = /* @__PURE__ */ new Map();
653
+ prepare(sql) {
654
+ let statement = this.statements.get(sql);
655
+ if (!statement) {
656
+ statement = this.sqlite.prepare(sql);
657
+ this.statements.set(sql, statement);
658
+ }
659
+ return statement;
660
+ }
652
661
  constructor(sqlite, namespace, collectionName) {
653
662
  this.sqlite = sqlite;
654
663
  this.namespace = namespace;
655
664
  this.collectionName = collectionName;
656
665
  }
657
666
  bumpCollectionSeq() {
658
- const row = this.sqlite.prepare("SELECT value FROM mockingbird_sequences WHERE namespace = ? AND name = ? AND kind = 'collection'").get(this.namespace, this.collectionName);
667
+ const row = this.prepare("SELECT value FROM mockingbird_sequences WHERE namespace = ? AND name = ? AND kind = 'collection'").get(this.namespace, this.collectionName);
659
668
  const next = (row?.value ?? 0) + 1;
660
- this.sqlite.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, 'collection', ?)
669
+ this.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, 'collection', ?)
661
670
  ON CONFLICT(namespace, name, kind) DO UPDATE SET value = excluded.value`).run(this.namespace, this.collectionName, next);
662
671
  return next;
663
672
  }
@@ -665,13 +674,13 @@ var Collection = class {
665
674
  return this.sqlite.transaction(() => this.bumpCollectionSeq());
666
675
  }
667
676
  get(id) {
668
- const row = this.sqlite.prepare("SELECT value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
677
+ const row = this.prepare("SELECT value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
669
678
  if (!row)
670
679
  return void 0;
671
680
  return JSON.parse(row.value).value;
672
681
  }
673
682
  has(id) {
674
- const row = this.sqlite.prepare("SELECT 1 AS ok FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
683
+ const row = this.prepare("SELECT 1 AS ok FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
675
684
  return row !== void 0;
676
685
  }
677
686
  /** Insert a new record, assigning it the next sequence number. */
@@ -679,7 +688,7 @@ var Collection = class {
679
688
  return this.sqlite.transaction(() => {
680
689
  const seq = this.bumpCollectionSeq();
681
690
  const stored = { seq, value };
682
- this.sqlite.prepare(`INSERT INTO mockingbird_records (namespace, collection, id, seq, value)
691
+ this.prepare(`INSERT INTO mockingbird_records (namespace, collection, id, seq, value)
683
692
  VALUES (?, ?, ?, ?, ?)
684
693
  ON CONFLICT(namespace, collection, id) DO UPDATE SET seq = excluded.seq, value = excluded.value`).run(this.namespace, this.collectionName, id, seq, JSON.stringify(stored));
685
694
  return stored;
@@ -688,25 +697,25 @@ var Collection = class {
688
697
  /** Replace an existing record's value, keeping its position. */
689
698
  update(id, value) {
690
699
  return this.sqlite.transaction(() => {
691
- const row = this.sqlite.prepare("SELECT seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
700
+ const row = this.prepare("SELECT seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
692
701
  if (!row)
693
702
  return void 0;
694
703
  const stored = { seq: row.seq, value };
695
- this.sqlite.prepare("UPDATE mockingbird_records SET value = ? WHERE namespace = ? AND collection = ? AND id = ?").run(JSON.stringify(stored), this.namespace, this.collectionName, id);
704
+ this.prepare("UPDATE mockingbird_records SET value = ? WHERE namespace = ? AND collection = ? AND id = ?").run(JSON.stringify(stored), this.namespace, this.collectionName, id);
696
705
  return stored;
697
706
  });
698
707
  }
699
708
  delete(id) {
700
- const result = this.sqlite.prepare("DELETE FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").run(this.namespace, this.collectionName, id);
709
+ const result = this.prepare("DELETE FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").run(this.namespace, this.collectionName, id);
701
710
  return result.changes > 0;
702
711
  }
703
712
  /** How many records the collection holds, without reading them. */
704
713
  count() {
705
- const row = this.sqlite.prepare("SELECT COUNT(*) AS n FROM mockingbird_records WHERE namespace = ? AND collection = ?").get(this.namespace, this.collectionName);
714
+ const row = this.prepare("SELECT COUNT(*) AS n FROM mockingbird_records WHERE namespace = ? AND collection = ?").get(this.namespace, this.collectionName);
706
715
  return Number(row?.n ?? 0);
707
716
  }
708
717
  list(options = {}) {
709
- const rows = this.sqlite.prepare("SELECT id, seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ?").all(this.namespace, this.collectionName);
718
+ const rows = this.prepare("SELECT id, seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ?").all(this.namespace, this.collectionName);
710
719
  const out = [];
711
720
  for (const row of rows) {
712
721
  const stored = JSON.parse(row.value);
@@ -4176,7 +4185,7 @@ var stateAdminRoutes = (routes) => {
4176
4185
  };
4177
4186
 
4178
4187
  // ../core/dist/version.js
4179
- var PACKAGE_VERSION = true ? "3.9.0" : UNRELEASED_VERSION;
4188
+ var PACKAGE_VERSION = true ? "3.10.1" : UNRELEASED_VERSION;
4180
4189
 
4181
4190
  // ../core/dist/signing.js
4182
4191
  var encoder = new TextEncoder();
@@ -8801,4 +8810,4 @@ export {
8801
8810
  * Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
8802
8811
  * MIT license: see THIRD_PARTY_NOTICES.md in the repository and npm packages.
8803
8812
  */
8804
- //# sourceMappingURL=chunk-KSWGDUES.js.map
8813
+ //# sourceMappingURL=chunk-GK4XRO2F.js.map