@ai-ecoverse/slicc-jsh 0.3.8 → 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/NOTICE +99 -0
- package/README.md +3 -1
- package/dist/host/main.mjs +11 -4
- package/dist/jsh.mjs +666 -228
- package/dist/meta-main.json +1 -1
- package/dist/meta-zlib.json +1 -0
- package/dist/node.mjs +666 -228
- package/dist/vendor/zlib.cjs +1 -0
- package/package.json +3 -1
package/NOTICE
CHANGED
|
@@ -58,6 +58,80 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
58
58
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
59
59
|
THE SOFTWARE.
|
|
60
60
|
|
|
61
|
+
--------------------------------------------------------------------------------
|
|
62
|
+
This product bundles browserify-zlib (from npm). License text follows:
|
|
63
|
+
|
|
64
|
+
The MIT License (MIT)
|
|
65
|
+
|
|
66
|
+
Copyright (c) 2014-2015 Devon Govett <devongovett@gmail.com>
|
|
67
|
+
|
|
68
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
69
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
70
|
+
in the Software without restriction, including without limitation the rights
|
|
71
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
72
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
73
|
+
furnished to do so, subject to the following conditions:
|
|
74
|
+
|
|
75
|
+
The above copyright notice and this permission notice shall be included in all
|
|
76
|
+
copies or substantial portions of the Software.
|
|
77
|
+
|
|
78
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
79
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
80
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
81
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
82
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
83
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
84
|
+
SOFTWARE.
|
|
85
|
+
|
|
86
|
+
This project contains parts of Node.js.
|
|
87
|
+
Node.js is licensed for use as follows:
|
|
88
|
+
|
|
89
|
+
"""
|
|
90
|
+
Copyright Node.js contributors. All rights reserved.
|
|
91
|
+
|
|
92
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
93
|
+
of this software and associated documentation files (the "Software"), to
|
|
94
|
+
deal in the Software without restriction, including without limitation the
|
|
95
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
96
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
97
|
+
furnished to do so, subject to the following conditions:
|
|
98
|
+
|
|
99
|
+
The above copyright notice and this permission notice shall be included in
|
|
100
|
+
all copies or substantial portions of the Software.
|
|
101
|
+
|
|
102
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
103
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
104
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
105
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
106
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
107
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
108
|
+
IN THE SOFTWARE.
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
This license applies to parts of Node.js originating from the
|
|
112
|
+
https://github.com/joyent/node repository:
|
|
113
|
+
|
|
114
|
+
"""
|
|
115
|
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
|
116
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
117
|
+
of this software and associated documentation files (the "Software"), to
|
|
118
|
+
deal in the Software without restriction, including without limitation the
|
|
119
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
120
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
121
|
+
furnished to do so, subject to the following conditions:
|
|
122
|
+
|
|
123
|
+
The above copyright notice and this permission notice shall be included in
|
|
124
|
+
all copies or substantial portions of the Software.
|
|
125
|
+
|
|
126
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
127
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
128
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
129
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
130
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
131
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
132
|
+
IN THE SOFTWARE.
|
|
133
|
+
"""
|
|
134
|
+
|
|
61
135
|
--------------------------------------------------------------------------------
|
|
62
136
|
This product bundles event-target-shim (from npm). License text follows:
|
|
63
137
|
|
|
@@ -143,6 +217,31 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
143
217
|
IN THE SOFTWARE.
|
|
144
218
|
"""
|
|
145
219
|
|
|
220
|
+
--------------------------------------------------------------------------------
|
|
221
|
+
This product bundles pako (from npm). License text follows:
|
|
222
|
+
|
|
223
|
+
(The MIT License)
|
|
224
|
+
|
|
225
|
+
Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn
|
|
226
|
+
|
|
227
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
228
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
229
|
+
in the Software without restriction, including without limitation the rights
|
|
230
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
231
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
232
|
+
furnished to do so, subject to the following conditions:
|
|
233
|
+
|
|
234
|
+
The above copyright notice and this permission notice shall be included in
|
|
235
|
+
all copies or substantial portions of the Software.
|
|
236
|
+
|
|
237
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
238
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
239
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
240
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
241
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
242
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
243
|
+
THE SOFTWARE.
|
|
244
|
+
|
|
146
245
|
--------------------------------------------------------------------------------
|
|
147
246
|
This product bundles process (from npm). License text follows:
|
|
148
247
|
|
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ Design and milestones: [slicc-kernel#68](https://github.com/ai-ecoverse/slicc-ke
|
|
|
31
31
|
- `realpathSync` resolves every link.
|
|
32
32
|
- `linkSync` is the kernel's: it works on `tmpfs`, and fails with `EPERM` on the root file system and `fsa`, and with `EXDEV` across mounts.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
**`zlib`:** browserify-zlib 0.2.0 (Node's own `zlib.js` port) over pako 1.0.11. The vendor bundle is minified and only evaluated by the first `require('zlib')`. It's patched to Node 22: option validation and its errors, ArrayBuffer and TypedArray input, `{ info: true }`, `destroy`/`close`, `params`, and raw-inflate dictionaries. Also `constants`/`codes` from Node 22 and `crc32`. Deflate output is byte-identical to Node's (golden `zlib-node22`). Brotli and Zstd have no implementation here: they throw `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`.
|
|
35
|
+
|
|
36
|
+
**Still later:** `crypto` / `readline` / `tty` / `tls` / `worker_threads` / TLS `https.createServer` throw `ERR_NOT_SUPPORTED` until their milestone.
|
|
35
37
|
|
|
36
38
|
JS program entries are **esbuild-bundled** to single files (`dist/node.mjs`, `dist/jsh.mjs`) because the kernel loads `abi: "js"` modules via `data:` URLs (relative imports do not resolve).
|
|
37
39
|
|
package/dist/host/main.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/host/main.mjs
|
|
2
2
|
import { spawn as spawnChild } from "node:child_process";
|
|
3
|
-
import { accessSync, constants as fsConstants, readFileSync, writeSync } from "node:fs";
|
|
3
|
+
import { accessSync, constants as fsConstants, readFileSync, realpathSync, writeSync } from "node:fs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { constants as osConstants } from "node:os";
|
|
6
6
|
import { delimiter, join, resolve } from "node:path";
|
|
@@ -10,7 +10,7 @@ import vm from "node:vm";
|
|
|
10
10
|
// package.json
|
|
11
11
|
var package_default = {
|
|
12
12
|
name: "@ai-ecoverse/slicc-jsh",
|
|
13
|
-
version: "0.
|
|
13
|
+
version: "0.4.0",
|
|
14
14
|
description: "Node.js-compatible runtime for slicc-kernel: the node and jsh commands (abi: js)",
|
|
15
15
|
type: "module",
|
|
16
16
|
license: "Apache-2.0",
|
|
@@ -84,8 +84,10 @@ var package_default = {
|
|
|
84
84
|
"@ai-ecoverse/wasi-pnpm": "12.9.1-8",
|
|
85
85
|
"abort-controller": "3.0.0",
|
|
86
86
|
acorn: "8.19.0",
|
|
87
|
+
"browserify-zlib": "0.2.0",
|
|
87
88
|
esbuild: "0.28.2",
|
|
88
89
|
"node-inspect-extracted": "3.3.4",
|
|
90
|
+
pako: "1.0.11",
|
|
89
91
|
process: "0.11.10",
|
|
90
92
|
"readable-stream": "4.8.0",
|
|
91
93
|
"semantic-release": "25.0.9",
|
|
@@ -890,9 +892,14 @@ async function main() {
|
|
|
890
892
|
${JSH_USAGE}`);
|
|
891
893
|
process.exit(parsed.status);
|
|
892
894
|
}
|
|
893
|
-
const
|
|
894
|
-
process.argv = [process.execPath,
|
|
895
|
+
const given = resolve(parsed.script);
|
|
896
|
+
process.argv = [process.execPath, given, ...parsed.args];
|
|
895
897
|
silenceLoaderWarning();
|
|
898
|
+
let filename = given;
|
|
899
|
+
try {
|
|
900
|
+
filename = realpathSync(given);
|
|
901
|
+
} catch {
|
|
902
|
+
}
|
|
896
903
|
await runJsh({ filename, engine, process, console });
|
|
897
904
|
}
|
|
898
905
|
main().catch((err) => {
|