appydave-tools 0.60.0 → 0.62.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/project_listing.rb +73 -29
- 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: 31313668ea571125fb5d78028fab7fcf4ca9790c43031ca62d592c40c2cb795a
|
|
4
|
+
data.tar.gz: 161c917a9b7f06c07506a40c34cca50135d0a8076e8b80b08ac2eef59131f95a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82e18ea51b52107e13791156e787c6e209c9fa27f06ab758a51dfb73007a40ab9f036f7b5176059cb7ee06d11ed7af18f20d0444421f5c1169b1f64c8d223d51
|
|
7
|
+
data.tar.gz: 174f057cfa04c88f6c0ac53062ee604461e60d2fa68552b13977ba86960dd1c627f7c281c6883b1644067ef13d88e3dbe6abd3021044b1a3a6be6c1f36b3836c
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [0.61.0](https://github.com/appydave/appydave-tools/compare/v0.60.0...v0.61.0) (2025-11-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add GIT STATUS column to brand list showing clean/changes indicator ([8159990](https://github.com/appydave/appydave-tools/commit/8159990abe1f0fa8eeabaac022cf8ba0736486bb))
|
|
7
|
+
|
|
8
|
+
# [0.60.0](https://github.com/appydave/appydave-tools/compare/v0.59.0...v0.60.0) (2025-11-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* remove PATH column from brand list default view to focus on key metadata ([2920537](https://github.com/appydave/appydave-tools/commit/2920537e8fcf93f6472b50a7a6b3d8ae23426489))
|
|
14
|
+
|
|
1
15
|
# [0.59.0](https://github.com/appydave/appydave-tools/compare/v0.58.0...v0.59.0) (2025-11-22)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -19,35 +19,11 @@ module Appydave
|
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
# Gather brand data
|
|
22
|
-
brand_data = brands.map
|
|
23
|
-
Appydave::Tools::Configuration::Config.configure
|
|
24
|
-
brand_info = Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
25
|
-
brand_path = Config.brand_path(brand)
|
|
26
|
-
projects = ProjectResolver.list_projects(brand)
|
|
27
|
-
total_size = calculate_total_size(brand, projects)
|
|
28
|
-
last_modified = find_last_modified(brand, projects)
|
|
29
|
-
|
|
30
|
-
# Get shortcut, key, and name with fallbacks
|
|
31
|
-
shortcut = brand_info.shortcut&.strip
|
|
32
|
-
shortcut = nil if shortcut&.empty?
|
|
33
|
-
key = brand_info.key
|
|
34
|
-
name = brand_info.name&.strip
|
|
35
|
-
name = nil if name&.empty?
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
shortcut: shortcut || key,
|
|
39
|
-
key: key,
|
|
40
|
-
name: name || key.capitalize,
|
|
41
|
-
path: brand_path,
|
|
42
|
-
count: projects.size,
|
|
43
|
-
size: total_size,
|
|
44
|
-
modified: last_modified
|
|
45
|
-
}
|
|
46
|
-
end
|
|
22
|
+
brand_data = brands.map { |brand| collect_brand_data(brand) }
|
|
47
23
|
|
|
48
24
|
# Print table header
|
|
49
|
-
puts 'BRAND KEY PROJECTS SIZE LAST MODIFIED'
|
|
50
|
-
puts '-' *
|
|
25
|
+
puts 'BRAND KEY PROJECTS SIZE LAST MODIFIED GIT S3 SYNC'
|
|
26
|
+
puts '-' * 130
|
|
51
27
|
|
|
52
28
|
# Print table rows
|
|
53
29
|
brand_data.each do |data|
|
|
@@ -55,12 +31,14 @@ module Appydave
|
|
|
55
31
|
brand_display = "#{data[:shortcut]} - #{data[:name]}"
|
|
56
32
|
|
|
57
33
|
puts format(
|
|
58
|
-
'%-30s %-12s %10d %12s %20s',
|
|
34
|
+
'%-30s %-12s %10d %12s %20s %-15s %-10s',
|
|
59
35
|
brand_display,
|
|
60
36
|
data[:key],
|
|
61
37
|
data[:count],
|
|
62
38
|
format_size(data[:size]),
|
|
63
|
-
format_date(data[:modified])
|
|
39
|
+
format_date(data[:modified]),
|
|
40
|
+
data[:git_status],
|
|
41
|
+
data[:s3_sync]
|
|
64
42
|
)
|
|
65
43
|
end
|
|
66
44
|
|
|
@@ -241,6 +219,72 @@ module Appydave
|
|
|
241
219
|
puts ''
|
|
242
220
|
end
|
|
243
221
|
|
|
222
|
+
# Collect brand data for display
|
|
223
|
+
def self.collect_brand_data(brand)
|
|
224
|
+
Appydave::Tools::Configuration::Config.configure
|
|
225
|
+
brand_info = Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
226
|
+
brand_path = Config.brand_path(brand)
|
|
227
|
+
projects = ProjectResolver.list_projects(brand)
|
|
228
|
+
total_size = calculate_total_size(brand, projects)
|
|
229
|
+
last_modified = find_last_modified(brand, projects)
|
|
230
|
+
|
|
231
|
+
# Get shortcut, key, and name with fallbacks
|
|
232
|
+
shortcut = brand_info.shortcut&.strip
|
|
233
|
+
shortcut = nil if shortcut&.empty?
|
|
234
|
+
key = brand_info.key
|
|
235
|
+
name = brand_info.name&.strip
|
|
236
|
+
name = nil if name&.empty?
|
|
237
|
+
|
|
238
|
+
# Get git status
|
|
239
|
+
git_status = calculate_git_status(brand_path)
|
|
240
|
+
|
|
241
|
+
# Get S3 sync status (count of projects with s3-staging)
|
|
242
|
+
s3_sync_status = calculate_s3_sync_status(brand, projects)
|
|
243
|
+
|
|
244
|
+
{
|
|
245
|
+
shortcut: shortcut || key,
|
|
246
|
+
key: key,
|
|
247
|
+
name: name || key.capitalize,
|
|
248
|
+
path: brand_path,
|
|
249
|
+
count: projects.size,
|
|
250
|
+
size: total_size,
|
|
251
|
+
modified: last_modified,
|
|
252
|
+
git_status: git_status,
|
|
253
|
+
s3_sync: s3_sync_status
|
|
254
|
+
}
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Calculate git status for a brand
|
|
258
|
+
def self.calculate_git_status(brand_path)
|
|
259
|
+
if Dir.exist?(File.join(brand_path, '.git'))
|
|
260
|
+
modified = GitHelper.modified_files_count(brand_path)
|
|
261
|
+
untracked = GitHelper.untracked_files_count(brand_path)
|
|
262
|
+
if modified.positive? || untracked.positive?
|
|
263
|
+
'⚠️ changes'
|
|
264
|
+
else
|
|
265
|
+
'✓ clean'
|
|
266
|
+
end
|
|
267
|
+
else
|
|
268
|
+
'N/A'
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Calculate S3 sync status for a brand
|
|
273
|
+
def self.calculate_s3_sync_status(brand, projects)
|
|
274
|
+
return 'N/A' if projects.empty?
|
|
275
|
+
|
|
276
|
+
s3_count = projects.count do |project|
|
|
277
|
+
project_path = Config.project_path(brand, project)
|
|
278
|
+
Dir.exist?(File.join(project_path, 's3-staging'))
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if s3_count.zero?
|
|
282
|
+
'none'
|
|
283
|
+
else
|
|
284
|
+
"#{s3_count}/#{projects.size}"
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
|
|
244
288
|
# Calculate total size of all projects in a brand
|
|
245
289
|
def self.calculate_total_size(brand, projects)
|
|
246
290
|
projects.sum do |project|
|
data/package.json
CHANGED