Skip to content

Commit 8b57bc5

Browse files
committed
🔧 Release v3.0.2: Fix --access-list-update command
🐛 Bug Fixes: - Fixed --access-list-update command not working with arguments - Resolved 'Unknown option: 123' error when using --access-list-update 123 --name 'new_name' - Corrected JSON payload structure to match API schema expectations 🔧 Technical Improvements: - Enhanced argument parsing for access list operations - Updated payload structure to use satisfy_any (boolean) instead of satisfy (string) - Removed unsupported fields (auth_type, whitelist) from API payload - Added support for --name, --satisfy, and --pass-auth options - Improved error handling and validation 📝 Documentation: - Updated version numbers in all files (3.0.1 → 3.0.2) - Added comprehensive changelog entry - Updated README badges and version references Closes #21
1 parent 5770f29 commit 8b57bc5

File tree

3 files changed

+177
-153
lines changed

3 files changed

+177
-153
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,47 @@
22

33
All notable changes to the npm-api.sh script will be documented in this file.
44

5+
## [3.0.2] - 2025-01-20
6+
7+
### 🐛 Bug Fixes
8+
9+
- **Fixed `--access-list-update` command not working with arguments**
10+
- **Issue**: The command `./npm-api.sh --access-list-update 123 --name "new_name"` was failing with "Unknown option: 123" error
11+
- **Root Cause**: The argument parsing for `--access-list-update` was not properly capturing the access list ID and subsequent arguments
12+
- **Solution**:
13+
- Fixed argument parsing to properly capture the access list ID
14+
- Implemented proper argument storage and passing to the function
15+
- Corrected JSON payload structure to match API schema expectations
16+
- **Technical Details**:
17+
- Changed from interactive `read` prompts to command-line argument processing
18+
- Updated payload structure to use `satisfy_any` (boolean) instead of `satisfy` (string)
19+
- Removed unsupported fields (`auth_type`, `whitelist`) from API payload
20+
- Added support for `--name`, `--satisfy`, and `--pass-auth` options
21+
- **Usage Examples**:
22+
```bash
23+
# Update access list name
24+
./npm-api.sh --access-list-update 4 --name "new_name"
25+
26+
# Update satisfaction mode
27+
./npm-api.sh --access-list-update 4 --satisfy any
28+
29+
# Update multiple properties
30+
./npm-api.sh --access-list-update 4 --name "test_script" --satisfy any
31+
```
32+
33+
### 🔧 Technical Improvements
34+
35+
- **Enhanced Argument Processing**: Improved command-line argument parsing for access list operations
36+
- **API Schema Compliance**: Updated JSON payload structure to match official NPM API schema
37+
- **Error Handling**: Better error messages and validation for access list operations
38+
- **Code Consistency**: Aligned `access_list_update` function structure with `access_list_create`
39+
40+
### 📝 Documentation Updates
41+
42+
- Updated help messages and examples for `--access-list-update` command
43+
- Added proper usage examples in error messages
44+
- Improved command-line argument validation feedback
45+
546
## [3.0.0] - 2025-03-24
647

748
### 🔄 Breaking Changes

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Stargazers][stars-shield]][stars]
77

88

9-
# Nginx Proxy Manager CLI Script V3.0.1 🚀
9+
# Nginx Proxy Manager CLI Script V3.0.2 🚀
1010

1111
## Table of Contents
1212

@@ -607,8 +607,8 @@ MIT License - see the [LICENSE.md][license] file for details
607607
[license]: https://github.com/Erreur32/nginx-proxy-manager-Bash-API/blob/main/LICENSE.md
608608
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg
609609
[project-stage-shield]: https://img.shields.io/badge/project%20stage-stable-green.svg
610-
[release-shield]: https://img.shields.io/badge/version-v3.0.1-blue.svg
611-
[release]: https://github.com/Erreur32/nginx-proxy-manager-Bash-API/releases/tag/v3.0.1
610+
[release-shield]: https://img.shields.io/badge/version-v3.0.2-blue.svg
611+
[release]: https://github.com/Erreur32/nginx-proxy-manager-Bash-API/releases/tag/v3.0.2
612612
[contributors-shield]: https://img.shields.io/github/contributors/Erreur32/nginx-proxy-manager-Bash-API.svg
613613
[license-shield]: https://img.shields.io/github/license/Erreur32/nginx-proxy-manager-Bash-API.svg
614614
[issues-shield]: https://img.shields.io/github/issues/Erreur32/nginx-proxy-manager-Bash-API.svg

0 commit comments

Comments
 (0)