2021-11-01 15:13:30 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This file is only used by the vscode launch config.
|
|
|
|
* It allows us to provide a free text prompt to the user to pass any inso extra arguments.
|
|
|
|
* https://github.com/microsoft/vscode/issues/83678
|
|
|
|
*/
|
2021-12-15 11:26:44 +00:00
|
|
|
const shellwords = require("shellwords");
|
2021-11-01 15:13:30 +00:00
|
|
|
let args = process.argv;
|
|
|
|
|
|
|
|
if (args.length >= 2 && require('inspector').url()) {
|
2021-12-15 11:26:44 +00:00
|
|
|
args = process.argv.reduce((allArgs, arg) => [...allArgs, ...shellwords.split(arg)], []);
|
2021-11-01 15:13:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// This should always be the same as bin/inso
|
|
|
|
global.require = require;
|
|
|
|
const insomniacli = require('../dist/index.js');
|
|
|
|
insomniacli.go(args);
|
2021-12-15 11:26:44 +00:00
|
|
|
|