futrou 2.0.4 → 2.0.7

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/install.ps1 CHANGED
@@ -83,10 +83,12 @@ if ($CurrentVersion -and $Version -ne "latest") {
83
83
 
84
84
  $DisplayVersion = if ($Version -eq "latest") { "latest" } else { $Version.TrimStart('v') }
85
85
 
86
+ $DisplayVersionLabel = if ($Version -eq "latest") { "latest" } else { "v$DisplayVersion" }
87
+
86
88
  if ($CurrentVersion) {
87
- Write-Info "$Action Futrou CLI v$CurrentVersion → v$DisplayVersion"
89
+ Write-Info "$Action Futrou CLI v$CurrentVersion → $DisplayVersionLabel"
88
90
  } else {
89
- Write-Info "Installing Futrou CLI v$DisplayVersion"
91
+ Write-Info "Installing Futrou CLI $DisplayVersionLabel"
90
92
  }
91
93
 
92
94
  # ---------------------------------------------------------------------------
@@ -182,5 +184,10 @@ if (-not $NoPathUpdate) {
182
184
  }
183
185
  }
184
186
 
187
+ # Make futrou available in the current session without restarting
188
+ if ($env:PATH -notlike "*$BinDir*") {
189
+ $env:PATH = "$BinDir;$env:PATH"
190
+ }
191
+
185
192
  Write-Output ""
186
- Write-Output "To get started, restart your terminal, then run: futrou --help"
193
+ Write-Output "To get started, run: futrou --help"
package/install.sh CHANGED
@@ -4,7 +4,7 @@ set -euo pipefail
4
4
  # On Windows under Git Bash / MINGW, delegate to PowerShell
5
5
  if [[ ${OS:-} = Windows_NT ]]; then
6
6
  if [[ ${MSYSTEM:-} != MINGW64* ]]; then
7
- powershell -c "irm https://raw.githubusercontent.com/futrou/futrou-cli/main/install.ps1 | iex"
7
+ powershell -c "irm https://futrou.com/install.ps1 | iex"
8
8
  exit $?
9
9
  fi
10
10
  fi
@@ -131,28 +131,39 @@ elif [[ -n "$current_version" ]]; then
131
131
  fi
132
132
 
133
133
  display_version="${version#v}"
134
- [[ $version == "latest" ]] && display_version="latest"
135
134
 
136
135
  if [[ -n "$current_version" ]]; then
137
- info "$action Futrou CLI v$current_version → v$display_version"
136
+ if [[ $version == "latest" ]]; then
137
+ info "$action Futrou CLI v$current_version → latest"
138
+ else
139
+ info "$action Futrou CLI v$current_version → v$display_version"
140
+ fi
138
141
  else
139
- info "Installing Futrou CLI v$display_version"
142
+ if [[ $version == "latest" ]]; then
143
+ info "Installing Futrou CLI latest"
144
+ else
145
+ info "Installing Futrou CLI v$display_version"
146
+ fi
140
147
  fi
141
148
 
142
149
  # ---------------------------------------------------------------------------
143
- # Download
150
+ # Download to a temp file then atomically replace (avoids "Text file busy"
151
+ # when upgrading a running binary)
144
152
  # ---------------------------------------------------------------------------
153
+ tmp_exe="$bin_dir/.futrou-tmp$exe_ext"
154
+
145
155
  if command -v curl >/dev/null 2>&1; then
146
- curl --fail --location --progress-bar --output "$exe" "$download_url" ||
156
+ curl --fail --location --progress-bar --output "$tmp_exe" "$download_url" ||
147
157
  error "Failed to download from \"$download_url\""
148
158
  elif command -v wget >/dev/null 2>&1; then
149
- wget -q --show-progress -O "$exe" "$download_url" ||
159
+ wget -q --show-progress -O "$tmp_exe" "$download_url" ||
150
160
  error "Failed to download from \"$download_url\""
151
161
  else
152
162
  error "curl or wget is required to install Futrou CLI"
153
163
  fi
154
164
 
155
- chmod +x "$exe"
165
+ chmod +x "$tmp_exe"
166
+ mv -f "$tmp_exe" "$exe"
156
167
 
157
168
  # ---------------------------------------------------------------------------
158
169
  # Verify
@@ -160,7 +171,12 @@ chmod +x "$exe"
160
171
  installed_version=$("$exe" --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)
161
172
  [[ -z $installed_version ]] && error "Downloaded binary failed to run"
162
173
 
163
- success "Futrou CLI v$installed_version was ${action,,} to $exe"
174
+ case $action in
175
+ Upgrading) action_past="upgraded" ;;
176
+ Downgrading) action_past="downgraded" ;;
177
+ *) action_past="installed" ;;
178
+ esac
179
+ success "Futrou CLI v$installed_version $action_past to $exe"
164
180
 
165
181
  # ---------------------------------------------------------------------------
166
182
  # PATH setup (skip if already in PATH)
@@ -244,3 +260,6 @@ esac
244
260
  echo
245
261
  info "To get started, run:"
246
262
  info_bold " futrou --help"
263
+
264
+ # Make futrou available in the current shell session without restarting
265
+ export PATH="$bin_dir:$PATH"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "futrou",
3
3
  "productName": "Futrou CLI",
4
- "version": "2.0.4",
4
+ "version": "2.0.7",
5
5
  "description": "Futrou CLI - Deploy and manage Futrou Cloud from your terminal.",
6
6
  "bin": {
7
7
  "futrou": "./index.cjs",