@danypops/pi-lector 0.11.1 → 0.11.2
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JobSnapshot, PopulateSymbolGraphResult, WorkspaceCacheStatus } from "@danypops/lector";
|
|
2
|
-
import { lectorClient, withWorkspace,
|
|
2
|
+
import { lectorClient, withWorkspace, workspaceForProjectDirectory } from "../lector-client.ts";
|
|
3
3
|
|
|
4
4
|
export interface WorkspaceCacheOperations {
|
|
5
5
|
status(directory: string, maxFiles: number, maxSymbolsPerFile: number): Promise<WorkspaceCacheStatus>;
|
|
@@ -11,7 +11,7 @@ export function createWorkspaceCacheOperations(): WorkspaceCacheOperations {
|
|
|
11
11
|
return {
|
|
12
12
|
status(directory, maxFiles, maxSymbolsPerFile) {
|
|
13
13
|
return withWorkspace(
|
|
14
|
-
() =>
|
|
14
|
+
() => workspaceForProjectDirectory(directory),
|
|
15
15
|
async ({ workspaceId }) => {
|
|
16
16
|
const client = await lectorClient();
|
|
17
17
|
return client.call("workspace.cacheStatus", { workspaceId, maxFiles, maxSymbolsPerFile });
|
|
@@ -20,7 +20,7 @@ export function createWorkspaceCacheOperations(): WorkspaceCacheOperations {
|
|
|
20
20
|
},
|
|
21
21
|
submit(directory, maxFiles, maxSymbolsPerFile) {
|
|
22
22
|
return withWorkspace(
|
|
23
|
-
() =>
|
|
23
|
+
() => workspaceForProjectDirectory(directory),
|
|
24
24
|
async ({ workspaceId }) => {
|
|
25
25
|
const client = await lectorClient();
|
|
26
26
|
const { job } = await client.callOnce("job.submit", {
|
package/package.json
CHANGED