@ai-ecoverse/slicc-kernel 1.111.0 → 1.113.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 +3 -2
- package/dist/index.js.map +2 -2
- package/dist/kernel-worker.js +78 -4
- package/dist/kernel-worker.js.map +4 -4
- package/dist/node-process-worker.js +17 -1
- package/dist/node-process-worker.js.map +3 -3
- package/dist/node.js +78 -4
- package/dist/node.js.map +4 -4
- package/dist/process-worker.js +17 -1
- package/dist/process-worker.js.map +3 -3
- package/dist/types/fs/opfs.d.ts +3 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/kernel/net/hosts-file.d.ts +5 -0
- package/dist/types/kernel/net/resolver.d.ts +4 -0
- package/dist/types/process/js/js-net.d.ts +5 -0
- package/package.json +3 -3
package/dist/types/fs/opfs.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export declare class OpfsFs implements KernelFs {
|
|
|
15
15
|
private readonly meta;
|
|
16
16
|
private readonly dirs;
|
|
17
17
|
private readonly files;
|
|
18
|
+
private readonly absent;
|
|
19
|
+
private changes;
|
|
18
20
|
private readonly snapshots;
|
|
19
21
|
private readonly found;
|
|
20
22
|
private readonly checked;
|
|
@@ -63,6 +65,7 @@ export declare class OpfsFs implements KernelFs {
|
|
|
63
65
|
private dir;
|
|
64
66
|
private current;
|
|
65
67
|
private forget;
|
|
68
|
+
private missed;
|
|
66
69
|
private remember;
|
|
67
70
|
private inDir;
|
|
68
71
|
private child;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type { ProcessMountPolicy, ProcessMountRequest } from './mount/syscall.js
|
|
|
36
36
|
export type { JsChild, JsExited, JsSpawnOptions, JsStdio } from './process/js/js-children.js';
|
|
37
37
|
export type { JsCrontabAnswer, JsCrontabCall, JsFdStatus, JsFdType, JsFile, JsOpenOptions, JsProgramContext, JsSignal, JsSudoAnswer, } from './process/js/js-context.js';
|
|
38
38
|
export type { JsStatFs } from './process/js/js-io.js';
|
|
39
|
-
export type { JsAddress, JsConnection, JsConnectOptions, JsListener, JsListenOptions, JsNet, } from './process/js/js-net.js';
|
|
39
|
+
export type { JsAddress, JsConnection, JsConnectOptions, JsListener, JsListenOptions, JsNet, JsResolveOptions, } from './process/js/js-net.js';
|
|
40
40
|
export type { JsRunOptions, JsRunResult, JsRunStdio } from './process/js/js-run.js';
|
|
41
41
|
export type { JsCred, JsSyncContext, JsSyncFile } from './process/js/js-sync.js';
|
|
42
42
|
export type { JsTermios, JsTty, JsTtySize } from './process/js/js-tty.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { KernelFs } from '../../fs/types.js';
|
|
2
|
+
export type HostsTable = ReadonlyMap<string, readonly string[]>;
|
|
3
|
+
export declare const HOSTS_PATH = "/etc/hosts";
|
|
4
|
+
export declare function parseHosts(text: string): HostsTable;
|
|
5
|
+
export declare function hostsReader(fs: Pick<KernelFs, 'stat' | 'readFile'>, path?: string): () => Promise<HostsTable | undefined>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HostsTable } from './hosts-file.js';
|
|
1
2
|
import { type Routes } from './routes.js';
|
|
2
3
|
import { type NetworkUplink, type ResolveFamily } from './uplink.js';
|
|
3
4
|
export declare const RESOLVE_TTL_MAX = 60;
|
|
@@ -10,6 +11,7 @@ export interface ResolverOptions {
|
|
|
10
11
|
timeoutMs?: number;
|
|
11
12
|
log?: (message: string) => void;
|
|
12
13
|
hostname?: string;
|
|
14
|
+
hosts?: () => Promise<HostsTable | undefined>;
|
|
13
15
|
}
|
|
14
16
|
export declare function hostsEntry(name: string, own?: readonly string[]): string | undefined;
|
|
15
17
|
export declare class Resolver {
|
|
@@ -21,7 +23,9 @@ export declare class Resolver {
|
|
|
21
23
|
private readonly own;
|
|
22
24
|
private readonly cache;
|
|
23
25
|
private readonly pending;
|
|
26
|
+
private readonly hosts;
|
|
24
27
|
constructor(options: ResolverOptions);
|
|
28
|
+
private fromFile;
|
|
25
29
|
resolve(name: string, family: ResolveFamily, blocking?: () => AbortSignal): Promise<string[]>;
|
|
26
30
|
private lookup;
|
|
27
31
|
private usable;
|
|
@@ -30,9 +30,14 @@ export interface JsConnectOptions {
|
|
|
30
30
|
port: number;
|
|
31
31
|
signal?: AbortSignal;
|
|
32
32
|
}
|
|
33
|
+
export interface JsResolveOptions {
|
|
34
|
+
family?: 0 | 4 | 6;
|
|
35
|
+
signal?: AbortSignal;
|
|
36
|
+
}
|
|
33
37
|
export interface JsNet {
|
|
34
38
|
listen(options?: JsListenOptions): Promise<JsListener>;
|
|
35
39
|
connect(options: JsConnectOptions): Promise<JsConnection>;
|
|
40
|
+
resolve(name: string, options?: JsResolveOptions): Promise<string[]>;
|
|
36
41
|
}
|
|
37
42
|
export interface NetIo {
|
|
38
43
|
read(fd: number, max: number | undefined, signal: AbortSignal): Promise<Uint8Array>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-kernel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.113.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",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"@ai-ecoverse/wasm-coreutils": "9.12.0-9",
|
|
78
78
|
"@ai-ecoverse/wasm-curl": "8.22.0-5",
|
|
79
79
|
"@ai-ecoverse/wasm-git": "2.55.0-15",
|
|
80
|
-
"@ai-ecoverse/wasm-procps": "4.0.7-
|
|
80
|
+
"@ai-ecoverse/wasm-procps": "4.0.7-3",
|
|
81
81
|
"@ai-ecoverse/wasm-sqlite3": "3.54.0-4",
|
|
82
82
|
"@ai-ecoverse/wasm-tar": "1.35.0-7",
|
|
83
83
|
"@ai-ecoverse/wasm-tls-engine": "4.2.0-1",
|
|
84
84
|
"@ai-ecoverse/wasm-tree": "2.3.2-3",
|
|
85
|
-
"@ai-ecoverse/wasm-util-linux": "2.42.4-
|
|
85
|
+
"@ai-ecoverse/wasm-util-linux": "2.42.4-3",
|
|
86
86
|
"@biomejs/biome": "2.5.15",
|
|
87
87
|
"@types/node": "24.19.2",
|
|
88
88
|
"esbuild": "0.28.2",
|