From ed249adbca4a17bfde08a8e5075cc159bd24c859 Mon Sep 17 00:00:00 2001 From: Andre Miras Date: Tue, 3 Dec 2024 15:49:42 +0100 Subject: [PATCH] :wrench: Build for both CommonJS and ESM --- src/library.test.ts | 3 +-- src/library.ts | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/library.test.ts b/src/library.test.ts index 1dd9b4b..1692fae 100644 --- a/src/library.test.ts +++ b/src/library.test.ts @@ -1,8 +1,7 @@ import { strict as assert } from "assert"; import sinon from "sinon"; -import { Amplify } from "aws-amplify"; import axios from "axios"; -import { signIn, configure } from "../src/library"; +import { configure } from "../src/library"; describe("library", () => { let axiosStub: sinon.SinonStub; diff --git a/src/library.ts b/src/library.ts index e3c786d..c50e6a8 100644 --- a/src/library.ts +++ b/src/library.ts @@ -21,7 +21,7 @@ const signIn = async (username: string, password: string): Promise => { // in case the user is already signed in, refs: // https://github.com/aws-amplify/amplify-js/issues/13813 await amplifyAuth.signOut(); - const { isSignedIn, nextStep } = await amplifyAuth.signIn({ + const { isSignedIn } = await amplifyAuth.signIn({ username, password, }); @@ -72,6 +72,4 @@ const configure = (baseURL: string = API_URL) => { }; }; -const defaultApi = configure(); - export { signIn, configure };