Просмотр исходного кода

refactor(core): Remove unused check

Michael Bromley 4 лет назад
Родитель
Сommit
68e8b47df5
1 измененных файлов с 0 добавлено и 21 удалено
  1. 0 21
      packages/core/src/bootstrap.ts

+ 0 - 21
packages/core/src/bootstrap.ts

@@ -116,7 +116,6 @@ export async function preBootstrapConfig(
     userConfig: Partial<VendureConfig>,
 ): Promise<Readonly<RuntimeVendureConfig>> {
     if (userConfig) {
-        checkForDeprecatedOptions(userConfig);
         setConfig(userConfig);
     }
 
@@ -287,23 +286,3 @@ async function validateDbTablesForWorker(worker: INestApplicationContext) {
         reject(`Could not validate DB table structure. Aborting bootstrap.`);
     });
 }
-
-function checkForDeprecatedOptions(config: Partial<VendureConfig>) {
-    const deprecatedApiOptions = [
-        'hostname',
-        'port',
-        'adminApiPath',
-        'shopApiPath',
-        'channelTokenKey',
-        'cors',
-        'middleware',
-        'apolloServerPlugins',
-    ];
-    const deprecatedOptionsUsed = deprecatedApiOptions.filter(option => config.hasOwnProperty(option));
-    if (deprecatedOptionsUsed.length) {
-        throw new Error(
-            `The following VendureConfig options are deprecated: ${deprecatedOptionsUsed.join(', ')}\n` +
-                `They have been moved to the "apiOptions" object. Please update your configuration.`,
-        );
-    }
-}