httpHandlerOKmain.tsx1 match
1export function handler(request: Request) {
2return Response.json({ ok: true });
3}
quickstartWebsitemain.tsx1 match
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {
5return new Response(
6renderToString(
1import { parseFeed } from "jsr:@mikaelporttila/rss@*";
23export default async function(req: Request): Promise<Response> {
4return new Response(
5(await parseFeed(
gitReleaseNotesmain.tsx10 matches
16}
1718// Function to fetch package info from NPM registry
19async function fetchPackageInfo(packageName: string) {
20const url = `https://registry.npmjs.org/${packageName}`;
21const response = await fetch(url);
26}
2728// Function to extract GitHub repo URL from package info
29function extractGitHubRepoUrl(packageInfo: any): string | null {
30const repository = packageInfo.repository;
31if (repository && repository.url) {
38}
3940// Function to get the GitHub repository path (owner/repo) from the URL
41function getGithubRepoPath(repoUrl: string): string | null {
42const match = repoUrl.match(/github\.com\/([^\/]+\/[^\/]+)/);
43return match ? match[1] : null;
44}
4546async function getGithubReleases(repo: string): Promise<GithubRelease[]> {
47const response = await fetch(`https://api.github.com/repos/${repo}/releases`);
48if (!response.ok) {
52}
5354function compareVersions(version1: string, version2: string): number {
55const v1 = version1.replace(/^v/, "").split(".").map(Number);
56const v2 = version2.replace(/^v/, "").split(".").map(Number);
63}
6465async function getReleaseNotesBetweenVersions(repo: string, currentVersion: string): Promise<GithubRelease[]> {
66const releases = await getGithubReleases(repo);
6774}
7576async function checkNpmUpdates(packageJsonUrl: string): Promise<string> {
77try {
78const response = await fetch(packageJsonUrl);
reacttldrawclientmain.tsx1 match
20} = await import(ret.url + "?bundle-deps");
2122export function App() {
23return (
24<>
1import { DOMParser } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";
23export function stripHTML(html: string) {
4const doc = new DOMParser().parseFromString(html, "text/html");
5return doc.body.textContent;
5import { renderToString } from "npm:react-dom/server";
67function StatusRow({ rows }) {
8return (
9<div className="w-full flex flex-col space-y-2">
28}
2930function StatusSection({ url, rows }) {
31const sectionRows = rows.filter(row => row[0] === url);
32const percentUp = Math.round((sectionRows.filter(row => row[1]).length / sectionRows.length) * 100);
44}
4546export default async function(req: Request): Promise<Response> {
47const { rows } = await sqlite.execute(
48"select url, ok, duration, timestamp from uptime order by timestamp desc limit 200",
hackerNewsRAGmain.tsx1 match
5354// Render streaming markdown
55export default async function handler(req: Request): Promise<Response> {
56const renderMarkdown = (await import("https://esm.town/v/substrate/renderMarkdown")).default;
57return renderMarkdown(stream);
hono_countermain.tsx1 match
3import { useState } from "https://esm.sh/hono/jsx/dom";
45export default function Counter(props: { initialCount?: number }) {
6const [count, setCount] = useState(props.initialCount || 0);
7return (
clientOnlymain.tsx1 match
2import React from 'https://esm.sh/react'
34export function ClientOnly({ children, ...delegated }) {
5const [hasMounted, setHasMounted] = React.useState(false)
6React.useEffect(() => {