nextjs-cms 0.8.7 → 0.8.9

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.
@@ -140,16 +140,16 @@ export async function dbConfigSetup(options) {
140
140
  /**
141
141
  * Prepare new environment variables block
142
142
  */
143
- const newEnvBlock = `
144
-
145
- ####
146
- # generated by the init script
147
- ####
148
- DB_HOST=${dbHost}
149
- DB_PORT=${dbPort}
150
- DB_NAME=${dbName}
151
- DB_USER=${dbUser}
152
- DB_PASSWORD='${dbPassword}'
143
+ const newEnvBlock = `
144
+
145
+ ####
146
+ # generated by the init script
147
+ ####
148
+ DB_HOST=${dbHost}
149
+ DB_PORT=${dbPort}
150
+ DB_NAME=${dbName}
151
+ DB_USER=${dbUser}
152
+ DB_PASSWORD='${dbPassword}'
153
153
  `;
154
154
  /**
155
155
  * Append the new credentials to the .env file
@@ -22,10 +22,10 @@ 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
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
29
  WHERE t.TABLE_NAME = ${tableName}`;
30
30
  const _cols = [];
31
31
  const _res = await db.execute(statement);
@@ -82,10 +82,10 @@ export class MysqlTableChecker extends DbTableChecker {
82
82
  fullTextKeys.push({ name: key, columns: _fullTextKeyMap[key] });
83
83
  }
84
84
  // Foreign keys should be retrieved from information_schema
85
- const [foreignKeys] = await db.execute(sql `
86
- SELECT COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
87
- FROM information_schema.KEY_COLUMN_USAGE
88
- WHERE TABLE_NAME = ${table} AND CONSTRAINT_NAME != 'PRIMARY' AND REFERENCED_TABLE_NAME IS NOT NULL;
85
+ const [foreignKeys] = await db.execute(sql `
86
+ SELECT COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
87
+ FROM information_schema.KEY_COLUMN_USAGE
88
+ WHERE TABLE_NAME = ${table} AND CONSTRAINT_NAME != 'PRIMARY' AND REFERENCED_TABLE_NAME IS NOT NULL;
89
89
  `);
90
90
  return { primaryKeys, uniqueKeys, indexKeys, foreignKeys, fullTextKeys };
91
91
  }
@@ -436,15 +436,15 @@ export class SectionFactory {
436
436
  importErr.message.includes('Cannot find module') &&
437
437
  importErr.message.includes('.section')) {
438
438
  this.sectionProcessingErrors[file] ??= [];
439
- this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
440
-
441
- Sections MUST use extensionless relative imports:
442
-
443
- ✅ import exampleSection from './example.section'
444
- ❌ import exampleSection from './example.section.ts'
445
- ❌ import exampleSection from './example.section.js'
446
-
447
- This file is bundled with esbuild, so Node never resolves the import directly.
439
+ this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
440
+
441
+ Sections MUST use extensionless relative imports:
442
+
443
+ ✅ import exampleSection from './example.section'
444
+ ❌ import exampleSection from './example.section.ts'
445
+ ❌ import exampleSection from './example.section.js'
446
+
447
+ This file is bundled with esbuild, so Node never resolves the import directly.
448
448
  If you added an extension manually, remove it.`);
449
449
  this.errorCount++;
450
450
  continue;
@@ -392,15 +392,15 @@ export class SectionFactory {
392
392
  importErr.message.includes('Cannot find module') &&
393
393
  importErr.message.includes('.section')) {
394
394
  this.sectionProcessingErrors[file] ??= [];
395
- this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
396
-
397
- Sections MUST use extensionless relative imports:
398
-
399
- ✅ import exampleSection from './example.section'
400
- ❌ import exampleSection from './example.section.ts'
401
- ❌ import exampleSection from './example.section.js'
402
-
403
- This file is bundled with jiti, so Node never resolves the import directly.
395
+ this.sectionProcessingErrors[file].push(`❌ Invalid section import detected.
396
+
397
+ Sections MUST use extensionless relative imports:
398
+
399
+ ✅ import exampleSection from './example.section'
400
+ ❌ import exampleSection from './example.section.ts'
401
+ ❌ import exampleSection from './example.section.js'
402
+
403
+ This file is bundled with jiti, so Node never resolves the import directly.
404
404
  If you added an extension manually, remove it.`);
405
405
  this.errorCount++;
406
406
  continue;
@@ -346,8 +346,8 @@ declare const selectFieldConfigSchema: z.ZodIntersection<z.ZodUnion<readonly [z.
346
346
  }, z.core.$strict>]>, z.ZodObject<{
347
347
  type: z.ZodLiteral<"select">;
348
348
  optionsType: z.ZodEnum<{
349
- db: "db";
350
349
  section: "section";
350
+ db: "db";
351
351
  static: "static";
352
352
  }>;
353
353
  build: z.ZodFunction<z.core.$ZodFunctionArgs, z.ZodCustom<SelectField, SelectField>>;