Skip to content

Commit

Permalink
fixed decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
aexol committed Jul 22, 2024
1 parent b9bc0b5 commit f2b2ef6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/config-maker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "config-maker",
"version": "0.0.4",
"version": "0.0.5",
"description": "Make interactive config for CLIs. Fetch values from command line, file, user options or environment variable.",
"main": "lib/index.js",
"author": "Artur Czemiel",
Expand Down
4 changes: 2 additions & 2 deletions packages/config-maker/src/Configuration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type DefaultValues<T> = {
};

type Coders<T> = {
[P in keyof WithNonStringKeys<T>]: {
[P in keyof WithNonStringKeys<T>]?: {
decode: (v: string) => WithNonStringKeys<T>[P];
encode: (v: WithNonStringKeys<T>[P]) => string;
};
Expand Down Expand Up @@ -152,7 +152,7 @@ export class ConfigMaker<
const decoderFunction =
k in this.props.decoders
? this.props.decoders[k as string as keyof Coders<ConfigurationOptions>]
.decode
?.decode
: undefined;

// This is highest hierarchy argument from command line
Expand Down
2 changes: 1 addition & 1 deletion packages/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sandbox",
"private": true,
"version": "0.8.9",
"version": "0.8.10",
"description": "CLI test",
"author": "Artur Czemiel",
"license": "MIT",
Expand Down

0 comments on commit f2b2ef6

Please sign in to comment.