@secrecy/lib 1.41.0-feat-remove-me-domain.4 → 1.41.0-feat-remove-me-domain.6
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 +8 -2
- package/dist/types/client.d.ts +25 -12
- package/package.json +2 -2
package/dist/lib/client.js
CHANGED
|
@@ -9,6 +9,13 @@ superjson.registerCustom({
|
|
|
9
9
|
serialize: (v) => [...v],
|
|
10
10
|
deserialize: (v) => Buffer.from(v),
|
|
11
11
|
}, 'buffer');
|
|
12
|
+
export const getUrl = () => {
|
|
13
|
+
const protocol = process.env.NEXT_PUBLIC_VERCEL_ENV !== 'development' ? 'https' : 'http';
|
|
14
|
+
const url = process.env.NEXT_PUBLIC_VERCEL_ENV !== 'production'
|
|
15
|
+
? `${process.env.NEXT_PUBLIC_VERCEL_URL}/api/trpc`
|
|
16
|
+
: `api.secrecy.tech/trpc`;
|
|
17
|
+
return `${protocol}://${url}`;
|
|
18
|
+
};
|
|
12
19
|
export const createTRPCClient = (session, onAccessDenied) => createTRPCProxyClient({
|
|
13
20
|
transformer: superjson,
|
|
14
21
|
links: [
|
|
@@ -24,8 +31,7 @@ export const createTRPCClient = (session, onAccessDenied) => createTRPCProxyClie
|
|
|
24
31
|
},
|
|
25
32
|
}),
|
|
26
33
|
httpBatchLink({
|
|
27
|
-
url:
|
|
28
|
-
'https://api.secrecy.tech/',
|
|
34
|
+
url: getUrl(),
|
|
29
35
|
maxURLLength: 2083,
|
|
30
36
|
fetch: async (input, init) => {
|
|
31
37
|
const controller = new AbortController();
|
package/dist/types/client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import superjson from 'superjson';
|
|
|
5
5
|
export type RouterInputs = inferRouterInputs<AppRouter>;
|
|
6
6
|
export type RouterOutputs = inferRouterOutputs<AppRouter>;
|
|
7
7
|
export declare function isTRPCClientError(cause: unknown): cause is TRPCClientError<AppRouter>;
|
|
8
|
+
export declare const getUrl: () => string;
|
|
8
9
|
export declare const createTRPCClient: (session?: string | null | undefined, onAccessDenied?: () => void | Promise<void>) => {
|
|
9
10
|
account: {
|
|
10
11
|
createUser: {
|
|
@@ -11231,9 +11232,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11231
11232
|
};
|
|
11232
11233
|
id: string;
|
|
11233
11234
|
createdAt: Date;
|
|
11234
|
-
users: {
|
|
11235
|
-
userId: string;
|
|
11236
|
-
}[];
|
|
11237
11235
|
ownerId: string;
|
|
11238
11236
|
blocked: boolean;
|
|
11239
11237
|
name: string;
|
|
@@ -11249,6 +11247,12 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11249
11247
|
id: string;
|
|
11250
11248
|
} | null;
|
|
11251
11249
|
};
|
|
11250
|
+
developers: {
|
|
11251
|
+
id: string;
|
|
11252
|
+
lastname: string;
|
|
11253
|
+
firstname: string;
|
|
11254
|
+
}[];
|
|
11255
|
+
usersCount: number;
|
|
11252
11256
|
};
|
|
11253
11257
|
_output_out: {
|
|
11254
11258
|
plan: {
|
|
@@ -11282,9 +11286,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11282
11286
|
};
|
|
11283
11287
|
id: string;
|
|
11284
11288
|
createdAt: Date;
|
|
11285
|
-
users: {
|
|
11286
|
-
userId: string;
|
|
11287
|
-
}[];
|
|
11288
11289
|
ownerId: string;
|
|
11289
11290
|
blocked: boolean;
|
|
11290
11291
|
name: string;
|
|
@@ -11300,6 +11301,12 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11300
11301
|
id: string;
|
|
11301
11302
|
} | null;
|
|
11302
11303
|
};
|
|
11304
|
+
developers: {
|
|
11305
|
+
id: string;
|
|
11306
|
+
lastname: string;
|
|
11307
|
+
firstname: string;
|
|
11308
|
+
}[];
|
|
11309
|
+
usersCount: number;
|
|
11303
11310
|
};
|
|
11304
11311
|
}, unknown>>;
|
|
11305
11312
|
};
|
|
@@ -11365,9 +11372,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11365
11372
|
};
|
|
11366
11373
|
id: string;
|
|
11367
11374
|
createdAt: Date;
|
|
11368
|
-
users: {
|
|
11369
|
-
userId: string;
|
|
11370
|
-
}[];
|
|
11371
11375
|
ownerId: string;
|
|
11372
11376
|
blocked: boolean;
|
|
11373
11377
|
name: string;
|
|
@@ -11383,6 +11387,12 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11383
11387
|
id: string;
|
|
11384
11388
|
} | null;
|
|
11385
11389
|
};
|
|
11390
|
+
developers: {
|
|
11391
|
+
id: string;
|
|
11392
|
+
lastname: string;
|
|
11393
|
+
firstname: string;
|
|
11394
|
+
}[];
|
|
11395
|
+
usersCount: number;
|
|
11386
11396
|
}[];
|
|
11387
11397
|
_output_out: {
|
|
11388
11398
|
plan: {
|
|
@@ -11416,9 +11426,6 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11416
11426
|
};
|
|
11417
11427
|
id: string;
|
|
11418
11428
|
createdAt: Date;
|
|
11419
|
-
users: {
|
|
11420
|
-
userId: string;
|
|
11421
|
-
}[];
|
|
11422
11429
|
ownerId: string;
|
|
11423
11430
|
blocked: boolean;
|
|
11424
11431
|
name: string;
|
|
@@ -11434,6 +11441,12 @@ export declare const createTRPCClient: (session?: string | null | undefined, onA
|
|
|
11434
11441
|
id: string;
|
|
11435
11442
|
} | null;
|
|
11436
11443
|
};
|
|
11444
|
+
developers: {
|
|
11445
|
+
id: string;
|
|
11446
|
+
lastname: string;
|
|
11447
|
+
firstname: string;
|
|
11448
|
+
}[];
|
|
11449
|
+
usersCount: number;
|
|
11437
11450
|
}[];
|
|
11438
11451
|
}, unknown>>;
|
|
11439
11452
|
};
|
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.41.0-feat-remove-me-domain.
|
|
5
|
+
"version": "1.41.0-feat-remove-me-domain.6",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/anonymize-org/lib.git"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@secrecy/lib-utils": "^1.0.18",
|
|
77
|
-
"@secrecy/trpc-api-types": "1.33.0-feat-remove-me-domain.
|
|
77
|
+
"@secrecy/trpc-api-types": "1.33.0-feat-remove-me-domain.9",
|
|
78
78
|
"@trpc/client": "10.45.2",
|
|
79
79
|
"@trpc/server": "10.45.2",
|
|
80
80
|
"@types/libsodium-wrappers-sumo": "^0.7.8",
|