@unlaxer/dve-toolkit 4.1.0

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.
package/update.sh ADDED
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # DVE toolkit updater
5
+ # Updates kit, rebuilds, syncs skills
6
+
7
+ REAL_PATH="$(readlink -f "$0" 2>/dev/null || realpath "$0" 2>/dev/null || echo "$0")"
8
+ SCRIPT_DIR="$(cd "$(dirname "${REAL_PATH}")" && pwd)"
9
+ TARGET_DIR="${1:-.}"
10
+
11
+ SRC="${SCRIPT_DIR}"
12
+ SRC_VERSION="$(cat "${SRC}/version.txt" 2>/dev/null || echo "unknown")"
13
+ LOCAL_VERSION="$(cat "${TARGET_DIR}/dve/kit/version.txt" 2>/dev/null || echo "unknown")"
14
+
15
+ echo "DVE toolkit — update"
16
+ echo ""
17
+ echo " Local: ${LOCAL_VERSION}"
18
+ echo " Source: ${SRC_VERSION}"
19
+ echo ""
20
+
21
+ if [ "${SRC_VERSION}" = "${LOCAL_VERSION}" ]; then
22
+ echo "Already up to date."
23
+ exit 0
24
+ fi
25
+
26
+ UPDATED=0
27
+
28
+ # Check skills
29
+ SKILLS_DIR="${TARGET_DIR}/.claude/skills"
30
+ if [ -d "${SRC}/skills" ]; then
31
+ for SKILL in "${SRC}/skills/"*.md; do
32
+ [ -f "${SKILL}" ] || continue
33
+ FNAME="$(basename "${SKILL}")"
34
+ if [ ! -f "${SKILLS_DIR}/${FNAME}" ]; then
35
+ echo " [new] .claude/skills/${FNAME}"
36
+ UPDATED=$((UPDATED + 1))
37
+ elif ! diff -q "${SKILL}" "${SKILLS_DIR}/${FNAME}" > /dev/null 2>&1; then
38
+ echo " [skip] .claude/skills/${FNAME} ← customized"
39
+ fi
40
+ done
41
+ fi
42
+
43
+ if [ "${UPDATED}" -eq 0 ]; then
44
+ echo "No new files. Rebuilding kit..."
45
+ fi
46
+
47
+ # Recompile
48
+ if [ -f "${SRC}/tsconfig.json" ]; then
49
+ echo " Compiling kit..."
50
+ (cd "${SRC}" && npx tsc 2>/dev/null || true)
51
+ fi
52
+
53
+ # Copy new skills
54
+ if [ -d "${SRC}/skills" ]; then
55
+ mkdir -p "${SKILLS_DIR}"
56
+ for SKILL in "${SRC}/skills/"*.md; do
57
+ [ -f "${SKILL}" ] || continue
58
+ FNAME="$(basename "${SKILL}")"
59
+ if [ ! -f "${SKILLS_DIR}/${FNAME}" ]; then
60
+ cp "${SKILL}" "${SKILLS_DIR}/${FNAME}"
61
+ echo " Added: .claude/skills/${FNAME}"
62
+ fi
63
+ done
64
+ fi
65
+
66
+ # Rebuild graph
67
+ if [ -f "${SRC}/dist/cli/dve-tool.js" ]; then
68
+ echo " Rebuilding graph.json..."
69
+ (cd "${TARGET_DIR}" && node "${SRC}/dist/cli/dve-tool.js" build 2>/dev/null || true)
70
+ fi
71
+
72
+ echo ""
73
+ echo "Updated to v${SRC_VERSION}."
package/version.txt ADDED
@@ -0,0 +1 @@
1
+ 4.1.0