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

enonic-wizardry

Package Overview
Dependencies
Maintainers
1
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.0.5 to 0.0.6

bin/xml-to-ts.js

4

es6/content.d.ts
import { Error } from "enonic-fp/lib/common";
import { Either } from "fp-ts/lib/Either";
import { Content, ModifyContentParams, CreateContentParams, DeleteContentParams } from "enonic-fp/lib/content";
export interface WithId {
_id: string;
}
export declare function publishFromDraftToMaster<A>(content: Content<A>): Either<Error, Content<A>>;

@@ -10,1 +13,2 @@ export declare function publishContentByKey<A>(key: string): (a: A) => Either<Error, A>;

export declare function modifyAndPublish<A>(key: string, changes: any): Either<Error, Content<A>>;
export declare function getContentDataWithId<T>(content: Content<T>): T & WithId;

@@ -36,3 +36,3 @@ var __assign = (this && this.__assign) || function () {

editor: function (content) {
content.data = __assign({}, content.data, changes);
content.data = __assign(__assign({}, content.data), changes);
return content;

@@ -52,1 +52,6 @@ },

}
export function getContentDataWithId(content) {
var dataWithId = content.data;
dataWithId._id = content._id;
return dataWithId;
}

2

es6/controller.d.ts

@@ -6,3 +6,3 @@ import { Error, ErrorKey, Response } from "enonic-fp/lib/common";

export declare function status(status: number, body?: string | object): Response;
export declare function errorResponse(i18nPrefix: string): (err: Error) => Response;
export declare function errorResponse(i18nPrefix: string, debug?: boolean): (err: Error) => Response;
export declare const ok: (body: any) => Response;

@@ -9,0 +9,0 @@ export declare const created: (body: any) => Response;

@@ -25,3 +25,4 @@ import { localize } from "enonic-fp/lib/i18n";

}
export function errorResponse(i18nPrefix) {
export function errorResponse(i18nPrefix, debug) {
if (debug === void 0) { debug = false; }
return function (err) {

@@ -31,3 +32,3 @@ var i18nKey = i18nPrefix + "." + err.errorKey;

message: getOrElse(function () { return i18nKey; })(localize({ key: i18nKey })),
debug: String(err)
cause: debug ? err.cause : undefined
});

@@ -49,5 +50,5 @@ };

response.headers = {
'X-Total-Count': total
'X-Total-Count': String(total)
};
return response;
}
import { Error } from "enonic-fp/lib/common";
import { Either } from "fp-ts/lib/Either";
import { Content, ModifyContentParams, CreateContentParams, DeleteContentParams } from "enonic-fp/lib/content";
export interface WithId {
_id: string;
}
export declare function publishFromDraftToMaster<A>(content: Content<A>): Either<Error, Content<A>>;

@@ -10,1 +13,2 @@ export declare function publishContentByKey<A>(key: string): (a: A) => Either<Error, A>;

export declare function modifyAndPublish<A>(key: string, changes: any): Either<Error, Content<A>>;
export declare function getContentDataWithId<T>(content: Content<T>): T & WithId;

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

editor: function (content) {
content.data = __assign({}, content.data, changes);
content.data = __assign(__assign({}, content.data), changes);
return content;

@@ -60,1 +60,7 @@ },

exports.modifyAndPublish = modifyAndPublish;
function getContentDataWithId(content) {
var dataWithId = content.data;
dataWithId._id = content._id;
return dataWithId;
}
exports.getContentDataWithId = getContentDataWithId;

@@ -6,3 +6,3 @@ import { Error, ErrorKey, Response } from "enonic-fp/lib/common";

export declare function status(status: number, body?: string | object): Response;
export declare function errorResponse(i18nPrefix: string): (err: Error) => Response;
export declare function errorResponse(i18nPrefix: string, debug?: boolean): (err: Error) => Response;
export declare const ok: (body: any) => Response;

@@ -9,0 +9,0 @@ export declare const created: (body: any) => Response;

@@ -28,3 +28,4 @@ "use strict";

exports.status = status;
function errorResponse(i18nPrefix) {
function errorResponse(i18nPrefix, debug) {
if (debug === void 0) { debug = false; }
return function (err) {

@@ -34,3 +35,3 @@ var i18nKey = i18nPrefix + "." + err.errorKey;

message: Option_1.getOrElse(function () { return i18nKey; })(i18n_1.localize({ key: i18nKey })),
debug: String(err)
cause: debug ? err.cause : undefined
});

@@ -53,3 +54,3 @@ };

response.headers = {
'X-Total-Count': total
'X-Total-Count': String(total)
};

@@ -56,0 +57,0 @@ return response;

{
"name": "enonic-wizardry",
"version": "0.0.5",
"version": "0.0.6",
"description": "Functional utility library for Enonic XP",

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

"clean": "rimraf lib/* es6/*",
"build": "npm run clean && tsc && tsc -p tsconfig.es6.json"
"build": "npm run clean && tsc && tsc -p tsconfig.es6.json && npm run build:cli",
"build:cli": "tsc -outDir bin cli/xml-to-ts.ts",
"test": "jest",
"watch:test": "jest --watch"
},

@@ -28,9 +31,18 @@ "repository": {

"dependencies": {
"enonic-fp": "^0.0.10",
"fp-ts": "^2.0.5"
"@types/xmldom": "^0.1.29",
"change-case": "^3.1.0",
"commander": "^3.0.1",
"enonic-fp": "^0.0.16",
"fp-ts": "^2.0.5",
"xmldom": "^0.1.27",
"xpath": "0.0.27"
},
"devDependencies": {
"@types/jest": "^24.0.18",
"@types/node": "^12.7.4",
"jest": "^24.9.0",
"rimraf": "^3.0.0",
"typescript": "^3.5.3"
"ts-jest": "^24.0.2",
"typescript": "^3.6.2"
}
}
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