datagrok-tools 6.0.6 → 6.0.7
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.
|
@@ -29,19 +29,18 @@ else
|
|
|
29
29
|
else
|
|
30
30
|
BRANCH=$(resolve_branch "${DG_VERSION:-latest}")
|
|
31
31
|
fi
|
|
32
|
-
# Sparse checkout
|
|
33
|
-
#
|
|
34
|
-
# blobs
|
|
32
|
+
# Sparse checkout (cone mode) with partial clone: only fetch js-api, libraries, and
|
|
33
|
+
# ApiSamples. Cone mode integrates with --filter=blob:none so the server only sends
|
|
34
|
+
# blobs for the included directories (~3 MB vs 1.67 GB for the full tree).
|
|
35
35
|
sparse_clone() {
|
|
36
36
|
local branch="$1"
|
|
37
37
|
# Use init+fetch instead of clone to handle pre-existing directories (e.g. mount points)
|
|
38
38
|
git init "$PUBLIC_DIR" \
|
|
39
39
|
&& git -C "$PUBLIC_DIR" remote add origin "$REPO" \
|
|
40
|
-
&& git -C "$PUBLIC_DIR"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
&& git -C "$PUBLIC_DIR" fetch --depth 1 origin "$branch" \
|
|
40
|
+
&& git -C "$PUBLIC_DIR" config remote.origin.promisor true \
|
|
41
|
+
&& git -C "$PUBLIC_DIR" config remote.origin.partialclonefilter blob:none \
|
|
42
|
+
&& git -C "$PUBLIC_DIR" sparse-checkout set --cone js-api libraries packages/ApiSamples \
|
|
43
|
+
&& git -C "$PUBLIC_DIR" fetch --depth 1 --filter=blob:none origin "$branch" \
|
|
45
44
|
&& git -C "$PUBLIC_DIR" checkout -B "$branch" FETCH_HEAD
|
|
46
45
|
}
|
|
47
46
|
# Clear directory contents without removing the dir itself (may be a mount point)
|
package/bin/commands/claude.js
CHANGED
|
@@ -349,12 +349,18 @@ function writeProjectFiles(taskKey, args, worktreeRoot, dgPort) {
|
|
|
349
349
|
// Bind-mount local entrypoint so fixes take effect without rebuilding the image
|
|
350
350
|
if (hasLocalEntrypoint) volumes.push(` - "${toDockerPath(entrypointPath)}:/usr/local/bin/entrypoint.sh"`);
|
|
351
351
|
|
|
352
|
-
// Claude profile
|
|
352
|
+
// Claude profile: mount only credential/settings files, not the whole directory.
|
|
353
|
+
// Mounting ~/.claude entirely makes subdirs (session-env/, sessions/) unwritable by the
|
|
354
|
+
// container's node user due to host filesystem permission mapping.
|
|
353
355
|
const claudeHome = findClaudeHome();
|
|
354
356
|
if (claudeHome) {
|
|
355
|
-
|
|
357
|
+
const claudeFiles = ['.credentials.json', 'settings.json', 'settings.local.json'];
|
|
358
|
+
for (const file of claudeFiles) {
|
|
359
|
+
const filePath = _path.default.join(claudeHome, file);
|
|
360
|
+
if (_fs.default.existsSync(filePath) && _fs.default.statSync(filePath).isFile()) volumes.push(` - "${toDockerPath(filePath)}:/home/node/.claude/${file}:ro"`);
|
|
361
|
+
}
|
|
356
362
|
const claudeState = _path.default.join(_path.default.dirname(claudeHome), '.claude.json');
|
|
357
|
-
if (_fs.default.existsSync(claudeState) && _fs.default.statSync(claudeState).isFile()) volumes.push(` - "${toDockerPath(claudeState)}:/home/node/.claude.json"`);
|
|
363
|
+
if (_fs.default.existsSync(claudeState) && _fs.default.statSync(claudeState).isFile()) volumes.push(` - "${toDockerPath(claudeState)}:/home/node/.claude.json:ro"`);
|
|
358
364
|
color.info(`Claude profile: ${claudeHome}`);
|
|
359
365
|
} else color.warn('No Claude profile found. Set CLAUDE_HOME or run "claude" locally to log in.');
|
|
360
366
|
const overridePath = _path.default.join(projectDir, 'docker-compose.override.yaml');
|
package/package.json
CHANGED