mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-14 19:42:51 +01:00
Squashed commit of the following: commitf9ce878b26Author: Julian Lam <julian@nodebb.org> Date: Tue Aug 13 14:30:46 2019 -0400 fix(style): updated code to follow new eslint recommendations commit80dd370e41Author: Julian Lam <julian@nodebb.org> Date: Tue Aug 13 14:14:58 2019 -0400 fix(deps): update dependency sitemap to v4 Squashed commit of the following: commitf4dd9cabb2Author: Julian Lam <julian@nodebb.org> Date: Tue Aug 13 11:33:05 2019 -0400 fix: resolved breaking changes from sitemap v4 upgrade commit9043415ee1Merge:e3352b27272590b346Author: Julian Lam <julian@nodebb.org> Date: Tue Aug 13 11:09:55 2019 -0400 Merge branch 'master' into renovate/sitemap-4.x commite3352b272eAuthor: Renovate Bot <bot@renovateapp.com> Date: Mon Aug 12 07:59:05 2019 +0000 fix(deps): update dependency sitemap to v4 commit8e3c0cdcaeAuthor: Renovate Bot <bot@renovateapp.com> Date: Fri Aug 9 00:49:51 2019 +0000 fix(deps): update dependency commander to v3 commit2104449d38Author: Renovate Bot <bot@renovateapp.com> Date: Tue Aug 13 15:00:27 2019 +0000 fix(deps): update dependency mongodb to v3.3.0 commitd2937f446aAuthor: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Tue Aug 13 10:36:48 2019 -0400 feat: async/await admin/controllers commit1b97e8b199Author: Misty (Bot) <deploy@nodebb.org> Date: Tue Aug 13 09:28:39 2019 +0000 Latest translations and fallbacks commit69a48957a2Author: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Mon Aug 12 21:56:09 2019 -0400 feat: async/await commitb9b2a7e593Author: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Mon Aug 12 20:58:29 2019 -0400 feat: async/await refactor controllers/accounts commita8d43a1759Author: Baris Usakli <barisusakli@gmail.com> Date: Mon Aug 12 14:49:40 2019 -0400 feat: async/await controllers/accounts commit2f25aae57bAuthor: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Sun Aug 11 23:09:50 2019 -0400 fix: #7831, fix pagination convert to async/await commitc9e83f2374Author: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Sun Aug 11 00:14:35 2019 -0400 fix: remove empty line commit30be91b26cAuthor: Barış Soner Uşaklı <barisusakli@gmail.com> Date: Sun Aug 11 00:13:41 2019 -0400 fix: remove useless catchs and empty line commit2e4a71c0b6Author: Renovate Bot <bot@renovateapp.com> Date: Sat Aug 10 06:51:50 2019 +0000 chore(deps): update dependency eslint-config-airbnb-base to v14
40 lines
891 B
JavaScript
40 lines
891 B
JavaScript
'use strict';
|
|
|
|
var fork = require('child_process').fork;
|
|
|
|
var debugArg = process.execArgv.find(function (arg) {
|
|
return /^--(debug|inspect)/.test(arg);
|
|
});
|
|
var debugging = !!debugArg;
|
|
|
|
debugArg = debugArg ? debugArg.replace('-brk', '').split('=') : ['--debug', 5859];
|
|
var lastAddress = parseInt(debugArg[1], 10);
|
|
|
|
/**
|
|
* child-process.fork, but safe for use in debuggers
|
|
* @param {string} modulePath
|
|
* @param {string[]} [args]
|
|
* @param {any} [options]
|
|
*/
|
|
function debugFork(modulePath, args, options) {
|
|
var execArgv = [];
|
|
if (global.v8debug || debugging) {
|
|
lastAddress += 1;
|
|
|
|
execArgv = [debugArg[0] + '=' + lastAddress, '--nolazy'];
|
|
}
|
|
|
|
if (!Array.isArray(args)) {
|
|
options = args;
|
|
args = [];
|
|
}
|
|
|
|
options = options || {};
|
|
options = { ...options, execArgv: execArgv };
|
|
|
|
return fork(modulePath, args, options);
|
|
}
|
|
debugFork.debugging = debugging;
|
|
|
|
module.exports = debugFork;
|