Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit 24a45d2

Browse files
authored
fix: improve cli output and docs (#129)
1 parent f2156aa commit 24a45d2

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Commands:
100100
w3up info Print information about cli
101101
102102
Global:
103-
-p, --profile Select profile. [string] [default: "main"]
103+
-p, --profile Select profile configuration identifier. [string] [default: "main"]
104104
105105
Options:
106106
--version Show version number [boolean]
@@ -307,22 +307,22 @@ Once you have an identity registered with w3up, you can delegate capabilities to
307307
> Delegate capabilities to an agent did.
308308
309309
```sh
310-
w3up delegate did:12345...
311-
✔ Wrote delegation to delegation.car
310+
w3up delegate to did:12345...
311+
✔ Wrote delegation to delegation.txt
312312
```
313313

314-
A `delegation.car` file is generated with the UCAN delegation provided to the other agent with did `did:12345...`.
314+
A `delegation.txt` file is generated with the UCAN delegation provided to the other agent with did `did:12345...`.
315315

316316
#### `w3up delegate import <fileName> [alias]`
317317

318318
> Import a UCAN delegation file to access capabilities delegated by other agent
319319
320320
```sh
321-
w3up import-delegation delegation.car delegator
322-
✔ Imported delegation for delegator did:key:z6M... from delegation.car successfully.
321+
w3up import-delegation delegation.txt delegator
322+
✔ Imported delegation for delegator did:key:z6M... from delegation.txt successfully.
323323
```
324324

325-
Once a `delegation.car` is imported, you can switch to the account delegated:
325+
Once a `delegation.txt` is imported, you can switch to the account delegated:
326326

327327
#### `w3up delegate switch [alias]`
328328

src/commands/id.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const handler = async (args) => {
2424
saveSettings(client, args.profile)
2525

2626
view.succeed('Agent DID: ' + identity.agent.did())
27-
view.succeed('Account DID: ' + identity.account.did())
2827
}
2928
/**
3029
* @type {import('yargs').CommandBuilder} yargs

src/commands/upload.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ async function generateCarUploads(filePath, view, chunkSize = 512, profile) {
5656
throw new Error(uploadAddResult?.cause?.message)
5757
}
5858

59-
console.log('data CIDs:\n', roots.map((x) => x.toString()).join('\n'))
59+
console.log('upload chunk(s) identifier:\n', roots.map((x) => x.toString()).join('\n'))
6060
console.log('car CIDs:\n', cids.map((x) => x.toString()).join('\n'))
61+
62+
if (roots && roots.length) {
63+
console.log(`IPFS Gateway url:\n https://w3s.link/ipfs/${roots[0].toString()}`)
64+
}
6165
} catch (err) {
6266
view.fail('Upload did not complete successfully, check w3up-failure.log')
6367
logToFile('upload', err)

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const main = async (args = hideBin(process.argv)) => {
2828
.option('p', {
2929
alias: 'profile',
3030
type: 'string',
31-
describe: 'Select profile.',
31+
describe: 'Select profile configuration identifier.',
3232
default: 'main',
3333
})
3434
.group('profile', 'Global:')

0 commit comments

Comments
 (0)