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"
|
TEXT = "text"
|
||||||
RECORD = "record"
|
RECORD = "record"
|
||||||
OBJECT = "object"
|
OBJECT = "object"
|
||||||
|
ARRAY = "array"
|
||||||
STREAM = "stream"
|
STREAM = "stream"
|
||||||
UNKNOWN = "unknown"
|
UNKNOWN = "unknown"
|
||||||
|
|
||||||
|
|
@ -72,9 +73,13 @@ def get_artifact_type(custom_component, build_result) -> str:
|
||||||
case str():
|
case str():
|
||||||
result = ArtifactType.TEXT
|
result = ArtifactType.TEXT
|
||||||
|
|
||||||
case dict() | list():
|
case dict():
|
||||||
result = ArtifactType.OBJECT
|
result = ArtifactType.OBJECT
|
||||||
|
|
||||||
|
case list():
|
||||||
|
result = ArtifactType.ARRAY
|
||||||
|
|
||||||
|
|
||||||
if result == ArtifactType.UNKNOWN:
|
if result == ArtifactType.UNKNOWN:
|
||||||
if isinstance(build_result, Generator):
|
if isinstance(build_result, Generator):
|
||||||
result = ArtifactType.STREAM
|
result = ArtifactType.STREAM
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue