@theholocron/cli 5.0.0-alpha.591 → 5.0.0-alpha.593

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/dist/cli.mjs CHANGED
@@ -293,6 +293,11 @@ const cleanupEmbedsEntry = {
293
293
  description: "Hide the link-preview cards under the messages already in a text channel, keeping the links",
294
294
  positionals: [],
295
295
  options: [{
296
+ key: "channel",
297
+ flag: "--channel",
298
+ type: "input",
299
+ message: "Which text channel (a name, with or without #; leave empty for alerts releases deploys sync):"
300
+ }, {
296
301
  key: "limit",
297
302
  flag: "--limit",
298
303
  type: "input",
@@ -6118,10 +6123,20 @@ const checkCommand = {
6118
6123
  handler: () => {}
6119
6124
  };
6120
6125
  // src/commands/cleanup-embeds/cleanup-embeds.args.ts
6121
- const cleanupEmbedsArgs = (y) => y.positional("channel", {
6126
+ const cleanupEmbedsArgs = (y) => y.option("channel", {
6127
+ type: "string",
6128
+ array: true,
6129
+ nargs: 1,
6130
+ alias: "c",
6131
+ describe: "A text channel to clean, with or without a leading # (repeat for more; default: alerts releases deploys sync)"
6132
+ }).positional("words", {
6122
6133
  type: "string",
6123
6134
  array: true,
6124
- describe: "The text channels to clean (default: alerts releases deploys sync)"
6135
+ hidden: true
6136
+ }).check((argv) => {
6137
+ const words = argv.words;
6138
+ if (words.length > 0) throw new Error(`cleanup embeds takes its channels with --channel, not as words (got: ${words.join(" ")}). Try: --channel ${words[0].replace(/^#/, "")}`);
6139
+ return true;
6125
6140
  }).option("limit", {
6126
6141
  type: "number",
6127
6142
  default: 200,
@@ -6381,7 +6396,7 @@ async function runCleanupEmbeds(input) {
6381
6396
  }
6382
6397
  // src/commands/cleanup-embeds/cleanup-embeds.command.ts
6383
6398
  const cleanupEmbedsCommand = {
6384
- command: "embeds [channel..]",
6399
+ command: "embeds [words..]",
6385
6400
  describe: "Hide the link-preview cards under the messages already in a text channel, keeping the links",
6386
6401
  builder: cleanupEmbedsArgs,
6387
6402
  handler: async (argv) => {