datagrok-tools 6.0.3 → 6.0.4
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.
|
@@ -33,17 +33,24 @@ else
|
|
|
33
33
|
# plus root files (CLAUDE.md, .claude/, etc.). Much faster than a full clone.
|
|
34
34
|
sparse_clone() {
|
|
35
35
|
local branch="$1"
|
|
36
|
-
|
|
36
|
+
# Use init+fetch instead of clone to handle pre-existing directories (e.g. mount points)
|
|
37
|
+
git init "$PUBLIC_DIR" \
|
|
38
|
+
&& git -C "$PUBLIC_DIR" remote add origin "$REPO" \
|
|
37
39
|
&& git -C "$PUBLIC_DIR" sparse-checkout set --no-cone \
|
|
38
40
|
'/*' '!connectors/' '!docker/' '!docusaurus/' '!docusaurus-static/' \
|
|
39
41
|
'!environments/' '!hooks/' '!misc/' 'python-api/' '!datagrok-celery-task/' \
|
|
40
|
-
'/js-api/**' '/libraries/**' '/help
|
|
41
|
-
&& git -C "$PUBLIC_DIR"
|
|
42
|
+
'/js-api/**' '/libraries/**' '/help/**/*.md*' '/packages/**' '!help/uploads/**' \
|
|
43
|
+
&& git -C "$PUBLIC_DIR" fetch --depth 1 --filter=blob:none origin "$branch" \
|
|
44
|
+
&& git -C "$PUBLIC_DIR" checkout -B "$branch" FETCH_HEAD
|
|
45
|
+
}
|
|
46
|
+
# Clear directory contents without removing the dir itself (may be a mount point)
|
|
47
|
+
clear_dir() {
|
|
48
|
+
find "$1" -mindepth 1 -delete 2>/dev/null || rm -rf "$1"/* "$1"/.[!.]* 2>/dev/null || true
|
|
42
49
|
}
|
|
43
50
|
echo "[tools-dev] Cloning public repo ($BRANCH, sparse) into $PUBLIC_DIR..."
|
|
44
51
|
sparse_clone "$BRANCH" \
|
|
45
|
-
|| { echo "[tools-dev] Branch '$BRANCH'
|
|
46
|
-
|
|
52
|
+
|| { echo "[tools-dev] Branch '$BRANCH' clone failed, falling back to master."
|
|
53
|
+
clear_dir "$PUBLIC_DIR"
|
|
47
54
|
sparse_clone "master"; }
|
|
48
55
|
echo "[tools-dev] Public repo ready at $PUBLIC_DIR (branch: $(git -C "$PUBLIC_DIR" branch --show-current))."
|
|
49
56
|
fi
|
package/bin/commands/claude.js
CHANGED
|
@@ -243,7 +243,6 @@ services:
|
|
|
243
243
|
- \${WORKTREE_PATH:-.}:/workspace/repo
|
|
244
244
|
- \${DOCKER_SOCK}:/var/run/docker.sock
|
|
245
245
|
- npm_cache:/home/node/.npm
|
|
246
|
-
- public_repo:/workspace/datagrok
|
|
247
246
|
environment:
|
|
248
247
|
ANTHROPIC_API_KEY: \${ANTHROPIC_API_KEY:-}
|
|
249
248
|
DG_VERSION: \${DG_VERSION:-latest}
|
|
@@ -272,7 +271,6 @@ volumes:
|
|
|
272
271
|
demo_test:
|
|
273
272
|
demo_northwind:
|
|
274
273
|
npm_cache:
|
|
275
|
-
public_repo:
|
|
276
274
|
|
|
277
275
|
networks:
|
|
278
276
|
dg:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runTests, tests, TestContext , initAutoTests as initTests } from '@datagrok-libraries/
|
|
1
|
+
import { runTests, tests, TestContext , initAutoTests as initTests } from '@datagrok-libraries/test/src/test';
|
|
2
2
|
import * as DG from 'datagrok-api/dg';
|
|
3
3
|
|
|
4
4
|
export let _package = new DG.Package();
|
package/package.json
CHANGED