upgraded versions and added cocod installation

This commit is contained in:
redshift
2026-03-02 21:50:36 +00:00
parent 8fcf8ffa3a
commit 7b90f356c0
3 changed files with 22 additions and 5 deletions
+4 -4
View File
@@ -9,7 +9,7 @@
"version": "0.1.0",
"dependencies": {
"@cashu/cashu-ts": "^3.1.1",
"@routstr/sdk": "^0.1.1",
"@routstr/sdk": "^0.1.4",
"applesauce-core": "^5.1.0",
"applesauce-relay": "^5.1.0",
"better-sqlite3": "^11.7.2",
@@ -71,9 +71,9 @@
}
},
"node_modules/@routstr/sdk": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@routstr/sdk/-/sdk-0.1.1.tgz",
"integrity": "sha512-0hP6VG2iJMslIdzB0y5O04aDFOPsrJe3nYYfq6Oebe6HeQJTfMWdqOAFYpaX0RmjJG0ONi62/8fbNJOqbq7esA==",
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@routstr/sdk/-/sdk-0.1.4.tgz",
"integrity": "sha512-4NQV7IcB1UkiO2HQa0as5OBu0v3pZ7TO265oTjMNYPtYMdYOSXjF+uPBcHCRJLfVhnTN4OOCmUQnnhYM0gR6Zw==",
"license": "MIT",
"dependencies": {
"@cashu/cashu-ts": "^3.1.1",
+1 -1
View File
@@ -21,7 +21,7 @@
},
"dependencies": {
"@cashu/cashu-ts": "^3.1.1",
"@routstr/sdk": "^0.1.2",
"@routstr/sdk": "^0.1.4",
"applesauce-core": "^5.1.0",
"applesauce-relay": "^5.1.0",
"better-sqlite3": "^11.7.2",
+17
View File
@@ -26,6 +26,23 @@ const cliVersion = "0.1.0";
async function initDaemon(): Promise<void> {
logger.log("Initializing routstrd...");
if (!(await checkCocodInstalled())) {
logger.log("cocod not found. Installing globally with bun...");
const installProc = Bun.spawn(["bun", "install", "--global", "cocod"], {
stdout: "inherit",
stderr: "inherit",
});
const installCode = await installProc.exited;
if (installCode !== 0 || !(await checkCocodInstalled())) {
logger.error("Failed to install cocod. Please run 'bun install --global cocod' manually.");
return;
}
logger.log("cocod installed successfully.");
}
// Create config directory
if (!existsSync(CONFIG_DIR)) {
mkdirSync(CONFIG_DIR, { recursive: true });