builder.io 1.8.0 → 1.8.2

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.
@@ -1,6 +1,6 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { Credentials } from "./credentials";
3
- import { type GitBackupUploadUrlResult, type GitBackupUploadUrlOptions, type GitBackupRecordOptions, type GitBackupRecordResult, type BackupMetadata, type WorkspaceConfiguration } from "$/ai-utils";
3
+ import { type GitBackupUploadUrlResult, type GitBackupUploadUrlOptions, type GitBackupRecordOptions, type GitBackupRecordResult, type BackupMetadata, type WorkspaceConfiguration, type CodegenSetLastCommit } from "$/ai-utils";
4
4
  interface BackupGitRepoOptions {
5
5
  sys: DevToolsSys;
6
6
  credentials: Credentials;
@@ -54,9 +54,10 @@ export declare function recordBackup(credentials: Credentials, body: GitBackupRe
54
54
  export interface GitBackupDownloadResultValid {
55
55
  success: true;
56
56
  partial: boolean;
57
- bundlePath: string;
57
+ bundlePath: string | undefined;
58
58
  bundleSize: number;
59
59
  gitBranchName: string;
60
+ lastCommitHash: string;
60
61
  }
61
62
  export interface GitBackupDownloadResultInvalid {
62
63
  success: false;
@@ -76,4 +77,5 @@ export declare function computeMD5Hash(bundlePath: string): Promise<{
76
77
  contentMd5: string;
77
78
  size: number;
78
79
  }>;
80
+ export declare function setLastCommit(sys: DevToolsSys, credentials: Credentials, data: CodegenSetLastCommit, verbose: boolean): Promise<any>;
79
81
  export {};
@@ -251,6 +251,7 @@ export declare class CodeGenSession {
251
251
  env: boolean;
252
252
  }>;
253
253
  close(uploadGitBackup?: boolean): Promise<void>;
254
+ updateLastCommit(lastCommitHash: string): false | Promise<any>;
254
255
  emitGitStatus(): Promise<GenerateCompletionStepGit | null>;
255
256
  manualCommit(options: {
256
257
  add: string;
@@ -21,6 +21,7 @@ export declare class InitStateMachine {
21
21
  debug: boolean;
22
22
  initState: InitState;
23
23
  constructor(config: InitConfig);
24
+ checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
24
25
  execAsync(exec: string, args: string[], cwd?: string): Promise<string>;
25
26
  git(args: string[], cwd?: string): Promise<string>;
26
27
  init(): Promise<boolean>;
@@ -44,9 +45,10 @@ export declare class InitStateMachine {
44
45
  * If no backup is available, do nothing.
45
46
  */
46
47
  private restoreFromPartialBackup;
47
- cloneRepository({ repo, repoPath, backupResult, }: {
48
+ cloneRepository({ repo, repoPath, backupResult, config, }: {
48
49
  repo: Required<WorkspaceFolder>;
49
50
  repoPath: string;
50
51
  backupResult: GitBackupDownloadResult | undefined;
52
+ config: InitConfig;
51
53
  }): Promise<boolean>;
52
54
  }
@@ -10,7 +10,7 @@ export declare const parseDesignSystem: (sys: DevToolsSys, designSystemPackage?:
10
10
  export declare const storeComponentDocs: (credentials: Credentials, body: StoreComponentDocsInput, debug?: boolean) => Promise<any>;
11
11
  export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, sessionId: string, message: GenerateUserMessage, debug?: boolean, designSystemPackage?: string, workspaceConfig?: WorkspaceConfiguration, opts?: {
12
12
  tags?: object;
13
- }) => Promise<string>;
13
+ }, metadata?: any) => Promise<string>;
14
14
  export declare const getAllDesignSystems: (credentials: Credentials) => Promise<DesignSystem[]>;
15
15
  export declare const getDesignSystemByName: (credentials: Credentials, designSystemName: string) => Promise<DesignSystem | null>;
16
16
  export declare const addDesignSystem: (credentials: Credentials, body: {