@wbern/cc-ping 1.13.0 → 1.13.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 +12 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1256,7 +1256,7 @@ function resolveExecutable(deps) {
|
|
|
1256
1256
|
args: [process.argv[1]]
|
|
1257
1257
|
};
|
|
1258
1258
|
}
|
|
1259
|
-
function generateLaunchdPlist(options, execInfo, configDir) {
|
|
1259
|
+
function generateLaunchdPlist(options, execInfo, configDir, path) {
|
|
1260
1260
|
const intervalMs = parseIntervalForService(options.interval);
|
|
1261
1261
|
const programArgs = [
|
|
1262
1262
|
...execInfo.args,
|
|
@@ -1280,6 +1280,7 @@ function generateLaunchdPlist(options, execInfo, configDir) {
|
|
|
1280
1280
|
const envVars = {};
|
|
1281
1281
|
if (configDir) envVars.CC_PING_CONFIG = configDir;
|
|
1282
1282
|
if (execInfo.args.length === 0) envVars.CC_PING_BIN = execInfo.executable;
|
|
1283
|
+
if (path) envVars.PATH = path;
|
|
1283
1284
|
let envSection = "";
|
|
1284
1285
|
if (Object.keys(envVars).length > 0) {
|
|
1285
1286
|
const entries = Object.entries(envVars).map(
|
|
@@ -1317,7 +1318,7 @@ ${argsXml}
|
|
|
1317
1318
|
</plist>
|
|
1318
1319
|
`;
|
|
1319
1320
|
}
|
|
1320
|
-
function generateSystemdUnit(options, execInfo, configDir) {
|
|
1321
|
+
function generateSystemdUnit(options, execInfo, configDir, path) {
|
|
1321
1322
|
const intervalMs = parseIntervalForService(options.interval);
|
|
1322
1323
|
const programArgs = [
|
|
1323
1324
|
...execInfo.args,
|
|
@@ -1337,6 +1338,7 @@ function generateSystemdUnit(options, execInfo, configDir) {
|
|
|
1337
1338
|
if (configDir) envPairs.push(`CC_PING_CONFIG=${configDir}`);
|
|
1338
1339
|
if (execInfo.args.length === 0)
|
|
1339
1340
|
envPairs.push(`CC_PING_BIN=${execInfo.executable}`);
|
|
1341
|
+
if (path) envPairs.push(`PATH=${path}`);
|
|
1340
1342
|
const envLine = envPairs.map((p) => `
|
|
1341
1343
|
Environment=${p}`).join("");
|
|
1342
1344
|
return `[Unit]
|
|
@@ -1408,11 +1410,12 @@ async function installService(options, deps) {
|
|
|
1408
1410
|
execSync: _execSync
|
|
1409
1411
|
});
|
|
1410
1412
|
const configDir = _configDir || void 0;
|
|
1413
|
+
const envPath = process.env.PATH;
|
|
1411
1414
|
let content;
|
|
1412
1415
|
if (_platform === "darwin") {
|
|
1413
|
-
content = generateLaunchdPlist(options, execInfo, configDir);
|
|
1416
|
+
content = generateLaunchdPlist(options, execInfo, configDir, envPath);
|
|
1414
1417
|
} else {
|
|
1415
|
-
content = generateSystemdUnit(options, execInfo, configDir);
|
|
1418
|
+
content = generateSystemdUnit(options, execInfo, configDir, envPath);
|
|
1416
1419
|
}
|
|
1417
1420
|
_mkdirSync(dirname(path), { recursive: true });
|
|
1418
1421
|
_writeFileSync(path, content);
|
|
@@ -2092,7 +2095,7 @@ function getDeferredHandles() {
|
|
|
2092
2095
|
}
|
|
2093
2096
|
return deferred;
|
|
2094
2097
|
}
|
|
2095
|
-
var program = new Command().name("cc-ping").description("Ping Claude Code sessions to trigger quota windows early").version("1.13.
|
|
2098
|
+
var program = new Command().name("cc-ping").description("Ping Claude Code sessions to trigger quota windows early").version("1.13.1").option(
|
|
2096
2099
|
"--config <path>",
|
|
2097
2100
|
"Path to config directory (default: ~/.config/cc-ping, env: CC_PING_CONFIG)"
|
|
2098
2101
|
).hook("preAction", (thisCommand) => {
|
|
@@ -2321,7 +2324,7 @@ daemon.command("start").description("Start the daemon process").option(
|
|
|
2321
2324
|
bell: opts.bell,
|
|
2322
2325
|
notify: opts.notify,
|
|
2323
2326
|
smartSchedule,
|
|
2324
|
-
version: "1.13.
|
|
2327
|
+
version: "1.13.1"
|
|
2325
2328
|
});
|
|
2326
2329
|
if (!result.success) {
|
|
2327
2330
|
console.error(result.error);
|
|
@@ -2357,7 +2360,7 @@ daemon.command("stop").description("Stop the daemon process").action(async () =>
|
|
|
2357
2360
|
daemon.command("status").description("Show daemon status").option("--json", "Output as JSON", false).option("--censor", "Mask account handles in output (for screenshots)").action(async (opts) => {
|
|
2358
2361
|
const { getServiceStatus: getServiceStatus2 } = await Promise.resolve().then(() => (init_service(), service_exports));
|
|
2359
2362
|
const svc = getServiceStatus2();
|
|
2360
|
-
const status = getDaemonStatus({ currentVersion: "1.13.
|
|
2363
|
+
const status = getDaemonStatus({ currentVersion: "1.13.1" });
|
|
2361
2364
|
if (opts.json) {
|
|
2362
2365
|
const serviceInfo = svc.installed ? {
|
|
2363
2366
|
service: {
|
|
@@ -2418,7 +2421,7 @@ daemon.command("status").description("Show daemon status").option("--json", "Out
|
|
|
2418
2421
|
if (status.versionMismatch) {
|
|
2419
2422
|
console.log(
|
|
2420
2423
|
yellow(
|
|
2421
|
-
` Warning: daemon is running v${status.daemonVersion} but v${"1.13.
|
|
2424
|
+
` Warning: daemon is running v${status.daemonVersion} but v${"1.13.1"} is installed.`
|
|
2422
2425
|
)
|
|
2423
2426
|
);
|
|
2424
2427
|
console.log(
|
|
@@ -2486,7 +2489,7 @@ daemon.command("_run", { hidden: true }).option("--interval-ms <ms>", "Ping inte
|
|
|
2486
2489
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2487
2490
|
intervalMs,
|
|
2488
2491
|
configDir: resolveConfigDir2(),
|
|
2489
|
-
version: "1.13.
|
|
2492
|
+
version: "1.13.1"
|
|
2490
2493
|
});
|
|
2491
2494
|
}
|
|
2492
2495
|
await runDaemonWithDefaults(intervalMs, {
|