mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
feat: Cloud WIP
This commit is contained in:
@@ -2,18 +2,18 @@ import { Resource } from "sst";
|
|||||||
import { defineConfig } from "drizzle-kit";
|
import { defineConfig } from "drizzle-kit";
|
||||||
|
|
||||||
const connection = {
|
const connection = {
|
||||||
user: Resource.Database.username,
|
user: Resource.Database.user,
|
||||||
password: Resource.Database.password,
|
password: Resource.Database.password,
|
||||||
host: Resource.Database.host,
|
host: Resource.Database.host,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
verbose: true,
|
verbose: true,
|
||||||
strict: true,
|
strict: true,
|
||||||
out: "./migrations",
|
out: "./migrations",
|
||||||
dialect: "postgresql",
|
dialect: "postgresql",
|
||||||
dbCredentials: {
|
dbCredentials: {
|
||||||
url: `postgres://${connection.user}:${connection.password}@${connection.host}/nestri`,
|
url: `postgres://${connection.user}:${connection.password}@${connection.host}/nestri`,
|
||||||
},
|
},
|
||||||
schema: "./src/**/*.sql.ts",
|
schema: "./src/**/*.sql.ts",
|
||||||
});
|
});
|
||||||
28
cloud/packages/functions/sst-env.d.ts
vendored
28
cloud/packages/functions/sst-env.d.ts
vendored
@@ -3,7 +3,33 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* deno-fmt-ignore-file */
|
/* deno-fmt-ignore-file */
|
||||||
|
|
||||||
/// <reference path="../../../sst-env.d.ts" />
|
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"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
15
sst-env.d.ts
vendored
15
sst-env.d.ts
vendored
@@ -6,6 +6,14 @@
|
|||||||
import "sst"
|
import "sst"
|
||||||
declare module "sst" {
|
declare module "sst" {
|
||||||
export interface Resource {
|
export interface Resource {
|
||||||
|
"DISCORD_CLIENT_ID": {
|
||||||
|
"type": "sst.sst.Secret"
|
||||||
|
"value": string
|
||||||
|
}
|
||||||
|
"DISCORD_CLIENT_SECRET": {
|
||||||
|
"type": "sst.sst.Secret"
|
||||||
|
"value": string
|
||||||
|
}
|
||||||
"Database": {
|
"Database": {
|
||||||
"host": string
|
"host": string
|
||||||
"name": 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"
|
import "sst"
|
||||||
export {}
|
export {}
|
||||||
Reference in New Issue
Block a user