@hesprs/sync-engine-sdk 3.0.0 → 3.0.2

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.
Files changed (92) hide show
  1. package/README.md +7 -0
  2. package/dist/dev.js +1 -1
  3. package/dist/{packages/plugin/test/test-kit.d.ts → dev.spec.d.ts} +22 -5
  4. package/dist/index-3gsR9vHT.spec.d.ts +1336 -0
  5. package/dist/index.js +1 -1
  6. package/dist/index.spec.d.ts +2 -0
  7. package/dist/prefix.js +1 -1
  8. package/package.json +12 -10
  9. package/dist/debug-wrapper.d.ts +0 -6
  10. package/dist/dev.d.ts +0 -5
  11. package/dist/index.d.ts +0 -35
  12. package/dist/node_modules/.bun/synthkernel@._synthkernel.tgz/node_modules/synthkernel/dist/context.d.ts +0 -29
  13. package/dist/node_modules/.bun/synthkernel@._synthkernel.tgz/node_modules/synthkernel/dist/reactive.d.ts +0 -14
  14. package/dist/node_modules/.bun/uni-kv@.._.._uni-kv.tgz/node_modules/uni-kv/dist/interface.d.ts +0 -46
  15. package/dist/obsidian-bridge.d.ts +0 -15
  16. package/dist/obsidian-bridge.js +0 -1
  17. package/dist/packages/plugin/src/components/FilterEditorModal.d.ts +0 -17
  18. package/dist/packages/plugin/src/components/HeadersEditorModal.d.ts +0 -18
  19. package/dist/packages/plugin/src/components/MigrationModal.d.ts +0 -45
  20. package/dist/packages/plugin/src/components/ModuleEditorModal.d.ts +0 -26
  21. package/dist/packages/plugin/src/components/SourceEditorModal.d.ts +0 -16
  22. package/dist/packages/plugin/src/components/UnknownModuleModal.d.ts +0 -19
  23. package/dist/packages/plugin/src/components/file-tree/index.d.ts +0 -7
  24. package/dist/packages/plugin/src/components/module-management/index.d.ts +0 -23
  25. package/dist/packages/plugin/src/fs/hierarchical-optimizer.d.ts +0 -1
  26. package/dist/packages/plugin/src/fs/index.d.ts +0 -13
  27. package/dist/packages/plugin/src/fs/interface.d.ts +0 -71
  28. package/dist/packages/plugin/src/fs/middlewares/custom-headers.d.ts +0 -1
  29. package/dist/packages/plugin/src/fs/middlewares/rate-limiter.d.ts +0 -1
  30. package/dist/packages/plugin/src/fs/middlewares/retry.d.ts +0 -1
  31. package/dist/packages/plugin/src/fs/vault/index.d.ts +0 -3
  32. package/dist/packages/plugin/src/fs/vault/request.d.ts +0 -71
  33. package/dist/packages/plugin/src/fs/wrappers/asymmetric-storage.d.ts +0 -2
  34. package/dist/packages/plugin/src/fs/wrappers/cancellation.d.ts +0 -2
  35. package/dist/packages/plugin/src/fs/wrappers/context.d.ts +0 -2
  36. package/dist/packages/plugin/src/fs/wrappers/memory-control.d.ts +0 -1
  37. package/dist/packages/plugin/src/fs/wrappers/optimization.d.ts +0 -1
  38. package/dist/packages/plugin/src/index.d.ts +0 -30
  39. package/dist/packages/plugin/src/modules/Bootstrap.d.ts +0 -85
  40. package/dist/packages/plugin/src/modules/EventBus.d.ts +0 -35
  41. package/dist/packages/plugin/src/modules/Extensibility.d.ts +0 -96
  42. package/dist/packages/plugin/src/modules/I18n.d.ts +0 -22
  43. package/dist/packages/plugin/src/modules/ModulesModal.d.ts +0 -49
  44. package/dist/packages/plugin/src/modules/Observability.d.ts +0 -58
  45. package/dist/packages/plugin/src/modules/ProgressModal.d.ts +0 -66
  46. package/dist/packages/plugin/src/modules/Registrar.d.ts +0 -147
  47. package/dist/packages/plugin/src/modules/Scheduler.d.ts +0 -43
  48. package/dist/packages/plugin/src/modules/Storage.d.ts +0 -54
  49. package/dist/packages/plugin/src/modules/Sync.d.ts +0 -84
  50. package/dist/packages/plugin/src/settings/controls.d.ts +0 -21
  51. package/dist/packages/plugin/src/settings/development.d.ts +0 -17
  52. package/dist/packages/plugin/src/settings/features.d.ts +0 -24
  53. package/dist/packages/plugin/src/settings/filter.d.ts +0 -11
  54. package/dist/packages/plugin/src/settings/head.d.ts +0 -23
  55. package/dist/packages/plugin/src/settings/miscellaneous.d.ts +0 -21
  56. package/dist/packages/plugin/src/sync/conflict-resolve/keep-local.d.ts +0 -1
  57. package/dist/packages/plugin/src/sync/conflict-resolve/keep-remote.d.ts +0 -1
  58. package/dist/packages/plugin/src/sync/conflict-resolve/latest-survive.d.ts +0 -1
  59. package/dist/packages/plugin/src/sync/conflict-resolve/rename-and-keep-both.d.ts +0 -1
  60. package/dist/packages/plugin/src/sync/decision/bidirectional.d.ts +0 -2
  61. package/dist/packages/plugin/src/sync/decision/interface.d.ts +0 -90
  62. package/dist/packages/plugin/src/sync/index.d.ts +0 -21
  63. package/dist/packages/plugin/src/sync/tasks/AddRecord.d.ts +0 -8
  64. package/dist/packages/plugin/src/sync/tasks/CreateLocalDir.d.ts +0 -8
  65. package/dist/packages/plugin/src/sync/tasks/CreateRemoteDir.d.ts +0 -8
  66. package/dist/packages/plugin/src/sync/tasks/Download.d.ts +0 -8
  67. package/dist/packages/plugin/src/sync/tasks/MoveLocal.d.ts +0 -8
  68. package/dist/packages/plugin/src/sync/tasks/MoveRemote.d.ts +0 -8
  69. package/dist/packages/plugin/src/sync/tasks/RemoveLocal.d.ts +0 -8
  70. package/dist/packages/plugin/src/sync/tasks/RemoveRecord.d.ts +0 -7
  71. package/dist/packages/plugin/src/sync/tasks/RemoveRemote.d.ts +0 -8
  72. package/dist/packages/plugin/src/sync/tasks/ResolveConflict.d.ts +0 -11
  73. package/dist/packages/plugin/src/sync/tasks/Upload.d.ts +0 -8
  74. package/dist/packages/plugin/src/sync/tasks/interface.d.ts +0 -36
  75. package/dist/packages/plugin/src/sync/utils/detect-moves.d.ts +0 -2
  76. package/dist/packages/plugin/src/sync/utils/post-traversal.d.ts +0 -1
  77. package/dist/packages/plugin/src/types.d.ts +0 -40
  78. package/dist/packages/plugin/src/utils/glob-match.d.ts +0 -5
  79. package/dist/packages/plugin/src/utils/pipe.d.ts +0 -14
  80. package/dist/packages/plugin/src/utils/sha-256.d.ts +0 -4
  81. package/dist/packages/plugin/test/e2e-utils.d.ts +0 -5
  82. package/dist/prefix.d.ts +0 -6
  83. package/dist/transform.d.ts +0 -15
  84. /package/dist/{packages/plugin → plugin}/src/components/MigrationModal.js +0 -0
  85. /package/dist/{packages/plugin → plugin}/src/components/render-progress.js +0 -0
  86. /package/dist/{packages/plugin → plugin}/src/utils/pipe.js +0 -0
  87. /package/dist/{packages/plugin → plugin}/src/utils/round-percent.js +0 -0
  88. /package/dist/{packages/plugin → plugin}/src/utils/sha-256.js +0 -0
  89. /package/dist/{packages/plugin → plugin}/src/utils/to-error-message.js +0 -0
  90. /package/dist/{packages/plugin → plugin}/test/test-kit.js +0 -0
  91. /package/dist/{packages/shared → shared}/src/get-status.js +0 -0
  92. /package/dist/{packages/shared → shared}/src/path.js +0 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ ## Sync Engine Core & SDK
