@crvouga/mockingbird-runtime 0.2.0 → 0.2.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/dist/adapter-node.js +2 -2
- package/dist/{chunk-OISPHKE2.js → chunk-4BRVNPWR.js} +95 -14
- package/dist/{chunk-OISPHKE2.js.map → chunk-4BRVNPWR.js.map} +4 -4
- package/dist/{chunk-5WW5N4TU.js → chunk-RO7FHXO3.js} +2 -2
- package/dist/http-provider.d.ts +2 -0
- package/dist/http-provider.js +1 -1
- package/dist/mqtt-broker/node.d.ts +2 -0
- package/dist/mqtt-broker/node.js +2 -2
- package/dist/mqtt-broker.d.ts +2 -0
- package/dist/mqtt-broker.js +2 -2
- package/dist/service.d.ts +8 -3
- package/dist/service.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-5WW5N4TU.js.map → chunk-RO7FHXO3.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_NAMESPACE
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4BRVNPWR.js";
|
|
4
4
|
import {
|
|
5
5
|
fromBase64,
|
|
6
6
|
matchNamespacePath
|
|
@@ -775,4 +775,4 @@ export {
|
|
|
775
775
|
connectNamespace,
|
|
776
776
|
brokerAdminRoutes
|
|
777
777
|
};
|
|
778
|
-
//# sourceMappingURL=chunk-
|
|
778
|
+
//# sourceMappingURL=chunk-RO7FHXO3.js.map
|
package/dist/http-provider.d.ts
CHANGED
|
@@ -329,6 +329,8 @@ declare class Collection$1<T> {
|
|
|
329
329
|
namespace: string,
|
|
330
330
|
/** Table name inside the namespace. Stable across resets of the rows themselves. */
|
|
331
331
|
collectionName: string);
|
|
332
|
+
/** Note the record's current row in every open rollback journal that has not seen it yet. */
|
|
333
|
+
private journalRecord;
|
|
332
334
|
private bumpCollectionSeq;
|
|
333
335
|
nextSequence(): number;
|
|
334
336
|
get(id: string): T | undefined;
|
package/dist/http-provider.js
CHANGED
|
@@ -58,6 +58,8 @@ declare class Collection<T> {
|
|
|
58
58
|
namespace: string,
|
|
59
59
|
/** Table name inside the namespace. Stable across resets of the rows themselves. */
|
|
60
60
|
collectionName: string);
|
|
61
|
+
/** Note the record's current row in every open rollback journal that has not seen it yet. */
|
|
62
|
+
private journalRecord;
|
|
61
63
|
private bumpCollectionSeq;
|
|
62
64
|
nextSequence(): number;
|
|
63
65
|
get(id: string): T | undefined;
|
package/dist/mqtt-broker/node.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MAX_VARIABLE_BYTE_INTEGER,
|
|
3
3
|
MQTT_WEBSOCKET_PATH
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-RO7FHXO3.js";
|
|
5
|
+
import "../chunk-4BRVNPWR.js";
|
|
6
6
|
import "../chunk-2KDYLZXC.js";
|
|
7
7
|
import "../chunk-LL6NKAJO.js";
|
|
8
8
|
import "../chunk-2Y25NPCV.js";
|
package/dist/mqtt-broker.d.ts
CHANGED
|
@@ -333,6 +333,8 @@ declare class Collection<T> {
|
|
|
333
333
|
namespace: string,
|
|
334
334
|
/** Table name inside the namespace. Stable across resets of the rows themselves. */
|
|
335
335
|
collectionName: string);
|
|
336
|
+
/** Note the record's current row in every open rollback journal that has not seen it yet. */
|
|
337
|
+
private journalRecord;
|
|
336
338
|
private bumpCollectionSeq;
|
|
337
339
|
nextSequence(): number;
|
|
338
340
|
get(id: string): T | undefined;
|
package/dist/mqtt-broker.js
CHANGED
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
observeClock,
|
|
15
15
|
takeConnackFault,
|
|
16
16
|
webSocketNamespace
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RO7FHXO3.js";
|
|
18
18
|
import {
|
|
19
19
|
Collection,
|
|
20
20
|
IdSequence
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-4BRVNPWR.js";
|
|
22
22
|
import "./chunk-2KDYLZXC.js";
|
|
23
23
|
import {
|
|
24
24
|
fromBase64,
|
package/dist/service.d.ts
CHANGED
|
@@ -1517,9 +1517,12 @@ declare const snapshotNamespace: (sqlite: SqliteClient, namespace: string) => Na
|
|
|
1517
1517
|
*/
|
|
1518
1518
|
declare const restoreNamespace: (sqlite: SqliteClient, namespace: string, snapshot: NamespaceSnapshot) => void;
|
|
1519
1519
|
/**
|
|
1520
|
-
* Execute asynchronous service work atomically
|
|
1521
|
-
*
|
|
1522
|
-
*
|
|
1520
|
+
* Execute asynchronous service work atomically: on a throw, every record and collection
|
|
1521
|
+
* sequence `run` wrote in `namespace` goes back to how it was. Only the rows the work touched
|
|
1522
|
+
* are saved and restored, so the cost follows the write, not the size of the namespace. Every
|
|
1523
|
+
* namespace write goes through {@link Collection}, which records into the open journal. This is
|
|
1524
|
+
* the prescribed escape hatch when the SQLite adapter cannot hold a transaction across `await`;
|
|
1525
|
+
* service code should not coordinate raw namespace snapshots itself.
|
|
1523
1526
|
*/
|
|
1524
1527
|
declare const withNamespaceRollback: <T>(sqlite: SqliteClient, namespace: string, run: () => Promise<T>) => Promise<T>;
|
|
1525
1528
|
|
|
@@ -1551,6 +1554,8 @@ declare class Collection<T> {
|
|
|
1551
1554
|
namespace: string,
|
|
1552
1555
|
/** Table name inside the namespace. Stable across resets of the rows themselves. */
|
|
1553
1556
|
collectionName: string);
|
|
1557
|
+
/** Note the record's current row in every open rollback journal that has not seen it yet. */
|
|
1558
|
+
private journalRecord;
|
|
1554
1559
|
private bumpCollectionSeq;
|
|
1555
1560
|
nextSequence(): number;
|
|
1556
1561
|
get(id: string): T | undefined;
|
package/dist/service.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The shared Mockingbird runtime every emulator service depends on: router, admin API and page, snapshots, faults and clock, installed once however many emulators an application uses.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
File without changes
|