@builder.io/dev-tools 1.7.5-dev.202507172057.680472589 → 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.
@@ -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>;
@@ -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
- } | undefined>;
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;
@@ -169,9 +194,7 @@ export declare class CodeGenSession {
169
194
  logs: string;
170
195
  } | null>;
171
196
  setDebug(debug: boolean): void;
172
- getAllFiles(options?: {
173
- getDotFiles?: boolean;
174
- }): Promise<string[]>;
197
+ getAllFiles(): Promise<string[]>;
175
198
  getSessionId(): string;
176
199
  getSpaceId(): string | undefined;
177
200
  revertToCommitHash(commitHash: string): Promise<void>;
@@ -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
  }
@@ -4,7 +4,7 @@ export declare function extractSignatureInfo(content: string): {
4
4
  sessionKey?: string;
5
5
  snippetId?: string;
6
6
  };
7
- export declare function getAllProjectFiles(basePath: string, globPattern?: string, extraIgnorePatterns?: string[], getDotFiles?: boolean): Promise<string[]>;
7
+ export declare function getAllProjectFiles(basePath: string, globPattern?: string, extraIgnorePatterns?: string[]): Promise<string[]>;
8
8
  export declare function findBuilderFiles(basePath: string, targetContentId: string, targetSessionKey: string): Promise<FileNode[]>;
9
9
  export declare function filterNonImportantFiles(files: string[]): string[];
10
10
  export declare function getIgnorePatterns(basePath: string): (path: string) => boolean;
@@ -17,7 +17,7 @@ export declare const NUMBER_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
18
  export declare const ARRAY_TYPES: string[];
19
19
  export declare const OBJECT_TYPES: string[];
20
- export declare function getPrimitiveType(t: string): "string" | "number" | "boolean" | "object" | "array";
20
+ export declare function getPrimitiveType(t: string): "number" | "string" | "boolean" | "object" | "array";
21
21
  export declare function removeQuotes(text: string): string;
22
22
  export declare const resolveType: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string[] | undefined;
23
23
  export declare const typeToString: (sys: DevToolsSys, checker: ts.TypeChecker, type: ts.Type) => string;