builder.io 1.10.16 → 1.10.19

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,2 +1,2 @@
1
1
  import type { Credentials } from "../credentials";
2
- export declare function getUserSettingsByUserId(credentials: Credentials, userId: string): Promise<any>;
2
+ export declare function getUserSettingsByUserId(credentials: Credentials): Promise<any>;
@@ -9,8 +9,12 @@ interface BackupGitRepoOptions {
9
9
  repoPath: string;
10
10
  aiBranch: string;
11
11
  featureBranch: string;
12
- originalRepoUrl: string;
13
12
  workspace: WorkspaceConfiguration | undefined;
13
+ /**
14
+ * If true, the system is connected to the git provider.
15
+ * If false, the system is offline and will not fetch any branches from origin.
16
+ */
17
+ isConnectedToProvider: boolean;
14
18
  debug: boolean;
15
19
  }
16
20
  export interface BackupGitRepoResultValid {
@@ -38,7 +42,7 @@ export type BackupGitRepoResult = BackupGitRepoResultValid | BackupGitRepoResult
38
42
  * The aiBranch is where the AI creates commits as work progresses, while featureBranch
39
43
  * is the base branch where work started (usually "main").
40
44
  */
41
- export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, originalRepoUrl, debug, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
45
+ export declare function backupGitRepo({ sys, credentials, projectId, branchName, repoPath, aiBranch, featureBranch, workspace, isConnectedToProvider, debug, }: BackupGitRepoOptions): Promise<BackupGitRepoResult>;
42
46
  interface InitialCommitHashResult {
43
47
  initialBranch: string;
44
48
  initialCommitHash: string;
@@ -54,12 +58,13 @@ interface InitialCommitHashResult {
54
58
  * For partial backups, we fetch the latest state of the chosen upstream branch from origin
55
59
  * to ensure the backup has the correct commit range reference.
56
60
  */
57
- export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, }: {
61
+ export declare function getInitialCommitHash({ sys, repoPath, featureBranch, debug, workspace, isConnectedToProvider, }: {
58
62
  sys: DevToolsSys;
59
63
  repoPath: string;
60
64
  featureBranch: string;
61
65
  debug: boolean;
62
66
  workspace: WorkspaceConfiguration | undefined;
67
+ isConnectedToProvider: boolean;
63
68
  }): Promise<InitialCommitHashResult>;
64
69
  /**
65
70
  * Requests a signed upload URL for git backup
@@ -19,7 +19,6 @@ export interface FusionContext {
19
19
  git: boolean;
20
20
  gitRemote?: string;
21
21
  gitAutoInit?: boolean;
22
- gitFeatureBranch?: string;
23
22
  }
24
23
  export interface ToolContext extends Partial<FusionContext> {
25
24
  sys: DevToolsSys;
@@ -29,6 +28,7 @@ export interface ToolContext extends Partial<FusionContext> {
29
28
  position: string;
30
29
  emitter: CodeGenEventEmitter;
31
30
  fusionConfig: FusionConfig | undefined;
31
+ canCollapseWorkspace: boolean;
32
32
  signal: AbortSignal;
33
33
  workingDirectory: string;
34
34
  allowedCommands: RegExp[];
@@ -56,8 +56,9 @@ export declare class CodeGenSession {
56
56
  loadHistory(): Promise<LoadHistoryResult>;
57
57
  loadWholeSession(opts?: LoadWholeSessionOptions): Promise<LoadWholeSessionResult>;
58
58
  loadMoreTurns(): Promise<CodegenTurn[]>;
59
- pushRepoV2({ repoFullName }: {
59
+ pushRepoV2(repoInfo: {
60
60
  repoFullName: string;
61
+ repoUrl: string;
61
62
  }): Promise<{
62
63
  success: boolean;
63
64
  error: string;
@@ -24,6 +24,7 @@ export declare class InitStateMachine {
24
24
  checkout(branchName: string, ref: string, repoPath: string): Promise<boolean>;
25
25
  execAsync(exec: string, args: string[], cwd?: string): Promise<string>;
26
26
  git(args: string[], cwd?: string): Promise<string>;
27
+ performBackup(sys: DevToolsSys, credentials: Credentials, fusionConfig: FusionConfig, volumePath: string, repositories: Required<WorkspaceFolder>[]): Promise<void>;
27
28
  init(): Promise<boolean>;
28
29
  addInitLog(type: "status" | "log" | "error" | "complete", message: string, options?: {
29
30
  step?: InitStateStep;
@@ -1,2 +1,14 @@
1
+ import type { FusionConfig } from "$/ai-utils";
2
+ import type { DevToolsSys } from "types";
1
3
  export declare const getCommandWithShellArgs: (command: string, shell: string) => string[];
2
4
  export declare const isInRemoteContainer: () => boolean;
5
+ export declare const getVolumePath: (fusionConfig: FusionConfig) => string;
6
+ export declare function computeAIBranchName(featureBranch: string, sessionId: string): string;
7
+ export declare const getAndParseGitRepoInfo: ({ sys, gitWorkingDirectory, }: {
8
+ sys: DevToolsSys;
9
+ gitWorkingDirectory: string;
10
+ }) => Promise<{
11
+ currentBranch: string;
12
+ featureBranch: string;
13
+ sessionId: string | undefined;
14
+ }>;
@@ -2,7 +2,11 @@ import type { DevToolsSys } from "../../core";
2
2
  import { type Credentials } from "../credentials";
3
3
  import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, StoreComponentDocsInput, UpdateDesignSystemInput, DesignSystemScope } from "$/ai-utils";
4
4
  export declare const AGENT_FILE = "AGENTS.md";
5
- export declare const promptForDesignSystemScope: (credentials: Credentials) => Promise<DesignSystemScope | undefined>;
5
+ export interface UserSettings {
6
+ isAdminInOrganization: boolean;
7
+ email: string;
8
+ }
9
+ export declare const promptForDesignSystemScope: (credentials: Credentials, userSettings: UserSettings | null) => Promise<DesignSystemScope | undefined>;
6
10
  export declare const parseDesignSystem: (sys: DevToolsSys, designSystemPackage?: string) => Promise<{
7
11
  name: any;
8
12
  version: string | undefined;
@@ -12,8 +16,10 @@ export declare const runCodeGen: (sys: DevToolsSys, credentials: Credentials, se
12
16
  tags?: object;
13
17
  maxTokens?: number;
14
18
  }, metadata?: any) => Promise<string>;
15
- export declare const getAllDesignSystems: (credentials: Credentials) => Promise<DesignSystem[]>;
16
- export declare const getDesignSystemByName: (credentials: Credentials, designSystemName: string) => Promise<DesignSystem | null>;
19
+ export declare const getAllDesignSystems: (credentials: Credentials, userSettings: UserSettings | null, onlyEditAccess?: boolean) => Promise<DesignSystem[]>;
20
+ export declare const getDesignSystemsByScope: (scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem[];
21
+ export declare const getDesignSystemByName: (designSystemName: string, designSystems: DesignSystem[]) => DesignSystem | null;
22
+ export declare const getDesignSystemByNameAndScope: (credentials: Credentials, designSystemName: string, scope: DesignSystemScope, designSystems: DesignSystem[]) => DesignSystem | null;
17
23
  export declare const addDesignSystem: (credentials: Credentials, body: {
18
24
  designSystemName: string;
19
25
  designSystemVersion?: string;