eddev 0.2.0-beta.8 → 0.2.0-beta.9
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.
|
@@ -247,16 +247,21 @@ function getWebpackConfig(opts) {
|
|
|
247
247
|
manifestLoaders = [];
|
|
248
248
|
// Views
|
|
249
249
|
ALIAS["@manifest/views"] = path_1.default.resolve(opts.baseDirectory, "_view_manifest.js");
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
250
|
+
if (opts.isAdmin) {
|
|
251
|
+
writeVirtualModule(ALIAS["@manifest/views"], "export default {}");
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
manifestLoaders.push((0, manifest_views_1.createViewManifestGenerator)({
|
|
255
|
+
baseDirectory: opts.baseDirectory,
|
|
256
|
+
isAdmin: false,
|
|
257
|
+
isDev: isDev,
|
|
258
|
+
isServerless: isServerless,
|
|
259
|
+
watch: isDev,
|
|
260
|
+
onGenerate: function (manifest) {
|
|
261
|
+
writeVirtualModule(ALIAS["@manifest/views"], manifest);
|
|
262
|
+
},
|
|
263
|
+
}));
|
|
264
|
+
}
|
|
260
265
|
// Field manifest
|
|
261
266
|
ALIAS["@manifest/fields"] = path_1.default.resolve(opts.baseDirectory, "_fields_manifest.js");
|
|
262
267
|
if (opts.isAdmin) {
|
package/package.json
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
export declare function createRPCClient():
|
|
1
|
+
export declare function createRPCClient(): {
|
|
2
|
+
Provider: ({ client, queryClient, children, isPrepass, ssrContext, }: {
|
|
3
|
+
queryClient: QueryClient;
|
|
4
|
+
client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
|
|
5
|
+
children: import("react").ReactNode;
|
|
6
|
+
isPrepass?: boolean | undefined;
|
|
7
|
+
ssrContext?: unknown;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
createClient: (opts: import("@trpc/react").CreateTRPCClientOptions<import("@trpc/server").AnyRouter<any>>) => import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>;
|
|
10
|
+
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) => UseQueryResult<{ [TPath_1 in keyof TRouter["_def"]["queries"]]: {
|
|
12
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["queries"][TPath_1]>;
|
|
13
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["queries"][TPath_1]["call"]>>;
|
|
14
|
+
}; }[TPath_2]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>>;
|
|
15
|
+
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"]]: {
|
|
16
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["mutations"][TPath_3]>;
|
|
17
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["mutations"][TPath_3]["call"]>>;
|
|
18
|
+
}; }[TPath_1_1]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>, { [TPath_3 in keyof TRouter["_def"]["mutations"]]: {
|
|
19
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["mutations"][TPath_3]>;
|
|
20
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["mutations"][TPath_3]["call"]>>;
|
|
21
|
+
}; }[TPath_1_1]["input"], unknown>;
|
|
22
|
+
useSubscription: <TPath_2 extends string, TOutput extends any>(pathAndInput: [TPath_2, (null | undefined)?], opts: {
|
|
23
|
+
enabled?: boolean | undefined;
|
|
24
|
+
onError?: ((err: import("@trpc/react").TRPCClientErrorLike<import("@trpc/server").AnyRouter<any>>) => void) | undefined;
|
|
25
|
+
onNext: (data: TOutput) => void;
|
|
26
|
+
}) => void;
|
|
27
|
+
useDehydratedState: (client: import("@trpc/react").TRPCClient<import("@trpc/server").AnyRouter<any>>, trpcState: any) => any;
|
|
28
|
+
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"]]: {
|
|
29
|
+
input: import("@trpc/server").inferProcedureInput<TRouter["_def"]["queries"][TPath_1]>;
|
|
30
|
+
output: import("@trpc/server").ThenArg<ReturnType<TRouter["_def"]["queries"][TPath_1]["call"]>>;
|
|
31
|
+
}; }[TPath_3_1]["output"], import("@trpc/react").TRPCClientErrorLike<TRouter>>;
|
|
32
|
+
};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.createRPCClient = void 0;
|
|
4
15
|
var react_1 = require("@trpc/react");
|
|
5
16
|
function createRPCClient() {
|
|
6
|
-
var
|
|
17
|
+
var trpc = (0, react_1.createReactQueryHooks)();
|
|
18
|
+
return __assign({}, trpc);
|
|
7
19
|
}
|
|
8
20
|
exports.createRPCClient = createRPCClient;
|