From 2222844a729c724d1d10a67dcb4c54e300d33677 Mon Sep 17 00:00:00 2001 From: "Angel M. Adames" Date: Mon, 1 Apr 2024 11:36:11 -0400 Subject: [PATCH] chore: Move config/env.ts to utils/env.ts --- src/commands/config/index.ts | 2 ++ src/commands/environment/index.ts | 2 +- src/commands/setup/index.ts | 2 +- src/{config => utils}/env.ts | 6 +++--- 4 files changed, 7 insertions(+), 5 deletions(-) rename src/{config => utils}/env.ts (83%) diff --git a/src/commands/config/index.ts b/src/commands/config/index.ts index 882040c..b04dffe 100644 --- a/src/commands/config/index.ts +++ b/src/commands/config/index.ts @@ -9,6 +9,8 @@ export const configCommand = () => { const command = new Command(); command .name('config') + .summary('Manage the DEMS configuration') + .description('Manages and displays the DEMS configuration currently in-use.') .option('-g, --generate', 'Generate CLI config file') .addCommand(currentProjectCommand()) .addCommand(projectConfigCommand()) diff --git a/src/commands/environment/index.ts b/src/commands/environment/index.ts index f43e13a..eb06e74 100644 --- a/src/commands/environment/index.ts +++ b/src/commands/environment/index.ts @@ -1,5 +1,5 @@ import { Command } from 'commander'; -import dotEnv from '../../config/env'; +import dotEnv from '../../utils/env'; import { projectConfig, projectEnvVars } from '../../config/project'; import { copyFile } from '../../utils/file-system'; import log from '../../utils/log'; diff --git a/src/commands/setup/index.ts b/src/commands/setup/index.ts index 590489e..c6d63cc 100644 --- a/src/commands/setup/index.ts +++ b/src/commands/setup/index.ts @@ -5,7 +5,7 @@ import chalk from 'chalk'; import { Command } from 'commander'; import cliConfig from '../../config/cli'; import { defaultConfig, demsEnvVars } from '../../config/dems'; -import dotEnv from '../../config/env'; +import dotEnv from '../../utils/env'; import { createFile, createPath, isFile } from '../../utils/file-system'; import log from '../../utils/log'; import sharedOptions from '../../utils/shared-options'; diff --git a/src/config/env.ts b/src/utils/env.ts similarity index 83% rename from src/config/env.ts rename to src/utils/env.ts index 0ab5df1..8e6b266 100644 --- a/src/config/env.ts +++ b/src/utils/env.ts @@ -1,7 +1,7 @@ import * as fs from 'node:fs'; -import log from '../utils/log'; -import { flattenObject } from '../utils/object'; -import type { DEMSProjectConfig } from './dems'; +import log from './log'; +import { flattenObject } from './object'; +import type { DEMSProjectConfig } from '../config/dems'; export const dotEnv = { generate(envFilePath: string, config: DEMSProjectConfig): void {