repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-styled-tailwind/vite.config.ts | vite-styled-tailwind/vite.config.ts | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from "@tailwindcss/vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()]
})
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-styled-tailwind/src/App.tsx | vite-styled-tailwind/src/App.tsx | import { useState } from "react";
import reactLogo from "./assets/react.svg";
import viteLogo from "/vite.svg";
import { Button } from "primereact/button";
import { InputText } from "primereact/inputtext";
function App() {
const [count, setCount] = useState(0);
return (
<>
<p>
<a href="https://v... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-styled-tailwind/src/main.tsx | vite-styled-tailwind/src/main.tsx | import React from "react";
import ReactDOM from "react-dom/client";
import { PrimeReactProvider } from "primereact/api";
import App from "./App";
// tailwind css
import "./index.css";
// primreact css
import "primeicons/primeicons.css";
import "./App.css";
ReactDOM.createRoot(document.getElementById("root") as HTMLEle... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-styled-tailwind/src/vite-env.d.ts | vite-styled-tailwind/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/astro-basic-ts/src/env.d.ts | astro-basic-ts/src/env.d.ts | /// <reference types="astro/client" />
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/astro-basic-ts/src/components/MyButton.tsx | astro-basic-ts/src/components/MyButton.tsx | import { Button } from "primereact/button"
export default function MyButton() {
const showAlert = () => {
alert("Astro + PrimeReact = <3");
}
return (
<>
<Button label="Click Me" type="button" icon="pi pi-check" iconPos="right" onClick={showAlert}/>
</>
)
} | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/cra-basic-ts/src/App.tsx | cra-basic-ts/src/App.tsx | import {useState} from 'react';
import {Button} from 'primereact/button';
import 'primereact/resources/themes/saga-blue/theme.css';
import 'primereact/resources/primereact.min.css';
import 'primeicons/primeicons.css';
import 'primeflex/primeflex.css';
function App() {
const [count,setCount] = useState(0);
... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/cra-basic-ts/src/reportWebVitals.ts | cra-basic-ts/src/reportWebVitals.ts | import { ReportHandler } from 'web-vitals';
const reportWebVitals = (onPerfEntry?: ReportHandler) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry)... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/cra-basic-ts/src/setupTests.ts | cra-basic-ts/src/setupTests.ts | // jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/cra-basic-ts/src/index.tsx | cra-basic-ts/src/index.tsx | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
// If you want to start measuring performance in yo... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/cra-basic-ts/src/react-app-env.d.ts | cra-basic-ts/src/react-app-env.d.ts | /// <reference types="react-scripts" />
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-unstyled-tailwind/vite.config.ts | vite-unstyled-tailwind/vite.config.ts | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from "@tailwindcss/vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()]
})
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-unstyled-tailwind/src/App.tsx | vite-unstyled-tailwind/src/App.tsx | import { useState } from "react";
import reactLogo from "./assets/react.svg";
import viteLogo from "/vite.svg";
import { Button } from "primereact/button";
import { InputText } from "primereact/inputtext";
function App() {
const [count, setCount] = useState(0);
return (
<>
<p>
<a href="https://v... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-unstyled-tailwind/src/main.tsx | vite-unstyled-tailwind/src/main.tsx | import React from "react";
import ReactDOM from "react-dom/client";
import { PrimeReactProvider } from "primereact/api";
import Tailwind from "primereact/passthrough/tailwind";
import { twMerge } from "tailwind-merge";
import App from "./App";
// tailwind css
import "./index.css";
// primreact css
import "primeicons/pr... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-unstyled-tailwind/src/vite-env.d.ts | vite-unstyled-tailwind/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/vite.config.ts | vite-quickstart-nextgen/vite.config.ts | import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react(),tailwindcss()],
})
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/App.tsx | vite-quickstart-nextgen/src/App.tsx | import PrimeReactLogo from "./components/logo";
import { Checkbox } from "primereact/checkbox";
import { Label } from "primereact/label";
import { RadioButton } from "primereact/radiobutton";
import { InputText } from "primereact/inputtext";
import { MeterGroup } from "primereact/metergroup";
import { Button } from "pr... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/main.tsx | vite-quickstart-nextgen/src/main.tsx | import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import { PrimeReactProvider } from "@primereact/core/config";
import Noir from './themes/noir.ts';
import { ThemeProvider } from './context/theme-context.tsx';
const primereact = {
theme:... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/vite-env.d.ts | vite-quickstart-nextgen/src/vite-env.d.ts | /// <reference types="vite/client" />
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/hooks/use-theme.ts | vite-quickstart-nextgen/src/hooks/use-theme.ts | import { useContext } from "react";
import { ThemeContext, type ThemeContextType } from "../context/theme-context";
export const useTheme = (): ThemeContextType => {
const context = useContext(ThemeContext);
if (context === undefined) {
throw new Error("useTheme must be used within a ThemeProvider");
}
ret... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/components/logo.tsx | vite-quickstart-nextgen/src/components/logo.tsx | export default function PrimeReactLogo() {
return (
<svg
className="w-auto h-10"
viewBox="0 0 146 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1397_2320)">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M38.6113 ... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/components/theme-switcher.tsx | vite-quickstart-nextgen/src/components/theme-switcher.tsx | import { Button } from "primereact/button";
import { useEffect, useState } from "react";
import { useTheme } from "../hooks/use-theme";
export default function ThemeSwitcher() {
const { theme, toggleTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/themes/noir.ts | vite-quickstart-nextgen/src/themes/noir.ts | import { definePreset } from '@primeuix/themes';
import Aura from '@primeuix/themes/aura';
const Noir = definePreset(Aura, {
semantic: {
primary: {
50: '{surface.50}',
100: '{surface.100}',
200: '{surface.200}',
300: '{surface.300}',
400: '{surfac... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/vite-quickstart-nextgen/src/context/theme-context.tsx | vite-quickstart-nextgen/src/context/theme-context.tsx | import React, { createContext, useEffect, useState, useCallback } from "react";
type Theme = "light" | "dark";
interface ThemeContextType {
theme: Theme;
toggleTheme: () => void;
}
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
export type { Theme, ThemeContextType };
export { Them... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-ts/next-env.d.ts | nextjs-quickstart-ts/next-env.d.ts | /// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-ts/app/layout.tsx | nextjs-quickstart-ts/app/layout.tsx | import "./globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "primereact/resources/themes/lara-light-indigo/theme.css";
import "primeicons/primeicons.css";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "PrimeReact Quickstart... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-ts/app/page.tsx | nextjs-quickstart-ts/app/page.tsx | "use client";
import { Button } from "primereact/button";
import { InputText } from "primereact/inputtext";
import "./style.css";
export default function Home() {
let starCount = 0;
const maxStars = 5;
let isAnimationRunning = false;
const startAnimation = () => {
if (isAnimationRunning) {
return;
... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/next.config.ts | nextjs-quickstart-nextgen/next.config.ts | import type { NextConfig } from "next";
const nextConfig: NextConfig = {
/* config options here */
};
export default nextConfig;
| typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/app/layout.tsx | nextjs-quickstart-nextgen/app/layout.tsx | import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "@/providers/theme-provider";
import PrimeProvider from "@/providers/prime-provider";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
c... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/app/page.tsx | nextjs-quickstart-nextgen/app/page.tsx | "use client";
import PrimeReactLogo from "../components/logo";
import { Checkbox } from "primereact/checkbox";
import { Label } from "primereact/label";
import { RadioButton } from "primereact/radiobutton";
import { InputText } from "primereact/inputtext";
import { MeterGroup } from "primereact/metergroup";
import { Bu... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/components/logo.tsx | nextjs-quickstart-nextgen/components/logo.tsx | import React from "react";
export default function PrimeReactLogo() {
return (
<svg
className="w-auto h-10"
viewBox="0 0 146 35"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1397_2320)">
<path
fillRule="evenodd"
clipRule="eve... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/components/theme-switcher.tsx | nextjs-quickstart-nextgen/components/theme-switcher.tsx | "use client";
import { useTheme } from "next-themes";
import { Button } from "primereact/button";
import React, { useEffect, useState } from "react";
export default function ThemeSwitcher() {
const { theme, setTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(t... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/providers/prime-provider.tsx | nextjs-quickstart-nextgen/providers/prime-provider.tsx | "use client";
import { PrimeReactProvider } from "@primereact/core/config";
import { PrimeReactStyleSheet } from "@primereact/core/stylesheet";
import { useServerInsertedHTML } from "next/navigation";
import * as React from "react";
import Noir from "@/themes/noir";
const styledStyleSheet = new PrimeReactStyleSheet();... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/providers/theme-provider.tsx | nextjs-quickstart-nextgen/providers/theme-provider.tsx | "use client"
import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextThemesProvider>) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
} | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
primefaces/primereact-examples | https://github.com/primefaces/primereact-examples/blob/2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614/nextjs-quickstart-nextgen/themes/noir.ts | nextjs-quickstart-nextgen/themes/noir.ts | import { definePreset } from '@primeuix/themes';
import Aura from '@primeuix/themes/aura';
const Noir = definePreset(Aura, {
semantic: {
primary: {
50: '{surface.50}',
100: '{surface.100}',
200: '{surface.200}',
300: '{surface.300}',
400: '{surfac... | typescript | MIT | 2ad2ac5e3bcea8da7d1d6437bf59769c8cec2614 | 2026-01-05T05:00:43.945904Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/scripts/publish-ghpages.ts | scripts/publish-ghpages.ts | import * as ghpages from 'gh-pages';
import * as path from 'path';
process.stdout.write('Publishing to "gh-pages" branch... ');
ghpages.publish(
path.resolve(new URL(import.meta.url).pathname, '..', '..', 'docs/examples'),
{message: 'Updated documentation'},
function (err) {
if (err) {
... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/sqlite-worker.ts | src/sqlite-worker.ts | // This is the entry point for an SQLite worker thread
import { installHttpVfs } from './vfs-http.js';
import { installSyncHttpVfs } from './vfs-sync-http.js';
import * as VFSHTTP from './vfs-http-types.js';
import { debug } from './vfs-http-types.js';
// Binary version of the classic xmlhttprequest (for Node.js)
impo... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/vfs-http.ts | src/vfs-http.ts | // This is the VFS layer for the shared backend
// It runs in each SQLite worker thread that uses it
// and it is fully synchronous
// It communicates with the single shared HTTP thread in vfs-http-worker.ts
import * as VFSHTTP from './vfs-http-types.js';
import { debug } from './vfs-http-types.js';
import { SQLite3, ... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/endianness.ts | src/endianness.ts | // Procedures for changing the byte sex
// SQLite is always Big-Endian, JS follows the platform, which is Little-Endian on x86
import { debug } from './vfs-http-types.js';
const swapNeeded = (function () {
const ab = new ArrayBuffer(2);
const u8 = new Uint8Array(ab);
const u16 = new Uint16Array(ab);
u8[0] = 0... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/vfs-sync-http.ts | src/vfs-sync-http.ts | // This is the ersatz HTTP backend
// It does not require SharedArrayBuffer and does not share its cache
// It runs in the SQLite worker thread
// Each SQLite worker thread has its own independent copy
import { LRUCache } from 'lru-cache';
import { ntoh16 } from './endianness.js';
import * as VFSHTTP from './vfs-http-... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/vfs-http-types.ts | src/vfs-http-types.ts | export interface Options {
/**
* Timeout for SQL operations (must take HTTP transfers into account)
* @default 30000
*/
timeout?: number;
/**
* Maximum supported page size
* @default 4096
*/
maxPageSize?: number;
/**
* Cache size in Kb
* @default 4096
*/
cacheSize?: number;
/**
... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/vfs-http-worker.ts | src/vfs-http-worker.ts | // This is the shared HTTP backend thread
// It can serve multiple SQLite worker threads
// (from vfs-http.ts)
import { LRUCache } from 'lru-cache';
import * as VFSHTTP from './vfs-http-types.js';
import { ntoh16 } from './endianness.js';
import { debug } from './vfs-http-types.js';
let options: VFSHTTP.Options;
// ... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/src/index.ts | src/index.ts | // This is the user-facing API
// It runs in the user-thread (which is probably the main UI thread)
import '#sqlite3-worker1-promiser.js';
import type * as SQLite from '#sqlite3-worker1-promiser.js';
import { debug } from './vfs-http-types.js';
import * as VFSHTTP from './vfs-http-types.js';
import { installHttpVfs } f... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/http-pool.test.ts | test/http-pool.test.ts | import * as SQLite from '../deps/types/sqlite3.js';
import { createSQLiteHTTPPool } from '../dist/index.js';
import { assert } from 'chai';
const remoteURL = 'https://orel.garga.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles';
for (const type of ['sync', 'shared'] as const) {
describe(`SQLite HTTP pool (${type}... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/vfs-http.test.ts | test/vfs-http.test.ts | import * as SQLite from '../deps/types/sqlite3.js';
import { createSQLiteThread, createHttpBackend, VFSHTTP } from '../dist/index.js';
import { assert } from 'chai';
const remoteURL = 'https://orel.garga.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles';
const backTests = {
shared: 'HTTP VFS (multiplexed)',
syn... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration.test.ts | test/integration.test.ts | import * as path from 'path';
import * as fs from 'fs';
import * as process from 'process';
import * as url from 'url';
import { execSync } from 'child_process';
describe('integration tests', () => {
const dirname = url.fileURLToPath(new URL(import.meta.url).href);
const testDir = path.resolve(dirname, '..', 'inte... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/setup.ts | test/setup.ts | /* eslint-disable @typescript-eslint/no-explicit-any */
// Some quick hacks to make SQLite WASM work in Node.js
/// <reference path='./modules.d.ts' />
import WebWorker from '@mmomtchev/web-worker';
import { MessageChannel, MessagePort as MessagePort } from 'worker_threads';
import { performance } from 'perf_hooks';
/... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/sync-sqlite-vfs-http.test.ts | test/sync-sqlite-vfs-http.test.ts | import * as SQLite3 from '#sqlite3.js';
import { initSyncSQLite, createHttpBackend, VFSHTTP } from '../dist/index.js';
import { assert } from 'chai';
const remoteURL = 'https://orel.garga.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles';
const backTests = {
shared: 'HTTP VFS (multiplexed)',
sync: 'HTTP VFS (er... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/modules.d.ts | test/modules.d.ts | declare module '@mmomtchev/web-worker';
| typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/browser-webpack-ts-cjs/index.ts | test/integration/browser-webpack-ts-cjs/index.ts | it('test', async () => {
const { createSQLiteThread, createHttpBackend } = await import('sqlite-wasm-http');
const httpBackend = createHttpBackend({
maxPageSize: 1024,
timeout: 10000
});
const db = await createSQLiteThread({ http: httpBackend });
await db('config-get', {});
await db('open', {
... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/node-ts-esm/setup.ts | test/integration/node-ts-esm/setup.ts | // Some quick hacks to make SQLite WASM work in Node.js
/// <reference path='./modules.d.ts' />
import WebWorker from '@mmomtchev/web-worker';
import { MessageChannel, MessagePort as MessagePort } from 'worker_threads';
import { performance } from 'perf_hooks';
(globalThis as any).self = globalThis;
(self as any).loca... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/node-ts-esm/index.ts | test/integration/node-ts-esm/index.ts | import { createSQLiteThread, createHttpBackend } from 'sqlite-wasm-http';
import './setup.js';
// "moduleResolution: node16" is tsconfig.json is needed only if
// using direct access to the included sqlite3 distribution
import sqlite from 'sqlite-wasm-http/sqlite3.js';
if (typeof sqlite !== 'function')
throw new Err... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/node-ts-esm/modules.d.ts | test/integration/node-ts-esm/modules.d.ts | declare module '@mmomtchev/web-worker';
| typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/browser-webpack-ts-esm/index.ts | test/integration/browser-webpack-ts-esm/index.ts | import { createSQLiteThread, createHttpBackend } from 'sqlite-wasm-http';
// "moduleResolution: node16" is tsconfig.json is needed only if
// using direct access to the included sqlite3 distribution
import sqlite from 'sqlite-wasm-http/sqlite3.js';
if (typeof sqlite !== 'function')
throw new Error('Importing sqlite3... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/test/integration/browser-webpack-ts-esm/modules.d.ts | test/integration/browser-webpack-ts-esm/modules.d.ts | declare module '@mmomtchev/web-worker';
| typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/examples/index.ts | examples/index.ts | import { createSQLiteThread, createHttpBackend } from 'sqlite-wasm-http';
const pacman = new URL('./pacman.svg', import.meta.url);
(async function main() {
const httpBackend = createHttpBackend({
maxPageSize: 4096,
timeout: 30000
});
document.getElementById(`backend-${httpBackend.type}`).hidden = false;... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/examples/nodejs-example.ts | examples/nodejs-example.ts | import { createSQLiteThread, createHttpBackend } from '../dist/index.js';
import '../test/setup.js';
(async () => {
// MBTiles is a common format for storing both vector and raster maps in an SQLite database
const remoteURL = 'https://velivole.b-cdn.net/maptiler-osm-2017-07-03-v3.6.1-europe.mbtiles';
const httpBackend... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/deps/XMLHttpRequest.d.ts | deps/XMLHttpRequest.d.ts | export const XMLHttpRequest: typeof globalThis.XMLHttpRequest;
| typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
mmomtchev/sqlite-wasm-http | https://github.com/mmomtchev/sqlite-wasm-http/blob/bcdc18bdfaf10520ef87b595d60447d4814383ce/deps/types/sqlite3.d.ts | deps/types/sqlite3.d.ts | export type SQLValue = null | number | boolean | bigint | string | Uint8Array;
export type SQLBindable = undefined | SQLValue | Int8Array | ArrayBuffer;
export interface RowArray {
type: string;
row: SQLValue[];
rowNumber: number;
columnNames: string[];
}
export interface RowObject {
type: string;
row: Re... | typescript | ISC | bcdc18bdfaf10520ef87b595d60447d4814383ce | 2026-01-05T05:00:45.027563Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/src/index.ts | src/index.ts | import http from 'node:http';
import path from 'node:path';
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';
import { debuglog, format } from 'node:util';
import escapeHtml from 'escape-html';
import { sendToWormhole } from 'stream-wormhole';
const debug = debuglog('koa-onerror');
export type Onerr... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/accepts.test.ts | test/accepts.test.ts | import Koa from 'koa';
import { request } from '@eggjs/supertest';
import { mm } from 'mm';
import { onerror } from '../src/index.js';
describe('test/accepts.test.ts', () => {
beforeEach(() => {
mm(process.env, 'NODE_ENV', '');
});
afterEach(() => {
mm.restore();
});
it('should return json response... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/helper.ts | test/helper.ts | import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export function getFixtures(filename: string) {
return path.join(__dirname, 'fixtures', filename);
}
| typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/text.test.ts | test/text.test.ts | import fs from 'node:fs';
import koa from 'koa';
import { request } from '@eggjs/supertest';
import { mm } from 'mm';
import { onerror } from '../src/index.js';
import { OnerrorError } from '../src/index.js';
describe('test/text.test.ts', () => {
beforeEach(() => {
mm(process.env, 'NODE_ENV', 'development');
}... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/fluid.test.ts | test/fluid.test.ts | import { strict as assert } from 'node:assert';
import Koa from 'koa';
import { onerror } from '../src/index.js';
describe('test/fluid.test.ts', () => {
it('should return app reference', () => {
const app = new Koa();
const res = onerror(app);
assert(res instanceof Koa);
assert.equal(res, app);
});... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/multipart.test.ts | test/multipart.test.ts | import assert from 'node:assert';
import { scheduler } from 'node:timers/promises';
import { Readable } from 'node:stream';
import urllib from 'urllib';
import formstream from 'formstream';
import { mm } from 'mm';
import { app } from './form_app.js';
import { getFixtures } from './helper.js';
describe('test/multipart... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/redirect.test.ts | test/redirect.test.ts | import koa from 'koa';
import { request } from '@eggjs/supertest';
import { onerror } from '../src/index.js';
import { mm } from 'mm';
describe('test/redirect.test.ts', () => {
beforeEach(() => {
mm(process.env, 'NODE_ENV', 'development');
});
afterEach(() => {
mm.restore();
});
it('should handle e... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/form_app.ts | test/form_app.ts | import { scheduler } from 'node:timers/promises';
import Koa from 'koa';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - co-busboy is not typed
import parse from 'co-busboy';
import { onerror } from '../src/index.js';
const app = new Koa();
app.on('error', () => {});
onerror(app);
app.use... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/json.test.ts | test/json.test.ts | import { strict as assert } from 'node:assert';
import { once } from 'node:events';
import fs from 'node:fs';
import Koa, { Context } from 'koa';
import { request } from '@eggjs/supertest';
import { mm } from 'mm';
import { onerror, OnerrorError } from '../src/index.js';
describe('test/json.test.ts', () => {
beforeE... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
koajs/onerror | https://github.com/koajs/onerror/blob/d8503390716281ba590f5b2c98b425ae1301c43c/test/html.test.ts | test/html.test.ts | import fs from 'node:fs';
import { scheduler } from 'node:timers/promises';
import Koa from 'koa';
import { request } from '@eggjs/supertest';
import { mm } from 'mm';
import { onerror } from '../src/index.js';
describe('test/html.test.ts', () => {
beforeEach(() => {
mm(process.env, 'NODE_ENV', 'development');
... | typescript | MIT | d8503390716281ba590f5b2c98b425ae1301c43c | 2026-01-05T05:00:49.458543Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/scripts/changeset-publish.ts | scripts/changeset-publish.ts | import { readdirSync, readFileSync, writeFileSync } from "node:fs";
import { existsSync } from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
type DependencyBlocks =
| "dependencies"
| "devDependencies"
| "peerDependencies"
| "optionalDependencies";
type Manifest = {
name... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/scripts/build-packages.ts | scripts/build-packages.ts | import { existsSync, readdirSync, readFileSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
type Manifest = {
name?: string;
scripts?: Record<string, string>;
};
type PackageInfo = {
dir: string;
manifest: Manifest;
name: string;
};
const __filename = fileURLToP... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/source.config.ts | lucid-docs/source.config.ts | import { rehypeCodeDefaultOptions } from 'fumadocs-core/mdx-plugins';
import { defineConfig, defineDocs } from 'fumadocs-mdx/config';
import { transformerTwoslash } from 'fumadocs-twoslash';
export const docs = defineDocs({
dir: 'content/docs',
docs: {
postprocess: {
includeProcessedMarkdown: true,
... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/vite.config.ts | lucid-docs/vite.config.ts | import react from '@vitejs/plugin-react';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import { defineConfig } from 'vite';
import tsConfigPaths from 'vite-tsconfig-paths';
import { cloudflare } from '@cloudflare/vite-plugin'
import tailwindcss from '@tailwindcss/vite';
import mdx from 'fumadocs-m... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/router.tsx | lucid-docs/src/router.tsx | import { createRouter as createTanStackRouter } from '@tanstack/react-router';
import { routeTree } from './routeTree.gen';
import { NotFound } from '@/components/not-found';
export function getRouter() {
return createTanStackRouter({
routeTree,
defaultPreload: 'intent',
scrollRestoration: true,
defa... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/start.ts | lucid-docs/src/start.ts | import { createMiddleware, createStart } from '@tanstack/react-start';
import { rewritePath } from 'fumadocs-core/negotiation';
import { redirect } from '@tanstack/react-router';
const { rewrite: rewriteLLM } = rewritePath(
'/docs{/*path}.mdx',
'/llms.mdx{/*path}'
);
const llmMiddleware = createMiddleware().serve... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/__root.tsx | lucid-docs/src/routes/__root.tsx | import {
createRootRoute,
HeadContent,
Outlet,
Scripts,
} from '@tanstack/react-router';
import * as React from 'react';
import appCss from '@/styles/app.css?url';
import { RootProvider } from 'fumadocs-ui/provider/tanstack';
export const Route = createRootRoute({
head: () => ({
meta: [
{
c... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/index.tsx | lucid-docs/src/routes/index.tsx | import { createFileRoute, Link } from '@tanstack/react-router';
import { HomeLayout } from 'fumadocs-ui/layouts/home';
import { baseOptions } from '@/lib/layout.shared';
export const Route = createFileRoute('/')({
component: Home,
});
function Home() {
return (
<HomeLayout {...baseOptions()}>
<div class... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/llms-full[.]txt.ts | lucid-docs/src/routes/llms-full[.]txt.ts | import { createFileRoute } from '@tanstack/react-router';
import { source } from '@/lib/source';
import { getLLMText } from '@/lib/get-llm-text';
export const Route = createFileRoute('/llms-full.txt')({
server: {
handlers: {
GET: async () => {
const scan = source.getPages().map(getLLMText);
... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/llms[.]mdx.$.ts | lucid-docs/src/routes/llms[.]mdx.$.ts | import { createFileRoute, notFound } from '@tanstack/react-router';
import { source } from '@/lib/source';
export const Route = createFileRoute('/llms.mdx/$')({
server: {
handlers: {
GET: async ({ params }) => {
const slugs = params._splat?.split('/') ?? [];
const page = source.getPage(slug... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/api/search.ts | lucid-docs/src/routes/api/search.ts | import { createFileRoute } from '@tanstack/react-router';
import { source } from '@/lib/source';
import { createFromSource } from 'fumadocs-core/search/server';
const server = createFromSource(source, {
// https://docs.orama.com/docs/orama-js/supported-languages
language: 'english',
});
export const Route = creat... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/routes/docs/$.tsx | lucid-docs/src/routes/docs/$.tsx | import { createFileRoute, notFound } from '@tanstack/react-router';
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
import { createServerFn } from '@tanstack/react-start';
import { source } from '@/lib/source';
import type * as PageTree from 'fumadocs-core/page-tree';
import { useMemo } from 'react';
import brow... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/components/page-actions.tsx | lucid-docs/src/components/page-actions.tsx | 'use client';
import { useMemo, useState } from 'react';
import {
Check,
ChevronDown,
Copy,
ExternalLinkIcon,
MessageCircleIcon,
} from 'lucide-react';
import { cn } from '../lib/cn';
import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button';
import { buttonVariants } from './ui/button';
import {
Po... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/components/not-found.tsx | lucid-docs/src/components/not-found.tsx | import { Link } from '@tanstack/react-router';
import { HomeLayout } from 'fumadocs-ui/layouts/home';
export function NotFound() {
return (
<HomeLayout
nav={{
title: 'Tanstack Start',
}}
className="text-center py-32 justify-center"
>
<div className="flex flex-col items-center ... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/components/ui/button.tsx | lucid-docs/src/components/ui/button.tsx | import { cva, type VariantProps } from 'class-variance-authority';
const variants = {
primary: 'bg-fd-primary text-fd-primary-foreground hover:bg-fd-primary/80',
outline: 'border hover:bg-fd-accent hover:text-fd-accent-foreground',
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
secondary:
'bo... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/lib/get-llm-text.ts | lucid-docs/src/lib/get-llm-text.ts | import { source } from '@/lib/source';
import type { InferPageType } from 'fumadocs-core/source';
export async function getLLMText(page: InferPageType<typeof source>) {
const processed = await page.data.getText('processed');
return `# ${page.data.title} (${page.url})
${processed}`;
}
| typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/lib/cn.ts | lucid-docs/src/lib/cn.ts | export { twMerge as cn } from 'tailwind-merge';
| typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/lib/layout.shared.tsx | lucid-docs/src/lib/layout.shared.tsx | import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
export function baseOptions(): BaseLayoutProps {
return {
nav: {
title: 'Lucid Agents',
},
githubUrl: 'https://github.com/daydreamsai/lucid-agents',
};
}
| typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/lucid-docs/src/lib/source.ts | lucid-docs/src/lib/source.ts | import { loader } from 'fumadocs-core/source';
import * as icons from 'lucide-static';
import { docs } from 'fumadocs-mdx:collections/server';
export const source = loader({
source: docs.toFumadocsSource(),
baseUrl: '/docs',
icon(icon) {
if (!icon) {
return;
}
if (icon in icons) return icons[i... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/tsup.config.base.ts | packages/tsup.config.base.ts | import type { Options } from "tsup";
import { defineConfig } from "tsup";
const baseOptions: Partial<Options> = {
format: ["esm"],
sourcemap: true,
clean: true,
target: "es2020",
treeshake: true,
splitting: false,
skipNodeModulesBundle: true,
outDir: "dist",
};
function withDefaults(option: Options): ... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/tsup.config.ts | packages/payments/tsup.config.ts | import { definePackageConfig } from '../tsup.config.base';
export default definePackageConfig({
entry: ['src/index.ts'],
dts: true,
external: [
'@lucid-agents/core',
'@lucid-agents/identity',
'@lucid-agents/wallet',
'x402-fetch',
'x402',
'viem',
'zod',
],
});
| typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/payment-tracker.ts | packages/payments/src/payment-tracker.ts | import type { PaymentDirection, PaymentTracker as PaymentTrackerInterface } from '@lucid-agents/types/payments';
import type { PaymentStorage } from './payment-storage';
import { createSQLitePaymentStorage } from './sqlite-payment-storage';
/**
* Formats a BigInt amount (in base units with 6 decimals) to a human-frie... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/postgres-payment-storage.ts | packages/payments/src/postgres-payment-storage.ts | import { Pool } from 'pg';
import type {
PaymentRecord,
PaymentDirection,
} from '@lucid-agents/types/payments';
import type { PaymentStorage } from './payment-storage';
/**
* Postgres payment storage implementation.
* For serverless with persistence needs, multi-agent deployments.
*/
export class PostgresPayme... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/rate-limiter.ts | packages/payments/src/rate-limiter.ts | /**
* Rate limiter for tracking payments per time window per policy group.
* Uses sliding window approach (in-memory).
* All state is lost on restart - this is acceptable for now.
*
* Tracks payment timestamps per policy group and enforces rate limits
* based on maximum payments allowed within a time window.
*/
... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/in-memory-payment-storage.ts | packages/payments/src/in-memory-payment-storage.ts | import type { PaymentRecord, PaymentDirection } from '@lucid-agents/types/payments';
import type { PaymentStorage } from './payment-storage';
type PaymentEntry = {
amount: bigint;
timestamp: number;
};
type ScopeKey = string;
/**
* In-memory payment storage using Map data structure.
* Data is ephemeral (lost o... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/policy-schema.ts | packages/payments/src/policy-schema.ts | import { z } from 'zod';
const OutgoingLimitSchema = z.object({
maxPaymentUsd: z.number().positive().optional(),
maxTotalUsd: z.number().positive().optional(),
windowMs: z.number().int().positive().optional(),
});
const OutgoingLimitsConfigSchema = z.object({
global: OutgoingLimitSchema.optional(),
perTarge... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/utils.ts | packages/payments/src/utils.ts | import type { PaymentsConfig } from '@lucid-agents/types/payments';
/**
* Creates PaymentsConfig from environment variables and optional overrides.
*
* @param configOverrides - Optional config overrides from agent-kit config
* @returns PaymentsConfig resolved from env + overrides
*/
export function paymentsFromEn... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/validation.ts | packages/payments/src/validation.ts | import {
SupportedEVMNetworks,
SupportedSVMNetworks,
type Network,
} from 'x402/types';
import type { PaymentsConfig } from '@lucid-agents/types/payments';
const SUPPORTED_NETWORKS: Network[] = [
...SupportedEVMNetworks,
...SupportedSVMNetworks,
];
/**
* Validates payment configuration and throws descripti... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/env.ts | packages/payments/src/env.ts | import type { PaymentPolicyGroup } from '@lucid-agents/types/payments';
import { loadPoliciesFromConfig } from './policy-config';
/**
* Loads payment policy groups from a config file.
*
* Example `payment-policies.json`:
* ```json
* [
* {
* "name": "Daily Outgoing Limit",
* "outgoingLimits": {
* ... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/crypto.ts | packages/payments/src/crypto.ts | /**
* Address normalization and validation utilities.
*/
export type Hex = `0x${string}`;
export const ZERO_ADDRESS: Hex = '0x0000000000000000000000000000000000000000';
/**
* Normalize an Ethereum address to lowercase hex format
* Throws if the address is invalid
*/
export function normalizeAddress(value: strin... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
daydreamsai/lucid-agents | https://github.com/daydreamsai/lucid-agents/blob/7d389978b4ef6f8fae56c073af5e6f4c53b636d8/packages/payments/src/extension.ts | packages/payments/src/extension.ts | import type {
AgentRuntime,
BuildContext,
EntrypointDef,
Extension,
} from '@lucid-agents/types/core';
import type { AgentCardWithEntrypoints } from '@lucid-agents/types/a2a';
import type {
PaymentsConfig,
PaymentsRuntime,
} from '@lucid-agents/types/payments';
import { createAgentCardWithPayments } from '... | typescript | MIT | 7d389978b4ef6f8fae56c073af5e6f4c53b636d8 | 2026-01-05T05:00:44.865474Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.