core-3nweb-client-lib 0.47.1 → 0.47.2

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.
@@ -1,5 +1,5 @@
1
1
  import { Abortable } from 'events';
2
- import type { BigIntStats, BufferEncodingOption, Dirent, promises as fsFns, MakeDirectoryOptions, Mode, ObjectEncodingOptions, OpenMode, PathLike, RmDirOptions, StatOptions, Stats } from 'fs';
2
+ import type { BufferEncodingOption, Dirent, promises as fsFns, MakeDirectoryOptions, Mode, ObjectEncodingOptions, OpenMode, RmDirOptions, StatOptions, Stats } from 'fs';
3
3
  import { FlagAndOpenMode } from 'fs/promises';
4
4
  import type Stream = require('stream');
5
5
  export type { Stats } from 'fs';
@@ -32,74 +32,65 @@ export interface PlatformDeviceFS {
32
32
  */
33
33
  copyFile(src: string, dst: string, overwrite?: boolean, dstMode?: string): Promise<void>;
34
34
  }
35
- declare function readFile(path: PathLike | FileHandle, options?: ({
35
+ declare function readFile(path: string, options?: ({
36
36
  encoding?: null | undefined;
37
37
  flag?: OpenMode | undefined;
38
38
  } & Abortable) | null): Promise<Buffer>;
39
- declare function readFile(path: PathLike | FileHandle, options: ({
39
+ declare function readFile(path: string, options: ({
40
40
  encoding: BufferEncoding;
41
41
  flag?: OpenMode | undefined;
42
42
  } & Abortable) | BufferEncoding): Promise<string>;
43
- declare function readFile(path: PathLike | FileHandle, options?: (ObjectEncodingOptions & Abortable & {
43
+ declare function readFile(path: string, options?: (ObjectEncodingOptions & Abortable & {
44
44
  flag?: OpenMode | undefined;
45
45
  }) | BufferEncoding | null): Promise<string | Buffer>;
46
- declare function writeFile(file: PathLike | FileHandle, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream, options?: (ObjectEncodingOptions & {
46
+ declare function writeFile(file: string, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream, options?: (ObjectEncodingOptions & {
47
47
  mode?: Mode | undefined;
48
48
  flag?: OpenMode | undefined;
49
49
  flush?: boolean | undefined;
50
50
  } & Abortable) | BufferEncoding | null): Promise<void>;
51
- declare function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & {
51
+ declare function appendFile(path: string, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & {
52
52
  flush?: boolean | undefined;
53
53
  }) | BufferEncoding | null): Promise<void>;
54
- declare function mkdir(path: PathLike, options: MakeDirectoryOptions & {
54
+ declare function mkdir(path: string, options: MakeDirectoryOptions & {
55
55
  recursive: true;
56
56
  }): Promise<string | undefined>;
57
- declare function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & {
57
+ declare function mkdir(path: string, options?: Mode | (MakeDirectoryOptions & {
58
58
  recursive?: false | undefined;
59
59
  }) | null): Promise<void>;
60
- declare function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
61
- declare function open(path: PathLike, flags?: string | number, mode?: Mode): Promise<FileHandle>;
62
- declare function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
63
- declare function readlink(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
64
- declare function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
65
- declare function readlink(path: PathLike, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
66
- declare function lstat(path: PathLike, opts?: StatOptions & {
60
+ declare function mkdir(path: string, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
61
+ declare function open(path: string, flags?: string | number, mode?: Mode): Promise<FileHandle>;
62
+ declare function symlink(target: string, path: string, type?: string | null): Promise<void>;
63
+ declare function readlink(path: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
64
+ declare function readlink(path: string, options: BufferEncodingOption): Promise<Buffer>;
65
+ declare function readlink(path: string, options?: ObjectEncodingOptions | string | null): Promise<string | Buffer>;
66
+ declare function lstat(path: string, opts?: StatOptions & {
67
67
  bigint?: false | undefined;
68
68
  }): Promise<Stats>;
69
- declare function lstat(path: PathLike, opts: StatOptions & {
70
- bigint: true;
71
- }): Promise<BigIntStats>;
72
- declare function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
73
- declare function stat(path: PathLike, opts?: StatOptions & {
74
- bigint?: false | undefined;
75
- }): Promise<Stats>;
76
- declare function stat(path: PathLike, opts: StatOptions & {
77
- bigint: true;
78
- }): Promise<BigIntStats>;
79
- declare function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
80
- declare function readdir(path: PathLike, options?: (ObjectEncodingOptions & {
69
+ declare function lstat(path: string, opts?: StatOptions): Promise<Stats>;
70
+ declare function stat(path: string, opts?: StatOptions): Promise<Stats>;
71
+ declare function readdir(path: string, options?: (ObjectEncodingOptions & {
81
72
  withFileTypes?: false | undefined;
82
73
  recursive?: boolean | undefined;
83
74
  }) | BufferEncoding | null): Promise<string[]>;
84
- declare function readdir(path: PathLike, options: {
75
+ declare function readdir(path: string, options: {
85
76
  encoding: "buffer";
86
77
  withFileTypes?: false | undefined;
87
78
  recursive?: boolean | undefined;
88
79
  } | "buffer"): Promise<Buffer[]>;
89
- declare function readdir(path: PathLike, options?: (ObjectEncodingOptions & {
80
+ declare function readdir(path: string, options?: (ObjectEncodingOptions & {
90
81
  withFileTypes?: false | undefined;
91
82
  recursive?: boolean | undefined;
92
83
  }) | BufferEncoding | null): Promise<string[] | Buffer[]>;
93
- declare function readdir(path: PathLike, options: ObjectEncodingOptions & {
84
+ declare function readdir(path: string, options: ObjectEncodingOptions & {
94
85
  withFileTypes: true;
95
86
  recursive?: boolean | undefined;
96
87
  }): Promise<Dirent[]>;
97
- declare function readdir(path: PathLike, options: {
88
+ declare function readdir(path: string, options: {
98
89
  encoding: "buffer";
99
90
  withFileTypes: true;
100
91
  recursive?: boolean | undefined;
101
92
  }): Promise<Dirent<Buffer>[]>;
102
- declare function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
103
- declare function unlink(path: PathLike): Promise<void>;
104
- declare function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
105
- declare function truncate(path: PathLike, len?: number): Promise<void>;
93
+ declare function rmdir(path: string, options?: RmDirOptions): Promise<void>;
94
+ declare function unlink(path: string): Promise<void>;
95
+ declare function rename(oldPath: string, newPath: string): Promise<void>;
96
+ declare function truncate(path: string, len?: number): Promise<void>;
@@ -5,72 +5,61 @@ export type { FileHandle, FileException, Stats } from '../injected-globals/platf
5
5
  * fs functions follow node's type, and are injected via global object to allow injection in
6
6
  * non-node environments, like Android or browser.
7
7
  */
8
- export declare const appendFile: (path: import("fs").PathLike | FileHandle, data: string | Uint8Array, options?: (import("fs").ObjectEncodingOptions & import("fs/promises").FlagAndOpenMode & {
8
+ export declare const appendFile: (path: string, data: string | Uint8Array, options?: (import("fs").ObjectEncodingOptions & import("fs/promises").FlagAndOpenMode & {
9
9
  flush?: boolean | undefined;
10
10
  }) | BufferEncoding | null) => Promise<void>, lstat: {
11
- (path: import("fs").PathLike, opts?: import("fs").StatOptions & {
11
+ (path: string, opts?: import("fs").StatOptions & {
12
12
  bigint?: false | undefined;
13
13
  }): Promise<import("fs").Stats>;
14
- (path: import("fs").PathLike, opts: import("fs").StatOptions & {
15
- bigint: true;
16
- }): Promise<import("fs").BigIntStats>;
17
- (path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
14
+ (path: string, opts?: import("fs").StatOptions): Promise<import("fs").Stats>;
18
15
  }, mkdir: {
19
- (path: import("fs").PathLike, options: import("fs").MakeDirectoryOptions & {
16
+ (path: string, options: import("fs").MakeDirectoryOptions & {
20
17
  recursive: true;
21
18
  }): Promise<string | undefined>;
22
- (path: import("fs").PathLike, options?: import("fs").Mode | (import("fs").MakeDirectoryOptions & {
19
+ (path: string, options?: import("fs").Mode | (import("fs").MakeDirectoryOptions & {
23
20
  recursive?: false | undefined;
24
21
  }) | null): Promise<void>;
25
- (path: import("fs").PathLike, options?: import("fs").Mode | import("fs").MakeDirectoryOptions | null): Promise<string | undefined>;
26
- }, open: (path: import("fs").PathLike, flags?: string | number, mode?: import("fs").Mode) => Promise<FileHandle>, readFile: {
27
- (path: import("fs").PathLike | FileHandle, options?: ({
22
+ (path: string, options?: import("fs").Mode | import("fs").MakeDirectoryOptions | null): Promise<string | undefined>;
23
+ }, open: (path: string, flags?: string | number, mode?: import("fs").Mode) => Promise<FileHandle>, readFile: {
24
+ (path: string, options?: ({
28
25
  encoding?: null | undefined;
29
26
  flag?: import("fs").OpenMode | undefined;
30
27
  } & import("events").Abortable) | null): Promise<Buffer>;
31
- (path: import("fs").PathLike | FileHandle, options: ({
28
+ (path: string, options: ({
32
29
  encoding: BufferEncoding;
33
30
  flag?: import("fs").OpenMode | undefined;
34
31
  } & import("events").Abortable) | BufferEncoding): Promise<string>;
35
- (path: import("fs").PathLike | FileHandle, options?: (import("fs").ObjectEncodingOptions & import("events").Abortable & {
32
+ (path: string, options?: (import("fs").ObjectEncodingOptions & import("events").Abortable & {
36
33
  flag?: import("fs").OpenMode | undefined;
37
34
  }) | BufferEncoding | null): Promise<string | Buffer>;
38
35
  }, readdir: {
39
- (path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
36
+ (path: string, options?: (import("fs").ObjectEncodingOptions & {
40
37
  withFileTypes?: false | undefined;
41
38
  recursive?: boolean | undefined;
42
39
  }) | BufferEncoding | null): Promise<string[]>;
43
- (path: import("fs").PathLike, options: {
40
+ (path: string, options: {
44
41
  encoding: "buffer";
45
42
  withFileTypes?: false | undefined;
46
43
  recursive?: boolean | undefined;
47
44
  } | "buffer"): Promise<Buffer[]>;
48
- (path: import("fs").PathLike, options?: (import("fs").ObjectEncodingOptions & {
45
+ (path: string, options?: (import("fs").ObjectEncodingOptions & {
49
46
  withFileTypes?: false | undefined;
50
47
  recursive?: boolean | undefined;
51
48
  }) | BufferEncoding | null): Promise<string[] | Buffer[]>;
52
- (path: import("fs").PathLike, options: import("fs").ObjectEncodingOptions & {
49
+ (path: string, options: import("fs").ObjectEncodingOptions & {
53
50
  withFileTypes: true;
54
51
  recursive?: boolean | undefined;
55
52
  }): Promise<import("fs").Dirent[]>;
56
- (path: import("fs").PathLike, options: {
53
+ (path: string, options: {
57
54
  encoding: "buffer";
58
55
  withFileTypes: true;
59
56
  recursive?: boolean | undefined;
60
57
  }): Promise<import("fs").Dirent<Buffer>[]>;
61
58
  }, readlink: {
62
- (path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
63
- (path: import("fs").PathLike, options: import("fs").BufferEncodingOption): Promise<Buffer>;
64
- (path: import("fs").PathLike, options?: import("fs").ObjectEncodingOptions | string | null): Promise<string | Buffer>;
65
- }, rename: (oldPath: import("fs").PathLike, newPath: import("fs").PathLike) => Promise<void>, rmdir: (path: import("fs").PathLike, options?: import("fs").RmDirOptions) => Promise<void>, stat: {
66
- (path: import("fs").PathLike, opts?: import("fs").StatOptions & {
67
- bigint?: false | undefined;
68
- }): Promise<import("fs").Stats>;
69
- (path: import("fs").PathLike, opts: import("fs").StatOptions & {
70
- bigint: true;
71
- }): Promise<import("fs").BigIntStats>;
72
- (path: import("fs").PathLike, opts?: import("fs").StatOptions): Promise<import("fs").Stats | import("fs").BigIntStats>;
73
- }, symlink: (target: import("fs").PathLike, path: import("fs").PathLike, type?: string | null) => Promise<void>, truncate: (path: import("fs").PathLike, len?: number) => Promise<void>, unlink: (path: import("fs").PathLike) => Promise<void>, writeFile: (file: import("fs").PathLike | FileHandle, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | import("stream"), options?: (import("fs").ObjectEncodingOptions & {
59
+ (path: string, options?: import("fs").ObjectEncodingOptions | BufferEncoding | null): Promise<string>;
60
+ (path: string, options: import("fs").BufferEncodingOption): Promise<Buffer>;
61
+ (path: string, options?: import("fs").ObjectEncodingOptions | string | null): Promise<string | Buffer>;
62
+ }, rename: (oldPath: string, newPath: string) => Promise<void>, rmdir: (path: string, options?: import("fs").RmDirOptions) => Promise<void>, stat: (path: string, opts?: import("fs").StatOptions) => Promise<import("fs").Stats>, symlink: (target: string, path: string, type?: string | null) => Promise<void>, truncate: (path: string, len?: number) => Promise<void>, unlink: (path: string) => Promise<void>, writeFile: (file: string, data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | import("stream"), options?: (import("fs").ObjectEncodingOptions & {
74
63
  mode?: import("fs").Mode | undefined;
75
64
  flag?: import("fs").OpenMode | undefined;
76
65
  flush?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.47.1",
3
+ "version": "0.47.2",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",