Skip to content

Commit

Permalink
fix: service outputs were not propagated to runtime context
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed May 24, 2018
1 parent 4383d75 commit 0151593
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/types/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export class Module<
}
const depContext = deps[dep.name]

const outputs = await this.ctx.getServiceOutputs({ serviceName: dep.name })
const outputs = { ...await this.ctx.getServiceOutputs({ serviceName: dep.name }), ...dep.config.outputs }
const serviceEnvName = dep.getEnvVarName()

validate(outputs, serviceOutputsSchema, { context: `outputs for service ${dep.name}` })
Expand Down
4 changes: 2 additions & 2 deletions src/types/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ export class Service<M extends Module = Module> {
return new cls(this.ctx, this.module, this.name, resolved)
}

async prepareRuntimeContext(extraEnvVars?: PrimitiveMap) {
async prepareRuntimeContext(extraEnvVars: PrimitiveMap = {}) {
const dependencies = await this.getDependencies()
return this.module.prepareRuntimeContext(dependencies, extraEnvVars)
return this.module.prepareRuntimeContext(dependencies, { ...extraEnvVars })
}
}

0 comments on commit 0151593

Please sign in to comment.