mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 20:38:22 +00:00
upgraded versions and added cocod installation
This commit is contained in:
Generated
+4
-4
@@ -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
@@ -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
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user