1
0
Эх сурвалжийг харах

refactor(core): Remove unused check

Michael Bromley 4 жил өмнө
parent
commit
68e8b47df5

+ 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.`,
-        );
-    }
-}