update dependencies

This commit is contained in:
Alex Bosworth 2025-12-27 19:41:12 -08:00
parent df121a4fd7
commit 7d329d5ce1
No known key found for this signature in database
GPG key ID: E80D2F3F311FD87E
13 changed files with 1280 additions and 3032 deletions

View file

@ -1,5 +1,14 @@
# Versions
## 20.0.0
- Add support for LND 0.20.0
### Breaking Changes
- Remove support for node.js 18, 20+ is now required
- Remove support for CLI autocompletion
## 19.5.5
- Add support for LND 0.19.3

View file

@ -7,6 +7,7 @@ Commands for working with LND balances.
Supported LND versions:
- v0.20.0-beta
- v0.19.0-beta to v0.19.3-beta
- v0.18.0-beta to v0.18.5-beta
- v0.17.0-beta to v0.17.5-beta
@ -51,18 +52,6 @@ bos help
bos help commandName
```
If you want autocomplete on commands and options you can do:
```
bos install-completion
```
Or to remove autocomplete
```shell
bos uninstall-completion
```
## Community
Use `bos trade-secret` and buy the secret

31
bos
View file

@ -18,9 +18,7 @@ const lnService = importLazy('ln-service');
const lnSync = importLazy('ln-sync');
const paidServices = importLazy('paid-services');
const prog = require('@alexbosworth/caporal');
const tabtab = importLazy('tabtab');
const autocomplete = require('./commands/autocomplete');
const commandConstants = require('./commands/constants');
const {accountingCategories} = commandConstants;
@ -1139,21 +1137,6 @@ prog
});
})
// Add tab completions
.command('install-completion')
.help('Add tab autocompletion to your shell profile')
.visible(false)
.action(async (args, options, logger) => {
try {
await tabtab.install({
completer: commandConstants.process,
name: commandConstants.process,
});
} catch (err) {
return logger.error({err}) && reject();
}
})
// Create an invoice
.command('invoice', 'Create an invoice and get a BOLT 11 payment request')
.help('Amount can take m/k variables: 5*m for 5 million, 250*k = 0.0025')
@ -2246,18 +2229,6 @@ prog
});
})
// Remove tab completions
.command('uninstall-completion')
.help('Remove tab autocompletion from your shell profile')
.visible(false)
.action(async (args, options, logger) => {
try {
await tabtab.uninstall({name: commandConstants.process});
} catch (err) {
return logger.error({err}) && reject();
}
})
// Unlock wallet
.command('unlock', 'Unlock wallet if locked')
.help('Check if the wallet is locked, if so use a password file to unlock')
@ -2327,6 +2298,4 @@ prog
});
});
autocomplete({prog});
prog.parse(process.argv);

View file

@ -1,59 +0,0 @@
const minimist = require('minimist');
const tabtab = require('tabtab');
const arguments = () => process.argv.slice(2);
/** Initialize autocomplete
{
prog: <Caporal Program Object>
}
*/
module.exports = ({prog}) => {
const opts = minimist(arguments());
const args = opts._;
const completion = env => {
// Exit early when not completing a tab
if (!env.complete) {
return;
}
// Find the referenced command to see if it exists and has options
const command = prog.getCommands().find(n => n.name() === env.prev);
// Exit early when looking at the options for a command
if (!!command) {
return tabtab.log(command._options.map(option => ({
description: option._description,
name: option.getLongName(),
})));
}
// Filter out invisible commands
const visible = prog.getCommands().filter(n => n._visible);
// List all the relevant commands
return tabtab.log(visible.map(command => ({
description: command._description,
name: command.name(),
})));
};
// Look for completion help
const init = async () => {
const [cmd] = args;
// Exit early when not helping with completion
if (cmd !== 'completion') {
return;
}
const env = tabtab.parseEnv(process.env);
return completion(env);
};
return init();
};

View file

@ -71,7 +71,7 @@ module.exports = ({ask, lnd, logger, method, params}, cbk) => {
loop: false,
message: 'Select method to call',
name: 'method',
type: 'list',
type: 'select',
},
method => cbk(null, method));
}],

View file

@ -1,5 +1,4 @@
const {accountingCategories} = require('./constants');
const autocomplete = require('./autocomplete');
const callRawApi = require('./call_raw_api');
const clean = require('./clean');
const fetchRequest = require('./fetch_request');
@ -12,7 +11,6 @@ const {swapTypes} = require('./constants');
module.exports = {
accountingCategories,
autocomplete,
callRawApi,
clean,
fetchRequest,

View file

@ -184,7 +184,7 @@ module.exports = (args, cbk) => {
default: typeDefault,
message: 'Channel type?',
name: 'priv',
type: 'list',
type: 'select',
},
({priv}) => cbk(null, priv));
}],

View file

@ -156,7 +156,7 @@ module.exports = (args, cbk) => {
})),
loop: false,
name: 'service',
type: 'list',
type: 'select',
},
({service}) => cbk(null, service));
}],

4161
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -29,36 +29,35 @@
"colorette": "2.0.20",
"crypto-js": "4.2.0",
"csv-parse": "6.1.0",
"ecpair": "3.0.0",
"ecpair": "2.1.0",
"goldengate": "14.0.10",
"grammy": "1.38.1",
"grammy": "1.38.4",
"hot-formula-parser": "4.0.0",
"import-lazy": "4.0.0",
"ini": "5.0.0",
"inquirer": "12.9.4",
"ini": "6.0.0",
"inquirer": "13.1.0",
"ln-accounting": "8.0.6",
"ln-service": "57.26.2",
"ln-sync": "6.5.0",
"ln-service": "57.27.3",
"ln-sync": "6.5.2",
"ln-telegram": "6.1.11",
"minimist": "1.2.8",
"moment": "2.30.1",
"paid-services": "6.2.1",
"paid-services": "7.0.0",
"probing": "5.0.4",
"qrcode-terminal": "0.12.0",
"sanitize-filename": "1.6.3",
"socks-proxy-agent": "8.0.5",
"table": "6.9.0",
"tabtab": "3.0.2",
"tiny-secp256k1": "2.2.4",
"window-size": "1.1.1"
},
"description": "Lightning balance CLI",
"devDependencies": {
"invoices": "4.0.0",
"ln-docker-daemons": "6.0.25"
"ln-docker-daemons": "6.0.28"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"keywords": [
"cli",
@ -82,5 +81,5 @@
"postpublish": "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t alexbosworth/balanceofsatoshis -t alexbosworth/balanceofsatoshis:$npm_package_version --push .",
"test": "npx nyc@17.1.0 node --experimental-test-coverage --test test/arrays/*.js test/balances/*.js test/chain/*.js test/display/*.js test/encryption/*.js test/lnd/*.js test/network/*.js test/nodes/*.js test/peers/*.js test/responses/*.js test/routing/*.js test/services/*.js test/swaps/*.js test/tags/*.js test/telegram/*.js test/wallets/*.js"
},
"version": "19.5.5"
"version": "20.0.0"
}

View file

@ -70,7 +70,7 @@ module.exports = ({ask, fs, lnd, logger, network, node}, cbk) => {
chooseService: ['getServices', ({getServices}, cbk) => {
return ask([{
choices: getServices.services.slice().sort(byName).map(n => n.name),
type: 'list',
type: 'select',
name: 'name',
message: 'Choose service',
}],

View file

@ -8,7 +8,7 @@ const timeout = 1000 * 60 * 5;
const dirs = ['integration'];
const asPath = file => join(file.path, file.name);
const asPath = file => join(file.path || file.parentPath, file.name);
const flatten = arr => [].concat(...arr);
const files = flatten(dirs.map(dir => {

View file

@ -67,7 +67,7 @@ module.exports = ({ask, lnd, logger}, cbk) => {
],
message: 'Trigger action?',
name: 'action',
type: 'list',
type: 'select',
},
({action}) => cbk(null, action));
}],
@ -207,7 +207,7 @@ module.exports = ({ask, lnd, logger}, cbk) => {
}),
message: 'Triggers:',
name: 'view',
type: 'list',
type: 'select',
},
({view}) => cbk(null, view));
}],
@ -223,7 +223,7 @@ module.exports = ({ask, lnd, logger}, cbk) => {
choices: [{name: 'Delete Trigger', value: actionDeleteTrigger}],
message: 'Action?',
name: 'modify',
type: 'list',
type: 'select',
},
({modify}) => cbk(null, selectTrigger));
}],