remove debug logs

This commit is contained in:
lucas-neynar 2025-03-15 13:58:44 -07:00
parent 7ad6530cb8
commit d5cbd099cd
No known key found for this signature in database
2 changed files with 2 additions and 35 deletions

View File

@ -225,15 +225,7 @@ async function init() {
try { try {
console.log(`\nCloning repository from ${REPO_URL}...`); console.log(`\nCloning repository from ${REPO_URL}...`);
execSync(`git clone -b main ${REPO_URL} "${projectPath}" && cd "${projectPath}" && git fetch origin main && git reset --hard origin/main`); execSync(`git clone -b main ${REPO_URL} "${projectPath}" && cd "${projectPath}" && git fetch origin main && git reset --hard origin/main`);
// Debug: Check initial page.tsx content
const pagePath = path.join(projectPath, 'src', 'app', 'page.tsx');
if (fs.existsSync(pagePath)) {
console.log('\nInitial page.tsx content:');
console.log(fs.readFileSync(pagePath, 'utf8'));
} else {
console.log('\npage.tsx does not exist after clone');
}
} catch (error) { } catch (error) {
console.error('\n❌ Error: Failed to create project directory.'); console.error('\n❌ Error: Failed to create project directory.');
console.error('Please make sure you have write permissions and try again.'); console.error('Please make sure you have write permissions and try again.');
@ -244,13 +236,6 @@ async function init() {
console.log('\nRemoving .git directory...'); console.log('\nRemoving .git directory...');
fs.rmSync(path.join(projectPath, '.git'), { recursive: true, force: true }); fs.rmSync(path.join(projectPath, '.git'), { recursive: true, force: true });
// Debug: Check page.tsx content after .git removal
const pagePath = path.join(projectPath, 'src', 'app', 'page.tsx');
if (fs.existsSync(pagePath)) {
console.log('\npage.tsx content after .git removal:');
console.log(fs.readFileSync(pagePath, 'utf8'));
}
// Remove package-lock.json // Remove package-lock.json
console.log('\nRemoving package-lock.json...'); console.log('\nRemoving package-lock.json...');
const packageLockPath = path.join(projectPath, 'package-lock.json'); const packageLockPath = path.join(projectPath, 'package-lock.json');
@ -263,12 +248,6 @@ async function init() {
const packageJsonPath = path.join(projectPath, 'package.json'); const packageJsonPath = path.join(projectPath, 'package.json');
let packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); let packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
// Debug: Check page.tsx content after package.json update
if (fs.existsSync(pagePath)) {
console.log('\npage.tsx content after package.json update:');
console.log(fs.readFileSync(pagePath, 'utf8'));
}
packageJson.name = projectName; packageJson.name = projectName;
packageJson.version = '0.1.0'; packageJson.version = '0.1.0';
delete packageJson.author; delete packageJson.author;
@ -381,22 +360,10 @@ async function init() {
// Install dependencies // Install dependencies
console.log('\nInstalling dependencies...'); console.log('\nInstalling dependencies...');
// Debug: Check page.tsx content before npm install
if (fs.existsSync(pagePath)) {
console.log('\npage.tsx content before npm install:');
console.log(fs.readFileSync(pagePath, 'utf8'));
}
execSync('npm cache clean --force', { cwd: projectPath, stdio: 'inherit' }); execSync('npm cache clean --force', { cwd: projectPath, stdio: 'inherit' });
execSync('npm install', { cwd: projectPath, stdio: 'inherit' }); execSync('npm install', { cwd: projectPath, stdio: 'inherit' });
// Debug: Check page.tsx content after npm install
if (fs.existsSync(pagePath)) {
console.log('\npage.tsx content after npm install:');
console.log(fs.readFileSync(pagePath, 'utf8'));
}
// Remove the bin directory // Remove the bin directory
console.log('\nRemoving bin directory...'); console.log('\nRemoving bin directory...');
const binPath = path.join(projectPath, 'bin'); const binPath = path.join(projectPath, 'bin');

View File

@ -1,6 +1,6 @@
{ {
"name": "create-neynar-farcaster-frame", "name": "create-neynar-farcaster-frame",
"version": "1.0.5", "version": "1.0.6",
"type": "module", "type": "module",
"files": [ "files": [
"bin/index.js" "bin/index.js"