X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/40952ad86a823635968c9abc5d6feacef316cffd..e5696ae072134453e8a0845a4cc58288e3b3163c:/src/services/collection-files-service/collection-manifest-mapper.ts?ds=sidebyside diff --git a/src/services/collection-files-service/collection-manifest-mapper.ts b/src/services/collection-files-service/collection-manifest-mapper.ts index 86030817..0c7e91de 100644 --- a/src/services/collection-files-service/collection-manifest-mapper.ts +++ b/src/services/collection-files-service/collection-manifest-mapper.ts @@ -3,12 +3,12 @@ // SPDX-License-Identifier: AGPL-3.0 import { uniqBy, groupBy } from 'lodash'; -import { KeepManifestStream, KeepManifestStreamFile, KeepManifest } from "../../models/keep-manifest"; -import { TreeNode, setNode, createTree, getNodeDescendants, getNodeValue } from '../../models/tree'; +import { KeepManifestStream, KeepManifestStreamFile, KeepManifest } from "~/models/keep-manifest"; +import { TreeNode, setNode, createTree, getNodeDescendantsIds, getNodeValue } 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