@haex-space/vault-sdk 2.5.74 → 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/{client-DTXGxFqD.d.mts → client-C0fkm4FE.d.mts} +19 -1
- package/dist/{client-C_0ajqhQ.d.ts → client-C8JtjQzm.d.ts} +19 -1
- package/dist/index.d.mts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +47 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +47 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +47 -2
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +47 -2
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +47 -2
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +47 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +47 -2
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DiXJ5SF6.d.mts → types-CS-ggsXY.d.mts} +19 -1
- package/dist/{types-DiXJ5SF6.d.ts → types-CS-ggsXY.d.ts} +19 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +47 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +47 -2
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,9 @@ var HAEXTENSION_EVENTS = {
|
|
|
9
9
|
/** Context (theme, locale, platform) has changed */
|
|
10
10
|
CONTEXT_CHANGED: "haextension:context:changed",
|
|
11
11
|
/** Search request from HaexHub */
|
|
12
|
-
SEARCH_REQUEST: "haextension:search:request"
|
|
12
|
+
SEARCH_REQUEST: "haextension:search:request",
|
|
13
|
+
/** File system change detected (from native file watcher) */
|
|
14
|
+
FILE_CHANGED: "filesync:file-changed"
|
|
13
15
|
};
|
|
14
16
|
var EXTERNAL_EVENTS = {
|
|
15
17
|
/** External request from authorized client */
|
|
@@ -133,7 +135,14 @@ var FILESYSTEM_COMMANDS = {
|
|
|
133
135
|
/** Rename file or directory */
|
|
134
136
|
rename: "extension_filesystem_rename",
|
|
135
137
|
/** Copy file or directory */
|
|
136
|
-
copy: "extension_filesystem_copy"
|
|
138
|
+
copy: "extension_filesystem_copy",
|
|
139
|
+
// File watcher operations
|
|
140
|
+
/** Start watching a directory for changes */
|
|
141
|
+
watch: "extension_filesystem_watch",
|
|
142
|
+
/** Stop watching a directory */
|
|
143
|
+
unwatch: "extension_filesystem_unwatch",
|
|
144
|
+
/** Check if a directory is being watched */
|
|
145
|
+
isWatching: "extension_filesystem_is_watching"
|
|
137
146
|
};
|
|
138
147
|
|
|
139
148
|
// src/commands/externalBridge.ts
|
|
@@ -500,6 +509,42 @@ var FilesystemAPI = class {
|
|
|
500
509
|
{ from, to }
|
|
501
510
|
);
|
|
502
511
|
}
|
|
512
|
+
// ==========================================================================
|
|
513
|
+
// File Watcher Operations
|
|
514
|
+
// ==========================================================================
|
|
515
|
+
/**
|
|
516
|
+
* Start watching a directory for file changes
|
|
517
|
+
* When files change, the "filesync:file-changed" event is emitted
|
|
518
|
+
* @param ruleId Unique identifier for this watch (e.g., sync rule ID)
|
|
519
|
+
* @param path Absolute path to the directory to watch
|
|
520
|
+
*/
|
|
521
|
+
async watch(ruleId, path) {
|
|
522
|
+
await this.client.request(
|
|
523
|
+
FILESYSTEM_COMMANDS.watch,
|
|
524
|
+
{ ruleId, path }
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Stop watching a directory
|
|
529
|
+
* @param ruleId The rule ID that was used when starting the watch
|
|
530
|
+
*/
|
|
531
|
+
async unwatch(ruleId) {
|
|
532
|
+
await this.client.request(
|
|
533
|
+
FILESYSTEM_COMMANDS.unwatch,
|
|
534
|
+
{ ruleId }
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Check if a directory is currently being watched
|
|
539
|
+
* @param ruleId The rule ID to check
|
|
540
|
+
* @returns True if the directory is being watched
|
|
541
|
+
*/
|
|
542
|
+
async isWatching(ruleId) {
|
|
543
|
+
return this.client.request(
|
|
544
|
+
FILESYSTEM_COMMANDS.isWatching,
|
|
545
|
+
{ ruleId }
|
|
546
|
+
);
|
|
547
|
+
}
|
|
503
548
|
};
|
|
504
549
|
|
|
505
550
|
// src/api/web.ts
|