@ncukondo/reference-manager 0.1.0 → 0.4.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 +278 -80
- package/dist/chunks/{detector-BF8Mcc72.js → file-watcher-B-SiUw5f.js} +469 -327
- package/dist/chunks/file-watcher-B-SiUw5f.js.map +1 -0
- package/dist/chunks/index-DLIGxQaB.js +29851 -0
- package/dist/chunks/index-DLIGxQaB.js.map +1 -0
- package/dist/chunks/loader-DuzyKV70.js +394 -0
- package/dist/chunks/loader-DuzyKV70.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 +72 -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/mcp.d.ts +16 -0
- package/dist/cli/commands/mcp.d.ts.map +1 -0
- 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/server.d.ts +2 -0
- package/dist/cli/commands/server.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 +47 -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 +61 -14
- package/dist/cli/server-client.d.ts.map +1 -1
- package/dist/cli/server-detection.d.ts +1 -0
- package/dist/cli/server-detection.d.ts.map +1 -1
- package/dist/cli.js +21979 -564
- 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 +86 -3
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/core/csl-json/types.d.ts +18 -3
- package/dist/core/csl-json/types.d.ts.map +1 -1
- package/dist/core/library-interface.d.ts +100 -0
- package/dist/core/library-interface.d.ts.map +1 -0
- package/dist/core/library.d.ts +56 -13
- 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/fulltext/attach.d.ts +47 -0
- package/dist/features/operations/fulltext/attach.d.ts.map +1 -0
- package/dist/features/operations/fulltext/detach.d.ts +38 -0
- package/dist/features/operations/fulltext/detach.d.ts.map +1 -0
- package/dist/features/operations/fulltext/get.d.ts +41 -0
- package/dist/features/operations/fulltext/get.d.ts.map +1 -0
- package/dist/features/operations/fulltext/index.d.ts +9 -0
- package/dist/features/operations/fulltext/index.d.ts.map +1 -0
- package/dist/features/operations/index.d.ts +15 -0
- package/dist/features/operations/index.d.ts.map +1 -0
- package/dist/features/operations/library-operations.d.ts +64 -0
- package/dist/features/operations/library-operations.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/operations-library.d.ts +36 -0
- package/dist/features/operations/operations-library.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/features/search/matcher.d.ts.map +1 -1
- package/dist/features/search/normalizer.d.ts +12 -0
- package/dist/features/search/normalizer.d.ts.map +1 -1
- package/dist/features/search/tokenizer.d.ts.map +1 -1
- package/dist/features/search/types.d.ts +1 -1
- package/dist/features/search/types.d.ts.map +1 -1
- package/dist/features/search/uppercase.d.ts +41 -0
- package/dist/features/search/uppercase.d.ts.map +1 -0
- package/dist/index.js +21 -187
- package/dist/index.js.map +1 -1
- package/dist/mcp/context.d.ts +19 -0
- package/dist/mcp/context.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +20 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/resources/index.d.ts +10 -0
- package/dist/mcp/resources/index.d.ts.map +1 -0
- package/dist/mcp/resources/library.d.ts +26 -0
- package/dist/mcp/resources/library.d.ts.map +1 -0
- package/dist/mcp/tools/add.d.ts +17 -0
- package/dist/mcp/tools/add.d.ts.map +1 -0
- package/dist/mcp/tools/cite.d.ts +15 -0
- package/dist/mcp/tools/cite.d.ts.map +1 -0
- package/dist/mcp/tools/fulltext.d.ts +51 -0
- package/dist/mcp/tools/fulltext.d.ts.map +1 -0
- package/dist/mcp/tools/index.d.ts +12 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/list.d.ts +13 -0
- package/dist/mcp/tools/list.d.ts.map +1 -0
- package/dist/mcp/tools/remove.d.ts +19 -0
- package/dist/mcp/tools/remove.d.ts.map +1 -0
- package/dist/mcp/tools/search.d.ts +13 -0
- package/dist/mcp/tools/search.d.ts.map +1 -0
- package/dist/server/index.d.ts +26 -2
- 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 +5 -88
- package/dist/server.js.map +1 -1
- package/package.json +16 -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,16 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI commands
|
|
3
3
|
*/
|
|
4
|
-
export {
|
|
5
|
-
export type {
|
|
6
|
-
export {
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
9
|
-
export type {
|
|
10
|
-
export {
|
|
11
|
-
export type {
|
|
12
|
-
export {
|
|
13
|
-
export type {
|
|
4
|
+
export { executeList, formatListOutput } from "./list.js";
|
|
5
|
+
export type { ListCommandOptions, ListCommandResult } from "./list.js";
|
|
6
|
+
export { executeSearch, formatSearchOutput } from "./search.js";
|
|
7
|
+
export type { SearchCommandOptions, SearchCommandResult } from "./search.js";
|
|
8
|
+
export { executeAdd, formatAddOutput, getExitCode } from "./add.js";
|
|
9
|
+
export type { AddCommandOptions, AddCommandResult, AddedItem, FailedItem, SkippedItem, } from "./add.js";
|
|
10
|
+
export { executeRemove, formatRemoveOutput } from "./remove.js";
|
|
11
|
+
export type { RemoveCommandOptions, RemoveCommandResult } from "./remove.js";
|
|
12
|
+
export { executeUpdate, formatUpdateOutput } from "./update.js";
|
|
13
|
+
export type { UpdateCommandOptions, UpdateCommandResult } from "./update.js";
|
|
14
14
|
export { serverStart, serverStop, serverStatus } from "./server.js";
|
|
15
15
|
export type { ServerStartOptions, ServerInfo } from "./server.js";
|
|
16
|
+
export { executeCite, formatCiteOutput, formatCiteErrors, getCiteExitCode } from "./cite.js";
|
|
17
|
+
export type { CiteCommandOptions, CiteCommandResult } from "./cite.js";
|
|
18
|
+
export { executeFulltextAttach, executeFulltextGet, executeFulltextDetach, formatFulltextAttachOutput, formatFulltextGetOutput, formatFulltextDetachOutput, getFulltextExitCode, } from "./fulltext.js";
|
|
19
|
+
export type { FulltextAttachOptions, FulltextAttachResult, FulltextGetOptions, FulltextGetResult, FulltextDetachOptions, FulltextDetachResult, } from "./fulltext.js";
|
|
16
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpE,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,WAAW,GACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC7F,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,eAAe,CAAC"}
|
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ListResult } from "../../features/operations/list.js";
|
|
2
|
+
import type { ExecutionContext } from "../execution-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Options for the list command.
|
|
5
|
+
*/
|
|
6
|
+
export interface ListCommandOptions {
|
|
3
7
|
json?: boolean;
|
|
4
8
|
idsOnly?: boolean;
|
|
5
9
|
uuid?: boolean;
|
|
6
10
|
bibtex?: boolean;
|
|
7
11
|
}
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
13
|
+
* Result from list command execution.
|
|
14
|
+
*/
|
|
15
|
+
export type ListCommandResult = ListResult;
|
|
16
|
+
/**
|
|
17
|
+
* Execute list command.
|
|
18
|
+
* Uses context.library.list() which works for both local and server modes.
|
|
19
|
+
*
|
|
20
|
+
* @param options - List command options
|
|
21
|
+
* @param context - Execution context
|
|
22
|
+
* @returns List result containing formatted items
|
|
23
|
+
*/
|
|
24
|
+
export declare function executeList(options: ListCommandOptions, context: ExecutionContext): Promise<ListCommandResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Format list result for CLI output.
|
|
10
27
|
*
|
|
11
|
-
* @param
|
|
12
|
-
* @
|
|
28
|
+
* @param result - List result
|
|
29
|
+
* @returns Formatted output string
|
|
13
30
|
*/
|
|
14
|
-
export declare function
|
|
31
|
+
export declare function formatListOutput(result: ListCommandResult): string;
|
|
15
32
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AA4B3C;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAK5B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,CAKlE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Readable, Writable } from "node:stream";
|
|
2
|
+
import { type McpServerResult } from "../../mcp/index.js";
|
|
3
|
+
export interface McpStartOptions {
|
|
4
|
+
configPath: string;
|
|
5
|
+
libraryPath?: string;
|
|
6
|
+
stdin?: Readable;
|
|
7
|
+
stdout?: Writable;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Start MCP stdio server.
|
|
11
|
+
*
|
|
12
|
+
* @param options - MCP server options
|
|
13
|
+
* @returns MCP server result with dispose function
|
|
14
|
+
*/
|
|
15
|
+
export declare function mcpStart(options: McpStartOptions): Promise<McpServerResult>;
|
|
16
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,KAAK,eAAe,EAAmB,MAAM,oBAAoB,CAAC;AAE3E,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAgBjF"}
|
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
import type { CslItem } from "../../core/csl-json/types.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import type { FulltextType } from "../../features/fulltext/index.js";
|
|
3
|
+
import type { RemoveResult } from "../../features/operations/remove.js";
|
|
4
|
+
import type { ExecutionContext } from "../execution-context.js";
|
|
5
|
+
/**
|
|
6
|
+
* Options for the remove command.
|
|
7
|
+
*/
|
|
8
|
+
export interface RemoveCommandOptions {
|
|
9
|
+
identifier: string;
|
|
10
|
+
byUuid?: boolean;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* Result from remove command execution.
|
|
14
|
+
*/
|
|
15
|
+
export type RemoveCommandResult = RemoveResult;
|
|
16
|
+
/**
|
|
17
|
+
* Execute remove command.
|
|
18
|
+
* Uses context.library.remove() which works for both local and server modes.
|
|
12
19
|
*
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param options - Remove options
|
|
20
|
+
* @param options - Remove command options
|
|
21
|
+
* @param context - Execution context
|
|
16
22
|
* @returns Remove result
|
|
17
23
|
*/
|
|
18
|
-
export declare function
|
|
24
|
+
export declare function executeRemove(options: RemoveCommandOptions, context: ExecutionContext): Promise<RemoveCommandResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Format remove result for CLI output.
|
|
27
|
+
*
|
|
28
|
+
* @param result - Remove result
|
|
29
|
+
* @param identifier - The identifier that was used
|
|
30
|
+
* @returns Formatted output string
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatRemoveOutput(result: RemoveCommandResult, identifier: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Get fulltext attachment types from a CSL item.
|
|
35
|
+
*
|
|
36
|
+
* @param item - CSL item to check
|
|
37
|
+
* @returns Array of attached fulltext types
|
|
38
|
+
*/
|
|
39
|
+
export declare function getFulltextAttachmentTypes(item: CslItem): FulltextType[];
|
|
40
|
+
/**
|
|
41
|
+
* Format fulltext warning message for remove confirmation.
|
|
42
|
+
*
|
|
43
|
+
* @param types - Attached fulltext types
|
|
44
|
+
* @returns Warning message string
|
|
45
|
+
*/
|
|
46
|
+
export declare function formatFulltextWarning(types: FulltextType[]): string;
|
|
47
|
+
/**
|
|
48
|
+
* Delete fulltext files associated with a CSL item.
|
|
49
|
+
*
|
|
50
|
+
* @param item - CSL item with fulltext attachments
|
|
51
|
+
* @param fulltextDirectory - Directory containing fulltext files
|
|
52
|
+
*/
|
|
53
|
+
export declare function deleteFulltextFiles(item: CslItem, fulltextDirectory: string): Promise<void>;
|
|
19
54
|
//# sourceMappingURL=remove.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"remove.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/remove.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAI9B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAW1F;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,EAAE,CAYxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM,CAInE;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBjG"}
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { SearchResult } from "../../features/operations/search.js";
|
|
2
|
+
import type { ExecutionContext } from "../execution-context.js";
|
|
3
|
+
/**
|
|
4
|
+
* Options for the search command.
|
|
5
|
+
*/
|
|
6
|
+
export interface SearchCommandOptions {
|
|
7
|
+
query: string;
|
|
3
8
|
json?: boolean;
|
|
4
9
|
idsOnly?: boolean;
|
|
5
10
|
uuid?: boolean;
|
|
6
11
|
bibtex?: boolean;
|
|
7
12
|
}
|
|
8
13
|
/**
|
|
9
|
-
*
|
|
14
|
+
* Result from search command execution.
|
|
15
|
+
*/
|
|
16
|
+
export type SearchCommandResult = SearchResult;
|
|
17
|
+
/**
|
|
18
|
+
* Execute search command.
|
|
19
|
+
* Uses context.library.search() which works for both local and server modes.
|
|
20
|
+
*
|
|
21
|
+
* @param options - Search command options
|
|
22
|
+
* @param context - Execution context
|
|
23
|
+
* @returns Search result containing formatted items
|
|
24
|
+
*/
|
|
25
|
+
export declare function executeSearch(options: SearchCommandOptions, context: ExecutionContext): Promise<SearchCommandResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Format search result for CLI output.
|
|
10
28
|
*
|
|
11
|
-
* @param
|
|
12
|
-
* @
|
|
13
|
-
* @param options - Output format options
|
|
29
|
+
* @param result - Search result
|
|
30
|
+
* @returns Formatted output string
|
|
14
31
|
*/
|
|
15
|
-
export declare function
|
|
32
|
+
export declare function formatSearchOutput(result: SearchCommandResult): string;
|
|
16
33
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AA4B/C;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAK9B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAKtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASrD,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAe5E;AA4ED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYpE;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA0BnF"}
|
|
@@ -1,20 +1,33 @@
|
|
|
1
1
|
import type { CslItem } from "../../core/csl-json/types.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import type { UpdateOperationResult } from "../../features/operations/update.js";
|
|
3
|
+
import type { ExecutionContext } from "../execution-context.js";
|
|
4
|
+
/**
|
|
5
|
+
* Options for the update command.
|
|
6
|
+
*/
|
|
7
|
+
export interface UpdateCommandOptions {
|
|
8
|
+
identifier: string;
|
|
9
|
+
updates: Partial<CslItem>;
|
|
10
|
+
byUuid?: boolean;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* Result from update command execution.
|
|
14
|
+
*/
|
|
15
|
+
export type UpdateCommandResult = UpdateOperationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Execute update command.
|
|
18
|
+
* Uses context.library.update() which works for both local and server modes.
|
|
12
19
|
*
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param updates - Partial updates to apply
|
|
16
|
-
* @param options - Update options
|
|
20
|
+
* @param options - Update command options
|
|
21
|
+
* @param context - Execution context
|
|
17
22
|
* @returns Update result
|
|
18
23
|
*/
|
|
19
|
-
export declare function
|
|
24
|
+
export declare function executeUpdate(options: UpdateCommandOptions, context: ExecutionContext): Promise<UpdateCommandResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Format update result for CLI output.
|
|
27
|
+
*
|
|
28
|
+
* @param result - Update result
|
|
29
|
+
* @param identifier - The identifier that was used
|
|
30
|
+
* @returns Formatted output string
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatUpdateOutput(result: UpdateCommandResult, identifier: string): string;
|
|
20
33
|
//# sourceMappingURL=update.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AAExD;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,mBAAmB,CAAC,CAI9B;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAsB1F"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution Context for CLI Commands
|
|
3
|
+
*
|
|
4
|
+
* Provides a unified interface for CLI commands to interact with the library,
|
|
5
|
+
* regardless of whether running in local or server mode.
|
|
6
|
+
*
|
|
7
|
+
* See: spec/decisions/ADR-009-ilibrary-operations-pattern.md
|
|
8
|
+
*/
|
|
9
|
+
import type { Config } from "../config/schema.js";
|
|
10
|
+
import type { Library } from "../core/library.js";
|
|
11
|
+
import type { ILibraryOperations } from "../features/operations/library-operations.js";
|
|
12
|
+
/**
|
|
13
|
+
* Execution mode indicating whether CLI is using local file access or server API.
|
|
14
|
+
*/
|
|
15
|
+
export type ExecutionMode = "local" | "server";
|
|
16
|
+
/**
|
|
17
|
+
* Unified execution context for CLI commands.
|
|
18
|
+
*
|
|
19
|
+
* Commands use `context.library` for all operations without needing to branch
|
|
20
|
+
* based on execution mode. The `mode` field is available for diagnostics and logging.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* // No branching needed - same code works for both modes
|
|
25
|
+
* const results = await context.library.search({ query });
|
|
26
|
+
* console.log(`Mode: ${context.mode}`);
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export interface ExecutionContext {
|
|
30
|
+
/** Execution mode for diagnostics and logging */
|
|
31
|
+
mode: ExecutionMode;
|
|
32
|
+
/** Unified operations interface - works for both local and server modes */
|
|
33
|
+
library: ILibraryOperations;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Creates an execution context based on the current configuration.
|
|
37
|
+
*
|
|
38
|
+
* This function checks for an available server connection first.
|
|
39
|
+
* If a server is available, it returns a context with ServerClient.
|
|
40
|
+
* Otherwise, it loads the library and returns a context with OperationsLibrary.
|
|
41
|
+
*
|
|
42
|
+
* @param config - The application configuration
|
|
43
|
+
* @param loadLibrary - Function to load the library (injected for testability)
|
|
44
|
+
* @returns Promise resolving to an ExecutionContext
|
|
45
|
+
*/
|
|
46
|
+
export declare function createExecutionContext(config: Config, loadLibrary: (path: string) => Promise<Library>): Promise<ExecutionContext>;
|
|
47
|
+
//# sourceMappingURL=execution-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-context.d.ts","sourceRoot":"","sources":["../../src/cli/execution-context.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAKvF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,IAAI,EAAE,aAAa,CAAC;IACpB,2EAA2E;IAC3E,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,CAmB3B"}
|
package/dist/cli/helpers.d.ts
CHANGED
|
@@ -58,4 +58,22 @@ export declare function isTTY(): boolean;
|
|
|
58
58
|
* @returns True if user confirmed (y/yes), false otherwise
|
|
59
59
|
*/
|
|
60
60
|
export declare function readConfirmation(prompt: string): Promise<boolean>;
|
|
61
|
+
/**
|
|
62
|
+
* Read stdin content and split into inputs.
|
|
63
|
+
* Used for reading identifiers from stdin.
|
|
64
|
+
* @returns Array of input strings (split by whitespace)
|
|
65
|
+
*/
|
|
66
|
+
export declare function readStdinInputs(): Promise<string[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Read raw stdin content without splitting.
|
|
69
|
+
* Used for reading file content (JSON, BibTeX, RIS) from stdin.
|
|
70
|
+
* @returns Raw stdin content as string
|
|
71
|
+
*/
|
|
72
|
+
export declare function readStdinContent(): Promise<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Read raw stdin content as Buffer.
|
|
75
|
+
* Used for reading binary file content (PDF) from stdin.
|
|
76
|
+
* @returns Raw stdin content as Buffer
|
|
77
|
+
*/
|
|
78
|
+
export declare function readStdinBuffer(): Promise<Buffer>;
|
|
61
79
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/cli/helpers.ts"],"names":[],"m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;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAMxD;AAED;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAMvD"}
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoDpC;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CA8BvC;AAkwBD;;GAEG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxD"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import type { CslItem } from "../core/csl-json/types.js";
|
|
2
|
+
import type { FindOptions, RemoveResult as ILibraryRemoveResult, RemoveOptions, UpdateOptions, UpdateResult } from "../core/library-interface.js";
|
|
3
|
+
import type { AddReferencesResult, CiteResult, ILibraryOperations, ImportOptions, ListOptions, ListResult, SearchOperationOptions, SearchResult } from "../features/operations/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Options for cite method.
|
|
6
|
+
*/
|
|
7
|
+
export interface CiteOptions {
|
|
8
|
+
identifiers: string[];
|
|
9
|
+
byUuid?: boolean;
|
|
10
|
+
inText?: boolean;
|
|
11
|
+
style?: string;
|
|
12
|
+
cslFile?: string;
|
|
13
|
+
locale?: string;
|
|
14
|
+
format?: "text" | "html";
|
|
15
|
+
}
|
|
2
16
|
/**
|
|
3
17
|
* Client for communicating with the reference-manager HTTP server.
|
|
4
18
|
*/
|
|
5
|
-
export declare class ServerClient {
|
|
19
|
+
export declare class ServerClient implements ILibraryOperations {
|
|
6
20
|
private baseUrl;
|
|
7
21
|
constructor(baseUrl: string);
|
|
8
22
|
/**
|
|
@@ -11,28 +25,61 @@ export declare class ServerClient {
|
|
|
11
25
|
*/
|
|
12
26
|
getAll(): Promise<CslItem[]>;
|
|
13
27
|
/**
|
|
14
|
-
* Find reference by UUID.
|
|
15
|
-
* @param
|
|
16
|
-
* @
|
|
28
|
+
* Find reference by citation ID or UUID.
|
|
29
|
+
* @param identifier - Citation ID or UUID
|
|
30
|
+
* @param options - Find options (byUuid to use UUID lookup)
|
|
31
|
+
* @returns CSL item or undefined if not found
|
|
17
32
|
*/
|
|
18
|
-
|
|
33
|
+
find(identifier: string, options?: FindOptions): Promise<CslItem | undefined>;
|
|
19
34
|
/**
|
|
20
35
|
* Add new reference to the library.
|
|
21
36
|
* @param item - CSL item to add
|
|
22
|
-
* @returns
|
|
37
|
+
* @returns The added CSL item (with generated ID and UUID)
|
|
23
38
|
*/
|
|
24
39
|
add(item: CslItem): Promise<CslItem>;
|
|
25
40
|
/**
|
|
26
|
-
* Update
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
41
|
+
* Update reference by citation ID or UUID.
|
|
42
|
+
* @param identifier - Citation ID or UUID
|
|
43
|
+
* @param updates - Partial CSL item with fields to update
|
|
44
|
+
* @param options - Update options (byUuid to use UUID lookup, onIdCollision for collision handling)
|
|
45
|
+
* @returns Update result with updated item, success status, and any ID changes
|
|
46
|
+
*/
|
|
47
|
+
update(identifier: string, updates: Partial<CslItem>, options?: UpdateOptions): Promise<UpdateResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a reference by citation ID or UUID.
|
|
50
|
+
* @param identifier - The citation ID or UUID of the reference to remove
|
|
51
|
+
* @param options - Remove options (byUuid to use UUID lookup)
|
|
52
|
+
* @returns Remove result with removed status and removedItem
|
|
53
|
+
*/
|
|
54
|
+
remove(identifier: string, options?: RemoveOptions): Promise<ILibraryRemoveResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Save is a no-op for ServerClient (HTTP requests are already persisted).
|
|
57
|
+
*/
|
|
58
|
+
save(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Import references from various input formats.
|
|
61
|
+
* @param inputs - Array of inputs (file paths, PMIDs, DOIs)
|
|
62
|
+
* @param options - Options for import operation
|
|
63
|
+
* @returns Result containing added, failed, and skipped items
|
|
64
|
+
*/
|
|
65
|
+
import(inputs: string[], options?: ImportOptions): Promise<AddReferencesResult>;
|
|
66
|
+
/**
|
|
67
|
+
* Generate citations for references.
|
|
68
|
+
* @param options - Cite options including identifiers and formatting
|
|
69
|
+
* @returns Cite result with per-identifier results
|
|
70
|
+
*/
|
|
71
|
+
cite(options: CiteOptions): Promise<CiteResult>;
|
|
72
|
+
/**
|
|
73
|
+
* List all references with optional formatting.
|
|
74
|
+
* @param options - List options including format
|
|
75
|
+
* @returns List result with formatted items
|
|
30
76
|
*/
|
|
31
|
-
|
|
77
|
+
list(options?: ListOptions): Promise<ListResult>;
|
|
32
78
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
79
|
+
* Search references with query.
|
|
80
|
+
* @param options - Search options including query and format
|
|
81
|
+
* @returns Search result with formatted items
|
|
35
82
|
*/
|
|
36
|
-
|
|
83
|
+
search(options: SearchOperationOptions): Promise<SearchResult>;
|
|
37
84
|
}
|
|
38
85
|
//# 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,EACV,WAAW,EACX,YA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ACG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAerF;;;;OAIG;IACG,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAerD;;;;OAIG;IACG,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAetD;;;;OAIG;IACG,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,CAAC;CAcrE"}
|
|
@@ -15,6 +15,7 @@ export interface ServerConnection {
|
|
|
15
15
|
export declare function getServerConnection(libraryPath: string, config: Config): Promise<ServerConnection | null>;
|
|
16
16
|
/**
|
|
17
17
|
* Start server in daemon mode.
|
|
18
|
+
* Spawns server process directly (without --daemon flag) in background.
|
|
18
19
|
* @param libraryPath - Path to the library file
|
|
19
20
|
* @param _config - Configuration (reserved for future use)
|
|
20
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-detection.d.ts","sourceRoot":"","sources":["../../src/cli/server-detection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AASlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmClC;AAED
|
|
1
|
+
{"version":3,"file":"server-detection.d.ts","sourceRoot":"","sources":["../../src/cli/server-detection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AASlD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmClC;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW3F;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CActE"}
|