@secrecy/lib 1.65.0-feat-next15.1 → 1.65.0-feat-next15.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.
package/dist/lib/client.js
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { httpBatchLink, loggerLink, createTRPCClient as innerCreateTRPCClient, TRPCClientError, } from '@trpc/client';
|
|
2
|
-
import superjson from 'superjson';
|
|
3
2
|
import { SECRECY_LIB_VERSION } from './versioning.js';
|
|
3
|
+
import { transformer } from './transformer.js';
|
|
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');
|
|
12
7
|
export const createTRPCClient = (opts) => innerCreateTRPCClient({
|
|
13
8
|
links: [
|
|
14
9
|
loggerLink({
|
|
@@ -23,7 +18,7 @@ export const createTRPCClient = (opts) => innerCreateTRPCClient({
|
|
|
23
18
|
},
|
|
24
19
|
}),
|
|
25
20
|
httpBatchLink({
|
|
26
|
-
transformer
|
|
21
|
+
transformer,
|
|
27
22
|
url: opts.apiUrl
|
|
28
23
|
? `${opts.apiUrl}/trpc`
|
|
29
24
|
: 'https://api.secrecy.tech/trpc',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
import superjson from 'superjson';
|
|
3
|
+
superjson.registerCustom({
|
|
4
|
+
isApplicable: (v) => v instanceof Temporal.PlainDate,
|
|
5
|
+
serialize: (v) => v.toJSON(),
|
|
6
|
+
deserialize: (v) => Temporal.PlainDate.from(v),
|
|
7
|
+
}, 'Temporal.PlainDate');
|
|
8
|
+
superjson.registerCustom({
|
|
9
|
+
isApplicable: (v) => v instanceof Temporal.PlainDateTime,
|
|
10
|
+
serialize: (v) => v.toJSON(),
|
|
11
|
+
deserialize: (v) => Temporal.PlainDateTime.from(v),
|
|
12
|
+
}, 'Temporal.PlainDateTime');
|
|
13
|
+
superjson.registerCustom({
|
|
14
|
+
isApplicable: (v) => v instanceof Buffer,
|
|
15
|
+
serialize: (v) => [...v],
|
|
16
|
+
deserialize: (v) => Buffer.from(v),
|
|
17
|
+
}, 'buffer');
|
|
18
|
+
export const transformer = superjson;
|
package/dist/types/client.d.ts
CHANGED
|
@@ -3927,7 +3927,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
3927
3927
|
meta: any;
|
|
3928
3928
|
}>;
|
|
3929
3929
|
draft: import("@trpc/server").TRPCQueryProcedure<{
|
|
3930
|
-
input:
|
|
3930
|
+
input: {
|
|
3931
3931
|
page?: number | undefined;
|
|
3932
3932
|
perPage?: number | undefined;
|
|
3933
3933
|
};
|
|
@@ -4008,7 +4008,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4008
4008
|
meta: any;
|
|
4009
4009
|
}>;
|
|
4010
4010
|
received: import("@trpc/server").TRPCQueryProcedure<{
|
|
4011
|
-
input:
|
|
4011
|
+
input: {
|
|
4012
4012
|
page?: number | undefined;
|
|
4013
4013
|
perPage?: number | undefined;
|
|
4014
4014
|
};
|
|
@@ -4135,7 +4135,7 @@ export declare const createTRPCClient: (opts: CreateTrpcClientOptions) => import
|
|
|
4135
4135
|
meta: any;
|
|
4136
4136
|
}>;
|
|
4137
4137
|
sent: import("@trpc/server").TRPCQueryProcedure<{
|
|
4138
|
-
input:
|
|
4138
|
+
input: {
|
|
4139
4139
|
page?: number | undefined;
|
|
4140
4140
|
perPage?: number | undefined;
|
|
4141
4141
|
};
|
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.65.0-feat-next15.
|
|
5
|
+
"version": "1.65.0-feat-next15.3",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
"typescript": "^5.9.2"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@
|
|
77
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
78
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-next15.7",
|
|
78
79
|
"@trpc/client": "11.5.0",
|
|
79
80
|
"@trpc/server": "11.5.0",
|
|
80
81
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|