api-core-gateway
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -28,9 +28,3 @@ "use strict"; | ||
const apiInfo = yield request({ uri: uri + '/.api-core', json: true }); | ||
const edges = []; | ||
for (let edgeInfo of apiInfo.edges) { | ||
if (edgeInfo.external) | ||
continue; | ||
edges.push(new api_core_1.ExternalApiEdge(edgeInfo, null)); | ||
} | ||
const api = new api_core_1.Api('1.0', ...edges); | ||
const api = api_core_1.Api.fromMetadata(apiInfo); | ||
const rule = new ApiGatewayForwardRule_1.ApiGatewayForwardRule(api, uri, `${this.options.internalHost}:${this.options.port}`); | ||
@@ -37,0 +31,0 @@ this.ruleSet.push(rule); |
@@ -12,5 +12,5 @@ /// <reference types="node" /> | ||
action(action: ApiGatewayAction): this; | ||
private verifyRoute(req, res, href); | ||
private verifyRoute; | ||
tryHandle(req: OutgoingMessage, res: IncomingMessage, href: string): Promise<boolean>; | ||
tryHandleWebSocket(req: OutgoingMessage, socket: Socket, head: string, href: string): Promise<boolean>; | ||
} |
{ | ||
"name": "api-core-gateway", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "Gateway for API Core.", | ||
@@ -23,6 +23,6 @@ "main": "dist/index.js", | ||
"@types/node": "^9.4.7", | ||
"api-core": "0.7.1", | ||
"api-core": "0.7.3", | ||
"front-door": "ajuhos/front-door#2322c56", | ||
"request-promise-native": "^1.0.5" | ||
} | ||
} | ||
} |
@@ -65,10 +65,4 @@ import { ForwardRule, Target, TargetList, HttpServer, HttpsServer } from "front-door"; | ||
const apiInfo = await request({ uri: uri + '/.api-core', json: true }); | ||
const api = Api.fromMetadata(apiInfo); | ||
const edges: ApiEdgeDefinition[] = []; | ||
for(let edgeInfo of apiInfo.edges) { | ||
if(edgeInfo.external) continue; | ||
edges.push(new ExternalApiEdge(edgeInfo, null as any)) | ||
} | ||
const api = new Api('1.0', ...edges); | ||
const rule = new ApiGatewayForwardRule( | ||
@@ -75,0 +69,0 @@ api, uri, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30141
430
+ Addedapi-core@0.7.3(transitive)
- Removedapi-core@0.7.1(transitive)
Updatedapi-core@0.7.3