diff --git a/package.json b/package.json index c22b51e..f319e1a 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "db:migrate": "drizzle-kit migrate", "db:push": "drizzle-kit push", "db:studio": "drizzle-kit studio", - "generate-transactions": "ts-node -r dotenv/config scripts/generateCitizenTransactions.ts" + "generate-transactions": "ts-node -r dotenv/config scripts/generateCitizenTransactions.ts", + "db:populate": "node --experimental-specifier-resolution=node --loader ts-node/esm src/server/db/migrations/populate_db.ts" }, "dependencies": { "@next/third-parties": "^14.2.14", @@ -41,6 +42,14 @@ "viem": "^2.21.18", "zod": "^3.23.8" }, + "ts-node": { + "esm": true, + "experimentalSpecifierResolution": "node", + "project": "./tsconfig.json", + "require": [ + "tsconfig-paths/register" + ] + }, "devDependencies": { "@types/node": "^22.5.2", "@types/pg": "^8.11.10", @@ -52,6 +61,7 @@ "postcss": "^8", "tailwindcss": "^3.4.1", "ts-node": "^10.9.2", + "tsconfig-paths": "^4.2.0", "typescript": "^5" } } diff --git a/yarn.lock b/yarn.lock index 6cc4207..1d5ef59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2841,6 +2841,11 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" +json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: version "3.3.5" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a" @@ -3724,6 +3729,7 @@ streamsearch@^1.1.0: integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: + name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3979,6 +3985,15 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" +tsconfig-paths@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" + integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== + dependencies: + json5 "^2.2.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^2.4.0: version "2.7.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"