Comparing version 0.2.30 to 0.2.31
@@ -17,3 +17,3 @@ import { IOEither } from "fp-ts/lib/IOEither"; | ||
*/ | ||
export declare function getMultipartItem(name: string, index?: number, errorMessage?: string): IOEither<EnonicError, MultipartItem>; | ||
export declare function getMultipartItem(name: string, index?: number): IOEither<EnonicError, MultipartItem | undefined>; | ||
/** | ||
@@ -23,3 +23,3 @@ * This function returns a data-stream for a named multipart item. | ||
*/ | ||
export declare function getMultipartStream(name: string, index?: number, errorMessage?: string): IOEither<EnonicError, ByteSource>; | ||
export declare function getMultipartStream(name: string, index?: number): IOEither<EnonicError, ByteSource | undefined>; | ||
/** | ||
@@ -29,3 +29,3 @@ * This function returns the multipart item data as text. | ||
*/ | ||
export declare function getMultipartText(name: string, index?: number, errorMessage?: string): IOEither<EnonicError, string>; | ||
export declare function getMultipartText(name: string, index?: number): IOEither<EnonicError, string | undefined>; | ||
export declare function getSite<A extends object>(): IOEither<EnonicError, Site<A>>; | ||
@@ -32,0 +32,0 @@ export declare function getSiteConfig<A extends object>(): IOEither<EnonicError, A>; |
@@ -34,12 +34,5 @@ "use strict"; | ||
*/ | ||
function getMultipartItem(name, index, errorMessage) { | ||
var _a; | ||
function getMultipartItem(name, index) { | ||
if (index === void 0) { index = 0; } | ||
if (errorMessage === void 0) { errorMessage = "portal.error.multipartItem"; } | ||
return pipeable_1.pipe(utils_1.catchEnonicError(function () { return portalLib.getMultipartItem(name, index); }), IOEither_1.chain(utils_1.fromNullable({ | ||
errorKey: "BadRequestError", | ||
errors: (_a = {}, | ||
_a[name] = [errorMessage], | ||
_a) | ||
}))); | ||
return utils_1.catchEnonicError(function () { return portalLib.getMultipartItem(name, index); }); | ||
} | ||
@@ -51,12 +44,5 @@ exports.getMultipartItem = getMultipartItem; | ||
*/ | ||
function getMultipartStream(name, index, errorMessage) { | ||
var _a; | ||
function getMultipartStream(name, index) { | ||
if (index === void 0) { index = 0; } | ||
if (errorMessage === void 0) { errorMessage = "portal.error.multipartItem"; } | ||
return pipeable_1.pipe(utils_1.catchEnonicError(function () { return portalLib.getMultipartStream(name, index); }), IOEither_1.chain(utils_1.fromNullable({ | ||
errorKey: "BadRequestError", | ||
errors: (_a = {}, | ||
_a[name] = [errorMessage], | ||
_a) | ||
}))); | ||
return utils_1.catchEnonicError(function () { return portalLib.getMultipartStream(name, index); }); | ||
} | ||
@@ -68,12 +54,5 @@ exports.getMultipartStream = getMultipartStream; | ||
*/ | ||
function getMultipartText(name, index, errorMessage) { | ||
var _a; | ||
function getMultipartText(name, index) { | ||
if (index === void 0) { index = 0; } | ||
if (errorMessage === void 0) { errorMessage = "portal.error.multipartItem"; } | ||
return pipeable_1.pipe(utils_1.catchEnonicError(function () { return portalLib.getMultipartText(name, index); }), IOEither_1.chain(utils_1.fromNullable({ | ||
errorKey: "BadRequestError", | ||
errors: (_a = {}, | ||
_a[name] = [errorMessage], | ||
_a) | ||
}))); | ||
return utils_1.catchEnonicError(function () { return portalLib.getMultipartText(name, index); }); | ||
} | ||
@@ -80,0 +59,0 @@ exports.getMultipartText = getMultipartText; |
{ | ||
"name": "enonic-fp", | ||
"version": "0.2.30", | ||
"version": "0.2.31", | ||
"description": "Functional programming helpers for Enonic XP", | ||
@@ -28,4 +28,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"enonic-types": "^0.0.39", | ||
"fp-ts": "^2.5.1" | ||
"enonic-types": "^0.0.40", | ||
"fp-ts": "^2.5.2" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
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
46340
747
+ Addedenonic-types@0.0.40(transitive)
- Removedenonic-types@0.0.39(transitive)
Updatedenonic-types@^0.0.40
Updatedfp-ts@^2.5.2