Initial implementation of pluginctl CLI tool
- Add comprehensive info command with plugin manifest parsing - Implement global --plugin-path flag and PLUGINCTL_PLUGIN_PATH env var - Add full test suite with fixtures for various plugin configurations - Set up build system with Makefile, goreleaser, and golangci-lint - Include development tools with pinned versions for reproducible builds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
fd6e4a4513
21 changed files with 4949 additions and 0 deletions
37
testdata/complete_plugin.json
vendored
Normal file
37
testdata/complete_plugin.json
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"id": "com.example.complete",
|
||||
"name": "Complete Test Plugin",
|
||||
"description": "A complete plugin with all features for testing",
|
||||
"version": "2.1.0",
|
||||
"min_server_version": "7.0.0",
|
||||
"server": {
|
||||
"executables": {
|
||||
"linux-amd64": "server/dist/plugin-linux-amd64",
|
||||
"darwin-amd64": "server/dist/plugin-darwin-amd64",
|
||||
"windows-amd64": "server/dist/plugin-windows-amd64.exe"
|
||||
}
|
||||
},
|
||||
"webapp": {
|
||||
"bundle_path": "webapp/dist/main.js"
|
||||
},
|
||||
"settings_schema": {
|
||||
"header": "Complete Plugin Settings",
|
||||
"footer": "Configure all settings for the complete plugin",
|
||||
"settings": [
|
||||
{
|
||||
"key": "enable_feature",
|
||||
"display_name": "Enable Main Feature",
|
||||
"type": "bool",
|
||||
"help_text": "Enable or disable the main plugin feature",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"key": "api_endpoint",
|
||||
"display_name": "API Endpoint",
|
||||
"type": "text",
|
||||
"help_text": "The API endpoint URL",
|
||||
"default": "https://api.example.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
6
testdata/invalid_plugin.json
vendored
Normal file
6
testdata/invalid_plugin.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"id": "com.example.invalid",
|
||||
"name": "Invalid Plugin",
|
||||
"version": "1.0.0",
|
||||
invalid_json_syntax: true
|
||||
}
|
5
testdata/minimal_plugin.json
vendored
Normal file
5
testdata/minimal_plugin.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"id": "com.example.minimal",
|
||||
"name": "Minimal Test Plugin",
|
||||
"version": "1.0.0"
|
||||
}
|
22
testdata/plugin.json
vendored
Normal file
22
testdata/plugin.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"id": "com.example.testplugin",
|
||||
"name": "Test Plugin",
|
||||
"description": "A test plugin for demonstrating pluginctl functionality",
|
||||
"version": "1.0.0",
|
||||
"min_server_version": "7.0.0",
|
||||
"server": {
|
||||
"executables": {
|
||||
"linux-amd64": "server/dist/plugin-linux-amd64",
|
||||
"darwin-amd64": "server/dist/plugin-darwin-amd64",
|
||||
"windows-amd64": "server/dist/plugin-windows-amd64.exe"
|
||||
}
|
||||
},
|
||||
"webapp": {
|
||||
"bundle_path": "webapp/dist/main.js"
|
||||
},
|
||||
"settings_schema": {
|
||||
"header": "Configure the Test Plugin",
|
||||
"footer": "",
|
||||
"settings": []
|
||||
}
|
||||
}
|
13
testdata/server_only_plugin.json
vendored
Normal file
13
testdata/server_only_plugin.json
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"id": "com.example.serveronly",
|
||||
"name": "Server Only Plugin",
|
||||
"description": "A plugin with only server-side code",
|
||||
"version": "1.5.0",
|
||||
"min_server_version": "8.0.0",
|
||||
"server": {
|
||||
"executables": {
|
||||
"linux-amd64": "server/dist/plugin-linux-amd64",
|
||||
"darwin-amd64": "server/dist/plugin-darwin-amd64"
|
||||
}
|
||||
}
|
||||
}
|
9
testdata/webapp_only_plugin.json
vendored
Normal file
9
testdata/webapp_only_plugin.json
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"id": "com.example.webapponly",
|
||||
"name": "Webapp Only Plugin",
|
||||
"description": "A plugin with only client-side code",
|
||||
"version": "0.9.0",
|
||||
"webapp": {
|
||||
"bundle_path": "webapp/dist/bundle.js"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue