diff --git a/cloud/packages/core/drizzle.config.ts b/cloud/packages/core/drizzle.config.ts index 71ca5803..b3a47934 100644 --- a/cloud/packages/core/drizzle.config.ts +++ b/cloud/packages/core/drizzle.config.ts @@ -2,18 +2,18 @@ import { Resource } from "sst"; import { defineConfig } from "drizzle-kit"; const connection = { - user: Resource.Database.username, - password: Resource.Database.password, - host: Resource.Database.host, + user: Resource.Database.user, + password: Resource.Database.password, + host: Resource.Database.host, }; export default defineConfig({ - verbose: true, - strict: true, - out: "./migrations", - dialect: "postgresql", - dbCredentials: { - url: `postgres://${connection.user}:${connection.password}@${connection.host}/nestri`, - }, - schema: "./src/**/*.sql.ts", -}); \ No newline at end of file + verbose: true, + strict: true, + out: "./migrations", + dialect: "postgresql", + dbCredentials: { + url: `postgres://${connection.user}:${connection.password}@${connection.host}/nestri`, + }, + schema: "./src/**/*.sql.ts", +}); diff --git a/cloud/packages/functions/sst-env.d.ts b/cloud/packages/functions/sst-env.d.ts index 9b9de732..0b9f4b11 100644 --- a/cloud/packages/functions/sst-env.d.ts +++ b/cloud/packages/functions/sst-env.d.ts @@ -3,7 +3,33 @@ /* eslint-disable */ /* deno-fmt-ignore-file */ -/// +import "sst" +declare module "sst" { + export interface Resource { + "DISCORD_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "DISCORD_CLIENT_SECRET": { + "type": "sst.sst.Secret" + "value": string + } + "Database": { + "host": string + "name": string + "password": string + "type": "sst.sst.Linkable" + "user": string + } + } +} +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; +declare module "sst" { + export interface Resource { + "AuthStorage": cloudflare.KVNamespace + } +} import "sst" export {} \ No newline at end of file diff --git a/sst-env.d.ts b/sst-env.d.ts index f2ab5110..0b9f4b11 100644 --- a/sst-env.d.ts +++ b/sst-env.d.ts @@ -6,6 +6,14 @@ import "sst" declare module "sst" { export interface Resource { + "DISCORD_CLIENT_ID": { + "type": "sst.sst.Secret" + "value": string + } + "DISCORD_CLIENT_SECRET": { + "type": "sst.sst.Secret" + "value": string + } "Database": { "host": string "name": string @@ -15,6 +23,13 @@ declare module "sst" { } } } +// cloudflare +import * as cloudflare from "@cloudflare/workers-types"; +declare module "sst" { + export interface Resource { + "AuthStorage": cloudflare.KVNamespace + } +} import "sst" export {} \ No newline at end of file