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

espace

v0.3.5

Published

A node based CLI for interactine with the EstateSpace SaaS cloud.

Downloads

14

Readme

EstateSpace command line utility

This project defines a utility for interacting with an estatespace server. Various commands are supported. Various files are supported.

Usage

csv format

Examples may be seen here. The utility will attempt to map the CSV columns into the respective Estatespce datamodels, cleaning the data as it loads. This utulity is meant to be idempotent, whereas it won't everwrite existing data on the server with subsequent calls. IE, this handles initial initial data loads only, not updates.

data cleansing:

  • spell check various field data
  • strip newlines from cell content
  • replace ';' in cells with ','
  • upload files that are referenced
    • the filenames that are referenced must match those found on the local disk, exactly
  • maps multiple values per cell, for instance, files or SOP Template steps with the '|'
    • the '|" is used to separate multiple values within the same cell.

directory structure:

When using csv formats, the utility expects a specific directory structures. Namely, the directory that holds the csv must have a files directory that holds all the files referenced in the csv.

Spell check

The utility will attempt to spell check most free text fields in files. There is a built in dictionary, but due to the nature of the equipment and SOP information, there may be many words that are not known to normal dictionaries that are prevelant in this space. Therefore the user is able to define their own dictionary. Simply create a newline delimited text file called esdict.txt and put in in your home directory.

Loading or Updating Policies, Roles and Groups

The utility can be run against an authenticated on unauthenticated dispatcher to load newly added policies, roles and groups. Use the --unauth option for unauthenticated dispatcher. Use the --host option to specify the hostname:port of the dispatcher, the --x-es-tenantid option to specify the tenant name and the --file flag to specify the json file to load the policies from. e.g.

Unauthenticated sample command:

espace --unauth --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd policy create
espace --unauth --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd role create
espace --unauth --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd group create

Authenticated sample command:

espace --user emailId --password YourPassword --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd policy create
espace --user emailId --password YourPassword --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd role create
espace --user emailId --password YourPassword --file path/to/file --host localhost:443 --x-es-tenantid wildwolf-abcd group create

Running locally to load/update policy:

npm run load-unauth-policy

npm run load-auth-policy

Options

Usage: espace [options] [command]

A command line utility for interacting with an estatespace server.
More information found on Github, https://github.com/GriffinGroupGlobal/gpdata_loader

Options:
  -V, --version                               output the version number
  -v, --validate                              perform the command in validation mode. Don't communicate with the server. Don't prompt for user and password.
  -d, --deprecated                            use deprecated services
  -h, --host <host>                           the estatespace host to communicate with
  -xet, --x-es-tenantid <xestenantid>         the tenant to communicate with
  -u, --user <user>                           the user on the estatespace host. If not specified and no -v, you will be prompted.
  -p, --password <password>                   the password for the user (It is unsecure to use this parameter!). If not specified and no -v, you will be prompted.
  -f, --file <filename>                       the file to process
  -h, --help                                  output usage information
  --unauth                                    Flag to set the server to communicate with as not requiring authorization

Commands:
  equipment|eq <action>      process equipment
  soptemplate|sopt <action>  process SOP templates
  policy|pol <action>        process policies
  role|rol <action>          process roles
  group|gro <action>         process groups

node installation

npm install -g espace
espace --help

local development

npm run build
npm link
espace --help

docker

docker pull g3dev/espace
docker container run -it --rm -v `pwd`:/data --workdir=/data g3dev/espace:latest --help