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

sock-wasteland

v0.0.3

Published

This is a set of Node.js scripts that can be used for managing Arma 3 Wasteland servers that use sock-rpc-stats module for persistence.

Downloads

4

Readme

[TOC]

sock-wasteland#

Changelog

  • 0.0.3 - Add couch-doc-restore script
  • 0.0.2 - Add server-boot-players script
  • 0.0.1 - Initial release

Prerequisites

Installation

  • From the head of the master branch
    .
npm install -g git+https://bitbucket.org/micovery/sock-wasteland.git

.

  • From the npmjs.org repository
    .
npm install -g sock-wasteland  

.

##server-restart-hint## This script does not really restart the server. It simply talks to the server, and lets it know that a restart is coming up.

When that happens, the server does some final cleanup activities such as saving all the vehicles, and objects that are active in the map.
Also, the server notifies all players that are currently connected to the server, that a restart is coming up, and coerces them to report their stats.

The script waits for the server's acknowledgement that it has completed the tasks, for up to --wait number of seconds.

Options:
  --host      host, IP address of the stats server to connect to   [required]
  --port      port number of the stats server to connect to        [required]
  --wait      total number of seconds to wait for server response  [default: 120]
  --name      prefix name of the server to communicate with        [default: "A3W"]

##server-boot-players## This script boots all the players to the lobby

The script waits for the server's acknowledgement that it has completed the tasks, for up to --wait number of seconds.

Options:
  --host      host, IP address of the stats server to connect to   [required]
  --port      port number of the stats server to connect to        [required]
  --wait      total number of seconds to wait for server response  [default: 120]
  --name      prefix name of the server to communicate with        [default: "A3W"]

##inidb-migrate## This script is used for migrating an existing iniDB database to the sock-rpc-stats system.

It simply navigates through all the ini files on a user-specified directory, and loads the data into a running sock-rpc-stats server.

The logic is as follows:

  • The name of each ini file becomes a new scope in the stats server

  • Each section inside an ini file becomes a key in within the respective scope

  • variables inside a section become nested keys

The rules for parsing variable values are as follows (in order of evaluation):

  • If the variable name is in the --ignored list, then ignore it
  • If the variable name is in the --strings list, then coerce it into a JSON String
  • If the variable name is in the --numbers list, then coerce it into a JSON Number, or set the value to 0
  • If the variable name is in the --booleans list, then coerce it into a JSON Boolean (false values are: "false", "0", "", "null", "nil")
  • If it matches "-1.#IND", "-1.#INF", or NaN is treated s JSON Number 0
  • If it matches "nil", value is set to JSON null
  • If the value cab be parsed using JSON.parse, the use the parsed value
  • Otherwise, coerce the value into a JSON String
Options:
  --host      IP address of the stats server to connect to                     [default: "localhost"]
  --port      port number of the stats server to connect to                    [default: 1337]
  --path      path to the directory that contains the database ini files       [required]
  --prefix    prefix value for filtering the list of ini files (e.g. "A3W_")  [default: ""]
  --strings   list of variable names that should be coerced into JSON String   [default: "ownerUID,UID"]
  --numbers   list of variable names that should be coerced into JSON Number   [default: ""]
  --booleans  list of variable names that should be coerced into JSON Boolean  [default: ""]
  --ignored   list of variable names that should be ignored                    [default: ""]
  --trace     trace the JSON content of the parsed ini files                   [default: false]

##couch-doc-restore## This script allows administrator to restore a CouchDB document from its previous revisions. Using the script the admin can choose a set of revisions to merge and use the merged contents to replace the most recent revision.

Options:
  --host      CouchDB hostname, or IP                        [string] [required]
  --db        CouchDB database name                          [string] [required]
  --doc       CouchDB document name                          [string] [required]
  --help, -h  Show help                                                [boolean]