foobara 0.1.3 → 0.1.4
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 +9 -1
- data/projects/command_connectors/src/transformed_command.rb +38 -20
- data/projects/domain/src/is_manifestable.rb +14 -4
- 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: 5ff971dedd276b649d7ceb9b184734a47074357ab20b517b01a377bf7dfedfaa
|
4
|
+
data.tar.gz: a1b07c225fdddebd6dd859650db155a7e20aca66fe0647211d5daede966b305f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d797ddc6c22d97617ffe9c1c951d66257f305dceedccaa5df80f0da3283a902a3c7acfd086dd4603957e3efa2a9f2b06a0851bb6cc420884839f79f19c70816
|
7
|
+
data.tar.gz: f57df9169e0da18ffc23d57e9fd8b2c5d218714938e4b37f1d4de1b19344774756915702d152b19ace97302b481df9bf6b9e4467db590b34f606cae2861cf44f
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,12 @@
|
|
1
|
-
# [0.1.
|
1
|
+
# [0.1.4] - 2025-08-24
|
2
|
+
|
3
|
+
- Fix TransformedCommand#foobara_manifest bug that failed to overwrite transformed possible_errors
|
4
|
+
if the new possible errors is empty
|
5
|
+
- Make sure we set nil inputs_type in TransformedCommand#foobara_manifest to empty attributes
|
6
|
+
for compatibility with other projects
|
7
|
+
- Sets the parent for various Foobara::Value children to be GlobalDomain in manifests
|
8
|
+
|
9
|
+
# [0.1.3] - 2025-08-24
|
2
10
|
|
3
11
|
- Add Command#abstract and exclude abstract commands from CommandConnector#connect when connecting domains/orgs
|
4
12
|
|
@@ -369,27 +369,45 @@ module Foobara
|
|
369
369
|
command_class.foobara_manifest
|
370
370
|
end
|
371
371
|
|
372
|
+
# TODO: This should support nil as an inputs_type but it breaks other projects for now
|
373
|
+
inputs_type = inputs_type_for_manifest&.reference_or_declaration_data ||
|
374
|
+
{ type: :attributes, element_type_declarations: {} }
|
375
|
+
|
372
376
|
# TODO: handle errors_types_depended_on!
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
377
|
+
to_merge = {
|
378
|
+
inputs_types_depended_on:,
|
379
|
+
result_types_depended_on:,
|
380
|
+
types_depended_on: types,
|
381
|
+
inputs_type:,
|
382
|
+
result_type: result_type&.reference_or_declaration_data,
|
383
|
+
possible_errors: possible_errors_manifest,
|
384
|
+
capture_unknown_error:,
|
385
|
+
inputs_transformers:,
|
386
|
+
result_transformers:,
|
387
|
+
errors_transformers:,
|
388
|
+
pre_commit_transformers:,
|
389
|
+
serializers:,
|
390
|
+
response_mutators:,
|
391
|
+
request_mutators:,
|
392
|
+
requires_authentication:,
|
393
|
+
authenticator: authenticator_details
|
394
|
+
}
|
395
|
+
|
396
|
+
manifest = manifest.dup
|
397
|
+
|
398
|
+
to_merge.each_pair do |key, value|
|
399
|
+
# TODO: we could probably remove empty strings and nils, too, and from the whole hash
|
400
|
+
# if (value.is_a?(::Hash) || value.is_a?(::Array)) && value.empty?
|
401
|
+
# manifest.delete(key)
|
402
|
+
# else
|
403
|
+
# manifest[key] = value
|
404
|
+
# end
|
405
|
+
# TODO: for now, just including everything for stability
|
406
|
+
# But we should remove all empty values in a future version
|
407
|
+
manifest[key] = value
|
408
|
+
end
|
409
|
+
|
410
|
+
manifest
|
393
411
|
end
|
394
412
|
|
395
413
|
def processors_to_manifest_symbols(processors)
|
@@ -63,16 +63,26 @@ module Foobara
|
|
63
63
|
|
64
64
|
if parent_category
|
65
65
|
if include_processors || (parent_category != :processor && parent_category != :processor_class)
|
66
|
-
if candidate
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
parent = if candidate == Foobara::Value
|
67
|
+
GlobalDomain
|
68
|
+
else
|
69
|
+
candidate
|
70
|
+
end
|
71
|
+
break
|
70
72
|
end
|
71
73
|
end
|
72
74
|
|
73
75
|
candidate = candidate.scoped_namespace
|
74
76
|
end
|
75
77
|
|
78
|
+
if parent == GlobalDomain
|
79
|
+
h[:scoped_path] = scoped_full_path
|
80
|
+
h[:scoped_name] = scoped_full_name
|
81
|
+
h[:scoped_prefix] = scoped_full_path[..-2]
|
82
|
+
h[:domain] = parent.foobara_manifest_reference
|
83
|
+
h[:organization] = parent.foobara_organization.foobara_manifest_reference
|
84
|
+
end
|
85
|
+
|
76
86
|
if parent
|
77
87
|
to_include << parent
|
78
88
|
h[:parent] = [parent_category, parent.foobara_manifest_reference]
|