Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ackee-report

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ackee-report - npm Package Compare versions

Comparing version 0.6.4 to 0.7.0-beta

.eslintrc.js

6

CHANGELOG.md

@@ -1,7 +0,1 @@

# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v0.6.4] - 2021-01-05

@@ -8,0 +2,0 @@

10

package.json
{
"name": "ackee-report",
"version": "0.6.4",
"version": "0.7.0-beta",
"description": "CLI tool to generate performance reports of websites using the self-hosted analytics tool Ackee.",

@@ -31,2 +31,3 @@ "bin": "./src/index.js",

"configstore": "^5.0.1",
"dotenv": "^8.2.0",
"ejs": "^3.1.5",

@@ -39,6 +40,9 @@ "feed": "^4.2.1",

"devDependencies": {
"@betahuhn/eslint-config-node": "^0.1.0",
"@betahuhn/config": "^1.0.2",
"ejs-serve": "^1.0.2",
"eslint": "^7.16.0"
}
},
"publishConfig": {
"access": "public"
}
}

@@ -33,14 +33,18 @@ <div align="center">

- *ackee server* - the endpoint of your Ackee instance
- *ackee token* - a permanent Ackee token (can be used instead of username and password, [more info](#ackee-api-authentication))
- *ackee username* - your Ackee username ([more info](#ackee-api-authentication))
- *ackee password* - your Ackee password ([more info](#ackee-api-authentication))
- *email host* - the domain of the email server ([more info](#email-setup))
- *email port* - the port of the email server ([more info](#email-setup))
- *email username* - the username to use with the email server ([more info](#email-setup))
- *email password* - the password to use with the email server ([more info](#email-setup))
- *email from* - the from address to use ([more info](#email-setup))
- *ackee server* / `ACKEE_SERVER` - the endpoint of your Ackee instance
- *ackee token* / `ACKEE_TOKEN` - a permanent Ackee token (can be used instead of username and password, [more info](#ackee-api-authentication))
- *ackee username* `ACKEE_USERNAME` - your Ackee username ([more info](#ackee-api-authentication))
- *ackee password* `ACKEE_PASSWORD` - your Ackee password ([more info](#ackee-api-authentication))
- *email host* / `EMAIL_HOST` - the domain of the email server ([more info](#email-setup))
- *email port* / `EMAIL_PORT` - the port of the email server ([more info](#email-setup))
- *email username* / `EMAIL_USERNAME` - the username to use with the email server ([more info](#email-setup))
- *email password* / `EMAIL_PASSWORD` - the password to use with the email server ([more info](#email-setup))
- *email from* / `EMAIL_FROM` - the from address to use ([more info](#email-setup))
The configuration will be stored in your home directory under `~/.config/configstore/ackee-report.json` and can be changed at any point.
### Environment Variables
If you don't want to interact with [ackee-report](https://github.com/BetaHuhn/ackee-report) via the CLI interface, you can also specify each configuration option as an environment variable e.g. `ACKEE_TOKEN=<token>`
### Ackee API authentication

@@ -47,0 +51,0 @@

@@ -5,2 +5,4 @@ const Configstore = require('configstore')

require('dotenv').config()
const config = new Configstore(packageJson.name, {})

@@ -10,2 +12,7 @@

const getEnv = (key) => {
const envKey = key.split('.').join('_').toUpperCase()
return process.env[envKey]
}
const verifyField = (field) => {

@@ -15,2 +22,8 @@ const existing = config.get(field)

const env = getEnv(field)
if (env !== undefined) {
config.set(field, env)
return
}
const text = field.split('.').join(' ')

@@ -28,4 +41,13 @@ const required = !field.includes('email')

const loadConfig = function() {
if (!(config.get('ackee.token') || (config.get('ackee.username') && config.get('ackee.password')))) {
const verifyAuth = () => {
const envToken = getEnv('ackee.token')
if (envToken !== undefined) {
config.set('ackee.token', envToken)
return
}
const configHasToken = config.get('ackee.token') !== undefined
const configHasCreds = config.get('ackee.username') !== undefined && config.get('ackee.password') !== undefined
if (configHasToken === false && configHasCreds === false) {
const token = prompt('ackee token (press enter to skip): ')

@@ -41,3 +63,7 @@ if (token.length < 1) {

}
}
const loadConfig = function() {
verifyAuth()
fields.forEach((field) => {

@@ -44,0 +70,0 @@ verifyField(field)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc