mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-09 01:03:11 +00:00
25 lines
735 B
JavaScript
25 lines
735 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { execSync } from "child_process";
|
|
import { dirname, join } from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
// In development: scripts are in packages/run/scripts
|
|
// In published package: scripts are in node_modules/@waku/run/dist/scripts
|
|
const packageRoot = __dirname.includes("dist")
|
|
? join(__dirname, "..", "..")
|
|
: join(__dirname, "..");
|
|
|
|
try {
|
|
execSync("docker compose logs -f", {
|
|
cwd: packageRoot,
|
|
stdio: "inherit"
|
|
});
|
|
} catch (error: unknown) {
|
|
const err = error as { message?: string };
|
|
process.stderr.write(`Error viewing logs: ${err.message || String(error)}\n`);
|
|
process.exit(1);
|
|
}
|