serverless-shared-gateway
Advanced tools
Comparing version 1.1.0 to 1.1.1
26
index.js
@@ -138,10 +138,2 @@ 'use strict'; | ||
async writeAndRead(restId, resourceId, outputFilename) { | ||
if (outputFilename === null) { | ||
outputFilename = '.output' | ||
} | ||
return await writeFile(`./${outputFilename}`, `restId=${restId}\nresourceId=${resourceId} `) | ||
} | ||
async compileEvents() { | ||
@@ -158,3 +150,4 @@ this.restApiId = this.serverless.service.provider.apiGatewayRestApiId | ||
if (this.domainManagerCompatible === true) { | ||
this.serverless.cli.consoleLog('Serverless Shared Gateway - Domain Manager Driver is enabled') | ||
this.serverless.cli.consoleLog('Serverless: Shared Gateway - Domain Manager hook is enabled') | ||
await this.grabRestID() | ||
} else { | ||
@@ -169,3 +162,8 @@ await this.findRestApi() | ||
if (this.outputResources === true) { | ||
await this.writeAndRead(this.restApiId, this.restApiResourceId, this.outputFilename) | ||
if (this.outputFilename === undefined) { | ||
this.outputFilename = '.output' | ||
} | ||
return await writeFile(`./${this.outputFilename}`, `restId=${this.restApiId}\nresourceId=${this.restApiResourceId} `) | ||
} | ||
@@ -229,2 +227,10 @@ | ||
async grabRestID() { | ||
this.initialSetup() | ||
const { items } = await this.apiGateway.getRestApis({}).promise(); | ||
let gatewayIds = items.filter(gateway => this._findMatchingRestApi(gateway)) | ||
this.restApiId = gatewayIds[0].id | ||
} | ||
findExistingResources() { | ||
@@ -231,0 +237,0 @@ if (!this.resources) throw new Error(`You must have a list of the current resources. Did you forget to run loadResourcesForApi?`) |
{ | ||
"name": "serverless-shared-gateway", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "publishConfig": |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11807
244