Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@winglang/sdk
Advanced tools
The Wing SDK is the standard library of the Wing programming language, **but it can also be used as a standalone library from any CDK supported language**. For best experience it should be used with the Wing Language.
The Wing SDK is the standard library of the Wing programming language, but it can also be used as a standalone library from any CDK supported language. For best experience it should be used with the Wing Language.
It contains the core set of cloud resources that are needed to build cloud applications. These resources are cloud agnostic and can be used to build applications that run on any cloud provider. The actual provider is determined at synth time by setting a target.
One of the supported targets is sim
and can be used to run a cloud application locally, without an internet connection, iterate extremely fast and run tests that include cloud resources without needing to mock them.
The SDK is released as a private npm module named
@winglang/sdk
.
npm i @winglang/sdk
The Wing SDK is part of Wing's standard library. Create a new file called hello.w
and import the SDK with bring cloud;
:
bring cloud;
let queue = new cloud.Queue();
queue.setConsumer(inflight (message) => {
log("Hello, {message}!");
});
Then use wing compile
to compile your program to different clouds. Run wing compile --help
to see what options are available!
The Wing SDK can be used just like ordinary CDK for TF Constructs.
import { Construct } from "constructs";
import { cloud } from "@winglang/sdk";
class HelloWorld extends Construct {
constructor(scope: Construct, id: string) {
super(scope, id);
let bucket = new cloud.Bucket(this, "bucket", {
public: true,
});
}
}
This construct contains a Bucket
from the cloud library which represents a polymorphic cloud resources whose actual implementation (local, aws, other clouds) is determined at synth time.
To use it in an application, you need to supply a synthesizer which will synthesize resources for the desired target.
In the example below, a sim
synthesizer is used which tells the SDK to produce a simulator (.wsim
) file.
The .wsim
file can be passed to the Wing console to simulate the bucket using your file system.
If the commented out TF AWS synthesizer is used instead, then a Terraform application will be synthesized.
The Terraform application will include an AWS S3 Bucket to represent the Bucket
.
import * as sim from "../../src/sim";
import * as tfaws from "../../src/tf-aws";
const app = new sim.App();
// const app = new tfaws.App(); // alternative
new HelloWorld(app, "HelloWorld");
app.synth();
We welcome community contributions and pull requests. See the Wing Contributor's Handbook for information on how to set up a development environment and add new resources to the SDK.
If you need help either using or contributing to this project, please join us on our Wing Discord.
This library is licensed under the MIT license.
FAQs
The Wing SDK is the standard library of the Wing programming language, **but it can also be used as a standalone library from any CDK supported language**. For best experience it should be used with the Wing Language.
We found that @winglang/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.