@vitnode/blog 1.2.0-canary.51 → 1.2.0-canary.52

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.
@@ -84,5 +84,33 @@ export declare const categoriesModule: import("@vitnode/core/api/lib/module").Bu
84
84
  } & {
85
85
  getRoutingPath: () => "/";
86
86
  };
87
+ }, {
88
+ handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global.middleware").EnvVitNode, "/test", {}>) => Promise<Response & import("hono").TypedResponse<"test", 201 | 200, "text">>;
89
+ pluginId: "@vitnode/blog";
90
+ route: {
91
+ method: "post";
92
+ description: string;
93
+ path: "/test";
94
+ responses: {
95
+ 200: {
96
+ content: {
97
+ 'text/plain': {
98
+ schema: import("zod").ZodString;
99
+ };
100
+ };
101
+ description: string;
102
+ };
103
+ 201: {
104
+ content: {
105
+ 'text/plain': {
106
+ schema: import("zod").ZodString;
107
+ };
108
+ };
109
+ description: string;
110
+ };
111
+ };
112
+ } & {
113
+ getRoutingPath: () => "/test";
114
+ };
87
115
  }], import("@vitnode/core/api/lib/module").BaseBuildModuleReturn<"@vitnode/blog", string, import("@vitnode/core/api/lib/route").Route<"@vitnode/blog", import("@hono/zod-openapi").RouteConfig, import("@hono/zod-openapi").RouteHandler<import("@hono/zod-openapi").RouteConfig>>[]>[]>;
88
116
  //# sourceMappingURL=categories.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"categories.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/categories/categories.module.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wRAI3B,CAAC"}
1
+ {"version":3,"file":"categories.module.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/categories/categories.module.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wRAI3B,CAAC"}
@@ -1 +1 @@
1
- import{buildModule}from"@vitnode/core/api/lib/module";import{CONFIG_PLUGIN}from"../../../const.js";import{categoriesRoute}from"./routes/get.route.js";export const categoriesModule=buildModule({...CONFIG_PLUGIN,name:"categories",routes:[categoriesRoute]});
1
+ import{buildModule}from"@vitnode/core/api/lib/module";import{CONFIG_PLUGIN}from"../../../const.js";import{categoriesRoute}from"./routes/get.route.js";import{testRoute}from"./test.route.js";export const categoriesModule=buildModule({...CONFIG_PLUGIN,name:"categories",routes:[categoriesRoute,testRoute]});
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ export declare const testRoute: {
3
+ handler: (c: import("hono").Context<import("@vitnode/core/api/middlewares/global.middleware").EnvVitNode, "/test", {}>) => Promise<Response & import("hono").TypedResponse<"test", 201 | 200, "text">>;
4
+ pluginId: "@vitnode/blog";
5
+ route: {
6
+ method: "post";
7
+ description: string;
8
+ path: "/test";
9
+ responses: {
10
+ 200: {
11
+ content: {
12
+ 'text/plain': {
13
+ schema: z.ZodString;
14
+ };
15
+ };
16
+ description: string;
17
+ };
18
+ 201: {
19
+ content: {
20
+ 'text/plain': {
21
+ schema: z.ZodString;
22
+ };
23
+ };
24
+ description: string;
25
+ };
26
+ };
27
+ } & {
28
+ getRoutingPath: () => "/test";
29
+ };
30
+ };
31
+ //# sourceMappingURL=test.route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.route.d.ts","sourceRoot":"","sources":["../../../../../src/api/modules/categories/test.route.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CpB,CAAC"}
@@ -0,0 +1 @@
1
+ import{buildRoute}from"@vitnode/core/api/lib/route";import{UserModel}from"@vitnode/core/api/models/user";import{z}from"zod";import{CONFIG_PLUGIN}from"../../../const.js";import TestTemplateEmail from"../../../emails/test-template.js";export const testRoute=buildRoute({...CONFIG_PLUGIN,route:{method:"post",description:"Test route",path:"/test",responses:{200:{content:{"text/plain":{schema:z.string()}},description:"User"},201:{content:{"text/plain":{schema:z.string()}},description:"User"}}},handler:async c=>{const user=await new UserModel().getUserById({id:3,c});if(!user)throw new Error("User not found");await c.get("email").send({subject:"Test Email",content:TestTemplateEmail,user});await c.get("log").warn("This is a test warn log");return c.text("test")}});
@@ -0,0 +1,23 @@
1
+ import { type DefaultTemplateEmailProps } from '@vitnode/core/emails/default-template';
2
+ declare function TestTemplateEmail({ user, ...props }: DefaultTemplateEmailProps): import("react/jsx-runtime").JSX.Element | null;
3
+ declare namespace TestTemplateEmail {
4
+ var PreviewProps: {
5
+ children: string;
6
+ templateProps: {
7
+ metadata: {
8
+ title: string;
9
+ shortTitle: string;
10
+ url: string;
11
+ };
12
+ logo: {
13
+ src: string;
14
+ };
15
+ };
16
+ i18n: {
17
+ messages: {};
18
+ locale: string;
19
+ };
20
+ };
21
+ }
22
+ export default TestTemplateEmail;
23
+ //# sourceMappingURL=test-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-template.d.ts","sourceRoot":"","sources":["../../../src/emails/test-template.tsx"],"names":[],"mappings":"AACA,OAA6B,EAC3B,KAAK,yBAAyB,EAC/B,MAAM,uCAAuC,CAAC;AAE/C,iBAAwB,iBAAiB,CAAC,EACxC,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,yBAAyB,kDAQ3B;kBAXuB,iBAAiB;;;;;;;;;;;;;;;;;;;eAAjB,iBAAiB"}
@@ -0,0 +1 @@
1
+ import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Text}from"@react-email/components";import DefaultTemplateEmail from"@vitnode/core/emails/default-template";export default function TestTemplateEmail({user,...props}){if(!user)return null;return _jsx(DefaultTemplateEmail,{...props,children:_jsxs(Text,{children:["This message is for ",user.name]})})}TestTemplateEmail.PreviewProps=DefaultTemplateEmail.PreviewProps;