@zenfs/core 1.6.17 → 1.7.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/backends/backend.js +1 -1
- package/dist/backends/fetch.d.ts +1 -1
- package/dist/backends/file_index.js +1 -1
- package/dist/backends/index.d.ts +11 -0
- package/dist/backends/index.js +11 -0
- package/dist/backends/overlay.d.ts +6 -6
- package/dist/backends/overlay.js +18 -17
- package/dist/backends/passthrough.d.ts +118 -0
- package/dist/backends/passthrough.js +337 -0
- package/dist/backends/port/fs.d.ts +7 -6
- package/dist/backends/port/fs.js +4 -4
- package/dist/backends/port/rpc.d.ts +2 -2
- package/dist/backends/port/rpc.js +0 -1
- package/dist/backends/store/fs.js +3 -2
- package/dist/config.d.ts +1 -1
- package/dist/config.js +5 -5
- package/dist/context.d.ts +2 -2
- package/dist/context.js +1 -1
- package/dist/devices.js +2 -2
- package/dist/file.js +32 -32
- package/dist/filesystem.d.ts +30 -7
- package/dist/filesystem.js +1 -0
- package/dist/index.d.ts +5 -14
- package/dist/index.js +4 -13
- package/dist/mixins/async.js +10 -11
- package/dist/mixins/mutexed.d.ts +6 -6
- package/dist/mixins/mutexed.js +8 -8
- package/dist/mixins/sync.js +4 -4
- package/dist/stats.d.ts +2 -2
- package/dist/stats.js +34 -34
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/{emulation → vfs}/async.d.ts +7 -7
- package/dist/vfs/index.d.ts +16 -0
- package/dist/vfs/index.js +16 -0
- package/dist/{emulation → vfs}/promises.d.ts +4 -3
- package/dist/{emulation → vfs}/promises.js +23 -6
- package/dist/{emulation → vfs}/streams.js +1 -1
- package/dist/{emulation → vfs}/sync.d.ts +4 -3
- package/dist/{emulation → vfs}/sync.js +24 -5
- package/package.json +6 -7
- package/readme.md +7 -2
- package/scripts/test.js +13 -9
- package/tests/common/async.test.ts +1 -1
- package/tests/common/context.test.ts +30 -10
- package/tests/common/devices.test.ts +2 -2
- package/tests/common/handle.test.ts +1 -1
- package/tests/common/mounts.test.ts +3 -3
- package/tests/common/path.test.ts +1 -1
- package/tests/common.ts +1 -1
- package/tests/fs/links.test.ts +1 -1
- package/tests/fs/permissions.test.ts +2 -2
- package/tests/fs/truncate.test.ts +1 -1
- package/dist/emulation/index.d.ts +0 -9
- package/dist/emulation/index.js +0 -9
- package/dist/{emulation → vfs}/async.js +0 -0
- package/dist/{emulation → vfs}/cache.d.ts +0 -0
- package/dist/{emulation → vfs}/cache.js +0 -0
- package/dist/{emulation → vfs}/config.d.ts +0 -0
- package/dist/{emulation → vfs}/config.js +0 -0
- package/dist/{emulation → vfs}/constants.d.ts +0 -0
- package/dist/{emulation → vfs}/constants.js +0 -0
- package/dist/{emulation → vfs}/dir.d.ts +1 -1
- package/dist/{emulation → vfs}/dir.js +0 -0
- package/dist/{emulation → vfs}/path.d.ts +0 -0
- package/dist/{emulation → vfs}/path.js +0 -0
- package/dist/{emulation → vfs}/shared.d.ts +2 -2
- package/dist/{emulation → vfs}/shared.js +0 -0
- package/dist/{emulation → vfs}/streams.d.ts +1 -1
- package/dist/{emulation → vfs}/types.d.ts +0 -0
- package/dist/{emulation → vfs}/types.js +0 -0
- package/dist/{emulation → vfs}/watchers.d.ts +1 -1
- /package/dist/{emulation → vfs}/watchers.js +0 -0
package/tests/common.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { join, resolve } from 'node:path';
|
|
2
2
|
import { fs as defaultFS } from '../dist/index.js';
|
|
3
|
-
export type * from '../dist/
|
|
3
|
+
export type * from '../dist/vfs/index.js';
|
|
4
4
|
|
|
5
5
|
const setupPath = resolve(process.env.SETUP || join(import.meta.dirname, 'setup/memory.ts'));
|
|
6
6
|
|
package/tests/fs/links.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import { suite, test } from 'node:test';
|
|
3
|
-
import { join } from '../../dist/
|
|
3
|
+
import { join } from '../../dist/vfs/path.js';
|
|
4
4
|
import { fs } from '../common.js';
|
|
5
5
|
import type { ErrnoError } from '../../dist/error.js';
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import { suite, test } from 'node:test';
|
|
3
3
|
import { credentials } from '../../dist/credentials.js';
|
|
4
|
-
import { R_OK, W_OK, X_OK } from '../../dist/
|
|
5
|
-
import { join } from '../../dist/
|
|
4
|
+
import { R_OK, W_OK, X_OK } from '../../dist/vfs/constants.js';
|
|
5
|
+
import { join } from '../../dist/vfs/path.js';
|
|
6
6
|
import { ErrnoError } from '../../dist/error.js';
|
|
7
7
|
import { encodeUTF8 } from '../../dist/utils.js';
|
|
8
8
|
import { fs } from '../common.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
2
|
import { suite, test } from 'node:test';
|
|
3
3
|
import { fs } from '../common.js';
|
|
4
|
-
import type { FileHandle } from '../../dist/
|
|
4
|
+
import type { FileHandle } from '../../dist/vfs/promises.js';
|
|
5
5
|
|
|
6
6
|
const path: string = 'truncate-file.txt',
|
|
7
7
|
size = 1024 * 16,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './async.js';
|
|
2
|
-
export * from './sync.js';
|
|
3
|
-
export * as promises from './promises.js';
|
|
4
|
-
export * as constants from './constants.js';
|
|
5
|
-
export * from './streams.js';
|
|
6
|
-
export * from './dir.js';
|
|
7
|
-
export { mount, umount, chroot, mountObject } from './shared.js';
|
|
8
|
-
export { /** @deprecated security */ mounts } from './shared.js';
|
|
9
|
-
export { Stats, StatsFs, BigIntStatsFs } from '../stats.js';
|
package/dist/emulation/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './async.js';
|
|
2
|
-
export * from './sync.js';
|
|
3
|
-
export * as promises from './promises.js';
|
|
4
|
-
export * as constants from './constants.js';
|
|
5
|
-
export * from './streams.js';
|
|
6
|
-
export * from './dir.js';
|
|
7
|
-
export { mount, umount, chroot, mountObject } from './shared.js';
|
|
8
|
-
export { /** @deprecated security */ mounts } from './shared.js';
|
|
9
|
-
export { Stats, StatsFs, BigIntStatsFs } from '../stats.js';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Dir as _Dir, Dirent as _Dirent } from 'node:fs';
|
|
2
|
+
import type { V_Context } from '../context.js';
|
|
2
3
|
import type { Stats } from '../stats.js';
|
|
3
4
|
import type { Callback } from '../utils.js';
|
|
4
|
-
import type { V_Context } from '../context.js';
|
|
5
5
|
export declare class Dirent implements _Dirent {
|
|
6
6
|
path: string;
|
|
7
7
|
protected stats: Stats;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as fs from 'node:fs';
|
|
2
|
-
import { type BoundContext, type V_Context } from '../context.js';
|
|
3
|
-
import { ErrnoError } from '../error.js';
|
|
4
2
|
import type { File } from '../file.js';
|
|
5
3
|
import type { FileSystem } from '../filesystem.js';
|
|
4
|
+
import { type BoundContext, type V_Context } from '../context.js';
|
|
5
|
+
import { ErrnoError } from '../error.js';
|
|
6
6
|
import { type AbsolutePath } from './path.js';
|
|
7
7
|
/**
|
|
8
8
|
* @internal @hidden
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as fs from 'node:fs';
|
|
2
|
-
import { Readable, Writable } from 'readable-stream';
|
|
3
2
|
import type { Callback } from '../utils.js';
|
|
3
|
+
import { Readable, Writable } from 'readable-stream';
|
|
4
4
|
export declare class ReadStream extends Readable implements fs.ReadStream {
|
|
5
5
|
close(callback?: Callback<[void], null>): void;
|
|
6
6
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from 'eventemitter3';
|
|
2
1
|
import type { EventEmitter as NodeEventEmitter } from 'node:events';
|
|
3
2
|
import type * as fs from 'node:fs';
|
|
4
3
|
import type { V_Context } from '../context.js';
|
|
4
|
+
import { EventEmitter } from 'eventemitter3';
|
|
5
5
|
import { type Stats } from '../stats.js';
|
|
6
6
|
/**
|
|
7
7
|
* Base class for file system watchers.
|
|
File without changes
|