@evolu/common 7.4.0 → 8.0.0-next.0
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/README.md +4 -61
- package/dist/src/Array.d.ts +343 -102
- package/dist/src/Array.d.ts.map +1 -1
- package/dist/src/Array.js +181 -85
- package/dist/src/Assert.d.ts +57 -11
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +47 -11
- package/dist/src/BigInt.d.ts +6 -1
- package/dist/src/BigInt.d.ts.map +1 -1
- package/dist/src/BigInt.js +5 -0
- package/dist/src/Brand.d.ts +40 -12
- package/dist/src/Brand.d.ts.map +1 -1
- package/dist/src/Brand.js +5 -0
- package/dist/src/Buffer.d.ts +6 -1
- package/dist/src/Buffer.d.ts.map +1 -1
- package/dist/src/Buffer.js +7 -2
- package/dist/src/Cache.d.ts +10 -2
- package/dist/src/Cache.d.ts.map +1 -1
- package/dist/src/Cache.js +6 -0
- package/dist/src/Callbacks.d.ts +10 -7
- package/dist/src/Callbacks.d.ts.map +1 -1
- package/dist/src/Callbacks.js +23 -13
- package/dist/src/Console.d.ts +361 -69
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +217 -117
- package/dist/src/Crypto.d.ts +70 -21
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +72 -27
- package/dist/src/Eq.d.ts +22 -2
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +21 -1
- package/dist/src/Error.d.ts +23 -12
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +27 -11
- package/dist/src/Function.d.ts +128 -56
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +118 -14
- package/dist/src/Identicon.d.ts +5 -0
- package/dist/src/Identicon.d.ts.map +1 -1
- package/dist/src/Identicon.js +6 -1
- package/dist/src/Lookup.d.ts +160 -0
- package/dist/src/Lookup.d.ts.map +1 -0
- package/dist/src/Lookup.js +192 -0
- package/dist/src/Microtask.d.ts +21 -0
- package/dist/src/Microtask.d.ts.map +1 -0
- package/dist/src/Microtask.js +37 -0
- package/dist/src/Number.d.ts +18 -4
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +23 -1
- package/dist/src/Object.d.ts +110 -5
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +108 -5
- package/dist/src/Option.d.ts +58 -0
- package/dist/src/Option.d.ts.map +1 -0
- package/dist/src/Option.js +43 -0
- package/dist/src/Order.d.ts +5 -0
- package/dist/src/Order.d.ts.map +1 -1
- package/dist/src/Order.js +8 -3
- package/dist/src/Platform.d.ts +36 -2
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +10 -6
- package/dist/src/Polyfills.d.ts +27 -0
- package/dist/src/Polyfills.d.ts.map +1 -0
- package/dist/src/Polyfills.js +299 -0
- package/dist/src/Random.d.ts +18 -7
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +9 -7
- package/dist/src/Redacted.d.ts +7 -4
- package/dist/src/Redacted.d.ts.map +1 -1
- package/dist/src/Redacted.js +5 -0
- package/dist/src/Ref.d.ts +31 -16
- package/dist/src/Ref.d.ts.map +1 -1
- package/dist/src/Ref.js +35 -7
- package/dist/src/RefCount.d.ts +62 -0
- package/dist/src/RefCount.d.ts.map +1 -0
- package/dist/src/RefCount.js +83 -0
- package/dist/src/Relation.d.ts +84 -29
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Relation.js +83 -105
- package/dist/src/Resource.d.ts +263 -0
- package/dist/src/Resource.d.ts.map +1 -0
- package/dist/src/Resource.js +389 -0
- package/dist/src/Result.d.ts +390 -374
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +142 -70
- package/dist/src/Schedule.d.ts +953 -0
- package/dist/src/Schedule.d.ts.map +1 -0
- package/dist/src/Schedule.js +1199 -0
- package/dist/src/Set.d.ts +181 -0
- package/dist/src/Set.d.ts.map +1 -0
- package/dist/src/Set.js +137 -0
- package/dist/src/Skiplist.d.ts +6 -1
- package/dist/src/Skiplist.d.ts.map +1 -1
- package/dist/src/Skiplist.js +5 -0
- package/dist/src/Sqlite.d.ts +160 -60
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +290 -190
- package/dist/src/Store.d.ts +36 -28
- package/dist/src/Store.d.ts.map +1 -1
- package/dist/src/Store.js +55 -15
- package/dist/src/String.d.ts +5 -0
- package/dist/src/String.d.ts.map +1 -1
- package/dist/src/String.js +5 -0
- package/dist/src/Task.d.ts +2263 -423
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1488 -348
- package/dist/src/Test.d.ts +122 -0
- package/dist/src/Test.d.ts.map +1 -0
- package/dist/src/Test.js +66 -0
- package/dist/src/Time.d.ts +201 -48
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +190 -86
- package/dist/src/Tracer.d.ts +48 -0
- package/dist/src/Tracer.d.ts.map +1 -0
- package/dist/src/Tracer.js +6 -0
- package/dist/src/Type.d.ts +582 -209
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +362 -240
- package/dist/src/Types.d.ts +160 -6
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/Types.js +22 -2
- package/dist/src/WebSocket.d.ts +113 -58
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +210 -118
- package/dist/src/Worker.d.ts +245 -60
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +220 -64
- package/dist/src/index.d.ts +25 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -3
- package/dist/src/local-first/Db.d.ts +24 -213
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +622 -293
- package/dist/src/local-first/Error.d.ts +12 -0
- package/dist/src/local-first/Error.d.ts.map +1 -0
- package/dist/src/local-first/Error.js +6 -0
- package/dist/src/local-first/Evolu.d.ts +330 -285
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +472 -402
- package/dist/src/local-first/LocalAuth.d.ts +10 -10
- package/dist/src/local-first/LocalAuth.d.ts.map +1 -1
- package/dist/src/local-first/LocalAuth.js +6 -1
- package/dist/src/local-first/Owner.d.ts +70 -27
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +27 -14
- package/dist/src/local-first/Protocol.d.ts +58 -50
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +253 -155
- package/dist/src/local-first/Query.d.ts +133 -43
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Query.js +139 -90
- package/dist/src/local-first/Relay.d.ts +18 -38
- package/dist/src/local-first/Relay.d.ts.map +1 -1
- package/dist/src/local-first/Relay.js +59 -171
- package/dist/src/local-first/Schema.d.ts +139 -144
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +78 -163
- package/dist/src/local-first/Shared.d.ts +125 -0
- package/dist/src/local-first/Shared.d.ts.map +1 -0
- package/dist/src/local-first/Shared.js +569 -0
- package/dist/src/local-first/Storage.d.ts +50 -53
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +121 -173
- package/dist/src/local-first/Timestamp.d.ts +28 -35
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +24 -25
- package/dist/src/local-first/index.d.ts +2 -15
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +2 -15
- package/package.json +36 -26
- package/src/Array.ts +467 -106
- package/src/Assert.ts +87 -12
- package/src/BigInt.ts +7 -1
- package/src/Brand.ts +41 -12
- package/src/Buffer.ts +10 -4
- package/src/Cache.ts +11 -2
- package/src/Callbacks.ts +33 -23
- package/src/Console.ts +567 -178
- package/src/Crypto.ts +111 -62
- package/src/Eq.ts +30 -3
- package/src/Error.ts +50 -34
- package/src/Function.ts +140 -68
- package/src/Identicon.ts +7 -1
- package/src/Lookup.ts +415 -0
- package/src/Microtask.ts +58 -0
- package/src/Number.ts +40 -7
- package/src/Object.ts +155 -16
- package/src/Option.ts +74 -0
- package/src/Order.ts +11 -3
- package/src/Platform.ts +43 -7
- package/src/Polyfills.ts +465 -0
- package/src/Random.ts +25 -11
- package/src/Redacted.ts +8 -4
- package/src/Ref.ts +72 -21
- package/src/RefCount.ts +170 -0
- package/src/Relation.ts +188 -136
- package/src/Resource.ts +864 -0
- package/src/Result.ts +548 -381
- package/src/Schedule.ts +1471 -0
- package/src/Set.ts +247 -0
- package/src/Skiplist.ts +7 -1
- package/src/Sqlite.ts +409 -304
- package/src/Store.ts +94 -48
- package/src/String.ts +6 -0
- package/src/Task.ts +3685 -740
- package/src/Test.ts +162 -0
- package/src/Time.ts +348 -145
- package/src/Tracer.ts +54 -0
- package/src/Type.ts +1064 -630
- package/src/Types.ts +202 -7
- package/src/WebSocket.ts +311 -178
- package/src/Worker.ts +527 -147
- package/src/index.ts +74 -3
- package/src/local-first/Db.ts +871 -597
- package/src/local-first/Error.ts +17 -0
- package/src/local-first/Evolu.ts +884 -823
- package/src/local-first/LocalAuth.ts +10 -10
- package/src/local-first/Owner.ts +94 -42
- package/src/local-first/Protocol.ts +440 -303
- package/src/local-first/Query.ts +243 -194
- package/src/local-first/Relay.ts +91 -252
- package/src/local-first/Schema.ts +284 -394
- package/src/local-first/Shared.ts +932 -0
- package/src/local-first/Storage.ts +209 -282
- package/src/local-first/Timestamp.ts +38 -45
- package/src/local-first/index.ts +2 -16
- package/LICENSE +0 -21
- package/dist/src/Instances.d.ts +0 -34
- package/dist/src/Instances.d.ts.map +0 -1
- package/dist/src/Instances.js +0 -44
- package/dist/src/Resources.d.ts +0 -118
- package/dist/src/Resources.d.ts.map +0 -1
- package/dist/src/Resources.js +0 -197
- package/dist/src/local-first/Platform.d.ts +0 -25
- package/dist/src/local-first/Platform.d.ts.map +0 -1
- package/dist/src/local-first/Platform.js +0 -1
- package/dist/src/local-first/Public.d.ts +0 -22
- package/dist/src/local-first/Public.d.ts.map +0 -1
- package/dist/src/local-first/Public.js +0 -15
- package/dist/src/local-first/PublicKysely.d.ts +0 -148
- package/dist/src/local-first/PublicKysely.d.ts.map +0 -1
- package/dist/src/local-first/PublicKysely.js +0 -184
- package/dist/src/local-first/Sync.d.ts +0 -112
- package/dist/src/local-first/Sync.d.ts.map +0 -1
- package/dist/src/local-first/Sync.js +0 -529
- package/src/Instances.ts +0 -90
- package/src/Resources.ts +0 -367
- package/src/local-first/Platform.ts +0 -27
- package/src/local-first/Public.ts +0 -42
- package/src/local-first/PublicKysely.ts +0 -239
- package/src/local-first/Sync.ts +0 -960
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test utilities for deterministic testing.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type TestConsoleDep } from "./Console.js";
|
|
7
|
+
import { type RandomLibDep } from "./Random.js";
|
|
8
|
+
import { type Run, type RunDeps } from "./Task.js";
|
|
9
|
+
import { type Duration, type TestTimeDep } from "./Time.js";
|
|
10
|
+
/**
|
|
11
|
+
* Cheap deterministic baseline deps for tests.
|
|
12
|
+
*
|
|
13
|
+
* `TestDeps` includes test-friendly replacements for {@link RunDeps}, such as
|
|
14
|
+
* {@link TestConsole} and {@link TestTime}, plus extra helpers commonly useful in
|
|
15
|
+
* tests and fixtures, such as `randomLib` (only that for now).
|
|
16
|
+
*
|
|
17
|
+
* Use it directly for synchronous test setup, fixtures, and helpers. It is also
|
|
18
|
+
* intentionally the base deps used by {@link testCreateRun}.
|
|
19
|
+
*/
|
|
20
|
+
export type TestDeps = Omit<RunDeps, "console" | "time"> & TestConsoleDep & TestTimeDep & RandomLibDep;
|
|
21
|
+
/**
|
|
22
|
+
* Creates deterministic {@link TestDeps}.
|
|
23
|
+
*
|
|
24
|
+
* Each call creates fresh instances, so tests don't share state.
|
|
25
|
+
*
|
|
26
|
+
* Includes these deps:
|
|
27
|
+
*
|
|
28
|
+
* - `console`: {@link TestConsole}
|
|
29
|
+
* - `random`: {@link Random}
|
|
30
|
+
* - `randomLib`: seeded `random` package instance
|
|
31
|
+
* - `randomBytes`: {@link RandomBytes}
|
|
32
|
+
* - `time`: {@link TestTime}
|
|
33
|
+
*
|
|
34
|
+
* Use this for synchronous code that accepts deps directly. For tests that run
|
|
35
|
+
* Tasks, use {@link testCreateRun}.
|
|
36
|
+
*
|
|
37
|
+
* ### Example
|
|
38
|
+
*
|
|
39
|
+
* ```ts
|
|
40
|
+
* test("Callbacks with no argument", () => {
|
|
41
|
+
* const deps = testCreateDeps();
|
|
42
|
+
* const callbacks = createCallbacks(deps);
|
|
43
|
+
*
|
|
44
|
+
* let called = false;
|
|
45
|
+
* const id = callbacks.register(() => {
|
|
46
|
+
* called = true;
|
|
47
|
+
* });
|
|
48
|
+
*
|
|
49
|
+
* callbacks.execute(id);
|
|
50
|
+
* expect(called).toBe(true);
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare const testCreateDeps: (options?: {
|
|
55
|
+
readonly seed?: string;
|
|
56
|
+
}) => TestDeps;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a test {@link Run} with deterministic default deps or optional custom
|
|
59
|
+
* deps.
|
|
60
|
+
*
|
|
61
|
+
* Use this as the default composition root in tests. Each call creates fresh
|
|
62
|
+
* {@link TestDeps} via {@link testCreateDeps}, then merges any provided custom
|
|
63
|
+
* deps.
|
|
64
|
+
*
|
|
65
|
+
* ### Example
|
|
66
|
+
*
|
|
67
|
+
* ```ts
|
|
68
|
+
* // Built-in TestTime
|
|
69
|
+
* await using run = testCreateRun();
|
|
70
|
+
* const fiber = run(sleep("1s"));
|
|
71
|
+
* run.deps.time.advance("1s");
|
|
72
|
+
* await fiber;
|
|
73
|
+
*
|
|
74
|
+
* // For a single test, create the dependency using the Run.
|
|
75
|
+
* await using run = testCreateRun();
|
|
76
|
+
* await using foo = await run.orThrow(createFoo());
|
|
77
|
+
* const runWithFoo = run.addDeps({ foo });
|
|
78
|
+
*
|
|
79
|
+
* expect(runWithFoo.deps.foo).toBe(foo);
|
|
80
|
+
*
|
|
81
|
+
* // If multiple tests need the same setup, create a disposable helper.
|
|
82
|
+
* // Then `await using setup` disposes everything the helper owns.
|
|
83
|
+
* const setupFoo = async () => {
|
|
84
|
+
* await using stack = new AsyncDisposableStack();
|
|
85
|
+
* const run = stack.use(testCreateRun());
|
|
86
|
+
* const foo = stack.use(await run.orThrow(createFoo()));
|
|
87
|
+
* const moved = stack.move();
|
|
88
|
+
*
|
|
89
|
+
* // Return whatever the tests need: a Run with the dependency,
|
|
90
|
+
* // the dependency itself, or both.
|
|
91
|
+
* return {
|
|
92
|
+
* run: run.addDeps({ foo }),
|
|
93
|
+
* foo,
|
|
94
|
+
* [Symbol.asyncDispose]: () => moved.disposeAsync(),
|
|
95
|
+
* };
|
|
96
|
+
* };
|
|
97
|
+
*
|
|
98
|
+
* await using setup = await setupFoo();
|
|
99
|
+
* const { run, foo } = setup;
|
|
100
|
+
* expect(run.deps.foo).toBe(foo);
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Name reusable setup helpers after what they set up:
|
|
104
|
+
*
|
|
105
|
+
* - `setupFoo` for reusable test setup for `Foo`
|
|
106
|
+
* - `testSetupFoo` when a library module exports the helper as part of its public
|
|
107
|
+
* test API, e.g. `testSetupSqlite`.
|
|
108
|
+
*/
|
|
109
|
+
export declare function testCreateRun(): Run<TestDeps>;
|
|
110
|
+
/** With custom dependencies merged into {@link TestDeps}. */
|
|
111
|
+
export declare function testCreateRun<D>(deps: D): Run<TestDeps & D>;
|
|
112
|
+
/**
|
|
113
|
+
* Returns a Promise that resolves after a macrotask delay.
|
|
114
|
+
*
|
|
115
|
+
* Use this to model a real async boundary in a test double, for example an
|
|
116
|
+
* async disposer that should not complete in the same turn.
|
|
117
|
+
*
|
|
118
|
+
* Avoid using it to coordinate assertions. Waiting for a macrotask tends to
|
|
119
|
+
* make tests indirect and brittle.
|
|
120
|
+
*/
|
|
121
|
+
export declare const testWaitForMacrotask: (duration?: Duration) => Promise<void>;
|
|
122
|
+
//# sourceMappingURL=Test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Test.d.ts","sourceRoot":"","sources":["../../src/Test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAa,KAAK,GAAG,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,EAIL,KAAK,QAAQ,EAEb,KAAK,WAAW,EACjB,MAAM,WAAW,CAAC;AAEnB;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,GACtD,cAAc,GACd,WAAW,GACX,YAAY,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,KAAG,QAQH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AAE/C,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;AAO7D;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAC/B,WAAU,QAAoB,KAC7B,OAAO,CAAC,IAAI,CAAyB,CAAC"}
|
package/dist/src/Test.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test utilities for deterministic testing.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { testCreateConsole, } from "./Console.js";
|
|
7
|
+
import { testCreateRandomBytes } from "./Crypto.js";
|
|
8
|
+
import { testCreateRandom, testCreateRandomLib, } from "./Random.js";
|
|
9
|
+
import { createRun } from "./Task.js";
|
|
10
|
+
import { minMillis, setTimeout, testCreateTime, } from "./Time.js";
|
|
11
|
+
/**
|
|
12
|
+
* Creates deterministic {@link TestDeps}.
|
|
13
|
+
*
|
|
14
|
+
* Each call creates fresh instances, so tests don't share state.
|
|
15
|
+
*
|
|
16
|
+
* Includes these deps:
|
|
17
|
+
*
|
|
18
|
+
* - `console`: {@link TestConsole}
|
|
19
|
+
* - `random`: {@link Random}
|
|
20
|
+
* - `randomLib`: seeded `random` package instance
|
|
21
|
+
* - `randomBytes`: {@link RandomBytes}
|
|
22
|
+
* - `time`: {@link TestTime}
|
|
23
|
+
*
|
|
24
|
+
* Use this for synchronous code that accepts deps directly. For tests that run
|
|
25
|
+
* Tasks, use {@link testCreateRun}.
|
|
26
|
+
*
|
|
27
|
+
* ### Example
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* test("Callbacks with no argument", () => {
|
|
31
|
+
* const deps = testCreateDeps();
|
|
32
|
+
* const callbacks = createCallbacks(deps);
|
|
33
|
+
*
|
|
34
|
+
* let called = false;
|
|
35
|
+
* const id = callbacks.register(() => {
|
|
36
|
+
* called = true;
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* callbacks.execute(id);
|
|
40
|
+
* expect(called).toBe(true);
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export const testCreateDeps = (options) => {
|
|
45
|
+
const seed = options?.seed ?? "evolu";
|
|
46
|
+
const console = testCreateConsole();
|
|
47
|
+
const random = testCreateRandom(seed);
|
|
48
|
+
const randomLib = testCreateRandomLib(seed);
|
|
49
|
+
const randomBytes = testCreateRandomBytes({ randomLib });
|
|
50
|
+
const time = testCreateTime();
|
|
51
|
+
return { console, randomBytes, random, randomLib, time };
|
|
52
|
+
};
|
|
53
|
+
export function testCreateRun(deps) {
|
|
54
|
+
const defaults = testCreateDeps();
|
|
55
|
+
return createRun({ ...defaults, ...deps });
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Returns a Promise that resolves after a macrotask delay.
|
|
59
|
+
*
|
|
60
|
+
* Use this to model a real async boundary in a test double, for example an
|
|
61
|
+
* async disposer that should not complete in the same turn.
|
|
62
|
+
*
|
|
63
|
+
* Avoid using it to coordinate assertions. Waiting for a macrotask tends to
|
|
64
|
+
* make tests indirect and brittle.
|
|
65
|
+
*/
|
|
66
|
+
export const testWaitForMacrotask = (duration = minMillis) => setTimeout(duration);
|
package/dist/src/Time.d.ts
CHANGED
|
@@ -1,80 +1,233 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Time representations, durations, and scheduling utilities.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { Brand } from "./Brand.js";
|
|
7
|
+
import { type DateIso } from "./Type.js";
|
|
8
|
+
import type { Digit, Digit1To23, Digit1To51, Digit1To59, Digit1To6, Digit1To9, Digit1To99 } from "./Types.js";
|
|
9
|
+
/** Time and timer operations. */
|
|
3
10
|
export interface Time {
|
|
4
|
-
|
|
5
|
-
readonly
|
|
11
|
+
/** Returns current time as Unix epoch milliseconds. */
|
|
12
|
+
readonly now: () => Millis;
|
|
13
|
+
/** Returns current time as an ISO 8601 UTC string. */
|
|
14
|
+
readonly nowDateIso: () => DateIso;
|
|
15
|
+
/** Schedules a callback after the specified delay. */
|
|
16
|
+
readonly setTimeout: (fn: () => void, delay: Duration) => TimeoutId;
|
|
17
|
+
/** Cancels a timeout scheduled with {@link Time.setTimeout}. */
|
|
18
|
+
readonly clearTimeout: (id: TimeoutId) => void;
|
|
6
19
|
}
|
|
7
20
|
export interface TimeDep {
|
|
8
21
|
readonly time: Time;
|
|
9
22
|
}
|
|
10
23
|
/**
|
|
11
|
-
*
|
|
24
|
+
* Opaque type for timeout handles.
|
|
12
25
|
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
* Use with {@link Time.clearTimeout} to cancel a pending timeout.
|
|
27
|
+
*/
|
|
28
|
+
export type TimeoutId = Brand<"TimeoutId">;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a {@link Time} using `Date.now()` and `globalThis.setTimeout`.
|
|
31
|
+
*
|
|
32
|
+
* Throws if the system clock returns an out-of-range value. This is intentional
|
|
33
|
+
* — there's no reasonable fallback for a misconfigured clock.
|
|
16
34
|
*/
|
|
17
35
|
export declare const createTime: () => Time;
|
|
18
36
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
37
|
+
* Test {@link Time} with controllable timers.
|
|
38
|
+
*
|
|
39
|
+
* Call `advance(ms)` to move time forward and trigger any pending timeouts.
|
|
21
40
|
*/
|
|
22
|
-
export
|
|
23
|
-
/**
|
|
24
|
-
|
|
41
|
+
export interface TestTime extends Time {
|
|
42
|
+
/** Advances time by the specified duration, triggering pending timeouts. */
|
|
43
|
+
readonly advance: (duration: Duration) => void;
|
|
44
|
+
}
|
|
45
|
+
export interface TestTimeDep {
|
|
46
|
+
readonly time: TestTime;
|
|
47
|
+
}
|
|
25
48
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
49
|
+
* Creates a {@link TestTime} with controllable timers for testing.
|
|
50
|
+
*
|
|
51
|
+
* Time starts at `startAt` (default 0) and only advances when `advance()` is
|
|
52
|
+
* called. Timeouts scheduled via `setTimeout` fire when time is advanced past
|
|
53
|
+
* their deadline.
|
|
54
|
+
*
|
|
55
|
+
* Set `autoIncrement` to automatically increment time by 1ms after each `now()`
|
|
56
|
+
* call via microtask (useful for tests that need monotonically increasing
|
|
57
|
+
* values without explicit `advance()` calls).
|
|
28
58
|
*/
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export type Days = Exclude<D, "0"> | `${Exclude<D, "0">}${D}`;
|
|
59
|
+
export declare const testCreateTime: (options?: {
|
|
60
|
+
readonly startAt?: Millis;
|
|
61
|
+
readonly autoIncrement?: boolean;
|
|
62
|
+
}) => TestTime;
|
|
34
63
|
/**
|
|
35
|
-
*
|
|
64
|
+
* Milliseconds timestamp, like `Date.now()`.
|
|
65
|
+
*
|
|
66
|
+
* The maximum value is 281474976710654 (281474976710655 - 1, reserved for
|
|
67
|
+
* infinity). This enables efficient binary serialization, saving 2 bytes
|
|
68
|
+
* compared to typical 8-byte (64-bit) timestamps.
|
|
69
|
+
*
|
|
70
|
+
* `new Date(281474976710654).toString()` = Tue Aug 02 10889 07:31:49
|
|
36
71
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
72
|
+
* If a system clock exceeds this range, operations will throw. This is
|
|
73
|
+
* intentional — there's no reasonable fallback for a misconfigured clock.
|
|
74
|
+
*/
|
|
75
|
+
export declare const Millis: import("./Type.js").BrandType<import("./Type.js").BrandType<import("./Type.js").Type<"Brand", number & Brand<"Int"> & Brand<"NonNegative">, number, import("./Type.js").NonNegativeError, number & Brand<"Int">, import("./Type.js").NumberError | import("./Type.js").IntError>, "LessThan281474976710655", import("./Type.js").LessThanError<281474976710655>, import("./Type.js").NumberError | import("./Type.js").NonNegativeError | import("./Type.js").IntError>, "Millis", import("./Type.js").BrandWithoutRefineError<"Millis", import("./Type.js").NumberError | import("./Type.js").LessThanError<281474976710655> | import("./Type.js").NonNegativeError | import("./Type.js").IntError>, never>;
|
|
76
|
+
export type Millis = typeof Millis.Type;
|
|
77
|
+
/** Minimum {@link Millis} value. */
|
|
78
|
+
export declare const minMillis: Millis;
|
|
79
|
+
/** Maximum {@link Millis} value. */
|
|
80
|
+
export declare const maxMillis: Millis;
|
|
81
|
+
/**
|
|
82
|
+
* Converts {@link Millis} to {@link DateIso}.
|
|
83
|
+
*
|
|
84
|
+
* This is a safe cast because {@link Millis} guarantees a valid timestamp range
|
|
85
|
+
* that always produces a valid ISO string.
|
|
86
|
+
*/
|
|
87
|
+
export declare const millisToDateIso: (value: Millis) => DateIso;
|
|
88
|
+
/**
|
|
89
|
+
* Duration can be either a {@link DurationLiteral} or milliseconds as
|
|
90
|
+
* {@link Millis}.
|
|
91
|
+
*/
|
|
92
|
+
export type Duration = DurationLiteral | Millis;
|
|
93
|
+
/**
|
|
94
|
+
* Duration literal with compile-time validation.
|
|
39
95
|
*
|
|
40
96
|
* Supported formats:
|
|
41
97
|
*
|
|
42
|
-
* - Milliseconds: `
|
|
43
|
-
* - Seconds: `
|
|
44
|
-
* - Minutes: `
|
|
45
|
-
* - Hours: `1h`, `
|
|
46
|
-
* - Days: `1d`, `
|
|
47
|
-
* -
|
|
98
|
+
* - Milliseconds: `1ms`, `500ms`, `999ms` (1-999)
|
|
99
|
+
* - Seconds: `1s`, `59s`, `12.5s` (1-59, 1.1-59.9)
|
|
100
|
+
* - Minutes: `1m`, `59m`, `12.5m` (1-59, 1.1-59.9)
|
|
101
|
+
* - Hours: `1h`, `23h`, `12.5h` (1-23, 1.1-23.9)
|
|
102
|
+
* - Days: `1d`, `6d`, `1.5d` (1-6, 1.1-6.9)
|
|
103
|
+
* - Weeks: `1w`, `51w`, `1.5w` (1-51, 1.1-51.9)
|
|
104
|
+
* - Months: not supported (variable length)
|
|
105
|
+
* - Years: `1y`, `99y`, `1.5y` (1-99, 1.1-99.9)
|
|
106
|
+
*
|
|
107
|
+
* Each unit is limited to values that can't be expressed in the next larger
|
|
108
|
+
* unit, ensuring every duration has exactly one canonical representation (e.g.,
|
|
109
|
+
* 1000ms must be written as `"1s"`, not `"1000ms"`).
|
|
48
110
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
111
|
+
* Decimal values cover cases like 1.5s (1500ms) or 1.5h (90 minutes) without
|
|
112
|
+
* allowing redundant forms. For precise values that don't fit (e.g., 1050ms),
|
|
113
|
+
* use {@link Millis} directly.
|
|
114
|
+
*
|
|
115
|
+
* Zero duration (0ms) is not supported. For yielding without delay, use `await
|
|
116
|
+
* Promise.resolve()` for microtasks or the {@link yieldNow} for macrotasks.
|
|
117
|
+
*
|
|
118
|
+
* See {@link Duration} for a type that also accepts {@link Millis}. Use
|
|
119
|
+
* {@link durationToMillis} to convert to milliseconds.
|
|
120
|
+
*/
|
|
121
|
+
export type DurationLiteral = DurationLiteralMilliseconds | DurationLiteralSeconds | DurationLiteralMinutes | DurationLiteralHours | DurationLiteralDays | DurationLiteralWeeks | DurationLiteralYears;
|
|
122
|
+
/** Milliseconds duration: `"1ms"` to `"999ms"`. See {@link DurationLiteral}. */
|
|
123
|
+
export type DurationLiteralMilliseconds = `${Digit1To9}ms` | `${Digit1To9}${Digit}ms` | `${Digit1To9}${Digit}${Digit}ms`;
|
|
124
|
+
/**
|
|
125
|
+
* Seconds duration: `"1s"` to `"59s"` or `"1.1s"` to `"59.9s"`. See
|
|
126
|
+
* {@link DurationLiteral}.
|
|
127
|
+
*/
|
|
128
|
+
export type DurationLiteralSeconds = `${Digit1To59}s` | `${Digit1To59}.${Digit1To9}s`;
|
|
129
|
+
/**
|
|
130
|
+
* Minutes duration: `"1m"` to `"59m"` or `"1.1m"` to `"59.9m"`. See
|
|
131
|
+
* {@link DurationLiteral}.
|
|
132
|
+
*/
|
|
133
|
+
export type DurationLiteralMinutes = `${Digit1To59}m` | `${Digit1To59}.${Digit1To9}m`;
|
|
134
|
+
/**
|
|
135
|
+
* Hours duration: `"1h"` to `"23h"` or `"1.1h"` to `"23.9h"`. See
|
|
136
|
+
* {@link DurationLiteral}.
|
|
137
|
+
*/
|
|
138
|
+
export type DurationLiteralHours = `${Digit1To23}h` | `${Digit1To23}.${Digit1To9}h`;
|
|
139
|
+
/**
|
|
140
|
+
* Days duration: `"1d"` to `"6d"` or `"1.1d"` to `"6.9d"`. See
|
|
141
|
+
* {@link DurationLiteral}.
|
|
142
|
+
*/
|
|
143
|
+
export type DurationLiteralDays = `${Digit1To6}d` | `${Digit1To6}.${Digit1To9}d`;
|
|
144
|
+
/**
|
|
145
|
+
* Weeks duration: `"1w"` to `"51w"` or `"1.1w"` to `"51.9w"`. See
|
|
146
|
+
* {@link DurationLiteral}.
|
|
53
147
|
*/
|
|
54
|
-
export type
|
|
148
|
+
export type DurationLiteralWeeks = `${Digit1To51}w` | `${Digit1To51}.${Digit1To9}w`;
|
|
55
149
|
/**
|
|
56
|
-
*
|
|
57
|
-
* {@link
|
|
150
|
+
* Years duration: `"1y"` to `"99y"` or `"1.1y"` to `"99.9y"`. See
|
|
151
|
+
* {@link DurationLiteral}.
|
|
58
152
|
*/
|
|
59
|
-
export type
|
|
153
|
+
export type DurationLiteralYears = `${Digit1To99}y` | `${Digit1To99}.${Digit1To9}y`;
|
|
60
154
|
/**
|
|
61
155
|
* Converts a duration to milliseconds.
|
|
62
156
|
*
|
|
63
|
-
* Accepts either a {@link
|
|
64
|
-
*
|
|
157
|
+
* Accepts either a {@link DurationLiteral} (e.g., "5m", "1.5s") or
|
|
158
|
+
* {@link Millis}.
|
|
159
|
+
*
|
|
160
|
+
* ### Example
|
|
161
|
+
*
|
|
162
|
+
* ```ts
|
|
163
|
+
* durationToMillis("1ms"); // 1
|
|
164
|
+
* durationToMillis("500ms"); // 500
|
|
165
|
+
* durationToMillis("1.5s"); // 1500
|
|
166
|
+
* durationToMillis("30s"); // 30000
|
|
167
|
+
* durationToMillis("5m"); // 300000
|
|
168
|
+
* durationToMillis("12h"); // 43200000
|
|
169
|
+
* durationToMillis("7d"); // 604800000
|
|
170
|
+
* durationToMillis(Millis.orThrow(5000)); // 5000 (already Millis)
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
export declare const durationToMillis: (duration: Duration) => Millis;
|
|
174
|
+
/**
|
|
175
|
+
* Returns a Promise that resolves after the specified duration.
|
|
176
|
+
*
|
|
177
|
+
* Uses {@link Duration} parsing and `globalThis.setTimeout`.
|
|
178
|
+
*
|
|
179
|
+
* ### Example
|
|
180
|
+
*
|
|
181
|
+
* ```ts
|
|
182
|
+
* await setTimeout("1ms");
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
export declare const setTimeout: (duration: Duration) => Promise<void>;
|
|
186
|
+
/**
|
|
187
|
+
* Frame budget at 60fps (16ms).
|
|
188
|
+
*
|
|
189
|
+
* Work exceeding this blocks a frame, causing visible jank in animations.
|
|
190
|
+
*/
|
|
191
|
+
export declare const ms60fps: Millis;
|
|
192
|
+
/**
|
|
193
|
+
* Frame budget at 120fps (8ms).
|
|
194
|
+
*
|
|
195
|
+
* For high refresh rate displays. Work exceeding this blocks a frame.
|
|
196
|
+
*/
|
|
197
|
+
export declare const ms120fps: Millis;
|
|
198
|
+
/**
|
|
199
|
+
* Long task threshold (50ms).
|
|
200
|
+
*
|
|
201
|
+
* Tasks exceeding this are "long tasks" per web standards. Use with
|
|
202
|
+
* {@link yieldNow} to yield periodically and keep UI responsive.
|
|
203
|
+
*
|
|
204
|
+
* @see https://web.dev/articles/optimize-long-tasks
|
|
205
|
+
*/
|
|
206
|
+
export declare const msLongTask: Millis;
|
|
207
|
+
/**
|
|
208
|
+
* Formats {@link Millis} as a human-readable duration string.
|
|
209
|
+
*
|
|
210
|
+
* - Under 1 minute: `1.234s`
|
|
211
|
+
* - Under 1 hour: `1m30.000s`
|
|
212
|
+
* - 1 hour or more: `1h30m45.000s`
|
|
213
|
+
*
|
|
214
|
+
* ### Example
|
|
215
|
+
*
|
|
216
|
+
* ```ts
|
|
217
|
+
* formatMillisAsDuration(1234 as Millis); // "1.234s"
|
|
218
|
+
* formatMillisAsDuration(90000 as Millis); // "1m30.000s"
|
|
219
|
+
* formatMillisAsDuration(3661000 as Millis); // "1h1m1.000s"
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
export declare const formatMillisAsDuration: (millis: Millis) => string;
|
|
223
|
+
/**
|
|
224
|
+
* Formats {@link Millis} as `HH:MM:SS.mmm`.
|
|
65
225
|
*
|
|
66
226
|
* ### Example
|
|
67
227
|
*
|
|
68
228
|
* ```ts
|
|
69
|
-
*
|
|
70
|
-
* durationToNonNegativeInt("500ms"); // 500 ✅
|
|
71
|
-
* durationToNonNegativeInt("30s"); // 30000 ✅
|
|
72
|
-
* durationToNonNegativeInt("5m"); // 300000 ✅
|
|
73
|
-
* durationToNonNegativeInt("12h"); // 43200000 ✅
|
|
74
|
-
* durationToNonNegativeInt("7d"); // 604800000 ✅
|
|
75
|
-
* durationToNonNegativeInt("2h 45m"); // 9900000 ✅
|
|
76
|
-
* durationToNonNegativeInt(5000); // 5000 ✅ (already milliseconds)
|
|
229
|
+
* formatMillisAsClockTime(Millis.orThrow(Date.now())); // "14:32:15.234"
|
|
77
230
|
* ```
|
|
78
231
|
*/
|
|
79
|
-
export declare const
|
|
232
|
+
export declare const formatMillisAsClockTime: (millis: Millis) => string;
|
|
80
233
|
//# sourceMappingURL=Time.d.ts.map
|
package/dist/src/Time.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../src/Time.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Time.d.ts","sourceRoot":"","sources":["../../src/Time.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EAAS,KAAK,OAAO,EAA4B,MAAM,WAAW,CAAC;AAC1E,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACX,MAAM,YAAY,CAAC;AAEpB,iCAAiC;AACjC,MAAM,WAAW,IAAI;IACnB,uDAAuD;IACvD,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;IAE3B,sDAA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