builder.io 1.1.13-10 → 1.1.13-12
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 +439 -191
- package/package.json +4 -3
- package/server/index.cjs +3 -3
- package/server/index.mjs +2 -2
- package/types/cli/builder-add/interface.d.ts +4 -1
- package/types/cli/sync-utils.d.ts +10 -0
- package/types/types.d.ts +2 -2
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { AddCliOptions, SyncInfo } from "../../types";
|
|
1
|
+
import type { AddCliOptions, FileNode, FolderNode, Snippet, SyncInfo } from "../../types";
|
|
2
2
|
export declare function addCommand(opts: AddCliOptions): Promise<SyncInfo | undefined>;
|
|
3
|
+
export declare function fetchSnippet(id: string): Promise<Snippet | null>;
|
|
4
|
+
export declare function writeFiles(snippet: Snippet, files: Array<FileNode | FolderNode>, rootPath: string): Promise<FileNode[]>;
|
|
5
|
+
export declare function suggestRootPath(framework: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AddCliOptions, DevToolsSys, FileNode, SyncInfo } from "../types";
|
|
2
|
+
export declare function extractSignatureInfo(content: string): {
|
|
3
|
+
contentId?: string;
|
|
4
|
+
sessionKey?: string;
|
|
5
|
+
snippetId?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function findBuilderFiles(basePath: string, targetContentId: string, targetSessionKey: string): Promise<FileNode[]>;
|
|
8
|
+
export declare function watchDirectory(basePath: string, syncInfo: SyncInfo, onChange: (updatedSyncInfo: SyncInfo) => void): () => void;
|
|
9
|
+
export declare function setupSyncServer(sys: DevToolsSys, initialSyncInfo?: SyncInfo): Promise<void>;
|
|
10
|
+
export declare function syncCommand(opts: AddCliOptions): Promise<SyncInfo | undefined>;
|
package/types/types.d.ts
CHANGED
|
@@ -436,7 +436,7 @@ export interface FileNode {
|
|
|
436
436
|
name: string;
|
|
437
437
|
code: string;
|
|
438
438
|
path: string;
|
|
439
|
-
|
|
439
|
+
timestamp?: number;
|
|
440
440
|
}
|
|
441
441
|
export interface FolderNode {
|
|
442
442
|
name: string;
|
|
@@ -451,7 +451,7 @@ export interface Snippet {
|
|
|
451
451
|
suggestedName: string;
|
|
452
452
|
id: string;
|
|
453
453
|
files: Array<FileNode | FolderNode>;
|
|
454
|
-
sessionKey
|
|
454
|
+
sessionKey: string;
|
|
455
455
|
}
|
|
456
456
|
export interface SyncInfo {
|
|
457
457
|
snippet: Snippet;
|