azure-functions-ts-essentials
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -55,2 +55,3 @@ var HttpMethod; | ||
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed"; | ||
HttpStatusCode[HttpStatusCode["UnprocessableEntity"] = 422] = "UnprocessableEntity"; | ||
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired"; | ||
@@ -57,0 +58,0 @@ HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; |
@@ -55,2 +55,3 @@ var HttpMethod; | ||
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed"; | ||
HttpStatusCode[HttpStatusCode["UnprocessableEntity"] = 422] = "UnprocessableEntity"; | ||
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired"; | ||
@@ -57,0 +58,0 @@ HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; |
@@ -59,2 +59,3 @@ (function (global, factory) { | ||
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed"; | ||
HttpStatusCode[HttpStatusCode["UnprocessableEntity"] = 422] = "UnprocessableEntity"; | ||
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired"; | ||
@@ -61,0 +62,0 @@ HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError"; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.azureFunctionsTsEssentials=e.azureFunctionsTsEssentials||{})}(this,function(e){"use strict";!function(e){e.Get="GET",e.Post="POST",e.Delete="DELETE",e.Head="HEAD",e.Patch="PATCH",e.Put="PUT",e.Options="OPTIONS",e.Trace="TRACE"}(e.HttpMethod||(e.HttpMethod={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultipleChoices=300]="MultipleChoices",e[e.Ambiguous=300]="Ambiguous",e[e.MovedPermanently=301]="MovedPermanently",e[e.Moved=301]="Moved",e[e.Found=302]="Found",e[e.Redirect=302]="Redirect",e[e.SeeOther=303]="SeeOther",e[e.RedirectMethod=303]="RedirectMethod",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.RedirectKeepVerb=307]="RedirectKeepVerb",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.RequestEntityTooLarge=413]="RequestEntityTooLarge",e[e.RequestUriTooLong=414]="RequestUriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported"}(e.HttpStatusCode||(e.HttpStatusCode={})),Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.azureFunctionsTsEssentials=e.azureFunctionsTsEssentials||{})}(this,function(e){"use strict";!function(e){e.Get="GET",e.Post="POST",e.Delete="DELETE",e.Head="HEAD",e.Patch="PATCH",e.Put="PUT",e.Options="OPTIONS",e.Trace="TRACE"}(e.HttpMethod||(e.HttpMethod={})),function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultipleChoices=300]="MultipleChoices",e[e.Ambiguous=300]="Ambiguous",e[e.MovedPermanently=301]="MovedPermanently",e[e.Moved=301]="Moved",e[e.Found=302]="Found",e[e.Redirect=302]="Redirect",e[e.SeeOther=303]="SeeOther",e[e.RedirectMethod=303]="RedirectMethod",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.RedirectKeepVerb=307]="RedirectKeepVerb",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.RequestEntityTooLarge=413]="RequestEntityTooLarge",e[e.RequestUriTooLong=414]="RequestUriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RequestedRangeNotSatisfiable=416]="RequestedRangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported"}(e.HttpStatusCode||(e.HttpStatusCode={})),Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=azure-functions-ts-essentials.umd.min.js.map |
@@ -0,5 +1,22 @@ | ||
import { HttpRequest } from './http-request'; | ||
import { HttpResponse } from './http-response'; | ||
export interface Context { | ||
log(...message: Array<any>): void; | ||
done(err: Error | undefined, res: HttpResponse): void; | ||
invocationId?: string; | ||
executionContext?: any; | ||
bindings?: any; | ||
req?: HttpRequest; | ||
bindingData?: any; | ||
res?: HttpResponse; | ||
log?: { | ||
(...message: Array<any>): void; | ||
error(...message: Array<any>): void; | ||
warn(...message: Array<any>): void; | ||
info(...message: Array<any>): void; | ||
verbose(...message: Array<any>): void; | ||
metric(...message: Array<any>): void; | ||
}; | ||
bind?(...args: Array<any>): void; | ||
done(err?: Error | undefined, propertyBag?: { | ||
[key: string]: any; | ||
}): void; | ||
} |
import { HttpMethod } from './http-method'; | ||
export interface HttpRequest { | ||
originalUrl?: string; | ||
method: HttpMethod; | ||
params: any; | ||
query: any; | ||
body: any; | ||
query?: { | ||
[key: string]: any; | ||
}; | ||
headers?: { | ||
[key: string]: any; | ||
}; | ||
body?: any; | ||
params?: { | ||
[key: string]: any; | ||
}; | ||
rawBody?: any; | ||
} |
@@ -0,5 +1,20 @@ | ||
/// <reference types="node" /> | ||
import { HttpStatusCode } from './http-status-code'; | ||
export interface HttpResponse { | ||
status: HttpStatusCode; | ||
status: HttpStatusCode | number; | ||
body: any; | ||
headers?: { | ||
'content-type'?: string; | ||
'content-length'?: HttpStatusCode | number; | ||
'content-disposition'?: string; | ||
'content-encoding'?: string; | ||
'content-language'?: string; | ||
'content-range'?: string; | ||
'content-location'?: string; | ||
'content-md5'?: Buffer; | ||
'expires'?: Date; | ||
'last-modified'?: Date; | ||
[key: string]: any; | ||
}; | ||
isRaw?: boolean; | ||
} |
@@ -42,2 +42,3 @@ export declare enum HttpStatusCode { | ||
ExpectationFailed = 417, | ||
UnprocessableEntity = 422, | ||
UpgradeRequired = 426, | ||
@@ -44,0 +45,0 @@ InternalServerError = 500, |
{ | ||
"name": "azure-functions-ts-essentials", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Essential interfaces and tools for backend development on Azure Functions with TypeScript", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/fulls1z3/azure-functions-ts-essentials.git" | ||
"url": "https://github.com/azure-seed/azure-functions-ts-essentials.git" | ||
}, | ||
"keywords": [ | ||
"azure-functions", | ||
"azure" | ||
], | ||
"author": { | ||
@@ -15,5 +19,5 @@ "name": "Burak Tasci", | ||
"bugs": { | ||
"url": "https://github.com/fulls1z3/azure-functions-ts-essentials/issues" | ||
"url": "https://github.com/azure-seed/azure-functions-ts-essentials/issues" | ||
}, | ||
"homepage": "https://github.com/fulls1z3/azure-functions-ts-essentials#readme", | ||
"homepage": "https://github.com/azure-seed/azure-functions-ts-essentials#readme", | ||
"scripts": { | ||
@@ -34,4 +38,4 @@ "clean": "rimraf .cache dist", | ||
"devDependencies": { | ||
"@types/jest": "~21.1.1", | ||
"@types/node": "~8.0.31", | ||
"@types/jest": "~21.1.2", | ||
"@types/node": "~8.0.32", | ||
"rimraf": "~2.6.2", | ||
@@ -48,3 +52,3 @@ "ts-node": "~3.3.0", | ||
"jest-junit-reporter": "~1.1.0", | ||
"ts-jest": "~21.0.1", | ||
"ts-jest": "~21.1.0", | ||
"standard-version": "~4.2.0", | ||
@@ -62,2 +66,3 @@ "tslint": "~5.7.0", | ||
], | ||
"mapCoverage": true, | ||
"moduleFileExtensions": [ | ||
@@ -64,0 +69,0 @@ "ts", |
@@ -1,9 +0,9 @@ | ||
# azure-functions-ts-essentials [![npm version](https://badge.fury.io/js/azure-functions-ts-essentials.svg)](https://www.npmjs.com/package/azure-functions-ts-essentials) [![npm downloads](https://img.shields.io/npm/dm/azure-functions-ts-essentials.svg)](https://www.npmjs.com/package/azure-functions-ts-essentials) | ||
# azure-seed/azure-functions-ts-essentials [![npm version](https://badge.fury.io/js/azure-functions-ts-essentials.svg)](https://www.npmjs.com/package/azure-functions-ts-essentials) [![npm downloads](https://img.shields.io/npm/dm/azure-functions-ts-essentials.svg)](https://www.npmjs.com/package/azure-functions-ts-essentials) | ||
Essential interfaces and tools for backend development on [Azure Functions] with [TypeScript] | ||
[![CircleCI](https://circleci.com/gh/fulls1z3/azure-functions-ts-essentials.svg?style=shield)](https://circleci.com/gh/fulls1z3/azure-functions-ts-essentials) | ||
[![coverage](https://codecov.io/github/fulls1z3/azure-functions-ts-essentials/coverage.svg?branch=master)](https://codecov.io/gh/fulls1z3/azure-functions-ts-essentials) | ||
[![CircleCI](https://circleci.com/gh/azure-seed/azure-functions-ts-essentials.svg?style=shield)](https://circleci.com/gh/azure-seed/azure-functions-ts-essentials) | ||
[![coverage](https://codecov.io/github/azure-seed/azure-functions-ts-essentials/coverage.svg?branch=master)](https://codecov.io/gh/azure-seed/azure-functions-ts-essentials) | ||
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) | ||
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/fulls1z3/azure-functions-ts-essentials.svg)](https://greenkeeper.io/) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/azure-seed/azure-functions-ts-essentials.svg)](https://greenkeeper.io/) | ||
@@ -10,0 +10,0 @@ > Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can. |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
70601
330