From 0440bb8d722c16188e19751214df9ea0deba5870 Mon Sep 17 00:00:00 2001 From: Chris Rybicki Date: Thu, 28 Mar 2024 11:37:15 -0400 Subject: [PATCH] fix(cognito): symbol name conflict (#169) --- cognito/lib.w | 4 ++-- cognito/package.json | 2 +- cognito/platform/sim.w | 2 +- cognito/platform/tfaws.w | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cognito/lib.w b/cognito/lib.w index dc427541..c85e00c7 100644 --- a/cognito/lib.w +++ b/cognito/lib.w @@ -11,11 +11,11 @@ pub class Cognito impl types.ICognito { new(api: cloud.Api, props: types.CognitoProps?) { let target = util.env("WING_TARGET"); if target == "sim" { - this.inner = new sim.Cognito(api, props) as "sim"; + this.inner = new sim.Cognito_sim(api, props) as "sim"; this.clientId = "sim-client-id"; this.userPoolId = "sim-user-pool-id"; } elif target == "tf-aws" { - let auth = new tfaws.Cognito(api, props) as "tf-aws"; + let auth = new tfaws.Cognito_tfaws(api, props) as "tf-aws"; this.clientId = auth.clientId; this.userPoolId = auth.userPoolId; this.inner = auth; diff --git a/cognito/package.json b/cognito/package.json index 40c8a087..dc79501d 100644 --- a/cognito/package.json +++ b/cognito/package.json @@ -1,6 +1,6 @@ { "name": "@winglibs/cognito", - "version": "0.0.3", + "version": "0.0.4", "description": "A wing library to work with AWS Cognito", "author": { "name": "Elad Cohen", diff --git a/cognito/platform/sim.w b/cognito/platform/sim.w index 54125afb..ab5a1b8f 100644 --- a/cognito/platform/sim.w +++ b/cognito/platform/sim.w @@ -37,7 +37,7 @@ interface ICallable { call(api: cloud.Api, method: str, handler: inflight (cloud.ApiRequest): cloud.ApiResponse): void; } -pub class Cognito impl types.ICognito { +pub class Cognito_sim impl types.ICognito { api: cloud.Api; counter: cloud.Counter; table: ex.Table; diff --git a/cognito/platform/tfaws.w b/cognito/platform/tfaws.w index f5a361d5..8b0d2ac8 100644 --- a/cognito/platform/tfaws.w +++ b/cognito/platform/tfaws.w @@ -3,7 +3,7 @@ bring aws as awsUtils; bring "@cdktf/provider-aws" as aws; bring "../types.w" as types; -pub class Cognito impl types.ICognito { +pub class Cognito_tfaws impl types.ICognito { api: cloud.Api; name: str; pub clientId: str; @@ -105,15 +105,15 @@ pub class Cognito impl types.ICognito { } pub inflight signUp(email: str, password: str): void { - Cognito._signUp(this.clientId, email, password); + Cognito_tfaws._signUp(this.clientId, email, password); } pub inflight adminConfirmUser(email: str): void { - Cognito._adminConfirmUser(this.userPoolId, email); + Cognito_tfaws._adminConfirmUser(this.userPoolId, email); } pub inflight initiateAuth(email: str, password: str): str { - return Cognito._initiateAuth(this.clientId, email, password); + return Cognito_tfaws._initiateAuth(this.clientId, email, password); } pub onLift(host: std.IInflightHost, ops: Array) {