fss-link 1.5.7 → 1.6.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/README.md +1 -1
- package/bundle/fss-link.js +4785 -3183
- package/package.json +4 -1
- package/scripts/analyze-session-logs.sh +279 -0
- package/scripts/build.js +55 -0
- package/scripts/build_package.js +37 -0
- package/scripts/build_sandbox.js +195 -0
- package/scripts/build_vscode_companion.js +30 -0
- package/scripts/check-build-status.js +148 -0
- package/scripts/check-publish.js +101 -0
- package/scripts/clean.js +55 -0
- package/scripts/copy_bundle_assets.js +40 -0
- package/scripts/copy_files.js +56 -0
- package/scripts/create_alias.sh +39 -0
- package/scripts/emergency-kill-all-tests.sh +95 -0
- package/scripts/emergency-kill-vitest.sh +95 -0
- package/scripts/extract-session-logs.sh +202 -0
- package/scripts/generate-git-commit-info.js +71 -0
- package/scripts/get-previous-tag.js +213 -0
- package/scripts/get-release-version.js +119 -0
- package/scripts/index-session-logs.sh +173 -0
- package/scripts/install-linux.sh +294 -0
- package/scripts/install-macos.sh +343 -0
- package/scripts/install-windows.ps1 +427 -0
- package/scripts/local_telemetry.js +219 -0
- package/scripts/memory-monitor.sh +165 -0
- package/scripts/postinstall-message.js +31 -0
- package/scripts/prepare-package.js +51 -0
- package/scripts/process-session-log.py +302 -0
- package/scripts/quick-install.sh +195 -0
- package/scripts/sandbox_command.js +126 -0
- package/scripts/start.js +76 -0
- package/scripts/telemetry.js +85 -0
- package/scripts/telemetry_gcp.js +188 -0
- package/scripts/telemetry_utils.js +421 -0
- package/scripts/test-windows-paths.js +51 -0
- package/scripts/tests/get-release-version.test.js +110 -0
- package/scripts/tests/test-setup.ts +12 -0
- package/scripts/tests/vitest.config.ts +20 -0
- package/scripts/version.js +83 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# FSS Link macOS Installation Script
|
|
4
|
+
# Supports macOS 10.15+ with Homebrew integration
|
|
5
|
+
|
|
6
|
+
set -e # Exit on any error
|
|
7
|
+
|
|
8
|
+
# Colors for output
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
BLUE='\033[0;34m'
|
|
13
|
+
NC='\033[0m' # No Color
|
|
14
|
+
|
|
15
|
+
# Logging functions
|
|
16
|
+
log_info() {
|
|
17
|
+
echo -e "${BLUE}[INFO]${NC} $1"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
log_success() {
|
|
21
|
+
echo -e "${GREEN}[SUCCESS]${NC} $1"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
log_warning() {
|
|
25
|
+
echo -e "${YELLOW}[WARNING]${NC} $1"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
log_error() {
|
|
29
|
+
echo -e "${RED}[ERROR]${NC} $1"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
# Check macOS version
|
|
33
|
+
check_macos_version() {
|
|
34
|
+
MACOS_VERSION=$(sw_vers -productVersion)
|
|
35
|
+
MAJOR_VERSION=$(echo $MACOS_VERSION | cut -d. -f1)
|
|
36
|
+
MINOR_VERSION=$(echo $MACOS_VERSION | cut -d. -f2)
|
|
37
|
+
|
|
38
|
+
log_info "macOS version: $MACOS_VERSION"
|
|
39
|
+
|
|
40
|
+
# Check for macOS 10.15+ (Catalina and later)
|
|
41
|
+
if [ "$MAJOR_VERSION" -ge "11" ] || ([ "$MAJOR_VERSION" -eq "10" ] && [ "$MINOR_VERSION" -ge "15" ]); then
|
|
42
|
+
log_success "macOS version supported"
|
|
43
|
+
return 0
|
|
44
|
+
else
|
|
45
|
+
log_error "macOS 10.15+ required, found $MACOS_VERSION"
|
|
46
|
+
return 1
|
|
47
|
+
fi
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Check for Xcode Command Line Tools
|
|
51
|
+
check_xcode_tools() {
|
|
52
|
+
log_info "Checking Xcode Command Line Tools..."
|
|
53
|
+
|
|
54
|
+
if xcode-select -p &> /dev/null; then
|
|
55
|
+
log_success "Xcode Command Line Tools installed"
|
|
56
|
+
return 0
|
|
57
|
+
else
|
|
58
|
+
log_warning "Xcode Command Line Tools not found"
|
|
59
|
+
return 1
|
|
60
|
+
fi
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Install Xcode Command Line Tools
|
|
64
|
+
install_xcode_tools() {
|
|
65
|
+
log_info "Installing Xcode Command Line Tools..."
|
|
66
|
+
|
|
67
|
+
# Trigger installation
|
|
68
|
+
xcode-select --install
|
|
69
|
+
|
|
70
|
+
log_info "Please complete the Xcode Command Line Tools installation in the dialog box"
|
|
71
|
+
log_info "Press Enter when installation is complete..."
|
|
72
|
+
read -r
|
|
73
|
+
|
|
74
|
+
if check_xcode_tools; then
|
|
75
|
+
log_success "Xcode Command Line Tools installed successfully"
|
|
76
|
+
else
|
|
77
|
+
log_error "Xcode Command Line Tools installation failed"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# Check for Homebrew
|
|
83
|
+
check_homebrew() {
|
|
84
|
+
log_info "Checking for Homebrew..."
|
|
85
|
+
|
|
86
|
+
if command -v brew &> /dev/null; then
|
|
87
|
+
BREW_VERSION=$(brew --version | head -n1)
|
|
88
|
+
log_success "$BREW_VERSION found"
|
|
89
|
+
return 0
|
|
90
|
+
else
|
|
91
|
+
log_warning "Homebrew not found"
|
|
92
|
+
return 1
|
|
93
|
+
fi
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
# Install Homebrew
|
|
97
|
+
install_homebrew() {
|
|
98
|
+
log_info "Installing Homebrew..."
|
|
99
|
+
|
|
100
|
+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
101
|
+
|
|
102
|
+
# Add Homebrew to PATH
|
|
103
|
+
if [[ -f "/opt/homebrew/bin/brew" ]]; then
|
|
104
|
+
# Apple Silicon
|
|
105
|
+
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
|
|
106
|
+
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
107
|
+
else
|
|
108
|
+
# Intel
|
|
109
|
+
echo 'eval "$(/usr/local/bin/brew shellenv)"' >> ~/.zprofile
|
|
110
|
+
eval "$(/usr/local/bin/brew shellenv)"
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
if check_homebrew; then
|
|
114
|
+
log_success "Homebrew installed successfully"
|
|
115
|
+
else
|
|
116
|
+
log_error "Homebrew installation failed"
|
|
117
|
+
exit 1
|
|
118
|
+
fi
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Check Node.js version
|
|
122
|
+
check_nodejs() {
|
|
123
|
+
log_info "Checking Node.js installation..."
|
|
124
|
+
|
|
125
|
+
if command -v node &> /dev/null; then
|
|
126
|
+
NODE_VERSION=$(node --version | sed 's/v//')
|
|
127
|
+
MAJOR_VERSION=$(echo $NODE_VERSION | cut -d. -f1)
|
|
128
|
+
|
|
129
|
+
if [ "$MAJOR_VERSION" -ge "20" ]; then
|
|
130
|
+
log_success "Node.js $NODE_VERSION detected (>= 20.0.0 required)"
|
|
131
|
+
return 0
|
|
132
|
+
else
|
|
133
|
+
log_warning "Node.js $NODE_VERSION detected, but 20.0.0+ required"
|
|
134
|
+
return 1
|
|
135
|
+
fi
|
|
136
|
+
else
|
|
137
|
+
log_warning "Node.js not found"
|
|
138
|
+
return 1
|
|
139
|
+
fi
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
# Install Node.js via Homebrew
|
|
143
|
+
install_nodejs() {
|
|
144
|
+
log_info "Installing Node.js 20 via Homebrew..."
|
|
145
|
+
|
|
146
|
+
brew install node@20
|
|
147
|
+
|
|
148
|
+
# Link Node.js 20 if it's not the default
|
|
149
|
+
if ! check_nodejs; then
|
|
150
|
+
brew link node@20 --force
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
if check_nodejs; then
|
|
154
|
+
log_success "Node.js installed successfully"
|
|
155
|
+
else
|
|
156
|
+
log_error "Node.js installation failed"
|
|
157
|
+
exit 1
|
|
158
|
+
fi
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
# Install additional dependencies
|
|
162
|
+
install_dependencies() {
|
|
163
|
+
log_info "Installing additional dependencies..."
|
|
164
|
+
|
|
165
|
+
# Install SQLite (usually already installed on macOS)
|
|
166
|
+
if ! command -v sqlite3 &> /dev/null; then
|
|
167
|
+
brew install sqlite
|
|
168
|
+
fi
|
|
169
|
+
|
|
170
|
+
# Install Python 3 (usually already installed on modern macOS)
|
|
171
|
+
if ! command -v python3 &> /dev/null; then
|
|
172
|
+
brew install python@3.11
|
|
173
|
+
fi
|
|
174
|
+
|
|
175
|
+
log_success "Dependencies installed"
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
# Install FSS Link
|
|
179
|
+
install_fss_link() {
|
|
180
|
+
log_info "Installing FSS Link..."
|
|
181
|
+
|
|
182
|
+
# Try global installation
|
|
183
|
+
if npm install -g fss-link; then
|
|
184
|
+
log_success "FSS Link installed globally"
|
|
185
|
+
return 0
|
|
186
|
+
else
|
|
187
|
+
log_warning "Global installation failed, trying local installation"
|
|
188
|
+
|
|
189
|
+
# Create local npm directory
|
|
190
|
+
mkdir -p ~/.npm-global
|
|
191
|
+
npm config set prefix ~/.npm-global
|
|
192
|
+
|
|
193
|
+
# Add to PATH if not already there
|
|
194
|
+
if [[ ":$PATH:" != *":$HOME/.npm-global/bin:"* ]]; then
|
|
195
|
+
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
|
|
196
|
+
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bash_profile 2>/dev/null || true
|
|
197
|
+
export PATH=~/.npm-global/bin:$PATH
|
|
198
|
+
fi
|
|
199
|
+
|
|
200
|
+
# Install locally
|
|
201
|
+
npm install -g fss-link
|
|
202
|
+
log_success "FSS Link installed locally"
|
|
203
|
+
fi
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
# Verify installation
|
|
207
|
+
verify_installation() {
|
|
208
|
+
log_info "Verifying FSS Link installation..."
|
|
209
|
+
|
|
210
|
+
# Source shell config to get new PATH
|
|
211
|
+
export PATH=~/.npm-global/bin:$PATH
|
|
212
|
+
|
|
213
|
+
if command -v fss-link &> /dev/null; then
|
|
214
|
+
VERSION=$(fss-link --version 2>/dev/null || echo "unknown")
|
|
215
|
+
log_success "FSS Link installed successfully: $VERSION"
|
|
216
|
+
|
|
217
|
+
# Run basic tests
|
|
218
|
+
log_info "Running functionality tests..."
|
|
219
|
+
|
|
220
|
+
if fss-link --help > /dev/null 2>&1; then
|
|
221
|
+
log_success "✅ Help command working"
|
|
222
|
+
else
|
|
223
|
+
log_warning "⚠️ Help command failed"
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
if fss-link test-parsers > /dev/null 2>&1; then
|
|
227
|
+
log_success "✅ Document parsers working"
|
|
228
|
+
else
|
|
229
|
+
log_warning "⚠️ Document parsers test failed"
|
|
230
|
+
fi
|
|
231
|
+
|
|
232
|
+
return 0
|
|
233
|
+
else
|
|
234
|
+
log_error "FSS Link installation verification failed"
|
|
235
|
+
log_info "Try running: source ~/.zshrc && fss-link --version"
|
|
236
|
+
return 1
|
|
237
|
+
fi
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Print usage information
|
|
241
|
+
print_usage() {
|
|
242
|
+
cat << EOF
|
|
243
|
+
|
|
244
|
+
🚀 FSS Link Installation Complete!
|
|
245
|
+
|
|
246
|
+
📋 Quick Start:
|
|
247
|
+
fss-link --version # Check version
|
|
248
|
+
fss-link --help # Show help
|
|
249
|
+
fss-link test-parsers # Test document processing
|
|
250
|
+
|
|
251
|
+
🔧 Configuration:
|
|
252
|
+
fss-link init # Initialize configuration
|
|
253
|
+
fss-link models setup # Set up model profiles
|
|
254
|
+
|
|
255
|
+
📚 Documentation:
|
|
256
|
+
https://github.com/FSSCoding/fss-link/blob/main/INSTALLATION.md
|
|
257
|
+
https://github.com/FSSCoding/fss-link/blob/main/fss-docs/README.md
|
|
258
|
+
|
|
259
|
+
🎯 Example Usage:
|
|
260
|
+
fss-link -p "analyze this project"
|
|
261
|
+
fss-link --tools excel-parser -p "parse spreadsheet.xlsx"
|
|
262
|
+
fss-link --tools web-scraper -p "scrape https://example.com"
|
|
263
|
+
|
|
264
|
+
🍎 macOS Specific:
|
|
265
|
+
- FSS Link is now in your PATH
|
|
266
|
+
- Restart Terminal.app to ensure PATH changes take effect
|
|
267
|
+
- Use 'brew upgrade node@20' to update Node.js later
|
|
268
|
+
|
|
269
|
+
EOF
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
# Main installation flow
|
|
273
|
+
main() {
|
|
274
|
+
echo "🚀 FSS Link macOS Installation Script"
|
|
275
|
+
echo "====================================="
|
|
276
|
+
|
|
277
|
+
# Check macOS version
|
|
278
|
+
if ! check_macos_version; then
|
|
279
|
+
exit 1
|
|
280
|
+
fi
|
|
281
|
+
|
|
282
|
+
# Check/install Xcode Command Line Tools
|
|
283
|
+
if ! check_xcode_tools; then
|
|
284
|
+
install_xcode_tools
|
|
285
|
+
fi
|
|
286
|
+
|
|
287
|
+
# Check/install Homebrew
|
|
288
|
+
if ! check_homebrew; then
|
|
289
|
+
log_info "Installing Homebrew for package management..."
|
|
290
|
+
install_homebrew
|
|
291
|
+
fi
|
|
292
|
+
|
|
293
|
+
# Check/install Node.js
|
|
294
|
+
if ! check_nodejs; then
|
|
295
|
+
install_nodejs
|
|
296
|
+
fi
|
|
297
|
+
|
|
298
|
+
# Install additional dependencies
|
|
299
|
+
install_dependencies
|
|
300
|
+
|
|
301
|
+
# Install FSS Link
|
|
302
|
+
install_fss_link
|
|
303
|
+
|
|
304
|
+
# Verify installation
|
|
305
|
+
if verify_installation; then
|
|
306
|
+
print_usage
|
|
307
|
+
log_success "🎉 FSS Link installation successful!"
|
|
308
|
+
else
|
|
309
|
+
log_error "Installation verification failed"
|
|
310
|
+
log_info "Please check the installation manually or report issues at:"
|
|
311
|
+
log_info "https://github.com/FSSCoding/fss-link/issues"
|
|
312
|
+
exit 1
|
|
313
|
+
fi
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
# Handle script arguments
|
|
317
|
+
case "${1:-}" in
|
|
318
|
+
--help|-h)
|
|
319
|
+
echo "FSS Link macOS Installation Script"
|
|
320
|
+
echo ""
|
|
321
|
+
echo "Usage: $0 [options]"
|
|
322
|
+
echo ""
|
|
323
|
+
echo "Options:"
|
|
324
|
+
echo " --help, -h Show this help message"
|
|
325
|
+
echo " --version, -v Show script version"
|
|
326
|
+
echo ""
|
|
327
|
+
echo "This script will:"
|
|
328
|
+
echo "1. Check macOS version compatibility"
|
|
329
|
+
echo "2. Install Xcode Command Line Tools if needed"
|
|
330
|
+
echo "3. Install Homebrew if needed"
|
|
331
|
+
echo "4. Install Node.js 20+ via Homebrew"
|
|
332
|
+
echo "5. Install FSS Link from npm"
|
|
333
|
+
echo "6. Verify the installation"
|
|
334
|
+
exit 0
|
|
335
|
+
;;
|
|
336
|
+
--version|-v)
|
|
337
|
+
echo "FSS Link macOS Installation Script v1.0.0"
|
|
338
|
+
exit 0
|
|
339
|
+
;;
|
|
340
|
+
*)
|
|
341
|
+
main "$@"
|
|
342
|
+
;;
|
|
343
|
+
esac
|