appydave-tools 0.40.0 → 0.41.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 +7 -0
- data/lib/appydave/tools/dam/project_listing.rb +1 -1
- data/lib/appydave/tools/dam/s3_operations.rb +33 -0
- data/lib/appydave/tools/dam/status.rb +1 -10
- 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: d87056ef6a0201fc1d722295aec17a46fa2c53a7581e9236db94369c8425ea9d
|
|
4
|
+
data.tar.gz: 24eadac450c656d2c4f0e38b36a0683a2fa096c02df913d97c580d6c7e109c34
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4390b2ec24eda2540a79fcb9dc0edea9c40d9d50e2cbf9720c56fa624071677a1e97f15be23f1cc63a7dbcb56c2a453bd28722154f0fbe0376689f6992110a79
|
|
7
|
+
data.tar.gz: fc43acf77aeb8c132cc1ed02172366b4eadfee12b50bcbe138694cfc4ff1e00fd6fbfb847a12046ee0b81576fdb9a18214a9a88d341e7fb05d65b95407d77517
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [0.40.0](https://github.com/appydave/appydave-tools/compare/v0.39.0...v0.40.0) (2025-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add S3 overwrite warnings with timestamp comparison to prevent data loss ([e922891](https://github.com/appydave/appydave-tools/commit/e922891d9ae87328f5a7cffe5e827f08232c90cc))
|
|
7
|
+
|
|
1
8
|
# [0.39.0](https://github.com/appydave/appydave-tools/compare/v0.38.0...v0.39.0) (2025-11-21)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -150,7 +150,7 @@ module Appydave
|
|
|
150
150
|
|
|
151
151
|
# Find the most recent modification time across all projects
|
|
152
152
|
def self.find_last_modified(brand, projects)
|
|
153
|
-
return
|
|
153
|
+
return nil if projects.empty?
|
|
154
154
|
|
|
155
155
|
projects.map do |project|
|
|
156
156
|
File.mtime(Config.project_path(brand, project))
|
|
@@ -271,10 +271,21 @@ module Appydave
|
|
|
271
271
|
|
|
272
272
|
if s3_files.empty? && local_files.empty?
|
|
273
273
|
puts "❌ No files found in S3 or locally for #{brand}/#{project_id}"
|
|
274
|
+
puts ' This project has no heavy files in s3-staging/ or S3.'
|
|
275
|
+
puts " Tip: Add files to #{File.basename(staging_dir)}/ folder, then run: dam s3-up"
|
|
274
276
|
return
|
|
275
277
|
end
|
|
276
278
|
|
|
277
279
|
puts "📊 S3 Sync Status for #{brand}/#{project_id}"
|
|
280
|
+
|
|
281
|
+
# Show last sync time
|
|
282
|
+
if s3_files.any?
|
|
283
|
+
most_recent = s3_files.map { |f| f['LastModified'] }.compact.max
|
|
284
|
+
if most_recent
|
|
285
|
+
time_ago = format_time_ago(Time.now - most_recent)
|
|
286
|
+
puts " Last synced: #{time_ago} ago (#{most_recent.strftime('%Y-%m-%d %H:%M')})"
|
|
287
|
+
end
|
|
288
|
+
end
|
|
278
289
|
puts ''
|
|
279
290
|
|
|
280
291
|
# Combine all file paths (S3 + local)
|
|
@@ -563,6 +574,28 @@ module Appydave
|
|
|
563
574
|
end
|
|
564
575
|
end
|
|
565
576
|
|
|
577
|
+
def format_time_ago(seconds)
|
|
578
|
+
return 'just now' if seconds < 60
|
|
579
|
+
|
|
580
|
+
minutes = seconds / 60
|
|
581
|
+
return "#{minutes.round} minute#{'s' if minutes > 1}" if minutes < 60
|
|
582
|
+
|
|
583
|
+
hours = minutes / 60
|
|
584
|
+
return "#{hours.round} hour#{'s' if hours > 1}" if hours < 24
|
|
585
|
+
|
|
586
|
+
days = hours / 24
|
|
587
|
+
return "#{days.round} day#{'s' if days > 1}" if days < 7
|
|
588
|
+
|
|
589
|
+
weeks = days / 7
|
|
590
|
+
return "#{weeks.round} week#{'s' if weeks > 1}" if weeks < 4
|
|
591
|
+
|
|
592
|
+
months = days / 30
|
|
593
|
+
return "#{months.round} month#{'s' if months > 1}" if months < 12
|
|
594
|
+
|
|
595
|
+
years = days / 365
|
|
596
|
+
"#{years.round} year#{'s' if years > 1}"
|
|
597
|
+
end
|
|
598
|
+
|
|
566
599
|
def detect_content_type(filename)
|
|
567
600
|
ext = File.extname(filename).downcase
|
|
568
601
|
case ext
|
|
@@ -60,15 +60,6 @@ module Appydave
|
|
|
60
60
|
puts "📊 Brand Status: v-#{brand}"
|
|
61
61
|
puts ''
|
|
62
62
|
|
|
63
|
-
# Show git remote (with self-healing)
|
|
64
|
-
remote = Config.git_remote(brand)
|
|
65
|
-
if remote
|
|
66
|
-
puts "📡 Git Remote: #{remote}"
|
|
67
|
-
else
|
|
68
|
-
puts '📡 Git Remote: Not configured (not a git repository)'
|
|
69
|
-
end
|
|
70
|
-
puts ''
|
|
71
|
-
|
|
72
63
|
# Show git status
|
|
73
64
|
if git_repo?
|
|
74
65
|
show_brand_git_status
|
|
@@ -108,7 +99,7 @@ module Appydave
|
|
|
108
99
|
local = project_entry[:storage][:local]
|
|
109
100
|
|
|
110
101
|
if local[:exists]
|
|
111
|
-
puts
|
|
102
|
+
puts ' 📁 Local: ✓ exists'
|
|
112
103
|
puts " Heavy files: #{local[:has_heavy_files] ? 'yes' : 'no'}"
|
|
113
104
|
puts " Light files: #{local[:has_light_files] ? 'yes' : 'no'}"
|
|
114
105
|
else
|
data/package.json
CHANGED