Socket
Socket
Sign inDemoInstall

@geckos.io/client

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geckos.io/client - npm Package Compare versions

Comparing version 2.0.0-dev.3 to 2.0.0-dev.4

0

lib/bundle.d.ts
import client from './geckos/channel';
export default client;
//# sourceMappingURL=bundle.d.ts.map

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import * as Types from '@geckos.io/common/lib/types';

5

lib/geckos/channel.js

@@ -44,7 +44,8 @@ "use strict";

var connectionsManager_1 = __importDefault(require("../wrtc/connectionsManager"));
var constants_1 = require("@geckos.io/common/lib/constants");
var peerConnection_1 = __importDefault(require("../wrtc/peerConnection"));
var constants_1 = require("@geckos.io/common/lib/constants");
var reliableMessage_1 = require("@geckos.io/common/lib/reliableMessage");
var ClientChannel = /** @class */ (function () {
function ClientChannel(url, authorization, port, label, rtcConfiguration) {
function ClientChannel(url, authorization, port, label, rtcConfiguration // eslint-disable-line no-undef
) {
var _this = this;

@@ -51,0 +52,0 @@ this.userData = {};

@@ -0,5 +1,6 @@

import { ChannelId, Data, RawMessage } from '@geckos.io/common/lib/types';
import client, { ClientChannel } from './geckos/channel';
import { Data, RawMessage, ChannelId } from '@geckos.io/common/lib/types';
export default client;
export { client as geckos };
export type { ClientChannel, Data, RawMessage, ChannelId };
//# sourceMappingURL=index.d.ts.map

@@ -22,4 +22,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.geckos = void 0;
var channel_1 = __importStar(require("./geckos/channel"));
exports.geckos = channel_1.default;
exports.default = channel_1.default;
//# sourceMappingURL=index.js.map

@@ -0,3 +1,3 @@

import { ChannelId, Data, EventName, RawMessage } from '@geckos.io/common/lib/types';
import { Bridge } from '@geckos.io/common/lib/bridge';
import { RawMessage, Data, ChannelId, EventName } from '@geckos.io/common/lib/types';
interface RTCRemotePeerConnection {

@@ -4,0 +4,0 @@ id: ChannelId;

@@ -53,7 +53,8 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var bridge_1 = require("@geckos.io/common/lib/bridge");
var parseMessage_1 = __importDefault(require("@geckos.io/common/lib/parseMessage"));
var sendMessage_1 = __importDefault(require("@geckos.io/common/lib/sendMessage"));
var bridge_1 = require("@geckos.io/common/lib/bridge");
var ConnectionsManagerClient = /** @class */ (function () {
function ConnectionsManagerClient(url, authorization, label, rtcConfiguration) {
function ConnectionsManagerClient(url, authorization, label, rtcConfiguration // eslint-disable-line no-undef
) {
var _this = this;

@@ -99,6 +100,10 @@ this.url = url;

if (!res.ok) return [3 /*break*/, 3];
return [4 /*yield*/, res.json()];
return [4 /*yield*/, res.json()
// eslint-disable-next-line no-undef
];
case 2:
candidates = _a.sent();
// eslint-disable-next-line no-undef
candidates.forEach(function (c) {
// eslint-disable-line no-undef
_this.localPeerConnection.addIceCandidate(c);

@@ -134,2 +139,10 @@ });

res = _c.sent();
if (res.status >= 300) {
throw {
name: 'Error',
message: "Connection failed with status code " + res.status + ".",
status: res.status,
statusText: res.statusText
};
}
return [4 /*yield*/, res.json()];

@@ -150,6 +163,4 @@ case 3:

sdpSemantics: 'unified-plan' }, this.rtcConfiguration);
RTCPc = RTCPeerConnection ||
webkitRTCPeerConnection ||
// @ts-ignore
mozRTCPeerConnection;
RTCPc = RTCPeerConnection || webkitRTCPeerConnection // eslint-disable-line no-undef
;
// create rtc peer connection

@@ -156,0 +167,0 @@ this.localPeerConnection = new RTCPc(configuration);

@@ -0,3 +1,3 @@

import { ChannelId } from '@geckos.io/common/lib/types';
import ConnectionsManagerClient from './connectionsManager';
import { ChannelId } from '@geckos.io/common/lib/types';
export default class PeerConnection {

@@ -4,0 +4,0 @@ dataChannel: RTCDataChannel;

@@ -49,6 +49,4 @@ "use strict";

case 0:
webRTCPcSupported = RTCPeerConnection ||
webkitRTCPeerConnection ||
// @ts-ignore
mozRTCPeerConnection;
webRTCPcSupported = RTCPeerConnection || webkitRTCPeerConnection // eslint-disable-line no-undef
;
if (!webRTCPcSupported) return [3 /*break*/, 2];

@@ -55,0 +53,0 @@ return [4 /*yield*/, connectionsManager.connect()];

{
"name": "@geckos.io/client",
"version": "2.0.0-dev.3",
"version": "2.0.0-dev.4",
"description": "Real-time client/server communication over UDP using WebRTC and Node.js",

@@ -44,3 +44,3 @@ "main": "./lib/index.js",

"dependencies": {
"@geckos.io/common": "^2.0.0-dev.3"
"@geckos.io/common": "^2.0.0-dev.4"
},

@@ -47,0 +47,0 @@ "funding": {

@@ -0,0 +0,0 @@ <a href="http://geckos.io">

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

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

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