@upshiftfinance/cli 0.1.8 → 0.1.10
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/lib/commands/docs.js +37 -50
- package/package.json +3 -3
package/lib/commands/docs.js
CHANGED
|
@@ -5,19 +5,18 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const flags_1 = require("../lib/flags");
|
|
6
6
|
const output_1 = require("../lib/output");
|
|
7
7
|
const DOC_SITES = {
|
|
8
|
-
august: 'https://docs.augustdigital.io',
|
|
9
8
|
upshift: 'https://docs.upshift.finance',
|
|
10
9
|
};
|
|
11
10
|
const DOC_INDEX = [
|
|
12
11
|
{
|
|
13
|
-
site: '
|
|
14
|
-
path: '/',
|
|
15
|
-
title: 'Upshift
|
|
16
|
-
keywords: ['overview', 'introduction', 'getting started', '
|
|
12
|
+
site: 'upshift',
|
|
13
|
+
path: '/about-upshift',
|
|
14
|
+
title: 'About Upshift',
|
|
15
|
+
keywords: ['overview', 'introduction', 'getting started', 'about'],
|
|
17
16
|
},
|
|
18
17
|
{
|
|
19
|
-
site: '
|
|
20
|
-
path: '/
|
|
18
|
+
site: 'upshift',
|
|
19
|
+
path: '/vault-architecture/overview',
|
|
21
20
|
title: 'Protocol Overview',
|
|
22
21
|
keywords: [
|
|
23
22
|
'protocol',
|
|
@@ -31,80 +30,68 @@ const DOC_INDEX = [
|
|
|
31
30
|
],
|
|
32
31
|
},
|
|
33
32
|
{
|
|
34
|
-
site: '
|
|
35
|
-
path: '/
|
|
36
|
-
title: '
|
|
37
|
-
keywords: ['twap', 'time-weighted', 'trading'],
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
site: 'august',
|
|
41
|
-
path: '/smart-contracts/risks-and-audits',
|
|
42
|
-
title: 'Risks and Audits',
|
|
33
|
+
site: 'upshift',
|
|
34
|
+
path: '/resources/audits',
|
|
35
|
+
title: 'Audits & Risk',
|
|
43
36
|
keywords: ['risks', 'audits', 'security', 'smart contracts'],
|
|
44
37
|
},
|
|
45
38
|
{
|
|
46
|
-
site: '
|
|
47
|
-
path: '/
|
|
39
|
+
site: 'upshift',
|
|
40
|
+
path: '/contracts/addresses',
|
|
48
41
|
title: 'Contract Addresses',
|
|
49
42
|
keywords: ['contract', 'addresses', 'deployed', 'onchain'],
|
|
50
43
|
},
|
|
51
44
|
{
|
|
52
|
-
site: '
|
|
53
|
-
path: '/
|
|
54
|
-
title: 'API
|
|
45
|
+
site: 'upshift',
|
|
46
|
+
path: '/rest-api',
|
|
47
|
+
title: 'REST API',
|
|
55
48
|
keywords: ['api', 'reference', 'rest', 'http', 'endpoint'],
|
|
56
49
|
},
|
|
57
50
|
{
|
|
58
|
-
site: '
|
|
59
|
-
path: '/
|
|
60
|
-
title: '
|
|
51
|
+
site: 'upshift',
|
|
52
|
+
path: '/sdk',
|
|
53
|
+
title: 'SDK Overview',
|
|
61
54
|
keywords: ['typescript', 'sdk', 'javascript', 'npm', 'install'],
|
|
62
55
|
},
|
|
63
56
|
{
|
|
64
|
-
site: '
|
|
65
|
-
path: '/
|
|
66
|
-
title: '
|
|
57
|
+
site: 'upshift',
|
|
58
|
+
path: '/sdk/quick-start',
|
|
59
|
+
title: 'SDK Quick Start',
|
|
67
60
|
keywords: ['javascript', 'sdk', 'browser', 'node'],
|
|
68
61
|
},
|
|
69
62
|
{
|
|
70
|
-
site: '
|
|
71
|
-
path: '/
|
|
72
|
-
title: 'Code Examples',
|
|
73
|
-
keywords: ['examples', 'code', 'tutorial', 'quickstart'],
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
site: 'august',
|
|
77
|
-
path: '/developers/code-examples/evm-actions',
|
|
63
|
+
site: 'upshift',
|
|
64
|
+
path: '/sdk/evm-actions',
|
|
78
65
|
title: 'EVM Actions',
|
|
79
66
|
keywords: ['evm', 'deposit', 'withdraw', 'approve', 'actions'],
|
|
80
67
|
},
|
|
81
68
|
{
|
|
82
|
-
site: '
|
|
83
|
-
path: '/
|
|
69
|
+
site: 'upshift',
|
|
70
|
+
path: '/sdk/solana-actions',
|
|
84
71
|
title: 'Solana Actions',
|
|
85
72
|
keywords: ['solana', 'deposit', 'withdraw', 'actions'],
|
|
86
73
|
},
|
|
87
74
|
{
|
|
88
|
-
site: '
|
|
89
|
-
path: '/
|
|
75
|
+
site: 'upshift',
|
|
76
|
+
path: '/sdk/stellar-actions',
|
|
90
77
|
title: 'Stellar Actions',
|
|
91
78
|
keywords: ['stellar', 'deposit', 'withdraw', 'soroban'],
|
|
92
79
|
},
|
|
93
80
|
{
|
|
94
|
-
site: '
|
|
95
|
-
path: '/
|
|
81
|
+
site: 'upshift',
|
|
82
|
+
path: '/sdk/changelog',
|
|
96
83
|
title: 'SDK Changelog',
|
|
97
84
|
keywords: ['changelog', 'updates', 'versions', 'release'],
|
|
98
85
|
},
|
|
99
86
|
{
|
|
100
|
-
site: '
|
|
101
|
-
path: '/
|
|
87
|
+
site: 'upshift',
|
|
88
|
+
path: '/cli',
|
|
102
89
|
title: 'CLI Reference',
|
|
103
|
-
keywords: ['cli', 'command', 'terminal', '
|
|
90
|
+
keywords: ['cli', 'command', 'terminal', 'upshift'],
|
|
104
91
|
},
|
|
105
92
|
{
|
|
106
|
-
site: '
|
|
107
|
-
path: '/
|
|
93
|
+
site: 'upshift',
|
|
94
|
+
path: '/mcp',
|
|
108
95
|
title: 'MCP Server Reference',
|
|
109
96
|
keywords: ['mcp', 'model context protocol', 'claude', 'ai'],
|
|
110
97
|
},
|
|
@@ -348,7 +335,7 @@ function registerDocs(program) {
|
|
|
348
335
|
docs
|
|
349
336
|
.command('list')
|
|
350
337
|
.description('List all available documentation pages')
|
|
351
|
-
.option('--site <site>', 'Filter by site:
|
|
338
|
+
.option('--site <site>', 'Filter by site: upshift, or all (default: all)', 'all')
|
|
352
339
|
.action(async function () {
|
|
353
340
|
const flags = (0, flags_1.readGlobalFlags)(this);
|
|
354
341
|
const opts = this.opts();
|
|
@@ -366,7 +353,7 @@ function registerDocs(program) {
|
|
|
366
353
|
docs
|
|
367
354
|
.command('search <query>')
|
|
368
355
|
.description('Find documentation pages matching a keyword query')
|
|
369
|
-
.option('--site <site>', 'Filter by site:
|
|
356
|
+
.option('--site <site>', 'Filter by site: upshift, or all (default: all)', 'all')
|
|
370
357
|
.option('--limit <n>', 'Max results to return (default: 5)', '5')
|
|
371
358
|
.action(async function (query) {
|
|
372
359
|
const flags = (0, flags_1.readGlobalFlags)(this);
|
|
@@ -395,8 +382,8 @@ function registerDocs(program) {
|
|
|
395
382
|
.description('Verify a documentation page exists and print its URL')
|
|
396
383
|
.action(async function (site, path) {
|
|
397
384
|
const flags = (0, flags_1.readGlobalFlags)(this);
|
|
398
|
-
if (site !== '
|
|
399
|
-
throw new Error(`Unknown site "${site}". Use "
|
|
385
|
+
if (site !== 'upshift') {
|
|
386
|
+
throw new Error(`Unknown site "${site}". Use "upshift".`);
|
|
400
387
|
}
|
|
401
388
|
await (0, output_1.runCommand)('docs.open', DocsFetchSchema, flags, async () => {
|
|
402
389
|
const { title, wordCount, url } = await fetchAndStrip(site, path);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upshiftfinance/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"bin": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"kleur": "^4.1.5",
|
|
43
43
|
"update-notifier": "^5.1.0",
|
|
44
44
|
"zod": "^3.23.0",
|
|
45
|
-
"@upshiftfinance/sdk": "0.
|
|
46
|
-
"@upshiftfinance/config": "0.1.
|
|
45
|
+
"@upshiftfinance/sdk": "0.8.0",
|
|
46
|
+
"@upshiftfinance/config": "0.1.9"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jest": "^30.0.0",
|