builder.io 1.6.17 → 1.6.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.
- package/cli/index.cjs +334 -334
- package/cli/index.cjs.map +4 -4
- package/cli/main.cjs +7 -1
- package/core/index.cjs +31 -31
- package/core/index.mjs +30 -30
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +37 -36
- package/server/index.mjs +30 -29
- package/types/cli/figma-utils.d.ts +9 -1
- package/types/cli/generate.d.ts +1 -1
- package/types/cli/index.d.ts +8 -0
- package/types/cli/launch.d.ts +0 -1
- package/types/core/adapters/angular/index.d.ts +1 -0
- package/types/tsconfig.tsbuildinfo +1 -1
|
@@ -2,16 +2,23 @@ import { type Credentials, type FigmaAuth } from "./credentials";
|
|
|
2
2
|
import type { DevToolsSys } from "../types";
|
|
3
3
|
import type { CLIArgs } from "./index";
|
|
4
4
|
import type { FigmaBuilderLink, FigmaComponentInfo } from "$/ai-utils";
|
|
5
|
+
type FigmaAPIOpts = {
|
|
6
|
+
auth: {
|
|
7
|
+
access_token: string;
|
|
8
|
+
oauth: boolean;
|
|
9
|
+
};
|
|
10
|
+
params?: Record<string, any>;
|
|
11
|
+
};
|
|
5
12
|
export declare const REMOVE_EMOJI: RegExp;
|
|
6
13
|
export declare const parseFigmaURL: (str: string) => {
|
|
7
14
|
fileID: string;
|
|
8
15
|
nodeId: string;
|
|
9
16
|
} | null;
|
|
17
|
+
export declare const figmaApi: (sys: DevToolsSys, args: CLIArgs, path: string, { auth, params }: FigmaAPIOpts) => Promise<any>;
|
|
10
18
|
export declare const getFigmaNodeData: (sys: DevToolsSys, args: CLIArgs, auth: {
|
|
11
19
|
access_token: string;
|
|
12
20
|
oauth: boolean;
|
|
13
21
|
}, fileId: string, nodeIds: string, depth?: number) => Promise<any>;
|
|
14
|
-
export declare function getFigmaComponentName(name: string): string;
|
|
15
22
|
export declare function getImportDataFromToken(credentials: Credentials, token: string, verbose: boolean): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
16
23
|
export declare function needsFigmaAuth(urls: string[]): boolean;
|
|
17
24
|
export declare function getFigmaNodeDataFromURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: {
|
|
@@ -22,3 +29,4 @@ export declare function getFigmaNodeDataFromURLs(sys: DevToolsSys, args: CLIArgs
|
|
|
22
29
|
spaceId: string;
|
|
23
30
|
}, urls: string[]): Promise<(readonly [string, FigmaComponentInfo])[]>;
|
|
24
31
|
export declare function inPlaceResolveFigmaURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: FigmaAuth, figmaBuilderLinks: FigmaBuilderLink[], figmaLinksToResolve: string[]): Promise<void>;
|
|
32
|
+
export {};
|
package/types/cli/generate.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
|
|
2
2
|
import type { CLIArgs } from "./index";
|
|
3
|
-
import type
|
|
3
|
+
import { type FigmaComponentInfo, type UserContext } from "$/ai-utils";
|
|
4
4
|
export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
5
5
|
export interface MappingCodeV3 {
|
|
6
6
|
figmaNode?: FigmaComponentInfo;
|
package/types/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export interface CLIArgs {
|
|
2
2
|
/** Figma access token */
|
|
3
3
|
figmaToken?: string;
|
|
4
|
+
/** GitHub access token */
|
|
5
|
+
githubToken?: string;
|
|
4
6
|
/** Run in CI mode without interactive prompts */
|
|
5
7
|
ci?: boolean;
|
|
6
8
|
/** Show help text */
|
|
@@ -47,6 +49,12 @@ export interface CLIArgs {
|
|
|
47
49
|
auth?: boolean;
|
|
48
50
|
/** Use development server instead of production for launch command */
|
|
49
51
|
dev?: boolean;
|
|
52
|
+
/** Skip browser auto-open */
|
|
53
|
+
noOpen?: boolean;
|
|
54
|
+
/** Skip browser auto-open (flag form) */
|
|
55
|
+
open?: boolean;
|
|
50
56
|
/** Raw command line arguments */
|
|
51
57
|
_: string[];
|
|
58
|
+
builderPublicKey?: string;
|
|
59
|
+
builderPrivateKey?: string;
|
|
52
60
|
}
|
package/types/cli/launch.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DevToolsSys } from "@builder.io/dev-tools/core";
|
|
2
2
|
import type { CLIArgs } from "./index";
|
|
3
|
-
export declare const API_PORT = 48753;
|
|
4
3
|
export declare const PROXY_PORT = 48752;
|
|
5
4
|
export declare function runLaunchCommand(sys: DevToolsSys, subCommand: string, args: CLIArgs): Promise<number>;
|