shim plugin related APIs, proxy web requests.

This commit is contained in:
Nystik
2026-03-11 23:03:14 +01:00
parent 9789be6d70
commit ac41ac3c4e
10 changed files with 452 additions and 0 deletions

49
shims/node/os.js Normal file
View File

@@ -0,0 +1,49 @@
export function platform() {
return "linux";
}
export function arch() {
return "x64";
}
export function homedir() {
return "/";
}
export function tmpdir() {
return "/tmp";
}
export function hostname() {
return "localhost";
}
export function type() {
return "Linux";
}
export function release() {
return "0.0.0";
}
export function cpus() {
return [{ model: "browser", speed: 0 }];
}
export function totalmem() {
return 0;
}
export function freemem() {
return 0;
}
export function networkInterfaces() {
return {};
}
export function endianness() {
return "LE";
}
export const EOL = "\n";