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

wickrio-broadcast-bot

v6.36.1

Published

WickrIO Broadcast Bot

Downloads

25

Readme

Wickr IO Broadcast Bot

To get started, you would need to setup your system, download and install Docker and run the WickrIO Docker container. Full instructions on how to do so are available here: https://wickrinc.github.io/wickrio-docs/#wickr-io-getting-started

Configuration:

Wickr IO integrations are configured by running the configure.sh file,

Required tokens:

  • WICKRIO_BOT_NAME
  • WHITELISTED_USERS - Comma-separated list of wickr users that will be allowed to use the bot
  • DATABASE_ENCRYPTION_KEY - Choose a 16-character(minimum) string key to derive the crypto key from in order to encrypt and decrypt the user database of this bot. This must be specified, there is no default. NOTE: be careful not to change if reconfiguring the bot or else the user database won't be accessible.

Setting up the testing environment with code coverage

In the package.json make sure the wickrio-bot-api is at least 5.79.X

Make sure the test script in the package.json is as follows "nyc --reporter=text-summary --reporter=text mocha test", this will be the default test script that will be run with the ./test.sh (if you pass in no arguments)

The following modules were used to do testing with code coverage: nyc mocha @istanbuljs/nyc-config-babel babel-plugin-istanbul

Make sure these modules are installed.

In the babel section of the package.json make sure that "sourceMaps" is set to true, and that "istanbul" is added to all the plugins lists.

In the nyc section of the package.json the following should be present: "all": true, "sourceMap": false, "instrument": false, "extends": "@istanbuljs/nyc-config-babel",

These settings will allow nyc to use code that was instrumented through babel using @istanbuljs/nyc-config-babel.

When you do "npm run build" the files in the build directory will be created. The files in the build directory are used during testing and code coverage. (If the build directory doesn't exist at the the time of running "./test.sh", the build directory will be created automatically)

Any tests you plan on running should be located in the "tests" directory, any tests you add must be using modules from the build directory. For example if you want to make tests for help.js make sure your require statement looks like the following: const Help = require('../build/commands/help')

The information used to setup the testing environment was found at the following links:

https://www.npmjs.com/package/@istanbuljs/nyc-config-babel https://github.com/istanbuljs/babel-plugin-istanbul

Running the testing script;

Unit tests are found in the tests directory. They are made using the mocha npm module. nyc is also used to collect code coverage on these tests.

To run the tests with code-coverage simply use the test.sh script. By default if you run ./test.sh with no arguments a test summary and a detailed report will be outputted to the screen. Otherwise, if you input arguments that are valid reporters used by nyc then the report will be generated using those chosen reporters. For example if you use the argument "json" the following script will be run: "nyc --reporter=json mocha test" Reporter choices can be found here https://istanbul.js.org/docs/advanced/alternative-reporters/

If build files are not present at the time of running ./test.sh, npm run build will be run to create those files so they can be tested.

The test.sh script can be found in the root directory of the broadcast-bot repo.

License

This software is distributed under the Apache License, version 2.0

   Copyright 2021 Wickr, Inc.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.