@dsmrt/axiom-config 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @dsmrt/axiom-config
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f23a8f2: fixing inheretance
8
+ - f23a8f2: fix load config return with custom interfaces
9
+
10
+ ## 0.2.1
11
+
12
+ ### Patch Changes
13
+
14
+ - 90d88c8: fix load config return with custom interfaces
15
+
3
16
  ## 0.2.0
4
17
 
5
18
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -15,12 +15,12 @@ interface ConfigMethods {
15
15
  isProd(): boolean;
16
16
  asParameterPath(name: string): string;
17
17
  }
18
- declare class ConfigContainer<T = object> implements BaseConfig, ConfigMethods {
18
+ declare class ConfigContainer implements BaseConfig, ConfigMethods {
19
19
  readonly name: string;
20
20
  readonly env: string;
21
21
  readonly aws: AwsConfigs;
22
22
  readonly prodEnvName?: string;
23
- constructor(config: T & BaseConfig);
23
+ constructor(config: BaseConfig);
24
24
  isProd(): boolean;
25
25
  asParameterPath(name: string): string;
26
26
  }
@@ -39,7 +39,7 @@ interface LoadConfigInput {
39
39
  cwd?: string;
40
40
  }
41
41
  declare const importConfigFromPath: (path: string) => Config;
42
- declare const loadConfig: <T extends object>(input?: LoadConfigInput) => ConfigContainer<T>;
42
+ declare const loadConfig: <T extends object>(input?: LoadConfigInput) => ConfigContainer & T;
43
43
  /**
44
44
  * Simple object check.
45
45
  */
package/dist/index.d.ts CHANGED
@@ -15,12 +15,12 @@ interface ConfigMethods {
15
15
  isProd(): boolean;
16
16
  asParameterPath(name: string): string;
17
17
  }
18
- declare class ConfigContainer<T = object> implements BaseConfig, ConfigMethods {
18
+ declare class ConfigContainer implements BaseConfig, ConfigMethods {
19
19
  readonly name: string;
20
20
  readonly env: string;
21
21
  readonly aws: AwsConfigs;
22
22
  readonly prodEnvName?: string;
23
- constructor(config: T & BaseConfig);
23
+ constructor(config: BaseConfig);
24
24
  isProd(): boolean;
25
25
  asParameterPath(name: string): string;
26
26
  }
@@ -39,7 +39,7 @@ interface LoadConfigInput {
39
39
  cwd?: string;
40
40
  }
41
41
  declare const importConfigFromPath: (path: string) => Config;
42
- declare const loadConfig: <T extends object>(input?: LoadConfigInput) => ConfigContainer<T>;
42
+ declare const loadConfig: <T extends object>(input?: LoadConfigInput) => ConfigContainer & T;
43
43
  /**
44
44
  * Simple object check.
45
45
  */
package/dist/index.js CHANGED
@@ -61,10 +61,14 @@ var importConfigFromPath = (path) => {
61
61
  throw new Error(`Path not found: {path}`);
62
62
  };
63
63
  var loadConfig = (input) => {
64
- const baseConfigFile = configPath(input);
64
+ const baseConfigFile = configPath({
65
+ ...input,
66
+ env: void 0
67
+ });
65
68
  const baseConfig = importConfigFromPath(baseConfigFile);
66
69
  let overrides = input?.overrides || {};
67
70
  if (input?.env) {
71
+ console.log("INPUT", input);
68
72
  const devConfig = importConfigFromPath(configPath(input));
69
73
  overrides = mergeDeep(devConfig, overrides);
70
74
  }
package/dist/index.mjs CHANGED
@@ -40,10 +40,14 @@ var importConfigFromPath = (path) => {
40
40
  throw new Error(`Path not found: {path}`);
41
41
  };
42
42
  var loadConfig = (input) => {
43
- const baseConfigFile = configPath(input);
43
+ const baseConfigFile = configPath({
44
+ ...input,
45
+ env: void 0
46
+ });
44
47
  const baseConfig = importConfigFromPath(baseConfigFile);
45
48
  let overrides = input?.overrides || {};
46
49
  if (input?.env) {
50
+ console.log("INPUT", input);
47
51
  const devConfig = importConfigFromPath(configPath(input));
48
52
  overrides = mergeDeep(devConfig, overrides);
49
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmrt/axiom-config",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Config library for axiom cli",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",