nextjs-cms 0.9.36 → 0.9.37
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/api/actions/pages.d.ts +3 -3
- package/dist/api/trpc/root.d.ts +3 -3
- package/dist/api/trpc/routers/navigation.d.ts +3 -3
- package/dist/api/trpc/server.d.ts +9 -9
- package/dist/cli/lib/update-sections.d.ts.map +1 -1
- package/dist/cli/lib/update-sections.js +43 -10
- package/dist/core/config/config-loader.d.ts +2 -2
- package/dist/core/fields/date-range.d.ts +4 -4
- package/dist/core/fields/slug.d.ts +55 -3
- package/dist/core/fields/slug.d.ts.map +1 -1
- package/dist/core/fields/slug.js +56 -2
- package/dist/core/sections/category.d.ts +4 -4
- package/dist/core/sections/hasItems.d.ts +4 -4
- package/dist/core/sections/section.d.ts +3 -3
- package/dist/core/sections/simple.d.ts +4 -4
- package/dist/translations/base/en.d.ts +3 -0
- package/dist/translations/base/en.d.ts.map +1 -1
- package/dist/translations/base/en.js +3 -0
- package/dist/translations/client.d.ts +40 -4
- package/dist/translations/client.d.ts.map +1 -1
- package/dist/translations/server.d.ts +40 -4
- package/dist/translations/server.d.ts.map +1 -1
- package/package.json +6 -3
- package/dist/api/axios/axiosInstance.d.ts +0 -2
- package/dist/api/axios/axiosInstance.d.ts.map +0 -1
- package/dist/api/axios/axiosInstance.js +0 -8
- package/dist/api/client.d.ts +0 -30
- package/dist/api/client.d.ts.map +0 -1
- package/dist/api/client.js +0 -82
- package/dist/api/index.d.ts +0 -2
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -0
- package/dist/api/lib/serverActions.d.ts +0 -338
- package/dist/api/lib/serverActions.d.ts.map +0 -1
- package/dist/api/lib/serverActions.js +0 -1517
- package/dist/api/root.d.ts +0 -19
- package/dist/api/root.d.ts.map +0 -1
- package/dist/api/root.js +0 -50
- package/dist/api/routers/accountSettings.d.ts +0 -66
- package/dist/api/routers/accountSettings.d.ts.map +0 -1
- package/dist/api/routers/accountSettings.js +0 -202
- package/dist/api/routers/admins.d.ts +0 -112
- package/dist/api/routers/admins.d.ts.map +0 -1
- package/dist/api/routers/admins.js +0 -323
- package/dist/api/routers/auth.d.ts +0 -54
- package/dist/api/routers/auth.d.ts.map +0 -1
- package/dist/api/routers/auth.js +0 -50
- package/dist/api/routers/categorySection.d.ts +0 -105
- package/dist/api/routers/categorySection.d.ts.map +0 -1
- package/dist/api/routers/categorySection.js +0 -49
- package/dist/api/routers/config.d.ts +0 -48
- package/dist/api/routers/config.d.ts.map +0 -1
- package/dist/api/routers/config.js +0 -18
- package/dist/api/routers/cpanel.d.ts +0 -82
- package/dist/api/routers/cpanel.d.ts.map +0 -1
- package/dist/api/routers/cpanel.js +0 -216
- package/dist/api/routers/fields.d.ts +0 -35
- package/dist/api/routers/fields.d.ts.map +0 -1
- package/dist/api/routers/fields.js +0 -81
- package/dist/api/routers/files.d.ts +0 -34
- package/dist/api/routers/files.d.ts.map +0 -1
- package/dist/api/routers/files.js +0 -14
- package/dist/api/routers/gallery.d.ts +0 -35
- package/dist/api/routers/gallery.d.ts.map +0 -1
- package/dist/api/routers/gallery.js +0 -92
- package/dist/api/routers/hasItemsSection.d.ts +0 -194
- package/dist/api/routers/hasItemsSection.d.ts.map +0 -1
- package/dist/api/routers/hasItemsSection.js +0 -86
- package/dist/api/routers/logs.d.ts +0 -59
- package/dist/api/routers/logs.d.ts.map +0 -1
- package/dist/api/routers/logs.js +0 -76
- package/dist/api/routers/navigation.d.ts +0 -50
- package/dist/api/routers/navigation.d.ts.map +0 -1
- package/dist/api/routers/navigation.js +0 -11
- package/dist/api/routers/simpleSection.d.ts +0 -93
- package/dist/api/routers/simpleSection.d.ts.map +0 -1
- package/dist/api/routers/simpleSection.js +0 -54
- package/dist/api/server.d.ts +0 -2748
- package/dist/api/server.d.ts.map +0 -1
- package/dist/api/server.js +0 -100
- package/dist/api/trpc/error-logging.d.ts +0 -14
- package/dist/api/trpc/error-logging.d.ts.map +0 -1
- package/dist/api/trpc/error-logging.js +0 -75
- package/dist/api/trpc.d.ts +0 -111
- package/dist/api/trpc.d.ts.map +0 -1
- package/dist/api/trpc.js +0 -99
- package/dist/api/utils/async-caller-proxy.d.ts +0 -2
- package/dist/api/utils/async-caller-proxy.d.ts.map +0 -1
- package/dist/api/utils/async-caller-proxy.js +0 -36
- package/dist/api/utils/lazy-caller-proxy.d.ts +0 -2
- package/dist/api/utils/lazy-caller-proxy.d.ts.map +0 -1
- package/dist/api/utils/lazy-caller-proxy.js +0 -36
- package/dist/api/utils/router-types.d.ts +0 -7
- package/dist/api/utils/router-types.d.ts.map +0 -1
- package/dist/api/utils/router-types.js +0 -0
- package/dist/auth/axios/axiosInstance.d.ts +0 -2
- package/dist/auth/axios/axiosInstance.d.ts.map +0 -1
- package/dist/auth/axios/axiosInstance.js +0 -8
- package/dist/auth/hooks/useAxiosPrivate.d.ts +0 -5
- package/dist/auth/hooks/useAxiosPrivate.d.ts.map +0 -1
- package/dist/auth/hooks/useAxiosPrivate.js +0 -74
- package/dist/auth/trpc.d.ts +0 -6
- package/dist/auth/trpc.d.ts.map +0 -1
- package/dist/auth/trpc.js +0 -81
- package/dist/plugins/manifest.d.ts +0 -28
- package/dist/plugins/manifest.d.ts.map +0 -1
- package/dist/plugins/manifest.js +0 -83
- package/dist/plugins/registry.d.ts +0 -22
- package/dist/plugins/registry.d.ts.map +0 -1
- package/dist/plugins/registry.js +0 -25
- package/dist/utils/log.d.ts +0 -18
- package/dist/utils/log.d.ts.map +0 -1
- package/dist/utils/log.js +0 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/update-sections.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-sections.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/update-sections.ts"],"names":[],"mappings":"AAumFA,wBAAsB,cAAc,CAAC,SAAS,UAAQ,iBAoBrD"}
|
|
@@ -1186,38 +1186,63 @@ const main = async (spinnerObject) => {
|
|
|
1186
1186
|
fields: getLocalizedAssetFields(s.fieldConfigs),
|
|
1187
1187
|
});
|
|
1188
1188
|
if (s.db.table.endsWith(RESERVED_TABLE_SUFFIX)) {
|
|
1189
|
-
configurationErrors.push(
|
|
1189
|
+
configurationErrors.push({
|
|
1190
|
+
kind: 'reservedLocalizationName',
|
|
1191
|
+
message: `Section '${s.name}': table name '${s.db.table}' ends with reserved suffix '${RESERVED_TABLE_SUFFIX}'.`,
|
|
1192
|
+
});
|
|
1190
1193
|
}
|
|
1191
1194
|
for (const field of s.fields) {
|
|
1192
1195
|
if (field.name === RESERVED_COLUMN_NAME) {
|
|
1193
|
-
configurationErrors.push(
|
|
1196
|
+
configurationErrors.push({
|
|
1197
|
+
kind: 'reservedLocalizationName',
|
|
1198
|
+
message: `Section '${s.name}', field '${field.name}': field name '${RESERVED_COLUMN_NAME}' is reserved.`,
|
|
1199
|
+
});
|
|
1194
1200
|
}
|
|
1195
1201
|
if (field.destinationDb) {
|
|
1196
1202
|
if (field.destinationDb.table.endsWith(RESERVED_TABLE_SUFFIX)) {
|
|
1197
|
-
configurationErrors.push(
|
|
1203
|
+
configurationErrors.push({
|
|
1204
|
+
kind: 'reservedLocalizationName',
|
|
1205
|
+
message: `Section '${s.name}', field '${field.name}': destinationDb.table '${field.destinationDb.table}' ends with reserved suffix '${RESERVED_TABLE_SUFFIX}'.`,
|
|
1206
|
+
});
|
|
1198
1207
|
}
|
|
1199
1208
|
if (field.destinationDb.itemIdentifier === RESERVED_COLUMN_NAME ||
|
|
1200
1209
|
field.destinationDb.selectIdentifier === RESERVED_COLUMN_NAME) {
|
|
1201
|
-
configurationErrors.push(
|
|
1210
|
+
configurationErrors.push({
|
|
1211
|
+
kind: 'reservedLocalizationName',
|
|
1212
|
+
message: `Section '${s.name}', field '${field.name}': destinationDb identifier column name '${RESERVED_COLUMN_NAME}' is reserved.`,
|
|
1213
|
+
});
|
|
1202
1214
|
}
|
|
1203
1215
|
}
|
|
1204
1216
|
if (isExternalSelectDbField(field)) {
|
|
1205
1217
|
const ownerSectionName = managedSectionTables.get(field.db.table);
|
|
1206
1218
|
if (ownerSectionName) {
|
|
1207
|
-
configurationErrors.push(
|
|
1219
|
+
configurationErrors.push({
|
|
1220
|
+
kind: 'managedSectionTable',
|
|
1221
|
+
message: `Section '${s.name}', field '${field.name}': db.table '${field.db.table}' belongs to managed section '${ownerSectionName}'. Use the 'section' prop instead of 'db' so update-sections does not treat the section table as an external lookup table.`,
|
|
1222
|
+
});
|
|
1223
|
+
continue;
|
|
1208
1224
|
}
|
|
1209
1225
|
if (field.db.table.endsWith(RESERVED_TABLE_SUFFIX)) {
|
|
1210
|
-
configurationErrors.push(
|
|
1226
|
+
configurationErrors.push({
|
|
1227
|
+
kind: 'reservedLocalizationName',
|
|
1228
|
+
message: `Section '${s.name}', field '${field.name}': db.table '${field.db.table}' ends with reserved suffix '${RESERVED_TABLE_SUFFIX}'.`,
|
|
1229
|
+
});
|
|
1211
1230
|
}
|
|
1212
1231
|
const reservedColumns = [field.db.identifier, field.db.label, field.db.orderBy].filter((column) => column === RESERVED_COLUMN_NAME);
|
|
1213
1232
|
if (reservedColumns.length > 0) {
|
|
1214
|
-
configurationErrors.push(
|
|
1233
|
+
configurationErrors.push({
|
|
1234
|
+
kind: 'reservedLocalizationName',
|
|
1235
|
+
message: `Section '${s.name}', field '${field.name}': db column name '${RESERVED_COLUMN_NAME}' is reserved.`,
|
|
1236
|
+
});
|
|
1215
1237
|
}
|
|
1216
1238
|
}
|
|
1217
1239
|
}
|
|
1218
1240
|
const galleryForValidation = await s.getGallery();
|
|
1219
1241
|
if (galleryForValidation?.db.tableName && galleryForValidation.db.tableName.endsWith(RESERVED_TABLE_SUFFIX)) {
|
|
1220
|
-
configurationErrors.push(
|
|
1242
|
+
configurationErrors.push({
|
|
1243
|
+
kind: 'reservedLocalizationName',
|
|
1244
|
+
message: `Section '${s.name}': gallery table '${galleryForValidation.db.tableName}' ends with reserved suffix '${RESERVED_TABLE_SUFFIX}'.`,
|
|
1245
|
+
});
|
|
1221
1246
|
}
|
|
1222
1247
|
/**
|
|
1223
1248
|
* Generate the Drizzle schema for the table
|
|
@@ -1539,9 +1564,17 @@ const main = async (spinnerObject) => {
|
|
|
1539
1564
|
* Reject the run before schema writes if any section configuration is unsafe.
|
|
1540
1565
|
*/
|
|
1541
1566
|
if (configurationErrors.length > 0) {
|
|
1567
|
+
const guidance = [];
|
|
1568
|
+
if (configurationErrors.some((error) => error.kind === 'reservedLocalizationName')) {
|
|
1569
|
+
guidance.push(`The suffix '${RESERVED_TABLE_SUFFIX}' and the column name '${RESERVED_COLUMN_NAME}' are reserved for the localization system.`);
|
|
1570
|
+
}
|
|
1571
|
+
if (configurationErrors.some((error) => error.kind === 'managedSectionTable')) {
|
|
1572
|
+
guidance.push(`Section-managed tables must be referenced with the 'section' prop.`);
|
|
1573
|
+
}
|
|
1574
|
+
guidance.push('Please update cms.config.ts and re-run.');
|
|
1542
1575
|
spinnerObject.stop(`update-sections aborted: ${configurationErrors.length} configuration conflict(s) detected.\n` +
|
|
1543
|
-
configurationErrors.map((
|
|
1544
|
-
`\n\
|
|
1576
|
+
configurationErrors.map((error) => ` - ${error.message}`).join('\n') +
|
|
1577
|
+
`\n\n${guidance.join(' ')}`);
|
|
1545
1578
|
throw new Error('update-sections: configuration conflicts detected');
|
|
1546
1579
|
}
|
|
1547
1580
|
/**
|