@livestore/utils 0.4.0 → 0.5.0-dev.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/dist/.tsbuildinfo +1 -1
- package/dist/NoopTracer.d.ts +7 -8
- package/dist/NoopTracer.d.ts.map +1 -1
- package/dist/NoopTracer.js +3 -18
- package/dist/NoopTracer.js.map +1 -1
- package/dist/NoopTracer.test.d.ts +2 -0
- package/dist/NoopTracer.test.d.ts.map +1 -0
- package/dist/NoopTracer.test.js +17 -0
- package/dist/NoopTracer.test.js.map +1 -0
- package/dist/browser/Opfs/Opfs.d.ts +179 -29
- package/dist/browser/Opfs/Opfs.d.ts.map +1 -1
- package/dist/browser/Opfs/Opfs.js +132 -307
- package/dist/browser/Opfs/Opfs.js.map +1 -1
- package/dist/browser/Opfs/debug-utils.d.ts.map +1 -1
- package/dist/browser/Opfs/debug-utils.js +5 -4
- package/dist/browser/Opfs/debug-utils.js.map +1 -1
- package/dist/browser/Opfs/utils.d.ts +8 -8
- package/dist/browser/Opfs/utils.d.ts.map +1 -1
- package/dist/browser/Opfs/utils.js +35 -26
- package/dist/browser/Opfs/utils.js.map +1 -1
- package/dist/browser/QuotaExceededError.d.ts +10 -9
- package/dist/browser/QuotaExceededError.d.ts.map +1 -1
- package/dist/browser/WebChannelBrowser.d.ts.map +1 -1
- package/dist/browser/WebChannelBrowser.js +21 -10
- package/dist/browser/WebChannelBrowser.js.map +1 -1
- package/dist/browser/WebError.d.ts +54 -86
- package/dist/browser/WebError.d.ts.map +1 -1
- package/dist/browser/WebError.js +91 -84
- package/dist/browser/WebError.js.map +1 -1
- package/dist/browser/WebError.test.js +6 -6
- package/dist/browser/WebError.test.js.map +1 -1
- package/dist/browser/WebLock.d.ts.map +1 -1
- package/dist/browser/WebLock.js +13 -13
- package/dist/browser/WebLock.js.map +1 -1
- package/dist/effect/Debug.d.ts +4 -7
- package/dist/effect/Debug.d.ts.map +1 -1
- package/dist/effect/Debug.js +32 -36
- package/dist/effect/Debug.js.map +1 -1
- package/dist/effect/Effect.d.ts +31 -22
- package/dist/effect/Effect.d.ts.map +1 -1
- package/dist/effect/Effect.js +51 -47
- package/dist/effect/Effect.js.map +1 -1
- package/dist/effect/Effect.test.d.ts +2 -0
- package/dist/effect/Effect.test.d.ts.map +1 -0
- package/dist/effect/Effect.test.js +72 -0
- package/dist/effect/Effect.test.js.map +1 -0
- package/dist/effect/Error.d.ts +4 -6
- package/dist/effect/Error.d.ts.map +1 -1
- package/dist/effect/Logger.d.ts +0 -6
- package/dist/effect/Logger.d.ts.map +1 -1
- package/dist/effect/Logger.js +0 -32
- package/dist/effect/Logger.js.map +1 -1
- package/dist/effect/OtelTracer.d.ts +1 -1
- package/dist/effect/OtelTracer.d.ts.map +1 -1
- package/dist/effect/OtelTracer.js +2 -3
- package/dist/effect/OtelTracer.js.map +1 -1
- package/dist/effect/RpcClient.d.ts +7 -7
- package/dist/effect/RpcClient.d.ts.map +1 -1
- package/dist/effect/RpcClient.js +72 -52
- package/dist/effect/RpcClient.js.map +1 -1
- package/dist/effect/Schedule.d.ts +1 -1
- package/dist/effect/Schedule.d.ts.map +1 -1
- package/dist/effect/Schedule.js +2 -2
- package/dist/effect/Schedule.js.map +1 -1
- package/dist/effect/Schema/debug-diff.d.ts +1 -1
- package/dist/effect/Schema/debug-diff.d.ts.map +1 -1
- package/dist/effect/Schema/debug-diff.js +5 -7
- package/dist/effect/Schema/debug-diff.js.map +1 -1
- package/dist/effect/Schema/debug-diff.test.js +7 -4
- package/dist/effect/Schema/debug-diff.test.js.map +1 -1
- package/dist/effect/Schema/index.d.ts +28 -20
- package/dist/effect/Schema/index.d.ts.map +1 -1
- package/dist/effect/Schema/index.js +55 -28
- package/dist/effect/Schema/index.js.map +1 -1
- package/dist/effect/Stream.d.ts +13 -5
- package/dist/effect/Stream.d.ts.map +1 -1
- package/dist/effect/Stream.js +19 -12
- package/dist/effect/Stream.js.map +1 -1
- package/dist/effect/Stream.test.js +9 -9
- package/dist/effect/Stream.test.js.map +1 -1
- package/dist/effect/Subscribable.d.ts +9 -3
- package/dist/effect/Subscribable.d.ts.map +1 -1
- package/dist/effect/Subscribable.js +20 -35
- package/dist/effect/Subscribable.js.map +1 -1
- package/dist/effect/SubscriptionRef.d.ts +5 -6
- package/dist/effect/SubscriptionRef.d.ts.map +1 -1
- package/dist/effect/SubscriptionRef.js +2 -3
- package/dist/effect/SubscriptionRef.js.map +1 -1
- package/dist/effect/TaskTracing.d.ts +1 -1
- package/dist/effect/TaskTracing.d.ts.map +1 -1
- package/dist/effect/TaskTracing.js +12 -16
- package/dist/effect/TaskTracing.js.map +1 -1
- package/dist/effect/WebChannel/WebChannel.d.ts +7 -7
- package/dist/effect/WebChannel/WebChannel.d.ts.map +1 -1
- package/dist/effect/WebChannel/WebChannel.js +64 -43
- package/dist/effect/WebChannel/WebChannel.js.map +1 -1
- package/dist/effect/WebChannel/WebChannel.test.js +15 -15
- package/dist/effect/WebChannel/WebChannel.test.js.map +1 -1
- package/dist/effect/WebChannel/broadcastChannelWithAck.d.ts.map +1 -1
- package/dist/effect/WebChannel/broadcastChannelWithAck.js +16 -9
- package/dist/effect/WebChannel/broadcastChannelWithAck.js.map +1 -1
- package/dist/effect/WebChannel/common.d.ts +16 -17
- package/dist/effect/WebChannel/common.d.ts.map +1 -1
- package/dist/effect/WebChannel/common.js +6 -6
- package/dist/effect/WebChannel/common.js.map +1 -1
- package/dist/effect/WebSocket.d.ts +4 -6
- package/dist/effect/WebSocket.d.ts.map +1 -1
- package/dist/effect/WebSocket.js +4 -4
- package/dist/effect/WebSocket.js.map +1 -1
- package/dist/effect/WebSocket.test.js +2 -2
- package/dist/effect/WebSocket.test.js.map +1 -1
- package/dist/effect/mod.browser-build.test.d.ts +2 -0
- package/dist/effect/mod.browser-build.test.d.ts.map +1 -0
- package/dist/effect/mod.browser-build.test.js +18 -0
- package/dist/effect/mod.browser-build.test.js.map +1 -0
- package/dist/effect/mod.d.ts +13 -15
- package/dist/effect/mod.d.ts.map +1 -1
- package/dist/effect/mod.js +13 -18
- package/dist/effect/mod.js.map +1 -1
- package/dist/effect/spanEvent.d.ts.map +1 -1
- package/dist/effect/spanEvent.js +2 -2
- package/dist/effect/spanEvent.js.map +1 -1
- package/dist/effect/spanEvent.test.js +10 -13
- package/dist/effect/spanEvent.test.js.map +1 -1
- package/dist/fast-deep-equal.d.ts.map +1 -1
- package/dist/fast-deep-equal.js +1 -2
- package/dist/fast-deep-equal.js.map +1 -1
- package/dist/misc.js +2 -2
- package/dist/misc.js.map +1 -1
- package/dist/mod.d.ts +0 -35
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +0 -8
- package/dist/mod.js.map +1 -1
- package/dist/node/mod.d.ts +17 -11
- package/dist/node/mod.d.ts.map +1 -1
- package/dist/node/mod.js +23 -16
- package/dist/node/mod.js.map +1 -1
- package/dist/object/index.d.ts +0 -9
- package/dist/object/index.d.ts.map +1 -1
- package/dist/object/index.js +0 -9
- package/dist/object/index.js.map +1 -1
- package/dist/string.d.ts +0 -2
- package/dist/string.d.ts.map +1 -1
- package/dist/string.js +0 -2
- package/dist/string.js.map +1 -1
- package/package.json +18 -36
- package/src/NoopTracer.test.ts +20 -0
- package/src/NoopTracer.ts +18 -41
- package/src/browser/Opfs/Opfs.ts +304 -277
- package/src/browser/Opfs/debug-utils.ts +7 -6
- package/src/browser/Opfs/utils.ts +36 -26
- package/src/browser/QuotaExceededError.ts +13 -10
- package/src/browser/WebChannelBrowser.ts +25 -11
- package/src/browser/WebError.test.ts +6 -6
- package/src/browser/WebError.ts +107 -133
- package/src/browser/WebLock.ts +13 -14
- package/src/effect/Debug.ts +66 -59
- package/src/effect/Effect.test.ts +117 -0
- package/src/effect/Effect.ts +84 -71
- package/src/effect/Logger.ts +0 -48
- package/src/effect/OtelTracer.ts +2 -3
- package/src/effect/RpcClient.ts +80 -61
- package/src/effect/Schedule.ts +4 -5
- package/src/effect/Schema/debug-diff.test.ts +6 -6
- package/src/effect/Schema/debug-diff.ts +6 -8
- package/src/effect/Schema/index.ts +122 -61
- package/src/effect/Stream.test.ts +9 -9
- package/src/effect/Stream.ts +23 -16
- package/src/effect/Subscribable.ts +31 -42
- package/src/effect/SubscriptionRef.ts +8 -12
- package/src/effect/TaskTracing.ts +13 -16
- package/src/effect/WebChannel/WebChannel.test.ts +23 -23
- package/src/effect/WebChannel/WebChannel.ts +87 -55
- package/src/effect/WebChannel/broadcastChannelWithAck.ts +21 -11
- package/src/effect/WebChannel/common.ts +14 -15
- package/src/effect/WebSocket.test.ts +2 -2
- package/src/effect/WebSocket.ts +9 -6
- package/src/effect/mod.browser-build.test.ts +19 -0
- package/src/effect/mod.ts +35 -69
- package/src/effect/spanEvent.test.ts +10 -13
- package/src/effect/spanEvent.ts +5 -3
- package/src/fast-deep-equal.ts +1 -2
- package/src/misc.ts +2 -2
- package/src/mod.ts +0 -36
- package/src/node/mod.ts +26 -20
- package/src/object/index.ts +0 -24
- package/src/string.ts +0 -3
- package/dist/effect/BucketQueue.d.ts +0 -20
- package/dist/effect/BucketQueue.d.ts.map +0 -1
- package/dist/effect/BucketQueue.js +0 -34
- package/dist/effect/BucketQueue.js.map +0 -1
- package/dist/effect/Scheduler.d.ts +0 -4
- package/dist/effect/Scheduler.d.ts.map +0 -1
- package/dist/effect/Scheduler.js +0 -9
- package/dist/effect/Scheduler.js.map +0 -1
- package/dist/effect/ServiceContext.d.ts +0 -37
- package/dist/effect/ServiceContext.d.ts.map +0 -1
- package/dist/effect/ServiceContext.js +0 -55
- package/dist/effect/ServiceContext.js.map +0 -1
- package/dist/guards.d.ts +0 -20
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js +0 -20
- package/dist/guards.js.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunner.d.ts +0 -4
- package/dist/node/ChildProcessRunner/ChildProcessRunner.d.ts.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunner.js +0 -128
- package/dist/node/ChildProcessRunner/ChildProcessRunner.js.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/ChildProcessRunner.test.d.ts +0 -10
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/ChildProcessRunner.test.d.ts.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/ChildProcessRunner.test.js +0 -217
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/ChildProcessRunner.test.js.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/schema.d.ts +0 -84
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/schema.d.ts.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/schema.js +0 -68
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/schema.js.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/serializedWorker.d.ts +0 -2
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/serializedWorker.d.ts.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/serializedWorker.js +0 -52
- package/dist/node/ChildProcessRunner/ChildProcessRunnerTest/serializedWorker.js.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessWorker.d.ts +0 -23
- package/dist/node/ChildProcessRunner/ChildProcessWorker.d.ts.map +0 -1
- package/dist/node/ChildProcessRunner/ChildProcessWorker.js +0 -138
- package/dist/node/ChildProcessRunner/ChildProcessWorker.js.map +0 -1
- package/dist/object/omit.d.ts +0 -3
- package/dist/object/omit.d.ts.map +0 -1
- package/dist/object/omit.js +0 -14
- package/dist/object/omit.js.map +0 -1
- package/dist/object/pick.d.ts +0 -14
- package/dist/object/pick.d.ts.map +0 -1
- package/dist/object/pick.js +0 -17
- package/dist/object/pick.js.map +0 -1
- package/dist/time.d.ts +0 -12
- package/dist/time.d.ts.map +0 -1
- package/dist/time.js +0 -22
- package/dist/time.js.map +0 -1
- package/src/effect/BucketQueue.ts +0 -49
- package/src/effect/Scheduler.ts +0 -13
- package/src/effect/ServiceContext.ts +0 -108
- package/src/guards.ts +0 -23
- package/src/node/ChildProcessRunner/ChildProcessRunner.ts +0 -148
- package/src/node/ChildProcessRunner/ChildProcessRunnerTest/ChildProcessRunner.test.ts +0 -311
- package/src/node/ChildProcessRunner/ChildProcessRunnerTest/schema.ts +0 -78
- package/src/node/ChildProcessRunner/ChildProcessRunnerTest/serializedWorker.ts +0 -65
- package/src/node/ChildProcessRunner/ChildProcessWorker.ts +0 -169
- package/src/object/omit.ts +0 -17
- package/src/object/pick.ts +0 -27
- package/src/time.ts +0 -25
package/dist/node/mod.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { Effect, Layer } from 'effect';
|
|
1
|
+
import { Effect, FileSystem, Layer } from 'effect';
|
|
2
2
|
import { OtelTracer, UnknownError } from '../effect/mod.ts';
|
|
3
|
-
export * as Cli from '
|
|
4
|
-
export * as SocketServer from '
|
|
3
|
+
export * as Cli from 'effect/unstable/cli';
|
|
4
|
+
export * as SocketServer from 'effect/unstable/socket/SocketServer';
|
|
5
5
|
export * as PlatformNode from '@effect/platform-node';
|
|
6
|
-
export * as ChildProcessRunner from './ChildProcessRunner/ChildProcessRunner.ts';
|
|
7
|
-
export * as ChildProcessWorker from './ChildProcessRunner/ChildProcessWorker.ts';
|
|
8
6
|
export declare const getFreePort: Effect.Effect<number, UnknownError>;
|
|
9
7
|
export declare const OtelLiveDummy: Layer.Layer<OtelTracer.OtelTracer>;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* Compatibility layer for the old Effect v3 @parcel/watcher backend.
|
|
10
|
+
*
|
|
11
|
+
* Effect v4 removed `@effect/platform-node/NodeFileSystem/ParcelWatcher`; its
|
|
12
|
+
* NodeFileSystem layer now performs recursive watching through Node's native
|
|
13
|
+
* `fs.watch(path, { recursive: true })` fallback. This layer deliberately
|
|
14
|
+
* registers no custom backend so existing `NodeRecursiveWatchLayer` consumers
|
|
15
|
+
* continue to compile while the v4 NodeFileSystem implementation handles watch
|
|
16
|
+
* events.
|
|
17
|
+
*
|
|
12
18
|
* This layer alone does NOT provide FileSystem - it only provides the watch backend.
|
|
13
19
|
*
|
|
14
20
|
* IMPORTANT: Layer ordering matters! When composing with NodeFileSystem.layer, use
|
|
@@ -29,15 +35,15 @@ export declare const OtelLiveDummy: Layer.Layer<OtelTracer.OtelTracer>;
|
|
|
29
35
|
*
|
|
30
36
|
* @see https://github.com/Effect-TS/effect/issues/5913
|
|
31
37
|
*/
|
|
32
|
-
export declare const NodeRecursiveWatchLayer: Layer.Layer<
|
|
38
|
+
export declare const NodeRecursiveWatchLayer: Layer.Layer<FileSystem.WatchBackend>;
|
|
33
39
|
/**
|
|
34
|
-
* Pre-composed layer providing FileSystem with recursive file watching
|
|
40
|
+
* Pre-composed layer providing FileSystem with recursive file watching.
|
|
35
41
|
* This is the recommended way to get a FileSystem that supports recursive watching.
|
|
36
42
|
*
|
|
37
43
|
* Use this layer when you need to watch files recursively (e.g., watching nested directories).
|
|
38
|
-
*
|
|
39
|
-
*
|
|
44
|
+
* Effect v4's NodeFileSystem uses Node.js's native recursive `fs.watch` support
|
|
45
|
+
* instead of the removed ParcelWatcher backend from Effect v3.
|
|
40
46
|
*/
|
|
41
47
|
export { NodeFileSystem } from '@effect/platform-node';
|
|
42
|
-
export declare const NodeFileSystemWithWatch: Layer.Layer<
|
|
48
|
+
export declare const NodeFileSystemWithWatch: Layer.Layer<FileSystem.WatchBackend | FileSystem.FileSystem, never, never>;
|
|
43
49
|
//# sourceMappingURL=mod.d.ts.map
|
package/dist/node/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/node/mod.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/node/mod.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAU,MAAM,QAAQ,CAAA;AAE1D,OAAO,EAAE,UAAU,EAAU,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAGnE,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAA;AAC1C,OAAO,KAAK,YAAY,MAAM,qCAAqC,CAAA;AACnE,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AAOrD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAuB1D,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAM3D,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAKxE,CAAA;AAED;;;;;;;GAOG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEtD,eAAO,MAAM,uBAAuB,4EAAyE,CAAA"}
|
package/dist/node/mod.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import * as http from 'node:http';
|
|
2
|
-
import {
|
|
3
|
-
import { Effect, Layer } from 'effect';
|
|
4
|
-
import { OtelTracer, UnknownError } from "../effect/mod.js";
|
|
2
|
+
import { NodeFileSystem } from '@effect/platform-node';
|
|
3
|
+
import { Effect, FileSystem, Layer, Option } from 'effect';
|
|
4
|
+
import { OtelTracer, Tracer, UnknownError } from "../effect/mod.js";
|
|
5
5
|
import { makeNoopTracer } from "../NoopTracer.js";
|
|
6
|
-
export * as Cli from '
|
|
7
|
-
export * as SocketServer from '
|
|
6
|
+
export * as Cli from 'effect/unstable/cli';
|
|
7
|
+
export * as SocketServer from 'effect/unstable/socket/SocketServer';
|
|
8
8
|
export * as PlatformNode from '@effect/platform-node';
|
|
9
|
-
export * as ChildProcessRunner from "./ChildProcessRunner/ChildProcessRunner.js";
|
|
10
|
-
export * as ChildProcessWorker from "./ChildProcessRunner/ChildProcessWorker.js";
|
|
11
9
|
// Enable debug logging for OpenTelemetry
|
|
12
10
|
// otel.diag.setLogger(new otel.DiagConsoleLogger(), otel.DiagLogLevel.ERROR)
|
|
13
11
|
// export const OtelLiveHttp = (args: any): Layer.Layer<never> => Layer.empty
|
|
14
|
-
export const getFreePort = Effect.
|
|
12
|
+
export const getFreePort = Effect.callback((cb, signal) => {
|
|
15
13
|
const server = http.createServer();
|
|
16
14
|
signal.addEventListener('abort', () => {
|
|
17
15
|
server.close();
|
|
@@ -34,11 +32,19 @@ export const getFreePort = Effect.async((cb, signal) => {
|
|
|
34
32
|
});
|
|
35
33
|
export const OtelLiveDummy = Layer.suspend(() => {
|
|
36
34
|
const OtelTracerLive = Layer.succeed(OtelTracer.OtelTracer, makeNoopTracer());
|
|
37
|
-
const TracingLive =
|
|
35
|
+
const TracingLive = OtelTracer.layerWithoutOtelTracer.pipe(Layer.provideMerge(OtelTracerLive));
|
|
38
36
|
return TracingLive;
|
|
39
37
|
});
|
|
40
38
|
/**
|
|
41
|
-
*
|
|
39
|
+
* Compatibility layer for the old Effect v3 @parcel/watcher backend.
|
|
40
|
+
*
|
|
41
|
+
* Effect v4 removed `@effect/platform-node/NodeFileSystem/ParcelWatcher`; its
|
|
42
|
+
* NodeFileSystem layer now performs recursive watching through Node's native
|
|
43
|
+
* `fs.watch(path, { recursive: true })` fallback. This layer deliberately
|
|
44
|
+
* registers no custom backend so existing `NodeRecursiveWatchLayer` consumers
|
|
45
|
+
* continue to compile while the v4 NodeFileSystem implementation handles watch
|
|
46
|
+
* events.
|
|
47
|
+
*
|
|
42
48
|
* This layer alone does NOT provide FileSystem - it only provides the watch backend.
|
|
43
49
|
*
|
|
44
50
|
* IMPORTANT: Layer ordering matters! When composing with NodeFileSystem.layer, use
|
|
@@ -59,16 +65,17 @@ export const OtelLiveDummy = Layer.suspend(() => {
|
|
|
59
65
|
*
|
|
60
66
|
* @see https://github.com/Effect-TS/effect/issues/5913
|
|
61
67
|
*/
|
|
62
|
-
export const NodeRecursiveWatchLayer =
|
|
68
|
+
export const NodeRecursiveWatchLayer = Layer.succeed(FileSystem.WatchBackend, FileSystem.WatchBackend.of({
|
|
69
|
+
register: () => Option.none(),
|
|
70
|
+
}));
|
|
63
71
|
/**
|
|
64
|
-
* Pre-composed layer providing FileSystem with recursive file watching
|
|
72
|
+
* Pre-composed layer providing FileSystem with recursive file watching.
|
|
65
73
|
* This is the recommended way to get a FileSystem that supports recursive watching.
|
|
66
74
|
*
|
|
67
75
|
* Use this layer when you need to watch files recursively (e.g., watching nested directories).
|
|
68
|
-
*
|
|
69
|
-
*
|
|
76
|
+
* Effect v4's NodeFileSystem uses Node.js's native recursive `fs.watch` support
|
|
77
|
+
* instead of the removed ParcelWatcher backend from Effect v3.
|
|
70
78
|
*/
|
|
71
79
|
export { NodeFileSystem } from '@effect/platform-node';
|
|
72
|
-
|
|
73
|
-
export const NodeFileSystemWithWatch = NodeFileSystem.layer.pipe(Layer.provideMerge(ParcelWatcherLayer));
|
|
80
|
+
export const NodeFileSystemWithWatch = NodeFileSystem.layer.pipe(Layer.provideMerge(NodeRecursiveWatchLayer));
|
|
74
81
|
//# sourceMappingURL=mod.js.map
|
package/dist/node/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../src/node/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../../src/node/mod.ts"],"names":[],"mappings":"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"}
|
package/dist/object/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
export * from './omit.ts';
|
|
2
|
-
export * from './pick.ts';
|
|
3
1
|
export * from './stringify-object.ts';
|
|
4
|
-
type ValueOfRecord<R extends Record<any, any>> = R extends Record<any, infer V> ? V : never;
|
|
5
|
-
export declare const mapObjectValues: <O_In extends Record<string, any>, V_Out>(obj: O_In, mapValue: (key: keyof O_In, val: ValueOfRecord<O_In>) => V_Out) => { [K in keyof O_In]: V_Out; };
|
|
6
|
-
export type Entries<T> = {
|
|
7
|
-
[K in keyof T]: [K, T[K]];
|
|
8
|
-
}[keyof T][];
|
|
9
|
-
export declare const objectEntries: <T extends Record<string, any>>(obj: T) => Entries<T>;
|
|
10
|
-
export declare const keyObjectFromObject: <TObj extends Record<string, any>>(obj: TObj) => { [K in keyof TObj]: K; };
|
|
11
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/object/index.js
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import { pipe } from 'effect';
|
|
2
|
-
export * from "./omit.js";
|
|
3
|
-
export * from "./pick.js";
|
|
4
1
|
export * from "./stringify-object.js";
|
|
5
|
-
export const mapObjectValues = (obj, mapValue) => {
|
|
6
|
-
const mappedEntries = Object.entries(obj).map(([key, val]) => [key, mapValue(key, val)]);
|
|
7
|
-
return Object.fromEntries(mappedEntries);
|
|
8
|
-
};
|
|
9
|
-
export const objectEntries = (obj) => Object.entries(obj);
|
|
10
|
-
export const keyObjectFromObject = (obj) => pipe(objectEntries(obj).map(([k]) => [k, k]), Object.fromEntries);
|
|
11
2
|
//# sourceMappingURL=index.js.map
|
package/dist/object/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/object/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
package/dist/string.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const lowercaseFirstChar: (str: string) => string;
|
|
2
|
-
export declare const uppercaseFirstChar: (str: string) => string;
|
|
3
1
|
/** Indents a string each line by `n` characters (default: spaces) */
|
|
4
2
|
export declare const indent: (str: string, n: number, char?: string) => string;
|
|
5
3
|
//# sourceMappingURL=string.d.ts.map
|
package/dist/string.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,eAAO,MAAM,MAAM,GAAI,KAAK,MAAM,EAAE,GAAG,MAAM,EAAE,aAAU,KAAG,MAI7C,CAAA"}
|
package/dist/string.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export const lowercaseFirstChar = (str) => str.charAt(0).toLowerCase() + str.slice(1);
|
|
2
|
-
export const uppercaseFirstChar = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
3
1
|
/** Indents a string each line by `n` characters (default: spaces) */
|
|
4
2
|
export const indent = (str, n, char = ' ') => str
|
|
5
3
|
.split('\n')
|
package/dist/string.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,CAAS,EAAE,IAAI,GAAG,GAAG,EAAU,EAAE,CACnE,GAAG;KACA,KAAK,CAAC,IAAI,CAAC;KACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;KACpC,IAAI,CAAC,IAAI,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-dev.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,29 +57,19 @@
|
|
|
57
57
|
"access": "public"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@effect/platform-node": "0.
|
|
60
|
+
"@effect/platform-node": "4.0.0-rc.111",
|
|
61
61
|
"@standard-schema/spec": "1.1.0",
|
|
62
62
|
"nanoid": "5.0.9",
|
|
63
63
|
"pretty-bytes": "7.0.1",
|
|
64
64
|
"qrcode-generator": "2.0.4"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@effect/
|
|
68
|
-
"@effect/
|
|
69
|
-
"@effect/
|
|
70
|
-
"@effect/
|
|
71
|
-
"@effect/
|
|
72
|
-
"@effect/
|
|
73
|
-
"@effect/platform-browser": "0.76.0",
|
|
74
|
-
"@effect/platform-bun": "0.89.0",
|
|
75
|
-
"@effect/platform-node": "0.106.0",
|
|
76
|
-
"@effect/printer": "0.49.0",
|
|
77
|
-
"@effect/printer-ansi": "0.49.0",
|
|
78
|
-
"@effect/rpc": "0.75.1",
|
|
79
|
-
"@effect/sql": "0.51.1",
|
|
80
|
-
"@effect/typeclass": "0.40.0",
|
|
81
|
-
"@effect/vitest": "0.29.0",
|
|
82
|
-
"@effect/workflow": "0.18.0",
|
|
67
|
+
"@effect/opentelemetry": "4.0.0-rc.111",
|
|
68
|
+
"@effect/platform-browser": "4.0.0-rc.111",
|
|
69
|
+
"@effect/platform-bun": "4.0.0-rc.111",
|
|
70
|
+
"@effect/platform-node": "4.0.0-rc.111",
|
|
71
|
+
"@effect/platform-node-shared": "4.0.0-rc.111",
|
|
72
|
+
"@effect/vitest": "4.0.0-rc.111",
|
|
83
73
|
"@opentelemetry/api": "1.9.0",
|
|
84
74
|
"@opentelemetry/resources": "2.2.0",
|
|
85
75
|
"@standard-schema/spec": "1.1.0",
|
|
@@ -87,30 +77,22 @@
|
|
|
87
77
|
"@types/jsdom": "21.1.7",
|
|
88
78
|
"@types/node": "25.3.3",
|
|
89
79
|
"@types/web": "0.0.264",
|
|
90
|
-
"effect": "
|
|
80
|
+
"effect": "4.0.0-rc.111",
|
|
81
|
+
"esbuild": "0.28.0",
|
|
91
82
|
"jsdom": "26.1.0",
|
|
92
|
-
"vitest": "
|
|
83
|
+
"vitest": "4.1.9"
|
|
93
84
|
},
|
|
94
85
|
"peerDependencies": {
|
|
95
|
-
"@effect/
|
|
96
|
-
"@effect/
|
|
97
|
-
"@effect/
|
|
98
|
-
"@effect/
|
|
99
|
-
"@effect/
|
|
100
|
-
"@effect/
|
|
101
|
-
"@effect/platform-browser": "^0.76.0",
|
|
102
|
-
"@effect/platform-bun": "^0.89.0",
|
|
103
|
-
"@effect/platform-node": "^0.106.0",
|
|
104
|
-
"@effect/printer": "^0.49.0",
|
|
105
|
-
"@effect/printer-ansi": "^0.49.0",
|
|
106
|
-
"@effect/rpc": "^0.75.1",
|
|
107
|
-
"@effect/sql": "^0.51.1",
|
|
108
|
-
"@effect/typeclass": "^0.40.0",
|
|
109
|
-
"@effect/vitest": "^0.29.0",
|
|
86
|
+
"@effect/opentelemetry": "^4.0.0-rc.111",
|
|
87
|
+
"@effect/platform-browser": "^4.0.0-rc.111",
|
|
88
|
+
"@effect/platform-bun": "^4.0.0-rc.111",
|
|
89
|
+
"@effect/platform-node": "^4.0.0-rc.111",
|
|
90
|
+
"@effect/platform-node-shared": "^4.0.0-rc.111",
|
|
91
|
+
"@effect/vitest": "^4.0.0-rc.111",
|
|
110
92
|
"@opentelemetry/api": "^1.9.0",
|
|
111
93
|
"@opentelemetry/resources": "^2.2.0",
|
|
112
94
|
"@standard-schema/spec": "^1.1.0",
|
|
113
|
-
"effect": "^
|
|
95
|
+
"effect": "^4.0.0-rc.111"
|
|
114
96
|
},
|
|
115
97
|
"$genie": {
|
|
116
98
|
"source": "package.json.genie.ts",
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { INVALID_SPAN_CONTEXT, isSpanContextValid, ROOT_CONTEXT } from '@opentelemetry/api'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { makeNoopSpan, makeNoopTracer } from './NoopTracer.ts'
|
|
5
|
+
|
|
6
|
+
describe('NoopTracer', () => {
|
|
7
|
+
it('returns the canonical invalid OpenTelemetry span context', () => {
|
|
8
|
+
const spanContext = makeNoopSpan().spanContext()
|
|
9
|
+
|
|
10
|
+
expect(spanContext).toBe(INVALID_SPAN_CONTEXT)
|
|
11
|
+
expect(isSpanContextValid(spanContext)).toBe(false)
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('runs active-span callbacks for every tracer overload', () => {
|
|
15
|
+
const tracer = makeNoopTracer()
|
|
16
|
+
expect(tracer.startActiveSpan('two arguments', () => 'two')).toBe('two')
|
|
17
|
+
expect(tracer.startActiveSpan('three arguments', {}, () => 'three')).toBe('three')
|
|
18
|
+
expect(tracer.startActiveSpan('four arguments', {}, ROOT_CONTEXT, () => 'four')).toBe('four')
|
|
19
|
+
})
|
|
20
|
+
})
|
package/src/NoopTracer.ts
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type * as otel from '@opentelemetry/api'
|
|
4
|
-
|
|
5
|
-
import { cuid } from '@livestore/utils/cuid'
|
|
1
|
+
import { INVALID_SPAN_CONTEXT, type Context, type Span, type SpanOptions, type Tracer } from '@opentelemetry/api'
|
|
6
2
|
|
|
7
3
|
export const makeNoopSpan = () => {
|
|
8
|
-
const performanceStartTime = performance.now()
|
|
9
|
-
|
|
10
4
|
const spanImpl = {
|
|
11
|
-
_performanceStartTime: performanceStartTime,
|
|
12
5
|
setAttribute: () => null,
|
|
13
6
|
setAttributes: () => null,
|
|
14
7
|
addEvent: () => null,
|
|
@@ -16,54 +9,38 @@ export const makeNoopSpan = () => {
|
|
|
16
9
|
setStatus: () => null,
|
|
17
10
|
updateName: () => null,
|
|
18
11
|
recordException: () => null,
|
|
19
|
-
end: () =>
|
|
20
|
-
|
|
21
|
-
const duration = endTime - performanceStartTime
|
|
22
|
-
const durationSecs = duration / 1000
|
|
23
|
-
const durationRestNs = (duration % 1000) * 1_000_000
|
|
24
|
-
spanImpl._duration = [durationSecs, durationRestNs] as [number, number]
|
|
25
|
-
},
|
|
26
|
-
spanContext: () => {
|
|
27
|
-
return {
|
|
28
|
-
traceId: `livestore-noop-trace-id${cuid()}`,
|
|
29
|
-
spanId: `livestore-noop-span-id${cuid()}`,
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
_duration: [0, 0] as [number, number],
|
|
12
|
+
end: () => null,
|
|
13
|
+
spanContext: () => INVALID_SPAN_CONTEXT,
|
|
33
14
|
}
|
|
34
15
|
|
|
35
16
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- noop otel.Span implementation; only implements the subset needed by LiveStore
|
|
36
|
-
return spanImpl as unknown as
|
|
17
|
+
return spanImpl as unknown as Span
|
|
37
18
|
}
|
|
38
19
|
|
|
39
20
|
export const makeNoopTracer = () => {
|
|
40
21
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- noop otel.Tracer implementation; only implements the subset needed by LiveStore
|
|
41
|
-
return new NoopTracer() as unknown as
|
|
22
|
+
return new NoopTracer() as unknown as Tracer
|
|
42
23
|
}
|
|
43
24
|
|
|
44
25
|
export class NoopTracer {
|
|
45
26
|
startSpan = () => makeNoopSpan()
|
|
46
27
|
|
|
47
|
-
startActiveSpan<F extends (span:
|
|
48
|
-
startActiveSpan<F extends (span:
|
|
49
|
-
|
|
50
|
-
opts: otel.SpanOptions,
|
|
51
|
-
fn: F,
|
|
52
|
-
): ReturnType<F>
|
|
53
|
-
startActiveSpan<F extends (span: otel.Span) => ReturnType<F>>(
|
|
28
|
+
startActiveSpan<F extends (span: Span) => ReturnType<F>>(name: string, fn: F): ReturnType<F>
|
|
29
|
+
startActiveSpan<F extends (span: Span) => ReturnType<F>>(name: string, opts: SpanOptions, fn: F): ReturnType<F>
|
|
30
|
+
startActiveSpan<F extends (span: Span) => ReturnType<F>>(
|
|
54
31
|
name: string,
|
|
55
|
-
opts:
|
|
56
|
-
ctx:
|
|
32
|
+
opts: SpanOptions,
|
|
33
|
+
ctx: Context,
|
|
57
34
|
fn: F,
|
|
58
35
|
): ReturnType<F>
|
|
59
|
-
startActiveSpan<F extends (span:
|
|
36
|
+
startActiveSpan<F extends (span: Span) => ReturnType<F>>(
|
|
60
37
|
_name: string,
|
|
61
|
-
arg2?: F |
|
|
62
|
-
arg3?: F |
|
|
38
|
+
arg2?: F | SpanOptions,
|
|
39
|
+
arg3?: F | Context,
|
|
63
40
|
arg4?: F,
|
|
64
41
|
): ReturnType<F> | undefined {
|
|
65
|
-
let _opts:
|
|
66
|
-
let _ctx:
|
|
42
|
+
let _opts: SpanOptions | undefined
|
|
43
|
+
let _ctx: Context | undefined
|
|
67
44
|
let fn: F
|
|
68
45
|
|
|
69
46
|
if (arguments.length < 2) {
|
|
@@ -73,14 +50,14 @@ export class NoopTracer {
|
|
|
73
50
|
fn = arg2 as F
|
|
74
51
|
} else if (arguments.length === 3) {
|
|
75
52
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- arguments-based overload dispatch: with 3 args, arg2 is SpanOptions
|
|
76
|
-
_opts = arg2 as
|
|
53
|
+
_opts = arg2 as SpanOptions | undefined
|
|
77
54
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- arguments-based overload dispatch: with 3 args, arg3 is the callback
|
|
78
55
|
fn = arg3 as F
|
|
79
56
|
} else {
|
|
80
57
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- arguments-based overload dispatch: with 4 args, arg2 is SpanOptions
|
|
81
|
-
_opts = arg2 as
|
|
58
|
+
_opts = arg2 as SpanOptions | undefined
|
|
82
59
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- arguments-based overload dispatch: with 4 args, arg3 is Context
|
|
83
|
-
_ctx = arg3 as
|
|
60
|
+
_ctx = arg3 as Context | undefined
|
|
84
61
|
// oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- arguments-based overload dispatch: with 4 args, arg4 is the callback
|
|
85
62
|
fn = arg4 as F
|
|
86
63
|
}
|