stanza 12.19.0 → 12.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.directionToSenders = exports.sendersToDirection = exports.JINGLE_INFO_RECEIVED_5 = exports.JINGLE_INFO_CHECKSUM_5 = exports.JINGLE_INFO_RINGING = exports.JINGLE_INFO_ACTIVE = exports.JINGLE_INFO_UNHOLD = exports.JINGLE_INFO_HOLD = exports.JINGLE_INFO_UNMUTE = exports.JINGLE_INFO_MUTE = exports.JINGLE_INFO = exports.USER_ACTIVITY_SPECIFIC = exports.USER_ACTIVITY_GENERAL = exports.USER_MOODS = exports.JingleReasonCondition = exports.JingleErrorCondition = exports.JingleAction = exports.JingleContentSenders = exports.JingleApplicationDirection = exports.JingleSessionRole = exports.ChatState = exports.PubsubErrorCondition = exports.MUCStatusCode = exports.MUCRole = exports.MUCAffiliation = exports.DataFormFieldType = exports.DataFormType = exports.RosterSubscription = exports.PresenceShow = exports.IQType = exports.PresenceType = exports.MessageType = exports.StanzaErrorCondition = exports.StreamErrorCondition = exports.SASLFailureCondition = exports.StreamType = exports.VERSION = void 0;
4
4
  const Namespaces_1 = require("./Namespaces");
5
- exports.VERSION = '12.19.0';
5
+ exports.VERSION = '12.20.0';
6
6
  // ====================================================================
7
7
  // Frequently Used Values
8
8
  // ====================================================================
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stanza",
3
3
  "description": "Modern XMPP in the browser, with a JSON API",
4
- "version": "12.19.0",
4
+ "version": "12.20.0",
5
5
  "author": "Lance Stout <lancestout@gmail.com>",
6
6
  "bugs": "https://github.com/legastero/stanza/issues",
7
7
  "contributors": [
@@ -1 +1 @@
1
- export function nextTick(fun: any, ...args: any[]): void;
1
+ export declare function nextTick(callback: Function, ...args: any[]): void;
@@ -1,62 +1,8 @@
1
1
  "use strict";
2
- // v8 likes predictible objects
3
- function Item(fun, array) {
4
- this.fun = fun;
5
- this.array = array;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nextTick = void 0;
4
+ /* eslint-disable @typescript-eslint/ban-types */
5
+ function nextTick(callback, ...args) {
6
+ queueMicrotask(() => callback(...args));
6
7
  }
7
- Item.prototype.run = function () {
8
- this.fun.apply(null, this.array);
9
- };
10
- var queue = [];
11
- var draining = false;
12
- var currentQueue;
13
- var queueIndex = -1;
14
- function cleanUpNextTick() {
15
- if (!draining || !currentQueue) {
16
- return;
17
- }
18
- draining = false;
19
- if (currentQueue.length) {
20
- queue = currentQueue.concat(queue);
21
- }
22
- else {
23
- queueIndex = -1;
24
- }
25
- if (queue.length) {
26
- drainQueue();
27
- }
28
- }
29
- function drainQueue() {
30
- if (draining) {
31
- return;
32
- }
33
- var timeout = setTimeout(cleanUpNextTick, 0);
34
- draining = true;
35
- var len = queue.length;
36
- while (len) {
37
- currentQueue = queue;
38
- queue = [];
39
- while (++queueIndex < len) {
40
- if (currentQueue) {
41
- currentQueue[queueIndex].run();
42
- }
43
- }
44
- queueIndex = -1;
45
- len = queue.length;
46
- }
47
- currentQueue = null;
48
- draining = false;
49
- clearTimeout(timeout);
50
- }
51
- exports.nextTick = function (fun) {
52
- var args = new Array(arguments.length - 1);
53
- if (arguments.length > 1) {
54
- for (var i = 1; i < arguments.length; i++) {
55
- args[i - 1] = arguments[i];
56
- }
57
- }
58
- queue.push(new Item(fun, args));
59
- if (queue.length === 1 && !draining) {
60
- setTimeout(drainQueue, 0);
61
- }
62
- };
8
+ exports.nextTick = nextTick;
@@ -37,7 +37,8 @@ export interface RosterItem {
37
37
  jid: string;
38
38
  name?: string;
39
39
  subscription: RosterSubscription;
40
- approved?: boolean;
40
+ pending?: 'subscribe';
41
+ preApproved?: boolean;
41
42
  ask?: boolean;
42
43
  groups?: string[];
43
44
  }