@driftless-sh/cli 0.1.28 → 0.1.30
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/index.js +7 -24
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -214539,7 +214539,7 @@ async function installSkillCommand() {
|
|
|
214539
214539
|
// src/commands/init.ts
|
|
214540
214540
|
function getVersion() {
|
|
214541
214541
|
try {
|
|
214542
|
-
return "0.1.
|
|
214542
|
+
return "0.1.30";
|
|
214543
214543
|
} catch {
|
|
214544
214544
|
return "0.0.0";
|
|
214545
214545
|
}
|
|
@@ -214984,27 +214984,7 @@ async function initCommand(args) {
|
|
|
214984
214984
|
}
|
|
214985
214985
|
step("creating context", `${watchersCreated} watchers \u2713`);
|
|
214986
214986
|
const existingDocs = detectExistingDocs(cwd);
|
|
214987
|
-
|
|
214988
|
-
for (const doc of existingDocs) {
|
|
214989
|
-
try {
|
|
214990
|
-
const fullPath = (0, import_node_path4.resolve)(cwd, doc.path);
|
|
214991
|
-
const fileContent = (0, import_node_fs4.readFileSync)(fullPath, "utf-8");
|
|
214992
|
-
await api.post(`/workspaces/${workspaceSlug}/watchers`, {
|
|
214993
|
-
name: doc.name,
|
|
214994
|
-
what: doc.what,
|
|
214995
|
-
how: "Anchored documentation",
|
|
214996
|
-
pattern: doc.pattern,
|
|
214997
|
-
decisions: fileContent.slice(0, 2e3),
|
|
214998
|
-
file_content: fileContent,
|
|
214999
|
-
ownership: "@team",
|
|
215000
|
-
where_repos: [repo.id],
|
|
215001
|
-
created_by: "driftless-init"
|
|
215002
|
-
});
|
|
215003
|
-
docsAnchored++;
|
|
215004
|
-
} catch {
|
|
215005
|
-
}
|
|
215006
|
-
}
|
|
215007
|
-
step("anchoring docs", `${docsAnchored} docs \u2713`);
|
|
214987
|
+
step("detecting docs", `${existingDocs.length} found (not auto-synced)`);
|
|
215008
214988
|
let skillLine = "skipped";
|
|
215009
214989
|
try {
|
|
215010
214990
|
const skillResult = await runInstallSkill(cwd);
|
|
@@ -215018,7 +214998,7 @@ async function initCommand(args) {
|
|
|
215018
214998
|
console.log("\u2713 repo context bootstrapped");
|
|
215019
214999
|
console.log(` \u251C\u2500 watchers ${watchersCreated}`);
|
|
215020
215000
|
console.log(` \u251C\u2500 rules ${rulesCreated}`);
|
|
215021
|
-
console.log(` \u251C\u2500 docs
|
|
215001
|
+
console.log(` \u251C\u2500 docs found ${existingDocs.length} (ask your agent to sync them)`);
|
|
215022
215002
|
console.log(` \u251C\u2500 components ${components.length}`);
|
|
215023
215003
|
console.log(` \u2514\u2500 relations ${relationCount}`);
|
|
215024
215004
|
console.log("");
|
|
@@ -215026,6 +215006,7 @@ async function initCommand(args) {
|
|
|
215026
215006
|
console.log(" next \u2192 driftless context list");
|
|
215027
215007
|
console.log("");
|
|
215028
215008
|
console.log(DIVIDER);
|
|
215009
|
+
process.exit(0);
|
|
215029
215010
|
}
|
|
215030
215011
|
|
|
215031
215012
|
// src/commands/scan.ts
|
|
@@ -216246,6 +216227,7 @@ function saveConfig(apiKey, apiUrl) {
|
|
|
216246
216227
|
console.log(` Config: ${CONFIG_PATH2}`);
|
|
216247
216228
|
console.log();
|
|
216248
216229
|
console.log("Try: driftless scan --diff");
|
|
216230
|
+
process.exit(0);
|
|
216249
216231
|
} catch (err) {
|
|
216250
216232
|
console.error("Failed to save config:", err);
|
|
216251
216233
|
process.exit(1);
|
|
@@ -216391,6 +216373,7 @@ ${okCount} ok, ${warnCount} warnings, ${failCount} failures`);
|
|
|
216391
216373
|
console.log("\nFix failures before running `driftless init` or `driftless scan`.");
|
|
216392
216374
|
process.exit(1);
|
|
216393
216375
|
}
|
|
216376
|
+
process.exit(0);
|
|
216394
216377
|
}
|
|
216395
216378
|
function pad2(s, n) {
|
|
216396
216379
|
if (s.length >= n) return s;
|
|
@@ -216398,7 +216381,7 @@ function pad2(s, n) {
|
|
|
216398
216381
|
}
|
|
216399
216382
|
|
|
216400
216383
|
// src/index.ts
|
|
216401
|
-
var VERSION = "0.1.
|
|
216384
|
+
var VERSION = "0.1.30";
|
|
216402
216385
|
var HELP_TEXT = `Driftless CLI v${VERSION} \u2014 Living repo context for humans and coding agents
|
|
216403
216386
|
|
|
216404
216387
|
Install: npm install -g @driftless-sh/cli
|