express-debug-panel
npm, a package manager for the JavaScript programming language, is the world's largest software registry.
It contains over 1.3 million code packages as of July 2020. The registry is used to share open-source software.
Finite Wisdom has contributed a code package named express-debug-panel
. You can learn about it
here, and see it in action
below.
-
Name Value _consuming false _dumped false _events Name Value end function clearRequestTimeout(req) { if (!req) { req = this; } if (!req[kRequestTimeout]) { return; } debug('requestTimeout timer cleared'); clearTimeout(req[kRequestTimeout]); req[kRequestTimeout] = undefined; }
_eventsCount 1 _maxListeners undefined _parsedOriginalUrl Name Value _raw /express-debug-panel auth null hash null host null hostname null href /express-debug-panel path /express-debug-panel pathname /express-debug-panel port null protocol null query null search null slashes null _parsedUrl Name Value _raw /express-debug-panel auth null hash null host null hostname null href /express-debug-panel path /express-debug-panel pathname /express-debug-panel port null protocol null query null search null slashes null _readableState Name Value autoDestroy true awaitDrainWriters null buffer (Object) closeEmitted false closed false constructed true dataEmitted false decoder null defaultEncoding utf8 destroyed false emitClose true emittedReadable false encoding null endEmitted false ended true errorEmitted false errored null flowing null highWaterMark 16384 length 0 multiAwaitDrain false needReadable false objectMode false pipes (Object) readableListening false reading false readingMore true resumeScheduled false sync true _remoteAddress 3.22.51.241 _startAt Name Value 0 1809613 1 276079573 _startTime Name Value aborted false baseUrl body Name Value client Name Value _events (Object) _eventsCount 8 _hadError false _host null _httpMessage (Object) _maxListeners undefined _parent null _paused false _peername (Object) _pendingData null _pendingEncoding _readableState (Object) _server (Object) _sockname null _writableState (Object) addListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
allowHalfOpen true connecting false on function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
parser (Object) prependListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
server (Object) setEncoding function socketSetEncoding() { throw new ERR_HTTP_SOCKET_ENCODING(); }
complete true cookies Name Value httpVersion 1.1 httpVersionMajor 1 httpVersionMinor 1 method GET next function next(err) { var layerError = err === 'route' ? null : err; // remove added slash if (slashAdded) { req.url = req.url.substr(1); slashAdded = false; } // restore altered req.url if (removed.length !== 0) { req.baseUrl = parentUrl; req.url = protohost + removed + req.url.substr(protohost.length); removed = ''; } // signal to exit router if (layerError === 'router') { setImmediate(done, null) return } // no more matching layers if (idx >= stack.length) { setImmediate(done, layerError); return; } // get pathname of request var path = getPathname(req); if (path == null) { return done(layerError); } // find next matching layer var layer; var match; var route; while (match !== true && idx < stack.length) { layer = stack[idx++]; match = matchLayer(layer, path); route = layer.route; if (typeof match !== 'boolean') { // hold on to layerError layerError = layerError || match; } if (match !== true) { continue; } if (!route) { // process non-route handlers normally continue; } if (layerError) { // routes do not match with a pending error match = false; continue; } var method = req.method; var has_method = route._handles_method(method); // build up automatic options response if (!has_method && method === 'OPTIONS') { appendMethods(options, route._options()); } // don't even bother matching route if (!has_method && method !== 'HEAD') { match = false; continue; } } // no match if (match !== true) { return done(layerError); } // store route for dispatch on change if (route) { req.route = route; } // Capture one-time layer values req.params = self.mergeParams ? mergeParams(layer.params, parentParams) : layer.params; var layerPath = layer.path; // this should be done for the layer self.process_params(layer, paramcalled, req, res, function (err) { if (err) { return next(layerError || err); } if (route) { return layer.handle_request(req, res, next); } trim_prefix(layer, layerError, layerPath, path); }); }
originalUrl /express-debug-panel params Name Value query Name Value rawHeaders Name Value 0 Host 1 demo.finitewisdom.com 10 X-Request-Id 11 ff7d3129-4a3c-4332-badb-6a212ddada0e 12 X-Forwarded-For 13 3.22.51.241 14 X-Forwarded-Proto 15 https 16 X-Forwarded-Port 17 443 18 Via 19 1.1 vegur 2 Connection 20 Connect-Time 21 0 22 X-Request-Start 23 1715883551764 24 Total-Route-Time 25 0 3 close 4 Accept 5 */* 6 User-Agent 7 Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) 8 Accept-Encoding 9 gzip, br, zstd, deflate rawTrailers Name Value res Name Value _closed false _contentLength null _defaultKeepAlive true _events (Object) _eventsCount 1 _expect_continue false _hasBody true _header null _headerSent false _keepAliveTimeout 5000 _last false _maxListeners undefined _onPendingData function () { [native code] }
_removedConnection false _removedContLen false _removedTE false _sent100 false _startAt undefined _startTime undefined _trailer chunkedEncoding false destroyed false end function end(chunk, encoding) { if (ended) { return false; } ended = true; var ret; var sync = true; function writeend() { if (sync) { ret = _end.call(res, chunk, encoding); sync = false; return; } _end.call(res); } function writetop() { if (!sync) { return ret; } if (chunk == null) { ret = true; return ret; } var contentLength = Number(res.getHeader('Content-Length')); if (!isNaN(contentLength) && contentLength > 0) { // measure chunk chunk = !Buffer.isBuffer(chunk) ? Buffer.from(chunk, encoding) : chunk; encoding = undefined; if (chunk.length !== 0) { debug('split response'); ret = _write.call(res, chunk.slice(0, chunk.length - 1)); chunk = chunk.slice(chunk.length - 1, chunk.length); return ret; } } ret = _write.call(res, chunk, encoding); sync = false; return ret; } if (shouldDestroy(req)) { // destroy session debug('destroying'); store.destroy(req.sessionID, function ondestroy(err) { if (err) { defer(next, err); } debug('destroyed'); writeend(); }); return writetop(); } // no session to save if (!req.session) { debug('no session'); return _end.call(res, chunk, encoding); } if (!touched) { // touch session req.session.touch() touched = true } if (shouldSave(req)) { req.session.save(function onsave(err) { if (err) { defer(next, err); } writeend(); }); return writetop(); } else if (storeImplementsTouch && shouldTouch(req)) { // store implements touch method debug('touching'); store.touch(req.sessionID, req.session, function ontouch(err) { if (err) { defer(next, err); } debug('touched'); writeend(); }); return writetop(); } return _end.call(res, chunk, encoding); }
finished false locals (Object) maxRequestsOnConnectionReached false outputData (Object) outputSize 0 req (Object) sendDate true shouldKeepAlive false socket (Object) useChunkedEncodingByDefault true writable true writeHead function writeHead (statusCode) { // set headers from arguments var args = setWriteHeadHeaders.apply(this, arguments) // fire listener if (!fired) { fired = true listener.call(this) // pass-along an updated status code if (typeof args[0] === 'number' && this.statusCode !== args[0]) { args[0] = this.statusCode args.length = 1 } } return prevWriteHead.apply(this, args) }
route Name Value methods (Object) path /express-debug-panel stack (Object) secret undefined session Name Value cookie (Object) sessionID aU4uM4A7AOspAoe-zymBBVRPipAD3PUS sessionStore Name Value _events (Object) _eventsCount 2 _maxListeners undefined errorLog function () { [native code] }
generate function(req){ req.sessionID = generateId(req); req.session = new Session(req); req.session.cookie = new Cookie(cookieOptions); if (cookieOptions.secure === 'auto') { req.session.cookie.secure = issecure(req, trustProxy); } }
ownsPg false pool (Object) pruneSessionInterval 900000 pruneSessionRandomizedInterval delay => Math.ceil(delay / 2 + delay * Math.random())
pruneTimer (Object) schemaName demo tableName session ttl undefined signedCookies Name Value socket Name Value _events (Object) _eventsCount 8 _hadError false _host null _httpMessage (Object) _maxListeners undefined _parent null _paused false _peername (Object) _pendingData null _pendingEncoding _readableState (Object) _server (Object) _sockname null _writableState (Object) addListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
allowHalfOpen true connecting false on function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
parser (Object) prependListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
server (Object) setEncoding function socketSetEncoding() { throw new ERR_HTTP_SOCKET_ENCODING(); }
statusCode null statusMessage null upgrade false url /express-debug-panel -
Name Value _closed false _contentLength null _defaultKeepAlive true _events Name Value finish function () { [native code] }
_eventsCount 1 _expect_continue false _hasBody true _header null _headerSent false _keepAliveTimeout 5000 _last false _maxListeners undefined _onPendingData function () { [native code] }
_removedConnection false _removedContLen false _removedTE false _sent100 false _startAt undefined _startTime undefined _trailer chunkedEncoding false destroyed false end function end(chunk, encoding) { if (ended) { return false; } ended = true; var ret; var sync = true; function writeend() { if (sync) { ret = _end.call(res, chunk, encoding); sync = false; return; } _end.call(res); } function writetop() { if (!sync) { return ret; } if (chunk == null) { ret = true; return ret; } var contentLength = Number(res.getHeader('Content-Length')); if (!isNaN(contentLength) && contentLength > 0) { // measure chunk chunk = !Buffer.isBuffer(chunk) ? Buffer.from(chunk, encoding) : chunk; encoding = undefined; if (chunk.length !== 0) { debug('split response'); ret = _write.call(res, chunk.slice(0, chunk.length - 1)); chunk = chunk.slice(chunk.length - 1, chunk.length); return ret; } } ret = _write.call(res, chunk, encoding); sync = false; return ret; } if (shouldDestroy(req)) { // destroy session debug('destroying'); store.destroy(req.sessionID, function ondestroy(err) { if (err) { defer(next, err); } debug('destroyed'); writeend(); }); return writetop(); } // no session to save if (!req.session) { debug('no session'); return _end.call(res, chunk, encoding); } if (!touched) { // touch session req.session.touch() touched = true } if (shouldSave(req)) { req.session.save(function onsave(err) { if (err) { defer(next, err); } writeend(); }); return writetop(); } else if (storeImplementsTouch && shouldTouch(req)) { // store implements touch method debug('touching'); store.touch(req.sessionID, req.session, function ontouch(err) { if (err) { defer(next, err); } debug('touched'); writeend(); }); return writetop(); } return _end.call(res, chunk, encoding); }
finished false locals Name Value maxRequestsOnConnectionReached false outputData Name Value outputSize 0 req Name Value _consuming false _dumped false _events (Object) _eventsCount 1 _maxListeners undefined _parsedOriginalUrl (Object) _parsedUrl (Object) _readableState (Object) _remoteAddress 3.22.51.241 _startAt (Object) _startTime (Object) aborted false baseUrl body (Object) client (Object) complete true cookies (Object) httpVersion 1.1 httpVersionMajor 1 httpVersionMinor 1 method GET next function next(err) { var layerError = err === 'route' ? null : err; // remove added slash if (slashAdded) { req.url = req.url.substr(1); slashAdded = false; } // restore altered req.url if (removed.length !== 0) { req.baseUrl = parentUrl; req.url = protohost + removed + req.url.substr(protohost.length); removed = ''; } // signal to exit router if (layerError === 'router') { setImmediate(done, null) return } // no more matching layers if (idx >= stack.length) { setImmediate(done, layerError); return; } // get pathname of request var path = getPathname(req); if (path == null) { return done(layerError); } // find next matching layer var layer; var match; var route; while (match !== true && idx < stack.length) { layer = stack[idx++]; match = matchLayer(layer, path); route = layer.route; if (typeof match !== 'boolean') { // hold on to layerError layerError = layerError || match; } if (match !== true) { continue; } if (!route) { // process non-route handlers normally continue; } if (layerError) { // routes do not match with a pending error match = false; continue; } var method = req.method; var has_method = route._handles_method(method); // build up automatic options response if (!has_method && method === 'OPTIONS') { appendMethods(options, route._options()); } // don't even bother matching route if (!has_method && method !== 'HEAD') { match = false; continue; } } // no match if (match !== true) { return done(layerError); } // store route for dispatch on change if (route) { req.route = route; } // Capture one-time layer values req.params = self.mergeParams ? mergeParams(layer.params, parentParams) : layer.params; var layerPath = layer.path; // this should be done for the layer self.process_params(layer, paramcalled, req, res, function (err) { if (err) { return next(layerError || err); } if (route) { return layer.handle_request(req, res, next); } trim_prefix(layer, layerError, layerPath, path); }); }
originalUrl /express-debug-panel params (Object) query (Object) rawHeaders (Object) rawTrailers (Object) res (Object) route (Object) secret undefined session (Object) sessionID aU4uM4A7AOspAoe-zymBBVRPipAD3PUS sessionStore (Object) signedCookies (Object) socket (Object) statusCode null statusMessage null upgrade false url /express-debug-panel sendDate true shouldKeepAlive false socket Name Value _events (Object) _eventsCount 8 _hadError false _host null _httpMessage (Object) _maxListeners undefined _parent null _paused false _peername (Object) _pendingData null _pendingEncoding _readableState (Object) _server (Object) _sockname null _writableState (Object) addListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
allowHalfOpen true connecting false on function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
parser (Object) prependListener function socketListenerWrap(ev, fn) { const res = net.Socket.prototype[originalFnName].call(this, ev, fn); if (!this.parser) { this.on = net.Socket.prototype.on; this.addListener = net.Socket.prototype.addListener; this.prependListener = net.Socket.prototype.prependListener; return res; } if (ev === 'data' || ev === 'readable') unconsume(this.parser, this); return res; }
server (Object) setEncoding function socketSetEncoding() { throw new ERR_HTTP_SOCKET_ENCODING(); }
useChunkedEncodingByDefault true writable true writeHead function writeHead (statusCode) { // set headers from arguments var args = setWriteHeadHeaders.apply(this, arguments) // fire listener if (!fired) { fired = true listener.call(this) // pass-along an updated status code if (typeof args[0] === 'number' && this.statusCode !== args[0]) { args[0] = this.statusCode args.length = 1 } } return prevWriteHead.apply(this, args) }
-
Name Value accept */* accept-encoding gzip, br, zstd, deflate connect-time 0 connection close host demo.finitewisdom.com total-route-time 0 user-agent Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) via 1.1 vegur x-forwarded-for 3.22.51.241 x-forwarded-port 443 x-forwarded-proto https x-request-id ff7d3129-4a3c-4332-badb-6a212ddada0e x-request-start 1715883551764 -
Object is empty.
-
Object is empty.
-
Name Value _debugEnd function _debugEnd() { [native code] }
_debugProcess function _debugProcess() { [native code] }
_disconnect function() { assert(this.channel); // This marks the fact that the channel is actually disconnected. this.channel = null; this[kChannelHandle] = null; if (this._pendingMessage) closePendingHandle(this); let fired = false; function finish() { if (fired) return; fired = true; channel.close(); target.emit('disconnect'); } // If a message is being read, then wait for it to complete. if (channel.buffering) { this.once('message', finish); this.once('internalMessage', finish); return; } process.nextTick(finish); }
_events Name Value disconnect function () { [native code] }
error (code, signal) => this.emit('error', code, signal)
internalMessage Name Value 0 function(message, handle) { // Once acknowledged - continue sending handles. if (message.cmd === 'NODE_HANDLE_ACK' || message.cmd === 'NODE_HANDLE_NACK') { if (target._pendingMessage) { if (message.cmd === 'NODE_HANDLE_ACK') { closePendingHandle(target); } else if (target._pendingMessage.retransmissions++ === MAX_HANDLE_RETRANSMISSIONS) { closePendingHandle(target); process.emitWarning('Handle did not reach the receiving process ' + 'correctly', 'SentHandleNotReceivedWarning'); } } assert(ArrayIsArray(target._handleQueue)); const queue = target._handleQueue; target._handleQueue = null; if (target._pendingMessage) { target._send(target._pendingMessage.message, target._pendingMessage.handle, target._pendingMessage.options, target._pendingMessage.callback); } for (let i = 0; i < queue.length; i++) { const args = queue[i]; target._send(args.message, args.handle, args.options, args.callback); } // Process a pending disconnect (if any). if (!target.connected && target.channel && !target._handleQueue) target._disconnect(); return; } if (message.cmd !== 'NODE_HANDLE') return; // It is possible that the handle is not received because of some error on // ancillary data reception such as MSG_CTRUNC. In this case, report the // sender about it by sending a NODE_HANDLE_NACK message. if (!handle) return target._send({ cmd: 'NODE_HANDLE_NACK' }, null, true); // Acknowledge handle receival. Don't emit error events (for example if // the other side has disconnected) because this call to send() is not // initiated by the user and it shouldn't be fatal to be unable to ACK // a message. target._send({ cmd: 'NODE_HANDLE_ACK' }, null, true); const obj = handleConversion[message.type]; // Update simultaneous accepts on Windows if (process.platform === 'win32') { handle.setSimultaneousAccepts(false); } // Convert handle object obj.got.call(this, message, handle, (handle) => { handleMessage(message.msg, handle, isInternal(message.msg)); }); }
1 function onInternalMessage(message, handle) { if (message.cmd !== 'NODE_CLUSTER') return; let fn = cb; if (message.ack !== undefined) { const callback = callbacks.get(message.ack); if (callback !== undefined) { fn = callback; callbacks.delete(message.ack); } } ReflectApply(fn, worker, arguments); }
message (message, handle) => this.emit('message', message, handle)
newListener Name Value 0 function startListeningIfSignal(type) { if (isSignal(type) && !signalWraps.has(type)) { if (Signal === undefined) Signal = internalBinding('signal_wrap').Signal; const wrap = new Signal(); wrap.unref(); wrap.onsignal = FunctionPrototypeBind(process.emit, process, type, type); const signum = signals[type]; const err = wrap.start(signum); if (err) { wrap.close(); throw errnoException(err, 'uv_signal_start'); } signalWraps.set(type, wrap); } }
1 function onNewListener(name) { if (name === 'message' || name === 'disconnect') control.refCounted(); }
removeListener Name Value 0 function stopListeningIfSignal(type) { const wrap = signalWraps.get(type); if (wrap !== undefined && process.listenerCount(type) === 0) { wrap.close(); signalWraps.delete(type); } }
1 function onRemoveListener(name) { if (name === 'message' || name === 'disconnect') control.unrefCounted(); }
warning function onWarning(warning) { if (!(warning instanceof Error)) return; const isDeprecation = warning.name === 'DeprecationWarning'; if (isDeprecation && process.noDeprecation) return; const trace = process.traceProcessWarnings || (isDeprecation && process.traceDeprecation); let msg = `(${process.release.name}:${process.pid}) `; if (warning.code) msg += `[${warning.code}] `; if (trace && warning.stack) { msg += `${warning.stack}`; } else { msg += typeof warning.toString === 'function' ? `${warning.toString()}` : ErrorPrototypeToString(warning); } if (typeof warning.detail === 'string') { msg += `\n${warning.detail}`; } if (!trace && !traceWarningHelperShown) { const flag = isDeprecation ? '--trace-deprecation' : '--trace-warnings'; const argv0 = require('path').basename(process.argv0 || 'node', '.exe'); msg += `\n(Use \`${argv0} ${flag} ...\` to show where the warning ` + 'was created)'; traceWarningHelperShown = true; } const warningFile = lazyOption(); if (warningFile) { return writeToFile(msg); } writeOut(msg); }
_eventsCount 7 _exiting false _fatalException (er, fromPromise) => { // It's possible that defaultTriggerAsyncId was set for a constructor // call that threw and was never cleared. So clear it now. clearDefaultTriggerAsyncId(); // If diagnostic reporting is enabled, call into its handler to see // whether it is interested in handling the situation. // Ignore if the error is scoped inside a domain. // use == in the checks as we want to allow for null and undefined if (er == null || er.domain == null) { try { const report = internalBinding('report'); if (report != null && report.shouldReportOnUncaughtException()) { report.writeReport( typeof er?.message === 'string' ? er.message : 'Exception', 'Exception', null, er ?? {}); } } catch {} // Ignore the exception. Diagnostic reporting is unavailable. } const type = fromPromise ? 'unhandledRejection' : 'uncaughtException'; process.emit('uncaughtExceptionMonitor', er, type); if (exceptionHandlerState.captureFn !== null) { exceptionHandlerState.captureFn(er); } else if (!process.emit('uncaughtException', er, type)) { // If someone handled it, then great. Otherwise, die in C++ land // since that means that we'll exit the process, emit the 'exit' event. try { if (!process._exiting) { process._exiting = true; process.exitCode = 1; process.emit('exit', 1); } } catch { // Nothing to be done about it at this point. } return false; } // If we handled an error, then make sure any ticks get processed // by ensuring that the next Immediate cycle isn't empty. require('timers').setImmediate(noop); // Emit the after() hooks now that the exception has been handled. if (afterHooksExist()) { do { emitAfter(executionAsyncId()); } while (hasAsyncIdStack()); } // And completely empty the id stack, including anything that may be // cached on the native side. clearAsyncIdStack(); return true; }
_getActiveHandles function _getActiveHandles() { [native code] }
_getActiveRequests function _getActiveRequests() { [native code] }
_handleQueue null _kill function _kill() { [native code] }
_linkedBinding function _linkedBinding(module) { module = String(module); let mod = bindingObj[module]; if (typeof mod !== 'object') mod = bindingObj[module] = getLinkedBinding(module); return mod; }
_maxListeners undefined _pendingMessage null _preload_modules Name Value _rawDebug function _rawDebug(...args) { binding._rawDebug(ReflectApply(format, null, args)); }
_send function(message, handle, options, callback) { assert(this.connected || this.channel); if (message === undefined) throw new ERR_MISSING_ARGS('message'); // Non-serializable messages should not reach the remote // end point; as any failure in the stringification there // will result in error message that is weakly consumable. // So perform a final check on message prior to sending. if (typeof message !== 'string' && typeof message !== 'object' && typeof message !== 'number' && typeof message !== 'boolean') { throw new ERR_INVALID_ARG_TYPE( 'message', ['string', 'object', 'number', 'boolean'], message); } // Support legacy function signature if (typeof options === 'boolean') { options = { swallowErrors: options }; } let obj; // Package messages with a handle object if (handle) { // This message will be handled by an internalMessage event handler message = { cmd: 'NODE_HANDLE', type: null, msg: message }; if (handle instanceof net.Socket) { message.type = 'net.Socket'; } else if (handle instanceof net.Server) { message.type = 'net.Server'; } else if (handle instanceof TCP || handle instanceof Pipe) { message.type = 'net.Native'; } else if (handle instanceof dgram.Socket) { message.type = 'dgram.Socket'; } else if (handle instanceof UDP) { message.type = 'dgram.Native'; } else { throw new ERR_INVALID_HANDLE_TYPE(); } // Queue-up message and handle if we haven't received ACK yet. if (this._handleQueue) { ArrayPrototypePush(this._handleQueue, { callback: callback, handle: handle, options: options, message: message.msg, }); return this._handleQueue.length === 1; } obj = handleConversion[message.type]; // convert TCP object to native handle object handle = ReflectApply(handleConversion[message.type].send, target, [message, handle, options]); // If handle was sent twice, or it is impossible to get native handle // out of it - just send a text without the handle. if (!handle) message = message.msg; // Update simultaneous accepts on Windows if (obj.simultaneousAccepts && process.platform === 'win32') { handle.setSimultaneousAccepts(true); } } else if (this._handleQueue && !(message && (message.cmd === 'NODE_HANDLE_ACK' || message.cmd === 'NODE_HANDLE_NACK'))) { // Queue request anyway to avoid out-of-order messages. ArrayPrototypePush(this._handleQueue, { callback: callback, handle: null, options: options, message: message, }); return this._handleQueue.length === 1; } const req = new WriteWrap(); const err = writeChannelMessage(channel, req, message, handle); const wasAsyncWrite = streamBaseState[kLastWriteWasAsync]; if (err === 0) { if (handle) { if (!this._handleQueue) this._handleQueue = []; if (obj && obj.postSend) obj.postSend(message, handle, options, callback, target); } if (wasAsyncWrite) { req.oncomplete = () => { control.unrefCounted(); if (typeof callback === 'function') callback(null); }; control.refCounted(); } else if (typeof callback === 'function') { process.nextTick(callback, null); } } else { // Cleanup handle on error if (obj && obj.postSend) obj.postSend(message, handle, options, callback); if (!options.swallowErrors) { const ex = errnoException(err, 'write'); if (typeof callback === 'function') { process.nextTick(callback, ex); } else { process.nextTick(() => this.emit('error', ex)); } } } /* If the primary is > 2 read() calls behind, please stop sending. */ return channel.writeQueueSize < (65536 * 2); }
_startProfilerIdleNotifier () => {}
_stopProfilerIdleNotifier () => {}
_tickCallback function runNextTicks() { if (!hasTickScheduled() && !hasRejectionToWarn()) runMicrotasks(); if (!hasTickScheduled() && !hasRejectionToWarn()) return; processTicksAndRejections(); }
abort function abort() { [native code] }
allowedNodeEnvironmentFlags Name Value arch x64 argv Name Value 0 /app/.heroku/node/bin/node 1 /app/bin/www argv0 /app/.heroku/node/bin/node assert function deprecated(...args) { if (!warned) { warned = true; if (code !== undefined) { if (!codesWarned.has(code)) { process.emitWarning(msg, 'DeprecationWarning', code, deprecated); codesWarned.add(code); } } else { process.emitWarning(msg, 'DeprecationWarning', deprecated); } } if (new.target) { return ReflectConstruct(fn, args, new.target); } return ReflectApply(fn, this, args); }
binding function binding(module) { module = String(module); // Deprecated specific process.binding() modules, but not all, allow // selective fallback to internalBinding for the deprecated ones. if (internalBindingAllowlist.has(module)) { if (runtimeDeprecatedList.has(module)) { runtimeDeprecatedList.delete(module); process.emitWarning( `Access to process.binding('${module}') is deprecated.`, 'DeprecationWarning', 'DEP0111'); } if (legacyWrapperList.has(module)) { return nativeModuleRequire('internal/legacy/processbinding')[module](); } return internalBinding(module); } // eslint-disable-next-line no-restricted-syntax throw new Error(`No such module: ${module}`); }
channel Name Value _events Name Value _eventsCount 0 _maxListeners undefined chdir function wrappedChdir(directory) { validateString(directory, 'directory'); rawMethods.chdir(directory); // Mark cache that it requires an update. cachedCwd = ''; }
config Name Value target_defaults Name Value cflags (Object) default_configuration Release defines (Object) include_dirs (Object) libraries (Object) variables Name Value asan 0 coverage false dcheck_always_on 0 debug_nghttp2 false debug_node false enable_lto false enable_pgo_generate false enable_pgo_use false error_on_warn false force_dynamic_crt 0 gas_version 2.30 host_arch x64 icu_data_in ../../deps/icu-tmp/icudt69l.dat icu_endianness l icu_gyp_path tools/icu/icu-generic.gyp icu_path deps/icu-small icu_small false icu_ver_major 69 is_debug 0 llvm_version 0.0 napi_build_version 8 node_byteorder little node_debug_lib false node_enable_d8 false node_install_npm true node_library_files (Object) node_module_version 93 node_no_browser_globals false node_prefix / node_release_urlbase https://nodejs.org/download/release/ node_section_ordering_info node_shared false node_shared_brotli false node_shared_cares false node_shared_http_parser false node_shared_libuv false node_shared_nghttp2 false node_shared_nghttp3 false node_shared_ngtcp2 false node_shared_openssl false node_shared_zlib false node_tag node_target_type executable node_use_bundled_v8 true node_use_dtrace false node_use_etw false node_use_node_code_cache true node_use_node_snapshot true node_use_openssl true node_use_v8_platform true node_with_ltcg false node_without_node_options false openssl_fips openssl_is_fips false openssl_quic true ossfuzz false shlib_suffix so.93 target_arch x64 v8_enable_31bit_smis_on_64bit_arch 0 v8_enable_gdbjit 0 v8_enable_i18n_support 1 v8_enable_inspector 1 v8_enable_lite_mode 0 v8_enable_object_print 1 v8_enable_pointer_compression 0 v8_enable_webassembly 1 v8_no_strict_aliasing 1 v8_optimized_debug 1 v8_promise_internal_field_count 1 v8_random_seed 0 v8_trace_maps 0 v8_use_siphash 1 want_separate_host_toolset 0 connected true cpuUsage function cpuUsage(prevValue) { // If a previous value was passed in, ensure it has the correct shape. if (prevValue) { if (!previousValueIsValid(prevValue.user)) { validateObject(prevValue, 'prevValue'); validateNumber(prevValue.user, 'prevValue.user'); throw new ERR_INVALID_ARG_VALUE.RangeError('prevValue.user', prevValue.user); } if (!previousValueIsValid(prevValue.system)) { validateNumber(prevValue.system, 'prevValue.system'); throw new ERR_INVALID_ARG_VALUE.RangeError('prevValue.system', prevValue.system); } } // Call the native function to get the current values. _cpuUsage(cpuValues); // If a previous value was passed in, return diff of current from previous. if (prevValue) { return { user: cpuValues[0] - prevValue.user, system: cpuValues[1] - prevValue.system }; } // If no previous value passed in, return current value. return { user: cpuValues[0], system: cpuValues[1] }; }
cwd function wrappedCwd() { if (cachedCwd === '') cachedCwd = rawMethods.cwd(); return cachedCwd; }
debugPort 9229 disconnect function() { if (!this.connected) { this.emit('error', new ERR_IPC_DISCONNECTED()); return; } // Do not allow any new messages to be written. this.connected = false; // If there are no queued messages, disconnect immediately. Otherwise, // postpone the disconnect so that it happens internally after the // queue is flushed. if (!this._handleQueue) this._disconnect(); }
dlopen function dlopen() { [native code] }
domain null emitWarning function emitWarning(warning, type, code, ctor) { let detail; if (type !== null && typeof type === 'object' && !ArrayIsArray(type)) { ctor = type.ctor; code = type.code; if (typeof type.detail === 'string') detail = type.detail; type = type.type || 'Warning'; } else if (typeof type === 'function') { ctor = type; code = undefined; type = 'Warning'; } if (type !== undefined) validateString(type, 'type'); if (typeof code === 'function') { ctor = code; code = undefined; } else if (code !== undefined) { validateString(code, 'code'); } if (typeof warning === 'string') { warning = createWarningObject(warning, type, code, ctor, detail); } else if (!(warning instanceof Error)) { throw new ERR_INVALID_ARG_TYPE('warning', ['Error', 'string'], warning); } if (warning.name === 'DeprecationWarning') { if (process.noDeprecation) return; if (process.throwDeprecation) { // Delay throwing the error to guarantee that all former warnings were // properly logged. return process.nextTick(() => { throw warning; }); } } process.nextTick(doEmitWarning, warning); }
env Name Value COLOR 0 DEBUG general,carlton,gitkraken,harvest,vpic,zendesk,query-results,saml20,automation,shortener DEBUG_HIDE_DATE 1 DYNO web.1 EDITOR vi HOME /app INIT_CWD /app MEMORY_AVAILABLE 512 NODE /app/.heroku/node/bin/node NODE_ENV production NODE_HOME /app/.heroku/node PATH /app/node_modules/.bin:/node_modules/.bin:/app/.heroku/node/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/app/.heroku/node/bin:/app/.heroku/yarn/bin:/usr/local/bin:/usr/bin:/bin:/app/bin:/app/node_modules/.bin PGSSLMODE no-verify PORT 23976 PS1 \[\033[01;34m\]\w\[\033[00m\] \[\033[01;32m\]$ \[\033[00m\] PWD /app SHLVL 0 WEB_CONCURRENCY 1 WEB_MEMORY 512 _ /app/.heroku/node/bin/npm npm_command start npm_config_cache /app/.npm npm_config_global_prefix /app/.heroku/node npm_config_globalconfig /app/.heroku/node/etc/npmrc npm_config_init_module /app/.npm-init.js npm_config_local_prefix /app npm_config_metrics_registry https://registry.npmjs.org/ npm_config_node_gyp /app/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js npm_config_noproxy npm_config_prefix /app/.heroku/node npm_config_user_agent npm/8.1.2 node/v16.13.2 linux x64 workspaces/false npm_config_userconfig /app/.npmrc npm_execpath /app/.heroku/node/lib/node_modules/npm/bin/npm-cli.js npm_lifecycle_event start npm_lifecycle_script node ./bin/www npm_node_execpath /app/.heroku/node/bin/node npm_package_engines_node 16.13.2 npm_package_engines_npm 8.1.2 npm_package_json /app/package.json npm_package_name finite-demo npm_package_version 0.0.1 workerIndex 1 execArgv Name Value execPath /app/.heroku/node/bin/node exit function exit(code) { if (code || code === 0) process.exitCode = code; if (!process._exiting) { process._exiting = true; process.emit('exit', process.exitCode || 0); } // FIXME(joyeecheung): This is an undocumented API that gets monkey-patched // in the user land. Either document it, or deprecate it in favor of a // better public alternative. process.reallyExit(process.exitCode || 0); }
features Name Value cached_builtins true debug false inspector true ipv6 true tls true tls_alpn true tls_ocsp true tls_sni true uv true getegid function getegid() { [native code] }
geteuid function geteuid() { [native code] }
getgid function getgid() { [native code] }
getgroups function getgroups() { [native code] }
getuid function getuid() { [native code] }
hasUncaughtExceptionCaptureCallback function hasUncaughtExceptionCaptureCallback() { return exceptionHandlerState.captureFn !== null; }
hrtime function hrtime(time) { _hrtime.hrtime(); if (time !== undefined) { validateArray(time, 'time'); if (time.length !== 2) { throw new ERR_OUT_OF_RANGE('time', 2, time.length); } const sec = (hrValues[0] * 0x100000000 + hrValues[1]) - time[0]; const nsec = hrValues[2] - time[1]; const needsBorrow = nsec < 0; return [needsBorrow ? sec - 1 : sec, needsBorrow ? nsec + 1e9 : nsec]; } return [ hrValues[0] * 0x100000000 + hrValues[1], hrValues[2], ]; }
initgroups function initgroups(user, extraGroup) { validateId(user, 'user'); validateId(extraGroup, 'extraGroup'); // Result is 0 on success, 1 if user is unknown, 2 if group is unknown. const result = _initgroups(user, extraGroup); if (result === 1) { throw new ERR_UNKNOWN_CREDENTIAL('User', user); } else if (result === 2) { throw new ERR_UNKNOWN_CREDENTIAL('Group', extraGroup); } }
kill function kill(pid, sig) { let err; // eslint-disable-next-line eqeqeq if (pid != (pid | 0)) { throw new ERR_INVALID_ARG_TYPE('pid', 'number', pid); } // Preserve null signal if (sig === (sig | 0)) { // XXX(joyeecheung): we have to use process._kill here because // it's monkey-patched by tests. err = process._kill(pid, sig); } else { sig = sig || 'SIGTERM'; if (constants[sig]) { err = process._kill(pid, constants[sig]); } else { throw new ERR_UNKNOWN_SIGNAL(sig); } } if (err) throw errnoException(err, 'kill'); return true; }
mainModule Name Value children Name Value 0 (Object) 1 (Object) exports Name Value filename /app/bin/www id . loaded true path /app/bin paths Name Value 0 /app/bin/node_modules 1 /app/node_modules 2 /node_modules memoryUsage function memoryUsage() { _memoryUsage(memValues); return { rss: memValues[0], heapTotal: memValues[1], heapUsed: memValues[2], external: memValues[3], arrayBuffers: memValues[4] }; }
moduleLoadList Name Value 0 Internal Binding native_module 1 Internal Binding errors 10 NativeModule internal/validators 100 Internal Binding stream_wrap 101 NativeModule internal/stream_base_commons 102 NativeModule internal/heap_utils 103 Internal Binding v8 104 NativeModule v8 105 Internal Binding contextify 106 NativeModule vm 107 NativeModule internal/idna 108 NativeModule url 109 NativeModule internal/process/signal 11 Internal Binding icu 110 Internal Binding options 111 NativeModule internal/options 112 NativeModule internal/bootstrap/pre_execution 113 NativeModule internal/inspector_async_hook 114 Internal Binding report 115 NativeModule internal/process/report 116 Internal Binding pipe_wrap 117 NativeModule internal/net 118 Internal Binding tcp_wrap 119 NativeModule internal/dtrace 12 NativeModule internal/util/inspect 120 NativeModule net 121 Internal Binding udp_wrap 122 NativeModule internal/dgram 123 NativeModule dgram 124 Internal Binding process_wrap 125 Internal Binding tty_wrap 126 NativeModule internal/socket_list 127 Internal Binding spawn_sync 128 NativeModule internal/child_process 129 NativeModule child_process 13 NativeModule events 130 NativeModule internal/child_process/serialization 131 NativeModule internal/cluster/worker 132 NativeModule internal/cluster/utils 133 NativeModule internal/cluster/child 134 NativeModule cluster 135 NativeModule internal/util/iterable_weak_map 136 NativeModule internal/modules/cjs/helpers 137 NativeModule internal/source_map/source_map_cache 138 NativeModule internal/modules/package_json_reader 139 Internal Binding module_wrap 14 Internal Binding buffer 140 NativeModule internal/modules/esm/module_job 141 NativeModule internal/modules/esm/module_map 142 NativeModule internal/modules/esm/get_format 143 NativeModule internal/modules/esm/resolve 144 NativeModule internal/fs/rimraf 145 NativeModule internal/fs/promises 146 NativeModule internal/modules/esm/get_source 147 NativeModule internal/modules/esm/create_dynamic_module 148 NativeModule internal/modules/esm/translators 149 NativeModule internal/modules/esm/load 15 Internal Binding string_decoder 150 NativeModule internal/modules/esm/loader 151 NativeModule internal/vm/module 152 NativeModule internal/process/esm_loader 153 NativeModule internal/modules/cjs/loader 154 NativeModule internal/modules/run_main 155 NativeModule internal/fs/streams 156 Internal Binding os 157 NativeModule os 158 Internal Binding crypto 159 NativeModule internal/crypto/random 16 NativeModule internal/buffer 160 NativeModule internal/crypto/hashnames 161 NativeModule internal/crypto/util 162 NativeModule internal/crypto/pbkdf2 163 NativeModule internal/crypto/scrypt 164 NativeModule internal/crypto/keys 165 NativeModule internal/crypto/hkdf 166 NativeModule internal/crypto/keygen 167 NativeModule internal/crypto/diffiehellman 168 NativeModule internal/streams/lazy_transform 169 NativeModule internal/crypto/cipher 17 Internal Binding blob 170 NativeModule internal/crypto/sig 171 NativeModule internal/crypto/hash 172 NativeModule internal/crypto/x509 173 NativeModule internal/crypto/certificate 174 NativeModule crypto 175 NativeModule internal/crypto/webcrypto 176 NativeModule internal/tty 177 NativeModule tty 178 NativeModule _http_agent 179 Internal Binding http_parser 18 NativeModule internal/encoding 180 NativeModule internal/freelist 181 NativeModule _http_incoming 182 NativeModule _http_common 183 NativeModule internal/http 184 NativeModule _http_outgoing 185 NativeModule _http_client 186 NativeModule diagnostics_channel 187 NativeModule _http_server 188 NativeModule http 189 Internal Binding block_list 19 Internal Binding symbols 190 NativeModule internal/socketaddress 191 NativeModule internal/blocklist 192 Internal Binding zlib 193 NativeModule zlib 194 Internal Binding cares_wrap 195 NativeModule internal/tls/secure-context 196 NativeModule internal/tls/parse-cert-string 197 NativeModule _tls_common 198 Internal Binding js_stream 199 NativeModule internal/js_stream_socket 2 NativeModule internal/errors 20 Internal Binding messaging 200 Internal Binding tls_wrap 201 NativeModule _tls_wrap 202 NativeModule internal/tls/secure-pair 203 NativeModule tls 204 NativeModule https 205 NativeModule internal/assert/assertion_error 206 NativeModule internal/assert/calltracker 207 NativeModule assert 208 NativeModule internal/dns/utils 209 NativeModule dns 21 NativeModule internal/worker/js_transferable 210 NativeModule internal/dns/promises 22 NativeModule internal/blob 23 NativeModule buffer 24 NativeModule internal/process/per_thread 25 Internal Binding process_methods 26 Internal Binding credentials 27 Internal Binding async_wrap 28 Internal Binding task_queue 29 NativeModule internal/async_hooks 3 Internal Binding config 30 NativeModule async_hooks 31 NativeModule internal/process/promises 32 NativeModule internal/fixed_queue 33 NativeModule internal/process/task_queues 34 Internal Binding trace_events 35 NativeModule internal/constants 36 NativeModule internal/console/constructor 37 NativeModule internal/console/global 38 NativeModule internal/util/inspector 39 Internal Binding inspector 4 Internal Binding constants 40 NativeModule internal/querystring 41 NativeModule path 42 NativeModule querystring 43 Internal Binding url 44 NativeModule internal/url 45 NativeModule internal/util/debuglog 46 NativeModule util 47 Internal Binding performance 48 NativeModule internal/perf/utils 49 NativeModule internal/event_target 5 Internal Binding util 50 NativeModule internal/abort_controller 51 Internal Binding worker 52 NativeModule internal/streams/end-of-stream 53 NativeModule internal/streams/destroy 54 NativeModule internal/streams/legacy 55 NativeModule internal/streams/add-abort-signal 56 NativeModule internal/streams/buffer_list 57 NativeModule internal/streams/state 58 NativeModule string_decoder 59 NativeModule internal/streams/from 6 Internal Binding types 60 NativeModule internal/streams/readable 61 NativeModule internal/streams/writable 62 NativeModule internal/streams/duplex 63 NativeModule internal/streams/utils 64 NativeModule internal/streams/pipeline 65 NativeModule internal/streams/compose 66 NativeModule stream/promises 67 NativeModule internal/streams/transform 68 NativeModule internal/streams/passthrough 69 NativeModule stream 7 NativeModule internal/util 70 NativeModule internal/worker/io 71 Internal Binding timers 72 NativeModule internal/linkedlist 73 NativeModule internal/priority_queue 74 NativeModule internal/timers 75 NativeModule timers 76 NativeModule internal/perf/performance_entry 77 NativeModule internal/perf/observe 78 NativeModule internal/perf/nodetiming 79 NativeModule internal/perf/usertiming 8 NativeModule internal/util/types 80 NativeModule internal/perf/event_loop_utilization 81 NativeModule internal/histogram 82 NativeModule internal/perf/timerify 83 NativeModule internal/perf/performance 84 NativeModule internal/perf/event_loop_delay 85 NativeModule perf_hooks 86 NativeModule internal/process/execution 87 NativeModule internal/process/warning 88 Internal Binding fs 89 NativeModule internal/fs/utils 9 NativeModule internal/assert 90 Internal Binding fs_dir 91 NativeModule internal/fs/dir 92 Internal Binding fs_event_wrap 93 Internal Binding uv 94 NativeModule internal/fs/watchers 95 NativeModule internal/fs/read_file_context 96 NativeModule fs 97 Internal Binding serdes 98 Internal Binding profiler 99 Internal Binding heap_utils nextTick function nextTick(callback) { validateCallback(callback); if (process._exiting) return; let args; switch (arguments.length) { case 1: break; case 2: args = [arguments[1]]; break; case 3: args = [arguments[1], arguments[2]]; break; case 4: args = [arguments[1], arguments[2], arguments[3]]; break; default: args = new Array(arguments.length - 1); for (let i = 1; i < arguments.length; i++) args[i - 1] = arguments[i]; } if (queue.isEmpty()) setHasTickScheduled(true); const asyncId = newAsyncId(); const triggerAsyncId = getDefaultTriggerAsyncId(); const tickObject = { [async_id_symbol]: asyncId, [trigger_async_id_symbol]: triggerAsyncId, callback, args }; if (initHooksExist()) emitInit(asyncId, 'TickObject', triggerAsyncId, tickObject); queue.push(tickObject); }
openStdin function() { process.stdin.resume(); return process.stdin; }
pid 28 platform linux ppid 20 reallyExit function reallyExit() { [native code] }
release Name Value headersUrl https://nodejs.org/download/release/v16.13.2/node-v16.13.2-headers.tar.gz lts Gallium name node sourceUrl https://nodejs.org/download/release/v16.13.2/node-v16.13.2.tar.gz resourceUsage function resourceUsage() { _resourceUsage(resourceValues); return { userCPUTime: resourceValues[0], systemCPUTime: resourceValues[1], maxRSS: resourceValues[2], sharedMemorySize: resourceValues[3], unsharedDataSize: resourceValues[4], unsharedStackSize: resourceValues[5], minorPageFault: resourceValues[6], majorPageFault: resourceValues[7], swappedOut: resourceValues[8], fsRead: resourceValues[9], fsWrite: resourceValues[10], ipcSent: resourceValues[11], ipcReceived: resourceValues[12], signalsCount: resourceValues[13], voluntaryContextSwitches: resourceValues[14], involuntaryContextSwitches: resourceValues[15] }; }
send function(message, handle, options, callback) { if (typeof handle === 'function') { callback = handle; handle = undefined; options = undefined; } else if (typeof options === 'function') { callback = options; options = undefined; } else if (options !== undefined) { validateObject(options, 'options'); } options = { swallowErrors: false, ...options }; if (this.connected) { return this._send(message, handle, options, callback); } const ex = new ERR_IPC_CHANNEL_CLOSED(); if (typeof callback === 'function') { process.nextTick(callback, ex); } else { process.nextTick(() => this.emit('error', ex)); } return false; }
setSourceMapsEnabled function setSourceMapsEnabled(val) { validateBoolean(val, 'val'); const { setSourceMapsEnabled, setPrepareStackTraceCallback } = internalBinding('errors'); setSourceMapsEnabled(val); if (val) { const { prepareStackTrace } = require('internal/source_map/prepare_stack_trace'); setPrepareStackTraceCallback(prepareStackTrace); } else if (sourceMapsEnabled !== undefined) { // Reset prepare stack trace callback only when disabling source maps. const { prepareStackTrace, } = require('internal/errors'); setPrepareStackTraceCallback(prepareStackTrace); } sourceMapsEnabled = val; }
setUncaughtExceptionCaptureCallback function setUncaughtExceptionCaptureCallback(fn) { if (fn === null) { exceptionHandlerState.captureFn = fn; shouldAbortOnUncaughtToggle[0] = 1; process.report.reportOnUncaughtException = exceptionHandlerState.reportFlag; return; } if (typeof fn !== 'function') { throw new ERR_INVALID_ARG_TYPE('fn', ['Function', 'null'], fn); } if (exceptionHandlerState.captureFn !== null) { throw new ERR_UNCAUGHT_EXCEPTION_CAPTURE_ALREADY_SET(); } exceptionHandlerState.captureFn = fn; shouldAbortOnUncaughtToggle[0] = 0; exceptionHandlerState.reportFlag = process.report.reportOnUncaughtException === true; process.report.reportOnUncaughtException = false; }
setegid function(id) { validateId(id, 'id'); if (typeof id === 'number') id |= 0; // Result is 0 on success, 1 if credential is unknown. const result = method(id); if (result === 1) { throw new ERR_UNKNOWN_CREDENTIAL(type, id); } }
seteuid function(id) { validateId(id, 'id'); if (typeof id === 'number') id |= 0; // Result is 0 on success, 1 if credential is unknown. const result = method(id); if (result === 1) { throw new ERR_UNKNOWN_CREDENTIAL(type, id); } }
setgid function(id) { validateId(id, 'id'); if (typeof id === 'number') id |= 0; // Result is 0 on success, 1 if credential is unknown. const result = method(id); if (result === 1) { throw new ERR_UNKNOWN_CREDENTIAL(type, id); } }
setgroups function setgroups(groups) { validateArray(groups, 'groups'); for (let i = 0; i < groups.length; i++) { validateId(groups[i], `groups[${i}]`); } // Result is 0 on success. A positive integer indicates that the // corresponding group was not found. const result = _setgroups(groups); if (result > 0) { throw new ERR_UNKNOWN_CREDENTIAL('Group', groups[result - 1]); } }
setuid function(id) { validateId(id, 'id'); if (typeof id === 'number') id |= 0; // Result is 0 on success, 1 if credential is unknown. const result = method(id); if (result === 1) { throw new ERR_UNKNOWN_CREDENTIAL(type, id); } }
stderr Name Value _destroy function dummyDestroy(err, cb) { cb(err); this._undestroy(); // We need to emit 'close' anyway so that the closing // of the stream is observable. We just make sure we // are not going to do it twice. // The 'close' event is needed so that finished and // pipeline work correctly. if (!this._writableState.emitClose) { process.nextTick(() => { this.emit('close'); }); } }
_events Name Value end function onReadableStreamEnd() { if (!this.allowHalfOpen) { this.write = writeAfterFIN; } }
_eventsCount 1 _hadError false _host null _isStdio true _maxListeners undefined _parent null _pendingData null _pendingEncoding _readableState Name Value autoDestroy true awaitDrainWriters null buffer (Object) closeEmitted false closed false constructed true dataEmitted false decoder null defaultEncoding utf8 destroyed false emitClose false emittedReadable false encoding null endEmitted false ended false errorEmitted false errored null flowing null highWaterMark 16384 length 0 multiAwaitDrain false needReadable false objectMode false pipes (Object) readable false readableListening false reading false readingMore false resumeScheduled false sync true _server null _sockname null _type pipe _writableState Name Value afterWriteTickInfo null allBuffers true allNoop true autoDestroy true bufferProcessing false buffered (Object) bufferedIndex 0 closeEmitted false closed false constructed true corked 0 decodeStrings false defaultEncoding utf8 destroyed false emitClose false ended false ending false errorEmitted false errored null finalCalled false finished false highWaterMark 16384 length 0 needDrain false objectMode false onwrite function () { [native code] }
pendingcb 0 prefinished false sync false writecb null writelen 0 writing false allowHalfOpen false connecting false destroySoon function destroy(err, cb) { const r = this._readableState; const w = this._writableState; // With duplex streams we use the writable side for state. const s = w || r; if ((w && w.destroyed) || (r && r.destroyed)) { if (typeof cb === 'function') { cb(); } return this; } // We set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks checkError(err, w, r); if (w) { w.destroyed = true; } if (r) { r.destroyed = true; } // If still constructing then defer calling _destroy. if (!s.constructed) { this.once(kDestroy, function(er) { _destroy(this, aggregateTwoErrors(er, err), cb); }); } else { _destroy(this, err, cb); } return this; }
fd 2 server null stdin Name Value _events Name Value pause () => { process.nextTick(onpause); }
_eventsCount 2 _maxListeners undefined _readableState Name Value autoDestroy false awaitDrainWriters null buffer (Object) closeEmitted false closed false constructed false dataEmitted false decoder null defaultEncoding utf8 destroyed false emitClose true emittedReadable false encoding null endEmitted false ended false errorEmitted false errored null flowing null highWaterMark 65536 length 0 multiAwaitDrain false needReadable false objectMode false pipes (Object) readableListening false reading false readingMore false resumeScheduled false sync true bytesRead 0 closed false end Infinity fd 0 pos undefined start undefined stdout Name Value _destroy function dummyDestroy(err, cb) { cb(err); this._undestroy(); // We need to emit 'close' anyway so that the closing // of the stream is observable. We just make sure we // are not going to do it twice. // The 'close' event is needed so that finished and // pipeline work correctly. if (!this._writableState.emitClose) { process.nextTick(() => { this.emit('close'); }); } }
_events Name Value end function onReadableStreamEnd() { if (!this.allowHalfOpen) { this.write = writeAfterFIN; } }
error function () { [native code] }
_eventsCount 2 _hadError false _host null _isStdio true _maxListeners undefined _parent null _pendingData null _pendingEncoding _readableState Name Value autoDestroy true awaitDrainWriters null buffer (Object) closeEmitted false closed false constructed true dataEmitted false decoder null defaultEncoding utf8 destroyed false emitClose false emittedReadable false encoding null endEmitted false ended false errorEmitted false errored null flowing null highWaterMark 16384 length 0 multiAwaitDrain false needReadable false objectMode false pipes (Object) readable false readableListening false reading false readingMore false resumeScheduled false sync true _server null _sockname null _type pipe _writableState Name Value afterWriteTickInfo null allBuffers true allNoop true autoDestroy true bufferProcessing false buffered (Object) bufferedIndex 0 closeEmitted false closed false constructed true corked 0 decodeStrings false defaultEncoding utf8 destroyed false emitClose false ended false ending false errorEmitted false errored null finalCalled false finished false highWaterMark 16384 length 0 needDrain false objectMode false onwrite function () { [native code] }
pendingcb 0 prefinished false sync false writecb null writelen 0 writing false allowHalfOpen false connecting false destroySoon function destroy(err, cb) { const r = this._readableState; const w = this._writableState; // With duplex streams we use the writable side for state. const s = w || r; if ((w && w.destroyed) || (r && r.destroyed)) { if (typeof cb === 'function') { cb(); } return this; } // We set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks checkError(err, w, r); if (w) { w.destroyed = true; } if (r) { r.destroyed = true; } // If still constructing then defer calling _destroy. if (!s.constructed) { this.once(kDestroy, function(er) { _destroy(this, aggregateTwoErrors(er, err), cb); }); } else { _destroy(this, err, cb); } return this; }
fd 1 server null title /app/.heroku/node/bin/node umask function wrappedUmask(mask) { if (mask !== undefined) { mask = parseFileMode(mask, 'mask'); } return rawMethods.umask(mask); }
uptime function uptime() { [native code] }
version v16.13.2 versions Name Value ares 1.18.1 brotli 1.0.9 cldr 39.0 icu 69.1 llhttp 6.0.4 modules 93 napi 8 nghttp2 1.45.1 nghttp3 0.1.0-DEV ngtcp2 0.1.0-DEV node 16.13.2 openssl 1.1.1l+quic tz 2021a unicode 13.0 uv 1.42.0 v8 9.4.146.24-node.14 zlib 1.2.11 -
Name Value _events Name Value mount function onmount(parent) { // inherit trust proxy if (this.settings[trustProxyDefaultSymbol] === true && typeof parent.settings['trust proxy fn'] === 'function') { delete this.settings['trust proxy']; delete this.settings['trust proxy fn']; } // inherit protos setPrototypeOf(this.request, parent.request) setPrototypeOf(this.response, parent.response) setPrototypeOf(this.engines, parent.engines) setPrototypeOf(this.settings, parent.settings) }
_eventsCount 1 _maxListeners undefined _router function router(req, res, next) { router.handle(req, res, next); }
acl function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
addListener function addListener(type, listener) { return _addListener(this, type, listener, false); }
all function all(path) { this.lazyrouter(); var route = this._router.route(path); var args = slice.call(arguments, 1); for (var i = 0; i < methods.length; i++) { route[methods[i]].apply(route, args); } return this; }
bind function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
cache Name Value error.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name error.ejs path /app/views/error.ejs root /app/views express-debug-panel.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name express-debug-panel.ejs path /app/views/express-debug-panel.ejs root /app/views game.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name game.ejs path /app/views/game.ejs root /app/views gravatar.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name gravatar.ejs path /app/views/gravatar.ejs root /app/views home.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name home.ejs path /app/views/home.ejs root /app/views paypal.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name paypal.ejs path /app/views/paypal.ejs root /app/views remove-bg.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name remove-bg.ejs path /app/views/remove-bg.ejs root /app/views shortener.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name shortener.ejs path /app/views/shortener.ejs root /app/views simbad.ejs Name Value defaultEngine ejs engine function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
ext .ejs name simbad.ejs path /app/views/simbad.ejs root /app/views checkout function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
connect function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
copy function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
defaultConfiguration function defaultConfiguration() { var env = process.env.NODE_ENV || 'development'; // default settings this.enable('x-powered-by'); this.set('etag', 'weak'); this.set('env', env); this.set('query parser', 'extended'); this.set('subdomain offset', 2); this.set('trust proxy', false); // trust proxy inherit back-compat Object.defineProperty(this.settings, trustProxyDefaultSymbol, { configurable: true, value: true }); debug('booting in %s mode', env); this.on('mount', function onmount(parent) { // inherit trust proxy if (this.settings[trustProxyDefaultSymbol] === true && typeof parent.settings['trust proxy fn'] === 'function') { delete this.settings['trust proxy']; delete this.settings['trust proxy fn']; } // inherit protos setPrototypeOf(this.request, parent.request) setPrototypeOf(this.response, parent.response) setPrototypeOf(this.engines, parent.engines) setPrototypeOf(this.settings, parent.settings) }); // setup locals this.locals = Object.create(null); // top-most app is mounted at / this.mountpath = '/'; // default locals this.locals.settings = this.settings; // default configuration this.set('view', View); this.set('views', resolve('views')); this.set('jsonp callback name', 'callback'); if (env === 'production') { this.enable('view cache'); } Object.defineProperty(this, 'router', { get: function() { throw new Error('\'app.router\' is deprecated!\nPlease see the 3.x to 4.x migration guide for details on how to update your app.'); } }); }
del function (arg0) { "use strict" log.call(deprecate, message, site) return fn.apply(this, arguments) }
delete function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
disable function disable(setting) { return this.set(setting, false); }
disabled function disabled(setting) { return !this.set(setting); }
emit function emit(type, ...args) { let doError = (type === 'error'); const events = this._events; if (events !== undefined) { if (doError && events[kErrorMonitor] !== undefined) this.emit(kErrorMonitor, ...args); doError = (doError && events.error === undefined); } else if (!doError) return false; // If there is no 'error' event listener then throw. if (doError) { let er; if (args.length > 0) er = args[0]; if (er instanceof Error) { try { const capture = {}; ErrorCaptureStackTrace(capture, EventEmitter.prototype.emit); ObjectDefineProperty(er, kEnhanceStackBeforeInspector, { value: FunctionPrototypeBind(enhanceStackTrace, this, er, capture), configurable: true }); } catch {} // Note: The comments on the `throw` lines are intentional, they show // up in Node's output if this results in an unhandled exception. throw er; // Unhandled 'error' event } let stringifiedEr; try { stringifiedEr = inspect(er); } catch { stringifiedEr = er; } // At least give some kind of context to the user const err = new ERR_UNHANDLED_ERROR(stringifiedEr); err.context = er; throw err; // Unhandled 'error' event } const handler = events[type]; if (handler === undefined) return false; if (typeof handler === 'function') { const result = handler.apply(this, args); // We check if result is undefined first because that // is the most common case so we do not pay any perf // penalty if (result !== undefined && result !== null) { addCatch(this, result, type, args); } } else { const len = handler.length; const listeners = arrayClone(handler); for (let i = 0; i < len; ++i) { const result = listeners[i].apply(this, args); // We check if result is undefined first because that // is the most common case so we do not pay any perf // penalty. // This code is duplicated because extracting it away // would make it non-inlineable. if (result !== undefined && result !== null) { addCatch(this, result, type, args); } } } return true; }
enable function enable(setting) { return this.set(setting, true); }
enabled function enabled(setting) { return Boolean(this.set(setting)); }
engine function engine(ext, fn) { if (typeof fn !== 'function') { throw new Error('callback function required'); } // get file extension var extension = ext[0] !== '.' ? '.' + ext : ext; // store engine this.engines[extension] = fn; return this; }
engines Name Value .ejs function () { var args = Array.prototype.slice.call(arguments); var filename = args.shift(); var cb; var opts = {filename: filename}; var data; var viewOpts; // Do we have a callback? if (typeof arguments[arguments.length - 1] == 'function') { cb = args.pop(); } // Do we have data/opts? if (args.length) { // Should always have data obj data = args.shift(); // Normal passed opts (data obj + opts obj) if (args.length) { // Use shallowCopy so we don't pollute passed in opts obj with new vals utils.shallowCopy(opts, args.pop()); } // Special casing for Express (settings + opts-in-data) else { // Express 3 and 4 if (data.settings) { // Pull a few things from known locations if (data.settings.views) { opts.views = data.settings.views; } if (data.settings['view cache']) { opts.cache = true; } // Undocumented after Express 2, but still usable, esp. for // items that are unsafe to be passed along with data, like `root` viewOpts = data.settings['view options']; if (viewOpts) { utils.shallowCopy(opts, viewOpts); } } // Express 2 and lower, values set in app.locals, or people who just // want to pass options in their data. NOTE: These values will override // anything previously set in settings or settings['view options'] utils.shallowCopyFromList(opts, data, _OPTS_PASSABLE_WITH_DATA_EXPRESS); } opts.filename = filename; } else { data = utils.createNullProtoObjWherePossible(); } return tryHandleCache(opts, data, cb); }
eventNames function eventNames() { return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; }
get function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
getMaxListeners function getMaxListeners() { return _getMaxListeners(this); }
handle function handle(req, res, callback) { var router = this._router; // final handler var done = callback || finalhandler(req, res, { env: this.get('env'), onerror: logerror.bind(this) }); // no routes if (!router) { debug('no routes defined on app'); done(); return; } router.handle(req, res, done); }
head function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
init function init() { this.cache = {}; this.engines = {}; this.settings = {}; this.defaultConfiguration(); }
lazyrouter function lazyrouter() { if (!this._router) { this._router = new Router({ caseSensitive: this.enabled('case sensitive routing'), strict: this.enabled('strict routing') }); this._router.use(query(this.get('query parser fn'))); this._router.use(middleware.init(this)); } }
link function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
listen function listen() { var server = http.createServer(this); return server.listen.apply(server, arguments); }
listenerCount function listenerCount(type) { const events = this._events; if (events !== undefined) { const evlistener = events[type]; if (typeof evlistener === 'function') { return 1; } else if (evlistener !== undefined) { return evlistener.length; } } return 0; }
listeners function listeners(type) { return _listeners(this, type, true); }
locals Name Value ENV production ENV_DEVELOPMENT false developerIp 71.176.222.191 googleLoginUrl https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&client_id=691069282576-hisif53r8nanm0u3p5tlpcfkask77foe.apps.googleusercontent.com&prompt=consent&redirect_uri=https%3A%2F%2Fdemo.finitewisdom.com%2Fgoogle%2Fassert&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser.addresses.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser.birthday.read%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuser.phonenumbers.read initializedModules true settings Name Value env production etag weak etag fn function generateETag (body, encoding) { var buf = !Buffer.isBuffer(body) ? Buffer.from(body, encoding) : body return etag(buf, options) }
jsonp callback name callback port 23976 query parser extended query parser fn function parseExtendedQueryString(str) { return qs.parse(str, { allowPrototypes: true }); }
subdomain offset 2 trust proxy true trust proxy fn function(){ return true }
view function View(name, options) { var opts = options || {}; this.defaultEngine = opts.defaultEngine; this.ext = extname(name); this.name = name; this.root = opts.root; if (!this.ext && !this.defaultEngine) { throw new Error('No default engine was specified and no extension was provided.'); } var fileName = name; if (!this.ext) { // get extension from default engine name this.ext = this.defaultEngine[0] !== '.' ? '.' + this.defaultEngine : this.defaultEngine; fileName += this.ext; } if (!opts.engines[this.ext]) { // load engine var mod = this.ext.substr(1) debug('require "%s"', mod) // default engine export var fn = require(mod).__express if (typeof fn !== 'function') { throw new Error('Module "' + mod + '" does not provide a view engine.') } opts.engines[this.ext] = fn } // store loaded engine this.engine = opts.engines[this.ext]; // lookup path this.path = this.lookup(fileName); }
view cache true view engine ejs views /app/views x-powered-by true lock function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
m-search function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
merge function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
mkactivity function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
mkcalendar function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
mkcol function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
mountpath / move function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
notify function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
off function removeListener(type, listener) { checkListener(listener); const events = this._events; if (events === undefined) return this; const list = events[type]; if (list === undefined) return this; if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) this._events = ObjectCreate(null); else { delete events[type]; if (events.removeListener) this.emit('removeListener', type, list.listener || listener); } } else if (typeof list !== 'function') { let position = -1; for (let i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { position = i; break; } } if (position < 0) return this; if (position === 0) list.shift(); else { if (spliceOne === undefined) spliceOne = require('internal/util').spliceOne; spliceOne(list, position); } if (list.length === 1) events[type] = list[0]; if (events.removeListener !== undefined) this.emit('removeListener', type, listener); } return this; }
on function addListener(type, listener) { return _addListener(this, type, listener, false); }
once function once(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }
options function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
param function param(name, fn) { this.lazyrouter(); if (Array.isArray(name)) { for (var i = 0; i < name.length; i++) { this.param(name[i], fn); } return this; } this._router.param(name, fn); return this; }
patch function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
path function path() { return this.parent ? this.parent.path() + this.mountpath : ''; }
post function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
prependListener function prependListener(type, listener) { return _addListener(this, type, listener, true); }
prependOnceListener function prependOnceListener(type, listener) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }
propfind function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
proppatch function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
purge function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
put function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
rawListeners function rawListeners(type) { return _listeners(this, type, false); }
rebind function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
removeAllListeners function removeAllListeners(type) { const events = this._events; if (events === undefined) return this; // Not listening for removeListener, no need to emit if (events.removeListener === undefined) { if (arguments.length === 0) { this._events = ObjectCreate(null); this._eventsCount = 0; } else if (events[type] !== undefined) { if (--this._eventsCount === 0) this._events = ObjectCreate(null); else delete events[type]; } return this; } // Emit removeListener for all listeners on all events if (arguments.length === 0) { for (const key of ReflectOwnKeys(events)) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = ObjectCreate(null); this._eventsCount = 0; return this; } const listeners = events[type]; if (typeof listeners === 'function') { this.removeListener(type, listeners); } else if (listeners !== undefined) { // LIFO order for (let i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }
removeListener function removeListener(type, listener) { checkListener(listener); const events = this._events; if (events === undefined) return this; const list = events[type]; if (list === undefined) return this; if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) this._events = ObjectCreate(null); else { delete events[type]; if (events.removeListener) this.emit('removeListener', type, list.listener || listener); } } else if (typeof list !== 'function') { let position = -1; for (let i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { position = i; break; } } if (position < 0) return this; if (position === 0) list.shift(); else { if (spliceOne === undefined) spliceOne = require('internal/util').spliceOne; spliceOne(list, position); } if (list.length === 1) events[type] = list[0]; if (events.removeListener !== undefined) this.emit('removeListener', type, listener); } return this; }
render function render(name, options, callback) { var cache = this.cache; var done = callback; var engines = this.engines; var opts = options; var renderOptions = {}; var view; // support callback function as second arg if (typeof options === 'function') { done = options; opts = {}; } // merge app.locals merge(renderOptions, this.locals); // merge options._locals if (opts._locals) { merge(renderOptions, opts._locals); } // merge options merge(renderOptions, opts); // set .cache unless explicitly provided if (renderOptions.cache == null) { renderOptions.cache = this.enabled('view cache'); } // primed cache if (renderOptions.cache) { view = cache[name]; } // view if (!view) { var View = this.get('view'); view = new View(name, { defaultEngine: this.get('view engine'), root: this.get('views'), engines: engines }); if (!view.path) { var dirs = Array.isArray(view.root) && view.root.length > 1 ? 'directories "' + view.root.slice(0, -1).join('", "') + '" or "' + view.root[view.root.length - 1] + '"' : 'directory "' + view.root + '"' var err = new Error('Failed to lookup view "' + name + '" in views ' + dirs); err.view = view; return done(err); } // prime the cache if (renderOptions.cache) { cache[name] = view; } } // render tryRender(view, renderOptions, done); }
report function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
request Name Value app function(req, res, next) { app.handle(req, res, next); }
response Name Value app function(req, res, next) { app.handle(req, res, next); }
route function route(path) { this.lazyrouter(); return this._router.route(path); }
search function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
set function set(setting, val) { if (arguments.length === 1) { // app.get(setting) return this.settings[setting]; } debug('set "%s" to %o', setting, val); // set value this.settings[setting] = val; // trigger matched settings switch (setting) { case 'etag': this.set('etag fn', compileETag(val)); break; case 'query parser': this.set('query parser fn', compileQueryParser(val)); break; case 'trust proxy': this.set('trust proxy fn', compileTrust(val)); // trust proxy inherit back-compat Object.defineProperty(this.settings, trustProxyDefaultSymbol, { configurable: true, value: false }); break; } return this; }
setMaxListeners function setMaxListeners(n) { if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { throw new ERR_OUT_OF_RANGE('n', 'a non-negative number', n); } this._maxListeners = n; return this; }
settings Name Value env production etag weak etag fn function generateETag (body, encoding) { var buf = !Buffer.isBuffer(body) ? Buffer.from(body, encoding) : body return etag(buf, options) }
jsonp callback name callback port 23976 query parser extended query parser fn function parseExtendedQueryString(str) { return qs.parse(str, { allowPrototypes: true }); }
subdomain offset 2 trust proxy true trust proxy fn function(){ return true }
view function View(name, options) { var opts = options || {}; this.defaultEngine = opts.defaultEngine; this.ext = extname(name); this.name = name; this.root = opts.root; if (!this.ext && !this.defaultEngine) { throw new Error('No default engine was specified and no extension was provided.'); } var fileName = name; if (!this.ext) { // get extension from default engine name this.ext = this.defaultEngine[0] !== '.' ? '.' + this.defaultEngine : this.defaultEngine; fileName += this.ext; } if (!opts.engines[this.ext]) { // load engine var mod = this.ext.substr(1) debug('require "%s"', mod) // default engine export var fn = require(mod).__express if (typeof fn !== 'function') { throw new Error('Module "' + mod + '" does not provide a view engine.') } opts.engines[this.ext] = fn } // store loaded engine this.engine = opts.engines[this.ext]; // lookup path this.path = this.lookup(fileName); }
view cache true view engine ejs views /app/views x-powered-by true source function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
subscribe function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
trace function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
unbind function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
unlink function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
unlock function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
unsubscribe function(path){ if (method === 'get' && arguments.length === 1) { // app.get(setting) return this.set(path); } this.lazyrouter(); var route = this._router.route(path); route[method].apply(route, slice.call(arguments, 1)); return this; }
use function use(fn) { var offset = 0; var path = '/'; // default path to '/' // disambiguate app.use([fn]) if (typeof fn !== 'function') { var arg = fn; while (Array.isArray(arg) && arg.length !== 0) { arg = arg[0]; } // first arg is the path if (typeof arg !== 'function') { offset = 1; path = fn; } } var fns = flatten(slice.call(arguments, offset)); if (fns.length === 0) { throw new TypeError('app.use() requires a middleware function') } // setup router this.lazyrouter(); var router = this._router; fns.forEach(function (fn) { // non-express app if (!fn || !fn.handle || !fn.set) { return router.use(path, fn); } debug('.use app under %s', path); fn.mountpath = path; fn.parent = this; // restore .app property on req and res router.use(path, function mounted_app(req, res, next) { var orig = req.app; fn.handle(req, res, function (err) { setPrototypeOf(req, orig.request) setPrototypeOf(res, orig.response) next(err); }); }); // mounted an app fn.emit('mount', this); }, this); return this; }
-
Name Value cookie Name Value _expires null httpOnly true originalMaxAge null path / secure false