@strapi/content-type-builder 5.57.0 → 5.58.0
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.
- package/dist/admin/components/DataManager/reducer.js +22 -0
- package/dist/admin/components/DataManager/reducer.js.map +1 -1
- package/dist/admin/components/DataManager/reducer.mjs +22 -0
- package/dist/admin/components/DataManager/reducer.mjs.map +1 -1
- package/dist/admin/components/FormModal/FormModal.js +36 -62
- package/dist/admin/components/FormModal/FormModal.js.map +1 -1
- package/dist/admin/components/FormModal/FormModal.mjs +36 -62
- package/dist/admin/components/FormModal/FormModal.mjs.map +1 -1
- package/dist/admin/src/components/DataManager/utils/cleanData.d.ts +8 -8
- package/dist/admin/translations/cs.json.js +0 -2
- package/dist/admin/translations/cs.json.js.map +1 -1
- package/dist/admin/translations/cs.json.mjs +0 -2
- package/dist/admin/translations/cs.json.mjs.map +1 -1
- package/dist/admin/translations/de.json.js +0 -2
- package/dist/admin/translations/de.json.js.map +1 -1
- package/dist/admin/translations/de.json.mjs +0 -2
- package/dist/admin/translations/de.json.mjs.map +1 -1
- package/dist/admin/translations/en.json.js +0 -2
- package/dist/admin/translations/en.json.js.map +1 -1
- package/dist/admin/translations/en.json.mjs +0 -2
- package/dist/admin/translations/en.json.mjs.map +1 -1
- package/dist/admin/translations/ja.json.js +0 -2
- package/dist/admin/translations/ja.json.js.map +1 -1
- package/dist/admin/translations/ja.json.mjs +0 -2
- package/dist/admin/translations/ja.json.mjs.map +1 -1
- package/dist/admin/translations/ko.json.js +0 -2
- package/dist/admin/translations/ko.json.js.map +1 -1
- package/dist/admin/translations/ko.json.mjs +0 -2
- package/dist/admin/translations/ko.json.mjs.map +1 -1
- package/dist/admin/translations/nl.json.js +0 -2
- package/dist/admin/translations/nl.json.js.map +1 -1
- package/dist/admin/translations/nl.json.mjs +0 -2
- package/dist/admin/translations/nl.json.mjs.map +1 -1
- package/dist/admin/translations/pl.json.js +0 -2
- package/dist/admin/translations/pl.json.js.map +1 -1
- package/dist/admin/translations/pl.json.mjs +0 -2
- package/dist/admin/translations/pl.json.mjs.map +1 -1
- package/dist/admin/translations/ru.json.js +0 -2
- package/dist/admin/translations/ru.json.js.map +1 -1
- package/dist/admin/translations/ru.json.mjs +0 -2
- package/dist/admin/translations/ru.json.mjs.map +1 -1
- package/dist/admin/translations/sk.json.js +0 -2
- package/dist/admin/translations/sk.json.js.map +1 -1
- package/dist/admin/translations/sk.json.mjs +0 -2
- package/dist/admin/translations/sk.json.mjs.map +1 -1
- package/dist/server/services/schema.js +53 -0
- package/dist/server/services/schema.js.map +1 -1
- package/dist/server/services/schema.mjs +53 -0
- package/dist/server/services/schema.mjs.map +1 -1
- package/dist/server/src/services/schema.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -143,8 +143,6 @@ var de = {
|
|
|
143
143
|
"form.attribute.condition.enum-change-warning": "Die folgenden Felder haben Bedingungen, die von diesem Feld abhängen: {fieldNames}. Das Ändern oder Entfernen der Aufzählungswerte {values} wird diese Bedingungen brechen. Möchtest du fortfahren?",
|
|
144
144
|
"form.attribute.condition.enum-change-warning-values": ". Das Ändern oder Entfernen der Aufzählungswerte ",
|
|
145
145
|
"form.attribute.condition.enum-change-warning-end": " wird diese Bedingungen brechen. Möchtest du fortfahren?",
|
|
146
|
-
"form.attribute.condition.field-change-warning": "Die folgenden Felder haben Bedingungen, die von diesem Feld abhängen: {fieldNames}. Das Umbenennen wird diese Bedingungen brechen. Möchtest du fortfahren?",
|
|
147
|
-
"form.attribute.condition.field-change-warning-end": ". Das Umbenennen wird diese Bedingungen brechen. Möchtest du fortfahren?",
|
|
148
146
|
"form.button.add-components-to-dynamiczone": "Komponenten zur Zone hinzufügen",
|
|
149
147
|
"form.button.add-field": "Weiteres Feld hinzufügen",
|
|
150
148
|
"form.button.add-first-field-to-created-component": "Erstes Feld zur Komponente hinzufügen",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"de.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -151,8 +151,6 @@ var en = {
|
|
|
151
151
|
"form.attribute.condition.enum-change-warning": "The following fields have conditions that depend on this field: {fieldNames}. Changing or removing the enum values {values} will break these conditions. Do you want to proceed?",
|
|
152
152
|
"form.attribute.condition.enum-change-warning-values": ". Changing or removing the enum values ",
|
|
153
153
|
"form.attribute.condition.enum-change-warning-end": " will break these conditions. Do you want to proceed?",
|
|
154
|
-
"form.attribute.condition.field-change-warning": "The following fields have conditions that depend on this field: {fieldNames}. Renaming it will break these conditions. Do you want to proceed?",
|
|
155
|
-
"form.attribute.condition.field-change-warning-end": ". Renaming it will break these conditions. Do you want to proceed?",
|
|
156
154
|
"form.attribute.rename-type-change-warning.title": "Existing data will be lost",
|
|
157
155
|
"form.attribute.rename-type-change-warning.body": "You are renaming {oldName} to {newName} and changing it from {oldType} to {newType}. Strapi cannot preserve the existing data of this field when both change at once. The field will be recreated empty when you save.",
|
|
158
156
|
"form.attribute.rename-type-change-warning.confirm": "Continue",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -147,8 +147,6 @@ var en = {
|
|
|
147
147
|
"form.attribute.condition.enum-change-warning": "The following fields have conditions that depend on this field: {fieldNames}. Changing or removing the enum values {values} will break these conditions. Do you want to proceed?",
|
|
148
148
|
"form.attribute.condition.enum-change-warning-values": ". Changing or removing the enum values ",
|
|
149
149
|
"form.attribute.condition.enum-change-warning-end": " will break these conditions. Do you want to proceed?",
|
|
150
|
-
"form.attribute.condition.field-change-warning": "The following fields have conditions that depend on this field: {fieldNames}. Renaming it will break these conditions. Do you want to proceed?",
|
|
151
|
-
"form.attribute.condition.field-change-warning-end": ". Renaming it will break these conditions. Do you want to proceed?",
|
|
152
150
|
"form.attribute.rename-type-change-warning.title": "Existing data will be lost",
|
|
153
151
|
"form.attribute.rename-type-change-warning.body": "You are renaming {oldName} to {newName} and changing it from {oldType} to {newType}. Strapi cannot preserve the existing data of this field when both change at once. The field will be recreated empty when you save.",
|
|
154
152
|
"form.attribute.rename-type-change-warning.confirm": "Continue",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -137,8 +137,6 @@ var ja = {
|
|
|
137
137
|
"form.attribute.condition.enum-change-warning-end": " を変更または削除すると、これらの条件が壊れます。続行しますか?",
|
|
138
138
|
"form.attribute.condition.enum-change-warning-values": "。列挙値 ",
|
|
139
139
|
"form.attribute.condition.field": "フィールド",
|
|
140
|
-
"form.attribute.condition.field-change-warning": "次のフィールドがこのフィールドに依存する条件を持っています: {fieldNames}。名前を変更すると、これらの条件が壊れます。続行しますか?",
|
|
141
|
-
"form.attribute.condition.field-change-warning-end": "。名前を変更すると、これらの条件が壊れます。続行しますか?",
|
|
142
140
|
"form.attribute.condition.label": "条件",
|
|
143
141
|
"form.attribute.condition.no-fields": "条件を設定できるブールまたは列挙型フィールドがありません。",
|
|
144
142
|
"form.attribute.condition.operator": "演算子",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ja.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -133,8 +133,6 @@ var ja = {
|
|
|
133
133
|
"form.attribute.condition.enum-change-warning-end": " を変更または削除すると、これらの条件が壊れます。続行しますか?",
|
|
134
134
|
"form.attribute.condition.enum-change-warning-values": "。列挙値 ",
|
|
135
135
|
"form.attribute.condition.field": "フィールド",
|
|
136
|
-
"form.attribute.condition.field-change-warning": "次のフィールドがこのフィールドに依存する条件を持っています: {fieldNames}。名前を変更すると、これらの条件が壊れます。続行しますか?",
|
|
137
|
-
"form.attribute.condition.field-change-warning-end": "。名前を変更すると、これらの条件が壊れます。続行しますか?",
|
|
138
136
|
"form.attribute.condition.label": "条件",
|
|
139
137
|
"form.attribute.condition.no-fields": "条件を設定できるブールまたは列挙型フィールドがありません。",
|
|
140
138
|
"form.attribute.condition.operator": "演算子",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ja.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -255,8 +255,6 @@ var ko = {
|
|
|
255
255
|
"form.attribute.condition.enum-change-warning": "다음 필드에 이 필드에 의존하는 조건이 있습니다: {fieldNames}. 열거형 값 {values}을(를) 변경하거나 삭제하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
256
256
|
"form.attribute.condition.enum-change-warning-values": ". 열거형 값 ",
|
|
257
257
|
"form.attribute.condition.enum-change-warning-end": "을(를) 변경하거나 삭제하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
258
|
-
"form.attribute.condition.field-change-warning": "다음 필드에 이 필드에 의존하는 조건이 있습니다: {fieldNames}. 이름을 변경하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
259
|
-
"form.attribute.condition.field-change-warning-end": ". 이름을 변경하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
260
258
|
"form.button.submit": "제출",
|
|
261
259
|
"modalForm.header.categories": "카테고리",
|
|
262
260
|
"modalForm.header.back": "뒤로",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ko.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -251,8 +251,6 @@ var ko = {
|
|
|
251
251
|
"form.attribute.condition.enum-change-warning": "다음 필드에 이 필드에 의존하는 조건이 있습니다: {fieldNames}. 열거형 값 {values}을(를) 변경하거나 삭제하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
252
252
|
"form.attribute.condition.enum-change-warning-values": ". 열거형 값 ",
|
|
253
253
|
"form.attribute.condition.enum-change-warning-end": "을(를) 변경하거나 삭제하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
254
|
-
"form.attribute.condition.field-change-warning": "다음 필드에 이 필드에 의존하는 조건이 있습니다: {fieldNames}. 이름을 변경하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
255
|
-
"form.attribute.condition.field-change-warning-end": ". 이름을 변경하면 이 조건들이 깨집니다. 계속하시겠습니까?",
|
|
256
254
|
"form.button.submit": "제출",
|
|
257
255
|
"modalForm.header.categories": "카테고리",
|
|
258
256
|
"modalForm.header.back": "뒤로",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ko.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ko.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -144,8 +144,6 @@ var nl = {
|
|
|
144
144
|
"form.attribute.condition.enum-change-warning-end": " zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
145
145
|
"form.attribute.condition.enum-change-warning-values": ". Het wijzigen of verwijderen van de enumeratiewaarden ",
|
|
146
146
|
"form.attribute.condition.field": "Veld",
|
|
147
|
-
"form.attribute.condition.field-change-warning": "De volgende velden hebben voorwaarden die afhankelijk zijn van dit veld: {fieldNames}. Het hernoemen ervan zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
148
|
-
"form.attribute.condition.field-change-warning-end": ". Het hernoemen ervan zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
149
147
|
"form.attribute.condition.label": "Voorwaarden",
|
|
150
148
|
"form.attribute.condition.no-fields": "Geen boolean- of enumeratievelden beschikbaar om voorwaarden op in te stellen.",
|
|
151
149
|
"form.attribute.condition.operator": "Operator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -140,8 +140,6 @@ var nl = {
|
|
|
140
140
|
"form.attribute.condition.enum-change-warning-end": " zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
141
141
|
"form.attribute.condition.enum-change-warning-values": ". Het wijzigen of verwijderen van de enumeratiewaarden ",
|
|
142
142
|
"form.attribute.condition.field": "Veld",
|
|
143
|
-
"form.attribute.condition.field-change-warning": "De volgende velden hebben voorwaarden die afhankelijk zijn van dit veld: {fieldNames}. Het hernoemen ervan zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
144
|
-
"form.attribute.condition.field-change-warning-end": ". Het hernoemen ervan zal deze voorwaarden verbreken. Wil je doorgaan?",
|
|
145
143
|
"form.attribute.condition.label": "Voorwaarden",
|
|
146
144
|
"form.attribute.condition.no-fields": "Geen boolean- of enumeratievelden beschikbaar om voorwaarden op in te stellen.",
|
|
147
145
|
"form.attribute.condition.operator": "Operator",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -147,8 +147,6 @@ var pl = {
|
|
|
147
147
|
"form.attribute.condition.enum-change-warning": "Następujące pola mają warunki zależne od tego pola: {fieldNames}. Zmiana lub usunięcie wartości wyliczeniowych {values} spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
148
148
|
"form.attribute.condition.enum-change-warning-values": ". Zmiana lub usunięcie wartości wyliczeniowych",
|
|
149
149
|
"form.attribute.condition.enum-change-warning-end": " spowoduje złamanie tych warunków. Czy chcesz kontynuować?",
|
|
150
|
-
"form.attribute.condition.field-change-warning": "Następujące pola mają warunki zależne od tego pola: {fieldNames}. Zmiana nazwy spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
151
|
-
"form.attribute.condition.field-change-warning-end": ". Zmiana nazwy spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
152
150
|
"form.button.add-components-to-dynamiczone": "Dodaj komponenty do strefy",
|
|
153
151
|
"form.button.add-field": "Dodaj kolejne pole",
|
|
154
152
|
"form.button.add-first-field-to-created-component": "Dodaj pierwsze pole do komponentu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pl.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -143,8 +143,6 @@ var pl = {
|
|
|
143
143
|
"form.attribute.condition.enum-change-warning": "Następujące pola mają warunki zależne od tego pola: {fieldNames}. Zmiana lub usunięcie wartości wyliczeniowych {values} spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
144
144
|
"form.attribute.condition.enum-change-warning-values": ". Zmiana lub usunięcie wartości wyliczeniowych",
|
|
145
145
|
"form.attribute.condition.enum-change-warning-end": " spowoduje złamanie tych warunków. Czy chcesz kontynuować?",
|
|
146
|
-
"form.attribute.condition.field-change-warning": "Następujące pola mają warunki zależne od tego pola: {fieldNames}. Zmiana nazwy spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
147
|
-
"form.attribute.condition.field-change-warning-end": ". Zmiana nazwy spowoduje naruszenie tych warunków. Czy chcesz kontynuować?",
|
|
148
146
|
"form.button.add-components-to-dynamiczone": "Dodaj komponenty do strefy",
|
|
149
147
|
"form.button.add-field": "Dodaj kolejne pole",
|
|
150
148
|
"form.button.add-first-field-to-created-component": "Dodaj pierwsze pole do komponentu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pl.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -199,8 +199,6 @@ var ru = {
|
|
|
199
199
|
"form.attribute.condition.enum-change-warning": "Следующие поля имеют условия, которые зависят от этого поля: {fieldNames}. Изменение или удаление значений перечисления {values} нарушит эти условия. Вы хотите продолжить?",
|
|
200
200
|
"form.attribute.condition.enum-change-warning-values": ". Изменение или удаление значений перечисления ",
|
|
201
201
|
"form.attribute.condition.enum-change-warning-end": " нарушит эти условия. Вы хотите продолжить?",
|
|
202
|
-
"form.attribute.condition.field-change-warning": "Следующие поля имеют условия, которые зависят от этого поля: {fieldNames}. Переименование нарушит эти условия. Вы хотите продолжить?",
|
|
203
|
-
"form.attribute.condition.field-change-warning-end": ". Переименование нарушит эти условия. Вы хотите продолжить?",
|
|
204
202
|
"form.button.collection-type.name": "Тип коллекции",
|
|
205
203
|
"form.button.single-type.name": "Единичный тип",
|
|
206
204
|
"menu.section.components.name": "Компоненты",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ru.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -195,8 +195,6 @@ var ru = {
|
|
|
195
195
|
"form.attribute.condition.enum-change-warning": "Следующие поля имеют условия, которые зависят от этого поля: {fieldNames}. Изменение или удаление значений перечисления {values} нарушит эти условия. Вы хотите продолжить?",
|
|
196
196
|
"form.attribute.condition.enum-change-warning-values": ". Изменение или удаление значений перечисления ",
|
|
197
197
|
"form.attribute.condition.enum-change-warning-end": " нарушит эти условия. Вы хотите продолжить?",
|
|
198
|
-
"form.attribute.condition.field-change-warning": "Следующие поля имеют условия, которые зависят от этого поля: {fieldNames}. Переименование нарушит эти условия. Вы хотите продолжить?",
|
|
199
|
-
"form.attribute.condition.field-change-warning-end": ". Переименование нарушит эти условия. Вы хотите продолжить?",
|
|
200
198
|
"form.button.collection-type.name": "Тип коллекции",
|
|
201
199
|
"form.button.single-type.name": "Единичный тип",
|
|
202
200
|
"menu.section.components.name": "Компоненты",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ru.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -147,8 +147,6 @@ var sk = {
|
|
|
147
147
|
"form.attribute.condition.enum-change-warning": "Nasledujúce polia majú podmienky, ktoré závisia od tohto poľa: {fieldNames}. Zmena alebo odstránenie enum hodnôt {values} tieto podmienky poruší. Chcete pokračovať?",
|
|
148
148
|
"form.attribute.condition.enum-change-warning-values": ". Zmena alebo odstránenie enum hodnôt ",
|
|
149
149
|
"form.attribute.condition.enum-change-warning-end": " poruší tieto podmienky. Chcete pokračovať?",
|
|
150
|
-
"form.attribute.condition.field-change-warning": "Nasledujúce polia majú podmienky, ktoré závisia od tohto poľa: {fieldNames}. Jeho premenovanie tieto podmienky poruší. Chcete pokračovať?",
|
|
151
|
-
"form.attribute.condition.field-change-warning-end": ". Jeho premenovanie poruší tieto podmienky. Chcete pokračovať?",
|
|
152
150
|
"form.button.add-components-to-dynamiczone": "Pridať komponenty do zóny",
|
|
153
151
|
"form.button.add-field": "Pridať ďalšie políčko",
|
|
154
152
|
"form.button.add-first-field-to-created-component": "Pridať prvé políčko do komponentu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sk.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -143,8 +143,6 @@ var sk = {
|
|
|
143
143
|
"form.attribute.condition.enum-change-warning": "Nasledujúce polia majú podmienky, ktoré závisia od tohto poľa: {fieldNames}. Zmena alebo odstránenie enum hodnôt {values} tieto podmienky poruší. Chcete pokračovať?",
|
|
144
144
|
"form.attribute.condition.enum-change-warning-values": ". Zmena alebo odstránenie enum hodnôt ",
|
|
145
145
|
"form.attribute.condition.enum-change-warning-end": " poruší tieto podmienky. Chcete pokračovať?",
|
|
146
|
-
"form.attribute.condition.field-change-warning": "Nasledujúce polia majú podmienky, ktoré závisia od tohto poľa: {fieldNames}. Jeho premenovanie tieto podmienky poruší. Chcete pokračovať?",
|
|
147
|
-
"form.attribute.condition.field-change-warning-end": ". Jeho premenovanie poruší tieto podmienky. Chcete pokračovať?",
|
|
148
146
|
"form.button.add-components-to-dynamiczone": "Pridať komponenty do zóny",
|
|
149
147
|
"form.button.add-field": "Pridať ďalšie políčko",
|
|
150
148
|
"form.button.add-first-field-to-created-component": "Pridať prvé políčko do komponentu",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sk.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -52,6 +52,58 @@ const removeDeletedUIDTargetFieldsOnUpdates = (schema)=>{
|
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Composes the ordered rename hops of an updated type into an origin -> final
|
|
57
|
+
* name map (`a -> b, b -> c` gives `a -> c`).
|
|
58
|
+
*/ const composeRenames = (hops)=>{
|
|
59
|
+
const originByName = new Map();
|
|
60
|
+
hops.forEach(({ oldName, newName })=>{
|
|
61
|
+
if (!oldName || !newName || oldName === newName) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const origin = originByName.get(oldName) ?? oldName;
|
|
65
|
+
originByName.delete(oldName);
|
|
66
|
+
originByName.set(newName, origin);
|
|
67
|
+
});
|
|
68
|
+
return new Map([
|
|
69
|
+
...originByName
|
|
70
|
+
].map(([name, origin])=>[
|
|
71
|
+
origin,
|
|
72
|
+
name
|
|
73
|
+
]));
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Makes field conditions follow the renames of this save: a condition whose
|
|
77
|
+
* `var` still names the origin of a rename is pointed at the field's final name.
|
|
78
|
+
*
|
|
79
|
+
* A `var` that names an attribute of the saved type is left alone: the caller
|
|
80
|
+
* already rewrote it, or (in a swap) it cannot be told apart from one that was.
|
|
81
|
+
*/ const renameConditionVarsOnUpdates = (schema)=>{
|
|
82
|
+
const entries = [
|
|
83
|
+
...schema.contentTypes,
|
|
84
|
+
...schema.components
|
|
85
|
+
];
|
|
86
|
+
entries.forEach((entry)=>{
|
|
87
|
+
if (entry.action !== 'update' || !Array.isArray(entry.renames)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const renames = composeRenames(entry.renames);
|
|
91
|
+
const savedAttributes = (entry.attributes ?? []).filter((attribute)=>attribute.action !== 'delete');
|
|
92
|
+
const saved = new Set(savedAttributes.map((attribute)=>attribute.name));
|
|
93
|
+
savedAttributes.forEach((attribute)=>{
|
|
94
|
+
Object.values(attribute.properties?.conditions?.visible ?? {}).forEach((rule)=>{
|
|
95
|
+
const fieldVar = Array.isArray(rule) ? rule[0] : undefined;
|
|
96
|
+
if (typeof fieldVar !== 'object' || fieldVar === null || !('var' in fieldVar) || typeof fieldVar.var !== 'string' || saved.has(fieldVar.var)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const finalName = renames.get(fieldVar.var);
|
|
100
|
+
if (finalName !== undefined && saved.has(finalName)) {
|
|
101
|
+
fieldVar.var = finalName;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
};
|
|
55
107
|
const getAttributeRenameMigrationMode = ()=>{
|
|
56
108
|
return strapi.plugin('content-type-builder').config('renameMigrations.attributes', 'prompt-before-save');
|
|
57
109
|
};
|
|
@@ -362,6 +414,7 @@ const updateSchema = async (schema)=>{
|
|
|
362
414
|
// pre-process data
|
|
363
415
|
removeEmptyDefaultsOnUpdates(schema);
|
|
364
416
|
removeDeletedUIDTargetFieldsOnUpdates(schema);
|
|
417
|
+
renameConditionVarsOnUpdates(schema);
|
|
365
418
|
const upsertedUids = new Map();
|
|
366
419
|
const deletedUids = new Set();
|
|
367
420
|
const generatedApiNames = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sources":["../../../server/src/services/schema.ts"],"sourcesContent":["import { contentTypes as contentTypesUtils, errors } from '@strapi/utils';\nimport { mapValues } from 'lodash';\n\nimport type { Schema } from '@strapi/types';\n\nimport createBuilder from './schema-builder';\nimport { createMigrationBuilder } from './migration-builder';\nimport type {\n AttributeRenamesMapping,\n RenameAttributeDefinition,\n UnsupportedRename,\n} from './migration-builder';\nimport { finalizeSchemaMutation, rollbackSchemaMutation } from './schema-mutation';\nimport { getService } from '../utils';\nimport { validateUpdateSchema } from '../controllers/validation/schema';\nimport type { Schema as CTBSchema } from '../controllers/validation/schema';\nimport type { AttributeRenameMigrationMode } from '../config';\nimport {\n assertCTBOwnedApplicationContentType,\n getRestrictRelationsTo,\n isContentTypeVisible,\n} from './content-types';\nimport type { CoreContentStructureService } from './content-structure';\n\ntype ContentTypeKind = 'collectionType' | 'singleType';\n\nconst removeEmptyDefaultsOnUpdates = (schema: CTBSchema) => {\n schema.components.forEach((component) => {\n if (component.action === 'delete') {\n return;\n }\n\n component.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if ('default' in properties && properties.default === '') {\n properties.default = undefined;\n }\n }\n });\n });\n\n schema.contentTypes.forEach((contentType) => {\n if (contentType.action === 'delete') {\n return;\n }\n\n contentType.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if ('default' in properties && properties.default === '') {\n properties.default = undefined;\n }\n }\n });\n });\n};\n\nconst removeDeletedUIDTargetFieldsOnUpdates = (schema: CTBSchema) => {\n schema.contentTypes.forEach((contentType) => {\n if (contentType.action === 'delete') {\n return;\n }\n\n contentType.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if (\n properties.type === 'uid' &&\n properties.targetField &&\n !contentType.attributes.find((attr) => attr.name === properties.targetField)\n ) {\n properties.targetField = undefined;\n }\n }\n });\n });\n};\n\ninterface CollectedRename {\n uid: string;\n oldName: string;\n newName: string;\n newAttribute?: RenameAttributeDefinition;\n}\n\nconst getAttributeRenameMigrationMode = (): AttributeRenameMigrationMode => {\n return strapi\n .plugin('content-type-builder')\n .config('renameMigrations.attributes', 'prompt-before-save');\n};\n\n/**\n * Collects attribute renames from the update-schema payload. The admin sends an\n * ordered `renames` array per updated content-type / component: the exact path\n * of rename hops the user performed (e.g. `a -> tmp`, `b -> a`, `tmp -> b` for a\n * swap). Order is preserved so the generated migration can replay each hop\n * verbatim — which is inherently collision-free because the Content-Type Builder\n * never allows two fields to share a name at any instant.\n */\nconst collectRenames = (schema: CTBSchema): CollectedRename[] => {\n const renames: CollectedRename[] = [];\n\n type RenameHop = { oldName?: string; newName?: string };\n type AttributeEntry = { action?: string; name?: string; properties?: RenameAttributeDefinition };\n type RenameAwareEntry = {\n action?: string;\n uid: string;\n renames?: RenameHop[];\n attributes?: AttributeEntry[];\n };\n\n const collectFrom = (entries: RenameAwareEntry[]) => {\n entries\n .filter((entry) => entry.action === 'update' && Array.isArray(entry.renames))\n .forEach((entry) => {\n // Only the last hop onto a name produces the field that carries the\n // final definition: in `a -> b, b -> c, x -> b` the first `b` is `a`'s\n // intermediate name and the final `b` is `x`'s field.\n const lastHopByNewName = new Map<string, number>();\n entry.renames!.forEach((hop, index) => {\n if (hop.newName) {\n lastHopByNewName.set(hop.newName, index);\n }\n });\n\n entry.renames!.forEach((hop, index) => {\n if (hop.oldName && hop.newName && hop.oldName !== hop.newName) {\n // The definition the field ends up with in this save, so the builder\n // can refuse hops that also change the field's storage (type,\n // relation target, component…). Intermediate hops of a chain get no\n // definition and are checked when the chain completes.\n const newAttribute =\n lastHopByNewName.get(hop.newName) === index\n ? entry.attributes?.find(\n (attribute) => attribute.action !== 'delete' && attribute.name === hop.newName\n )?.properties\n : undefined;\n\n renames.push({\n uid: entry.uid,\n oldName: hop.oldName,\n newName: hop.newName,\n newAttribute,\n });\n }\n });\n });\n };\n\n collectFrom(schema.contentTypes as unknown as RenameAwareEntry[]);\n collectFrom(schema.components as unknown as RenameAwareEntry[]);\n\n return renames;\n};\n\n/**\n * Drops renames whose final name is not an attribute after this save (it was\n * deleted in the same save), so no store is pointed at a field that is gone.\n */\nconst keepSavedAttributes = (\n schema: CTBSchema,\n mapping: AttributeRenamesMapping\n): AttributeRenamesMapping => {\n type Entry = { action?: string; uid: string; attributes?: { action?: string; name?: string }[] };\n const entries = [\n ...(schema.contentTypes as unknown as Entry[]),\n ...(schema.components as unknown as Entry[]),\n ];\n\n const result: AttributeRenamesMapping = {};\n\n for (const [uid, renames] of Object.entries(mapping)) {\n const entry = entries.find((candidate) => candidate.uid === uid);\n const saved = new Set(\n (entry?.attributes ?? [])\n .filter((attribute) => attribute.action !== 'delete' && attribute.name)\n .map((attribute) => attribute.name as string)\n );\n\n for (const [origin, final] of Object.entries(renames)) {\n if (saved.has(final)) {\n result[uid] ??= {};\n result[uid][origin] = final;\n }\n }\n }\n\n return result;\n};\n\nconst describeUnsupportedReason = (reason: UnsupportedRename['reason']): string => {\n switch (reason) {\n case 'type-changed':\n return 'the field type, relation or component also changed';\n case 'unsupported-type':\n return 'the field type cannot be migrated (e.g. polymorphic relation)';\n case 'attribute-not-found':\n return 'the field is not in the current schema';\n case 'target-occupied':\n return 'the target field still exists in the current schema';\n case 'model-not-found':\n default:\n return 'the type is not in the current schema';\n }\n};\n\n/**\n * Generates a single data-preserving rename migration for the accepted renames\n * in this save. Must run before the server reloads, while `strapi.db.metadata`\n * still reflects the old (pre-rename) schema. Resolves to the written file's\n * path (so a failed save can remove it), or `null` when nothing was written.\n */\nconst generateRenameMigrations = async (schema: CTBSchema): Promise<string | null> => {\n // In prompt modes the admin strips refused renames before sending the payload.\n if (getAttributeRenameMigrationMode() === 'never') {\n return null;\n }\n\n const renames = collectRenames(schema);\n if (renames.length === 0) {\n return null;\n }\n\n const migrationBuilder = createMigrationBuilder({ strapi });\n\n for (const { uid, oldName, newName, newAttribute } of renames) {\n migrationBuilder.addRenameAttribute(uid, { oldName, newName, newAttribute });\n }\n\n const attributeRenames = keepSavedAttributes(schema, migrationBuilder.attributeRenamesMapping());\n if (Object.keys(attributeRenames).length > 0) {\n migrationBuilder.addAttributeRenames(attributeRenames);\n }\n\n const unsupported = migrationBuilder.getUnsupported();\n if (unsupported.length > 0) {\n const fields = unsupported\n .map((u) => `${u.uid}.${u.oldName} (${describeUnsupportedReason(u.reason)})`)\n .join(', ');\n strapi.log.warn(\n `[content-type-builder] Could not generate a rename migration for ${unsupported.length} field(s): ${fields}. Data in these fields may not be preserved.`\n );\n }\n\n if (migrationBuilder.hasChanges()) {\n return migrationBuilder.writeFiles();\n }\n\n return null;\n};\n\n/**\n * Renames a single attribute on a content-type or component and generates the\n * data-preserving migration in one step. Used by the `strapi rename:field` CLI\n * command so scripted / non-UI workflows get the same behaviour as the admin.\n *\n * It reuses the regular `updateSchema` path (and therefore the same rename\n * resolver via `generateRenameMigrations`), so the migration is resolved against\n * the pre-reload `strapi.db.metadata` exactly like the admin save. The caller is\n * responsible for not reloading before this resolves (the CLI simply exits).\n *\n * Unlike the admin, there is no one to confirm a data-losing rename, so it\n * refuses before touching the schema when the rename cannot be migrated.\n */\nexport const renameAttribute = async (\n uid: string,\n oldName: string,\n newName: string\n): Promise<void> => {\n const { ApplicationError } = errors;\n\n if (!oldName || !newName) {\n throw new ApplicationError('Both an old and a new attribute name are required');\n }\n\n if (oldName === newName) {\n throw new ApplicationError(`Cannot rename \"${oldName}\" to itself`);\n }\n\n if (getAttributeRenameMigrationMode() === 'never') {\n throw new ApplicationError(\n 'Rename migrations are disabled (`renameMigrations.attributes: never`); rename the field in the Content-Type Builder instead'\n );\n }\n\n const contentType = (strapi.contentTypes as Record<string, any>)[uid];\n const component = (strapi.components as Record<string, any>)[uid];\n const model = contentType ?? component;\n\n if (!model) {\n throw new ApplicationError(`No content-type or component found for uid \"${uid}\"`);\n }\n\n if (!model.attributes?.[oldName]) {\n throw new ApplicationError(`Attribute \"${oldName}\" does not exist on \"${uid}\"`);\n }\n\n if (model.attributes?.[newName]) {\n throw new ApplicationError(`Attribute \"${newName}\" already exists on \"${uid}\"`);\n }\n\n // Reuse the formatted, CTB-visible attributes (same shape the admin sends) so\n // the schema edit matches an admin save and the renamed key is the only change.\n const formattedSchema = await getSchema();\n const isComponent = Boolean(component);\n const entry = isComponent\n ? (formattedSchema.components as Record<string, any>)[uid]\n : (formattedSchema.contentTypes as Record<string, any>)[uid];\n\n // Custom fields are exposed with their underlying type; the admin sends them\n // back as `customField` so the schema file keeps them as custom fields.\n const toPayloadProperties = (properties: Record<string, any>) =>\n properties.customField ? { ...properties, type: 'customField' } : properties;\n\n const attributes = entry.attributes.map(({ name, ...properties }: Record<string, any>) => ({\n action: 'update',\n name: name === oldName ? newName : name,\n properties: toPayloadProperties(properties),\n }));\n\n // Dry run: the field keeps its definition, so only the rename itself can be\n // refused (system attribute, unsupported relation, occupied target…).\n const { name: _name, ...oldProperties } = entry.attributes.find(\n (attribute: Record<string, any>) => attribute.name === oldName\n ) ?? { name: oldName };\n const probe = createMigrationBuilder({ strapi });\n probe.addRenameAttribute(uid, {\n oldName,\n newName,\n newAttribute: toPayloadProperties(oldProperties),\n });\n\n const refused = probe.getUnsupported();\n if (refused.length > 0) {\n throw new ApplicationError(\n `Cannot rename \"${oldName}\" on \"${uid}\" without losing its data: ${refused\n .map(({ reason }) => describeUnsupportedReason(reason))\n .join(', ')}`\n );\n }\n\n const renames = [{ oldName, newName }];\n\n const payload = isComponent\n ? {\n contentTypes: [],\n components: [\n {\n action: 'update',\n uid,\n category: model.category,\n displayName: model.info?.displayName,\n icon: model.info?.icon,\n description: model.info?.description,\n pluginOptions: model.pluginOptions,\n renames,\n attributes,\n },\n ],\n }\n : {\n contentTypes: [\n {\n action: 'update',\n uid,\n kind: model.kind,\n displayName: model.info?.displayName,\n description: model.info?.description,\n draftAndPublish: Boolean(model.options?.draftAndPublish),\n options: model.options,\n pluginOptions: model.pluginOptions,\n renames,\n attributes,\n },\n ],\n components: [],\n };\n\n // Same checks as an admin save (name rules, reserved names, snake-case\n // uniqueness: `fooBar` next to an existing `foo_bar` would share a column).\n const { data } = await validateUpdateSchema({ data: payload });\n\n await updateSchema(data as CTBSchema);\n};\n\nconst formatAttributes = (model: any) => {\n const { getVisibleAttributes } = contentTypesUtils;\n\n // only get attributes that can be seen in the CTB\n return getVisibleAttributes(model).map((key) => {\n return { ...formatAttribute(model.attributes[key]), name: key };\n });\n};\n\nexport const formatAttribute = (attribute: Schema.Attribute.AnyAttribute & Record<string, any>) => {\n if (attribute.type === 'relation') {\n return {\n ...attribute,\n targetAttribute: attribute.inversedBy || attribute.mappedBy || null,\n // Explicitly preserve conditions if they exist\n ...(attribute.conditions && { conditions: attribute.conditions }),\n };\n }\n\n return attribute;\n};\n\nexport const getSchema = async () => {\n const contentTypes = mapValues(strapi.contentTypes, (contentType) => {\n const {\n uid,\n options,\n globalId,\n pluginOptions,\n kind,\n modelName,\n plugin,\n collectionName,\n info,\n modelType,\n } = contentType;\n\n return {\n uid,\n modelName,\n kind,\n globalId,\n options,\n pluginOptions,\n plugin,\n collectionName,\n info,\n modelType,\n attributes: formatAttributes(contentType),\n visible: isContentTypeVisible(contentType),\n restrictRelationsTo: getRestrictRelationsTo(contentType),\n };\n });\n\n const components = mapValues(strapi.components, (component) => {\n const { uid, globalId, modelName, collectionName, info, category, modelType } = component;\n\n return {\n uid,\n modelName,\n globalId,\n modelType,\n collectionName,\n category,\n info,\n attributes: formatAttributes(component),\n };\n });\n\n const coreContentStructure: CoreContentStructureService = strapi.get('content-structure');\n const contentStructure = await coreContentStructure.getCleanedFile();\n\n return {\n contentStructure,\n contentTypes,\n components,\n settings: {\n renameMigrations: {\n attributes: getAttributeRenameMigrationMode(),\n },\n },\n };\n};\n\nexport const updateSchema = async (schema: CTBSchema) => {\n const builder = createBuilder();\n const apiHandler = getService('api-handler') as typeof import('./api-handler');\n\n const { components, contentTypes, contentStructure } = schema;\n\n // Reject protected/plugin deletes before builders, API backups, or folder reconciliation can\n // mutate anything. This is the server-side invariant for crafted update requests.\n contentTypes\n .filter((contentType) => contentType.action === 'delete')\n .forEach((contentType) => assertCTBOwnedApplicationContentType(contentType.uid));\n\n // pre-process data\n removeEmptyDefaultsOnUpdates(schema);\n removeDeletedUIDTargetFieldsOnUpdates(schema);\n\n const upsertedUids = new Map<string, ContentTypeKind>();\n const deletedUids = new Set<string>();\n const generatedApiNames: string[] = [];\n const backedUpApiUids: string[] = [];\n let schemaAlreadyRolledBack = false;\n let migrationFilePath: string | null = null;\n const APIsToDelete = contentTypes\n .filter((contentType) => contentType.action === 'delete')\n .map((contentType) => contentType.uid);\n\n try {\n for (const contentType of contentTypes) {\n if (contentType.action === 'create') {\n upsertedUids.set(contentType.uid, contentType.kind ?? 'collectionType');\n } else if (contentType.action === 'update' && contentType.kind) {\n // A kind switch in the same save must override the registry's stale kind,\n // otherwise a folder assignment into the new section fails validation.\n upsertedUids.set(contentType.uid, contentType.kind);\n } else if (contentType.action === 'delete') {\n deletedUids.add(contentType.uid);\n }\n }\n\n // Validate folder references before anything is written. This will throw if invalid.\n getService('content-structure').validateFromUpdate({\n incomingStructure: contentStructure,\n upsertedUids,\n deletedUids,\n });\n\n // we pre create empty typesk\n for (const contentType of contentTypes) {\n if (contentType.action === 'create') {\n builder.createContentType({\n ...contentType,\n attributes: {},\n });\n }\n }\n\n // we pre create empty types\n for (const component of components) {\n if (component.action === 'create') {\n builder.createComponent({\n ...component,\n attributes: {},\n });\n }\n }\n\n for (const contentType of contentTypes) {\n const { action, uid } = contentType;\n\n if (action === 'create') {\n builder.createContentTypeAttributes(\n uid,\n contentType.attributes.reduce((acc: any, attr: any) => {\n acc[attr.name] = attr.properties;\n return acc;\n }, {})\n );\n\n if (!contentType.plugin) {\n // Track before generation because a generator failure can leave a partial skeleton.\n generatedApiNames.push(contentType.singularName);\n await getService('content-types').generateAPI({\n displayName: contentType!.displayName,\n singularName: contentType!.singularName,\n pluralName: contentType!.pluralName,\n kind: contentType!.kind,\n });\n }\n }\n\n if (action === 'update') {\n builder.editContentType({\n ...contentType,\n attributes: contentType.attributes.reduce((acc: any, attr: any) => {\n if (attr.action === 'delete') {\n return acc;\n }\n\n acc[attr.name] = attr.properties;\n return acc;\n }, {}),\n });\n }\n\n if (action === 'delete') {\n builder.deleteContentType(uid);\n await apiHandler.backup(uid);\n backedUpApiUids.push(uid);\n }\n }\n\n for (const component of components) {\n const { action, uid } = component;\n\n if (action === 'create') {\n builder.createComponentAttributes(\n uid,\n component.attributes.reduce((acc: any, attr: any) => {\n acc[attr.name] = attr.properties;\n return acc;\n }, {})\n );\n }\n\n if (action === 'update') {\n builder.editComponent({\n ...component,\n attributes: component.attributes.reduce((acc: any, attr: any) => {\n if (attr.action === 'delete') {\n return acc;\n }\n\n acc[attr.name] = attr.properties;\n return acc;\n }, {}),\n });\n }\n\n if (action === 'delete') {\n builder.deleteComponent(uid);\n }\n }\n\n // run sanity checks on the schema\n // Relations target existing types\n // Bidirectional relation have their counterpart in the schema\n // Components target existing components\n // Nested components target existing components\n // Dynamic zones target existing components\n\n // Generate rename migrations before reloading, while strapi.db.metadata still\n // reflects the pre-rename schema (the controller triggers the reload after this).\n migrationFilePath = await generateRenameMigrations(schema);\n\n const schemaFilesWritten = await builder.writeFiles();\n\n if (!schemaFilesWritten) {\n schemaAlreadyRolledBack = true;\n throw new errors.ApplicationError('Invalid schema edition');\n }\n\n for (const uid of APIsToDelete) {\n await apiHandler.clear(uid, { preserveBackup: true });\n }\n\n // Commit the single folder file last. Every preceding filesystem mutation can be restored.\n await getService('content-structure').commitFromUpdate({\n incomingStructure: contentStructure,\n deletedUids,\n });\n } catch (error) {\n await rollbackSchemaMutation({\n builder,\n apiHandler,\n backedUpApiUids,\n generatedApiNames,\n schemaAlreadyRolledBack,\n migrationFilePath,\n });\n\n throw error;\n }\n\n // Backup cleanup is deliberately outside the compensating boundary: at this point all\n // user-visible artifacts, including groups.json, have committed.\n for (const error of await finalizeSchemaMutation({ apiHandler, backedUpApiUids })) {\n strapi.log.error(error);\n }\n\n for (const contentType of contentTypes) {\n if (contentType.action === 'delete') {\n strapi.eventHub.emit('content-type.delete', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n\n if (contentType.action === 'update') {\n strapi.eventHub.emit('content-type.update', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n\n if (contentType.action === 'create') {\n strapi.eventHub.emit('content-type.create', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n }\n\n for (const component of components) {\n if (component.action === 'delete') {\n strapi.eventHub.emit('component.delete', {\n component: builder.components.get(component.uid),\n });\n }\n\n if (component.action === 'update') {\n strapi.eventHub.emit('component.update', {\n component: builder.components.get(component.uid),\n });\n }\n\n if (component.action === 'create') {\n strapi.eventHub.emit('component.create', {\n component: builder.components.get(component.uid),\n });\n }\n }\n};\n"],"names":["removeEmptyDefaultsOnUpdates","schema","components","forEach","component","action","attributes","attribute","properties","default","undefined","contentTypes","contentType","removeDeletedUIDTargetFieldsOnUpdates","type","targetField","find","attr","name","getAttributeRenameMigrationMode","strapi","plugin","config","collectRenames","renames","collectFrom","entries","filter","entry","Array","isArray","lastHopByNewName","Map","hop","index","newName","set","oldName","newAttribute","get","push","uid","keepSavedAttributes","mapping","result","Object","candidate","saved","Set","map","origin","final","has","describeUnsupportedReason","reason","generateRenameMigrations","length","migrationBuilder","createMigrationBuilder","addRenameAttribute","attributeRenames","attributeRenamesMapping","keys","addAttributeRenames","unsupported","getUnsupported","fields","u","join","log","warn","hasChanges","writeFiles","renameAttribute","ApplicationError","errors","model","formattedSchema","getSchema","isComponent","Boolean","toPayloadProperties","customField","_name","oldProperties","probe","refused","payload","category","displayName","info","icon","description","pluginOptions","kind","draftAndPublish","options","data","validateUpdateSchema","updateSchema","formatAttributes","getVisibleAttributes","contentTypesUtils","key","formatAttribute","targetAttribute","inversedBy","mappedBy","conditions","mapValues","globalId","modelName","collectionName","modelType","visible","isContentTypeVisible","restrictRelationsTo","getRestrictRelationsTo","coreContentStructure","contentStructure","getCleanedFile","settings","renameMigrations","builder","createBuilder","apiHandler","getService","assertCTBOwnedApplicationContentType","upsertedUids","deletedUids","generatedApiNames","backedUpApiUids","schemaAlreadyRolledBack","migrationFilePath","APIsToDelete","add","validateFromUpdate","incomingStructure","createContentType","createComponent","createContentTypeAttributes","reduce","acc","singularName","generateAPI","pluralName","editContentType","deleteContentType","backup","createComponentAttributes","editComponent","deleteComponent","schemaFilesWritten","clear","preserveBackup","commitFromUpdate","error","rollbackSchemaMutation","finalizeSchemaMutation","eventHub","emit"],"mappings":";;;;;;;;;;;AA0BA,MAAMA,+BAA+B,CAACC,MAAAA,GAAAA;AACpCA,IAAAA,MAAAA,CAAOC,UAAU,CAACC,OAAO,CAAC,CAACC,SAAAA,GAAAA;QACzB,IAAIA,SAAAA,CAAUC,MAAM,KAAK,QAAA,EAAU;AACjC,YAAA;AACF,QAAA;AAEAD,QAAAA,SAAAA,CAAUE,UAAU,CAACH,OAAO,CAAC,CAACI,SAAAA,GAAAA;YAC5B,IAAIA,SAAAA,CAAUF,MAAM,KAAK,QAAA,EAAU;gBACjC,MAAM,EAAEG,UAAU,EAAE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/services/schema.ts"],"sourcesContent":["import { contentTypes as contentTypesUtils, errors } from '@strapi/utils';\nimport { mapValues } from 'lodash';\n\nimport type { Schema } from '@strapi/types';\n\nimport createBuilder from './schema-builder';\nimport { createMigrationBuilder } from './migration-builder';\nimport type {\n AttributeRenamesMapping,\n RenameAttributeDefinition,\n UnsupportedRename,\n} from './migration-builder';\nimport { finalizeSchemaMutation, rollbackSchemaMutation } from './schema-mutation';\nimport { getService } from '../utils';\nimport { validateUpdateSchema } from '../controllers/validation/schema';\nimport type { Schema as CTBSchema } from '../controllers/validation/schema';\nimport type { AttributeRenameMigrationMode } from '../config';\nimport {\n assertCTBOwnedApplicationContentType,\n getRestrictRelationsTo,\n isContentTypeVisible,\n} from './content-types';\nimport type { CoreContentStructureService } from './content-structure';\n\ntype ContentTypeKind = 'collectionType' | 'singleType';\n\nconst removeEmptyDefaultsOnUpdates = (schema: CTBSchema) => {\n schema.components.forEach((component) => {\n if (component.action === 'delete') {\n return;\n }\n\n component.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if ('default' in properties && properties.default === '') {\n properties.default = undefined;\n }\n }\n });\n });\n\n schema.contentTypes.forEach((contentType) => {\n if (contentType.action === 'delete') {\n return;\n }\n\n contentType.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if ('default' in properties && properties.default === '') {\n properties.default = undefined;\n }\n }\n });\n });\n};\n\nconst removeDeletedUIDTargetFieldsOnUpdates = (schema: CTBSchema) => {\n schema.contentTypes.forEach((contentType) => {\n if (contentType.action === 'delete') {\n return;\n }\n\n contentType.attributes.forEach((attribute) => {\n if (attribute.action === 'update') {\n const { properties } = attribute;\n\n if (\n properties.type === 'uid' &&\n properties.targetField &&\n !contentType.attributes.find((attr) => attr.name === properties.targetField)\n ) {\n properties.targetField = undefined;\n }\n }\n });\n });\n};\n\n/**\n * Composes the ordered rename hops of an updated type into an origin -> final\n * name map (`a -> b, b -> c` gives `a -> c`).\n */\nconst composeRenames = (hops: { oldName?: string; newName?: string }[]): Map<string, string> => {\n const originByName = new Map<string, string>();\n\n hops.forEach(({ oldName, newName }) => {\n if (!oldName || !newName || oldName === newName) {\n return;\n }\n\n const origin = originByName.get(oldName) ?? oldName;\n originByName.delete(oldName);\n originByName.set(newName, origin);\n });\n\n return new Map([...originByName].map(([name, origin]) => [origin, name]));\n};\n\n/**\n * Makes field conditions follow the renames of this save: a condition whose\n * `var` still names the origin of a rename is pointed at the field's final name.\n *\n * A `var` that names an attribute of the saved type is left alone: the caller\n * already rewrote it, or (in a swap) it cannot be told apart from one that was.\n */\nconst renameConditionVarsOnUpdates = (schema: CTBSchema) => {\n type AttributeEntry = {\n action?: string;\n name?: string;\n properties?: { conditions?: { visible?: Record<string, unknown> } };\n };\n type Entry = {\n action?: string;\n renames?: { oldName?: string; newName?: string }[];\n attributes?: AttributeEntry[];\n };\n\n const entries = [\n ...(schema.contentTypes as unknown as Entry[]),\n ...(schema.components as unknown as Entry[]),\n ];\n\n entries.forEach((entry) => {\n if (entry.action !== 'update' || !Array.isArray(entry.renames)) {\n return;\n }\n\n const renames = composeRenames(entry.renames);\n const savedAttributes = (entry.attributes ?? []).filter(\n (attribute) => attribute.action !== 'delete'\n );\n const saved = new Set(savedAttributes.map((attribute) => attribute.name));\n\n savedAttributes.forEach((attribute) => {\n Object.values(attribute.properties?.conditions?.visible ?? {}).forEach((rule) => {\n const fieldVar: unknown = Array.isArray(rule) ? rule[0] : undefined;\n\n if (\n typeof fieldVar !== 'object' ||\n fieldVar === null ||\n !('var' in fieldVar) ||\n typeof fieldVar.var !== 'string' ||\n saved.has(fieldVar.var)\n ) {\n return;\n }\n\n const finalName = renames.get(fieldVar.var);\n\n if (finalName !== undefined && saved.has(finalName)) {\n fieldVar.var = finalName;\n }\n });\n });\n });\n};\n\ninterface CollectedRename {\n uid: string;\n oldName: string;\n newName: string;\n newAttribute?: RenameAttributeDefinition;\n}\n\nconst getAttributeRenameMigrationMode = (): AttributeRenameMigrationMode => {\n return strapi\n .plugin('content-type-builder')\n .config('renameMigrations.attributes', 'prompt-before-save');\n};\n\n/**\n * Collects attribute renames from the update-schema payload. The admin sends an\n * ordered `renames` array per updated content-type / component: the exact path\n * of rename hops the user performed (e.g. `a -> tmp`, `b -> a`, `tmp -> b` for a\n * swap). Order is preserved so the generated migration can replay each hop\n * verbatim — which is inherently collision-free because the Content-Type Builder\n * never allows two fields to share a name at any instant.\n */\nconst collectRenames = (schema: CTBSchema): CollectedRename[] => {\n const renames: CollectedRename[] = [];\n\n type RenameHop = { oldName?: string; newName?: string };\n type AttributeEntry = { action?: string; name?: string; properties?: RenameAttributeDefinition };\n type RenameAwareEntry = {\n action?: string;\n uid: string;\n renames?: RenameHop[];\n attributes?: AttributeEntry[];\n };\n\n const collectFrom = (entries: RenameAwareEntry[]) => {\n entries\n .filter((entry) => entry.action === 'update' && Array.isArray(entry.renames))\n .forEach((entry) => {\n // Only the last hop onto a name produces the field that carries the\n // final definition: in `a -> b, b -> c, x -> b` the first `b` is `a`'s\n // intermediate name and the final `b` is `x`'s field.\n const lastHopByNewName = new Map<string, number>();\n entry.renames!.forEach((hop, index) => {\n if (hop.newName) {\n lastHopByNewName.set(hop.newName, index);\n }\n });\n\n entry.renames!.forEach((hop, index) => {\n if (hop.oldName && hop.newName && hop.oldName !== hop.newName) {\n // The definition the field ends up with in this save, so the builder\n // can refuse hops that also change the field's storage (type,\n // relation target, component…). Intermediate hops of a chain get no\n // definition and are checked when the chain completes.\n const newAttribute =\n lastHopByNewName.get(hop.newName) === index\n ? entry.attributes?.find(\n (attribute) => attribute.action !== 'delete' && attribute.name === hop.newName\n )?.properties\n : undefined;\n\n renames.push({\n uid: entry.uid,\n oldName: hop.oldName,\n newName: hop.newName,\n newAttribute,\n });\n }\n });\n });\n };\n\n collectFrom(schema.contentTypes as unknown as RenameAwareEntry[]);\n collectFrom(schema.components as unknown as RenameAwareEntry[]);\n\n return renames;\n};\n\n/**\n * Drops renames whose final name is not an attribute after this save (it was\n * deleted in the same save), so no store is pointed at a field that is gone.\n */\nconst keepSavedAttributes = (\n schema: CTBSchema,\n mapping: AttributeRenamesMapping\n): AttributeRenamesMapping => {\n type Entry = { action?: string; uid: string; attributes?: { action?: string; name?: string }[] };\n const entries = [\n ...(schema.contentTypes as unknown as Entry[]),\n ...(schema.components as unknown as Entry[]),\n ];\n\n const result: AttributeRenamesMapping = {};\n\n for (const [uid, renames] of Object.entries(mapping)) {\n const entry = entries.find((candidate) => candidate.uid === uid);\n const saved = new Set(\n (entry?.attributes ?? [])\n .filter((attribute) => attribute.action !== 'delete' && attribute.name)\n .map((attribute) => attribute.name as string)\n );\n\n for (const [origin, final] of Object.entries(renames)) {\n if (saved.has(final)) {\n result[uid] ??= {};\n result[uid][origin] = final;\n }\n }\n }\n\n return result;\n};\n\nconst describeUnsupportedReason = (reason: UnsupportedRename['reason']): string => {\n switch (reason) {\n case 'type-changed':\n return 'the field type, relation or component also changed';\n case 'unsupported-type':\n return 'the field type cannot be migrated (e.g. polymorphic relation)';\n case 'attribute-not-found':\n return 'the field is not in the current schema';\n case 'target-occupied':\n return 'the target field still exists in the current schema';\n case 'model-not-found':\n default:\n return 'the type is not in the current schema';\n }\n};\n\n/**\n * Generates a single data-preserving rename migration for the accepted renames\n * in this save. Must run before the server reloads, while `strapi.db.metadata`\n * still reflects the old (pre-rename) schema. Resolves to the written file's\n * path (so a failed save can remove it), or `null` when nothing was written.\n */\nconst generateRenameMigrations = async (schema: CTBSchema): Promise<string | null> => {\n // In prompt modes the admin strips refused renames before sending the payload.\n if (getAttributeRenameMigrationMode() === 'never') {\n return null;\n }\n\n const renames = collectRenames(schema);\n if (renames.length === 0) {\n return null;\n }\n\n const migrationBuilder = createMigrationBuilder({ strapi });\n\n for (const { uid, oldName, newName, newAttribute } of renames) {\n migrationBuilder.addRenameAttribute(uid, { oldName, newName, newAttribute });\n }\n\n const attributeRenames = keepSavedAttributes(schema, migrationBuilder.attributeRenamesMapping());\n if (Object.keys(attributeRenames).length > 0) {\n migrationBuilder.addAttributeRenames(attributeRenames);\n }\n\n const unsupported = migrationBuilder.getUnsupported();\n if (unsupported.length > 0) {\n const fields = unsupported\n .map((u) => `${u.uid}.${u.oldName} (${describeUnsupportedReason(u.reason)})`)\n .join(', ');\n strapi.log.warn(\n `[content-type-builder] Could not generate a rename migration for ${unsupported.length} field(s): ${fields}. Data in these fields may not be preserved.`\n );\n }\n\n if (migrationBuilder.hasChanges()) {\n return migrationBuilder.writeFiles();\n }\n\n return null;\n};\n\n/**\n * Renames a single attribute on a content-type or component and generates the\n * data-preserving migration in one step. Used by the `strapi rename:field` CLI\n * command so scripted / non-UI workflows get the same behaviour as the admin.\n *\n * It reuses the regular `updateSchema` path (and therefore the same rename\n * resolver via `generateRenameMigrations`), so the migration is resolved against\n * the pre-reload `strapi.db.metadata` exactly like the admin save. The caller is\n * responsible for not reloading before this resolves (the CLI simply exits).\n *\n * Unlike the admin, there is no one to confirm a data-losing rename, so it\n * refuses before touching the schema when the rename cannot be migrated.\n */\nexport const renameAttribute = async (\n uid: string,\n oldName: string,\n newName: string\n): Promise<void> => {\n const { ApplicationError } = errors;\n\n if (!oldName || !newName) {\n throw new ApplicationError('Both an old and a new attribute name are required');\n }\n\n if (oldName === newName) {\n throw new ApplicationError(`Cannot rename \"${oldName}\" to itself`);\n }\n\n if (getAttributeRenameMigrationMode() === 'never') {\n throw new ApplicationError(\n 'Rename migrations are disabled (`renameMigrations.attributes: never`); rename the field in the Content-Type Builder instead'\n );\n }\n\n const contentType = (strapi.contentTypes as Record<string, any>)[uid];\n const component = (strapi.components as Record<string, any>)[uid];\n const model = contentType ?? component;\n\n if (!model) {\n throw new ApplicationError(`No content-type or component found for uid \"${uid}\"`);\n }\n\n if (!model.attributes?.[oldName]) {\n throw new ApplicationError(`Attribute \"${oldName}\" does not exist on \"${uid}\"`);\n }\n\n if (model.attributes?.[newName]) {\n throw new ApplicationError(`Attribute \"${newName}\" already exists on \"${uid}\"`);\n }\n\n // Reuse the formatted, CTB-visible attributes (same shape the admin sends) so\n // the schema edit matches an admin save and the renamed key is the only change.\n const formattedSchema = await getSchema();\n const isComponent = Boolean(component);\n const entry = isComponent\n ? (formattedSchema.components as Record<string, any>)[uid]\n : (formattedSchema.contentTypes as Record<string, any>)[uid];\n\n // Custom fields are exposed with their underlying type; the admin sends them\n // back as `customField` so the schema file keeps them as custom fields.\n const toPayloadProperties = (properties: Record<string, any>) =>\n properties.customField ? { ...properties, type: 'customField' } : properties;\n\n const attributes = entry.attributes.map(({ name, ...properties }: Record<string, any>) => ({\n action: 'update',\n name: name === oldName ? newName : name,\n properties: toPayloadProperties(properties),\n }));\n\n // Dry run: the field keeps its definition, so only the rename itself can be\n // refused (system attribute, unsupported relation, occupied target…).\n const { name: _name, ...oldProperties } = entry.attributes.find(\n (attribute: Record<string, any>) => attribute.name === oldName\n ) ?? { name: oldName };\n const probe = createMigrationBuilder({ strapi });\n probe.addRenameAttribute(uid, {\n oldName,\n newName,\n newAttribute: toPayloadProperties(oldProperties),\n });\n\n const refused = probe.getUnsupported();\n if (refused.length > 0) {\n throw new ApplicationError(\n `Cannot rename \"${oldName}\" on \"${uid}\" without losing its data: ${refused\n .map(({ reason }) => describeUnsupportedReason(reason))\n .join(', ')}`\n );\n }\n\n const renames = [{ oldName, newName }];\n\n const payload = isComponent\n ? {\n contentTypes: [],\n components: [\n {\n action: 'update',\n uid,\n category: model.category,\n displayName: model.info?.displayName,\n icon: model.info?.icon,\n description: model.info?.description,\n pluginOptions: model.pluginOptions,\n renames,\n attributes,\n },\n ],\n }\n : {\n contentTypes: [\n {\n action: 'update',\n uid,\n kind: model.kind,\n displayName: model.info?.displayName,\n description: model.info?.description,\n draftAndPublish: Boolean(model.options?.draftAndPublish),\n options: model.options,\n pluginOptions: model.pluginOptions,\n renames,\n attributes,\n },\n ],\n components: [],\n };\n\n // Same checks as an admin save (name rules, reserved names, snake-case\n // uniqueness: `fooBar` next to an existing `foo_bar` would share a column).\n const { data } = await validateUpdateSchema({ data: payload });\n\n await updateSchema(data as CTBSchema);\n};\n\nconst formatAttributes = (model: any) => {\n const { getVisibleAttributes } = contentTypesUtils;\n\n // only get attributes that can be seen in the CTB\n return getVisibleAttributes(model).map((key) => {\n return { ...formatAttribute(model.attributes[key]), name: key };\n });\n};\n\nexport const formatAttribute = (attribute: Schema.Attribute.AnyAttribute & Record<string, any>) => {\n if (attribute.type === 'relation') {\n return {\n ...attribute,\n targetAttribute: attribute.inversedBy || attribute.mappedBy || null,\n // Explicitly preserve conditions if they exist\n ...(attribute.conditions && { conditions: attribute.conditions }),\n };\n }\n\n return attribute;\n};\n\nexport const getSchema = async () => {\n const contentTypes = mapValues(strapi.contentTypes, (contentType) => {\n const {\n uid,\n options,\n globalId,\n pluginOptions,\n kind,\n modelName,\n plugin,\n collectionName,\n info,\n modelType,\n } = contentType;\n\n return {\n uid,\n modelName,\n kind,\n globalId,\n options,\n pluginOptions,\n plugin,\n collectionName,\n info,\n modelType,\n attributes: formatAttributes(contentType),\n visible: isContentTypeVisible(contentType),\n restrictRelationsTo: getRestrictRelationsTo(contentType),\n };\n });\n\n const components = mapValues(strapi.components, (component) => {\n const { uid, globalId, modelName, collectionName, info, category, modelType } = component;\n\n return {\n uid,\n modelName,\n globalId,\n modelType,\n collectionName,\n category,\n info,\n attributes: formatAttributes(component),\n };\n });\n\n const coreContentStructure: CoreContentStructureService = strapi.get('content-structure');\n const contentStructure = await coreContentStructure.getCleanedFile();\n\n return {\n contentStructure,\n contentTypes,\n components,\n settings: {\n renameMigrations: {\n attributes: getAttributeRenameMigrationMode(),\n },\n },\n };\n};\n\nexport const updateSchema = async (schema: CTBSchema) => {\n const builder = createBuilder();\n const apiHandler = getService('api-handler') as typeof import('./api-handler');\n\n const { components, contentTypes, contentStructure } = schema;\n\n // Reject protected/plugin deletes before builders, API backups, or folder reconciliation can\n // mutate anything. This is the server-side invariant for crafted update requests.\n contentTypes\n .filter((contentType) => contentType.action === 'delete')\n .forEach((contentType) => assertCTBOwnedApplicationContentType(contentType.uid));\n\n // pre-process data\n removeEmptyDefaultsOnUpdates(schema);\n removeDeletedUIDTargetFieldsOnUpdates(schema);\n renameConditionVarsOnUpdates(schema);\n\n const upsertedUids = new Map<string, ContentTypeKind>();\n const deletedUids = new Set<string>();\n const generatedApiNames: string[] = [];\n const backedUpApiUids: string[] = [];\n let schemaAlreadyRolledBack = false;\n let migrationFilePath: string | null = null;\n const APIsToDelete = contentTypes\n .filter((contentType) => contentType.action === 'delete')\n .map((contentType) => contentType.uid);\n\n try {\n for (const contentType of contentTypes) {\n if (contentType.action === 'create') {\n upsertedUids.set(contentType.uid, contentType.kind ?? 'collectionType');\n } else if (contentType.action === 'update' && contentType.kind) {\n // A kind switch in the same save must override the registry's stale kind,\n // otherwise a folder assignment into the new section fails validation.\n upsertedUids.set(contentType.uid, contentType.kind);\n } else if (contentType.action === 'delete') {\n deletedUids.add(contentType.uid);\n }\n }\n\n // Validate folder references before anything is written. This will throw if invalid.\n getService('content-structure').validateFromUpdate({\n incomingStructure: contentStructure,\n upsertedUids,\n deletedUids,\n });\n\n // we pre create empty typesk\n for (const contentType of contentTypes) {\n if (contentType.action === 'create') {\n builder.createContentType({\n ...contentType,\n attributes: {},\n });\n }\n }\n\n // we pre create empty types\n for (const component of components) {\n if (component.action === 'create') {\n builder.createComponent({\n ...component,\n attributes: {},\n });\n }\n }\n\n for (const contentType of contentTypes) {\n const { action, uid } = contentType;\n\n if (action === 'create') {\n builder.createContentTypeAttributes(\n uid,\n contentType.attributes.reduce((acc: any, attr: any) => {\n acc[attr.name] = attr.properties;\n return acc;\n }, {})\n );\n\n if (!contentType.plugin) {\n // Track before generation because a generator failure can leave a partial skeleton.\n generatedApiNames.push(contentType.singularName);\n await getService('content-types').generateAPI({\n displayName: contentType!.displayName,\n singularName: contentType!.singularName,\n pluralName: contentType!.pluralName,\n kind: contentType!.kind,\n });\n }\n }\n\n if (action === 'update') {\n builder.editContentType({\n ...contentType,\n attributes: contentType.attributes.reduce((acc: any, attr: any) => {\n if (attr.action === 'delete') {\n return acc;\n }\n\n acc[attr.name] = attr.properties;\n return acc;\n }, {}),\n });\n }\n\n if (action === 'delete') {\n builder.deleteContentType(uid);\n await apiHandler.backup(uid);\n backedUpApiUids.push(uid);\n }\n }\n\n for (const component of components) {\n const { action, uid } = component;\n\n if (action === 'create') {\n builder.createComponentAttributes(\n uid,\n component.attributes.reduce((acc: any, attr: any) => {\n acc[attr.name] = attr.properties;\n return acc;\n }, {})\n );\n }\n\n if (action === 'update') {\n builder.editComponent({\n ...component,\n attributes: component.attributes.reduce((acc: any, attr: any) => {\n if (attr.action === 'delete') {\n return acc;\n }\n\n acc[attr.name] = attr.properties;\n return acc;\n }, {}),\n });\n }\n\n if (action === 'delete') {\n builder.deleteComponent(uid);\n }\n }\n\n // run sanity checks on the schema\n // Relations target existing types\n // Bidirectional relation have their counterpart in the schema\n // Components target existing components\n // Nested components target existing components\n // Dynamic zones target existing components\n\n // Generate rename migrations before reloading, while strapi.db.metadata still\n // reflects the pre-rename schema (the controller triggers the reload after this).\n migrationFilePath = await generateRenameMigrations(schema);\n\n const schemaFilesWritten = await builder.writeFiles();\n\n if (!schemaFilesWritten) {\n schemaAlreadyRolledBack = true;\n throw new errors.ApplicationError('Invalid schema edition');\n }\n\n for (const uid of APIsToDelete) {\n await apiHandler.clear(uid, { preserveBackup: true });\n }\n\n // Commit the single folder file last. Every preceding filesystem mutation can be restored.\n await getService('content-structure').commitFromUpdate({\n incomingStructure: contentStructure,\n deletedUids,\n });\n } catch (error) {\n await rollbackSchemaMutation({\n builder,\n apiHandler,\n backedUpApiUids,\n generatedApiNames,\n schemaAlreadyRolledBack,\n migrationFilePath,\n });\n\n throw error;\n }\n\n // Backup cleanup is deliberately outside the compensating boundary: at this point all\n // user-visible artifacts, including groups.json, have committed.\n for (const error of await finalizeSchemaMutation({ apiHandler, backedUpApiUids })) {\n strapi.log.error(error);\n }\n\n for (const contentType of contentTypes) {\n if (contentType.action === 'delete') {\n strapi.eventHub.emit('content-type.delete', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n\n if (contentType.action === 'update') {\n strapi.eventHub.emit('content-type.update', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n\n if (contentType.action === 'create') {\n strapi.eventHub.emit('content-type.create', {\n contentType: builder.contentTypes.get(contentType.uid),\n });\n }\n }\n\n for (const component of components) {\n if (component.action === 'delete') {\n strapi.eventHub.emit('component.delete', {\n component: builder.components.get(component.uid),\n });\n }\n\n if (component.action === 'update') {\n strapi.eventHub.emit('component.update', {\n component: builder.components.get(component.uid),\n });\n }\n\n if (component.action === 'create') {\n strapi.eventHub.emit('component.create', {\n component: builder.components.get(component.uid),\n });\n }\n }\n};\n"],"names":["removeEmptyDefaultsOnUpdates","schema","components","forEach","component","action","attributes","attribute","properties","default","undefined","contentTypes","contentType","removeDeletedUIDTargetFieldsOnUpdates","type","targetField","find","attr","name","composeRenames","hops","originByName","Map","oldName","newName","origin","get","delete","set","map","renameConditionVarsOnUpdates","entries","entry","Array","isArray","renames","savedAttributes","filter","saved","Set","Object","values","conditions","visible","rule","fieldVar","var","has","finalName","getAttributeRenameMigrationMode","strapi","plugin","config","collectRenames","collectFrom","lastHopByNewName","hop","index","newAttribute","push","uid","keepSavedAttributes","mapping","result","candidate","final","describeUnsupportedReason","reason","generateRenameMigrations","length","migrationBuilder","createMigrationBuilder","addRenameAttribute","attributeRenames","attributeRenamesMapping","keys","addAttributeRenames","unsupported","getUnsupported","fields","u","join","log","warn","hasChanges","writeFiles","renameAttribute","ApplicationError","errors","model","formattedSchema","getSchema","isComponent","Boolean","toPayloadProperties","customField","_name","oldProperties","probe","refused","payload","category","displayName","info","icon","description","pluginOptions","kind","draftAndPublish","options","data","validateUpdateSchema","updateSchema","formatAttributes","getVisibleAttributes","contentTypesUtils","key","formatAttribute","targetAttribute","inversedBy","mappedBy","mapValues","globalId","modelName","collectionName","modelType","isContentTypeVisible","restrictRelationsTo","getRestrictRelationsTo","coreContentStructure","contentStructure","getCleanedFile","settings","renameMigrations","builder","createBuilder","apiHandler","getService","assertCTBOwnedApplicationContentType","upsertedUids","deletedUids","generatedApiNames","backedUpApiUids","schemaAlreadyRolledBack","migrationFilePath","APIsToDelete","add","validateFromUpdate","incomingStructure","createContentType","createComponent","createContentTypeAttributes","reduce","acc","singularName","generateAPI","pluralName","editContentType","deleteContentType","backup","createComponentAttributes","editComponent","deleteComponent","schemaFilesWritten","clear","preserveBackup","commitFromUpdate","error","rollbackSchemaMutation","finalizeSchemaMutation","eventHub","emit"],"mappings":";;;;;;;;;;;AA0BA,MAAMA,+BAA+B,CAACC,MAAAA,GAAAA;AACpCA,IAAAA,MAAAA,CAAOC,UAAU,CAACC,OAAO,CAAC,CAACC,SAAAA,GAAAA;QACzB,IAAIA,SAAAA,CAAUC,MAAM,KAAK,QAAA,EAAU;AACjC,YAAA;AACF,QAAA;AAEAD,QAAAA,SAAAA,CAAUE,UAAU,CAACH,OAAO,CAAC,CAACI,SAAAA,GAAAA;YAC5B,IAAIA,SAAAA,CAAUF,MAAM,KAAK,QAAA,EAAU;gBACjC,MAAM,EAAEG,UAAU,EAAE,GAAGD,SAAAA;AAEvB,gBAAA,IAAI,SAAA,IAAaC,UAAAA,IAAcA,UAAAA,CAAWC,OAAO,KAAK,EAAA,EAAI;AACxDD,oBAAAA,UAAAA,CAAWC,OAAO,GAAGC,SAAAA;AACvB,gBAAA;AACF,YAAA;AACF,QAAA,CAAA,CAAA;AACF,IAAA,CAAA,CAAA;AAEAT,IAAAA,MAAAA,CAAOU,YAAY,CAACR,OAAO,CAAC,CAACS,WAAAA,GAAAA;QAC3B,IAAIA,WAAAA,CAAYP,MAAM,KAAK,QAAA,EAAU;AACnC,YAAA;AACF,QAAA;AAEAO,QAAAA,WAAAA,CAAYN,UAAU,CAACH,OAAO,CAAC,CAACI,SAAAA,GAAAA;YAC9B,IAAIA,SAAAA,CAAUF,MAAM,KAAK,QAAA,EAAU;gBACjC,MAAM,EAAEG,UAA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