nextjs-cms 0.9.30 → 0.9.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +279 -279
  3. package/dist/api/actions/pages.d.ts +3 -3
  4. package/dist/api/client.d.ts +30 -0
  5. package/dist/api/client.d.ts.map +1 -0
  6. package/dist/api/client.js +82 -0
  7. package/dist/api/index.d.ts +1 -974
  8. package/dist/api/index.d.ts.map +1 -1
  9. package/dist/api/index.js +0 -13
  10. package/dist/api/lib/serverActions.d.ts +13 -49
  11. package/dist/api/lib/serverActions.d.ts.map +1 -1
  12. package/dist/api/lib/serverActions.js +103 -31
  13. package/dist/api/root.d.ts +18 -1916
  14. package/dist/api/root.d.ts.map +1 -1
  15. package/dist/api/root.js +18 -83
  16. package/dist/api/routers/config.d.ts.map +1 -1
  17. package/dist/api/routers/gallery.d.ts +1 -0
  18. package/dist/api/routers/gallery.d.ts.map +1 -1
  19. package/dist/api/routers/gallery.js +36 -8
  20. package/dist/api/routers/hasItemsSection.d.ts +5 -30
  21. package/dist/api/routers/hasItemsSection.d.ts.map +1 -1
  22. package/dist/api/routers/navigation.d.ts +3 -3
  23. package/dist/api/routers/simpleSection.d.ts +3 -15
  24. package/dist/api/routers/simpleSection.d.ts.map +1 -1
  25. package/dist/api/server.d.ts +2748 -0
  26. package/dist/api/server.d.ts.map +1 -0
  27. package/dist/api/server.js +100 -0
  28. package/dist/api/trpc/error-logging.d.ts +14 -0
  29. package/dist/api/trpc/error-logging.d.ts.map +1 -0
  30. package/dist/api/trpc/error-logging.js +75 -0
  31. package/dist/api/trpc/root.d.ts +3 -3
  32. package/dist/api/trpc/root.d.ts.map +1 -1
  33. package/dist/api/trpc/routers/config.d.ts.map +1 -1
  34. package/dist/api/trpc/routers/hasItemsSection.d.ts.map +1 -1
  35. package/dist/api/trpc/routers/navigation.d.ts +3 -3
  36. package/dist/api/trpc/routers/simpleSection.d.ts.map +1 -1
  37. package/dist/api/trpc/server.d.ts +9 -9
  38. package/dist/api/trpc/server.d.ts.map +1 -1
  39. package/dist/api/utils/async-caller-proxy.d.ts +2 -0
  40. package/dist/api/utils/async-caller-proxy.d.ts.map +1 -0
  41. package/dist/api/utils/async-caller-proxy.js +36 -0
  42. package/dist/api/utils/lazy-caller-proxy.d.ts +2 -0
  43. package/dist/api/utils/lazy-caller-proxy.d.ts.map +1 -0
  44. package/dist/api/utils/lazy-caller-proxy.js +36 -0
  45. package/dist/api/utils/router-types.d.ts +7 -0
  46. package/dist/api/utils/router-types.d.ts.map +1 -0
  47. package/dist/api/utils/router-types.js +0 -0
  48. package/dist/auth/trpc.d.ts +1 -1
  49. package/dist/auth/trpc.d.ts.map +1 -1
  50. package/dist/auth/trpc.js +0 -1
  51. package/dist/cli/lib/db-config.js +10 -10
  52. package/dist/cli/lib/update-sections.d.ts.map +1 -1
  53. package/dist/cli/lib/update-sections.js +29 -24
  54. package/dist/core/config/config-loader.d.ts +2 -2
  55. package/dist/core/db/table-checker/MysqlTable.js +10 -10
  56. package/dist/core/factories/section-factory-with-esbuild.js +9 -9
  57. package/dist/core/factories/section-factory-with-jiti.js +9 -9
  58. package/dist/core/sections/category.d.ts +2 -2
  59. package/dist/core/sections/hasItems.d.ts +2 -2
  60. package/dist/core/sections/section.d.ts +2 -2
  61. package/dist/core/sections/simple.d.ts +2 -2
  62. package/dist/plugins/loader.d.ts +3 -1
  63. package/dist/plugins/loader.d.ts.map +1 -1
  64. package/dist/plugins/loader.js +28 -6
  65. package/dist/plugins/manifest.d.ts +28 -0
  66. package/dist/plugins/manifest.d.ts.map +1 -0
  67. package/dist/plugins/manifest.js +83 -0
  68. package/dist/plugins/registry.d.ts +22 -0
  69. package/dist/plugins/registry.d.ts.map +1 -0
  70. package/dist/plugins/registry.js +25 -0
  71. package/dist/translations/base/en.d.ts +6 -0
  72. package/dist/translations/base/en.d.ts.map +1 -1
  73. package/dist/translations/base/en.js +6 -0
  74. package/dist/translations/client.d.ts +76 -4
  75. package/dist/translations/client.d.ts.map +1 -1
  76. package/dist/translations/server.d.ts +76 -4
  77. package/dist/translations/server.d.ts.map +1 -1
  78. package/dist/utils/log.d.ts +18 -0
  79. package/dist/utils/log.d.ts.map +1 -0
  80. package/dist/utils/log.js +28 -0
  81. package/package.json +1 -1
  82. package/dist/core/fields/dateRange.d.ts +0 -115
  83. package/dist/core/fields/dateRange.d.ts.map +0 -1
  84. package/dist/core/fields/dateRange.js +0 -149
  85. package/dist/translations/locale-cookie.d.ts +0 -24
  86. package/dist/translations/locale-cookie.d.ts.map +0 -1
  87. package/dist/translations/locale-cookie.js +0 -44
  88. package/dist/translations/locale-utils.d.ts +0 -8
  89. package/dist/translations/locale-utils.d.ts.map +0 -1
  90. package/dist/translations/locale-utils.js +0 -11
  91. package/dist/translations/localization.d.ts +0 -40
  92. package/dist/translations/localization.d.ts.map +0 -1
  93. package/dist/translations/localization.js +0 -48
  94. package/dist/validators/dateRange.d.ts +0 -11
  95. package/dist/validators/dateRange.d.ts.map +0 -1
  96. package/dist/validators/dateRange.js +0 -16
