slack-term 1.49.0 → 1.50.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slack-term",
3
- "version": "1.49.0",
3
+ "version": "1.50.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/snomiao/slack-term.git"
package/ts/ask.ts CHANGED
@@ -543,19 +543,19 @@ export type AskParsed =
543
543
  * the three causes have completely different fixes: wrong link, a body someone
544
544
  * edited, or a bug here. */
545
545
  export function askExplainReject(text: string): string {
546
- if (!text.trim()) return "本文が空です (bot 投稿や添付のみのメッセージかもしれません)";
546
+ if (!text.trim()) return "the message body is empty (it may be a bot post or an attachment-only message)";
547
547
  const lines = text.split("\n");
548
548
  const last = lines[lines.length - 1] ?? "";
549
549
  if (text.startsWith(ASK_RESOLVED_PREFIX)) {
550
- return "回答済みマーク付きですが、引用された回答本文が見つかりません";
550
+ return "it is marked answered, but the quoted answer text is missing";
551
551
  }
552
552
  if (!/_$/.test(last)) {
553
- return "末尾が `ask` の案内文ではありません — このメッセージは `slack ask` で投稿されたものではないか、本文が編集されています";
553
+ return "it does not end with the `ask` instructions line — this message was not posted by `slack ask`, or its text has been edited";
554
554
  }
555
555
  if (!lines[0]!.startsWith(ASK_MARKER_PREFIX) && !lines[0]!.startsWith("*")) {
556
- return "先頭が質問文 (太字) ではありません — 本文が編集されている可能性があります";
556
+ return "it does not start with the (bold) question — its text may have been edited";
557
557
  }
558
- return "選択肢の並びを読み取れません — 番号が 1 から連番になっていないか、本文が編集されています";
558
+ return "cannot read the list of choices — they are not numbered consecutively from 1, or the text has been edited";
559
559
  }
560
560
 
561
561
  export function askParseMessage(text: string): AskParsed {
package/ts/botIntent.ts CHANGED
@@ -33,7 +33,7 @@ export function isWriteCommand(path: (string | number)[]): boolean {
33
33
  /** Read-only modes of a write command. `ask --ls` only reads the local
34
34
  * sent-log and the questions' live state. (`ask --waitFor` and
35
35
  * `poll --results` are NOT here: both can edit the posted message.) */
36
- function isReadMode(path: (string | number)[], argv: Record<string, unknown>): boolean {
36
+ export function isReadMode(path: (string | number)[], argv: Record<string, unknown>): boolean {
37
37
  return String(path[0] ?? "") === "ask" && argv.ls === true;
38
38
  }
39
39