@opfs-vfs/effect 0.3.1 → 0.4.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 +13 -5
- package/dist/errors.js +1 -2
- package/dist/index.js +256 -232
- package/dist/volume-DMrEmDUv.js +355 -0
- package/dist/volume.js +1 -2
- package/package.json +10 -10
- package/dist/volume-BIqpe5Vt.js +0 -357
package/README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# @opfs-vfs/effect
|
|
2
2
|
|
|
3
|
-
Effect v4 adapter for worker-backed OPFS volumes and direct mounts. Requires stable Effect v4, starting at `4.
|
|
3
|
+
Effect v4 adapter for worker-backed OPFS volumes and direct mounts. Requires stable Effect v4, starting at `4.1.0` and excluding v5 and prereleases.
|
|
4
|
+
|
|
5
|
+
Install it with the exact `@opfs-vfs/opfs-vfs` and `@opfs-vfs/plugin-subscriptions`
|
|
6
|
+
versions listed in its peer dependencies, and upgrade the three packages
|
|
7
|
+
together. The default worker contains a copy of the storage engine, so a
|
|
8
|
+
different core version would run a different engine than the one you installed.
|
|
4
9
|
|
|
5
10
|
```ts
|
|
6
11
|
import { Effect } from 'effect';
|
|
@@ -64,9 +69,10 @@ listing, removal, rename, recursive copy and volume-local temporary paths.
|
|
|
64
69
|
Unlike Node's filesystem, operands must be absolute volume paths; relative
|
|
65
70
|
symlink targets are preserved. Recursive copy does not follow symlinks, keeps
|
|
66
71
|
copied relative link targets as written (Node's default copy resolves them to
|
|
67
|
-
the source), is not atomic, and does not preserve hard-link topology.
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
the source), is not atomic, and does not preserve hard-link topology. As in
|
|
73
|
+
Node, `remove` rejects any directory, empty or not, unless `recursive` is set. `glob`
|
|
74
|
+
needs an absolute `root` or pattern. `chown` remains intentionally unsupported
|
|
75
|
+
in v1 and returns a typed `ENOTSUP` error. Scoped temporary paths remove only their private directory
|
|
70
76
|
when the scope closes; the default parent is `/tmp` inside the volume. A temporary
|
|
71
77
|
path uses its resolved physical parent, so retargeting the caller-supplied parent
|
|
72
78
|
symlink does not redirect cleanup. Ownership covers the created root pathname and
|
|
@@ -80,7 +86,9 @@ path fails with `NotFound`, and a symlink target fails with `BadResource`. It
|
|
|
80
86
|
watches regular files or directories and emits absolute volume paths as
|
|
81
87
|
`Create`, `Update`, or `Remove`. Recursive directory watching preserves the
|
|
82
88
|
native descendant records for directory renames; symlink entries inside a
|
|
83
|
-
watched directory are reported, but a symlink target is not followed.
|
|
89
|
+
watched directory are reported, but a symlink target is not followed. The watched
|
|
90
|
+
path is resolved through the volume, so `watch` agrees with every other call
|
|
91
|
+
and reports canonical paths.
|
|
84
92
|
|
|
85
93
|
Watch notifications are hints, not a replayable log. Preflight checks and
|
|
86
94
|
directory scans are not atomic snapshots; logical event counts and ordering can
|
package/dist/errors.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema as e } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/errors.ts
|
|
3
3
|
var t = [
|
|
4
4
|
"meta-snapshot",
|
|
5
5
|
"data-wal",
|
|
@@ -155,5 +155,4 @@ var t = [
|
|
|
155
155
|
...h === void 0 ? {} : { cause: h }
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
|
-
//#endregion
|
|
159
158
|
export { a as EncryptionError, s as MountError, n as RemoteErrorDetails, o as SubscriptionError, i as VolumeError, f as classify, h as mountError, l as remoteDetails, m as volumeError };
|