public commit

This commit is contained in:
dswbx
2024-11-16 12:01:47 +01:00
commit 90f80c4280
582 changed files with 49291 additions and 0 deletions

27
app/src/core/env.ts Normal file
View File

@@ -0,0 +1,27 @@
type TURSO_DB = {
url: string;
authToken: string;
};
export type Env = {
__STATIC_CONTENT: Fetcher;
ENVIRONMENT: string;
CACHE: KVNamespace;
// db
DB_DATA: TURSO_DB;
DB_SCHEMA: TURSO_DB;
// storage
STORAGE: { access_key: string; secret_access_key: string; url: string };
BUCKET: R2Bucket;
};
export function isDebug(): boolean {
try {
// @ts-expect-error - this is a global variable in dev
return __isDev === "1" || __isDev === 1;
} catch (e) {
return false;
}
}