You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

netlify-cms-lib-util

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netlify-cms-lib-util - npm Package Compare versions

Comparing version

to
2.6.1

src/EditorialWorkflowError.ts

@@ -6,2 +6,10 @@ # Change Log

## [2.6.1](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-util/compare/netlify-cms-lib-util@2.6.0...netlify-cms-lib-util@2.6.1) (2020-01-22)
**Note:** Version bump only for package netlify-cms-lib-util
# [2.6.0](https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-util/compare/netlify-cms-lib-util@2.5.2...netlify-cms-lib-util@2.6.0) (2020-01-21)

@@ -8,0 +16,0 @@

14

dist/esm/API.js

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

});
exports.getPreviewStatus = exports.PreviewState = exports.isPreviewContext = exports.readFile = exports.parseContentKey = exports.generateContentKey = exports.statusToLabel = exports.labelToStatus = exports.isCMSLabel = exports.MERGE_COMMIT_MESSAGE = exports.DEFAULT_PR_BODY = exports.CMS_BRANCH_PREFIX = void 0;
exports.getPreviewStatus = exports.PreviewState = exports.isPreviewContext = exports.readFile = exports.branchFromContentKey = exports.contentKeyFromBranch = exports.parseContentKey = exports.generateContentKey = exports.statusToLabel = exports.labelToStatus = exports.isCMSLabel = exports.MERGE_COMMIT_MESSAGE = exports.DEFAULT_PR_BODY = exports.CMS_BRANCH_PREFIX = void 0;
const CMS_BRANCH_PREFIX = 'cms';

@@ -42,2 +42,14 @@ exports.CMS_BRANCH_PREFIX = CMS_BRANCH_PREFIX;

const contentKeyFromBranch = branch => {
return branch.substring("".concat(CMS_BRANCH_PREFIX, "/").length);
};
exports.contentKeyFromBranch = contentKeyFromBranch;
const branchFromContentKey = contentKey => {
return "".concat(CMS_BRANCH_PREFIX, "/").concat(contentKey);
};
exports.branchFromContentKey = branchFromContentKey;
const readFile = async (id, fetchContent, localForage, isText) => {

@@ -44,0 +56,0 @@ const key = id ? isText ? "gh.".concat(id) : "gh.".concat(id, ".blob") : null;

@@ -8,2 +8,4 @@ "use strict";

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _extendableBuiltin(cls) {

@@ -40,2 +42,7 @@ function ExtendableBuiltin() {

super(message);
_defineProperty(this, "message", void 0);
_defineProperty(this, "notUnderEditorialWorkflow", void 0);
this.message = message;

@@ -42,0 +49,0 @@ this.notUnderEditorialWorkflow = notUnderEditorialWorkflow;

@@ -252,2 +252,14 @@ "use strict";

});
Object.defineProperty(exports, "branchFromContentKey", {
enumerable: true,
get: function get() {
return _API.branchFromContentKey;
}
});
Object.defineProperty(exports, "contentKeyFromBranch", {
enumerable: true,
get: function get() {
return _API.contentKeyFromBranch;
}
});
Object.defineProperty(exports, "createPointerFile", {

@@ -362,4 +374,6 @@ enumerable: true,

parsePointerFile: _gitLfs.parsePointerFile,
getPointerFileForMediaFileObj: _gitLfs.getPointerFileForMediaFileObj
getPointerFileForMediaFileObj: _gitLfs.getPointerFileForMediaFileObj,
branchFromContentKey: _API.branchFromContentKey,
contentKeyFromBranch: _API.contentKeyFromBranch
};
exports.NetlifyCmsLibUtil = NetlifyCmsLibUtil;

4

package.json
{
"name": "netlify-cms-lib-util",
"description": "Shared utilities for Netlify CMS.",
"version": "2.6.0",
"version": "2.6.1",
"repository": "https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-lib-util",

@@ -28,3 +28,3 @@ "bugs": "https://github.com/netlify/netlify-cms/issues",

},
"gitHead": "4bc4490c6f8a22d5958f47fd013053da0037a3e9"
"gitHead": "06b50ba829b0b19d70aacdf051ace34e1f9aa547"
}

@@ -18,2 +18,10 @@ export const CMS_BRANCH_PREFIX = 'cms';

export const contentKeyFromBranch = (branch: string) => {
return branch.substring(`${CMS_BRANCH_PREFIX}/`.length);
};
export const branchFromContentKey = (contentKey: string) => {
return `${CMS_BRANCH_PREFIX}/${contentKey}`;
};
export interface FetchError extends Error {

@@ -20,0 +28,0 @@ status: number;

@@ -87,2 +87,3 @@ import semaphore, { Semaphore } from 'semaphore';

use_large_media_transforms_in_media_library?: boolean;
proxy_url?: string;
};

@@ -89,0 +90,0 @@ media_folder: string;

@@ -54,2 +54,4 @@ import APIError from './APIError';

parseContentKey,
branchFromContentKey,
contentKeyFromBranch,
} from './API';

@@ -136,2 +138,4 @@ import {

getPointerFileForMediaFileObj,
branchFromContentKey,
contentKeyFromBranch,
};

@@ -185,2 +189,4 @@ export {

getPointerFileForMediaFileObj,
branchFromContentKey,
contentKeyFromBranch,
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet