mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 14:22:01 +00:00
* Rename `bun.zig` to `BunObject.zig` * Rename `bun.classes.ts` to `BunObject.classes.ts` * Update references to `bun.zig` --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
119 lines
2.1 KiB
TypeScript
119 lines
2.1 KiB
TypeScript
import { define } from "../../codegen/class-definitions";
|
|
|
|
export default [
|
|
define({
|
|
name: "ResourceUsage",
|
|
construct: true,
|
|
noConstructor: true,
|
|
finalize: true,
|
|
configurable: false,
|
|
hasPendingActivity: false,
|
|
klass: {},
|
|
JSType: "0b11101110",
|
|
proto: {
|
|
maxRSS: {
|
|
getter: "getMaxRSS",
|
|
},
|
|
shmSize: {
|
|
getter: "getSharedMemorySize",
|
|
},
|
|
swapCount: {
|
|
getter: "getSwapCount",
|
|
},
|
|
messages: {
|
|
getter: "getMessages",
|
|
},
|
|
signalCount: {
|
|
getter: "getSignalCount",
|
|
},
|
|
contextSwitches: {
|
|
getter: "getContextSwitches",
|
|
cache: true,
|
|
},
|
|
cpuTime: {
|
|
getter: "getCPUTime",
|
|
cache: true,
|
|
},
|
|
ops: {
|
|
getter: "getOps",
|
|
cache: true,
|
|
},
|
|
},
|
|
values: [],
|
|
}),
|
|
define({
|
|
name: "Subprocess",
|
|
construct: true,
|
|
noConstructor: true,
|
|
finalize: true,
|
|
hasPendingActivity: true,
|
|
configurable: false,
|
|
klass: {},
|
|
JSType: "0b11101110",
|
|
proto: {
|
|
pid: {
|
|
getter: "getPid",
|
|
},
|
|
stdin: {
|
|
getter: "getStdin",
|
|
cache: true,
|
|
},
|
|
stdout: {
|
|
getter: "getStdout",
|
|
cache: true,
|
|
},
|
|
writable: {
|
|
getter: "getStdin",
|
|
cache: "stdin",
|
|
},
|
|
readable: {
|
|
getter: "getStdout",
|
|
cache: "stdout",
|
|
},
|
|
stderr: {
|
|
getter: "getStderr",
|
|
cache: true,
|
|
},
|
|
|
|
ref: {
|
|
fn: "doRef",
|
|
length: 0,
|
|
},
|
|
unref: {
|
|
fn: "doUnref",
|
|
length: 0,
|
|
},
|
|
resourceUsage: {
|
|
fn: "resourceUsage",
|
|
length: 0,
|
|
},
|
|
send: {
|
|
fn: "doSend",
|
|
length: 1,
|
|
},
|
|
|
|
kill: {
|
|
fn: "kill",
|
|
length: 1,
|
|
},
|
|
|
|
killed: {
|
|
getter: "getKilled",
|
|
},
|
|
|
|
exitCode: {
|
|
getter: "getExitCode",
|
|
},
|
|
signalCode: {
|
|
getter: "getSignalCode",
|
|
},
|
|
exited: {
|
|
getter: "getExited",
|
|
},
|
|
stdio: {
|
|
getter: "getStdio",
|
|
},
|
|
},
|
|
}),
|
|
];
|