routstrd 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +28 -1
- package/package.json +1 -1
- package/src/cli.ts +31 -0
package/dist/index.js
CHANGED
|
@@ -15596,7 +15596,7 @@ async function isCocodInstalled(cocodPath) {
|
|
|
15596
15596
|
// package.json
|
|
15597
15597
|
var package_default = {
|
|
15598
15598
|
name: "routstrd",
|
|
15599
|
-
version: "0.3.
|
|
15599
|
+
version: "0.3.6",
|
|
15600
15600
|
module: "src/index.ts",
|
|
15601
15601
|
type: "module",
|
|
15602
15602
|
private: false,
|
|
@@ -15761,6 +15761,33 @@ Initialization complete!`);
|
|
|
15761
15761
|
To ensure routstrd persists across system restarts, run: 'routstrd service install'`);
|
|
15762
15762
|
}
|
|
15763
15763
|
program.name("routstrd").description("Routstr daemon - Manage routstr processes").version(package_default.version, "--version", "output the version number");
|
|
15764
|
+
program.command("update").description("Update routstrd and cocod to the latest versions").action(async () => {
|
|
15765
|
+
console.log("Updating routstrd...");
|
|
15766
|
+
const routstrdProc = Bun.spawn(["bun", "install", "-g", "routstrd"], {
|
|
15767
|
+
stdout: "inherit",
|
|
15768
|
+
stderr: "inherit"
|
|
15769
|
+
});
|
|
15770
|
+
const routstrdCode = await routstrdProc.exited;
|
|
15771
|
+
if (routstrdCode !== 0) {
|
|
15772
|
+
console.error("Failed to update routstrd.");
|
|
15773
|
+
process.exit(1);
|
|
15774
|
+
}
|
|
15775
|
+
console.log(`routstrd updated successfully.
|
|
15776
|
+
`);
|
|
15777
|
+
console.log("Updating cocod...");
|
|
15778
|
+
const cocodProc = Bun.spawn(["bun", "install", "-g", "@routstr/cocod"], {
|
|
15779
|
+
stdout: "inherit",
|
|
15780
|
+
stderr: "inherit"
|
|
15781
|
+
});
|
|
15782
|
+
const cocodCode = await cocodProc.exited;
|
|
15783
|
+
if (cocodCode !== 0) {
|
|
15784
|
+
console.error("Failed to update cocod.");
|
|
15785
|
+
process.exit(1);
|
|
15786
|
+
}
|
|
15787
|
+
console.log(`cocod updated successfully.
|
|
15788
|
+
`);
|
|
15789
|
+
console.log("Both routstrd and cocod have been updated!");
|
|
15790
|
+
});
|
|
15764
15791
|
program.command("refund").description("Refund pending tokens and API keys to a specified mint").option("-m, --mint-url <mintUrl>", "Mint URL to refund to (defaults to first mint in wallet)").option("-y, --yes", "Skip confirmation prompt", false).option("--xcashu", "Refund xcashu tokens only (uses refundXcashuTokens)", false).action(async (options) => {
|
|
15765
15792
|
await ensureDaemonRunning();
|
|
15766
15793
|
let mintUrl = options.mintUrl;
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -235,6 +235,37 @@ program
|
|
|
235
235
|
.description("Routstr daemon - Manage routstr processes")
|
|
236
236
|
.version(packageJson.version, "--version", "output the version number");
|
|
237
237
|
|
|
238
|
+
program
|
|
239
|
+
.command("update")
|
|
240
|
+
.description("Update routstrd and cocod to the latest versions")
|
|
241
|
+
.action(async () => {
|
|
242
|
+
console.log("Updating routstrd...");
|
|
243
|
+
const routstrdProc = Bun.spawn(["bun", "install", "-g", "routstrd"], {
|
|
244
|
+
stdout: "inherit",
|
|
245
|
+
stderr: "inherit",
|
|
246
|
+
});
|
|
247
|
+
const routstrdCode = await routstrdProc.exited;
|
|
248
|
+
if (routstrdCode !== 0) {
|
|
249
|
+
console.error("Failed to update routstrd.");
|
|
250
|
+
process.exit(1);
|
|
251
|
+
}
|
|
252
|
+
console.log("routstrd updated successfully.\n");
|
|
253
|
+
|
|
254
|
+
console.log("Updating cocod...");
|
|
255
|
+
const cocodProc = Bun.spawn(["bun", "install", "-g", "@routstr/cocod"], {
|
|
256
|
+
stdout: "inherit",
|
|
257
|
+
stderr: "inherit",
|
|
258
|
+
});
|
|
259
|
+
const cocodCode = await cocodProc.exited;
|
|
260
|
+
if (cocodCode !== 0) {
|
|
261
|
+
console.error("Failed to update cocod.");
|
|
262
|
+
process.exit(1);
|
|
263
|
+
}
|
|
264
|
+
console.log("cocod updated successfully.\n");
|
|
265
|
+
|
|
266
|
+
console.log("Both routstrd and cocod have been updated!");
|
|
267
|
+
});
|
|
268
|
+
|
|
238
269
|
program
|
|
239
270
|
.command("refund")
|
|
240
271
|
.description("Refund pending tokens and API keys to a specified mint")
|