MCPcopy
hub / github.com/meteor/meteor / normalizeInspectOptions

Function normalizeInspectOptions

tools/cli/commands.js:253–292  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

251};
252
253function normalizeInspectOptions(options) {
254 const result = Object.create(null);
255
256 if (_.has(options, "debug-port")) {
257 console.log(
258 "The --debug-port option is deprecated; " +
259 "please use --inspect-brk=<port> instead."
260 );
261
262 if (! _.has(options, "inspect-brk")) {
263 options["inspect-brk"] = options["debug-port"];
264 }
265
266 delete options["debug-port"];
267 }
268
269 if (_.has(options, "inspect-brk")) {
270 result.inspect = {
271 port: options["inspect-brk"],
272 "break": true,
273 };
274
275 if (_.has(options, "inspect")) {
276 console.log(
277 "Both --inspect and --inspect-brk provided; " +
278 "ignoring --inspect."
279 );
280
281 delete options.inspect;
282 }
283
284 } else if (_.has(options, "inspect")) {
285 result.inspect = {
286 port: options.inspect,
287 "break": false,
288 };
289 }
290
291 return result;
292}
293
294var runCommandOptions = {
295 requiresApp: true,

Callers 2

doRunCommandFunction · 0.85
runTestAppForPackagesFunction · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…