INNER CODE UNIT · JavaScript

run

furey/mongodb-lens · config-create.js:12

const run = async () => {
  const homeDir = process.env.HOME || process.env.USERPROFILE

  let configPath = process.env.CONFIG_PATH || join(homeDir, '.mongodb-lens.jsonc')

  if (!extname(configPath)) configPath = join(configPath, '.mongodb-lens.jsonc')

  if (!configPath.endsWith('.json') && !configPath.endsWith('.jsonc')) {
    console.error('Error: Configuration file must have .json or .jsonc extension')
    process.exit(1)
  }

  configPath = resolve(configPath)

  try {
    const configContent = await extractConfigFromReadme()

    if (existsSync(configPath)) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…