From 573d82781599fa413bb8fd8bad57dc823cbc4f62 Mon Sep 17 00:00:00 2001 From: John Conley Date: Mon, 27 Apr 2020 15:58:51 -0700 Subject: [PATCH] fix(context): update valory --- package.json | 4 ++-- src/adaptor-polka.ts | 3 --- yarn.lock | 8 ++++---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 5b71d3a..3a42b57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "valory-adaptor-polka", - "version": "1.0.0", + "version": "2.0.0-beta.2", "main": "dist/adaptor-polka.js", "typings": "dist/adaptor-polka.d.ts", "license": "MIT", @@ -13,7 +13,7 @@ "semantic-release": "^17.0.4", "tslint": "^6.1.0", "typescript": "^3.8.3", - "valory-runtime": "^4.0.0-v4.14" + "valory-runtime": "^4.0.0-v4.15" }, "files": [ "dist/adaptor-polka.js", diff --git a/src/adaptor-polka.ts b/src/adaptor-polka.ts index 27a2253..536676c 100644 --- a/src/adaptor-polka.ts +++ b/src/adaptor-polka.ts @@ -1,6 +1,5 @@ import {ApiContext, HttpMethod, ApiAdaptor} from "valory-runtime"; import {IncomingMessage, ServerResponse} from "http"; -import url = require("url"); const polka = require("polka"); const pathReplacer = /{([\S]*?)}/g; @@ -25,10 +24,8 @@ export class PolkaAdaptor implements ApiAdaptor { }); req.on("end", async () => { - const parsedUrl = url.parse(req.url, true); const ctx = new ApiContext({ headers: req.headers, - queryParams: parsedUrl.query, pathParams: (req as any).params, path, method, diff --git a/yarn.lock b/yarn.lock index 39644a8..b28ca74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5069,10 +5069,10 @@ validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: dependencies: builtins "^1.0.3" -valory-runtime@^4.0.0-v4.14: - version "4.0.0-v4.14" - resolved "https://registry.yarnpkg.com/valory-runtime/-/valory-runtime-4.0.0-v4.14.tgz#fa37f27513a27b4e04f1ee6ea1c73d4b9f37b226" - integrity sha512-FgEXAqDahaCDQIw5dciTjQHxTBqblIArwwhrNGmwjiZ7jghz13YW/SF9PJ3ls3RO91c0LmhKZVWOTVvQ4KbsQA== +valory-runtime@^4.0.0-v4.15: + version "4.0.0-v4.15" + resolved "https://registry.yarnpkg.com/valory-runtime/-/valory-runtime-4.0.0-v4.15.tgz#58614d6cb900a276ca8dcf41417b949f02968714" + integrity sha512-G1zrwIaWOOo7bQaQ8mT/76dMG2uJS23VqHskem6D+uo0YpUcjMaolHC6VnA/hEJtVHGPCQS4OXc5XdbHwYasPw== dependencies: "@types/pino" "^6.0.0" openapi-types "^1.3.5"