Socket
Socket
Sign inDemoInstall

@reaktor-internal/authorization-client

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reaktor-internal/authorization-client - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

8

cachedClient.js
const client = require('./client')
let config = {}
let infoLog = null
// let infoLog = null
let errorLog = null
let verboseLog = null
let cachedResults = null

@@ -14,3 +15,3 @@ let cacheValidityEndTimestamp = new Date()

const updateCache = async () => {
infoLog(`Updating cache with TTL ${config.cacheTTL || DEFAULT_TTL_SECS}s`)
verboseLog(`Updating cache with TTL ${config.cacheTTL || DEFAULT_TTL_SECS}s`)
try {

@@ -56,4 +57,5 @@ cachedResults = await client.getAllRoles()

config = cfg
infoLog = config.infoLog
// infoLog = config.infoLog
errorLog = config.errorLog || config.infoLog
verboseLog = config.verboseLog || config.infoLog
client.initialize(cfg)

@@ -60,0 +62,0 @@ }

@@ -5,2 +5,3 @@ const fetch = require('node-fetch')

let errorLog = null
let verboseLog = null
let config = null

@@ -22,3 +23,3 @@

const getAllRoles = () => {
infoLog('Fetching all roles')
verboseLog('Fetching all roles')
return authRequest('')

@@ -46,4 +47,5 @@ }

config = cfg
infoLog = cfg.infoLog
errorLog = cfg.errorLog
infoLog = config.infoLog
errorLog = config.errorLog || config.infoLog
verboseLog = config.verboseLog || config.infoLog
}

@@ -50,0 +52,0 @@

{
"name": "@reaktor-internal/authorization-client",
"version": "1.0.3",
"version": "1.0.5",
"description": "Reaktor authorization service client",

@@ -11,4 +11,3 @@ "repository": "https://github.com/reaktor/authorization",

"lint": "eslint .",
"test": "npm run lint && NODE_ENV=test mocha test/unit",
"integration-test": "NODE_ENV=test mocha test/integration",
"test": "npm run lint",
"pre-push": "npm test",

@@ -15,0 +14,0 @@ "init-config": "awk -F = '{print $1}' secrets.env.template | grep '[^$]' | xargs -P 100 -I {} heroku config:get -a reaktor-authorization -s {} | sed \"s/\\(DATABASE_URL=.*\\)'$/\\1?ssl=true'/\" | sort > secrets.env",

@@ -21,3 +21,4 @@ # Authorization Client

infoLog: myInfoLog,
errorLog: myErrorLog
errorLog: myErrorLog,
verboseLog: myVerboseLog
})

@@ -33,2 +34,3 @@ ```

* *errorLog* a function to do the error level logging (default: _config.infoLog_ || _console.log_)
* *verboseLog* a function to do the verbose level logging (default: _config.verboseLog_ || _console.debug_)

@@ -35,0 +37,0 @@

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