@whiteand/bible-mcp 0.0.2 → 0.0.4
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/bin.js +4 -3
- package/dist/bin.js.map +1 -1
- package/dist/lib/repository.d.ts +7 -1
- package/dist/lib.js +1 -1
- package/dist/repository-mDDehFpl.js +25 -0
- package/dist/repository-mDDehFpl.js.map +1 -0
- package/package.json +5 -2
- package/src/bin/index.ts +5 -2
- package/src/lib/repository.ts +27 -1
- package/dist/repository-BRxOoX1o.js +0 -8
- package/dist/repository-BRxOoX1o.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as Repository } from "./repository-
|
|
2
|
+
import { t as Repository } from "./repository-mDDehFpl.js";
|
|
3
3
|
//#region src/bin/index.ts
|
|
4
|
-
var repo =
|
|
5
|
-
console.log(
|
|
4
|
+
var repo = Repository.fromDirectory("./sources");
|
|
5
|
+
console.log(`Present bibles:`);
|
|
6
|
+
for (const bible of repo.bibles()) console.log(` ${bible.id}`);
|
|
6
7
|
//#endregion
|
|
7
8
|
export {};
|
|
8
9
|
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","names":[],"sources":["../src/bin/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Repository } from \"../lib/repository.ts\";\n\nconst repo =
|
|
1
|
+
{"version":3,"file":"bin.js","names":[],"sources":["../src/bin/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Repository } from \"../lib/repository.ts\";\n\nconst repo = Repository.fromDirectory(\"./sources\");\n\nconsole.log(`Present bibles:`);\nfor (const bible of repo.bibles()) {\n console.log(` ${bible.id}`);\n}\n"],"mappings":";;;AAGA,IAAM,OAAO,WAAW,cAAc,WAAW;AAEjD,QAAQ,IAAI,iBAAiB;AAC7B,KAAK,MAAM,SAAS,KAAK,OAAO,GAC9B,QAAQ,IAAI,KAAK,MAAM,IAAI"}
|
package/dist/lib/repository.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { readBibleModule } from '@whiteand/mybible';
|
|
2
|
+
type BibleModule = ReturnType<typeof readBibleModule>;
|
|
1
3
|
export declare class Repository {
|
|
2
|
-
|
|
4
|
+
readonly biblesById: Map<string, BibleModule>;
|
|
5
|
+
constructor(biblesById: Map<string, BibleModule>);
|
|
6
|
+
bibles(): IteratorObject<BibleModule>;
|
|
7
|
+
static fromDirectory(sourceDirPath: string): Repository;
|
|
3
8
|
}
|
|
9
|
+
export {};
|
package/dist/lib.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Repository } from "./repository-
|
|
1
|
+
import { t as Repository } from "./repository-mDDehFpl.js";
|
|
2
2
|
export { Repository };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { isBibleModuleFilePath, readBibleModule } from "@whiteand/mybible";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
//#region src/lib/repository.ts
|
|
5
|
+
var Repository = class Repository {
|
|
6
|
+
biblesById;
|
|
7
|
+
constructor(biblesById) {
|
|
8
|
+
this.biblesById = biblesById;
|
|
9
|
+
}
|
|
10
|
+
bibles() {
|
|
11
|
+
return this.biblesById.values();
|
|
12
|
+
}
|
|
13
|
+
static fromDirectory(sourceDirPath) {
|
|
14
|
+
const bibleModuleFileNames = fs.readdirSync(sourceDirPath).filter((x) => isBibleModuleFilePath(x));
|
|
15
|
+
const bibleModules = new Map(bibleModuleFileNames.map((name) => {
|
|
16
|
+
const mod = readBibleModule(path.resolve(sourceDirPath, name));
|
|
17
|
+
return [mod.id, mod];
|
|
18
|
+
}));
|
|
19
|
+
return new Repository(bibleModules);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Repository as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=repository-mDDehFpl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-mDDehFpl.js","names":[],"sources":["../src/lib/repository.ts"],"sourcesContent":["import { isBibleModuleFilePath, readBibleModule } from \"@whiteand/mybible\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\ntype BibleModule = ReturnType<typeof readBibleModule>;\n\nexport class Repository {\n constructor(public readonly biblesById: Map<string, BibleModule>) {}\n\n bibles(): IteratorObject<BibleModule> {\n return this.biblesById.values();\n }\n\n static fromDirectory(sourceDirPath: string) {\n const filenames = fs.readdirSync(sourceDirPath);\n const bibleModuleFileNames = filenames.filter((x) =>\n isBibleModuleFilePath(x),\n );\n const bibleModules = new Map(\n bibleModuleFileNames.map((name) => {\n const mod = readBibleModule(path.resolve(sourceDirPath, name));\n\n return [mod.id, mod];\n }),\n );\n\n return new Repository(bibleModules);\n }\n}\n"],"mappings":";;;;AAMA,IAAa,aAAb,MAAa,WAAW;CACM;CAA5B,YAAY,YAAsD;EAAtC,KAAA,aAAA;CAAuC;CAEnE,SAAsC;EACpC,OAAO,KAAK,WAAW,OAAO;CAChC;CAEA,OAAO,cAAc,eAAuB;EAE1C,MAAM,uBADY,GAAG,YAAY,aACJ,CAAA,CAAU,QAAQ,MAC7C,sBAAsB,CAAC,CACzB;EACA,MAAM,eAAe,IAAI,IACvB,qBAAqB,KAAK,SAAS;GACjC,MAAM,MAAM,gBAAgB,KAAK,QAAQ,eAAe,IAAI,CAAC;GAE7D,OAAO,CAAC,IAAI,IAAI,GAAG;EACrB,CAAC,CACH;EAEA,OAAO,IAAI,WAAW,YAAY;CACpC;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whiteand/bible-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./lib": {
|
|
@@ -12,12 +12,15 @@
|
|
|
12
12
|
"types": "./dist/bin/index.d.ts"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"bin":
|
|
15
|
+
"bin": {
|
|
16
|
+
"bible-mcp": "./dist/bin.js"
|
|
17
|
+
},
|
|
16
18
|
"repository": {
|
|
17
19
|
"type": "git",
|
|
18
20
|
"url": "https://github.com/whiteand/bible-mcp.git"
|
|
19
21
|
},
|
|
20
22
|
"scripts": {
|
|
23
|
+
"start": "npm run build && node ./dist/bin.js",
|
|
21
24
|
"dev": "vite",
|
|
22
25
|
"build": "vite build",
|
|
23
26
|
"badge:fallow": "npx fallow health --format badge > .github/badges/health.svg",
|
package/src/bin/index.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Repository } from "../lib/repository.ts";
|
|
3
3
|
|
|
4
|
-
const repo =
|
|
4
|
+
const repo = Repository.fromDirectory("./sources");
|
|
5
5
|
|
|
6
|
-
console.log(
|
|
6
|
+
console.log(`Present bibles:`);
|
|
7
|
+
for (const bible of repo.bibles()) {
|
|
8
|
+
console.log(` ${bible.id}`);
|
|
9
|
+
}
|
package/src/lib/repository.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
import { isBibleModuleFilePath, readBibleModule } from "@whiteand/mybible";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
type BibleModule = ReturnType<typeof readBibleModule>;
|
|
6
|
+
|
|
1
7
|
export class Repository {
|
|
2
|
-
constructor() {}
|
|
8
|
+
constructor(public readonly biblesById: Map<string, BibleModule>) {}
|
|
9
|
+
|
|
10
|
+
bibles(): IteratorObject<BibleModule> {
|
|
11
|
+
return this.biblesById.values();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static fromDirectory(sourceDirPath: string) {
|
|
15
|
+
const filenames = fs.readdirSync(sourceDirPath);
|
|
16
|
+
const bibleModuleFileNames = filenames.filter((x) =>
|
|
17
|
+
isBibleModuleFilePath(x),
|
|
18
|
+
);
|
|
19
|
+
const bibleModules = new Map(
|
|
20
|
+
bibleModuleFileNames.map((name) => {
|
|
21
|
+
const mod = readBibleModule(path.resolve(sourceDirPath, name));
|
|
22
|
+
|
|
23
|
+
return [mod.id, mod];
|
|
24
|
+
}),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return new Repository(bibleModules);
|
|
28
|
+
}
|
|
3
29
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repository-BRxOoX1o.js","names":[],"sources":["../src/lib/repository.ts"],"sourcesContent":["export class Repository {\n constructor() {}\n}\n"],"mappings":";AAAA,IAAa,aAAb,MAAwB;CACtB,cAAc,CAAC;AACjB"}
|