elsemeet-bridge 0.1.1 → 0.1.2
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/elsemeet-bridge.mjs +12 -0
- package/package.json +1 -1
package/dist/elsemeet-bridge.mjs
CHANGED
|
@@ -398,6 +398,7 @@ function selfCommand(script = resolve(process.argv[1] ?? "")) {
|
|
|
398
398
|
return { node: process.execPath, args: [...process.execArgv, script, "--home", HOME] };
|
|
399
399
|
}
|
|
400
400
|
function startBackground(script) {
|
|
401
|
+
refreshAutostartCopy();
|
|
401
402
|
const old = runningPid();
|
|
402
403
|
if (old) killTree(old);
|
|
403
404
|
rmSync(file("run"), { recursive: true, force: true });
|
|
@@ -416,6 +417,17 @@ function autostartOn() {
|
|
|
416
417
|
if (process.platform !== "win32") return false;
|
|
417
418
|
return spawnSync("reg", ["query", RUN_KEY, "/v", RUN_VALUE], { windowsHide: true }).status === 0;
|
|
418
419
|
}
|
|
420
|
+
function refreshAutostartCopy() {
|
|
421
|
+
const me = resolve(process.argv[1] ?? "");
|
|
422
|
+
const app = file("app/elsemeet-bridge.mjs");
|
|
423
|
+
if (!me.endsWith(".mjs") || resolve(app) === me || !autostartOn()) return;
|
|
424
|
+
try {
|
|
425
|
+
mkdirSync(file("app"), { recursive: true });
|
|
426
|
+
copyFileSync(me, app);
|
|
427
|
+
} catch (e) {
|
|
428
|
+
log(`Could not update the copy that starts with Windows: ${e.message}`);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
419
431
|
function setAutostart(on) {
|
|
420
432
|
if (process.platform !== "win32") throw new Error("Starting with the computer is only for Windows for now; run npx elsemeet-bridge start after a restart.");
|
|
421
433
|
if (!on) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elsemeet-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Starts your Claude Code on /work when your Elsemeet project has something for it — connect once, in your project folder: npx elsemeet-bridge",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "elsemeet-bridge": "dist/elsemeet-bridge.mjs" },
|