foobara-typescript-react-command-form-generator 1.1.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c99e472546e0fda03a331ad3762f3517d7ec51bab2215c5ff1b6266cfceafed5
4
- data.tar.gz: 8ef847d0884a39d1397a05abc62a1458465326502990384f71af6054a4f09be9
3
+ metadata.gz: 903e593f005e51408a6d87cee35611d5eb47e7ad99a74edbc736e53a34d5face
4
+ data.tar.gz: 2f5729c0ab7631a6f505da2a3b8db1d7208668b558dc3206a15a1874460c3b3a
5
5
  SHA512:
6
- metadata.gz: 56fac14ad332146943050f8e63b19ae26fcf970a433df9f801c1371dfac6d7de3e495615af8a42b93f1f12ae43cddfb379c427fde0ba9dd1722acca591bb7f21
7
- data.tar.gz: c3be48447e0f655c046c21440da5eda655d8fa592845e8727ea9b3730d248e1b234ac0212ae6361a61d92161437448ac12316a24f278ca91ec73d14e064dbcf5
6
+ metadata.gz: 6a18843bbca13d23425bb3d4f502356d5690542f0643a2f83d33ca21101c143c0e8015372948f1d1c4b559a8d89bbd137f07627d5f71a9ddd417410b1dd5faf2
7
+ data.tar.gz: 83f5381a9e8e275cf852ad12885d6dcd5c3fc0d1ac1da29f8e2fde7336b23043ce5e0fbeccce62af9d2532f822d017063b043f439f1cdc7913aa16533166ab47
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.1.1] - 2025-10-05
2
+
3
+ - Allow using non-absolute command names
4
+
1
5
  ## [1.1.0] - 2025-08-22
2
6
 
3
7
  - Handle new Foobara 0.1.0 type declarations
@@ -43,18 +43,32 @@ module Foobara
43
43
  self.command_manifest = Manifest::Command.new(manifest_data, [:command, command_name])
44
44
  rescue Manifest::InvalidPath
45
45
  valid_keys = manifest_data["command"].keys.sort
46
- message = "Invalid command name: #{command_name}. Expected one of #{valid_keys.join(", ")}"
47
- error = BadCommandNameError.new(
48
- message:,
49
- context: {
50
- bad_name: command_name,
51
- valid_names: valid_keys
52
- },
53
- path: [:command_name]
54
- )
55
46
 
56
- add_input_error(error)
57
- halt!
47
+ suffix = command_name
48
+
49
+ unless suffix.start_with?("::")
50
+ suffix = "::#{suffix}"
51
+ end
52
+
53
+ matching_command_names = valid_keys.select { |key| key.end_with?(suffix) }
54
+
55
+ if matching_command_names.size == 1
56
+ best_command_name = matching_command_names.first
57
+ self.command_manifest = Manifest::Command.new(manifest_data, [:command, best_command_name])
58
+ else
59
+ message = "Invalid command name: #{command_name}. Expected one of #{valid_keys.join(", ")}"
60
+ error = BadCommandNameError.new(
61
+ message:,
62
+ context: {
63
+ bad_name: command_name,
64
+ valid_names: valid_keys
65
+ },
66
+ path: [:command_name]
67
+ )
68
+
69
+ add_input_error(error)
70
+ halt!
71
+ end
58
72
  end
59
73
 
60
74
  def add_command_manifest_to_set_of_elements_to_generate
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-typescript-react-command-form-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi