@openclaw-cn/cli 1.2.2 → 1.2.3
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/bin/claw.js +0 -0
- package/lib/commands/admin.js +14 -0
- package/package.json +1 -1
package/bin/claw.js
CHANGED
|
File without changes
|
package/lib/commands/admin.js
CHANGED
|
@@ -354,6 +354,20 @@ export default function(program) {
|
|
|
354
354
|
}
|
|
355
355
|
});
|
|
356
356
|
|
|
357
|
+
skill
|
|
358
|
+
.command('delete <id>')
|
|
359
|
+
.description('Delete a skill from the market')
|
|
360
|
+
.action(async (id) => {
|
|
361
|
+
const spinner = ora(`Deleting skill ${id}...`).start();
|
|
362
|
+
try {
|
|
363
|
+
const client = getClient();
|
|
364
|
+
await client.delete(`/admin/skills/${encodeURIComponent(id)}`);
|
|
365
|
+
spinner.succeed(chalk.green(`Skill ${id} deleted successfully!`));
|
|
366
|
+
} catch (err) {
|
|
367
|
+
spinner.fail(chalk.red(formatError(err)));
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
|
|
357
371
|
// Post Management
|
|
358
372
|
const post = admin.command('post').description('Manage posts');
|
|
359
373
|
|