@ncukondo/reference-manager 0.23.2 → 0.24.0
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/{format-Bp26FG4I.js → SearchableMultiSelect-BigM9xv_.js} +122 -35
- package/dist/chunks/SearchableMultiSelect-BigM9xv_.js.map +1 -0
- package/dist/chunks/{action-menu-t3Dz4j_h.js → action-menu-ByDpq-KF.js} +3 -3
- package/dist/chunks/{action-menu-t3Dz4j_h.js.map → action-menu-ByDpq-KF.js.map} +1 -1
- package/dist/chunks/{file-watcher-Dyns9dxx.js → file-watcher-Dlx0PolG.js} +2 -1
- package/dist/chunks/file-watcher-Dlx0PolG.js.map +1 -0
- package/dist/chunks/{index-DAoyCWtW.js → index-CKY11DzK.js} +4 -88
- package/dist/chunks/index-CKY11DzK.js.map +1 -0
- package/dist/chunks/{index-DUFYNR2K.js → index-ChvsE9WF.js} +39 -39
- package/dist/chunks/index-ChvsE9WF.js.map +1 -0
- package/dist/chunks/{index-BxREZKXb.js → index-DVsuPpMS.js} +3 -3
- package/dist/chunks/index-DVsuPpMS.js.map +1 -0
- package/dist/chunks/{index-7R-uEYOu.js → index-DWAtvFtp.js} +3 -3
- package/dist/chunks/{index-7R-uEYOu.js.map → index-DWAtvFtp.js.map} +1 -1
- package/dist/chunks/{loader-CzviN_sy.js → loader-CV71qNY2.js} +5 -3
- package/dist/chunks/loader-CV71qNY2.js.map +1 -0
- package/dist/chunks/{reference-select-QtclFeCr.js → reference-select-CrOVXP7v.js} +4 -77
- package/dist/chunks/reference-select-CrOVXP7v.js.map +1 -0
- package/dist/chunks/{style-select-CorMfmfN.js → style-select-BVP0KQz4.js} +3 -3
- package/dist/chunks/{style-select-CorMfmfN.js.map → style-select-BVP0KQz4.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/config/schema.d.ts +2 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/csl-json/types.d.ts +2 -0
- package/dist/core/csl-json/types.d.ts.map +1 -1
- package/dist/features/format/resource-indicators.d.ts +1 -1
- package/dist/features/interactive/apps/runCiteFlow.d.ts.map +1 -1
- package/dist/features/interactive/apps/runSearchFlow.d.ts +0 -5
- package/dist/features/interactive/apps/runSearchFlow.d.ts.map +1 -1
- package/dist/features/interactive/choice-builder.d.ts +22 -0
- package/dist/features/interactive/choice-builder.d.ts.map +1 -0
- package/dist/features/interactive/format.d.ts +0 -7
- package/dist/features/interactive/format.d.ts.map +1 -1
- package/dist/features/interactive/search-prompt.d.ts +0 -12
- package/dist/features/interactive/search-prompt.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/file-watcher-Dyns9dxx.js.map +0 -1
- package/dist/chunks/format-Bp26FG4I.js.map +0 -1
- package/dist/chunks/index-BxREZKXb.js.map +0 -1
- package/dist/chunks/index-DAoyCWtW.js.map +0 -1
- package/dist/chunks/index-DUFYNR2K.js.map +0 -1
- package/dist/chunks/loader-CzviN_sy.js.map +0 -1
- package/dist/chunks/reference-select-QtclFeCr.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Command, Option } from "commander";
|
|
2
|
-
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-
|
|
2
|
+
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-Dlx0PolG.js";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import { promises, readFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
5
5
|
import * as os from "node:os";
|
|
6
6
|
import * as path from "node:path";
|
|
7
7
|
import path__default, { join, basename, dirname } from "node:path";
|
|
8
|
-
import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, g as generateFilename, b as findFulltextFiles, c as findFulltextFile, h as extensionToFormat, j as fulltextAttach, k as fulltextGet, l as fulltextDiscover, m as fulltextFetch, o as fulltextConvert, q as getExtension, r as getDefaultExportFromCjs, B as BUILTIN_STYLES, s as getFulltextAttachmentTypes, t as startServerWithFileWatcher } from "./index-
|
|
8
|
+
import { n as normalizePathForOutput, d as deleteDirectoryIfEmpty, p as parseFilename, i as isReservedRole, e as ensureDirectory, a as addAttachment, R as RESERVED_ROLES, g as generateFilename, b as findFulltextFiles, c as findFulltextFile, h as extensionToFormat, j as fulltextAttach, k as fulltextGet, l as fulltextDiscover, m as fulltextFetch, o as fulltextConvert, q as getExtension, r as getDefaultExportFromCjs, B as BUILTIN_STYLES, s as getFulltextAttachmentTypes, t as startServerWithFileWatcher } from "./index-DWAtvFtp.js";
|
|
9
9
|
import { readFile, unlink, stat, readdir, rename } from "node:fs/promises";
|
|
10
|
-
import { o as openWithSystemApp, l as loadConfig, e as getDefaultCurrentDirConfigFilename, h as getDefaultUserConfigPath } from "./loader-
|
|
10
|
+
import { o as openWithSystemApp, l as loadConfig, e as getDefaultCurrentDirConfigFilename, h as getDefaultUserConfigPath } from "./loader-CV71qNY2.js";
|
|
11
11
|
import { spawn, spawnSync } from "node:child_process";
|
|
12
12
|
import process$1, { stdin, stdout } from "node:process";
|
|
13
13
|
import * as readline from "node:readline";
|
|
@@ -19,7 +19,7 @@ import "@citation-js/plugin-csl";
|
|
|
19
19
|
import { ZodOptional as ZodOptional$2, z } from "zod";
|
|
20
20
|
import { serve } from "@hono/node-server";
|
|
21
21
|
const name = "@ncukondo/reference-manager";
|
|
22
|
-
const version$1 = "0.
|
|
22
|
+
const version$1 = "0.24.0";
|
|
23
23
|
const description$1 = "A local reference management tool using CSL-JSON as the single source of truth";
|
|
24
24
|
const packageJson = {
|
|
25
25
|
name,
|
|
@@ -902,15 +902,15 @@ class OperationsLibrary {
|
|
|
902
902
|
}
|
|
903
903
|
// High-level operations
|
|
904
904
|
async search(options) {
|
|
905
|
-
const { searchReferences } = await import("./index-
|
|
905
|
+
const { searchReferences } = await import("./index-DWAtvFtp.js").then((n) => n.A);
|
|
906
906
|
return searchReferences(this.library, options);
|
|
907
907
|
}
|
|
908
908
|
async list(options) {
|
|
909
|
-
const { listReferences } = await import("./index-
|
|
909
|
+
const { listReferences } = await import("./index-DWAtvFtp.js").then((n) => n.z);
|
|
910
910
|
return listReferences(this.library, options ?? {});
|
|
911
911
|
}
|
|
912
912
|
async cite(options) {
|
|
913
|
-
const { citeReferences } = await import("./index-
|
|
913
|
+
const { citeReferences } = await import("./index-DWAtvFtp.js").then((n) => n.y);
|
|
914
914
|
const defaultStyle = options.defaultStyle ?? this.citationConfig?.defaultStyle;
|
|
915
915
|
const cslDirectory = options.cslDirectory ?? this.citationConfig?.cslDirectory;
|
|
916
916
|
const mergedOptions = {
|
|
@@ -921,32 +921,32 @@ class OperationsLibrary {
|
|
|
921
921
|
return citeReferences(this.library, mergedOptions);
|
|
922
922
|
}
|
|
923
923
|
async import(inputs, options) {
|
|
924
|
-
const { addReferences } = await import("./index-
|
|
924
|
+
const { addReferences } = await import("./index-DWAtvFtp.js").then((n) => n.x);
|
|
925
925
|
return addReferences(inputs, this.library, options ?? {});
|
|
926
926
|
}
|
|
927
927
|
// Attachment operations
|
|
928
928
|
async attachAdd(options) {
|
|
929
|
-
const { addAttachment: addAttachment2 } = await import("./index-
|
|
929
|
+
const { addAttachment: addAttachment2 } = await import("./index-DVsuPpMS.js");
|
|
930
930
|
return addAttachment2(this.library, options);
|
|
931
931
|
}
|
|
932
932
|
async attachList(options) {
|
|
933
|
-
const { listAttachments: listAttachments2 } = await import("./index-
|
|
933
|
+
const { listAttachments: listAttachments2 } = await import("./index-DVsuPpMS.js");
|
|
934
934
|
return listAttachments2(this.library, options);
|
|
935
935
|
}
|
|
936
936
|
async attachGet(options) {
|
|
937
|
-
const { getAttachment: getAttachment2 } = await import("./index-
|
|
937
|
+
const { getAttachment: getAttachment2 } = await import("./index-DVsuPpMS.js");
|
|
938
938
|
return getAttachment2(this.library, options);
|
|
939
939
|
}
|
|
940
940
|
async attachDetach(options) {
|
|
941
|
-
const { detachAttachment: detachAttachment2 } = await import("./index-
|
|
941
|
+
const { detachAttachment: detachAttachment2 } = await import("./index-DVsuPpMS.js");
|
|
942
942
|
return detachAttachment2(this.library, options);
|
|
943
943
|
}
|
|
944
944
|
async attachSync(options) {
|
|
945
|
-
const { syncAttachments: syncAttachments2 } = await import("./index-
|
|
945
|
+
const { syncAttachments: syncAttachments2 } = await import("./index-DVsuPpMS.js");
|
|
946
946
|
return syncAttachments2(this.library, options);
|
|
947
947
|
}
|
|
948
948
|
async attachOpen(options) {
|
|
949
|
-
const { openAttachment: openAttachment2 } = await import("./index-
|
|
949
|
+
const { openAttachment: openAttachment2 } = await import("./index-DVsuPpMS.js");
|
|
950
950
|
return openAttachment2(this.library, options);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
@@ -1790,7 +1790,7 @@ function getAttachExitCode(result) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
async function executeInteractiveSelect$2(context, config2) {
|
|
1792
1792
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
1793
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
1793
|
+
const { selectReferencesOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
1794
1794
|
const allReferences = await context.library.getAll();
|
|
1795
1795
|
const identifiers = await withAlternateScreen2(
|
|
1796
1796
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -2338,10 +2338,10 @@ function getCiteExitCode(result) {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
async function executeInteractiveCite(options, context, config2) {
|
|
2340
2340
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
2341
|
-
const { runCiteFlow } = await import("./index-
|
|
2342
|
-
const { buildStyleChoices, listCustomStyles } = await import("./style-select-
|
|
2343
|
-
const { search } = await import("./file-watcher-
|
|
2344
|
-
const { tokenize } = await import("./file-watcher-
|
|
2341
|
+
const { runCiteFlow } = await import("./index-CKY11DzK.js");
|
|
2342
|
+
const { buildStyleChoices, listCustomStyles } = await import("./style-select-BVP0KQz4.js");
|
|
2343
|
+
const { search } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.B);
|
|
2344
|
+
const { tokenize } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.A);
|
|
2345
2345
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
2346
2346
|
checkTTY();
|
|
2347
2347
|
const allReferences = await context.library.getAll();
|
|
@@ -6938,7 +6938,7 @@ function formatEditOutput(result) {
|
|
|
6938
6938
|
}
|
|
6939
6939
|
async function executeInteractiveEdit(options, context, config2) {
|
|
6940
6940
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
6941
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
6941
|
+
const { selectReferencesOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
6942
6942
|
const allReferences = await context.library.getAll();
|
|
6943
6943
|
const identifiers = await withAlternateScreen2(
|
|
6944
6944
|
() => selectReferencesOrExit(allReferences, { multiSelect: true }, config2.cli.tui)
|
|
@@ -10479,7 +10479,7 @@ function getFulltextExitCode(result) {
|
|
|
10479
10479
|
}
|
|
10480
10480
|
async function executeInteractiveSelect$1(context, config2) {
|
|
10481
10481
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
10482
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
10482
|
+
const { selectReferencesOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
10483
10483
|
const allReferences = await context.library.getAll();
|
|
10484
10484
|
const identifiers = await withAlternateScreen2(
|
|
10485
10485
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -10816,24 +10816,24 @@ const fulltext = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
10816
10816
|
handleFulltextOpenAction
|
|
10817
10817
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10818
10818
|
function buildResourceIndicators(item) {
|
|
10819
|
-
const
|
|
10819
|
+
const labels = [];
|
|
10820
10820
|
const attachments = item.custom?.attachments;
|
|
10821
10821
|
const fulltextFiles = findFulltextFiles(attachments);
|
|
10822
10822
|
const hasFulltextPdf = fulltextFiles.some(
|
|
10823
10823
|
(f) => extensionToFormat(getExtension(f.filename)) === "pdf"
|
|
10824
10824
|
);
|
|
10825
|
-
if (hasFulltextPdf)
|
|
10825
|
+
if (hasFulltextPdf) labels.push("pdf");
|
|
10826
10826
|
const hasFulltextMd = fulltextFiles.some(
|
|
10827
10827
|
(f) => extensionToFormat(getExtension(f.filename)) === "markdown"
|
|
10828
10828
|
);
|
|
10829
|
-
if (hasFulltextMd)
|
|
10829
|
+
if (hasFulltextMd) labels.push("md");
|
|
10830
10830
|
const allFiles = attachments?.files ?? [];
|
|
10831
10831
|
const hasOtherAttachments = allFiles.length > fulltextFiles.length;
|
|
10832
|
-
if (hasOtherAttachments)
|
|
10833
|
-
if (item.URL)
|
|
10832
|
+
if (hasOtherAttachments) labels.push("file");
|
|
10833
|
+
if (item.URL) labels.push("url");
|
|
10834
10834
|
const tags = item.custom?.tags;
|
|
10835
|
-
if (Array.isArray(tags) && tags.length > 0)
|
|
10836
|
-
return
|
|
10835
|
+
if (Array.isArray(tags) && tags.length > 0) labels.push("tag");
|
|
10836
|
+
return labels.join(" ");
|
|
10837
10837
|
}
|
|
10838
10838
|
function formatAuthor(author) {
|
|
10839
10839
|
const family = author.family || "";
|
|
@@ -31779,7 +31779,7 @@ async function mcpStart(options) {
|
|
|
31779
31779
|
async function executeRemove(options, context) {
|
|
31780
31780
|
const { identifier, idType = "id", fulltextDirectory, deleteFulltext = false } = options;
|
|
31781
31781
|
if (context.mode === "local" && deleteFulltext && fulltextDirectory) {
|
|
31782
|
-
const { removeReference } = await import("./index-
|
|
31782
|
+
const { removeReference } = await import("./index-DWAtvFtp.js").then((n) => n.w);
|
|
31783
31783
|
return removeReference(context.library, {
|
|
31784
31784
|
identifier,
|
|
31785
31785
|
idType,
|
|
@@ -31834,7 +31834,7 @@ Continue?`;
|
|
|
31834
31834
|
}
|
|
31835
31835
|
async function executeInteractiveRemove(context, config2) {
|
|
31836
31836
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
31837
|
-
const { selectReferenceItemsOrExit } = await import("./reference-select-
|
|
31837
|
+
const { selectReferenceItemsOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
31838
31838
|
const allReferences = await context.library.getAll();
|
|
31839
31839
|
const selectedItems = await withAlternateScreen2(
|
|
31840
31840
|
() => selectReferenceItemsOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -32059,9 +32059,9 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32059
32059
|
validateInteractiveOptions(options);
|
|
32060
32060
|
const { checkTTY } = await import("./tty-BMyaEOhX.js");
|
|
32061
32061
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32062
|
-
const { runSearchFlow } = await import("./index-
|
|
32063
|
-
const { search } = await import("./file-watcher-
|
|
32064
|
-
const { tokenize } = await import("./file-watcher-
|
|
32062
|
+
const { runSearchFlow } = await import("./index-CKY11DzK.js");
|
|
32063
|
+
const { search } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.B);
|
|
32064
|
+
const { tokenize } = await import("./file-watcher-Dlx0PolG.js").then((n) => n.A);
|
|
32065
32065
|
checkTTY();
|
|
32066
32066
|
const allReferences = await context.library.getAll();
|
|
32067
32067
|
const searchFn = (query) => {
|
|
@@ -32078,7 +32078,7 @@ async function executeInteractiveSearch(options, context, config2) {
|
|
|
32078
32078
|
})
|
|
32079
32079
|
);
|
|
32080
32080
|
if (result.selectedItems && !result.cancelled) {
|
|
32081
|
-
const { isSideEffectAction } = await import("./action-menu-
|
|
32081
|
+
const { isSideEffectAction } = await import("./action-menu-ByDpq-KF.js");
|
|
32082
32082
|
if (isSideEffectAction(result.action)) {
|
|
32083
32083
|
await executeSideEffectAction(result.action, result.selectedItems, context, config2);
|
|
32084
32084
|
return { output: "", cancelled: false, action: result.action };
|
|
@@ -32094,7 +32094,7 @@ async function executeSideEffectAction(action, items2, context, config2) {
|
|
|
32094
32094
|
switch (action) {
|
|
32095
32095
|
case "open-url": {
|
|
32096
32096
|
const { resolveDefaultUrl: resolveDefaultUrl2 } = await Promise.resolve().then(() => url);
|
|
32097
|
-
const { openWithSystemApp: openWithSystemApp2 } = await import("./loader-
|
|
32097
|
+
const { openWithSystemApp: openWithSystemApp2 } = await import("./loader-CV71qNY2.js").then((n) => n.j);
|
|
32098
32098
|
const item = items2[0];
|
|
32099
32099
|
if (!item) return;
|
|
32100
32100
|
const url$1 = resolveDefaultUrl2(item);
|
|
@@ -32481,7 +32481,7 @@ function formatUpdateOutput(result, identifier) {
|
|
|
32481
32481
|
}
|
|
32482
32482
|
async function executeInteractiveUpdate(context, config2) {
|
|
32483
32483
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32484
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
32484
|
+
const { selectReferencesOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
32485
32485
|
const allReferences = await context.library.getAll();
|
|
32486
32486
|
const identifiers = await withAlternateScreen2(
|
|
32487
32487
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -32776,7 +32776,7 @@ function getUrlExitCode(result) {
|
|
|
32776
32776
|
}
|
|
32777
32777
|
async function executeInteractiveSelect(context, config2) {
|
|
32778
32778
|
const { withAlternateScreen: withAlternateScreen2 } = await Promise.resolve().then(() => alternateScreen);
|
|
32779
|
-
const { selectReferencesOrExit } = await import("./reference-select-
|
|
32779
|
+
const { selectReferencesOrExit } = await import("./reference-select-CrOVXP7v.js");
|
|
32780
32780
|
const allReferences = await context.library.getAll();
|
|
32781
32781
|
const identifiers = await withAlternateScreen2(
|
|
32782
32782
|
() => selectReferencesOrExit(allReferences, { multiSelect: false }, config2.cli.tui)
|
|
@@ -33279,7 +33279,7 @@ function shouldAutoFetch(cliFlag, configEnabled) {
|
|
|
33279
33279
|
return configEnabled;
|
|
33280
33280
|
}
|
|
33281
33281
|
async function performAutoFetch(addedItems, context, config2) {
|
|
33282
|
-
const { fulltextFetch: fulltextFetch2 } = await import("./index-
|
|
33282
|
+
const { fulltextFetch: fulltextFetch2 } = await import("./index-DWAtvFtp.js").then((n) => n.v);
|
|
33283
33283
|
const fetchResults = await autoFetchFulltext(addedItems, context, {
|
|
33284
33284
|
fulltextConfig: config2.fulltext,
|
|
33285
33285
|
fulltextDirectory: config2.attachments.directory,
|
|
@@ -33558,4 +33558,4 @@ export {
|
|
|
33558
33558
|
restoreStdinAfterInk as r,
|
|
33559
33559
|
syncAttachments as s
|
|
33560
33560
|
};
|
|
33561
|
-
//# sourceMappingURL=index-
|
|
33561
|
+
//# sourceMappingURL=index-ChvsE9WF.js.map
|