New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.15 to 0.5.0-next.0

14

content.d.ts
/// <reference types="enonic-types" />
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 { Content, CreateContentParams, DeleteContentParams, GetContentParams, ModifyContentParams, LiteralContentTypeNames, ContentTypeByName } from "/lib/xp/content";
import type { Separated } from "fp-ts/es6/Separated";

@@ -12,9 +12,9 @@ import type { Option } from "fp-ts/es6/Option";

export declare function getAsOption<A extends object>(paramsOrKey?: string | GetContentParams): Option<Content<A>>;
export declare function getContentByIds<A extends object>(ids: Array<string>): IOEither<EnonicError, ReadonlyArray<Content<A>>>;
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.IO<Separated<Array<EnonicError>, Array<Content<A>>>>;
export declare function createAndPublish<A extends object>(params: CreateContentParams<A>): IOEither<EnonicError, Content<A>>;
export declare function getContentByIds<Data>(ids: Array<string>): IOEither<EnonicError, ReadonlyArray<Content<Data>>>;
export declare function getContentByIds<Data>(ids: Array<string | undefined>): IOEither<EnonicError, ReadonlyArray<Content<Data> | undefined>>;
export declare function createAll<Data, ContentTypeName extends LiteralContentTypeNames>(paramsList: Array<CreateContentParams<Data, ContentTypeName>>): IO.IO<Separated<Array<EnonicError>, Array<Content<ContentTypeByName<ContentTypeName, Data>>>>>;
export declare function createAndPublish<Data, ContentTypeName extends LiteralContentTypeNames>(params: CreateContentParams<Data, ContentTypeName>): IOEither<EnonicError, Content<ContentTypeByName<ContentTypeName, Data>>>;
export declare function deleteAndPublish(params: DeleteContentParams): IOEither<EnonicError, void>;
export declare function modifyAndPublish<A extends object>(a: Partial<A>, key: string): IOEither<EnonicError, Content<A>>;
export declare function applyChangesToData<A extends object>(key: string, changes: Partial<A>): ModifyContentParams<A>;
export declare function modifyAndPublish<Data>(a: Partial<Data>, key: string): IOEither<EnonicError, Content<Data>>;
export declare function applyChangesToData<Data>(key: string, changes: Partial<Data>): ModifyContentParams<Data>;
export interface CreateMediaFromAttachmentParams {

@@ -21,0 +21,0 @@ /**

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

query: "_id IN (".concat(idsAsString(ids), ")"),
}), (0, IOEither_1.map)(function (result) { return sortResultByIdOrder(result.hits, ids); }))
}), (0, IOEither_1.map)(function (result) {
return sortResultByIdOrder(result.hits, ids);
}))
: (0, IOEither_1.right)([]);

@@ -61,7 +63,9 @@ }

function createAll(paramsList) {
return (0, function_1.pipe)(paramsList.map(content_1.create), ARR.wilt(IO.Applicative)(function_2.identity));
return (0, function_1.pipe)(paramsList.map(function (params) { return (0, content_1.create)(params); }), ARR.wilt(IO.Applicative)(function_2.identity));
}
exports.createAll = createAll;
function createAndPublish(params) {
return (0, function_1.pipe)((0, context_1.runInDraftContext)((0, content_1.create)(params)), (0, IOEither_1.chainFirst)(function (content) { return (0, content_1.publish)(content); }));
return (0, function_1.pipe)((0, context_1.runInDraftContext)((0, content_1.create)(params)), (0, IOEither_1.chainFirst)(function (content) {
return (0, content_1.publish)(content._id);
}));
}

@@ -74,3 +78,3 @@ exports.createAndPublish = createAndPublish;

function modifyAndPublish(a, key) {
return (0, function_1.pipe)((0, context_1.runInDraftContext)((0, content_1.modify)(applyChangesToData(key, a))), (0, IOEither_1.chainFirst)(function (content) { return (0, content_1.publish)(content); }));
return (0, function_1.pipe)((0, context_1.runInDraftContext)((0, content_1.modify)(applyChangesToData(key, a))), (0, IOEither_1.chainFirst)(function (content) { return (0, content_1.publish)(content._id); }));
}

@@ -77,0 +81,0 @@ exports.modifyAndPublish = modifyAndPublish;

{
"name": "enonic-wizardry",
"sideEffects": false,
"version": "0.3.15",
"version": "0.5.0-next.0",
"description": "Functional utility library for Enonic XP",

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

"dependencies": {
"enonic-fp": "^0.3.17",
"enonic-types": "^0.3.9",
"fp-ts": "^2.11.5",
"enonic-fp": "^0.5.0-next.0",
"enonic-types": "^0.5.0-next.1",
"fp-ts": "^2.12.1",
"io-ts": "^2.2.16"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.5.1",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"@typescript-eslint/parser": "^5.30.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"typescript": "^4.5.4"
"typescript": "^4.7.4"
}
}
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