poe-code 3.0.218 → 3.0.219

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": "poe-code",
3
- "version": "3.0.218",
3
+ "version": "3.0.219",
4
4
  "description": "CLI tool to configure Poe API for developer workflows.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,4 +1,5 @@
1
1
  import type { CommandInfo, FormatColumnsOptions, OptionInfo } from "./help-formatter.js";
2
+ export declare function stripAnsi(value: string): string;
2
3
  export declare function formatColumns(opts: FormatColumnsOptions): string;
3
4
  export declare function formatCommandList(commands: CommandInfo[]): string;
4
5
  export declare function formatOptionList(options: OptionInfo[]): string;
@@ -1,4 +1,4 @@
1
- function stripAnsi(value) {
1
+ export function stripAnsi(value) {
2
2
  let output = "";
3
3
  for (let index = 0; index < value.length; index += 1) {
4
4
  if (value[index] === "\u001b") {
@@ -10,6 +10,7 @@ export declare const text: {
10
10
  readonly usageCommand: (content: string) => string;
11
11
  readonly link: (content: string) => string;
12
12
  readonly muted: (content: string) => string;
13
+ readonly error: (content: string) => string;
13
14
  readonly badge: (content: string) => string;
14
15
  readonly selectLabel: (label: string, detail?: string) => string;
15
16
  };
@@ -91,6 +91,14 @@ export const text = {
91
91
  return `*${content}*`;
92
92
  return getTheme().muted(content);
93
93
  },
94
+ error(content) {
95
+ const format = resolveOutputFormat();
96
+ if (format === "json")
97
+ return content;
98
+ if (format === "markdown")
99
+ return `**${content}**`;
100
+ return getTheme().error(content);
101
+ },
94
102
  badge(content) {
95
103
  const format = resolveOutputFormat();
96
104
  if (format === "json")