UNPKG

@aws-amplify/storage

Version:

Storage category of aws-amplify

1 lines 1.97 kB
{"version":3,"file":"copy.mjs","sources":["../../../../src/internals/apis/copy.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { copy as copyInternal } from '../../providers/s3/apis/internal/copy';\n/**\n * @internal\n */\nexport const copy = (input) => copyInternal(Amplify, {\n source: {\n path: input.source.path,\n bucket: input.source.bucket,\n eTag: input.source.eTag,\n notModifiedSince: input.source.notModifiedSince,\n expectedBucketOwner: input.source.expectedBucketOwner,\n },\n destination: {\n path: input.destination.path,\n bucket: input.destination.bucket,\n expectedBucketOwner: input.destination.expectedBucketOwner,\n },\n options: {\n // Advanced options\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input?.options?.customEndpoint,\n },\n // Type casting is necessary because `copyInternal` 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"],"names":["copyInternal"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,KAAK,KAAKA,MAAY,CAAC,OAAO,EAAE;AACrD,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;AACnC,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;AACvD,QAAQ,mBAAmB,EAAE,KAAK,CAAC,MAAM,CAAC,mBAAmB;AAC7D,KAAK;AACL,IAAI,WAAW,EAAE;AACjB,QAAQ,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI;AACpC,QAAQ,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM;AACxC,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,CAAC,mBAAmB;AAClE,KAAK;AACL,IAAI,OAAO,EAAE;AACb;AACA,QAAQ,2BAA2B,EAAE,KAAK,CAAC,OAAO,EAAE,2BAA2B;AAC/E,QAAQ,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc;AACtD,KAAK;AACL;AACA;AACA,CAAC;;;;"}