mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-18 17:09:47 -05:00
fix: SIWN dependencies
This commit is contained in:
16
bin/init.js
16
bin/init.js
@@ -455,7 +455,6 @@ export async function init(projectName = null, autoAcceptDefaults = false, apiKe
|
||||
// Add dependencies
|
||||
packageJson.dependencies = {
|
||||
'@farcaster/auth-client': '>=0.3.0 <1.0.0',
|
||||
'@farcaster/auth-kit': '>=0.6.0 <1.0.0',
|
||||
'@farcaster/miniapp-node': '>=0.1.5 <1.0.0',
|
||||
'@farcaster/miniapp-sdk': '>=0.1.6 <1.0.0',
|
||||
'@farcaster/miniapp-wagmi-connector': '^1.0.0',
|
||||
@@ -482,6 +481,12 @@ export async function init(projectName = null, autoAcceptDefaults = false, apiKe
|
||||
siwe: '^3.0.0',
|
||||
};
|
||||
|
||||
// Add auth-kit and quick-auth dependencies if useSponsoredSigner is true
|
||||
if (answers.useSponsoredSigner) {
|
||||
packageJson.dependencies['@farcaster/auth-kit'] = '>=0.6.0 <1.0.0';
|
||||
packageJson.dependencies['next-auth'] = '^4.24.11';
|
||||
}
|
||||
|
||||
packageJson.devDependencies = {
|
||||
"@types/inquirer": "^9.0.8",
|
||||
"@types/node": "^20",
|
||||
@@ -692,6 +697,15 @@ export async function init(projectName = null, autoAcceptDefaults = false, apiKe
|
||||
fs.rmSync(binPath, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
// Remove NeynarAuthButton directory if useSponsoredSigner is false
|
||||
if (!answers.useSponsoredSigner) {
|
||||
console.log('\nRemoving NeynarAuthButton directory (useSponsoredSigner is false)...');
|
||||
const neynarAuthButtonPath = path.join(projectPath, 'src', 'components', 'ui', 'NeynarAuthButton');
|
||||
if (fs.existsSync(neynarAuthButtonPath)) {
|
||||
fs.rmSync(neynarAuthButtonPath, { recursive: true, force: true });
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize git repository
|
||||
console.log('\nInitializing git repository...');
|
||||
execSync('git init', { cwd: projectPath });
|
||||
|
||||
Reference in New Issue
Block a user