fix: remove commonjs syntax

This commit is contained in:
lucas-neynar 2025-03-13 13:04:17 -07:00
parent de626cac17
commit 317e302e48
No known key found for this signature in database
2 changed files with 9 additions and 11 deletions

View File

@ -1,12 +1,12 @@
#!/usr/bin/env node #!/usr/bin/env node
const inquirer = require('inquirer'); import inquirer from 'inquirer';
const { fileURLToPath } = require('url'); import { fileURLToPath } from 'url';
const { dirname } = require('path'); import { dirname } from 'path';
const { execSync } = require('child_process'); import { execSync } from 'child_process';
const fs = require('fs'); import fs from 'fs';
const path = require('path'); import path from 'path';
const { generateManifest } = require('./manifest.js'); import { generateManifest } from './manifest.js';
const __filename = fileURLToPath(import.meta.url); const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename); const __dirname = dirname(__filename);

View File

@ -1,7 +1,7 @@
// utils to generate a manifest.json file for a frames v2 app // utils to generate a manifest.json file for a frames v2 app
const { mnemonicToAccount } = require('viem/accounts'); import { mnemonicToAccount } from 'viem/accounts';
async function generateManifest(fid, seedPhrase) { export async function generateManifest(fid, seedPhrase) {
if (!Number.isInteger(fid) || fid <= 0) { if (!Number.isInteger(fid) || fid <= 0) {
throw new Error('FID must be a positive integer'); throw new Error('FID must be a positive integer');
} }
@ -39,5 +39,3 @@ async function generateManifest(fid, seedPhrase) {
return jsonJfs; return jsonJfs;
} }
module.exports = { generateManifest };