diff --git a/JS/edgechains/arakoodev/src/sync-rpc/lib/sync-rpc.ts b/JS/edgechains/arakoodev/src/sync-rpc/lib/sync-rpc.ts index 09d672ca..a53a0a93 100644 --- a/JS/edgechains/arakoodev/src/sync-rpc/lib/sync-rpc.ts +++ b/JS/edgechains/arakoodev/src/sync-rpc/lib/sync-rpc.ts @@ -11,8 +11,8 @@ function createSyncRPC(filename: string) { throw new Error(`File not found: ${absolutePath}`); } - const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sync-rpc-')); - const hash = crypto.createHash('md5').update(absolutePath).digest('hex'); + const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "sync-rpc-")); + const hash = crypto.createHash("md5").update(absolutePath).digest("hex"); const wrapperPath = path.join(tempDir, `wrapper_${hash}.js`); const wrapperCode = ` @@ -50,8 +50,8 @@ function createSyncRPC(filename: string) { try { const output = execSync(`node ${scriptPath}`, { - encoding: 'utf8', - stdio: ['pipe', 'pipe', 'inherit'] + encoding: "utf8", + stdio: ["pipe", "pipe", "inherit"], }); fs.unlinkSync(scriptPath); @@ -65,15 +65,17 @@ function createSyncRPC(filename: string) { } return JSON.stringify(result.result); } catch (parseError: any) { - console.error('Raw output:', trimmedOutput); - throw new Error(`Failed to parse output as JSON: ${parseError.message}\nRaw output: ${trimmedOutput}`); + console.error("Raw output:", trimmedOutput); + throw new Error( + `Failed to parse output as JSON: ${parseError.message}\nRaw output: ${trimmedOutput}` + ); } } catch (error: any) { fs.unlinkSync(scriptPath); if (error) { - console.error('Execution error:', error.message); + console.error("Execution error:", error.message); if (error.stderr) { - console.error('stderr:', error.stderr); + console.error("stderr:", error.stderr); } throw new Error(`Execution error: ${error.message}`); } @@ -82,4 +84,4 @@ function createSyncRPC(filename: string) { }; } -export = createSyncRPC as Function; \ No newline at end of file +export = createSyncRPC as Function; diff --git a/package.json b/package.json index 525f6770..6f08f899 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "dependencies": { "@microsoft/eslint-formatter-sarif": "^3.1.0", "@playwright/test": "^1.46.0", - "@typescript-eslint/eslint-plugin": "^8.8.0", - "@typescript-eslint/parser": "^8.8.0", + "@typescript-eslint/eslint-plugin": "^8.12.2", + "@typescript-eslint/parser": "^8.12.2", "axios": "^1.7.3", "eslint": "^8.57.1", "eslint-config-google": "^0.14.0",