@crvouga/mockingbird-service-stripe 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-stripe
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
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createRuntime,
3
3
  validateAccounts
4
- } from "./chunk-4XKRIJAN.js";
4
+ } from "./chunk-HVSAON3H.js";
5
5
  import {
6
6
  listen
7
- } from "./chunk-A2FQVZQW.js";
7
+ } from "./chunk-DKA7ZDNT.js";
8
8
 
9
9
  // src/server.ts
10
10
  import { readFileSync } from "node:fs";
@@ -87,4 +87,4 @@ export {
87
87
  createServer,
88
88
  serveTarget
89
89
  };
90
- //# sourceMappingURL=chunk-PM7FGGXP.js.map
90
+ //# sourceMappingURL=chunk-A53GCLZN.js.map
@@ -9,7 +9,7 @@ import {
9
9
  resolveAdminPrefix,
10
10
  restoreClock,
11
11
  signV4
12
- } from "./chunk-IKHJFW6E.js";
12
+ } from "./chunk-P7O2SR42.js";
13
13
 
14
14
  // ../../adapters/node/dist/fleet-archive.js
15
15
  import { createHash } from "node:crypto";
@@ -3873,7 +3873,7 @@ async function preflightFleet(config, options) {
3873
3873
  break;
3874
3874
  }
3875
3875
  }
3876
- targets.set(name, { ...target, packageVersion: packageVersion ?? "3.9.0" });
3876
+ targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.1" });
3877
3877
  } catch (error) {
3878
3878
  throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
3879
3879
  }
@@ -6668,4 +6668,4 @@ export {
6668
6668
  withFleetRun,
6669
6669
  NamespacePool
6670
6670
  };
6671
- //# sourceMappingURL=chunk-A2FQVZQW.js.map
6671
+ //# sourceMappingURL=chunk-DKA7ZDNT.js.map
@@ -17,7 +17,7 @@ import {
17
17
  requestBaseUrl,
18
18
  resolveSchema,
19
19
  signers
20
- } from "./chunk-IKHJFW6E.js";
20
+ } from "./chunk-P7O2SR42.js";
21
21
 
22
22
  // src/account.ts
23
23
  var accountOfKey = (key) => `acct_${opaqueToken(key, 8)}`;
@@ -15855,4 +15855,4 @@ export {
15855
15855
  createRuntime2 as createRuntime,
15856
15856
  StripeAPI
15857
15857
  };
15858
- //# sourceMappingURL=chunk-4XKRIJAN.js.map
15858
+ //# sourceMappingURL=chunk-HVSAON3H.js.map
@@ -236,15 +236,24 @@ var Collection = class {
236
236
  sqlite;
237
237
  namespace;
238
238
  collectionName;
239
+ statements = /* @__PURE__ */ new Map();
240
+ prepare(sql) {
241
+ let statement = this.statements.get(sql);
242
+ if (!statement) {
243
+ statement = this.sqlite.prepare(sql);
244
+ this.statements.set(sql, statement);
245
+ }
246
+ return statement;
247
+ }
239
248
  constructor(sqlite, namespace, collectionName) {
240
249
  this.sqlite = sqlite;
241
250
  this.namespace = namespace;
242
251
  this.collectionName = collectionName;
243
252
  }
244
253
  bumpCollectionSeq() {
245
- const row = this.sqlite.prepare("SELECT value FROM mockingbird_sequences WHERE namespace = ? AND name = ? AND kind = 'collection'").get(this.namespace, this.collectionName);
254
+ const row = this.prepare("SELECT value FROM mockingbird_sequences WHERE namespace = ? AND name = ? AND kind = 'collection'").get(this.namespace, this.collectionName);
246
255
  const next = (row?.value ?? 0) + 1;
247
- this.sqlite.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, 'collection', ?)
256
+ this.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, 'collection', ?)
248
257
  ON CONFLICT(namespace, name, kind) DO UPDATE SET value = excluded.value`).run(this.namespace, this.collectionName, next);
249
258
  return next;
250
259
  }
@@ -252,13 +261,13 @@ var Collection = class {
252
261
  return this.sqlite.transaction(() => this.bumpCollectionSeq());
253
262
  }
254
263
  get(id) {
255
- const row = this.sqlite.prepare("SELECT value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
264
+ const row = this.prepare("SELECT value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
256
265
  if (!row)
257
266
  return void 0;
258
267
  return JSON.parse(row.value).value;
259
268
  }
260
269
  has(id) {
261
- const row = this.sqlite.prepare("SELECT 1 AS ok FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
270
+ const row = this.prepare("SELECT 1 AS ok FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
262
271
  return row !== void 0;
263
272
  }
264
273
  /** Insert a new record, assigning it the next sequence number. */
@@ -266,7 +275,7 @@ var Collection = class {
266
275
  return this.sqlite.transaction(() => {
267
276
  const seq = this.bumpCollectionSeq();
268
277
  const stored = { seq, value };
269
- this.sqlite.prepare(`INSERT INTO mockingbird_records (namespace, collection, id, seq, value)
278
+ this.prepare(`INSERT INTO mockingbird_records (namespace, collection, id, seq, value)
270
279
  VALUES (?, ?, ?, ?, ?)
271
280
  ON CONFLICT(namespace, collection, id) DO UPDATE SET seq = excluded.seq, value = excluded.value`).run(this.namespace, this.collectionName, id, seq, JSON.stringify(stored));
