mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
go back to localtunnel
This commit is contained in:
42
bin/index.js
42
bin/index.js
@@ -14,6 +14,28 @@ const __dirname = dirname(__filename);
|
||||
const REPO_URL = 'https://github.com/lucas-neynar/frames-v2-quickstart.git';
|
||||
const SCRIPT_VERSION = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8')).version;
|
||||
|
||||
function printWelcomeMessage() {
|
||||
const purple = '\x1b[35m';
|
||||
const blue = '\x1b[34m';
|
||||
const reset = '\x1b[0m';
|
||||
const dim = '\x1b[2m';
|
||||
const bright = '\x1b[1m';
|
||||
|
||||
console.log(`
|
||||
${purple}╔════════════════════════════════════════════════════════════╗${reset}
|
||||
${purple}║ ║${reset}
|
||||
${purple}║${reset} ${bright}Welcome to Frames v2 Quickstart!${reset} ${purple}║${reset}
|
||||
${purple}║${reset} ${dim}The fastest way to build Farcaster Frames${reset} ${purple}║${reset}
|
||||
${purple}║ ║${reset}
|
||||
${purple}╚════════════════════════════════════════════════════════════╝${reset}
|
||||
|
||||
${blue}Version:${reset} ${SCRIPT_VERSION}
|
||||
${blue}Repository:${reset} ${dim}${REPO_URL}${reset}
|
||||
|
||||
Let's create your Frame! 🚀
|
||||
`);
|
||||
}
|
||||
|
||||
async function lookupFidByCustodyAddress(custodyAddress, apiKey) {
|
||||
if (!apiKey) {
|
||||
throw new Error('Neynar API key is required');
|
||||
@@ -42,6 +64,8 @@ async function lookupFidByCustodyAddress(custodyAddress, apiKey) {
|
||||
}
|
||||
|
||||
async function init() {
|
||||
printWelcomeMessage();
|
||||
|
||||
const answers = await inquirer.prompt([
|
||||
{
|
||||
type: 'input',
|
||||
@@ -89,12 +113,6 @@ async function init() {
|
||||
message: 'Enter the URL for your app icon\n(optional -- leave blank to use the default public/icon.png image or replace public/icon.png with your own)\n\nExternal app icon URL:',
|
||||
default: null
|
||||
},
|
||||
{
|
||||
type: 'password',
|
||||
name: 'seedPhrase',
|
||||
message: 'Enter your Farcaster custody account seed phrase to generate a signed manifest for your frame\n(optional -- leave blank to create an unsigned frame)\n(seed phrase is only ever stored locally)\n\nSeed phrase:',
|
||||
default: null
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'useNeynar',
|
||||
@@ -121,6 +139,17 @@ async function init() {
|
||||
answers.neynarApiKey = neynarAnswers.neynarApiKey;
|
||||
}
|
||||
|
||||
// Ask for seed phrase last
|
||||
const seedPhraseAnswer = await inquirer.prompt([
|
||||
{
|
||||
type: 'password',
|
||||
name: 'seedPhrase',
|
||||
message: 'Enter your Farcaster custody account seed phrase to generate a signed manifest for your frame\n(optional -- leave blank to create an unsigned frame)\n(seed phrase is only ever stored locally)\n\nSeed phrase:',
|
||||
default: null
|
||||
}
|
||||
]);
|
||||
answers.seedPhrase = seedPhraseAnswer.seedPhrase;
|
||||
|
||||
const projectName = answers.projectName;
|
||||
const projectPath = path.join(process.cwd(), projectName);
|
||||
|
||||
@@ -177,7 +206,6 @@ async function init() {
|
||||
"lucide-react": "^0.469.0",
|
||||
"next": "15.0.3",
|
||||
"next-auth": "^4.24.11",
|
||||
"ngrok": "^5.0.0-beta.2",
|
||||
"ox": "^0.4.2",
|
||||
"react": "^18",
|
||||
"react-dom": "^18",
|
||||
|
||||
Reference in New Issue
Block a user