builder.io 1.5.12 → 1.5.14

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,5 +1,17 @@
1
1
  import type { DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
+ export interface UserContext {
4
+ client: string;
5
+ clientVersion: string;
6
+ nodeVersion: string;
7
+ systemPlatform: string;
8
+ systemEOL: string;
9
+ systemArch: string;
10
+ frameworks: string[];
11
+ systemShell?: string;
12
+ inGitRepo?: boolean;
13
+ [key: string]: string[] | string | boolean | undefined;
14
+ }
3
15
  export interface CustomInstruction {
4
16
  id: string;
5
17
  name: string;
@@ -33,4 +45,5 @@ export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<un
33
45
  export declare function createApp(userId: string, spaceId: string, privateKey: string, body: any): Promise<void>;
34
46
  export declare function transformStream(body: ReadableStream<Uint8Array> | null): AsyncGenerator<string, void, unknown>;
35
47
  export declare function checkProjectRoot(sys: DevToolsSys): Promise<void>;
48
+ export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
36
49
  export {};
@@ -1,14 +1,17 @@
1
1
  import type { ComponentInfo, DevToolsSys } from "../types";
2
2
  import type { CLIArgs } from "./index";
3
+ import { type UserContext } from "./code";
3
4
  import { type FigmaComponentInfo } from "./figma-utils";
4
5
  export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
5
6
  export interface MappingCodeV3 {
6
- componentNames: string[];
7
7
  figmaNode: FigmaComponentInfo;
8
+ componentNames: string[];
9
+ userContext?: UserContext;
8
10
  figmaUrl: string;
11
+ docsUrl?: string;
9
12
  registeredCmp: ComponentInfo;
10
13
  previousCompletion?: string;
11
- prompt?: string;
12
- meta?: Record<string, any>;
14
+ userPrompt?: string;
13
15
  token?: string;
16
+ pragma?: string;
14
17
  }
@@ -1,6 +1,4 @@
1
1
  export interface CLIArgs {
2
- /** Builder.io private API key */
3
- privateKey?: string;
4
2
  /** Figma access token */
5
3
  figmaToken?: string;
6
4
  /** Run in CI mode without interactive prompts */