New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

contentful-management-jobs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

contentful-management-jobs

Package that contains a bunch of common Contentful content management jobs. Bulk migrations, queries, edits and updates to content entries, assets and content models whould be done using this packaage.

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

Contentful Management Jobs

Package that contains a bunch of common Contentful content management jobs. Bulk migrations, queries, edits and updates to content entries, assets and content models whould be done using this packaage.

Jobs

  • Bulk Upload Assets
  • YAML to Contentful Import
  • Remote Asset Upload

Note: Please use great care in updating customers content

Required .env Variables

CONTENTFUL_SPACE_ID
CONTENTFUL_MANAGEMENT_API

Jobs

Bulk Asset Upload

The Bulk Asset Uploader will allow you to upload a batch of assets that are located your local machine.

  1. Create a Folder on your machine with all of the valid assets (Img PDF Video etc), that you want to upload to Contentful
  2. Update the BASE_FOLDER_PATH with the root folder location of the images you want to import
  3. Open your terminal and run npm run bulk-asset-uload
  • It will import all images including sub folders
  • It will create the asset with the ID based on a hash value of the relative path of the image. You want to ensure that the image path is unique and represents how it is using in the content import

Required Global File Variables

  • IS_DEBUG_MODE: Onyl prints out the image local paths and if it will be uploaded or skipped
  • BASE_FOLDER_PATH: The local folder to import assets from
  • FOLDERDELIMETER: Must be alphanumeric characters, dots (.) hyphens (-) or underscores ()
  • INVALIDFILE_DELIMETER: Must be alphanumeric characters, dots (.) hyphens (-) or underscores ()

YAML to Contentful Import

The YAML to Contentful Import is a job that allows you to specify one directory at a time, one main content type at a time. It will allow you to override fields with your own values by using functions.

Required Global File Variables

  • CONTENTFUL_CONTENT_TYPE_TO_IMPORT = 'accelerator'; // The main content type that is being imported
  • LOCALE = 'en-US'; // The locale of the content type
  • MAX_NUMBER_OF_FILES = 2; // The maximum number of files to import at once, used for debugging purposes
  • BASE_FOLDER_PATH = '/Users/bradtaylor/Desktop/yaml/accelerators'; // The local folder to import yaml files from
  • ENVIRONMENT = 'yaml-test'; // make sure you update the environment;
  1. Create a folder on your machine that has all of the yaml files you want to import (it will exclude directories)
  2. Update all of the required global variables
  3. Open the terminal and run npm run bulk-asset-uload

Remote Asset Upload

The Remote Asset Import is a job that allows you import assets from a remote location.

Required Global File Variables

  • CONTENTFUL_SPACE_ID=
  • CONTENTFUL_DELIVERY_TOKEN=
  • CONTENTFUL_MANAGEMENT_API=
  • CONTENTFUL_ENVIRONMENT=
  • CONTENTFUL_HOST=
  1. Run yarn run remote-asset-import

FAQs

Package last updated on 03 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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