Skip to content

Commit 0f59e0c

Browse files
michaelsbradleyjriurimatias
authored andcommitted
fix(core/config): Fix EmbarkConfig type
1 parent b021689 commit 0f59e0c

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

packages/core/core/src/config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ const DEFAULT_CONFIG_PATH = 'config/';
3535

3636
const embark5ChangesUrl = 'https://framework.embarklabs.io/docs/migrating_from_3.x.html#Updating-to-v5';
3737

38+
export interface EmbarkConfig {
39+
app?: any;
40+
contracts: string[];
41+
config: string;
42+
versions: {
43+
solc: string;
44+
};
45+
generationDir?: string;
46+
plugins?: any;
47+
buildDir?: string;
48+
}
49+
3850
export class Config {
3951

4052
env = 'default';

packages/core/core/src/index.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export type Callback<Tv> = (err?: Error | null, val?: Tv) => void;
33
export type Maybe<T> = false | 0 | undefined | null | T;
44

55
import { AbiItem } from "web3-utils";
6+
import { EmbarkConfig as _EmbarkConfig } from './config';
67

78
export interface Contract {
89
abiDefinition: AbiItem[];
@@ -67,18 +68,9 @@ export interface EmbarkEvents {
6768
): void;
6869
}
6970

70-
export interface EmbarkConfig {
71+
export interface Configuration {
7172
contractsFiles: any[];
72-
embarkConfig: {
73-
contracts: string[] | string;
74-
config: {
75-
contracts: string;
76-
};
77-
versions: {
78-
solc: string;
79-
};
80-
generationDir: string;
81-
};
73+
embarkConfig: _EmbarkConfig;
8274
blockchainConfig: {
8375
endpoint: string;
8476
accounts: any[];
@@ -115,7 +107,7 @@ export interface Embark {
115107
registerConsoleCommand: any;
116108
logger: Logger;
117109
fs: any;
118-
config: EmbarkConfig;
110+
config: Configuration;
119111
currentContext: string[];
120112
registerActionForEvent<T>(
121113
name: string,
@@ -128,6 +120,7 @@ export { ProcessLauncher } from './processes/processLauncher';
128120
export { ProcessWrapper } from './processes/processWrapper';
129121

130122
export { Config } from './config';
123+
export type EmbarkConfig = _EmbarkConfig;
131124
export { IPC } from './ipc';
132125
import { EmbarkEmitter as Events } from './events';
133126
export { Events };

0 commit comments

Comments
 (0)