@visa/cli 2.4.0-rc.7 → 2.4.0-rc.9

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/install.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # Visa CLI installer for macOS and Linux
3
- # Usage: ( tmp="$(mktemp)" && trap 'rm -f "$tmp"' EXIT && curl --proto '=https' --tlsv1.2 -fsSL https://app.visacli.sh/install/bash -o "$tmp" && bash "$tmp" )
3
+ # Usage: curl -fsSL https://app.visacli.sh/cli | bash
4
4
  #
5
5
  # The entire body is wrapped in _visa_install() so bash must parse the full
6
6
  # file before executing anything — prevents partial-download execution if
@@ -113,23 +113,30 @@ if [ -n "$VISA_VERSION" ]; then
113
113
  ok "Visa CLI ${VISA_VERSION} installed."
114
114
  # Hand off straight into setup so install -> setup -> signed-in is one
115
115
  # uninterrupted flow. Hardening:
116
- # * Auto-launch only when stdin/stdout/stderr are real terminals setup is
117
- # interactive (browser sign-in, Touch ID). Piped installs, redirected
118
- # output, and CI cannot prompt cleanly, so they print the next step.
116
+ # * Auto-launch only when output streams are real terminals and setup can
117
+ # read from either stdin or /dev/tty. That keeps `curl ... | bash` usable:
118
+ # the script arrives on stdin, while setup prompts still read from the
119
+ # user's terminal. CI and redirected output print the next step instead.
119
120
  # * Invoke "$VISA_BIN" (the path verified just above), never a bare
120
121
  # "visa-cli" re-resolved through $PATH at call time.
121
122
  # * Pass only the literal "setup" argument — "$@" is never forwarded — so
122
123
  # nothing the script's caller controls reaches the installed binary.
123
- if [ -t 0 ] && [ -t 1 ] && [ -t 2 ]; then
124
+ if [ -t 1 ] && [ -t 2 ] && { [ -t 0 ] || [ -r /dev/tty ]; }; then
124
125
  echo ""
125
126
  info "Continuing to setup..."
126
127
  echo ""
127
- "$VISA_BIN" setup || {
128
+ SETUP_EXIT=0
129
+ if [ -t 0 ]; then
130
+ "$VISA_BIN" setup || SETUP_EXIT=$?
131
+ else
132
+ "$VISA_BIN" setup </dev/tty || SETUP_EXIT=$?
133
+ fi
134
+ if [ "$SETUP_EXIT" -ne 0 ]; then
128
135
  echo ""
129
136
  warn "Setup exited before completion. Visa CLI is installed."
130
137
  warn "run 'visa-cli setup' when you're ready to finish."
131
138
  exit 1
132
- }
139
+ fi
133
140
  exit 0
134
141
  else
135
142
  info "Run 'visa-cli setup' to get started."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visa/cli",
3
- "version": "2.4.0-rc.7",
3
+ "version": "2.4.0-rc.9",
4
4
  "description": "AI-powered payments for Claude Code",
5
5
  "bin": {
6
6
  "visa-cli": "./bin/visa-cli.js"
package/server.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
3
3
  "name": "io.github.visa-crypto-labs/visa-cli",
4
- "version": "2.4.0-rc.7",
4
+ "version": "2.4.0-rc.9",
5
5
  "title": "Visa CLI",
6
6
  "description": "AI-powered payments and creative tools for coding agents. Generate images, music, video, query crypto prices, and make purchases — all from your AI coding assistant.",
7
7
  "websiteUrl": "https://github.com/Visa-Crypto-Labs/Visa-mono/tree/main/packages/cli#readme",
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "registryType": "npm",
11
11
  "identifier": "@visa/cli",
12
- "version": "2.4.0-rc.7",
12
+ "version": "2.4.0-rc.9",
13
13
  "transport": {
14
14
  "type": "stdio"
15
15
  },