Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
israx committed Jun 10, 2024
1 parent 86dd89c commit b7bc28e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
29 changes: 14 additions & 15 deletions packages/storage/src/providers/s3/apis/internal/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,35 +216,34 @@ const _listWithPath = async ({
}

const {
Contents,
NextContinuationToken,
CommonPrefixes,
}: ListObjectsV2Output =
(await listObjectsV2(
{
...s3Config,
userAgentValue: getStorageUserAgentValue(StorageAction.List),
},
listParamsClone,
)) ?? {};
Contents: contents,
NextContinuationToken: nextContinuationToken,
CommonPrefixes: commonPrefixes,
}: ListObjectsV2Output = (await listObjectsV2(
{
...s3Config,
userAgentValue: getStorageUserAgentValue(StorageAction.List),
},
listParamsClone,
)) ?? {};

const subpaths = mapCommonPrefixesToSubpaths(CommonPrefixes);
const subpaths = mapCommonPrefixesToSubpaths(commonPrefixes);

if (!Contents) {
if (!contents) {
return {
items: [],
...getOptionWithSubpaths(subpaths),
};
}

return {
items: Contents.map(item => ({
items: contents.map(item => ({
path: item.Key!,
eTag: item.ETag,
lastModified: item.LastModified,
size: item.Size,
})),
nextToken: NextContinuationToken,
nextToken: nextContinuationToken,
...getOptionWithSubpaths(subpaths),
};
};
Expand Down
1 change: 0 additions & 1 deletion packages/storage/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export {
TransferProgressEvent,
TransferTaskState,
UploadTask,
ListDepth,
Subpath,
} from './common';
export {
Expand Down

0 comments on commit b7bc28e

Please sign in to comment.