eddev 0.2.0-beta.38 → 0.2.0-beta.39
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/build/get-webpack-config.js +1 -0
- package/build/workers/codegen-worker-script.js +0 -3
- package/entry/entry.serverless.dev.d.ts +0 -0
- package/entry/entry.serverless.dev.js +2 -0
- package/package.json +1 -1
- package/serverless/create-rpc-client.d.ts +18 -5
- package/hooks/rpc-client.d.ts +0 -3
- package/hooks/rpc-client.js +0 -15
- package/serverless/rpc-client.d.ts +0 -3
- package/serverless/rpc-client.js +0 -15
|
@@ -130,6 +130,7 @@ function getWebpackConfig(opts) {
|
|
|
130
130
|
ALIAS["@views"] = path_1.default.join(opts.baseDirectory, "views");
|
|
131
131
|
ALIAS["@hooks"] = path_1.default.join(opts.baseDirectory, "hooks");
|
|
132
132
|
ALIAS["@queries"] = path_1.default.join(opts.baseDirectory, "hooks/queries");
|
|
133
|
+
ALIAS["@utils"] = path_1.default.join(opts.baseDirectory, "utils");
|
|
133
134
|
RULES.push({
|
|
134
135
|
test: /\.[jt]sx?$/,
|
|
135
136
|
exclude: /node_modules/,
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare function createRPCClient(): {
|
|
2
3
|
Provider: ({ client, queryClient, children, isPrepass, ssrContext, }: {
|
|
3
|
-
queryClient:
|
|
4
|
+
queryClient: QueryClient;
|
|
4
5
|
client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
|
|
5
6
|
children: import("react").ReactNode;
|
|
6
7
|
isPrepass?: boolean | undefined;
|
|
@@ -8,13 +9,25 @@ export declare function createRPCClient(): {
|
|
|
8
9
|
}) => JSX.Element;
|
|
9
10
|
createClient: (opts: import("@trpc/react").CreateTRPCClientOptions<import("@trpc/server").AnyRouter<any>>) => import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
|
|
10
11
|
useContext: () => import("@trpc/react/dist/declarations/src/internals/context").TRPCContextState<import("@trpc/server").AnyRouter<any>, unknown>;
|
|
11
|
-
useQuery: <TPath extends string>(pathAndInput: [TPath, (null | undefined)?], opts?: import("@trpc/react").UseTRPCQueryOptions<TPath, unknown, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) =>
|
|
12
|
-
|
|
12
|
+
useQuery: <TPath extends string>(pathAndInput: [TPath, (null | undefined)?], opts?: import("@trpc/react").UseTRPCQueryOptions<TPath, unknown, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) => UseQueryResult<{ [TPath_1 in keyof TRouter["_def"]["queries"]]: {
|
|
13
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["queries"][TPath_1]>;
|
|
14
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["queries"][TPath_1]["call"]>>;
|
|
15
|
+
}; }[TPath_2]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>>;
|
|
16
|
+
useMutation: <TPath_1 extends string>(path: TPath_1 | [TPath_1], opts?: import("@trpc/react").UseTRPCMutationOptions<unknown, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>, any> | undefined) => UseMutationResult<{ [TPath_3 in keyof TRouter["_def"]["mutations"]]: {
|
|
17
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["mutations"][TPath_3]>;
|
|
18
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["mutations"][TPath_3]["call"]>>;
|
|
19
|
+
}; }[TPath_1_1]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>, { [TPath_3 in keyof TRouter["_def"]["mutations"]]: {
|
|
20
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["mutations"][TPath_3]>;
|
|
21
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["mutations"][TPath_3]["call"]>>;
|
|
22
|
+
}; }[TPath_1_1]["input"], unknown>;
|
|
13
23
|
useSubscription: <TPath_2 extends string, TOutput extends any>(pathAndInput: [TPath_2, (null | undefined)?], opts: {
|
|
14
24
|
enabled?: boolean | undefined;
|
|
15
25
|
onError?: ((err: import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>) => void) | undefined;
|
|
16
26
|
onNext: (data: TOutput) => void;
|
|
17
27
|
}) => void;
|
|
18
|
-
useDehydratedState: (client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>, trpcState:
|
|
19
|
-
useInfiniteQuery: <TPath_3 extends never>(pathAndInput: [path: TPath_3, input: Omit<unknown, "cursor">], opts?: import("@trpc/react").UseTRPCInfiniteQueryOptions<TPath_3, Omit<unknown, "cursor">, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) =>
|
|
28
|
+
useDehydratedState: (client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>, trpcState: any) => any;
|
|
29
|
+
useInfiniteQuery: <TPath_3 extends never>(pathAndInput: [path: TPath_3, input: Omit<unknown, "cursor">], opts?: import("@trpc/react").UseTRPCInfiniteQueryOptions<TPath_3, Omit<unknown, "cursor">, any, import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>> | undefined) => UseInfiniteQueryResult<{ [TPath_1 in keyof TRouter["_def"]["queries"]]: {
|
|
30
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["queries"][TPath_1]>;
|
|
31
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["queries"][TPath_1]["call"]>>;
|
|
32
|
+
}; }[TPath_3_1]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>>;
|
|
20
33
|
};
|
package/hooks/rpc-client.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const useRPCQuery: <TPath extends string>(pathAndInput: [TPath, (null | undefined)?], opts?: import("@trpc/react").UseTRPCQueryOptions<TPath, RPCRouter, RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>> | undefined) => import("react-query").UseQueryResult<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>>;
|
|
2
|
-
export declare const useRPCMutation: <TPath_1 extends string>(path: TPath_1 | [TPath_1], opts?: import("@trpc/react").UseTRPCMutationOptions<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>, RPCRouter> | undefined) => import("react-query").UseMutationResult<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>, RPCRouter, unknown>;
|
|
3
|
-
export declare const rpcClient: import("@trpc/react").TRPCClient<RPCRouter>;
|
package/hooks/rpc-client.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rpcClient = exports.useRPCMutation = exports.useRPCQuery = void 0;
|
|
4
|
-
var react_1 = require("@trpc/react");
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
var _a = (0, react_1.createReactQueryHooks)({
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
url: process.serverlessEndpoint + "/api/trpc",
|
|
9
|
-
}), useQuery = _a.useQuery, useMutation = _a.useMutation, createClient = _a.createClient;
|
|
10
|
-
exports.useRPCQuery = useQuery;
|
|
11
|
-
exports.useRPCMutation = useMutation;
|
|
12
|
-
exports.rpcClient = createClient({
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
url: process.serverlessEndpoint + "/api/trpc",
|
|
15
|
-
});
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const useRPCQuery: <TPath extends string>(pathAndInput: [TPath, (null | undefined)?], opts?: import("@trpc/react").UseTRPCQueryOptions<TPath, RPCRouter, RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>> | undefined) => import("react-query").UseQueryResult<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>>;
|
|
2
|
-
export declare const useRPCMutation: <TPath_1 extends string>(path: TPath_1 | [TPath_1], opts?: import("@trpc/react").UseTRPCMutationOptions<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>, RPCRouter> | undefined) => import("react-query").UseMutationResult<RPCRouter, import("@trpc/react").TRPCClientErrorLike<RPCRouter>, RPCRouter, unknown>;
|
|
3
|
-
export declare const rpcClient: import("@trpc/react").TRPCClient<RPCRouter>;
|
package/serverless/rpc-client.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rpcClient = exports.useRPCMutation = exports.useRPCQuery = void 0;
|
|
4
|
-
var react_1 = require("@trpc/react");
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
var _a = (0, react_1.createReactQueryHooks)({
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
url: process.serverlessEndpoint + "/api/trpc",
|
|
9
|
-
}), useQuery = _a.useQuery, useMutation = _a.useMutation, createClient = _a.createClient;
|
|
10
|
-
exports.useRPCQuery = useQuery;
|
|
11
|
-
exports.useRPCMutation = useMutation;
|
|
12
|
-
exports.rpcClient = createClient({
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
url: process.serverlessEndpoint + "/api/trpc",
|
|
15
|
-
});
|