refactor(artifact): simplify extraction and inventory results
This commit is contained in:
@@ -16,49 +16,37 @@ const inventory = (digit: string) => {
|
||||
occurrence_count: 1,
|
||||
edge_count: 0,
|
||||
},
|
||||
nodes: {
|
||||
items: [
|
||||
{
|
||||
artifact_id: artifactId,
|
||||
kind: "resource",
|
||||
format: "file",
|
||||
sha256: sha,
|
||||
size: 1,
|
||||
media_type: null,
|
||||
architecture: null,
|
||||
executable: false,
|
||||
content_state: "materialized",
|
||||
limitations: [],
|
||||
},
|
||||
],
|
||||
offset: 0,
|
||||
limit: 100,
|
||||
total: 1,
|
||||
next_offset: null,
|
||||
},
|
||||
occurrences: {
|
||||
items: [
|
||||
{
|
||||
occurrence_id: occurrenceId,
|
||||
artifact_id: artifactId,
|
||||
parent_occurrence_id: null,
|
||||
logical_path: ".",
|
||||
entry_kind: "file",
|
||||
declared_size: 1,
|
||||
compressed_size: null,
|
||||
executable: false,
|
||||
encrypted: false,
|
||||
hash_status: "verified",
|
||||
source_location: null,
|
||||
limitations: [],
|
||||
},
|
||||
],
|
||||
offset: 0,
|
||||
limit: 100,
|
||||
total: 1,
|
||||
next_offset: null,
|
||||
},
|
||||
edges: { items: [], offset: 0, limit: 100, total: 0, next_offset: null },
|
||||
nodes: [
|
||||
{
|
||||
artifact_id: artifactId,
|
||||
kind: "resource",
|
||||
format: "file",
|
||||
sha256: sha,
|
||||
size: 1,
|
||||
media_type: null,
|
||||
architecture: null,
|
||||
executable: false,
|
||||
content_state: "materialized",
|
||||
limitations: [],
|
||||
},
|
||||
],
|
||||
occurrences: [
|
||||
{
|
||||
occurrence_id: occurrenceId,
|
||||
artifact_id: artifactId,
|
||||
parent_occurrence_id: null,
|
||||
logical_path: ".",
|
||||
entry_kind: "file",
|
||||
declared_size: 1,
|
||||
compressed_size: null,
|
||||
executable: false,
|
||||
encrypted: false,
|
||||
hash_status: "verified",
|
||||
source_location: null,
|
||||
limitations: [],
|
||||
},
|
||||
],
|
||||
edges: [],
|
||||
limits: {
|
||||
max_entries: 100,
|
||||
max_total_bytes: 1024,
|
||||
|
||||
Reference in New Issue
Block a user