@evolu/common 8.0.0-next.4 → 8.0.0-next.5
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/src/Assert.d.ts +5 -0
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +6 -1
- package/dist/src/Error.d.ts +5 -3
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +16 -0
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +2 -1
- package/dist/src/Task.d.ts +95 -92
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +60 -52
- package/dist/src/Test.d.ts +10 -11
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Types.d.ts +0 -8
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +10 -10
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +26 -26
- package/package.json +1 -1
- package/src/Assert.ts +6 -1
- package/src/Error.ts +5 -4
- package/src/Sqlite.ts +2 -1
- package/src/Task.ts +319 -314
- package/src/Test.ts +10 -11
- package/src/Types.ts +0 -9
- package/src/local-first/Db.ts +31 -29
- package/src/local-first/Shared.ts +33 -32
package/src/Error.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type
|
|
7
|
+
import { type InferType, typed, Unknown } from "./Type.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* A wrapper for unknown errors caught at runtime.
|
|
@@ -18,9 +18,10 @@ import type { Typed } from "./Type.js";
|
|
|
18
18
|
*
|
|
19
19
|
* Use {@link createUnknownError} to create instances.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
}
|
|
21
|
+
export const UnknownError = /*#__PURE__*/ typed("UnknownError", {
|
|
22
|
+
error: Unknown,
|
|
23
|
+
});
|
|
24
|
+
export interface UnknownError extends InferType<typeof UnknownError> {}
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Creates an {@link UnknownError} from an unknown error.
|
package/src/Sqlite.ts
CHANGED
|
@@ -325,10 +325,11 @@ export const testSetupSqlite = async (
|
|
|
325
325
|
const sqlite = disposer.use(
|
|
326
326
|
await run.orThrow(createSqlite(testName, { mode: "memory" })),
|
|
327
327
|
);
|
|
328
|
+
const runWithSqlite = disposer.use(run.create({ ...run.deps, sqlite }));
|
|
328
329
|
const disposables = disposer.move();
|
|
329
330
|
|
|
330
331
|
return {
|
|
331
|
-
run:
|
|
332
|
+
run: runWithSqlite,
|
|
332
333
|
sqlite,
|
|
333
334
|
[Symbol.asyncDispose]: () => disposables.disposeAsync(),
|
|
334
335
|
};
|