sst.config.ts 835 B

123456789101112131415161718192021222324252627282930313233
  1. /// <reference path="./.sst/platform/config.d.ts" />
  2. export default $config({
  3. app(input) {
  4. return {
  5. name: "opencode",
  6. removal: input?.stage === "production" ? "retain" : "remove",
  7. protect: ["production"].includes(input?.stage),
  8. home: "cloudflare",
  9. providers: {
  10. stripe: {
  11. version: "0.0.28",
  12. apiKey: process.env.STRIPE_SECRET_KEY!,
  13. },
  14. random: "4.19.2",
  15. planetscale: "0.4.1",
  16. honeycomb: "0.49.0",
  17. },
  18. }
  19. },
  20. async run() {
  21. await import("./infra/app.js")
  22. const { stat } = await import("./infra/console.js")
  23. await import("./infra/enterprise.js")
  24. if ($app.stage === "production" || $app.stage === "vimtor") {
  25. await import("./infra/monitoring.js")
  26. }
  27. return {
  28. StatWorkerUrl: stat.url,
  29. }
  30. },
  31. })