this repo has no description
0
fork

Configure Feed

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

CLI: Don't ask for endpoint and private key when not needed

futurGH f9a0002c 28daf605

+15 -12
+15 -12
src/bin.ts
··· 21 21 if (command === "setup" || command === "clear") { 22 22 const { did, password, pds } = await promptAuthInfo(); 23 23 24 - const { endpoint, privateKey } = await prompt([{ 25 - type: command === "setup" ? "text" : undefined, 26 - name: "endpoint", 27 - message: "URL where the labeler will be hosted:", 28 - validate: (value) => value.startsWith("https://") || "Must be a valid HTTPS URL.", 29 - }, { 30 - type: "text", 31 - name: "privateKey", 32 - message: "Enter a hex-encoded signing key to use, or leave blank to generate a new one:", 33 - validate: (value) => !value || /^[0-9a-f]*$/.test(value) || "Must be a hex-encoded string.", 34 - }], { onCancel: () => process.exit(1) }); 35 - 36 24 await plcRequestToken({ identifier: did, password, pds }); 37 25 38 26 const { plcToken } = await prompt({ ··· 43 31 44 32 if (command === "setup") { 45 33 try { 34 + const { endpoint, privateKey } = await prompt([{ 35 + type: "text", 36 + name: "endpoint", 37 + message: "URL where the labeler will be hosted:", 38 + validate: (value) => value.startsWith("https://") || "Must be a valid HTTPS URL.", 39 + }, { 40 + type: "text", 41 + name: "privateKey", 42 + message: 43 + "Enter a hex-encoded signing key to use, or leave blank to generate a new one:", 44 + 45 + validate: (value) => 46 + !value || /^[0-9a-f]*$/.test(value) || "Must be a hex-encoded string.", 47 + }], { onCancel: () => process.exit(1) }); 48 + 46 49 const operation = await plcSetupLabeler({ 47 50 did, 48 51 password,