From ed21678311981dc11cdf09d2937660aa2522570b Mon Sep 17 00:00:00 2001 From: lucas-neynar Date: Tue, 18 Mar 2025 11:17:17 -0700 Subject: [PATCH] feat: fix build --- bin/index.js | 1 + package.json | 2 +- scripts/build.js | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/index.js b/bin/index.js index aa83c0f..d1cd19c 100755 --- a/bin/index.js +++ b/bin/index.js @@ -329,6 +329,7 @@ async function init() { "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", + "crypto": "^1.0.1", "eslint": "^8", "eslint-config-next": "15.0.3", "localtunnel": "^2.0.2", diff --git a/package.json b/package.json index 6628b2b..97271f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-neynar-farcaster-frame", - "version": "1.0.12", + "version": "1.0.13", "type": "module", "files": [ "bin/index.js" diff --git a/scripts/build.js b/scripts/build.js index eb38302..e068497 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -5,6 +5,7 @@ import { mnemonicToAccount } from 'viem/accounts'; import { fileURLToPath } from 'url'; import inquirer from 'inquirer'; import dotenv from 'dotenv'; +import crypto from 'crypto'; // Load environment variables dotenv.config({ path: '.env.local' }); @@ -238,6 +239,10 @@ async function main() { // FID (if it exists in current env) ...(process.env.FID ? [`FID="${process.env.FID}"`] : []), + // NextAuth configuration + `NEXTAUTH_SECRET="${process.env.NEXTAUTH_SECRET || crypto.randomBytes(32).toString('hex')}"`, + `NEXTAUTH_URL="https://${domain}"`, + // Frame manifest with signature `FRAME_METADATA=${JSON.stringify(metadata)}`, ];