yeow-api 0.2.111 → 0.2.112
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/package.json +1 -1
- package/src/event.ts +3 -3
package/package.json
CHANGED
package/src/event.ts
CHANGED
|
@@ -378,7 +378,7 @@ export function eventOn<K extends keyof EventMap>(
|
|
|
378
378
|
|
|
379
379
|
const cbId = _registerCallback((data: RawEvent) => {
|
|
380
380
|
const wrapped = adaptEvent(eventType, data);
|
|
381
|
-
const
|
|
381
|
+
const eventId = data?._eventId;
|
|
382
382
|
const cancellable = data?._cancellable;
|
|
383
383
|
const localMods: { cancelled?: boolean } = {};
|
|
384
384
|
|
|
@@ -394,7 +394,7 @@ export function eventOn<K extends keyof EventMap>(
|
|
|
394
394
|
const complete = (result?: Record<string, unknown>) => {
|
|
395
395
|
$send('task', {
|
|
396
396
|
type: 'event.complete',
|
|
397
|
-
params: {
|
|
397
|
+
params: { eventId, mods: result },
|
|
398
398
|
cb: '',
|
|
399
399
|
});
|
|
400
400
|
};
|
|
@@ -407,7 +407,7 @@ export function eventOn<K extends keyof EventMap>(
|
|
|
407
407
|
...(result && typeof result === 'object' ? result : {}),
|
|
408
408
|
};
|
|
409
409
|
if (localMods.cancelled) mods.cancelled = true;
|
|
410
|
-
$send('task', { type: 'event.complete', params: {
|
|
410
|
+
$send('task', { type: 'event.complete', params: { eventId, mods }, cb: '' });
|
|
411
411
|
}, { persistent: true });
|
|
412
412
|
|
|
413
413
|
const gh = globalThis as any;
|