@stryke/prisma-trpc-generator 0.10.1 → 0.10.2
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/generator.cjs +5 -4
- package/dist/generator.js +5 -4
- package/dist/index.cjs +5 -4
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/generator.cjs
CHANGED
|
@@ -7671,13 +7671,13 @@ async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
|
7671
7671
|
sourceFile.addStatements(
|
|
7672
7672
|
/* ts */
|
|
7673
7673
|
`
|
|
7674
|
-
import
|
|
7674
|
+
import middleware from '${relativePath(outputDir, joinPaths(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
7675
7675
|
`
|
|
7676
7676
|
);
|
|
7677
7677
|
sourceFile.addStatements(
|
|
7678
7678
|
/* ts */
|
|
7679
7679
|
`
|
|
7680
|
-
export const globalMiddleware = t.middleware(
|
|
7680
|
+
export const globalMiddleware = t.middleware(middleware);`
|
|
7681
7681
|
);
|
|
7682
7682
|
middlewares.push({
|
|
7683
7683
|
type: "global",
|
|
@@ -11722,8 +11722,9 @@ ${JSON.stringify(config)}`);
|
|
|
11722
11722
|
appRouter.addStatements(
|
|
11723
11723
|
/* ts */
|
|
11724
11724
|
`
|
|
11725
|
-
|
|
11726
|
-
|
|
11725
|
+
export const appRouter = t.router({${routerStatements.join()}});
|
|
11726
|
+
|
|
11727
|
+
export type AppRouter = typeof appRouter;`
|
|
11727
11728
|
);
|
|
11728
11729
|
appRouter.formatText({
|
|
11729
11730
|
indentSize: 2
|
package/dist/generator.js
CHANGED
|
@@ -7676,13 +7676,13 @@ async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
|
7676
7676
|
sourceFile.addStatements(
|
|
7677
7677
|
/* ts */
|
|
7678
7678
|
`
|
|
7679
|
-
import
|
|
7679
|
+
import middleware from '${relativePath(outputDir, joinPaths(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
7680
7680
|
`
|
|
7681
7681
|
);
|
|
7682
7682
|
sourceFile.addStatements(
|
|
7683
7683
|
/* ts */
|
|
7684
7684
|
`
|
|
7685
|
-
export const globalMiddleware = t.middleware(
|
|
7685
|
+
export const globalMiddleware = t.middleware(middleware);`
|
|
7686
7686
|
);
|
|
7687
7687
|
middlewares.push({
|
|
7688
7688
|
type: "global",
|
|
@@ -11727,8 +11727,9 @@ ${JSON.stringify(config)}`);
|
|
|
11727
11727
|
appRouter.addStatements(
|
|
11728
11728
|
/* ts */
|
|
11729
11729
|
`
|
|
11730
|
-
|
|
11731
|
-
|
|
11730
|
+
export const appRouter = t.router({${routerStatements.join()}});
|
|
11731
|
+
|
|
11732
|
+
export type AppRouter = typeof appRouter;`
|
|
11732
11733
|
);
|
|
11733
11734
|
appRouter.formatText({
|
|
11734
11735
|
indentSize: 2
|
package/dist/index.cjs
CHANGED
|
@@ -7667,13 +7667,13 @@ async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
|
7667
7667
|
sourceFile.addStatements(
|
|
7668
7668
|
/* ts */
|
|
7669
7669
|
`
|
|
7670
|
-
import
|
|
7670
|
+
import middleware from '${relativePath(outputDir, joinPaths(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
7671
7671
|
`
|
|
7672
7672
|
);
|
|
7673
7673
|
sourceFile.addStatements(
|
|
7674
7674
|
/* ts */
|
|
7675
7675
|
`
|
|
7676
|
-
export const globalMiddleware = t.middleware(
|
|
7676
|
+
export const globalMiddleware = t.middleware(middleware);`
|
|
7677
7677
|
);
|
|
7678
7678
|
middlewares.push({
|
|
7679
7679
|
type: "global",
|
|
@@ -11718,8 +11718,9 @@ ${JSON.stringify(config)}`);
|
|
|
11718
11718
|
appRouter.addStatements(
|
|
11719
11719
|
/* ts */
|
|
11720
11720
|
`
|
|
11721
|
-
|
|
11722
|
-
|
|
11721
|
+
export const appRouter = t.router({${routerStatements.join()}});
|
|
11722
|
+
|
|
11723
|
+
export type AppRouter = typeof appRouter;`
|
|
11723
11724
|
);
|
|
11724
11725
|
appRouter.formatText({
|
|
11725
11726
|
indentSize: 2
|
package/dist/index.js
CHANGED
|
@@ -7672,13 +7672,13 @@ async function generateTRPCExports(sourceFile, config, options, outputDir) {
|
|
|
7672
7672
|
sourceFile.addStatements(
|
|
7673
7673
|
/* ts */
|
|
7674
7674
|
`
|
|
7675
|
-
import
|
|
7675
|
+
import middleware from '${relativePath(outputDir, joinPaths(outputDir, typeof config.withMiddleware === "string" ? config.withMiddleware : "middleware"))}';
|
|
7676
7676
|
`
|
|
7677
7677
|
);
|
|
7678
7678
|
sourceFile.addStatements(
|
|
7679
7679
|
/* ts */
|
|
7680
7680
|
`
|
|
7681
|
-
export const globalMiddleware = t.middleware(
|
|
7681
|
+
export const globalMiddleware = t.middleware(middleware);`
|
|
7682
7682
|
);
|
|
7683
7683
|
middlewares.push({
|
|
7684
7684
|
type: "global",
|
|
@@ -11723,8 +11723,9 @@ ${JSON.stringify(config)}`);
|
|
|
11723
11723
|
appRouter.addStatements(
|
|
11724
11724
|
/* ts */
|
|
11725
11725
|
`
|
|
11726
|
-
|
|
11727
|
-
|
|
11726
|
+
export const appRouter = t.router({${routerStatements.join()}});
|
|
11727
|
+
|
|
11728
|
+
export type AppRouter = typeof appRouter;`
|
|
11728
11729
|
);
|
|
11729
11730
|
appRouter.formatText({
|
|
11730
11731
|
indentSize: 2
|