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

getstream

Package Overview
Dependencies
Maintainers
10
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 8.1.5 to 8.2.0

8

lib/client.d.ts

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

/// <reference types="node" />
import * as http from 'http';
import * as https from 'https';
import * as axios from 'axios';
import * as Faye from 'faye';
import * as http from 'http';
import * as https from 'https';
import { Personalization } from './personalization';

@@ -272,3 +272,4 @@ import { Collections } from './collections';

replaceReactionOptions: (options: {
reactions?: Record<string, boolean>;
reactionKindsFilter?: string[];
reactions?: Record<string, boolean | string[]>;
withOwnChildren?: boolean;

@@ -282,2 +283,3 @@ withOwnReactions?: boolean;

ownReactions?: boolean;
reactionKindsFilter?: string[];
withOwnChildren?: boolean;

@@ -284,0 +286,0 @@ withReactionCounts?: boolean;

@@ -16,6 +16,6 @@ "use strict";

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var http = _interopRequireWildcard(require("http"));
var https = _interopRequireWildcard(require("https"));
var axios = _interopRequireWildcard(require("axios"));
var Faye = _interopRequireWildcard(require("faye"));
var http = _interopRequireWildcard(require("http"));
var https = _interopRequireWildcard(require("https"));
var _jwtDecode = _interopRequireDefault(require("jwt-decode"));

@@ -69,5 +69,3 @@ var _personalization = require("./personalization");

function StreamClient(apiKey, apiSecretOrToken, appId) {
var _this = this,
_process$env,
_process$env2;
var _this = this;
var _options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};

@@ -129,2 +127,5 @@ (0, _classCallCheck2.default)(this, StreamClient);

}
if (options.reactions.kinds != null) {
options.reactionKindsFilter = options.reactions.kinds;
}
delete options.reactions;

@@ -204,4 +205,11 @@ }

this.baseUrl = this.getBaseUrl();
if (typeof process !== 'undefined' && (_process$env = process.env) !== null && _process$env !== 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 && _process$env2.STREAM_ANALYTICS_BASE_URL) this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;
if (typeof process !== 'undefined') {
var _process$env, _process$env2;
if ((_process$env = process.env) !== null && _process$env !== void 0 && _process$env.LOCAL_FAYE) {
this.fayeUrl = 'http://localhost:9999/faye/';
}
if ((_process$env2 = process.env) !== null && _process$env2 !== void 0 && _process$env2.STREAM_ANALYTICS_BASE_URL) {
this.baseAnalyticsUrl = process.env.STREAM_ANALYTICS_BASE_URL;
}
}
this.handlers = {};

@@ -361,3 +369,3 @@ this.node = typeof window === 'undefined'; // use for real browser vs node behavior

