diff --git a/.gitignore b/.gitignore index 713d500..4916370 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules/ .env +.git-credential-helper.sh diff --git a/CLAUDE.md b/CLAUDE.md index 57d2cad..d4be947 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -49,12 +49,12 @@ The scripts in this repo should collectively cover: ### Shared modules -- **`lib/auth.ts`** — exports the `Session` interface and `createSession()`, which launches headless Chromium, logs in, handles forced password changes, and returns `{ browser, page }`. Throws if login fails. -- **`lib/gitea.ts`** — All Gitea operations, each typed with explicit return interfaces. Functions take a `Session` plus operation-specific args, navigate to the relevant Gitea page, and return scraped data. +- **`src/lib/auth.ts`** — exports the `Session` interface and `createSession()`, which launches headless Chromium, logs in, handles forced password changes, and returns `{ browser, page }`. Throws if login fails. +- **`src/lib/gitea.ts`** — All Gitea operations, each typed with explicit return interfaces. Functions take a `Session` plus operation-specific args, navigate to the relevant Gitea page, and return scraped data. -Each tool call in `server.ts` creates a fresh session via `withSession()` and closes the browser when done. +Each tool call in `src/server.ts` creates a fresh session via `withSession()` and closes the browser when done. ### Standalone scripts -- **`login.ts`** — Standalone login smoke test. -- **`inspect.ts`** — Dumps form element metadata from the login page as JSON; useful for updating Playwright selectors when Gitea's HTML changes. +- **`src/login.ts`** — Standalone login smoke test. +- **`src/inspect.ts`** — Dumps form element metadata from the login page as JSON; useful for updating Playwright selectors when Gitea's HTML changes. diff --git a/package.json b/package.json index dbec3b8..9edd063 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,9 @@ "main": "index.js", "type": "module", "scripts": { - "start": "tsx server.ts", - "login": "tsx login.ts", - "inspect": "tsx inspect.ts", + "start": "tsx src/server.ts", + "login": "tsx src/login.ts", + "inspect": "tsx src/inspect.ts", "typecheck": "tsc --noEmit" }, "keywords": [], diff --git a/inspect.ts b/src/inspect.ts similarity index 100% rename from inspect.ts rename to src/inspect.ts diff --git a/lib/auth.ts b/src/lib/auth.ts similarity index 100% rename from lib/auth.ts rename to src/lib/auth.ts diff --git a/lib/gitea.ts b/src/lib/gitea.ts similarity index 100% rename from lib/gitea.ts rename to src/lib/gitea.ts diff --git a/login.ts b/src/login.ts similarity index 100% rename from login.ts rename to src/login.ts diff --git a/server.ts b/src/server.ts similarity index 100% rename from server.ts rename to src/server.ts diff --git a/tsconfig.json b/tsconfig.json index 77531cc..3157dde 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,6 @@ "skipLibCheck": true, "types": ["node"] }, - "include": ["**/*.ts"], + "include": ["src/**/*.ts"], "exclude": ["node_modules"] }