@@ -44,24 +44,26 @@ export async function configurePayloadConfig(args: {
4444
4545 try {
4646 const possiblePaths = [
47+ path . resolve ( args . projectDir , 'src/mzinga.config.ts' ) ,
48+ path . resolve ( args . projectDir , 'src/mzinga/mzinga.config.ts' ) ,
4749 path . resolve ( args . projectDir , 'src/payload.config.ts' ) ,
4850 path . resolve ( args . projectDir , 'src/payload/payload.config.ts' ) ,
4951 ]
5052
51- let payloadConfigPath : string | undefined
53+ let mzingaConfigPath : string | undefined
5254
5355 possiblePaths . forEach ( ( p ) => {
54- if ( fse . pathExistsSync ( p ) && ! payloadConfigPath ) {
55- payloadConfigPath = p
56+ if ( fse . pathExistsSync ( p ) && ! mzingaConfigPath ) {
57+ mzingaConfigPath = p
5658 }
5759 } )
5860
59- if ( ! payloadConfigPath ) {
60- warning ( 'Unable to update payload .config.ts with plugins' )
61+ if ( ! mzingaConfigPath ) {
62+ warning ( 'Unable to update mzinga .config.ts with plugins' )
6163 return
6264 }
6365
64- const configContent = fse . readFileSync ( payloadConfigPath , 'utf-8' )
66+ const configContent = fse . readFileSync ( mzingaConfigPath , 'utf-8' )
6567 const configLines = configContent . split ( '\n' )
6668
6769 const dbReplacement = dbPackages [ args . dbDetails . type ]
@@ -100,7 +102,7 @@ export async function configurePayloadConfig(args: {
100102 } )
101103
102104 if ( ! dbConfigStartLineIndex || ! dbConfigEndLineIndex ) {
103- warning ( 'Unable to update payload .config.ts with database adapter import' )
105+ warning ( 'Unable to update mzinga .config.ts with database adapter import' )
104106 } else {
105107 // Replaces lines between `// database-adapter-config-start` and `// database-adapter-config-end`
106108 configLines . splice (
@@ -110,8 +112,8 @@ export async function configurePayloadConfig(args: {
110112 )
111113 }
112114
113- fse . writeFileSync ( payloadConfigPath , configLines . join ( '\n' ) )
115+ fse . writeFileSync ( mzingaConfigPath , configLines . join ( '\n' ) )
114116 } catch ( err : unknown ) {
115- warning ( 'Unable to update payload .config.ts with plugins' )
117+ warning ( 'Unable to update mzinga .config.ts with plugins' )
116118 }
117119}
0 commit comments