coding-agents-sdk 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist/SdkAgent-a97nkDuR.mjs +1 -0
- package/dist/adapters/claude-code-cli/index.d.mts +1 -1
- package/dist/adapters/claude-code-cli/index.mjs +2 -490
- package/dist/adapters/claude-code-sdk/index.d.mts +1 -1
- package/dist/adapters/claude-code-sdk/index.mjs +4 -483
- package/dist/adapters/codex-cli/index.d.mts +1 -1
- package/dist/adapters/codex-cli/index.mjs +2 -626
- package/dist/adapters/codex-sdk/index.d.mts +1 -1
- package/dist/adapters/codex-sdk/index.mjs +1 -286
- package/dist/adapters/gemini-cli/index.d.mts +1 -1
- package/dist/adapters/gemini-cli/index.mjs +1 -292
- package/dist/classify-error-V6x6jP_R.mjs +8 -0
- package/dist/container/index.d.mts +1 -1
- package/dist/container/index.mjs +1 -24
- package/dist/container-BY7JDOGo.mjs +1 -0
- package/dist/container-DWTITDhL.mjs +1 -0
- package/dist/container-vkn5-3Xl.mjs +1 -0
- package/dist/diff-BCfLDXNN.mjs +1 -0
- package/dist/env-Dkd8Sgjf.mjs +1 -0
- package/dist/errors-XV0frS3r.mjs +1 -0
- package/dist/execution-target-BJ5mWjDM.mjs +4 -0
- package/dist/{index-C3ZxLAd0.d.mts → index-COHwWTg_.d.mts} +6 -6
- package/dist/{index-B3YqrgIp.d.mts → index-CzvanLE_.d.mts} +3 -2
- package/dist/index-DCaZeLrI.d.mts +51 -0
- package/dist/{index-dRVpEAr8.d.mts → index-DNyKelMh.d.mts} +5 -5
- package/dist/{index-nzo1sBiK.d.mts → index-DP4Jxoax.d.mts} +7 -7
- package/dist/{index-ByAOGMUM.d.mts → index-R77YR8ak.d.mts} +1 -1
- package/dist/{index-CFpNOmdA.d.mts → index-jUwKDQ34.d.mts} +2 -1
- package/dist/index.d.mts +10 -9
- package/dist/index.mjs +1 -61
- package/dist/oci-C_S_FKHj.mjs +1 -0
- package/dist/sandbox/index.d.mts +2 -0
- package/dist/sandbox/index.mjs +1 -0
- package/dist/sandbox-DeKpyenZ.mjs +1 -0
- package/dist/schemas/index.d.mts +1 -1
- package/dist/schemas/index.mjs +1 -2
- package/dist/schemas-BM6qORw3.mjs +1 -0
- package/dist/spawner-BJesLc8I.mjs +1 -0
- package/dist/structured-output-DEkBQ-1Z.mjs +1 -0
- package/dist/{types-Cb_EXIEe.d.mts → types-COlDAzs5.d.mts} +9 -24
- package/dist/types-CwvWHEpy.mjs +1 -0
- package/dist/util-CGg8cK92.mjs +1 -0
- package/package.json +5 -1
- package/dist/Agent-D8WkUilj.mjs +0 -262
- package/dist/SdkAgent-B47mJiIE.mjs +0 -38
- package/dist/classify-error-pL6jeu4T.mjs +0 -456
- package/dist/container-2UmPZ0CI.mjs +0 -22
- package/dist/container-CHxKIonn.mjs +0 -440
- package/dist/container-D2Z0ITDJ.mjs +0 -22
- package/dist/diff-De8d3MVb.mjs +0 -333
- package/dist/errors-BAmHDQu8.mjs +0 -45
- package/dist/oci-DMZZQZ47.mjs +0 -438
- package/dist/schemas-DwD4pwJB.mjs +0 -96
- package/dist/spawner-Bw9UBEGX.mjs +0 -54
- package/dist/structured-output-BHtr_zpz.mjs +0 -19
- package/dist/types-aNMD8h3x.mjs +0 -19
- package/dist/util-B4RQZkKr.mjs +0 -77
- /package/dist/{events-nxuRbYIu.d.mts → events-D31_b0sA.d.mts} +0 -0
package/dist/diff-De8d3MVb.mjs
DELETED
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
import { t as formatError } from "./util-B4RQZkKr.mjs";
|
|
2
|
-
import { n as ContainerDiffError, o as ContainerNotRunningError, r as ContainerDisposedError } from "./errors-BAmHDQu8.mjs";
|
|
3
|
-
import { createReadStream } from "node:fs";
|
|
4
|
-
import { copyFile, lstat, mkdir, mkdtemp, readdir, readlink, rm, stat, symlink } from "node:fs/promises";
|
|
5
|
-
import { tmpdir } from "node:os";
|
|
6
|
-
import { dirname, isAbsolute, join, posix, relative, sep } from "node:path";
|
|
7
|
-
import { execFile } from "node:child_process";
|
|
8
|
-
import { createHash } from "node:crypto";
|
|
9
|
-
import { promisify } from "node:util";
|
|
10
|
-
import { pipeline } from "node:stream/promises";
|
|
11
|
-
//#region src/core/process/errors.ts
|
|
12
|
-
const isExecFileError = (error) => {
|
|
13
|
-
return error instanceof Error && "code" in error && ("stdout" in error || "stderr" in error);
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region src/core/process/shell.ts
|
|
17
|
-
const shellEscape = (s) => `'${s.replace(/'/g, "'\\''")}'`;
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/container/diff.ts
|
|
20
|
-
const execFileAsync = promisify(execFile);
|
|
21
|
-
const isRelativePath = (value) => {
|
|
22
|
-
return value !== ".." && !value.startsWith(`..${sep}`) && !isAbsolute(value);
|
|
23
|
-
};
|
|
24
|
-
const toPosixRelativePath = (rootDir, absolutePath) => {
|
|
25
|
-
const relativePath = relative(rootDir, absolutePath);
|
|
26
|
-
if (!isRelativePath(relativePath)) return;
|
|
27
|
-
return relativePath.split(sep).join(posix.sep);
|
|
28
|
-
};
|
|
29
|
-
const relativizeGitPath = (absolutePath, beforeDir, afterDir) => {
|
|
30
|
-
const beforePath = toPosixRelativePath(beforeDir, absolutePath);
|
|
31
|
-
if (beforePath !== void 0) return beforePath;
|
|
32
|
-
const afterPath = toPosixRelativePath(afterDir, absolutePath);
|
|
33
|
-
if (afterPath !== void 0) return afterPath;
|
|
34
|
-
throw new ContainerDiffError(`Git diff produced a path outside the materialized trees: ${absolutePath}`);
|
|
35
|
-
};
|
|
36
|
-
const sortFileChanges = (changes) => changes.sort((left, right) => {
|
|
37
|
-
if (left.path === right.path) return (left.previousPath ?? "").localeCompare(right.previousPath ?? "");
|
|
38
|
-
return left.path.localeCompare(right.path);
|
|
39
|
-
});
|
|
40
|
-
const removeGitMetadataDirs = async (rootDir) => {
|
|
41
|
-
const entries = await readdir(rootDir, { withFileTypes: true });
|
|
42
|
-
for (const entry of entries) {
|
|
43
|
-
const fullPath = join(rootDir, entry.name);
|
|
44
|
-
if (entry.name === ".git") {
|
|
45
|
-
await rm(fullPath, {
|
|
46
|
-
recursive: true,
|
|
47
|
-
force: true
|
|
48
|
-
});
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if (entry.isDirectory()) await removeGitMetadataDirs(fullPath);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const createTempTree = () => mkdtemp(join(tmpdir(), "cw-workdir-diff-"));
|
|
55
|
-
const cleanupTempTree = async (path) => {
|
|
56
|
-
if (!path) return;
|
|
57
|
-
await rm(path, {
|
|
58
|
-
recursive: true,
|
|
59
|
-
force: true
|
|
60
|
-
}).catch(() => {});
|
|
61
|
-
};
|
|
62
|
-
const createSnapshot = (meta, snapshotMetadata) => {
|
|
63
|
-
const snapshot = {
|
|
64
|
-
cwd: meta.cwd,
|
|
65
|
-
createdAt: /* @__PURE__ */ new Date()
|
|
66
|
-
};
|
|
67
|
-
snapshotMetadata.set(snapshot, meta);
|
|
68
|
-
return snapshot;
|
|
69
|
-
};
|
|
70
|
-
const getSnapshotMeta = (owner, snapshot, snapshotMetadata) => {
|
|
71
|
-
if (typeof snapshot !== "object" || snapshot === null) throw new ContainerDiffError("Invalid workdir snapshot.");
|
|
72
|
-
const meta = snapshotMetadata.get(snapshot);
|
|
73
|
-
if (!meta) throw new ContainerDiffError("Invalid workdir snapshot.");
|
|
74
|
-
if (meta.owner !== owner) throw new ContainerDiffError("Workdir snapshot was created by a different container instance.");
|
|
75
|
-
return meta;
|
|
76
|
-
};
|
|
77
|
-
const assertSnapshotActive = (snapshot, activeSnapshots) => {
|
|
78
|
-
if (!activeSnapshots.has(snapshot)) throw new ContainerDiffError("Workdir snapshot has been released.");
|
|
79
|
-
};
|
|
80
|
-
const createContentHash = (value) => createHash("sha256").update(value).digest("hex");
|
|
81
|
-
const toBuffer = (value) => Buffer.isBuffer(value) ? value : Buffer.from(value, "utf8");
|
|
82
|
-
const hashFileStream = async (path) => {
|
|
83
|
-
const hash = createHash("sha256");
|
|
84
|
-
await pipeline(createReadStream(path), hash);
|
|
85
|
-
return hash.digest("hex");
|
|
86
|
-
};
|
|
87
|
-
const getFileMetadata = async (rootDir, relativePath, cache) => {
|
|
88
|
-
const cacheKey = `${rootDir}:${relativePath}`;
|
|
89
|
-
if (cache.has(cacheKey)) return cache.get(cacheKey);
|
|
90
|
-
const absolutePath = join(rootDir, ...relativePath.split(posix.sep));
|
|
91
|
-
try {
|
|
92
|
-
const entry = await lstat(absolutePath);
|
|
93
|
-
let hash;
|
|
94
|
-
let size;
|
|
95
|
-
if (entry.isSymbolicLink()) {
|
|
96
|
-
const linkTarget = Buffer.from(await readlink(absolutePath));
|
|
97
|
-
hash = createContentHash(linkTarget);
|
|
98
|
-
size = linkTarget.byteLength;
|
|
99
|
-
} else if (entry.isFile()) {
|
|
100
|
-
hash = await hashFileStream(absolutePath);
|
|
101
|
-
size = entry.size;
|
|
102
|
-
} else throw new ContainerDiffError(`Unsupported filesystem entry in diff metadata: ${absolutePath}`);
|
|
103
|
-
const metadata = {
|
|
104
|
-
hash,
|
|
105
|
-
size
|
|
106
|
-
};
|
|
107
|
-
cache.set(cacheKey, metadata);
|
|
108
|
-
return metadata;
|
|
109
|
-
} catch (error) {
|
|
110
|
-
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
|
111
|
-
cache.set(cacheKey, void 0);
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
throw error;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
const parseGitDiffOutput = (stdout, beforeDir, afterDir) => {
|
|
118
|
-
if (stdout.byteLength === 0) return [];
|
|
119
|
-
const fields = stdout.toString("utf8").split("\0");
|
|
120
|
-
if (fields[fields.length - 1] === "") fields.pop();
|
|
121
|
-
const changes = [];
|
|
122
|
-
for (let index = 0; index < fields.length;) {
|
|
123
|
-
const status = fields[index++];
|
|
124
|
-
if (!status) continue;
|
|
125
|
-
if (status.startsWith("R")) {
|
|
126
|
-
const previousPath = fields[index++];
|
|
127
|
-
const path = fields[index++];
|
|
128
|
-
if (!previousPath || !path) throw new ContainerDiffError("Failed to parse git rename entry.");
|
|
129
|
-
changes.push({
|
|
130
|
-
kind: "renamed",
|
|
131
|
-
previousPath: relativizeGitPath(previousPath, beforeDir, afterDir),
|
|
132
|
-
path: relativizeGitPath(path, beforeDir, afterDir)
|
|
133
|
-
});
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
const path = fields[index++];
|
|
137
|
-
if (!path) throw new ContainerDiffError("Failed to parse git diff entry.");
|
|
138
|
-
switch (status) {
|
|
139
|
-
case "A":
|
|
140
|
-
changes.push({
|
|
141
|
-
kind: "added",
|
|
142
|
-
path: relativizeGitPath(path, beforeDir, afterDir)
|
|
143
|
-
});
|
|
144
|
-
break;
|
|
145
|
-
case "D":
|
|
146
|
-
changes.push({
|
|
147
|
-
kind: "deleted",
|
|
148
|
-
path: relativizeGitPath(path, beforeDir, afterDir)
|
|
149
|
-
});
|
|
150
|
-
break;
|
|
151
|
-
case "M":
|
|
152
|
-
changes.push({
|
|
153
|
-
kind: "modified",
|
|
154
|
-
path: relativizeGitPath(path, beforeDir, afterDir)
|
|
155
|
-
});
|
|
156
|
-
break;
|
|
157
|
-
case "T":
|
|
158
|
-
changes.push({
|
|
159
|
-
kind: "modified",
|
|
160
|
-
path: relativizeGitPath(path, beforeDir, afterDir)
|
|
161
|
-
});
|
|
162
|
-
break;
|
|
163
|
-
default: throw new ContainerDiffError(`Unsupported git diff change kind: ${status}`);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return changes;
|
|
167
|
-
};
|
|
168
|
-
const runGitDiff = async (beforeDir, afterDir) => {
|
|
169
|
-
try {
|
|
170
|
-
return parseGitDiffOutput(toBuffer((await execFileAsync("git", [
|
|
171
|
-
"diff",
|
|
172
|
-
"--no-index",
|
|
173
|
-
"-z",
|
|
174
|
-
"--name-status",
|
|
175
|
-
"-M",
|
|
176
|
-
"--find-renames=100%",
|
|
177
|
-
beforeDir,
|
|
178
|
-
afterDir
|
|
179
|
-
], {
|
|
180
|
-
cwd: tmpdir(),
|
|
181
|
-
encoding: "buffer",
|
|
182
|
-
maxBuffer: 50 * 1024 * 1024
|
|
183
|
-
})).stdout), beforeDir, afterDir);
|
|
184
|
-
} catch (error) {
|
|
185
|
-
if (!isExecFileError(error)) throw new ContainerDiffError(`Failed to run git diff: ${formatError(error)}`);
|
|
186
|
-
const code = error.code ?? 1;
|
|
187
|
-
const stdout = Buffer.isBuffer(error.stdout) ? error.stdout : Buffer.from(String(error.stdout ?? ""), "utf8");
|
|
188
|
-
const stderr = Buffer.isBuffer(error.stderr) ? error.stderr : Buffer.from(String(error.stderr ?? ""), "utf8");
|
|
189
|
-
if (code === 0 || code === 1) return parseGitDiffOutput(stdout, beforeDir, afterDir);
|
|
190
|
-
throw new ContainerDiffError(`Failed to run git diff: ${stderr.toString("utf8").trim() || stdout.toString("utf8").trim() || `exit code ${code}`}`);
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
const enrichFileChanges = async (changes, beforeDir, afterDir) => {
|
|
194
|
-
const metadataCache = /* @__PURE__ */ new Map();
|
|
195
|
-
return sortFileChanges(await Promise.all(changes.map(async (change) => {
|
|
196
|
-
let beforePath;
|
|
197
|
-
if (change.kind === "added") beforePath = void 0;
|
|
198
|
-
else if (change.kind === "renamed") beforePath = change.previousPath;
|
|
199
|
-
else beforePath = change.path;
|
|
200
|
-
const afterPath = change.kind === "deleted" ? void 0 : change.path;
|
|
201
|
-
const [beforeMetadata, afterMetadata] = await Promise.all([beforePath === void 0 ? void 0 : getFileMetadata(beforeDir, beforePath, metadataCache), afterPath === void 0 ? void 0 : getFileMetadata(afterDir, afterPath, metadataCache)]);
|
|
202
|
-
return {
|
|
203
|
-
path: change.path,
|
|
204
|
-
previousPath: change.previousPath,
|
|
205
|
-
kind: change.kind,
|
|
206
|
-
beforeHash: beforeMetadata?.hash,
|
|
207
|
-
afterHash: afterMetadata?.hash,
|
|
208
|
-
beforeSize: beforeMetadata?.size,
|
|
209
|
-
afterSize: afterMetadata?.size
|
|
210
|
-
};
|
|
211
|
-
})));
|
|
212
|
-
};
|
|
213
|
-
const buildChangedFiles = (fileChanges) => {
|
|
214
|
-
const changedFiles = /* @__PURE__ */ new Set();
|
|
215
|
-
for (const change of fileChanges) {
|
|
216
|
-
changedFiles.add(change.path);
|
|
217
|
-
if (change.kind === "renamed" && change.previousPath) changedFiles.add(change.previousPath);
|
|
218
|
-
}
|
|
219
|
-
return [...changedFiles].sort((left, right) => left.localeCompare(right));
|
|
220
|
-
};
|
|
221
|
-
const wrapMaterializeError = (action, error) => {
|
|
222
|
-
if (error instanceof ContainerDiffError || error instanceof ContainerDisposedError || error instanceof ContainerNotRunningError) throw error;
|
|
223
|
-
throw new ContainerDiffError(`${action}: ${formatError(error)}`);
|
|
224
|
-
};
|
|
225
|
-
const copyLocalDirectoryContents = async (sourceDir, targetDir) => {
|
|
226
|
-
if (!(await stat(sourceDir)).isDirectory()) throw new ContainerDiffError(`Target path is not a directory: ${sourceDir}`);
|
|
227
|
-
await mkdir(targetDir, { recursive: true });
|
|
228
|
-
const entries = await readdir(sourceDir, { withFileTypes: true });
|
|
229
|
-
await Promise.all(entries.filter((entry) => entry.name !== ".git").map(async (entry) => {
|
|
230
|
-
const sourcePath = join(sourceDir, entry.name);
|
|
231
|
-
const targetPath = join(targetDir, entry.name);
|
|
232
|
-
if (entry.isDirectory()) {
|
|
233
|
-
await copyLocalDirectoryContents(sourcePath, targetPath);
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (entry.isSymbolicLink()) {
|
|
237
|
-
await mkdir(dirname(targetPath), { recursive: true });
|
|
238
|
-
await symlink(await readlink(sourcePath), targetPath);
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
if (entry.isFile()) {
|
|
242
|
-
await mkdir(dirname(targetPath), { recursive: true });
|
|
243
|
-
await copyFile(sourcePath, targetPath);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
throw new ContainerDiffError(`Unsupported filesystem entry in workdir diff: ${sourcePath}`);
|
|
247
|
-
}));
|
|
248
|
-
};
|
|
249
|
-
const createWorkdirDiffApi = (options) => {
|
|
250
|
-
const activeSnapshots = /* @__PURE__ */ new Set();
|
|
251
|
-
const snapshotMetadata = /* @__PURE__ */ new WeakMap();
|
|
252
|
-
const snapshotWorkdir = async (snapshotOptions = {}) => {
|
|
253
|
-
const cwd = snapshotOptions.cwd ?? options.workdir;
|
|
254
|
-
let tempDir;
|
|
255
|
-
try {
|
|
256
|
-
tempDir = await createTempTree();
|
|
257
|
-
await options.materialize(cwd, tempDir);
|
|
258
|
-
await removeGitMetadataDirs(tempDir);
|
|
259
|
-
const snapshotMeta = {
|
|
260
|
-
owner: options.owner,
|
|
261
|
-
tempDir,
|
|
262
|
-
cwd,
|
|
263
|
-
inFlightDiffs: 0,
|
|
264
|
-
released: false
|
|
265
|
-
};
|
|
266
|
-
activeSnapshots.add(snapshotMeta);
|
|
267
|
-
tempDir = void 0;
|
|
268
|
-
return createSnapshot(snapshotMeta, snapshotMetadata);
|
|
269
|
-
} catch (error) {
|
|
270
|
-
await cleanupTempTree(tempDir);
|
|
271
|
-
return wrapMaterializeError("Failed to materialize workdir snapshot", error);
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
const diffWorkdir = async (snapshot) => {
|
|
275
|
-
const startedAt = Date.now();
|
|
276
|
-
const snapshotMeta = getSnapshotMeta(options.owner, snapshot, snapshotMetadata);
|
|
277
|
-
assertSnapshotActive(snapshotMeta, activeSnapshots);
|
|
278
|
-
snapshotMeta.inFlightDiffs++;
|
|
279
|
-
let currentTempDir;
|
|
280
|
-
try {
|
|
281
|
-
currentTempDir = await createTempTree();
|
|
282
|
-
await options.materialize(snapshotMeta.cwd, currentTempDir);
|
|
283
|
-
await removeGitMetadataDirs(currentTempDir);
|
|
284
|
-
const fileChanges = await enrichFileChanges(await runGitDiff(snapshotMeta.tempDir, currentTempDir), snapshotMeta.tempDir, currentTempDir);
|
|
285
|
-
const changedFiles = buildChangedFiles(fileChanges);
|
|
286
|
-
return {
|
|
287
|
-
cwd: snapshotMeta.cwd,
|
|
288
|
-
changedFiles,
|
|
289
|
-
fileChanges,
|
|
290
|
-
stats: {
|
|
291
|
-
durationMs: Date.now() - startedAt,
|
|
292
|
-
filesCompared: changedFiles.length
|
|
293
|
-
}
|
|
294
|
-
};
|
|
295
|
-
} catch (error) {
|
|
296
|
-
return wrapMaterializeError("Failed to diff workdir snapshot", error);
|
|
297
|
-
} finally {
|
|
298
|
-
snapshotMeta.inFlightDiffs--;
|
|
299
|
-
if (snapshotMeta.inFlightDiffs === 0) {
|
|
300
|
-
snapshotMeta.resolveIdle?.();
|
|
301
|
-
snapshotMeta.resolveIdle = void 0;
|
|
302
|
-
}
|
|
303
|
-
await cleanupTempTree(currentTempDir);
|
|
304
|
-
}
|
|
305
|
-
};
|
|
306
|
-
const releaseSnapshot = (snapshotMeta) => {
|
|
307
|
-
const meta = snapshotMeta;
|
|
308
|
-
if (meta.releasePromise) return meta.releasePromise;
|
|
309
|
-
meta.released = true;
|
|
310
|
-
activeSnapshots.delete(meta);
|
|
311
|
-
meta.releasePromise = (async () => {
|
|
312
|
-
if (meta.inFlightDiffs > 0) await new Promise((resolve) => {
|
|
313
|
-
meta.resolveIdle = resolve;
|
|
314
|
-
});
|
|
315
|
-
await cleanupTempTree(meta.tempDir);
|
|
316
|
-
})();
|
|
317
|
-
return meta.releasePromise;
|
|
318
|
-
};
|
|
319
|
-
const releaseWorkdirSnapshot = async (snapshot) => {
|
|
320
|
-
await releaseSnapshot(getSnapshotMeta(options.owner, snapshot, snapshotMetadata));
|
|
321
|
-
};
|
|
322
|
-
const disposeSnapshots = async () => {
|
|
323
|
-
await Promise.all(Array.from(activeSnapshots).map(releaseSnapshot));
|
|
324
|
-
};
|
|
325
|
-
return {
|
|
326
|
-
snapshotWorkdir,
|
|
327
|
-
diffWorkdir,
|
|
328
|
-
releaseWorkdirSnapshot,
|
|
329
|
-
disposeSnapshots
|
|
330
|
-
};
|
|
331
|
-
};
|
|
332
|
-
//#endregion
|
|
333
|
-
export { isExecFileError as i, createWorkdirDiffApi as n, shellEscape as r, copyLocalDirectoryContents as t };
|
package/dist/errors-BAmHDQu8.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
//#region src/container/errors.ts
|
|
2
|
-
var ContainerError = class extends Error {
|
|
3
|
-
constructor(message) {
|
|
4
|
-
super(message);
|
|
5
|
-
this.name = "ContainerError";
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
var ContainerCreateError = class extends ContainerError {
|
|
9
|
-
constructor(message) {
|
|
10
|
-
super(message);
|
|
11
|
-
this.name = "ContainerCreateError";
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var ContainerStartError = class extends ContainerError {
|
|
15
|
-
constructor(message) {
|
|
16
|
-
super(message);
|
|
17
|
-
this.name = "ContainerStartError";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
var ContainerExecError = class extends ContainerError {
|
|
21
|
-
constructor(message) {
|
|
22
|
-
super(message);
|
|
23
|
-
this.name = "ContainerExecError";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var ContainerNotRunningError = class extends ContainerError {
|
|
27
|
-
constructor(message = "Container is not running.") {
|
|
28
|
-
super(message);
|
|
29
|
-
this.name = "ContainerNotRunningError";
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
var ContainerDisposedError = class extends ContainerError {
|
|
33
|
-
constructor(message = "Container has been disposed.") {
|
|
34
|
-
super(message);
|
|
35
|
-
this.name = "ContainerDisposedError";
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var ContainerDiffError = class extends ContainerError {
|
|
39
|
-
constructor(message) {
|
|
40
|
-
super(message);
|
|
41
|
-
this.name = "ContainerDiffError";
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
//#endregion
|
|
45
|
-
export { ContainerExecError as a, ContainerError as i, ContainerDiffError as n, ContainerNotRunningError as o, ContainerDisposedError as r, ContainerStartError as s, ContainerCreateError as t };
|