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

getstream

Package Overview
Dependencies
Maintainers
7
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

getstream - npm Package Compare versions

Comparing version 6.1.3 to 6.1.4

6

CHANGELOG.md

@@ -8,2 +8,8 @@ # CHANGELOG

## [6.1.3](https://github.com/GetStream/stream-js/releases/tag/v6.1.3) - 2020-09-15
### Fixed
- Enrich option respects the enrich value if not undefined ([#382](https://github.com/GetStream/stream-js/pull/382)).
## [6.1.2](https://github.com/GetStream/stream-js/releases/tag/v6.1.2) - 2020-09-03

@@ -10,0 +16,0 @@

4

lib/client.d.ts

@@ -5,4 +5,4 @@ /// <reference path="../types/modules.d.ts" />

import * as Faye from 'faye';
import http from 'http';
import https from 'https';
import * as http from 'http';
import * as https from 'https';
import { Personalization } from './personalization';

@@ -9,0 +9,0 @@ import { Collections } from './collections';

@@ -30,5 +30,5 @@ "use strict";

var _http = _interopRequireDefault(require("http"));
var http = _interopRequireWildcard(require("http"));
var _https = _interopRequireDefault(require("https"));
var https = _interopRequireWildcard(require("https"));

@@ -96,6 +96,4 @@ var _jwtDecode = _interopRequireDefault(require("jwt-decode"));

var _this = this,
_process,
_process$env,
_process2,
_process2$env;
_process$env2;

@@ -250,4 +248,4 @@ var _options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};

this.baseUrl = this.getBaseUrl();
if ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.LOCAL_FAYE) this.fayeUrl = 'http://localhost:9999/faye/';
if ((_process2 = process) === null || _process2 === void 0 ? void 0 : (_process2$env = _process2.env) === null || _process2$env === void 0 ? void 0 : _process2$env.STREAM_ANALYTICS_BASE_URL) this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;
if (typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.LOCAL_FAYE)) this.fayeUrl = 'http://localhost:9999/faye/';
if (typeof process !== 'undefined' && ((_process$env2 = process.env) === null || _process$env2 === void 0 ? void 0 : _process$env2.STREAM_ANALYTICS_BASE_URL)) this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;
this.handlers = {};

@@ -260,7 +258,7 @@ this.browser = typeof this.options.browser !== 'undefined' ? this.options.browser : typeof window !== 'undefined';

this.nodeOptions = {
httpAgent: new _http.default.Agent({
httpAgent: new http.Agent({
keepAlive: keepAlive,
keepAliveMsecs: 3000
}),
httpsAgent: new _https.default.Agent({
httpsAgent: new https.Agent({
keepAlive: keepAlive,

@@ -343,3 +341,3 @@ keepAliveMsecs: 3000

value: function getBaseUrl(serviceName) {
var _process3, _process3$env, _process4, _process4$env;
var _process$env3, _process$env4;

@@ -349,4 +347,4 @@ if (!serviceName) serviceName = 'api';

var urlEnvironmentKey = serviceName === 'api' ? 'STREAM_BASE_URL' : "STREAM_".concat(serviceName.toUpperCase(), "_URL");
if ((_process3 = process) === null || _process3 === void 0 ? void 0 : (_process3$env = _process3.env) === null || _process3$env === void 0 ? void 0 : _process3$env[urlEnvironmentKey]) return process.env[urlEnvironmentKey];
if (((_process4 = process) === null || _process4 === void 0 ? void 0 : (_process4$env = _process4.env) === null || _process4$env === void 0 ? void 0 : _process4$env.LOCAL) || this.options.local) return "http://localhost:8000/".concat(serviceName, "/");
if (typeof process !== 'undefined' && ((_process$env3 = process.env) === null || _process$env3 === void 0 ? void 0 : _process$env3[urlEnvironmentKey])) return process.env[urlEnvironmentKey];
if (typeof process !== 'undefined' && ((_process$env4 = process.env) === null || _process$env4 === void 0 ? void 0 : _process$env4.LOCAL) || this.options.local) return "http://localhost:8000/".concat(serviceName, "/");

@@ -353,0 +351,0 @@ if (this.location) {

@@ -33,3 +33,5 @@ "use strict";

function connect(apiKey, apiSecret, appId, options) {
if (typeof process !== 'undefined' && process.env && process.env.STREAM_URL && !apiKey) {
var _process$env;
if (typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.STREAM_URL) && !apiKey) {
var parts = /https:\/\/(\w+):(\w+)@([\w-]*).*\?app_id=(\d+)/.exec(process.env.STREAM_URL) || [];

@@ -36,0 +38,0 @@ apiKey = parts[1];

@@ -14,3 +14,3 @@ {

"license": "BSD-3-Clause",
"version": "6.1.3",
"version": "6.1.4",
"scripts": {

@@ -76,2 +76,3 @@ "transpile": "babel src --out-dir lib --extensions '.ts'",

"codecov": "^3.7.2",
"dotenv": "^8.2.0",
"eslint": "^7.8.1",

@@ -78,0 +79,0 @@ "eslint-config-airbnb-base": "^14.2.0",

@@ -5,4 +5,4 @@ /// <reference path="../types/modules.d.ts" />

import * as Faye from 'faye';
import http from 'http';
import https from 'https';
import * as http from 'http';
import * as https from 'https';
import jwtDecode from 'jwt-decode';

@@ -223,4 +223,5 @@

if (process?.env?.LOCAL_FAYE) this.fayeUrl = 'http://localhost:9999/faye/';
if (process?.env?.STREAM_ANALYTICS_BASE_URL) this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;
if (typeof process !== 'undefined' && process.env?.LOCAL_FAYE) this.fayeUrl = 'http://localhost:9999/faye/';
if (typeof process !== 'undefined' && process.env?.STREAM_ANALYTICS_BASE_URL)
this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;

@@ -317,5 +318,7 @@ this.handlers = {};

const urlEnvironmentKey = serviceName === 'api' ? 'STREAM_BASE_URL' : `STREAM_${serviceName.toUpperCase()}_URL`;
if (process?.env?.[urlEnvironmentKey]) return process.env[urlEnvironmentKey] as string;
if (typeof process !== 'undefined' && process.env?.[urlEnvironmentKey])
return process.env[urlEnvironmentKey] as string;
if (process?.env?.LOCAL || this.options.local) return `http://localhost:8000/${serviceName}/`;
if ((typeof process !== 'undefined' && process.env?.LOCAL) || this.options.local)
return `http://localhost:8000/${serviceName}/`;

@@ -322,0 +325,0 @@ if (this.location) {

@@ -33,3 +33,3 @@ import { StreamClient, UnknownRecord, ClientOptions } from './client';

>(apiKey: string, apiSecret: string | null, appId?: string, options?: ClientOptions) {
if (typeof process !== 'undefined' && process.env && process.env.STREAM_URL && !apiKey) {
if (typeof process !== 'undefined' && process.env?.STREAM_URL && !apiKey) {
const parts = /https:\/\/(\w+):(\w+)@([\w-]*).*\?app_id=(\d+)/.exec(process.env.STREAM_URL) || [];

@@ -36,0 +36,0 @@ apiKey = parts[1];

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

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

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