shared-things-server 1.0.0 → 1.0.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/dist/cli.js +2 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -408,6 +408,7 @@ function registerRoutes(app, db) {
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
// src/cli.ts
|
|
411
|
+
var pkg = JSON.parse(fs2.readFileSync(new URL("../package.json", import.meta.url), "utf-8"));
|
|
411
412
|
var DATA_DIR2 = process.env.DATA_DIR || path2.join(os2.homedir(), ".shared-things-server");
|
|
412
413
|
var PID_FILE = path2.join(DATA_DIR2, "server.pid");
|
|
413
414
|
var LOG_FILE = path2.join(DATA_DIR2, "server.log");
|
|
@@ -430,7 +431,7 @@ function isServerRunning() {
|
|
|
430
431
|
}
|
|
431
432
|
}
|
|
432
433
|
var program = new Command();
|
|
433
|
-
program.name("shared-things-server").description("Sync server for Things 3 projects").version(
|
|
434
|
+
program.name("shared-things-server").description("Sync server for Things 3 projects").version(pkg.version);
|
|
434
435
|
program.command("start").description("Start the sync server").option("-p, --port <port>", "Port to listen on", "3334").option("--host <host>", "Host to bind to", "0.0.0.0").option("-d, --detach", "Run server in background (detached mode)").action(async (options) => {
|
|
435
436
|
const PORT = parseInt(options.port, 10);
|
|
436
437
|
const HOST = options.host;
|