pushwork 1.1.3 → 1.1.4

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.
@@ -0,0 +1,71 @@
1
+ import { Repo } from "@automerge/automerge-repo";
2
+ import { CloneOptions, SyncOptions, DiffOptions, LogOptions, CheckoutOptions, DirectoryConfig } from "../types";
3
+ import { SyncEngine } from "../core";
4
+ /**
5
+ * Shared context that commands can use
6
+ */
7
+ export interface CommandContext {
8
+ repo: Repo;
9
+ syncEngine: SyncEngine;
10
+ config: DirectoryConfig;
11
+ workingDir: string;
12
+ }
13
+ /**
14
+ * Shared pre-action that ensures repository and sync engine are properly initialized
15
+ * This function always works, with or without network connectivity
16
+ */
17
+ export declare function setupCommandContext(workingDir?: string, customSyncServer?: string, customStorageId?: string, enableNetwork?: boolean): Promise<CommandContext>;
18
+ /**
19
+ * Safely shutdown a repository with proper error handling
20
+ */
21
+ export declare function safeRepoShutdown(repo: Repo, context?: string): Promise<void>;
22
+ /**
23
+ * Common progress message helpers
24
+ */
25
+ export declare const ProgressMessages: {
26
+ directoryFound: () => void;
27
+ configLoaded: () => void;
28
+ repoConnected: () => void;
29
+ syncServer: (server: string) => void;
30
+ storageId: (id: string) => void;
31
+ rootUrl: (url: string) => void;
32
+ changesWritten: () => void;
33
+ syncCompleted: (duration: number) => void;
34
+ directoryStructureCreated: () => void;
35
+ configSaved: () => void;
36
+ repoCreated: () => void;
37
+ };
38
+ /**
39
+ * Initialize sync in a directory
40
+ */
41
+ export declare function init(targetPath: string, syncServer?: string, syncServerStorageId?: string): Promise<void>;
42
+ /**
43
+ * Run bidirectional sync
44
+ */
45
+ export declare function sync(options: SyncOptions): Promise<void>;
46
+ /**
47
+ * Show differences between local and remote
48
+ */
49
+ export declare function diff(targetPath: string | undefined, options: DiffOptions): Promise<void>;
50
+ /**
51
+ * Show sync status
52
+ */
53
+ export declare function status(): Promise<void>;
54
+ /**
55
+ * Show sync history
56
+ */
57
+ export declare function log(targetPath: string | undefined, options: LogOptions): Promise<void>;
58
+ /**
59
+ * Checkout/restore from previous sync
60
+ */
61
+ export declare function checkout(syncId: string, targetPath: string | undefined, options: CheckoutOptions): Promise<void>;
62
+ /**
63
+ * Clone an existing synced directory from an AutomergeUrl
64
+ */
65
+ export declare function clone(rootUrl: string, targetPath: string, options: CloneOptions): Promise<void>;
66
+ /**
67
+ * Get the root URL for the current pushwork repository
68
+ */
69
+ export declare function url(targetPath?: string): Promise<void>;
70
+ export declare function commit(targetPath: string, dryRun?: boolean): Promise<void>;
71
+ //# sourceMappingURL=commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/cli/commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAA2B,MAAM,2BAA2B,CAAC;AAI1E,OAAO,EAEL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,eAAe,EACf,eAAe,EAEhB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMrC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,GAAE,MAAsB,EAClC,gBAAgB,CAAC,EAAE,MAAM,EACzB,eAAe,CAAC,EAAE,MAAM,EACxB,aAAa,GAAE,OAAc,GAC5B,OAAO,CAAC,cAAc,CAAC,CAqCzB;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;yBAON,MAAM;oBAEX,MAAM;mBACP,MAAM;;8BAKK,MAAM;;;;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