Skip to content

Commit

Permalink
fix: update keys when getting signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbutt committed Feb 8, 2024
1 parent 035b5ae commit 65e1acc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
17 changes: 9 additions & 8 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import dotenv, { DotenvPopulateInput } from "dotenv";
import process from "node:process";

dotenv.populate(
process.env as DotenvPopulateInput,
{
SUPPRESS_NO_CONFIG_WARNING: "y",
},
{ override: true },
);

import path from "node:path";
import Generator from "yeoman-generator";
import chalk from "chalk";
Expand All @@ -17,14 +26,6 @@ import { CliHelper, CodeHelper, GitHelper } from "./helpers/index.js";
import { ProjectType } from "./questions/index.js";
import appConfig from "../config/default.json";

dotenv.populate(
process.env as DotenvPopulateInput,
{
SUPPRESS_NO_CONFIG_WARNING: "y",
},
{ override: true },
);

config.util.setModuleDefaults("config", appConfig);

class AppGenerator extends Generator<AppOptions> {
Expand Down
4 changes: 3 additions & 1 deletion src/generators/JavascriptGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class JavascriptGenerator implements GeneratorInterface {
}

public static getSignature(): GeneratorSignature {
return config.get<GeneratorSignature>("config.generators.js.signature");
return config.get<GeneratorSignature>(
"config.generators.javascript.signature",
);
}

public getSourceRoot(): string {
Expand Down
4 changes: 3 additions & 1 deletion src/generators/PythonGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export class PythonGenerator implements GeneratorInterface {
}

public static getSignature(): GeneratorSignature {
return config.get<GeneratorSignature>("config.generators.py.signature");
return config.get<GeneratorSignature>(
"config.generators.python.signature",
);
}

public getSourceRoot(): string {
Expand Down
4 changes: 3 additions & 1 deletion src/generators/TypescriptGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class TypescriptGenerator implements GeneratorInterface {
}

public static getSignature(): GeneratorSignature {
return config.get<GeneratorSignature>("config.generators.ts.signature");
return config.get<GeneratorSignature>(
"config.generators.typescript.signature",
);
}

public getSourceRoot(): string {
Expand Down

0 comments on commit 65e1acc

Please sign in to comment.