rulekeeper 0.1.1 → 0.1.3
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/LICENSE +21 -21
- package/README.md +467 -465
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/package.json +66 -64
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import { createRequire } from "module";
|
|
4
5
|
import { Command } from "commander";
|
|
6
|
+
import updateNotifier from "update-notifier";
|
|
5
7
|
|
|
6
8
|
// src/commands/init.ts
|
|
7
9
|
import { join as join5 } from "path";
|
|
@@ -221,13 +223,15 @@ async function hashFile(filePath) {
|
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
// src/lib/source.ts
|
|
226
|
+
var IGNORED_FILES = ["readme.md"];
|
|
224
227
|
async function getAvailableRules(config) {
|
|
225
228
|
const sourcePath = config.source.path;
|
|
226
229
|
if (!fileExists(sourcePath)) {
|
|
227
230
|
return [];
|
|
228
231
|
}
|
|
229
232
|
const files = await listFiles(sourcePath, ".md");
|
|
230
|
-
|
|
233
|
+
const filteredFiles = files.filter((file) => !IGNORED_FILES.includes(file.toLowerCase()));
|
|
234
|
+
return filteredFiles.map((file) => ({
|
|
231
235
|
name: getRuleName(file),
|
|
232
236
|
file,
|
|
233
237
|
path: join3(sourcePath, file)
|
|
@@ -476,7 +480,7 @@ async function inputSourcePath() {
|
|
|
476
480
|
async function inputGitUrl() {
|
|
477
481
|
return await p.text({
|
|
478
482
|
message: "Enter the Git repository URL:",
|
|
479
|
-
placeholder: "
|
|
483
|
+
placeholder: "https://github.com/adxmcollins/rulekeeper-rules.git",
|
|
480
484
|
validate: (value) => {
|
|
481
485
|
if (!value) return "URL is required";
|
|
482
486
|
return void 0;
|
|
@@ -1804,8 +1808,11 @@ async function doctor() {
|
|
|
1804
1808
|
}
|
|
1805
1809
|
|
|
1806
1810
|
// src/index.ts
|
|
1811
|
+
var require2 = createRequire(import.meta.url);
|
|
1812
|
+
var packageJson = require2("../package.json");
|
|
1813
|
+
updateNotifier({ pkg: packageJson }).notify({ isGlobal: true });
|
|
1807
1814
|
var program = new Command();
|
|
1808
|
-
program.name("rulekeeper").description("Sync and manage Claude Code rules across projects").version(
|
|
1815
|
+
program.name("rulekeeper").description("Sync and manage Claude Code rules across projects").version(packageJson.version);
|
|
1809
1816
|
program.command("init").description("Interactive global setup").option("-f, --force", "Overwrite existing configuration").action(async (options) => {
|
|
1810
1817
|
await init({ force: options.force });
|
|
1811
1818
|
});
|