mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Serverless classes are now loaded before setProject() call
This commit is contained in:
parent
8a072fd7cd
commit
e570f077e2
@ -39,16 +39,7 @@ class Serverless {
|
||||
serverlessPath: __dirname
|
||||
};
|
||||
|
||||
this.setProject( project );
|
||||
|
||||
// Add Config Settings
|
||||
this.updateConfig(config);
|
||||
|
||||
// Add Defaults
|
||||
this.actions = {};
|
||||
this.hooks = {};
|
||||
this.commands = {};
|
||||
this.classes = {
|
||||
this.classes = {
|
||||
// TODO: add Runtime, Stage, Region
|
||||
State: require('./ServerlessState'),
|
||||
Meta: require('./ServerlessMeta'),
|
||||
@ -58,6 +49,16 @@ class Serverless {
|
||||
Endpoint: require('./ServerlessEndpoint'),
|
||||
Event: require('./ServerlessEvent')
|
||||
};
|
||||
|
||||
this.setProject( project );
|
||||
|
||||
// Add Config Settings
|
||||
this.updateConfig(config);
|
||||
|
||||
// Add Defaults
|
||||
this.actions = {};
|
||||
this.hooks = {};
|
||||
this.commands = {};
|
||||
this.cli = null;
|
||||
this.state = new this.classes.State(this);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user