{
  "slug": "resend-mail",
  "runtimes": {
    "node": {
      "frameworks": {
        "express": {
          "dependencies": {
            "runtime": [
              "resend"
            ],
            "dev": []
          },
          "env": [
            "RESEND_API_KEY"
          ],
          "architectures": {
            "mvc": {
              "files": [
                {
                  "type": "file",
                  "path": "src/configs/resend.ts",
                  "content": "import { Resend } from \"resend\";\r\nimport env from \"./env\";\r\n\r\nexport const resend = new Resend(env.RESEND_API_KEY);\r\n\r\n/**\r\n *? USAGE: \r\n  export async function sendEmail({\r\n  from,\r\n  email,\r\n  subject,\r\n  html\r\n}: sendMail) {\r\n \r\n  return await resend.emails.send({\r\n      from: from || `<${env.EMAIL_FROM}>`,\r\n      to: email,\r\n      subject,\r\n      replyTo: email,\r\n      html\r\n    });\r\n}\r\n */\r\n"
                },
                {
                  "type": "file",
                  "path": "src/configs/env.ts",
                  "content": "import \"dotenv-flow/config\";\r\nimport { z } from \"zod\";\r\n\r\nexport const envSchema = z.object({\r\n  RESEND_API_KEY: z.string()\r\n});\r\n\r\nexport type Env = z.infer<typeof envSchema>;\r\n\r\nconst result = envSchema.safeParse(process.env);\r\n\r\nif (!result.success) {\r\n  console.error(\"❌ Invalid environment configuration\");\r\n  console.error(z.prettifyError(result.error));\r\n  process.exit(1);\r\n}\r\n\r\nexport const env: Readonly<Env> = Object.freeze(result.data);\r\n\r\nexport default env;\r\n"
                }
              ]
            },
            "feature": {
              "files": [
                {
                  "type": "file",
                  "path": "src/shared/configs/resend.ts",
                  "content": "import { Resend } from \"resend\";\r\nimport env from \"./env\";\r\n\r\nexport const resend = new Resend(env.RESEND_API_KEY);\r\n\r\n/**\r\n *? USAGE: \r\n  export async function sendEmail({\r\n  from,\r\n  email,\r\n  subject,\r\n  html\r\n}: sendMail) {\r\n \r\n  return await resend.emails.send({\r\n      from: from || `<${env.EMAIL_FROM}>`,\r\n      to: email,\r\n      subject,\r\n      replyTo: email,\r\n      html\r\n    });\r\n}\r\n */\r\n"
                },
                {
                  "type": "file",
                  "path": "src/shared/configs/env.ts",
                  "content": "import \"dotenv-flow/config\";\r\nimport { z } from \"zod\";\r\n\r\nexport const envSchema = z.object({\r\n  RESEND_API_KEY: z.string()\r\n});\r\n\r\nexport type Env = z.infer<typeof envSchema>;\r\n\r\nconst result = envSchema.safeParse(process.env);\r\n\r\nif (!result.success) {\r\n  console.error(\"❌ Invalid environment configuration\");\r\n  console.error(z.prettifyError(result.error));\r\n  process.exit(1);\r\n}\r\n\r\nexport const env: Readonly<Env> = Object.freeze(result.data);\r\n\r\nexport default env;\r\n"
                }
              ]
            }
          }
        }
      }
    }
  }
}
