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

enonic-wizardry

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enonic-wizardry - npm Package Compare versions

Comparing version 0.3.14 to 0.3.15

14

content.d.ts
/// <reference types="enonic-types" />
import { EnonicError } from "enonic-fp/errors";
import { IOEither } from "fp-ts/IOEither";
import { Content, CreateContentParams, DeleteContentParams, GetContentParams, ModifyContentParams } from "/lib/xp/content";
import { Separated } from "fp-ts/Separated";
import { IO } from "fp-ts/IO";
import { Option } from "fp-ts/Option";
import { type EnonicError } from "enonic-fp/errors";
import { IOEither } from "fp-ts/es6/IOEither";
import type { Content, CreateContentParams, DeleteContentParams, GetContentParams, ModifyContentParams } from "/lib/xp/content";
import type { Separated } from "fp-ts/es6/Separated";
import type { Option } from "fp-ts/es6/Option";
import * as IO from "fp-ts/es6/IO";
/**

@@ -14,3 +14,3 @@ * Returns the Some<Content> if "id" is valid

export declare function getContentByIds<A extends object>(ids: Array<string | undefined>): IOEither<EnonicError, ReadonlyArray<Content<A> | undefined>>;
export declare function createAll<A extends object>(paramsList: Array<CreateContentParams<A>>): IO<Separated<Array<EnonicError>, Array<Content<A>>>>;
export declare function createAll<A extends object>(paramsList: Array<CreateContentParams<A>>): IO.IO<Separated<Array<EnonicError>, Array<Content<A>>>>;
export declare function createAndPublish<A extends object>(params: CreateContentParams<A>): IOEither<EnonicError, Content<A>>;

@@ -17,0 +17,0 @@ export declare function deleteAndPublish(params: DeleteContentParams): IOEither<EnonicError, void>;

@@ -16,13 +16,13 @@ "use strict";

var errors_1 = require("enonic-fp/errors");
var IOEither_1 = require("fp-ts/IOEither");
var IOE = require("fp-ts/IOEither");
var function_1 = require("fp-ts/function");
var IOEither_1 = require("fp-ts/es6/IOEither");
var IOE = require("fp-ts/es6/IOEither");
var function_1 = require("fp-ts/es6/function");
var content_1 = require("enonic-fp/content");
var context_1 = require("./context");
var portal_1 = require("enonic-fp/portal");
var Apply_1 = require("fp-ts/Apply");
var function_2 = require("fp-ts/function");
var Array_1 = require("fp-ts/Array");
var IO_1 = require("fp-ts/IO");
var Apply_1 = require("fp-ts/es6/Apply");
var function_2 = require("fp-ts/es6/function");
var utils_1 = require("enonic-fp/utils");
var ARR = require("fp-ts/es6/Array");
var IO = require("fp-ts/es6/IO");
/**

@@ -61,3 +61,3 @@ * Returns the Some<Content> if "id" is valid

function createAll(paramsList) {
return Array_1.array.wilt(IO_1.io)(paramsList.map(content_1.create), function_2.identity);
return (0, function_1.pipe)(paramsList.map(content_1.create), ARR.wilt(IO.Applicative)(function_2.identity));
}

@@ -64,0 +64,0 @@ exports.createAll = createAll;

/// <reference types="enonic-types" />
import { IOEither } from "fp-ts/IOEither";
import { ContextAttributes, RunContext } from "/lib/xp/context";
import { IOEither } from "fp-ts/es6/IOEither";
import type { ContextAttributes, RunContext } from "/lib/xp/context";
export declare function chainRun<Attributes extends ContextAttributes>(runContext: RunContext<Attributes>): <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B>;
export declare const runAsSuperUser: <A>(a: import("fp-ts/lib/IO").IO<A>) => import("fp-ts/lib/IO").IO<A>;
export declare const runInDraftContext: <A>(a: import("fp-ts/lib/IO").IO<A>) => import("fp-ts/lib/IO").IO<A>;
export declare const runAsSuperUser: <A>(a: import("fp-ts/es6/IO").IO<A>) => import("fp-ts/es6/IO").IO<A>;
export declare const runInDraftContext: <A>(a: import("fp-ts/es6/IO").IO<A>) => import("fp-ts/es6/IO").IO<A>;
export declare const chainRunAsSuperUser: <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B>;
export declare const chainRunInDraftContext: <E, A, B>(f: (a: A) => IOEither<E, B>) => (ma: IOEither<E, A>) => IOEither<E, B>;

@@ -5,3 +5,3 @@ "use strict";

var context_1 = require("enonic-fp/context");
var IOEither_1 = require("fp-ts/IOEither");
var IOEither_1 = require("fp-ts/es6/IOEither");
function chainRun(runContext) {

@@ -8,0 +8,0 @@ return function (f) {

/// <reference types="enonic-types" />
import { IOEither } from "fp-ts/IOEither";
import { GetMenuParams, MenuItem } from "/lib/menu";
import { EnonicError } from "enonic-fp/errors";
import { IOEither } from "fp-ts/es6/IOEither";
import type { GetMenuParams, MenuItem } from "/lib/menu";
import type { EnonicError } from "enonic-fp/errors";
export declare function getSubMenuByKey(levels: number, params?: GetMenuParams, key?: string): IOEither<EnonicError, ReadonlyArray<MenuItem>>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSubMenuByKey = void 0;
var IOEither_1 = require("fp-ts/IOEither");
var IOEither_1 = require("fp-ts/es6/IOEither");
var content_1 = require("enonic-fp/content");
var menu_1 = require("enonic-fp/menu");
var function_1 = require("fp-ts/function");
var function_1 = require("fp-ts/es6/function");
function getSubMenuByKey(levels, params, key) {

@@ -9,0 +9,0 @@ return key !== undefined

{
"name": "enonic-wizardry",
"sideEffects": false,
"version": "0.3.14",
"version": "0.3.15",
"description": "Functional utility library for Enonic XP",

@@ -29,3 +29,3 @@ "main": "lib/index.js",

"dependencies": {
"enonic-fp": "^0.3.16",
"enonic-fp": "^0.3.17",
"enonic-types": "^0.3.9",

@@ -36,4 +36,4 @@ "fp-ts": "^2.11.5",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^8.4.1",

@@ -44,4 +44,4 @@ "eslint-config-prettier": "^8.3.0",

"rimraf": "^3.0.2",
"typescript": "^4.5.3"
"typescript": "^4.5.4"
}
}

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

import { Reporter } from "io-ts/lib/Reporter";
import { ErrorDetail } from "enonic-fp/errors";
import { LocalizeWithPrefixParams } from "enonic-fp/controller";
import type { Reporter } from "io-ts/lib/Reporter";
import type { ErrorDetail } from "enonic-fp/errors";
import type { LocalizeWithPrefixParams } from "enonic-fp/controller";
export declare function getErrorDetailReporter(localizeParams?: LocalizeWithPrefixParams): Reporter<Array<ErrorDetail>>;

@@ -15,6 +15,6 @@ "use strict";

exports.getErrorDetailReporter = void 0;
var Either_1 = require("fp-ts/Either");
var Either_1 = require("fp-ts/es6/Either");
var i18n_1 = require("enonic-fp/i18n");
var function_1 = require("fp-ts/function");
var Option_1 = require("fp-ts/Option");
var function_1 = require("fp-ts/es6/function");
var Option_1 = require("fp-ts/es6/Option");
function getErrorDetailReporter(localizeParams) {

@@ -21,0 +21,0 @@ return {

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

import { Errors, Type } from "io-ts";
import type { Errors, Type } from "io-ts";
import * as t from "io-ts";
import { Either } from "fp-ts/Either";
import { EnonicError } from "enonic-fp/errors";
import { IOEither } from "fp-ts/IOEither";
import { LocalizeWithPrefixParams } from "enonic-fp/controller";
import type { Either } from "fp-ts/es6/Either";
import { type EnonicError } from "enonic-fp/errors";
import { IOEither } from "fp-ts/es6/IOEither";
import type { LocalizeWithPrefixParams } from "enonic-fp/controller";
export declare function validate<A, O = A, I = unknown>(a: Type<A, O, I>, localizeParams?: LocalizeWithPrefixParams): (i: I) => IOEither<EnonicError, A>;

@@ -8,0 +8,0 @@ export declare function normalizeDecoded<A>(decoded: Either<Errors, A>, localizeParams?: LocalizeWithPrefixParams): IOEither<EnonicError, A>;

@@ -18,4 +18,4 @@ "use strict";

var errors_1 = require("enonic-fp/errors");
var IOEither_1 = require("fp-ts/IOEither");
var function_1 = require("fp-ts/function");
var IOEither_1 = require("fp-ts/es6/IOEither");
var function_1 = require("fp-ts/es6/function");
function validate(a, localizeParams) {

@@ -22,0 +22,0 @@ return function (i) {

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