leedab 0.1.5 → 0.1.6
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/bin/leedab.js +13 -1
- package/dist/paths.d.ts +2 -0
- package/dist/paths.js +4 -0
- package/package.json +1 -1
package/bin/leedab.js
CHANGED
|
@@ -114,7 +114,19 @@ program
|
|
|
114
114
|
console.log(` Key: ${license.key.slice(0, 16)}...`);
|
|
115
115
|
console.log(` Tier: ${license.tier}`);
|
|
116
116
|
console.log(` Status: ${license.valid ? chalk.green(license.status) : chalk.red(license.status)}`);
|
|
117
|
-
|
|
117
|
+
// Count local allowlist users as seats
|
|
118
|
+
let localSeats = 0;
|
|
119
|
+
try {
|
|
120
|
+
const { readFile } = await import("node:fs/promises");
|
|
121
|
+
const { resolve } = await import("node:path");
|
|
122
|
+
const ocConfig = JSON.parse(await readFile(resolve(STATE_DIR, "openclaw.json"), "utf-8"));
|
|
123
|
+
const allUsers = new Set();
|
|
124
|
+
for (const ch of Object.values(ocConfig.channels || {})) {
|
|
125
|
+
for (const u of ch.allowFrom || []) allUsers.add(u);
|
|
126
|
+
}
|
|
127
|
+
localSeats = allUsers.size;
|
|
128
|
+
} catch {}
|
|
129
|
+
console.log(` Seats: ${localSeats} / ${license.maxSeats}`);
|
|
118
130
|
console.log(` Checked: ${new Date(license.validatedAt).toLocaleDateString()}`);
|
|
119
131
|
console.log("");
|
|
120
132
|
});
|
package/dist/paths.d.ts
ADDED
package/dist/paths.js
ADDED