@secrecy/lib 1.69.0-feat-anonymous-upload.1 → 1.69.0-feat-anonymous-upload.3
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.
|
@@ -141,9 +141,8 @@ export class SecrecyCloudClient {
|
|
|
141
141
|
const uploadData = await uploadDataCaller.mutate(uploadDataArgs, {
|
|
142
142
|
signal,
|
|
143
143
|
});
|
|
144
|
-
if (uploadData.parts.length === 0) {
|
|
145
|
-
if (uploadData.keyPair
|
|
146
|
-
uploadData.keyPair.pub !== this.#keys.publicKey) {
|
|
144
|
+
if (uploadData.type === 'authed' && uploadData.parts.length === 0) {
|
|
145
|
+
if (uploadData.keyPair.pub !== this.#keys.publicKey) {
|
|
147
146
|
throw new Error('The public key does not match with cached key!');
|
|
148
147
|
}
|
|
149
148
|
await uploadProgress?.({
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1492,18 +1492,30 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1492
1492
|
ext?: string | undefined;
|
|
1493
1493
|
};
|
|
1494
1494
|
output: {
|
|
1495
|
+
type: "authed";
|
|
1495
1496
|
id: string;
|
|
1497
|
+
storageType: "s3" | "cold";
|
|
1496
1498
|
parts: {
|
|
1497
1499
|
url: string;
|
|
1498
1500
|
order: number;
|
|
1499
1501
|
fields: Record<string, string>;
|
|
1500
1502
|
}[];
|
|
1501
1503
|
partSize: bigint;
|
|
1502
|
-
key
|
|
1503
|
-
keyPair
|
|
1504
|
+
key: string | null;
|
|
1505
|
+
keyPair: {
|
|
1504
1506
|
pub: string;
|
|
1505
1507
|
encPriv: string;
|
|
1506
|
-
}
|
|
1508
|
+
};
|
|
1509
|
+
} | {
|
|
1510
|
+
type: "guest";
|
|
1511
|
+
id: string;
|
|
1512
|
+
storageType: "s3" | "cold";
|
|
1513
|
+
parts: {
|
|
1514
|
+
url: string;
|
|
1515
|
+
order: number;
|
|
1516
|
+
fields: Record<string, string>;
|
|
1517
|
+
}[];
|
|
1518
|
+
partSize: bigint;
|
|
1507
1519
|
};
|
|
1508
1520
|
meta: any;
|
|
1509
1521
|
}>;
|
|
@@ -1525,18 +1537,30 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1525
1537
|
ext?: string | undefined;
|
|
1526
1538
|
};
|
|
1527
1539
|
output: {
|
|
1540
|
+
type: "authed";
|
|
1528
1541
|
id: string;
|
|
1542
|
+
storageType: "s3" | "cold";
|
|
1529
1543
|
parts: {
|
|
1530
1544
|
url: string;
|
|
1531
1545
|
order: number;
|
|
1532
1546
|
fields: Record<string, string>;
|
|
1533
1547
|
}[];
|
|
1534
1548
|
partSize: bigint;
|
|
1535
|
-
key
|
|
1536
|
-
keyPair
|
|
1549
|
+
key: string | null;
|
|
1550
|
+
keyPair: {
|
|
1537
1551
|
pub: string;
|
|
1538
1552
|
encPriv: string;
|
|
1539
|
-
}
|
|
1553
|
+
};
|
|
1554
|
+
} | {
|
|
1555
|
+
type: "guest";
|
|
1556
|
+
id: string;
|
|
1557
|
+
storageType: "s3" | "cold";
|
|
1558
|
+
parts: {
|
|
1559
|
+
url: string;
|
|
1560
|
+
order: number;
|
|
1561
|
+
fields: Record<string, string>;
|
|
1562
|
+
}[];
|
|
1563
|
+
partSize: bigint;
|
|
1540
1564
|
};
|
|
1541
1565
|
meta: any;
|
|
1542
1566
|
}>;
|
|
@@ -1560,12 +1584,16 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
1560
1584
|
ext?: string | undefined;
|
|
1561
1585
|
};
|
|
1562
1586
|
output: {
|
|
1587
|
+
type: "authed";
|
|
1563
1588
|
id: string;
|
|
1564
|
-
key
|
|
1565
|
-
keyPair
|
|
1589
|
+
key: string | null;
|
|
1590
|
+
keyPair: {
|
|
1566
1591
|
pub: string;
|
|
1567
1592
|
encPriv: string;
|
|
1568
|
-
}
|
|
1593
|
+
};
|
|
1594
|
+
} | {
|
|
1595
|
+
type: "guest";
|
|
1596
|
+
id: string;
|
|
1569
1597
|
};
|
|
1570
1598
|
meta: any;
|
|
1571
1599
|
}>;
|
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.69.0-feat-anonymous-upload.
|
|
5
|
+
"version": "1.69.0-feat-anonymous-upload.3",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@js-temporal/polyfill": "^0.5.1",
|
|
78
78
|
"@trpc/client": "11.5.1",
|
|
79
79
|
"@trpc/server": "11.5.1",
|
|
80
|
-
"@secrecy/trpc-api-types": "1.33.0-feat-unlog-upload.
|
|
80
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-unlog-upload.16",
|
|
81
81
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|
|
82
82
|
"axios": "^1.11.0",
|
|
83
83
|
"bson": "^6.10.4",
|