appydave-tools 0.54.0 → 0.56.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 +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/appydave/tools/dam/status.rb +84 -1
- data/lib/appydave/tools/version.rb +1 -1
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fafd02235869c298307606541d4d8fa65642964ca8e6cc52c292265c346cba39
|
|
4
|
+
data.tar.gz: eec45f118b09d96eaa42a4a0690b0945184e9a60f73f31a552be6382043eb1aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9ee64e573e7c8f33bbe7922c9047a6cef639492a23179e7893951fe49940d25e32736c910db6c9203f5e48f125cbe068506237f296d93a1f2d5bdae00acf0561
|
|
7
|
+
data.tar.gz: 2fb3b1733efdf3f3a68d3e7ee3c3e86b6abe30e560e8038495ad0093a2ee5f1c046db036d1bf2f35d5658e8c886c5c9a24f24715c09d6538a7108d40f29adf45
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [0.55.0](https://github.com/appydave/appydave-tools/compare/v0.54.0...v0.55.0) (2025-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add suggestions section to brand status with actionable commands ([2bb51f8](https://github.com/appydave/appydave-tools/commit/2bb51f851dc424f37af85448a00a67a6b2e65847)), closes [#42](https://github.com/appydave/appydave-tools/issues/42) [#43](https://github.com/appydave/appydave-tools/issues/43)
|
|
7
|
+
|
|
8
|
+
# [0.54.0](https://github.com/appydave/appydave-tools/compare/v0.53.0...v0.54.0) (2025-11-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add brand context header to project list showing git branch, S3 config, and SSD path ([48d9523](https://github.com/appydave/appydave-tools/commit/48d9523793501c933fb78e8b68b56e18206c3d61))
|
|
14
|
+
|
|
1
15
|
# [0.53.0](https://github.com/appydave/appydave-tools/compare/v0.52.0...v0.53.0) (2025-11-21)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -76,6 +76,8 @@ module Appydave
|
|
|
76
76
|
manifest = load_manifest
|
|
77
77
|
if manifest
|
|
78
78
|
show_manifest_summary(manifest)
|
|
79
|
+
puts ''
|
|
80
|
+
show_brand_suggestions(manifest)
|
|
79
81
|
else
|
|
80
82
|
puts '❌ Manifest not found'
|
|
81
83
|
puts " Run: dam manifest #{brand}"
|
|
@@ -141,7 +143,19 @@ module Appydave
|
|
|
141
143
|
|
|
142
144
|
def show_ssd_status(project_entry)
|
|
143
145
|
puts ' 💾 SSD Backup: ✓ exists'
|
|
144
|
-
|
|
146
|
+
|
|
147
|
+
ssd_path = project_entry[:storage][:ssd][:path]
|
|
148
|
+
if ssd_path
|
|
149
|
+
ssd_full_path = File.join(brand_info.locations.ssd_backup, ssd_path)
|
|
150
|
+
puts " Path: #{ssd_path}"
|
|
151
|
+
|
|
152
|
+
if Dir.exist?(ssd_full_path)
|
|
153
|
+
last_modified = File.mtime(ssd_full_path)
|
|
154
|
+
age = format_age(last_modified)
|
|
155
|
+
puts " Last synced: #{age} ago"
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
145
159
|
puts ''
|
|
146
160
|
end
|
|
147
161
|
|
|
@@ -318,6 +332,31 @@ module Appydave
|
|
|
318
332
|
FileHelper.format_size(bytes)
|
|
319
333
|
end
|
|
320
334
|
|
|
335
|
+
def format_age(time)
|
|
336
|
+
return 'N/A' if time.nil?
|
|
337
|
+
|
|
338
|
+
seconds = Time.now - time
|
|
339
|
+
return 'just now' if seconds < 60
|
|
340
|
+
|
|
341
|
+
minutes = seconds / 60
|
|
342
|
+
return "#{minutes.round}m" if minutes < 60
|
|
343
|
+
|
|
344
|
+
hours = minutes / 60
|
|
345
|
+
return "#{hours.round}h" if hours < 24
|
|
346
|
+
|
|
347
|
+
days = hours / 24
|
|
348
|
+
return "#{days.round}d" if days < 7
|
|
349
|
+
|
|
350
|
+
weeks = days / 7
|
|
351
|
+
return "#{weeks.round}w" if weeks < 4
|
|
352
|
+
|
|
353
|
+
months = days / 30
|
|
354
|
+
return "#{months.round}mo" if months < 12
|
|
355
|
+
|
|
356
|
+
years = days / 365
|
|
357
|
+
"#{years.round}y"
|
|
358
|
+
end
|
|
359
|
+
|
|
321
360
|
def calculate_manifest_age(last_updated_str)
|
|
322
361
|
last_updated = Time.parse(last_updated_str)
|
|
323
362
|
Time.now - last_updated
|
|
@@ -349,6 +388,50 @@ module Appydave
|
|
|
349
388
|
'⚠️ Stale'
|
|
350
389
|
end
|
|
351
390
|
end
|
|
391
|
+
|
|
392
|
+
def show_brand_suggestions(manifest)
|
|
393
|
+
suggestions = []
|
|
394
|
+
|
|
395
|
+
# Check manifest age
|
|
396
|
+
if manifest[:config] && manifest[:config][:last_updated]
|
|
397
|
+
age = calculate_manifest_age(manifest[:config][:last_updated])
|
|
398
|
+
days = age / 86_400 if age
|
|
399
|
+
suggestions << "dam manifest #{brand} # Manifest is stale (#{days.round}d old)" if days && days > 7
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Check git status if repo exists
|
|
403
|
+
if git_repo?
|
|
404
|
+
status = git_status_info
|
|
405
|
+
if status[:modified_count].positive? || status[:untracked_count].positive?
|
|
406
|
+
suggestions << "git add . && git commit -m 'Update' # Uncommitted changes (#{status[:modified_count]} modified, #{status[:untracked_count]} untracked)"
|
|
407
|
+
end
|
|
408
|
+
if status[:ahead].positive?
|
|
409
|
+
suggestions << "git push # Push #{status[:ahead]} commit#{'s' if status[:ahead] != 1} to remote"
|
|
410
|
+
end
|
|
411
|
+
if status[:behind].positive?
|
|
412
|
+
suggestions << "git pull # Pull #{status[:behind]} commit#{'s' if status[:behind] != 1} from remote"
|
|
413
|
+
end
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Check for projects not backed up to SSD (task #43)
|
|
417
|
+
ssd_configured = brand_info.locations.ssd_backup &&
|
|
418
|
+
brand_info.locations.ssd_backup != 'NOT-SET'
|
|
419
|
+
if ssd_configured
|
|
420
|
+
projects_without_ssd = manifest[:projects].select do |p|
|
|
421
|
+
p[:storage][:local][:exists] && !p[:storage][:ssd][:exists]
|
|
422
|
+
end
|
|
423
|
+
if projects_without_ssd.any?
|
|
424
|
+
count = projects_without_ssd.size
|
|
425
|
+
suggestions << "dam archive #{brand} <project> # #{count} project#{'s' if count != 1} not backed up to SSD"
|
|
426
|
+
end
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Show suggestions if any
|
|
430
|
+
return unless suggestions.any?
|
|
431
|
+
|
|
432
|
+
puts '💡 Suggestions:'
|
|
433
|
+
suggestions.each { |s| puts " #{s}" }
|
|
434
|
+
end
|
|
352
435
|
end
|
|
353
436
|
end
|
|
354
437
|
end
|
data/package.json
CHANGED