contentful-cli icon indicating copy to clipboard operation
contentful-cli copied to clipboard

feat: add create new space and populate content [BAU-890]

Open massao opened this issue 2 years ago • 0 comments

Summary

  • Migrate create space and import space to typescript
  • Removed default locale as it is missing on type definition on contentful-import
  • Added functionality on init to create a new space and populate with content.
  • Added content file to be used when populating new space.

How to verify locally

New space with content in init: run npm link && npm tsc:watch then run contentful init You should be asked to continue login to Contentful (if you're not logged in) After login, you will be asked to create a new space or use existing one(currently not working) And after selecting to create a new one, it will ask if you want to have content added to the new space Ask for user confirmation before creating space, and in which organization to create if no organization is is present.

Jest and Typescript Set env variables locally then run test/unit/cmds/space_cmds/create.test.ts test/unit/cmds/space_cmds/import.test.ts Tests should run and pass ✅

massao avatar Aug 11 '22 14:08 massao