@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.
- package/dist/lib/client/SecrecyCloudClient.js +1 -1
- package/dist/types/client/SecrecyCloudClient.d.ts +2 -2
- package/dist/types/client/types/data.d.ts +1 -1
- package/dist/types/crypto/data.d.ts +3 -3
- package/dist/types/minify/index.d.ts +2 -2
- package/dist/types/utils/array.d.ts +2 -2
- package/dist/types/worker/sodium.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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
|
|
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;
|
|
@@ -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
|
|
14
|
-
export declare function decryptSecretStream(key: Uint8Array, data: 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
|
|
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
|
|
3
|
-
export declare const decrypt: (key: Uint8Array, dataToDecrypt: 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.
|
|
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"
|