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

@taus-services/taus

v1.0.1

Published

Minimalistic server to deploy tauri updates with licence control and channel selection.

Downloads

2

Readme

Tauri Update Server

A minimalistic implementation of a server to integrate auto-updating functionality on tauri applications.
It is meant to support user licences and channels to constrain and track the available updates.

This is a prototype.
Functionality is not fully there yet, but as of now it should be working.
No interface to update the db from here, just for content delivery.

Usage

yarn add @taus-services/taus to install the node server, or npm install @taus-services/taus. You can reference this other repository to have a working example.

Custom headers

In addition to the general structure provided by tauri update, there are three more fields which are used to define proper conditions for delivery:

  • licence is a unique identifier for the user requesting the update. Internal checks can be performed to prevent download of content to suspect licences shared against terms&conditions.
  • channel is used to specify the channel from which the update must be served. For example beta, stable, trial etc.
  • suggested is the target version which I would like to be served. The server itself does not have to fulfill such request.

Both licence and channel, if not populated, can be automatically assigned to a default value specified as part of the server configuration.

Configuration

The behaviour of the server can be changed via a configuration object.

  • port: the port to
  • db: the configuration object for Sequelize.
  • default_channel: the default value for channel if client is not specifying a custom header for it.
  • default_secret: same for the licence.
  • fastify: an object for the fastify configuration (https etc.)
  • storage: base and protocol for the storage entry point. Base must be a single directory token.
  • update: same but for the update entry point on the server. A default configuration is used in case no custom one has been provided. 1st level children are interpolated:
const default_config = {
    host: 'localhost',
    port: 8000,
    db: {
        dialect: 'sqlite',
        storage: './example/db'
    },
    default_channel: 'free',
    default_secret: 'free-licence',
    fastify: {},
    storage: {
        protocol:"http",
        base:"/s/"
    },
    update: {
        protocol: "http",
        base:"/u/"
    }
}

If you need you can also specify custom DB schema generated with sequelize-auto as dbSchema, but keep in mind that the codebase for the server might need to be changed from you as well.

TODO

  • Accept suggestions from the client for a specific version.
  • ~~Provide CLI via a separate tool to push new releases on the server.~~ via an external tool TAUS-CLI
  • Custom callbacks for some of the failure events.
  • ~~Async checks on the db to tag licences which are cheating.~~ via external tools

ER Schema

ER Schema