add type array to artifacts
This commit is contained in:
parent
4f1c925d9a
commit
4f20da7228
1 changed files with 6 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ class ArtifactType(str, Enum):
|
|||
TEXT = "text"
|
||||
RECORD = "record"
|
||||
OBJECT = "object"
|
||||
ARRAY = "array"
|
||||
STREAM = "stream"
|
||||
UNKNOWN = "unknown"
|
||||
|
||||
|
|
@ -72,9 +73,13 @@ def get_artifact_type(custom_component, build_result) -> str:
|
|||
case str():
|
||||
result = ArtifactType.TEXT
|
||||
|
||||
case dict() | list():
|
||||
case dict():
|
||||
result = ArtifactType.OBJECT
|
||||
|
||||
case list():
|
||||
result = ArtifactType.ARRAY
|
||||
|
||||
|
||||
if result == ArtifactType.UNKNOWN:
|
||||
if isinstance(build_result, Generator):
|
||||
result = ArtifactType.STREAM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue