13
14
15export default async function(req: Request): Promise<Response> {
16 if (req.method === "POST") {
17 await sqlite.execute(`UPDATE ${table} SET count = count + 1 WHERE id = 1`);
1export default async function(req: Request): Promise<Response> {
2 throw new Error("hi");
3 return Response.json({ ok: true });
4import { OpenAI } from "npm:openai";
5
6function pm(...lines: string[]): string {
7 return lines.join("\n");
8}
9
10export async function emailValHandler(inboundEmail: Email) {
11 const userPrompt = pm(
12 `From: ${inboundEmail.from}`,
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function App() {
5 const [projectUrl, setProjectUrl] = useState("");
6 const [apiToken, setApiToken] = useState("");
121});
122
123function parseValTownProjectURL(url) {
124 // Use the URL constructor to parse the URL
125 const { pathname } = new URL(url);
135}
136
137async function getFilesWithContent(authenticatedVT, files, projectId, newProjectId) {
138 console.log("files:", files);
139 const nonDirectoryFiles = files.filter(file => file.type !== "directory");
4const { author, name } = extractValInfo(import.meta.url);
5
6export default async function(interval: Interval) {
7 const today = new Intl.DateTimeFormat("en-US", {
8 month: "short",
1export default function server(request: Request): Response {
2 return new Response(
3 `<!DOCTYPE html>
77}
78
79function preload() {}
80
81function setup(faceCount = 20) {
82 createCanvas(windowWidth, windowHeight);
83 console.log("setup");
96}
97
98function draw() {
99 background(0);
100 var i;
106}
107
108function setFaceCount() {
109 faceCount = document.getElementById('faceCount').value;
110 console.log(faceCount)
2import { useState } from "https://esm.sh/react@18.2.0";
3
4export function App() {
5 const [projectUrl, setProjectUrl] = useState("");
6 const [apiToken, setApiToken] = useState("");
2import type { ReactNode } from "npm:react@18.2.0";
3
4export function Layout({ children }: { children: ReactNode }) {
5 return (
6 <html lang="en">