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

@theia/remote

v1.49.1

Published

Theia - Remote

Downloads

480

Readme

Description

This package implements functionality to connect to remote systems using Theia. This facilitates features similar to the features offered by Microsoft's popular Remote-SSH, Dev Containers or WSL extensions for VSCode.

Package Architecture

The following explains the basic flow of any remote connection. It will be exemplified using the remote SSH feature:

  1. When the user runs the SSH: Connect to Host... command, we send the host info to the local backend. The corresponding RemoteSSHConnectionProvider is scoped to the current connection and can request additional information from the user, such as SSH key passphrases.
  2. Once the RemoteSSHConnectionProvider has every information it needs, it creates a SSH connection and registers this connection to the general RemoteConnectionService. Every RemoteConnection type implements an interface that is able to handle 3 kinds of messages to the remote system:
    1. Executing commands in the shell of the remote system
    2. Copying data to the remote
  3. Once the connection has been established, a setup process takes place on the remote system:
    1. Identifying the remote platform (i.e. Windows, MacOS or Linux). This information is needed for all the following steps.
    2. Setting up various directories for storing the application and its dependencies.
    3. Download and install the correct Node.js version for the remote platform.
    4. Packaging, copying, and unpackaging the local backend to the remote backend.
      1. Every Theia extension can register RemoteCopyContribution binding to copy certain files from the current system. This contribution point is used for files that are used in all operating systems.
      2. They can also register RemoteNativeDependencyContribution bindings to download and copy native dependencies for the remote system. The downloaded files are on a per-platform basis.
    5. Using the node version that was installed in step 3, we now start the main.js of the backend application. We start the backend with --port=0, so that it searches for any available port. It will print the port to the console. The setup either returns with a setup error or the port of the remote server on the remote system.
  4. With the remote server/port in place, the backend sets up a local proxy server on a random port. It instructs the RemoteConnection object to forward any HTTP request to this proxy server to the remote server.
  5. The backend will return from the initial request from (1) with a new local proxy port. The frontend sets this port in the url and reload itself.
  6. The frontend is now connected to the remote backend by connecting to the local proxy port.
  7. The frontend now performs its normal messaging lifecycle, establishing connections to backend services. Although these backend services live on a different remote system, the frontend handles them as if they belong to the local backend.

Additional Information

License

Trademark

"Theia" is a trademark of the Eclipse Foundation https://www.eclipse.org/theia