create-terminatui 0.0.2 → 0.0.4
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
package/template/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
1
|
import {
|
|
3
2
|
Command,
|
|
4
3
|
type CommandResult,
|
|
5
4
|
type CommandExecutionContext,
|
|
6
5
|
type OptionSchema,
|
|
7
6
|
type OptionValues,
|
|
8
|
-
JsonHighlight,
|
|
9
7
|
AppContext,
|
|
10
8
|
} from "@pablozaiden/terminatui";
|
|
11
9
|
|
|
@@ -67,7 +65,7 @@ export class GreetCommand extends Command<typeof greetOptions> {
|
|
|
67
65
|
|
|
68
66
|
const greeting = Array(times).fill(message).join("\n");
|
|
69
67
|
|
|
70
|
-
AppContext.current.logger.
|
|
68
|
+
AppContext.current.logger.trace(`Message content: ${greeting}`);
|
|
71
69
|
|
|
72
70
|
return {
|
|
73
71
|
success: true,
|
|
@@ -76,10 +74,6 @@ export class GreetCommand extends Command<typeof greetOptions> {
|
|
|
76
74
|
};
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
override renderResult(result: CommandResult): ReactNode {
|
|
80
|
-
return JsonHighlight({ value: result.data });
|
|
81
|
-
}
|
|
82
|
-
|
|
83
77
|
override getClipboardContent(result: CommandResult): string | undefined {
|
|
84
78
|
const data = result.data as { greeting?: string } | undefined;
|
|
85
79
|
return data?.greeting;
|