paste-free.openapps.xyz

Source

This app’s code and revision history are public. Download a copy or explore the files below.

Public
The app’s code and revision history are public.
Owned app · rev 01fdb2b1f66e
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone 6eca480d6447d873e2e5eed9
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
← All files
src/lib/bounded.ts
// One Bounded session per tab: a guest account, created on first use. No sign-up, ever.
import { init, getCurrentUser, signInAnonymously } from "@bounded-sh/client";
import { SERVED_APP_ID } from "./app";

let session: Promise<string> | null = null;

/** Resolves to this browser's guest user id, signing in once. */
export function me(): Promise<string> {
  session ??= (async () => {
    await init({ appId: SERVED_APP_ID });
    const user = getCurrentUser() || (await signInAnonymously());
    if (!user?.id) throw new Error("Could not start a guest session.");
    return user.id as string;
  })().catch((err) => {
    session = null;
    throw err;
  });
  return session;
}

Change history

Quality pass: password lock, year expiry, line links, text/plain API
01fdb2b1f6 · 4 hours ago
Bounded source sync
fe5788c2d2 · 1 day ago
Bounded source sync
ac6f7dbc95 · 1 day ago
Bounded source sync
0a45926293 · 1 day ago