Skip to content

Commit

Permalink
fix(sns): can't import package with multiple classes with same name (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon authored May 21, 2024
1 parent 5e509c5 commit f97cfb4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions sns/aws.w
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ bring cloud;
bring "./types.w" as types;
bring aws;

pub class MobileClient impl types.IMobileClient {
pub class MobileClient_aws impl types.IMobileClient {
pub inflight publish(options: types.PublishOptions): types.PublishResult {
return MobileClient._publish(options);
return MobileClient_aws._publish(options);
}

pub onLift(host: std.IInflightHost, ops: Array<str>) {
Expand Down
8 changes: 4 additions & 4 deletions sns/lib.w
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ pub class MobileClient impl types.IMobileClient {
let target = util.env("WING_TARGET");
if target == "sim" {
if std.Node.of(this).app.isTestEnvironment {
this.inner = new sim.MobileClient();
this.inner = new sim.MobileClient_sim();
} else {
this.inner = new aws.MobileClient();
this.inner = new aws.MobileClient_aws();
}
} elif target == "tf-aws" {
this.inner = new aws.MobileClient();
this.inner = new aws.MobileClient_aws();
} elif target == "awscdk" {
this.inner = new aws.MobileClient();
this.inner = new aws.MobileClient_aws();
} else {
throw "Unsupported target {target}";
}
Expand Down
4 changes: 2 additions & 2 deletions sns/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sns/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@winglibs/sns",
"description": "Wing library for interacting with AWS SNS",
"version": "0.0.1",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "https://github.com/winglang/winglibs.git",
Expand Down
2 changes: 1 addition & 1 deletion sns/sim.w
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bring cloud;
bring util;
bring "./types.w" as types;

pub class MobileClient impl types.IMobileClient {
pub class MobileClient_sim impl types.IMobileClient {
store: cloud.Bucket;
new() {
this.store = new cloud.Bucket() as "Inbox";
Expand Down

0 comments on commit f97cfb4

Please sign in to comment.