@emigrate/cli
Advanced tools
Comparing version
@@ -5,2 +5,11 @@ import process from 'node:process'; | ||
const canImportTypeScriptAsIs = Boolean(process.isBun) || typeof Deno !== 'undefined'; | ||
const getEmigrateConfig = (config) => { | ||
if ('default' in config && typeof config.default === 'object' && config.default !== null) { | ||
return config.default; | ||
} | ||
if (typeof config === 'object' && config !== null) { | ||
return config; | ||
} | ||
return {}; | ||
}; | ||
export const getConfig = async (command, forceImportTypeScriptAsIs = false) => { | ||
@@ -15,3 +24,3 @@ const explorer = cosmiconfig('emigrate', { | ||
} | ||
const config = result.config; | ||
const config = getEmigrateConfig(result.config); | ||
const commandConfig = config[command]; | ||
@@ -18,0 +27,0 @@ for (const command of commands) { |
{ | ||
"name": "@emigrate/cli", | ||
"version": "0.18.1", | ||
"version": "0.18.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
330398
0.19%3448
0.26%