@secrecy/lib 1.66.0-feat-next15.1 → 1.66.0-feat-next15.2

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.
@@ -191,7 +191,7 @@ export class SecrecyCloudClient {
191
191
  for (const [key, value] of Object.entries(part.fields)) {
192
192
  formData.append(key, value);
193
193
  }
194
- formData.append('file', new Blob([chunk.data.slice(0)], { type: filetype?.mime }), `${uploadData.id}-${chunk.order}`);
194
+ formData.append('file', new Blob([chunk.data], { type: filetype?.mime }), `${uploadData.id}-${chunk.order}`);
195
195
  await axios.post(part.url, formData, {
196
196
  signal,
197
197
  onUploadProgress: (progressEvent) => {
@@ -12,7 +12,7 @@ export declare class SecrecyCloudClient {
12
12
  }): Promise<NodeFull>;
13
13
  uploadData({ storageType, data, encrypted, encryptProgress, uploadProgress, signal, meta, }: {
14
14
  storageType: DataStorageType;
15
- data: globalThis.File | Uint8Array;
15
+ data: globalThis.File | Uint8Array<ArrayBuffer>;
16
16
  encrypted?: boolean;
17
17
  encryptProgress?: ProgressCallback;
18
18
  uploadProgress?: ProgressCallback;
@@ -20,7 +20,7 @@ export declare class SecrecyCloudClient {
20
20
  meta?: FileTypeResult | true;
21
21
  }): Promise<LocalData>;
22
22
  uploadDataInCloud({ data, name, nodeId, encryptProgress, uploadProgress, storageType, signal, }: {
23
- data: globalThis.File | Uint8Array;
23
+ data: globalThis.File | Uint8Array<ArrayBuffer>;
24
24
  name: string;
25
25
  nodeId?: string;
26
26
  encryptProgress?: ProgressCallback;
@@ -7,7 +7,7 @@ export type LocalData = {
7
7
  storageType: DataStorageType;
8
8
  size: bigint;
9
9
  sizeEncrypted: bigint | null;
10
- data: Uint8Array;
10
+ data: Uint8Array<ArrayBuffer>;
11
11
  mime?: string;
12
12
  ext?: string;
13
13
  };
@@ -1,5 +1,5 @@
1
1
  export interface EncryptedFile {
2
- data: Uint8Array;
2
+ data: Uint8Array<ArrayBuffer>;
3
3
  md5: string;
4
4
  md5Encrypted: string;
5
5
  }
@@ -10,5 +10,5 @@ export interface SecretStreamProgress {
10
10
  total: number;
11
11
  current: number;
12
12
  }
13
- export declare function encryptSecretStream(key: Uint8Array, data: Uint8Array, progress?: (progress: SecretStreamProgress) => Promise<void>, abort?: AbortController): Promise<EncryptedFile>;
14
- export declare function decryptSecretStream(key: Uint8Array, data: Uint8Array, progress?: (progress: SecretStreamProgress) => Promise<void>, abort?: AbortController): Promise<Uint8Array>;
13
+ export declare function encryptSecretStream(key: Uint8Array, data: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, abort?: AbortController): Promise<EncryptedFile>;
14
+ export declare function decryptSecretStream(key: Uint8Array, data: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, abort?: AbortController): Promise<Uint8Array<ArrayBuffer>>;
@@ -1,2 +1,2 @@
1
- export declare function compress(data: Uint8Array): Uint8Array;
2
- export declare function decompress(data: Uint8Array): Uint8Array;
1
+ export declare function compress(data: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
2
+ export declare function decompress(data: Uint8Array<ArrayBuffer>): Uint8Array<ArrayBuffer>;
@@ -1,3 +1,3 @@
1
- export declare function concatenate(...arrays: Uint8Array[]): Uint8Array;
1
+ export declare function concatenate<T extends ArrayBufferLike>(...arrays: Uint8Array<T>[]): Uint8Array<T>;
2
2
  export declare function enumerate<T>(iterable: Iterable<T>): IterableIterator<[number, T]>;
3
- export declare function chunks(arr: Uint8Array, n: number): Generator<Uint8Array, void, unknown>;
3
+ export declare function chunks(arr: Uint8Array<ArrayBuffer>, n: number): Generator<Uint8Array<ArrayBuffer>, void, unknown>;
@@ -1,3 +1,3 @@
1
1
  import { type EncryptedFile, type SecretStreamProgress } from '../crypto/data.js';
2
- export declare const encrypt: (key: Uint8Array, dataToEncrypt: Uint8Array, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal) => Promise<EncryptedFile>;
3
- export declare const decrypt: (key: Uint8Array, dataToDecrypt: Uint8Array, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal) => Promise<Uint8Array>;
2
+ export declare const encrypt: (key: Uint8Array, dataToEncrypt: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal) => Promise<EncryptedFile>;
3
+ export declare const decrypt: (key: Uint8Array, dataToDecrypt: Uint8Array<ArrayBuffer>, progress?: (progress: SecretStreamProgress) => Promise<void>, signal?: AbortSignal) => Promise<Uint8Array<ArrayBuffer>>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@secrecy/lib",
3
3
  "author": "Anonymize <anonymize@gmail.com>",
4
4
  "description": "Anonymize Secrecy Library",
5
- "version": "1.66.0-feat-next15.1",
5
+ "version": "1.66.0-feat-next15.2",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/anonymize-org/lib.git"