value: function userAgent() {
if (process.env.PACKAGE_VERSION === undefined) {
if (process === undefined || process.env.PACKAGE_VERSION === undefined) {
// eslint-disable-next-line

@@ -461,3 +469,3 @@ return "stream-javascript-client-".concat(this.node ? 'node' : 'browser', "-").concat(require('../package.json').version);

}
return this.enrichByDefault || options.ownReactions != null || options.withRecentReactions != null || options.withReactionCounts != null || options.withOwnChildren != null;
return this.enrichByDefault || options.ownReactions != null || options.reactionKindsFilter != null || options.withRecentReactions != null || options.withReactionCounts != null || options.withOwnChildren != null;
}

@@ -464,0 +472,0 @@

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

ownReactions?: boolean;
reactionKindsFilter?: string;
reactionKindsFilter?: string[];
recentReactionsLimit?: number;

@@ -17,0 +17,0 @@ withOwnChildren?: boolean;

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

"license": "BSD-3-Clause",
"version": "8.1.5",
"version": "8.2.0",
"scripts": {

@@ -76,4 +76,4 @@ "changelog": "standard-version --release-as $VERSION --skip.tag --skip.commit --tag-prefix=v",

"@commitlint/config-conventional": "^17.6.3",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"babel-loader": "^9.1.2",

@@ -84,7 +84,7 @@ "chai": "^4.3.4",

"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-chai-friendly": "^0.7.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-sonarjs": "^0.19.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-sonarjs": "^0.20.0",
"eslint-plugin-typescript-sort-keys": "^2.1.0",

@@ -104,3 +104,5 @@ "expect.js": "^0.3.1",

"nyc": "^15.1.0",
"prettier": "^2.5.1",
"prettier": "^3.0.1",
"puppeteer": "^21.0.1",
"puppeteer-core": "^21.0.1",
"request": "^2.88.2",

@@ -123,4 +125,2 @@ "standard-version": "^9.3.2",

"jwt-decode": "^3.1.2",
"puppeteer": "^20.2.1",
"puppeteer-core": "^20.2.1",
"qs": "^6.10.2"

@@ -127,0 +127,0 @@ },

@@ -287,3 +287,3 @@ # Official JavaScript SDK for [Stream Feeds](https://getstream.io/activity-feeds/)

```ts
import { connect, UR, EnrichedActivity, NotificationActivity } from getstream;
import { connect, UR, EnrichedActivity, NotificationActivity } from 'getstream';

@@ -290,0 +290,0 @@ type User1Type = { name: string; username: string; image?: string };

/// <reference path="../types/modules.d.ts" />
import * as http from 'http';
import * as https from 'https';
import * as axios from 'axios';
import * as Faye from 'faye';
import * as http from 'http';
import * as https from 'https';
import jwtDecode from 'jwt-decode';

@@ -242,5 +242,10 @@

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;
if (typeof process !== 'undefined') {
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;
}
}

@@ -400,3 +405,3 @@ this.handlers = {};

userAgent() {
if (process.env.PACKAGE_VERSION === undefined) {
if (process === undefined || process.env.PACKAGE_VERSION === undefined) {
// eslint-disable-next-line

@@ -492,3 +497,4 @@ return `stream-javascript-client-${this.node ? 'node' : 'browser'}-${require('../package.json').version}`;

replaceReactionOptions = (options: {
reactions?: Record<string, boolean>;
reactionKindsFilter?: string[];
reactions?: Record<string, boolean | string[]>;
withOwnChildren?: boolean;

@@ -502,13 +508,16 @@ withOwnReactions?: boolean;

if (options.reactions.own != null) {
options.withOwnReactions = options.reactions.own;
options.withOwnReactions = options.reactions.own as boolean;
}
if (options.reactions.recent != null) {
options.withRecentReactions = options.reactions.recent;
options.withRecentReactions = options.reactions.recent as boolean;
}
if (options.reactions.counts != null) {
options.withReactionCounts = options.reactions.counts;
options.withReactionCounts = options.reactions.counts as boolean;
}
if (options.reactions.own_children != null) {
options.withOwnChildren = options.reactions.own_children;
options.withOwnChildren = options.reactions.own_children as boolean;
}
if (options.reactions.kinds != null) {
options.reactionKindsFilter = options.reactions.kinds as string[];
}
delete options.reactions;

@@ -522,2 +531,3 @@ }

ownReactions?: boolean;
reactionKindsFilter?: string[];
withOwnChildren?: boolean;

@@ -537,2 +547,3 @@ withReactionCounts?: boolean;

options.ownReactions != null ||
options.reactionKindsFilter != null ||
options.withRecentReactions != null ||

@@ -539,0 +550,0 @@ options.withReactionCounts != null ||

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

ownReactions?: boolean; // best not to use it, will be removed by client.replaceReactionOptions()
reactionKindsFilter?: string; // TODO: add support for array sample: kind,kind,kind
reactionKindsFilter?: string[]; // TODO: add support for array sample: kind,kind,kind
recentReactionsLimit?: number;

@@ -22,0 +22,0 @@ withOwnChildren?: boolean;

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

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