src/nodejs/jsprocess

    Dark Mode
Search:
Group by:

Example: cmd: -r:off

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

argv: seq[cstring]
argv0: cstring
config: JsObject
debugPort: cint
execArgv: seq[cstring]
execPath: cstring
platform: cstring
ppid: cint
processVersion: cstring
processVersions: JsObject
release: JsObject
reportDirectory: cstring
reportFilename: cstring

Procs

func abort() {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_abort
func chdir(directory: cstring) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_chdir_directory
func cwd(): cstring {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_cwd
func disconnect() {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_disconnect
func emitWarning(warning: cstring) {.importjs: "process.$1(#)", ...raises: [],
                                     tags: [].}
https://nodejs.org/api/process.html#process_process_emitwarning_warning_options
func emitWarning(warning: cstring; tipe: cstring) {.
    importjs: "process.$1(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_emitwarning_warning_type_code_ctor
func emitWarning(warning: cstring; tipe: cstring; code: cstring) {.
    importjs: "process.$1(#, #, #)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_emitwarning_warning_type_code_ctor
func exit(code = 0.cint) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_exit_code
func getegid(): cint {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_getegid
func getgroups(): seq[cint] {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_getgroups
func getPid(): cint {.importjs: "process.pid@", ...raises: [], tags: [].}
func getuid(): cint {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_getuid
func hrtime(): seq[cint] {.importjs: "process.$1()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_hrtime_time
func hrtime(time: openArray[cint]): seq[cint] {.importjs: "process.$1(#)",
    ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_hrtime_time
func hrtimeBigint(): cint {.importjs: "parseInt(process.hrtime.bigint())",
                            ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_hrtime_bigint
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
func initgroups(user: cint; extraGroup: cint) {.importjs: "process.$1(#, #)",
    ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_initgroups_user_extragroup
func initgroups(user: cstring; extraGroup: cstring) {.
    importjs: "process.$1(#, #)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_initgroups_user_extragroup
func kill(pid: cint; signal: cint) {.importjs: "process.$1(#, #)", ...raises: [],
                                     tags: [].}
https://nodejs.org/api/process.html#process_process_kill_pid_signal
func kill(pid: cint; signal: cstring) {.importjs: "process.$1(#, #)",
                                        ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_kill_pid_signal
func reportWriteReport(): cstring {.importjs: "process.report.writeReport()",
                                    ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_report_writereport_filename_err
func reportWriteReport(filename: cstring): cstring {.
    importjs: "process.report.writeReport(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_report_writereport_filename_err
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
func resourceUsage(): JsObject {.importjs: "process.$1()", ...raises: [], tags: [].}
func setegid(id: cint) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setegid_id
func setegid(id: cstring) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setegid_id
func seteuid(id: cint) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_seteuid_id
func seteuid(id: cstring) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_seteuid_id
func setgid(id: cint) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setgid_id
func setgid(id: cstring) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setgid_id
func setgroups(groups: openArray[cint]) {.importjs: "process.$1(#)", ...raises: [],
    tags: [].}
https://nodejs.org/api/process.html#process_process_setgroups_groups
func setuid(id: cint) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setuid_id
func setuid(id: cstring) {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_setuid_id
func umask(mask: cint): any {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_umask_mask
func umask(mask: cstring): any {.importjs: "process.$1(#)", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_umask_mask
func uptimeProcess(): cint {.importjs: "process.uptime()", ...raises: [], tags: [].}
https://nodejs.org/api/process.html#process_process_uptime