michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: module.metadata = { michael@0: "stability": "unstable" michael@0: }; michael@0: michael@0: const { michael@0: exit, version, stdout, stderr, platform, architecture michael@0: } = require("../system"); michael@0: michael@0: /** michael@0: * Supported michael@0: */ michael@0: michael@0: exports.stdout = stdout; michael@0: exports.stderr = stderr; michael@0: exports.version = version; michael@0: exports.versions = {}; michael@0: exports.config = {}; michael@0: exports.arch = architecture; michael@0: exports.platform = platform; michael@0: exports.exit = exit; michael@0: michael@0: /** michael@0: * Partial support michael@0: */ michael@0: michael@0: // An alias to `setTimeout(fn, 0)`, which isn't the same as node's `nextTick`, michael@0: // but atleast ensures it'll occur asynchronously michael@0: exports.nextTick = (callback) => setTimeout(callback, 0); michael@0: michael@0: /** michael@0: * Unsupported michael@0: */ michael@0: michael@0: exports.maxTickDepth = 1000; michael@0: exports.pid = 0; michael@0: exports.title = ""; michael@0: exports.stdin = {}; michael@0: exports.argv = []; michael@0: exports.execPath = ""; michael@0: exports.execArgv = []; michael@0: exports.abort = function () {}; michael@0: exports.chdir = function () {}; michael@0: exports.cwd = function () {}; michael@0: exports.env = {}; michael@0: exports.getgid = function () {}; michael@0: exports.setgid = function () {}; michael@0: exports.getuid = function () {}; michael@0: exports.setuid = function () {}; michael@0: exports.getgroups = function () {}; michael@0: exports.setgroups = function () {}; michael@0: exports.initgroups = function () {}; michael@0: exports.kill = function () {}; michael@0: exports.memoryUsage = function () {}; michael@0: exports.umask = function () {}; michael@0: exports.uptime = function () {}; michael@0: exports.hrtime = function () {};