Open VSX is a vendor-neutral open-source alternative to the Visual Studio Marketplace. It provides a server application that manages VS Code extensions in a database, a web application similar to the VS Code Marketplace, and a command-line tool for publishing extensions similar to vsce.
A public instance of Open VSX is running at open-vsx.org. Please report issues related to that instance at EclipseFdn/open-vsx.org.
See the openvsx Wiki for documentation of general concepts and usage of this project.
The easiest way to get a development environment for this project is to open it in Gitpod.
Click Open Browser on port 3000 to see the running web application.
yarn build
— build the library andovsx
commandyarn watch
— watch (build continuously)
The command line tool is available at cli/lib/ovsx
.
The default frontend is the one bundled in the Docker image, and is also used for testing in the development environment. It depends on the compiled library, so make sure to build or watch the library before you build or watch the default frontend.
yarn build
— build the libraryyarn watch
— watch (build continuously)yarn build:default
— build the default frontend (run webpack)yarn watch:default
— run webpack in watch modeyarn start:default
— start Express to serve the frontend on port 3000
The Express server is started automatically in Gitpod. A restart is usually not necessary.
./gradlew build
— build and test the server./gradlew assemble -t
— build continuously (the server is restarted after every change)./gradlew runServer
— start the Spring server on port 8080./scripts/test-report.sh
— display test results on port 8081
The Spring server is started automatically in Gitpod. It includes spring-boot-devtools
which detects changes in the compiled class files and restarts the server.
If you would like to test authorization through GitHub, you need to create an OAuth app with a callback URL pointing to the exposed port 8080 of your Gitpod workspace. You can get it by calling a script:
server/scripts/callback-url.sh github
Note that the callback URL needs to be updated on GitHub whenever you create a fresh Gitpod workspace.
After you created the GitHub OAuth app, the next step is to copy the Client ID and Client Secret into Gitpod environment variables named GITHUB_CLIENT_ID
and GITHUB_CLIENT_SECRET
and bound to this repository. If you change the variables in a running workspace, run scripts/generate-properties.sh
in the server
directory to update the application properties.
With these settings in place, you should be able to log in by authorizing your OAuth app.
If you would like to test file storage via Google Cloud, follow these steps:
- Create a GCP project and a bucket.
- Make the bucket public by granting the role "Storage Object Viewer" to
allUsers
. - Configure CORS on the bucket with origin
"*"
and method"GET"
. - Create environment variables named
GCP_PROJECT_ID
andGCS_BUCKET_ID
containing your GCP project and bucket identifiers. If you change the variables in a running workspace, runscripts/generate-properties.sh
in theserver
directory to update the application properties. - Create a GCP service account with role "Storage Object Admin" and copy its credentials file into your workspace.
- Create an environment variable
GOOGLE_APPLICATION_CREDENTIALS
containing the path to the credentials file.
If you would like to test file storage via Azure Blob, follow these steps:
- Create a storage account and a container named
openvsx-resources
(a different name is possible if you change theovsx.storage.azure.blob-container
property). - Allow Blob public access in the storage account and set the container's public access level to "Blob".
- Configure CORS in your storage account with origin
"*"
and method"GET"
. - Create an environment variable
AZURE_SERVICE_ENDPOINT
with the "Blob service" URL of your storage account. If you change the variables in a running workspace, runscripts/generate-properties.sh
in theserver
directory to update the application properties. - Generate a "Shared access signature" and put its token into an environment variable
AZURE_SAS_TOKEN
.