npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@winglang/sdk

v0.85.23

Published

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.

Downloads

88,326

Readme

Wing SDK

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.

⛺ Installation

npm i @winglang/sdk

📝 Usage

With Wing

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!

As a TypeScript/JavaScript Library

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();

📖 Documentation

✋ Contributing

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.

🐣 Getting help

If you need help either using or contributing to this project, please join us on our Wing Discord.

⚖️ License

This library is licensed under the MIT license.