foobara 0.0.76 → 0.0.77

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: 28b5b9f5d6b3a5653bc38a0dfb4dbf35510e692af15b290a7a5e4451e106e502
4
- data.tar.gz: 6ee408c54dddef46a85c6d0231540b3db7a72949b078bc20fab9586a60f30cb6
3
+ metadata.gz: 0d8328e6e32b886f4ab2c9f26d0f73e807f4824670901f6209ca95764d5fd1e1
4
+ data.tar.gz: b4bd0a4a496d95dfd82628141b1748a015175e9a8dcad984fdfa06aa083179ba
5
5
  SHA512:
6
- metadata.gz: 22fb23408e9736ef8f9bef4f7331240e29be7eb23997af9b29ef7ebcc450eddce596a35310ac8e2fc1cd69004114eafb6e8abc756c125a0877b48023e4091e96
7
- data.tar.gz: 799835d961d601450e42fdbe727d8b2c02bd12001fcb4aec7a356d95f9a511e2bcedeab4748db85c85e5b549c9aa1c374485cabee29108dab9e1b469e57b29d6
6
+ metadata.gz: e0f0d359032d5fea384357170e857dccab11cd3ddbf4fd371adf26e12924780eba37d7a72223da4de9ca6d3139d8a043157980d7187975ec9b6d9a0b2facd78e
7
+ data.tar.gz: 47b0a82a02bd4c802014eadfd253f02133853da8da71d005e0d704567dbfb2e497c69796deb9e1baa2baa0f1dc36e35bfeadde9d3dfa753a5a718ae2a887e09c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # [0.0.77] - 2025-03-17
2
+
3
+ - Patch up command connector manifest errors to have their domain be their parent if they're scoped
4
+ to a command that wasn't connected
5
+
1
6
  # [0.0.76] - 2025-03-17
2
7
 
3
8
  - Add ErrorCollection#clear
@@ -425,7 +425,9 @@ module Foobara
425
425
  end
426
426
  end
427
427
 
428
- normalize_manifest(h)
428
+ h = normalize_manifest(h)
429
+
430
+ patch_up_broken_parents_for_errors_with_missing_command_parents(h)
429
431
  end
430
432
 
431
433
  def normalize_manifest(manifest_hash)
@@ -434,6 +436,38 @@ module Foobara
434
436
  end.sort.to_h
435
437
  end
436
438
 
439
+ def patch_up_broken_parents_for_errors_with_missing_command_parents(manifest_hash)
440
+ root_manifest = Manifest::RootManifest.new(manifest_hash)
441
+
442
+ error_category = {}
443
+
444
+ root_manifest.errors.each do |error|
445
+ error_manifest = if error.parent_category == :command &&
446
+ !root_manifest.contains?(error.parent_name, error.parent_category)
447
+ domain = error.domain
448
+ index = domain.scoped_full_path.size
449
+
450
+ fixed_scoped_path = error.scoped_full_path[index..]
451
+ fixed_scoped_name = fixed_scoped_path.join("::")
452
+ fixed_scoped_prefix = fixed_scoped_path[..-2]
453
+ fixed_parent = [:domain, domain.full_domain_name]
454
+
455
+ error.relevant_manifest.merge(
456
+ parent: fixed_parent,
457
+ scoped_path: fixed_scoped_path,
458
+ scoped_name: fixed_scoped_name,
459
+ scoped_prefix: fixed_scoped_prefix
460
+ )
461
+ else
462
+ error.relevant_manifest
463
+ end
464
+
465
+ error_category[error.scoped_full_name.to_sym] = error_manifest
466
+ end
467
+
468
+ manifest_hash.merge(error: error_category)
469
+ end
470
+
437
471
  def all_exposed_commands
438
472
  process_delayed_connections
439
473
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.76
4
+ version: 0.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi