Skip to content

Commit 22c9591

Browse files
committed
fix: add service and api name output
1 parent f892892 commit 22c9591

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/baas/apigw/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class Apigw {
6969
}
7070

7171
return {
72+
serviceName,
7273
serviceId: detail.serviceId,
7374
subDomain: detail.subDomain,
7475
serviceCreated
@@ -176,6 +177,7 @@ class Apigw {
176177
apiId: output.apiId
177178
})
178179
output.internalDomain = internalDomain
180+
output.apiName = apiInputs.apiName
179181
return output
180182
}
181183

@@ -340,7 +342,9 @@ class Apigw {
340342
const { oldState = {} } = inputs
341343
inputs.protocols = this.getProtocolString(inputs.protocols)
342344

343-
const { serviceId, subDomain, serviceCreated } = await this.createOrUpdateService(inputs)
345+
const { serviceId, serviceName, subDomain, serviceCreated } = await this.createOrUpdateService(
346+
inputs
347+
)
344348

345349
const apiList = []
346350
const stateApiList = oldState.apiList || []
@@ -387,6 +391,7 @@ class Apigw {
387391
const outputs = {
388392
created: serviceCreated,
389393
serviceId,
394+
serviceName,
390395
subDomain,
391396
protocols: inputs.protocols,
392397
environment: inputs.environment,

src/baas/apigw/index.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ async function runTest() {
4040
}
4141
const apigw = new Apigw(credentials, inputs.region)
4242
const outputs = await apigw.deploy(inputs)
43+
console.log('outputs', outputs);
44+
4345

4446
await apigw.remove(outputs)
4547
}

0 commit comments

Comments
 (0)