Comparing version 0.0.11 to 0.0.12
@@ -13,9 +13,9 @@ export interface Request { | ||
params: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
headers: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
cookies: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
@@ -22,0 +22,0 @@ } |
@@ -16,4 +16,8 @@ import { Either } from "fp-ts/lib/Either"; | ||
method?: string; | ||
params?: object; | ||
headers?: object; | ||
params?: { | ||
[key: string]: string; | ||
}; | ||
headers?: { | ||
[key: string]: string; | ||
}; | ||
connectionTimeout?: number; | ||
@@ -31,3 +35,5 @@ readTimeout?: number; | ||
message: string; | ||
headers: object; | ||
headers: { | ||
[key: string]: string | undefined; | ||
}; | ||
contentType: string; | ||
@@ -34,0 +40,0 @@ body: string | null; |
@@ -6,2 +6,2 @@ import { Either } from "fp-ts/lib/Either"; | ||
} | ||
export declare function render(view: any, model?: any, options?: ThymeleafRenderOptions): Either<Error, string>; | ||
export declare function render(view: any, options?: ThymeleafRenderOptions): (model: any) => Either<Error, string>; |
import { tryCatch } from "fp-ts/lib/Either"; | ||
var thymeleaf = __non_webpack_require__('/lib/thymeleaf'); | ||
export function render(view, model, options) { | ||
return tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); | ||
export function render(view, options) { | ||
return function (model) { return tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); }; | ||
} |
@@ -13,9 +13,9 @@ export interface Request { | ||
params: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
headers: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
cookies: { | ||
[key: string]: string; | ||
[key: string]: string | undefined; | ||
}; | ||
@@ -22,0 +22,0 @@ } |
@@ -16,4 +16,8 @@ import { Either } from "fp-ts/lib/Either"; | ||
method?: string; | ||
params?: object; | ||
headers?: object; | ||
params?: { | ||
[key: string]: string; | ||
}; | ||
headers?: { | ||
[key: string]: string; | ||
}; | ||
connectionTimeout?: number; | ||
@@ -31,3 +35,5 @@ readTimeout?: number; | ||
message: string; | ||
headers: object; | ||
headers: { | ||
[key: string]: string | undefined; | ||
}; | ||
contentType: string; | ||
@@ -34,0 +40,0 @@ body: string | null; |
@@ -6,2 +6,2 @@ import { Either } from "fp-ts/lib/Either"; | ||
} | ||
export declare function render(view: any, model?: any, options?: ThymeleafRenderOptions): Either<Error, string>; | ||
export declare function render(view: any, options?: ThymeleafRenderOptions): (model: any) => Either<Error, string>; |
@@ -5,5 +5,5 @@ "use strict"; | ||
var thymeleaf = __non_webpack_require__('/lib/thymeleaf'); | ||
function render(view, model, options) { | ||
return Either_1.tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); | ||
function render(view, options) { | ||
return function (model) { return Either_1.tryCatch(function () { return thymeleaf.render(view, model, options); }, function (e) { return ({ errorKey: "InternalServerError", cause: String(e) }); }); }; | ||
} | ||
exports.render = render; |
{ | ||
"name": "enonic-fp", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Functional programming helpers for Enonic XP", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
56148
43
1449