@ai-ecoverse/slicc-jsh 0.4.0 → 0.5.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 CHANGED
@@ -8,6 +8,31 @@ Version 2.0.
8
8
  Ported components originate from ai-ecoverse/slicc and remain under Apache-2.0.
9
9
  See LICENSE for the full license text.
10
10
 
11
+ --------------------------------------------------------------------------------
12
+ This product bundles @noble/hashes (from npm). License text follows:
13
+
14
+ The MIT License (MIT)
15
+
16
+ Copyright (c) 2022 Paul Miller (https://paulmillr.com)
17
+
18
+ Permission is hereby granted, free of charge, to any person obtaining a copy
19
+ of this software and associated documentation files (the “Software”), to deal
20
+ in the Software without restriction, including without limitation the rights
21
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
+ copies of the Software, and to permit persons to whom the Software is
23
+ furnished to do so, subject to the following conditions:
24
+
25
+ The above copyright notice and this permission notice shall be included in
26
+ all copies or substantial portions of the Software.
27
+
28
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34
+ THE SOFTWARE.
35
+
11
36
  --------------------------------------------------------------------------------
12
37
  This product bundles abort-controller (from npm). License text follows:
13
38
 
@@ -58,6 +83,56 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58
83
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59
84
  THE SOFTWARE.
60
85
 
86
+ --------------------------------------------------------------------------------
87
+ This product bundles browserify-aes (from npm). License text follows:
88
+
89
+ The MIT License (MIT)
90
+
91
+ Copyright (c) 2014-2017 browserify-aes contributors
92
+
93
+ Permission is hereby granted, free of charge, to any person obtaining a copy
94
+ of this software and associated documentation files (the "Software"), to deal
95
+ in the Software without restriction, including without limitation the rights
96
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
97
+ copies of the Software, and to permit persons to whom the Software is
98
+ furnished to do so, subject to the following conditions:
99
+
100
+ The above copyright notice and this permission notice shall be included in all
101
+ copies or substantial portions of the Software.
102
+
103
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
104
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
105
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
106
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
107
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
108
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
109
+ SOFTWARE.
110
+
111
+ --------------------------------------------------------------------------------
112
+ This product bundles browserify-des (from npm). License text follows:
113
+
114
+ The MIT License (MIT)
115
+
116
+ Copyright (c) 2014-2017 Calvin Metcalf, Fedor Indutny & contributors
117
+
118
+ Permission is hereby granted, free of charge, to any person obtaining a copy
119
+ of this software and associated documentation files (the "Software"), to deal
120
+ in the Software without restriction, including without limitation the rights
121
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
122
+ copies of the Software, and to permit persons to whom the Software is
123
+ furnished to do so, subject to the following conditions:
124
+
125
+ The above copyright notice and this permission notice shall be included in all
126
+ copies or substantial portions of the Software.
127
+
128
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
129
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
130
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
131
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
132
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
133
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
134
+ SOFTWARE.
135
+
61
136
  --------------------------------------------------------------------------------
62
137
  This product bundles browserify-zlib (from npm). License text follows:
63
138
 
@@ -132,6 +207,62 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
132
207
  IN THE SOFTWARE.
133
208
  """
134
209
 
210
+ --------------------------------------------------------------------------------
211
+ This product bundles buffer-xor (from npm). License text follows:
212
+
213
+ The MIT License (MIT)
214
+
215
+ Copyright (c) 2015 Daniel Cousens
216
+
217
+ Permission is hereby granted, free of charge, to any person obtaining a copy
218
+ of this software and associated documentation files (the "Software"), to deal
219
+ in the Software without restriction, including without limitation the rights
220
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
221
+ copies of the Software, and to permit persons to whom the Software is
222
+ furnished to do so, subject to the following conditions:
223
+
224
+ The above copyright notice and this permission notice shall be included in all
225
+ copies or substantial portions of the Software.
226
+
227
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
228
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
229
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
230
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
231
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
232
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
233
+ SOFTWARE.
234
+
235
+ --------------------------------------------------------------------------------
236
+ This product bundles cipher-base (from npm). License text follows:
237
+
238
+ The MIT License (MIT)
239
+
240
+ Copyright (c) 2017 crypto-browserify contributors
241
+
242
+ Permission is hereby granted, free of charge, to any person obtaining a copy
243
+ of this software and associated documentation files (the "Software"), to deal
244
+ in the Software without restriction, including without limitation the rights
245
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
246
+ copies of the Software, and to permit persons to whom the Software is
247
+ furnished to do so, subject to the following conditions:
248
+
249
+ The above copyright notice and this permission notice shall be included in all
250
+ copies or substantial portions of the Software.
251
+
252
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
253
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
254
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
255
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
256
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
257
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
258
+ SOFTWARE.
259
+
260
+ --------------------------------------------------------------------------------
261
+ This product bundles des.js (from npm). License text follows:
262
+
263
+ License: MIT
264
+ (See https://spdx.org/licenses/MIT.html)
265
+
135
266
  --------------------------------------------------------------------------------
136
267
  This product bundles event-target-shim (from npm). License text follows:
137
268
 
@@ -183,6 +314,42 @@ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
183
314
  OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
184
315
  USE OR OTHER DEALINGS IN THE SOFTWARE.
185
316
 
317
+ --------------------------------------------------------------------------------
318
+ This product bundles inherits (from npm). License text follows:
319
+
320
+ The ISC License
321
+
322
+ Copyright (c) Isaac Z. Schlueter
323
+
324
+ Permission to use, copy, modify, and/or distribute this software for any
325
+ purpose with or without fee is hereby granted, provided that the above
326
+ copyright notice and this permission notice appear in all copies.
327
+
328
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
329
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
330
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
331
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
332
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
333
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
334
+ PERFORMANCE OF THIS SOFTWARE.
335
+
336
+ --------------------------------------------------------------------------------
337
+ This product bundles minimalistic-assert (from npm). License text follows:
338
+
339
+ Copyright 2015 Calvin Metcalf
340
+
341
+ Permission to use, copy, modify, and/or distribute this software for any purpose
342
+ with or without fee is hereby granted, provided that the above copyright notice
343
+ and this permission notice appear in all copies.
344
+
345
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
346
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
347
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
348
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
349
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
350
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
351
+ PERFORMANCE OF THIS SOFTWARE.
352
+
186
353
  --------------------------------------------------------------------------------
187
354
  This product bundles node-inspect-extracted (from npm). License text follows:
188
355
 
package/README.md CHANGED
@@ -33,7 +33,16 @@ Design and milestones: [slicc-kernel#68](https://github.com/ai-ecoverse/slicc-ke
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
35
 
36
- **Still later:** `crypto` / `readline` / `tty` / `tls` / `worker_threads` / TLS `https.createServer` throw `ERR_NOT_SUPPORTED` until their milestone.
36
+ **`crypto`:** Node 22's own JS layer (`lib/internal/crypto/{hash,cipher,keys,pbkdf2,hkdf,scrypt,random}.js`, ported) over pure-JS primitives in a minified vendor bundle that's only evaluated by the first `require('crypto')`. The primitives are @noble/hashes 1.8.0 (digests, HMAC, PBKDF2, HKDF, scrypt) and browserify-aes 1.2.0 / browserify-des 1.0.2 (block ciphers). Random numbers, `webcrypto` and `subtle` come from the platform's WebCrypto. Available:
37
+ - `createHash`/`hash` for md5, sha1, sha2, sha3, shake, ripemd160, blake2 and md5-sha1, under OpenSSL's names and aliases;
38
+ - `createHmac`, `pbkdf2`, `hkdf` and `scrypt`, each sync and async;
39
+ - `createCipheriv`/`createDecipheriv` for AES ECB/CBC/CFB/CFB8/CFB1/OFB/CTR/GCM and 3DES;
40
+ - secret `KeyObject`s (`createSecretKey`, `generateKey`);
41
+ - the `random*` family, `timingSafeEqual`, `getCiphers`/`getCipherInfo`/`getHashes`, and `constants`.
42
+
43
+ Outputs and errors match Node 22.22.0 (golden `crypto-node22`). That includes Node's quirks, such as "Deriving bits failed" for a zero-length PBKDF2 or HKDF key. DES (single), Blowfish and the other ciphers in OpenSSL's legacy provider fail as `unsupported`, as in Node 22. Asymmetric keys, sign/verify, DH/ECDH, RSA encryption, primes, X509, and the CCM/OCB/XTS/ChaCha20/wrap ciphers have no implementation here: they throw `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM` (`crypto.subtle` covers much of it).
44
+
45
+ **Still later:** `readline` / `tty` / `tls` / `worker_threads` / TLS `https.createServer` throw `ERR_NOT_SUPPORTED` until their milestone.
37
46
 
38
47
  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).
39
48
 
@@ -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.4.0",
13
+ version: "0.5.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",
@@ -82,8 +82,11 @@ var package_default = {
82
82
  devDependencies: {
83
83
  "@ai-ecoverse/slicc-kernel": "1.64.0",
84
84
  "@ai-ecoverse/wasi-pnpm": "12.9.1-8",
85
+ "@noble/hashes": "1.8.0",
85
86
  "abort-controller": "3.0.0",
86
87
  acorn: "8.19.0",
88
+ "browserify-aes": "1.2.0",
89
+ "browserify-des": "1.0.2",
87
90
  "browserify-zlib": "0.2.0",
88
91
  esbuild: "0.28.2",
89
92
  "node-inspect-extracted": "3.3.4",