{"_id":"@actsasgeek/healthcheck","_rev":"4-f093150ee06e171acfb5f131f263ff12","name":"@actsasgeek/healthcheck","dist-tags":{"latest":"0.3.1"},"versions":{"0.1.0":{"name":"@actsasgeek/healthcheck","version":"0.1.0","keywords":["healthcheck","monitoring","nextjs","supabase","uptime"],"author":{"name":"ActsAsGeek"},"license":"MIT","_id":"@actsasgeek/healthcheck@0.1.0","maintainers":[{"name":"brij-singh","email":"brijsingh@gmail.com"}],"dist":{"shasum":"36385c523cc0f2af3224406775dea95f61b6afaa","tarball":"https://registry.npmjs.org/@actsasgeek/healthcheck/-/healthcheck-0.1.0.tgz","fileCount":14,"integrity":"sha512-Y5tdvsV1uRIf41JYHffnR60+WRqsIkiSPJHtuspqas1xFRy+J3jwmB4D1TIdAlpa50ePrSGtFZSwhPebQyIdgQ==","signatures":[{"sig":"MEQCIGIemTwEN9+lbM3Y7qFcd6uZ3FmjXTEVe/nc7/F1Q7UVAiA++MPcVEzJZqDwPZ0X4YPEtAFf9BxCNWtPlKqhGHtajA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61142},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./nextjs":{"types":"./dist/nextjs.d.ts","import":"./dist/nextjs.mjs","require":"./dist/nextjs.js"}},"gitHead":"05df48cf100b22d20adb67b72d5097daa26a6c6b","scripts":{"dev":"tsup --watch","test":"tsx --test src/*.test.ts","build":"tsup"},"_npmUser":{"name":"brij-singh","email":"brijsingh@gmail.com"},"_npmVersion":"10.9.2","description":"Dead-simple health check endpoint for Next.js apps with Supabase","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.18.0","tsup":"^8.3.6","typescript":"^5","@types/node":"^22"},"peerDependencies":{"next":">=13.0.0","@supabase/supabase-js":">=2.0.0"},"peerDependenciesMeta":{"@supabase/supabase-js":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/healthcheck_0.1.0_1764707691325_0.7096918498633153","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@actsasgeek/healthcheck","version":"0.1.1","keywords":["healthcheck","monitoring","nextjs","supabase","uptime"],"author":{"name":"ActsAsGeek"},"license":"MIT","_id":"@actsasgeek/healthcheck@0.1.1","maintainers":[{"name":"brij-singh","email":"brijsingh@gmail.com"}],"homepage":"https://www.actsasgeek.com","bugs":{"url":"https://actsasgeek.com/issues"},"dist":{"shasum":"6ef16c1fa95d8a8bdf635b4544fedeb9e31ec3c5","tarball":"https://registry.npmjs.org/@actsasgeek/healthcheck/-/healthcheck-0.1.1.tgz","fileCount":14,"integrity":"sha512-KLfHsPLIKSEI9aWBkOLrQ+IN8ywwflMcHj0lfw9piwx48J+EDRlfTRsrEXxYa4MdMvfoVu+1+nDyqAkr6/OcAA==","signatures":[{"sig":"MEUCICOV2LDQpGpKBzdUeKajS8mZ5gFJs9BCro4rFrXAhj8dAiEAwfiiA66ElKa+oq/02q6KMX9uwxdeW07mu+2oimvI4JI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61492},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./nextjs":{"types":"./dist/nextjs.d.ts","import":"./dist/nextjs.mjs","require":"./dist/nextjs.js"}},"gitHead":"05df48cf100b22d20adb67b72d5097daa26a6c6b","scripts":{"dev":"tsup --watch","test":"tsx --test src/*.test.ts","build":"tsup"},"_npmUser":{"name":"brij-singh","email":"brijsingh@gmail.com"},"repository":{"url":"https://actsasgeek.com/healthcheck","type":"git","directory":"packages/healthcheck"},"_npmVersion":"10.9.2","description":"Dead-simple health check endpoint for Next.js apps with Supabase","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.18.0","tsup":"^8.3.6","typescript":"^5","@types/node":"^22"},"peerDependencies":{"next":">=13.0.0","@supabase/supabase-js":">=2.0.0"},"peerDependenciesMeta":{"@supabase/supabase-js":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/healthcheck_0.1.1_1764708527773_0.7105799399955697","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@actsasgeek/healthcheck","version":"0.2.0","keywords":["healthcheck","monitoring","nextjs","supabase","uptime"],"author":{"name":"ActsAsGeek"},"license":"MIT","_id":"@actsasgeek/healthcheck@0.2.0","maintainers":[{"name":"brij-singh","email":"brijsingh@gmail.com"}],"homepage":"https://www.actsasgeek.com","bugs":{"url":"https://actsasgeek.com/issues"},"dist":{"shasum":"ecc35926118462affb9051e4967e17bbe452489e","tarball":"https://registry.npmjs.org/@actsasgeek/healthcheck/-/healthcheck-0.2.0.tgz","fileCount":14,"integrity":"sha512-VBGBU8HK5pdoOhN7ZoDZqW2sO90zdGRGIVVgdInDMhcPi+8rr9UxYAF3sBJXJyj3jcH6DhElkPUR9H7zD+/PIg==","signatures":[{"sig":"MEUCID39qb6d6xZSBKg3LmyGmJzHleGtJalwO5BH9z4/KgxRAiEApRy8VKY3UHW2oqw2x1R/sneWW+dFcOFic/15ZF8iU5M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77518},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./nextjs":{"types":"./dist/nextjs.d.ts","import":"./dist/nextjs.mjs","require":"./dist/nextjs.js"}},"gitHead":"171c24a0859ff6fd6df7b02bfecac952d3a663a3","scripts":{"dev":"tsup --watch","test":"tsx --test src/*.test.ts","build":"tsup"},"_npmUser":{"name":"brij-singh","email":"brijsingh@gmail.com"},"repository":{"url":"https://actsasgeek.com/healthcheck","type":"git","directory":"packages/healthcheck"},"_npmVersion":"10.9.2","description":"Dead-simple health check endpoint for Next.js apps with Supabase","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.18.0","tsup":"^8.3.6","typescript":"^5","@types/node":"^22"},"peerDependencies":{"next":">=13.0.0","@supabase/supabase-js":">=2.0.0"},"peerDependenciesMeta":{"@supabase/supabase-js":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/healthcheck_0.2.0_1764718740502_0.12966305243988074","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@actsasgeek/healthcheck","version":"0.3.1","description":"Dead-simple health check endpoint for Next.js apps with Supabase","homepage":"https://www.actsasgeek.com","repository":{"type":"git","url":"https://actsasgeek.com/healthcheck","directory":"packages/healthcheck"},"bugs":{"url":"https://actsasgeek.com/issues"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./nextjs":{"types":"./dist/nextjs.d.ts","import":"./dist/nextjs.mjs","require":"./dist/nextjs.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","test":"tsx --test src/*.test.ts"},"keywords":["healthcheck","monitoring","nextjs","supabase","uptime"],"author":{"name":"ActsAsGeek"},"license":"MIT","devDependencies":{"@types/node":"^22","tsup":"^8.3.6","tsx":"^4.18.0","typescript":"^5"},"peerDependencies":{"next":">=13.0.0","@supabase/supabase-js":">=2.0.0"},"peerDependenciesMeta":{"@supabase/supabase-js":{"optional":true}},"publishConfig":{"access":"public"},"_id":"@actsasgeek/healthcheck@0.3.1","gitHead":"dc226f23dacdc504187a57271f0d36ded1b2e064","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-EEerWel+wIgPiHePRk2DAYYn++Rg+9NCOsGsVotBM4TWBIWb2QCFqFCm3daliTaRHI3mF5HS2A4A6tlKaq9ryA==","shasum":"85bfaf4c577699b1a98776e9e2c7d8923b559eb8","tarball":"https://registry.npmjs.org/@actsasgeek/healthcheck/-/healthcheck-0.3.1.tgz","fileCount":14,"unpackedSize":107454,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDPCFPTABNIVdyqIvoR/jHx6XQm9gmW8CQIR93DbFWGQAiA0YYOpAhvm8xdyUhLR0MWDY0nE0Hfc+y9iF3jjUh4+Eg=="}]},"_npmUser":{"name":"brij-singh","email":"brijsingh@gmail.com"},"directories":{},"maintainers":[{"name":"brij-singh","email":"brijsingh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/healthcheck_0.3.1_1764748512687_0.6236191328854712"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-02T20:34:51.263Z","modified":"2025-12-03T07:55:13.115Z","0.1.0":"2025-12-02T20:34:51.495Z","0.1.1":"2025-12-02T20:48:47.993Z","0.2.0":"2025-12-02T23:39:00.700Z","0.3.1":"2025-12-03T07:55:12.874Z"},"bugs":{"url":"https://actsasgeek.com/issues"},"author":{"name":"ActsAsGeek"},"license":"MIT","homepage":"https://www.actsasgeek.com","keywords":["healthcheck","monitoring","nextjs","supabase","uptime"],"repository":{"type":"git","url":"https://actsasgeek.com/healthcheck","directory":"packages/healthcheck"},"description":"Dead-simple health check endpoint for Next.js apps with Supabase","maintainers":[{"name":"brij-singh","email":"brijsingh@gmail.com"}],"readme":"# @actsasgeek/healthcheck\n\nDead-simple health check endpoint for Next.js apps with Supabase.\n\nPart of [ActsAsGeek](https://www.actsasgeek.com) - Uptime monitoring for developers.\n\n## Installation\n\n```bash\nnpm install @actsasgeek/healthcheck\n```\n\n## Quick Start (30 seconds)\n\n### 1. Add your monitor key to `.env.local`\n\n```env\nACTSASGEEK_MONITOR_KEY=aag_your-project-id_your-secret\n```\n\nGet this key from your [ActsAsGeek dashboard](https://www.actsasgeek.com).\n\n### 2. Create the route\n\n```typescript\n// app/healthcheck/route.ts\nexport { GET } from '@actsasgeek/healthcheck/nextjs'\n```\n\nDone! Your `/healthcheck` endpoint is now ready.\n\n## What It Does\n\n- **Validates requests** from ActsAsGeek using your monitor key or trusted agent detection\n- **Auto-detects Supabase** from your existing environment variables\n- **Returns detailed health info** for authenticated requests\n- **Returns minimal info** for unauthenticated requests (safe for public)\n- **Trusted agent support** - ActsAsGeek monitoring agents bypass signature verification\n\n## Response Format\n\n**Authenticated:**\n```json\n{\n  \"status\": \"healthy\",\n  \"service\": \"your-app\",\n  \"checks\": {\n    \"api\": { \"status\": \"pass\" },\n    \"database\": { \"status\": \"pass\", \"responseTime\": 45 }\n  }\n}\n```\n\n**Unauthenticated:**\n```json\n{\n  \"status\": \"online\",\n  \"service\": \"your-app\"\n}\n```\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `ACTSASGEEK_MONITOR_KEY` | Yes | Your monitor key from ActsAsGeek |\n| `NEXT_PUBLIC_SUPABASE_URL` | No | Auto-detected for database checks |\n| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | No | Auto-detected for database checks |\n| `SERVICE_NAME` | No | Override service name in responses |\n| `HEALTHCHECK_LOG_PINGS` | No | Set to `true` to log pings to database |\n| `HEALTHCHECK_TRUSTED_AGENTS` | No | Additional trusted agent patterns (comma-separated) |\n\n## Trusted Agents\n\nThe package recognizes ActsAsGeek monitoring agents by their User-Agent header and allows them to access full health check details without signature verification.\n\n**Default trusted agents:**\n- `VibeOps-Uptime-Monitor` - ActsAsGeek's primary monitoring agent\n- `ActsAsGeek` - Any request with ActsAsGeek in the User-Agent\n\n**Request behavior by source:**\n\n| Request Source | Auth Required | Full Health Data |\n|----------------|---------------|------------------|\n| VibeOps-Uptime-Monitor/1.0 | No | Yes |\n| ActsAsGeek/* | No | Yes |\n| Signed request (any source) | Yes (verified) | Yes |\n| Other (browser, curl, etc.) | N/A | No (minimal) |\n\n**Adding custom trusted agents:**\n\n```env\nHEALTHCHECK_TRUSTED_AGENTS=MyMonitor,CustomAgent\n```\n\nThis allows you to whitelist additional monitoring services that should receive full health check data.\n\n## Ping Logging\n\nEnable `HEALTHCHECK_LOG_PINGS=true` to record each healthcheck request in your database. This creates an audit trail of monitoring activity on your side.\n\nCreate the table in your Supabase project:\n\n```sql\ncreate table healthcheck_pings (\n  id uuid primary key default gen_random_uuid(),\n  service text not null,\n  domain text,\n  source_ip text,\n  user_agent text,\n  status text not null,\n  checks_run text[] default '{}',\n  created_at timestamptz default now()\n);\n\ncreate index healthcheck_pings_created_at_idx on healthcheck_pings(created_at desc);\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}