@ncukondo/reference-manager 0.33.2 → 0.33.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/dist/chunks/{SearchableMultiSelect-CvthFBf3.js → SearchableMultiSelect-C1bNcyEp.js} +2 -2
- package/dist/chunks/{SearchableMultiSelect-CvthFBf3.js.map → SearchableMultiSelect-C1bNcyEp.js.map} +1 -1
- package/dist/chunks/{action-menu-BWSeIIPB.js → action-menu-DBurp2_T.js} +3 -3
- package/dist/chunks/{action-menu-BWSeIIPB.js.map → action-menu-DBurp2_T.js.map} +1 -1
- package/dist/chunks/{checker-Bsxp9sCm.js → checker-DNZIxT-K.js} +4 -4
- package/dist/chunks/{checker-Bsxp9sCm.js.map → checker-DNZIxT-K.js.map} +1 -1
- package/dist/chunks/{crossref-client-CYwiZLF9.js → crossref-client-Ch4VorVK.js} +2 -2
- package/dist/chunks/{crossref-client-CYwiZLF9.js.map → crossref-client-Ch4VorVK.js.map} +1 -1
- package/dist/chunks/{fix-interaction-Ebrjh1H0.js → fix-interaction-DYmWi0uI.js} +5 -5
- package/dist/chunks/{fix-interaction-Ebrjh1H0.js.map → fix-interaction-DYmWi0uI.js.map} +1 -1
- package/dist/chunks/{index-BrfxHfSZ.js → index-Br6PW0sE.js} +4 -4
- package/dist/chunks/{index-BrfxHfSZ.js.map → index-Br6PW0sE.js.map} +1 -1
- package/dist/chunks/{index-CA7km4m0.js → index-D1nWqhHq.js} +271 -270
- package/dist/chunks/index-D1nWqhHq.js.map +1 -0
- package/dist/chunks/{index-QxdPt5c9.js → index-Dc9_7yoj.js} +3 -3
- package/dist/chunks/index-Dc9_7yoj.js.map +1 -0
- package/dist/chunks/{index-Bm25py-B.js → index-NVk2MuLS.js} +38 -28
- package/dist/chunks/index-NVk2MuLS.js.map +1 -0
- package/dist/chunks/{pubmed-client-Cw87sE2s.js → pubmed-client-oyH3AjO7.js} +2 -2
- package/dist/chunks/{pubmed-client-Cw87sE2s.js.map → pubmed-client-oyH3AjO7.js.map} +1 -1
- package/dist/chunks/{reference-select-CsXBOR8g.js → reference-select-BDL2RR3f.js} +3 -3
- package/dist/chunks/{reference-select-CsXBOR8g.js.map → reference-select-BDL2RR3f.js.map} +1 -1
- package/dist/chunks/{style-select-Bo9u9rtE.js → style-select-BVVwP7BF.js} +3 -3
- package/dist/chunks/{style-select-Bo9u9rtE.js.map → style-select-BVVwP7BF.js.map} +1 -1
- package/dist/cli/commands/add.d.ts +5 -0
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/server.js +3 -3
- package/package.json +1 -1
- package/dist/chunks/index-Bm25py-B.js.map +0 -1
- package/dist/chunks/index-CA7km4m0.js.map +0 -1
- package/dist/chunks/index-QxdPt5c9.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a } from "./index-
|
|
2
|
-
import { d, g, l, o, s } from "./index-
|
|
1
|
+
import { a } from "./index-D1nWqhHq.js";
|
|
2
|
+
import { d, g, l, o, s } from "./index-NVk2MuLS.js";
|
|
3
3
|
export {
|
|
4
4
|
a as addAttachment,
|
|
5
5
|
d as detachAttachment,
|
|
@@ -8,4 +8,4 @@ export {
|
|
|
8
8
|
o as openAttachment,
|
|
9
9
|
s as syncAttachments
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=index-
|
|
11
|
+
//# sourceMappingURL=index-Dc9_7yoj.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dc9_7yoj.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command, Option } from "commander";
|
|
2
|
-
import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename,
|
|
2
|
+
import { i as isUrl, n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, b as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, c as generateFilename, h as findFulltextFiles, j as findFulltextFile, k as extensionToFormat, l as fulltextAttach, m as fulltextDiscover, o as fulltextFetch, q as fulltextConvert, r as fulltextGet, s as getExtension, t as getDefaultExportFromCjs, B as BUILTIN_STYLES, u as packageJson, v as getFulltextAttachmentTypes, w as startServerWithFileWatcher, x as BUILTIN_CONVERTER_NAMES, y as BUILTIN_CONVERTER_INFO } from "./index-D1nWqhHq.js";
|
|
3
3
|
import { i as isEqual, M as MANAGED_CUSTOM_FIELDS, w as writeFileAtomic, L as Library, h as CslItemSchema, p as pickDefined, a as sortOrderSchema, z as paginationOptionsSchema, F as FileWatcher, b as sortFieldSchema, y as searchSortFieldSchema } from "./file-watcher-CWHg1yol.js";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import { promises, readFileSync, existsSync, mkdirSync, writeFileSync, lstatSync, unlinkSync, rmSync, symlinkSync } from "node:fs";
|
|
@@ -448,6 +448,15 @@ async function autoFetchFulltext(addedItems, context, options) {
|
|
|
448
448
|
}
|
|
449
449
|
return results;
|
|
450
450
|
}
|
|
451
|
+
function printUrlProgress(inputs, quiet) {
|
|
452
|
+
if (quiet) return;
|
|
453
|
+
for (const input of inputs) {
|
|
454
|
+
if (isUrl(input)) {
|
|
455
|
+
process.stderr.write(`Fetching ${input}...
|
|
456
|
+
`);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
451
460
|
async function listAttachments(library, options) {
|
|
452
461
|
const { identifier, idType = "id", role } = options;
|
|
453
462
|
const item = await library.find(identifier, { idType });
|
|
@@ -915,15 +924,15 @@ class OperationsLibrary {
|
|
|
915
924
|
}
|
|
916
925
|
// High-level operations
|
|
917
926
|
async search(options) {
|
|
918
|
-
const { searchReferences } = await import("./index-
|
|
927
|
+
const { searchReferences } = await import("./index-D1nWqhHq.js").then((n) => n.I);
|
|
919
928
|
return searchReferences(this.library, options);
|
|
920
929
|
}
|
|
921
930
|
async list(options) {
|
|
922
|
-
const { listReferences } = await import("./index-
|
|
931
|
+
const { listReferences } = await import("./index-D1nWqhHq.js").then((n) => n.H);
|
|
923
932
|
return listReferences(this.library, options ?? {});
|
|
924
933
|
}
|
|
925
934
|
async cite(options) {
|
|
926
|
-
const { citeReferences } = await import("./index-
|
|
935
|
+
const { citeReferences } = await import("./index-D1nWqhHq.js").then((n) => n.G);
|
|
927
936
|
const defaultStyle = options.defaultStyle ?? this.citationConfig?.defaultStyle;
|
|
928
937
|
const cslDirectory = options.cslDirectory ?? this.citationConfig?.cslDirectory;
|
|
929
938
|
const mergedOptions = {
|
|
@@ -934,36 +943,36 @@ class OperationsLibrary {
|
|
|
934
943
|
return citeReferences(this.library, mergedOptions);
|
|
935
944
|
}
|
|
936
945
|
async import(inputs, options) {
|
|
937
|
-
const { addReferences } = await import("./index-
|
|
946
|
+
const { addReferences } = await import("./index-D1nWqhHq.js").then((n) => n.E);
|
|
938
947
|
return addReferences(inputs, this.library, options ?? {});
|
|
939
948
|
}
|
|
940
949
|
async check(options) {
|
|
941
|
-
const { checkReferences } = await import("./index-
|
|
950
|
+
const { checkReferences } = await import("./index-D1nWqhHq.js").then((n) => n.F);
|
|
942
951
|
return checkReferences(this.library, options);
|
|
943
952
|
}
|
|
944
953
|
// Attachment operations
|
|
945
954
|
async attachAdd(options) {
|
|
946
|
-
const { addAttachment: addAttachment2 } = await import("./index-
|
|
955
|
+
const { addAttachment: addAttachment2 } = await import("./index-Dc9_7yoj.js");
|
|
947
956
|
return addAttachment2(this.library, options);
|
|
948
957
|
}
|
|
949
958
|
async attachList(options) {
|
|
950
|
-
const { listAttachments: listAttachments2 } = await import("./index-
|
|
959
|
+
const { listAttachments: listAttachments2 } = await import("./index-Dc9_7yoj.js");
|
|
951
960
|
return listAttachments2(this.library, options);
|
|
952
961
|
}
|
|
953
962
|
async attachGet(options) {
|
|
954
|
-
const { getAttachment: getAttachment2 } = await import("./index-
|
|
963
|
+
const { getAttachment: getAttachment2 } = await import("./index-Dc9_7yoj.js");
|
|
955
964
|
return getAttachment2(this.library, options);
|
|
956
965
|
}
|
|
957
966
|
async attachDetach(options) {
|
|
958
|
-
const { detachAttachment: detachAttachment2 } = await import("./index-
|
|
967
|
+
const { detachAttachment: detachAttachment2 } = await import("./index-Dc9_7yoj.js");
|
|
959
968
|
return detachAttachment2(this.library, options);
|
|
960
969
|
}
|
|
961
970
|
async attachSync(options) {
|
|
962
|
-
const { syncAttachments: syncAttachments2 } = await import("./index-
|
|
971
|
+
const { syncAttachments: syncAttachments2 } = await import("./index-Dc9_7yoj.js");
|
|
963
972
|
return syncAttachments2(this.library, options);
|
|
964
973
|
}
|
|
965
974
|
async attachOpen(options) {
|
|
966
|
-
const { openAttachment: openAttachment2 } = await import("./index-
|
|
975
|
+
const { openAttachment: openAttachment2 } = await import("./index-Dc9_7yoj.js");
|
|
967
976
|
return openAttachment2(this.library, options);
|
|
968
977
|
}
|
|
969
978
|
}
|
|
@@ -1828,7 +1837,7 @@ function getAttachExitCode(result) {
|
|
|
1828
1837
|
}
|
|
1829
1838
|
async function executeInteractiveSelect$3(context, config2) {
|
|
1830
1839
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
1831
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
1840
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
1832
1841
|
const allReferences = await context.library.getAll();
|
|
1833
1842
|
const identifiers = await withAlternateScreen2(
|
|
1834
1843
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -2493,7 +2502,7 @@ async function handleCheckAction(identifiers, options, globalOpts) {
|
|
|
2493
2502
|
const jsonOptions = buildJsonOptionsFromRefs(options, outputFormat, result, allRefs);
|
|
2494
2503
|
outputCheckResult(result, outputFormat, jsonOptions);
|
|
2495
2504
|
if (options.fix && result.summary.warnings > 0 && allRefs) {
|
|
2496
|
-
const { runFixInteraction } = await import("./fix-interaction-
|
|
2505
|
+
const { runFixInteraction } = await import("./fix-interaction-DYmWi0uI.js");
|
|
2497
2506
|
const findItem = (id2) => allRefs.find((item) => item.id === id2);
|
|
2498
2507
|
const fixResult = await runFixInteraction(result.results, context.library, findItem);
|
|
2499
2508
|
const removedSuffix = fixResult.removed.length > 0 ? `, ${fixResult.removed.length} removed` : "";
|
|
@@ -2561,7 +2570,7 @@ function outputCheckError(error, format2) {
|
|
|
2561
2570
|
}
|
|
2562
2571
|
async function selectReferencesInteractively(context, config2) {
|
|
2563
2572
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
2564
|
-
const { selectReferenceItemsOrExit } = await import("./reference-select-
|
|
2573
|
+
const { selectReferenceItemsOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
2565
2574
|
const allReferences = await context.library.getAll();
|
|
2566
2575
|
if (allReferences.length === 0) {
|
|
2567
2576
|
process.stderr.write("No references in library.\n");
|
|
@@ -2629,8 +2638,8 @@ function getCiteExitCode(result) {
|
|
|
2629
2638
|
}
|
|
2630
2639
|
async function executeInteractiveCite(options, context, config2) {
|
|
2631
2640
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
2632
|
-
const { runCiteFlow } = await import("./index-
|
|
2633
|
-
const { buildStyleChoices, listCustomStyles } = await import("./style-select-
|
|
2641
|
+
const { runCiteFlow } = await import("./index-Br6PW0sE.js");
|
|
2642
|
+
const { buildStyleChoices, listCustomStyles } = await import("./style-select-BVVwP7BF.js");
|
|
2634
2643
|
const { search } = await import("./file-watcher-CWHg1yol.js").then((n) => n.B);
|
|
2635
2644
|
const { tokenize } = await import("./file-watcher-CWHg1yol.js").then((n) => n.A);
|
|
2636
2645
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
@@ -7322,7 +7331,7 @@ function formatEditOutput(result) {
|
|
|
7322
7331
|
}
|
|
7323
7332
|
async function executeInteractiveEdit(options, context, config2) {
|
|
7324
7333
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
7325
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
7334
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
7326
7335
|
const allReferences = await context.library.getAll();
|
|
7327
7336
|
const identifiers = await withAlternateScreen2(
|
|
7328
7337
|
() => selectReferencesOrExit(allReferences, { multiSelect: true }, config2.cli.tui)
|
|
@@ -10898,7 +10907,7 @@ function getFulltextExitCode(result) {
|
|
|
10898
10907
|
}
|
|
10899
10908
|
async function executeInteractiveSelect$2(context, config2, multiSelect = false) {
|
|
10900
10909
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
10901
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
10910
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
10902
10911
|
const allReferences = await context.library.getAll();
|
|
10903
10912
|
const identifiers = await withAlternateScreen2(
|
|
10904
10913
|
() => selectReferencesOrExit(allReferences, { multiSelect }, config2.cli.tui)
|
|
@@ -32555,7 +32564,7 @@ async function mcpStart(options) {
|
|
|
32555
32564
|
async function executeRemove(options, context) {
|
|
32556
32565
|
const { identifier, idType = "id", fulltextDirectory, deleteFulltext = false } = options;
|
|
32557
32566
|
if (context.mode === "local" && deleteFulltext && fulltextDirectory) {
|
|
32558
|
-
const { removeReference } = await import("./index-
|
|
32567
|
+
const { removeReference } = await import("./index-D1nWqhHq.js").then((n) => n.C);
|
|
32559
32568
|
return removeReference(context.library, {
|
|
32560
32569
|
identifier,
|
|
32561
32570
|
idType,
|
|
@@ -32610,7 +32619,7 @@ Continue?`;
|
|
|
32610
32619
|
}
|
|
32611
32620
|
async function executeInteractiveRemove(context, config2) {
|
|
32612
32621
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32613
|
-
const { selectReferenceItemsOrExit } = await import("./reference-select-
|
|
32622
|
+
const { selectReferenceItemsOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
32614
32623
|
const allReferences = await context.library.getAll();
|
|
32615
32624
|
const selectedItems = await withAlternateScreen2(
|
|
32616
32625
|
() => selectReferenceItemsOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -32835,7 +32844,7 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32835
32844
|
validateInteractiveOptions(options);
|
|
32836
32845
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
32837
32846
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32838
|
-
const { runSearchFlow } = await import("./index-
|
|
32847
|
+
const { runSearchFlow } = await import("./index-Br6PW0sE.js");
|
|
32839
32848
|
const { search } = await import("./file-watcher-CWHg1yol.js").then((n) => n.B);
|
|
32840
32849
|
const { tokenize } = await import("./file-watcher-CWHg1yol.js").then((n) => n.A);
|
|
32841
32850
|
checkTTY();
|
|
@@ -32854,7 +32863,7 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32854
32863
|
})
|
|
32855
32864
|
);
|
|
32856
32865
|
if (result.selectedItems && !result.cancelled) {
|
|
32857
|
-
const { isSideEffectAction } = await import("./action-menu-
|
|
32866
|
+
const { isSideEffectAction } = await import("./action-menu-DBurp2_T.js");
|
|
32858
32867
|
if (isSideEffectAction(result.action)) {
|
|
32859
32868
|
await executeSideEffectAction(result.action, result.selectedItems, context, config2);
|
|
32860
32869
|
return { output: "", cancelled: false, action: result.action };
|
|
@@ -33152,7 +33161,7 @@ function formatShowOutput(item, options, attachmentsDirectory) {
|
|
|
33152
33161
|
}
|
|
33153
33162
|
async function executeInteractiveSelect$1(context, config2) {
|
|
33154
33163
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
33155
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
33164
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
33156
33165
|
const allReferences = await context.library.getAll();
|
|
33157
33166
|
const identifiers = await withAlternateScreen2(
|
|
33158
33167
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -33401,7 +33410,7 @@ function formatUpdateOutput(result, identifier) {
|
|
|
33401
33410
|
}
|
|
33402
33411
|
async function executeInteractiveUpdate(context, config2) {
|
|
33403
33412
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
33404
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
33413
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
33405
33414
|
const allReferences = await context.library.getAll();
|
|
33406
33415
|
const identifiers = await withAlternateScreen2(
|
|
33407
33416
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -33696,7 +33705,7 @@ function getUrlExitCode(result) {
|
|
|
33696
33705
|
}
|
|
33697
33706
|
async function executeInteractiveSelect(context, config2) {
|
|
33698
33707
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
33699
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
33708
|
+
const { selectReferencesOrExit } = await import("./reference-select-BDL2RR3f.js");
|
|
33700
33709
|
const allReferences = await context.library.getAll();
|
|
33701
33710
|
const identifiers = await withAlternateScreen2(
|
|
33702
33711
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -34317,7 +34326,7 @@ function shouldAutoFetch(cliFlag, configEnabled) {
|
|
|
34317
34326
|
return configEnabled;
|
|
34318
34327
|
}
|
|
34319
34328
|
async function performAutoFetch(addedItems, context, config2) {
|
|
34320
|
-
const { fulltextFetch: fulltextFetch2 } = await import("./index-
|
|
34329
|
+
const { fulltextFetch: fulltextFetch2 } = await import("./index-D1nWqhHq.js").then((n) => n.A);
|
|
34321
34330
|
const fetchResults = await autoFetchFulltext(addedItems, context, {
|
|
34322
34331
|
fulltextConfig: config2.fulltext,
|
|
34323
34332
|
fulltextDirectory: config2.attachments.directory,
|
|
@@ -34350,6 +34359,7 @@ async function handleAddAction(inputs, options, program) {
|
|
|
34350
34359
|
}
|
|
34351
34360
|
const context = await createExecutionContext(config2, Library.load);
|
|
34352
34361
|
const addOptions = buildAddOptions(inputs, options, config2, stdinContent);
|
|
34362
|
+
printUrlProgress(inputs, globalOpts.quiet === true);
|
|
34353
34363
|
const result = await executeAdd(addOptions, context);
|
|
34354
34364
|
if (outputFormat === "json") {
|
|
34355
34365
|
await outputAddResultJson(result, context, options.full ?? false);
|
|
@@ -34636,4 +34646,4 @@ export {
|
|
|
34636
34646
|
restoreStdinAfterInk as r,
|
|
34637
34647
|
syncAttachments as s
|
|
34638
34648
|
};
|
|
34639
|
-
//# sourceMappingURL=index-
|
|
34649
|
+
//# sourceMappingURL=index-NVk2MuLS.js.map
|