Open eladb opened 1 year ago
This is a duplicate of #130
I wouldn't say that this is a duplicate. This is about the "managed ecosystem" of libraries while #130 is just the mechanism in the language.
Got ya
Chunking up some of the feature ideas above into tasks:
wing help foo
shows API docstf-aws
and other targets)Added a prioritized roadmap at the end of the issue description based on Chris's excellent list.
Community Note
Feature Spec
Originally https://github.com/winglang/wing/discussions/652
A wing library is a collection of types that can be used by other wing libraries or apps.
Open-source supply-chain attacks are becoming one of the most common and dangerous attack vectors in the industry. To increase the trust, safety and quality of the wing library ecosystem, wing takes a unique approach to package publishing.
The basic idea is that "trusted" winglang libraries are normal npm packages that are published under the
@winglang
scope, and their code is hosted under thewinglang
github org. These libraries can be authored by anyone but they are always published by the winglang project and not their authors.This serves two purposes:
Let's walk through the user experience of installing and publishing trusted and untrusted wing libraries.
Installing wing packages
To install a trusted wing package, use:
Use it like so:
Under the hood, wing uses npm to install the package
@winglang/redis
into yourpackage.json
.Publishing trusted wing packages
To publish a new trusted wing library, all you have to do is simply submit a pull request to the https://github.com/winglang/libs repository.
This repository includes a directory for each library, and is already set up to take care of builds, tests and releases. Just put your code in the right place and we'll take care of the rest.
Your pull request will be go through a quick review by one of our community members. The purpose of this review is to help you make your library awesome and that it meets the wing standards. Once reviewed, it will be merged and immediately released.
Out of the box best in class library publishing
The following will automatically happen for all libraries in the trusted namespace:
wing help foo
shows api docsUntrusted libraries
As mentioned above, winglang libraries are simply npm (JSII) packages, so anyone can publish anything to npm.
You can then use
npm
to install this library:And use
bring
like normal:But:
So you'll have to explicitly opt-in to allow this library:
Use Cases
Implementation Notes
No response
Roadmap
P1
P2
tf-aws
and other targets)P3
wing help foo
shows API docs