rsocket-core
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -60,5 +60,2 @@ 'use strict'; | ||
/** | ||
* @deprecated since 0.0.21 in favor of {@link decodeCompositeMetadata} | ||
*/ | ||
// $FlowFixMe | ||
@@ -65,0 +62,0 @@ class CompositeMetadata { |
@@ -680,2 +680,8 @@ /** Copyright (c) Facebook, Inc. and its affiliates. | ||
}); | ||
Object.defineProperty(exports, 'RoutingMetadata', { | ||
enumerable: true, | ||
get: function () { | ||
return _RoutingMetadata.RoutingMetadata; | ||
}, | ||
}); | ||
Object.defineProperty(exports, 'encodeRoute', { | ||
@@ -767,2 +773,3 @@ enumerable: true, | ||
var _RoutingMetadata = require('./RoutingMetadata'); | ||
var _AuthMetadata = require('./AuthMetadata'); | ||
@@ -769,0 +776,0 @@ function _getRequireWildcardCache() { |
@@ -5,2 +5,7 @@ 'use strict'; | ||
var _buffer = _interopRequireDefault(require('buffer')); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj}; | ||
} | ||
const bufferExists = | ||
@@ -967,2 +972,13 @@ typeof global !== 'undefined' && global.hasOwnProperty('Buffer'); | ||
if (!bufferExists) { | ||
if (_buffer.default.hasOwnProperty('Buffer')) { | ||
// ExistingBuffer is likely to be a polyfill, hence we can override it | ||
// eslint-disable-next-line no-undef | ||
// $FlowFixMe | ||
Object.defineProperty(_buffer.default, 'Buffer', { | ||
configurable: true, | ||
enumerable: false, | ||
value: Buffer, | ||
writable: true, | ||
}); | ||
} | ||
// eslint-disable-next-line no-undef | ||
@@ -969,0 +985,0 @@ Object.defineProperty(window, 'Buffer', { |
@@ -6,2 +6,3 @@ 'use strict'; | ||
exports.decodeRoutes = decodeRoutes; | ||
exports.RoutingMetadata = void 0; | ||
@@ -11,2 +12,18 @@ var _LiteBuffer = require('./LiteBuffer'); | ||
// $FlowFixMe | ||
class RoutingMetadata { | ||
constructor(buffer) { | ||
this._buffer = buffer; | ||
} | ||
iterator() { | ||
return decodeRoutes(this._buffer); | ||
} | ||
// $FlowFixMe | ||
[Symbol.iterator]() { | ||
return decodeRoutes(this._buffer); | ||
} | ||
} | ||
/** | ||
@@ -17,3 +34,3 @@ * Encode given set of routes into {@link Buffer} following the <a href="https://github.com/rsocket/rsocket/blob/master/Extensions/Routing.md">Routing Metadata Layout</a> | ||
* @returns {Buffer} with encoded content | ||
*/ | ||
*/ exports.RoutingMetadata = RoutingMetadata; | ||
function encodeRoutes(...routes) { | ||
@@ -20,0 +37,0 @@ if (routes.length < 1) { |
@@ -88,4 +88,7 @@ /** Copyright (c) Facebook, Inc. and its affiliates. | ||
onSubscribe: (_subscription) => { | ||
subscriber.onSubscribe(() => _subscription.cancel()); | ||
subscription = _subscription; | ||
subscriber.onSubscribe(() => { | ||
_subscription.cancel(); | ||
transport.close(); | ||
}); | ||
subscription.request(Number.MAX_SAFE_INTEGER); | ||
@@ -92,0 +95,0 @@ }, |
{ | ||
"name": "rsocket-core", | ||
"description": "RSocket core", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"repository": { | ||
@@ -13,6 +13,6 @@ "type": "git", | ||
"fbjs": "^2.0.0", | ||
"rsocket-flowable": "^0.0.22", | ||
"rsocket-types": "^0.0.22" | ||
"rsocket-flowable": "^0.0.23", | ||
"rsocket-types": "^0.0.23" | ||
}, | ||
"gitHead": "08bef0b23b481c3dceceef875196d8a8bfc1930c" | ||
"gitHead": "8e357291ed8d6741460b648dcc96d50aec427d4e" | ||
} |
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 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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
577197
11835
+ Addedrsocket-flowable@0.0.23(transitive)
+ Addedrsocket-types@0.0.23(transitive)
- Removedrsocket-flowable@0.0.22(transitive)
- Removedrsocket-types@0.0.22(transitive)
Updatedrsocket-flowable@^0.0.23
Updatedrsocket-types@^0.0.23