UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

1 lines 2.45 kB
{"version":3,"file":"list.mjs","sources":["../../../../src/internals/apis/list.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getGlobalContext, isAmplifyContext, } from '@aws-amplify/core';\nimport { list as listInternal } from '../../providers/s3/apis/internal/list';\nexport function list(ctxOrInput, maybeInput) {\n // Resolve the optional leading context. The global context is resolved at\n // CALL time (never cached) so single-arg callers follow live configuration.\n const [ctx, input] = isAmplifyContext(ctxOrInput)\n ? [ctxOrInput, maybeInput]\n : [getGlobalContext(), ctxOrInput];\n return listInternal(ctx, {\n path: input.path,\n options: {\n bucket: input.options?.bucket,\n subpathStrategy: input.options?.subpathStrategy,\n useAccelerateEndpoint: input.options?.useAccelerateEndpoint,\n listAll: input.options?.listAll,\n expectedBucketOwner: input.options?.expectedBucketOwner,\n // Pagination options\n nextToken: input.options?.nextToken,\n pageSize: input.options?.pageSize,\n // Advanced options\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `listInternal` supports both Gen1 and Gen2 signatures, but here\n // given in input can only be Gen2 signature, the return can only ben Gen2 signature.\n });\n}\n"],"names":["listInternal"],"mappings":";;;AAAA;AACA;AAGO,SAAS,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE;AAC7C;AACA;AACA,IAAI,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,UAAU;AACpD,UAAU,CAAC,UAAU,EAAE,UAAU;AACjC,UAAU,CAAC,gBAAgB,EAAE,EAAE,UAAU,CAAC;AAC1C,IAAI,OAAOA,MAAY,CAAC,GAAG,EAAE;AAC7B,QAAQ,IAAI,EAAE,KAAK,CAAC,IAAI;AACxB,QAAQ,OAAO,EAAE;AACjB,YAAY,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM;AACzC,YAAY,eAAe,EAAE,KAAK,CAAC,OAAO,EAAE,eAAe;AAC3D,YAAY,qBAAqB,EAAE,KAAK,CAAC,OAAO,EAAE,qBAAqB;AACvE,YAAY,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO;AAC3C,YAAY,mBAAmB,EAAE,KAAK,CAAC,OAAO,EAAE,mBAAmB;AACnE;AACA,YAAY,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS;AAC/C,YAAY,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ;AAC7C;AACA,YAAY,2BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,2BAA2B;AACnF,YAAY,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AAC1D,SAAS;AACT;AACA;AACA,KAAK,CAAC;AACN;;;;"}