@crvouga/mockingbird-service-slack 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 +18 -0
- package/dist/{chunk-JJY65AAM.js → chunk-GFSKKPUR.js} +3 -3
- package/dist/{chunk-QU3NPZ5W.js → chunk-RJ2ZTFWL.js} +21 -12
- package/dist/chunk-RJ2ZTFWL.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-QU3NPZ5W.js.map +0 -7
- /package/dist/{chunk-JJY65AAM.js.map → chunk-GFSKKPUR.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-slack
|
|
2
2
|
|
|
3
|
+
## 3.10.1 (2026-11-02)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- reopen IndexedDB durability connection after the browser force-closes it ([d0b45aa](https://github.com/crvouga/mockingbird/commit/d0b45aa1d12a55967e72b8ddc6573f5998c377ce))
|
|
8
|
+
- schedule packages whose tasks read another package's files ([7df459d](https://github.com/crvouga/mockingbird/commit/7df459d96132b4f84fa3553b1f907871c7e4f739))
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- `@crvouga/mockingbird-service-sqlite`
|
|
13
|
+
|
|
14
|
+
## 3.10.0 (2026-10-24)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- add buffered SQL durability ([288bdcc](https://github.com/crvouga/mockingbird/commit/288bdcca84582787a54c4fdf9e803db9aac0b8d7))
|
|
19
|
+
- add efficient browser durability ([a8be579](https://github.com/crvouga/mockingbird/commit/a8be5799a883ddf6f731208e06f399410de4661a))
|
|
20
|
+
|
|
3
21
|
## 3.9.0 (2026-10-21)
|
|
4
22
|
|
|
5
23
|
### Features
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
resolveAdminPrefix,
|
|
15
15
|
restoreClock,
|
|
16
16
|
unbindSocketTransport
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RJ2ZTFWL.js";
|
|
18
18
|
|
|
19
19
|
// ../../adapters/node/dist/cli.js
|
|
20
20
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
@@ -3062,7 +3062,7 @@ async function preflightFleet(config, options) {
|
|
|
3062
3062
|
break;
|
|
3063
3063
|
}
|
|
3064
3064
|
}
|
|
3065
|
-
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.
|
|
3065
|
+
targets.set(name, { ...target, packageVersion: packageVersion ?? "3.10.1" });
|
|
3066
3066
|
} catch (error) {
|
|
3067
3067
|
throw new Error(`service ${name}: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
3068
3068
|
}
|
|
@@ -5383,4 +5383,4 @@ export {
|
|
|
5383
5383
|
createServer2 as createServer,
|
|
5384
5384
|
serveTarget
|
|
5385
5385
|
};
|
|
5386
|
-
//# sourceMappingURL=chunk-
|
|
5386
|
+
//# sourceMappingURL=chunk-GFSKKPUR.js.map
|
|
@@ -460,15 +460,24 @@ var Collection = class {
|
|
|
460
460
|
sqlite;
|
|
461
461
|
namespace;
|
|
462
462
|
collectionName;
|
|
463
|
+
statements = /* @__PURE__ */ new Map();
|
|
464
|
+
prepare(sql) {
|
|
465
|
+
let statement = this.statements.get(sql);
|
|
466
|
+
if (!statement) {
|
|
467
|
+
statement = this.sqlite.prepare(sql);
|
|
468
|
+
this.statements.set(sql, statement);
|
|
469
|
+
}
|
|
470
|
+
return statement;
|
|
471
|
+
}
|
|
463
472
|
constructor(sqlite, namespace, collectionName) {
|
|
464
473
|
this.sqlite = sqlite;
|
|
465
474
|
this.namespace = namespace;
|
|
466
475
|
this.collectionName = collectionName;
|
|
467
476
|
}
|
|
468
477
|
bumpCollectionSeq() {
|
|
469
|
-
const row = this.
|
|
478
|
+
const row = this.prepare("SELECT value FROM mockingbird_sequences WHERE namespace = ? AND name = ? AND kind = 'collection'").get(this.namespace, this.collectionName);
|
|
470
479
|
const next = (row?.value ?? 0) + 1;
|
|
471
|
-
this.
|
|
480
|
+
this.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, 'collection', ?)
|
|
472
481
|
ON CONFLICT(namespace, name, kind) DO UPDATE SET value = excluded.value`).run(this.namespace, this.collectionName, next);
|
|
473
482
|
return next;
|
|
474
483
|
}
|
|
@@ -476,13 +485,13 @@ var Collection = class {
|
|
|
476
485
|
return this.sqlite.transaction(() => this.bumpCollectionSeq());
|
|
477
486
|
}
|
|
478
487
|
get(id) {
|
|
479
|
-
const row = this.
|
|
488
|
+
const row = this.prepare("SELECT value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
|
|
480
489
|
if (!row)
|
|
481
490
|
return void 0;
|
|
482
491
|
return JSON.parse(row.value).value;
|
|
483
492
|
}
|
|
484
493
|
has(id) {
|
|
485
|
-
const row = this.
|
|
494
|
+
const row = this.prepare("SELECT 1 AS ok FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
|
|
486
495
|
return row !== void 0;
|
|
487
496
|
}
|
|
488
497
|
/** Insert a new record, assigning it the next sequence number. */
|
|
@@ -490,7 +499,7 @@ var Collection = class {
|
|
|
490
499
|
return this.sqlite.transaction(() => {
|
|
491
500
|
const seq = this.bumpCollectionSeq();
|
|
492
501
|
const stored = { seq, value };
|
|
493
|
-
this.
|
|
502
|
+
this.prepare(`INSERT INTO mockingbird_records (namespace, collection, id, seq, value)
|
|
494
503
|
VALUES (?, ?, ?, ?, ?)
|
|
495
504
|
ON CONFLICT(namespace, collection, id) DO UPDATE SET seq = excluded.seq, value = excluded.value`).run(this.namespace, this.collectionName, id, seq, JSON.stringify(stored));
|
|
496
505
|
return stored;
|
|
@@ -499,25 +508,25 @@ var Collection = class {
|
|
|
499
508
|
/** Replace an existing record's value, keeping its position. */
|
|
500
509
|
update(id, value) {
|
|
501
510
|
return this.sqlite.transaction(() => {
|
|
502
|
-
const row = this.
|
|
511
|
+
const row = this.prepare("SELECT seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").get(this.namespace, this.collectionName, id);
|
|
503
512
|
if (!row)
|
|
504
513
|
return void 0;
|
|
505
514
|
const stored = { seq: row.seq, value };
|
|
506
|
-
this.
|
|
515
|
+
this.prepare("UPDATE mockingbird_records SET value = ? WHERE namespace = ? AND collection = ? AND id = ?").run(JSON.stringify(stored), this.namespace, this.collectionName, id);
|
|
507
516
|
return stored;
|
|
508
517
|
});
|
|
509
518
|
}
|
|
510
519
|
delete(id) {
|
|
511
|
-
const result = this.
|
|
520
|
+
const result = this.prepare("DELETE FROM mockingbird_records WHERE namespace = ? AND collection = ? AND id = ?").run(this.namespace, this.collectionName, id);
|
|
512
521
|
return result.changes > 0;
|
|
513
522
|
}
|
|
514
523
|
/** How many records the collection holds, without reading them. */
|
|
515
524
|
count() {
|
|
516
|
-
const row = this.
|
|
525
|
+
const row = this.prepare("SELECT COUNT(*) AS n FROM mockingbird_records WHERE namespace = ? AND collection = ?").get(this.namespace, this.collectionName);
|
|
517
526
|
return Number(row?.n ?? 0);
|
|
518
527
|
}
|
|
519
528
|
list(options = {}) {
|
|
520
|
-
const rows = this.
|
|
529
|
+
const rows = this.prepare("SELECT id, seq, value FROM mockingbird_records WHERE namespace = ? AND collection = ?").all(this.namespace, this.collectionName);
|
|
521
530
|
const out = [];
|
|
522
531
|
for (const row of rows) {
|
|
523
532
|
const stored = JSON.parse(row.value);
|
|
@@ -3821,7 +3830,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3821
3830
|
};
|
|
3822
3831
|
|
|
3823
3832
|
// ../core/dist/version.js
|
|
3824
|
-
var PACKAGE_VERSION = true ? "3.
|
|
3833
|
+
var PACKAGE_VERSION = true ? "3.10.1" : UNRELEASED_VERSION;
|
|
3825
3834
|
|
|
3826
3835
|
// ../core/dist/webhooks.js
|
|
3827
3836
|
var json5 = (status, body) => new Response(JSON.stringify(body), {
|
|
@@ -12938,4 +12947,4 @@ export {
|
|
|
12938
12947
|
* Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
|
|
12939
12948
|
* MIT license: see THIRD_PARTY_NOTICES.md in the repository and npm packages.
|
|
12940
12949
|
*/
|
|
12941
|
-
//# sourceMappingURL=chunk-
|
|
12950
|
+
//# sourceMappingURL=chunk-RJ2ZTFWL.js.map
|