This commit is contained in:
Evert Prants 2020-11-28 22:26:42 +02:00
parent 037ccb62c4
commit 9841b7d571
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
4 changed files with 17 additions and 12 deletions

4
.npmignore Normal file
View File

@ -0,0 +1,4 @@
/src/
/tsconfig.json
/tsconfig.tsbuildinfo
/tslint.json

View File

@ -2,7 +2,7 @@
"name": "@squeebot/cli", "name": "@squeebot/cli",
"version": "3.0.0", "version": "3.0.0",
"description": "Squeebot v3 runtime, environments and configuration", "description": "Squeebot v3 runtime, environments and configuration",
"main": "index.js", "main": "dist/squeebot.js",
"bin": { "bin": {
"squeebot": "./dist/squeebot.js", "squeebot": "./dist/squeebot.js",
"squeebotd": "./dist/squeebotd.js" "squeebotd": "./dist/squeebotd.js"
@ -11,7 +11,8 @@
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc", "build": "tsc",
"watch": "tsc -w", "watch": "tsc -w",
"start": "node ./dist/squeebot" "start": "node ./dist/squeebot",
"prepare": "npm run build"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -50,7 +50,7 @@ export class SqueebotCLI {
for (const namep of args.slice(1)) { for (const namep of args.slice(1)) {
await this.bot.repositoryManager.uninstallRepository(namep); await this.bot.repositoryManager.uninstallRepository(namep);
logger.log('Installed repository %s.', namep); logger.log('Installed repository %s.', namep);
}; }
break; break;
case 'u': case 'u':
case 'upd': case 'upd':
@ -71,7 +71,7 @@ export class SqueebotCLI {
} }
await this.checkUpdate(repo); await this.checkUpdate(repo);
}; }
break; break;
default: default:
logger.log(help); logger.log(help);
@ -99,7 +99,7 @@ export class SqueebotCLI {
case 'remove': case 'remove':
case 'uninstall': case 'uninstall':
for (const name of args.slice(1)) { for (const name of args.slice(1)) {
await this.bot.repositoryManager.uninstallPlugin(name) await this.bot.repositoryManager.uninstallPlugin(name);
logger.log('Uninstalled plugin %s.', name); logger.log('Uninstalled plugin %s.', name);
} }
break; break;
@ -303,7 +303,7 @@ export class SqueebotCLI {
await this.bot.config.save(); await this.bot.config.save();
} }
public attach(rl: ReadLine) { public attach(rl: ReadLine): void {
rl.on('line', (line: string) => { rl.on('line', (line: string) => {
const split = line.split(' '); const split = line.split(' ');