builder.io 1.6.28 → 1.6.29

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/types/types.d.ts CHANGED
@@ -10,6 +10,7 @@ export interface DevToolsPath {
10
10
  resolve: (...pathSegments: string[]) => string;
11
11
  }
12
12
  export interface RepoInfo {
13
+ hasGit: boolean;
13
14
  remoteUrl: string;
14
15
  defaultBranch: string;
15
16
  currentBranch: string;
File without changes
@@ -1,86 +0,0 @@
1
- import { type SelectOptions, type ConfirmOptions, type TextOptions } from "@clack/prompts";
2
- import { spinner } from "./spinner";
3
- import type { WebSocket } from "ws";
4
- export interface IOService {
5
- log(str: string): void;
6
- info(str: string): void;
7
- warn(str: string): void;
8
- error(str: string): void;
9
- write(text: string): void;
10
- writeMetadata(metadata: Record<string, any>): void;
11
- confirm(options: ConfirmOptions): Promise<boolean | symbol>;
12
- text(options: TextOptions): Promise<string | symbol>;
13
- select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
14
- createSpinner(): ReturnType<typeof spinner>;
15
- isInteractive(): boolean;
16
- isTTY(): boolean;
17
- exit(code: number): Promise<void>;
18
- }
19
- export declare class ConsoleIOService implements IOService {
20
- log(str: string): void;
21
- info(str: string): void;
22
- warn(str: string): void;
23
- error(str: string): void;
24
- write(text: string): void;
25
- writeMetadata(_: Record<string, any>): void;
26
- confirm(options: ConfirmOptions): Promise<boolean | symbol>;
27
- text(options: TextOptions): Promise<string | symbol>;
28
- select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
29
- createSpinner(): ReturnType<typeof spinner>;
30
- isInteractive(): boolean;
31
- isTTY(): boolean;
32
- exit(code: number): Promise<void>;
33
- }
34
- export interface BaseMessage {
35
- type: string;
36
- [key: string]: any;
37
- }
38
- export interface LogMessage extends BaseMessage {
39
- type: "log";
40
- level: "info" | "warn" | "error";
41
- message: string;
42
- }
43
- export interface WriteMessage extends BaseMessage {
44
- type: "write";
45
- text: string;
46
- }
47
- export interface SpinnerMessage extends BaseMessage {
48
- type: "spinner";
49
- status: "start" | "stop";
50
- message: string;
51
- code?: number;
52
- }
53
- export interface PromptRequest extends BaseMessage {
54
- type: "prompt";
55
- promptType: "text" | "confirm" | "select";
56
- options: any;
57
- requestId: string;
58
- }
59
- export interface PromptResponse extends BaseMessage {
60
- type: "prompt_response";
61
- requestId: string;
62
- value: any;
63
- cancelled?: boolean;
64
- }
65
- export declare class WebSocketIOService implements IOService {
66
- private ws;
67
- private promptCallbacks;
68
- private messageQueue;
69
- private isProcessing;
70
- constructor(ws: WebSocket);
71
- private sendMessage;
72
- private prompt;
73
- log(...args: any[]): void;
74
- info(...args: any[]): void;
75
- warn(...args: any[]): void;
76
- error(...args: any[]): void;
77
- write(text: string): void;
78
- writeMetadata(metadata: Record<string, any>): void;
79
- confirm(options: ConfirmOptions): Promise<boolean | symbol>;
80
- text(options: TextOptions): Promise<string | symbol>;
81
- select<Value>(options: SelectOptions<Value>): Promise<Value | symbol>;
82
- createSpinner(): ReturnType<typeof spinner>;
83
- isInteractive(): boolean;
84
- isTTY(): boolean;
85
- exit(code: number): Promise<void>;
86
- }