Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sns): can't import package with multiple classes with same name #244

Merged
merged 2 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading