@ncukondo/reference-manager 0.13.3 → 0.13.5
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/chunks/{action-menu-Dc3wCGod.js → action-menu-svBJmZdi.js} +3 -3
- package/dist/chunks/{action-menu-Dc3wCGod.js.map → action-menu-svBJmZdi.js.map} +1 -1
- package/dist/chunks/{index-C0TB_ha0.js → index-4KSTJ3rp.js} +26 -15
- package/dist/chunks/{index-C0TB_ha0.js.map → index-4KSTJ3rp.js.map} +1 -1
- package/dist/chunks/{index-CU6eBQaB.js → index-CaAOawzv.js} +22 -14
- package/dist/chunks/{index-CU6eBQaB.js.map → index-CaAOawzv.js.map} +1 -1
- package/dist/chunks/{search-prompt-RtHDJFgL.js → search-prompt-Bg9usf8f.js} +32 -8
- package/dist/chunks/search-prompt-Bg9usf8f.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/features/interactive/search-prompt.d.ts +11 -0
- package/dist/features/interactive/search-prompt.d.ts.map +1 -1
- package/dist/features/operations/add.d.ts +2 -2
- package/dist/features/operations/add.d.ts.map +1 -1
- package/dist/features/operations/cite.d.ts +4 -0
- package/dist/features/operations/cite.d.ts.map +1 -1
- package/dist/features/operations/operations-library.d.ts +3 -1
- package/dist/features/operations/operations-library.d.ts.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/search-prompt-RtHDJFgL.js.map +0 -1
|
@@ -9,14 +9,14 @@ import * as path from "node:path";
|
|
|
9
9
|
import { join, extname } from "node:path";
|
|
10
10
|
import { spawnSync, spawn } from "node:child_process";
|
|
11
11
|
import { mkdir, unlink, rename, copyFile, rm, readFile } from "node:fs/promises";
|
|
12
|
-
import { u as updateReference, B as BUILTIN_STYLES, s as startServerWithFileWatcher, g as getFulltextAttachmentTypes } from "./index-
|
|
12
|
+
import { u as updateReference, B as BUILTIN_STYLES, s as startServerWithFileWatcher, g as getFulltextAttachmentTypes } from "./index-4KSTJ3rp.js";
|
|
13
13
|
import { o as openWithSystemApp, l as loadConfig } from "./loader-C1EpnyPm.js";
|
|
14
14
|
import "@citation-js/core";
|
|
15
15
|
import "@citation-js/plugin-csl";
|
|
16
16
|
import process$1, { stdin, stdout } from "node:process";
|
|
17
17
|
import { serve } from "@hono/node-server";
|
|
18
18
|
const name = "@ncukondo/reference-manager";
|
|
19
|
-
const version$1 = "0.13.
|
|
19
|
+
const version$1 = "0.13.5";
|
|
20
20
|
const description$1 = "A local reference management tool using CSL-JSON as the single source of truth";
|
|
21
21
|
const packageJson = {
|
|
22
22
|
name,
|
|
@@ -27319,8 +27319,9 @@ class StdioServerTransport {
|
|
|
27319
27319
|
}
|
|
27320
27320
|
}
|
|
27321
27321
|
class OperationsLibrary {
|
|
27322
|
-
constructor(library) {
|
|
27322
|
+
constructor(library, citationConfig) {
|
|
27323
27323
|
this.library = library;
|
|
27324
|
+
this.citationConfig = citationConfig;
|
|
27324
27325
|
}
|
|
27325
27326
|
// ILibrary delegation
|
|
27326
27327
|
find(identifier, options) {
|
|
@@ -27343,19 +27344,26 @@ class OperationsLibrary {
|
|
|
27343
27344
|
}
|
|
27344
27345
|
// High-level operations
|
|
27345
27346
|
async search(options) {
|
|
27346
|
-
const { searchReferences } = await import("./index-
|
|
27347
|
+
const { searchReferences } = await import("./index-4KSTJ3rp.js").then((n) => n.d);
|
|
27347
27348
|
return searchReferences(this.library, options);
|
|
27348
27349
|
}
|
|
27349
27350
|
async list(options) {
|
|
27350
|
-
const { listReferences } = await import("./index-
|
|
27351
|
+
const { listReferences } = await import("./index-4KSTJ3rp.js").then((n) => n.l);
|
|
27351
27352
|
return listReferences(this.library, options ?? {});
|
|
27352
27353
|
}
|
|
27353
27354
|
async cite(options) {
|
|
27354
|
-
const { citeReferences } = await import("./index-
|
|
27355
|
-
|
|
27355
|
+
const { citeReferences } = await import("./index-4KSTJ3rp.js").then((n) => n.b);
|
|
27356
|
+
const defaultStyle = options.defaultStyle ?? this.citationConfig?.defaultStyle;
|
|
27357
|
+
const cslDirectory = options.cslDirectory ?? this.citationConfig?.cslDirectory;
|
|
27358
|
+
const mergedOptions = {
|
|
27359
|
+
...options,
|
|
27360
|
+
...defaultStyle !== void 0 && { defaultStyle },
|
|
27361
|
+
...cslDirectory !== void 0 && { cslDirectory }
|
|
27362
|
+
};
|
|
27363
|
+
return citeReferences(this.library, mergedOptions);
|
|
27356
27364
|
}
|
|
27357
27365
|
async import(inputs, options) {
|
|
27358
|
-
const { addReferences } = await import("./index-
|
|
27366
|
+
const { addReferences } = await import("./index-4KSTJ3rp.js").then((n) => n.a);
|
|
27359
27367
|
return addReferences(inputs, this.library, options ?? {});
|
|
27360
27368
|
}
|
|
27361
27369
|
}
|
|
@@ -27365,7 +27373,7 @@ async function createMcpContext(options) {
|
|
|
27365
27373
|
});
|
|
27366
27374
|
const libraryPath = options.libraryPath ?? config2.library;
|
|
27367
27375
|
const library = await Library.load(libraryPath);
|
|
27368
|
-
const libraryOperations = new OperationsLibrary(library);
|
|
27376
|
+
const libraryOperations = new OperationsLibrary(library, config2.citation);
|
|
27369
27377
|
const fileWatcher = new FileWatcher(libraryPath, {
|
|
27370
27378
|
debounceMs: config2.watch.debounceMs,
|
|
27371
27379
|
maxRetries: config2.watch.maxRetries,
|
|
@@ -27867,7 +27875,7 @@ async function mcpStart(options) {
|
|
|
27867
27875
|
async function executeRemove(options, context) {
|
|
27868
27876
|
const { identifier, idType = "id", fulltextDirectory, deleteFulltext = false } = options;
|
|
27869
27877
|
if (context.mode === "local" && deleteFulltext && fulltextDirectory) {
|
|
27870
|
-
const { removeReference } = await import("./index-
|
|
27878
|
+
const { removeReference } = await import("./index-4KSTJ3rp.js").then((n) => n.r);
|
|
27871
27879
|
return removeReference(context.library, {
|
|
27872
27880
|
identifier,
|
|
27873
27881
|
idType,
|
|
@@ -27995,8 +28003,8 @@ function validateInteractiveOptions(options) {
|
|
|
27995
28003
|
async function executeInteractiveSearch(options, context, config2) {
|
|
27996
28004
|
validateInteractiveOptions(options);
|
|
27997
28005
|
const { checkTTY } = await import("./tty-CDBIQraQ.js");
|
|
27998
|
-
const { runSearchPrompt } = await import("./search-prompt-
|
|
27999
|
-
const { runActionMenu } = await import("./action-menu-
|
|
28006
|
+
const { runSearchPrompt } = await import("./search-prompt-Bg9usf8f.js");
|
|
28007
|
+
const { runActionMenu } = await import("./action-menu-svBJmZdi.js");
|
|
28000
28008
|
const { search } = await import("./file-watcher-D2Y-SlcE.js").then((n) => n.y);
|
|
28001
28009
|
const { tokenize } = await import("./file-watcher-D2Y-SlcE.js").then((n) => n.x);
|
|
28002
28010
|
checkTTY();
|
|
@@ -28737,7 +28745,7 @@ async function createExecutionContext(config2, loadLibrary) {
|
|
|
28737
28745
|
const library = await loadLibrary(config2.library);
|
|
28738
28746
|
return {
|
|
28739
28747
|
mode: "local",
|
|
28740
|
-
library: new OperationsLibrary(library)
|
|
28748
|
+
library: new OperationsLibrary(library, config2.citation)
|
|
28741
28749
|
};
|
|
28742
28750
|
}
|
|
28743
28751
|
async function readJsonInput(file) {
|
|
@@ -29528,4 +29536,4 @@ export {
|
|
|
29528
29536
|
formatBibtex as f,
|
|
29529
29537
|
main as m
|
|
29530
29538
|
};
|
|
29531
|
-
//# sourceMappingURL=index-
|
|
29539
|
+
//# sourceMappingURL=index-CaAOawzv.js.map
|