Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oasislabs/gateway

Package Overview
Dependencies
Maintainers
16
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oasislabs/gateway - npm Package Compare versions

Comparing version 1.0.0-rc.33 to 1.0.0-rc.34

5

dist/lib/src/session.d.ts
import { HttpClient, HttpHeaders, Http } from './http';
export declare class HttpSession implements Http {
url: string;
apiToken: string;
/**
* The gateway base url.
*/
url: string;
/**
* session key passed to the developer gateway in the header.

@@ -7,0 +10,0 @@ */

4

dist/lib/src/session.js

@@ -27,3 +27,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

constructor(url, apiToken, headers, client) {
this.url = url;
this.apiToken = apiToken;

@@ -37,5 +36,8 @@ this.sessionKey = uuid.v4();

this.client = client ? client : new AxiosClient();
this.url = url + (url.endsWith('/') ? '' : '/');
}
request(method, api, body) {
return __awaiter(this, void 0, void 0, function* () {
console.log('api', api);
console.log('url', this.url);
const url = new URL(api, this.url).href;

@@ -42,0 +44,0 @@ const headers = { headers: new Map() };

{
"name": "@oasislabs/gateway",
"version": "1.0.0-rc.33",
"version": "1.0.0-rc.34",
"description": "Oasis Gateway implementation used as the client backend",

@@ -50,3 +50,4 @@ "keywords": [

"@types/uuid": "^3.4.5",
"axios": "^0.19.0"
"axios": "^0.19.0",
"uuid": "^3.4.0"
},

@@ -57,3 +58,3 @@ "browser": {

},
"gitHead": "b9e72b5ac47ac9329a88620898c859777e133594"
"gitHead": "1fe11d5a5f4a64664b910b56c87d41f13f8e03e1"
}

@@ -22,2 +22,7 @@ import { AxiosClient, HttpClient, HttpHeaders, Http } from './http';

/**
* The gateway base url.
*/
public url: string;
/**
* session key passed to the developer gateway in the header.

@@ -39,3 +44,3 @@ */

public constructor(
public url: string,
url: string,
public apiToken: string,

@@ -52,2 +57,3 @@ headers: HttpHeaders,

this.client = client ? client : new AxiosClient();
this.url = url + (url.endsWith('/') ? '' : '/');
}

@@ -60,3 +66,3 @@

): Promise<any> {
const url = new URL(api, this.url).href;
const url = this.url + api;
const headers: HttpHeaders = { headers: new Map() };

@@ -63,0 +69,0 @@ headers.headers.set('X-OASIS-INSECURE-AUTH', '1');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc