@hesprs/sync-engine-sdk 3.0.6 → 3.1.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/dist/dev.spec.d.ts +1 -1
- package/dist/index-LOl_cerr.spec.d.ts +558 -0
- package/dist/index.js +1 -1
- package/dist/index.spec.d.ts +797 -2
- package/dist/plugin/src/components/MigrationModal.js +1 -1
- package/dist/plugin/src/settings/utils.js +1 -0
- package/dist/transform.js +1 -1
- package/package.json +5 -5
- package/dist/index-BJDjAUwk.spec.d.ts +0 -1333
|
@@ -1,1333 +0,0 @@
|
|
|
1
|
-
import { App, Command, EventRef, IconName, ListedFiles, Modal, Plugin, RequestUrlParam, Stat, ToggleComponent } from "obsidian";
|
|
2
|
-
//#region test/e2e-utils.d.ts
|
|
3
|
-
type General$1 = any;
|
|
4
|
-
//#endregion
|
|
5
|
-
//#region src/types.d.ts
|
|
6
|
-
type MaybePromise<T> = Promise<T> | T;
|
|
7
|
-
type TogglableValue<T = number> = {
|
|
8
|
-
enabled: boolean;
|
|
9
|
-
value: T;
|
|
10
|
-
};
|
|
11
|
-
type FileStat = {
|
|
12
|
-
isDir: false;
|
|
13
|
-
key: string;
|
|
14
|
-
mtime: number;
|
|
15
|
-
size: number;
|
|
16
|
-
uid: string;
|
|
17
|
-
};
|
|
18
|
-
type FolderStat = {
|
|
19
|
-
isDir: true;
|
|
20
|
-
key: string;
|
|
21
|
-
};
|
|
22
|
-
type Stat$1 = FileStat | FolderStat;
|
|
23
|
-
type RecordStat = {
|
|
24
|
-
isDir: false;
|
|
25
|
-
local: string;
|
|
26
|
-
remote: string;
|
|
27
|
-
} | {
|
|
28
|
-
isDir: true;
|
|
29
|
-
};
|
|
30
|
-
type StatsMap = Map<string, Stat$1>;
|
|
31
|
-
type RecordStatsMap = Map<string, RecordStat>;
|
|
32
|
-
type GlobMatchRule = {
|
|
33
|
-
expr: string;
|
|
34
|
-
caseSensitive: boolean;
|
|
35
|
-
};
|
|
36
|
-
type Progress<T = string> = {
|
|
37
|
-
total: number;
|
|
38
|
-
completed: number;
|
|
39
|
-
current?: T;
|
|
40
|
-
};
|
|
41
|
-
type Binary = Uint8Array<ArrayBuffer>;
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/fs/interface.d.ts
|
|
44
|
-
/**
|
|
45
|
-
* All keys use unified format:
|
|
46
|
-
* - root: `/`
|
|
47
|
-
* - file: `note.md`, `folder/note.md`
|
|
48
|
-
* - folder: `folder/`, `folder/nested/`
|
|
49
|
-
*/
|
|
50
|
-
type RootFs = {
|
|
51
|
-
getUid(): string;
|
|
52
|
-
read(key: string, stat: FileStat): MaybePromise<Binary>;
|
|
53
|
-
readStream(key: string, stat: FileStat): MaybePromise<ReadableStream<Binary>>;
|
|
54
|
-
write(key: string, value: Binary, stat: FileStat): MaybePromise<string>;
|
|
55
|
-
writeStream(key: string, value: ReadableStream<Binary>, stat: FileStat): MaybePromise<string>;
|
|
56
|
-
delete(key: string): MaybePromise<void>;
|
|
57
|
-
move(oldKey: string, newKey: string): MaybePromise<void>;
|
|
58
|
-
mkdir(key: string, recursive?: boolean): MaybePromise<void>;
|
|
59
|
-
stat(key: string): MaybePromise<Stat$1>;
|
|
60
|
-
exists(key: string): MaybePromise<boolean>;
|
|
61
|
-
list(key: string, reporter: ListReporter): MaybePromise<Array<Stat$1>>;
|
|
62
|
-
};
|
|
63
|
-
type ListReporter = (progress: Required<Progress>) => MaybePromise<'include' | 'exclude' | 'advance'>;
|
|
64
|
-
type WrappedFs = RootFs & {
|
|
65
|
-
original: Fs;
|
|
66
|
-
};
|
|
67
|
-
type Fs = WrappedFs | RootFs;
|
|
68
|
-
type WriteAtom = {
|
|
69
|
-
type: 'write';
|
|
70
|
-
key: string;
|
|
71
|
-
execute: () => MaybePromise<string>;
|
|
72
|
-
resolve: (uid: string) => void;
|
|
73
|
-
reject: (err: Error) => void;
|
|
74
|
-
};
|
|
75
|
-
type DeleteAtom = {
|
|
76
|
-
type: 'delete';
|
|
77
|
-
key: string;
|
|
78
|
-
execute: () => MaybePromise<void>;
|
|
79
|
-
resolve: () => void;
|
|
80
|
-
reject: (err: Error) => void;
|
|
81
|
-
};
|
|
82
|
-
type MoveAtom = {
|
|
83
|
-
type: 'move';
|
|
84
|
-
oldKey: string;
|
|
85
|
-
newKey: string;
|
|
86
|
-
execute: () => MaybePromise<void>;
|
|
87
|
-
resolve: () => void;
|
|
88
|
-
reject: (err: Error) => void;
|
|
89
|
-
};
|
|
90
|
-
type MkdirAtom = {
|
|
91
|
-
type: 'mkdir';
|
|
92
|
-
key: string;
|
|
93
|
-
execute: () => MaybePromise<void>;
|
|
94
|
-
resolve: () => void;
|
|
95
|
-
reject: (err: Error) => void;
|
|
96
|
-
};
|
|
97
|
-
type InputAtom = WriteAtom | DeleteAtom | MoveAtom | MkdirAtom;
|
|
98
|
-
type CustomAtom = {
|
|
99
|
-
type: 'custom';
|
|
100
|
-
execute: () => MaybePromise<void>;
|
|
101
|
-
};
|
|
102
|
-
type OutputAtom = InputAtom | CustomAtom;
|
|
103
|
-
type OptimizerInput = {
|
|
104
|
-
atoms: Array<InputAtom>;
|
|
105
|
-
fs: Fs;
|
|
106
|
-
executeAtom: (atom: OutputAtom) => Promise<void | string>;
|
|
107
|
-
};
|
|
108
|
-
type OptimizerOutput = Array<OutputAtom>;
|
|
109
|
-
type BatchOptimizer = (input: OptimizerInput) => OptimizerOutput;
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region ../../node_modules/.bun/uni-kv@..+..+uni-kv.tgz/node_modules/uni-kv/dist/interface.d.ts
|
|
112
|
-
//#region src/interface.d.ts
|
|
113
|
-
type Database<D extends Record<string, unknown>, M extends Record<string, unknown>, F extends boolean> = {
|
|
114
|
-
getStore<K extends keyof D>(name: K): Store<D[K], F>;
|
|
115
|
-
getStoreNames(): IsPromise<Array<string>, F>;
|
|
116
|
-
deleteStore(name: string): IsPromise<void, F>;
|
|
117
|
-
clearStores(): IsPromise<void, F>;
|
|
118
|
-
getMeta<T extends keyof M>(key: T): IsPromise<M[T] | undefined, F>;
|
|
119
|
-
setMeta<T extends keyof M>(key: T, value: M[T]): IsPromise<void, F>;
|
|
120
|
-
dispose(): IsPromise<void, F>;
|
|
121
|
-
};
|
|
122
|
-
type Store<T, F extends boolean> = {
|
|
123
|
-
get(key: string): IsPromise<T | undefined, F>;
|
|
124
|
-
set(key: string, value: T): IsPromise<void, F>;
|
|
125
|
-
delete(key: string): IsPromise<void, F>;
|
|
126
|
-
clear(): IsPromise<void, F>;
|
|
127
|
-
keys(): IsPromise<Array<string>, F>;
|
|
128
|
-
values(): IsPromise<Array<T>, F>;
|
|
129
|
-
entries(): IsPromise<Array<[string, T]>, F>;
|
|
130
|
-
batch(operations: Array<StoreOperations<T>>): IsPromise<Array<GetResult<T>>, F>;
|
|
131
|
-
};
|
|
132
|
-
type StoreSync<T = unknown> = Store<T, false>;
|
|
133
|
-
type StoreAsync<T = unknown> = Store<T, true>;
|
|
134
|
-
type DatabaseSync<D extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = {}> = Database<D, M, false>;
|
|
135
|
-
type DatabaseAsync<D extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = {}> = Database<D, M, true>;
|
|
136
|
-
type GetOperation = {
|
|
137
|
-
type: 'get';
|
|
138
|
-
key: string;
|
|
139
|
-
};
|
|
140
|
-
type GetResult<T> = {
|
|
141
|
-
key: string;
|
|
142
|
-
value: T | undefined;
|
|
143
|
-
};
|
|
144
|
-
type SetOperation<T> = {
|
|
145
|
-
type: 'set';
|
|
146
|
-
key: string;
|
|
147
|
-
value: T;
|
|
148
|
-
};
|
|
149
|
-
type DeleteOperation = {
|
|
150
|
-
type: 'delete';
|
|
151
|
-
key: string;
|
|
152
|
-
};
|
|
153
|
-
type StoreOperations<T> = GetOperation | SetOperation<T> | DeleteOperation;
|
|
154
|
-
type IsPromise<T, F extends boolean> = F extends true ? Promise<T> : T;
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region ../../node_modules/.bun/synthkernel@.+synthkernel.tgz/node_modules/synthkernel/dist/context.d.ts
|
|
157
|
-
//#region src/context.d.ts
|
|
158
|
-
type General = any;
|
|
159
|
-
type GeneralConstructor = new (...args: Array<General>) => General;
|
|
160
|
-
type ModuleConstructor<C extends object> = new (context: C) => General;
|
|
161
|
-
type GeneralModuleInput = ReadonlyArray<GeneralConstructor> | ReadonlyArray<object>;
|
|
162
|
-
type IsPlainObject<T> = T extends object ? T extends Function | Date | RegExp | Array<any> | Map<any, any> | Set<any> ? false : true : false;
|
|
163
|
-
type ShallowMerge<A, B> = IsPlainObject<A> extends true ? (IsPlainObject<B> extends true ? Omit<A, keyof B> & B : B) : B;
|
|
164
|
-
type Keys<T> = T extends General ? keyof T : never;
|
|
165
|
-
type InstanceEach<T extends GeneralModuleInput> = T extends ReadonlyArray<GeneralConstructor> ? { [K in keyof T]: InstanceType<T[K]>; } : T;
|
|
166
|
-
type PickEach<T extends ReadonlyArray<object>, K extends PropertyKey> = { [I in keyof T]: Pick<T[I], Extract<K, keyof T[I]>>; };
|
|
167
|
-
type RootValue<T extends object> = RootKey extends keyof T ? Extract<T[RootKey], object> : {};
|
|
168
|
-
type MergeRootEach<T extends ReadonlyArray<object>> = { [I in keyof T]: ShallowMerge<Omit<T[I], RootKey>, RootValue<T[I]>>; };
|
|
169
|
-
type ExtractKeyEach<T extends ReadonlyArray<object>, K extends Keys<T>> = { [I in keyof T]: K extends keyof T[I] ? T[I][K] : never; };
|
|
170
|
-
type MergeObjects<T extends ReadonlyArray<object>, O extends ReadonlyArray<object> = MergeRootEach<T>> = { [P in Keys<O[number]>]: MergeValues<ExtractKeyEach<O, P>>; };
|
|
171
|
-
type MergeSingleKey<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>> = MergeValues<ExtractKeyEach<InstanceEach<M>, K>>;
|
|
172
|
-
type MergePair<A, B> = [A] extends [never] ? B : [B] extends [never] ? A : ShallowMerge<A, B>;
|
|
173
|
-
type MergeValues<T extends ReadonlyArray<unknown>> = T extends readonly [infer First, ...infer Rest] ? [First] extends [never] ? MergeValues<Rest> : Rest extends ReadonlyArray<unknown> ? Rest['length'] extends 0 ? First : MergePair<First, MergeValues<Rest>> : never : never;
|
|
174
|
-
type MergeResult<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>, Pr extends object, Po extends object> = MergeObjects<[Pr, ...PickEach<InstanceEach<M>, K>, Po]>;
|
|
175
|
-
type Context$1<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>, Pr extends object = {}, Po extends object = {}> = MergeResult<M, K, Pr, Po> & {
|
|
176
|
-
__modules__: WeakMap<M[number], InstanceEach<M>[number]>;
|
|
177
|
-
__getModule__: <C extends new (ctx: General) => InstanceEach<M>[number]>(ctor: C) => InstanceType<C>;
|
|
178
|
-
__addModule__: <N extends ModuleConstructor<Context$1<[...M, N], K, Pr, Po>>>(newModule: N) => Context$1<[...M, N], K, Pr, Po>;
|
|
179
|
-
__assign__: (obj: Partial<MergeResult<M, K, Pr, Po>>) => Context$1<M, K, Pr, Po>;
|
|
180
|
-
};
|
|
181
|
-
declare const ROOT_KEY = "root";
|
|
182
|
-
type RootKey = typeof ROOT_KEY;
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region ../../node_modules/.bun/synthkernel@.+synthkernel.tgz/node_modules/synthkernel/dist/reactive.d.ts
|
|
185
|
-
//#region src/reactive.d.ts
|
|
186
|
-
type RefMatchingFunc<T> = (newValue: T, oldValue: T) => unknown;
|
|
187
|
-
type Ref<T> = {
|
|
188
|
-
(): T;
|
|
189
|
-
(newValue: T): void;
|
|
190
|
-
subscribe(func: RefMatchingFunc<T>, options?: {
|
|
191
|
-
immediate?: boolean;
|
|
192
|
-
}): () => void;
|
|
193
|
-
unsubscribe(func: RefMatchingFunc<T>): void;
|
|
194
|
-
clear(): void;
|
|
195
|
-
};
|
|
196
|
-
//#endregion
|
|
197
|
-
//#region src/modules/EventBus.d.ts
|
|
198
|
-
type Dispatch<O extends object> = <K extends keyof O>(...[key, payload]: undefined extends O[K] ? [K] : [K, O[K]]) => void;
|
|
199
|
-
type On<O extends object> = <K extends keyof O>(key: K, callback: (payload: O[K]) => void) => () => void;
|
|
200
|
-
declare class EventBus {
|
|
201
|
-
readonly events: {
|
|
202
|
-
logSync: string;
|
|
203
|
-
logGeneral: string;
|
|
204
|
-
errorSync: string;
|
|
205
|
-
errorGeneral: string;
|
|
206
|
-
};
|
|
207
|
-
private readonly cleanupCallbacks;
|
|
208
|
-
private readonly isIdle;
|
|
209
|
-
private readonly syncLogs;
|
|
210
|
-
private readonly generalLogs;
|
|
211
|
-
constructor();
|
|
212
|
-
private readonly getThisSync;
|
|
213
|
-
private readonly putSyncLog;
|
|
214
|
-
private readonly putGeneralLog;
|
|
215
|
-
private readonly subscribers;
|
|
216
|
-
private readonly on;
|
|
217
|
-
private readonly dispatch;
|
|
218
|
-
private readonly getLogs;
|
|
219
|
-
readonly dispose: () => void;
|
|
220
|
-
readonly root: {
|
|
221
|
-
dispatch: Dispatch<General$1>;
|
|
222
|
-
getLogs: () => string;
|
|
223
|
-
isIdle: Ref<boolean>;
|
|
224
|
-
on: On<General$1>;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/modules/I18n.d.ts
|
|
229
|
-
type ObsidianLanguageCode = 'en' | 'af' | 'am' | 'ar' | 'az' | 'be' | 'bg' | 'bn' | 'ca' | 'cs' | 'da' | 'de' | 'dv' | 'el' | 'en-GB' | 'eo' | 'es' | 'eu' | 'fa' | 'fi' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hr' | 'hu' | 'id' | 'it' | 'ja' | 'ka' | 'kh' | 'kn' | 'ko' | 'ky' | 'la' | 'lt' | 'lv' | 'ml' | 'ms' | 'nan-TW' | 'ne' | 'nl' | 'nn' | 'no' | 'oc' | 'or' | 'pl' | 'pt' | 'pt-BR' | 'ro' | 'ru' | 'sa' | 'si' | 'sk' | 'sl' | 'sq' | 'sr' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'vi' | 'zh' | 'zh-TW';
|
|
230
|
-
type Primitive = string | number | boolean | null | undefined;
|
|
231
|
-
type Fragment<A = undefined> = (frag: DocumentFragment, args: A) => void;
|
|
232
|
-
type TranslationResource = Record<string, string | Fragment<General$1>>;
|
|
233
|
-
type InterpolationValues = Record<string, Primitive>;
|
|
234
|
-
type TranslateParams<R extends Fragment<General$1> | string> = R extends Fragment<infer A> ? ([undefined] extends [A] ? [] : [A]) : [] | [InterpolationValues];
|
|
235
|
-
type Translate<O extends TranslationResource> = <K extends keyof O>(key: K, ...args: TranslateParams<O[K]>) => O[K] extends string ? string : DocumentFragment;
|
|
236
|
-
declare class I18n {
|
|
237
|
-
private readonly targetLangs;
|
|
238
|
-
readonly i18n: {};
|
|
239
|
-
private readonly registerI18n;
|
|
240
|
-
private readonly translate;
|
|
241
|
-
root: {
|
|
242
|
-
registerI18n: (code: ObsidianLanguageCode, resource: TranslationResource) => void;
|
|
243
|
-
translate: Translate<General$1>;
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
//#endregion
|
|
247
|
-
//#region src/modules/Storage.d.ts
|
|
248
|
-
type RecordStore = StoreAsync<RecordStat>;
|
|
249
|
-
declare class Storage {
|
|
250
|
-
private readonly ctx;
|
|
251
|
-
private readonly memoryDB;
|
|
252
|
-
private readonly indexedDB;
|
|
253
|
-
constructor(ctx: {
|
|
254
|
-
getNamespace: () => string;
|
|
255
|
-
});
|
|
256
|
-
private readonly getRecordStore;
|
|
257
|
-
private readonly deleteRecordStore;
|
|
258
|
-
private readonly clearRecordStores;
|
|
259
|
-
private readonly recordStoreExists;
|
|
260
|
-
readonly root: {
|
|
261
|
-
clearRecordStores: () => Promise<void>;
|
|
262
|
-
deleteRecordStore: (namespace?: string) => MaybePromise<void>;
|
|
263
|
-
getRecordStore: (namespace?: string) => {
|
|
264
|
-
get(key: string): Promise<RecordStat | undefined>;
|
|
265
|
-
set(key: string, value: RecordStat): Promise<void>;
|
|
266
|
-
delete(key: string): Promise<void>;
|
|
267
|
-
clear(): Promise<void>;
|
|
268
|
-
keys(): Promise<string[]>;
|
|
269
|
-
values(): Promise<RecordStat[]>;
|
|
270
|
-
entries(): Promise<[string, RecordStat][]>;
|
|
271
|
-
batch(operations: StoreOperations<RecordStat>[]): Promise<GetResult<RecordStat>[]>;
|
|
272
|
-
};
|
|
273
|
-
indexedDB: DatabaseAsync<General$1, General$1>;
|
|
274
|
-
memoryDB: {
|
|
275
|
-
getStore<K extends string | number | symbol>(name: K): {
|
|
276
|
-
get(key: string): any;
|
|
277
|
-
set(key: string, value: any): void;
|
|
278
|
-
delete(key: string): void;
|
|
279
|
-
clear(): void;
|
|
280
|
-
keys(): string[];
|
|
281
|
-
values(): any[];
|
|
282
|
-
entries(): [string, any][];
|
|
283
|
-
batch(operations: StoreOperations<any>[]): GetResult<any>[];
|
|
284
|
-
};
|
|
285
|
-
getStoreNames(): string[];
|
|
286
|
-
deleteStore(name: string): void;
|
|
287
|
-
clearStores(): void;
|
|
288
|
-
getMeta<T extends string | number | symbol>(key: T): any;
|
|
289
|
-
setMeta<T extends string | number | symbol>(key: T, value: any): void;
|
|
290
|
-
dispose(): void;
|
|
291
|
-
};
|
|
292
|
-
recordStoreExists: (namespace?: string) => MaybePromise<boolean>;
|
|
293
|
-
};
|
|
294
|
-
readonly dispose: () => void;
|
|
295
|
-
}
|
|
296
|
-
//#endregion
|
|
297
|
-
//#region src/sync/tasks/interface.d.ts
|
|
298
|
-
type BaseTaskOptions = {
|
|
299
|
-
localFs: Fs;
|
|
300
|
-
remoteFs: Fs;
|
|
301
|
-
record: RecordStore;
|
|
302
|
-
};
|
|
303
|
-
type TaskNames = 'addRecord' | 'removeRecord' | 'createLocalDir' | 'createRemoteDir' | 'download' | 'resolveConflict' | 'removeLocal' | 'removeRemote' | 'upload' | 'moveLocal' | 'moveRemote';
|
|
304
|
-
type ConflictResolverPayload = {
|
|
305
|
-
local: FileStat;
|
|
306
|
-
remote: FileStat;
|
|
307
|
-
key: string;
|
|
308
|
-
localFs: Fs;
|
|
309
|
-
remoteFs: Fs;
|
|
310
|
-
record: RecordStore;
|
|
311
|
-
};
|
|
312
|
-
type ConflictResolver = (payload: ConflictResolverPayload) => MaybePromise<void>;
|
|
313
|
-
declare abstract class BaseTask<T extends TaskOptions = TaskOptions> {
|
|
314
|
-
readonly options: BaseTaskOptions & T;
|
|
315
|
-
constructor(options: BaseTaskOptions & T);
|
|
316
|
-
protected readonly remoteFs: Fs;
|
|
317
|
-
protected readonly localFs: Fs;
|
|
318
|
-
protected readonly record: RecordStore;
|
|
319
|
-
name: TaskNames;
|
|
320
|
-
prettyName: string;
|
|
321
|
-
readonly key: string;
|
|
322
|
-
readonly local: (BaseTaskOptions & T)['local'];
|
|
323
|
-
readonly remote: (BaseTaskOptions & T)['remote'];
|
|
324
|
-
abstract exec(): MaybePromise<void>;
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/sync/tasks/AddRecord.d.ts
|
|
328
|
-
declare class AddRecord extends BaseTask<OptionsWithBothStats> {
|
|
329
|
-
exec(): Promise<void>;
|
|
330
|
-
}
|
|
331
|
-
//#endregion
|
|
332
|
-
//#region src/sync/tasks/CreateRemoteDir.d.ts
|
|
333
|
-
declare class CreateRemoteDir extends BaseTask<OptionsWithLocalFolderStat> {
|
|
334
|
-
exec(): Promise<void>;
|
|
335
|
-
}
|
|
336
|
-
//#endregion
|
|
337
|
-
//#region src/sync/tasks/Download.d.ts
|
|
338
|
-
declare class Download extends BaseTask<OptionsWithRemoteFileStat> {
|
|
339
|
-
exec(): Promise<void>;
|
|
340
|
-
}
|
|
341
|
-
//#endregion
|
|
342
|
-
//#region src/sync/tasks/MoveLocal.d.ts
|
|
343
|
-
declare class MoveLocal extends BaseTask<OptionsWithRemoteStatAndOldKey> {
|
|
344
|
-
exec(): Promise<void>;
|
|
345
|
-
}
|
|
346
|
-
//#endregion
|
|
347
|
-
//#region src/sync/tasks/MoveRemote.d.ts
|
|
348
|
-
declare class MoveRemote extends BaseTask<OptionsWithLocalStatAndOldKey> {
|
|
349
|
-
exec(): Promise<void>;
|
|
350
|
-
}
|
|
351
|
-
//#endregion
|
|
352
|
-
//#region src/sync/tasks/RemoveLocal.d.ts
|
|
353
|
-
declare class RemoveLocal extends BaseTask<OptionsWithLocalStat> {
|
|
354
|
-
exec(): Promise<void>;
|
|
355
|
-
}
|
|
356
|
-
//#endregion
|
|
357
|
-
//#region src/sync/tasks/RemoveRecord.d.ts
|
|
358
|
-
declare class RemoveRecord extends BaseTask {
|
|
359
|
-
exec(): Promise<void>;
|
|
360
|
-
}
|
|
361
|
-
//#endregion
|
|
362
|
-
//#region src/sync/tasks/RemoveRemote.d.ts
|
|
363
|
-
declare class RemoveRemote extends BaseTask<OptionsWithRemoteStat> {
|
|
364
|
-
exec(): Promise<void>;
|
|
365
|
-
}
|
|
366
|
-
//#endregion
|
|
367
|
-
//#region src/sync/tasks/ResolveConflict.d.ts
|
|
368
|
-
declare class ResolveConflict extends BaseTask<OptionsWithBothFileStats & {
|
|
369
|
-
resolver: ConflictResolver;
|
|
370
|
-
}> {
|
|
371
|
-
exec: () => MaybePromise<void>;
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
|
-
//#region src/sync/tasks/Upload.d.ts
|
|
375
|
-
declare class Upload extends BaseTask<OptionsWithLocalFileStat> {
|
|
376
|
-
exec(): Promise<void>;
|
|
377
|
-
}
|
|
378
|
-
//#endregion
|
|
379
|
-
//#region src/sync/decision/interface.d.ts
|
|
380
|
-
type TaskOptions = {
|
|
381
|
-
key: string;
|
|
382
|
-
remote?: Stat$1;
|
|
383
|
-
local?: Stat$1;
|
|
384
|
-
};
|
|
385
|
-
type OptionsWithRemoteFileStat = {
|
|
386
|
-
remote: FileStat;
|
|
387
|
-
} & TaskOptions;
|
|
388
|
-
type OptionsWithLocalFileStat = {
|
|
389
|
-
local: FileStat;
|
|
390
|
-
} & TaskOptions;
|
|
391
|
-
type OptionsWithRemoteFolderStat = {
|
|
392
|
-
remote: FolderStat;
|
|
393
|
-
} & TaskOptions;
|
|
394
|
-
type OptionsWithLocalFolderStat = {
|
|
395
|
-
local: FolderStat;
|
|
396
|
-
} & TaskOptions;
|
|
397
|
-
type OptionsWithLocalStat = {
|
|
398
|
-
local: Stat$1;
|
|
399
|
-
} & TaskOptions;
|
|
400
|
-
type OptionsWithRemoteStat = {
|
|
401
|
-
remote: Stat$1;
|
|
402
|
-
} & TaskOptions;
|
|
403
|
-
type OptionsWithBothStats = {
|
|
404
|
-
local: Stat$1;
|
|
405
|
-
remote: Stat$1;
|
|
406
|
-
} & TaskOptions;
|
|
407
|
-
type OptionsWithBothFileStats = {
|
|
408
|
-
local: FileStat;
|
|
409
|
-
remote: FileStat;
|
|
410
|
-
} & TaskOptions;
|
|
411
|
-
type OptionsWithLocalStatAndOldKey = {
|
|
412
|
-
local: Stat$1;
|
|
413
|
-
oldKey: string;
|
|
414
|
-
} & TaskOptions;
|
|
415
|
-
type OptionsWithRemoteStatAndOldKey = {
|
|
416
|
-
remote: Stat$1;
|
|
417
|
-
oldKey: string;
|
|
418
|
-
} & TaskOptions;
|
|
419
|
-
type TaskOptionsMap = {
|
|
420
|
-
download: OptionsWithRemoteFileStat;
|
|
421
|
-
upload: OptionsWithLocalFileStat;
|
|
422
|
-
resolveConflict: OptionsWithBothFileStats;
|
|
423
|
-
removeLocal: OptionsWithLocalStat;
|
|
424
|
-
removeRemote: OptionsWithRemoteStat;
|
|
425
|
-
createLocalDir: OptionsWithRemoteFolderStat;
|
|
426
|
-
createRemoteDir: OptionsWithLocalFolderStat;
|
|
427
|
-
removeRecord: TaskOptions;
|
|
428
|
-
addRecord: OptionsWithBothStats;
|
|
429
|
-
moveLocal: OptionsWithRemoteStatAndOldKey;
|
|
430
|
-
moveRemote: OptionsWithLocalStatAndOldKey;
|
|
431
|
-
};
|
|
432
|
-
declare const taskMap: {
|
|
433
|
-
readonly addRecord: typeof AddRecord;
|
|
434
|
-
readonly createLocalDir: typeof CreateLocalDir;
|
|
435
|
-
readonly createRemoteDir: typeof CreateRemoteDir;
|
|
436
|
-
readonly download: typeof Download;
|
|
437
|
-
readonly moveLocal: typeof MoveLocal;
|
|
438
|
-
readonly moveRemote: typeof MoveRemote;
|
|
439
|
-
readonly removeLocal: typeof RemoveLocal;
|
|
440
|
-
readonly removeRecord: typeof RemoveRecord;
|
|
441
|
-
readonly removeRemote: typeof RemoveRemote;
|
|
442
|
-
readonly resolveConflict: typeof ResolveConflict;
|
|
443
|
-
readonly upload: typeof Upload;
|
|
444
|
-
};
|
|
445
|
-
type TaskFactory = <N extends TaskNames>(name: N, options: TaskOptionsMap[N]) => InstanceType<(typeof taskMap)[N]>;
|
|
446
|
-
type Decider = (input: DeciderInput) => Array<BaseTask>;
|
|
447
|
-
type DeciderInput = {
|
|
448
|
-
localStats: StatsMap;
|
|
449
|
-
remoteStats: StatsMap;
|
|
450
|
-
records: RecordStatsMap;
|
|
451
|
-
taskFactory: TaskFactory;
|
|
452
|
-
logger: (log: string) => void;
|
|
453
|
-
};
|
|
454
|
-
//#endregion
|
|
455
|
-
//#region src/sync/tasks/CreateLocalDir.d.ts
|
|
456
|
-
declare class CreateLocalDir extends BaseTask<OptionsWithRemoteFolderStat> {
|
|
457
|
-
exec(): Promise<void>;
|
|
458
|
-
}
|
|
459
|
-
//#endregion
|
|
460
|
-
//#region src/modules/Sync.d.ts
|
|
461
|
-
type SyncTerminateReason = {
|
|
462
|
-
result: 'cancelled';
|
|
463
|
-
} | {
|
|
464
|
-
result: 'completed';
|
|
465
|
-
} | {
|
|
466
|
-
result: 'failed';
|
|
467
|
-
error: string;
|
|
468
|
-
} | {
|
|
469
|
-
result: 'noop';
|
|
470
|
-
};
|
|
471
|
-
type TaskInfo = {
|
|
472
|
-
name: TaskNames;
|
|
473
|
-
key: string;
|
|
474
|
-
prettyName: string;
|
|
475
|
-
isDir: boolean;
|
|
476
|
-
};
|
|
477
|
-
type FailedTaskInfo = TaskInfo & {
|
|
478
|
-
error: string;
|
|
479
|
-
};
|
|
480
|
-
declare class Sync {
|
|
481
|
-
private readonly ctx;
|
|
482
|
-
dispatch: Dispatch<Events>;
|
|
483
|
-
on: On<Events>;
|
|
484
|
-
constructor(ctx: {
|
|
485
|
-
dispatch: Dispatch<Events>;
|
|
486
|
-
initializeSync: () => Infras;
|
|
487
|
-
getDecider: () => Decider;
|
|
488
|
-
on: On<Events>;
|
|
489
|
-
translate: Translate<Translations>;
|
|
490
|
-
listRemote: RemoteLister;
|
|
491
|
-
getConflictResolver: () => ConflictResolver;
|
|
492
|
-
});
|
|
493
|
-
readonly events: {
|
|
494
|
-
syncStarted: {
|
|
495
|
-
isCancelled: Ref<boolean>;
|
|
496
|
-
trigger: string;
|
|
497
|
-
};
|
|
498
|
-
remoteWalkProgress: Progress;
|
|
499
|
-
syncTerminated: SyncTerminateReason;
|
|
500
|
-
requestConfirmDelete: Array<RemoveLocal>;
|
|
501
|
-
requestConfirmTasks: Array<BaseTask>;
|
|
502
|
-
syncCanceled: undefined;
|
|
503
|
-
taskCompleted: TaskInfo;
|
|
504
|
-
taskFailed: FailedTaskInfo;
|
|
505
|
-
executionStarted: Array<BaseTask>;
|
|
506
|
-
};
|
|
507
|
-
readonly settings: {
|
|
508
|
-
maxFileSize: TogglableValue;
|
|
509
|
-
exclusionRules: Array<GlobMatchRule>;
|
|
510
|
-
inclusionRules: Array<GlobMatchRule>;
|
|
511
|
-
confirmDeleteInAutoSync: boolean;
|
|
512
|
-
confirmTasksInSync: boolean;
|
|
513
|
-
};
|
|
514
|
-
private readonly postProcess;
|
|
515
|
-
private readonly confirmTasks;
|
|
516
|
-
private readonly confirmDeletion;
|
|
517
|
-
private readonly executeSync;
|
|
518
|
-
private readonly convertDeleteToUpload;
|
|
519
|
-
root: {
|
|
520
|
-
executeSync: (trigger: string) => Promise<{
|
|
521
|
-
result: 'cancelled';
|
|
522
|
-
} | {
|
|
523
|
-
result: 'completed';
|
|
524
|
-
} | {
|
|
525
|
-
result: 'failed';
|
|
526
|
-
error: string;
|
|
527
|
-
} | {
|
|
528
|
-
result: 'noop';
|
|
529
|
-
}>;
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
//#endregion
|
|
533
|
-
//#region src/modules/Observability.d.ts
|
|
534
|
-
type SyncStage = 'none' | 'walkingRemote' | 'awaitingConfirmation' | 'executing' | 'completed' | 'completedNoop' | 'cancelled' | 'failed';
|
|
535
|
-
type AddRibbonIcon = (icon: IconName, title: string, callback: (evt: MouseEvent) => void) => HTMLElement;
|
|
536
|
-
declare class Observability {
|
|
537
|
-
private readonly ctx;
|
|
538
|
-
private lastSyncTime;
|
|
539
|
-
private readonly sinceLastSyncText;
|
|
540
|
-
private readonly syncStage;
|
|
541
|
-
private readonly walkProgress;
|
|
542
|
-
private readonly executionProgress;
|
|
543
|
-
private readonly cleanupCallbacks;
|
|
544
|
-
private readonly t;
|
|
545
|
-
private readonly progressText;
|
|
546
|
-
readonly settings: {
|
|
547
|
-
noticeStatusOnMobile: boolean;
|
|
548
|
-
exportLogsDirectory: string;
|
|
549
|
-
};
|
|
550
|
-
readonly i18n: {
|
|
551
|
-
startSync: string;
|
|
552
|
-
startNonInteractiveSync: string;
|
|
553
|
-
stopSync: string;
|
|
554
|
-
showProgress: string;
|
|
555
|
-
exportLogsToFile: string;
|
|
556
|
-
exportLogsFailed: string;
|
|
557
|
-
idle: string;
|
|
558
|
-
};
|
|
559
|
-
constructor(ctx: {
|
|
560
|
-
addStatusBarItem: () => HTMLElement;
|
|
561
|
-
on: On<Events>;
|
|
562
|
-
translate: Translate<Translations>;
|
|
563
|
-
isIdle: Ref<boolean>;
|
|
564
|
-
dispatch: Dispatch<Events>;
|
|
565
|
-
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
566
|
-
showProgress: () => void;
|
|
567
|
-
addCommand: (command: Command) => Command;
|
|
568
|
-
addRibbonIcon: AddRibbonIcon;
|
|
569
|
-
getLogs: () => string;
|
|
570
|
-
app: App;
|
|
571
|
-
});
|
|
572
|
-
readonly start: () => void;
|
|
573
|
-
private readonly setupStatus;
|
|
574
|
-
private readonly setupCommands;
|
|
575
|
-
private readonly exportLogs;
|
|
576
|
-
readonly dispose: () => void;
|
|
577
|
-
root: {
|
|
578
|
-
executionProgress: Ref<Progress<TaskInfo>>;
|
|
579
|
-
exportLogs: () => Promise<void>;
|
|
580
|
-
syncStage: Ref<SyncStage>;
|
|
581
|
-
walkProgress: Ref<Progress>;
|
|
582
|
-
};
|
|
583
|
-
}
|
|
584
|
-
//#endregion
|
|
585
|
-
//#region src/components/file-tree/index.d.ts
|
|
586
|
-
type FileTreeTranslations = {
|
|
587
|
-
selectAll: string;
|
|
588
|
-
};
|
|
589
|
-
//#endregion
|
|
590
|
-
//#region src/components/HeadersEditorModal.d.ts
|
|
591
|
-
type HeadersEditorTranslations = {
|
|
592
|
-
add: string;
|
|
593
|
-
cancel: string;
|
|
594
|
-
addSecretHeader: string;
|
|
595
|
-
remove: string;
|
|
596
|
-
save: string;
|
|
597
|
-
customHeadersDescription: string;
|
|
598
|
-
editHeaders: string;
|
|
599
|
-
headerKeyPlaceholder: string;
|
|
600
|
-
headerValuePlaceholder: string;
|
|
601
|
-
omittedInvalidEntry: string;
|
|
602
|
-
};
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region src/components/MigrationModal.d.ts
|
|
605
|
-
type MigrationModalTranslations = {
|
|
606
|
-
cancel: string;
|
|
607
|
-
remoteMigration: string;
|
|
608
|
-
migrationProcess: string;
|
|
609
|
-
startMigration: string;
|
|
610
|
-
migrationDescription: string;
|
|
611
|
-
migrationPhase1Description: string;
|
|
612
|
-
migrationPhase2Description: string;
|
|
613
|
-
migrationPhase3Description: string;
|
|
614
|
-
toggleWithoutMigration: string;
|
|
615
|
-
migrationFailed: string;
|
|
616
|
-
completed: string;
|
|
617
|
-
hide: string;
|
|
618
|
-
done: string;
|
|
619
|
-
};
|
|
620
|
-
type MigrationEvents = {
|
|
621
|
-
migrationProgress: Progress;
|
|
622
|
-
migrationFailed: string;
|
|
623
|
-
};
|
|
624
|
-
type MigrationContext = {
|
|
625
|
-
app: App;
|
|
626
|
-
on: On<MigrationEvents>;
|
|
627
|
-
dispatch: Dispatch<MigrationEvents & Events>;
|
|
628
|
-
translate: Translate<MigrationModalTranslations>;
|
|
629
|
-
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
630
|
-
initializeSync: () => Infras;
|
|
631
|
-
memoryDB: ExistingMemoryDB;
|
|
632
|
-
};
|
|
633
|
-
declare function setNeedMigration(ctx: MigrationContext, { toggle, needMigration, content, apply }: {
|
|
634
|
-
toggle: ToggleComponent;
|
|
635
|
-
needMigration?: (value: boolean) => MaybePromise<boolean>;
|
|
636
|
-
content: (value: boolean) => string | DocumentFragment;
|
|
637
|
-
apply: (value: boolean) => MaybePromise<void>;
|
|
638
|
-
}): void;
|
|
639
|
-
//#endregion
|
|
640
|
-
//#region src/sdk/prefix.d.ts
|
|
641
|
-
declare function prefixWrapper(original: Fs, prefix: string): WrappedFs;
|
|
642
|
-
//#endregion
|
|
643
|
-
//#region src/utils/pipe.d.ts
|
|
644
|
-
declare function pipe({ from, to, stat, key }: {
|
|
645
|
-
from: Fs;
|
|
646
|
-
to: Fs;
|
|
647
|
-
key: string;
|
|
648
|
-
stat: FileStat;
|
|
649
|
-
}): Promise<string | undefined>;
|
|
650
|
-
declare function readWithSize(fs: Fs, key: string, stat: FileStat): Promise<Binary | ReadableStream<Binary> | undefined>;
|
|
651
|
-
declare function writeWithValue(fs: Fs, key: string, value: Binary | ReadableStream<Binary>, stat: FileStat): MaybePromise<string>;
|
|
652
|
-
//#endregion
|
|
653
|
-
//#region src/sdk/index.d.ts
|
|
654
|
-
declare function digOriginal(wrapped: Fs): RootFs;
|
|
655
|
-
type SelectFromContext<O extends object> = Context extends O ? O : never;
|
|
656
|
-
//#endregion
|
|
657
|
-
//#region src/modules/Extensibility.d.ts
|
|
658
|
-
type ModuleInstance = {
|
|
659
|
-
moduleSettings: object;
|
|
660
|
-
dispose?: () => void;
|
|
661
|
-
start?: () => void;
|
|
662
|
-
};
|
|
663
|
-
type ModuleCtor = new (ctx: object) => ModuleInstance;
|
|
664
|
-
type ModuleMeta = {
|
|
665
|
-
id: string;
|
|
666
|
-
name: string;
|
|
667
|
-
version: string;
|
|
668
|
-
description: string;
|
|
669
|
-
main: string;
|
|
670
|
-
icon?: string;
|
|
671
|
-
minPluginVersion?: string;
|
|
672
|
-
integrity: string;
|
|
673
|
-
};
|
|
674
|
-
type AugmentedModuleMeta = ModuleMeta & {
|
|
675
|
-
enabled: boolean;
|
|
676
|
-
source: string;
|
|
677
|
-
icon: string;
|
|
678
|
-
};
|
|
679
|
-
declare class Extensibility {
|
|
680
|
-
private readonly ctx;
|
|
681
|
-
private readonly moduleDir;
|
|
682
|
-
private readonly sourceCache;
|
|
683
|
-
private readonly discoveredModules;
|
|
684
|
-
private readonly loadedModules;
|
|
685
|
-
private readonly moduleStore;
|
|
686
|
-
private autoUpdateTimeout?;
|
|
687
|
-
readonly settings: {
|
|
688
|
-
moduleSources: Array<string>;
|
|
689
|
-
moduleAutoUpdate: boolean;
|
|
690
|
-
modules: Record<string, object>;
|
|
691
|
-
};
|
|
692
|
-
readonly i18n: {
|
|
693
|
-
failedToLoadModule: string;
|
|
694
|
-
failedToDownloadModule: string;
|
|
695
|
-
failedToFetchSource: string;
|
|
696
|
-
};
|
|
697
|
-
readonly events: {
|
|
698
|
-
moduleLoaded: string;
|
|
699
|
-
moduleUnloaded: string;
|
|
700
|
-
};
|
|
701
|
-
constructor(ctx: {
|
|
702
|
-
app: App;
|
|
703
|
-
__addModule__: Context['__addModule__'];
|
|
704
|
-
__getModule__: Context['__getModule__'];
|
|
705
|
-
dispatch: Dispatch<Events>;
|
|
706
|
-
translate: Translate<Translations>;
|
|
707
|
-
allModules: Set<General$1>;
|
|
708
|
-
isIdle: Ref<boolean>;
|
|
709
|
-
saveSettings: () => Promise<void>;
|
|
710
|
-
indexedDB: DatabaseAsync<Record<string, AugmentedModuleMeta>>;
|
|
711
|
-
});
|
|
712
|
-
readonly start: () => void;
|
|
713
|
-
private readonly createOperationFactory;
|
|
714
|
-
private readonly loadAllModules;
|
|
715
|
-
private readonly loadModule;
|
|
716
|
-
private readonly unloadModule;
|
|
717
|
-
private readonly downloadModule;
|
|
718
|
-
private readonly deleteModule;
|
|
719
|
-
private readonly fetchSources;
|
|
720
|
-
private readonly updateModules;
|
|
721
|
-
private readonly updateModuleMeta;
|
|
722
|
-
private readonly enableModule;
|
|
723
|
-
private readonly disableModule;
|
|
724
|
-
private readonly getModulePath;
|
|
725
|
-
private readonly parseModulePath;
|
|
726
|
-
readonly dispose: () => void;
|
|
727
|
-
readonly root: {
|
|
728
|
-
deleteModule: (id: string) => Promise<void>;
|
|
729
|
-
disableModule: (id: string) => void;
|
|
730
|
-
discoveredModules: Map<string, AugmentedModuleMeta>;
|
|
731
|
-
downloadModule: (meta: AugmentedModuleMeta, waitIdle?: boolean) => Promise<void>;
|
|
732
|
-
enableModule: (id: string) => Promise<void>;
|
|
733
|
-
fetchSources: (manual?: boolean) => Promise<AugmentedModuleMeta[]>;
|
|
734
|
-
loadAllModules: () => Promise<void>;
|
|
735
|
-
loadModule: (meta: AugmentedModuleMeta, start?: boolean, module?: string) => Promise<void>;
|
|
736
|
-
loadedModules: Map<string, ModuleCtor>;
|
|
737
|
-
unloadModule: (id: string) => void;
|
|
738
|
-
updateModuleMeta: (meta: AugmentedModuleMeta) => Promise<void>;
|
|
739
|
-
updateModules: () => Promise<void>;
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
//#endregion
|
|
743
|
-
//#region src/components/ModuleEditorModal.d.ts
|
|
744
|
-
type ModuleEditorTranslations = {
|
|
745
|
-
editModuleInformation: string;
|
|
746
|
-
enable: string;
|
|
747
|
-
name: string;
|
|
748
|
-
namePlaceholder: string;
|
|
749
|
-
description: string;
|
|
750
|
-
descriptionPlaceholder: string;
|
|
751
|
-
icon: string;
|
|
752
|
-
iconDescription: Fragment;
|
|
753
|
-
iconPlaceholder: string;
|
|
754
|
-
updateSource: string;
|
|
755
|
-
updateSourceDescription: string;
|
|
756
|
-
updateSourcePlaceholder: string;
|
|
757
|
-
invalidValue: string;
|
|
758
|
-
integrityVerification: string;
|
|
759
|
-
integrityVerificationDescription: Fragment;
|
|
760
|
-
save: string;
|
|
761
|
-
cancel: string;
|
|
762
|
-
};
|
|
763
|
-
//#endregion
|
|
764
|
-
//#region src/components/UnknownModuleModal.d.ts
|
|
765
|
-
type FileInfo = {
|
|
766
|
-
path: string;
|
|
767
|
-
size: string;
|
|
768
|
-
mtime: string;
|
|
769
|
-
ctime: string;
|
|
770
|
-
fileName: string;
|
|
771
|
-
};
|
|
772
|
-
type UnknownModuleTranslations = {
|
|
773
|
-
unknownModule: string;
|
|
774
|
-
unknownModuleDescription: Fragment<FileInfo>;
|
|
775
|
-
delete: string;
|
|
776
|
-
configure: string;
|
|
777
|
-
};
|
|
778
|
-
//#endregion
|
|
779
|
-
//#region src/settings/controls.d.ts
|
|
780
|
-
type ControlsSettingTranslations = {
|
|
781
|
-
controls: string;
|
|
782
|
-
maxFileSize: string;
|
|
783
|
-
maxFileSizeDescription: string;
|
|
784
|
-
maxFileSizePlaceholder: string;
|
|
785
|
-
maxRequestConcurrency: string;
|
|
786
|
-
minRequestInterval: string;
|
|
787
|
-
minRequestIntervalDescription: string;
|
|
788
|
-
minRequestIntervalPlaceholder: string;
|
|
789
|
-
maxRequestConcurrencyPlaceholder: string;
|
|
790
|
-
maxRequestConcurrencyDescription: string;
|
|
791
|
-
maxMemoryConsumption: string;
|
|
792
|
-
maxMemoryConsumptionDescription: string;
|
|
793
|
-
maxMemoryConsumptionPlaceholder: string;
|
|
794
|
-
invalidValue: string;
|
|
795
|
-
};
|
|
796
|
-
//#endregion
|
|
797
|
-
//#region src/settings/development.d.ts
|
|
798
|
-
type DevelopmentSettingTranslations = {
|
|
799
|
-
development: string;
|
|
800
|
-
clearRecords: string;
|
|
801
|
-
recordsCleared: string;
|
|
802
|
-
clear: string;
|
|
803
|
-
clearRecordsDescription: string;
|
|
804
|
-
export: string;
|
|
805
|
-
exportLogsDescription: string;
|
|
806
|
-
exportLogsDirectoryPlaceholder: string;
|
|
807
|
-
exportLogsToFile: string;
|
|
808
|
-
};
|
|
809
|
-
//#endregion
|
|
810
|
-
//#region src/settings/features.d.ts
|
|
811
|
-
type FeaturesSettingTranslations = {
|
|
812
|
-
features: string;
|
|
813
|
-
realtimeSyncFastMode: string;
|
|
814
|
-
realtimeSyncFastModeDescription: string;
|
|
815
|
-
realtimeSync: string;
|
|
816
|
-
realtimeSyncDescription: string;
|
|
817
|
-
realtimeSyncPlaceholder: string;
|
|
818
|
-
startupSync: string;
|
|
819
|
-
startupSyncDescription: string;
|
|
820
|
-
startupSyncPlaceholder: string;
|
|
821
|
-
scheduledSync: string;
|
|
822
|
-
scheduledSyncDescription: string;
|
|
823
|
-
scheduledSyncPlaceholder: string;
|
|
824
|
-
asymmetricStorage: string;
|
|
825
|
-
asymmetricStorageDescription: Fragment;
|
|
826
|
-
asymmetricStorageMigration: Fragment<'enable' | 'disable'>;
|
|
827
|
-
invalidValue: string;
|
|
828
|
-
} & MigrationModalTranslations;
|
|
829
|
-
//#endregion
|
|
830
|
-
//#region src/components/FilterEditorModal.d.ts
|
|
831
|
-
type FilterEditorTranslations = {
|
|
832
|
-
cancel: string;
|
|
833
|
-
remove: string;
|
|
834
|
-
save: string;
|
|
835
|
-
add: string;
|
|
836
|
-
inclusionRules: string;
|
|
837
|
-
exclusionRules: string;
|
|
838
|
-
inclusionRulesDescription: string;
|
|
839
|
-
exclusionRulesDescription: string;
|
|
840
|
-
filterPlaceholder: string;
|
|
841
|
-
};
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region src/settings/filter.d.ts
|
|
844
|
-
type FilterSettingTranslations = {
|
|
845
|
-
filterRules: string;
|
|
846
|
-
edit: string;
|
|
847
|
-
} & FilterEditorTranslations;
|
|
848
|
-
//#endregion
|
|
849
|
-
//#region src/settings/head.d.ts
|
|
850
|
-
type HeadSettingTranslations = {
|
|
851
|
-
moduleAutoUpdate: string;
|
|
852
|
-
moduleAutoUpdateDescription: string;
|
|
853
|
-
moduleManagement: string;
|
|
854
|
-
moduleManagementDescription: string;
|
|
855
|
-
openPanel: string;
|
|
856
|
-
backend: string;
|
|
857
|
-
backendDescription: string;
|
|
858
|
-
syncStrategy: string;
|
|
859
|
-
syncStrategyDescription: string;
|
|
860
|
-
checkConnectionFailed: string;
|
|
861
|
-
checkConnectionSuccess: string;
|
|
862
|
-
checkConnection: string;
|
|
863
|
-
conflictResolveStrategy: string;
|
|
864
|
-
conflictResolveStrategyDescription: string;
|
|
865
|
-
};
|
|
866
|
-
//#endregion
|
|
867
|
-
//#region src/settings/miscellaneous.d.ts
|
|
868
|
-
type MiscellaneousSettingTranslations = {
|
|
869
|
-
miscellaneous: string;
|
|
870
|
-
diffMatchPatch: string;
|
|
871
|
-
keepLocal: string;
|
|
872
|
-
keepRemote: string;
|
|
873
|
-
skip: string;
|
|
874
|
-
noticeStatusOnMobile: string;
|
|
875
|
-
noticeStatusOnMobileDescription: string;
|
|
876
|
-
confirmTasksInSync: string;
|
|
877
|
-
confirmTasksInSyncDescription: string;
|
|
878
|
-
confirmDeleteInAutoSync: string;
|
|
879
|
-
confirmDeleteInAutoSyncDescription: string;
|
|
880
|
-
customHeaders: string;
|
|
881
|
-
customHeadersDescription: string;
|
|
882
|
-
edit: string;
|
|
883
|
-
};
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region src/modules/Bootstrap.d.ts
|
|
886
|
-
type CustomHeaders = Array<{
|
|
887
|
-
type: 'plaintext' | 'secret';
|
|
888
|
-
value: string;
|
|
889
|
-
key: string;
|
|
890
|
-
}>;
|
|
891
|
-
type ExistingMemoryDB = DatabaseSync<{
|
|
892
|
-
localContext20000: Stat$1;
|
|
893
|
-
remoteContext10000: Stat$1;
|
|
894
|
-
remoteContext20000: Stat$1;
|
|
895
|
-
}, {
|
|
896
|
-
localContext20000Marker: string;
|
|
897
|
-
remoteContext10000Marker: string;
|
|
898
|
-
remoteContext20000Marker: string;
|
|
899
|
-
}>;
|
|
900
|
-
declare class Bootstrap {
|
|
901
|
-
private readonly ctx;
|
|
902
|
-
private readonly cleanupCallbacks;
|
|
903
|
-
private readonly memoryStates;
|
|
904
|
-
private isCancelled?;
|
|
905
|
-
private readonly localPool;
|
|
906
|
-
private readonly remotePool;
|
|
907
|
-
private localFs?;
|
|
908
|
-
private remoteFs?;
|
|
909
|
-
readonly i18n: {
|
|
910
|
-
bidirectional: string;
|
|
911
|
-
mirrorLocal: string;
|
|
912
|
-
mirrorRemote: string;
|
|
913
|
-
latestSurvive: string;
|
|
914
|
-
keepLocal: string;
|
|
915
|
-
keepRemote: string;
|
|
916
|
-
renameAndKeepBoth: string;
|
|
917
|
-
skip: string;
|
|
918
|
-
} & ControlsSettingTranslations & DevelopmentSettingTranslations & FeaturesSettingTranslations & FilterSettingTranslations & HeadSettingTranslations & MiscellaneousSettingTranslations & HeadersEditorTranslations & UnknownModuleTranslations & ModuleEditorTranslations & FileTreeTranslations;
|
|
919
|
-
readonly settings: {
|
|
920
|
-
maxMemoryConsumption: TogglableValue;
|
|
921
|
-
maxRequestConcurrency: TogglableValue;
|
|
922
|
-
minRequestInterval: TogglableValue;
|
|
923
|
-
realtimeSyncFastMode: boolean;
|
|
924
|
-
asymmetricStorage: boolean;
|
|
925
|
-
customHeaders: CustomHeaders;
|
|
926
|
-
};
|
|
927
|
-
constructor(ctx: {
|
|
928
|
-
app: App;
|
|
929
|
-
registerI18n: (code: ObsidianLanguageCode, resource: TranslationResource) => void;
|
|
930
|
-
on: On<Events>;
|
|
931
|
-
dispatch: Dispatch<Events>;
|
|
932
|
-
memoryDB: ExistingMemoryDB;
|
|
933
|
-
registerDecider: (id: string, entry: DeciderEntry) => void;
|
|
934
|
-
registerLocalFsWrapper: (entry: FsWrapperEntry) => void;
|
|
935
|
-
registerRemoteFs: (id: string, entry: RemoteFsEntry) => void;
|
|
936
|
-
registerRemoteFsWrapper: (entry: FsWrapperEntry) => void;
|
|
937
|
-
translate: Translate<Translations>;
|
|
938
|
-
optimizeLocal: BatchOptimizer;
|
|
939
|
-
optimizeRemote: BatchOptimizer;
|
|
940
|
-
registerLocalOptimizer: (optimizer: OptimizerEntry) => void;
|
|
941
|
-
registerRemoteOptimizer: (optimizer: OptimizerEntry) => void;
|
|
942
|
-
registerRemoteLister: (entry: RemoteListerEntry) => () => boolean;
|
|
943
|
-
registerSetting: (entry: SettingEntry) => () => boolean;
|
|
944
|
-
registerConflictResolver: (id: string, entry: ConflictResolverEntry) => void;
|
|
945
|
-
registerRemoteRequestMiddleware: (entry: RemoteRequestMiddlewareEntry) => void;
|
|
946
|
-
registerLocalRequestMiddleware: (entry: LocalRequestMiddlewareEntry) => void;
|
|
947
|
-
});
|
|
948
|
-
readonly start: () => void;
|
|
949
|
-
readonly dispose: () => void;
|
|
950
|
-
}
|
|
951
|
-
//#endregion
|
|
952
|
-
//#region src/components/module-management/index.d.ts
|
|
953
|
-
type ModuleManagementTranslations = {
|
|
954
|
-
disableModule: string;
|
|
955
|
-
downloadModule: string;
|
|
956
|
-
enableModule: string;
|
|
957
|
-
installed: string;
|
|
958
|
-
loadingModules: string;
|
|
959
|
-
noInstalledModulesFound: string;
|
|
960
|
-
noMatchingModulesFound: string;
|
|
961
|
-
noModulesAvailable: string;
|
|
962
|
-
updateAvailable: string;
|
|
963
|
-
updateModule: string;
|
|
964
|
-
deleteModule: string;
|
|
965
|
-
editModuleInformation: string;
|
|
966
|
-
official: string;
|
|
967
|
-
};
|
|
968
|
-
//#endregion
|
|
969
|
-
//#region src/components/SourceEditorModal.d.ts
|
|
970
|
-
type SourceEditorTranslations = {
|
|
971
|
-
add: string;
|
|
972
|
-
cancel: string;
|
|
973
|
-
editSources: string;
|
|
974
|
-
omittedInvalidEntry: string;
|
|
975
|
-
moduleSourcePlaceholder: string;
|
|
976
|
-
remove: string;
|
|
977
|
-
save: string;
|
|
978
|
-
sourcesDescription: string;
|
|
979
|
-
httpInsecureWarning: string;
|
|
980
|
-
};
|
|
981
|
-
//#endregion
|
|
982
|
-
//#region src/modules/ModulesModal.d.ts
|
|
983
|
-
type ModulesModalTranslations = ModuleManagementTranslations & SourceEditorTranslations & {
|
|
984
|
-
searchModules: string;
|
|
985
|
-
editSources: string;
|
|
986
|
-
moduleManagement: string;
|
|
987
|
-
showInstalledOnly: string;
|
|
988
|
-
configurations: string;
|
|
989
|
-
};
|
|
990
|
-
declare class ModulesModal extends Modal {
|
|
991
|
-
private readonly ctx;
|
|
992
|
-
private readonly t;
|
|
993
|
-
private readonly modalCleanup;
|
|
994
|
-
private sourceEditorModal?;
|
|
995
|
-
private showInstalledOnly;
|
|
996
|
-
constructor(ctx: {
|
|
997
|
-
app: App;
|
|
998
|
-
translate: Translate<ModulesModalTranslations>;
|
|
999
|
-
saveSettings: () => Promise<void>;
|
|
1000
|
-
fetchSources: (manual?: boolean) => Promise<Array<AugmentedModuleMeta>>;
|
|
1001
|
-
discoveredModules: Map<string, AugmentedModuleMeta>;
|
|
1002
|
-
loadedModules: Map<string, unknown>;
|
|
1003
|
-
downloadModule: (meta: AugmentedModuleMeta) => Promise<void>;
|
|
1004
|
-
deleteModule: (id: string) => Promise<void>;
|
|
1005
|
-
loadModule: (meta: AugmentedModuleMeta, start?: boolean) => Promise<void>;
|
|
1006
|
-
unloadModule: (id: string) => void;
|
|
1007
|
-
enableModule: (id: string) => Promise<void>;
|
|
1008
|
-
disableModule: (id: string) => void;
|
|
1009
|
-
updateModuleMeta: (meta: AugmentedModuleMeta) => Promise<void>;
|
|
1010
|
-
});
|
|
1011
|
-
readonly i18n: ModulesModalTranslations;
|
|
1012
|
-
readonly settings: {
|
|
1013
|
-
moduleSources: Array<string>;
|
|
1014
|
-
};
|
|
1015
|
-
root: {
|
|
1016
|
-
closeModuleManagement: () => void;
|
|
1017
|
-
openModuleManagement: () => void;
|
|
1018
|
-
};
|
|
1019
|
-
onOpen(): void;
|
|
1020
|
-
onClose(): void;
|
|
1021
|
-
private readonly openSourceEditorModal;
|
|
1022
|
-
dispose(): void;
|
|
1023
|
-
}
|
|
1024
|
-
//#endregion
|
|
1025
|
-
//#region src/modules/ProgressModal.d.ts
|
|
1026
|
-
type DeleteConfirmReturn = {
|
|
1027
|
-
delete: Array<RemoveLocal>;
|
|
1028
|
-
reupload: Array<RemoveLocal>;
|
|
1029
|
-
};
|
|
1030
|
-
declare class ProgressModal extends Modal {
|
|
1031
|
-
private readonly ctx;
|
|
1032
|
-
private readonly moduleCleanupCallbacks;
|
|
1033
|
-
private readonly t;
|
|
1034
|
-
private opening;
|
|
1035
|
-
private readonly modalCleanupCallbacks;
|
|
1036
|
-
private readonly dispatch;
|
|
1037
|
-
private description?;
|
|
1038
|
-
private detailContainer?;
|
|
1039
|
-
private controls?;
|
|
1040
|
-
constructor(ctx: {
|
|
1041
|
-
app: App;
|
|
1042
|
-
translate: Translate<Translations>;
|
|
1043
|
-
on: On<Events>;
|
|
1044
|
-
dispatch: Dispatch<Events>;
|
|
1045
|
-
syncStage: Ref<SyncStage>;
|
|
1046
|
-
walkProgress: Ref<Progress>;
|
|
1047
|
-
executionProgress: Ref<Progress<TaskInfo>>;
|
|
1048
|
-
});
|
|
1049
|
-
readonly events: {
|
|
1050
|
-
tasksConfirmed: Array<BaseTask>;
|
|
1051
|
-
deleteConfirmed: DeleteConfirmReturn;
|
|
1052
|
-
};
|
|
1053
|
-
readonly i18n: {
|
|
1054
|
-
syncProgress: string;
|
|
1055
|
-
completed: string;
|
|
1056
|
-
failedTasksDescription: string;
|
|
1057
|
-
confirmDeleteDescription: string;
|
|
1058
|
-
confirmTasksDescription: Fragment;
|
|
1059
|
-
hide: string;
|
|
1060
|
-
confirm: string;
|
|
1061
|
-
cancel: string;
|
|
1062
|
-
done: string;
|
|
1063
|
-
stopSync: string;
|
|
1064
|
-
} & Record<TaskNames | SyncStage, string>;
|
|
1065
|
-
private readonly renderHideStop;
|
|
1066
|
-
private readonly renderConfirmCancel;
|
|
1067
|
-
private readonly renderDone;
|
|
1068
|
-
private readonly showDetails;
|
|
1069
|
-
private readonly hideDetails;
|
|
1070
|
-
onOpen(): void;
|
|
1071
|
-
root: {
|
|
1072
|
-
hideProgress: () => void;
|
|
1073
|
-
showProgress: () => void;
|
|
1074
|
-
};
|
|
1075
|
-
onClose(): void;
|
|
1076
|
-
dispose(): void;
|
|
1077
|
-
}
|
|
1078
|
-
//#endregion
|
|
1079
|
-
//#region src/modules/Scheduler.d.ts
|
|
1080
|
-
declare class Scheduler {
|
|
1081
|
-
private readonly ctx;
|
|
1082
|
-
private readonly pendingRequests;
|
|
1083
|
-
private isScheduling;
|
|
1084
|
-
private realtimeSyncTimer?;
|
|
1085
|
-
private scheduledSyncTimer?;
|
|
1086
|
-
private startupSyncTimer?;
|
|
1087
|
-
constructor(ctx: {
|
|
1088
|
-
syncStage: Ref<SyncStage>;
|
|
1089
|
-
executeSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
1090
|
-
registerEvent: (ref: EventRef) => void;
|
|
1091
|
-
app: App;
|
|
1092
|
-
isIdle: Ref<boolean>;
|
|
1093
|
-
});
|
|
1094
|
-
settings: {
|
|
1095
|
-
startupSync: TogglableValue;
|
|
1096
|
-
scheduledSync: TogglableValue;
|
|
1097
|
-
realtimeSync: TogglableValue;
|
|
1098
|
-
exclusionRules: Array<GlobMatchRule>;
|
|
1099
|
-
inclusionRules: Array<GlobMatchRule>;
|
|
1100
|
-
};
|
|
1101
|
-
private readonly requestSync;
|
|
1102
|
-
start: () => void;
|
|
1103
|
-
dispose: () => void;
|
|
1104
|
-
private readonly startScheduledSync;
|
|
1105
|
-
private readonly stopScheduledSync;
|
|
1106
|
-
private readonly onChange;
|
|
1107
|
-
private readonly scheduleFlush;
|
|
1108
|
-
private readonly flush;
|
|
1109
|
-
root: {
|
|
1110
|
-
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
1111
|
-
startScheduledSync: () => void;
|
|
1112
|
-
stopScheduledSync: () => void;
|
|
1113
|
-
};
|
|
1114
|
-
}
|
|
1115
|
-
//#endregion
|
|
1116
|
-
//#region src/index.d.ts
|
|
1117
|
-
declare const internalModules: readonly [typeof EventBus, typeof I18n, typeof Storage, typeof Extensibility, typeof Registrar, typeof Sync, typeof Observability, typeof Scheduler, typeof ProgressModal, typeof ModulesModal, typeof Bootstrap];
|
|
1118
|
-
type InternalModules = typeof internalModules;
|
|
1119
|
-
type MergeKeys = 'settings' | 'root' | 'events' | 'i18n';
|
|
1120
|
-
type Context = Context$1<InternalModules, MergeKeys, {
|
|
1121
|
-
app: App;
|
|
1122
|
-
addCommand: (command: Command) => Command;
|
|
1123
|
-
registerEvent: (ref: EventRef) => void;
|
|
1124
|
-
addRibbonIcon: AddRibbonIcon;
|
|
1125
|
-
addStatusBarItem: () => HTMLElement;
|
|
1126
|
-
saveSettings: () => Promise<void>;
|
|
1127
|
-
}>;
|
|
1128
|
-
type Events = MergeSingleKey<InternalModules, 'events'>;
|
|
1129
|
-
type Settings = MergeSingleKey<InternalModules, 'settings'>;
|
|
1130
|
-
type Translations = MergeSingleKey<InternalModules, 'i18n'>;
|
|
1131
|
-
//#endregion
|
|
1132
|
-
//#region src/modules/Registrar.d.ts
|
|
1133
|
-
type RejectableWrapper<T> = (value: T) => T | undefined;
|
|
1134
|
-
type OrderedWrapperEntry<T> = {
|
|
1135
|
-
priority: number;
|
|
1136
|
-
apply: RejectableWrapper<T>;
|
|
1137
|
-
};
|
|
1138
|
-
type RemoteRequestMiddlewareEntry = OrderedWrapperEntry<Request>;
|
|
1139
|
-
type LocalRequestMiddlewareEntry = OrderedWrapperEntry<VaultRequest>;
|
|
1140
|
-
type FsWrapperEntry = OrderedWrapperEntry<Fs>;
|
|
1141
|
-
type CheckConnectionResult = {
|
|
1142
|
-
success: true;
|
|
1143
|
-
} | {
|
|
1144
|
-
success: false;
|
|
1145
|
-
reason: string;
|
|
1146
|
-
};
|
|
1147
|
-
type RemoteFsEntry = {
|
|
1148
|
-
instantiate: (request: Request) => RootFs;
|
|
1149
|
-
prettyName: () => string;
|
|
1150
|
-
checkConnection: (request: Request) => MaybePromise<CheckConnectionResult>;
|
|
1151
|
-
};
|
|
1152
|
-
type DeciderEntry = {
|
|
1153
|
-
decider: Decider;
|
|
1154
|
-
prettyName: () => string;
|
|
1155
|
-
};
|
|
1156
|
-
type ConflictResolverEntry = {
|
|
1157
|
-
prettyName: () => string;
|
|
1158
|
-
resolver: ConflictResolver;
|
|
1159
|
-
};
|
|
1160
|
-
type GeneralFn = (...args: ReadonlyArray<General$1>) => unknown;
|
|
1161
|
-
type RejectableApply<F extends GeneralFn> = (...input: Parameters<F>) => ReturnType<F> | undefined;
|
|
1162
|
-
type OrderedApplyEntry<F extends GeneralFn> = {
|
|
1163
|
-
apply: RejectableApply<F>;
|
|
1164
|
-
priority: number;
|
|
1165
|
-
};
|
|
1166
|
-
type RemoteLister = (info: Infras & {
|
|
1167
|
-
trigger: string;
|
|
1168
|
-
reporter: ListReporter;
|
|
1169
|
-
}) => MaybePromise<Array<Stat$1>>;
|
|
1170
|
-
type RemoteListerEntry = OrderedApplyEntry<RemoteLister>;
|
|
1171
|
-
type OptimizerEntry = OrderedApplyEntry<BatchOptimizer>;
|
|
1172
|
-
type SettingEntry = {
|
|
1173
|
-
priority: number;
|
|
1174
|
-
apply: (el: HTMLElement) => void;
|
|
1175
|
-
};
|
|
1176
|
-
type RequestParam = Omit<RequestUrlParam, 'body'> & {
|
|
1177
|
-
body?: string | Binary;
|
|
1178
|
-
};
|
|
1179
|
-
type RequestResponse = {
|
|
1180
|
-
text: () => string;
|
|
1181
|
-
bytes: () => Binary;
|
|
1182
|
-
json: () => General$1;
|
|
1183
|
-
headers: Record<string, string>;
|
|
1184
|
-
status: number;
|
|
1185
|
-
};
|
|
1186
|
-
type Request = (params: RequestParam | string) => Promise<RequestResponse>;
|
|
1187
|
-
type Infras = {
|
|
1188
|
-
localFs: Fs;
|
|
1189
|
-
remoteFs: Fs;
|
|
1190
|
-
record: RecordStore;
|
|
1191
|
-
};
|
|
1192
|
-
declare class Registrar {
|
|
1193
|
-
private readonly ctx;
|
|
1194
|
-
private settingTab?;
|
|
1195
|
-
private readonly cleanupCallbacks;
|
|
1196
|
-
private readonly localFsWrapperRegistry;
|
|
1197
|
-
private readonly remoteFsWrapperRegistry;
|
|
1198
|
-
private readonly localOptimizerRegistry;
|
|
1199
|
-
private readonly remoteOptimizerRegistry;
|
|
1200
|
-
private readonly remoteListerRegistry;
|
|
1201
|
-
private readonly settingRegistry;
|
|
1202
|
-
private readonly remoteRequestMiddlewareRegistry;
|
|
1203
|
-
private readonly localRequestMiddlewareRegistry;
|
|
1204
|
-
private readonly remoteFsRegistry;
|
|
1205
|
-
private readonly deciderRegistry;
|
|
1206
|
-
private readonly conflictResolverRegistry;
|
|
1207
|
-
readonly settings: {
|
|
1208
|
-
remoteFs: string;
|
|
1209
|
-
decider: string;
|
|
1210
|
-
conflictResolver: string;
|
|
1211
|
-
};
|
|
1212
|
-
constructor(ctx: {
|
|
1213
|
-
app: App;
|
|
1214
|
-
on: On<Events>;
|
|
1215
|
-
getRecordStore: (namespace?: string) => StoreAsync<RecordStat>;
|
|
1216
|
-
});
|
|
1217
|
-
private readonly getVaultRequest;
|
|
1218
|
-
private readonly createLocalFs;
|
|
1219
|
-
private readonly createRemoteFs;
|
|
1220
|
-
private readonly getRequest;
|
|
1221
|
-
private readonly getCheckConnection;
|
|
1222
|
-
private readonly getDecider;
|
|
1223
|
-
private readonly optimizeLocal;
|
|
1224
|
-
private readonly optimizeRemote;
|
|
1225
|
-
private readonly listRemote;
|
|
1226
|
-
private readonly getConflictResolver;
|
|
1227
|
-
private readonly getNamespace;
|
|
1228
|
-
private readonly initializeSync;
|
|
1229
|
-
private readonly addSettingTab;
|
|
1230
|
-
private readonly rerenderSettingTab;
|
|
1231
|
-
root: {
|
|
1232
|
-
addSettingTab: (plugin: Plugin) => void;
|
|
1233
|
-
conflictResolverRegistry: Map<string, ConflictResolverEntry>;
|
|
1234
|
-
createLocalFs: () => Fs;
|
|
1235
|
-
createRemoteFs: (remoteFs?: string) => RootFs;
|
|
1236
|
-
deciderRegistry: Map<string, DeciderEntry>;
|
|
1237
|
-
getCheckConnection: (remoteFs?: string) => () => MaybePromise<CheckConnectionResult>;
|
|
1238
|
-
getConflictResolver: () => ConflictResolver;
|
|
1239
|
-
getDecider: () => Decider;
|
|
1240
|
-
getNamespace: (localFs?: Fs, remoteFs?: Fs) => string;
|
|
1241
|
-
getRequest: () => Request;
|
|
1242
|
-
getVaultRequest: () => VaultRequest;
|
|
1243
|
-
initializeSync: () => Infras;
|
|
1244
|
-
listRemote: RemoteLister;
|
|
1245
|
-
optimizeLocal: BatchOptimizer;
|
|
1246
|
-
optimizeRemote: BatchOptimizer;
|
|
1247
|
-
registerConflictResolver: (key: string, entry: ConflictResolverEntry) => () => boolean;
|
|
1248
|
-
registerCss: (css: string) => () => void;
|
|
1249
|
-
registerDecider: (key: string, entry: DeciderEntry) => () => boolean;
|
|
1250
|
-
registerLocalFsWrapper: (entry: FsWrapperEntry) => () => boolean;
|
|
1251
|
-
registerLocalOptimizer: (entry: OptimizerEntry) => () => boolean;
|
|
1252
|
-
registerLocalRequestMiddleware: (entry: LocalRequestMiddlewareEntry) => () => boolean;
|
|
1253
|
-
registerRemoteFs: (key: string, entry: RemoteFsEntry) => () => boolean;
|
|
1254
|
-
registerRemoteFsWrapper: (entry: FsWrapperEntry) => () => boolean;
|
|
1255
|
-
registerRemoteLister: (entry: RemoteListerEntry) => () => boolean;
|
|
1256
|
-
registerRemoteOptimizer: (entry: OptimizerEntry) => () => boolean;
|
|
1257
|
-
registerRemoteRequestMiddleware: (entry: RemoteRequestMiddlewareEntry) => () => boolean;
|
|
1258
|
-
registerSetting: (entry: SettingEntry) => () => boolean;
|
|
1259
|
-
remoteFsRegistry: Map<string, RemoteFsEntry>;
|
|
1260
|
-
rerenderSettingTab: () => void | undefined;
|
|
1261
|
-
};
|
|
1262
|
-
readonly dispose: () => void;
|
|
1263
|
-
}
|
|
1264
|
-
//#endregion
|
|
1265
|
-
//#region src/fs/vault/request.d.ts
|
|
1266
|
-
type VaultRequestParam = {
|
|
1267
|
-
method: 'GET';
|
|
1268
|
-
key: string;
|
|
1269
|
-
} | {
|
|
1270
|
-
method: 'GET_STREAM';
|
|
1271
|
-
key: string;
|
|
1272
|
-
} | {
|
|
1273
|
-
method: 'PUT';
|
|
1274
|
-
key: string;
|
|
1275
|
-
value: Binary;
|
|
1276
|
-
headers?: {
|
|
1277
|
-
mtime?: number;
|
|
1278
|
-
ctime?: number;
|
|
1279
|
-
};
|
|
1280
|
-
} | {
|
|
1281
|
-
method: 'APPEND';
|
|
1282
|
-
key: string;
|
|
1283
|
-
value: Binary;
|
|
1284
|
-
headers?: {
|
|
1285
|
-
mtime?: number;
|
|
1286
|
-
ctime?: number;
|
|
1287
|
-
};
|
|
1288
|
-
} | {
|
|
1289
|
-
method: 'DELETE';
|
|
1290
|
-
key: string;
|
|
1291
|
-
headers?: {
|
|
1292
|
-
permanent?: boolean;
|
|
1293
|
-
};
|
|
1294
|
-
} | {
|
|
1295
|
-
method: 'MOVE';
|
|
1296
|
-
key: string;
|
|
1297
|
-
headers: {
|
|
1298
|
-
destination: string;
|
|
1299
|
-
};
|
|
1300
|
-
} | {
|
|
1301
|
-
method: 'MKDIR';
|
|
1302
|
-
key: string;
|
|
1303
|
-
} | {
|
|
1304
|
-
method: 'EXISTS';
|
|
1305
|
-
key: string;
|
|
1306
|
-
} | {
|
|
1307
|
-
method: 'STAT';
|
|
1308
|
-
key: string;
|
|
1309
|
-
headers?: {
|
|
1310
|
-
cached?: boolean;
|
|
1311
|
-
};
|
|
1312
|
-
} | {
|
|
1313
|
-
method: 'LIST';
|
|
1314
|
-
key: string;
|
|
1315
|
-
headers?: {
|
|
1316
|
-
cached?: boolean;
|
|
1317
|
-
};
|
|
1318
|
-
};
|
|
1319
|
-
type VaultRequestResponseMap = {
|
|
1320
|
-
GET: Binary;
|
|
1321
|
-
GET_STREAM: ReadableStream<Binary>;
|
|
1322
|
-
PUT: void;
|
|
1323
|
-
APPEND: void;
|
|
1324
|
-
DELETE: void;
|
|
1325
|
-
MOVE: void;
|
|
1326
|
-
MKDIR: void;
|
|
1327
|
-
EXISTS: boolean;
|
|
1328
|
-
STAT: Stat;
|
|
1329
|
-
LIST: ListedFiles;
|
|
1330
|
-
};
|
|
1331
|
-
type VaultRequest = <T extends VaultRequestParam>(params: T) => Promise<VaultRequestResponseMap[T['method']]>;
|
|
1332
|
-
//#endregion
|
|
1333
|
-
export { TranslationResource as $, SyncTerminateReason as A, MoveRemote as B, SelectFromContext as C, FolderStat as Ct, writeWithValue as D, RecordStatsMap as Dt, readWithSize as E, RecordStat as Et, Upload as F, BaseTask as G, Download as H, ResolveConflict as I, TaskNames as J, ConflictResolver as K, RemoveRemote as L, Decider as M, DeciderInput as N, prefixWrapper as O, Stat$1 as Ot, TaskFactory as P, Translate as Q, RemoveRecord as R, ModuleMeta as S, FileStat as St, pipe as T, Progress as Tt, CreateRemoteDir as U, MoveLocal as V, AddRecord as W, Fragment as X, RecordStore as Y, ObsidianLanguageCode as Z, Events as _, OutputAtom as _t, FsWrapperEntry as a, StoreOperations as at, ExistingMemoryDB as b, WriteAtom as bt, RemoteFsEntry as c, CustomAtom as ct, RemoteRequestMiddlewareEntry as d, InputAtom as dt, Dispatch as et, Request as f, ListReporter as ft, Context as g, OptimizerOutput as gt, SettingEntry as h, OptimizerInput as ht, DeciderEntry as i, StoreAsync as it, CreateLocalDir as j, setNeedMigration as k, StatsMap as kt, RemoteLister as l, DeleteAtom as lt, RequestResponse as m, MoveAtom as mt, CheckConnectionResult as n, DatabaseAsync as nt, LocalRequestMiddlewareEntry as o, StoreSync as ot, RequestParam as p, MkdirAtom as pt, ConflictResolverPayload as q, ConflictResolverEntry as r, DatabaseSync as rt, OptimizerEntry as s, BatchOptimizer as st, VaultRequest as t, On as tt, RemoteListerEntry as u, Fs as ut, Settings as v, RootFs as vt, digOriginal as w, MaybePromise as wt, AugmentedModuleMeta as x, Binary as xt, Translations as y, WrappedFs as yt, RemoveLocal as z };
|