appydave-tools 0.74.0 → 0.74.1
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/bin/dam +16 -16
- data/bin/zsh_history.rb +2 -14
- data/docs/architecture/cli/cli-pattern-comparison.md +147 -17
- data/docs/architecture/cli/cli-patterns.md +311 -18
- data/docs/architecture/cli/pattern-4-delegated-cli.md +1058 -0
- data/lib/appydave/tools/dam/project_listing.rb +2 -12
- data/lib/appydave/tools/jump/cli.rb +0 -8
- data/lib/appydave/tools/jump/commands/generate.rb +0 -4
- data/lib/appydave/tools/jump/formatters/table_formatter.rb +0 -2
- data/lib/appydave/tools/jump/search.rb +0 -2
- data/lib/appydave/tools/version.rb +1 -1
- data/lib/appydave/tools.rb +3 -2
- data/package.json +1 -1
- metadata +3 -2
|
@@ -10,7 +10,6 @@ module Appydave
|
|
|
10
10
|
# Project listing functionality for VAT
|
|
11
11
|
class ProjectListing
|
|
12
12
|
# List all brands with summary table
|
|
13
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
14
13
|
def self.list_brands_with_counts(detailed: false, s3: false)
|
|
15
14
|
brands = Config.available_brands
|
|
16
15
|
|
|
@@ -138,10 +137,8 @@ module Appydave
|
|
|
138
137
|
"#{total_projects} project#{'s' if total_projects != 1}, " \
|
|
139
138
|
"#{format_size(total_size)}"
|
|
140
139
|
end
|
|
141
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
|
142
140
|
|
|
143
141
|
# List all projects for a specific brand (Mode 3)
|
|
144
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
145
142
|
def self.list_brand_projects(brand_arg, detailed: false, s3: false)
|
|
146
143
|
# ProjectResolver expects the original brand key/shortcut, not the expanded v-* version
|
|
147
144
|
projects = ProjectResolver.list_projects(brand_arg)
|
|
@@ -304,10 +301,8 @@ module Appydave
|
|
|
304
301
|
puts ''
|
|
305
302
|
puts "Total: #{project_count} project#{'s' if project_count != 1}, #{format_size(total_size)}"
|
|
306
303
|
end
|
|
307
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
|
308
304
|
|
|
309
305
|
# List with pattern matching (Mode 3b)
|
|
310
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
311
306
|
def self.list_with_pattern(brand_arg, pattern)
|
|
312
307
|
# ProjectResolver expects the original brand key/shortcut, not the expanded v-* version
|
|
313
308
|
matches = ProjectResolver.resolve_pattern(brand_arg, pattern)
|
|
@@ -370,12 +365,10 @@ module Appydave
|
|
|
370
365
|
puts "Total: #{match_count} project#{'s' if match_count != 1}, #{format_size(total_size)} " \
|
|
371
366
|
"(#{percentage}% of #{brand})"
|
|
372
367
|
end
|
|
373
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
|
374
368
|
|
|
375
369
|
# Helper methods
|
|
376
370
|
|
|
377
371
|
# Show brand context header with git, S3, and SSD info
|
|
378
|
-
# rubocop:disable Metrics/AbcSize
|
|
379
372
|
def self.show_brand_header(brand_arg, brand)
|
|
380
373
|
Appydave::Tools::Configuration::Config.configure
|
|
381
374
|
brand_info = Appydave::Tools::Configuration::Config.brands.get_brand(brand_arg)
|
|
@@ -410,10 +403,8 @@ module Appydave
|
|
|
410
403
|
|
|
411
404
|
puts ''
|
|
412
405
|
end
|
|
413
|
-
# rubocop:enable Metrics/AbcSize
|
|
414
406
|
|
|
415
407
|
# Collect brand data for display
|
|
416
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
417
408
|
def self.collect_brand_data(brand, detailed: false, s3: false)
|
|
418
409
|
Appydave::Tools::Configuration::Config.configure
|
|
419
410
|
brand_info = Appydave::Tools::Configuration::Config.brands.get_brand(brand)
|
|
@@ -472,7 +463,6 @@ module Appydave
|
|
|
472
463
|
|
|
473
464
|
result
|
|
474
465
|
end
|
|
475
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength
|
|
476
466
|
|
|
477
467
|
# Calculate git status for a brand
|
|
478
468
|
def self.calculate_git_status(brand_path)
|
|
@@ -549,7 +539,7 @@ module Appydave
|
|
|
549
539
|
end
|
|
550
540
|
|
|
551
541
|
# Collect project data for display
|
|
552
|
-
# rubocop:disable Metrics/
|
|
542
|
+
# rubocop:disable Metrics/ParameterLists
|
|
553
543
|
def self.collect_project_data(brand_arg, brand_path, brand_info, project, is_git_repo, detailed: false, s3: false)
|
|
554
544
|
project_path = Config.project_path(brand_arg, project)
|
|
555
545
|
size = FileHelper.calculate_directory_size(project_path)
|
|
@@ -622,7 +612,7 @@ module Appydave
|
|
|
622
612
|
|
|
623
613
|
result
|
|
624
614
|
end
|
|
625
|
-
# rubocop:enable Metrics/
|
|
615
|
+
# rubocop:enable Metrics/ParameterLists
|
|
626
616
|
|
|
627
617
|
# Calculate total size of all projects in a brand
|
|
628
618
|
def self.calculate_total_size(brand, projects)
|
|
@@ -27,7 +27,6 @@ module Appydave
|
|
|
27
27
|
@config = config
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
# rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/AbcSize
|
|
31
30
|
def run(args = ARGV)
|
|
32
31
|
command = args.shift
|
|
33
32
|
|
|
@@ -71,7 +70,6 @@ module Appydave
|
|
|
71
70
|
output.puts e.backtrace.first(3).join("\n") if ENV['DEBUG']
|
|
72
71
|
EXIT_CONFIG_ERROR
|
|
73
72
|
end
|
|
74
|
-
# rubocop:enable Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/AbcSize
|
|
75
73
|
|
|
76
74
|
private
|
|
77
75
|
|
|
@@ -305,7 +303,6 @@ module Appydave
|
|
|
305
303
|
|
|
306
304
|
# Argument parsing helpers
|
|
307
305
|
|
|
308
|
-
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
|
|
309
306
|
def parse_location_args(args)
|
|
310
307
|
attrs = {}
|
|
311
308
|
|
|
@@ -343,7 +340,6 @@ module Appydave
|
|
|
343
340
|
|
|
344
341
|
attrs
|
|
345
342
|
end
|
|
346
|
-
# rubocop:enable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
|
|
347
343
|
|
|
348
344
|
def extract_option(args, flag)
|
|
349
345
|
index = args.index(flag)
|
|
@@ -392,7 +388,6 @@ module Appydave
|
|
|
392
388
|
output.puts 'Part of appydave-tools gem'
|
|
393
389
|
end
|
|
394
390
|
|
|
395
|
-
# rubocop:disable Metrics/MethodLength
|
|
396
391
|
def show_main_help
|
|
397
392
|
output.puts <<~HELP
|
|
398
393
|
Jump - Development Folder Location Manager
|
|
@@ -436,9 +431,7 @@ module Appydave
|
|
|
436
431
|
Run 'jump help <command>' for detailed command help.
|
|
437
432
|
HELP
|
|
438
433
|
end
|
|
439
|
-
# rubocop:enable Metrics/MethodLength
|
|
440
434
|
|
|
441
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
|
442
435
|
def show_help(args)
|
|
443
436
|
topic = args.first
|
|
444
437
|
|
|
@@ -461,7 +454,6 @@ module Appydave
|
|
|
461
454
|
show_main_help
|
|
462
455
|
end
|
|
463
456
|
end
|
|
464
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
|
465
457
|
|
|
466
458
|
def show_search_help
|
|
467
459
|
output.puts <<~HELP
|
|
@@ -201,7 +201,6 @@ module Appydave
|
|
|
201
201
|
end
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
-
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
205
204
|
def determine_ah_section(loc)
|
|
206
205
|
type = loc.type&.downcase
|
|
207
206
|
brand = loc.brand&.downcase
|
|
@@ -230,7 +229,6 @@ module Appydave
|
|
|
230
229
|
'Other'
|
|
231
230
|
end
|
|
232
231
|
end
|
|
233
|
-
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
234
232
|
|
|
235
233
|
def group_locations_for_aliases
|
|
236
234
|
grouped = {}
|
|
@@ -247,7 +245,6 @@ module Appydave
|
|
|
247
245
|
end
|
|
248
246
|
end
|
|
249
247
|
|
|
250
|
-
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
251
248
|
def build_smart_alias_sections
|
|
252
249
|
sections = []
|
|
253
250
|
locations = config.locations.dup
|
|
@@ -343,7 +340,6 @@ module Appydave
|
|
|
343
340
|
|
|
344
341
|
sections.reject { |s| s[:locations].empty? && !s[:major] }
|
|
345
342
|
end
|
|
346
|
-
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
347
343
|
|
|
348
344
|
def add_section(sections, title, locations, major: false)
|
|
349
345
|
return if locations.empty?
|
|
@@ -119,7 +119,6 @@ module Appydave
|
|
|
119
119
|
'-' * terminal_width
|
|
120
120
|
end
|
|
121
121
|
|
|
122
|
-
# rubocop:disable Metrics/AbcSize
|
|
123
122
|
def format_row(result)
|
|
124
123
|
index = result[:index].to_s.rjust(3)
|
|
125
124
|
key = pad(result[:key] || '', key_width)
|
|
@@ -138,7 +137,6 @@ module Appydave
|
|
|
138
137
|
"#{colorize(index, :dim)} #{colorize(key, :green)} #{colorize(jump, :blue)} " \
|
|
139
138
|
"#{type} #{colorize(owner, :magenta)} #{desc} #{score_indicator}"
|
|
140
139
|
end
|
|
141
|
-
# rubocop:enable Metrics/AbcSize
|
|
142
140
|
|
|
143
141
|
def key_width
|
|
144
142
|
@key_width ||= [results.map { |r| (r[:key] || '').length }.max || 10, 20].min
|
|
@@ -132,7 +132,6 @@ module Appydave
|
|
|
132
132
|
total_score
|
|
133
133
|
end
|
|
134
134
|
|
|
135
|
-
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
136
135
|
def score_for_term(location, term)
|
|
137
136
|
score = 0
|
|
138
137
|
|
|
@@ -161,7 +160,6 @@ module Appydave
|
|
|
161
160
|
|
|
162
161
|
score
|
|
163
162
|
end
|
|
164
|
-
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
165
163
|
|
|
166
164
|
def brand_alias_match?(brand_key, term)
|
|
167
165
|
return false unless brand_key
|
data/lib/appydave/tools.rb
CHANGED
|
@@ -117,8 +117,9 @@ end
|
|
|
117
117
|
|
|
118
118
|
module Appydave
|
|
119
119
|
module Tools
|
|
120
|
-
#
|
|
121
|
-
Error
|
|
120
|
+
# Custom error class for appydave-tools
|
|
121
|
+
class Error < StandardError
|
|
122
|
+
end
|
|
122
123
|
|
|
123
124
|
# Your code goes here...
|
|
124
125
|
end
|
data/package.json
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appydave-tools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.74.
|
|
4
|
+
version: 0.74.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Cruwys
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -245,6 +245,7 @@ files:
|
|
|
245
245
|
- docs/architecture/cli/cli-pattern-comparison.md
|
|
246
246
|
- docs/architecture/cli/cli-patterns.md
|
|
247
247
|
- docs/architecture/cli/exe-bin-convention.md
|
|
248
|
+
- docs/architecture/cli/pattern-4-delegated-cli.md
|
|
248
249
|
- docs/architecture/configuration/configuration-systems.md
|
|
249
250
|
- docs/architecture/dam/dam-cli-enhancements.md
|
|
250
251
|
- docs/architecture/dam/dam-cli-implementation-guide.md
|