1// Fetch project files from the backend
2export async function fetchProjectFiles(
3 { bearerToken, projectId, branchId }: { bearerToken: string; projectId: string; branchId?: string },
4) {
6}
7
8export function ApiKeyWarning({ show }: ApiKeyWarningProps) {
9 if (!show) return null;
10
2// This val creates an HTTP-accessible SVG
3
4export default async function(req: Request) {
5 // SVG content with d20 dice pattern
6 const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 301 120" width="301" height="120">
2// This is the main SVG file that can be directly rendered in the browser
3
4export default async function(req: Request) {
5 // SVG content
6 const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 301 120" width="301" height="120">
3import { tabletoprpg_d20_svg_file } from "https://esm.town/v/9319c175-2593-4f88-ba21-04f2ef7b1c28/tabletoprpg_d20_svg_file";
4
5export default async function(req: Request) {
6 // Get the SVG content
7 const svg = tabletoprpg_d20_svg_file;
4import { tabletopRPG_d20 } from "https://esm.town/v/9319c175-2593-4f88-ba21-04f2ef7b1c28/tabletopRPG_d20";
5
6export default async function(req: Request) {
7 // Get the SVG content from the tabletopRPG_d20 val
8 const svg = tabletopRPG_d20;
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
2// This file serves as the main entrypoint for the SVG Renderer project
3
4export default async function(req: Request) {
5 // Parse URL to get any query parameters
6 const url = new URL(req.url);
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
37};
38
39async function getInitialProps(req: DataRequest, res: Response, next): Promise<Response> {
40 let params: Params = {};
41 let route: Route = Route.Home;
73}
74
75async function cacheHeaders(req: DataRequest, res: Response, next): Promise<Response> {
76 res.headers.set("Cache-Control", "max-age=31536000");
77 return next();
Helper function to send Discord messages
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.