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

azure-functions-ts-essentials

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-functions-ts-essentials - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

models/http-method.d.ts

71

azure-functions-ts-essentials.es5.js

@@ -1,10 +0,65 @@

function mock(context, req) {
var res = {
status: 200,
body: req.body.name || ''
};
context.done(undefined, res);
}
var HttpMethod;
(function (HttpMethod) {
HttpMethod["Get"] = "GET";
HttpMethod["Post"] = "POST";
HttpMethod["Delete"] = "DELETE";
HttpMethod["Head"] = "HEAD";
HttpMethod["Patch"] = "PATCH";
HttpMethod["Put"] = "PUT";
HttpMethod["Options"] = "OPTIONS";
HttpMethod["Trace"] = "TRACE";
})(HttpMethod || (HttpMethod = {}));
export { mock };
var HttpStatusCode;
(function (HttpStatusCode) {
HttpStatusCode[HttpStatusCode["Continue"] = 100] = "Continue";
HttpStatusCode[HttpStatusCode["SwitchingProtocols"] = 101] = "SwitchingProtocols";
HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted";
HttpStatusCode[HttpStatusCode["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
HttpStatusCode[HttpStatusCode["ResetContent"] = 205] = "ResetContent";
HttpStatusCode[HttpStatusCode["PartialContent"] = 206] = "PartialContent";
HttpStatusCode[HttpStatusCode["MultipleChoices"] = 300] = "MultipleChoices";
HttpStatusCode[HttpStatusCode["Ambiguous"] = 300] = "Ambiguous";
HttpStatusCode[HttpStatusCode["MovedPermanently"] = 301] = "MovedPermanently";
HttpStatusCode[HttpStatusCode["Moved"] = 301] = "Moved";
HttpStatusCode[HttpStatusCode["Found"] = 302] = "Found";
HttpStatusCode[HttpStatusCode["Redirect"] = 302] = "Redirect";
HttpStatusCode[HttpStatusCode["SeeOther"] = 303] = "SeeOther";
HttpStatusCode[HttpStatusCode["RedirectMethod"] = 303] = "RedirectMethod";
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
HttpStatusCode[HttpStatusCode["UseProxy"] = 305] = "UseProxy";
HttpStatusCode[HttpStatusCode["Unused"] = 306] = "Unused";
HttpStatusCode[HttpStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpStatusCode[HttpStatusCode["RedirectKeepVerb"] = 307] = "RedirectKeepVerb";
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
HttpStatusCode[HttpStatusCode["PaymentRequired"] = 402] = "PaymentRequired";
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
HttpStatusCode[HttpStatusCode["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpStatusCode[HttpStatusCode["NotAcceptable"] = 406] = "NotAcceptable";
HttpStatusCode[HttpStatusCode["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpStatusCode[HttpStatusCode["RequestTimeout"] = 408] = "RequestTimeout";
HttpStatusCode[HttpStatusCode["Conflict"] = 409] = "Conflict";
HttpStatusCode[HttpStatusCode["Gone"] = 410] = "Gone";
HttpStatusCode[HttpStatusCode["LengthRequired"] = 411] = "LengthRequired";
HttpStatusCode[HttpStatusCode["PreconditionFailed"] = 412] = "PreconditionFailed";
HttpStatusCode[HttpStatusCode["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge";
HttpStatusCode[HttpStatusCode["RequestUriTooLong"] = 414] = "RequestUriTooLong";
HttpStatusCode[HttpStatusCode["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
HttpStatusCode[HttpStatusCode["RequestedRangeNotSatisfiable"] = 416] = "RequestedRangeNotSatisfiable";
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed";
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired";
HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError";
HttpStatusCode[HttpStatusCode["NotImplemented"] = 501] = "NotImplemented";
HttpStatusCode[HttpStatusCode["BadGateway"] = 502] = "BadGateway";
HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
HttpStatusCode[HttpStatusCode["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
})(HttpStatusCode || (HttpStatusCode = {}));
export { HttpMethod, HttpStatusCode };
//# sourceMappingURL=azure-functions-ts-essentials.es5.js.map

@@ -1,10 +0,65 @@

function mock(context, req) {
const res = {
status: 200,
body: req.body.name || ''
};
context.done(undefined, res);
}
var HttpMethod;
(function (HttpMethod) {
HttpMethod["Get"] = "GET";
HttpMethod["Post"] = "POST";
HttpMethod["Delete"] = "DELETE";
HttpMethod["Head"] = "HEAD";
HttpMethod["Patch"] = "PATCH";
HttpMethod["Put"] = "PUT";
HttpMethod["Options"] = "OPTIONS";
HttpMethod["Trace"] = "TRACE";
})(HttpMethod || (HttpMethod = {}));
export { mock };
var HttpStatusCode;
(function (HttpStatusCode) {
HttpStatusCode[HttpStatusCode["Continue"] = 100] = "Continue";
HttpStatusCode[HttpStatusCode["SwitchingProtocols"] = 101] = "SwitchingProtocols";
HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted";
HttpStatusCode[HttpStatusCode["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
HttpStatusCode[HttpStatusCode["ResetContent"] = 205] = "ResetContent";
HttpStatusCode[HttpStatusCode["PartialContent"] = 206] = "PartialContent";
HttpStatusCode[HttpStatusCode["MultipleChoices"] = 300] = "MultipleChoices";
HttpStatusCode[HttpStatusCode["Ambiguous"] = 300] = "Ambiguous";
HttpStatusCode[HttpStatusCode["MovedPermanently"] = 301] = "MovedPermanently";
HttpStatusCode[HttpStatusCode["Moved"] = 301] = "Moved";
HttpStatusCode[HttpStatusCode["Found"] = 302] = "Found";
HttpStatusCode[HttpStatusCode["Redirect"] = 302] = "Redirect";
HttpStatusCode[HttpStatusCode["SeeOther"] = 303] = "SeeOther";
HttpStatusCode[HttpStatusCode["RedirectMethod"] = 303] = "RedirectMethod";
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
HttpStatusCode[HttpStatusCode["UseProxy"] = 305] = "UseProxy";
HttpStatusCode[HttpStatusCode["Unused"] = 306] = "Unused";
HttpStatusCode[HttpStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpStatusCode[HttpStatusCode["RedirectKeepVerb"] = 307] = "RedirectKeepVerb";
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
HttpStatusCode[HttpStatusCode["PaymentRequired"] = 402] = "PaymentRequired";
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
HttpStatusCode[HttpStatusCode["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpStatusCode[HttpStatusCode["NotAcceptable"] = 406] = "NotAcceptable";
HttpStatusCode[HttpStatusCode["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpStatusCode[HttpStatusCode["RequestTimeout"] = 408] = "RequestTimeout";
HttpStatusCode[HttpStatusCode["Conflict"] = 409] = "Conflict";
HttpStatusCode[HttpStatusCode["Gone"] = 410] = "Gone";
HttpStatusCode[HttpStatusCode["LengthRequired"] = 411] = "LengthRequired";
HttpStatusCode[HttpStatusCode["PreconditionFailed"] = 412] = "PreconditionFailed";
HttpStatusCode[HttpStatusCode["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge";
HttpStatusCode[HttpStatusCode["RequestUriTooLong"] = 414] = "RequestUriTooLong";
HttpStatusCode[HttpStatusCode["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
HttpStatusCode[HttpStatusCode["RequestedRangeNotSatisfiable"] = 416] = "RequestedRangeNotSatisfiable";
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed";
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired";
HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError";
HttpStatusCode[HttpStatusCode["NotImplemented"] = 501] = "NotImplemented";
HttpStatusCode[HttpStatusCode["BadGateway"] = 502] = "BadGateway";
HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
HttpStatusCode[HttpStatusCode["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
})(HttpStatusCode || (HttpStatusCode = {}));
export { HttpMethod, HttpStatusCode };
//# sourceMappingURL=azure-functions-ts-essentials.js.map

@@ -7,11 +7,62 @@ (function (global, factory) {

function mock(context, req) {
var res = {
status: 200,
body: req.body.name || ''
};
context.done(undefined, res);
}
(function (HttpMethod) {
HttpMethod["Get"] = "GET";
HttpMethod["Post"] = "POST";
HttpMethod["Delete"] = "DELETE";
HttpMethod["Head"] = "HEAD";
HttpMethod["Patch"] = "PATCH";
HttpMethod["Put"] = "PUT";
HttpMethod["Options"] = "OPTIONS";
HttpMethod["Trace"] = "TRACE";
})(exports.HttpMethod || (exports.HttpMethod = {}));
exports.mock = mock;
(function (HttpStatusCode) {
HttpStatusCode[HttpStatusCode["Continue"] = 100] = "Continue";
HttpStatusCode[HttpStatusCode["SwitchingProtocols"] = 101] = "SwitchingProtocols";
HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
HttpStatusCode[HttpStatusCode["Created"] = 201] = "Created";
HttpStatusCode[HttpStatusCode["Accepted"] = 202] = "Accepted";
HttpStatusCode[HttpStatusCode["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
HttpStatusCode[HttpStatusCode["NoContent"] = 204] = "NoContent";
HttpStatusCode[HttpStatusCode["ResetContent"] = 205] = "ResetContent";
HttpStatusCode[HttpStatusCode["PartialContent"] = 206] = "PartialContent";
HttpStatusCode[HttpStatusCode["MultipleChoices"] = 300] = "MultipleChoices";
HttpStatusCode[HttpStatusCode["Ambiguous"] = 300] = "Ambiguous";
HttpStatusCode[HttpStatusCode["MovedPermanently"] = 301] = "MovedPermanently";
HttpStatusCode[HttpStatusCode["Moved"] = 301] = "Moved";
HttpStatusCode[HttpStatusCode["Found"] = 302] = "Found";
HttpStatusCode[HttpStatusCode["Redirect"] = 302] = "Redirect";
HttpStatusCode[HttpStatusCode["SeeOther"] = 303] = "SeeOther";
HttpStatusCode[HttpStatusCode["RedirectMethod"] = 303] = "RedirectMethod";
HttpStatusCode[HttpStatusCode["NotModified"] = 304] = "NotModified";
HttpStatusCode[HttpStatusCode["UseProxy"] = 305] = "UseProxy";
HttpStatusCode[HttpStatusCode["Unused"] = 306] = "Unused";
HttpStatusCode[HttpStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect";
HttpStatusCode[HttpStatusCode["RedirectKeepVerb"] = 307] = "RedirectKeepVerb";
HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
HttpStatusCode[HttpStatusCode["PaymentRequired"] = 402] = "PaymentRequired";
HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
HttpStatusCode[HttpStatusCode["NotFound"] = 404] = "NotFound";
HttpStatusCode[HttpStatusCode["MethodNotAllowed"] = 405] = "MethodNotAllowed";
HttpStatusCode[HttpStatusCode["NotAcceptable"] = 406] = "NotAcceptable";
HttpStatusCode[HttpStatusCode["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
HttpStatusCode[HttpStatusCode["RequestTimeout"] = 408] = "RequestTimeout";
HttpStatusCode[HttpStatusCode["Conflict"] = 409] = "Conflict";
HttpStatusCode[HttpStatusCode["Gone"] = 410] = "Gone";
HttpStatusCode[HttpStatusCode["LengthRequired"] = 411] = "LengthRequired";
HttpStatusCode[HttpStatusCode["PreconditionFailed"] = 412] = "PreconditionFailed";
HttpStatusCode[HttpStatusCode["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge";
HttpStatusCode[HttpStatusCode["RequestUriTooLong"] = 414] = "RequestUriTooLong";
HttpStatusCode[HttpStatusCode["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
HttpStatusCode[HttpStatusCode["RequestedRangeNotSatisfiable"] = 416] = "RequestedRangeNotSatisfiable";
HttpStatusCode[HttpStatusCode["ExpectationFailed"] = 417] = "ExpectationFailed";
HttpStatusCode[HttpStatusCode["UpgradeRequired"] = 426] = "UpgradeRequired";
HttpStatusCode[HttpStatusCode["InternalServerError"] = 500] = "InternalServerError";
HttpStatusCode[HttpStatusCode["NotImplemented"] = 501] = "NotImplemented";
HttpStatusCode[HttpStatusCode["BadGateway"] = 502] = "BadGateway";
HttpStatusCode[HttpStatusCode["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpStatusCode[HttpStatusCode["GatewayTimeout"] = 504] = "GatewayTimeout";
HttpStatusCode[HttpStatusCode["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
})(exports.HttpStatusCode || (exports.HttpStatusCode = {}));

@@ -18,0 +69,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

2

bundles/azure-functions-ts-essentials.umd.min.js

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.azureFunctionsTsEssentials=e.azureFunctionsTsEssentials||{})}(this,function(e){"use strict";e.mock=function(e,n){var t={status:200,body:n.body.name||""};e.done(void 0,t)},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.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

@@ -1,5 +0,5 @@

import { HttpRequest } from './models/http-request';
import { HttpResponse } from './models/http-response';
import { Context } from './models/context';
export { Context, HttpRequest, HttpResponse };
export declare function mock(context: Context, req: HttpRequest): any;
export { Context } from './models/context';
export { HttpMethod } from './models/http-method';
export { HttpRequest } from './models/http-request';
export { HttpResponse } from './models/http-response';
export { HttpStatusCode } from './models/http-status-code';

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

import { HttpMethod } from './http-method';
export interface HttpRequest {
body: {
name?: string;
};
query: {
name?: string;
};
method: HttpMethod;
params: any;
query: any;
body: any;
}

@@ -0,4 +1,5 @@

import { HttpStatusCode } from './http-status-code';
export interface HttpResponse {
status: number;
body: string;
status: HttpStatusCode;
body: any;
}
{
"name": "azure-functions-ts-essentials",
"version": "1.0.0",
"version": "1.1.0",
"description": "Essential interfaces and tools for backend development on Azure Functions with TypeScript",

@@ -33,5 +33,5 @@ "repository": {

"devDependencies": {
"@types/jest": "~21.1.0",
"@types/node": "~8.0.30",
"rimraf": "~2.6.1",
"@types/jest": "~21.1.1",
"@types/node": "~8.0.31",
"rimraf": "~2.6.2",
"ts-node": "~3.3.0",

@@ -42,6 +42,6 @@ "glob": "~7.1.2",

"rollup-plugin-node-resolve": "~3.0.0",
"rollup-plugin-commonjs": "~8.2.0",
"rollup-plugin-commonjs": "~8.2.1",
"rollup-plugin-sourcemaps": "~0.4.2",
"rollup-plugin-uglify": "~2.0.1",
"jest": "~21.1.0",
"jest": "~21.2.1",
"jest-junit-reporter": "~1.1.0",

@@ -52,3 +52,3 @@ "ts-jest": "~21.0.1",

"backend-tslint-rules": "1.0.0",
"typescript": "~2.5.2"
"typescript": "~2.5.3"
},

@@ -69,3 +69,8 @@ "jest": {

"silent": true
},
"greenkeeper": {
"ignore": [
"rollup"
]
}
}

@@ -9,3 +9,2 @@ # 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)

[![Greenkeeper badge](https://badges.greenkeeper.io/fulls1z3/azure-functions-ts-essentials.svg)](https://greenkeeper.io/)
[![Angular Style Guide](https://mgechev.github.io/angular2-style-guide/images/badge.svg)](https://angular.io/styleguide)

@@ -12,0 +11,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

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