appydave-tools 0.42.0 → 0.44.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: 1f44cb8148a1bcc045a23b0f4b88a1b76c9a609756572bffa4c5796d6d003df3
4
- data.tar.gz: 20125e106e76f74440295f46e50d2e7b413776c9424811d1552383a0f278541b
3
+ metadata.gz: '048d2c3c2d7794aedd8dc635545cf6d8d25839fc53ef961493eea00f01b190d1'
4
+ data.tar.gz: 0aaa8b8a8ac1bf2dac8fa820c77393c0d064560eef8a24a5cd244fe3d35f947e
5
5
  SHA512:
6
- metadata.gz: 3dccf3450efdd0d9b62dcc181b4d8e46144ddbc7eac989949efc777be721f9160facfcde563c72839791330f9b467e705bc0fc9fee166ee5ee6dfcd6b613fbfe
7
- data.tar.gz: 24ad562b73095c83a79c8d51b3d35aa0ab027d724fb2e03059c0c4d41e078321d47c5d271f7c7e96fa52c226d08ede3b9e8eaa7992baad2dfc6c352e83befcdb
6
+ metadata.gz: c2d7411b7b375d2245af75ec9c4195704b99e77fb6f0df3e8713c0a07f060894b4f79c971eb15b8206a9ca0dd0bbb82c5e7c86cf35c3e77acbb4678abcc299a2
7
+ data.tar.gz: 2070d581ea14c80dac4f11b3a4ec3f0a0fde2b8f17ce08d99ead29cd06358b11ef05b7d285bc83f66d09f4a444c2c7d2109db394a46cc6fb5fc29f639e7122ba
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [0.43.0](https://github.com/appydave/appydave-tools/compare/v0.42.0...v0.43.0) (2025-11-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * improve DAM error messages with helpful hints and match counts ([bb4e71e](https://github.com/appydave/appydave-tools/commit/bb4e71ea064b131b7df05e61e98eefc858cbb610))
7
+
8
+ # [0.42.0](https://github.com/appydave/appydave-tools/compare/v0.41.0...v0.42.0) (2025-11-21)
9
+
10
+
11
+ ### Features
12
+
13
+ * enhance DAM CLI with version flag, improved help system, and better error messages ([086ee99](https://github.com/appydave/appydave-tools/commit/086ee99dca632c797a2783880b5eb038f7a2d6ed))
14
+
1
15
  # [0.41.0](https://github.com/appydave/appydave-tools/compare/v0.40.0...v0.41.0) (2025-11-21)
2
16
 
3
17
 
@@ -61,6 +61,12 @@ module Appydave
61
61
 
62
62
  if projects.empty?
63
63
  puts "⚠️ No projects found for brand: #{brand}"
64
+ puts ''
65
+ puts ' This could mean:'
66
+ puts ' - The brand exists but has no project directories'
67
+ puts ' - The manifest needs updating'
68
+ puts ''
69
+ puts " Try: dam manifest #{brand_arg}"
64
70
  return
65
71
  end
66
72
 
@@ -74,22 +80,25 @@ module Appydave
74
80
  name: project,
75
81
  path: project_path,
76
82
  size: size,
77
- modified: modified
83
+ modified: modified,
84
+ age: format_age(modified),
85
+ stale: stale?(modified)
78
86
  }
79
87
  end
80
88
 
81
89
  # Print table header
82
90
  puts "Projects in #{brand}:"
83
- puts 'PROJECT SIZE LAST MODIFIED PATH'
91
+ puts 'PROJECT SIZE AGE PATH'
84
92
  puts '-' * 120
85
93
 
86
94
  # Print table rows
87
95
  project_data.each do |data|
96
+ age_display = data[:stale] ? "#{data[:age]} ⚠️" : data[:age]
88
97
  puts format(
89
- '%-45s %12s %20s %s',
98
+ '%-45s %12s %15s %s',
90
99
  data[:name],
91
100
  format_size(data[:size]),
92
- format_date(data[:modified]),
101
+ age_display,
93
102
  shorten_path(data[:path])
94
103
  )
95
104
  end
@@ -105,6 +114,13 @@ module Appydave
105
114
 
106
115
  if matches.empty?
107
116
  puts "⚠️ No projects found matching pattern: #{pattern}"
117
+ puts ''
118
+ puts ' Pattern tips:'
119
+ puts ' - Use * for wildcards: b6* matches b60-b69'
120
+ puts ' - Use ? for single character: b6? matches b60-b69'
121
+ puts ' - Patterns are case-insensitive'
122
+ puts ''
123
+ puts " Try: dam list #{brand_arg} # See all projects"
108
124
  return
109
125
  end
110
126
 
@@ -118,22 +134,26 @@ module Appydave
118
134
  name: project,
119
135
  path: project_path,
120
136
  size: size,
121
- modified: modified
137
+ modified: modified,
138
+ age: format_age(modified),
139
+ stale: stale?(modified)
122
140
  }
123
141
  end
124
142
 
125
143
  # Print table header
126
- puts "Projects matching '#{pattern}' in #{brand}:"
127
- puts 'PROJECT SIZE LAST MODIFIED PATH'
144
+ match_count = matches.size
145
+ puts "#{match_count} project#{'s' if match_count != 1} matching '#{pattern}' in #{brand}:"
146
+ puts 'PROJECT SIZE AGE PATH'
128
147
  puts '-' * 120
129
148
 
130
149
  # Print table rows
131
150
  project_data.each do |data|
151
+ age_display = data[:stale] ? "#{data[:age]} ⚠️" : data[:age]
132
152
  puts format(
133
- '%-45s %12s %20s %s',
153
+ '%-45s %12s %15s %s',
134
154
  data[:name],
135
155
  format_size(data[:size]),
136
- format_date(data[:modified]),
156
+ age_display,
137
157
  shorten_path(data[:path])
138
158
  )
139
159
  end
@@ -169,6 +189,40 @@ module Appydave
169
189
  time.strftime('%Y-%m-%d %H:%M')
170
190
  end
171
191
 
192
+ # Format age as relative time (e.g., "3 days", "2 weeks")
193
+ def self.format_age(time)
194
+ return 'N/A' if time.nil?
195
+
196
+ seconds = Time.now - time
197
+ return 'just now' if seconds < 60
198
+
199
+ minutes = seconds / 60
200
+ return "#{minutes.round}m" if minutes < 60
201
+
202
+ hours = minutes / 60
203
+ return "#{hours.round}h" if hours < 24
204
+
205
+ days = hours / 24
206
+ return "#{days.round}d" if days < 7
207
+
208
+ weeks = days / 7
209
+ return "#{weeks.round}w" if weeks < 4
210
+
211
+ months = days / 30
212
+ return "#{months.round}mo" if months < 12
213
+
214
+ years = days / 365
215
+ "#{years.round}y"
216
+ end
217
+
218
+ # Check if project is stale (>90 days old)
219
+ def self.stale?(time)
220
+ return false if time.nil?
221
+
222
+ days = (Time.now - time) / 86_400 # seconds in a day
223
+ days > 90
224
+ end
225
+
172
226
  # Shorten path by replacing home directory with ~
173
227
  def self.shorten_path(path)
174
228
  path.sub(Dir.home, '~')
@@ -67,7 +67,10 @@ module Appydave
67
67
  .map { |path| File.basename(path) }
68
68
  .sort
69
69
 
70
- raise "❌ No projects found matching pattern '#{pattern}' in #{projects_dir}" if matches.empty?
70
+ if matches.empty?
71
+ raise "❌ No projects found matching pattern '#{pattern}'\n " \
72
+ "Try: dam list #{brand} # See all available projects"
73
+ end
71
74
 
72
75
  matches
73
76
  end
@@ -444,6 +444,8 @@ module Appydave
444
444
 
445
445
  unless Dir.exist?(project_dir)
446
446
  puts "❌ Project not found: #{project_dir}"
447
+ puts ''
448
+ puts " Try: dam list #{brand} # See available projects"
447
449
  return
448
450
  end
449
451
 
@@ -48,7 +48,11 @@ module Appydave
48
48
 
49
49
  unless project_entry
50
50
  puts '❌ Project not found in manifest'
51
- puts " Run: dam manifest #{brand}"
51
+ puts ''
52
+ puts ' This project exists locally but is not in the manifest.'
53
+ puts ''
54
+ puts " Try: dam manifest #{brand} # Regenerate manifest"
55
+ puts " Or: dam list #{brand} # See tracked projects"
52
56
  return
53
57
  end
54
58
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Appydave
4
4
  module Tools
5
- VERSION = '0.42.0'
5
+ VERSION = '0.44.0'
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appydave-tools",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "description": "AppyDave YouTube Automation Tools",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appydave-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.42.0
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys