chore(examples): update to use latest jco version, guest-types (#564)

This commit is contained in:
Victor Adossi
2025-02-06 15:17:23 -08:00
committed by GitHub
parent 17338d9dbb
commit 7074de7efd
14 changed files with 149 additions and 1203 deletions
+35 -35
View File
@@ -6,36 +6,36 @@
"": {
"name": "add-wasm",
"devDependencies": {
"@bytecodealliance/componentize-js": "0.15.0",
"@bytecodealliance/jco": "1.8.1"
"@bytecodealliance/componentize-js": "0.16.0",
"@bytecodealliance/jco": "1.9.1"
}
},
"node_modules/@bytecodealliance/componentize-js": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.15.0.tgz",
"integrity": "sha512-NyMsXJi4LxeGGYwmZR5c8Zq69scTgTmaXUOXeC4IDvDoLNz5qZdBqC8gjZnsqvRq69QFM2Hd3Xweb5P5AyEOGA==",
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.16.0.tgz",
"integrity": "sha512-x5vKTLd4I+ovC58l4zjld+XTJSve5Glblu7Ola/2v6vOh0YS2eODihDVLWkl4kd9GC/8OjxwEdE0pXelQt6ovw==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.8.1",
"@bytecodealliance/jco": "^1.9.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
},
"node_modules/@bytecodealliance/jco": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.8.1.tgz",
"integrity": "sha512-mYjE7lrSWEzFD6lAVA4skm9/6DvorFjuO5DHoxzwWlJ2hKyO/d9t0Wx1V0nT5L1s7+98ZtVSB1emYLNMebpMdA==",
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.9.1.tgz",
"integrity": "sha512-Xmd1iw2OrWhlLOPZraFTBuE1AGfMSQVqKzswmq3k1vQ5B0EJe8O1CFG/UJeRXwbq1fxHHS9DTtlfAZiTeOdLWQ==",
"dev": true,
"license": "(Apache-2.0 WITH LLVM-exception)",
"workspaces": [
"packages/preview2-shim"
],
"dependencies": {
"@bytecodealliance/componentize-js": "^0.14.0",
"@bytecodealliance/componentize-js": "^0.15.0",
"@bytecodealliance/preview2-shim": "^0.17.1",
"binaryen": "^120.0.0",
"chalk-template": "^1",
@@ -49,16 +49,16 @@
}
},
"node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.14.0.tgz",
"integrity": "sha512-Y53lxcHEQz5k4PwqBY3+q6Y+TmFSu5mWhd+2dyURE7mk0GDaFYKRDoATCoXxD8Dvq/HgNPrDSE2X7AJIjPMtYQ==",
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.15.1.tgz",
"integrity": "sha512-bTQT+uwWNeyFXRiV6cp+5ERUKC2g6lyiMoeMys2/yg8IcWPwq+3btV1Pj/q0ueAwyiIsuQ//c+peMHPrNTmHOg==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.7.1",
"@bytecodealliance/weval": "^0.3.2",
"@bytecodealliance/jco": "^1.8.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
@@ -244,9 +244,9 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -630,15 +630,15 @@
}
},
"node_modules/@napi-rs/wasm-runtime": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.5.tgz",
"integrity": "sha512-kwUxR7J9WLutBbulqg1dfOrMTwhMdXLdcGUhcbCcGwnPLt3gz19uHVdwH1syKVDbE022ZS2vZxOWflFLS0YTjw==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.6.tgz",
"integrity": "sha512-z8YVS3XszxFTO73iwvFDNpQIzdMmSDTP/mB3E/ucR37V3Sx57hSExcXyMoNwaucWxnsWf4xfbZv0iZ30jr0M4Q==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"@emnapi/core": "^1.1.0",
"@emnapi/runtime": "^1.1.0",
"@emnapi/core": "^1.3.1",
"@emnapi/runtime": "^1.3.1",
"@tybys/wasm-util": "^0.9.0"
}
},
@@ -797,9 +797,9 @@
"license": "MIT"
},
"node_modules/chalk": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
"integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -992,9 +992,9 @@
}
},
"node_modules/es-module-lexer": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
"integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
"integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
"dev": true,
"license": "MIT"
},
@@ -1256,9 +1256,9 @@
}
},
"node_modules/ora": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz",
"integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz",
"integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1536,9 +1536,9 @@
}
},
"node_modules/terser": {
"version": "5.36.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz",
"integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==",
"version": "5.38.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.38.0.tgz",
"integrity": "sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
+2 -2
View File
@@ -9,7 +9,7 @@
"all": "npm run build && npm run transpile && npm run transpiled-js"
},
"devDependencies": {
"@bytecodealliance/jco": "1.8.1",
"@bytecodealliance/componentize-js": "0.15.0"
"@bytecodealliance/jco": "1.9.1",
"@bytecodealliance/componentize-js": "0.16.0"
}
}
+71 -56
View File
@@ -1,43 +1,43 @@
{
"name": "reverser-wasm",
"name": "http-hello-world-wasm",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "reverser-wasm",
"name": "http-hello-world-wasm",
"devDependencies": {
"@bytecodealliance/componentize-js": "0.13.0",
"@bytecodealliance/jco": "1.7.0"
"@bytecodealliance/componentize-js": "0.16.0",
"@bytecodealliance/jco": "1.9.1"
}
},
"node_modules/@bytecodealliance/componentize-js": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.13.0.tgz",
"integrity": "sha512-SBmuSiw2CQTBnmE5+944ujFG9VykovteE2q5XLsTblJgey67TAxrIjlLsygDypFbi2JUGNJJ6t9Y0HSarBgKxQ==",
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.16.0.tgz",
"integrity": "sha512-x5vKTLd4I+ovC58l4zjld+XTJSve5Glblu7Ola/2v6vOh0YS2eODihDVLWkl4kd9GC/8OjxwEdE0pXelQt6ovw==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.5.0",
"@bytecodealliance/weval": "^0.3.2",
"@bytecodealliance/jco": "^1.9.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
},
"node_modules/@bytecodealliance/jco": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.7.0.tgz",
"integrity": "sha512-DOoYzWmCjm5N3O1WE+g9VXUHXgKEJ3OatV3KhLYgaG1t9+sj+voS3PZA0JbWuA6vEkBT73Kg4yd4bJgIe1yFXA==",
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.9.1.tgz",
"integrity": "sha512-Xmd1iw2OrWhlLOPZraFTBuE1AGfMSQVqKzswmq3k1vQ5B0EJe8O1CFG/UJeRXwbq1fxHHS9DTtlfAZiTeOdLWQ==",
"dev": true,
"license": "(Apache-2.0 WITH LLVM-exception)",
"workspaces": [
"packages/preview2-shim"
],
"dependencies": {
"@bytecodealliance/componentize-js": "^0.13.0",
"@bytecodealliance/preview2-shim": "^0.17.0",
"binaryen": "^119.0.0",
"@bytecodealliance/componentize-js": "^0.15.0",
"@bytecodealliance/preview2-shim": "^0.17.1",
"binaryen": "^120.0.0",
"chalk-template": "^1",
"commander": "^12",
"mkdirp": "^3",
@@ -48,17 +48,32 @@
"jco": "src/jco.js"
}
},
"node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": {
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.15.1.tgz",
"integrity": "sha512-bTQT+uwWNeyFXRiV6cp+5ERUKC2g6lyiMoeMys2/yg8IcWPwq+3btV1Pj/q0ueAwyiIsuQ//c+peMHPrNTmHOg==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.8.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
},
"node_modules/@bytecodealliance/preview2-shim": {
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.0.tgz",
"integrity": "sha512-JorcEwe4ud0x5BS/Ar2aQWOQoFzjq/7jcnxYXCvSMh0oRm0dQXzOA+hqLDBnOMks1LLBA7dmiLLsEBl09Yd6iQ==",
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.1.tgz",
"integrity": "sha512-h1qLL0TN5KXk/zagY2BtbZuDX6xYjz4Br9RZXEa0ID4UpiPc0agUMhTdz9r89G4vX5SU/tqBg1A6UNv2+DJ5pg==",
"dev": true,
"license": "(Apache-2.0 WITH LLVM-exception)"
},
"node_modules/@bytecodealliance/weval": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@bytecodealliance/weval/-/weval-0.3.2.tgz",
"integrity": "sha512-yH28sdq0Y0Oc29LbbWCEx2PvRFi0D7CEhWdNHPovl/L7thzlNlFWCRcOLanB0XgXQ5rygTpVVBFH0/50tWMg2w==",
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@bytecodealliance/weval/-/weval-0.3.3.tgz",
"integrity": "sha512-hrQI47O1l3ilFscixu0uuSJTj5tbQW0QmCATQWWNW0E8wJxbKH4yo8y57O5gqpRSKk/T+da1sH/GJNrnGHTFNA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -195,9 +210,9 @@
}
},
"node_modules/@emnapi/core": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.2.0.tgz",
"integrity": "sha512-E7Vgw78I93we4ZWdYCb4DGAwRROGkMIXk7/y87UmANR+J6qsWusmC3gLt0H+O0KOt5e6O38U8oJamgbudrES/w==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.3.1.tgz",
"integrity": "sha512-pVGjBIt1Y6gg3EJN8jTcfpP/+uuRksIo055oE/OBkDNcjZqVbfkWCksG1Jp4yZnj3iKWyWX8fdG/j6UDYPbFog==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -207,9 +222,9 @@
}
},
"node_modules/@emnapi/runtime": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz",
"integrity": "sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz",
"integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -229,9 +244,9 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -615,15 +630,15 @@
}
},
"node_modules/@napi-rs/wasm-runtime": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.4.tgz",
"integrity": "sha512-9zESzOO5aDByvhIAsOy9TbpZ0Ur2AJbUI7UT73kcUTS2mxAMHOBaa1st/jAymNoCtvrit99kkzT1FZuXVcgfIQ==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.6.tgz",
"integrity": "sha512-z8YVS3XszxFTO73iwvFDNpQIzdMmSDTP/mB3E/ucR37V3Sx57hSExcXyMoNwaucWxnsWf4xfbZv0iZ30jr0M4Q==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"@emnapi/core": "^1.1.0",
"@emnapi/runtime": "^1.1.0",
"@emnapi/core": "^1.3.1",
"@emnapi/runtime": "^1.3.1",
"@tybys/wasm-util": "^0.9.0"
}
},
@@ -639,9 +654,9 @@
}
},
"node_modules/acorn": {
"version": "8.12.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==",
"dev": true,
"license": "MIT",
"bin": {
@@ -686,9 +701,9 @@
"license": "MIT"
},
"node_modules/binaryen": {
"version": "119.0.0",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-119.0.0.tgz",
"integrity": "sha512-DTdcs8ijrj2OIEftWVPVkYsgJ8MzlYH+uSsC8156g88E7CNaG8kEfWNGSXxb3tPlzadrm6sD3mgSEKKZJu4Q3g==",
"version": "120.0.0",
"resolved": "https://registry.npmjs.org/binaryen/-/binaryen-120.0.0.tgz",
"integrity": "sha512-MaNC1qW5ubk5S7MNNxNpAb9ivKp6TAf8CDknRk4XeCC2wkrpdaubK10S1CAwUXaDDF54gZLtk6opzbEA9VTtJw==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -782,9 +797,9 @@
"license": "MIT"
},
"node_modules/chalk": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
"integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1011,9 +1026,9 @@
"license": "MIT"
},
"node_modules/get-east-asian-width": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz",
"integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",
"integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1241,9 +1256,9 @@
}
},
"node_modules/ora": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.1.0.tgz",
"integrity": "sha512-GQEkNkH/GHOhPFXcqZs3IDahXEQcQxsSjEkK4KvEEST4t7eNzoMjxTzef+EZ+JluDEV+Raoi3WQ2CflnRdSVnQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz",
"integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1521,9 +1536,9 @@
}
},
"node_modules/terser": {
"version": "5.34.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz",
"integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==",
"version": "5.38.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.38.0.tgz",
"integrity": "sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -1561,9 +1576,9 @@
"license": "MIT"
},
"node_modules/tslib": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"dev": true,
"license": "0BSD",
"optional": true
@@ -3,12 +3,13 @@
"description": "Simple codebase for reversing a string via WebAssembly with jco",
"type": "module",
"scripts": {
"build:component": "jco componentize http-hello-world.js --wit wit/ --world-name component --out http-hello-world.wasm",
"build": "jco componentize http-hello-world.js --wit wit/ --world-name component --out http-hello-world.wasm",
"serve": "jco serve http-hello-world.wasm",
"all": "npm run build"
},
"devDependencies": {
"@bytecodealliance/jco": "1.8.1",
"@bytecodealliance/componentize-js": "0.15.0"
"@bytecodealliance/jco": "1.9.1",
"@bytecodealliance/componentize-js": "0.16.0"
}
}
@@ -1,37 +0,0 @@
export namespace WasiClocksMonotonicClock {
/**
* Read the current value of the clock.
*
* The clock is monotonic, therefore calling this function repeatedly will
* produce a sequence of non-decreasing values.
*/
export function now(): Instant;
/**
* Query the resolution of the clock. Returns the duration of time
* corresponding to a clock tick.
*/
export function resolution(): Duration;
/**
* Create a `pollable` which will resolve once the specified instant
* occured.
*/
export function subscribeInstant(when: Instant): Pollable;
/**
* Create a `pollable` which will resolve once the given duration has
* elapsed, starting at the time at which this function was called.
* occured.
*/
export function subscribeDuration(when: Duration): Pollable;
}
import type { Pollable } from './wasi-io-poll.js';
export { Pollable };
/**
* An instant in time, in nanoseconds. An instant is relative to an
* unspecified initial value, and can only be compared to instances from
* the same monotonic-clock.
*/
export type Instant = bigint;
/**
* A duration of time, in nanoseconds.
*/
export type Duration = bigint;
@@ -1,19 +0,0 @@
export namespace WasiHttpIncomingHandler {
/**
* This function is invoked with an incoming HTTP Request, and a resource
* `response-outparam` which provides the capability to reply with an HTTP
* Response. The response is sent by calling the `response-outparam.set`
* method, which allows execution to continue after the response has been
* sent. This enables both streaming to the response body, and performing other
* work.
*
* The implementor of this function must write a response to the
* `response-outparam` before returning, or else the caller will respond
* with an error on its behalf.
*/
export function handle(request: IncomingRequest, responseOut: ResponseOutparam): void;
}
import type { IncomingRequest } from './wasi-http-types.js';
export { IncomingRequest };
import type { ResponseOutparam } from './wasi-http-types.js';
export { ResponseOutparam };
File diff suppressed because it is too large Load Diff
@@ -1,16 +0,0 @@
export namespace WasiIoError {
export { Error };
}
export class Error {
/**
* Returns a string that is suitable to assist humans in debugging
* this error.
*
* WARNING: The returned string should not be consumed mechanically!
* It may change across platforms, hosts, or other implementation
* details. Parsing this string is a major platform-compatibility
* hazard.
*/
toDebugString(): string;
}
@@ -1,41 +0,0 @@
export namespace WasiIoPoll {
export { Pollable };
/**
* Poll for completion on a set of pollables.
*
* This function takes a list of pollables, which identify I/O sources of
* interest, and waits until one or more of the events is ready for I/O.
*
* The result `list<u32>` contains one or more indices of handles in the
* argument list that is ready for I/O.
*
* If the list contains more elements than can be indexed with a `u32`
* value, this function traps.
*
* A timeout can be implemented by adding a pollable from the
* wasi-clocks API to the list.
*
* This function does not return a `result`; polling in itself does not
* do any I/O so it doesn't fail. If any of the I/O sources identified by
* the pollables has an error, it is indicated by marking the source as
* being reaedy for I/O.
*/
export function poll(in_: Array<Pollable>): Uint32Array;
}
export class Pollable {
/**
* Return the readiness of a pollable. This function never blocks.
*
* Returns `true` when the pollable is ready, and `false` otherwise.
*/
ready(): boolean;
/**
* `block` returns immediately if the pollable is ready, and otherwise
* blocks until ready.
*
* This function is equivalent to calling `poll.poll` on a list
* containing only this pollable.
*/
block(): void;
}
@@ -1,237 +0,0 @@
export namespace WasiIoStreams {
export { InputStream };
export { OutputStream };
}
import type { Error } from './wasi-io-error.js';
export { Error };
import type { Pollable } from './wasi-io-poll.js';
export { Pollable };
/**
* An error for input-stream and output-stream operations.
*/
export type StreamError = StreamErrorLastOperationFailed | StreamErrorClosed;
/**
* The last operation (a write or flush) failed before completion.
*
* More information is available in the `error` payload.
*/
export interface StreamErrorLastOperationFailed {
tag: 'last-operation-failed',
val: Error,
}
/**
* The stream is closed: no more input will be accepted by the
* stream. A closed output-stream will return this error on all
* future operations.
*/
export interface StreamErrorClosed {
tag: 'closed',
}
export class InputStream {
/**
* Perform a non-blocking read from the stream.
*
* When the source of a `read` is binary data, the bytes from the source
* are returned verbatim. When the source of a `read` is known to the
* implementation to be text, bytes containing the UTF-8 encoding of the
* text are returned.
*
* This function returns a list of bytes containing the read data,
* when successful. The returned list will contain up to `len` bytes;
* it may return fewer than requested, but not more. The list is
* empty when no bytes are available for reading at this time. The
* pollable given by `subscribe` will be ready when more bytes are
* available.
*
* This function fails with a `stream-error` when the operation
* encounters an error, giving `last-operation-failed`, or when the
* stream is closed, giving `closed`.
*
* When the caller gives a `len` of 0, it represents a request to
* read 0 bytes. If the stream is still open, this call should
* succeed and return an empty list, or otherwise fail with `closed`.
*
* The `len` parameter is a `u64`, which could represent a list of u8 which
* is not possible to allocate in wasm32, or not desirable to allocate as
* as a return value by the callee. The callee may return a list of bytes
* less than `len` in size while more bytes are available for reading.
*/
read(len: bigint): Uint8Array;
/**
* Read bytes from a stream, after blocking until at least one byte can
* be read. Except for blocking, behavior is identical to `read`.
*/
blockingRead(len: bigint): Uint8Array;
/**
* Skip bytes from a stream. Returns number of bytes skipped.
*
* Behaves identical to `read`, except instead of returning a list
* of bytes, returns the number of bytes consumed from the stream.
*/
skip(len: bigint): bigint;
/**
* Skip bytes from a stream, after blocking until at least one byte
* can be skipped. Except for blocking behavior, identical to `skip`.
*/
blockingSkip(len: bigint): bigint;
/**
* Create a `pollable` which will resolve once either the specified stream
* has bytes available to read or the other end of the stream has been
* closed.
* The created `pollable` is a child resource of the `input-stream`.
* Implementations may trap if the `input-stream` is dropped before
* all derived `pollable`s created with this function are dropped.
*/
subscribe(): Pollable;
}
export class OutputStream {
/**
* Check readiness for writing. This function never blocks.
*
* Returns the number of bytes permitted for the next call to `write`,
* or an error. Calling `write` with more bytes than this function has
* permitted will trap.
*
* When this function returns 0 bytes, the `subscribe` pollable will
* become ready when this function will report at least 1 byte, or an
* error.
*/
checkWrite(): bigint;
/**
* Perform a write. This function never blocks.
*
* When the destination of a `write` is binary data, the bytes from
* `contents` are written verbatim. When the destination of a `write` is
* known to the implementation to be text, the bytes of `contents` are
* transcoded from UTF-8 into the encoding of the destination and then
* written.
*
* Precondition: check-write gave permit of Ok(n) and contents has a
* length of less than or equal to n. Otherwise, this function will trap.
*
* returns Err(closed) without writing if the stream has closed since
* the last call to check-write provided a permit.
*/
write(contents: Uint8Array): void;
/**
* Perform a write of up to 4096 bytes, and then flush the stream. Block
* until all of these operations are complete, or an error occurs.
*
* This is a convenience wrapper around the use of `check-write`,
* `subscribe`, `write`, and `flush`, and is implemented with the
* following pseudo-code:
*
* ```text
* let pollable = this.subscribe();
* while !contents.is_empty() {
* // Wait for the stream to become writable
* pollable.block();
* let Ok(n) = this.check-write(); // eliding error handling
* let len = min(n, contents.len());
* let (chunk, rest) = contents.split_at(len);
* this.write(chunk ); // eliding error handling
* contents = rest;
* }
* this.flush();
* // Wait for completion of `flush`
* pollable.block();
* // Check for any errors that arose during `flush`
* let _ = this.check-write(); // eliding error handling
* ```
*/
blockingWriteAndFlush(contents: Uint8Array): void;
/**
* Request to flush buffered output. This function never blocks.
*
* This tells the output-stream that the caller intends any buffered
* output to be flushed. the output which is expected to be flushed
* is all that has been passed to `write` prior to this call.
*
* Upon calling this function, the `output-stream` will not accept any
* writes (`check-write` will return `ok(0)`) until the flush has
* completed. The `subscribe` pollable will become ready when the
* flush has completed and the stream can accept more writes.
*/
flush(): void;
/**
* Request to flush buffered output, and block until flush completes
* and stream is ready for writing again.
*/
blockingFlush(): void;
/**
* Create a `pollable` which will resolve once the output-stream
* is ready for more writing, or an error has occured. When this
* pollable is ready, `check-write` will return `ok(n)` with n>0, or an
* error.
*
* If the stream is closed, this pollable is always ready immediately.
*
* The created `pollable` is a child resource of the `output-stream`.
* Implementations may trap if the `output-stream` is dropped before
* all derived `pollable`s created with this function are dropped.
*/
subscribe(): Pollable;
/**
* Write zeroes to a stream.
*
* This should be used precisely like `write` with the exact same
* preconditions (must use check-write first), but instead of
* passing a list of bytes, you simply pass the number of zero-bytes
* that should be written.
*/
writeZeroes(len: bigint): void;
/**
* Perform a write of up to 4096 zeroes, and then flush the stream.
* Block until all of these operations are complete, or an error
* occurs.
*
* This is a convenience wrapper around the use of `check-write`,
* `subscribe`, `write-zeroes`, and `flush`, and is implemented with
* the following pseudo-code:
*
* ```text
* let pollable = this.subscribe();
* while num_zeroes != 0 {
* // Wait for the stream to become writable
* pollable.block();
* let Ok(n) = this.check-write(); // eliding error handling
* let len = min(n, num_zeroes);
* this.write-zeroes(len); // eliding error handling
* num_zeroes -= len;
* }
* this.flush();
* // Wait for completion of `flush`
* pollable.block();
* // Check for any errors that arose during `flush`
* let _ = this.check-write(); // eliding error handling
* ```
*/
blockingWriteZeroesAndFlush(len: bigint): void;
/**
* Read from one stream and write to another.
*
* The behavior of splice is equivelant to:
* 1. calling `check-write` on the `output-stream`
* 2. calling `read` on the `input-stream` with the smaller of the
* `check-write` permitted length and the `len` provided to `splice`
* 3. calling `write` on the `output-stream` with that read data.
*
* Any error reported by the call to `check-write`, `read`, or
* `write` ends the splice and reports that error.
*
* This function returns the number of bytes transferred; it may be less
* than `len`.
*/
splice(src: InputStream, len: bigint): bigint;
/**
* Read from one stream and write to another, with blocking.
*
* This is similar to `splice`, except that it blocks until the
* `output-stream` is ready for writing, and the `input-stream`
* is ready for reading, before performing the `splice`.
*/
blockingSplice(src: InputStream, len: bigint): bigint;
}
-7
View File
@@ -1,7 +0,0 @@
import { WasiClocksMonotonicClock } from './interfaces/wasi-clocks-monotonic-clock.js';
import { WasiHttpTypes } from './interfaces/wasi-http-types.js';
import { WasiIoError } from './interfaces/wasi-io-error.js';
import { WasiIoPoll } from './interfaces/wasi-io-poll.js';
import { WasiIoStreams } from './interfaces/wasi-io-streams.js';
import { WasiHttpIncomingHandler } from './interfaces/wasi-http-incoming-handler.js';
export const incomingHandler: typeof WasiHttpIncomingHandler;
+35 -35
View File
@@ -6,36 +6,36 @@
"": {
"name": "string-reverse-wasm",
"devDependencies": {
"@bytecodealliance/componentize-js": "0.15.0",
"@bytecodealliance/jco": "1.8.1"
"@bytecodealliance/componentize-js": "0.16.0",
"@bytecodealliance/jco": "1.9.1"
}
},
"node_modules/@bytecodealliance/componentize-js": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.15.0.tgz",
"integrity": "sha512-NyMsXJi4LxeGGYwmZR5c8Zq69scTgTmaXUOXeC4IDvDoLNz5qZdBqC8gjZnsqvRq69QFM2Hd3Xweb5P5AyEOGA==",
"version": "0.16.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.16.0.tgz",
"integrity": "sha512-x5vKTLd4I+ovC58l4zjld+XTJSve5Glblu7Ola/2v6vOh0YS2eODihDVLWkl4kd9GC/8OjxwEdE0pXelQt6ovw==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.8.1",
"@bytecodealliance/jco": "^1.9.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
},
"node_modules/@bytecodealliance/jco": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.8.1.tgz",
"integrity": "sha512-mYjE7lrSWEzFD6lAVA4skm9/6DvorFjuO5DHoxzwWlJ2hKyO/d9t0Wx1V0nT5L1s7+98ZtVSB1emYLNMebpMdA==",
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.9.1.tgz",
"integrity": "sha512-Xmd1iw2OrWhlLOPZraFTBuE1AGfMSQVqKzswmq3k1vQ5B0EJe8O1CFG/UJeRXwbq1fxHHS9DTtlfAZiTeOdLWQ==",
"dev": true,
"license": "(Apache-2.0 WITH LLVM-exception)",
"workspaces": [
"packages/preview2-shim"
],
"dependencies": {
"@bytecodealliance/componentize-js": "^0.14.0",
"@bytecodealliance/componentize-js": "^0.15.0",
"@bytecodealliance/preview2-shim": "^0.17.1",
"binaryen": "^120.0.0",
"chalk-template": "^1",
@@ -49,16 +49,16 @@
}
},
"node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": {
"version": "0.14.0",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.14.0.tgz",
"integrity": "sha512-Y53lxcHEQz5k4PwqBY3+q6Y+TmFSu5mWhd+2dyURE7mk0GDaFYKRDoATCoXxD8Dvq/HgNPrDSE2X7AJIjPMtYQ==",
"version": "0.15.1",
"resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.15.1.tgz",
"integrity": "sha512-bTQT+uwWNeyFXRiV6cp+5ERUKC2g6lyiMoeMys2/yg8IcWPwq+3btV1Pj/q0ueAwyiIsuQ//c+peMHPrNTmHOg==",
"dev": true,
"workspaces": [
"."
],
"dependencies": {
"@bytecodealliance/jco": "^1.7.1",
"@bytecodealliance/weval": "^0.3.2",
"@bytecodealliance/jco": "^1.8.1",
"@bytecodealliance/weval": "^0.3.3",
"@bytecodealliance/wizer": "^7.0.5",
"es-module-lexer": "^1.5.4"
}
@@ -244,9 +244,9 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
"integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==",
"version": "0.3.8",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -630,15 +630,15 @@
}
},
"node_modules/@napi-rs/wasm-runtime": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.5.tgz",
"integrity": "sha512-kwUxR7J9WLutBbulqg1dfOrMTwhMdXLdcGUhcbCcGwnPLt3gz19uHVdwH1syKVDbE022ZS2vZxOWflFLS0YTjw==",
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.6.tgz",
"integrity": "sha512-z8YVS3XszxFTO73iwvFDNpQIzdMmSDTP/mB3E/ucR37V3Sx57hSExcXyMoNwaucWxnsWf4xfbZv0iZ30jr0M4Q==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"@emnapi/core": "^1.1.0",
"@emnapi/runtime": "^1.1.0",
"@emnapi/core": "^1.3.1",
"@emnapi/runtime": "^1.3.1",
"@tybys/wasm-util": "^0.9.0"
}
},
@@ -797,9 +797,9 @@
"license": "MIT"
},
"node_modules/chalk": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
"integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
"integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
"dev": true,
"license": "MIT",
"engines": {
@@ -992,9 +992,9 @@
}
},
"node_modules/es-module-lexer": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz",
"integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz",
"integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==",
"dev": true,
"license": "MIT"
},
@@ -1256,9 +1256,9 @@
}
},
"node_modules/ora": {
"version": "8.1.1",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.1.1.tgz",
"integrity": "sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ora/-/ora-8.2.0.tgz",
"integrity": "sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1536,9 +1536,9 @@
}
},
"node_modules/terser": {
"version": "5.36.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz",
"integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==",
"version": "5.38.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.38.0.tgz",
"integrity": "sha512-a4GD5R1TjEeuCT6ZRiYMHmIf7okbCPEuhQET8bczV6FrQMMlFXA1n+G0KKjdlFCm3TEHV77GxfZB3vZSUQGFpg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -9,7 +9,7 @@
"all": "npm run build; npm run transpile; npm run transpiled-js"
},
"devDependencies": {
"@bytecodealliance/jco": "1.8.1",
"@bytecodealliance/componentize-js": "0.15.0"
"@bytecodealliance/jco": "1.9.1",
"@bytecodealliance/componentize-js": "0.16.0"
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ which means installing [`jco`][jco] and related tooling.
> [!NOTE]
> [Typescript][ts] can *also* be used, given that it is transpiled to JS first by relevant tooling (`tsc`).
> `jco` includes a `jco types` subcommand for generating typings that can be used with a Typescript codebase.
> `jco` includes a `jco guest-types` subcommand for generating typings that can be used with a Typescript component.
[jco]: https://github.com/bytecodealliance/jco
[ts]: https://typescriptlang.org