datagrok-tools 6.0.5 → 6.0.6

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,8 +29,9 @@ else
29
29
  else
30
30
  BRANCH=$(resolve_branch "${DG_VERSION:-latest}")
31
31
  fi
32
- # Sparse checkout: only fetch dirs needed for package context (js-api, libraries, help, packages)
33
- # plus root files (CLAUDE.md, .claude/, etc.). Much faster than a full clone.
32
+ # Sparse checkout: only fetch dirs needed for package context (js-api, libraries, packages)
33
+ # plus root files (CLAUDE.md, .claude/, etc.). Uses --depth 1 without blob filter so all
34
+ # blobs arrive in one pack — avoids slow on-demand fetching during checkout.
34
35
  sparse_clone() {
35
36
  local branch="$1"
36
37
  # Use init+fetch instead of clone to handle pre-existing directories (e.g. mount points)
@@ -40,7 +41,7 @@ else
40
41
  '/*' '!connectors/' '!docker/' '!docusaurus/' '!docusaurus-static/' \
41
42
  '!environments/' '!hooks/' '!misc/' 'python-api/' '!datagrok-celery-task/' \
42
43
  '/js-api/**' '/libraries/**' '/packages/**' \
43
- && git -C "$PUBLIC_DIR" fetch --depth 1 --filter=blob:none origin "$branch" \
44
+ && git -C "$PUBLIC_DIR" fetch --depth 1 origin "$branch" \
44
45
  && git -C "$PUBLIC_DIR" checkout -B "$branch" FETCH_HEAD
45
46
  }
46
47
  # Clear directory contents without removing the dir itself (may be a mount point)
@@ -333,6 +333,11 @@ function writeProjectFiles(taskKey, args, worktreeRoot, dgPort) {
333
333
  // Resolve Docker socket path
334
334
  const dockerSock = process.platform === 'win32' ? '//var/run/docker.sock' : '/var/run/docker.sock';
335
335
 
336
+ // Resolve entrypoint.sh path — bind-mount from repo so fixes take effect without image rebuild
337
+ const entrypointPath = _path.default.resolve(__dirname, '..', '..', '.devcontainer', 'entrypoint.sh');
338
+ const hasLocalEntrypoint = _fs.default.existsSync(entrypointPath);
339
+ if (!hasLocalEntrypoint) color.warn('Local entrypoint.sh not found — using image built-in.');
340
+
336
341
  // Generate .env — all paths use forward slashes for Docker compatibility
337
342
  const envLines = [`WORKTREE_PATH=${toDockerPath(worktreeRoot)}`, `DG_PORT=${dgPort}`, `TASK_KEY=${taskKey.toLowerCase()}`, `DOCKER_SOCK=${dockerSock}`, `DATAGROK_VERSION=${args.version || 'latest'}`, `DG_VERSION=${args.version || 'latest'}`, `GROK_CONNECT_VERSION=${args['grok-connect-version'] || 'latest'}`, `GROK_SPAWNER_VERSION=${args['grok-spawner-version'] || 'latest'}`, `JKG_VERSION=${args['jkg-version'] || 'latest'}`, `TOOLS_DEV_VERSION=${args['tools-dev-version'] || 'latest'}`, `FOLDER_NAME=${_path.default.basename(worktreeRoot)}`];
338
343
  for (const env of ['ANTHROPIC_API_KEY', 'DG_PUBLIC_BRANCH', 'JIRA_URL', 'JIRA_USERNAME', 'JIRA_TOKEN', 'GITHUB_TOKEN']) if (process.env[env]) envLines.push(`${env}=${process.env[env]}`);
@@ -341,6 +346,9 @@ function writeProjectFiles(taskKey, args, worktreeRoot, dgPort) {
341
346
  // Write host config compose override (mirrors deploy/fat_dev/dg-claude approach)
342
347
  const volumes = [];
343
348
 
349
+ // Bind-mount local entrypoint so fixes take effect without rebuilding the image
350
+ if (hasLocalEntrypoint) volumes.push(` - "${toDockerPath(entrypointPath)}:/usr/local/bin/entrypoint.sh"`);
351
+
344
352
  // Claude profile (~/.claude + ~/.claude.json)
345
353
  const claudeHome = findClaudeHome();
346
354
  if (claudeHome) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "6.0.5",
3
+ "version": "6.0.6",
4
4
  "description": "Utility to upload and publish packages to Datagrok",
5
5
  "homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
6
6
  "dependencies": {