@haex-space/vault-sdk 2.5.73 → 2.5.76

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/node.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.mjs';
2
- import { E as ExtensionManifest } from './types-DiXJ5SF6.mjs';
2
+ import { E as ExtensionManifest } from './types-CS-ggsXY.mjs';
3
3
 
4
4
  interface ReadManifestOptions {
5
5
  /** Root directory of the project */
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.js';
2
- import { E as ExtensionManifest } from './types-DiXJ5SF6.js';
2
+ import { E as ExtensionManifest } from './types-CS-ggsXY.js';
3
3
 
4
4
  interface ReadManifestOptions {
5
5
  /** Root directory of the project */
package/dist/react.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-DTXGxFqD.mjs';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client-C0fkm4FE.mjs';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
- import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-DiXJ5SF6.mjs';
3
+ import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-CS-ggsXY.mjs';
4
4
 
5
5
  /**
6
6
  * React hook for HaexVault SDK
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-C_0ajqhQ.js';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client-C8JtjQzm.js';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
- import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-DiXJ5SF6.js';
3
+ import { H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext } from './types-CS-ggsXY.js';
4
4
 
5
5
  /**
6
6
  * React hook for HaexVault SDK
package/dist/react.js CHANGED
@@ -337,7 +337,9 @@ var HAEXTENSION_EVENTS = {
337
337
  /** Context (theme, locale, platform) has changed */
338
338
  CONTEXT_CHANGED: "haextension:context:changed",
339
339
  /** Search request from HaexHub */
340
- SEARCH_REQUEST: "haextension:search:request"
340
+ SEARCH_REQUEST: "haextension:search:request",
341
+ /** File system change detected (from native file watcher) */
342
+ FILE_CHANGED: "filesync:file-changed"
341
343
  };
342
344
  var EXTERNAL_EVENTS = {
343
345
  /** External request from authorized client */
@@ -461,7 +463,14 @@ var FILESYSTEM_COMMANDS = {
461
463
  /** Rename file or directory */
462
464
  rename: "extension_filesystem_rename",
463
465
  /** Copy file or directory */
464
- copy: "extension_filesystem_copy"
466
+ copy: "extension_filesystem_copy",
467
+ // File watcher operations
468
+ /** Start watching a directory for changes */
469
+ watch: "extension_filesystem_watch",
470
+ /** Stop watching a directory */
471
+ unwatch: "extension_filesystem_unwatch",
472
+ /** Check if a directory is being watched */
473
+ isWatching: "extension_filesystem_is_watching"
465
474
  };
466
475
 
467
476
  // src/commands/externalBridge.ts
@@ -828,6 +837,42 @@ var FilesystemAPI = class {
828
837
  { from, to }
829
838
  );
830
839
  }
840
+ // ==========================================================================
841
+ // File Watcher Operations
842
+ // ==========================================================================
843
+ /**
844
+ * Start watching a directory for file changes
845
+ * When files change, the "filesync:file-changed" event is emitted
846
+ * @param ruleId Unique identifier for this watch (e.g., sync rule ID)
847
+ * @param path Absolute path to the directory to watch
848
+ */
849
+ async watch(ruleId, path) {
850
+ await this.client.request(
851
+ FILESYSTEM_COMMANDS.watch,
852
+ { ruleId, path }
853
+ );
854
+ }
855
+ /**
856
+ * Stop watching a directory
857
+ * @param ruleId The rule ID that was used when starting the watch
858
+ */
859
+ async unwatch(ruleId) {
860
+ await this.client.request(
861
+ FILESYSTEM_COMMANDS.unwatch,
862
+ { ruleId }
863
+ );
864
+ }
865
+ /**
866
+ * Check if a directory is currently being watched
867
+ * @param ruleId The rule ID to check
868
+ * @returns True if the directory is being watched
869
+ */
870
+ async isWatching(ruleId) {
871
+ return this.client.request(
872
+ FILESYSTEM_COMMANDS.isWatching,
873
+ { ruleId }
874
+ );
875
+ }
831
876
  };
832
877
 
833
878
  // src/api/web.ts
@@ -1009,9 +1054,7 @@ var RemoteStorageAPI = class {
1009
1054
  async upload(backendId, key, data) {
1010
1055
  const base64 = arrayBufferToBase64(data);
1011
1056
  await this.client.request(REMOTE_STORAGE_COMMANDS.upload, {
1012
- backendId,
1013
- key,
1014
- data: base64
1057
+ request: { backendId, key, data: base64 }
1015
1058
  });
1016
1059
  }
1017
1060
  /**
@@ -1023,7 +1066,7 @@ var RemoteStorageAPI = class {
1023
1066
  async download(backendId, key) {
1024
1067
  const base64 = await this.client.request(
1025
1068
  REMOTE_STORAGE_COMMANDS.download,
1026
- { backendId, key }
1069
+ { request: { backendId, key } }
1027
1070
  );
1028
1071
  return base64ToArrayBuffer(base64);
1029
1072
  }
@@ -1034,8 +1077,7 @@ var RemoteStorageAPI = class {
1034
1077
  */
1035
1078
  async delete(backendId, key) {
1036
1079
  await this.client.request(REMOTE_STORAGE_COMMANDS.delete, {
1037
- backendId,
1038
- key
1080
+ request: { backendId, key }
1039
1081
  });
1040
1082
  }
1041
1083
  /**