mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
chore: update deps
This commit is contained in:
@@ -25,7 +25,7 @@ export interface DecipherNotOK {
|
||||
export interface DecipherOK {
|
||||
status: Status.OK;
|
||||
message?: string;
|
||||
data: Uint8Array;
|
||||
data: Uint8Array<ArrayBuffer>;
|
||||
overrideExtension?: string;
|
||||
cipherName: string;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { DecipherInstance, DecipherOK, DecipherResult, Status } from '~/decrypt-
|
||||
export class TransparentDecipher implements DecipherInstance {
|
||||
cipherName = 'none';
|
||||
|
||||
async decrypt(buffer: Uint8Array): Promise<DecipherResult | DecipherOK> {
|
||||
async decrypt(buffer: Uint8Array<ArrayBuffer>): Promise<DecipherResult | DecipherOK> {
|
||||
return {
|
||||
cipherName: 'None',
|
||||
status: Status.OK,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export const toArrayBuffer = async (src: Blob | ArrayBuffer | Uint8Array<ArrayBufferLike>) =>
|
||||
src instanceof Blob ? await src.arrayBuffer() : src;
|
||||
export const toBlob = (src: Blob | ArrayBuffer | Uint8Array<ArrayBufferLike>, mimeType?: string) =>
|
||||
export const toArrayBuffer = async (src: Blob | BlobPart) => (src instanceof Blob ? await src.arrayBuffer() : src);
|
||||
export const toBlob = (src: Blob | BlobPart, mimeType?: string) =>
|
||||
src instanceof Blob ? src : new Blob([src], { type: mimeType ?? 'application/octet-stream' });
|
||||
|
||||
export function* chunkBuffer(buffer: Uint8Array, blockLen = 4096): Generator<[Uint8Array, number], void> {
|
||||
|
||||
@@ -5,7 +5,7 @@ export class MMKVParser {
|
||||
private offset = 4;
|
||||
private length: number;
|
||||
|
||||
constructor(private view: DataView) {
|
||||
constructor(private view: DataView<ArrayBuffer>) {
|
||||
const payloadLength = view.getUint32(0, true);
|
||||
this.length = 4 + payloadLength;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { StagingKugouKey } from '~/features/settings/keyFormats';
|
||||
import { MMKVParser } from '../MMKVParser';
|
||||
|
||||
export function parseAndroidKugouMMKV(view: DataView): Omit<StagingKugouKey, 'id'>[] {
|
||||
export function parseAndroidKugouMMKV(view: DataView<ArrayBuffer>): Omit<StagingKugouKey, 'id'>[] {
|
||||
const mmkv = new MMKVParser(view);
|
||||
const result: Omit<StagingKugouKey, 'id'>[] = [];
|
||||
while (!mmkv.eof) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { StagingKWMv2Key } from '~/features/settings/keyFormats';
|
||||
import { MMKVParser } from '../MMKVParser';
|
||||
|
||||
export function parseAndroidKuwoEKey(view: DataView): Omit<StagingKWMv2Key, 'id'>[] {
|
||||
export function parseAndroidKuwoEKey(view: DataView<ArrayBuffer>): Omit<StagingKWMv2Key, 'id'>[] {
|
||||
const mmkv = new MMKVParser(view);
|
||||
const result: Omit<StagingKWMv2Key, 'id'>[] = [];
|
||||
while (!mmkv.eof) {
|
||||
@@ -21,7 +21,7 @@ export function parseAndroidKuwoEKey(view: DataView): Omit<StagingKWMv2Key, 'id'
|
||||
return result;
|
||||
}
|
||||
|
||||
export function parseIosKuwoEKey(view: DataView): Omit<StagingKWMv2Key, 'id'>[] {
|
||||
export function parseIosKuwoEKey(view: DataView<ArrayBuffer>): Omit<StagingKWMv2Key, 'id'>[] {
|
||||
const mmkv = new MMKVParser(view);
|
||||
const result: Omit<StagingKWMv2Key, 'id'>[] = [];
|
||||
while (!mmkv.eof) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MMKVParser } from '../MMKVParser';
|
||||
|
||||
export function parseAndroidQmEKey(view: DataView): Map<string, string> {
|
||||
export function parseAndroidQmEKey(view: DataView<ArrayBuffer>): Map<string, string> {
|
||||
const mmkv = new MMKVParser(view);
|
||||
const result = new Map<string, string>();
|
||||
while (!mmkv.eof) {
|
||||
|
||||
Reference in New Issue
Block a user