272
281
  return stored;
@@ -275,25 +284,25 @@ var Collection = class {
275
284
  /** Replace an existing record's value, keeping its position. */
276
285
  update(id, value) {
277
286
  return this.sqlite.transaction(() => {
278
- const row = this.sqlite.prepare("SELECT seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
287
+ const row = this.prepare("SELECT seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
279
288
  if (!row)
280
289
  return void 0;
281
290
  const stored = { seq: row.seq, value };
282
- this.sqlite.prepare("UPDATE mockingbird_records SET value = ? WHERE namespace = ? AND collection = ? AND id = ?").run(JSON.stringify(stored), this.namespace, this.collectionName, id);
291
+ this.prepare("UPDATE mockingbird_records SET value = ? WHERE namespace = ? AND collection = ? AND id = ?").run(JSON.stringify(stored), this.namespace, this.collectionName, id);
283
292
  return stored;
284
293
  });
285
294
  }
286
295
  delete(id) {
287
- const result = this.sqlite.prepare("DELETE FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").run(this.namespace, this.collectionName, id);
296
+ const result = this.prepare("DELETE FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").run(this.namespace, this.collectionName, id);
288
297
  return result.changes > 0;
289
298
  }
290
299
  /** How many records the collection holds, without reading them. */
291
300
  count() {
292
- const row = this.sqlite.prepare("SELECT COUNT(*) AS n FROM mockingbird_records WHERE namespace = ? AND collection = ?").get(this.namespace, this.collectionName);
301
+ const row = this.prepare("SELECT COUNT(*) AS n FROM mockingbird_records WHERE namespace = ? AND collection = ?").get(this.namespace, this.collectionName);
293
302
  return Number(row?.n ?? 0);
294
303
  }
295
304
  list(options = {}) {
296
- const rows = this.sqlite.prepare("SELECT id, seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ?").all(this.namespace, this.collectionName);
305
+ const rows = this.prepare("SELECT id, seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ?").all(this.namespace, this.collectionName);
297
306
  const out = [];
298
307
  for (const row of rows) {
299
308
  const stored = JSON.parse(row.value);
@@ -3854,7 +3863,7 @@ var stateAdminRoutes = (routes) => {
3854
3863
  };
3855
3864
 
3856
3865
  // ../core/dist/version.js
3857
- var PACKAGE_VERSION = true ? "3.9.0" : UNRELEASED_VERSION;
3866
+ var PACKAGE_VERSION = true ? "3.10.1" : UNRELEASED_VERSION;
3858
3867
 
3859
3868
  // ../core/dist/signing.js
3860
3869
  var encoder = new TextEncoder();
@@ -5817,4 +5826,4 @@ export {
5817
5826
  createRuntime,
5818
5827
  signV4
5819
5828
  };
5820
- //# sourceMappingURL=chunk-IKHJFW6E.js.map
5829
+ //# sourceMappingURL=chunk-P7O2SR42.js.map