src/nodejs/jsprocess

    Dark Mode
Search:
Group by:
  Source   Edit

Example:

import src/nodejs/jsprocess
requireProcess()
doAssert not hasUncaughtExceptionCaptureCallback()
echo cwd()
emitWarning("Information is power. But like all power, there are those who want to keep it for themselves".cstring)
echo getegid()
echo getgroups()
echo getuid()
echo hrtime()
echo hrtimeBigint()
echo reportWriteReport()
echo uptimeProcess()
chdir("/tmp".cstring)
if false:
  abort()
  disconnect()
  exit(code = 0.cint)

Example: cmd: -r:off

import src/nodejs/jsprocess
requireProcess()
echo argv ## Read Command Line Arguments as seq[cstring]

Lets

allowedNodeEnvironmentFlags: seq[cstring]
  Source   Edit
argv: seq[cstring]
  Source   Edit
argv0: cstring
  Source   Edit
config: JsObject
  Source   Edit
debugPort: cint
  Source   Edit
execArgv: seq[cstring]
  Source   Edit
execPath: cstring
  Source   Edit
platform: cstring
  Source   Edit
ppid: cint
  Source   Edit
processVersion: cstring
  Source   Edit
processVersions: JsObject
  Source   Edit
release: JsObject
  Source   Edit
reportCompact: bool
  Source   Edit
reportDirectory: cstring
  Source   Edit
reportFilename: cstring
  Source   Edit
reportOnSignal: bool
  Source   Edit

Procs

func getPid(): cint {.importjs: "process.pid@", ...raises: [], tags: [].}
  Source   Edit
func importProcess() {.importjs: "import * as process from \'process\'@",
                       ...raises: [], tags: [].}
Alias for import * as module_name from 'module_name';. Must be called once before using the module   Source   Edit
func initgroups(user: cstring; extraGroup: cstring) {.
    importjs: "process.$1(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_initgroups_user_extragroup   Source   Edit
func kill(pid: cint; signal: cint) {.importjs: "process.$1(#, #)", ...raises: [],
                                     tags: [].}
https://nodejs.org/api/process.html#process_process_kill_pid_signal   Source   Edit
func kill(pid: cint; signal: cstring) {.importjs: "process.$1(#, #)",
                                        ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_kill_pid_signal   Source   Edit
func requireProcess() {.importjs: "const process = require(\'process\')@",
                        ...raises: [], tags: [].}
Alias for const module_name = require('module_name');. Must be called once before using the module   Source   Edit
func resourceUsage(): JsObject {.importjs: "process.$1()", ...raises: [], tags: [].}
  Source   Edit