2
+
3
+ This package is the core of Sync Engine, it contains all the source code of the Sync Engine plugin published on Obsidian plugin directory, as well as the `@hesprs/sync-engine-sdk` package published on npm.
4
+
5
+ The version of the SDK matches the last Sync Engine version that had API changes. If you see the SDK version lags behind the plugin, it means the API is stable in recent period.
6
+
7
+ For more about Sync Engine and how to develop a module for it. Refer to [the official website](https://sync.consensia.cc). Or go to [source code repo](https://github.com/hesprs/sync-engine) for deep dive.
package/dist/dev.js CHANGED
@@ -1 +1 @@
1
- import e from"./debug-wrapper.js";import t from"./packages/plugin/test/test-kit.js";import n from"./packages/plugin/src/utils/sha-256.js";import r from"./transform.js";export{e as debugWrapper,n as sha256,r as syncEngineTransform,t as testKit};
1
+ import e from"./debug-wrapper.js";import t from"./plugin/test/test-kit.js";import n from"./plugin/src/utils/sha-256.js";import r from"./transform.js";export{e as debugWrapper,n as sha256,r as syncEngineTransform,t as testKit};
@@ -1,7 +1,7 @@
1
- import { Binary, FileStat, FolderStat } from "../src/types.js";
2
- import { Fs, RootFs } from "../src/fs/interface.js";
3
- import { Request, RequestParam } from "../src/modules/Registrar.js";
4
- import "../src/fs/index.js";
1
+ import { Ct as FolderStat, St as FileStat, f as Request, p as RequestParam, ut as Fs, vt as RootFs, xt as Binary, yt as WrappedFs } from "./index-3gsR9vHT.spec.js";
2
+ //#region src/sdk/debug-wrapper.d.ts
3
+ declare function debugWrapper(original: Fs, log: (content: string) => void): WrappedFs;
4
+ //#endregion
5
5
  //#region test/test-kit.d.ts
6
6
  type FsCalls = {
7
7
  delete: Array<string>;
@@ -55,4 +55,21 @@ declare const testKit: {
55
55
  stream: typeof stream;
56
56
  };
57
57
  //#endregion
58
- export { testKit as default };
58
+ //#region src/utils/sha-256.d.ts
59
+ declare function sha256(input: string): Promise<string>;
60
+ //#endregion
61
+ //#region src/sdk/transform.d.ts
62
+ type SyncEngineConfig = {
63
+ deps?: {
64
+ neverBundle?: true | string | RegExp | Array<string | RegExp> | ((id: string, parentId: string | undefined, isResolved: boolean) => boolean | null | undefined);
65
+ };
66
+ };
67
+ declare function syncEngineTransform(): {
68
+ name: string;
69
+ renderChunk(code: string): {
70
+ code: string;
71
+ } | undefined;
72
+ tsdownConfig(config: SyncEngineConfig): void;
73
+ };
74
+ //#endregion
75
+ export { debugWrapper, sha256, syncEngineTransform, testKit };