replit-tools 1.1.5 → 1.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replit-tools",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "DATA Tools - One command to set up Claude Code and Codex CLI on Replit with full persistence",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -73,7 +73,8 @@ auto_update_scripts() {
73
73
  return 1
74
74
  }
75
75
 
76
- if [[ $- == *i* ]]; then
76
+ # Skip update check if we just re-sourced after an update
77
+ if [[ $- == *i* ]] && [ -z "${_REPLIT_TOOLS_UPDATED}" ]; then
77
78
  CURRENT_VERSION=""
78
79
  if [ -f "${VERSION_FILE}" ]; then
79
80
  CURRENT_VERSION=$(cat "${VERSION_FILE}" 2>/dev/null)
@@ -89,6 +90,11 @@ if [[ $- == *i* ]]; then
89
90
 
90
91
  if auto_update_scripts "${LATEST_VERSION}"; then
91
92
  echo " ✅ Updated to v${LATEST_VERSION}"
93
+ # Re-source the updated script so new code runs
94
+ export _REPLIT_TOOLS_UPDATED=1
95
+ source "${SCRIPTS_DIR}/setup-claude-code.sh"
96
+ unset _REPLIT_TOOLS_UPDATED
97
+ return 0 2>/dev/null || exit 0
92
98
  else
93
99
  echo " ⚠️ Auto-update failed, continuing with v${CURRENT_VERSION}"
94
100
  fi
@@ -96,6 +102,11 @@ if [[ $- == *i* ]]; then
96
102
  echo "📦 DATA Tools v${CURRENT_VERSION}"
97
103
  fi
98
104
  fi
105
+ elif [[ $- == *i* ]] && [ -n "${_REPLIT_TOOLS_UPDATED}" ]; then
106
+ # Show version after re-source
107
+ if [ -f "${VERSION_FILE}" ]; then
108
+ echo "📦 DATA Tools v$(cat "${VERSION_FILE}" 2>/dev/null)"
109
+ fi
99
110
  fi
100
111
 
101
112
  # =============================================================================