@@ -22,12 +22,12 @@ export class MysqlTableChecker extends DbTableChecker {
22
22
  return _tables;
23
23
  }
24
24
  static async getColumns(tableName) {
25
- const statement = sql `
26
- SELECT COLUMN_NAME
27
- FROM information_schema.COLUMNS c
28
- inner join information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME
29
- WHERE t.TABLE_SCHEMA = DATABASE()
30
- AND c.TABLE_SCHEMA = DATABASE()
25
+ const statement = sql `
26
+ SELECT COLUMN_NAME
27
+ FROM information_schema.COLUMNS c
28
+ inner join information_schema.TABLES t ON t.TABLE_NAME = c.TABLE_NAME
29
+ WHERE t.TABLE_SCHEMA = DATABASE()
30
+ AND c.TABLE_SCHEMA = DATABASE()
31
31
  AND t.TABLE_NAME = ${tableName}`;
32
32
  const _cols = [];
33
33
  const _res = await db.execute(statement);
@@ -84,10 +84,10 @@ export class MysqlTableChecker extends DbTableChecker {
84
84
  fullTextKeys.push({ name: key, columns: _fullTextKeyMap[key] });
85
85
  }
86
86
  // Foreign keys should be retrieved from information_schema
87
- const [foreignKeys] = await db.execute(sql `
88
- SELECT COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
89
- FROM information_schema.KEY_COLUMN_USAGE
90
- WHERE TABLE_NAME = ${table} AND CONSTRAINT_NAME != 'PRIMARY' AND REFERENCED_TABLE_NAME IS NOT NULL;
87
+ const [foreignKeys] = await db.execute(sql `
88
+ SELECT COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
89
+ FROM information_schema.KEY_COLUMN_USAGE
90
+ WHERE TABLE_NAME = ${table} AND CONSTRAINT_NAME != 'PRIMARY' AND REFERENCED_TABLE_NAME IS NOT NULL;
91
91
  `);
92
92
  return { primaryKeys, uniqueKeys, indexKeys, foreignKeys, fullTextKeys };
93
93
  }
@@ -460,15 +460,15 @@ export class SectionFactory {
460
460
  importErr.message.includes('Cannot find module') &&
461
461
  importErr.message.includes('.section')) {
462
462
  this.sectionProcessingErrors[file] ??= [];
463
- this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
464
-
465
- Sections MUST use extensionless relative imports:
466
-
467
- ✅ import exampleSection from './example.section'
468
- ❌ import exampleSection from './example.section.ts'
469
- ❌ import exampleSection from './example.section.js'
470
-
471
- This file is bundled with esbuild, so Node never resolves the import directly.
463
+ this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
464
+
465
+ Sections MUST use extensionless relative imports:
466
+
467
+ ✅ import exampleSection from './example.section'
468
+ ❌ import exampleSection from './example.section.ts'
469
+ ❌ import exampleSection from './example.section.js'
470
+
471
+ This file is bundled with esbuild, so Node never resolves the import directly.
472
472
  If you added an extension manually, remove it.`);
473
473
  this.errorCount++;
474
474
  continue;
@@ -417,15 +417,15 @@ export class SectionFactory {
417
417
  importErr.message.includes('Cannot find module') &&
418
418
  importErr.message.includes('.section')) {
419
419
  this.sectionProcessingErrors[file] ??= [];
420
- this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
421
-
422
- Sections MUST use extensionless relative imports:
423
-
424
- ✅ import exampleSection from './example.section'
425
- ❌ import exampleSection from './example.section.ts'
426
- ❌ import exampleSection from './example.section.js'
427
-
428
- This file is bundled with jiti, so Node never resolves the import directly.
420
+ this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
421
+
422
+ Sections MUST use extensionless relative imports:
423
+
424
+ ✅ import exampleSection from './example.section'
425
+ ❌ import exampleSection from './example.section.ts'
426
+ ❌ import exampleSection from './example.section.js'
427
+
428
+ This file is bundled with jiti, so Node never resolves the import directly.
429
429
  If you added an extension manually, remove it.`);
430
430
  this.errorCount++;
431
431
  continue;