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

contentful-batch-libs

Package Overview
Dependencies
Maintainers
3
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-batch-libs - npm Package Compare versions

Comparing version 9.2.2 to 9.3.0

dist/index.js

1

dist/add-sequence-header.js

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

*/
// TODO: next major release (v9.0.0+) - change this to a non-default export.
function addSequenceHeader(headers) {

@@ -16,0 +17,0 @@ if (typeof headers !== 'object') throw new Error('addSequence function expects an object as input');

16

dist/get-entity-name.js

@@ -8,7 +8,7 @@ "use strict";

var _lodash = require("lodash");
function getEntityName(entity) {
const name = (0, _lodash.get)(entity, 'name');
var _entity$fields, _entity$fields2, _entity$sys;
const name = entity === null || entity === void 0 ? void 0 : entity.name;
if (name) {

@@ -18,3 +18,3 @@ return attachId(name, entity);

const titleField = (0, _lodash.get)(entity, 'fields.title');
const titleField = entity === null || entity === void 0 ? void 0 : (_entity$fields = entity.fields) === null || _entity$fields === void 0 ? void 0 : _entity$fields.title;

@@ -26,3 +26,3 @@ if (titleField) {

const nameField = (0, _lodash.get)(entity, 'fields.name');
const nameField = entity === null || entity === void 0 ? void 0 : (_entity$fields2 = entity.fields) === null || _entity$fields2 === void 0 ? void 0 : _entity$fields2.name;

@@ -34,3 +34,3 @@ if (nameField) {

const id = (0, _lodash.get)(entity, 'sys.id');
const id = entity === null || entity === void 0 ? void 0 : (_entity$sys = entity.sys) === null || _entity$sys === void 0 ? void 0 : _entity$sys.id;

@@ -45,4 +45,6 @@ if (id) {

function attachId(val, entity) {
const id = (0, _lodash.get)(entity, 'sys.id');
var _entity$sys2;
const id = entity === null || entity === void 0 ? void 0 : (_entity$sys2 = entity.sys) === null || _entity$sys2 === void 0 ? void 0 : _entity$sys2.id;
if (id) {

@@ -49,0 +51,0 @@ return `${val} (${id})`;

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

var _lodash = require("lodash");
var _figures = _interopRequireDefault(require("figures"));

@@ -38,3 +36,3 @@

if ((0, _lodash.isObject)(data)) {
if (data && typeof data === 'object') {
return data;

@@ -41,0 +39,0 @@ }

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

var _lodash = require("lodash");
var _httpsProxyAgent = _interopRequireDefault(require("https-proxy-agent"));

@@ -47,3 +45,3 @@

};
const port = (0, _lodash.toInteger)(portString);
const port = parseInt(portString);
const isHttps = protocol === 'https:';

@@ -50,0 +48,0 @@

{
"name": "contentful-batch-libs",
"version": "9.2.2",
"version": "9.3.0",
"description": "Library modules used by contentful batch utility CLI tools.",

@@ -28,3 +28,3 @@ "main": "dist/index.js",

"https-proxy-agent": "^3.0.0",
"lodash": "^4.17.21",
"lodash.clonedeep": "^4.5.0",
"moment": "^2.29.1",

@@ -37,2 +37,3 @@ "uuid": "^8.3.2"

"@babel/preset-env": "^7.16.4",
"@types/lodash.clonedeep": "^4.5.7",
"babel-eslint": "^8.2.2",

@@ -39,0 +40,0 @@ "babel-jest": "^27.3.1",

@@ -1,2 +0,2 @@

import addSequenceHeader from '../lib/add-sequence-header'
import { addSequenceHeader } from '../lib'

@@ -3,0 +3,0 @@ test('adds sequence header to empty object', () => {

@@ -1,2 +0,2 @@

import getEntityName from '../lib/get-entity-name'
import { getEntityName } from '../lib'

@@ -3,0 +3,0 @@ test('get name by name property', () => {

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

import {
wrapTask
} from '../lib/listr'
import { wrapTask } from '../lib'
import { logToTaskOutput, teardownHelperMock, formatLogMessageOneLine } from '../lib/logging'
import {
logToTaskOutput,
teardownHelperMock,
formatLogMessageOneLine
} from '../lib/logging'
jest.mock('../lib/logging', () => {

@@ -12,0 +5,0 @@ const teardownHelperMock = jest.fn()

@@ -1,3 +0,2 @@

import assign from 'lodash/assign'
import cloneDeep from 'lodash/cloneDeep'
import cloneDeep from 'lodash.clonedeep'

@@ -19,5 +18,3 @@ const linkMock = {

const spaceMock = {
sys: assign(cloneDeep(sysMock), {
type: 'Space'
}),
sys: Object.assign(cloneDeep(sysMock), { type: 'Space' }),
name: 'name',

@@ -28,5 +25,3 @@ locales: ['en-US']

const contentTypeMock = {
sys: assign(cloneDeep(sysMock), {
type: 'ContentType'
}),
sys: Object.assign(cloneDeep(sysMock), { type: 'ContentType' }),
name: 'name',

@@ -47,5 +42,5 @@ description: 'desc',

const entryMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'Entry',
contentType: assign(cloneDeep(linkMock), { linkType: 'ContentType' }),
contentType: Object.assign(cloneDeep(linkMock), { linkType: 'ContentType' }),
locale: 'locale'

@@ -58,6 +53,6 @@ }),

const editorInterfaceMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'EditorInterface',
contentType: { sys: assign(cloneDeep(linkMock), { linkType: 'ContentType' }) },
space: assign(cloneDeep(linkMock), { linkType: 'Space' })
contentType: { sys: Object.assign(cloneDeep(linkMock), { linkType: 'ContentType' }) },
space: Object.assign(cloneDeep(linkMock), { linkType: 'Space' })
}),

@@ -72,3 +67,3 @@ controls: [

const assetMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'Asset',

@@ -83,3 +78,3 @@ locale: 'locale'

const assetWithFilesMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'Asset',

@@ -117,3 +112,3 @@ locale: 'locale'

const uploadMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'Upload',

@@ -125,3 +120,3 @@ id: 'some_random_id'

const localeMock = {
sys: assign(cloneDeep(sysMock), {
sys: Object.assign(cloneDeep(sysMock), {
type: 'Locale'

@@ -137,23 +132,15 @@ }),

const webhookMock = {
sys: assign(cloneDeep(sysMock), {
type: 'WebhookDefinition'
})
sys: Object.assign(cloneDeep(sysMock), { type: 'WebhookDefinition' })
}
const spaceMembershipMock = {
sys: assign(cloneDeep(sysMock), {
type: 'SpaceMembership'
})
sys: Object.assign(cloneDeep(sysMock), { type: 'SpaceMembership' })
}
const roleMock = {
sys: assign(cloneDeep(sysMock), {
type: 'Role'
})
sys: Object.assign(cloneDeep(sysMock), { type: 'Role' })
}
const apiKeyMock = {
sys: assign(cloneDeep(sysMock), {
type: 'ApiKey'
})
sys: Object.assign(cloneDeep(sysMock), { type: 'ApiKey' })
}

@@ -160,0 +147,0 @@

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