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.
- package/LICENSE +21 -21
- package/README.md +279 -279
- package/dist/api/actions/pages.d.ts +3 -3
- package/dist/api/client.d.ts +30 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +82 -0
- package/dist/api/index.d.ts +1 -974
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +0 -13
- package/dist/api/lib/serverActions.d.ts +13 -49
- package/dist/api/lib/serverActions.d.ts.map +1 -1
- package/dist/api/lib/serverActions.js +103 -31
- package/dist/api/root.d.ts +18 -1916
- package/dist/api/root.d.ts.map +1 -1
- package/dist/api/root.js +18 -83
- package/dist/api/routers/config.d.ts.map +1 -1
- package/dist/api/routers/gallery.d.ts +1 -0
- package/dist/api/routers/gallery.d.ts.map +1 -1
- package/dist/api/routers/gallery.js +36 -8
- package/dist/api/routers/hasItemsSection.d.ts +5 -30
- 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 +3 -15
- package/dist/api/routers/simpleSection.d.ts.map +1 -1
- package/dist/api/server.d.ts +2748 -0
- package/dist/api/server.d.ts.map +1 -0
- package/dist/api/server.js +100 -0
- package/dist/api/trpc/error-logging.d.ts +14 -0
- package/dist/api/trpc/error-logging.d.ts.map +1 -0
- package/dist/api/trpc/error-logging.js +75 -0
- package/dist/api/trpc/root.d.ts +3 -3
- 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/navigation.d.ts +3 -3
- package/dist/api/trpc/routers/simpleSection.d.ts.map +1 -1
- package/dist/api/trpc/server.d.ts +9 -9
- package/dist/api/trpc/server.d.ts.map +1 -1
- package/dist/api/utils/async-caller-proxy.d.ts +2 -0
- package/dist/api/utils/async-caller-proxy.d.ts.map +1 -0
- package/dist/api/utils/async-caller-proxy.js +36 -0
- package/dist/api/utils/lazy-caller-proxy.d.ts +2 -0
- package/dist/api/utils/lazy-caller-proxy.d.ts.map +1 -0
- package/dist/api/utils/lazy-caller-proxy.js +36 -0
- package/dist/api/utils/router-types.d.ts +7 -0
- package/dist/api/utils/router-types.d.ts.map +1 -0
- package/dist/api/utils/router-types.js +0 -0
- package/dist/auth/trpc.d.ts +1 -1
- package/dist/auth/trpc.d.ts.map +1 -1
- package/dist/auth/trpc.js +0 -1
- 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 +29 -24
- 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/sections/category.d.ts +2 -2
- package/dist/core/sections/hasItems.d.ts +2 -2
- package/dist/core/sections/section.d.ts +2 -2
- package/dist/core/sections/simple.d.ts +2 -2
- package/dist/plugins/loader.d.ts +3 -1
- package/dist/plugins/loader.d.ts.map +1 -1
- package/dist/plugins/loader.js +28 -6
- package/dist/plugins/manifest.d.ts +28 -0
- package/dist/plugins/manifest.d.ts.map +1 -0
- package/dist/plugins/manifest.js +83 -0
- package/dist/plugins/registry.d.ts +22 -0
- package/dist/plugins/registry.d.ts.map +1 -0
- package/dist/plugins/registry.js +25 -0
- package/dist/translations/base/en.d.ts +6 -0
- package/dist/translations/base/en.d.ts.map +1 -1
- package/dist/translations/base/en.js +6 -0
- package/dist/translations/client.d.ts +76 -4
- package/dist/translations/client.d.ts.map +1 -1
- package/dist/translations/server.d.ts +76 -4
- package/dist/translations/server.d.ts.map +1 -1
- package/dist/utils/log.d.ts +18 -0
- package/dist/utils/log.d.ts.map +1 -0
- package/dist/utils/log.js +28 -0
- package/package.json +1 -1
- package/dist/core/fields/dateRange.d.ts +0 -115
- package/dist/core/fields/dateRange.d.ts.map +0 -1
- package/dist/core/fields/dateRange.js +0 -149
- package/dist/translations/locale-cookie.d.ts +0 -24
- package/dist/translations/locale-cookie.d.ts.map +0 -1
- package/dist/translations/locale-cookie.js +0 -44
- package/dist/translations/locale-utils.d.ts +0 -8
- package/dist/translations/locale-utils.d.ts.map +0 -1
- package/dist/translations/locale-utils.js +0 -11
- package/dist/translations/localization.d.ts +0 -40
- package/dist/translations/localization.d.ts.map +0 -1
- package/dist/translations/localization.js +0 -48
- package/dist/validators/dateRange.d.ts +0 -11
- package/dist/validators/dateRange.d.ts.map +0 -1
- 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;
|