@ai-ecoverse/slicc-kernel 1.127.1 → 1.128.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 +2 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel-worker.js +166 -13
- package/dist/kernel-worker.js.map +4 -4
- package/dist/meta.js.map +2 -2
- package/dist/node-process-worker.js +48 -3
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +166 -13
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +48 -3
- package/dist/process-worker.js.map +3 -3
- package/dist/types/fs/copy.d.ts +2 -0
- package/dist/types/fs/opfs.d.ts +5 -1
- package/dist/types/fs/types.d.ts +5 -0
- package/dist/types/process/wasi/wasi-host.d.ts +2 -0
- package/dist/types/realm/sync-fs-wire.d.ts +2 -1
- package/package.json +1 -1
package/dist/types/fs/opfs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MetaStore } from './meta.js';
|
|
2
2
|
import { type LockManagerLike, type RemoteListener } from './remote.js';
|
|
3
|
-
import { type FsStat, type KernelFs, type NewOwner, type OwnerChange, type Peers, type Perm } from './types.js';
|
|
3
|
+
import { type CopyOptions, type FsStat, type KernelFs, type NewOwner, type OwnerChange, type Peers, type Perm } from './types.js';
|
|
4
4
|
export type OpfsOp = 'lookup' | 'read' | 'write' | 'commit' | 'sidecar';
|
|
5
5
|
export declare function translate(err: unknown, path: string, op?: OpfsOp, mapped?: boolean): Error;
|
|
6
6
|
export interface WriteSession {
|
|
@@ -168,6 +168,10 @@ export declare class OpfsFs implements KernelFs {
|
|
|
168
168
|
private rollBack;
|
|
169
169
|
private finishRenames;
|
|
170
170
|
settledRename(path: unknown): Promise<void>;
|
|
171
|
+
private busyAt;
|
|
172
|
+
private readonly copying;
|
|
173
|
+
copyFile(from: string, to: string, options: CopyOptions): Promise<void>;
|
|
174
|
+
private copyInto;
|
|
171
175
|
private renameAt;
|
|
172
176
|
private replacingTarget;
|
|
173
177
|
private modified;
|
package/dist/types/fs/types.d.ts
CHANGED
|
@@ -38,6 +38,10 @@ export interface NewOwner extends Owner {
|
|
|
38
38
|
socket?: boolean;
|
|
39
39
|
fifo?: boolean;
|
|
40
40
|
}
|
|
41
|
+
export interface CopyOptions {
|
|
42
|
+
exclusive: boolean;
|
|
43
|
+
owner?: NewOwner;
|
|
44
|
+
}
|
|
41
45
|
export interface OwnerChange {
|
|
42
46
|
uid?: number;
|
|
43
47
|
gid?: number;
|
|
@@ -82,6 +86,7 @@ export interface KernelFs {
|
|
|
82
86
|
readlink(path: string): Promise<string>;
|
|
83
87
|
realpath?(path: string, follow: boolean): Promise<string>;
|
|
84
88
|
createExclusive?(path: string, owner?: NewOwner): Promise<void>;
|
|
89
|
+
copyFile?(from: string, to: string, options: CopyOptions): Promise<void>;
|
|
85
90
|
readonly rootName?: string;
|
|
86
91
|
chown?(path: string, change: OwnerChange): Promise<void>;
|
|
87
92
|
trackOwners?(): void;
|
|
@@ -65,6 +65,8 @@ export declare class WasiHost {
|
|
|
65
65
|
constructor(o: WasiHostOptions);
|
|
66
66
|
get cwd(): string;
|
|
67
67
|
umask(mask?: number): number;
|
|
68
|
+
private copyImport;
|
|
69
|
+
copyFile(from: string, to: string, mode: number, exclusive: boolean): void;
|
|
68
70
|
private created;
|
|
69
71
|
sliccTtyImports(): Record<string, WasiFunction>;
|
|
70
72
|
sliccFsImports(): Record<string, WasiFunction>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChangeView } from '../fs/changes.js';
|
|
2
|
-
export declare const SYNC_FS_OPS: readonly ['read', 'write', 'exists', 'stat', 'lstat', 'readdir', 'readdir-stat', 'mkdir', 'rm', 'rename', 'link', 'unlink', 'rmdir', 'symlink', 'readlink', 'chmod', 'utimes', 'lutimes', 'statfs', 'hold', 'create', 'mkfifo', 'kept', 'pread', 'pwrite', 'append', 'truncate', 'chown', 'lchown', 'access'];
|
|
2
|
+
export declare const SYNC_FS_OPS: readonly ['read', 'write', 'exists', 'stat', 'lstat', 'readdir', 'readdir-stat', 'mkdir', 'rm', 'rename', 'link', 'copy', 'unlink', 'rmdir', 'symlink', 'readlink', 'chmod', 'utimes', 'lutimes', 'statfs', 'hold', 'create', 'mkfifo', 'kept', 'pread', 'pwrite', 'append', 'truncate', 'chown', 'lchown', 'access'];
|
|
3
3
|
export type AccessKind = 'open' | 'access' | 'eaccess' | 'follow';
|
|
4
4
|
export declare const HOLD_READ = 4;
|
|
5
5
|
export declare const HOLD_WRITE = 8;
|
|
@@ -113,6 +113,7 @@ export interface SyncFsPosixBridge {
|
|
|
113
113
|
access?(path: string, mode: number, kind?: AccessKind, nofollow?: boolean): void;
|
|
114
114
|
create?(path: string, mode?: number, opening?: boolean): SyncFsCreated | undefined | void;
|
|
115
115
|
mkfifo?(path: string, mode: number): void;
|
|
116
|
+
copy?(from: string, to: string, mode: number, exclusive: boolean): void;
|
|
116
117
|
chown?(path: string, ...rest: ChownArgs): void;
|
|
117
118
|
owners?: boolean;
|
|
118
119
|
links?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.128.0",
|
|
4
4
|
"description": "SLICC's wasm-realm kernel: run Emscripten programs in the browser against OPFS, with fork, spawn, pipes and waitpid",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|