@rg-dev/stdlib 1.0.47 → 1.0.48
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/lib/common-env.cjs +1 -1
- package/lib/common-env.js +1 -1
- package/lib/trpc-helpers.d.cts +14 -13
- package/lib/trpc-helpers.d.ts +14 -13
- package/package.json +5 -4
package/lib/common-env.cjs
CHANGED
|
@@ -210,7 +210,7 @@ function doSafe(safe, onError) {
|
|
|
210
210
|
try {
|
|
211
211
|
const result = safe();
|
|
212
212
|
if (isPromise(result)) {
|
|
213
|
-
(_a = result["catch"]) == null ? void 0 : _a.call(
|
|
213
|
+
(_a = result == null ? void 0 : result["catch"]) == null ? void 0 : _a.call(
|
|
214
214
|
result,
|
|
215
215
|
(error) => {
|
|
216
216
|
if (error instanceof Error) {
|
package/lib/common-env.js
CHANGED
|
@@ -175,7 +175,7 @@ function doSafe(safe, onError) {
|
|
|
175
175
|
try {
|
|
176
176
|
const result = safe();
|
|
177
177
|
if (isPromise(result)) {
|
|
178
|
-
(_a = result["catch"]) == null ? void 0 : _a.call(
|
|
178
|
+
(_a = result == null ? void 0 : result["catch"]) == null ? void 0 : _a.call(
|
|
179
179
|
result,
|
|
180
180
|
(error) => {
|
|
181
181
|
if (error instanceof Error) {
|
package/lib/trpc-helpers.d.cts
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
+
import * as express from 'express';
|
|
1
2
|
import * as _trpc_server from '@trpc/server';
|
|
2
3
|
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import * as
|
|
4
|
+
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
4
5
|
import * as trpcExpress from '@trpc/server/adapters/express';
|
|
5
6
|
|
|
6
7
|
type TrpcExpressRootType = ReturnType<ReturnType<typeof initTRPC.context<trpcExpress.CreateExpressContextOptions>>['create']>;
|
|
7
8
|
declare class TrpcServerHelpers {
|
|
8
9
|
static createExpressTrpcServer(): {
|
|
9
|
-
_config:
|
|
10
|
+
_config: _trpc_server_unstable_core_do_not_import.RootConfig<{
|
|
10
11
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
11
12
|
meta: object;
|
|
12
|
-
errorShape:
|
|
13
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
13
14
|
transformer: false;
|
|
14
15
|
}>;
|
|
15
|
-
procedure:
|
|
16
|
-
middleware: <$ContextOverrides>(fn:
|
|
17
|
-
router: <TInput extends
|
|
16
|
+
procedure: _trpc_server_unstable_core_do_not_import.ProcedureBuilder<trpcExpress.CreateExpressContextOptions, object, object, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, false>;
|
|
17
|
+
middleware: <$ContextOverrides>(fn: _trpc_server_unstable_core_do_not_import.MiddlewareFunction<trpcExpress.CreateExpressContextOptions, object, object, $ContextOverrides, unknown>) => _trpc_server_unstable_core_do_not_import.MiddlewareBuilder<trpcExpress.CreateExpressContextOptions, object, $ContextOverrides, unknown>;
|
|
18
|
+
router: <TInput extends _trpc_server_unstable_core_do_not_import.CreateRouterOptions>(input: TInput) => _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
18
19
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
19
20
|
meta: object;
|
|
20
|
-
errorShape:
|
|
21
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
21
22
|
transformer: false;
|
|
22
|
-
},
|
|
23
|
-
mergeRouters: typeof
|
|
24
|
-
createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<
|
|
23
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<TInput>>;
|
|
24
|
+
mergeRouters: typeof _trpc_server_unstable_core_do_not_import.mergeRouters;
|
|
25
|
+
createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<_trpc_server_unstable_core_do_not_import.Router<{
|
|
25
26
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
26
27
|
meta: object;
|
|
27
|
-
errorShape:
|
|
28
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
28
29
|
transformer: false;
|
|
29
|
-
}, TRecord>, "_def">) =>
|
|
30
|
+
}, TRecord>, "_def">) => _trpc_server_unstable_core_do_not_import.RouterCaller<{
|
|
30
31
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
31
32
|
meta: object;
|
|
32
|
-
errorShape:
|
|
33
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
33
34
|
transformer: false;
|
|
34
35
|
}, TRecord>;
|
|
35
36
|
};
|
package/lib/trpc-helpers.d.ts
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
|
+
import * as express from 'express';
|
|
1
2
|
import * as _trpc_server from '@trpc/server';
|
|
2
3
|
import { initTRPC } from '@trpc/server';
|
|
3
|
-
import * as
|
|
4
|
+
import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable-core-do-not-import';
|
|
4
5
|
import * as trpcExpress from '@trpc/server/adapters/express';
|
|
5
6
|
|
|
6
7
|
type TrpcExpressRootType = ReturnType<ReturnType<typeof initTRPC.context<trpcExpress.CreateExpressContextOptions>>['create']>;
|
|
7
8
|
declare class TrpcServerHelpers {
|
|
8
9
|
static createExpressTrpcServer(): {
|
|
9
|
-
_config:
|
|
10
|
+
_config: _trpc_server_unstable_core_do_not_import.RootConfig<{
|
|
10
11
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
11
12
|
meta: object;
|
|
12
|
-
errorShape:
|
|
13
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
13
14
|
transformer: false;
|
|
14
15
|
}>;
|
|
15
|
-
procedure:
|
|
16
|
-
middleware: <$ContextOverrides>(fn:
|
|
17
|
-
router: <TInput extends
|
|
16
|
+
procedure: _trpc_server_unstable_core_do_not_import.ProcedureBuilder<trpcExpress.CreateExpressContextOptions, object, object, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, typeof _trpc_server_unstable_core_do_not_import.unsetMarker, false>;
|
|
17
|
+
middleware: <$ContextOverrides>(fn: _trpc_server_unstable_core_do_not_import.MiddlewareFunction<trpcExpress.CreateExpressContextOptions, object, object, $ContextOverrides, unknown>) => _trpc_server_unstable_core_do_not_import.MiddlewareBuilder<trpcExpress.CreateExpressContextOptions, object, $ContextOverrides, unknown>;
|
|
18
|
+
router: <TInput extends _trpc_server_unstable_core_do_not_import.CreateRouterOptions>(input: TInput) => _trpc_server_unstable_core_do_not_import.BuiltRouter<{
|
|
18
19
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
19
20
|
meta: object;
|
|
20
|
-
errorShape:
|
|
21
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
21
22
|
transformer: false;
|
|
22
|
-
},
|
|
23
|
-
mergeRouters: typeof
|
|
24
|
-
createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<
|
|
23
|
+
}, _trpc_server_unstable_core_do_not_import.DecorateCreateRouterOptions<TInput>>;
|
|
24
|
+
mergeRouters: typeof _trpc_server_unstable_core_do_not_import.mergeRouters;
|
|
25
|
+
createCallerFactory: <TRecord extends _trpc_server.RouterRecord>(router: Pick<_trpc_server_unstable_core_do_not_import.Router<{
|
|
25
26
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
26
27
|
meta: object;
|
|
27
|
-
errorShape:
|
|
28
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
28
29
|
transformer: false;
|
|
29
|
-
}, TRecord>, "_def">) =>
|
|
30
|
+
}, TRecord>, "_def">) => _trpc_server_unstable_core_do_not_import.RouterCaller<{
|
|
30
31
|
ctx: trpcExpress.CreateExpressContextOptions;
|
|
31
32
|
meta: object;
|
|
32
|
-
errorShape:
|
|
33
|
+
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
|
|
33
34
|
transformer: false;
|
|
34
35
|
}, TRecord>;
|
|
35
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rg-dev/stdlib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"typesVersions": {
|
|
15
15
|
"*": {
|
|
16
|
-
|
|
16
|
+
"lib/trpc-helpers": [
|
|
17
17
|
"lib/trpc-helpers.d.ts"
|
|
18
18
|
],
|
|
19
19
|
"lib/common-env": [
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"types": "./lib/index.d.cts",
|
|
34
34
|
"type": "module",
|
|
35
35
|
"exports": {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
"./lib/trpc-helpers": {
|
|
37
|
+
"import": "./lib/trpc-helpers.js",
|
|
38
38
|
"require": "./lib/trpc-helpers.cjs",
|
|
39
39
|
"types": "./lib/trpc-helpers.d.ts"
|
|
40
40
|
},
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@trpc/server": "^11.1.1",
|
|
69
69
|
"@types/command-exists": "^1.2.3",
|
|
70
|
+
"@types/express": "^5.0.6",
|
|
70
71
|
"@types/fs-extra": "^11.0.4",
|
|
71
72
|
"@types/node": "^18.19.3",
|
|
72
73
|
"builtin-modules": "^3.3.0",
|