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

@rwth-acis/las2peer-project-service-frontend

v0.4.0

Published

Frontend for las2peer project service.

Downloads

3

Readme

Project-List Frontend

npmjs

The project-list is a LitElement for listing projects given by the las2peer-project-service and for creating new projects.

Basic Usage

To use the project-list LitElement in your project, just install it from npmjs:

npm i @rwth-acis/las2peer-project-service-frontend

Then you can use the project-list element as follows:

<project-list system="{SYSTEM_NAME}"
              projectServiceURL="{PROJECT_SERVICE_URL}"
              contactServiceURL="{CONTACT_SERVICE_URL}"
              yjsAddress="http://127.0.0.1:1234"
              yjsResourcePath="./socket.io"></project-list>

Here, SYSTEM_NAME needs to match with a system that is configured in the project-service. For the configuration of systems, see the main README. Set PROJECT_SERVICE_URL and CONTACT_SERVICE_URL to the address of the webconnector, where the respective service can be found.

The project-list element uses Yjs to share the metadata of the currently selected/opened project with other project members that have selected the same project. This ensures, that every project member always gets the latest changes to the metadata. To configure the used y-websockets-server instance, use the attributes yjsAddress and yjsResourcePath. Please note: To keep the metadata of projects secured, the project-list uses an extended version of y-websockets-server and y-websockets-client. This extension allows to use Yjs rooms that only project members can access. The extensions can be found in the rwth-acis forks rwth-acis/y-websockets-server#project-service and rwth-acis/y-websockets-client#v8.

You may also use the disableAllProjects attribute to disable the tab where all available projects are listed.

Events

Events fired by the project-list element:

projects-loaded:

The project-list element fires this event whenever the projects are reloaded from the project-service. The event details contain a list of all projects that the current user can access. Depending on how the visibility of all projects is configured in the project-service, also projects where the current user is no member of will be part of the list.

project-selected:

Whenever the user clicks on one of the projects in the list, this event will be fired. It contains detailed information on the selected project and its metadata.

metadata-changed:

If the metadata of the currently selected/opened project got changed, this event will be fired. It contains the updated project metadata. If you display the metadata in the UI and want to keep it up-to-date, then you can use this event.

Events that the project-list element listens for:

metadata-change-request:

The project-list element listens to the event "metadata-change-request". It can be used to update the metadata of the currently selected project. If you send the event and set the event details to the updated metadata, the project-list element will send it to the project-service and after that the "metadata-changed" event will be fired.

metadata-reload-request:

If you updated the metadata without using the "metadata-change-request" event, as an example by using the RMI interface of the project-service, then you should use this event to inform the project-list element about it. When receiving the event, the project-list will fetch the metadata from the project-service again and will also send a "metadata-changed" event.

projects-reload-request:

This event can be used to reload the list of projects. It might be used after the user has logged in.

Extension: SyncMeta Online User List

If your projects are using SyncMeta, you can use the online user list extension. It allows to display the users that are currently online in a project / SyncMeta room. To use the online user list, the project-list element needs to know which project is using which Yjs room(s) for modelling. You can use the method "setOnlineUserListYjsRooms", that the project-list element provides, for this. As a parameter you use a map that maps project names to a list of Yjs room names (which are used for modelling inside the project).

Development

For testing the element during development, run npm i and npm run serve. There is a demo available that can be used during development.