@remote-ui/async-subscription
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -1,9 +0,6 @@ | ||
"use strict"; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.createRemoteSubscribable = createRemoteSubscribable; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var _rpc = require("@remote-ui/rpc"); | ||
var rpc = require('@remote-ui/rpc'); | ||
@@ -15,3 +12,3 @@ function createRemoteSubscribable(subscription) { | ||
subscribe: function subscribe(subscriber) { | ||
(0, _rpc.retain)(subscriber); | ||
rpc.retain(subscriber); | ||
var unsubscribe = subscription.subscribe(function () { | ||
@@ -24,3 +21,3 @@ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : subscription.current; | ||
unsubscribe(); | ||
(0, _rpc.release)(subscriber); | ||
rpc.release(subscriber); | ||
}; | ||
@@ -31,2 +28,4 @@ | ||
}; | ||
} | ||
} | ||
exports.createRemoteSubscribable = createRemoteSubscribable; |
@@ -1,21 +0,11 @@ | ||
"use strict"; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "makeStatefulSubscribable", { | ||
enumerable: true, | ||
get: function get() { | ||
return _stateful.makeStatefulSubscribable; | ||
} | ||
}); | ||
Object.defineProperty(exports, "createRemoteSubscribable", { | ||
enumerable: true, | ||
get: function get() { | ||
return _create.createRemoteSubscribable; | ||
} | ||
}); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var _stateful = require("./stateful"); | ||
var stateful = require('./stateful.js'); | ||
var create = require('./create.js'); | ||
var _create = require("./create"); | ||
exports.makeStatefulSubscribable = stateful.makeStatefulSubscribable; | ||
exports.createRemoteSubscribable = create.createRemoteSubscribable; |
@@ -1,32 +0,8 @@ | ||
"use strict"; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.makeStatefulSubscribable = makeStatefulSubscribable; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js'); | ||
var rpc = require('@remote-ui/rpc'); | ||
var _rpc = require("@remote-ui/rpc"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
function makeStatefulSubscribable(subscription) { | ||
@@ -36,3 +12,3 @@ // We retain because it will automatically retain any functions we get from | ||
// for unsubscribe callbacks received from subscription.subscribe(). | ||
(0, _rpc.retain)(subscription); | ||
rpc.retain(subscription); | ||
var current = subscription.initial; | ||
@@ -53,10 +29,10 @@ var listening = true; | ||
return function () { | ||
subscribers["delete"](subscriber); | ||
subscribers.delete(subscriber); | ||
}; | ||
}, | ||
destroy: function destroy() { | ||
return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
return _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() { | ||
var _yield$subscriptionRe, _yield$subscriptionRe2, unsubscribe; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -72,6 +48,6 @@ switch (_context.prev = _context.next) { | ||
_yield$subscriptionRe = _context.sent; | ||
_yield$subscriptionRe2 = _slicedToArray(_yield$subscriptionRe, 1); | ||
_yield$subscriptionRe2 = _rollupPluginBabelHelpers.slicedToArray(_yield$subscriptionRe, 1); | ||
unsubscribe = _yield$subscriptionRe2[0]; | ||
unsubscribe(); | ||
(0, _rpc.release)(subscription); | ||
rpc.release(subscription); | ||
@@ -92,3 +68,3 @@ case 9: | ||
var _iterator = _createForOfIteratorHelper(subscribers), | ||
var _iterator = _rollupPluginBabelHelpers.createForOfIteratorHelper(subscribers), | ||
_step; | ||
@@ -107,2 +83,4 @@ | ||
} | ||
} | ||
} | ||
exports.makeStatefulSubscribable = makeStatefulSubscribable; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createRemoteSubscribable = exports.makeStatefulSubscribable = void 0; | ||
var stateful_1 = require("./stateful"); | ||
@@ -4,0 +5,0 @@ Object.defineProperty(exports, "makeStatefulSubscribable", { enumerable: true, get: function () { return stateful_1.makeStatefulSubscribable; } }); |
@@ -1,1 +0,1 @@ | ||
module.exports = require("./build/cjs/index"); | ||
module.exports = require("./build/cjs/index.js"); |
{ | ||
"name": "@remote-ui/async-subscription", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"publishConfig": { | ||
@@ -23,5 +23,5 @@ "access": "public", | ||
"dependencies": { | ||
"@remote-ui/rpc": "^1.0.17" | ||
"@remote-ui/rpc": "^1.0.18" | ||
}, | ||
"gitHead": "062fade9805fe58f5b22cf1c7921615526528689" | ||
"gitHead": "0550a299ecee6327dd8751ac1809a7c614aed141" | ||
} |
@@ -1,7 +0,8 @@ | ||
import {createPackage} from '@sewing-kit/config'; | ||
import {createPackage, Runtime} from '@sewing-kit/config'; | ||
import {defaultProjectPlugin} from '../../config/sewing-kit'; | ||
export default createPackage((pkg) => { | ||
pkg.runtimes(Runtime.Node, Runtime.Browser); | ||
pkg.entry({root: './src/index'}); | ||
pkg.use(defaultProjectPlugin()); | ||
}); |
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
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
159405
46
1008
Updated@remote-ui/rpc@^1.0.18