appydave-tools 0.35.0 → 0.36.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c9081147c515c93a4c3a45f8ca2f8f94dfc4c69b8025d78212a121dde8b70927
|
|
4
|
+
data.tar.gz: 88e44bc2c634968665123e1dcedda8bf57c415b524c14c78752f456439df712e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 418d0e01e3773faeb31c966e7875fa6d985d9fc4af9a697f48b15658a10bb55efdfc8d5f8c8c88df62854d9b8189b0d6a4df0761421db90fb4f5fda671b13086
|
|
7
|
+
data.tar.gz: 7bef2c885d0d89df18b6c9ebd91fe2c9821f91973ddb7421a6184db13e1db7f8ec4289ff4a755b3b6930be28549f7bd4786bc018f08f6b096dfc140cb167c4ab
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [0.35.0](https://github.com/appydave/appydave-tools/compare/v0.34.1...v0.35.0) (2025-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* improve s3-discover UX with table format showing file sizes, last modified, total summary, and quick action commands for share/download/cleanup ([3aa5edc](https://github.com/appydave/appydave-tools/commit/3aa5edcd70ca238c084021e0ef264d46b74557dc))
|
|
7
|
+
|
|
1
8
|
## [0.34.1](https://github.com/appydave/appydave-tools/compare/v0.34.0...v0.34.1) (2025-11-21)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -10,10 +10,27 @@ module Appydave
|
|
|
10
10
|
def get_brand(brand_key)
|
|
11
11
|
brand_key_str = brand_key.to_s
|
|
12
12
|
|
|
13
|
+
log.info "Looking up brand: '#{brand_key_str}'" if debug_mode?
|
|
14
|
+
|
|
15
|
+
# Validate data structure
|
|
16
|
+
unless data.is_a?(Hash)
|
|
17
|
+
log.error "Config data is not a Hash: #{data.class}"
|
|
18
|
+
raise "Invalid brands config: data is #{data.class}, expected Hash"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
unless data['brands'].is_a?(Hash)
|
|
22
|
+
log.error "Config data['brands'] is #{data['brands'].class}, expected Hash"
|
|
23
|
+
log.error "Available keys in data: #{data.keys.inspect}"
|
|
24
|
+
raise "Invalid brands config: 'brands' key is #{data['brands'].class}, expected Hash"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
log.info "Available brands: #{data['brands'].keys.inspect}" if debug_mode?
|
|
28
|
+
|
|
13
29
|
# Try direct key lookup first (case-insensitive)
|
|
14
30
|
brand_entry = data['brands'].find { |key, _info| key.downcase == brand_key_str.downcase }
|
|
15
31
|
if brand_entry
|
|
16
32
|
actual_key = brand_entry[0]
|
|
33
|
+
log.info "Found brand by key: '#{actual_key}'" if debug_mode?
|
|
17
34
|
return BrandInfo.new(actual_key, brand_entry[1])
|
|
18
35
|
end
|
|
19
36
|
|
|
@@ -21,10 +38,12 @@ module Appydave
|
|
|
21
38
|
brand_entry = data['brands'].find { |_key, info| info['shortcut']&.downcase == brand_key_str.downcase }
|
|
22
39
|
if brand_entry
|
|
23
40
|
actual_key = brand_entry[0]
|
|
41
|
+
log.info "Found brand by shortcut: '#{actual_key}'" if debug_mode?
|
|
24
42
|
return BrandInfo.new(actual_key, brand_entry[1])
|
|
25
43
|
end
|
|
26
44
|
|
|
27
45
|
# Return default if not found (use normalized lowercase key)
|
|
46
|
+
log.warn "Brand not found: '#{brand_key_str}', returning default" if debug_mode?
|
|
28
47
|
BrandInfo.new(brand_key_str.downcase, default_brand_info)
|
|
29
48
|
end
|
|
30
49
|
|
|
@@ -30,11 +30,31 @@ module Appydave
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def load
|
|
33
|
-
|
|
33
|
+
if debug_mode?
|
|
34
|
+
log.info "Loading config: #{config_name}"
|
|
35
|
+
log.info "Config path: #{config_path}"
|
|
36
|
+
log.info "File exists: #{File.exist?(config_path)}"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
unless File.exist?(config_path)
|
|
40
|
+
log.warn "Config file not found: #{config_path}" if debug_mode?
|
|
41
|
+
return default_data
|
|
42
|
+
end
|
|
34
43
|
|
|
44
|
+
content = File.read(config_path)
|
|
45
|
+
log.info "Config file size: #{content.bytesize} bytes" if debug_mode?
|
|
46
|
+
|
|
47
|
+
data = JSON.parse(content)
|
|
48
|
+
log.info "Config loaded successfully: #{config_name}" if debug_mode?
|
|
49
|
+
log.json data if debug_mode?
|
|
50
|
+
data
|
|
51
|
+
rescue JSON::ParserError => e
|
|
52
|
+
log.error "JSON parse error in #{config_path}: #{e.message}"
|
|
53
|
+
log.error "File content preview: #{content[0..200]}" if content
|
|
35
54
|
default_data
|
|
36
|
-
rescue
|
|
37
|
-
|
|
55
|
+
rescue StandardError => e
|
|
56
|
+
log.error "Error loading #{config_path}: #{e.message}"
|
|
57
|
+
log.error e.backtrace.first(3).join("\n") if debug_mode?
|
|
38
58
|
default_data
|
|
39
59
|
end
|
|
40
60
|
|
|
@@ -55,6 +75,10 @@ module Appydave
|
|
|
55
75
|
|
|
56
76
|
private
|
|
57
77
|
|
|
78
|
+
def debug_mode?
|
|
79
|
+
ENV['DAM_DEBUG'] == 'true' || ENV['DEBUG'] == 'true'
|
|
80
|
+
end
|
|
81
|
+
|
|
58
82
|
def default_data
|
|
59
83
|
{}
|
|
60
84
|
end
|
data/package.json
CHANGED