Scratch space for learning atproto app development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Move env and view into lib

+7 -8
+1 -1
src/auth/client.ts
··· 1 1 import { NodeOAuthClient } from '@atproto/oauth-client-node' 2 2 import type { Database } from '#/db' 3 - import { env } from '#/env' 3 + import { env } from '#/lib/env' 4 4 import { SessionStore, StateStore } from './storage' 5 5 6 6 export const createClient = async (db: Database) => {
+1 -1
src/auth/session.ts
··· 1 1 import assert from 'node:assert' 2 2 import type { IncomingMessage, ServerResponse } from 'node:http' 3 3 import { getIronSession } from 'iron-session' 4 - import { env } from '#/env' 4 + import { env } from '#/lib/env' 5 5 import { AppContext } from '#/index' 6 6 7 7 export type Session = { did: string }
src/env.ts src/lib/env.ts
+1 -1
src/index.ts
··· 5 5 import type { OAuthClient } from '@atproto/oauth-client-node' 6 6 7 7 import { createDb, migrateToLatest } from '#/db' 8 - import { env } from '#/env' 8 + import { env } from '#/lib/env' 9 9 import { Ingester } from '#/firehose/ingester' 10 10 import { createRouter } from '#/routes' 11 11 import { createClient } from '#/auth/client'
+1 -2
src/pages/home.ts
··· 1 - import { AtUri } from '@atproto/syntax' 2 1 import type { Status } from '#/db/schema' 3 - import { html } from '../view' 2 + import { html } from '../lib/view' 4 3 import { shell } from './shell' 5 4 6 5 const TODAY = new Date().toDateString()
+1 -1
src/pages/login.ts
··· 1 - import { html } from '../view' 1 + import { html } from '../lib/view' 2 2 import { shell } from './shell' 3 3 4 4 type Props = { error?: string }
+1 -1
src/pages/shell.ts
··· 1 - import { type Hole, html } from '../view' 1 + import { type Hole, html } from '../lib/view' 2 2 3 3 export function shell({ title, content }: { title: string; content: Hole }) { 4 4 return html`<html>
+1 -1
src/routes.ts
··· 6 6 import type { AppContext } from '#/index' 7 7 import { home } from '#/pages/home' 8 8 import { login } from '#/pages/login' 9 - import { page } from '#/view' 9 + import { page } from '#/lib/view' 10 10 import * as Status from '#/lexicon/types/com/example/status' 11 11 12 12 const handler =
src/view.ts src/lib/view.ts