botanary 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/botanary.js +2 -0
- package/package.json +8 -6
- package/dist/bin/botanary.js +0 -25
- package/dist/bin/botanary.js.map +0 -1
- package/dist/src/app-url.js +0 -52
- package/dist/src/app-url.js.map +0 -1
- package/dist/src/cli.js +0 -195
- package/dist/src/cli.js.map +0 -1
- package/dist/src/commands/account.js +0 -171
- package/dist/src/commands/account.js.map +0 -1
- package/dist/src/commands/agent.js +0 -338
- package/dist/src/commands/agent.js.map +0 -1
- package/dist/src/commands/authority.js +0 -634
- package/dist/src/commands/authority.js.map +0 -1
- package/dist/src/commands/mcp.js +0 -163
- package/dist/src/commands/mcp.js.map +0 -1
- package/dist/src/commands/services.js +0 -460
- package/dist/src/commands/services.js.map +0 -1
- package/dist/src/commands/session-writes.js +0 -196
- package/dist/src/commands/session-writes.js.map +0 -1
- package/dist/src/commands/sign.js +0 -311
- package/dist/src/commands/sign.js.map +0 -1
- package/dist/src/commands/system.js +0 -135
- package/dist/src/commands/system.js.map +0 -1
- package/dist/src/commands/tokens.js +0 -36
- package/dist/src/commands/tokens.js.map +0 -1
- package/dist/src/commands/utilities.js +0 -119
- package/dist/src/commands/utilities.js.map +0 -1
- package/dist/src/commands/wallet.js +0 -1013
- package/dist/src/commands/wallet.js.map +0 -1
- package/dist/src/commands/watch.js +0 -259
- package/dist/src/commands/watch.js.map +0 -1
- package/dist/src/completion.js +0 -69
- package/dist/src/completion.js.map +0 -1
- package/dist/src/config-store.js +0 -52
- package/dist/src/config-store.js.map +0 -1
- package/dist/src/context.js +0 -19
- package/dist/src/context.js.map +0 -1
- package/dist/src/errors.js +0 -116
- package/dist/src/errors.js.map +0 -1
- package/dist/src/help/examples.js +0 -904
- package/dist/src/help/examples.js.map +0 -1
- package/dist/src/help/format.js +0 -144
- package/dist/src/help/format.js.map +0 -1
- package/dist/src/help/groups.js +0 -39
- package/dist/src/help/groups.js.map +0 -1
- package/dist/src/install-method.js +0 -50
- package/dist/src/install-method.js.map +0 -1
- package/dist/src/mcp-snippets.js +0 -27
- package/dist/src/mcp-snippets.js.map +0 -1
- package/dist/src/outcome.js +0 -63
- package/dist/src/outcome.js.map +0 -1
- package/dist/src/package-version.js +0 -53
- package/dist/src/package-version.js.map +0 -1
- package/dist/src/parser.js +0 -48
- package/dist/src/parser.js.map +0 -1
- package/dist/src/progress.js +0 -56
- package/dist/src/progress.js.map +0 -1
- package/dist/src/prompt-doc.js +0 -92
- package/dist/src/prompt-doc.js.map +0 -1
- package/dist/src/render/accounts.js +0 -21
- package/dist/src/render/accounts.js.map +0 -1
- package/dist/src/render/activity.js +0 -34
- package/dist/src/render/activity.js.map +0 -1
- package/dist/src/render/agents.js +0 -42
- package/dist/src/render/agents.js.map +0 -1
- package/dist/src/render/balance.js +0 -85
- package/dist/src/render/balance.js.map +0 -1
- package/dist/src/render/banner.js +0 -17
- package/dist/src/render/banner.js.map +0 -1
- package/dist/src/render/chains.js +0 -52
- package/dist/src/render/chains.js.map +0 -1
- package/dist/src/render/colors.js +0 -50
- package/dist/src/render/colors.js.map +0 -1
- package/dist/src/render/gas.js +0 -34
- package/dist/src/render/gas.js.map +0 -1
- package/dist/src/render/grant.js +0 -34
- package/dist/src/render/grant.js.map +0 -1
- package/dist/src/render/kv.js +0 -60
- package/dist/src/render/kv.js.map +0 -1
- package/dist/src/render/mandates.js +0 -111
- package/dist/src/render/mandates.js.map +0 -1
- package/dist/src/render/print.js +0 -18
- package/dist/src/render/print.js.map +0 -1
- package/dist/src/render/redact.js +0 -23
- package/dist/src/render/redact.js.map +0 -1
- package/dist/src/render/table.js +0 -16
- package/dist/src/render/table.js.map +0 -1
- package/dist/src/repl.js +0 -232
- package/dist/src/repl.js.map +0 -1
- package/dist/src/review.js +0 -52
- package/dist/src/review.js.map +0 -1
- package/dist/src/run-installer.js +0 -30
- package/dist/src/run-installer.js.map +0 -1
- package/dist/src/settings.js +0 -88
- package/dist/src/settings.js.map +0 -1
- package/dist/src/update-check.js +0 -91
- package/dist/src/update-check.js.map +0 -1
- package/dist/src/validate.js +0 -138
- package/dist/src/validate.js.map +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import { runDiagnose, botanaryMcpHome, openBrowser } from 'botanary-mcp';
|
|
2
|
-
import { renderTable } from '../render/table.js';
|
|
3
|
-
import { colors, glyphs } from '../render/colors.js';
|
|
4
|
-
import { columns, section } from '../render/kv.js';
|
|
5
|
-
import { group, DOCS_URL } from '../help/groups.js';
|
|
6
|
-
import { CONFIG_KEYS, assertKnownKey, configPath, readConfig, validateEntry, writeConfig } from '../config-store.js';
|
|
7
|
-
import { step } from '../progress.js';
|
|
8
|
-
import { printResult } from '../render/print.js';
|
|
9
|
-
/** Which resolved setting each config key feeds, so `config list` can show the value actually in force. */
|
|
10
|
-
const KEY_TO_SETTING = {
|
|
11
|
-
chainId: 'chain',
|
|
12
|
-
accountId: 'account',
|
|
13
|
-
apiUrl: 'apiUrl',
|
|
14
|
-
output: 'json',
|
|
15
|
-
color: 'color',
|
|
16
|
-
confirm: 'yes',
|
|
17
|
-
};
|
|
18
|
-
export function registerSystemCommands(program, cliVersion) {
|
|
19
|
-
const diagnoseAction = async () => {
|
|
20
|
-
const ctx = program.opts().__ctx;
|
|
21
|
-
const report = await step(ctx, 'Checking what is blocking the next step', () => runDiagnose(ctx.runtime));
|
|
22
|
-
if (ctx.json || ctx.raw) {
|
|
23
|
-
console.log(ctx.json ? JSON.stringify(report) : JSON.stringify(report, null, 2));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
console.log(report.summary);
|
|
27
|
-
for (const blocker of report.blockers) {
|
|
28
|
-
console.log(blocker.severity === 'blocking' ? glyphs.danger(blocker.detail) : glyphs.warning(blocker.detail));
|
|
29
|
-
console.log(` ${blocker.nextAction}`);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
group(program
|
|
33
|
-
.command('diagnose')
|
|
34
|
-
.description('Start here when anything is unclear or an action failed')
|
|
35
|
-
.action(diagnoseAction), 'System');
|
|
36
|
-
// Every CLI in this space calls it `doctor`, so that is what people type. Same action, not a wrapper
|
|
37
|
-
// that could drift.
|
|
38
|
-
group(program.command('doctor').description('The same readiness check as diagnose').action(diagnoseAction), 'System');
|
|
39
|
-
const config = group(program
|
|
40
|
-
.command('config')
|
|
41
|
-
.description('Where identity and session live, and this machine\'s CLI defaults')
|
|
42
|
-
.action(() => {
|
|
43
|
-
const ctx = program.opts().__ctx;
|
|
44
|
-
const rows = [
|
|
45
|
-
['home', botanaryMcpHome()],
|
|
46
|
-
['config file', configPath()],
|
|
47
|
-
['BOTANARY_API_URL', process.env.BOTANARY_API_URL ?? '(not set, defaults to https://api.app.botanary.xyz)'],
|
|
48
|
-
['api url in use', ctx.settings.apiUrl ?? 'https://api.app.botanary.xyz'],
|
|
49
|
-
['cli-version', cliVersion],
|
|
50
|
-
];
|
|
51
|
-
if (ctx.json) {
|
|
52
|
-
console.log(JSON.stringify(Object.fromEntries(rows)));
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
console.log(renderTable(rows));
|
|
56
|
-
}), 'System');
|
|
57
|
-
config
|
|
58
|
-
.command('list')
|
|
59
|
-
.description('Every setting, its value, and where that value came from')
|
|
60
|
-
.action(async () => {
|
|
61
|
-
const ctx = program.opts().__ctx;
|
|
62
|
-
const file = await readConfig();
|
|
63
|
-
const settings = ctx.settings;
|
|
64
|
-
const rows = CONFIG_KEYS.map((key) => {
|
|
65
|
-
const settingName = KEY_TO_SETTING[key];
|
|
66
|
-
return [
|
|
67
|
-
key,
|
|
68
|
-
String(file[key] ?? '-'),
|
|
69
|
-
String(settings[settingName] ?? '-'),
|
|
70
|
-
// The whole point of this command: a stored value that overrides nothing looks identical to one
|
|
71
|
-
// silently retargeting every command, unless the source is shown.
|
|
72
|
-
ctx.settings.provenance[settingName] ?? 'default',
|
|
73
|
-
];
|
|
74
|
-
});
|
|
75
|
-
if (ctx.json) {
|
|
76
|
-
console.log(JSON.stringify(rows.map(([k, stored, inForce, from]) => ({ key: k, stored, inForce, from }))));
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
console.log([section('Config'), columns(['KEY', 'STORED', 'IN FORCE', 'FROM'], rows), colors.dim(` ${configPath()}`)].join('\n'));
|
|
80
|
-
});
|
|
81
|
-
config
|
|
82
|
-
.command('get <key>')
|
|
83
|
-
.description('Print one stored config value')
|
|
84
|
-
.action(async (key) => {
|
|
85
|
-
const ctx = program.opts().__ctx;
|
|
86
|
-
const narrowed = assertKnownKey(key);
|
|
87
|
-
const file = await readConfig();
|
|
88
|
-
const value = file[narrowed];
|
|
89
|
-
console.log(ctx.json ? JSON.stringify({ key: narrowed, value: value ?? null }) : (value ?? '(unset)'));
|
|
90
|
-
});
|
|
91
|
-
config
|
|
92
|
-
.command('set <key> <value>')
|
|
93
|
-
.description('Store a default for one setting')
|
|
94
|
-
.action(async (key, value) => {
|
|
95
|
-
const ctx = program.opts().__ctx;
|
|
96
|
-
const entry = validateEntry(key, value);
|
|
97
|
-
const next = { ...(await readConfig()), [entry.key]: entry.value };
|
|
98
|
-
await writeConfig(next);
|
|
99
|
-
console.log(ctx.json ? JSON.stringify({ key: entry.key, value: entry.value }) : glyphs.success(`${entry.key} = ${entry.value}`));
|
|
100
|
-
});
|
|
101
|
-
config
|
|
102
|
-
.command('unset <key>')
|
|
103
|
-
.description('Remove one stored default')
|
|
104
|
-
.action(async (key) => {
|
|
105
|
-
const ctx = program.opts().__ctx;
|
|
106
|
-
const narrowed = assertKnownKey(key);
|
|
107
|
-
const next = { ...(await readConfig()) };
|
|
108
|
-
delete next[narrowed];
|
|
109
|
-
await writeConfig(next);
|
|
110
|
-
console.log(ctx.json ? JSON.stringify({ key: narrowed, value: null }) : glyphs.success(`${narrowed} unset`));
|
|
111
|
-
});
|
|
112
|
-
group(program
|
|
113
|
-
.command('version')
|
|
114
|
-
.description('Print the installed botanary CLI version')
|
|
115
|
-
.action(() => {
|
|
116
|
-
const ctx = program.opts().__ctx;
|
|
117
|
-
printResult(ctx, { version: cliVersion }, () => cliVersion);
|
|
118
|
-
}), 'Utilities');
|
|
119
|
-
group(program
|
|
120
|
-
.command('docs [topic]')
|
|
121
|
-
.description('Open the Botanary documentation in your browser')
|
|
122
|
-
.action(async (topic) => {
|
|
123
|
-
const ctx = program.opts().__ctx;
|
|
124
|
-
// A topic becomes a docs path directly. No invented topic map: an unrecognised one lands on the
|
|
125
|
-
// docs site's own 404, which is a truthful answer rather than a guess at where it moved.
|
|
126
|
-
const url = topic ? `${DOCS_URL}/docs/${encodeURIComponent(topic)}` : DOCS_URL;
|
|
127
|
-
const opened = await openBrowser(url);
|
|
128
|
-
if (ctx.json) {
|
|
129
|
-
console.log(JSON.stringify({ url, opened }));
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
console.log(opened ? glyphs.success(`Opened ${url}`) : glyphs.info(`Docs: ${url}`));
|
|
133
|
-
}), 'Utilities');
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=system.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","sourceRoot":"","sources":["../../../src/commands/system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AACrI,OAAO,EAAE,IAAI,EAAE,M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AE,EAAE;QAC/B,MAAM,GAAG,GAAe,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;QAC7C,gGAAgG;QAChG,yFAAyF;QACzF,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,SAAS,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC/E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;YAC7C,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,CAAC;IACtF,CAAC,CAAC,EACJ,WAAW,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { group } from '../help/groups.js';
|
|
2
|
-
import { step } from '../progress.js';
|
|
3
|
-
import { printResult } from '../render/print.js';
|
|
4
|
-
import { columns, dash } from '../render/kv.js';
|
|
5
|
-
import { colors } from '../render/colors.js';
|
|
6
|
-
import { findChain, tokenChoicesFor } from '../validate.js';
|
|
7
|
-
import { notLoggedIn } from '../errors.js';
|
|
8
|
-
/**
|
|
9
|
-
* The discovery surface an address-only `--token` requires. Without this command, "pass the contract
|
|
10
|
-
* address" is an instruction to go and find one somewhere else - a usage error, not a usable CLI. This is
|
|
11
|
-
* the thing `send`'s symbol refusal points at, and the thing a person runs first when they only know a
|
|
12
|
-
* token by its ticker.
|
|
13
|
-
*/
|
|
14
|
-
export function registerTokenCommands(program) {
|
|
15
|
-
group(program
|
|
16
|
-
.command('tokens')
|
|
17
|
-
.description('Every token this account holds on a chain, with the address you need to send it')
|
|
18
|
-
.option('--chain-id <chainId>', 'Chain to list - see `botanary chains`')
|
|
19
|
-
.argument('[query]', 'Optional filter on symbol or name')
|
|
20
|
-
.action(async (query, opts) => {
|
|
21
|
-
const ctx = program.opts().__ctx;
|
|
22
|
-
const session = await ctx.runtime.walletSession();
|
|
23
|
-
if (!session)
|
|
24
|
-
throw notLoggedIn();
|
|
25
|
-
const token = session.sessionToken;
|
|
26
|
-
const chains = await step(ctx, 'Reading chains', () => ctx.runtime.api.get('/v1/chains', token));
|
|
27
|
-
const chain = findChain(chains, opts.chainId ?? ctx.chain);
|
|
28
|
-
const balance = await step(ctx, 'Reading balances', () => ctx.runtime.api.get('/v1/balance', token));
|
|
29
|
-
const q = query?.toLowerCase();
|
|
30
|
-
const rows = tokenChoicesFor(balance, chain.chainId ?? Number.NaN).filter((t) => !q || t.symbol.toLowerCase().includes(q) || (t.name ?? '').toLowerCase().includes(q));
|
|
31
|
-
printResult(ctx, { chainId: chain.chainId, chainKey: chain.key, tokens: rows }, () => rows.length === 0
|
|
32
|
-
? colors.muted(`This account holds nothing on ${chain.name}.`)
|
|
33
|
-
: columns(['SYMBOL', 'ADDRESS', 'DP', 'AMOUNT', 'SOURCE'], rows.map((t) => [t.symbol, t.address, String(t.decimals), dash(t.amount), t.source ?? '-'])));
|
|
34
|
-
}), 'Wallet');
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=tokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../src/commands/tokens.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,iB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,IAAI,GAAG,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CACvE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAC5F,CAAC;QAEF,WAAW,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CACnF,IAAI,CAAC,MAAM,KAAK,CAAC;YACf,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,KAAK,CAAC,IAAI,GAAG,CAAC;YAC9D,CAAC,CAAC,OAAO,CACL,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAC/C,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAC5F,CACN,CAAC;IACJ,CAAC,CAAC,EACJ,QAAQ,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import * as clack from '@clack/prompts';
|
|
2
|
-
import { CliError, EXIT, invalidArgs } from '../errors.js';
|
|
3
|
-
import { detectInstall } from '../install-method.js';
|
|
4
|
-
import { runInstaller } from '../run-installer.js';
|
|
5
|
-
import { group } from '../help/groups.js';
|
|
6
|
-
import { SHELLS, completionScript } from '../completion.js';
|
|
7
|
-
import { promptDoc } from '../prompt-doc.js';
|
|
8
|
-
import { step } from '../progress.js';
|
|
9
|
-
import { glyphs } from '../render/colors.js';
|
|
10
|
-
import { checkForUpdate, nagLine } from '../update-check.js';
|
|
11
|
-
export function registerUtilityCommands(program, cliVersion) {
|
|
12
|
-
group(program
|
|
13
|
-
.command('completion <shell>')
|
|
14
|
-
.description(`Print a shell completion script (${SHELLS.join(', ')})`)
|
|
15
|
-
.action((shell) => {
|
|
16
|
-
// Written to stdout raw, with no glyphs or color: its destination is a shell profile.
|
|
17
|
-
process.stdout.write(completionScript(shell, program));
|
|
18
|
-
}), 'Utilities');
|
|
19
|
-
group(program
|
|
20
|
-
.command('prompt')
|
|
21
|
-
.description('Print the full operating manual for an automation driving this CLI')
|
|
22
|
-
.action(() => {
|
|
23
|
-
const ctx = program.opts().__ctx;
|
|
24
|
-
const doc = promptDoc(program, cliVersion);
|
|
25
|
-
if (ctx.json) {
|
|
26
|
-
console.log(JSON.stringify({ prompt: doc }));
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
process.stdout.write(doc);
|
|
30
|
-
}), 'Utilities');
|
|
31
|
-
group(program
|
|
32
|
-
.command('update-check')
|
|
33
|
-
.description('Check whether a newer botanary is published')
|
|
34
|
-
.action(async () => {
|
|
35
|
-
const ctx = program.opts().__ctx;
|
|
36
|
-
const result = await step(ctx, 'Asking npm', () => checkForUpdate(cliVersion, { fetchImpl: fetch, now: () => Date.now(), force: true }));
|
|
37
|
-
if (ctx.json) {
|
|
38
|
-
console.log(JSON.stringify(result));
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (result.latest === null) {
|
|
42
|
-
console.log(glyphs.info('Could not reach the npm registry. Nothing changed.'));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
console.log(result.newer
|
|
46
|
-
? glyphs.warning(nagLine(result.latest, cliVersion, detectInstall(process.env)))
|
|
47
|
-
: glyphs.success(`Up to date (${cliVersion}).`));
|
|
48
|
-
}), 'Utilities');
|
|
49
|
-
group(program
|
|
50
|
-
.command('update')
|
|
51
|
-
.description('Update botanary to the latest published version')
|
|
52
|
-
.action(async () => {
|
|
53
|
-
const ctx = program.opts().__ctx;
|
|
54
|
-
const result = await step(ctx, 'Asking npm', () => checkForUpdate(cliVersion, { fetchImpl: fetch, now: () => Date.now(), force: true }));
|
|
55
|
-
const method = detectInstall(process.env);
|
|
56
|
-
if (result.latest === null) {
|
|
57
|
-
throw new CliError('Could not reach the npm registry. Nothing changed.', 'upstream_unavailable', EXIT.upstream, 'Check your connection and try again.');
|
|
58
|
-
}
|
|
59
|
-
if (!result.newer) {
|
|
60
|
-
if (ctx.json) {
|
|
61
|
-
console.log(JSON.stringify({ ...result, manager: method.manager, command: method.command, updated: false }));
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
console.log(glyphs.success(`Up to date (${cliVersion}).`));
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (!method.updatable || method.command === null) {
|
|
68
|
-
if (ctx.json) {
|
|
69
|
-
console.log(JSON.stringify({ ...result, manager: method.manager, command: null, updated: false }));
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
console.log(glyphs.info(`${cliVersion} is behind ${result.latest}. ${method.reason}`));
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const printable = method.command.join(' ');
|
|
76
|
-
// Before the consent gate: `--dry-run` is the escape hatch README.md promises stays available
|
|
77
|
-
// even when `confirm: never` is configured, so it must win before anything asks for --yes or
|
|
78
|
-
// installs anything. Same JSON shape the rest of this command already uses, just `updated: false`.
|
|
79
|
-
if (ctx.dryRun) {
|
|
80
|
-
if (ctx.json) {
|
|
81
|
-
// `dryRun: true` is what makes this payload honest. Without it a caller cannot tell a dry
|
|
82
|
-
// run from "nothing needed doing" - both carry `updated: false`. Every other dry-run in this
|
|
83
|
-
// CLI marks itself the same way, via review.ts's dryRunPayload.
|
|
84
|
-
console.log(JSON.stringify({ ...result, dryRun: true, manager: method.manager, command: method.command, updated: false }));
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
console.log(glyphs.info(`Would run \`${printable}\` (${method.manager}). Dry run - nothing was changed.`));
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
if (!ctx.yes) {
|
|
91
|
-
if (ctx.json || !ctx.interactive) {
|
|
92
|
-
throw invalidArgs(`botanary ${cliVersion} is behind ${result.latest}, and updating runs \`${printable}\`. Pass --yes to confirm non-interactively.`);
|
|
93
|
-
}
|
|
94
|
-
console.log(`${cliVersion} to ${result.latest}, installed with ${method.manager}.`);
|
|
95
|
-
const answer = await clack.confirm({ message: `Run \`${printable}\`?`, initialValue: false });
|
|
96
|
-
if (answer !== true) {
|
|
97
|
-
console.log(glyphs.info('Cancelled - nothing was changed.'));
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
// Build every line BEFORE spawning. The installer rewrites this package's dist/ while this very
|
|
102
|
-
// process is still running, and Node resolves modules lazily, so anything first imported after
|
|
103
|
-
// the swap could be read from a half-written tree. Past this point: no imports, no helpers that
|
|
104
|
-
// might not already be resident, nothing but writing strings that already exist.
|
|
105
|
-
const successLine = ctx.json
|
|
106
|
-
? JSON.stringify({ ...result, manager: method.manager, command: method.command, updated: true })
|
|
107
|
-
: glyphs.success(`Updated ${cliVersion} to ${result.latest}.`);
|
|
108
|
-
const failureMessage = `\`${printable}\` failed. Nothing was changed.`;
|
|
109
|
-
// Under --json, stdout IS the response payload - silence the child's own stdout so npm's
|
|
110
|
-
// `added 1 package in 2s` cannot land ahead of the JSON line and break a `| jq` pipe. The human
|
|
111
|
-
// path keeps npm's progress inherited as before.
|
|
112
|
-
const code = await runInstaller(method.command, { silent: ctx.json });
|
|
113
|
-
if (code !== 0) {
|
|
114
|
-
throw new CliError(failureMessage, 'update_failed', EXIT.error, 'Run it yourself to see the installer output.');
|
|
115
|
-
}
|
|
116
|
-
console.log(successLine);
|
|
117
|
-
}), 'Utilities');
|
|
118
|
-
}
|
|
119
|
-
//# sourceMappingURL=utilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../src/commands/utilities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,UAAU,uBAAuB,CAAC,OAAgB,EAAE,UAAkB;IAC1E,KAAK,CACH,OAAO;SACJ,OAAO,CAAC,oBAAoB,CAAC;SAC7B,WAAW,CAAC,oCAAoC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;SACrE,MAAM,CAAC,CAAC,KAAa,EAAE,EAAE;QACxB,sFAAsF;QACtF,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,CAAC,CAAC,EACJ,WAAW,CACZ,CAAC;IAEF,KAAK,CACH,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,oEAAoE,CAAC;SACjF,MAAM,CAAC,GAAG,EAA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