@hasna/configs 0.2.22 → 0.2.23
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/index.js
CHANGED
|
@@ -4119,6 +4119,53 @@ program.command("watch").description("Watch known config files for changes and a
|
|
|
4119
4119
|
setInterval(tick, interval);
|
|
4120
4120
|
await new Promise(() => {});
|
|
4121
4121
|
});
|
|
4122
|
+
program.command("report").description("Summary of stored configs, drift, and ecosystem health").option("--json", "output as JSON").option("--markdown", "output as markdown").action(async () => {
|
|
4123
|
+
const stats = getConfigStats();
|
|
4124
|
+
const allConfigs = listConfigs();
|
|
4125
|
+
const fileConfigs = allConfigs.filter((c) => c.kind === "file");
|
|
4126
|
+
const refConfigs = allConfigs.filter((c) => c.kind === "reference");
|
|
4127
|
+
const templates = allConfigs.filter((c) => c.is_template);
|
|
4128
|
+
const profiles = listProfiles();
|
|
4129
|
+
let drifted = 0, missing = 0;
|
|
4130
|
+
for (const c of fileConfigs) {
|
|
4131
|
+
if (!c.target_path)
|
|
4132
|
+
continue;
|
|
4133
|
+
const abs = expandPath(c.target_path);
|
|
4134
|
+
if (!existsSync7(abs)) {
|
|
4135
|
+
missing++;
|
|
4136
|
+
continue;
|
|
4137
|
+
}
|
|
4138
|
+
const disk = readFileSync5(abs, "utf-8");
|
|
4139
|
+
const { content: redactedDisk } = redactContent(disk, c.format);
|
|
4140
|
+
if (redactedDisk !== c.content)
|
|
4141
|
+
drifted++;
|
|
4142
|
+
}
|
|
4143
|
+
const byAgent = {};
|
|
4144
|
+
for (const c of allConfigs)
|
|
4145
|
+
byAgent[c.agent] = (byAgent[c.agent] || 0) + 1;
|
|
4146
|
+
const projectConfigs = allConfigs.filter((c) => c.target_path && !c.target_path.startsWith("~/."));
|
|
4147
|
+
console.log(chalk.bold(`configs report
|
|
4148
|
+
`));
|
|
4149
|
+
console.log(` Total: ${allConfigs.length} configs (${fileConfigs.length} files, ${refConfigs.length} references)`);
|
|
4150
|
+
console.log(` Templates: ${templates.length} (with {{VAR}} placeholders)`);
|
|
4151
|
+
console.log(` Profiles: ${profiles.length}`);
|
|
4152
|
+
console.log(` Drift: ${drifted === 0 ? chalk.green("0 \u2713") : chalk.yellow(String(drifted))} drifted, ${missing} missing`);
|
|
4153
|
+
console.log(` Secrets: ${chalk.green("0 \u2713")} (redacted on ingest)
|
|
4154
|
+
`);
|
|
4155
|
+
console.log(chalk.cyan(" By agent:"));
|
|
4156
|
+
for (const [agent, count] of Object.entries(byAgent).sort((a, b) => b[1] - a[1])) {
|
|
4157
|
+
console.log(` ${agent.padEnd(10)} ${count}`);
|
|
4158
|
+
}
|
|
4159
|
+
console.log(chalk.cyan(`
|
|
4160
|
+
By category:`));
|
|
4161
|
+
for (const [cat, count] of Object.entries(stats).filter(([k]) => k !== "total").sort((a, b) => b[1] - a[1])) {
|
|
4162
|
+
console.log(` ${cat.padEnd(16)} ${count}`);
|
|
4163
|
+
}
|
|
4164
|
+
if (projectConfigs.length > 0) {
|
|
4165
|
+
console.log(chalk.cyan(`
|
|
4166
|
+
Project configs: ${projectConfigs.length}`));
|
|
4167
|
+
}
|
|
4168
|
+
});
|
|
4122
4169
|
program.command("clean").description("Remove configs from DB whose target files no longer exist on disk").option("--dry-run", "show what would be removed").action(async (opts) => {
|
|
4123
4170
|
const configs = listConfigs({ kind: "file" });
|
|
4124
4171
|
let removed = 0;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-batch.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply-batch.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-dir.test.d.ts","sourceRoot":"","sources":["../../src/lib/sync-dir.test.ts"],"names":[],"mappings":""}
|
package/dist/mcp/index.js
CHANGED
|
@@ -997,7 +997,7 @@ var init_sync = __esm(() => {
|
|
|
997
997
|
var require_package = __commonJS((exports, module) => {
|
|
998
998
|
module.exports = {
|
|
999
999
|
name: "@hasna/configs",
|
|
1000
|
-
version: "0.2.
|
|
1000
|
+
version: "0.2.23",
|
|
1001
1001
|
description: "AI coding agent configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
|
|
1002
1002
|
type: "module",
|
|
1003
1003
|
main: "dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/configs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"description": "AI coding agent configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + REST API + Dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|