bantou 0.1.0 → 0.1.1
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/README.md +1 -1
- package/dist/cli.js +3 -3
- package/dist/daemon.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { runDaemon } from "./daemon.js";
|
|
5
|
-
const DEFAULT_CONFIG = join(homedir(), ".config", "bantou
|
|
5
|
+
const DEFAULT_CONFIG = join(homedir(), ".config", "bantou", "config.json");
|
|
6
6
|
/** 引数を解釈する。不正な引数は null を返す。 */
|
|
7
7
|
function parseArgs(argv) {
|
|
8
8
|
let config = DEFAULT_CONFIG;
|
|
@@ -18,10 +18,10 @@ function parseArgs(argv) {
|
|
|
18
18
|
}
|
|
19
19
|
const args = parseArgs(process.argv.slice(2));
|
|
20
20
|
if (!args) {
|
|
21
|
-
console.error("usage: bantou
|
|
21
|
+
console.error("usage: bantou [--config <path>]");
|
|
22
22
|
process.exit(2);
|
|
23
23
|
}
|
|
24
24
|
runDaemon(args.config).catch((e) => {
|
|
25
|
-
console.error(`bantou
|
|
25
|
+
console.error(`bantou: ${e instanceof Error ? e.message : String(e)}`);
|
|
26
26
|
process.exit(1);
|
|
27
27
|
});
|
package/dist/daemon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { loadConfig } from "./config.js";
|
|
2
2
|
import { prepareWorkspace } from "./workspace.js";
|
|
3
3
|
const log = (msg) => {
|
|
4
|
-
console.log(`${new Date().toISOString()} bantou
|
|
4
|
+
console.log(`${new Date().toISOString()} bantou: ${msg}`);
|
|
5
5
|
};
|
|
6
6
|
/** 起動して常駐する。SIGTERM / SIGINT で後始末して exit 0。 */
|
|
7
7
|
export async function runDaemon(configPath) {
|