builder.io 1.12.7 → 1.13.0

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.
@@ -74,12 +74,6 @@ export interface CLIArgs {
74
74
  workspace?: string;
75
75
  /** Output structured JSON data instead of human-readable logs */
76
76
  jsonOutput?: boolean;
77
- /** Local mode */
78
- local?: boolean;
79
- /** Inlined to builder.config.json file */
80
- configJson?: string;
81
- /** Server URL */
82
- serverUrl?: string;
83
77
  /** Remove all mappings from the space, publishing zero mappings even if mapper files exist */
84
78
  clearMappings?: boolean;
85
79
  /** Enabled tools, list of strings separated by commas */
@@ -90,8 +84,6 @@ export interface CLIArgs {
90
84
  listIndexedRepos?: boolean;
91
85
  /** Disable MCP support */
92
86
  disableMcp?: boolean;
93
- /** Enable privacy mode for codegen */
94
- privacyMode?: boolean;
95
87
  /** Clear all stored credentials (logout) */
96
88
  reset?: boolean;
97
89
  }
@@ -83,6 +83,20 @@ export interface LaunchArgs extends CLIArgs {
83
83
  * @default false
84
84
  */
85
85
  autoDetectDevServer?: boolean;
86
+ /** Inlined to builder.config.json file */
87
+ configJson?: string;
88
+ /**
89
+ * Enable HTTPS server.
90
+ * When enabled, creates both HTTP and HTTPS servers.
91
+ *
92
+ * @default false
93
+ */
94
+ https?: boolean;
95
+ /**
96
+ * Custom domain to use instead of localhost in proxy URLs.
97
+ * Useful for development with custom SSL certificates.
98
+ */
99
+ localHttpsDomain?: string;
86
100
  }
87
101
  export declare function runFusionCommand({ sys, args, }: {
88
102
  sys: DevToolsSys;
@@ -1,7 +1,7 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { Credentials } from "../credentials";
3
3
  import type { WorkspaceConfiguration } from "$/ai-utils";
4
- import type { Component } from "./types";
4
+ import type { Component, ComponentTask } from "./types";
5
5
  export declare const discoverComponents: (sys: DevToolsSys, credentials: Credentials, sessionId: string, remoteComponents: Component[], opts?: {
6
6
  force?: boolean;
7
7
  designSystemPackage?: string;
@@ -10,6 +10,7 @@ export declare const discoverComponents: (sys: DevToolsSys, credentials: Credent
10
10
  debug?: boolean;
11
11
  }) => Promise<{
12
12
  numComponentsFound: number;
13
- componentsToIndex: Component[];
14
- discoveredComponents: Component[];
13
+ componentsToIndex: ComponentTask[];
14
+ discoveredComponents: ComponentTask[];
15
15
  }>;
16
+ export declare const computeHash: (sys: DevToolsSys, files: string[]) => Promise<string>;
@@ -1,8 +1,8 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { Credentials } from "../credentials";
3
- import type { Component } from "./types";
3
+ import type { Component, ComponentTask, Task } from "./types";
4
4
  import type { WorkspaceConfiguration } from "$/ai-utils";
5
- export declare const processComponent: (sys: DevToolsSys, credentials: Credentials, sessionId: string, component: Component, opts?: {
5
+ export declare const processComponent: (sys: DevToolsSys, credentials: Credentials, sessionId: string, component: ComponentTask, opts?: {
6
6
  designSystemId?: string | null;
7
7
  designSystemPackage?: string;
8
8
  designSystemVersion?: string;
@@ -12,8 +12,9 @@ export declare const processComponent: (sys: DevToolsSys, credentials: Credentia
12
12
  }) => Promise<void>;
13
13
  export declare const processAgent: (sys: DevToolsSys, credentials: Credentials, discoveredComponents: Component[], opts?: {
14
14
  hasIcons?: boolean;
15
+ hasDesignTokens?: boolean;
15
16
  designSystemId?: string | null;
16
17
  retriesAllowed?: number;
17
18
  debug?: boolean;
18
19
  }) => Promise<void>;
19
- export declare const deprecateObsoleteComponents: (credentials: Credentials, localComponents: Component[], remoteComponents: Component[]) => Promise<void>;
20
+ export declare const deprecateObsoleteComponents: (credentials: Credentials, localComponents: Task[], remoteComponents: Component[]) => Promise<void>;
@@ -3,6 +3,7 @@ import { type Credentials } from "../credentials";
3
3
  import type { DesignSystem, GenerateUserMessage, WorkspaceConfiguration, StoreComponentDocsInput, UpdateDesignSystemInput, DesignSystemScope, DisplayDesignSystem } from "$/ai-utils";
4
4
  export declare const AGENT_FILE = "AGENTS.md";
5
5
  export declare const ICONS_FILE = "icons.md";
6
+ export declare const TOKENS_FILE = "DESIGN_TOKENS";
6
7
  export declare const REPO_INDEXING_FOLDER = "repo-indexing";
7
8
  export interface UserSettings {
8
9
  isAdminInOrganization: boolean;
@@ -1,8 +1,8 @@
1
1
  import type { DevToolsSys } from "../../types";
2
2
  import type { CLIArgs } from "../index";
3
3
  import { type Credentials } from "../credentials";
4
- import type { Component } from "./types";
5
- export declare const displayComponentLibrarySummary: (components: Component[], indexedComponents: Component[], startTime: number, failedComponents: string[] | undefined, isForce: boolean | undefined, designSystemName: string, designSystemId?: string, numIconsIndexed?: number) => void;
4
+ import type { Component, TokenTask } from "./types";
5
+ export declare const displayComponentLibrarySummary: (components: Component[], indexedComponents: Component[], startTime: number, failedComponents: string[] | undefined, isForce: boolean | undefined, designSystemName: string, designSystemId?: string, numIconsIndexed?: number, tokenGroupsFound?: TokenTask[], tokenGroupsToIndex?: TokenTask[], tokenGroupsFailed?: string[]) => void;
6
6
  export interface RepoIndexingDoc {
7
7
  name: string;
8
8
  content: string | {
@@ -0,0 +1,21 @@
1
+ import type { DevToolsSys } from "../../types";
2
+ import type { Component, TokenTask } from "./types";
3
+ import type { Credentials } from "../credentials";
4
+ import type { WorkspaceConfiguration } from "$/ai-utils";
5
+ export declare const discoverTokens: (sys: DevToolsSys, credentials: Credentials, sessionId: string, remoteTokens: Component[], opts?: {
6
+ force?: boolean;
7
+ designSystemPackage?: string;
8
+ workspaceConfig?: WorkspaceConfiguration;
9
+ debug?: boolean;
10
+ }) => Promise<{
11
+ tokenGroupsToIndex: TokenTask[];
12
+ discoveredTokenGroups: TokenTask[];
13
+ }>;
14
+ export declare const processTokens: (sys: DevToolsSys, credentials: Credentials, sessionId: string, group: TokenTask, opts: {
15
+ designSystemId: string;
16
+ designSystemPackage?: string;
17
+ designSystemVersion?: string;
18
+ debug?: boolean;
19
+ workspaceConfig?: WorkspaceConfiguration;
20
+ retriesAllowed?: number;
21
+ }) => Promise<void>;
@@ -10,3 +10,26 @@ export interface Component {
10
10
  designSystemId?: string | null;
11
11
  tokens?: number;
12
12
  }
13
+ interface BaseTask {
14
+ name: string;
15
+ }
16
+ export interface ComponentTask extends BaseTask {
17
+ type: "component";
18
+ description: string;
19
+ relevantFiles: string[];
20
+ relatedComponents: string[];
21
+ designSystemPackage?: string;
22
+ designSystemVersion?: string;
23
+ hash: string;
24
+ }
25
+ export interface TokenTask extends BaseTask {
26
+ type: "token";
27
+ relevantFiles: string[];
28
+ tokens: string[];
29
+ hash: string;
30
+ }
31
+ export interface IconTask extends BaseTask {
32
+ type: "icon";
33
+ }
34
+ export type Task = ComponentTask | TokenTask | IconTask;
35
+ export {};
@@ -0,0 +1,59 @@
1
+ import { ChildProcess, type ChildProcessWithoutNullStreams, type ChildProcessByStdio, type SpawnOptions, type StdioPipe, type StdioNull } from "child_process";
2
+ import type { Readable } from "stream";
3
+ /**
4
+ * Global process tracker that keeps track of all spawned processes
5
+ * and ensures they are killed when the main process exits
6
+ */
7
+ declare class ProcessTracker {
8
+ private processes;
9
+ private cleanupHandlersRegistered;
10
+ constructor();
11
+ /**
12
+ * Register a spawned process for tracking and cleanup
13
+ */
14
+ track(childProcess: ChildProcess): void;
15
+ /**
16
+ * Untrack a process (useful if you're managing it manually)
17
+ */
18
+ untrack(childProcess: ChildProcess): void;
19
+ /**
20
+ * Kill all tracked processes
21
+ */
22
+ killAll(): Promise<void>;
23
+ /**
24
+ * Register cleanup handlers for various exit signals
25
+ */
26
+ private registerCleanupHandlers;
27
+ /**
28
+ * Get the number of tracked processes
29
+ */
30
+ get count(): number;
31
+ }
32
+ export declare const processTracker: ProcessTracker;
33
+ /**
34
+ * Options for trackedSpawn function
35
+ */
36
+ export interface TrackedSpawnOptions {
37
+ /** The command to run */
38
+ command: string;
39
+ /** Arguments for the command */
40
+ args?: readonly string[];
41
+ /** Spawn options */
42
+ options?: SpawnOptions;
43
+ }
44
+ /**
45
+ * Wrapper around child_process.spawn that automatically tracks the spawned process
46
+ * and ensures it gets killed when the main process exits
47
+ */
48
+ export declare function trackedSpawn(config: TrackedSpawnOptions & {
49
+ options: SpawnOptions & {
50
+ stdio: "pipe" | [StdioPipe, StdioPipe, StdioPipe];
51
+ };
52
+ }): ChildProcessWithoutNullStreams;
53
+ export declare function trackedSpawn(config: TrackedSpawnOptions & {
54
+ options: SpawnOptions & {
55
+ stdio: [StdioNull | "ignore", StdioPipe, StdioPipe];
56
+ };
57
+ }): ChildProcessByStdio<null, Readable, Readable>;
58
+ export declare function trackedSpawn(config: TrackedSpawnOptions): ChildProcess;
59
+ export {};
@@ -1 +1 @@
1
- export declare const REPO_INDEXING_AGENT_PROMPT = "# Design System Component Reference\n\nThis document provides a comprehensive overview of the design system's component architecture and available components for code generation and development reference.\n\n## System Architecture\n\nThe design system follows a modular component-based architecture where each component provides specific functionality. Components are organized into logical groups that can work independently or in combination with other components.\n\n### Component Organization Principles\n\n- **Single Responsibility**: Each component serves a specific purpose\n- **Composability**: Components can be combined to create complex interfaces\n- **Consistency**: All components follow the same design patterns and API conventions\n- **Accessibility**: Components are built with accessibility standards in mind\n\n## Documentation Structure\n\nFor detailed documentation on any component, refer to the corresponding MDX file in the `design-system-docs` folder. The documentation files follow the naming convention:\n\n```\ndesign-system-docs/[componentname].mdx\n```\n\nFor example:\n- `design-system-docs/button.mdx` - Detailed documentation for Button component\n- `design-system-docs/table.mdx` - Detailed documentation for Table component\n- `design-system-docs/annotationcontext.mdx` - Detailed documentation for AnnotationContext\n- `design-system-docs/applayout.mdx` - Detailed documentation for AppLayout component\n\nThese MDX files contain comprehensive information including:\n- Component API documentation\n- Usage examples\n- Props and configuration options\n- Best practices and implementation guidelines\n- Accessibility requirements\n- Integration patterns with other components\n\n## Components\n\n{{COMPONENTS}}\n{{ICONS}}\n\n## Usage Guidelines\n\n### Component Dependencies\n- Most components are self-contained and can be used independently\n- Identify any components that require multiple components to work together\n- Some components work better in combination (e.g., Form + FormField, Table + Pagination)\n\n### Integration Patterns\n- Layout components typically serve as containers for other components\n- Form controls should be wrapped in FormField components for proper labeling\n- Navigation components can be used independently or as part of larger layout structures\n- Data display components can be enhanced with interactive elements like buttons and popovers\n\n### Accessibility Considerations\n- All components are built with accessibility in mind\n- Use semantic HTML structures provided by the components\n- Leverage built-in ARIA attributes and keyboard navigation\n- The LiveRegion component provides additional accessibility announcements when needed\n\n### Responsive Design\n- Layout components provide responsive behavior out of the box\n- Grid and ColumnLayout components adapt to different screen sizes\n- Mobile-friendly navigation patterns are built into navigation components\n\n## Usage Reference\n\nThis reference should be used to understand the available components and their intended purposes when generating code or building applications with this design system. For specific implementation details, always consult the corresponding MDX documentation file in the `design-system-docs` folder.";
1
+ export declare const REPO_INDEXING_AGENT_PROMPT = "# Design System Component Reference\n\nThis document provides a comprehensive overview of the design system's component architecture and available components for code generation and development reference.\n\n## System Architecture\n\nThe design system follows a modular component-based architecture where each component provides specific functionality. Components are organized into logical groups that can work independently or in combination with other components.\n\n### Component Organization Principles\n\n- **Single Responsibility**: Each component serves a specific purpose\n- **Composability**: Components can be combined to create complex interfaces\n- **Consistency**: All components follow the same design patterns and API conventions\n- **Accessibility**: Components are built with accessibility standards in mind\n\n## Documentation Structure\n\nFor detailed documentation on any component, refer to the corresponding MDX file in the `design-system-docs` folder. The documentation files follow the naming convention:\n\n```\ndesign-system-docs/[componentname].mdx\n```\n\nFor example:\n- `design-system-docs/button.mdx` - Detailed documentation for Button component\n- `design-system-docs/table.mdx` - Detailed documentation for Table component\n- `design-system-docs/annotationcontext.mdx` - Detailed documentation for AnnotationContext\n- `design-system-docs/applayout.mdx` - Detailed documentation for AppLayout component\n\nThese MDX files contain comprehensive information including:\n- Component API documentation\n- Usage examples\n- Props and configuration options\n- Best practices and implementation guidelines\n- Accessibility requirements\n- Integration patterns with other components\n\n## Components\n\n{{COMPONENTS}}\n{{ICONS}}\n{{TOKENS}}\n\n## Usage Guidelines\n\n### Component Dependencies\n- Most components are self-contained and can be used independently\n- Identify any components that require multiple components to work together\n- Some components work better in combination (e.g., Form + FormField, Table + Pagination)\n\n### Integration Patterns\n- Layout components typically serve as containers for other components\n- Form controls should be wrapped in FormField components for proper labeling\n- Navigation components can be used independently or as part of larger layout structures\n- Data display components can be enhanced with interactive elements like buttons and popovers\n\n### Accessibility Considerations\n- All components are built with accessibility in mind\n- Use semantic HTML structures provided by the components\n- Leverage built-in ARIA attributes and keyboard navigation\n- The LiveRegion component provides additional accessibility announcements when needed\n\n### Responsive Design\n- Layout components provide responsive behavior out of the box\n- Grid and ColumnLayout components adapt to different screen sizes\n- Mobile-friendly navigation patterns are built into navigation components\n\n## Usage Reference\n\nThis reference should be used to understand the available components and their intended purposes when generating code or building applications with this design system. For specific implementation details, always consult the corresponding MDX documentation file in the `design-system-docs` folder.";