@vite-hub/workspace 0.0.3 → 0.1.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/LICENSE +201 -0
- package/README.md +236 -58
- package/dist/{ai-nmHdzjCM.d.ts → ai-BW2ZhizI.d.ts} +22 -7
- package/dist/{ai-Ce3PtWFW.js → ai-BZyLwULx.js} +147 -66
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +1 -1
- package/dist/{asset-registry-CaG9b7tf.js → asset-registry-DfBV5kmw.js} +3 -2
- package/dist/association-Cm0dUTDU-CDDhJnIh-Cv3bWnVb.js +19 -0
- package/dist/blob-database.d.ts +521 -0
- package/dist/blob-database.js +601 -0
- package/dist/cloudflare.d.ts +5 -6
- package/dist/cloudflare.js +1 -1
- package/dist/config-B7dmzDX3.js +1112 -0
- package/dist/{config-3I1BnsdO.d.ts → config-DLKdaFWN.d.ts} +1 -2
- package/dist/error-diagnostics-A_8Kp-48.js +116 -0
- package/dist/error-diagnostics-DY5GP47p.js +96 -0
- package/dist/events-7EBoeIPd-A2RUkJi5-BxrICQ17.js +354 -0
- package/dist/events-CRaLy7U3-3PNNp5WZ-Gv9nd0cH.js +214 -0
- package/dist/events-CeChclTf-CX-gD8oy-4aL2j6V-.js +527 -0
- package/dist/feed-DsC7Vws1-M_de2nSK-tKc0Pwo8.js +248 -0
- package/dist/feed-Dyf730Ys-D0HgBba6-BUnCa5gS.js +179 -0
- package/dist/file-C0_aPWSS.js +26 -0
- package/dist/file-metadata-CxDy-E2H.js +58 -0
- package/dist/{files-QRV55OCx.js → files-C7Px8uaC.js} +21 -10
- package/dist/forgejo-BN8ItCfl-Bbn4vhDd.js +2278 -0
- package/dist/{github-CfA5vpJ5.js → github-CPxHtFB7.js} +36 -34
- package/dist/github-DtncTfmv-Du2S8lGF.js +4159 -0
- package/dist/gitlab-BoDm8-BC-xzZsW9eW.js +2530 -0
- package/dist/glob--XcLlcml.js +22 -0
- package/dist/glob--kNYDbfU.js +30 -0
- package/dist/graphql-DG5aJBT3-DceyFYdM-C4saqX37.js +489 -0
- package/dist/host-CFnrTXTK.js +1086 -0
- package/dist/{hosted-C1-tTTTf.js → hosted-acMA5XyL.js} +216 -43
- package/dist/hosted-vercel-blob-DKntsHaf.js +12603 -0
- package/dist/hosted-vercel-blob.d.ts +5 -6
- package/dist/hosted-vercel-blob.js +1 -1
- package/dist/hosted.d.ts +6 -7
- package/dist/hosted.js +1 -1
- package/dist/index.d.ts +76 -64
- package/dist/index.js +162 -457
- package/dist/inspect-BoObD2cJ.js +167 -0
- package/dist/internal/path.d.ts +2 -0
- package/dist/internal/path.js +2 -0
- package/dist/lifecycle-BwZ7c9hb.js +596 -0
- package/dist/loader.d.ts +5 -6
- package/dist/loader.js +3 -2
- package/dist/mcp-resources-BREFCmtn.js +39 -0
- package/dist/memory-BbwOqDXl.js +248 -0
- package/dist/metadata-target-DZEZQGHA.js +1588 -0
- package/dist/mountx.d.ts +4 -6
- package/dist/mountx.js +10 -8
- package/dist/nitro.d.ts +1 -1
- package/dist/nitro.js +1 -1
- package/dist/nuxt.d.ts +13 -12
- package/dist/nuxt.js +10 -8
- package/dist/operations-BcpWr41m.js +159 -0
- package/dist/operations-CGqY1XeG.js +965 -0
- package/dist/operations-DnOwKsJT.d.ts +136 -0
- package/dist/operations.d.ts +53 -0
- package/dist/operations.js +2 -0
- package/dist/{path-CNI6wKIU.js → path-CNAwN7pw.js} +34 -35
- package/dist/path-DrSIenjj.js +59 -0
- package/dist/path-zHxQUbqa.d.ts +9 -0
- package/dist/plugins-DqQ8b4T5.d.ts +10 -0
- package/dist/provider-kXjfli9u.js +1457 -0
- package/dist/providers/github/store.d.ts +3 -5
- package/dist/providers/github/store.js +1 -1
- package/dist/registry-Bp-8UUfG.js +129 -0
- package/dist/{registry-BIQVCBWI.d.ts → registry-Cg1TJVVZ.d.ts} +3 -4
- package/dist/{request-execution-u9mgUXKX.js → request-execution-Dk9rY-Yh.js} +24 -20
- package/dist/rolldown-runtime-B4iAMlE-.js +35 -0
- package/dist/runtime/assets.d.ts +3 -5
- package/dist/runtime/assets.js +9 -6
- package/dist/runtime/empty-assets-registry.d.ts +1 -2
- package/dist/runtime/empty-registry.d.ts +1 -2
- package/dist/runtime/state.d.ts +4 -4
- package/dist/runtime/state.js +10 -7
- package/dist/runtime/workspace.d.ts +1 -1
- package/dist/runtime/workspace.js +1 -1
- package/dist/runtime.d.ts +84 -15
- package/dist/runtime.js +561 -108
- package/dist/{search-C4REyHj9.js → search-CrTmXj5h.js} +10 -9
- package/dist/server-BNQ-Nbjj.js +290 -0
- package/dist/server.d.ts +22 -34
- package/dist/server.js +2 -355
- package/dist/shared-DalXdP0i.js +2158 -0
- package/dist/source-metadata.d.ts +7 -1
- package/dist/source-metadata.js +34 -2
- package/dist/{state-TTqa3x3Y.d.ts → state-B8zbLi5t.d.ts} +14 -13
- package/dist/store-CXgmu-uw.js +1729 -0
- package/dist/{sync-DiuDmSGk.js → sync-CN6ec-5M.js} +62 -41
- package/dist/templates-Bn8a-pd2-D9DhJEVD-CBfXNRzz.js +125 -0
- package/dist/test.d.ts +1 -1
- package/dist/test.js +1 -1
- package/dist/token-CO62GglH.js +61 -0
- package/dist/{types-60Yn149G.d.ts → types-DeK9GIxy.d.ts} +348 -49
- package/dist/{use-CsV3oIxH.js → use-BQj7nSz6.js} +200 -45
- package/dist/{use-CUFSnFCS.d.ts → use-DhwhbAVV.d.ts} +34 -12
- package/dist/utils-Blrh4N2n.js +545 -0
- package/dist/vite-BEvgU2GY.js +20909 -0
- package/dist/vite-CcZmMQ7S.d.ts +476 -0
- package/dist/vite.d.ts +2 -50
- package/dist/vite.js +2 -2
- package/dist/webhooks-DgHwxxYz-D1V2LOr1-azofFOiP.js +1565 -0
- package/dist/workspace-6pxkOuxr.js +1286 -0
- package/dist/workspace-BWJQBK1u.d.ts +7 -0
- package/package.json +90 -59
- package/dist/chunk-8H4AJuhK.js +0 -14
- package/dist/collections/client.d.ts +0 -39
- package/dist/collections/client.js +0 -137
- package/dist/collections.d.ts +0 -59
- package/dist/collections.js +0 -159
- package/dist/config-CDoyls2X.js +0 -30
- package/dist/config-CZLO0m9h.js +0 -7811
- package/dist/file-CHfsZpso.js +0 -23
- package/dist/glob-D0vD_wRY.js +0 -17
- package/dist/host-CAnbugpI.js +0 -370
- package/dist/hosted-vercel-blob-CWBILDVo.js +0 -257
- package/dist/lifecycle-BYoa9hVb.js +0 -176
- package/dist/provider-C3_elpEh.js +0 -599
- package/dist/publish.d.ts +0 -35
- package/dist/publish.js +0 -112
- package/dist/registry-CqyDTW9Y.js +0 -74
- package/dist/runtime-options-BsPSv5O7.js +0 -13
- package/dist/shared-jfogBrd5.js +0 -273
- package/dist/store-Bs1SLh55.js +0 -414
- package/dist/vite-tbfDxtlu.js +0 -2191
- package/dist/workspace-66SKyiec.d.ts +0 -6
- package/dist/workspace-C4k92Ow8.js +0 -1460
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { bn as WorkspaceStore, s as GitHubWorkspaceStoreOptions } from "../../types-DeK9GIxy.js";
|
|
3
2
|
//#region src/providers/github/store.d.ts
|
|
4
|
-
declare function createGitHubWorkspaceStore(options: GitHubWorkspaceStoreOptions, workspaceName: string): WorkspaceStore;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { createGitHubWorkspaceStore };
|
|
3
|
+
export declare function createGitHubWorkspaceStore(options: GitHubWorkspaceStoreOptions, workspaceName: string): WorkspaceStore;
|
|
4
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGitHubWorkspaceStore } from "../../store-
|
|
1
|
+
import { t as createGitHubWorkspaceStore } from "../../store-CXgmu-uw.js";
|
|
2
2
|
export { createGitHubWorkspaceStore };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { c as workspaceNotFoundError } from "./path-DrSIenjj.js";
|
|
2
|
+
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-DY5GP47p.js";
|
|
3
|
+
import { t as createWorkspace } from "./workspace-6pxkOuxr.js";
|
|
4
|
+
import { hasRuntimeType } from "@vite-hub/runtime/internal/runtime-type";
|
|
5
|
+
import runtimeRegistry from "#vitehub-workspace-registry";
|
|
6
|
+
//#region src/core/registry.ts
|
|
7
|
+
const workspaceRegistryStateKey = Symbol.for("vitehub.workspace.registryState");
|
|
8
|
+
function workspaceRegistryState() {
|
|
9
|
+
const scope = globalThis;
|
|
10
|
+
scope[workspaceRegistryStateKey] ??= {
|
|
11
|
+
loadingDefinitions: /* @__PURE__ */ new Map(),
|
|
12
|
+
loadGenerations: /* @__PURE__ */ new Map(),
|
|
13
|
+
loadedDefinitions: /* @__PURE__ */ new Map(),
|
|
14
|
+
loaders: runtimeRegistry,
|
|
15
|
+
registeredDefinitions: /* @__PURE__ */ new Map()
|
|
16
|
+
};
|
|
17
|
+
scope[workspaceRegistryStateKey].loadingDefinitions ??= /* @__PURE__ */ new Map();
|
|
18
|
+
scope[workspaceRegistryStateKey].loadGenerations ??= /* @__PURE__ */ new Map();
|
|
19
|
+
return scope[workspaceRegistryStateKey];
|
|
20
|
+
}
|
|
21
|
+
function pickWorkspaceFields(definition) {
|
|
22
|
+
const { __vitehubWorkspaceAgent: _agent, __vitehubWorkspaceAgentOptions: _agentOptions, description: _description, fallback: _fallback, instructions: _instructions, model: _model, name: _agentName, resolve: _resolve, run: _run, stepLimit: _stepLimit, workspace: _workspace, ...workspace } = definition;
|
|
23
|
+
return workspace;
|
|
24
|
+
}
|
|
25
|
+
function normalizeWorkspaceDefinition(name, definition) {
|
|
26
|
+
if (!definition) throw workspaceNotFoundError(name);
|
|
27
|
+
const workspaceAgentOptions = definition.__vitehubWorkspaceAgentOptions;
|
|
28
|
+
if (workspaceAgentOptions?.workspace) {
|
|
29
|
+
const injectedWorkspace = pickWorkspaceFields(definition);
|
|
30
|
+
const configuredWorkspace = hasRuntimeType(workspaceAgentOptions.workspace, "string") ? {} : workspaceAgentOptions.workspace;
|
|
31
|
+
const sources = mergeWorkspaceSources(injectedWorkspace.sources, configuredWorkspace.sources);
|
|
32
|
+
const normalizedWorkspace = {
|
|
33
|
+
...injectedWorkspace,
|
|
34
|
+
...configuredWorkspace,
|
|
35
|
+
rootDir: configuredWorkspace.rootDir ?? injectedWorkspace.rootDir,
|
|
36
|
+
sourceRootDir: configuredWorkspace.sourceRootDir ?? injectedWorkspace.sourceRootDir,
|
|
37
|
+
name
|
|
38
|
+
};
|
|
39
|
+
if (sources) normalizedWorkspace.sources = sources;
|
|
40
|
+
return normalizedWorkspace;
|
|
41
|
+
}
|
|
42
|
+
if ("name" in definition) throw workspaceErrorDiagnostics.WORKSPACE_R0021({ message: `[vitehub] Workspace definition "${name}" must not declare a name. Workspace names are inferred from filenames.` });
|
|
43
|
+
return {
|
|
44
|
+
...pickWorkspaceFields(definition),
|
|
45
|
+
name
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function mergeWorkspaceSources(injected, configured) {
|
|
49
|
+
if (!injected && !configured) return void 0;
|
|
50
|
+
return {
|
|
51
|
+
...injected,
|
|
52
|
+
...configured
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function registerWorkspace(name, definition) {
|
|
56
|
+
if (!name || !hasRuntimeType(name, "string")) throw workspaceErrorDiagnostics.WORKSPACE_R0022({ message: "[vitehub] registerWorkspace requires a string name." });
|
|
57
|
+
const registered = normalizeWorkspaceDefinition(name, definition);
|
|
58
|
+
workspaceRegistryState().registeredDefinitions.set(name, registered);
|
|
59
|
+
return registered;
|
|
60
|
+
}
|
|
61
|
+
function setWorkspaceRegistry(registry) {
|
|
62
|
+
const state = workspaceRegistryState();
|
|
63
|
+
invalidateWorkspaceLoads(state);
|
|
64
|
+
state.loaders = registry;
|
|
65
|
+
state.loadedDefinitions.clear();
|
|
66
|
+
}
|
|
67
|
+
function invalidateWorkspaceLoads(state) {
|
|
68
|
+
for (const [name, loading] of state.loadingDefinitions) if (state.loadGenerations.get(name) === loading.generation) state.loadGenerations.set(name, loading.generation + 1);
|
|
69
|
+
state.loadingDefinitions.clear();
|
|
70
|
+
}
|
|
71
|
+
async function resolveWorkspaceDefinition(name, abortSignal) {
|
|
72
|
+
const state = workspaceRegistryState();
|
|
73
|
+
const existing = state.registeredDefinitions.get(name) || state.loadedDefinitions.get(name);
|
|
74
|
+
if (existing) return existing;
|
|
75
|
+
const load = state.loaders[name];
|
|
76
|
+
if (!load) throw workspaceNotFoundError(name);
|
|
77
|
+
let loading = state.loadingDefinitions.get(name);
|
|
78
|
+
if (!loading || loading.load !== load) {
|
|
79
|
+
const generation = (state.loadGenerations.get(name) ?? 0) + 1;
|
|
80
|
+
state.loadGenerations.set(name, generation);
|
|
81
|
+
const promise = load().then((mod) => {
|
|
82
|
+
const definition = normalizeWorkspaceDefinition(name, mod.default);
|
|
83
|
+
if (state.loadGenerations.get(name) === generation && state.loaders[name] === load) state.loadedDefinitions.set(name, definition);
|
|
84
|
+
return definition;
|
|
85
|
+
});
|
|
86
|
+
loading = {
|
|
87
|
+
consumers: 0,
|
|
88
|
+
generation,
|
|
89
|
+
load,
|
|
90
|
+
promise
|
|
91
|
+
};
|
|
92
|
+
state.loadingDefinitions.set(name, loading);
|
|
93
|
+
promise.finally(() => {
|
|
94
|
+
if (state.loadingDefinitions.get(name) === loading) state.loadingDefinitions.delete(name);
|
|
95
|
+
}).catch(() => {});
|
|
96
|
+
}
|
|
97
|
+
loading.consumers++;
|
|
98
|
+
let aborted = false;
|
|
99
|
+
let rejectAbort;
|
|
100
|
+
const abort = new Promise((_resolve, reject) => {
|
|
101
|
+
rejectAbort = reject;
|
|
102
|
+
});
|
|
103
|
+
const onAbort = () => {
|
|
104
|
+
aborted = true;
|
|
105
|
+
rejectAbort(abortSignal?.reason);
|
|
106
|
+
};
|
|
107
|
+
if (abortSignal?.aborted) onAbort();
|
|
108
|
+
else abortSignal?.addEventListener("abort", onAbort, { once: true });
|
|
109
|
+
try {
|
|
110
|
+
if (!abortSignal) return await loading.promise;
|
|
111
|
+
return await Promise.race([loading.promise, abort]);
|
|
112
|
+
} finally {
|
|
113
|
+
abortSignal?.removeEventListener("abort", onAbort);
|
|
114
|
+
loading.consumers--;
|
|
115
|
+
if (aborted && loading.consumers === 0 && state.loadingDefinitions.get(name) === loading) {
|
|
116
|
+
state.loadingDefinitions.delete(name);
|
|
117
|
+
if (state.loadGenerations.get(name) === loading.generation) state.loadGenerations.set(name, loading.generation + 1);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async function resolveRegisteredWorkspaceDefinition(name, abortSignal) {
|
|
122
|
+
return resolveWorkspaceDefinition(name, abortSignal);
|
|
123
|
+
}
|
|
124
|
+
async function useRegisteredWorkspace(name, options = {}) {
|
|
125
|
+
const definition = await resolveWorkspaceDefinition(name);
|
|
126
|
+
return createWorkspace(definition, options);
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
export { useRegisteredWorkspace as a, setWorkspaceRegistry as i, registerWorkspace as n, resolveRegisteredWorkspaceDefinition as r, normalizeWorkspaceDefinition as t };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { F as
|
|
2
|
-
|
|
1
|
+
import { F as WorkspaceDefinition, I as WorkspaceDefinitionInput } from "./types-DeK9GIxy.js";
|
|
3
2
|
//#region src/core/registry.d.ts
|
|
4
3
|
type WorkspaceRegistryModule = {
|
|
5
4
|
default?: WorkspaceDefinitionInput;
|
|
6
5
|
};
|
|
7
6
|
type WorkspaceRegistry = Record<string, () => Promise<WorkspaceRegistryModule>>;
|
|
8
|
-
declare function registerWorkspace(name: string, definition: WorkspaceDefinitionInput):
|
|
9
|
-
declare function resolveRegisteredWorkspaceDefinition(name: string): Promise<WorkspaceDefinition>;
|
|
7
|
+
declare function registerWorkspace(name: string, definition: WorkspaceDefinitionInput): WorkspaceDefinition;
|
|
8
|
+
declare function resolveRegisteredWorkspaceDefinition(name: string, abortSignal?: AbortSignal): Promise<WorkspaceDefinition>;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { registerWorkspace as n, resolveRegisteredWorkspaceDefinition as r, WorkspaceRegistry as t };
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import { a as normalizeWorkspaceSources,
|
|
1
|
+
import { a as normalizeWorkspaceSources, g as getWorkspaceSourceRequestExecutor, n as createSourceContext, v as workspaceSourceRequestDescriptorPath, y as requestJsonEqual } from "./config-B7dmzDX3.js";
|
|
2
|
+
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-DY5GP47p.js";
|
|
2
3
|
//#region src/sources/request-execution.ts
|
|
3
4
|
const sourceRequestExecutions = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
function isWeakKey(value) {
|
|
6
|
+
return Object(value) === value;
|
|
7
|
+
}
|
|
4
8
|
function attachWorkspaceSourceRequestExecution(target, executor) {
|
|
5
9
|
if (!executor) return target;
|
|
6
10
|
sourceRequestExecutions.set(target, executor);
|
|
7
11
|
return target;
|
|
8
12
|
}
|
|
9
13
|
function getWorkspaceSourceRequestExecution(input) {
|
|
14
|
+
if (!isWeakKey(input)) return void 0;
|
|
10
15
|
return sourceRequestExecutions.get(input);
|
|
11
16
|
}
|
|
12
17
|
function createWorkspaceSourceRequestExecution(definition, options = {}) {
|
|
13
18
|
const sources = normalizeWorkspaceSources(definition.sources).filter((source) => source.requestDescriptor && getWorkspaceSourceRequestExecutor(source.source)).filter((source) => sourceRequestVisible(source, options.selectedWorkspaceScope));
|
|
14
19
|
if (!sources.length) return void 0;
|
|
15
20
|
return { async executeSourceRequest(input) {
|
|
16
|
-
const matches = sources.filter((source) =>
|
|
17
|
-
|
|
18
|
-
if (!descriptor || descriptor.method !== input.method) return false;
|
|
19
|
-
return sameRequestTarget(descriptor.url, input.url);
|
|
20
|
-
}).filter((source) => source.requestDescriptor && requestShapeMatches(source.requestDescriptor, input));
|
|
21
|
-
if (matches.length !== 1) throw new Error(matches.length > 1 ? "[vitehub] Source request is ambiguous; more than one visible Source matches this curl target." : "[vitehub] Source request is not visible in the selected workspace scope or does not match a declared Source target.");
|
|
21
|
+
const matches = sources.filter((source) => source.requestDescriptor && workspaceSourceRequestMatches(source.requestDescriptor, input));
|
|
22
|
+
if (matches.length !== 1) throw workspaceErrorDiagnostics.WORKSPACE_R0063({ message: matches.length > 1 ? "[vitehub] Source request is ambiguous; more than one visible Source matches this curl target." : "[vitehub] Source request is not visible in the selected workspace scope or does not match a declared Source target." });
|
|
22
23
|
const source = matches[0];
|
|
23
24
|
const executor = getWorkspaceSourceRequestExecutor(source.source);
|
|
24
|
-
if (!executor) throw
|
|
25
|
+
if (!executor) throw workspaceErrorDiagnostics.WORKSPACE_R0064({ message: "[vitehub] Source request executor is unavailable." });
|
|
26
|
+
const contextOptions = {
|
|
27
|
+
...input.signal ? { abortSignal: input.signal } : {},
|
|
28
|
+
selectedWorkspaceScope: options.selectedWorkspaceScope
|
|
29
|
+
};
|
|
25
30
|
return await executor(input, createSourceContext(definition, {
|
|
26
31
|
key: source.key,
|
|
27
32
|
mountPath: source.mountPath
|
|
28
|
-
}, void 0,
|
|
33
|
+
}, void 0, contextOptions));
|
|
29
34
|
} };
|
|
30
35
|
}
|
|
31
36
|
function sourceRequestVisible(source, scope) {
|
|
@@ -40,6 +45,9 @@ function pathContains(container, path) {
|
|
|
40
45
|
function pathIntersects(left, right) {
|
|
41
46
|
return pathContains(left, right) || pathContains(right, left);
|
|
42
47
|
}
|
|
48
|
+
function workspaceSourceRequestMatches(descriptor, input) {
|
|
49
|
+
return descriptor.method === input.method && sameRequestTarget(descriptor.url, input.url) && requestShapeMatches(descriptor, input);
|
|
50
|
+
}
|
|
43
51
|
function sameRequestTarget(left, right) {
|
|
44
52
|
const leftUrl = new URL(left);
|
|
45
53
|
const rightUrl = new URL(right);
|
|
@@ -48,20 +56,19 @@ function sameRequestTarget(left, right) {
|
|
|
48
56
|
function requestShapeMatches(descriptor, input) {
|
|
49
57
|
const request = descriptor.request;
|
|
50
58
|
if (request?.querySchema) return bodyShapeMatches(request, input);
|
|
51
|
-
if (!
|
|
59
|
+
if (!requestJsonEqual(queryFromUrl(new URL(input.url)) || {}, serializedQuery(request?.query) || {})) return false;
|
|
52
60
|
return bodyShapeMatches(request, input);
|
|
53
61
|
}
|
|
54
62
|
function bodyShapeMatches(request, input) {
|
|
55
63
|
if (request?.bodySchema) return true;
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
64
|
+
if (request && "body" in request) return requestJsonEqual(input.body, request.body);
|
|
65
|
+
return input.body === void 0;
|
|
58
66
|
}
|
|
59
67
|
function queryFromUrl(url) {
|
|
60
|
-
const query = {
|
|
61
|
-
for (const key of new Set([...url.searchParams.keys()])) {
|
|
68
|
+
const query = Object.fromEntries([...new Set(url.searchParams.keys())].map((key) => {
|
|
62
69
|
const values = url.searchParams.getAll(key);
|
|
63
|
-
|
|
64
|
-
}
|
|
70
|
+
return [key, values.length > 1 ? values : values[0]];
|
|
71
|
+
}));
|
|
65
72
|
return Object.keys(query).length ? query : void 0;
|
|
66
73
|
}
|
|
67
74
|
function serializedQuery(query) {
|
|
@@ -73,8 +80,5 @@ function serializedQuery(query) {
|
|
|
73
80
|
}
|
|
74
81
|
return queryFromUrl(new URL(`https://vitehub.local/?${params}`));
|
|
75
82
|
}
|
|
76
|
-
function jsonEqual(left, right) {
|
|
77
|
-
return JSON.stringify(left) === JSON.stringify(right);
|
|
78
|
-
}
|
|
79
83
|
//#endregion
|
|
80
|
-
export { createWorkspaceSourceRequestExecution as n, getWorkspaceSourceRequestExecution as r, attachWorkspaceSourceRequestExecution as t };
|
|
84
|
+
export { workspaceSourceRequestMatches as i, createWorkspaceSourceRequestExecution as n, getWorkspaceSourceRequestExecution as r, attachWorkspaceSourceRequestExecution as t };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
|
+
var __exportAll = (all, no_symbols) => {
|
|
11
|
+
let target = {};
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
var __copyProps = (to, from, except, desc) => {
|
|
20
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
21
|
+
key = keys[i];
|
|
22
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
23
|
+
get: ((k) => from[k]).bind(null, key),
|
|
24
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return to;
|
|
28
|
+
};
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
34
|
+
//#endregion
|
|
35
|
+
export { __toESM as i, __exportAll as n, __require as r, __commonJSMin as t };
|
package/dist/runtime/assets.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceAssets,
|
|
2
|
-
|
|
1
|
+
import { D as WorkspaceAssets, M as WorkspaceContent } from "../types-DeK9GIxy.js";
|
|
3
2
|
//#region src/runtime/assets.d.ts
|
|
4
3
|
interface WorkspaceAssetFile {
|
|
5
4
|
load: () => Promise<WorkspaceContent>;
|
|
@@ -7,6 +6,5 @@ interface WorkspaceAssetFile {
|
|
|
7
6
|
metadata?: Record<string, unknown>;
|
|
8
7
|
}
|
|
9
8
|
type WorkspaceAssetFiles<TKey extends string = string> = Record<TKey, WorkspaceAssetFile>;
|
|
10
|
-
declare function createWorkspaceAssets<TKey extends string = string>(files: WorkspaceAssetFiles<TKey>): WorkspaceAssets<TKey>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { createWorkspaceAssets };
|
|
9
|
+
export declare function createWorkspaceAssets<TKey extends string = string>(files: WorkspaceAssetFiles<TKey>): WorkspaceAssets<TKey>;
|
|
10
|
+
//#endregion
|
package/dist/runtime/assets.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { i as isWorkspaceError, s as workspaceError, t as normalizeSafeWorkspacePath } from "../path-DrSIenjj.js";
|
|
2
|
+
import { a as isExcludedWorkspacePath, f as sha256, i as decodeFile, l as normalizeWorkspacePath } from "../path-CNAwN7pw.js";
|
|
3
|
+
import { t as createWorkspaceGlobMatcher } from "../glob--kNYDbfU.js";
|
|
4
|
+
import { t as searchText } from "../search-CrTmXj5h.js";
|
|
3
5
|
//#region src/runtime/assets.ts
|
|
4
6
|
function createMissingPathError(path) {
|
|
5
7
|
return workspaceError(`[vitehub] Workspace file does not exist: ${path}.`);
|
|
@@ -79,12 +81,14 @@ function createWorkspaceAssets(files) {
|
|
|
79
81
|
const result = /* @__PURE__ */ new Map();
|
|
80
82
|
for (const directory of directorySet) {
|
|
81
83
|
if (directory === normalizedPrefix) continue;
|
|
84
|
+
if (isExcludedWorkspacePath(directory, options.exclude)) continue;
|
|
82
85
|
if (normalizedPrefix && !isNestedUnder(directory, normalizedPrefix)) continue;
|
|
83
86
|
if (!options.recursive && normalizeWorkspacePath(directory.slice(normalizedPrefix.length)).replace(/^\//, "").includes("/")) continue;
|
|
84
87
|
result.set(directory, createDirectoryEntry(directory));
|
|
85
88
|
}
|
|
86
89
|
for (const path of paths) {
|
|
87
90
|
if (path === normalizedPrefix) continue;
|
|
91
|
+
if (isExcludedWorkspacePath(path, options.exclude)) continue;
|
|
88
92
|
if (normalizedPrefix && !isNestedUnder(path, normalizedPrefix)) continue;
|
|
89
93
|
if (!options.recursive && normalizeWorkspacePath(path.slice(normalizedPrefix.length)).replace(/^\//, "").includes("/")) continue;
|
|
90
94
|
result.set(path, await statFile(path));
|
|
@@ -110,10 +114,9 @@ function createWorkspaceAssets(files) {
|
|
|
110
114
|
async list(path, options) {
|
|
111
115
|
return await listEntries(path || "", options);
|
|
112
116
|
},
|
|
113
|
-
async glob(pattern,
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
return entries.filter((entry) => entry.type === "file" && patterns.some((item) => matchesAny(entry.path, item)));
|
|
117
|
+
async glob(pattern, options = {}) {
|
|
118
|
+
const { cwd, matches } = createWorkspaceGlobMatcher(pattern, options);
|
|
119
|
+
return (await listEntries(cwd, { recursive: true })).filter((entry) => entry.type === "file" && matches(entry.path));
|
|
117
120
|
},
|
|
118
121
|
async search(query) {
|
|
119
122
|
const result = [];
|
package/dist/runtime/state.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-
|
|
3
|
-
import { c as
|
|
4
|
-
export { type ReadonlyWorkspaceFacade, type UseWorkspaceOptions, type WritableWorkspaceFacade, getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, useWorkspace };
|
|
1
|
+
import { _ as useWorkspace, i as ReadonlyWorkspaceFacade, m as WritableWorkspaceFacade, o as UseWorkspaceOptions } from "../use-DhwhbAVV.js";
|
|
2
|
+
import { n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-Cg1TJVVZ.js";
|
|
3
|
+
import { a as setWorkspaceRuntimeConfig, c as getWorkspaceHostedStoreLoader, d as setActiveCloudflareEnv, i as getWorkspaceRuntimeConfig, l as setWorkspaceHostedStoreLoader, n as setWorkspaceRuntimeAssetsRegistry, r as setWorkspaceRuntimeRegistry, t as invalidateWorkspaceStore, u as resetWorkspaceStoreCache } from "../state-B8zbLi5t.js";
|
|
4
|
+
export { type ReadonlyWorkspaceFacade, type UseWorkspaceOptions, type WritableWorkspaceFacade, getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, invalidateWorkspaceStore, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, useWorkspace };
|
package/dist/runtime/state.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as setWorkspaceRegistry, n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-
|
|
6
|
-
import { t as useWorkspace } from "../use-
|
|
1
|
+
import { x as setActiveCloudflareEnv } from "../shared-DalXdP0i.js";
|
|
2
|
+
import { d as getWorkspaceRuntimeConfig, f as setWorkspaceRuntimeConfig, l as getWorkspaceHostedStoreLoader, u as setWorkspaceHostedStoreLoader } from "../provider-kXjfli9u.js";
|
|
3
|
+
import { n as invalidateCachedWorkspaceStore, r as resetWorkspaceStoreCache } from "../workspace-6pxkOuxr.js";
|
|
4
|
+
import { t as setWorkspaceAssetsRegistry } from "../asset-registry-DfBV5kmw.js";
|
|
5
|
+
import { i as setWorkspaceRegistry, n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-Bp-8UUfG.js";
|
|
6
|
+
import { t as useWorkspace } from "../use-BQj7nSz6.js";
|
|
7
7
|
//#region src/runtime/state.ts
|
|
8
|
+
async function invalidateWorkspaceStore(name) {
|
|
9
|
+
invalidateCachedWorkspaceStore(await resolveRegisteredWorkspaceDefinition(name));
|
|
10
|
+
}
|
|
8
11
|
function setWorkspaceRuntimeRegistry(registry) {
|
|
9
12
|
setWorkspaceRegistry(registry);
|
|
10
13
|
}
|
|
@@ -12,4 +15,4 @@ function setWorkspaceRuntimeAssetsRegistry(registry) {
|
|
|
12
15
|
setWorkspaceAssetsRegistry(registry);
|
|
13
16
|
}
|
|
14
17
|
//#endregion
|
|
15
|
-
export { getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, useWorkspace };
|
|
18
|
+
export { getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, invalidateWorkspaceStore, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, useWorkspace };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createWorkspace } from "../workspace-
|
|
1
|
+
import { t as createWorkspace } from "../workspace-BWJQBK1u.js";
|
|
2
2
|
export { createWorkspace };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createWorkspace } from "../workspace-
|
|
1
|
+
import { t as createWorkspace } from "../workspace-6pxkOuxr.js";
|
|
2
2
|
export { createWorkspace };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "./registry-
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { F as WorkspaceDefinition, Gt as WorkspaceSource, Lt as WorkspaceSelectedScope, St as WorkspaceName, T as Workspace, ln as WorkspaceSourceResolutionInvocation, mt as WorkspaceMaterializeSourcesResult, nn as WorkspaceSourceRequestExecutionInput, nt as WorkspaceHistoryReader, rn as WorkspaceSourceRequestExecutionResult, tn as WorkspaceSourceRequestDescriptor, z as WorkspaceEntry } from "./types-DeK9GIxy.js";
|
|
2
|
+
import { _ as useWorkspace, a as ReadonlyWorkspaceFs, g as WritableWorkspaceFs, i as ReadonlyWorkspaceFacade, m as WritableWorkspaceFacade, o as UseWorkspaceOptions } from "./use-DhwhbAVV.js";
|
|
3
|
+
import { n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "./registry-Cg1TJVVZ.js";
|
|
4
|
+
import { a as setWorkspaceRuntimeConfig, c as getWorkspaceHostedStoreLoader, i as getWorkspaceRuntimeConfig, l as setWorkspaceHostedStoreLoader, n as setWorkspaceRuntimeAssetsRegistry, o as HostedWorkspaceStoreOptions, r as setWorkspaceRuntimeRegistry, s as WorkspaceHostedStoreLoader, t as invalidateWorkspaceStore, u as resetWorkspaceStoreCache } from "./state-B8zbLi5t.js";
|
|
5
|
+
import { t as registerWorkspacePlugin } from "./plugins-DqQ8b4T5.js";
|
|
6
|
+
import { a as getWorkspaceSourceRequestDescriptor, i as workspaceSourceGrantPaths, n as normalizeWorkspaceSourceMetadata, o as isWorkspaceSourceRequestOnly, r as normalizeWorkspaceSourcesMetadata, s as workspaceSourceRequestDescriptorPath, t as WorkspaceSourceMetadata } from "./config-DLKdaFWN.js";
|
|
7
7
|
//#region src/runtime/dependency-loaders.d.ts
|
|
8
8
|
interface WorkspaceDependencyRuntimeLoaders {
|
|
9
9
|
shellWorkspace: () => Promise<unknown>;
|
|
10
10
|
}
|
|
11
|
-
declare function setWorkspaceDependencyRuntimeLoaders(loaders: Partial<WorkspaceDependencyRuntimeLoaders> | undefined): void;
|
|
12
|
-
declare function getWorkspaceDependencyRuntimeLoaders(): WorkspaceDependencyRuntimeLoaders;
|
|
11
|
+
export declare function setWorkspaceDependencyRuntimeLoaders(loaders: Partial<WorkspaceDependencyRuntimeLoaders> | undefined): void;
|
|
12
|
+
export declare function getWorkspaceDependencyRuntimeLoaders(): WorkspaceDependencyRuntimeLoaders;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/sources/resolution.d.ts
|
|
15
15
|
interface WorkspaceSourceResolutionOptions {
|
|
@@ -21,18 +21,87 @@ interface WorkspaceSourceResolutionFacade<Name extends WorkspaceName = Workspace
|
|
|
21
21
|
definition: WorkspaceDefinition;
|
|
22
22
|
workspace: ReadonlyWorkspaceFacade<Name>;
|
|
23
23
|
}
|
|
24
|
-
declare function hasWorkspaceSourceResolvers(definition: Pick<WorkspaceDefinition, "sources"> | undefined): boolean;
|
|
25
|
-
|
|
26
|
-
declare function
|
|
24
|
+
export declare function hasWorkspaceSourceResolvers(definition: Pick<WorkspaceDefinition, "sources"> | undefined): boolean;
|
|
25
|
+
/** Preserve internal Source Sync routing when wrapping a writable facade. */
|
|
26
|
+
export declare function forwardWorkspaceFacade(source: WritableWorkspaceFacade, target: WritableWorkspaceFacade): void;
|
|
27
|
+
export declare function resolveWorkspaceSources(definition: WorkspaceDefinition, options: WorkspaceSourceResolutionOptions): Promise<WorkspaceDefinition>;
|
|
28
|
+
export declare function createWorkspaceSourceResolutionFacade<Name extends WorkspaceName = WorkspaceName>(workspace: ReadonlyWorkspaceFacade<Name>, definition: WorkspaceDefinition, options: WorkspaceSourceResolutionOptions): Promise<WorkspaceSourceResolutionFacade<Name>>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/core/history.d.ts
|
|
31
|
+
/** Forward history only when the caller can inspect the complete folder. */
|
|
32
|
+
export declare function createWorkspaceHistoryReader(history: WorkspaceHistoryReader | undefined, complete: boolean): WorkspaceHistoryReader;
|
|
27
33
|
//#endregion
|
|
28
34
|
//#region src/sources/live.d.ts
|
|
29
|
-
declare function markLiveWorkspaceSource(source: WorkspaceSource, paths: Record<string, string>): WorkspaceSource;
|
|
35
|
+
export declare function markLiveWorkspaceSource(source: WorkspaceSource, paths: Record<string, string>): WorkspaceSource;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/storage/metadata-target.d.ts
|
|
38
|
+
/** An object that can carry a metadata target: a Workspace, a Workspace facade, or the `fs` of a facade. */
|
|
39
|
+
type WorkspaceMetadataCarrier = Workspace | ReadonlyWorkspaceFacade | WritableWorkspaceFacade | ReadonlyWorkspaceFs | WritableWorkspaceFs;
|
|
40
|
+
/**
|
|
41
|
+
* Attaches a read-only metadata view of `source` to `target`.
|
|
42
|
+
* The view has the Workspace name, `getMeta`, `list`, and the Store target. It never has Store writes.
|
|
43
|
+
* `filterEntries` limits the listed entries, for example to an access scope.
|
|
44
|
+
* Internal: `@vite-hub/agent` uses this for its Workspace facades.
|
|
45
|
+
*/
|
|
46
|
+
export declare function forwardWorkspaceMetadataView(source: unknown, target: WorkspaceMetadataCarrier, filterEntries?: (entries: WorkspaceEntry[]) => WorkspaceEntry[]): void;
|
|
30
47
|
//#endregion
|
|
31
48
|
//#region src/sources/request-execution.d.ts
|
|
32
49
|
interface WorkspaceSourceRequestExecutionTarget {
|
|
33
50
|
executeSourceRequest(input: WorkspaceSourceRequestExecutionInput): Promise<WorkspaceSourceRequestExecutionResult>;
|
|
34
51
|
}
|
|
35
|
-
declare function attachWorkspaceSourceRequestExecution<T extends object>(target: T, executor: WorkspaceSourceRequestExecutionTarget | undefined): T;
|
|
36
|
-
declare function getWorkspaceSourceRequestExecution(input:
|
|
52
|
+
export declare function attachWorkspaceSourceRequestExecution<T extends object>(target: T, executor: WorkspaceSourceRequestExecutionTarget | undefined): T;
|
|
53
|
+
export declare function getWorkspaceSourceRequestExecution(input: unknown): WorkspaceSourceRequestExecutionTarget | undefined;
|
|
54
|
+
export declare function workspaceSourceRequestMatches(descriptor: WorkspaceSourceRequestDescriptor, input: WorkspaceSourceRequestExecutionInput): boolean;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/runtime/preparation.d.ts
|
|
57
|
+
type WorkspacePreparationState = {
|
|
58
|
+
status: "stopped";
|
|
59
|
+
stoppedAt: string;
|
|
60
|
+
} | {
|
|
61
|
+
startedAt: string;
|
|
62
|
+
status: "preparing";
|
|
63
|
+
} | {
|
|
64
|
+
durationMs: number;
|
|
65
|
+
finishedAt: string;
|
|
66
|
+
result: WorkspaceMaterializeSourcesResult;
|
|
67
|
+
startedAt: string;
|
|
68
|
+
status: "ready";
|
|
69
|
+
} | {
|
|
70
|
+
durationMs: number;
|
|
71
|
+
error: string;
|
|
72
|
+
finishedAt: string;
|
|
73
|
+
startedAt: string;
|
|
74
|
+
status: "error";
|
|
75
|
+
};
|
|
76
|
+
interface WorkspacePreparationOptions<Name extends WorkspaceName = WorkspaceName> {
|
|
77
|
+
onStateChange?: (state: WorkspacePreparationState) => void;
|
|
78
|
+
/** Fail readiness when a selected source contains no files. Empty sources are allowed by default. */
|
|
79
|
+
requireNonEmpty?: boolean;
|
|
80
|
+
retryDelayMs?: number;
|
|
81
|
+
sources?: readonly string[];
|
|
82
|
+
validate?: (result: WorkspaceMaterializeSourcesResult) => void | Promise<void>;
|
|
83
|
+
workspace: Name;
|
|
84
|
+
}
|
|
85
|
+
interface WorkspacePreparation {
|
|
86
|
+
getState(): WorkspacePreparationState;
|
|
87
|
+
response(method?: string): Response;
|
|
88
|
+
start(): Promise<WorkspacePreparationState>;
|
|
89
|
+
stop(): Promise<void>;
|
|
90
|
+
}
|
|
91
|
+
export declare function createWorkspacePreparation<Name extends WorkspaceName = WorkspaceName>(options: WorkspacePreparationOptions<Name>): WorkspacePreparation;
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/storage/recover-local-locks.d.ts
|
|
94
|
+
/**
|
|
95
|
+
* Remove abandoned markers from a trusted, exclusively owned local store.
|
|
96
|
+
* Stop all store users and prevent changes to the store and its ancestor directories
|
|
97
|
+
* for the entire call. Path checks catch existing symlinks; they do not provide
|
|
98
|
+
* protection against concurrent filesystem mutation.
|
|
99
|
+
*/
|
|
100
|
+
export declare function recoverLocalWorkspaceLocks(options: {
|
|
101
|
+
root: string;
|
|
102
|
+
offline: true;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
removed: number;
|
|
105
|
+
}>;
|
|
37
106
|
//#endregion
|
|
38
|
-
export { type HostedWorkspaceStoreOptions, type ReadonlyWorkspaceFacade, type UseWorkspaceOptions, type WorkspaceDependencyRuntimeLoaders, type WorkspaceHostedStoreLoader, type
|
|
107
|
+
export { type HostedWorkspaceStoreOptions, type ReadonlyWorkspaceFacade, type UseWorkspaceOptions, type WorkspaceDependencyRuntimeLoaders, type WorkspaceHostedStoreLoader, type WorkspacePreparation, type WorkspacePreparationOptions, type WorkspacePreparationState, type WorkspaceSourceMetadata, type WorkspaceSourceResolutionFacade, type WorkspaceSourceResolutionOptions, type WritableWorkspaceFacade, getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, getWorkspaceSourceRequestDescriptor, invalidateWorkspaceStore, isWorkspaceSourceRequestOnly, normalizeWorkspaceSourceMetadata, normalizeWorkspaceSourcesMetadata, registerWorkspace, registerWorkspacePlugin, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, useWorkspace, workspaceSourceGrantPaths, workspaceSourceRequestDescriptorPath };
|