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
- git clone --depth 1 --branch "$branch" --filter=blob:none --no-checkout "$REPO" "$PUBLIC_DIR" \
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/**' '/packages/**' '!help/uploads/**' \
41
- && git -C "$PUBLIC_DIR" checkout
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' not found, falling back to master."
46
- rm -rf "$PUBLIC_DIR"
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
@@ -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:
@@ -7,7 +7,7 @@
7
7
  "datagrok-api": "^1.26.0",
8
8
  "cash-dom": "^8.1.5",
9
9
  "dayjs": "^1.11.13",
10
- "@datagrok-libraries/utils": "^4.6.5"
10
+ "@datagrok-libraries/test": "^1.1.0"
11
11
  },
12
12
  "devDependencies": {
13
13
  "datagrok-tools": "^5.1.5",
@@ -1,4 +1,4 @@
1
- import { runTests, tests, TestContext , initAutoTests as initTests } from '@datagrok-libraries/utils/src/test';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "6.0.3",
3
+ "version": "6.0.4",
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": {