@hesprs/sync-engine-sdk 3.1.7 → 3.1.8
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-lLeUlsPq.spec.d.ts → index-CC4NddoN.spec.d.ts} +15 -25
- package/dist/index.spec.d.ts +1 -1
- package/dist/node_modules/.bun/synthkernel@._synthkernel.tgz/node_modules/synthkernel/dist/reactive.js +1 -1
- package/dist/packages/plugin/test/test-kit.js +1 -1
- package/package.json +1 -1
package/dist/dev.spec.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as FileStat, Dt as RootFs, Ft as RecordStatsMap, It as Stat, Lt as StatsMap, Ot as WrappedFs, Pt as RecordStat, Rt as Binary, d as RequestParam, jt as FolderStat, lt as TaskNames, q as Decider, u as Request, yt as Fs } from "./index-
|
|
1
|
+
import { At as FileStat, Dt as RootFs, Ft as RecordStatsMap, It as Stat, Lt as StatsMap, Ot as WrappedFs, Pt as RecordStat, Rt as Binary, d as RequestParam, jt as FolderStat, lt as TaskNames, q as Decider, u as Request, yt as Fs } from "./index-CC4NddoN.spec.js";
|
|
2
2
|
//#region src/sdk/debug-wrapper.d.ts
|
|
3
3
|
declare function debugWrapper(original: Fs, log: (content: string) => void): WrappedFs;
|
|
4
4
|
//#endregion
|
|
@@ -609,7 +609,7 @@ declare class Extensibility {
|
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
//#endregion
|
|
612
|
-
//#region src/components/
|
|
612
|
+
//#region src/components/UntrustedModuleModal.d.ts
|
|
613
613
|
type FileInfo = {
|
|
614
614
|
path: string;
|
|
615
615
|
size: string;
|
|
@@ -617,9 +617,9 @@ type FileInfo = {
|
|
|
617
617
|
ctime: string;
|
|
618
618
|
fileName: string;
|
|
619
619
|
};
|
|
620
|
-
type
|
|
621
|
-
|
|
622
|
-
|
|
620
|
+
type UntrustedModuleTranslations = {
|
|
621
|
+
untrustedModule: string;
|
|
622
|
+
untrustedModuleDescription: Fragment<FileInfo>;
|
|
623
623
|
delete: string;
|
|
624
624
|
configure: string;
|
|
625
625
|
};
|
|
@@ -981,7 +981,7 @@ declare class Bootstrap {
|
|
|
981
981
|
keepRemote: string;
|
|
982
982
|
renameAndKeepBoth: string;
|
|
983
983
|
skip: string;
|
|
984
|
-
} & ControlsSettingTranslations & DevelopmentSettingTranslations & FeaturesSettingTranslations & FilterSettingTranslations & HeadSettingTranslations & MiscellaneousSettingTranslations &
|
|
984
|
+
} & ControlsSettingTranslations & DevelopmentSettingTranslations & FeaturesSettingTranslations & FilterSettingTranslations & HeadSettingTranslations & MiscellaneousSettingTranslations & UntrustedModuleTranslations & FileTreeTranslations & ModulesTranslations;
|
|
985
985
|
readonly settings: {
|
|
986
986
|
maxMemoryConsumption: TogglableValue;
|
|
987
987
|
maxRequestConcurrency: TogglableValue;
|
|
@@ -1340,34 +1340,27 @@ type VaultRequestParam = {
|
|
|
1340
1340
|
} | {
|
|
1341
1341
|
method: 'GET_STREAM';
|
|
1342
1342
|
key: string;
|
|
1343
|
+
size: number;
|
|
1343
1344
|
} | {
|
|
1344
1345
|
method: 'PUT';
|
|
1345
1346
|
key: string;
|
|
1346
1347
|
value: Binary;
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
ctime?: number;
|
|
1350
|
-
};
|
|
1348
|
+
mtime?: number;
|
|
1349
|
+
ctime?: number;
|
|
1351
1350
|
} | {
|
|
1352
1351
|
method: 'APPEND';
|
|
1353
1352
|
key: string;
|
|
1354
1353
|
value: Binary;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
ctime?: number;
|
|
1358
|
-
};
|
|
1354
|
+
mtime?: number;
|
|
1355
|
+
ctime?: number;
|
|
1359
1356
|
} | {
|
|
1360
1357
|
method: 'DELETE';
|
|
1361
1358
|
key: string;
|
|
1362
|
-
|
|
1363
|
-
permanent?: boolean;
|
|
1364
|
-
};
|
|
1359
|
+
trash?: TrashOption;
|
|
1365
1360
|
} | {
|
|
1366
1361
|
method: 'MOVE';
|
|
1367
1362
|
key: string;
|
|
1368
|
-
|
|
1369
|
-
destination: string;
|
|
1370
|
-
};
|
|
1363
|
+
destination: string;
|
|
1371
1364
|
} | {
|
|
1372
1365
|
method: 'MKDIR';
|
|
1373
1366
|
key: string;
|
|
@@ -1377,15 +1370,11 @@ type VaultRequestParam = {
|
|
|
1377
1370
|
} | {
|
|
1378
1371
|
method: 'STAT';
|
|
1379
1372
|
key: string;
|
|
1380
|
-
|
|
1381
|
-
cached?: boolean;
|
|
1382
|
-
};
|
|
1373
|
+
cached?: boolean;
|
|
1383
1374
|
} | {
|
|
1384
1375
|
method: 'LIST';
|
|
1385
1376
|
key: string;
|
|
1386
|
-
|
|
1387
|
-
cached?: boolean;
|
|
1388
|
-
};
|
|
1377
|
+
cached?: boolean;
|
|
1389
1378
|
};
|
|
1390
1379
|
type VaultRequestResponseMap = {
|
|
1391
1380
|
GET: Binary;
|
|
@@ -1400,5 +1389,6 @@ type VaultRequestResponseMap = {
|
|
|
1400
1389
|
LIST: ListedFiles;
|
|
1401
1390
|
};
|
|
1402
1391
|
type VaultRequest = <T extends VaultRequestParam>(params: T) => Promise<VaultRequestResponseMap[T['method']]>;
|
|
1392
|
+
type TrashOption = 'local' | 'system' | 'permanent';
|
|
1403
1393
|
//#endregion
|
|
1404
1394
|
export { RemoveRecord as $, setNeedMigration as A, FileStat as At, ObsidianLanguageCode as B, digOriginal as C, MoveAtom as Ct, readWithSize as D, RootFs as Dt, pipe as E, OutputAtom as Et, CallableOrObjectTree as F, RecordStatsMap as Ft, On as G, Translate as H, SettingEntry as I, Stat$1 as It, DeciderInput as J, CreateLocalDir as K, AugmentedModuleMeta as L, StatsMap as Lt, generateEditableList as M, MaybePromise as Mt, reactivelyValidate as N, Progress as Nt, writeWithValue as O, WrappedFs as Ot, s as P, RecordStat as Pt, RemoveRemote as Q, ModuleMeta as R, Binary as Rt, SelectFromContext as S, MkdirAtom as St, concurrency as T, OptimizerOutput as Tt, TranslationResource as U, Snippet as V, Dispatch as W, Upload as X, TaskFactory as Y, ResolveConflict as Z, Context as _, CustomAtom as _t, FsWrapperEntry as a, AddRecord as at, Translations as b, InputAtom as bt, RemoteFsEntry as c, ConflictResolverPayload as ct, RequestParam as d, DatabaseAsync as dt, RemoveLocal as et, RequestResponse as f, DatabaseSync as ft, SyncTerminateReason as g, BatchOptimizer as gt, SyncOptions as h, StoreSync as ht, DeciderEntry as i, CreateRemoteDir as it, LabelDefinition as j, FolderStat as jt, prefixWrapper as k, WriteAtom as kt, RemoteRequestMiddlewareEntry as l, TaskNames as lt, RemoteLister as m, StoreOperations as mt, CheckConnectionResult as n, MoveLocal as nt, LocalRequestMiddlewareEntry as o, BaseTask as ot, TriggerEntry as p, StoreAsync as pt, Decider as q, ConflictResolverEntry as r, Download as rt, OptimizerEntry as s, ConflictResolver as st, VaultRequest as t, MoveRemote as tt, Request as u, RecordStore as ut, Events as v, DeleteAtom as vt, chunkSize as w, OptimizerInput as wt, ExistingMemoryDB as x, ListReporter as xt, Settings as y, Fs as yt, Fragment as z };
|
package/dist/index.spec.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as RemoveRecord, A as setNeedMigration, At as FileStat, B as ObsidianLanguageCode, C as digOriginal, Ct as MoveAtom, D as readWithSize, Dt as RootFs, E as pipe, Et as OutputAtom, F as CallableOrObjectTree, Ft as RecordStatsMap, G as On, H as Translate, I as SettingEntry, It as Stat, J as DeciderInput, K as CreateLocalDir, L as AugmentedModuleMeta, Lt as StatsMap, M as generateEditableList, Mt as MaybePromise, N as reactivelyValidate, Nt as Progress, O as writeWithValue, Ot as WrappedFs, P as s, Pt as RecordStat, Q as RemoveRemote, R as ModuleMeta, Rt as Binary, S as SelectFromContext, St as MkdirAtom, T as concurrency, Tt as OptimizerOutput, U as TranslationResource, V as Snippet, W as Dispatch, X as Upload, Y as TaskFactory, Z as ResolveConflict, _ as Context, _t as CustomAtom, a as FsWrapperEntry, at as AddRecord, b as Translations, bt as InputAtom, c as RemoteFsEntry, ct as ConflictResolverPayload, d as RequestParam, dt as DatabaseAsync, et as RemoveLocal, f as RequestResponse, ft as DatabaseSync, g as SyncTerminateReason, gt as BatchOptimizer, h as SyncOptions, ht as StoreSync, i as DeciderEntry, it as CreateRemoteDir, j as LabelDefinition, jt as FolderStat, k as prefixWrapper, kt as WriteAtom, l as RemoteRequestMiddlewareEntry, lt as TaskNames, m as RemoteLister, mt as StoreOperations, n as CheckConnectionResult, nt as MoveLocal, o as LocalRequestMiddlewareEntry, ot as BaseTask, p as TriggerEntry, pt as StoreAsync, q as Decider, r as ConflictResolverEntry, rt as Download, s as OptimizerEntry, st as ConflictResolver, t as VaultRequest, tt as MoveRemote, u as Request, ut as RecordStore, v as Events, vt as DeleteAtom, w as chunkSize, wt as OptimizerInput, x as ExistingMemoryDB, xt as ListReporter, y as Settings, yt as Fs, z as Fragment } from "./index-
|
|
1
|
+
import { $ as RemoveRecord, A as setNeedMigration, At as FileStat, B as ObsidianLanguageCode, C as digOriginal, Ct as MoveAtom, D as readWithSize, Dt as RootFs, E as pipe, Et as OutputAtom, F as CallableOrObjectTree, Ft as RecordStatsMap, G as On, H as Translate, I as SettingEntry, It as Stat, J as DeciderInput, K as CreateLocalDir, L as AugmentedModuleMeta, Lt as StatsMap, M as generateEditableList, Mt as MaybePromise, N as reactivelyValidate, Nt as Progress, O as writeWithValue, Ot as WrappedFs, P as s, Pt as RecordStat, Q as RemoveRemote, R as ModuleMeta, Rt as Binary, S as SelectFromContext, St as MkdirAtom, T as concurrency, Tt as OptimizerOutput, U as TranslationResource, V as Snippet, W as Dispatch, X as Upload, Y as TaskFactory, Z as ResolveConflict, _ as Context, _t as CustomAtom, a as FsWrapperEntry, at as AddRecord, b as Translations, bt as InputAtom, c as RemoteFsEntry, ct as ConflictResolverPayload, d as RequestParam, dt as DatabaseAsync, et as RemoveLocal, f as RequestResponse, ft as DatabaseSync, g as SyncTerminateReason, gt as BatchOptimizer, h as SyncOptions, ht as StoreSync, i as DeciderEntry, it as CreateRemoteDir, j as LabelDefinition, jt as FolderStat, k as prefixWrapper, kt as WriteAtom, l as RemoteRequestMiddlewareEntry, lt as TaskNames, m as RemoteLister, mt as StoreOperations, n as CheckConnectionResult, nt as MoveLocal, o as LocalRequestMiddlewareEntry, ot as BaseTask, p as TriggerEntry, pt as StoreAsync, q as Decider, r as ConflictResolverEntry, rt as Download, s as OptimizerEntry, st as ConflictResolver, t as VaultRequest, tt as MoveRemote, u as Request, ut as RecordStore, v as Events, vt as DeleteAtom, w as chunkSize, wt as OptimizerInput, x as ExistingMemoryDB, xt as ListReporter, y as Settings, yt as Fs, z as Fragment } from "./index-CC4NddoN.spec.js";
|
|
2
2
|
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 RemoteRequestMiddlewareEntry, type RemoveLocal, type RemoveRecord, type RemoveRemote, type Request, type RequestParam, type RequestResponse, type ResolveConflict, type RootFs, SelectFromContext, type SettingEntry, type Settings, type Snippet, type Stat, type StatsMap, type StoreAsync, type StoreOperations, type StoreSync, type SyncOptions, type SyncTerminateReason, type TaskFactory, type TaskNames, type Translate, type TranslationResource, type Translations, type TriggerEntry, type Upload, type VaultRequest, type WrappedFs, type WriteAtom, chunkSize, concurrency, digOriginal, generateEditableList, pipe, prefixWrapper, reactivelyValidate, readWithSize, s, setNeedMigration, writeWithValue };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,n){let{equals:r=(e,t)=>e===t}=n??{},i=e,a
|
|
1
|
+
function e(e,n){let{equals:r=(e,t)=>e===t}=n??{},i=e,a=/* @__PURE__ */ new Set,o=(e=>{if(e===void 0)return t?.(o),i;if(r(e,i))return;let n=i;i=e;for(let t of[...a])if(t(e,n)===`stop`)break});return o.subscribe=(e,t)=>(a.add(e),t?.immediate&&e(i,i),()=>o.unsubscribe(e)),o.clear=a.clear.bind(a),o.unsubscribe=e=>a.delete(e),o}let t;export{e as ref};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{taskMap as e}from"../src/sync/decision/interface.js";const t=new TextEncoder;function n(e){return t.encode(e)}function r(e,t={}){let{mtime:n=1,size:r=5,uid:i=`${e}-uid`}=t;return{isDir:!1,key:e,mtime:n,size:r,uid:i}}function i(e){return{isDir:!0,key:e}}function a(e,t){return{isDir:!1,local:e,remote:t}}function o(){return{isDir:!0}}function s(t,n){let r=n.localStats
|
|
1
|
+
import{taskMap as e}from"../src/sync/decision/interface.js";const t=new TextEncoder;function n(e){return t.encode(e)}function r(e,t={}){let{mtime:n=1,size:r=5,uid:i=`${e}-uid`}=t;return{isDir:!1,key:e,mtime:n,size:r,uid:i}}function i(e){return{isDir:!0,key:e}}function a(e,t){return{isDir:!1,local:e,remote:t}}function o(){return{isDir:!0}}function s(t,n){let r=n.localStats??/* @__PURE__ */ new Map,i=n.remoteStats??/* @__PURE__ */ new Map,a=n.records??/* @__PURE__ */ new Map,o=[];return t({localStats:r,logger:()=>{},records:a,remoteStats:i,taskFactory:((t,n)=>{let r=e[t],i=new r({...n,localFs:{},record:{},remoteFs:{}});return i.name=t,i.prettyName=t,o.push({key:n.key,name:t,...n.local!==void 0&&{local:n.local},...n.remote!==void 0&&{remote:n.remote}}),i})}),o}function c(e){return e.map(e=>e.name)}function l(e){return e.map(e=>e.key)}function u(e,t){let n=e.filter(e=>e.key===t);if(n.length!==1)throw Error(`Expected one task for ${t}, found ${n.length}.`);return n[0]}function d(e){return e===`/`||e.endsWith(`/`)?i(e):r(e,{mtime:10,size:5,uid:`uid`})}function f(e=[]){return new ReadableStream({start(t){for(let r of e)t.enqueue(typeof r==`string`?n(r):r);t.close()}})}function p(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),reject:t,resolve:e}}async function m(e=4){for(let t=0;t<e;t+=1)await new Promise(e=>{queueMicrotask(e)})}function h(){return{delete:[],exists:[],list:[],mkdir:[],move:[],read:[],readStream:[],stat:[],write:[],writeStream:[]}}function g(e={}){return{delete:()=>{},exists:()=>!1,getUid:()=>`FsControl`,list:e=>[d(e),i(`${e}folder/`),r(`${e}folder/note.md`,{mtime:12,size:7,uid:`note-2`})],mkdir:()=>{},move:()=>{},read:()=>n(``),readStream:()=>f(),stat:e=>d(e),write:()=>`write-uid`,writeStream:()=>`stream-uid`,...e}}function _(e){let t=[];return{calls:t,request:n=>(t.push(n),e(n))}}function v(e={}){let t=h(),n=g(e.control),r=e.uid??`uid`;return{calls:t,control:n,fs:{delete:e=>(t.delete.push(e),n.delete(e)),exists:e=>(t.exists.push(e),n.exists(e)),getUid:()=>r,list:(e,r)=>(t.list.push(e),n.list(e,r)),mkdir:(e,r)=>(t.mkdir.push(e),n.mkdir(e,r)),move:(e,r)=>(t.move.push([e,r]),n.move(e,r)),read:(e,r)=>(t.read.push([e,r]),n.read(e,r)),readStream:(e,r)=>(t.readStream.push([e,r]),n.readStream(e,r)),stat:e=>(t.stat.push(e),n.stat(e)),write:(e,r,i)=>(t.write.push([e,r,i]),n.write(e,r,i)),writeStream:(e,r,i)=>(t.writeStream.push([e,i]),n.writeStream(e,r,i))}}}const y={bytes:n,deferred:p,file:r,fileRecord:a,findTask:u,flush:m,folder:i,folderRecord:o,fs:v,request:_,runDecider:s,stream:f,taskKeys:l,taskNames:c};export{y as default};
|