feat: introduce worker action types and refactor decryption handling

- Added a new `actions.ts` file defining `WorkerActionMap` for better type management of worker actions.
- Updated `client.ts`, `worker.ts`, and `decrypt.ts` to utilize the new action types, enhancing type safety.
- Refactored `DecryptCommandPayload` to rename `id` to `fileId` for clarity and consistency.
- Adjusted various components to align with the new payload structure and improved error handling in the worker event bus.
- Enhanced tests to ensure compatibility with the new action type definitions and payload structures.
This commit is contained in:
鲁树人 committed 2026-11-01 02:55:30 +09:00
1 parent 7a11d4f941
commit 4a7994df96
13 files changed
+105 -78

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ export class KuwoMusicDecipher implements DecipherInstance {
try {
header = KuwoHeader.parse(buffer.subarray(0, 0x400));
kwm = new KWMDecipher(header, options.kwm2key);
kwm = new KWMDecipher(header, options.kwm2Key);
const audioBuffer = new Uint8Array(buffer.subarray(0x400));
for (const [block, offset] of chunkBuffer(audioBuffer)) {