loggingTesthelperFunction2 matches
1export function squareNumber(num: number) {
2console.log("helper function log");
3console.log(`Squaring number: ${num}`);
4return num * num;
loggingTestmainFunction3 matches
1import { squareNumber } from "./helperFunction";
23function processMathList() {
4console.log("Starting math processing");
5const numbers = [1, 2, 3];
7}
89console.log("\nTesting Math Functions:");
10console.log(processMathList());
vblogimport-file1 match
1/** Import a file relative to the root of the project */
2export async function importFile(path: string) {
3const url = new URL(path, import.meta.url);
4const res = await fetch(url, { redirect: "follow" });
BraintrustSDKtutorial1 match
3import { Eval } from "npm:braintrust";
45export default async function handler() {
6const result = {
7apiKeyStatus: null,
queueparseImportMeta1 match
7}
89export function parseImportMeta(url: string): ImportMetaUrl {
10const pattern = /^https:\/\/esm\.town\/v\/([^/]+)\/([^@]+)@(\d+)-(.+?)(\/.*)?$/;
11const match = url.match(pattern);
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
TestprojectfineRoseSquirrel1 match
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3}
Windsurfcontextmanager4 matches
1617// Context Manager Val
18export async function updateContext(context) {
19const { phase, activeBlocks, pendingTasks, recentChanges } = context;
2035}
3637export async function getLatestContext() {
38const result = db.prepare(`
39SELECT * FROM context
53}
5455export async function getContextHistory(limit = 10) {
56return db.prepare(`
57SELECT * FROM context
6263// HTTP request handler
64export async function onRequest(req) {
65const { action, params } = await req.json();
66
Windsurfprojectcontext12 matches
45* @returns {React.ReactElement}
46*/
47function App() {
48const [state, setState] = useState(null);
49const [error, setError] = useState(null);
112/**
113* CurrentPhase component
114* @param {{phase: string, onUpdate: Function}} props
115* @returns {React.ReactElement}
116*/
117function CurrentPhase({ phase, onUpdate }) {
118const [newPhase, setNewPhase] = useState(phase);
119const [error, setError] = useState("");
152/**
153* ActiveBlocks component
154* @param {{blocks: string[], onUpdate: Function}} props
155* @returns {React.ReactElement}
156*/
157function ActiveBlocks({ blocks, onUpdate }) {
158const [newBlock, setNewBlock] = useState("");
159const [error, setError] = useState("");
210/**
211* TaskList component
212* @param {{tasks: Task[], onUpdate: Function}} props
213* @returns {React.ReactElement}
214*/
215function TaskList({ tasks, onUpdate }) {
216const [newTask, setNewTask] = useState({ description: "", priority: "medium", assignedTo: "" });
217const [error, setError] = useState("");
338/**
339* StepList component
340* @param {{steps: Step[], onUpdate: Function}} props
341* @returns {React.ReactElement}
342*/
343function StepList({ steps, onUpdate }) {
344const [newStep, setNewStep] = useState({ description: "", priority: "medium" });
345const [error, setError] = useState("");
455* @returns {React.ReactElement}
456*/
457function ChangeList({ changes }) {
458return (
459<div className="section">
473* Client-side initialization
474*/
475function client() {
476createRoot(document.getElementById("root")).render(<App />);
477}
487* @returns {Promise<Response>} The server response
488*/
489export default async function server(req: Request): Promise<Response> {
490const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
491const { blob } = await import("https://esm.town/v/std/blob");
WindsurfunbeatableAquaCow4 matches
1export default async function (req: Request): Promise<Response> {
2return Response.json({ ok: true })
3const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
58`);
5960// Utility functions
61async function hashPassword(password: string, salt?: string): Promise<{ hash: string, salt: string }> {
62salt = salt || crypto.randomUUID();
63const encoder = new TextEncoder();
69}
7071async function authenticateUser(request: Request): Promise<number | null> {
72const authHeader = request.headers.get('Authorization');
73if (!authHeader) return null;