TSOA library for Wing


Keywords
winglang
License
MIT
Install
npm install @winglibs/tsoa@0.1.0

Documentation

Winglibs

Welcome! You've arrived to the warm and cozy home of the Wing Trusted Library Ecosystem.

This repository hosts the code for Wing libraries (also called "winglibs") that we consider trusted and that meet our community's quality bar.

One of the cool things about trusted libraries is that we take care of building, testing and publishing them for you.

Library npm package Platforms
bedrock @winglibs/bedrock sim, tf-aws
budget @winglibs/budget sim, tf-aws
checks @winglibs/checks *
cloudv2 @winglibs/cloudv2 sim, tf-aws
cognito @winglibs/cognito sim, tf-aws
containers @winglibs/containers sim, tf-aws
dynamodb @winglibs/dynamodb sim, tf-aws
email @winglibs/email sim, tf-aws
eventbridge @winglibs/eventbridge awscdk, sim, tf-aws
fifoqueue @winglibs/fifoqueue sim, tf-aws
github @winglibs/github *
jwt @winglibs/jwt *
k8s @winglibs/k8s k8s
lock @winglibs/lock *
messagefanout @winglibs/messagefanout sim, tf-aws
momento @winglibs/momento sim, tf-aws, tf-azure, tf-gcp
ngrok @winglibs/ngrok *
openai @winglibs/openai *
postgres @winglibs/postgres sim, tf-aws
python @winglibs/python sim, tf-aws
react @winglibs/react sim, tf-aws
redis @winglibs/redis sim
sagemaker @winglibs/sagemaker sim, tf-aws
ses @winglibs/ses sim, tf-aws
simtools @winglibs/simtools sim
slack @winglibs/slack sim, tf-aws
sns @winglibs/sns awscdk, sim, tf-aws
tf @winglibs/tf sim, tf-aws
tsoa @winglibs/tsoa sim
vite @winglibs/vite sim, tf-aws
websockets @winglibs/websockets awscdk, sim, tf-aws

Generated with mkrepo.sh. To update the list of supported platforms for a winglib, please update the "wing" section in its package.json file.

How is this repository structured?

The code for each library is located in a subdirectory named after the library. For example, the websockets library is located under ./websockets.

Wing libraries are published to npm under the @winglibs scope, and there's a package.json file in the library's directory.

A set of GitHub Workflows are maintained for each library under the .github directory. These workflows, as well as other artifacts in this repository (such as the table of contents in this README) are are generated using a tool called mkrepo, which can be executed using the ./mkrepo.sh script at the root of this repository. The source code for this tool is can be found under .mkrepo (and it is written in Wing of course).

How do I add a new library?

It's so damn easy.

Clone this repository:

git clone https://github.com/winglang/winglibs.git

Change to the winglibs directory:

cd winglibs

Use the fabulous mklib.sh script to scaffold your library:

./mklib.sh my-awesome-lib

This will create a subdirectory called my-awesome-lib with some initial source code and a test. It will also create a github workflow which will take care of building, testing and publishing your library to npm.

Now do your magic.

When you are ready, submit a pull request to this repository. Someone from the team will review it and will hopefully provide you with useful feedback and a lot of love, and eventually merge it into main, and your library will be live.

Updating libraries

If you wish to publish an update to your library, simply submit a new pull request with your update. Once the PR is merged, your new version will be published.

  • ✌️ Make sure you use a conventional commit title. (feat: for new features, fix: for bug fix and chore: for anything else).

  • ✌️ DON'T FORGET! You will need to manually bump the version field of your library based on the semantic version update. In the future we plan to automate this so that bumps will happen automatically.

    A quick primer on semantic versioning

    Semantic versioning is a convention for version numbers that is commonly used to indicate the type of update. The version number consists of three components: MAJOR.MINOR.PATCH:

    • The MAJOR component must be bumped if the update includes a breaking change.
    • The MINOR component must be bumped if the update includes a new feature.
    • The PATCH component must be bumped if the update includes a bug fix.

    Before 1.0.0, the MAJOR component is always 0, the MINOR component represents breaking changes and the PATCH component represents new features and bug fixes.

Consuming trusted libraries

To consume these libraries, users just need to:

npm i @winglibs/my-awesome-lib

And then:

bring my-awesome-lib

Writing Wing Libraries

See docs.

Please note that it refers to writing libraries that are not published here, so it includes instructions for things that you get here automatically when using the mklib.sh script to scaffold your library.

To specify the platforms your library supports, you can add a wing.platforms field to your package.json:

{
  "name": "@winglibs/my-awesome-lib",
  "version": "0.0.1",
  "wing": {
    "platforms": [
      "sim",
      "tf-aws"
    ]
  }
}

License

This repository is licensed under the MIT License, unless otherwise specified in a library directory.