tote-lib
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -17,5 +17,5 @@ import { Context, HttpRequest } from '@azure/functions'; | ||
invoke(): object | void; | ||
validate(): void; | ||
_validate(): void; | ||
static bootstrap(Func: Constructable): (context: Context, request: HttpRequest) => Promise<void>; | ||
} | ||
export {}; |
@@ -111,3 +111,3 @@ 'use strict'; | ||
Func.prototype.invoke = function () { }; | ||
Func.prototype.validate = function () { | ||
Func.prototype._validate = function () { | ||
var _a = this, schema = _a.schema, _b = _a.request, body = _b.body, query = _b.query; | ||
@@ -138,3 +138,3 @@ var request = {}; | ||
if (func.schema) { | ||
func.validate(); | ||
func._validate(); | ||
} | ||
@@ -141,0 +141,0 @@ return [4 /*yield*/, func.invoke()]; |
{ | ||
"name": "tote-lib", | ||
"license": "MIT", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"main": "dist/index.js", | ||
@@ -28,5 +28,5 @@ "scripts": { | ||
"hooks": { | ||
"pre-commit": "yarn build && pretty-quick --staged" | ||
"pre-commit": "yarn build && git add ./dist && pretty-quick --staged" | ||
} | ||
} | ||
} |
@@ -45,3 +45,3 @@ import get from 'lodash.get' | ||
validate() { | ||
_validate() { | ||
const { | ||
@@ -71,2 +71,5 @@ schema, | ||
return async (context: Context, request: HttpRequest) => { | ||
// workaround for Azure Function host bug | ||
console.log = context.log | ||
const func: Func = new Func(context, request) | ||
@@ -76,3 +79,3 @@ | ||
if (func.schema) { | ||
func.validate() | ||
func._validate() | ||
} | ||
@@ -79,0 +82,0 @@ |
@@ -7,1 +7,3 @@ import * as joi from '@hapi/joi' | ||
export { default as Func } from './func' | ||
export { default as invoke } from './invoke' |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
15456
14
337
1
113