@aws-amplify/core 5.5.3-unstable.ec57e85.2 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/lib/Amplify.js +2 -0
  2. package/lib/Credentials.js +2 -0
  3. package/lib/Platform/version.d.ts +1 -1
  4. package/lib/Platform/version.js +1 -1
  5. package/lib/Providers/index.js +2 -0
  6. package/lib/ServiceWorker/ServiceWorker.js +2 -0
  7. package/lib/ServiceWorker/index.js +2 -0
  8. package/lib/UniversalStorage/index.js +2 -0
  9. package/lib/Util/BackgroundProcessManager.js +2 -0
  10. package/lib/Util/DateUtils.js +2 -0
  11. package/lib/Util/Mutex.js +2 -0
  12. package/lib/Util/Reachability.js +2 -0
  13. package/lib/Util/Reachability.native.js +2 -0
  14. package/lib/Util/StringUtils.js +2 -0
  15. package/lib/Util/index.js +2 -0
  16. package/lib/clients/internal/composeServiceApi.d.ts +1 -1
  17. package/lib/clients/internal/composeServiceApi.js +5 -3
  18. package/lib/tsconfig.tsbuildinfo +1 -1
  19. package/lib/types/index.js +2 -0
  20. package/lib-esm/Amplify.js +2 -0
  21. package/lib-esm/Credentials.js +2 -0
  22. package/lib-esm/Platform/version.d.ts +1 -1
  23. package/lib-esm/Platform/version.js +1 -1
  24. package/lib-esm/Providers/index.js +2 -0
  25. package/lib-esm/ServiceWorker/ServiceWorker.js +2 -0
  26. package/lib-esm/ServiceWorker/index.js +2 -0
  27. package/lib-esm/UniversalStorage/index.js +2 -0
  28. package/lib-esm/Util/BackgroundProcessManager.js +2 -0
  29. package/lib-esm/Util/DateUtils.js +2 -0
  30. package/lib-esm/Util/Mutex.js +2 -0
  31. package/lib-esm/Util/Reachability.js +2 -0
  32. package/lib-esm/Util/Reachability.native.js +2 -0
  33. package/lib-esm/Util/StringUtils.js +2 -0
  34. package/lib-esm/Util/index.js +2 -0
  35. package/lib-esm/clients/internal/composeServiceApi.d.ts +1 -1
  36. package/lib-esm/clients/internal/composeServiceApi.js +5 -3
  37. package/lib-esm/tsconfig.tsbuildinfo +1 -1
  38. package/lib-esm/types/index.js +2 -0
  39. package/package.json +2 -3
  40. package/polyfills/URL/index.ts +2 -0
  41. package/src/Amplify.ts +2 -0
  42. package/src/Credentials.ts +2 -0
  43. package/src/Platform/version.ts +1 -1
  44. package/src/Providers/index.ts +2 -0
  45. package/src/ServiceWorker/ServiceWorker.ts +2 -0
  46. package/src/ServiceWorker/index.ts +2 -0
  47. package/src/UniversalStorage/index.ts +2 -0
  48. package/src/Util/BackgroundProcessManager.ts +2 -0
  49. package/src/Util/DateUtils.ts +2 -0
  50. package/src/Util/Mutex.ts +2 -0
  51. package/src/Util/Reachability.native.ts +2 -0
  52. package/src/Util/Reachability.ts +2 -0
  53. package/src/Util/Retry.ts +2 -0
  54. package/src/Util/StringUtils.ts +2 -0
  55. package/src/Util/index.ts +2 -0
  56. package/src/clients/internal/composeServiceApi.ts +5 -2
  57. package/src/parseAWSExports.ts +2 -0
  58. package/src/types/index.ts +2 -0
  59. package/src/types/types.ts +2 -0
@@ -16,7 +16,10 @@ export const composeServiceApi = <
16
16
  HttpResponse,
17
17
  TransferHandlerOptions
18
18
  >,
19
- serializer: (input: Input, endpoint: Endpoint) => HttpRequest,
19
+ serializer: (
20
+ input: Input,
21
+ endpoint: Endpoint
22
+ ) => Promise<HttpRequest> | HttpRequest,
20
23
  deserializer: (output: HttpResponse) => Promise<Output>,
21
24
  defaultConfig: DefaultConfig
22
25
  ) => {
@@ -40,7 +43,7 @@ export const composeServiceApi = <
40
43
  // Unlike AWS SDK clients, a serializer should NOT populate the `host` or `content-length` headers.
41
44
  // Both of these headers are prohibited per Spec(https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name).
42
45
  // They will be populated automatically by browser, or node-fetch polyfill.
43
- const request = serializer(input, endpoint);
46
+ const request = await serializer(input, endpoint);
44
47
  const response = await transferHandler(request, {
45
48
  ...resolvedConfig,
46
49
  });
@@ -1,3 +1,5 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { AmplifyConfig } from './types';
2
4
  import { ConsoleLogger as Logger } from './Logger';
3
5
 
@@ -1 +1,3 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  export * from './types';
@@ -1,3 +1,5 @@
1
+ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ // SPDX-License-Identifier: Apache-2.0
1
3
  import { InputLogEvent, LogGroup } from '@aws-sdk/client-cloudwatch-logs';
2
4
  import { Credentials } from '@aws-sdk/types';
3
5