nextjs-cms 0.9.36 → 0.9.38
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/LICENSE +21 -21
- package/README.md +279 -279
- package/dist/api/actions/files.d.ts.map +1 -1
- package/dist/api/actions/pages.d.ts +4 -3
- package/dist/api/actions/pages.d.ts.map +1 -1
- package/dist/api/actions/pages.js +1 -0
- package/dist/api/index.d.ts +974 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +13 -0
- package/dist/api/lib/serverActions.d.ts +49 -13
- package/dist/api/lib/serverActions.d.ts.map +1 -1
- package/dist/api/lib/serverActions.js +31 -103
- package/dist/api/root.d.ts +1916 -18
- package/dist/api/root.d.ts.map +1 -1
- package/dist/api/root.js +83 -18
- package/dist/api/routers/config.d.ts.map +1 -1
- package/dist/api/routers/gallery.d.ts +0 -1
- package/dist/api/routers/gallery.d.ts.map +1 -1
- package/dist/api/routers/gallery.js +8 -36
- package/dist/api/routers/hasItemsSection.d.ts +30 -5
- package/dist/api/routers/hasItemsSection.d.ts.map +1 -1
- package/dist/api/routers/navigation.d.ts +3 -3
- package/dist/api/routers/simpleSection.d.ts +15 -3
- package/dist/api/routers/simpleSection.d.ts.map +1 -1
- package/dist/api/trpc/root.d.ts +41 -7
- package/dist/api/trpc/root.d.ts.map +1 -1
- package/dist/api/trpc/routers/config.d.ts.map +1 -1
- package/dist/api/trpc/routers/hasItemsSection.d.ts.map +1 -1
- package/dist/api/trpc/routers/logs.d.ts +37 -4
- package/dist/api/trpc/routers/logs.d.ts.map +1 -1
- package/dist/api/trpc/routers/logs.js +92 -43
- package/dist/api/trpc/routers/navigation.d.ts +4 -3
- package/dist/api/trpc/routers/navigation.d.ts.map +1 -1
- package/dist/api/trpc/routers/simpleSection.d.ts.map +1 -1
- package/dist/api/trpc/server.d.ts +123 -21
- package/dist/api/trpc/server.d.ts.map +1 -1
- package/dist/auth/trpc.d.ts +1 -1
- package/dist/auth/trpc.d.ts.map +1 -1
- package/dist/auth/trpc.js +1 -0
- package/dist/cli/lib/db-config.js +10 -10
- package/dist/cli/lib/update-sections.d.ts.map +1 -1
- package/dist/cli/lib/update-sections.js +67 -34
- package/dist/core/config/config-loader.d.ts +2 -2
- package/dist/core/db/table-checker/MysqlTable.js +10 -10
- package/dist/core/factories/section-factory-with-esbuild.js +9 -9
- package/dist/core/factories/section-factory-with-jiti.js +9 -9
- package/dist/core/fields/date-range.d.ts +4 -4
- package/dist/core/fields/dateRange.d.ts +115 -0
- package/dist/core/fields/dateRange.d.ts.map +1 -0
- package/dist/core/fields/dateRange.js +149 -0
- 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/logging/event-labels.d.ts +11 -0
- package/dist/logging/event-labels.d.ts.map +1 -0
- package/dist/logging/event-labels.js +14 -0
- package/dist/logging/log.d.ts +1 -1
- package/dist/logging/log.d.ts.map +1 -1
- package/dist/translations/base/en.d.ts +36 -0
- package/dist/translations/base/en.d.ts.map +1 -1
- package/dist/translations/base/en.js +36 -0
- package/dist/translations/client.d.ts +436 -4
- package/dist/translations/client.d.ts.map +1 -1
- package/dist/translations/locale-cookie.d.ts +24 -0
- package/dist/translations/locale-cookie.d.ts.map +1 -0
- package/dist/translations/locale-cookie.js +44 -0
- package/dist/translations/locale-utils.d.ts +8 -0
- package/dist/translations/locale-utils.d.ts.map +1 -0
- package/dist/translations/locale-utils.js +11 -0
- package/dist/translations/localization.d.ts +40 -0
- package/dist/translations/localization.d.ts.map +1 -0
- package/dist/translations/localization.js +48 -0
- package/dist/translations/server.d.ts +436 -4
- package/dist/translations/server.d.ts.map +1 -1
- package/dist/validators/dateRange.d.ts +11 -0
- package/dist/validators/dateRange.d.ts.map +1 -0
- package/dist/validators/dateRange.js +16 -0
- package/package.json +10 -3
- 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/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/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/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
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LogEventType } from './log.js';
|
|
2
|
+
export type EventCategory = 'auth' | 'content' | 'admin';
|
|
3
|
+
type EventLabel = {
|
|
4
|
+
labelKey: string;
|
|
5
|
+
category: EventCategory;
|
|
6
|
+
};
|
|
7
|
+
export declare const EVENT_LABELS: Record<LogEventType, EventLabel>;
|
|
8
|
+
export declare const getEventLabelKey: (eventType: string) => string;
|
|
9
|
+
export declare const getEventCategory: (eventType: string) => EventCategory;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=event-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-labels.d.ts","sourceRoot":"","sources":["../../src/logging/event-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAExD,KAAK,UAAU,GAAG;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,aAAa,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAWzD,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,KAAG,MAC6B,CAAA;AAElF,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,KAAG,aAC6B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const EVENT_LABELS = {
|
|
2
|
+
'auth.login': { labelKey: 'eventAuthLogin', category: 'auth' },
|
|
3
|
+
'auth.logout': { labelKey: 'eventAuthLogout', category: 'auth' },
|
|
4
|
+
'section.item.create': { labelKey: 'eventItemCreate', category: 'content' },
|
|
5
|
+
'section.item.update': { labelKey: 'eventItemUpdate', category: 'content' },
|
|
6
|
+
'section.item.delete': { labelKey: 'eventItemDelete', category: 'content' },
|
|
7
|
+
'section.item.locale.delete': { labelKey: 'eventItemLocaleDelete', category: 'content' },
|
|
8
|
+
'admin.section.create': { labelKey: 'eventAdminSectionCreate', category: 'admin' },
|
|
9
|
+
'admin.section.update': { labelKey: 'eventAdminSectionUpdate', category: 'admin' },
|
|
10
|
+
'admin.section.delete': { labelKey: 'eventAdminSectionDelete', category: 'admin' },
|
|
11
|
+
'admin.settings.change': { labelKey: 'eventAdminSettingsChange', category: 'admin' },
|
|
12
|
+
};
|
|
13
|
+
export const getEventLabelKey = (eventType) => EVENT_LABELS[eventType]?.labelKey ?? eventType;
|
|
14
|
+
export const getEventCategory = (eventType) => EVENT_LABELS[eventType]?.category ?? 'content';
|
package/dist/logging/log.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type LogEventType = 'auth.login' | 'auth.logout' | 'section.item.create' | 'section.item.update' | 'section.item.delete' | 'section.item.locale.delete' | 'admin.section.create' | 'admin.section.update' | 'admin.section.delete' | 'admin.
|
|
1
|
+
export type LogEventType = 'auth.login' | 'auth.logout' | 'section.item.create' | 'section.item.update' | 'section.item.delete' | 'section.item.locale.delete' | 'admin.section.create' | 'admin.section.update' | 'admin.section.delete' | 'admin.settings.change';
|
|
2
2
|
export type RequestMetadata = {
|
|
3
3
|
ipAddress?: string | null;
|
|
4
4
|
userAgent?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/logging/log.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAClB,YAAY,GACZ,aAAa,GACb,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,4BAA4B,GAC5B,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/logging/log.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAClB,YAAY,GACZ,aAAa,GACb,qBAAqB,GACrB,qBAAqB,GACrB,qBAAqB,GACrB,4BAA4B,GAC5B,sBAAsB,GACtB,sBAAsB,GACtB,sBAAsB,GACtB,uBAAuB,CAAA;AAE7B,MAAM,MAAM,eAAe,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACnB,SAAS,EAAE,YAAY,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,eAAe,CAAC,EAAE,eAAe,CAAA;CACpC,CAAA;AAcD,eAAO,MAAM,6BAA6B,GAAI,UAAU,OAAO,GAAG,IAAI,KAAG,eAaxE,CAAA;AAED,eAAO,MAAM,SAAS,GAAU,OAAO,QAAQ,KAAG,OAAO,CAAC,IAAI,CAqB7D,CAAA"}
|
|
@@ -84,6 +84,7 @@ declare const _default: {
|
|
|
84
84
|
readonly profilePhotoChanged: "Profile photo changed";
|
|
85
85
|
readonly profilePhotoChangedError: "Error changing profile photo";
|
|
86
86
|
readonly error: "Error";
|
|
87
|
+
readonly important: "Important";
|
|
87
88
|
readonly about: "About";
|
|
88
89
|
readonly aboutText: "Get to know the academy and Dr. Salam Asaad";
|
|
89
90
|
readonly profile: "Profile";
|
|
@@ -261,6 +262,39 @@ declare const _default: {
|
|
|
261
262
|
readonly emailAddress: "Email Address";
|
|
262
263
|
readonly log: "Log";
|
|
263
264
|
readonly logs: "Logs";
|
|
265
|
+
readonly logsDescription: "Audit trail of actions performed in the CMS";
|
|
266
|
+
readonly time: "Time";
|
|
267
|
+
readonly event: "Event";
|
|
268
|
+
readonly actor: "Actor";
|
|
269
|
+
readonly target: "Target";
|
|
270
|
+
readonly type: "Type";
|
|
271
|
+
readonly deletedAccount: "deleted account";
|
|
272
|
+
readonly filterByEvent: "Event type";
|
|
273
|
+
readonly filterBySection: "Section";
|
|
274
|
+
readonly filterByActor: "Actor";
|
|
275
|
+
readonly dateRange: "Date range";
|
|
276
|
+
readonly from: "From";
|
|
277
|
+
readonly to: "To";
|
|
278
|
+
readonly allEvents: "All events";
|
|
279
|
+
readonly allSections: "All sections";
|
|
280
|
+
readonly allActors: "All actors";
|
|
281
|
+
readonly reset: "Reset";
|
|
282
|
+
readonly loadMore: "Load more";
|
|
283
|
+
readonly showingCount: "Showing {count}";
|
|
284
|
+
readonly ipAddress: "IP address";
|
|
285
|
+
readonly userAgent: "User agent";
|
|
286
|
+
readonly requestInfo: "Request info";
|
|
287
|
+
readonly metadata: "Metadata";
|
|
288
|
+
readonly eventAuthLogin: "Signed in";
|
|
289
|
+
readonly eventAuthLogout: "Signed out";
|
|
290
|
+
readonly eventItemCreate: "Created item";
|
|
291
|
+
readonly eventItemUpdate: "Updated item";
|
|
292
|
+
readonly eventItemDelete: "Deleted item";
|
|
293
|
+
readonly eventItemLocaleDelete: "Deleted translation";
|
|
294
|
+
readonly eventAdminSectionCreate: "Created section";
|
|
295
|
+
readonly eventAdminSectionUpdate: "Updated permissions";
|
|
296
|
+
readonly eventAdminSectionDelete: "Deleted section";
|
|
297
|
+
readonly eventAdminSettingsChange: "Changed settings";
|
|
264
298
|
readonly select: "Select";
|
|
265
299
|
readonly selectOptions: "Select options";
|
|
266
300
|
readonly settings: "Settings";
|
|
@@ -463,6 +497,7 @@ declare const _default: {
|
|
|
463
497
|
readonly searchDots: "Search...";
|
|
464
498
|
readonly noItemFound: "No item found";
|
|
465
499
|
readonly searchOptionsDots: "Search options...";
|
|
500
|
+
readonly revert: "Revert";
|
|
466
501
|
readonly availableOptions: "Available options";
|
|
467
502
|
readonly searchThroughOptions: "Search through available options";
|
|
468
503
|
readonly filterOptionsHint: "Type to filter options. Use arrow keys to navigate results.";
|
|
@@ -472,6 +507,7 @@ declare const _default: {
|
|
|
472
507
|
readonly logo: "Logo";
|
|
473
508
|
readonly newImage: "New image";
|
|
474
509
|
readonly autoGeneratedFromLinkedField: "Auto-generated from linked field";
|
|
510
|
+
readonly slugChangeWarning: "Changing this slug may affect places where this item is already referenced. For example, existing shared URLs, links, redirects, integrations, or saved bookmarks may stop pointing to the expected item.";
|
|
475
511
|
readonly clear: "Clear";
|
|
476
512
|
readonly close: "Close";
|
|
477
513
|
readonly clearAllSelectedOptions: "Clear all {count} selected options";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/translations/base/en.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/translations/base/en.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAijBU"}
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
profilePhotoChanged: 'Profile photo changed',
|
|
85
85
|
profilePhotoChangedError: 'Error changing profile photo',
|
|
86
86
|
error: 'Error',
|
|
87
|
+
important: 'Important',
|
|
87
88
|
about: 'About',
|
|
88
89
|
aboutText: 'Get to know the academy and Dr. Salam Asaad',
|
|
89
90
|
profile: 'Profile',
|
|
@@ -261,6 +262,39 @@ export default {
|
|
|
261
262
|
emailAddress: 'Email Address',
|
|
262
263
|
log: 'Log',
|
|
263
264
|
logs: 'Logs',
|
|
265
|
+
logsDescription: 'Audit trail of actions performed in the CMS',
|
|
266
|
+
time: 'Time',
|
|
267
|
+
event: 'Event',
|
|
268
|
+
actor: 'Actor',
|
|
269
|
+
target: 'Target',
|
|
270
|
+
type: 'Type',
|
|
271
|
+
deletedAccount: 'deleted account',
|
|
272
|
+
filterByEvent: 'Event type',
|
|
273
|
+
filterBySection: 'Section',
|
|
274
|
+
filterByActor: 'Actor',
|
|
275
|
+
dateRange: 'Date range',
|
|
276
|
+
from: 'From',
|
|
277
|
+
to: 'To',
|
|
278
|
+
allEvents: 'All events',
|
|
279
|
+
allSections: 'All sections',
|
|
280
|
+
allActors: 'All actors',
|
|
281
|
+
reset: 'Reset',
|
|
282
|
+
loadMore: 'Load more',
|
|
283
|
+
showingCount: 'Showing {count}',
|
|
284
|
+
ipAddress: 'IP address',
|
|
285
|
+
userAgent: 'User agent',
|
|
286
|
+
requestInfo: 'Request info',
|
|
287
|
+
metadata: 'Metadata',
|
|
288
|
+
eventAuthLogin: 'Signed in',
|
|
289
|
+
eventAuthLogout: 'Signed out',
|
|
290
|
+
eventItemCreate: 'Created item',
|
|
291
|
+
eventItemUpdate: 'Updated item',
|
|
292
|
+
eventItemDelete: 'Deleted item',
|
|
293
|
+
eventItemLocaleDelete: 'Deleted translation',
|
|
294
|
+
eventAdminSectionCreate: 'Created section',
|
|
295
|
+
eventAdminSectionUpdate: 'Updated permissions',
|
|
296
|
+
eventAdminSectionDelete: 'Deleted section',
|
|
297
|
+
eventAdminSettingsChange: 'Changed settings',
|
|
264
298
|
select: 'Select',
|
|
265
299
|
selectOptions: 'Select options',
|
|
266
300
|
settings: 'Settings',
|
|
@@ -477,6 +511,7 @@ export default {
|
|
|
477
511
|
searchDots: 'Search...',
|
|
478
512
|
noItemFound: 'No item found',
|
|
479
513
|
searchOptionsDots: 'Search options...',
|
|
514
|
+
revert: 'Revert',
|
|
480
515
|
availableOptions: 'Available options',
|
|
481
516
|
searchThroughOptions: 'Search through available options',
|
|
482
517
|
filterOptionsHint: 'Type to filter options. Use arrow keys to navigate results.',
|
|
@@ -486,6 +521,7 @@ export default {
|
|
|
486
521
|
logo: 'Logo',
|
|
487
522
|
newImage: 'New image',
|
|
488
523
|
autoGeneratedFromLinkedField: 'Auto-generated from linked field',
|
|
524
|
+
slugChangeWarning: 'Changing this slug may affect places where this item is already referenced. For example, existing shared URLs, links, redirects, integrations, or saved bookmarks may stop pointing to the expected item.',
|
|
489
525
|
clear: 'Clear',
|
|
490
526
|
close: 'Close',
|
|
491
527
|
clearAllSelectedOptions: 'Clear all {count} selected options',
|