@lit-protocol/vincent-scaffold-sdk
Version:
Shared build configuration and utilities for Vincent abilities and policies
31 lines (27 loc) âĸ 852 B
JavaScript
const fs = require('fs');
const path = require('path');
const chalk = require('chalk').default || require('chalk');
/**
* Reset E2E state - equivalent to: rm -f .e2e-state.json
*/
async function resetE2E() {
try {
const stateFile = path.resolve('.e2e-state.json');
if (fs.existsSync(stateFile)) {
console.log(chalk.cyan('đ Resetting E2E state...'));
fs.unlinkSync(stateFile);
console.log(chalk.green('â
E2E state file removed successfully!'));
} else {
console.log(chalk.gray('âšī¸ E2E state file does not exist, nothing to reset.'));
}
} catch (error) {
console.log(chalk.red('â Failed to reset E2E state:'));
console.log(chalk.red(error.message));
process.exit(1);
}
}
// Run if called directly
if (require.main === module) {
resetE2E();
}
module.exports = { resetE2E };