open source is social v-it.org
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: resolve merge conflicts from duplicate explore detail commands

Two branches independently added cap/skill detail commands and bare explore.
Kept feature branch implementations (with mergeExploreOpts for parent option
inheritance), removed duplicate HEAD versions, and deduplicated tests using
consistent nested JSON format (data.cap/data.skill) matching other explore
subcommands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+2 -54
+2 -2
src/cmd/explore.js
··· 113 113 } 114 114 115 115 if (opts.json) { 116 - jsonOk(data.cap); 116 + jsonOk(data); 117 117 return; 118 118 } 119 119 ··· 179 179 } 180 180 181 181 if (opts.json) { 182 - jsonOk(data.skill); 182 + jsonOk(data); 183 183 return; 184 184 } 185 185
-52
test/explore.test.js
··· 19 19 expect(typeof data.total_caps).toBe('number'); 20 20 }); 21 21 22 - test('cap detail returns JSON', () => { 23 - const result = run('explore cap network-content-seeding --json', '/tmp'); 24 - expect(result.exitCode).toBe(0); 25 - const data = JSON.parse(result.stdout); 26 - expect(data.ok).toBe(true); 27 - expect(data.title).toBe('Network Content Seeding'); 28 - expect(data.ref).toBe('network-content-seeding'); 29 - }); 30 - 31 - test('cap detail not found', () => { 32 - const result = run('explore cap nonexistent --json', '/tmp'); 33 - expect(result.exitCode).not.toBe(0); 34 - const data = JSON.parse(result.stdout); 35 - expect(data.ok).toBe(false); 36 - expect(data.error).toContain('no cap found'); 37 - }); 38 - 39 - test('cap detail with beacon', () => { 40 - const result = run( 41 - 'explore cap network-content-seeding --beacon vit:github.com/solpbc/vit --json', 42 - '/tmp', 43 - ); 44 - expect(result.exitCode).toBe(0); 45 - const data = JSON.parse(result.stdout); 46 - expect(data.ok).toBe(true); 47 - expect(data.beacon).toBe('vit:github.com/solpbc/vit'); 48 - }); 49 - 50 - test('skill detail returns JSON', () => { 51 - const result = run('explore skill atproto-records --json', '/tmp'); 52 - expect(result.exitCode).toBe(0); 53 - const data = JSON.parse(result.stdout); 54 - expect(data.ok).toBe(true); 55 - expect(data.name).toBe('atproto-records'); 56 - }); 57 - 58 - test('skill detail not found', () => { 59 - const result = run('explore skill nonexistent --json', '/tmp'); 60 - expect(result.exitCode).not.toBe(0); 61 - const data = JSON.parse(result.stdout); 62 - expect(data.ok).toBe(false); 63 - expect(data.error).toContain('no skill found'); 64 - }); 65 - 66 - test('bare explore returns stats JSON', () => { 67 - const result = run('explore --json', '/tmp'); 68 - expect(result.exitCode).toBe(0); 69 - const data = JSON.parse(result.stdout); 70 - expect(data.ok).toBe(true); 71 - expect(typeof data.total_caps).toBe('number'); 72 - }); 73 - 74 22 test('caps returns JSON', () => { 75 23 const result = run('explore caps --json --limit 2', '/tmp'); 76 24 expect(result.exitCode).toBe(0);