X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ed9321c52cef8fbb9f29d4cf1c2145fbfa90f297..f5ba9e7b5919aeea4ba208c9ca82ca4b79313d56:/src/services/collection-files-service/collection-manifest-mapper.ts diff --git a/src/services/collection-files-service/collection-manifest-mapper.ts b/src/services/collection-files-service/collection-manifest-mapper.ts index 327ee9959b..6e64f833e5 100644 --- a/src/services/collection-files-service/collection-manifest-mapper.ts +++ b/src/services/collection-files-service/collection-manifest-mapper.ts @@ -2,13 +2,13 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { uniqBy, flow, groupBy } from 'lodash'; -import { KeepManifestStream, KeepManifestStreamFile, KeepManifest } from "../../models/keep-manifest"; -import { TreeNode, setNode, createTree, getNodeDescendants, getNodeValue, getNode } from '../../models/tree'; +import { uniqBy, groupBy } from 'lodash'; +import { KeepManifestStream, KeepManifestStreamFile, KeepManifest } from "~/models/keep-manifest"; +import { TreeNode, setNode, createTree, getNodeDescendantsIds, getNodeValue, TreeNodeStatus } from '~/models/tree'; import { CollectionFilesTree, CollectionFile, CollectionDirectory, createCollectionDirectory, createCollectionFile, CollectionFileType } from '../../models/collection-file'; export const mapCollectionFilesTreeToManifest = (tree: CollectionFilesTree): KeepManifest => { - const values = getNodeDescendants('')(tree).map(id => getNodeValue(id)(tree)); + const values = getNodeDescendantsIds('')(tree).map(id => getNodeValue(id)(tree)); const files = values.filter(value => value && value.type === CollectionFileType.FILE) as CollectionFile[]; const fileGroups = groupBy(files, file => file.path); return Object @@ -30,7 +30,11 @@ export const mapCollectionFileToTreeNode = (file: CollectionFile): TreeNode => ([