@narumitw/pi-sync 0.28.0 → 0.29.1

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/src/types.ts CHANGED
@@ -1,3 +1,33 @@
1
+ export type StorageProfileKind = "r2" | "s3-compatible";
2
+
3
+ export interface StorageProfileSettings {
4
+ kind?: StorageProfileKind;
5
+ endpoint?: string;
6
+ region?: string;
7
+ accessKeyId?: string;
8
+ secretAccessKey?: string;
9
+ sessionToken?: string;
10
+ }
11
+
12
+ export interface SyncTargetSettings {
13
+ profile?: string;
14
+ bucket?: string;
15
+ prefix?: string;
16
+ namespace?: string;
17
+ autoSync?: boolean;
18
+ syncFiles?: unknown;
19
+ syncSessions?: boolean;
20
+ extraFiles?: unknown;
21
+ }
22
+
23
+ export interface PiSyncSettingsV2 {
24
+ version: 2;
25
+ activeTarget?: string;
26
+ profiles?: Record<string, StorageProfileSettings>;
27
+ targets?: Record<string, SyncTargetSettings>;
28
+ [key: string]: unknown;
29
+ }
30
+
1
31
  export interface SyncConfig {
2
32
  endpoint: string;
3
33
  bucket: string;
@@ -5,14 +35,24 @@ export interface SyncConfig {
5
35
  accessKeyId: string;
6
36
  secretAccessKey: string;
7
37
  sessionToken?: string;
38
+ /** Remote namespace retained as `profile` for snapshot/wire compatibility. */
8
39
  profile: string;
9
40
  prefix: string;
41
+ target?: string;
42
+ storageProfile?: string;
43
+ storageKind?: StorageProfileKind;
44
+ autoSync?: boolean;
45
+ settingsVersion?: 1 | 2;
10
46
  syncFiles?: string[];
11
47
  syncSessions: boolean;
12
48
  extraFiles: string[];
13
49
  }
14
50
 
15
51
  export interface PartialConfig {
52
+ target?: string;
53
+ storageProfile?: string;
54
+ storageKind?: StorageProfileKind;
55
+ settingsVersion?: 1 | 2;
16
56
  endpoint?: string;
17
57
  bucket?: string;
18
58
  region?: string;
@@ -84,6 +124,9 @@ export interface CommandOptions {
84
124
  silent: boolean;
85
125
  reload: boolean;
86
126
  auto: boolean;
127
+ target?: string;
128
+ signal?: AbortSignal;
129
+ onCommit?: () => void;
87
130
  args: string[];
88
131
  }
89
132