@haex-space/vault-sdk 2.6.0 → 2.6.3
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-Bl2s5tIZ.d.ts → client-BW9GSwtY.d.ts} +2 -1
- package/dist/{client-B_S7ntUI.d.mts → client-Cgt1hI4U.d.mts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -2
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +36 -2
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +36 -2
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +1 -1
- package/dist/runtime/nuxt.plugin.client.d.ts +1 -1
- package/dist/runtime/nuxt.plugin.client.js +36 -2
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +36 -2
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +36 -2
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +36 -2
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +36 -2
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +36 -2
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-Cgt1hI4U.mjs';
|
|
4
4
|
import { A as ApplicationContext } from '../types-B1O6KckK.mjs';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as nuxt_app from 'nuxt/app';
|
|
2
2
|
import { ShallowRef } from 'vue';
|
|
3
|
-
import { H as HaexVaultSdk } from '../client-
|
|
3
|
+
import { H as HaexVaultSdk } from '../client-BW9GSwtY.js';
|
|
4
4
|
import { A as ApplicationContext } from '../types-B1O6KckK.js';
|
|
5
5
|
import 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
|
|
@@ -23,6 +23,12 @@ var EXTERNAL_EVENTS = {
|
|
|
23
23
|
/** New external client requesting authorization */
|
|
24
24
|
AUTHORIZATION_REQUEST: "external:authorization-request"
|
|
25
25
|
};
|
|
26
|
+
var SHELL_EVENTS = {
|
|
27
|
+
/** PTY output data from a shell session */
|
|
28
|
+
OUTPUT: "shell:output",
|
|
29
|
+
/** Shell session has exited */
|
|
30
|
+
EXIT: "shell:exit"
|
|
31
|
+
};
|
|
26
32
|
|
|
27
33
|
// src/types.ts
|
|
28
34
|
var DEFAULT_TIMEOUT = 3e4;
|
|
@@ -1163,11 +1169,10 @@ var ShellAPI = class {
|
|
|
1163
1169
|
* Listen for shell output via `sdk.shell.onData()`.
|
|
1164
1170
|
*/
|
|
1165
1171
|
async create(options = {}) {
|
|
1166
|
-
|
|
1172
|
+
return await this.sdk.request(
|
|
1167
1173
|
SHELL_COMMANDS.create,
|
|
1168
1174
|
{ options }
|
|
1169
1175
|
);
|
|
1170
|
-
return result.sessionId;
|
|
1171
1176
|
}
|
|
1172
1177
|
/**
|
|
1173
1178
|
* Write data to a shell session's stdin.
|
|
@@ -1488,6 +1493,35 @@ async function setupTauriEventListeners(ctx, log, onEvent, onContextChange) {
|
|
|
1488
1493
|
} catch (error) {
|
|
1489
1494
|
log("Failed to setup LocalSend event listeners:", error);
|
|
1490
1495
|
}
|
|
1496
|
+
log("Setting up Shell event listeners");
|
|
1497
|
+
try {
|
|
1498
|
+
await listen(SHELL_EVENTS.OUTPUT, (event) => {
|
|
1499
|
+
if (event.payload) {
|
|
1500
|
+
const payload = event.payload;
|
|
1501
|
+
onEvent({
|
|
1502
|
+
type: SHELL_EVENTS.OUTPUT,
|
|
1503
|
+
timestamp: Date.now(),
|
|
1504
|
+
sessionId: payload.sessionId,
|
|
1505
|
+
data: payload.data
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
});
|
|
1509
|
+
log("Shell output listener registered");
|
|
1510
|
+
await listen(SHELL_EVENTS.EXIT, (event) => {
|
|
1511
|
+
if (event.payload) {
|
|
1512
|
+
const payload = event.payload;
|
|
1513
|
+
onEvent({
|
|
1514
|
+
type: SHELL_EVENTS.EXIT,
|
|
1515
|
+
timestamp: Date.now(),
|
|
1516
|
+
sessionId: payload.sessionId,
|
|
1517
|
+
exitCode: payload.exitCode
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
log("Shell exit listener registered");
|
|
1522
|
+
} catch (error) {
|
|
1523
|
+
log("Failed to setup Shell event listeners:", error);
|
|
1524
|
+
}
|
|
1491
1525
|
}
|
|
1492
1526
|
async function setupLocalSendEventListeners(log, onEvent) {
|
|
1493
1527
|
const { listen } = getTauriEvent();
|