Skip to content

Commit f0ad3b0

Browse files
committed
chore: reduce noise
1 parent 630f2c2 commit f0ad3b0

File tree

7 files changed

+20
-29
lines changed

7 files changed

+20
-29
lines changed

typescript/solver/scripts/solver-add.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ async function getSolverName(cliName?: string): Promise<string> {
2828

2929
const solverPath = path.join(PATHS.solversDir, cliName);
3030
if (existsSync(solverPath)) {
31-
throw new Error(
32-
`Solver "${cliName}" already exists. Please choose a different name.`,
33-
);
31+
throw new Error(`Solver "${cliName}" already exists. Please choose a different name.`);
3432
}
3533

3634
return cliName;

typescript/solver/scripts/solver-remove.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import {
1111
} from "./utils.js";
1212

1313
function cancelOp() {
14-
console.log("\nOperation cancelled.");
14+
console.log('\nOperation cancelled.');
1515
process.exit(0);
1616
}
1717

1818
async function removeSolver() {
19-
process.stdin.on("keypress", (_, key) => {
20-
if (key.name === "q") {
19+
process.stdin.on('keypress', (_, key) => {
20+
if (key.name === 'q') {
2121
cancelOp();
2222
}
2323
});
@@ -30,16 +30,15 @@ async function removeSolver() {
3030
}
3131

3232
while (true) {
33-
const choices = existingSolvers.map((solver) => ({
33+
const choices = existingSolvers.map(solver => ({
3434
name: solver,
3535
value: solver,
36-
description: `Remove solver "${solver}" and all related files`,
36+
description: `Remove solver "${solver}" and all related files`
3737
}));
3838

3939
try {
4040
const selectedSolvers = await checkbox({
41-
message:
42-
"Select solvers to remove (space to select, enter to confirm, q to quit):",
41+
message: "Select solvers to remove (space to select, enter to confirm, q to quit):",
4342
choices,
4443
pageSize: Math.min(choices.length, 10),
4544
loop: true,
@@ -52,7 +51,7 @@ async function removeSolver() {
5251
const solverList = selectedSolvers.join(", ");
5352
const shouldProceed = await confirm({
5453
message: `Are you sure you want to remove the following solvers: ${solverList}?`,
55-
default: false,
54+
default: false
5655
});
5756

5857
if (!shouldProceed) {
@@ -63,9 +62,7 @@ async function removeSolver() {
6362
for (const name of selectedSolvers) {
6463
// Remove solver directory
6564
await fs.rm(path.join(PATHS.solversDir, name), { recursive: true });
66-
console.log(
67-
`✓ Removed solver directory: ${path.join(PATHS.solversDir, name)}`,
68-
);
65+
console.log(`✓ Removed solver directory: ${path.join(PATHS.solversDir, name)}`);
6966

7067
// Update main solvers index.ts
7168
await updateSolversIndex(name, true);
@@ -89,7 +86,7 @@ async function removeSolver() {
8986
return;
9087
}
9188
} catch (error) {
92-
if (error.message?.includes("User force closed")) {
89+
if (error.message?.includes('User force closed')) {
9390
cancelOp();
9491
}
9592

typescript/solver/scripts/templates/config/allowBlockLists.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ const allowBlockLists: AllowBlockLists = {
3131
AllowBlockListsSchema.parse(allowBlockLists);
3232
3333
export default allowBlockLists;
34-
`;
34+
`;

typescript/solver/scripts/templates/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import allowBlockLists from "./allowBlockLists.js";
33
import metadata from "./metadata.js";
44
55
export { allowBlockLists, metadata };
6-
`;
6+
`;

typescript/solver/scripts/templates/config/metadata.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
export const metadataTemplate = (
2-
name: string,
3-
contractAddress: string,
4-
chainName: string,
5-
) => `
1+
export const metadataTemplate = (name: string, contractAddress: string, chainName: string) => `
62
import { BaseMetadataSchema } from '../../types.js';
73
84
// TODO: Update with actual contract address and chain name before using in production
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
export * from "./types.js";
2-
export * from "./listener.js";
3-
export * from "./filler.js";
4-
export * from "./config/index.js";
5-
export * from "./config/allowBlockLists.js";
6-
export * from "./config/metadata.js";
1+
export * from './types.js';
2+
export * from './listener.js';
3+
export * from './filler.js';
4+
export * from './config/index.js';
5+
export * from './config/allowBlockLists.js';
6+
export * from './config/metadata.js';

typescript/solver/scripts/templates/rules/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ import { type RulesMap } from "../../types.js";
1414
*/
1515
1616
export const rules: RulesMap = {};
17-
`;
17+
`;

0 commit comments

Comments
 (0)