versacommerce-cli 1.0.1 → 1.0.2
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.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/.claude/.DS_Store +0 -0
- data/.claude/commands/verco.md +1 -1
- data/CHANGELOG.md +27 -0
- data/README.md +50 -0
- data/lib/versacommerce/cli/theme.rb +30 -5
- data/lib/versacommerce/cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87c394a73bf23a9d5319ecdfe3bd1ece0fd5cfb6c5f429f073f4bb3c852703b2
|
|
4
|
+
data.tar.gz: 3a6b7eaa801ecc6156ff35dff39a529f4496bd3c2ede91ea585baea0f01e14b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d6062022d718fb361ee841133626c28e9d1e5548ca24322fab1acd416355645cf50f522b1bd773f2b323809e21c69c984c410576651ed94e239442fa935db7bf
|
|
7
|
+
data.tar.gz: d0f036ef550b5b8c5e7603f612d510116435037ca80cd32f367666ebba363d590255d588df051414ba7272af0cd21fadab321d93025dd61efeaf52fe307962ca
|
data/.DS_Store
CHANGED
|
Binary file
|
data/.claude/.DS_Store
CHANGED
|
Binary file
|
data/.claude/commands/verco.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
1. Analyze the changes made in this version
|
|
2
|
-
2. bump the app version number (
|
|
2
|
+
2. bump the app version number (lib/versacommerce/cli/version.rb) - new features should increase the minor version number, bug fixes should increase the patch version number. breaking changes should increase the major version number.
|
|
3
3
|
3. update a changelog file (CHANGELOG.md) with a short message to reflect the changes made in this version
|
|
4
4
|
4. commit the changes with a short, but descriptive message, include version number
|
|
5
5
|
5. push the changes to the remote repository
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.2] - 2025-10-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `--ssl-verify` / `--no-ssl-verify` option to control SSL certificate verification
|
|
12
|
+
- `--base-url` / `-b` option to specify custom Theme API endpoint
|
|
13
|
+
- Support for `SSL_VERIFY` environment variable
|
|
14
|
+
- Support for `THEME_API_BASE_URL` environment variable
|
|
15
|
+
- Configuration file support for `ssl_verify` and `base_url` settings
|
|
16
|
+
- Comprehensive help descriptions for all CLI options
|
|
17
|
+
- Documentation for new options in README
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- All class options now include descriptive help text
|
|
21
|
+
- Client initialization updated to pass `ssl_verify` and `base_url` parameters
|
|
22
|
+
|
|
23
|
+
## [1.0.1] - Previous Release
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- Updated to Ruby 3.1+
|
|
27
|
+
- Updated dependencies
|
data/README.md
CHANGED
|
@@ -57,6 +57,56 @@ THEME_AUTHORIZATION=YOUR_AUTHORIZATION vc-theme <subcommand>
|
|
|
57
57
|
5.
|
|
58
58
|
Provide an implicit config file. Same as 2, but the config file location is fix to `~/.config/versacommerce/cli/config.yml`.
|
|
59
59
|
|
|
60
|
+
#### Additional Options
|
|
61
|
+
|
|
62
|
+
All `vc-theme` subcommands support the following additional options:
|
|
63
|
+
|
|
64
|
+
##### SSL Verification
|
|
65
|
+
|
|
66
|
+
By default, SSL certificate verification is enabled. You can disable it for development/testing environments with self-signed certificates:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
$ vc-theme <subcommand> --no-ssl-verify
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or via environment variable:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
$ SSL_VERIFY=false vc-theme <subcommand>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Or in your config file:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
authorization: YOUR_AUTHORIZATION
|
|
82
|
+
ssl_verify: false
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Warning:** Disabling SSL verification is not recommended for production environments.
|
|
86
|
+
|
|
87
|
+
##### Custom Base URL
|
|
88
|
+
|
|
89
|
+
If you need to connect to a different API endpoint (e.g., staging environment):
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
$ vc-theme <subcommand> --base-url=https://staging-theme-api.example.com
|
|
93
|
+
# or using the short alias:
|
|
94
|
+
$ vc-theme <subcommand> -b https://staging-theme-api.example.com
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Or via environment variable:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
$ THEME_API_BASE_URL=https://staging-theme-api.example.com vc-theme <subcommand>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Or in your config file:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
authorization: YOUR_AUTHORIZATION
|
|
107
|
+
base_url: https://staging-theme-api.example.com
|
|
108
|
+
```
|
|
109
|
+
|
|
60
110
|
#### Quicksaving Authorization
|
|
61
111
|
|
|
62
112
|
You can quicksave the given authorization (from any source) to a config.yml file inside the working directory using the --save-config command line option:
|
|
@@ -15,10 +15,12 @@ module Versacommerce
|
|
|
15
15
|
true
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
class_option :authorization, aliases: :a
|
|
19
|
-
class_option :config, banner: 'CONFIG_PATH', aliases: :c
|
|
20
|
-
class_option :verbose, type: :boolean, aliases: :v
|
|
21
|
-
class_option :save_config, banner: 'CONFIG_PATH', aliases: :s
|
|
18
|
+
class_option :authorization, aliases: :a, desc: 'API authorization token'
|
|
19
|
+
class_option :config, banner: 'CONFIG_PATH', aliases: :c, desc: 'Path to config file'
|
|
20
|
+
class_option :verbose, type: :boolean, aliases: :v, desc: 'Enable verbose logging'
|
|
21
|
+
class_option :save_config, banner: 'CONFIG_PATH', aliases: :s, desc: 'Save config to file'
|
|
22
|
+
class_option :ssl_verify, type: :boolean, default: true, desc: 'Verify SSL certificates (default: true)'
|
|
23
|
+
class_option :base_url, aliases: :b, desc: 'Theme API base URL (default: https://theme-api.versacommerce.de)'
|
|
22
24
|
|
|
23
25
|
desc 'download', 'Downloads a complete Theme from the Theme API.'
|
|
24
26
|
option :path, default: './theme'
|
|
@@ -123,7 +125,11 @@ module Versacommerce
|
|
|
123
125
|
end
|
|
124
126
|
|
|
125
127
|
def client
|
|
126
|
-
@client ||=
|
|
128
|
+
@client ||= begin
|
|
129
|
+
client_options = {authorization: authorization, ssl_verify: ssl_verify}
|
|
130
|
+
client_options[:base_url] = base_url if base_url
|
|
131
|
+
ThemeAPIClient.new(client_options)
|
|
132
|
+
end
|
|
127
133
|
end
|
|
128
134
|
|
|
129
135
|
def save_config
|
|
@@ -160,6 +166,25 @@ module Versacommerce
|
|
|
160
166
|
options[:authorization] || explicit_config['authorization'] || implicit_pwd_config['authorization'] || ENV['THEME_AUTHORIZATION'] || implicit_config['authorization']
|
|
161
167
|
end
|
|
162
168
|
|
|
169
|
+
def ssl_verify
|
|
170
|
+
# Check CLI option first (can be true, false, or nil if not provided)
|
|
171
|
+
return options[:ssl_verify] unless options[:ssl_verify].nil?
|
|
172
|
+
|
|
173
|
+
# Check config files
|
|
174
|
+
config_value = explicit_config['ssl_verify'] || implicit_pwd_config['ssl_verify'] || implicit_config['ssl_verify']
|
|
175
|
+
return config_value unless config_value.nil?
|
|
176
|
+
|
|
177
|
+
# Check environment variable (SSL_VERIFY=false to disable)
|
|
178
|
+
return false if ENV['SSL_VERIFY'] == 'false'
|
|
179
|
+
|
|
180
|
+
# Default to true (secure by default)
|
|
181
|
+
true
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def base_url
|
|
185
|
+
options[:base_url] || explicit_config['base_url'] || implicit_pwd_config['base_url'] || ENV['THEME_API_BASE_URL'] || implicit_config['base_url']
|
|
186
|
+
end
|
|
187
|
+
|
|
163
188
|
def explicit_config
|
|
164
189
|
@explicit_config ||= options[:config] ? YAML.load_file(options[:config], permitted_classes: [Symbol]) : {}
|
|
165
190
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: versacommerce-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- VersaCommerce GmbH
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-10-
|
|
11
|
+
date: 2025-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|
|
@@ -139,6 +139,7 @@ files:
|
|
|
139
139
|
- ".claude/tasks/ruby-3.3-upgrade/onboarding.md"
|
|
140
140
|
- ".gitignore"
|
|
141
141
|
- ".ruby-version"
|
|
142
|
+
- CHANGELOG.md
|
|
142
143
|
- CLAUDE.md
|
|
143
144
|
- Gemfile
|
|
144
145
|
- LICENSE.txt
|