10import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
11
12function handler(req: Request) {
13 return new Response("You are authenticated!");
14}
23import { verifyToken } from "https://www.val.town/v/pomdtr/verifyToken"
24
25function handler(req: Request) {
26 return new Response("You are authenticated!");
27}
1function extractCredentials(authorization) {
2 const parts = authorization.split(" ");
3 if (parts[0] != "Basic") {
11export type ServeHandler = (req: Request) => Response | Promise<Response>
12
13export function basicAuth(next: ServeHandler, params: {
14 verifyUser: (username: string, password: string) => boolean | Promise<boolean>;
15}): ServeHandler {
1async function getCurrentMilestone({ repoOwner, repoName, githubToken }: {
2 repoOwner: string;
3 repoName: string;
22}
23
24export async function createIssue({ title, body, repoOwner, repoName, assignee, githubToken }: {
25 title: string;
26 body: string;
1import QRCode from "https://esm.sh/qrcode";
2
3export default async function(req: Request): Promise<Response> {
4 const url = "https://get.conduitbi.com/conduitbi--5933c";
5
1import QRCode from "https://esm.sh/qrcode";
2
3export default async function(req: Request): Promise<Response> {
4 const url = "https://get.conduitbi.com/conduitbi--5933c";
5
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [germanText, setGermanText] = useState("");
7 const [englishTranslation, setEnglishTranslation] = useState("");
61}
62
63function client() {
64 createRoot(document.getElementById("root")).render(<App />);
65}
69}
70
71export default async function server(request: Request): Promise<Response> {
72 return new Response(
73 `
1This helper function creates a Github Issue in the specified repo,
2assigned to whoever you want. It also adds it into the current
3milestone.
1const msg = new TextEncoder().encode("data: hello\r\n\r\n");
2
3export default async function(req: Request): Promise<Response> {
4 let timerId: number | undefined;
5 const body = new ReadableStream({
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5function App() {
6 const [countdown, setCountdown] = useState("");
7 const [isRunning, setIsRunning] = useState(false);
53}
54
55function client() {
56 createRoot(document.getElementById("root")).render(<App />);
57}
61}
62
63export default async function server(request: Request): Promise<Response> {
64 return new Response(
65 `
1export default async function (req: Request): Promise<Response> {
2 // Only handle GET requests
3 if (req.method !== 'GET') {
A helper function to build a file's email
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.