@necrolab/dashboard 0.5.14 → 0.5.16
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/backend/api.js +2 -3
- package/eslint.config.js +46 -0
- package/index.html +2 -1
- package/package.json +5 -2
- package/src/App.vue +140 -170
- package/src/assets/css/base/mixins.scss +72 -0
- package/src/assets/css/base/reset.scss +0 -2
- package/src/assets/css/base/scroll.scss +43 -36
- package/src/assets/css/base/typography.scss +9 -10
- package/src/assets/css/base/variables.scss +43 -0
- package/src/assets/css/components/accessibility.scss +37 -0
- package/src/assets/css/components/buttons.scss +58 -15
- package/src/assets/css/components/forms.scss +31 -32
- package/src/assets/css/components/headers.scss +119 -0
- package/src/assets/css/components/modals.scss +2 -2
- package/src/assets/css/components/search-groups.scss +28 -19
- package/src/assets/css/components/tables.scss +5 -7
- package/src/assets/css/components/toasts.scss +7 -7
- package/src/assets/css/components/utilities.scss +220 -0
- package/src/assets/css/main.scss +72 -75
- package/src/components/Auth/LoginForm.vue +5 -84
- package/src/components/Editors/Account/Account.vue +8 -10
- package/src/components/Editors/Account/AccountCreator.vue +28 -59
- package/src/components/Editors/Account/AccountView.vue +38 -86
- package/src/components/Editors/Account/CreateAccount.vue +8 -50
- package/src/components/Editors/Profile/CreateProfile.vue +74 -131
- package/src/components/Editors/Profile/Profile.vue +15 -17
- package/src/components/Editors/Profile/ProfileCountryChooser.vue +16 -60
- package/src/components/Editors/Profile/ProfileView.vue +46 -96
- package/src/components/Editors/TagLabel.vue +16 -55
- package/src/components/Editors/TagToggle.vue +20 -8
- package/src/components/Filter/Filter.vue +62 -75
- package/src/components/Filter/FilterPreview.vue +161 -135
- package/src/components/Filter/PriceSortToggle.vue +36 -43
- package/src/components/Table/Header.vue +1 -1
- package/src/components/Table/Table.vue +61 -12
- package/src/components/Tasks/CheckStock.vue +7 -16
- package/src/components/Tasks/Controls/DesktopControls.vue +15 -60
- package/src/components/Tasks/Controls/MobileControls.vue +5 -20
- package/src/components/Tasks/CreateTaskAXS.vue +20 -118
- package/src/components/Tasks/CreateTaskTM.vue +33 -189
- package/src/components/Tasks/EventDetailRow.vue +21 -0
- package/src/components/Tasks/MassEdit.vue +6 -16
- package/src/components/Tasks/QuickSettings.vue +140 -216
- package/src/components/Tasks/ScrapeVenue.vue +4 -13
- package/src/components/Tasks/Stats.vue +19 -38
- package/src/components/Tasks/Task.vue +65 -268
- package/src/components/Tasks/TaskLabel.vue +9 -3
- package/src/components/Tasks/TaskView.vue +43 -63
- package/src/components/Tasks/Utilities.vue +10 -42
- package/src/components/Tasks/ViewTask.vue +23 -107
- package/src/components/icons/Close.vue +2 -8
- package/src/components/icons/Gear.vue +8 -8
- package/src/components/icons/Hash.vue +5 -0
- package/src/components/icons/Key.vue +2 -8
- package/src/components/icons/Pencil.vue +2 -8
- package/src/components/icons/Profile.vue +2 -8
- package/src/components/icons/Sell.vue +2 -8
- package/src/components/icons/Spinner.vue +4 -7
- package/src/components/icons/SquareCheck.vue +2 -8
- package/src/components/icons/SquareUncheck.vue +2 -8
- package/src/components/icons/Wildcard.vue +2 -8
- package/src/components/icons/index.js +3 -1
- package/src/components/ui/ActionButtonGroup.vue +113 -52
- package/src/components/ui/BalanceIndicator.vue +60 -0
- package/src/components/ui/EmptyState.vue +24 -0
- package/src/components/ui/EnableDisableToggle.vue +23 -0
- package/src/components/ui/FormField.vue +48 -48
- package/src/components/ui/IconLabel.vue +23 -0
- package/src/components/ui/InfoRow.vue +21 -54
- package/src/components/ui/Modal.vue +78 -37
- package/src/components/ui/Navbar.vue +60 -41
- package/src/components/ui/ReadonlyFieldsSection.vue +31 -0
- package/src/components/ui/ReconnectIndicator.vue +111 -124
- package/src/components/ui/SectionCard.vue +6 -14
- package/src/components/ui/Splash.vue +2 -10
- package/src/components/ui/StatusBadge.vue +26 -28
- package/src/components/ui/TaskToggle.vue +54 -0
- package/src/components/ui/controls/CountryChooser.vue +27 -64
- package/src/components/ui/controls/EyeToggle.vue +1 -1
- package/src/components/ui/controls/atomic/Checkbox.vue +40 -121
- package/src/components/ui/controls/atomic/Dropdown.vue +102 -95
- package/src/components/ui/controls/atomic/MultiDropdown.vue +72 -94
- package/src/components/ui/controls/atomic/Switch.vue +21 -84
- package/src/composables/useColorMapping.js +15 -0
- package/src/composables/useCopyToClipboard.js +1 -1
- package/src/composables/useDateFormatting.js +21 -0
- package/src/composables/useDeviceDetection.js +14 -0
- package/src/composables/useDropdownPosition.js +5 -6
- package/src/composables/useDynamicTableHeight.js +31 -0
- package/src/composables/useRowSelection.js +0 -3
- package/src/composables/useTicketPricing.js +16 -0
- package/src/composables/useWindowDimensions.js +21 -0
- package/src/libs/Filter.js +14 -20
- package/src/libs/panzoom.js +1 -5
- package/src/libs/utils/array.js +60 -0
- package/src/{stores/utils.js → libs/utils/dataGeneration.js} +2 -250
- package/src/libs/utils/eventUrl.js +40 -0
- package/src/libs/utils/string.js +28 -0
- package/src/libs/utils/time.js +20 -0
- package/src/libs/utils/validation.js +88 -0
- package/src/main.js +0 -2
- package/src/stores/connection.js +1 -4
- package/src/stores/logger.js +6 -12
- package/src/stores/sampleData.js +1 -2
- package/src/stores/ui.js +59 -36
- package/src/views/Accounts.vue +17 -31
- package/src/views/Console.vue +76 -176
- package/src/views/Editor.vue +217 -383
- package/src/views/FilterBuilder.vue +190 -373
- package/src/views/Login.vue +3 -28
- package/src/views/Profiles.vue +12 -22
- package/src/views/Tasks.vue +51 -38
- package/tailwind.config.js +82 -71
- package/workbox-config.cjs +47 -5
- package/docs/plans/2026-02-08-tailwind-consolidation.md +0 -2416
- package/exit +0 -209
- package/run +0 -177
- package/switch-branch.sh +0 -41
- /package/public/{reconnect-logo.png → img/reconnect-logo.png} +0 -0
package/exit
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# 🎯 Necro Dashboard Exit - Fire Edition 🔥
|
|
4
|
-
# Enhanced exit script with style and robust functionality
|
|
5
|
-
|
|
6
|
-
# Colors for that fire output 🌈
|
|
7
|
-
RED='\033[0;31m'
|
|
8
|
-
GREEN='\033[0;32m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
BLUE='\033[0;34m'
|
|
11
|
-
PURPLE='\033[0;35m'
|
|
12
|
-
CYAN='\033[0;36m'
|
|
13
|
-
WHITE='\033[1;37m'
|
|
14
|
-
BOLD='\033[1m'
|
|
15
|
-
NC='\033[0m' # No Color
|
|
16
|
-
|
|
17
|
-
# Fire emojis for maximum style
|
|
18
|
-
FIRE="🔥"
|
|
19
|
-
STOP="🛑"
|
|
20
|
-
GEAR="⚙️"
|
|
21
|
-
CHECK="✅"
|
|
22
|
-
CROSS="❌"
|
|
23
|
-
LIGHTNING="⚡"
|
|
24
|
-
SKULL="💀"
|
|
25
|
-
|
|
26
|
-
# Banner function
|
|
27
|
-
show_banner() {
|
|
28
|
-
echo -e "${RED}${BOLD}"
|
|
29
|
-
echo " ███╗ ██╗███████╗ ██████╗██████╗ ██████╗ "
|
|
30
|
-
echo " ████╗ ██║██╔════╝██╔════╝██╔══██╗██╔═══██╗"
|
|
31
|
-
echo " ██╔██╗ ██║█████╗ ██║ ██████╔╝██║ ██║"
|
|
32
|
-
echo " ██║╚██╗██║██╔══╝ ██║ ██╔══██╗██║ ██║"
|
|
33
|
-
echo " ██║ ╚████║███████╗╚██████╗██║ ██║╚██████╔╝"
|
|
34
|
-
echo " ╚═╝ ╚═══╝╚══════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ "
|
|
35
|
-
echo -e "${NC}"
|
|
36
|
-
echo -e "${RED}${BOLD}Dashboard Exit ${SKULL} v2.0${NC}"
|
|
37
|
-
echo -e "${WHITE}────────────────────────────────────────────${NC}"
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
# Success message
|
|
41
|
-
success() {
|
|
42
|
-
echo -e "${GREEN}${BOLD}${CHECK} $1${NC}"
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
# Error message
|
|
46
|
-
error() {
|
|
47
|
-
echo -e "${RED}${BOLD}${CROSS} $1${NC}"
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
# Info message
|
|
51
|
-
info() {
|
|
52
|
-
echo -e "${CYAN}${BOLD}${LIGHTNING} $1${NC}"
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
# Warning message
|
|
56
|
-
warn() {
|
|
57
|
-
echo -e "${YELLOW}${BOLD}⚠️ $1${NC}"
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
# Check if lsof is available
|
|
61
|
-
check_lsof() {
|
|
62
|
-
if ! command -v lsof &> /dev/null; then
|
|
63
|
-
error "lsof is not installed or not in PATH"
|
|
64
|
-
warn "Install with: brew install lsof (macOS) or apt-get install lsof (Linux)"
|
|
65
|
-
exit 1
|
|
66
|
-
fi
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
# Function to kill process on a specific port with enhanced feedback
|
|
70
|
-
kill_port() {
|
|
71
|
-
local port=$1
|
|
72
|
-
local service_name=$2
|
|
73
|
-
|
|
74
|
-
info "Checking for processes on port ${port} (${service_name})..."
|
|
75
|
-
|
|
76
|
-
# Get PID using lsof
|
|
77
|
-
local pid=$(lsof -ti:$port 2>/dev/null)
|
|
78
|
-
|
|
79
|
-
if [ -n "$pid" ]; then
|
|
80
|
-
# Get process name for better feedback
|
|
81
|
-
local process_name=$(ps -p $pid -o comm= 2>/dev/null || echo "unknown")
|
|
82
|
-
|
|
83
|
-
warn "Found process: ${process_name} (PID: ${pid}) on port ${port}"
|
|
84
|
-
|
|
85
|
-
# Try graceful termination first
|
|
86
|
-
info "Attempting graceful shutdown..."
|
|
87
|
-
if kill -TERM $pid 2>/dev/null; then
|
|
88
|
-
sleep 2
|
|
89
|
-
|
|
90
|
-
# Check if process is still running
|
|
91
|
-
if kill -0 $pid 2>/dev/null; then
|
|
92
|
-
warn "Process still running, forcing termination..."
|
|
93
|
-
if kill -9 $pid 2>/dev/null; then
|
|
94
|
-
success "Process ${pid} forcefully terminated on port ${port}"
|
|
95
|
-
else
|
|
96
|
-
error "Failed to kill process ${pid} on port ${port}"
|
|
97
|
-
return 1
|
|
98
|
-
fi
|
|
99
|
-
else
|
|
100
|
-
success "Process ${pid} gracefully terminated on port ${port}"
|
|
101
|
-
fi
|
|
102
|
-
else
|
|
103
|
-
error "Failed to send termination signal to process ${pid}"
|
|
104
|
-
return 1
|
|
105
|
-
fi
|
|
106
|
-
else
|
|
107
|
-
info "No process found on port ${port} (${service_name})"
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
return 0
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
# Function to kill all Node.js processes
|
|
114
|
-
kill_all_node() {
|
|
115
|
-
info "Searching for Node.js processes..."
|
|
116
|
-
|
|
117
|
-
local node_pids=$(pgrep -f "node" 2>/dev/null)
|
|
118
|
-
|
|
119
|
-
if [ -n "$node_pids" ]; then
|
|
120
|
-
warn "Found Node.js processes, terminating..."
|
|
121
|
-
echo "$node_pids" | while read -r pid; do
|
|
122
|
-
if [ -n "$pid" ]; then
|
|
123
|
-
local process_info=$(ps -p $pid -o args= 2>/dev/null || echo "unknown")
|
|
124
|
-
info "Killing Node.js process: $pid ($process_info)"
|
|
125
|
-
kill -TERM $pid 2>/dev/null || kill -9 $pid 2>/dev/null
|
|
126
|
-
fi
|
|
127
|
-
done
|
|
128
|
-
success "All Node.js processes terminated"
|
|
129
|
-
else
|
|
130
|
-
info "No Node.js processes found"
|
|
131
|
-
fi
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
# Function to clean up development servers
|
|
135
|
-
cleanup_dev_servers() {
|
|
136
|
-
info "Cleaning up development servers ${GEAR}"
|
|
137
|
-
|
|
138
|
-
# Kill specific ports used by the dashboard
|
|
139
|
-
kill_port 5173 "Vite Dev Server"
|
|
140
|
-
kill_port 8081 "Backend Server"
|
|
141
|
-
kill_port 3000 "Alternative Dev Server"
|
|
142
|
-
kill_port 8080 "Alternative Backend"
|
|
143
|
-
|
|
144
|
-
echo ""
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
# Help function
|
|
148
|
-
show_help() {
|
|
149
|
-
echo -e "${WHITE}${BOLD}Usage:${NC}"
|
|
150
|
-
echo -e " ${CYAN}./exit${NC} ${WHITE}Stop dashboard servers (ports 5173, 8081)${NC}"
|
|
151
|
-
echo -e " ${CYAN}./exit all${NC} ${WHITE}Stop all Node.js processes${NC}"
|
|
152
|
-
echo -e " ${CYAN}./exit port <n>${NC} ${WHITE}Stop process on specific port${NC}"
|
|
153
|
-
echo -e " ${CYAN}./exit help${NC} ${WHITE}Show this help message${NC}"
|
|
154
|
-
echo ""
|
|
155
|
-
echo -e "${WHITE}${BOLD}Examples:${NC}"
|
|
156
|
-
echo -e " ${YELLOW}./exit${NC} ${GREEN}# Stop dashboard servers${NC}"
|
|
157
|
-
echo -e " ${YELLOW}./exit all${NC} ${GREEN}# Nuclear option - kill all Node.js${NC}"
|
|
158
|
-
echo -e " ${YELLOW}./exit port 3000${NC} ${GREEN}# Stop specific port${NC}"
|
|
159
|
-
echo ""
|
|
160
|
-
echo -e "${RED}Made with ${SKULL} for clean shutdowns${NC}"
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
# Main execution flow
|
|
164
|
-
main() {
|
|
165
|
-
# Clear screen for clean output
|
|
166
|
-
clear
|
|
167
|
-
|
|
168
|
-
# Show the banner
|
|
169
|
-
show_banner
|
|
170
|
-
|
|
171
|
-
# Check dependencies
|
|
172
|
-
check_lsof
|
|
173
|
-
|
|
174
|
-
case "${1:-}" in
|
|
175
|
-
"all")
|
|
176
|
-
kill_all_node
|
|
177
|
-
;;
|
|
178
|
-
"port")
|
|
179
|
-
if [ -z "$2" ]; then
|
|
180
|
-
error "Port number required"
|
|
181
|
-
echo -e "${CYAN}Usage: ./exit port <port_number>${NC}"
|
|
182
|
-
exit 1
|
|
183
|
-
fi
|
|
184
|
-
kill_port "$2" "Custom Port"
|
|
185
|
-
;;
|
|
186
|
-
"help"|"-h"|"--help")
|
|
187
|
-
show_help
|
|
188
|
-
;;
|
|
189
|
-
"")
|
|
190
|
-
cleanup_dev_servers
|
|
191
|
-
;;
|
|
192
|
-
*)
|
|
193
|
-
warn "Unknown command: $1"
|
|
194
|
-
echo ""
|
|
195
|
-
show_help
|
|
196
|
-
exit 1
|
|
197
|
-
;;
|
|
198
|
-
esac
|
|
199
|
-
|
|
200
|
-
echo ""
|
|
201
|
-
success "Exit sequence completed ${STOP}"
|
|
202
|
-
echo -e "${PURPLE}Dashboard processes have been terminated ${FIRE}${NC}"
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
# Error handling for script interruption
|
|
206
|
-
trap 'echo -e "\n${YELLOW}${BOLD}${LIGHTNING} Exit script interrupted${NC}"; exit 0' INT
|
|
207
|
-
|
|
208
|
-
# Run the main function
|
|
209
|
-
main "$@"
|
package/run
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# 🎯 Necro Dashboard Runner - Fire Edition 🔥
|
|
4
|
-
# Enhanced runner script with style and robust functionality
|
|
5
|
-
|
|
6
|
-
# Colors for that fire output 🌈
|
|
7
|
-
RED='\033[0;31m'
|
|
8
|
-
GREEN='\033[0;32m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
BLUE='\033[0;34m'
|
|
11
|
-
PURPLE='\033[0;35m'
|
|
12
|
-
CYAN='\033[0;36m'
|
|
13
|
-
WHITE='\033[1;37m'
|
|
14
|
-
BOLD='\033[1m'
|
|
15
|
-
NC='\033[0m' # No Color
|
|
16
|
-
|
|
17
|
-
# Fire emojis for maximum style
|
|
18
|
-
FIRE="🔥"
|
|
19
|
-
ROCKET="🚀"
|
|
20
|
-
GEAR="⚙️"
|
|
21
|
-
CHECK="✅"
|
|
22
|
-
CROSS="❌"
|
|
23
|
-
LIGHTNING="⚡"
|
|
24
|
-
|
|
25
|
-
# Banner function
|
|
26
|
-
show_banner() {
|
|
27
|
-
echo -e "${PURPLE}${BOLD}"
|
|
28
|
-
echo " ███╗ ██╗███████╗ ██████╗██████╗ ██████╗ "
|
|
29
|
-
echo " ████╗ ██║██╔════╝██╔════╝██╔══██╗██╔═══██╗"
|
|
30
|
-
echo " ██╔██╗ ██║█████╗ ██║ ██████╔╝██║ ██║"
|
|
31
|
-
echo " ██║╚██╗██║██╔══╝ ██║ ██╔══██╗██║ ██║"
|
|
32
|
-
echo " ██║ ╚████║███████╗╚██████╗██║ ██║╚██████╔╝"
|
|
33
|
-
echo " ╚═╝ ╚═══╝╚══════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ "
|
|
34
|
-
echo -e "${NC}"
|
|
35
|
-
echo -e "${CYAN}${BOLD}Dashboard Runner ${FIRE} v2.0${NC}"
|
|
36
|
-
echo -e "${WHITE}────────────────────────────────────────────${NC}"
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
# Spinner function for loading animations
|
|
40
|
-
spinner() {
|
|
41
|
-
local pid=$1
|
|
42
|
-
local delay=0.1
|
|
43
|
-
local spinstr='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
|
|
44
|
-
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
|
|
45
|
-
local temp=${spinstr#?}
|
|
46
|
-
printf " [%c] " "$spinstr"
|
|
47
|
-
local spinstr=$temp${spinstr%"$temp"}
|
|
48
|
-
sleep $delay
|
|
49
|
-
printf "\b\b\b\b\b\b"
|
|
50
|
-
done
|
|
51
|
-
printf " \b\b\b\b"
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
# Success message
|
|
55
|
-
success() {
|
|
56
|
-
echo -e "${GREEN}${BOLD}${CHECK} $1${NC}"
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
# Error message
|
|
60
|
-
error() {
|
|
61
|
-
echo -e "${RED}${BOLD}${CROSS} $1${NC}"
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
# Info message
|
|
65
|
-
info() {
|
|
66
|
-
echo -e "${CYAN}${BOLD}${LIGHTNING} $1${NC}"
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
# Warning message
|
|
70
|
-
warn() {
|
|
71
|
-
echo -e "${YELLOW}${BOLD}⚠️ $1${NC}"
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
# Check if npm is available
|
|
75
|
-
check_npm() {
|
|
76
|
-
if ! command -v npm &> /dev/null; then
|
|
77
|
-
error "npm is not installed or not in PATH"
|
|
78
|
-
exit 1
|
|
79
|
-
fi
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
# Check if node is available
|
|
83
|
-
check_node() {
|
|
84
|
-
if ! command -v node &> /dev/null; then
|
|
85
|
-
error "Node.js is not installed or not in PATH"
|
|
86
|
-
exit 1
|
|
87
|
-
fi
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
# Build function with proper error handling
|
|
91
|
-
build_project() {
|
|
92
|
-
info "Initiating build sequence ${GEAR}"
|
|
93
|
-
|
|
94
|
-
# Check dependencies
|
|
95
|
-
check_npm
|
|
96
|
-
|
|
97
|
-
echo -e "${YELLOW}${BOLD}Building production files...${NC}"
|
|
98
|
-
|
|
99
|
-
# Run build with error handling
|
|
100
|
-
if npm run build; then
|
|
101
|
-
success "Build completed successfully ${ROCKET}"
|
|
102
|
-
return 0
|
|
103
|
-
else
|
|
104
|
-
error "Build failed! Check the output above for details."
|
|
105
|
-
exit 1
|
|
106
|
-
fi
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
# Start server function
|
|
110
|
-
start_server() {
|
|
111
|
-
info "Starting Necro Dashboard server ${ROCKET}"
|
|
112
|
-
|
|
113
|
-
# Check if Node.js is available
|
|
114
|
-
check_node
|
|
115
|
-
|
|
116
|
-
# Check if index.js exists
|
|
117
|
-
if [[ ! -f "index.js" ]]; then
|
|
118
|
-
error "index.js not found in current directory"
|
|
119
|
-
exit 1
|
|
120
|
-
fi
|
|
121
|
-
|
|
122
|
-
echo -e "${GREEN}${BOLD}Server starting...${NC}"
|
|
123
|
-
echo -e "${CYAN}Press ${WHITE}Ctrl+C${CYAN} to stop the server${NC}"
|
|
124
|
-
echo -e "${WHITE}────────────────────────────────────────────${NC}"
|
|
125
|
-
|
|
126
|
-
# Start the server
|
|
127
|
-
node index.js
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
# Help function
|
|
131
|
-
show_help() {
|
|
132
|
-
echo -e "${WHITE}${BOLD}Usage:${NC}"
|
|
133
|
-
echo -e " ${CYAN}./run${NC} ${WHITE}Start the server${NC}"
|
|
134
|
-
echo -e " ${CYAN}./run build${NC} ${WHITE}Build project then start server${NC}"
|
|
135
|
-
echo -e " ${CYAN}./run help${NC} ${WHITE}Show this help message${NC}"
|
|
136
|
-
echo ""
|
|
137
|
-
echo -e "${WHITE}${BOLD}Examples:${NC}"
|
|
138
|
-
echo -e " ${YELLOW}./run${NC} ${GREEN}# Quick start for development${NC}"
|
|
139
|
-
echo -e " ${YELLOW}./run build${NC} ${GREEN}# Production build + start${NC}"
|
|
140
|
-
echo ""
|
|
141
|
-
echo -e "${PURPLE}Made with ${FIRE} for ticket automation${NC}"
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
# Main execution flow
|
|
145
|
-
main() {
|
|
146
|
-
# Clear screen for clean output
|
|
147
|
-
clear
|
|
148
|
-
|
|
149
|
-
# Show the fire banner
|
|
150
|
-
show_banner
|
|
151
|
-
|
|
152
|
-
case "${1:-}" in
|
|
153
|
-
"build")
|
|
154
|
-
build_project
|
|
155
|
-
echo ""
|
|
156
|
-
start_server
|
|
157
|
-
;;
|
|
158
|
-
"help"|"-h"|"--help")
|
|
159
|
-
show_help
|
|
160
|
-
;;
|
|
161
|
-
"")
|
|
162
|
-
start_server
|
|
163
|
-
;;
|
|
164
|
-
*)
|
|
165
|
-
warn "Unknown command: $1"
|
|
166
|
-
echo ""
|
|
167
|
-
show_help
|
|
168
|
-
exit 1
|
|
169
|
-
;;
|
|
170
|
-
esac
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
# Error handling for script interruption
|
|
174
|
-
trap 'echo -e "\n${YELLOW}${BOLD}${LIGHTNING} Server stopped${NC}"; exit 0' INT
|
|
175
|
-
|
|
176
|
-
# Run the main function
|
|
177
|
-
main "$@"
|
package/switch-branch.sh
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# USAGE: ./git-force-switch.sh target-branch-name
|
|
4
|
-
|
|
5
|
-
set -e
|
|
6
|
-
|
|
7
|
-
TARGET_BRANCH="$1"
|
|
8
|
-
|
|
9
|
-
if [ -z "$TARGET_BRANCH" ]; then
|
|
10
|
-
echo "❌ Usage: $0 <branch-name>"
|
|
11
|
-
exit 1
|
|
12
|
-
fi
|
|
13
|
-
|
|
14
|
-
echo "🔧 Forcing checkout to '$TARGET_BRANCH'..."
|
|
15
|
-
|
|
16
|
-
# Step 1: Make sure Git respects case differences
|
|
17
|
-
git config core.ignoreCase false
|
|
18
|
-
|
|
19
|
-
# Step 2: Try checkout to see if it fails and capture errors
|
|
20
|
-
ERROR_OUTPUT=$(git checkout "$TARGET_BRANCH" 2>&1) || true
|
|
21
|
-
|
|
22
|
-
# Step 3: Check if it failed due to untracked files
|
|
23
|
-
if echo "$ERROR_OUTPUT" | grep -q "would be overwritten by checkout"; then
|
|
24
|
-
echo "⚠️ Conflicting untracked files detected. Cleaning them up..."
|
|
25
|
-
|
|
26
|
-
# Extract file paths and delete them
|
|
27
|
-
echo "$ERROR_OUTPUT" |
|
|
28
|
-
grep "^\s" |
|
|
29
|
-
sed 's/^[ \t]*//' |
|
|
30
|
-
while read -r FILE; do
|
|
31
|
-
if [ -f "$FILE" ] || [ -d "$FILE" ]; then
|
|
32
|
-
echo "🗑️ Removing $FILE"
|
|
33
|
-
rm -rf "$FILE"
|
|
34
|
-
fi
|
|
35
|
-
done
|
|
36
|
-
|
|
37
|
-
echo "🔁 Retrying checkout..."
|
|
38
|
-
git checkout "$TARGET_BRANCH"
|
|
39
|
-
else
|
|
40
|
-
echo "✅ Switched to $TARGET_BRANCH successfully."
|
|
41
|
-
fi
|
|
File without changes
|