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

@ifnot/fly-sync

v0.0.1

Published

Realtime and cross-platform (Windows, Linux, OSX) files and folders synchronisation using NodeJs. Ideal for developers who want source code synchronization between two machines.

Downloads

2

Readme

Fly Sync (daemon) WIP

Realtime and cross-platform (Windows, Linux, OSX) files and folders synchronisation using NodeJs. Ideal for developers who want source code synchronization between two machines.

In short, it's like linux rsync but bilateral, cross-platform, real-time and websocket-based.

WIP Warning not fully battle-tested, this package may contain bugs, please do not use in production and backup your files regullary.

Main features

  • :v: Easy - NodeJs cli app for client and server with simple config.
  • :zap: Fast - Good transfer speed with websocket stream :
    • Multiples small files (npm packages, long nested folders ...)
    • Big files (with file streaming)
  • :bulb: Flexible - Multiple named folders to sync with regex exclusion

Quick start

Install the package globally with npm or yarn:

  • npm global install @ifnot/fly-sync
  • (or) yarn add -g @ifnot/fly-sync

Server

Copy and configure config.server.json and start your server :

node index.js --config=/path/to/config.server.json

Client

Copy and configure config.client.json and start your client :

node index.js --config=/path/to/config.client.json

Configuration

  • server boolean: Tells the app to act as a server (port became required)
  • port numeric: The port to use for the server
  • client boolean: Tells the app to act as a client (remote became required)
  • remote string: The complete WebSocket URL where the client should attempt to connect (example: ws://127.0.0.1:6666)
  • temp_path string: The temporary folder to use for receiving file streams
  • paths array : list of all paths to sync
    • id string: The id of the folder to sync (ids should match between server and client)
    • path string: The absolute path of the folder to sync
    • only string: The whitelist regex for filtering relative files paths
    • except string: The blacklist regex for filtering relative files paths

Tech stack

  • File change detection using a native C++ Node module for querying and subscribing to filesystem events. The same as Parcel 2 with the @parcel/watcher package.
  • Fast transfer with WebSocket client and server implementation ws

Todo List :

  • [ ] Add ping-pong strategy for :
    • [ ] Detecting lost clients from server
    • [ ] Reconnecting clients when connection is lost
  • [ ] Improve the event ownership system for a hash based ?
  • [ ] Add hashing and time based verification before doing disk actions
  • [ ] Add an initial full folder sync on connection (what strategy ?)
  • [ ] Add reading buffer for accepting multiple clients & servers (using a reading cache)
  • [ ] Improve receiving message stream using real Stream