@cowasm/kernel
Advanced tools
Sorry, the diff of this file is not supported yet
+2
-2
| { | ||
| "name": "@cowasm/kernel", | ||
| "version": "0.27.4", | ||
| "version": "0.27.5", | ||
| "description": "@cowasm/kernel -- the Kernel of CoWasm: Collaborative WebAssembly for Servers and Browsers", | ||
@@ -22,3 +22,3 @@ "main": "./dist/kernel/node.js", | ||
| }, | ||
| "bin": "./dist/kernel/node-terminal.js", | ||
| "bin": "./bin/cowasm", | ||
| "repository": { | ||
@@ -25,0 +25,0 @@ "type": "git", |
+0
-3
@@ -10,4 +10,1 @@ # @cowasm/kernel: Collaborative WebAssembly for Servers and Browsers | ||
| ## Running CoWasm binaries | ||
| Use `npx @cowasm/kernel path/to/binary` . |
| #!/usr/bin/env node | ||
| "use strict"; | ||
| var __importDefault = (this && this.__importDefault) || function (mod) { | ||
| return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| const path_1 = require("path"); | ||
| const node_1 = require("./node"); | ||
| const posix_node_1 = __importDefault(require("posix-node")); | ||
| async function main() { | ||
| if (process.argv.length <= 2) { | ||
| console.error(`Usage: cowasm program [args ...]`); | ||
| process.exit(1); | ||
| } | ||
| // TODO: could get asyncKernel instead via command line option or env variable (?) | ||
| const kernel = await (0, node_1.syncKernel)(); | ||
| const program = (0, path_1.resolve)(process.argv[2]); | ||
| const argv = [program].concat(process.argv.slice(3)); | ||
| try { | ||
| posix_node_1.default.enableRawInput?.(); | ||
| } | ||
| catch (_err) { | ||
| // this will fail if stdin is not interactive; that's fine. | ||
| try { | ||
| posix_node_1.default.makeStdinBlocking?.(); | ||
| } | ||
| catch (_err) { } | ||
| } | ||
| const r = kernel.exec(argv); | ||
| process.exit(r); | ||
| } | ||
| main(); | ||
| //# sourceMappingURL=node-terminal.js.map |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
52013
-1.89%9
-78.05%10
-23.08%1
Infinity%