Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eladcon committed May 21, 2024
1 parent f8db40b commit f275f07
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ publishing them for you.
| [redis](./redis) | [@winglibs/redis](https://www.npmjs.com/package/@winglibs/redis) | sim |
| [sagemaker](./sagemaker) | [@winglibs/sagemaker](https://www.npmjs.com/package/@winglibs/sagemaker) | sim, tf-aws |
| [simtools](./simtools) | [@winglibs/simtools](https://www.npmjs.com/package/@winglibs/simtools) | sim |
| [sns](./sns) | [@winglibs/sns](https://www.npmjs.com/package/@winglibs/sns) | sim, tf-aws |
| [sns](./sns) | [@winglibs/sns](https://www.npmjs.com/package/@winglibs/sns) | awscdk, sim, tf-aws |
| [tf](./tf) | [@winglibs/tf](https://www.npmjs.com/package/@winglibs/tf) | sim, tf-aws |
| [tsoa](./tsoa) | [@winglibs/tsoa](https://www.npmjs.com/package/@winglibs/tsoa) | sim |
| [vite](./vite) | [@winglibs/vite](https://www.npmjs.com/package/@winglibs/vite) | sim, tf-aws |
Expand Down
6 changes: 5 additions & 1 deletion sns/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# sns

This library allows you to interact with the AWS SNS Service
This library allows you to interact with the AWS SNS Service.

## Prerequisites

Expand All @@ -18,6 +18,10 @@ npm i @winglibs/sns
bring sns;

let client = new sns.MobileClient();

test "sending an SMS" {
client.publish(PhoneNumber: "+14155552671", Message: "Hello");
}
```

## License
Expand Down
File renamed without changes.
9 changes: 6 additions & 3 deletions sns/lib.w
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
bring util;
bring "./types.w" as types;
bring "./sim.w" as sim;
bring "./tfaws.w" as tfaws;
bring "./aws.w" as aws;

/// MobileClient is a client for interacting with SNS mobile service.
/// No cloud resources are created when using this class.
/// When running the simulator in a non test environment, it will use the
/// actual cloud implementation.
pub class MobileClient impl types.IMobileClient {
Expand All @@ -14,10 +15,12 @@ pub class MobileClient impl types.IMobileClient {
if std.Node.of(this).app.isTestEnvironment {
this.inner = new sim.MobileClient();
} else {
this.inner = new tfaws.MobileClient();
this.inner = new aws.MobileClient();
}
} elif target == "tf-aws" {
this.inner = new tfaws.MobileClient();
this.inner = new aws.MobileClient();
} elif target == "awscdk" {
this.inner = new aws.MobileClient();
} else {
throw "Unsupported target {target}";
}
Expand Down
1 change: 1 addition & 0 deletions sns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"wing": {
"platforms": [
"tf-aws",
"awscdk",
"sim"
]
},
Expand Down

0 comments on commit f275f07

Please sign in to comment.