@jungvonmatt/contentful-migrations 6.2.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/backend.js +4 -1
  2. package/package.json +2 -2
package/lib/backend.js CHANGED
@@ -24,7 +24,7 @@ const initializeContentModel = async (config) => {
24
24
  const contentType = await client.createContentTypeWithId(migrationContentTypeId, {
25
25
  name: 'Migrations',
26
26
  description: 'Internal data model holding references to all migrations',
27
- displayField: 'version',
27
+ displayField: 'name',
28
28
  fields: [
29
29
  {
30
30
  id: 'version',
@@ -137,6 +137,9 @@ const addMigrationEntry = async (data, config) => {
137
137
  entry.fields.state = { [defaultLocale]: state };
138
138
  entry.fields.message = { [defaultLocale]: message || '' };
139
139
  await entry.update();
140
+ if (state === STATE_SUCCESS) {
141
+ await entry.publish();
142
+ }
140
143
  }
141
144
  };
142
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jungvonmatt/contentful-migrations",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "Helper to handle migrations in contentful",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@contentful/rich-text-plain-text-renderer": "^17.1.0",
38
- "@jungvonmatt/contentful-config": "^4.0.0",
38
+ "@jungvonmatt/contentful-config": "^4.0.1",
39
39
  "array.prototype.flatmap": "^1.3.3",
40
40
  "ascii-tree": "^0.3.0",
41
41
  "cli-progress": "^3.12.0",