@sablier/devkit 1.2.3 → 1.2.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.
Files changed (2) hide show
  1. package/just/tsv.just +42 -36
  2. package/package.json +1 -1
package/just/tsv.just CHANGED
@@ -7,7 +7,7 @@ import "./settings.just"
7
7
  # Check TSV files using qsv: https://github.com/dathere/qsv
8
8
  [group("checks")]
9
9
  [script]
10
- _tsv-check globs="data/*/*.tsv" schema="":
10
+ _tsv-check globs="data/*/*.tsv" schema="" ignore="*.tsv.invalid|*.tsv.valid|*validation-errors.tsv":
11
11
  if ! command -v qsv >/dev/null 2>&1; then
12
12
  echo "✗ qsv CLI not found"
13
13
  echo "Install it: https://github.com/dathere/qsv"
@@ -19,7 +19,7 @@ _tsv-check globs="data/*/*.tsv" schema="":
19
19
  for file in {{ globs }}; do
20
20
  # Skip validation artifact files
21
21
  case "$file" in
22
- *.tsv.invalid|*.tsv.valid|*validation-errors.tsv)
22
+ {{ ignore }})
23
23
  continue
24
24
  ;;
25
25
  esac
@@ -31,40 +31,7 @@ _tsv-check globs="data/*/*.tsv" schema="":
31
31
  schema_arg="{{ schema }}"
32
32
  if ! qsv validate "$file" ${schema_arg:+"$schema_arg"} > /dev/null 2>&1; then
33
33
  echo "❌ Validation failed for: $file"
34
- error_file="$file.validation-errors.tsv"
35
-
36
- if [ -f "$error_file" ]; then
37
- # Try to count total errors (subtract 1 for header row)
38
- total_errors=$(qsv count "$error_file" 2>/dev/null || echo "0")
39
- if [ "$total_errors" != "0" ]; then
40
- total_errors=$((total_errors - 1))
41
- fi
42
-
43
- echo ""
44
- if [ "$total_errors" != "0" ] && [ "$total_errors" -gt 0 ]; then
45
- echo "First 20 validation errors (${total_errors} total):"
46
- else
47
- echo "Validation errors:"
48
- fi
49
- echo ""
50
-
51
- # Try to use qsv table for nice formatting, fall back to basic display
52
- if qsv slice --start 0 --len 21 "$error_file" 2>/dev/null | qsv table 2>/dev/null; then
53
- : # Success, output already shown
54
- else
55
- head -n 21 "$error_file"
56
- fi
57
-
58
- if [ "$total_errors" != "0" ] && [ "$total_errors" -gt 20 ]; then
59
- echo ""
60
- echo "... and $((total_errors - 20)) more errors"
61
- fi
62
- echo ""
63
- echo "Full details: $error_file"
64
- else
65
- echo "Error file not found: $error_file"
66
- fi
67
-
34
+ just _tsv-show-errors "$file"
68
35
  exit 1
69
36
  fi
70
37
  done
@@ -74,3 +41,42 @@ _tsv-check globs="data/*/*.tsv" schema="":
74
41
  else
75
42
  echo "✅ All TSV files are valid"
76
43
  fi
44
+
45
+ # Show validation errors for a TSV file
46
+ [group("checks")]
47
+ [script]
48
+ _tsv-show-errors file:
49
+ error_file="{{ file }}.validation-errors.tsv"
50
+
51
+ if [ ! -f "$error_file" ]; then
52
+ echo "Error file not found: $error_file"
53
+ exit 0
54
+ fi
55
+
56
+ # Try to count total errors (subtract 1 for header row)
57
+ total_errors=$(qsv count "$error_file" 2>/dev/null || echo "0")
58
+ if [ "$total_errors" != "0" ]; then
59
+ total_errors=$((total_errors - 1))
60
+ fi
61
+
62
+ echo ""
63
+ if [ "$total_errors" != "0" ] && [ "$total_errors" -gt 0 ]; then
64
+ echo "First 20 validation errors (${total_errors} total):"
65
+ else
66
+ echo "Validation errors:"
67
+ fi
68
+ echo ""
69
+
70
+ # Try to use qsv table for nice formatting, fall back to basic display
71
+ if qsv slice --start 0 --len 21 "$error_file" 2>/dev/null | qsv table 2>/dev/null; then
72
+ : # Success, output already shown
73
+ else
74
+ head -n 21 "$error_file"
75
+ fi
76
+
77
+ if [ "$total_errors" != "0" ] && [ "$total_errors" -gt 20 ]; then
78
+ echo ""
79
+ echo "... and $((total_errors - 20)) more errors"
80
+ fi
81
+ echo ""
82
+ echo "Full details: $error_file"
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Configuration files and reusable scripts for Sablier repositories",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "1.2.3",
6
+ "version": "1.2.4",
7
7
  "author": {
8
8
  "name": "Sablier Labs Ltd",
9
9
  "url": "https://sablier.com"