@ncukondo/reference-manager 0.1.0 → 0.3.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/README.md +40 -0
- package/dist/chunks/detector-DHztTaFY.js +619 -0
- package/dist/chunks/detector-DHztTaFY.js.map +1 -0
- package/dist/chunks/{detector-BF8Mcc72.js → loader-mQ25o6cV.js} +303 -664
- package/dist/chunks/loader-mQ25o6cV.js.map +1 -0
- package/dist/chunks/search-Be9vzUIH.js +29541 -0
- package/dist/chunks/search-Be9vzUIH.js.map +1 -0
- package/dist/cli/commands/add.d.ts +44 -16
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/cite.d.ts +49 -0
- package/dist/cli/commands/cite.d.ts.map +1 -0
- package/dist/cli/commands/fulltext.d.ts +101 -0
- package/dist/cli/commands/fulltext.d.ts.map +1 -0
- package/dist/cli/commands/index.d.ts +14 -10
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/list.d.ts +23 -6
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/remove.d.ts +47 -12
- package/dist/cli/commands/remove.d.ts.map +1 -1
- package/dist/cli/commands/search.d.ts +24 -7
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/update.d.ts +26 -13
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/execution-context.d.ts +60 -0
- package/dist/cli/execution-context.d.ts.map +1 -0
- package/dist/cli/helpers.d.ts +18 -0
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/server-client.d.ts +73 -10
- package/dist/cli/server-client.d.ts.map +1 -1
- package/dist/cli.js +1200 -528
- package/dist/cli.js.map +1 -1
- package/dist/config/csl-styles.d.ts +83 -0
- package/dist/config/csl-styles.d.ts.map +1 -0
- package/dist/config/defaults.d.ts +10 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/schema.d.ts +84 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/csl-json/types.d.ts +15 -3
- package/dist/core/csl-json/types.d.ts.map +1 -1
- package/dist/core/library.d.ts +60 -0
- package/dist/core/library.d.ts.map +1 -1
- package/dist/features/format/bibtex.d.ts +6 -0
- package/dist/features/format/bibtex.d.ts.map +1 -0
- package/dist/features/format/citation-csl.d.ts +41 -0
- package/dist/features/format/citation-csl.d.ts.map +1 -0
- package/dist/features/format/citation-fallback.d.ts +24 -0
- package/dist/features/format/citation-fallback.d.ts.map +1 -0
- package/dist/features/format/index.d.ts +10 -0
- package/dist/features/format/index.d.ts.map +1 -0
- package/dist/features/format/json.d.ts +6 -0
- package/dist/features/format/json.d.ts.map +1 -0
- package/dist/features/format/pretty.d.ts +6 -0
- package/dist/features/format/pretty.d.ts.map +1 -0
- package/dist/features/fulltext/filename.d.ts +17 -0
- package/dist/features/fulltext/filename.d.ts.map +1 -0
- package/dist/features/fulltext/index.d.ts +7 -0
- package/dist/features/fulltext/index.d.ts.map +1 -0
- package/dist/features/fulltext/manager.d.ts +109 -0
- package/dist/features/fulltext/manager.d.ts.map +1 -0
- package/dist/features/fulltext/types.d.ts +12 -0
- package/dist/features/fulltext/types.d.ts.map +1 -0
- package/dist/features/import/cache.d.ts +37 -0
- package/dist/features/import/cache.d.ts.map +1 -0
- package/dist/features/import/detector.d.ts +42 -0
- package/dist/features/import/detector.d.ts.map +1 -0
- package/dist/features/import/fetcher.d.ts +49 -0
- package/dist/features/import/fetcher.d.ts.map +1 -0
- package/dist/features/import/importer.d.ts +61 -0
- package/dist/features/import/importer.d.ts.map +1 -0
- package/dist/features/import/index.d.ts +8 -0
- package/dist/features/import/index.d.ts.map +1 -0
- package/dist/features/import/normalizer.d.ts +15 -0
- package/dist/features/import/normalizer.d.ts.map +1 -0
- package/dist/features/import/parser.d.ts +33 -0
- package/dist/features/import/parser.d.ts.map +1 -0
- package/dist/features/import/rate-limiter.d.ts +45 -0
- package/dist/features/import/rate-limiter.d.ts.map +1 -0
- package/dist/features/operations/add.d.ts +65 -0
- package/dist/features/operations/add.d.ts.map +1 -0
- package/dist/features/operations/cite.d.ts +48 -0
- package/dist/features/operations/cite.d.ts.map +1 -0
- package/dist/features/operations/list.d.ts +28 -0
- package/dist/features/operations/list.d.ts.map +1 -0
- package/dist/features/operations/remove.d.ts +29 -0
- package/dist/features/operations/remove.d.ts.map +1 -0
- package/dist/features/operations/search.d.ts +30 -0
- package/dist/features/operations/search.d.ts.map +1 -0
- package/dist/features/operations/update.d.ts +39 -0
- package/dist/features/operations/update.d.ts.map +1 -0
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.ts +3 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/routes/add.d.ts +11 -0
- package/dist/server/routes/add.d.ts.map +1 -0
- package/dist/server/routes/cite.d.ts +9 -0
- package/dist/server/routes/cite.d.ts.map +1 -0
- package/dist/server/routes/list.d.ts +25 -0
- package/dist/server/routes/list.d.ts.map +1 -0
- package/dist/server/routes/references.d.ts.map +1 -1
- package/dist/server/routes/search.d.ts +26 -0
- package/dist/server/routes/search.d.ts.map +1 -0
- package/dist/server.js +215 -32
- package/dist/server.js.map +1 -1
- package/package.json +15 -4
- package/dist/chunks/detector-BF8Mcc72.js.map +0 -1
- package/dist/cli/output/bibtex.d.ts +0 -6
- package/dist/cli/output/bibtex.d.ts.map +0 -1
- package/dist/cli/output/index.d.ts +0 -7
- package/dist/cli/output/index.d.ts.map +0 -1
- package/dist/cli/output/json.d.ts +0 -6
- package/dist/cli/output/json.d.ts.map +0 -1
- package/dist/cli/output/pretty.d.ts +0 -6
- package/dist/cli/output/pretty.d.ts.map +0 -1
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
import type { CslItem } from "../core/csl-json/types.js";
|
|
2
|
+
import type { AddReferencesResult } from "../features/operations/add.js";
|
|
3
|
+
import type { CiteResult } from "../features/operations/cite.js";
|
|
4
|
+
import type { ListOptions, ListResult } from "../features/operations/list.js";
|
|
5
|
+
import type { RemoveResult } from "../features/operations/remove.js";
|
|
6
|
+
import type { SearchOperationOptions, SearchResult } from "../features/operations/search.js";
|
|
7
|
+
import type { UpdateOperationResult } from "../features/operations/update.js";
|
|
8
|
+
/**
|
|
9
|
+
* Options for addFromInputs method.
|
|
10
|
+
*/
|
|
11
|
+
export interface AddFromInputsOptions {
|
|
12
|
+
force?: boolean;
|
|
13
|
+
format?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Options for cite method.
|
|
17
|
+
*/
|
|
18
|
+
export interface CiteOptions {
|
|
19
|
+
identifiers: string[];
|
|
20
|
+
byUuid?: boolean;
|
|
21
|
+
inText?: boolean;
|
|
22
|
+
style?: string;
|
|
23
|
+
cslFile?: string;
|
|
24
|
+
locale?: string;
|
|
25
|
+
format?: "text" | "html";
|
|
26
|
+
}
|
|
2
27
|
/**
|
|
3
28
|
* Client for communicating with the reference-manager HTTP server.
|
|
4
29
|
*/
|
|
@@ -11,11 +36,15 @@ export declare class ServerClient {
|
|
|
11
36
|
*/
|
|
12
37
|
getAll(): Promise<CslItem[]>;
|
|
13
38
|
/**
|
|
14
|
-
* Find reference by
|
|
15
|
-
* @param
|
|
39
|
+
* Find reference by identifier.
|
|
40
|
+
* @param identifier - Citation ID or UUID
|
|
41
|
+
* @param options - Options object
|
|
42
|
+
* @param options.byUuid - If true, treat identifier as UUID; otherwise as citation ID
|
|
16
43
|
* @returns CSL item or null if not found
|
|
17
44
|
*/
|
|
18
|
-
|
|
45
|
+
find(identifier: string, options?: {
|
|
46
|
+
byUuid?: boolean;
|
|
47
|
+
}): Promise<CslItem | null>;
|
|
19
48
|
/**
|
|
20
49
|
* Add new reference to the library.
|
|
21
50
|
* @param item - CSL item to add
|
|
@@ -24,15 +53,49 @@ export declare class ServerClient {
|
|
|
24
53
|
add(item: CslItem): Promise<CslItem>;
|
|
25
54
|
/**
|
|
26
55
|
* Update existing reference.
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
56
|
+
* @param identifier - Citation ID or UUID
|
|
57
|
+
* @param updates - Partial CSL item with fields to update
|
|
58
|
+
* @param options - Options object
|
|
59
|
+
* @param options.byUuid - If true, treat identifier as UUID; otherwise as citation ID
|
|
60
|
+
* @returns Update operation result
|
|
61
|
+
*/
|
|
62
|
+
update(identifier: string, updates: Partial<CslItem>, options?: {
|
|
63
|
+
byUuid?: boolean;
|
|
64
|
+
}): Promise<UpdateOperationResult>;
|
|
65
|
+
/**
|
|
66
|
+
* Remove reference by identifier.
|
|
67
|
+
* @param identifier - Citation ID or UUID
|
|
68
|
+
* @param options - Options object
|
|
69
|
+
* @param options.byUuid - If true, treat identifier as UUID; otherwise as citation ID
|
|
70
|
+
* @returns Remove operation result
|
|
71
|
+
*/
|
|
72
|
+
remove(identifier: string, options?: {
|
|
73
|
+
byUuid?: boolean;
|
|
74
|
+
}): Promise<RemoveResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Add references from various input formats.
|
|
77
|
+
* @param inputs - Array of inputs (file paths, PMIDs, DOIs)
|
|
78
|
+
* @param options - Options for add operation
|
|
79
|
+
* @returns Result containing added, failed, and skipped items
|
|
80
|
+
*/
|
|
81
|
+
addFromInputs(inputs: string[], options?: AddFromInputsOptions): Promise<AddReferencesResult>;
|
|
82
|
+
/**
|
|
83
|
+
* Generate citations for references.
|
|
84
|
+
* @param options - Cite options including identifiers and formatting
|
|
85
|
+
* @returns Cite result with per-identifier results
|
|
86
|
+
*/
|
|
87
|
+
cite(options: CiteOptions): Promise<CiteResult>;
|
|
88
|
+
/**
|
|
89
|
+
* List all references with optional formatting.
|
|
90
|
+
* @param options - List options including format
|
|
91
|
+
* @returns List result with formatted items
|
|
30
92
|
*/
|
|
31
|
-
|
|
93
|
+
list(options?: ListOptions): Promise<ListResult>;
|
|
32
94
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
95
|
+
* Search references with query.
|
|
96
|
+
* @param options - Search options including query and format
|
|
97
|
+
* @returns Search result with formatted items
|
|
35
98
|
*/
|
|
36
|
-
|
|
99
|
+
search(options: SearchOperationOptions): Promise<SearchResult>;
|
|
37
100
|
}
|
|
38
101
|
//# sourceMappingURL=server-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-client.d.ts","sourceRoot":"","sources":["../../src/cli/server-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"server-client.d.ts","sourceRoot":"","sources":["../../src/cli/server-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC7F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM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