-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.ts
More file actions
55 lines (47 loc) · 1.4 KB
/
settings.ts
File metadata and controls
55 lines (47 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { z } from "zod";
import "dotenv";
export const site = {
name: "TremTec",
title: "TremTec.labs",
subTitle: "Let's code a new world! 🌎",
description: "TremTec Labs",
keywords: "TremTec,software,learning,projects",
repository: "https://github.com/tremtec/labs",
};
export type NavLink = {
name: string;
link: string;
alt?: string;
};
export const privateNavLinks: NavLink[] = [
{ link: "/app", name: "Dashboard" },
{ link: "/app/chat", name: "Chat" },
];
const VarEnvSchema = z.object({
GITHUB_CLIENT_ID: z.string(),
GITHUB_CLIENT_SECRET: z.string(),
});
// validate if var envs are processed
const env = VarEnvSchema.parse(Deno.env.toObject());
export const github = {
clientId: env.GITHUB_CLIENT_ID,
clientSecret: env.GITHUB_CLIENT_SECRET,
callbackUrl: "/api/auth/github/callback",
refreshUrl: "/api/auth/github/refresh",
logoutUrl: "/api/auth/logout",
signInUrl: "/api/auth/github",
dashboardUrl: "/app",
scope: "read:user" as const,
};
const RAW_REPO = "https://raw.githubusercontent.com/tremtec/labs/main";
export const INSTALL_CMD = `#! /bin/bash
# deno does not allow remote config yet: https://github.com/denoland/deno/issues/13488
# deno install --unstable --allow-env -c ${RAW_REPO}/deno.json -f ${RAW_REPO}/cli/tt.ts
# workaround
cd /tmp/
git clone https://github.com/tremtec/labs.git
cd labs
deno task compile:cli
mv tt $HOME/.local/bin/
rm -rf /tmp/labs/
`;