builder.io 1.7.4 → 1.7.6
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/cli/index.cjs +251 -251
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +72 -72
- package/server/index.mjs +70 -70
- package/types/cli/backup.d.ts +31 -0
- package/types/cli/codegen.d.ts +34 -2
- package/types/cli/launch/InitStateMachine.d.ts +2 -0
- package/types/cli/launch/dev-server-orchestrator.d.ts +3 -2
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DevToolsSys } from "../types";
|
|
2
|
+
import type { Credentials } from "./credentials";
|
|
3
|
+
import type { GitBackupDownloadUrlResult, GitBackupDownloadUrlOptions, GitBackupUploadUrlResult, GitBackupUploadUrlOptions, GitBackupRecordOptions, GitBackupRecordResult } from "$/ai-utils";
|
|
4
|
+
/**
|
|
5
|
+
* Requests a signed upload URL for git backup
|
|
6
|
+
*/
|
|
7
|
+
export declare function requestSignedUploadUrl(credentials: Credentials, body: GitBackupUploadUrlOptions): Promise<GitBackupUploadUrlResult>;
|
|
8
|
+
/**
|
|
9
|
+
* Requests a signed download URL for git backup
|
|
10
|
+
*/
|
|
11
|
+
export declare function requestSignedDownloadUrl(credentials: Credentials, body: GitBackupDownloadUrlOptions): Promise<GitBackupDownloadUrlResult>;
|
|
12
|
+
/**
|
|
13
|
+
* Records a successful git backup in Firebase
|
|
14
|
+
*/
|
|
15
|
+
export declare function recordBackupSuccess(credentials: Credentials, body: GitBackupRecordOptions): Promise<GitBackupRecordResult>;
|
|
16
|
+
/**
|
|
17
|
+
* Downloads a git backup bundle
|
|
18
|
+
* @returns The path to the downloaded bundle file, or null if no backup exists
|
|
19
|
+
*/
|
|
20
|
+
export declare function downloadGitBackup(sys: DevToolsSys, credentials: Credentials, options: GitBackupDownloadUrlOptions): Promise<{
|
|
21
|
+
success: boolean;
|
|
22
|
+
exists?: boolean;
|
|
23
|
+
bundlePath?: string;
|
|
24
|
+
bundleSize?: number;
|
|
25
|
+
error?: Error;
|
|
26
|
+
message?: string;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Uploads a file stream to a signed URL
|
|
30
|
+
*/
|
|
31
|
+
export declare function uploadFileStream(filePath: string, signedUrl: string, size: number): Promise<Response>;
|
package/types/cli/codegen.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type CodeGenEventEmitter = EventEmitter<{
|
|
|
44
44
|
export declare class CodeGenSession {
|
|
45
45
|
#private;
|
|
46
46
|
constructor(options: CodeGenSessionOptions);
|
|
47
|
+
get fusionConfig(): FusionConfig | undefined;
|
|
47
48
|
get workingDirectory(): string;
|
|
48
49
|
initializeSession(opts?: {
|
|
49
50
|
skipSessionLoading?: boolean;
|
|
@@ -99,12 +100,36 @@ export declare class CodeGenSession {
|
|
|
99
100
|
error: string;
|
|
100
101
|
}>;
|
|
101
102
|
archiveProject(): Promise<string>;
|
|
103
|
+
isIdle(): Promise<boolean>;
|
|
104
|
+
needsBackup(): Promise<boolean>;
|
|
102
105
|
uploadBackup(): Promise<{
|
|
106
|
+
success: boolean;
|
|
107
|
+
skipped: boolean;
|
|
108
|
+
reason: string;
|
|
109
|
+
lastCommitHash: string;
|
|
110
|
+
filePath?: undefined;
|
|
111
|
+
expiresAt?: undefined;
|
|
112
|
+
bundleSize?: undefined;
|
|
113
|
+
error?: undefined;
|
|
114
|
+
} | {
|
|
103
115
|
success: boolean;
|
|
104
116
|
filePath: string;
|
|
105
117
|
expiresAt: string;
|
|
106
118
|
bundleSize: number;
|
|
107
|
-
|
|
119
|
+
skipped?: undefined;
|
|
120
|
+
reason?: undefined;
|
|
121
|
+
lastCommitHash?: undefined;
|
|
122
|
+
error?: undefined;
|
|
123
|
+
} | {
|
|
124
|
+
success: boolean;
|
|
125
|
+
error: Error;
|
|
126
|
+
skipped?: undefined;
|
|
127
|
+
reason?: undefined;
|
|
128
|
+
lastCommitHash?: undefined;
|
|
129
|
+
filePath?: undefined;
|
|
130
|
+
expiresAt?: undefined;
|
|
131
|
+
bundleSize?: undefined;
|
|
132
|
+
}>;
|
|
108
133
|
createPR(...args: [
|
|
109
134
|
{
|
|
110
135
|
repoFullName: string;
|
|
@@ -228,9 +253,16 @@ export declare class CodeGenSession {
|
|
|
228
253
|
configureDevOrchestrator(opts: {
|
|
229
254
|
devCommand?: string;
|
|
230
255
|
setupCommand?: string;
|
|
256
|
+
proxyPort?: number;
|
|
231
257
|
proxyServer?: string;
|
|
232
258
|
env?: Record<string, string | null>;
|
|
233
|
-
|
|
259
|
+
replaceEnvs?: boolean;
|
|
260
|
+
}): Promise<{
|
|
261
|
+
devCommand: boolean;
|
|
262
|
+
setupCommand: boolean;
|
|
263
|
+
proxyServer: boolean;
|
|
264
|
+
env: boolean;
|
|
265
|
+
}>;
|
|
234
266
|
close(uploadGitBackup?: boolean): Promise<void>;
|
|
235
267
|
emitGitStatus(): Promise<GenerateCompletionStepGit | null>;
|
|
236
268
|
manualCommit(options: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
2
|
import { type FusionConfig, type WorkspaceFolder, type InitState, type InitStateStep, type InitStatusLog } from "$/ai-utils";
|
|
3
|
+
import type { Credentials } from "../credentials";
|
|
3
4
|
export interface InitConfig {
|
|
4
5
|
fusionConfig: FusionConfig;
|
|
6
|
+
credentials: Credentials;
|
|
5
7
|
sys: DevToolsSys;
|
|
6
8
|
debug?: boolean;
|
|
7
9
|
}
|
|
@@ -23,13 +23,14 @@ export interface DevServerOrchestrator {
|
|
|
23
23
|
proxyMiddleware: ProxyRequestHandler | undefined;
|
|
24
24
|
pid: number | undefined;
|
|
25
25
|
abortSetupCommand: () => void;
|
|
26
|
+
clearEnvVariables: () => void;
|
|
26
27
|
setEnvVariable: (key: string, value: string | undefined) => void;
|
|
27
28
|
ensureDevCommand: (abortSignal?: AbortSignal) => Promise<boolean>;
|
|
28
29
|
ensureSetupCommand: (abortSignal?: AbortSignal) => Promise<boolean>;
|
|
29
30
|
setupCommandPromise: Promise<SetupCommandResult> | undefined;
|
|
30
31
|
runSetupCommand: (signal?: AbortSignal) => Promise<SetupCommandResult>;
|
|
31
|
-
setSetupCommand: (newCommand: string, signal?: AbortSignal) => Promise<SetupCommandResult>;
|
|
32
|
-
|
|
32
|
+
setSetupCommand: (newCommand: string, forceRestart?: boolean, signal?: AbortSignal) => Promise<SetupCommandResult | null>;
|
|
33
|
+
setDevCommand: (newCommand: string, signal?: AbortSignal) => Promise<boolean>;
|
|
33
34
|
setProxyServer: (newProxyServer: string) => Promise<boolean>;
|
|
34
35
|
setPort: (newPort: number) => Promise<boolean>;
|
|
35
36
|
pingServer: (signal?: AbortSignal) => Promise<Response>;
|