@secrecy/lib 1.37.0 → 1.37.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.
|
@@ -163,13 +163,19 @@ export class SecrecyCloudClient {
|
|
|
163
163
|
return uploadData.id;
|
|
164
164
|
}
|
|
165
165
|
async uploadDataInCloud({ data, name, nodeId, encryptProgress, uploadProgress, signal, isLite, }) {
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
166
|
+
const dataId = isLite
|
|
167
|
+
? await this.uploadLiteData({
|
|
168
|
+
data,
|
|
169
|
+
encryptProgress,
|
|
170
|
+
uploadProgress,
|
|
171
|
+
signal,
|
|
172
|
+
})
|
|
173
|
+
: await this.uploadData({
|
|
174
|
+
data,
|
|
175
|
+
encryptProgress,
|
|
176
|
+
uploadProgress,
|
|
177
|
+
signal,
|
|
178
|
+
});
|
|
173
179
|
return await this.saveInCloud({
|
|
174
180
|
dataId,
|
|
175
181
|
name,
|
package/dist/lib/client.js
CHANGED
|
@@ -4,6 +4,11 @@ import { SECRECY_LIB_VERSION } from './versioning';
|
|
|
4
4
|
export function isTRPCClientError(cause) {
|
|
5
5
|
return cause instanceof TRPCClientError;
|
|
6
6
|
}
|
|
7
|
+
superjson.registerCustom({
|
|
8
|
+
isApplicable: (v) => v instanceof Buffer,
|
|
9
|
+
serialize: (v) => [...v],
|
|
10
|
+
deserialize: (v) => Buffer.from(v),
|
|
11
|
+
}, 'buffer');
|
|
7
12
|
export const createTRPCClient = (session, onAccessDenied) => createTRPCProxyClient({
|
|
8
13
|
transformer: superjson,
|
|
9
14
|
links: [
|
package/package.json
CHANGED