@hesprs/sync-engine-sdk 3.0.3 → 3.1.0
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 +23 -1
- package/dist/index-LOl_cerr.spec.d.ts +558 -0
- package/dist/index.js +1 -1
- package/dist/index.spec.d.ts +795 -2
- package/dist/pipe-6bvLNkHj.js +1 -0
- package/dist/plugin/src/components/MigrationModal.js +1 -1
- package/dist/plugin/src/settings/utils.js +1 -0
- package/dist/plugin/src/sync/decision/interface.js +1 -0
- package/dist/plugin/src/sync/tasks/AddRecord.js +1 -0
- package/dist/plugin/src/sync/tasks/CreateLocalDir.js +1 -0
- package/dist/plugin/src/sync/tasks/CreateRemoteDir.js +1 -0
- package/dist/plugin/src/sync/tasks/Download.js +1 -0
- package/dist/plugin/src/sync/tasks/MoveLocal.js +1 -0
- package/dist/plugin/src/sync/tasks/MoveRemote.js +1 -0
- package/dist/plugin/src/sync/tasks/RemoveLocal.js +1 -0
- package/dist/plugin/src/sync/tasks/RemoveRecord.js +1 -0
- package/dist/plugin/src/sync/tasks/RemoveRemote.js +1 -0
- package/dist/plugin/src/sync/tasks/ResolveConflict.js +1 -0
- package/dist/plugin/src/sync/tasks/Upload.js +1 -0
- package/dist/plugin/src/sync/tasks/interface.js +1 -0
- package/dist/plugin/src/utils/move-value.js +1 -0
- package/dist/plugin/test/test-kit.js +1 -1
- package/dist/transform.js +1 -1
- package/package.json +6 -6
- package/dist/index-M1OI9qC7.spec.d.ts +0 -1334
package/dist/index.spec.d.ts
CHANGED
|
@@ -1,2 +1,795 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
|
|
1
|
+
import { $ as RootFs, A as AddRecord, B as StoreOperations, C as RemoveRemote, D as MoveLocal, E as MoveRemote, F as RecordStore, G as Fs, H as BatchOptimizer, I as Storage, J as MkdirAtom, K as InputAtom, L as DatabaseAsync, M as ConflictResolver, N as ConflictResolverPayload, O as Download, P as TaskNames, Q as OutputAtom, R as DatabaseSync, S as ResolveConflict, T as RemoveLocal, U as CustomAtom, V as StoreSync, W as DeleteAtom, X as OptimizerInput, Y as MoveAtom, Z as OptimizerOutput, _ as CreateLocalDir, a as FsWrapperEntry, at as GlobMatchRule, b as TaskFactory, c as OptimizerEntry, ct as RecordStat, d as RemoteLister, dt as StatsMap, et as WrappedFs, f as RemoteListerEntry, ft as TogglableValue, g as RequestResponse, h as RequestParam, i as DeciderEntry, it as FolderStat, j as BaseTask, k as CreateRemoteDir, l as Registrar, lt as RecordStatsMap, m as Request, n as CheckConnectionResult, nt as Binary, o as Infras, ot as MaybePromise, p as RemoteRequestMiddlewareEntry, pt as General$1, q as ListReporter, r as ConflictResolverEntry, rt as FileStat, s as LocalRequestMiddlewareEntry, st as Progress, t as VaultRequest, tt as WriteAtom, u as RemoteFsEntry, ut as Stat, v as Decider, w as RemoveRecord, x as Upload, y as DeciderInput, z as StoreAsync } from "./index-LOl_cerr.spec.js";
|
|
2
|
+
import { App, Command, EventRef, IconName, Modal, Plugin, Setting, SettingDefinition, SettingDefinitionGroup, SettingDefinitionItem, SettingDefinitionList, SettingDefinitionPage, ToggleComponent } from "obsidian";
|
|
3
|
+
//#region ../../node_modules/.bun/synthkernel@.+synthkernel.tgz/node_modules/synthkernel/dist/context.d.ts
|
|
4
|
+
//#region src/context.d.ts
|
|
5
|
+
type General = any;
|
|
6
|
+
type GeneralConstructor = new (...args: Array<General>) => General;
|
|
7
|
+
type ModuleConstructor<C extends object> = new (context: C) => General;
|
|
8
|
+
type GeneralModuleInput = ReadonlyArray<GeneralConstructor> | ReadonlyArray<object>;
|
|
9
|
+
type IsPlainObject<T> = T extends object ? T extends Function | Date | RegExp | Array<any> | Map<any, any> | Set<any> ? false : true : false;
|
|
10
|
+
type ShallowMerge<A, B> = IsPlainObject<A> extends true ? (IsPlainObject<B> extends true ? Omit<A, keyof B> & B : B) : B;
|
|
11
|
+
type Keys<T> = T extends General ? keyof T : never;
|
|
12
|
+
type InstanceEach<T extends GeneralModuleInput> = T extends ReadonlyArray<GeneralConstructor> ? { [K in keyof T]: InstanceType<T[K]>; } : T;
|
|
13
|
+
type PickEach<T extends ReadonlyArray<object>, K extends PropertyKey> = { [I in keyof T]: Pick<T[I], Extract<K, keyof T[I]>>; };
|
|
14
|
+
type RootValue<T extends object> = RootKey extends keyof T ? Extract<T[RootKey], object> : {};
|
|
15
|
+
type MergeRootEach<T extends ReadonlyArray<object>> = { [I in keyof T]: ShallowMerge<Omit<T[I], RootKey>, RootValue<T[I]>>; };
|
|
16
|
+
type ExtractKeyEach<T extends ReadonlyArray<object>, K extends Keys<T>> = { [I in keyof T]: K extends keyof T[I] ? T[I][K] : never; };
|
|
17
|
+
type MergeObjects<T extends ReadonlyArray<object>, O extends ReadonlyArray<object> = MergeRootEach<T>> = { [P in Keys<O[number]>]: MergeValues<ExtractKeyEach<O, P>>; };
|
|
18
|
+
type MergeSingleKey<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>> = MergeValues<ExtractKeyEach<InstanceEach<M>, K>>;
|
|
19
|
+
type MergePair<A, B> = [A] extends [never] ? B : [B] extends [never] ? A : ShallowMerge<A, B>;
|
|
20
|
+
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;
|
|
21
|
+
type MergeResult<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>, Pr extends object, Po extends object> = MergeObjects<[Pr, ...PickEach<InstanceEach<M>, K>, Po]>;
|
|
22
|
+
type Context$1<M extends GeneralModuleInput, K extends Keys<InstanceEach<M>[number]>, Pr extends object = {}, Po extends object = {}> = MergeResult<M, K, Pr, Po> & {
|
|
23
|
+
__modules__: WeakMap<M[number], InstanceEach<M>[number]>;
|
|
24
|
+
__getModule__: <C extends new (ctx: General) => InstanceEach<M>[number]>(ctor: C) => InstanceType<C>;
|
|
25
|
+
__addModule__: <N extends ModuleConstructor<Context$1<[...M, N], K, Pr, Po>>>(newModule: N) => Context$1<[...M, N], K, Pr, Po>;
|
|
26
|
+
__assign__: (obj: Partial<MergeResult<M, K, Pr, Po>>) => Context$1<M, K, Pr, Po>;
|
|
27
|
+
};
|
|
28
|
+
declare const ROOT_KEY = "root";
|
|
29
|
+
type RootKey = typeof ROOT_KEY;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region ../../node_modules/.bun/synthkernel@.+synthkernel.tgz/node_modules/synthkernel/dist/reactive.d.ts
|
|
32
|
+
//#region src/reactive.d.ts
|
|
33
|
+
type RefMatchingFunc<T> = (newValue: T, oldValue: T) => unknown;
|
|
34
|
+
type Ref<T> = {
|
|
35
|
+
(): T;
|
|
36
|
+
(newValue: T): void;
|
|
37
|
+
subscribe(func: RefMatchingFunc<T>, options?: {
|
|
38
|
+
immediate?: boolean;
|
|
39
|
+
}): () => void;
|
|
40
|
+
unsubscribe(func: RefMatchingFunc<T>): void;
|
|
41
|
+
clear(): void;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/modules/EventBus.d.ts
|
|
45
|
+
type Dispatch<O extends object> = <K extends keyof O>(...[key, payload]: undefined extends O[K] ? [K] : [K, O[K]]) => void;
|
|
46
|
+
type On<O extends object> = <K extends keyof O>(key: K, callback: (payload: O[K]) => void) => () => void;
|
|
47
|
+
declare class EventBus {
|
|
48
|
+
readonly events: {
|
|
49
|
+
logSync: string;
|
|
50
|
+
logGeneral: string;
|
|
51
|
+
errorSync: string;
|
|
52
|
+
errorGeneral: string;
|
|
53
|
+
};
|
|
54
|
+
private readonly cleanupCallbacks;
|
|
55
|
+
private readonly isIdle;
|
|
56
|
+
private readonly syncLogs;
|
|
57
|
+
private readonly generalLogs;
|
|
58
|
+
constructor();
|
|
59
|
+
private readonly getThisSync;
|
|
60
|
+
private readonly putSyncLog;
|
|
61
|
+
private readonly putGeneralLog;
|
|
62
|
+
private readonly subscribers;
|
|
63
|
+
private readonly on;
|
|
64
|
+
private readonly dispatch;
|
|
65
|
+
private readonly getLogs;
|
|
66
|
+
readonly dispose: () => void;
|
|
67
|
+
readonly root: {
|
|
68
|
+
dispatch: Dispatch<General$1>;
|
|
69
|
+
getLogs: () => string;
|
|
70
|
+
isIdle: Ref<boolean>;
|
|
71
|
+
on: On<General$1>;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/modules/I18n.d.ts
|
|
76
|
+
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';
|
|
77
|
+
type Primitive = string | number | boolean | null | undefined;
|
|
78
|
+
type Fragment<A = undefined> = (frag: DocumentFragment, args: A) => void;
|
|
79
|
+
type TranslationResource = Record<string, string | Fragment<General$1>>;
|
|
80
|
+
type InterpolationValues = Record<string, Primitive>;
|
|
81
|
+
type TranslateParams<R extends Fragment<General$1> | string> = R extends Fragment<infer A> ? ([undefined] extends [A] ? [] : [A]) : [] | [InterpolationValues];
|
|
82
|
+
type Translate<O extends TranslationResource> = <K extends keyof O>(key: K, ...args: TranslateParams<O[K]>) => O[K] extends string ? string : DocumentFragment;
|
|
83
|
+
declare class I18n {
|
|
84
|
+
private readonly targetLangs;
|
|
85
|
+
readonly i18n: {};
|
|
86
|
+
private readonly registerI18n;
|
|
87
|
+
private readonly translate;
|
|
88
|
+
root: {
|
|
89
|
+
registerI18n: (code: ObsidianLanguageCode, resource: TranslationResource) => void;
|
|
90
|
+
translate: Translate<General$1>;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/modules/Sync.d.ts
|
|
95
|
+
type SyncTerminateReason = {
|
|
96
|
+
result: 'cancelled';
|
|
97
|
+
} | {
|
|
98
|
+
result: 'completed';
|
|
99
|
+
} | {
|
|
100
|
+
result: 'failed';
|
|
101
|
+
error: string;
|
|
102
|
+
} | {
|
|
103
|
+
result: 'noop';
|
|
104
|
+
};
|
|
105
|
+
type TaskInfo = {
|
|
106
|
+
name: TaskNames;
|
|
107
|
+
key: string;
|
|
108
|
+
prettyName: string;
|
|
109
|
+
isDir: boolean;
|
|
110
|
+
};
|
|
111
|
+
type FailedTaskInfo = TaskInfo & {
|
|
112
|
+
error: string;
|
|
113
|
+
};
|
|
114
|
+
declare class Sync {
|
|
115
|
+
private readonly ctx;
|
|
116
|
+
dispatch: Dispatch<Events>;
|
|
117
|
+
on: On<Events>;
|
|
118
|
+
constructor(ctx: {
|
|
119
|
+
dispatch: Dispatch<Events>;
|
|
120
|
+
initializeSync: () => Infras;
|
|
121
|
+
getDecider: () => Decider;
|
|
122
|
+
on: On<Events>;
|
|
123
|
+
translate: Translate<Translations>;
|
|
124
|
+
listRemote: RemoteLister;
|
|
125
|
+
getConflictResolver: () => ConflictResolver;
|
|
126
|
+
});
|
|
127
|
+
readonly events: {
|
|
128
|
+
syncStarted: {
|
|
129
|
+
isCancelled: Ref<boolean>;
|
|
130
|
+
trigger: string;
|
|
131
|
+
};
|
|
132
|
+
remoteWalkProgress: Progress;
|
|
133
|
+
syncTerminated: SyncTerminateReason;
|
|
134
|
+
requestConfirmDelete: Array<RemoveLocal>;
|
|
135
|
+
requestConfirmTasks: Array<BaseTask>;
|
|
136
|
+
syncCanceled: undefined;
|
|
137
|
+
taskCompleted: TaskInfo;
|
|
138
|
+
taskFailed: FailedTaskInfo;
|
|
139
|
+
executionStarted: Array<BaseTask>;
|
|
140
|
+
};
|
|
141
|
+
readonly settings: {
|
|
142
|
+
maxFileSize: TogglableValue;
|
|
143
|
+
exclusionRules: Array<GlobMatchRule>;
|
|
144
|
+
inclusionRules: Array<GlobMatchRule>;
|
|
145
|
+
confirmDeleteInAutoSync: boolean;
|
|
146
|
+
confirmTasksInSync: boolean;
|
|
147
|
+
};
|
|
148
|
+
private readonly postProcess;
|
|
149
|
+
private readonly confirmTasks;
|
|
150
|
+
private readonly confirmDeletion;
|
|
151
|
+
private readonly executeSync;
|
|
152
|
+
private readonly convertDeleteToUpload;
|
|
153
|
+
root: {
|
|
154
|
+
executeSync: (trigger: string) => Promise<{
|
|
155
|
+
result: 'cancelled';
|
|
156
|
+
} | {
|
|
157
|
+
result: 'completed';
|
|
158
|
+
} | {
|
|
159
|
+
result: 'failed';
|
|
160
|
+
error: string;
|
|
161
|
+
} | {
|
|
162
|
+
result: 'noop';
|
|
163
|
+
}>;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/modules/Observability.d.ts
|
|
168
|
+
type SyncStage = 'none' | 'walkingRemote' | 'awaitingConfirmation' | 'executing' | 'completed' | 'completedNoop' | 'cancelled' | 'failed';
|
|
169
|
+
type AddRibbonIcon = (icon: IconName, title: string, callback: (evt: MouseEvent) => void) => HTMLElement;
|
|
170
|
+
declare class Observability {
|
|
171
|
+
private readonly ctx;
|
|
172
|
+
private lastSyncTime;
|
|
173
|
+
private readonly sinceLastSyncText;
|
|
174
|
+
private readonly syncStage;
|
|
175
|
+
private readonly walkProgress;
|
|
176
|
+
private readonly executionProgress;
|
|
177
|
+
private readonly cleanupCallbacks;
|
|
178
|
+
private readonly t;
|
|
179
|
+
private readonly progressText;
|
|
180
|
+
readonly settings: {
|
|
181
|
+
noticeStatusOnMobile: boolean;
|
|
182
|
+
exportLogsDirectory: string;
|
|
183
|
+
};
|
|
184
|
+
readonly i18n: {
|
|
185
|
+
startSync: string;
|
|
186
|
+
startNonInteractiveSync: string;
|
|
187
|
+
stopSync: string;
|
|
188
|
+
showProgress: string;
|
|
189
|
+
exportLogsToFile: string;
|
|
190
|
+
exportLogsFailed: string;
|
|
191
|
+
idle: string;
|
|
192
|
+
};
|
|
193
|
+
constructor(ctx: {
|
|
194
|
+
addStatusBarItem: () => HTMLElement;
|
|
195
|
+
on: On<Events>;
|
|
196
|
+
translate: Translate<Translations>;
|
|
197
|
+
isIdle: Ref<boolean>;
|
|
198
|
+
dispatch: Dispatch<Events>;
|
|
199
|
+
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
200
|
+
showProgress: () => void;
|
|
201
|
+
addCommand: (command: Command) => Command;
|
|
202
|
+
addRibbonIcon: AddRibbonIcon;
|
|
203
|
+
getLogs: () => string;
|
|
204
|
+
app: App;
|
|
205
|
+
});
|
|
206
|
+
readonly start: () => void;
|
|
207
|
+
private readonly setupStatus;
|
|
208
|
+
private readonly setupCommands;
|
|
209
|
+
private readonly exportLogs;
|
|
210
|
+
readonly dispose: () => void;
|
|
211
|
+
root: {
|
|
212
|
+
executionProgress: Ref<Progress<TaskInfo>>;
|
|
213
|
+
exportLogs: () => Promise<void>;
|
|
214
|
+
syncStage: Ref<SyncStage>;
|
|
215
|
+
walkProgress: Ref<Progress>;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/components/file-tree/index.d.ts
|
|
220
|
+
type FileTreeTranslations = {
|
|
221
|
+
selectAll: string;
|
|
222
|
+
xSelected: string;
|
|
223
|
+
};
|
|
224
|
+
//#endregion
|
|
225
|
+
//#region src/modules/Extensibility.d.ts
|
|
226
|
+
type ModuleInstance = {
|
|
227
|
+
moduleSettings: object;
|
|
228
|
+
dispose?: () => void;
|
|
229
|
+
start?: () => void;
|
|
230
|
+
};
|
|
231
|
+
type ModuleCtor = new (ctx: object) => ModuleInstance;
|
|
232
|
+
type ModuleMeta = {
|
|
233
|
+
id: string;
|
|
234
|
+
name: string;
|
|
235
|
+
version: string;
|
|
236
|
+
description: string;
|
|
237
|
+
main: string;
|
|
238
|
+
icon?: string;
|
|
239
|
+
minPluginVersion?: string;
|
|
240
|
+
integrity: string;
|
|
241
|
+
};
|
|
242
|
+
type AugmentedModuleMeta = ModuleMeta & {
|
|
243
|
+
enabled: boolean;
|
|
244
|
+
source: string;
|
|
245
|
+
icon: string;
|
|
246
|
+
};
|
|
247
|
+
declare class Extensibility {
|
|
248
|
+
private readonly ctx;
|
|
249
|
+
private readonly moduleDir;
|
|
250
|
+
private readonly sourceCache;
|
|
251
|
+
private readonly discoveredModules;
|
|
252
|
+
private readonly loadedModules;
|
|
253
|
+
private readonly moduleStore;
|
|
254
|
+
private autoUpdateTimeout?;
|
|
255
|
+
readonly settings: {
|
|
256
|
+
moduleSources: Array<string>;
|
|
257
|
+
moduleAutoUpdate: boolean;
|
|
258
|
+
modules: Record<string, object>;
|
|
259
|
+
};
|
|
260
|
+
readonly i18n: {
|
|
261
|
+
failedToLoadModule: string;
|
|
262
|
+
failedToDownloadModule: string;
|
|
263
|
+
failedToFetchSource: string;
|
|
264
|
+
};
|
|
265
|
+
readonly events: {
|
|
266
|
+
moduleLoaded: string;
|
|
267
|
+
moduleUnloaded: string;
|
|
268
|
+
};
|
|
269
|
+
constructor(ctx: {
|
|
270
|
+
app: App;
|
|
271
|
+
__addModule__: Context['__addModule__'];
|
|
272
|
+
__getModule__: Context['__getModule__'];
|
|
273
|
+
dispatch: Dispatch<Events>;
|
|
274
|
+
translate: Translate<Translations>;
|
|
275
|
+
allModules: Set<General$1>;
|
|
276
|
+
isIdle: Ref<boolean>;
|
|
277
|
+
saveSettings: () => Promise<void>;
|
|
278
|
+
indexedDB: DatabaseAsync<Record<string, AugmentedModuleMeta>>;
|
|
279
|
+
});
|
|
280
|
+
readonly start: () => void;
|
|
281
|
+
private readonly createOperationFactory;
|
|
282
|
+
private readonly loadAllModules;
|
|
283
|
+
private readonly loadModule;
|
|
284
|
+
private readonly unloadModule;
|
|
285
|
+
private readonly downloadModule;
|
|
286
|
+
private readonly deleteModule;
|
|
287
|
+
private readonly fetchSources;
|
|
288
|
+
private readonly updateModules;
|
|
289
|
+
private readonly updateModuleMeta;
|
|
290
|
+
private readonly enableModule;
|
|
291
|
+
private readonly disableModule;
|
|
292
|
+
private readonly getModulePath;
|
|
293
|
+
private readonly parseModulePath;
|
|
294
|
+
readonly dispose: () => void;
|
|
295
|
+
readonly root: {
|
|
296
|
+
deleteModule: (id: string) => Promise<void>;
|
|
297
|
+
disableModule: (id: string) => void;
|
|
298
|
+
discoveredModules: Map<string, AugmentedModuleMeta>;
|
|
299
|
+
downloadModule: (meta: AugmentedModuleMeta, waitIdle?: boolean) => Promise<void>;
|
|
300
|
+
enableModule: (id: string) => Promise<void>;
|
|
301
|
+
fetchSources: (manual?: boolean) => Promise<AugmentedModuleMeta[]>;
|
|
302
|
+
loadAllModules: () => Promise<void>;
|
|
303
|
+
loadModule: (meta: AugmentedModuleMeta, start?: boolean, module?: string) => Promise<void>;
|
|
304
|
+
loadedModules: Map<string, ModuleCtor>;
|
|
305
|
+
pluginOutdated: boolean;
|
|
306
|
+
unloadModule: (id: string) => void;
|
|
307
|
+
updateModuleMeta: (meta: AugmentedModuleMeta) => Promise<void>;
|
|
308
|
+
updateModules: () => Promise<void>;
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/components/ModuleEditorModal.d.ts
|
|
313
|
+
type ModuleEditorTranslations = {
|
|
314
|
+
editModuleInformation: string;
|
|
315
|
+
enable: string;
|
|
316
|
+
name: string;
|
|
317
|
+
namePlaceholder: string;
|
|
318
|
+
description: string;
|
|
319
|
+
descriptionPlaceholder: string;
|
|
320
|
+
icon: string;
|
|
321
|
+
iconDescription: Fragment;
|
|
322
|
+
iconPlaceholder: string;
|
|
323
|
+
updateSource: string;
|
|
324
|
+
updateSourceDescription: string;
|
|
325
|
+
updateSourcePlaceholder: string;
|
|
326
|
+
invalidValue: string;
|
|
327
|
+
integrityVerification: string;
|
|
328
|
+
integrityVerificationDescription: Fragment;
|
|
329
|
+
save: string;
|
|
330
|
+
cancel: string;
|
|
331
|
+
};
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/components/UnknownModuleModal.d.ts
|
|
334
|
+
type FileInfo = {
|
|
335
|
+
path: string;
|
|
336
|
+
size: string;
|
|
337
|
+
mtime: string;
|
|
338
|
+
ctime: string;
|
|
339
|
+
fileName: string;
|
|
340
|
+
};
|
|
341
|
+
type UnknownModuleTranslations = {
|
|
342
|
+
unknownModule: string;
|
|
343
|
+
unknownModuleDescription: Fragment<FileInfo>;
|
|
344
|
+
delete: string;
|
|
345
|
+
configure: string;
|
|
346
|
+
};
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region src/modules/Setting.d.ts
|
|
349
|
+
type SettingTree = {
|
|
350
|
+
(self: SettingTree): SettingDefinitionItem;
|
|
351
|
+
[key: number]: SettingTree;
|
|
352
|
+
};
|
|
353
|
+
type NestedCallableTree = {
|
|
354
|
+
(self: SettingTree): SettingDefinitionItem;
|
|
355
|
+
[key: number]: CallableOrObjectTree;
|
|
356
|
+
};
|
|
357
|
+
type CallableOrObjectTree = NestedCallableTree | {
|
|
358
|
+
[key: number]: CallableOrObjectTree;
|
|
359
|
+
};
|
|
360
|
+
type SettingEntry = {
|
|
361
|
+
priority: number;
|
|
362
|
+
apply: CallableOrObjectTree;
|
|
363
|
+
};
|
|
364
|
+
declare class Setting$1 {
|
|
365
|
+
private readonly ctx;
|
|
366
|
+
private readonly cleanupCallbacks;
|
|
367
|
+
private settingTab?;
|
|
368
|
+
private readonly settingRegistry;
|
|
369
|
+
readonly i18n: {
|
|
370
|
+
match: string;
|
|
371
|
+
matchLabelDescription: string;
|
|
372
|
+
speed: string;
|
|
373
|
+
speedLabelDescription: string;
|
|
374
|
+
};
|
|
375
|
+
constructor(ctx: {
|
|
376
|
+
on: On<Events>;
|
|
377
|
+
translate: Translate<Translations>;
|
|
378
|
+
registerSetting: (entry: SettingEntry) => () => boolean;
|
|
379
|
+
});
|
|
380
|
+
readonly start: () => void;
|
|
381
|
+
private readonly matchLabel;
|
|
382
|
+
private readonly speedLabel;
|
|
383
|
+
private readonly addSettingTab;
|
|
384
|
+
private readonly rerenderSettingTab;
|
|
385
|
+
root: {
|
|
386
|
+
addSettingTab: (plugin: Plugin) => void;
|
|
387
|
+
matchLabel: () => {
|
|
388
|
+
text: string;
|
|
389
|
+
tooltip: string;
|
|
390
|
+
};
|
|
391
|
+
registerSetting: (entry: SettingEntry) => () => boolean;
|
|
392
|
+
rerenderSettingTab: () => void | undefined;
|
|
393
|
+
speedLabel: () => {
|
|
394
|
+
color: string;
|
|
395
|
+
text: string;
|
|
396
|
+
textColor: string;
|
|
397
|
+
tooltip: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
readonly dispose: () => void;
|
|
401
|
+
}
|
|
402
|
+
//#endregion
|
|
403
|
+
//#region src/settings/utils.d.ts
|
|
404
|
+
type AugmentedSettingDefinitionItem<K extends string = string> = SettingDefinitionGroup<K> | SettingDefinitionList<K> | (SettingDefinitionPage<K> & {
|
|
405
|
+
labels?: Array<LabelDefinition>;
|
|
406
|
+
}) | (SettingDefinition<K> & {
|
|
407
|
+
labels?: Array<LabelDefinition>;
|
|
408
|
+
});
|
|
409
|
+
type LabelDefinition = {
|
|
410
|
+
text: string;
|
|
411
|
+
tooltip: string;
|
|
412
|
+
color?: string;
|
|
413
|
+
textColor?: string;
|
|
414
|
+
};
|
|
415
|
+
declare function s(parent: (self: SettingTree) => AugmentedSettingDefinitionItem, children?: CallableOrObjectTree): CallableOrObjectTree;
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/settings/controls.d.ts
|
|
418
|
+
type ControlsSettingTranslations = {
|
|
419
|
+
controls: string;
|
|
420
|
+
maxFileSize: string;
|
|
421
|
+
maxFileSizeDescription: string;
|
|
422
|
+
maxFileSizePlaceholder: string;
|
|
423
|
+
maxRequestConcurrency: string;
|
|
424
|
+
minRequestInterval: string;
|
|
425
|
+
minRequestIntervalDescription: string;
|
|
426
|
+
minRequestIntervalPlaceholder: string;
|
|
427
|
+
maxRequestConcurrencyPlaceholder: string;
|
|
428
|
+
maxRequestConcurrencyDescription: string;
|
|
429
|
+
maxMemoryConsumption: string;
|
|
430
|
+
maxMemoryConsumptionDescription: string;
|
|
431
|
+
maxMemoryConsumptionPlaceholder: string;
|
|
432
|
+
};
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region src/settings/development.d.ts
|
|
435
|
+
type DevelopmentSettingTranslations = {
|
|
436
|
+
development: string;
|
|
437
|
+
clearRecords: string;
|
|
438
|
+
recordsCleared: string;
|
|
439
|
+
clear: string;
|
|
440
|
+
clearRecordsDescription: string;
|
|
441
|
+
export: string;
|
|
442
|
+
exportLogsDescription: string;
|
|
443
|
+
exportLogsDirectoryPlaceholder: string;
|
|
444
|
+
exportLogsToFile: string;
|
|
445
|
+
moduleSources: string;
|
|
446
|
+
moduleSourcesDescription: string;
|
|
447
|
+
edit: string;
|
|
448
|
+
xConfigured: string;
|
|
449
|
+
addSource: string;
|
|
450
|
+
noSourceConfigured: string;
|
|
451
|
+
moduleSourcePlaceholder: string;
|
|
452
|
+
};
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/components/MigrationModal.d.ts
|
|
455
|
+
type MigrationModalTranslations = {
|
|
456
|
+
cancel: string;
|
|
457
|
+
remoteMigration: string;
|
|
458
|
+
migrationProcess: string;
|
|
459
|
+
startMigration: string;
|
|
460
|
+
migrationDescription: string;
|
|
461
|
+
migrationPhase1Description: string;
|
|
462
|
+
migrationPhase2Description: string;
|
|
463
|
+
migrationPhase3Description: string;
|
|
464
|
+
toggleWithoutMigration: string;
|
|
465
|
+
migrationFailed: string;
|
|
466
|
+
completed: string;
|
|
467
|
+
hide: string;
|
|
468
|
+
done: string;
|
|
469
|
+
};
|
|
470
|
+
type MigrationEvents = {
|
|
471
|
+
migrationProgress: Progress;
|
|
472
|
+
migrationFailed: string;
|
|
473
|
+
};
|
|
474
|
+
type MigrationContext = {
|
|
475
|
+
app: App;
|
|
476
|
+
on: On<MigrationEvents>;
|
|
477
|
+
dispatch: Dispatch<MigrationEvents & Events>;
|
|
478
|
+
translate: Translate<MigrationModalTranslations>;
|
|
479
|
+
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
480
|
+
initializeSync: () => Infras;
|
|
481
|
+
memoryDB: ExistingMemoryDB;
|
|
482
|
+
};
|
|
483
|
+
declare function setNeedMigration(ctx: MigrationContext, { toggle, needMigration, content, apply }: {
|
|
484
|
+
toggle: ToggleComponent;
|
|
485
|
+
needMigration?: (value: boolean) => MaybePromise<boolean>;
|
|
486
|
+
content: (value: boolean) => string | DocumentFragment;
|
|
487
|
+
apply: (value: boolean) => MaybePromise<void>;
|
|
488
|
+
}): void;
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/settings/features.d.ts
|
|
491
|
+
type FeaturesSettingTranslations = {
|
|
492
|
+
features: string;
|
|
493
|
+
realtimeSyncFastMode: string;
|
|
494
|
+
realtimeSyncFastModeDescription: string;
|
|
495
|
+
realtimeSync: string;
|
|
496
|
+
realtimeSyncDescription: string;
|
|
497
|
+
realtimeSyncPlaceholder: string;
|
|
498
|
+
startupSync: string;
|
|
499
|
+
startupSyncDescription: string;
|
|
500
|
+
startupSyncPlaceholder: string;
|
|
501
|
+
scheduledSync: string;
|
|
502
|
+
scheduledSyncDescription: string;
|
|
503
|
+
scheduledSyncPlaceholder: string;
|
|
504
|
+
asymmetricStorage: string;
|
|
505
|
+
asymmetricStorageDescription: Fragment;
|
|
506
|
+
asymmetricStorageMigration: Fragment<'enable' | 'disable'>;
|
|
507
|
+
} & MigrationModalTranslations;
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region src/settings/filter.d.ts
|
|
510
|
+
type FilterSettingTranslations = {
|
|
511
|
+
filterRules: string;
|
|
512
|
+
inclusionRules: string;
|
|
513
|
+
inclusionRulesDescription: Fragment;
|
|
514
|
+
exclusionRules: string;
|
|
515
|
+
exclusionRulesDescription: Fragment;
|
|
516
|
+
xConfigured: string;
|
|
517
|
+
addInclusionRule: string;
|
|
518
|
+
addExclusionRule: string;
|
|
519
|
+
noRuleConfigured: string;
|
|
520
|
+
filterPlaceholder: string;
|
|
521
|
+
caseSensitive: string;
|
|
522
|
+
};
|
|
523
|
+
//#endregion
|
|
524
|
+
//#region src/settings/head.d.ts
|
|
525
|
+
type HeadSettingTranslations = {
|
|
526
|
+
moduleAutoUpdate: string;
|
|
527
|
+
moduleAutoUpdateDescription: string;
|
|
528
|
+
moduleManagement: string;
|
|
529
|
+
moduleManagementDescription: string;
|
|
530
|
+
backend: string;
|
|
531
|
+
backendDescription: string;
|
|
532
|
+
syncStrategy: string;
|
|
533
|
+
syncStrategyDescription: string;
|
|
534
|
+
checkConnectionFailed: string;
|
|
535
|
+
checkConnectionSuccess: string;
|
|
536
|
+
checkConnection: string;
|
|
537
|
+
conflictResolveStrategy: string;
|
|
538
|
+
conflictResolveStrategyDescription: string;
|
|
539
|
+
xEnabled: string;
|
|
540
|
+
settingTips: Fragment<{
|
|
541
|
+
labels: Array<LabelDefinition>;
|
|
542
|
+
addLabel: typeof addLabel;
|
|
543
|
+
}>;
|
|
544
|
+
};
|
|
545
|
+
declare function addLabel(element: Element, { text, tooltip, color, textColor }: LabelDefinition): HTMLSpanElement;
|
|
546
|
+
//#endregion
|
|
547
|
+
//#region src/settings/miscellaneous.d.ts
|
|
548
|
+
type MiscellaneousSettingTranslations = {
|
|
549
|
+
miscellaneous: string;
|
|
550
|
+
diffMatchPatch: string;
|
|
551
|
+
keepLocal: string;
|
|
552
|
+
keepRemote: string;
|
|
553
|
+
skip: string;
|
|
554
|
+
noticeStatusOnMobile: string;
|
|
555
|
+
noticeStatusOnMobileDescription: string;
|
|
556
|
+
confirmTasksInSync: string;
|
|
557
|
+
confirmTasksInSyncDescription: string;
|
|
558
|
+
confirmDeleteInAutoSync: string;
|
|
559
|
+
confirmDeleteInAutoSyncDescription: string;
|
|
560
|
+
customHeaders: string;
|
|
561
|
+
customHeadersDescription: string;
|
|
562
|
+
edit: string;
|
|
563
|
+
xConfigured: string;
|
|
564
|
+
addHeader: string;
|
|
565
|
+
noHeaderConfigured: string;
|
|
566
|
+
headerKeyPlaceholder: string;
|
|
567
|
+
headerValuePlaceholder: string;
|
|
568
|
+
addSecretHeader: string;
|
|
569
|
+
};
|
|
570
|
+
//#endregion
|
|
571
|
+
//#region src/components/module-management/index.d.ts
|
|
572
|
+
type ModuleManagementTranslations = {
|
|
573
|
+
disableModule: string;
|
|
574
|
+
downloadModule: string;
|
|
575
|
+
enableModule: string;
|
|
576
|
+
installed: string;
|
|
577
|
+
loadingModules: string;
|
|
578
|
+
noInstalledModulesFound: string;
|
|
579
|
+
noMatchingModulesFound: string;
|
|
580
|
+
noModulesAvailable: string;
|
|
581
|
+
updateAvailable: string;
|
|
582
|
+
updateModule: string;
|
|
583
|
+
deleteModule: string;
|
|
584
|
+
editModuleInformation: string;
|
|
585
|
+
official: string;
|
|
586
|
+
someModulesHidden: string;
|
|
587
|
+
};
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region src/settings/module-management.d.ts
|
|
590
|
+
type ModulesTranslations = ModuleManagementTranslations & {
|
|
591
|
+
searchModules: string;
|
|
592
|
+
moduleManagement: string;
|
|
593
|
+
showInstalledOnly: string;
|
|
594
|
+
};
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region src/modules/Bootstrap.d.ts
|
|
597
|
+
type CustomHeaders = Array<{
|
|
598
|
+
type: 'plaintext' | 'secret';
|
|
599
|
+
value: string;
|
|
600
|
+
key: string;
|
|
601
|
+
}>;
|
|
602
|
+
type ExistingMemoryDB = DatabaseSync<{
|
|
603
|
+
localContext20000: Stat;
|
|
604
|
+
remoteContext10000: Stat;
|
|
605
|
+
remoteContext20000: Stat;
|
|
606
|
+
}, {
|
|
607
|
+
localContext20000Marker: string;
|
|
608
|
+
remoteContext10000Marker: string;
|
|
609
|
+
remoteContext20000Marker: string;
|
|
610
|
+
}>;
|
|
611
|
+
declare class Bootstrap {
|
|
612
|
+
private readonly ctx;
|
|
613
|
+
private readonly cleanupCallbacks;
|
|
614
|
+
private readonly memoryStates;
|
|
615
|
+
private isCancelled?;
|
|
616
|
+
private readonly localPool;
|
|
617
|
+
private readonly remotePool;
|
|
618
|
+
private localFs?;
|
|
619
|
+
private remoteFs?;
|
|
620
|
+
readonly i18n: {
|
|
621
|
+
bidirectional: string;
|
|
622
|
+
mirrorLocal: string;
|
|
623
|
+
mirrorRemote: string;
|
|
624
|
+
latestSurvive: string;
|
|
625
|
+
keepLocal: string;
|
|
626
|
+
keepRemote: string;
|
|
627
|
+
renameAndKeepBoth: string;
|
|
628
|
+
skip: string;
|
|
629
|
+
} & ControlsSettingTranslations & DevelopmentSettingTranslations & FeaturesSettingTranslations & FilterSettingTranslations & HeadSettingTranslations & MiscellaneousSettingTranslations & UnknownModuleTranslations & ModuleEditorTranslations & FileTreeTranslations & ModulesTranslations;
|
|
630
|
+
readonly settings: {
|
|
631
|
+
maxMemoryConsumption: TogglableValue;
|
|
632
|
+
maxRequestConcurrency: TogglableValue;
|
|
633
|
+
minRequestInterval: TogglableValue;
|
|
634
|
+
realtimeSyncFastMode: boolean;
|
|
635
|
+
asymmetricStorage: boolean;
|
|
636
|
+
customHeaders: CustomHeaders;
|
|
637
|
+
};
|
|
638
|
+
constructor(ctx: {
|
|
639
|
+
app: App;
|
|
640
|
+
registerI18n: (code: ObsidianLanguageCode, resource: TranslationResource) => void;
|
|
641
|
+
on: On<Events>;
|
|
642
|
+
dispatch: Dispatch<Events>;
|
|
643
|
+
memoryDB: ExistingMemoryDB;
|
|
644
|
+
registerDecider: (id: string, entry: DeciderEntry) => void;
|
|
645
|
+
registerLocalFsWrapper: (entry: FsWrapperEntry) => void;
|
|
646
|
+
registerRemoteFs: (id: string, entry: RemoteFsEntry) => void;
|
|
647
|
+
registerRemoteFsWrapper: (entry: FsWrapperEntry) => void;
|
|
648
|
+
translate: Translate<Translations>;
|
|
649
|
+
optimizeLocal: BatchOptimizer;
|
|
650
|
+
optimizeRemote: BatchOptimizer;
|
|
651
|
+
registerLocalOptimizer: (optimizer: OptimizerEntry) => void;
|
|
652
|
+
registerRemoteOptimizer: (optimizer: OptimizerEntry) => void;
|
|
653
|
+
registerRemoteLister: (entry: RemoteListerEntry) => () => boolean;
|
|
654
|
+
registerConflictResolver: (id: string, entry: ConflictResolverEntry) => void;
|
|
655
|
+
registerRemoteRequestMiddleware: (entry: RemoteRequestMiddlewareEntry) => void;
|
|
656
|
+
registerLocalRequestMiddleware: (entry: LocalRequestMiddlewareEntry) => void;
|
|
657
|
+
});
|
|
658
|
+
readonly start: () => void;
|
|
659
|
+
readonly dispose: () => void;
|
|
660
|
+
}
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/modules/ProgressModal.d.ts
|
|
663
|
+
type DeleteConfirmReturn = {
|
|
664
|
+
delete: Array<RemoveLocal>;
|
|
665
|
+
reupload: Array<RemoveLocal>;
|
|
666
|
+
};
|
|
667
|
+
type TaskCounts = {
|
|
668
|
+
total: number;
|
|
669
|
+
deleteLocal: number;
|
|
670
|
+
deleteRemote: number;
|
|
671
|
+
conflict: number;
|
|
672
|
+
};
|
|
673
|
+
declare class ProgressModal extends Modal {
|
|
674
|
+
private readonly ctx;
|
|
675
|
+
private readonly moduleCleanupCallbacks;
|
|
676
|
+
private readonly t;
|
|
677
|
+
private opening;
|
|
678
|
+
private readonly modalCleanupCallbacks;
|
|
679
|
+
private readonly dispatch;
|
|
680
|
+
private description?;
|
|
681
|
+
private detailContainer?;
|
|
682
|
+
private controls?;
|
|
683
|
+
constructor(ctx: {
|
|
684
|
+
app: App;
|
|
685
|
+
translate: Translate<Translations>;
|
|
686
|
+
on: On<Events>;
|
|
687
|
+
dispatch: Dispatch<Events>;
|
|
688
|
+
syncStage: Ref<SyncStage>;
|
|
689
|
+
walkProgress: Ref<Progress>;
|
|
690
|
+
executionProgress: Ref<Progress<TaskInfo>>;
|
|
691
|
+
});
|
|
692
|
+
readonly events: {
|
|
693
|
+
tasksConfirmed: Array<BaseTask>;
|
|
694
|
+
deleteConfirmed: DeleteConfirmReturn;
|
|
695
|
+
};
|
|
696
|
+
readonly i18n: {
|
|
697
|
+
syncProgress: string;
|
|
698
|
+
completed: string;
|
|
699
|
+
failedTasksDescription: string;
|
|
700
|
+
confirmDeleteDescription: string;
|
|
701
|
+
confirmTasksDescription: Fragment<TaskCounts>;
|
|
702
|
+
hide: string;
|
|
703
|
+
confirm: string;
|
|
704
|
+
cancel: string;
|
|
705
|
+
done: string;
|
|
706
|
+
stopSync: string;
|
|
707
|
+
} & Record<TaskNames | SyncStage, string>;
|
|
708
|
+
private readonly renderHideStop;
|
|
709
|
+
private readonly renderConfirmCancel;
|
|
710
|
+
private readonly renderDone;
|
|
711
|
+
private readonly showDetails;
|
|
712
|
+
private readonly hideDetails;
|
|
713
|
+
onOpen(): void;
|
|
714
|
+
root: {
|
|
715
|
+
hideProgress: {
|
|
716
|
+
(): void;
|
|
717
|
+
(): void;
|
|
718
|
+
};
|
|
719
|
+
showProgress: () => void;
|
|
720
|
+
};
|
|
721
|
+
onClose(): void;
|
|
722
|
+
dispose(): void;
|
|
723
|
+
}
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region src/modules/Scheduler.d.ts
|
|
726
|
+
declare class Scheduler {
|
|
727
|
+
private readonly ctx;
|
|
728
|
+
private readonly pendingRequests;
|
|
729
|
+
private isScheduling;
|
|
730
|
+
private realtimeSyncTimer?;
|
|
731
|
+
private scheduledSyncTimer?;
|
|
732
|
+
private startupSyncTimer?;
|
|
733
|
+
constructor(ctx: {
|
|
734
|
+
syncStage: Ref<SyncStage>;
|
|
735
|
+
executeSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
736
|
+
registerEvent: (ref: EventRef) => void;
|
|
737
|
+
app: App;
|
|
738
|
+
isIdle: Ref<boolean>;
|
|
739
|
+
});
|
|
740
|
+
settings: {
|
|
741
|
+
startupSync: TogglableValue;
|
|
742
|
+
scheduledSync: TogglableValue;
|
|
743
|
+
realtimeSync: TogglableValue;
|
|
744
|
+
exclusionRules: Array<GlobMatchRule>;
|
|
745
|
+
inclusionRules: Array<GlobMatchRule>;
|
|
746
|
+
};
|
|
747
|
+
private readonly requestSync;
|
|
748
|
+
start: () => void;
|
|
749
|
+
dispose: () => void;
|
|
750
|
+
private readonly startScheduledSync;
|
|
751
|
+
private readonly stopScheduledSync;
|
|
752
|
+
private readonly onChange;
|
|
753
|
+
private readonly scheduleFlush;
|
|
754
|
+
private readonly flush;
|
|
755
|
+
root: {
|
|
756
|
+
requestSync: (trigger: string) => Promise<SyncTerminateReason>;
|
|
757
|
+
startScheduledSync: () => void;
|
|
758
|
+
stopScheduledSync: () => void;
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region src/index.d.ts
|
|
763
|
+
declare const internalModules: readonly [typeof EventBus, typeof I18n, typeof Storage, typeof Extensibility, typeof Setting$1, typeof Registrar, typeof Sync, typeof Observability, typeof Scheduler, typeof ProgressModal, typeof Bootstrap];
|
|
764
|
+
type InternalModules = typeof internalModules;
|
|
765
|
+
type MergeKeys = 'settings' | 'root' | 'events' | 'i18n';
|
|
766
|
+
type Context = Context$1<InternalModules, MergeKeys, {
|
|
767
|
+
app: App;
|
|
768
|
+
addCommand: (command: Command) => Command;
|
|
769
|
+
registerEvent: (ref: EventRef) => void;
|
|
770
|
+
addRibbonIcon: AddRibbonIcon;
|
|
771
|
+
addStatusBarItem: () => HTMLElement;
|
|
772
|
+
saveSettings: () => Promise<void>;
|
|
773
|
+
}>;
|
|
774
|
+
type Events = MergeSingleKey<InternalModules, 'events'>;
|
|
775
|
+
type Settings = MergeSingleKey<InternalModules, 'settings'>;
|
|
776
|
+
type Translations = MergeSingleKey<InternalModules, 'i18n'>;
|
|
777
|
+
//#endregion
|
|
778
|
+
//#region src/sdk/prefix.d.ts
|
|
779
|
+
declare function prefixWrapper(original: Fs, prefix: string): WrappedFs;
|
|
780
|
+
//#endregion
|
|
781
|
+
//#region src/utils/pipe.d.ts
|
|
782
|
+
declare function pipe({ from, to, stat, key }: {
|
|
783
|
+
from: Fs;
|
|
784
|
+
to: Fs;
|
|
785
|
+
key: string;
|
|
786
|
+
stat: FileStat;
|
|
787
|
+
}): Promise<string | undefined>;
|
|
788
|
+
declare function readWithSize(fs: Fs, key: string, stat: FileStat): Promise<Binary | ReadableStream<Binary> | undefined>;
|
|
789
|
+
declare function writeWithValue(fs: Fs, key: string, value: Binary | ReadableStream<Binary>, stat: FileStat): MaybePromise<string>;
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region src/sdk/index.d.ts
|
|
792
|
+
declare function digOriginal(wrapped: Fs): RootFs;
|
|
793
|
+
type SelectFromContext<O extends object> = Context extends O ? O : never;
|
|
794
|
+
//#endregion
|
|
795
|
+
export { type AddRecord, type AugmentedModuleMeta, type BaseTask, type BatchOptimizer, type Binary, type CallableOrObjectTree, type CheckConnectionResult, type ConflictResolver, type ConflictResolverEntry, type ConflictResolverPayload, type Context, type CreateLocalDir, type CreateRemoteDir, type CustomAtom, type DatabaseAsync, type DatabaseSync, type Decider, type DeciderEntry, type DeciderInput, type DeleteAtom, type Dispatch, type Download, type Events, type ExistingMemoryDB, type FileStat, type FolderStat, type Fragment, type Fs, type FsWrapperEntry, type InputAtom, type LabelDefinition, type ListReporter, type LocalRequestMiddlewareEntry, type MaybePromise, type MkdirAtom, type ModuleMeta, type MoveAtom, type MoveLocal, type MoveRemote, type ObsidianLanguageCode, type On, type OptimizerEntry, type OptimizerInput, type OptimizerOutput, type OutputAtom, type Progress, type RecordStat, type RecordStatsMap, type RecordStore, type RemoteFsEntry, type RemoteLister, type RemoteListerEntry, type RemoteRequestMiddlewareEntry, type RemoveLocal, type RemoveRecord, type RemoveRemote, type Request, type RequestParam, type RequestResponse, type ResolveConflict, type RootFs, SelectFromContext, type SettingEntry, type Settings, type Stat, type StatsMap, type StoreAsync, type StoreOperations, type StoreSync, type SyncTerminateReason, type TaskFactory, type TaskNames, type Translate, type TranslationResource, type Translations, type Upload, type VaultRequest, type WrappedFs, type WriteAtom, digOriginal, pipe, prefixWrapper, readWithSize, s, setNeedMigration, writeWithValue };
|