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
const inquirer = require('inquirer');
const { fileURLToPath } = require('url');
const { dirname } = require('path');
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
const { generateManifest } = require('./manifest.js');
import inquirer from 'inquirer';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
import { execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
import { generateManifest } from './manifest.js';
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

View File

@ -1,7 +1,7 @@
// 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) {
throw new Error('FID must be a positive integer');
}
@ -39,5 +39,3 @@ async function generateManifest(fid, seedPhrase) {
return jsonJfs;
}
module.exports = { generateManifest };