this repo has no description
0
fork

Configure Feed

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

Rename create and delete commands to setup and clear

futur 3819feec c1bdc57c

+6 -6
+6 -6
src/bin.ts
··· 18 18 19 19 const idResolver = new IdResolver(); 20 20 21 - if (command === "create" || command === "delete") { 21 + if (command === "setup" || command === "clear") { 22 22 const { did, password, pds } = await promptAuthInfo(); 23 23 24 24 const { endpoint, privateKey } = await prompt([{ 25 - type: command === "create" ? "text" : undefined, 25 + type: command === "setup" ? "text" : undefined, 26 26 name: "endpoint", 27 27 message: "URL where the labeler will be hosted:", 28 28 validate: (value) => value.startsWith("https://") || "Must be a valid HTTPS URL.", ··· 42 42 }, { onCancel: () => process.exit(1) }); 43 43 44 44 try { 45 - if (command === "create") { 45 + if (command === "setup") { 46 46 const operation = await plcSetupLabeler({ 47 47 did, 48 48 password, ··· 77 77 } else { 78 78 await plcClearLabeler({ did, password, pds, plcToken }); 79 79 await deleteLabelerDeclaration({ identifier: did, password, pds }); 80 - console.log("Labeler account restored to normal."); 80 + console.log("Labeler data cleared."); 81 81 } 82 82 } catch (error) { 83 83 console.error("Error setting up labeler:", error); ··· 120 120 } else { 121 121 console.log("Usage: npx @skyware/labeler [command]"); 122 122 console.log("Commands:"); 123 - console.log(" create - Initialize an account as a labeler."); 124 - console.log(" delete - Restore a labeler account to normal."); 123 + console.log(" setup - Initialize an account as a labeler."); 124 + console.log(" clear - Restore a labeler account to normal."); 125 125 console.log(" label add - Add new label declarations to a labeler account."); 126 126 console.log(" label delete - Remove label declarations from a labeler account."); 127 127 }