builder.io 1.6.8 → 1.6.10
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 +231 -224
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +24 -24
- package/core/index.mjs +24 -24
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +121 -121
- package/server/index.mjs +120 -120
- package/types/cli/code.d.ts +1 -1
- package/types/cli/generate.d.ts +2 -2
- package/types/cli/incremental-tsc.d.ts +30 -0
- package/types/types.d.ts +1 -0
package/types/cli/code.d.ts
CHANGED
|
@@ -44,6 +44,6 @@ export declare const runCodeCommand: (sys: DevToolsSys, subCommand: string, args
|
|
|
44
44
|
export declare const runCodeGen: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
45
45
|
export declare function createApp(userId: string, spaceId: string, privateKey: string, body: any): Promise<void>;
|
|
46
46
|
export declare function transformStream(body: ReadableStream<Uint8Array> | null): AsyncGenerator<string, void, unknown>;
|
|
47
|
-
export declare function checkProjectRoot(sys: DevToolsSys): Promise<
|
|
47
|
+
export declare function checkProjectRoot(sys: DevToolsSys, interactive: boolean): Promise<undefined>;
|
|
48
48
|
export declare function getUserContext(sys: DevToolsSys): Promise<UserContext>;
|
|
49
49
|
export {};
|
package/types/cli/generate.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ComponentInfo, DevToolsSys } from "../types";
|
|
1
|
+
import type { ComponentInfo, ComponentRegistry, DevToolsSys } from "../types";
|
|
2
2
|
import type { CLIArgs } from "./index";
|
|
3
3
|
import { type UserContext } from "./code";
|
|
4
4
|
import { type FigmaComponentInfo } from "./figma-utils";
|
|
5
5
|
export declare const runFigmaGenerate: (sys: DevToolsSys, args: CLIArgs) => Promise<undefined>;
|
|
6
6
|
export interface MappingCodeV3 {
|
|
7
7
|
figmaNode: FigmaComponentInfo;
|
|
8
|
-
|
|
8
|
+
registry: ComponentRegistry;
|
|
9
9
|
userContext?: UserContext;
|
|
10
10
|
figmaUrl: string;
|
|
11
11
|
docsUrl?: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as ts from "typescript";
|
|
2
|
+
/**
|
|
3
|
+
* Performs an incremental type-check (no emit) for the given project directory.
|
|
4
|
+
* It reads tsconfig.json (just like the tsc CLI does) and enforces the `noEmit` flag.
|
|
5
|
+
*
|
|
6
|
+
* @param projectDir - The path to the project (where tsconfig.json is located).
|
|
7
|
+
* @param oldProgram - Optionally, the previous builder program for incremental builds.
|
|
8
|
+
* @returns An object containing the new builder program and collected diagnostics.
|
|
9
|
+
*/
|
|
10
|
+
export interface CheckpointData {
|
|
11
|
+
program: ts.EmitAndSemanticDiagnosticsBuilderProgram;
|
|
12
|
+
diagnostics: ts.Diagnostic[];
|
|
13
|
+
}
|
|
14
|
+
export type Checkpoint = CheckpointData | null;
|
|
15
|
+
export declare function runCheckpoint(projectDir: string, oldProgram?: ts.EmitAndSemanticDiagnosticsBuilderProgram): Checkpoint;
|
|
16
|
+
export declare function filterDiagnostic(c: ts.Diagnostic): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Given a new list of diagnostics and a baseline list, filter out diagnostics
|
|
19
|
+
* that were already present in the baseline.
|
|
20
|
+
*/
|
|
21
|
+
export declare function filterBaselineDiagnostics(baselineFingerprints: Set<string>, checkpoint: Checkpoint): ts.Diagnostic[];
|
|
22
|
+
export declare function createFingerprintSet(checkpoint: Checkpoint): Set<string>;
|
|
23
|
+
/**
|
|
24
|
+
* Pretty prints diagnostics as a plain text string.
|
|
25
|
+
*
|
|
26
|
+
* @param diagnostics - An array of ts.Diagnostic objects.
|
|
27
|
+
* @returns A formatted string that describes the diagnostics.
|
|
28
|
+
*/
|
|
29
|
+
export declare function prettyPrintDiagnostics(diagnostics: ts.Diagnostic[]): string;
|
|
30
|
+
export declare function prettyPrintDiagnosticsWithContext(diagnostics: ts.Diagnostic[]): string;
|
package/types/types.d.ts
CHANGED