@vite-hub/workspace 0.0.4 → 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 +339 -115
- package/dist/abort-BCwpdrN0.js +32 -0
- package/dist/{asset-registry-8QI3ML3K.js → asset-registry-DfBV5kmw.js} +3 -2
- package/dist/blob-database.d.ts +474 -0
- package/dist/blob-database.js +608 -0
- package/dist/checkout.d.ts +128 -0
- package/dist/checkout.js +849 -0
- package/dist/cloudflare.d.ts +6 -7
- package/dist/cloudflare.js +1 -1
- package/dist/config-B-863EgC.js +15 -0
- package/dist/config-BAgL2dtB.js +1076 -0
- package/dist/{config-DE9xlaIw.d.ts → config-BQKcPawI.d.ts} +1 -2
- package/dist/discard-CNNtCozM.js +8 -0
- package/dist/durability.d.ts +22 -0
- package/dist/durability.js +70 -0
- package/dist/error-diagnostics-CtKjGtGb.js +188 -0
- package/dist/error-diagnostics-DSkCJC_L.js +266 -0
- package/dist/file-2pFYNtsU.js +22 -0
- package/dist/{files-Q6xZjDHA.js → files-BOo4SbwE.js} +3 -3
- package/dist/files.d.ts +38 -0
- package/dist/files.js +6 -0
- package/dist/{github-DHnjxQIX.js → github-CrYp4v8k.js} +44 -24
- package/dist/glob-B8YGvTrZ.js +21 -0
- package/dist/glob-Cjxms1t7.js +30 -0
- package/dist/{host-DJH8cuoU.js → host-BFBpXn0N.js} +144 -77
- package/dist/{hosted-RPeJOCFz.js → hosted-KcUR_jPv.js} +303 -97
- package/dist/hosted-vercel-blob-B3-wRdUm.js +410 -0
- package/dist/hosted-vercel-blob.d.ts +6 -7
- package/dist/hosted-vercel-blob.js +1 -1
- package/dist/hosted.d.ts +10 -9
- package/dist/hosted.js +2 -2
- package/dist/index.d.ts +26 -47
- package/dist/index.js +30 -100
- package/dist/internal/path.d.ts +2 -0
- package/dist/internal/path.js +2 -0
- package/dist/lifecycle-B-enk_4A.js +596 -0
- package/dist/lineage.d.ts +26 -0
- package/dist/lineage.js +76 -0
- package/dist/loader.d.ts +5 -6
- package/dist/loader.js +3 -2
- package/dist/mcp-resources-DF0F5rcL.js +39 -0
- package/dist/memory-BOexthyW.js +247 -0
- package/dist/metadata-target-CWz6KHKq.js +1589 -0
- package/dist/object-Da1zyPCR.js +11 -0
- package/dist/operation-definition-8gOe-ubD.d.ts +234 -0
- package/dist/operations-C6FpR8Rr.js +389 -0
- package/dist/operations-CE2drFih.js +1234 -0
- package/dist/operations.d.ts +90 -0
- package/dist/operations.js +3 -0
- package/dist/path--wrT_Azm.js +113 -0
- package/dist/path-AxMho1wo.d.ts +7 -0
- package/dist/path-DrSIenjj.js +59 -0
- package/dist/path-zHxQUbqa.d.ts +9 -0
- package/dist/plugins-C8C0auoW.d.ts +10 -0
- package/dist/provider-9s4Ufkm5.js +1479 -0
- package/dist/providers/github/store.d.ts +3 -5
- package/dist/providers/github/store.js +1 -1
- package/dist/registry-B3BBm4Ts.d.ts +19 -0
- package/dist/{registry-D3yzt8HQ.js → registry-CNphafBx.js} +60 -23
- package/dist/registry-CYNN623b.d.ts +9 -0
- package/dist/request-scope-Dw5n8bMC.js +83 -0
- package/dist/results-DgkZUmTL.js +8 -0
- package/dist/{chunk-2rV9d50f.js → rolldown-runtime-rQ84J-ij.js} +3 -4
- package/dist/runtime/assets.d.ts +3 -5
- package/dist/runtime/assets.js +7 -6
- package/dist/runtime/empty-assets-registry.d.ts +1 -2
- package/dist/runtime/empty-registry.d.ts +2 -2
- package/dist/runtime/registry.d.ts +2 -0
- package/dist/runtime/registry.js +23 -0
- package/dist/runtime/request.d.ts +4 -0
- package/dist/runtime/request.js +8 -0
- package/dist/runtime/state.d.ts +5 -4
- package/dist/runtime/state.js +8 -18
- package/dist/runtime/workspace.d.ts +1 -1
- package/dist/runtime/workspace.js +1 -1
- package/dist/runtime.d.ts +52 -17
- package/dist/runtime.js +324 -67
- package/dist/{search-BpiCF2Tw.js → search-C_RfoM2j.js} +10 -9
- package/dist/server-8tGltlGz.js +303 -0
- package/dist/server.d.ts +36 -39
- package/dist/server.js +2 -328
- package/dist/shared-B3_EUk89.js +848 -0
- package/dist/source-metadata.d.ts +10 -7
- package/dist/source-metadata.js +12 -12
- package/dist/state-BISnUf1s.d.ts +35 -0
- package/dist/{ai-BqCC8BpY.js → state-DbrW-njQ.js} +237 -114
- package/dist/store-ybhyD38Z.js +1873 -0
- package/dist/{sync-DnTQwt8r.js → sync-CCD_VYC8.js} +61 -41
- package/dist/target-jWhTdIuF.js +89 -0
- package/dist/test.d.ts +1 -1
- package/dist/test.js +1 -1
- package/dist/{types-CYuwjJ4V.d.ts → types-BbtwmBZ5.d.ts} +321 -35
- package/dist/use-C6lV3-wC.d.ts +321 -0
- package/dist/{use-BTNDR5Rd.js → use-CSpT5W87.js} +141 -107
- package/dist/utils-CgMZCHsX.js +616 -0
- package/dist/vite.d.ts +585 -2
- package/dist/vite.js +21369 -2
- package/dist/workspace-CYB2xZ1T.d.ts +7 -0
- package/dist/{workspace-Dq08Yn72.js → workspace-sPWn2Jxj.js} +441 -225
- package/package.json +97 -72
- package/dist/ai-CjxvGqM0.d.ts +0 -162
- package/dist/ai.d.ts +0 -3
- package/dist/ai.js +0 -2
- 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-Bc3c4Su1.js +0 -7904
- package/dist/config-CHLLWklZ.js +0 -36
- package/dist/file-Bc1X7pco.js +0 -23
- package/dist/glob-CEZKeZFC.js +0 -18
- package/dist/hosted-vercel-blob-d6C8ND5j.js +0 -23580
- package/dist/lifecycle-LrL3sA4n.js +0 -316
- package/dist/metadata-target-B0tOmVW7.js +0 -717
- package/dist/mountx.d.ts +0 -10
- package/dist/mountx.js +0 -143
- package/dist/nitro.d.ts +0 -2
- package/dist/nitro.js +0 -2
- package/dist/nuxt.d.ts +0 -26
- package/dist/nuxt.js +0 -42
- package/dist/path-Cp59koVz.js +0 -139
- package/dist/provider-B1yLjCJJ.js +0 -746
- package/dist/publish.d.ts +0 -35
- package/dist/publish.js +0 -112
- package/dist/registry-Uj6IVxes.d.ts +0 -11
- package/dist/request-execution-B-dSFlGB.js +0 -84
- package/dist/runtime-options-BsPSv5O7.js +0 -13
- package/dist/runtime-type-iEE6BjQJ.js +0 -34
- package/dist/shared-DTR1Hhma.js +0 -331
- package/dist/state-tYcRWEh2.d.ts +0 -26
- package/dist/store-Dt_Jyys3.js +0 -608
- package/dist/target-D4Bqb1eH.js +0 -11
- package/dist/token-CVzURBxC.js +0 -61
- package/dist/use-BiHzt0xA.d.ts +0 -103
- package/dist/vite-BptCrpv2.js +0 -4526
- package/dist/vite-CtA9guIM.d.ts +0 -66
- package/dist/workspace-Xddf4G1B.d.ts +0 -6
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { a as workspaceConflict, s as workspaceError, t as normalizeSafeWorkspacePath } from "./path-DrSIenjj.js";
|
|
2
|
+
import { a as isExcludedWorkspacePath, c as normalizeSafeWorkspacePattern, f as sha256, l as normalizeWorkspacePath, r as contentToBytes } from "./path--wrT_Azm.js";
|
|
3
|
+
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-CtKjGtGb.js";
|
|
4
|
+
import { r as diffSnapshots, t as createCurrentSnapshotFromStore } from "./utils-CgMZCHsX.js";
|
|
5
|
+
import { t as createWorkspaceGlobMatcher } from "./glob-Cjxms1t7.js";
|
|
6
|
+
import { t as isRecord } from "./object-Da1zyPCR.js";
|
|
7
|
+
import { d as setWorkspaceHostedStoreLoader, l as ownedBlobPrefix, o as resolveRuntimeVercelBlobWorkspaceStore, s as resolveVercelBlobWorkspaceStore, u as getWorkspaceHostedStoreLoader } from "./provider-9s4Ufkm5.js";
|
|
8
|
+
import { n as setWorkspaceRuntimeConfig } from "./config-B-863EgC.js";
|
|
9
|
+
import { resolve } from "node:path";
|
|
10
|
+
//#region src/providers/vercel/blob-store.ts
|
|
11
|
+
const fileMutations = /* @__PURE__ */ new Map();
|
|
12
|
+
async function serializeFileMutation(key, mutate) {
|
|
13
|
+
const pending = (fileMutations.get(key) || Promise.resolve()).catch(() => {}).then(mutate);
|
|
14
|
+
fileMutations.set(key, pending);
|
|
15
|
+
try {
|
|
16
|
+
await pending;
|
|
17
|
+
} finally {
|
|
18
|
+
if (fileMutations.get(key) === pending) fileMutations.delete(key);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function invalidBlobListResponse() {
|
|
22
|
+
throw workspaceErrorDiagnostics.WORKSPACE_R0033({ message: "Unexpected Vercel Blob list response." });
|
|
23
|
+
}
|
|
24
|
+
function parseBlobListResponse(value) {
|
|
25
|
+
if (!isRecord(value) || !Array.isArray(value.blobs)) invalidBlobListResponse();
|
|
26
|
+
const items = value.blobs.map((item) => {
|
|
27
|
+
if (!isRecord(item)) invalidBlobListResponse();
|
|
28
|
+
const pathname = item.pathname;
|
|
29
|
+
const size = item.size;
|
|
30
|
+
const uploadedAt = item.uploadedAt;
|
|
31
|
+
if (typeof pathname !== "string" || !pathname) invalidBlobListResponse();
|
|
32
|
+
if (size !== void 0 && (typeof size !== "number" || !Number.isFinite(size) || size < 0)) invalidBlobListResponse();
|
|
33
|
+
if (uploadedAt !== void 0 && (!(uploadedAt instanceof Date) || Number.isNaN(uploadedAt.getTime()))) invalidBlobListResponse();
|
|
34
|
+
return {
|
|
35
|
+
key: pathname,
|
|
36
|
+
lastModified: uploadedAt instanceof Date ? uploadedAt.getTime() : void 0,
|
|
37
|
+
size: typeof size === "number" ? size : void 0
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
const cursor = value.cursor;
|
|
41
|
+
const hasMore = value.hasMore;
|
|
42
|
+
if (cursor !== void 0 && typeof cursor !== "string") invalidBlobListResponse();
|
|
43
|
+
if (hasMore !== void 0 && typeof hasMore !== "boolean") invalidBlobListResponse();
|
|
44
|
+
if (hasMore === true && !cursor) invalidBlobListResponse();
|
|
45
|
+
return {
|
|
46
|
+
cursor: cursor === void 0 ? void 0 : cursor,
|
|
47
|
+
hasMore: hasMore === void 0 ? void 0 : hasMore,
|
|
48
|
+
items
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function joinBlobPath(...parts) {
|
|
52
|
+
return parts.map((part) => normalizeWorkspacePath(part)).filter(Boolean).join("/");
|
|
53
|
+
}
|
|
54
|
+
function contentType(path, fallback) {
|
|
55
|
+
if (fallback) return fallback;
|
|
56
|
+
if (path.endsWith(".json")) return "application/json; charset=utf-8";
|
|
57
|
+
if (path.endsWith(".md") || path.endsWith(".txt")) return "text/plain; charset=utf-8";
|
|
58
|
+
}
|
|
59
|
+
function auth(options) {
|
|
60
|
+
return options.token ? { token: options.token } : {};
|
|
61
|
+
}
|
|
62
|
+
function isNotFoundError(error) {
|
|
63
|
+
return Object(error).code === "NotFound";
|
|
64
|
+
}
|
|
65
|
+
async function createVercelBlobClient(options) {
|
|
66
|
+
const blob = await importVercelBlobPeer();
|
|
67
|
+
const access = options.access || "private";
|
|
68
|
+
return {
|
|
69
|
+
isMissing(error) {
|
|
70
|
+
return error instanceof blob.BlobNotFoundError;
|
|
71
|
+
},
|
|
72
|
+
async delete(key) {
|
|
73
|
+
await blob.del(key, auth(options));
|
|
74
|
+
},
|
|
75
|
+
async download(key) {
|
|
76
|
+
try {
|
|
77
|
+
const readKey = access === "public" ? `${key}?vitehubCacheBust=${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}` : key;
|
|
78
|
+
const result = await blob.get(readKey, {
|
|
79
|
+
access,
|
|
80
|
+
headers: { "cache-control": "no-cache, no-store" },
|
|
81
|
+
useCache: false,
|
|
82
|
+
...auth(options)
|
|
83
|
+
});
|
|
84
|
+
if (!result) return void 0;
|
|
85
|
+
if (result.statusCode !== 200) throw workspaceErrorDiagnostics.WORKSPACE_R0033({ message: `Unexpected Vercel Blob response: ${result.statusCode}.` });
|
|
86
|
+
return await new Response(result.stream, { headers: result.blob.contentType ? { "content-type": result.blob.contentType } : void 0 }).blob();
|
|
87
|
+
} catch (error) {
|
|
88
|
+
if (isNotFoundError(error)) return void 0;
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
async head(key) {
|
|
93
|
+
const result = await blob.head(key, auth(options)).catch((error) => {
|
|
94
|
+
if (error instanceof blob.BlobNotFoundError) return void 0;
|
|
95
|
+
throw error;
|
|
96
|
+
});
|
|
97
|
+
if (!result) return void 0;
|
|
98
|
+
return {
|
|
99
|
+
key: result.pathname,
|
|
100
|
+
lastModified: result.uploadedAt.getTime(),
|
|
101
|
+
size: result.size,
|
|
102
|
+
type: result.contentType
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
async list(optionsInput) {
|
|
106
|
+
return { ...parseBlobListResponse(await blob.list({
|
|
107
|
+
...optionsInput,
|
|
108
|
+
...auth(options)
|
|
109
|
+
})) };
|
|
110
|
+
},
|
|
111
|
+
async upload(key, body, uploadOptions = {}) {
|
|
112
|
+
await blob.put(key, body, {
|
|
113
|
+
access,
|
|
114
|
+
addRandomSuffix: false,
|
|
115
|
+
allowOverwrite: true,
|
|
116
|
+
contentType: uploadOptions.contentType,
|
|
117
|
+
...auth(options)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
async function importVercelBlobPeer() {
|
|
123
|
+
const testImport = globalThis.__vitehubWorkspaceImportVercelBlobPeer;
|
|
124
|
+
return testImport ? await testImport() : (await import("@vite-hub/blob/internal/vercel-blob")).vercelBlob;
|
|
125
|
+
}
|
|
126
|
+
var VercelBlobWorkspaceStore = class {
|
|
127
|
+
#baseline;
|
|
128
|
+
#options;
|
|
129
|
+
#files;
|
|
130
|
+
#root;
|
|
131
|
+
#legacyRoot;
|
|
132
|
+
constructor(options, workspaceName) {
|
|
133
|
+
this.#options = resolveRuntimeVercelBlobWorkspaceStore(options, typeof process !== "undefined" ? process.env : {});
|
|
134
|
+
this.#root = joinBlobPath(ownedBlobPrefix("workspaces", this.#options.prefix, "Workspace"), workspaceName);
|
|
135
|
+
const legacyPrefix = this.#options.prefix ?? ".vitehub/workspaces";
|
|
136
|
+
this.#legacyRoot = joinBlobPath(legacyPrefix, workspaceName);
|
|
137
|
+
}
|
|
138
|
+
#fileKey(path, options = {}) {
|
|
139
|
+
return joinBlobPath(this.#root, "files", normalizeSafeWorkspacePath(path, { allowEmpty: options.allowEmpty }));
|
|
140
|
+
}
|
|
141
|
+
#legacyFileKey(path, options = {}) {
|
|
142
|
+
return joinBlobPath(this.#legacyRoot, "files", normalizeSafeWorkspacePath(path, { allowEmpty: options.allowEmpty }));
|
|
143
|
+
}
|
|
144
|
+
async #client() {
|
|
145
|
+
this.#files ||= createVercelBlobClient(this.#options).catch((error) => {
|
|
146
|
+
this.#files = void 0;
|
|
147
|
+
throw error;
|
|
148
|
+
});
|
|
149
|
+
return await this.#files;
|
|
150
|
+
}
|
|
151
|
+
#metaKey(key) {
|
|
152
|
+
return joinBlobPath(this.#root, ".vitehub/meta", normalizeSafeWorkspacePath(key.endsWith(".json") ? key : `${key}.json`));
|
|
153
|
+
}
|
|
154
|
+
#fileAttributesKey(path) {
|
|
155
|
+
return joinBlobPath(this.#root, ".vitehub/file-attributes", `${normalizeSafeWorkspacePath(path)}.json`);
|
|
156
|
+
}
|
|
157
|
+
#legacyFileAttributesKey(path) {
|
|
158
|
+
return joinBlobPath(this.#legacyRoot, ".vitehub/file-attributes", `${normalizeSafeWorkspacePath(path)}.json`);
|
|
159
|
+
}
|
|
160
|
+
#snapshotKey(id) {
|
|
161
|
+
return joinBlobPath(this.#root, ".vitehub/snapshots", `${id}.json`);
|
|
162
|
+
}
|
|
163
|
+
#legacyMetaKey(key) {
|
|
164
|
+
return joinBlobPath(this.#legacyRoot, ".vitehub/meta", normalizeSafeWorkspacePath(key.endsWith(".json") ? key : `${key}.json`));
|
|
165
|
+
}
|
|
166
|
+
async readFile(path) {
|
|
167
|
+
const normalized = normalizeSafeWorkspacePath(path);
|
|
168
|
+
const pathname = this.#fileKey(normalized);
|
|
169
|
+
let attributesPath = this.#fileAttributesKey(normalized);
|
|
170
|
+
let file = await (await this.#client()).download(pathname);
|
|
171
|
+
if (!file && this.#legacyRoot !== this.#root) {
|
|
172
|
+
attributesPath = this.#legacyFileAttributesKey(normalized);
|
|
173
|
+
file = await (await this.#client()).download(this.#legacyFileKey(normalized));
|
|
174
|
+
}
|
|
175
|
+
if (!file) return void 0;
|
|
176
|
+
const bytes = await file.arrayBuffer();
|
|
177
|
+
const attributes = await this.#readJson(attributesPath);
|
|
178
|
+
return {
|
|
179
|
+
content: new Uint8Array(bytes),
|
|
180
|
+
...typeof attributes?.mediaType === "string" ? { mediaType: attributes.mediaType } : {},
|
|
181
|
+
...attributes?.metadata && typeof attributes.metadata === "object" && !Array.isArray(attributes.metadata) ? { metadata: attributes.metadata } : {},
|
|
182
|
+
path: normalized
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
async writeFile(path, file) {
|
|
186
|
+
const normalized = normalizeSafeWorkspacePath(path);
|
|
187
|
+
await serializeFileMutation(this.#fileKey(normalized), async () => {
|
|
188
|
+
const attributes = {
|
|
189
|
+
...file.mediaType ? { mediaType: file.mediaType } : {},
|
|
190
|
+
...file.metadata ? { metadata: file.metadata } : {}
|
|
191
|
+
};
|
|
192
|
+
const serializedAttributes = Object.keys(attributes).length > 0 ? JSON.stringify(attributes) : void 0;
|
|
193
|
+
const client = await this.#client();
|
|
194
|
+
const fileKey = this.#fileKey(normalized);
|
|
195
|
+
const attributesKey = this.#fileAttributesKey(normalized);
|
|
196
|
+
const [previousFile, previousAttributes] = await Promise.all([client.download(fileKey), client.download(attributesKey)]);
|
|
197
|
+
await client.upload(fileKey, new Blob([contentToBytes(file.content)]), { contentType: contentType(normalized, file.mediaType) });
|
|
198
|
+
try {
|
|
199
|
+
if (serializedAttributes !== void 0) await client.upload(attributesKey, serializedAttributes, { contentType: "application/json; charset=utf-8" });
|
|
200
|
+
else await client.delete(attributesKey).catch((error) => {
|
|
201
|
+
if (!client.isMissing(error)) throw error;
|
|
202
|
+
});
|
|
203
|
+
} catch (error) {
|
|
204
|
+
const restore = async (key, previous) => {
|
|
205
|
+
if (previous) await client.upload(key, previous, { contentType: previous.type });
|
|
206
|
+
else await client.delete(key);
|
|
207
|
+
};
|
|
208
|
+
const failures = (await Promise.allSettled([restore(fileKey, previousFile), restore(attributesKey, previousAttributes)])).filter((result) => result.status === "rejected").map((result) => result.reason);
|
|
209
|
+
if (failures.length) throw new AggregateError([error, ...failures], "Vercel Blob write failed and rollback could not complete.");
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
async list(prefix = "", options = {}) {
|
|
215
|
+
const normalizedPrefix = normalizeSafeWorkspacePath(prefix, { allowEmpty: true });
|
|
216
|
+
const filePrefix = this.#fileKey(normalizedPrefix, { allowEmpty: true });
|
|
217
|
+
const currentBase = `${this.#fileKey("", { allowEmpty: true })}/`;
|
|
218
|
+
const legacyBase = `${this.#legacyFileKey("", { allowEmpty: true })}/`;
|
|
219
|
+
const files = await this.#listBlobs(normalizedPrefix ? `${filePrefix}/` : currentBase);
|
|
220
|
+
const legacyFiles = this.#legacyRoot === this.#root ? [] : await this.#listBlobs(normalizedPrefix ? `${this.#legacyFileKey(normalizedPrefix, { allowEmpty: true })}/` : legacyBase);
|
|
221
|
+
const attributeKeys = /* @__PURE__ */ new Set();
|
|
222
|
+
if (files.length || legacyFiles.length) {
|
|
223
|
+
for (const blob of await this.#listBlobs(`${joinBlobPath(this.#root, ".vitehub/file-attributes", normalizedPrefix)}/`)) attributeKeys.add(blob.key);
|
|
224
|
+
if (this.#legacyRoot !== this.#root) for (const blob of await this.#listBlobs(`${joinBlobPath(this.#legacyRoot, ".vitehub/file-attributes", normalizedPrefix)}/`)) attributeKeys.add(blob.key);
|
|
225
|
+
}
|
|
226
|
+
const entries = /* @__PURE__ */ new Map();
|
|
227
|
+
const entryAttributes = /* @__PURE__ */ new Map();
|
|
228
|
+
for (const blob of [...legacyFiles, ...files]) {
|
|
229
|
+
const base = blob.key.startsWith(currentBase) ? currentBase : legacyBase;
|
|
230
|
+
const path = normalizeWorkspacePath(blob.key.slice(base.length));
|
|
231
|
+
if (!path) continue;
|
|
232
|
+
if (isExcludedWorkspacePath(path, options.exclude)) continue;
|
|
233
|
+
if (normalizedPrefix && !path.startsWith(`${normalizedPrefix}/`)) continue;
|
|
234
|
+
const relative = normalizedPrefix ? path.slice(normalizedPrefix.length + 1) : path;
|
|
235
|
+
if (!options.recursive && relative.includes("/")) {
|
|
236
|
+
const child = relative.split("/")[0];
|
|
237
|
+
const directory = normalizedPrefix ? `${normalizedPrefix}/${child}` : child;
|
|
238
|
+
entries.set(directory, {
|
|
239
|
+
path: directory,
|
|
240
|
+
type: "directory"
|
|
241
|
+
});
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
const attributesPath = base === currentBase ? this.#fileAttributesKey(path) : this.#legacyFileAttributesKey(path);
|
|
245
|
+
entryAttributes.set(path, attributesPath);
|
|
246
|
+
entries.set(path, {
|
|
247
|
+
mtime: blob.lastModified,
|
|
248
|
+
path,
|
|
249
|
+
size: blob.size,
|
|
250
|
+
type: "file"
|
|
251
|
+
});
|
|
252
|
+
if (options.recursive) {
|
|
253
|
+
const parts = path.split("/");
|
|
254
|
+
for (let index = 1; index < parts.length; index++) {
|
|
255
|
+
const dir = parts.slice(0, index).join("/");
|
|
256
|
+
if (isExcludedWorkspacePath(dir, options.exclude)) continue;
|
|
257
|
+
entries.set(dir, {
|
|
258
|
+
path: dir,
|
|
259
|
+
type: "directory"
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const pendingAttributes = [...entryAttributes].filter(([path, key]) => entries.get(path)?.type === "file" && attributeKeys.has(key));
|
|
265
|
+
for (let index = 0; index < pendingAttributes.length; index += 8) await Promise.all(pendingAttributes.slice(index, index + 8).map(async ([path, key]) => {
|
|
266
|
+
const attributes = await this.#readJson(key);
|
|
267
|
+
const entry = entries.get(path);
|
|
268
|
+
if (typeof attributes?.mediaType === "string") entry.mediaType = attributes.mediaType;
|
|
269
|
+
if (attributes?.metadata && typeof attributes.metadata === "object" && !Array.isArray(attributes.metadata)) entry.metadata = attributes.metadata;
|
|
270
|
+
}));
|
|
271
|
+
return [...entries.values()].sort((a, b) => a.path.localeCompare(b.path));
|
|
272
|
+
}
|
|
273
|
+
async glob(pattern, options = {}) {
|
|
274
|
+
const patterns = Array.isArray(pattern) ? pattern.map(normalizeSafeWorkspacePattern) : normalizeSafeWorkspacePattern(pattern);
|
|
275
|
+
const { cwd, matches } = createWorkspaceGlobMatcher(patterns, options);
|
|
276
|
+
return (await this.list(cwd, { recursive: true })).filter((entry) => entry.type === "file" && matches(entry.path));
|
|
277
|
+
}
|
|
278
|
+
async stat(path) {
|
|
279
|
+
const normalized = normalizeSafeWorkspacePath(path);
|
|
280
|
+
const file = await this.readFile(normalized);
|
|
281
|
+
if (file) {
|
|
282
|
+
const bytes = contentToBytes(file.content);
|
|
283
|
+
return {
|
|
284
|
+
digest: await sha256(bytes),
|
|
285
|
+
...file.mediaType ? { mediaType: file.mediaType } : {},
|
|
286
|
+
...file.metadata ? { metadata: file.metadata } : {},
|
|
287
|
+
path: normalized,
|
|
288
|
+
size: bytes.byteLength,
|
|
289
|
+
type: "file"
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
return (await this.list(normalized, { recursive: false })).length ? {
|
|
293
|
+
path: normalized,
|
|
294
|
+
type: "directory"
|
|
295
|
+
} : void 0;
|
|
296
|
+
}
|
|
297
|
+
async mkdir(path, _options = {}) {
|
|
298
|
+
normalizeSafeWorkspacePath(path);
|
|
299
|
+
}
|
|
300
|
+
async rm(path, options = {}) {
|
|
301
|
+
const normalized = normalizeSafeWorkspacePath(path);
|
|
302
|
+
if (options.ifDigest !== void 0) throw workspaceConflict(`[vitehub] Vercel Blob does not support atomic conditional removal for: ${path}.`);
|
|
303
|
+
const client = await this.#client();
|
|
304
|
+
const targets = /* @__PURE__ */ new Map();
|
|
305
|
+
const fileKeys = [this.#fileKey(normalized)];
|
|
306
|
+
if (this.#legacyRoot !== this.#root) fileKeys.push(this.#legacyFileKey(normalized));
|
|
307
|
+
for (const key of fileKeys) {
|
|
308
|
+
const attributesKey = key === this.#fileKey(normalized) ? this.#fileAttributesKey(normalized) : this.#legacyFileAttributesKey(normalized);
|
|
309
|
+
if (await client.head(key) || await client.head(attributesKey)) targets.set(key, attributesKey);
|
|
310
|
+
}
|
|
311
|
+
if (options.recursive) {
|
|
312
|
+
const prefixes = [`${this.#fileKey(normalized)}/`];
|
|
313
|
+
if (this.#legacyRoot !== this.#root) prefixes.push(`${this.#legacyFileKey(normalized)}/`);
|
|
314
|
+
for (const prefix of prefixes) for (const blob of await this.#listBlobs(prefix)) if (!targets.has(blob.key)) {
|
|
315
|
+
const path = normalizeWorkspacePath(blob.key.slice(prefix.length));
|
|
316
|
+
const attributesKey = prefix.startsWith(this.#fileKey("", { allowEmpty: true })) ? this.#fileAttributesKey(joinBlobPath(normalized, path)) : this.#legacyFileAttributesKey(joinBlobPath(normalized, path));
|
|
317
|
+
targets.set(blob.key, attributesKey);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
if (options.recursive) for (const root of /* @__PURE__ */ new Set([this.#root, this.#legacyRoot])) {
|
|
321
|
+
const prefix = `${joinBlobPath(root, ".vitehub/file-attributes", normalized)}/`;
|
|
322
|
+
for (const blob of await this.#listBlobs(prefix)) {
|
|
323
|
+
if (!blob.key.endsWith(".json")) continue;
|
|
324
|
+
const relative = blob.key.slice(prefix.length, -5);
|
|
325
|
+
targets.set(joinBlobPath(root, "files", normalized, relative), blob.key);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
if (!targets.size) {
|
|
329
|
+
if (options.force) return;
|
|
330
|
+
throw workspaceError(`[vitehub] Workspace path does not exist: ${path}.`);
|
|
331
|
+
}
|
|
332
|
+
await Promise.all([...targets].map(([fileKey, attributesKey]) => serializeFileMutation(fileKey, async () => {
|
|
333
|
+
await client.delete(fileKey);
|
|
334
|
+
await client.delete(attributesKey);
|
|
335
|
+
})));
|
|
336
|
+
}
|
|
337
|
+
async snapshot(options = {}) {
|
|
338
|
+
const snapshot = await createCurrentSnapshotFromStore(this, options.name);
|
|
339
|
+
await (await this.#client()).upload(this.#snapshotKey(snapshot.id), JSON.stringify(snapshot), { contentType: "application/json; charset=utf-8" });
|
|
340
|
+
this.#baseline = snapshot;
|
|
341
|
+
return snapshot;
|
|
342
|
+
}
|
|
343
|
+
async diff(options = {}) {
|
|
344
|
+
const from = options.from || this.#baseline;
|
|
345
|
+
const to = await createCurrentSnapshotFromStore(this);
|
|
346
|
+
return diffSnapshots(from, to);
|
|
347
|
+
}
|
|
348
|
+
async getMeta(key) {
|
|
349
|
+
return await this.#readJson(this.#metaKey(key), this.#legacyMetaKey(key));
|
|
350
|
+
}
|
|
351
|
+
async setMeta(key, value) {
|
|
352
|
+
if (value === void 0) {
|
|
353
|
+
const client = await this.#client();
|
|
354
|
+
await Promise.all([this.#metaKey(key), this.#legacyMetaKey(key)].map((pathname) => client.delete(pathname).catch((error) => {
|
|
355
|
+
if (!client.isMissing(error)) throw error;
|
|
356
|
+
})));
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
await (await this.#client()).upload(this.#metaKey(key), JSON.stringify(value), { contentType: "application/json; charset=utf-8" });
|
|
360
|
+
}
|
|
361
|
+
async #listBlobs(prefix) {
|
|
362
|
+
const blobs = [];
|
|
363
|
+
const seenCursors = /* @__PURE__ */ new Set();
|
|
364
|
+
let cursor;
|
|
365
|
+
let hasMore = true;
|
|
366
|
+
do {
|
|
367
|
+
if (cursor && seenCursors.has(cursor)) throw workspaceError("[vitehub] Vercel Blob pagination returned a repeated cursor.");
|
|
368
|
+
if (cursor) seenCursors.add(cursor);
|
|
369
|
+
const result = await (await this.#client()).list({
|
|
370
|
+
cursor,
|
|
371
|
+
limit: 1e3,
|
|
372
|
+
prefix
|
|
373
|
+
});
|
|
374
|
+
blobs.push(...result.items);
|
|
375
|
+
cursor = result.cursor;
|
|
376
|
+
hasMore = result.hasMore ?? Boolean(cursor);
|
|
377
|
+
} while (cursor && hasMore);
|
|
378
|
+
return blobs;
|
|
379
|
+
}
|
|
380
|
+
async #readJson(pathname, fallback) {
|
|
381
|
+
let file = await (await this.#client()).download(pathname);
|
|
382
|
+
if (!file && fallback) file = await (await this.#client()).download(fallback);
|
|
383
|
+
return file ? JSON.parse(await file.text()) : void 0;
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
function createVercelBlobWorkspaceStore(options, workspaceName) {
|
|
387
|
+
return new VercelBlobWorkspaceStore(options, workspaceName);
|
|
388
|
+
}
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/hosted-vercel-blob.ts
|
|
391
|
+
function installHostedVercelBlobWorkspaceRuntime() {
|
|
392
|
+
const existingWorkspaceHostedStoreLoader = getWorkspaceHostedStoreLoader();
|
|
393
|
+
setWorkspaceHostedStoreLoader((storeOptions, workspaceName) => {
|
|
394
|
+
if (storeOptions.driver === "vercel") return createVercelBlobWorkspaceStore(storeOptions, workspaceName);
|
|
395
|
+
return existingWorkspaceHostedStoreLoader?.(storeOptions, workspaceName);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
function configureHostedVercelBlobWorkspaceRuntime(options = {}) {
|
|
399
|
+
const root = resolve(process.cwd(), options.root || ".vitehub/workspaces");
|
|
400
|
+
const config = {
|
|
401
|
+
assets: options.assets,
|
|
402
|
+
root,
|
|
403
|
+
store: resolveVercelBlobWorkspaceStore(options.store, options.env)
|
|
404
|
+
};
|
|
405
|
+
installHostedVercelBlobWorkspaceRuntime();
|
|
406
|
+
setWorkspaceRuntimeConfig(config);
|
|
407
|
+
return config;
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
export { installHostedVercelBlobWorkspaceRuntime as n, configureHostedVercelBlobWorkspaceRuntime as t };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-
|
|
2
|
-
|
|
1
|
+
import { v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-BbtwmBZ5.js";
|
|
3
2
|
//#region src/hosted-vercel-blob.d.ts
|
|
4
|
-
interface HostedVercelBlobWorkspaceRuntimeOptions {
|
|
3
|
+
export interface HostedVercelBlobWorkspaceRuntimeOptions {
|
|
5
4
|
assets?: boolean | string[];
|
|
6
5
|
env?: Record<string, string | undefined>;
|
|
7
6
|
root?: string;
|
|
8
7
|
store?: Partial<VercelBlobWorkspaceStoreOptions> & {
|
|
9
|
-
|
|
8
|
+
driver: "vercel";
|
|
10
9
|
};
|
|
11
10
|
}
|
|
12
|
-
declare function installHostedVercelBlobWorkspaceRuntime(): void;
|
|
13
|
-
declare function configureHostedVercelBlobWorkspaceRuntime(options?: HostedVercelBlobWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
11
|
+
export declare function installHostedVercelBlobWorkspaceRuntime(): void;
|
|
12
|
+
export declare function configureHostedVercelBlobWorkspaceRuntime(options?: HostedVercelBlobWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
14
13
|
//#endregion
|
|
15
|
-
export {
|
|
14
|
+
export type { VercelBlobWorkspaceStoreOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as installHostedVercelBlobWorkspaceRuntime, t as configureHostedVercelBlobWorkspaceRuntime } from "./hosted-vercel-blob-
|
|
1
|
+
import { n as installHostedVercelBlobWorkspaceRuntime, t as configureHostedVercelBlobWorkspaceRuntime } from "./hosted-vercel-blob-B3-wRdUm.js";
|
|
2
2
|
export { configureHostedVercelBlobWorkspaceRuntime, installHostedVercelBlobWorkspaceRuntime };
|
package/dist/hosted.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { s as GitHubWorkspaceStoreOptions, t as CloudflareArtifactsWorkspaceStoreOptions, v as ResolvedWorkspaceModuleOptions, w as VercelBlobWorkspaceStoreOptions } from "./types-BbtwmBZ5.js";
|
|
3
2
|
//#region src/hosted.d.ts
|
|
4
|
-
type HostedWorkspaceRuntimeStoreOptions = Partial<CloudflareArtifactsWorkspaceStoreOptions> | (Partial<GitHubWorkspaceStoreOptions> & {
|
|
5
|
-
|
|
3
|
+
export type HostedWorkspaceRuntimeStoreOptions = Partial<CloudflareArtifactsWorkspaceStoreOptions> | (Partial<GitHubWorkspaceStoreOptions> & {
|
|
4
|
+
driver: "github";
|
|
6
5
|
}) | (Partial<VercelBlobWorkspaceStoreOptions> & {
|
|
7
|
-
|
|
6
|
+
driver: "vercel";
|
|
8
7
|
});
|
|
9
|
-
interface HostedWorkspaceRuntimeOptions {
|
|
8
|
+
export interface HostedWorkspaceRuntimeOptions {
|
|
10
9
|
assets?: boolean | string[];
|
|
11
10
|
env?: Record<string, string | undefined>;
|
|
12
11
|
root?: string;
|
|
13
12
|
store?: HostedWorkspaceRuntimeStoreOptions;
|
|
14
13
|
}
|
|
15
|
-
declare function
|
|
16
|
-
declare function
|
|
14
|
+
export declare function installHostedGitHubWorkspaceStore(): void;
|
|
15
|
+
export declare function installHostedCloudflareArtifactsWorkspaceStore(): void;
|
|
16
|
+
export declare function installHostedWorkspaceRuntime(): void;
|
|
17
|
+
export declare function configureHostedWorkspaceRuntime(options?: HostedWorkspaceRuntimeOptions): ResolvedWorkspaceModuleOptions;
|
|
17
18
|
//#endregion
|
|
18
|
-
export {
|
|
19
|
+
export type { CloudflareArtifactsWorkspaceStoreOptions, GitHubWorkspaceStoreOptions, VercelBlobWorkspaceStoreOptions };
|
package/dist/hosted.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { configureHostedWorkspaceRuntime, installHostedWorkspaceRuntime };
|
|
1
|
+
import { i as installHostedWorkspaceRuntime, n as installHostedCloudflareArtifactsWorkspaceStore, r as installHostedGitHubWorkspaceStore, t as configureHostedWorkspaceRuntime } from "./hosted-KcUR_jPv.js";
|
|
2
|
+
export { configureHostedWorkspaceRuntime, installHostedCloudflareArtifactsWorkspaceStore, installHostedGitHubWorkspaceStore, installHostedWorkspaceRuntime };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { FileSourceOptions as FileSourceOptions$1 } from "@vite-hub/source
|
|
10
|
-
import { GitHubSourceOptions as GitHubSourceOptions$1 } from "@vite-hub/source/github";
|
|
11
|
-
import { GlobSourceOptions as GlobSourceOptions$1 } from "@vite-hub/source/glob";
|
|
1
|
+
import { $ as WorkspaceHistoryFileInput, $t as WorkspaceSourceMaterializationStatus, A as WorkspaceAutoCommitPlan, An as WorkspaceWriteCommit, At as WorkspaceRetainedHistory, B as WorkspaceEntry, Bt as WorkspaceSessionHost, C as SourceContextWorkspaceFiles, Cn as WorkspaceStoreHistoryCommitOptions, Ct as WorkspaceNameMap, D as WorkspaceAssets, Dn as WorkspaceSyncResultDetails, Dt as WorkspacePrepareSessionProgressEvent, E as WorkspaceAssetPath, En as WorkspaceSyncOptions, Et as WorkspacePlugin, F as WorkspaceCustomSourceInput, Fn as WorkspaceWriteOperation, Ft as WorkspaceScopeName, G as WorkspaceGitHubSourceInput, Gt as WorkspaceSnapshot, H as WorkspaceFetchSourceRequestOptions, Ht as WorkspaceSessionHostFiles, I as WorkspaceDefinition, In as WorkspaceWriteValidator, It as WorkspaceSearchHit, J as WorkspaceHistoryChangesCommitOptions, Jt as WorkspaceSourceDefinition, K as WorkspaceGlobSourceInput, Kt as WorkspaceSource, L as WorkspaceDefinitionInput, Ln as WorkspaceWriteValidatorResult, Lt as WorkspaceSearchQuery, M as WorkspaceCapabilities, Mn as WorkspaceWriteHook, Mt as WorkspaceRevisionView, N as WorkspaceContent, Nn as WorkspaceWriteInput, Nt as WorkspaceRule, O as WorkspaceAssetsRegistry, On as WorkspaceSyncSnapshotOptions, Ot as WorkspacePullRequest, P as WorkspaceContentStream, Pn as WorkspaceWriteMode, Pt as WorkspaceRules, Q as WorkspaceHistoryFile, Qt as WorkspaceSourceMaterializationPathResult, R as WorkspaceDiff, Rn as WriteFileOptions, Rt as WorkspaceSelectedScope, S as SourceContext, Sn as WorkspaceStoreHistory, St as WorkspaceName, T as Workspace, Tn as WorkspaceStreamFile, Tt as WorkspaceOptions, U as WorkspaceFile, Ut as WorkspaceSessionOptions, V as WorkspaceFetchSourceInput, Vt as WorkspaceSessionHostFileEntry, W as WorkspaceFileSourceInput, Wt as WorkspaceSessionWriteFileOptions, X as WorkspaceHistoryCommitOptions, Xt as WorkspaceSourceItem, Y as WorkspaceHistoryCommitBase, Yt as WorkspaceSourceInput, Z as WorkspaceHistoryExtensions, Zt as WorkspaceSourceMaterializationCounts, _ as ReadFileResult, _n as WorkspaceSourceSyncPolicy, _t as WorkspaceMergeCommit, a as GitHubWorkspaceOption, an as WorkspaceSourceRequestExecutor, at as WorkspaceHistoryRefOptions, b as RmOptions, bn as WorkspaceStat, bt as WorkspaceMergeOptions, c as GlobOptions, cn as WorkspaceSourceResolutionContextMap, ct as WorkspaceInstructionBinding, d as LocalWorkspaceStoreOptions, dn as WorkspaceSourceResolutionResult, dt as WorkspaceLoaderSource, en as WorkspaceSourceMount, et as WorkspaceHistoryFilesCommitOptions, f as Logger, fn as WorkspaceSourceResolver, ft as WorkspaceMaterializeMode, g as ReadFileOptions, gn as WorkspaceSourceSyncPathResult, gt as WorkspaceMcpResourcesSourceInput, h as MkdirOptions, hn as WorkspaceSourceSyncCounts, ht as WorkspaceMaterializeSourcesResult, i as ExecResult, in as WorkspaceSourceRequestExecutionResult, it as WorkspaceHistoryRef, j as WorkspaceCacheOptions, jn as WorkspaceWriteErrorHook, jt as WorkspaceRevision, k as WorkspaceAuthor, kn as WorkspaceValidateMode, kt as WorkspaceRebaseOptions, l as ListOptions, ln as WorkspaceSourceResolutionContextValueReader, lt as WorkspaceInstructionBindingValue, m as MemoryWorkspaceStoreOptions, mn as WorkspaceSourceSyncConfig, mt as WorkspaceMaterializeSourcesProgressEvent, n as DiffOptions, nn as WorkspaceSourceRequestDescriptor, nt as WorkspaceHistoryListResult, o as GitHubWorkspaceRefs, on as WorkspaceSourceRequestMethod, ot as WorkspaceHookContext, p as MaybePromise, pn as WorkspaceSourceSelection, pt as WorkspaceMaterializeSourcesOptions, q as WorkspaceHistoryChanges, qt as WorkspaceSourceBindingInput, r as ExecOptions, rn as WorkspaceSourceRequestExecutionInput, rt as WorkspaceHistoryReader, s as GitHubWorkspaceStoreOptions, sn as WorkspaceSourceResolutionContext, st as WorkspaceHooks, t as CloudflareArtifactsWorkspaceStoreOptions, tn as WorkspaceSourceMountOptions, tt as WorkspaceHistoryListOptions, u as LoaderContext, un as WorkspaceSourceResolutionInvocation, ut as WorkspaceLoader, v as ResolvedWorkspaceModuleOptions, vn as WorkspaceSourceSyncResult, vt as WorkspaceMergeConflict, w as VercelBlobWorkspaceStoreOptions, wn as WorkspaceStoreOptions, wt as WorkspaceOpenPullRequestOptions, x as SnapshotOptions, xn as WorkspaceStore, xt as WorkspaceMergeResolution, y as ResolvedWorkspaceRule, yn as WorkspaceSourceSyncStatus, yt as WorkspaceMergeConflictContext, z as WorkspaceDiffEntry, zt as WorkspaceSession } from "./types-BbtwmBZ5.js";
|
|
2
|
+
import { A as WorkspaceToolOperations, C as resolveWorkspaceStoreTarget, D as WorkspacePathResult, E as WorkspaceMoveResult, F as createWorkspaceTools, M as WorkspaceTools, N as WorkspaceWriteOperations, O as WorkspaceReadOperations, P as WorkspaceWriteToolMap, S as WorkspaceStoreTarget, T as ShellEnabled, _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, b as createWorkspaceFileRuntime, c as WorkspaceFacade, d as WorkspaceReadToolSet, f as WorkspaceReadTools, g as WritableWorkspaceFacadeToolOptions, h as WritableWorkspaceFacade, i as ReadonlyWorkspaceFacade, j as WorkspaceToolOptions, k as WorkspaceShellResult, l as WorkspaceFacadeToolOptions, m as WorkspaceWriteTools, n as HistoryCheckpoint, o as ReadonlyWorkspaceFs, p as WorkspaceWriteToolSet, r as HistoryCheckpointOptions, s as UseWorkspaceOptions, t as History, u as WorkspaceHistory, v as WritableWorkspaceFs, w as EnabledReadCapability, x as useWorkspaceFiles, y as createReadonlyFs } from "./use-C6lV3-wC.js";
|
|
3
|
+
import { n as isWorkspaceConflict, t as WorkspaceErrorCode } from "./path-AxMho1wo.js";
|
|
4
|
+
import { n as normalizeSafeWorkspacePath } from "./path-zHxQUbqa.js";
|
|
5
|
+
import { t as registerWorkspacePlugin } from "./plugins-C8C0auoW.js";
|
|
6
|
+
import { t as createWorkspace } from "./workspace-CYB2xZ1T.js";
|
|
7
|
+
import { n as resolveRegisteredWorkspaceDefinition } from "./registry-CYNN623b.js";
|
|
8
|
+
import { l as useWorkspace, t as invalidateWorkspaceStore } from "./state-BISnUf1s.js";
|
|
9
|
+
import { FileSourceOptions as FileSourceOptions$1, GitHubSourceOptions as GitHubSourceOptions$1, GlobSourceOptions as GlobSourceOptions$1, sourceIgnores } from "@vite-hub/source";
|
|
12
10
|
import { McpResourceContent, McpResourceDescriptor, McpResourcesClient, McpResourcesClientConfig, McpResourcesRequestOptions, McpResourcesServer, McpResourcesSourceOptions as McpResourcesSourceOptions$1 } from "@vite-hub/source/mcp";
|
|
13
|
-
|
|
14
11
|
//#region src/core/define.d.ts
|
|
15
|
-
declare function defineWorkspace(definition: WorkspaceDefinitionInput): WorkspaceDefinitionInput;
|
|
12
|
+
export declare function defineWorkspace(definition: WorkspaceDefinitionInput): WorkspaceDefinitionInput;
|
|
16
13
|
//#endregion
|
|
17
14
|
//#region src/sources/runtime-options.d.ts
|
|
18
15
|
type ExactOptions$1<TInput, TShape> = TInput & Record<Exclude<keyof TInput, keyof TShape>, never>;
|
|
@@ -26,14 +23,14 @@ type CustomWorkspaceSourceFile = Omit<WorkspaceSourceItem, "content" | "contentS
|
|
|
26
23
|
type CustomWorkspaceSourceFiles = WorkspaceSourceRuntimeOptions & Pick<WorkspaceSource, "probeKeys"> & {
|
|
27
24
|
files: readonly CustomWorkspaceSourceFile[];
|
|
28
25
|
};
|
|
29
|
-
declare function custom<const TSource extends CustomWorkspaceSourceFiles>(source: ExactOptions$1<TSource, CustomWorkspaceSourceFiles>): WorkspaceSource;
|
|
30
|
-
declare function custom<const TSource extends WorkspaceSource>(source: ExactOptions$1<TSource, WorkspaceSource>): WorkspaceSource;
|
|
26
|
+
export declare function custom<const TSource extends CustomWorkspaceSourceFiles>(source: ExactOptions$1<TSource, CustomWorkspaceSourceFiles>): WorkspaceSource;
|
|
27
|
+
export declare function custom<const TSource extends WorkspaceSource>(source: ExactOptions$1<TSource, WorkspaceSource>): WorkspaceSource;
|
|
31
28
|
//#endregion
|
|
32
29
|
//#region src/sources/file.d.ts
|
|
33
30
|
type FileWorkspaceSourceRuntimeOptions = WorkspaceSourceRuntimeOptions & Pick<WorkspaceSource, "probeKeys">;
|
|
34
31
|
type FileSourceOptions<TKey extends string = string> = FileSourceOptions$1<TKey> & FileWorkspaceSourceRuntimeOptions;
|
|
35
|
-
declare function file<const TKey extends string>(input: TKey): WorkspaceSource;
|
|
36
|
-
declare function file<const TKey extends string = string, const TOptions extends FileSourceOptions<TKey> = FileSourceOptions<TKey>>(input: ExactOptions$1<TOptions, FileSourceOptions<TKey>>): WorkspaceSource;
|
|
32
|
+
export declare function file<const TKey extends string>(input: TKey): WorkspaceSource;
|
|
33
|
+
export declare function file<const TKey extends string = string, const TOptions extends FileSourceOptions<TKey> = FileSourceOptions<TKey>>(input: ExactOptions$1<TOptions, FileSourceOptions<TKey>>): WorkspaceSource;
|
|
37
34
|
//#endregion
|
|
38
35
|
//#region src/sources/fetch.d.ts
|
|
39
36
|
type FetchSourceMethod = "GET" | "HEAD" | "POST";
|
|
@@ -104,9 +101,9 @@ interface FetchSourceOptions<TResponse = unknown, TOutput = TResponse> extends S
|
|
|
104
101
|
}
|
|
105
102
|
type FetchSourceResolver<TResponse = unknown, TOutput = TResponse> = (context: WorkspaceSourceResolutionContext) => MaybePromise<FetchSourceOptions<TResponse, TOutput> | false | null | undefined>;
|
|
106
103
|
type FetchSourceInput<TResponse = unknown, TOutput = TResponse> = FetchSourceOptions<TResponse, TOutput> | FetchSourceResolver<TResponse, TOutput>;
|
|
107
|
-
declare function fetch<TResponse = unknown, TOutput = TResponse>(options: ExactOptions<FetchSourceOptions<TResponse, TOutput>, FetchSourceOptions<TResponse, TOutput>>): WorkspaceSource;
|
|
108
|
-
declare function fetch<const TOptions extends FetchSourceOptions<any, any>>(options: ExactOptions<TOptions, FetchSourceOptions<any, any>>): WorkspaceSource;
|
|
109
|
-
declare function fetch<TResponse = unknown, TOutput = TResponse>(resolve: FetchSourceResolver<TResponse, TOutput>): WorkspaceSource;
|
|
104
|
+
export declare function fetch<TResponse = unknown, TOutput = TResponse>(options: ExactOptions<FetchSourceOptions<TResponse, TOutput>, FetchSourceOptions<TResponse, TOutput>>): WorkspaceSource;
|
|
105
|
+
export declare function fetch<const TOptions extends FetchSourceOptions<any, any>>(options: ExactOptions<TOptions, FetchSourceOptions<any, any>>): WorkspaceSource;
|
|
106
|
+
export declare function fetch<TResponse = unknown, TOutput = TResponse>(resolve: FetchSourceResolver<TResponse, TOutput>): WorkspaceSource;
|
|
110
107
|
//#endregion
|
|
111
108
|
//#region src/sources/github.d.ts
|
|
112
109
|
type GitHubAuth = NonNullable<GitHubSourceOptions$1["auth"]>;
|
|
@@ -118,25 +115,25 @@ interface GitHubSourceOptions extends Omit<GitHubSourceOptions$1, "auth" | "igno
|
|
|
118
115
|
}
|
|
119
116
|
type GitHubSourceResolver = (context: WorkspaceSourceResolutionContext) => MaybePromise<GitHubResolvedSourceOptions | false | null | undefined>;
|
|
120
117
|
type GitHubSourceInput = GitHubSourceOptions | GitHubSourceResolver;
|
|
121
|
-
declare function github<const TOptions extends GitHubSourceOptions>(options: ExactOptions$1<TOptions, GitHubSourceOptions>): WorkspaceSource;
|
|
122
|
-
declare function github(resolve: GitHubSourceResolver): WorkspaceSource;
|
|
118
|
+
export declare function github<const TOptions extends GitHubSourceOptions>(options: ExactOptions$1<TOptions, GitHubSourceOptions>): WorkspaceSource;
|
|
119
|
+
export declare function github(resolve: GitHubSourceResolver): WorkspaceSource;
|
|
123
120
|
//#endregion
|
|
124
121
|
//#region src/sources/glob.d.ts
|
|
125
122
|
type GlobSourceOptions = GlobSourceOptions$1 & WorkspaceSourceRuntimeOptions;
|
|
126
|
-
declare function glob<const TOptions extends GlobSourceOptions>(options: ExactOptions$1<TOptions, GlobSourceOptions>): WorkspaceSource;
|
|
123
|
+
export declare function glob<const TOptions extends GlobSourceOptions>(options: ExactOptions$1<TOptions, GlobSourceOptions>): WorkspaceSource;
|
|
127
124
|
//#endregion
|
|
128
125
|
//#region src/sources/markdown.d.ts
|
|
129
|
-
declare function markdown(options: FileSourceOptions): WorkspaceSource;
|
|
126
|
+
export declare function markdown(options: FileSourceOptions): WorkspaceSource;
|
|
130
127
|
//#endregion
|
|
131
128
|
//#region src/sources/mcp-resources.d.ts
|
|
132
129
|
interface McpResourcesSourceOptions<TKey extends string = string> extends Omit<McpResourcesSourceOptions$1<TKey>, "cache">, WorkspaceSourceRuntimeOptions {}
|
|
133
|
-
declare function mcpResources<const TKey extends string = string, const TOptions extends McpResourcesSourceOptions<TKey> = McpResourcesSourceOptions<TKey>>(options: ExactOptions$1<TOptions, McpResourcesSourceOptions<TKey>>): WorkspaceSource;
|
|
130
|
+
export declare function mcpResources<const TKey extends string = string, const TOptions extends McpResourcesSourceOptions<TKey> = McpResourcesSourceOptions<TKey>>(options: ExactOptions$1<TOptions, McpResourcesSourceOptions<TKey>>): WorkspaceSource;
|
|
134
131
|
declare namespace index_d_exports {
|
|
135
132
|
export { FetchSourceInput, FetchSourceOptions, FetchSourceRequest, FetchSourceRequestOptions, FetchSourceResolver, FileSourceOptions, GitHubSourceInput, GitHubSourceOptions, GitHubSourceResolver, GlobSourceOptions, McpResourceContent, McpResourceDescriptor, McpResourcesClient, McpResourcesClientConfig, McpResourcesRequestOptions, McpResourcesServer, McpResourcesSourceOptions, custom, fetch, file, github, glob, markdown, mcpResources };
|
|
136
133
|
}
|
|
137
134
|
//#endregion
|
|
138
135
|
//#region src/core/rules.d.ts
|
|
139
|
-
declare function resolveWorkspaceAutoCommit(definition: WorkspaceDefinition, diff: WorkspaceDiff): WorkspaceAutoCommitPlan | undefined;
|
|
136
|
+
export declare function resolveWorkspaceAutoCommit(definition: WorkspaceDefinition, diff: WorkspaceDiff): WorkspaceAutoCommitPlan | undefined;
|
|
140
137
|
//#endregion
|
|
141
138
|
//#region src/core/glob-pattern.d.ts
|
|
142
139
|
interface WorkspaceGlobPatternLimits {
|
|
@@ -144,25 +141,7 @@ interface WorkspaceGlobPatternLimits {
|
|
|
144
141
|
maxComplexity: number;
|
|
145
142
|
maxPatterns: number;
|
|
146
143
|
}
|
|
147
|
-
declare const modelWorkspaceGlobPatternLimits: Readonly<WorkspaceGlobPatternLimits>;
|
|
148
|
-
declare function assertModelWorkspaceGlobPattern(pattern: string | readonly string[], limits?: Readonly<WorkspaceGlobPatternLimits>): void;
|
|
144
|
+
export declare const modelWorkspaceGlobPatternLimits: Readonly<WorkspaceGlobPatternLimits>;
|
|
145
|
+
export declare function assertModelWorkspaceGlobPattern(pattern: string | readonly string[], limits?: Readonly<WorkspaceGlobPatternLimits>): void;
|
|
149
146
|
//#endregion
|
|
150
|
-
|
|
151
|
-
type WorkspaceErrorCode = "WORKSPACE_COLLECTION_CURSOR_INVALID" | "WORKSPACE_CONFLICT" | "WORKSPACE_FAILED" | "WORKSPACE_NOT_FOUND" | "WORKSPACE_PATH_INVALID";
|
|
152
|
-
declare function isWorkspaceConflict(value: unknown): boolean;
|
|
153
|
-
//#endregion
|
|
154
|
-
//#region src/core/path.d.ts
|
|
155
|
-
interface SafeWorkspacePathOptions {
|
|
156
|
-
allowEmpty?: boolean;
|
|
157
|
-
allowReserved?: boolean;
|
|
158
|
-
pattern?: boolean;
|
|
159
|
-
}
|
|
160
|
-
declare function normalizeSafeWorkspacePath(path?: string, options?: SafeWorkspacePathOptions): string;
|
|
161
|
-
//#endregion
|
|
162
|
-
//#region src/storage/target.d.ts
|
|
163
|
-
interface WorkspaceStoreTarget {
|
|
164
|
-
provider: string;
|
|
165
|
-
}
|
|
166
|
-
declare function resolveWorkspaceStoreTarget(source: unknown): Promise<WorkspaceStoreTarget | undefined>;
|
|
167
|
-
//#endregion
|
|
168
|
-
export { type CloudflareArtifactsWorkspaceStoreOptions, type DiffOptions, type EnabledReadCapability, type ExecOptions, type ExecResult, type FetchSourceInput, type FetchSourceOptions, type FetchSourceRequest, type FetchSourceRequestOptions, type FetchSourceResolver, type FileSourceOptions, type GitHubSourceInput, type GitHubSourceOptions, type GitHubSourceResolver, type GitHubWorkspaceOption, type GitHubWorkspaceStoreOptions, type GlobOptions, type GlobSourceOptions, type History, type HistoryCheckpoint, type HistoryCheckpointOptions, type ListOptions, type LoaderContext, type LocalWorkspaceStoreOptions, type Logger, type MaybePromise, type McpResourceContent, type McpResourceDescriptor, type McpResourcesClient, type McpResourcesClientConfig, type McpResourcesRequestOptions, type McpResourcesServer, type McpResourcesSourceOptions, type MemoryWorkspaceStoreOptions, type MkdirOptions, type PublishContext, type ReadFileOptions, type ReadFileResult, type ReadonlyWorkspaceFacade, type ReadonlyWorkspaceFs, type ResolvedWorkspaceModuleOptions, type ResolvedWorkspaceRule, type RmOptions, type ShellEnabled, type SnapshotOptions, type SourceContext, type SourceContextWorkspaceFiles, type UseWorkspaceOptions, type VercelBlobWorkspaceStoreOptions, type Workspace, type WorkspaceAssetPath, type WorkspaceAssets, type WorkspaceAssetsRegistry, type WorkspaceAutoCommitPlan, type WorkspaceCacheOptions, type WorkspaceCapabilities, type WorkspaceContent, type WorkspaceContentStream, type WorkspaceCustomSourceInput, type WorkspaceDefinition, type WorkspaceDefinitionInput, type WorkspaceDiff, type WorkspaceDiffEntry, type WorkspaceEntry, type WorkspaceErrorCode, type WorkspaceFacade, type WorkspaceFacadeToolOptions, type WorkspaceFetchSourceInput, type WorkspaceFetchSourceRequestOptions, type WorkspaceFile, type WorkspaceFileSourceInput, type WorkspaceGitHubSourceInput, type WorkspaceGlobPatternLimits, type WorkspaceGlobSourceInput, type WorkspaceHistory, type WorkspaceHookContext, type WorkspaceHooks, type WorkspaceInstructionBinding, type WorkspaceInstructionBindingValue, type WorkspaceLoader, type WorkspaceLoaderSource, type WorkspaceMaterializeMode, type WorkspaceMaterializeSourcesOptions, type WorkspaceMaterializeSourcesProgressEvent, type WorkspaceMaterializeSourcesResult, type WorkspaceMcpResourcesSourceInput, type WorkspaceModuleOptions, type WorkspaceMoveResult, type WorkspaceName, type WorkspaceNameMap, type WorkspacePathResult, type WorkspacePlugin, type WorkspacePrepareSessionProgressEvent, type WorkspacePublishOptions, type WorkspacePublisher, type WorkspaceReadOperations, type WorkspaceReadToolSet, type WorkspaceReadTools, type WorkspaceRebaseOptions, type WorkspaceRule, type WorkspaceRules, type WorkspaceScopeName, type WorkspaceSearchHit, type WorkspaceSearchQuery, type WorkspaceSelectedScope, type WorkspaceSession, type WorkspaceSessionHost, type WorkspaceSessionHostFileEntry, type WorkspaceSessionHostFiles, type WorkspaceSessionOptions, type WorkspaceSessionWriteFileOptions, type WorkspaceShellResult, type WorkspaceSnapshot, type WorkspaceSource, type WorkspaceSourceBindingInput, type WorkspaceSourceDefinition, type WorkspaceSourceInput, type WorkspaceSourceItem, type WorkspaceSourceMaterializationCounts, type WorkspaceSourceMaterializationPathResult, type WorkspaceSourceMaterializationStatus, type WorkspaceSourceMount, type WorkspaceSourceMountOptions, type WorkspaceSourceRequestDescriptor, type WorkspaceSourceRequestExecutionInput, type WorkspaceSourceRequestExecutionResult, type WorkspaceSourceRequestExecutor, type WorkspaceSourceRequestMethod, type WorkspaceSourceResolutionContext, type WorkspaceSourceResolutionContextMap, type WorkspaceSourceResolutionContextValueReader, type WorkspaceSourceResolutionInvocation, type WorkspaceSourceResolutionResult, type WorkspaceSourceResolver, type WorkspaceSourceSelection, type WorkspaceSourceSyncConfig, type WorkspaceSourceSyncCounts, type WorkspaceSourceSyncPathResult, type WorkspaceSourceSyncPolicy, type WorkspaceSourceSyncResult, type WorkspaceSourceSyncStatus, type WorkspaceStat, type WorkspaceStore, type WorkspaceStoreOptions, type WorkspaceStoreTarget, type WorkspaceStreamFile, type WorkspaceSyncOptions, type WorkspaceSyncResultDetails, type WorkspaceSyncSnapshotOptions, type WorkspaceToolOperations, type WorkspaceToolOptions, type WorkspaceTools, type WorkspaceValidateMode, type WorkspaceWriteErrorHook, type WorkspaceWriteHook, type WorkspaceWriteInput, type WorkspaceWriteMode, type WorkspaceWriteOperation, type WorkspaceWriteOperations, type WorkspaceWriteToolMap, type WorkspaceWriteToolSet, type WorkspaceWriteTools, type WorkspaceWriteValidator, type WorkspaceWriteValidatorResult, type WritableWorkspaceFacade, type WritableWorkspaceFacadeToolOptions, type WritableWorkspaceFs, type WriteFileOptions, assertModelWorkspaceGlobPattern, createWorkspace, createWorkspaceTools, custom, defineWorkspace, fetch, file, github, glob, invalidateWorkspaceStore, isWorkspaceConflict, markdown, mcpResources, modelWorkspaceGlobPatternLimits, normalizeSafeWorkspacePath, resolveRegisteredWorkspaceDefinition, resolveWorkspaceAutoCommit, resolveWorkspaceStoreTarget, index_d_exports as source, sourceIgnores, useWorkspace };
|
|
147
|
+
export { type CloudflareArtifactsWorkspaceStoreOptions, type DiffOptions, type EnabledReadCapability, type ExecOptions, type ExecResult, type FetchSourceInput, type FetchSourceOptions, type FetchSourceRequest, type FetchSourceRequestOptions, type FetchSourceResolver, type FileSourceOptions, type GitHubSourceInput, type GitHubSourceOptions, type GitHubSourceResolver, type GitHubWorkspaceOption, type GitHubWorkspaceRefs, type GitHubWorkspaceStoreOptions, type GlobOptions, type GlobSourceOptions, type History, type HistoryCheckpoint, type HistoryCheckpointOptions, type ListOptions, type LoaderContext, type LocalWorkspaceStoreOptions, type Logger, type MaybePromise, type McpResourceContent, type McpResourceDescriptor, type McpResourcesClient, type McpResourcesClientConfig, type McpResourcesRequestOptions, type McpResourcesServer, type McpResourcesSourceOptions, type MemoryWorkspaceStoreOptions, type MkdirOptions, type ReadFileOptions, type ReadFileResult, type ReadonlyWorkspaceFacade, type ReadonlyWorkspaceFiles, type ReadonlyWorkspaceFs, type ResolvedWorkspaceModuleOptions, type ResolvedWorkspaceRule, type RmOptions, type ShellEnabled, type SnapshotOptions, type SourceContext, type SourceContextWorkspaceFiles, type UseWorkspaceOptions, type VercelBlobWorkspaceStoreOptions, type Workspace, type WorkspaceAssetPath, type WorkspaceAssets, type WorkspaceAssetsRegistry, type WorkspaceAuthor, type WorkspaceAutoCommitPlan, type WorkspaceCacheOptions, type WorkspaceCapabilities, type WorkspaceContent, type WorkspaceContentStream, type WorkspaceCustomSourceInput, type WorkspaceDefinition, type WorkspaceDefinitionInput, type WorkspaceDiff, type WorkspaceDiffEntry, type WorkspaceEntry, type WorkspaceErrorCode, type WorkspaceFacade, type WorkspaceFacadeToolOptions, type WorkspaceFetchSourceInput, type WorkspaceFetchSourceRequestOptions, type WorkspaceFile, type WorkspaceFileSourceInput, type WorkspaceGitHubSourceInput, type WorkspaceGlobPatternLimits, type WorkspaceGlobSourceInput, type WorkspaceHistory, type WorkspaceHistoryChanges, type WorkspaceHistoryChangesCommitOptions, type WorkspaceHistoryCommitBase, type WorkspaceHistoryCommitOptions, type WorkspaceHistoryExtensions, type WorkspaceHistoryFile, type WorkspaceHistoryFileInput, type WorkspaceHistoryFilesCommitOptions, type WorkspaceHistoryListOptions, type WorkspaceHistoryListResult, type WorkspaceHistoryReader, type WorkspaceHistoryRef, type WorkspaceHistoryRefOptions, type WorkspaceHookContext, type WorkspaceHooks, type WorkspaceInstructionBinding, type WorkspaceInstructionBindingValue, type WorkspaceLoader, type WorkspaceLoaderSource, type WorkspaceMaterializeMode, type WorkspaceMaterializeSourcesOptions, type WorkspaceMaterializeSourcesProgressEvent, type WorkspaceMaterializeSourcesResult, type WorkspaceMcpResourcesSourceInput, type WorkspaceMergeCommit, type WorkspaceMergeConflict, type WorkspaceMergeConflictContext, type WorkspaceMergeOptions, type WorkspaceMergeResolution, type WorkspaceMoveResult, type WorkspaceName, type WorkspaceNameMap, type WorkspaceOpenPullRequestOptions, type WorkspaceOptions, type WorkspacePathResult, type WorkspacePlugin, type WorkspacePrepareSessionProgressEvent, type WorkspacePullRequest, type WorkspaceReadOperations, type WorkspaceReadToolSet, type WorkspaceReadTools, type WorkspaceRebaseOptions, type WorkspaceRetainedHistory, type WorkspaceRevision, type WorkspaceRevisionView, type WorkspaceRule, type WorkspaceRules, type WorkspaceScopeName, type WorkspaceSearchHit, type WorkspaceSearchQuery, type WorkspaceSelectedScope, type WorkspaceSession, type WorkspaceSessionHost, type WorkspaceSessionHostFileEntry, type WorkspaceSessionHostFiles, type WorkspaceSessionOptions, type WorkspaceSessionWriteFileOptions, type WorkspaceShellResult, type WorkspaceSnapshot, type WorkspaceSource, type WorkspaceSourceBindingInput, type WorkspaceSourceDefinition, type WorkspaceSourceInput, type WorkspaceSourceItem, type WorkspaceSourceMaterializationCounts, type WorkspaceSourceMaterializationPathResult, type WorkspaceSourceMaterializationStatus, type WorkspaceSourceMount, type WorkspaceSourceMountOptions, type WorkspaceSourceRequestDescriptor, type WorkspaceSourceRequestExecutionInput, type WorkspaceSourceRequestExecutionResult, type WorkspaceSourceRequestExecutor, type WorkspaceSourceRequestMethod, type WorkspaceSourceResolutionContext, type WorkspaceSourceResolutionContextMap, type WorkspaceSourceResolutionContextValueReader, type WorkspaceSourceResolutionInvocation, type WorkspaceSourceResolutionResult, type WorkspaceSourceResolver, type WorkspaceSourceSelection, type WorkspaceSourceSyncConfig, type WorkspaceSourceSyncCounts, type WorkspaceSourceSyncPathResult, type WorkspaceSourceSyncPolicy, type WorkspaceSourceSyncResult, type WorkspaceSourceSyncStatus, type WorkspaceStat, type WorkspaceStore, type WorkspaceStoreHistory, type WorkspaceStoreHistoryCommitOptions, type WorkspaceStoreOptions, type WorkspaceStoreTarget, type WorkspaceStreamFile, type WorkspaceSyncOptions, type WorkspaceSyncResultDetails, type WorkspaceSyncSnapshotOptions, type WorkspaceToolOperations, type WorkspaceToolOptions, type WorkspaceTools, type WorkspaceValidateMode, type WorkspaceWriteCommit, type WorkspaceWriteErrorHook, type WorkspaceWriteHook, type WorkspaceWriteInput, type WorkspaceWriteMode, type WorkspaceWriteOperation, type WorkspaceWriteOperations, type WorkspaceWriteToolMap, type WorkspaceWriteToolSet, type WorkspaceWriteTools, type WorkspaceWriteValidator, type WorkspaceWriteValidatorResult, type WritableWorkspaceFacade, type WritableWorkspaceFacadeToolOptions, type WritableWorkspaceFiles, type WritableWorkspaceFs, type WriteFileOptions, type createReadonlyFs, createWorkspace, type createWorkspaceFileRuntime, createWorkspaceTools, invalidateWorkspaceStore, isWorkspaceConflict, normalizeSafeWorkspacePath, registerWorkspacePlugin, resolveRegisteredWorkspaceDefinition, resolveWorkspaceStoreTarget, index_d_exports as source, sourceIgnores, useWorkspace, useWorkspaceFiles };
|