Skip to content

Commit ddfd9bb

Browse files
committed
fix(cli): rename "DotenvConfigSource" to "DotEnvsConfigSource" in transformConfigFile
- Adjusted `transformConfigFile` to reflect the proper source name for environmental configuration.
1 parent 5770eff commit ddfd9bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/cli/src/commands/mcp/tools/initProjectTool.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("initProjectTool", () => {
3838
templates = {
3939
getRenderedFiles: vi.fn().mockReturnValue([]),
4040
$onInit: vi.fn()
41-
};
41+
} as any;
4242

4343
injector()
4444
.addProvider(CliService, {

packages/cli/src/processors/transformConfigFile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function transformConfigFile(project: ProjectClient, data: RenderDataCont
1010

1111
if (data.config) {
1212
if (data.configDotenv) {
13-
project.addConfigSource("DotenvConfigSource", {
13+
project.addConfigSource("DotEnvsConfigSource", {
1414
moduleSpecifier: "@tsed/config/dotenv"
1515
});
1616
} else if (data.configEnvs) {

packages/cli/test/integrations/init/__snapshots__/init.integration.spec.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export class Server {
350350
`;
351351

352352
exports[`Init cmd > Express.js > should generate a project with the many config source > config file content 1`] = `
353-
"import { DotenvConfigSource } from "@tsed/config/dotenv";
353+
"import { DotEnvsConfigSource } from "@tsed/config/dotenv";
354354
import { JsonConfigSource } from "@tsed/config/json";
355355
import { YamlConfigSource } from "@tsed/config/yaml";
356356
import { IoredisConfigSource } from "@tsedio/config-ioredis";
@@ -372,7 +372,7 @@ export const config: Partial<TsED.Configuration> = {
372372
},
373373
logger: loggerConfig,
374374
extends: [
375-
DotenvConfigSource,
375+
DotEnvsConfigSource,
376376
withOptions(JsonConfigSource, {
377377
path: "./config.json"
378378
}),

0 commit comments

Comments
 (0)