|
@@ -8,6 +8,7 @@ import {
|
|
|
DefaultLogger,
|
|
DefaultLogger,
|
|
|
DefaultSearchPlugin,
|
|
DefaultSearchPlugin,
|
|
|
dummyPaymentHandler,
|
|
dummyPaymentHandler,
|
|
|
|
|
+ FacetValue,
|
|
|
LanguageCode,
|
|
LanguageCode,
|
|
|
LogLevel,
|
|
LogLevel,
|
|
|
VendureConfig,
|
|
VendureConfig,
|
|
@@ -62,8 +63,23 @@ export const devConfig: VendureConfig = {
|
|
|
paymentMethodHandlers: [dummyPaymentHandler],
|
|
paymentMethodHandlers: [dummyPaymentHandler],
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- customFields: {},
|
|
|
|
|
- logger: new DefaultLogger({ level: LogLevel.Verbose }),
|
|
|
|
|
|
|
+ customFields: {
|
|
|
|
|
+ Product: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'test',
|
|
|
|
|
+ type: 'relation',
|
|
|
|
|
+ entity: Asset,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ FacetValue: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'childFacetValue',
|
|
|
|
|
+ type: 'relation',
|
|
|
|
|
+ entity: FacetValue,
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ },
|
|
|
|
|
+ logger: new DefaultLogger({ level: LogLevel.Info }),
|
|
|
importExportOptions: {
|
|
importExportOptions: {
|
|
|
importAssetsDir: path.join(__dirname, 'import-assets'),
|
|
importAssetsDir: path.join(__dirname, 'import-assets'),
|
|
|
},
|
|
},
|
|
@@ -130,19 +146,19 @@ function getDbConfig(): DataSourceOptions {
|
|
|
case 'postgres':
|
|
case 'postgres':
|
|
|
console.log('Using postgres connection');
|
|
console.log('Using postgres connection');
|
|
|
return {
|
|
return {
|
|
|
- synchronize: false,
|
|
|
|
|
|
|
+ synchronize: true,
|
|
|
type: 'postgres',
|
|
type: 'postgres',
|
|
|
host: process.env.DB_HOST || 'localhost',
|
|
host: process.env.DB_HOST || 'localhost',
|
|
|
port: Number(process.env.DB_PORT) || 5432,
|
|
port: Number(process.env.DB_PORT) || 5432,
|
|
|
- username: process.env.DB_USERNAME || 'postgres',
|
|
|
|
|
- password: process.env.DB_PASSWORD || 'postgres',
|
|
|
|
|
- database: process.env.DB_NAME || 'vendure',
|
|
|
|
|
|
|
+ username: process.env.DB_USERNAME || 'vendure',
|
|
|
|
|
+ password: process.env.DB_PASSWORD || 'password',
|
|
|
|
|
+ database: process.env.DB_NAME || 'vendure-dev',
|
|
|
schema: process.env.DB_SCHEMA || 'public',
|
|
schema: process.env.DB_SCHEMA || 'public',
|
|
|
};
|
|
};
|
|
|
case 'sqlite':
|
|
case 'sqlite':
|
|
|
console.log('Using sqlite connection');
|
|
console.log('Using sqlite connection');
|
|
|
return {
|
|
return {
|
|
|
- synchronize: false,
|
|
|
|
|
|
|
+ synchronize: true,
|
|
|
type: 'better-sqlite3',
|
|
type: 'better-sqlite3',
|
|
|
database: path.join(__dirname, 'vendure.sqlite'),
|
|
database: path.join(__dirname, 'vendure.sqlite'),
|
|
|
};
|
|
};
|
|
@@ -155,6 +171,7 @@ function getDbConfig(): DataSourceOptions {
|
|
|
location: path.join(__dirname, 'vendure.sqlite'),
|
|
location: path.join(__dirname, 'vendure.sqlite'),
|
|
|
};
|
|
};
|
|
|
case 'mysql':
|
|
case 'mysql':
|
|
|
|
|
+ case 'mariadb':
|
|
|
default:
|
|
default:
|
|
|
console.log('Using mysql connection');
|
|
console.log('Using mysql connection');
|
|
|
return {
|
|
return {
|
|
@@ -162,8 +179,8 @@ function getDbConfig(): DataSourceOptions {
|
|
|
type: 'mariadb',
|
|
type: 'mariadb',
|
|
|
host: '127.0.0.1',
|
|
host: '127.0.0.1',
|
|
|
port: 3306,
|
|
port: 3306,
|
|
|
- username: 'root',
|
|
|
|
|
- password: '',
|
|
|
|
|
|
|
+ username: 'vendure',
|
|
|
|
|
+ password: 'password',
|
|
|
database: 'vendure-dev',
|
|
database: 'vendure-dev',
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|