diff --git a/package.json b/package.json index 6158e9d..fc23268 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "preview": "vite preview", "clean": "rm -rf dist", "lint": "tsc --noEmit", - "db:sync": "tsx scripts/sync-db-local.ts" + "db:sync": "tsx scripts/sync-db-local.ts", + "sync-registry": "tsx scripts/import-registry.ts" }, "dependencies": { "@google/genai": "^1.29.0", diff --git a/scripts/import-registry.ts b/scripts/import-registry.ts index 2882073..0ebd8d7 100644 --- a/scripts/import-registry.ts +++ b/scripts/import-registry.ts @@ -14,7 +14,8 @@ import { createClient } from "@supabase/supabase-js"; import { readFileSync } from "fs"; import { config } from "dotenv"; -config({ path: ".env.local" }); +config({ path: ".env" }); // base env (service role key lives here) +config({ path: ".env.local" }); // local overrides (takes precedence) const SUPABASE_URL = process.env.SUPABASE_URL || process.env.VITE_SUPABASE_URL; const SUPABASE_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY; @@ -113,8 +114,6 @@ async function main() { naver_blog_url: cols[COL.naver_blog_url]?.trim() || null, naver_place_url: cols[COL.naver_place_url]?.trim() || null, google_maps_url: cols[COL.google_maps_url]?.trim() || null, - verified_by: "scrape", - is_active: true, }); }