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

@functions-api/core

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@functions-api/core - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

10

lib/handlers/abstract.js
const Errors = require('../errors.js')
const Logger = require('../logger.js')
const staticLogger = new Logger()
module.exports = class AbstractHandler {
class AbstractHandler {
init (providedOptions) {

@@ -69,3 +68,3 @@ this.options = { ...providedOptions }

staticLogger.error(`Fatal Error ${e}`)
AbstractHandler.logger.error(`Fatal Error ${e}`)
throw e

@@ -82,2 +81,5 @@ }

}
}
}
AbstractHandler.logger = new Logger()
module.exports = AbstractHandler

2

package.json
{
"name": "@functions-api/core",
"version": "0.0.8",
"version": "0.0.9",
"description": "A small framework for building APIs as functions (to run in a FaaS, like Lambda)",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,3 +7,5 @@ const TestHandler = require('./test-handler.js')

describe('initialization', () => {
test('it has a logger instance on the base class', () => {
expect(AbstractHandler).toHaveProperty('logger')
})
})

@@ -10,0 +12,0 @@

@@ -8,2 +8,6 @@ const TestHandler = require('./test-handler.js')

const BodyHandler = AbstractBodyHandler(TestHandler)
test('it has a logger instance on the base class', () => {
expect(BodyHandler).toHaveProperty('logger')
})

@@ -10,0 +14,0 @@ test('throws an error if no body is defined', () => {

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