Skip to content

Commit

Permalink
chore: Move config/env.ts to utils/env.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
angelmadames committed Apr 1, 2024
1 parent bd80f4d commit 5495552
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/commands/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ 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())
Expand Down
2 changes: 1 addition & 1 deletion src/commands/environment/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Command } from 'commander';
import dotEnv from '../../config/env';
import { projectConfig, projectEnvVars } from '../../config/project';
import dotEnv from '../../utils/env';
import { copyFile } from '../../utils/file-system';
import log from '../../utils/log';

Expand Down
2 changes: 1 addition & 1 deletion src/commands/setup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions src/config/env.ts → src/utils/env.ts
Original file line number Diff line number Diff line change
@@ -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 type { DEMSProjectConfig } from '../config/dems';
import log from './log';
import { flattenObject } from './object';

export const dotEnv = {
generate(envFilePath: string, config: DEMSProjectConfig): void {
Expand Down

0 comments on commit 5495552

Please sign in to comment.