nusus 0.6.2 → 0.7.1
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/README.md +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/models.d.ts +5 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/transport.d.ts +2 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +13 -2
- package/dist/transport.js.map +1 -1
- package/dist/turath/citations.d.ts +13 -3
- package/dist/turath/citations.d.ts.map +1 -1
- package/dist/turath/citations.js +23 -7
- package/dist/turath/citations.js.map +1 -1
- package/dist/turath/client.d.ts +1 -0
- package/dist/turath/client.d.ts.map +1 -1
- package/dist/turath/client.js +48 -40
- package/dist/turath/client.js.map +1 -1
- package/dist/turath/decode.d.ts +10 -0
- package/dist/turath/decode.d.ts.map +1 -0
- package/dist/turath/decode.js +104 -0
- package/dist/turath/decode.js.map +1 -0
- package/dist/turath/excerpt.d.ts +17 -13
- package/dist/turath/excerpt.d.ts.map +1 -1
- package/dist/turath/excerpt.js +1 -1
- package/dist/turath/excerpt.js.map +1 -1
- package/dist/turath/index.d.ts +1 -1
- package/dist/turath/index.d.ts.map +1 -1
- package/dist/turath/index.js +1 -1
- package/dist/turath/index.js.map +1 -1
- package/dist/turath/json.d.ts +9 -0
- package/dist/turath/json.d.ts.map +1 -0
- package/dist/turath/json.js +74 -0
- package/dist/turath/json.js.map +1 -0
- package/dist/turath/normalize.d.ts +5 -4
- package/dist/turath/normalize.d.ts.map +1 -1
- package/dist/turath/normalize.js +45 -74
- package/dist/turath/normalize.js.map +1 -1
- package/dist/turath/raw-types.d.ts +16 -22
- package/dist/turath/raw-types.d.ts.map +1 -1
- package/package.json +4 -1
- package/scripts/search.mjs +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"raw-types.d.ts","sourceRoot":"","sources":["../../src/turath/raw-types.ts"],"names":[],"mappings":"AAAA,
|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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nusus",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "TypeScript SDK and agent CLI for searching and citing classical Islamic and Arabic texts via Turath",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"turath",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -p tsconfig.json",
|
|
46
|
+
"lint": "oxlint",
|
|
46
47
|
"prepack": "npm run build",
|
|
47
48
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
48
49
|
"test": "bun test ./tests",
|
|
@@ -51,6 +52,8 @@
|
|
|
51
52
|
"catalog:books": "bun scripts/refresh-catalog.mjs books"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@oxlint/plugins": "1.79.0",
|
|
56
|
+
"oxlint": "1.79.0",
|
|
54
57
|
"typescript": "^7.0.2"
|
|
55
58
|
},
|
|
56
59
|
"engines": {
|
package/scripts/search.mjs
CHANGED
|
@@ -92,7 +92,9 @@ const writeText = (record) => {
|
|
|
92
92
|
break;
|
|
93
93
|
case "passage":
|
|
94
94
|
process.stdout.write(
|
|
95
|
-
`passage\t${record.book?.id ?? "?"}\t${record.citation ?? ""}\t${record.url ?? ""}
|
|
95
|
+
`passage\t${record.book?.id ?? "?"}\t${record.citation ?? ""}\t${record.url ?? ""}` +
|
|
96
|
+
(record.alternateUrls?.shamela ? `\t${record.alternateUrls.shamela}` : "") +
|
|
97
|
+
`\t${preview(record.text)}\n`,
|
|
96
98
|
);
|
|
97
99
|
break;
|
|
98
100
|
case "toc-entry":
|
|
@@ -123,6 +125,7 @@ const toPassageRecord = (passage) => {
|
|
|
123
125
|
url: passage.url,
|
|
124
126
|
citation: passage.citation,
|
|
125
127
|
};
|
|
128
|
+
if (passage.alternateUrls) record.alternateUrls = passage.alternateUrls;
|
|
126
129
|
if (passage.author) record.author = passage.author;
|
|
127
130
|
if (passage.category) record.category = passage.category;
|
|
128
131
|
if (passage.snippet !== undefined) record.snippet = passage.snippet;
|