1export default async function (interval: Interval) {
2
3}
linkInBioTemplatemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
1011const workerCode = async (code: string, env: Record<string, string>) => {
12function createDenoEnvStub(
13input: Record<string, string>,
14): typeof Deno.env {
43};
4445export function newWorker({ code, env }: { code: string; env: Record<string, string> }) {
46const workerCodeString = `
47${imports}
3import { newWorker } from "./worker";
45function encodeSSE(data: any) {
6return new TextEncoder().encode(`data: ${JSON.stringify(data)}\r\n\r\n`);
7}
tsEvalpatchConsoleLog2 matches
1type ConsoleMethod = (...args: any[]) => void;
23export function patch(cb: (message: string) => void) {
4const consoleHandler: ProxyHandler<Console> = {
5get(target: Console, prop: keyof Console) {
6let originalMethod = target[prop] as ConsoleMethod;
7if (typeof originalMethod !== "function") {
8return originalMethod;
9}
3import { renderToString } from "npm:react-dom/server";
45export default async function(req: Request): Promise<Response> {
6const url = new URL(req.url);
7
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
Otter_testmain.tsx1 match
1export default async function (e: Email) {
2// Log basic email details
3console.log(`Email received from: ${e.from}`);
valtowntownmain.tsx9 matches
48await contentStore.init();
4950function Town() {
51return (
52<div
69}
7071function HomePage() {
72return (
73<html>
83<form method="POST" action="/submit">
84<textarea name="handler" rows={10} cols={50} autoFocus>
85{`export default async function(req: Request) {
86// Server-side handler now just returns a simple response
87return new Response('Ready for NEAR interactions', {
99__html: `
100// Client-side NEAR interaction example
101async function sendNEARTransaction() {
102if (typeof near === 'undefined') {
103console.error('NEAR library not loaded');
109receiverId: "berryclub.ek.near",
110actions: [
111near.actions.functionCall({
112methodName: "draw",
113args: {
139}
140141function ContentPage({ handler, id }: { handler: string; id: string }) {
142return (
143<html>
167let originalContent = textarea.value;
168169textarea.addEventListener('input', function() {
170if (textarea.value !== originalContent) {
171submitButton.style.display = 'inline-block';
176177// Client-side NEAR interaction example
178async function sendNEARTransaction() {
179if (typeof near === 'undefined') {
180console.error('NEAR library not loaded');
186receiverId: "berryclub.ek.near",
187actions: [
188near.actions.functionCall({
189methodName: "draw",
190args: {