Comparing version 0.5.6 to 0.6.0-dev.1
@@ -25,3 +25,4 @@ "use strict"; | ||
try { | ||
yargs. | ||
let commandCalled = false; | ||
const args = yargs. | ||
parserConfiguration({ 'camel-case-expansion': false }). | ||
@@ -35,5 +36,6 @@ exitProcess(false). | ||
handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
commandCalled = true; | ||
const options = Object.assign({}, tsc.Options.defaults, argv); | ||
const main = yield Promise.resolve().then(() => require('lsif-tsc')); | ||
yield main.run(options); | ||
yield main.run(tsc.Options.sanitize(options)); | ||
}) | ||
@@ -46,2 +48,3 @@ }). | ||
handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
commandCalled = true; | ||
const options = Object.assign({}, npm.Options.defaults, argv); | ||
@@ -57,2 +60,3 @@ const main = yield Promise.resolve().then(() => require('lsif-npm')); | ||
handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
commandCalled = true; | ||
const options = Object.assign({}, sqlite.Options.defaults, argv); | ||
@@ -68,2 +72,3 @@ const main = yield Promise.resolve().then(() => require('lsif-sqlite')); | ||
handler: (argv) => __awaiter(this, void 0, void 0, function* () { | ||
commandCalled = true; | ||
const options = Object.assign({}, validate.Options.defaults, argv); | ||
@@ -74,5 +79,25 @@ const main = yield Promise.resolve().then(() => require('lsif-tooling')); | ||
}). | ||
demandCommand(1, 1, 'You need to specify one of the above commands.'). | ||
option('v', { | ||
alias: 'version', | ||
description: 'Output the version number', | ||
boolean: true | ||
}). | ||
option('h', { | ||
alias: 'help', | ||
description: 'Output usage information', | ||
boolean: true | ||
}). | ||
wrap(Math.min(100, yargs.terminalWidth())). | ||
argv; | ||
if (commandCalled) { | ||
return; | ||
} | ||
if (args.v === true) { | ||
console.log(require('../package.json').version); | ||
return; | ||
} | ||
if (args.h === true) { | ||
return; | ||
} | ||
console.error(`You need to specify one of the following commands: tsc, npm, sqlite, or validate.`); | ||
} | ||
@@ -79,0 +104,0 @@ catch (err) { |
{ | ||
"name": "lsif", | ||
"description": "Wrapper tool to start lsif based sub tools", | ||
"version": "0.5.6", | ||
"version": "0.6.0-dev.1", | ||
"author": "Microsoft Corporation", | ||
@@ -20,7 +20,7 @@ "license": "MIT", | ||
"dependencies": { | ||
"yargs": "^16.2.0", | ||
"lsif-tsc": "0.5.6", | ||
"lsif-npm": "0.5.3", | ||
"lsif-sqlite": "0.5.3", | ||
"lsif-tooling": "0.5.3" | ||
"lsif-npm": "0.6.0-next.6", | ||
"lsif-sqlite": "0.6.0-next.6", | ||
"lsif-tooling": "0.6.0-next.7", | ||
"lsif-tsc": "0.6.0-dev.1", | ||
"yargs": "^16.2.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "devDependencies": {}, |
@@ -15,3 +15,4 @@ /* -------------------------------------------------------------------------------------------- | ||
try { | ||
yargs. | ||
let commandCalled: boolean = false; | ||
const args = yargs. | ||
parserConfiguration({ 'camel-case-expansion': false }). | ||
@@ -25,5 +26,6 @@ exitProcess(false). | ||
handler: async (argv) => { | ||
commandCalled = true; | ||
const options: tsc.Options = Object.assign({}, tsc.Options.defaults, argv); | ||
const main = await import('lsif-tsc'); | ||
await main.run(options); | ||
await main.run(tsc.Options.sanitize(options)); | ||
} | ||
@@ -36,2 +38,3 @@ }). | ||
handler: async (argv) => { | ||
commandCalled = true; | ||
const options: npm.Options = Object.assign({}, npm.Options.defaults, argv); | ||
@@ -47,2 +50,3 @@ const main = await import('lsif-npm'); | ||
handler: async (argv) => { | ||
commandCalled = true; | ||
const options: sqlite.Options = Object.assign({}, sqlite.Options.defaults, argv); | ||
@@ -58,2 +62,3 @@ const main = await import('lsif-sqlite'); | ||
handler: async (argv) => { | ||
commandCalled = true; | ||
const options: validate.Options = Object.assign({}, validate.Options.defaults, argv); | ||
@@ -64,5 +69,25 @@ const main = await import('lsif-tooling'); | ||
}). | ||
demandCommand(1, 1, 'You need to specify one of the above commands.'). | ||
option('v', { | ||
alias: 'version', | ||
description: 'Output the version number', | ||
boolean: true | ||
}). | ||
option('h', { | ||
alias: 'help', | ||
description: 'Output usage information', | ||
boolean: true | ||
}). | ||
wrap(Math.min(100, yargs.terminalWidth())). | ||
argv; | ||
if (commandCalled) { | ||
return; | ||
} | ||
if (args.v === true) { | ||
console.log(require('../package.json').version); | ||
return; | ||
} | ||
if (args.h === true) { | ||
return; | ||
} | ||
console.error(`You need to specify one of the following commands: tsc, npm, sqlite, or validate.`); | ||
} catch (err) { | ||
@@ -69,0 +94,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
302812
235
+ Addedlsif-npm@0.6.0-next.6(transitive)
+ Addedlsif-protocol@0.6.0-next.5(transitive)
+ Addedlsif-sqlite@0.6.0-next.6(transitive)
+ Addedlsif-tooling@0.6.0-next.7(transitive)
+ Addedlsif-tsc@0.6.0-dev.1(transitive)
- Removedlsif-npm@0.5.3(transitive)
- Removedlsif-protocol@0.5.3(transitive)
- Removedlsif-sqlite@0.5.3(transitive)
- Removedlsif-tooling@0.5.3(transitive)
- Removedlsif-tsc@0.5.6(transitive)
Updatedlsif-npm@0.6.0-next.6
Updatedlsif-sqlite@0.6.0-next.6
Updatedlsif-tooling@0.6.0-next.7
Updatedlsif-tsc@0.6.0-dev.1