@intuitionrobotics/push-pub-sub 0.41.67 → 0.41.70

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.
@@ -17,19 +17,6 @@
17
17
  * See the License for the specific language governing permissions and
18
18
  * limitations under the License.
19
19
  */
20
- var __extends = (this && this.__extends) || (function () {
21
- var extendStatics = function (d, b) {
22
- extendStatics = Object.setPrototypeOf ||
23
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25
- return extendStatics(d, b);
26
- };
27
- return function (d, b) {
28
- extendStatics(d, b);
29
- function __() { this.constructor = d; }
30
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31
- };
32
- })();
33
20
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
34
21
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
35
22
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -39,51 +26,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
39
26
  step((generator = generator.apply(thisArg, _arguments || [])).next());
40
27
  });
41
28
  };
42
- var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
- function verb(n) { return function (v) { return step([n, v]); }; }
46
- function step(op) {
47
- if (f) throw new TypeError("Generator is already executing.");
48
- while (_) try {
49
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
50
- if (y = 0, t) op = [op[0] & 2, t.value];
51
- switch (op[0]) {
52
- case 0: case 1: t = op; break;
53
- case 4: _.label++; return { value: op[1], done: false };
54
- case 5: _.label++; y = op[1]; op = [0]; continue;
55
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
56
- default:
57
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
58
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
59
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
60
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
61
- if (t[2]) _.ops.pop();
62
- _.trys.pop(); continue;
63
- }
64
- op = body.call(thisArg, _);
65
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
66
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
67
- }
68
- };
69
29
  Object.defineProperty(exports, "__esModule", { value: true });
70
30
  exports.ScheduledCleanup = exports.ScheduledCleanup_Class = void 0;
71
- var backend_functions_1 = require("@intuitionrobotics/firebase/backend-functions");
72
- var PushPubSubModule_1 = require("./PushPubSubModule");
73
- var ScheduledCleanup_Class = /** @class */ (function (_super) {
74
- __extends(ScheduledCleanup_Class, _super);
75
- function ScheduledCleanup_Class() {
76
- var _this = _super.call(this) || this;
77
- _this.onScheduledEvent = function () { return __awaiter(_this, void 0, void 0, function () {
78
- return __generator(this, function (_a) {
79
- return [2 /*return*/, PushPubSubModule_1.PushPubSubModule.scheduledCleanup()];
80
- });
81
- }); };
82
- _this.setSchedule('every 1 hours');
83
- return _this;
31
+ const backend_functions_1 = require("@intuitionrobotics/firebase/backend-functions");
32
+ const PushPubSubModule_1 = require("./PushPubSubModule");
33
+ class ScheduledCleanup_Class extends backend_functions_1.FirebaseScheduledFunction {
34
+ constructor() {
35
+ super();
36
+ this.onScheduledEvent = () => __awaiter(this, void 0, void 0, function* () {
37
+ return PushPubSubModule_1.PushPubSubModule.scheduledCleanup();
38
+ });
39
+ this.setSchedule('every 1 hours');
84
40
  }
85
- return ScheduledCleanup_Class;
86
- }(backend_functions_1.FirebaseScheduledFunction));
41
+ }
87
42
  exports.ScheduledCleanup_Class = ScheduledCleanup_Class;
88
43
  exports.ScheduledCleanup = new ScheduledCleanup_Class();
89
44
  //# sourceMappingURL=ScheduledPushCleanup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScheduledPushCleanup.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/ScheduledPushCleanup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mFAAwF;AACxF,uDAAoD;AAEpD;IACS,0CAAyB;IAEjC;QAAA,YACC,iBAAO,SAEP;QAED,sBAAgB,GAAG;;gBAClB,sBAAO,mCAAgB,CAAC,gBAAgB,EAAE,EAAA;;aAC1C,CAAC;QALD,KAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;;IACnC,CAAC;IAKF,6BAAC;AAAD,CAAC,AAXD,CACS,6CAAyB,GAUjC;AAXY,wDAAsB;AAatB,QAAA,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"ScheduledPushCleanup.js","sourceRoot":"","sources":["../../../src/main/app-backend/modules/ScheduledPushCleanup.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,qFAAwF;AACxF,yDAAoD;AAEpD,MAAa,sBACZ,SAAQ,6CAAyB;IAEjC;QACC,KAAK,EAAE,CAAC;QAIT,qBAAgB,GAAG,GAAuB,EAAE;YAC3C,OAAO,mCAAgB,CAAC,gBAAgB,EAAE,CAAA;QAC3C,CAAC,CAAA,CAAC;QALD,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;IACnC,CAAC;CAKD;AAXD,wDAWC;AAEY,QAAA,gBAAgB,GAAG,IAAI,sBAAsB,EAAE,CAAC"}
@@ -29,9 +29,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
29
  };
30
30
  Object.defineProperty(exports, "__esModule", { value: true });
31
31
  exports.Frontend_ModulePack_PushPubSub = void 0;
32
- var PushPubSubModule_1 = require("../modules/PushPubSubModule");
33
- var frontend_1 = require("@intuitionrobotics/firebase/frontend");
34
- var NotificationModule_1 = require("../modules/NotificationModule");
32
+ const PushPubSubModule_1 = require("../modules/PushPubSubModule");
33
+ const frontend_1 = require("@intuitionrobotics/firebase/frontend");
34
+ const NotificationModule_1 = require("../modules/NotificationModule");
35
35
  exports.Frontend_ModulePack_PushPubSub = [
36
36
  frontend_1.FirebaseModule,
37
37
  PushPubSubModule_1.PushPubSubModule,
@@ -1 +1 @@
1
- {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,gEAA6D;AAC7D,iEAAoE;AACpE,oEAAkE;AAErD,QAAA,8BAA8B,GAAG;IAC7C,yBAAc;IACd,mCAAgB;IAChB,wCAAmB;CACnB,CAAC;AAEF,8DAA4C;AAC5C,gEAA8C"}
1
+ {"version":3,"file":"module-pack.js","sourceRoot":"","sources":["../../../src/main/app-frontend/core/module-pack.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;AAEH,kEAA6D;AAC7D,mEAAoE;AACpE,sEAAkE;AAErD,QAAA,8BAA8B,GAAG;IAC7C,yBAAc;IACd,mCAAgB;IAChB,wCAAmB;CACnB,CAAC;AAEF,8DAA4C;AAC5C,gEAA8C"}
@@ -1,44 +1,30 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.NotificationsModule = exports.NotificationsModule_Class = exports.dispatch_NotificationsUpdated = void 0;
17
- var thunder_dispatcher_1 = require("@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher");
18
- var ts_common_1 = require("@intuitionrobotics/ts-common");
19
- var frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
20
- var thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
4
+ const thunder_dispatcher_1 = require("@intuitionrobotics/thunderstorm/app-frontend/core/thunder-dispatcher");
5
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
6
+ const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
7
+ const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
21
8
  exports.dispatch_NotificationsUpdated = new thunder_dispatcher_1.ThunderDispatcher('__onNotificationsUpdated');
22
- var NotificationsModule_Class = /** @class */ (function (_super) {
23
- __extends(NotificationsModule_Class, _super);
24
- function NotificationsModule_Class() {
25
- var _this = _super !== null && _super.apply(this, arguments) || this;
26
- _this.notifications = [];
27
- _this.setNotificationList = function (notifications) {
28
- _this.notifications = notifications;
9
+ class NotificationsModule_Class extends ts_common_1.Module {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.notifications = [];
13
+ this.setNotificationList = (notifications) => {
14
+ this.notifications = notifications;
29
15
  exports.dispatch_NotificationsUpdated.dispatchUI([]);
30
16
  };
31
- _this.read = function (notification, read) {
32
- var readNotification = _this.notifications.find(function (_notification) { return _notification._id === notification._id; });
17
+ this.read = (notification, read) => {
18
+ const readNotification = this.notifications.find(_notification => _notification._id === notification._id);
33
19
  if (!readNotification || !readNotification.persistent)
34
20
  return;
35
21
  readNotification.read = read;
36
- _this.readNotification(notification._id, read);
22
+ this.readNotification(notification._id, read);
37
23
  };
38
- _this.readNotification = function (id, read) {
39
- var body = {
24
+ this.readNotification = (id, read) => {
25
+ const body = {
40
26
  _id: id,
41
- read: read
27
+ read
42
28
  };
43
29
  frontend_1.XhrHttpModule
44
30
  .createRequest(thunderstorm_1.HttpMethod.POST, 'read-notification')
@@ -46,26 +32,24 @@ var NotificationsModule_Class = /** @class */ (function (_super) {
46
32
  .setJsonBody(body)
47
33
  .setOnError('Something went wrong while reading your notification')
48
34
  .setTimeout(ts_common_1.Minute)
49
- .execute(function () {
35
+ .execute(() => {
50
36
  exports.dispatch_NotificationsUpdated.dispatchUI([]);
51
37
  });
52
38
  };
53
- return _this;
54
39
  }
55
- NotificationsModule_Class.prototype.getNotifications = function () {
40
+ getNotifications() {
56
41
  return this.notifications;
57
- };
58
- NotificationsModule_Class.prototype.addNotification = function (newNotification) {
42
+ }
43
+ addNotification(newNotification) {
59
44
  this.notifications.push(newNotification);
60
45
  exports.dispatch_NotificationsUpdated.dispatchUI([]);
61
- };
62
- NotificationsModule_Class.prototype.removeNotification = function (notification) {
46
+ }
47
+ removeNotification(notification) {
63
48
  ts_common_1.removeItemFromArray(this.notifications, notification);
64
49
  exports.dispatch_NotificationsUpdated.dispatchUI([]);
65
50
  return notification._id;
66
- };
67
- return NotificationsModule_Class;
68
- }(ts_common_1.Module));
51
+ }
52
+ }
69
53
  exports.NotificationsModule_Class = NotificationsModule_Class;
70
54
  exports.NotificationsModule = new NotificationsModule_Class();
71
55
  //# sourceMappingURL=NotificationModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2GAAuG;AACvG,0DAIsC;AAKtC,qEAAuE;AACvE,gEAA2D;AAM9C,QAAA,6BAA6B,GAAG,IAAI,sCAAiB,CAAqD,0BAA0B,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AAG,EAAE,IAAI,CAAC,CAAC;QAC/C,CAAC,CAAC;QAEF,qBAAgB,GAAG,CAAC,EAAU,EAAE,IAAa,EAAE,EAAE;YAChD,MAAM,IAAI,GAAG;gBACZ,GAAG,EAAE,EAAE;gBACP,IAAI;aACJ,CAAC;YAEF,wBAAa;iBACX,aAAa,CAAyB,yBAAU,CAAC,IAAI,EAAE,mBAAmB,CAAC;iBAC3E,cAAc,CAAC,eAAe,CAAC;iBAC/B,WAAW,CAAC,IAAI,CAAC;iBACjB,UAAU,CAAC,sDAAsD,CAAC;iBAClE,UAAU,CAAC,kBAAM,CAAC;iBAClB,OAAO,CAAC,GAAG,EAAE;gBACb,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;IAEH,CAAC;IA9CA,gBAAgB;QACf,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAOD,eAAe,CAAC,eAAiC;QAChD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACzC,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC9C,CAAC;IAED,kBAAkB,CAAC,YAA8B;QAChD,+BAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QACtD,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC7C,OAAO,YAAY,CAAC,GAAG,CAAC;IACzB,CAAC;CA4BD;AAnDD,8DAmDC;AAEY,QAAA,mBAAmB,GAAG,IAAI,yBAAyB,EAAE,CAAC"}
@@ -16,19 +16,6 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- var __extends = (this && this.__extends) || (function () {
20
- var extendStatics = function (d, b) {
21
- extendStatics = Object.setPrototypeOf ||
22
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
23
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24
- return extendStatics(d, b);
25
- };
26
- return function (d, b) {
27
- extendStatics(d, b);
28
- function __() { this.constructor = d; }
29
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
30
- };
31
- })();
32
19
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
33
20
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
34
21
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -38,222 +25,153 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
38
25
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39
26
  });
40
27
  };
41
- var __generator = (this && this.__generator) || function (thisArg, body) {
42
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
43
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44
- function verb(n) { return function (v) { return step([n, v]); }; }
45
- function step(op) {
46
- if (f) throw new TypeError("Generator is already executing.");
47
- while (_) try {
48
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
49
- if (y = 0, t) op = [op[0] & 2, t.value];
50
- switch (op[0]) {
51
- case 0: case 1: t = op; break;
52
- case 4: _.label++; return { value: op[1], done: false };
53
- case 5: _.label++; y = op[1]; op = [0]; continue;
54
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
55
- default:
56
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
57
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
58
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
59
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
60
- if (t[2]) _.ops.pop();
61
- _.trys.pop(); continue;
62
- }
63
- op = body.call(thisArg, _);
64
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
65
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
66
- }
67
- };
68
28
  Object.defineProperty(exports, "__esModule", { value: true });
69
29
  exports.PushPubSubModule = exports.PushPubSubModule_Class = exports.pushSessionIdKey = exports.Command_SwToApp = void 0;
70
- var ts_common_1 = require("@intuitionrobotics/ts-common");
71
- var frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
72
- var thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
73
- var frontend_2 = require("@intuitionrobotics/firebase/frontend");
74
- var NotificationModule_1 = require("./NotificationModule");
30
+ const ts_common_1 = require("@intuitionrobotics/ts-common");
31
+ const frontend_1 = require("@intuitionrobotics/thunderstorm/frontend");
32
+ const thunderstorm_1 = require("@intuitionrobotics/thunderstorm");
33
+ const frontend_2 = require("@intuitionrobotics/firebase/frontend");
34
+ const NotificationModule_1 = require("./NotificationModule");
75
35
  exports.Command_SwToApp = "SwToApp";
76
36
  exports.pushSessionIdKey = "x-push-session-id";
77
- var pushSessionId = new frontend_1.StorageKey(exports.pushSessionIdKey, false);
78
- var PushPubSubModule_Class = /** @class */ (function (_super) {
79
- __extends(PushPubSubModule_Class, _super);
80
- function PushPubSubModule_Class() {
81
- var _this = _super.call(this) || this;
82
- _this.subscriptions = [];
83
- _this.dispatch_pushMessage = new frontend_1.ThunderDispatcher("__onMessageReceived");
84
- _this.timeout = 800;
85
- _this.registerServiceWorker = function () { return __awaiter(_this, void 0, void 0, function () {
86
- return __generator(this, function (_a) {
87
- switch (_a.label) {
88
- case 0:
89
- console.log("Registering service worker...");
90
- return [4 /*yield*/, navigator.serviceWorker.register("/" + (this.config.swFileName || "ts_service_worker.js"))];
91
- case 1: return [2 /*return*/, _a.sent()];
92
- }
93
- });
94
- }); };
95
- _this.initApp = function () {
37
+ const pushSessionId = new frontend_1.StorageKey(exports.pushSessionIdKey, false);
38
+ class PushPubSubModule_Class extends ts_common_1.Module {
39
+ constructor() {
40
+ super();
41
+ this.subscriptions = [];
42
+ this.dispatch_pushMessage = new frontend_1.ThunderDispatcher("__onMessageReceived");
43
+ this.timeout = 800;
44
+ this.registerServiceWorker = () => __awaiter(this, void 0, void 0, function* () {
45
+ console.log("Registering service worker...");
46
+ return yield navigator.serviceWorker.register(`/${this.config.swFileName || "ts_service_worker.js"}`);
47
+ });
48
+ this.initApp = () => {
96
49
  var _a;
97
- if (!((_a = _this.config) === null || _a === void 0 ? void 0 : _a.publicKeyBase64))
98
- throw new ts_common_1.ImplementationMissingException("Please specify the right config for the 'PushPubSubModule'");
99
- _this.runAsync("Initializing Firebase SDK and registering SW", function () { return __awaiter(_this, void 0, void 0, function () {
100
- var asyncs, _a, registration, app;
101
- var _this = this;
102
- return __generator(this, function (_b) {
103
- switch (_b.label) {
104
- case 0:
105
- if (!("serviceWorker" in navigator)) return [3 /*break*/, 4];
106
- asyncs = [
107
- this.registerServiceWorker(),
108
- frontend_2.FirebaseModule.createSession()
109
- ];
110
- return [4 /*yield*/, Promise.all(asyncs)];
111
- case 1:
112
- _a = _b.sent(), registration = _a[0], app = _a[1];
113
- return [4 /*yield*/, registration.update()];
114
- case 2:
115
- _b.sent();
116
- this.messaging = app.getMessaging();
117
- // this.messaging.usePublicVapidKey(this.config.publicKeyBase64);
118
- // await this.messaging.useServiceWorker(registration);
119
- return [4 /*yield*/, this.getToken({ vapidKey: this.config.publicKeyBase64, serviceWorkerRegistration: registration })];
120
- case 3:
121
- // this.messaging.usePublicVapidKey(this.config.publicKeyBase64);
122
- // await this.messaging.useServiceWorker(registration);
123
- _b.sent();
124
- if (navigator.serviceWorker.controller) {
125
- console.log("This page is currently controlled by: " + navigator.serviceWorker.controller);
126
- }
127
- navigator.serviceWorker.oncontrollerchange = function () {
128
- console.log("This page is now controlled by:", navigator.serviceWorker.controller);
129
- };
130
- navigator.serviceWorker.onmessage = function (event) {
131
- _this.processMessageFromSw(event.data);
132
- };
133
- _b.label = 4;
134
- case 4: return [2 /*return*/];
50
+ if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.publicKeyBase64))
51
+ throw new ts_common_1.ImplementationMissingException(`Please specify the right config for the 'PushPubSubModule'`);
52
+ this.runAsync("Initializing Firebase SDK and registering SW", () => __awaiter(this, void 0, void 0, function* () {
53
+ if ("serviceWorker" in navigator) {
54
+ const asyncs = [
55
+ this.registerServiceWorker(),
56
+ frontend_2.FirebaseModule.createSession()
57
+ ];
58
+ const { 0: registration, 1: app } = yield Promise.all(asyncs);
59
+ yield registration.update();
60
+ this.messaging = app.getMessaging();
61
+ // this.messaging.usePublicVapidKey(this.config.publicKeyBase64);
62
+ // await this.messaging.useServiceWorker(registration);
63
+ yield this.getToken({ vapidKey: this.config.publicKeyBase64, serviceWorkerRegistration: registration });
64
+ if (navigator.serviceWorker.controller) {
65
+ console.log(`This page is currently controlled by: ${navigator.serviceWorker.controller}`);
135
66
  }
136
- });
137
- }); });
67
+ navigator.serviceWorker.oncontrollerchange = function () {
68
+ console.log("This page is now controlled by:", navigator.serviceWorker.controller);
69
+ };
70
+ navigator.serviceWorker.onmessage = (event) => {
71
+ this.processMessageFromSw(event.data);
72
+ };
73
+ }
74
+ }));
138
75
  };
139
76
  // / need to call this from the login verified
140
- _this.getToken = function (options) { return __awaiter(_this, void 0, void 0, function () {
141
- var permission, _a, err_1;
142
- var _this = this;
143
- return __generator(this, function (_b) {
144
- switch (_b.label) {
145
- case 0:
146
- _b.trys.push([0, 5, , 6]);
147
- this.logVerbose("Checking/Requesting permission...");
148
- return [4 /*yield*/, Notification.requestPermission()];
149
- case 1:
150
- permission = _b.sent();
151
- this.logVerbose("Notification permission: " + permission);
152
- if (permission !== "granted")
153
- return [2 /*return*/];
154
- if (!this.messaging)
155
- throw new ts_common_1.BadImplementationException("I literally just set this!");
156
- _a = this;
157
- return [4 /*yield*/, this.messaging.getToken(options)];
158
- case 2:
159
- _a.firebaseToken = _b.sent();
160
- if (!this.firebaseToken)
161
- return [2 /*return*/];
162
- this.messaging.onMessage(function (payload) {
163
- if (!payload.data)
164
- return _this.logInfo('No data passed to the message handler, I got this', payload);
165
- _this.processMessage(payload.data);
166
- });
167
- this.logVerbose("new token received: " + this.firebaseToken);
168
- if (!(this.subscriptions.length > 0)) return [3 /*break*/, 4];
169
- return [4 /*yield*/, this.register()];
170
- case 3:
171
- _b.sent();
172
- _b.label = 4;
173
- case 4: return [3 /*break*/, 6];
174
- case 5:
175
- err_1 = _b.sent();
176
- this.logError("Unable to get token", err_1);
177
- return [3 /*break*/, 6];
178
- case 6: return [2 /*return*/];
179
- }
180
- });
181
- }); };
182
- _this.processMessageFromSw = function (data) {
183
- _this.logInfo("Got data from SW: ", data);
77
+ this.getToken = (options) => __awaiter(this, void 0, void 0, function* () {
78
+ try {
79
+ this.logVerbose("Checking/Requesting permission...");
80
+ const permission = yield Notification.requestPermission();
81
+ this.logVerbose(`Notification permission: ${permission}`);
82
+ if (permission !== "granted")
83
+ return;
84
+ if (!this.messaging)
85
+ throw new ts_common_1.BadImplementationException("I literally just set this!");
86
+ this.firebaseToken = yield this.messaging.getToken(options);
87
+ if (!this.firebaseToken)
88
+ return;
89
+ this.messaging.onMessage((payload) => {
90
+ if (!payload.data)
91
+ return this.logInfo('No data passed to the message handler, I got this', payload);
92
+ this.processMessage(payload.data);
93
+ });
94
+ this.logVerbose("new token received: " + this.firebaseToken);
95
+ // this.logWarning("I don't believe there is a good reason to register whenever an app starts.. before we have any information about user or app status!!")
96
+ // this.logWarning("Convince me otherwise.. :)")
97
+ // Race Condition in CC proved that I didnt register for push due to the getToken being async which ended after modules init
98
+ // so I had subscriptions but didnt register them
99
+ if (this.subscriptions.length > 0)
100
+ yield this.register();
101
+ }
102
+ catch (err) {
103
+ this.logError("Unable to get token", err);
104
+ }
105
+ });
106
+ this.processMessageFromSw = (data) => {
107
+ this.logInfo("Got data from SW: ", data);
184
108
  if (!data.command || !data.message || data.command !== exports.Command_SwToApp)
185
109
  return;
186
- _this.processMessage(data.message);
110
+ this.processMessage(data.message);
187
111
  };
188
- _this.processMessage = function (data) {
189
- _this.logInfo("process message", data);
190
- var arr = JSON.parse(data.messages);
191
- arr.forEach(function (s) {
112
+ this.processMessage = (data) => {
113
+ this.logInfo("process message", data);
114
+ const arr = JSON.parse(data.messages);
115
+ arr.forEach(s => {
192
116
  s.persistent && NotificationModule_1.NotificationsModule.addNotification(s);
193
- _this.dispatch_pushMessage.dispatchModule([s]);
117
+ this.dispatch_pushMessage.dispatchModule([s]);
194
118
  });
195
119
  };
196
- _this.subscribe = function (subscription) {
197
- _this.subscribeImpl(subscription);
198
- return _this.register();
120
+ this.subscribe = (subscription) => {
121
+ this.subscribeImpl(subscription);
122
+ return this.register();
199
123
  };
200
- _this.subscribeMulti = function (subscriptions) {
201
- subscriptions.forEach(function (subscription) { return _this.subscribeImpl(subscription); });
202
- return _this.register();
124
+ this.subscribeMulti = (subscriptions) => {
125
+ subscriptions.forEach(subscription => this.subscribeImpl(subscription));
126
+ return this.register();
203
127
  };
204
- _this.unsubscribe = function (subscription) {
205
- ts_common_1.removeFromArray(_this.subscriptions, function (d) { return d.pushKey === subscription.pushKey && ts_common_1.compare(subscription.props, d.props); });
206
- return _this.register();
128
+ this.unsubscribe = (subscription) => {
129
+ ts_common_1.removeFromArray(this.subscriptions, d => d.pushKey === subscription.pushKey && ts_common_1.compare(subscription.props, d.props));
130
+ return this.register();
207
131
  };
208
- _this.register = function () {
209
- var firebaseToken = _this.firebaseToken;
132
+ this.register = () => {
133
+ const firebaseToken = this.firebaseToken;
210
134
  if (!firebaseToken)
211
- return _this.logWarning("No Firebase token...");
212
- _this.debounce(function () {
213
- var body = {
214
- firebaseToken: firebaseToken,
215
- pushSessionId: _this.getPushSessionId(),
216
- subscriptions: _this.subscriptions.map(function (_a) {
217
- var pushKey = _a.pushKey, props = _a.props;
218
- return ({ pushKey: pushKey, props: props });
219
- })
135
+ return this.logWarning("No Firebase token...");
136
+ this.debounce(() => {
137
+ const body = {
138
+ firebaseToken,
139
+ pushSessionId: this.getPushSessionId(),
140
+ subscriptions: this.subscriptions.map(({ pushKey, props }) => ({ pushKey, props }))
220
141
  };
221
- _this.logDebug("Registering subscriptions");
222
- for (var _i = 0, _a = _this.subscriptions; _i < _a.length; _i++) {
223
- var sub = _a[_i];
224
- _this.logDebug(sub.pushKey + " => " + (sub.props ? ts_common_1.__stringify(sub.props) : "no props"));
142
+ this.logDebug("Registering subscriptions");
143
+ for (const sub of this.subscriptions) {
144
+ this.logDebug(`${sub.pushKey} => ${sub.props ? ts_common_1.__stringify(sub.props) : "no props"}`);
225
145
  }
226
146
  frontend_1.XhrHttpModule
227
147
  .createRequest(thunderstorm_1.HttpMethod.POST, "register-pub-sub-tab")
228
148
  .setRelativeUrl("/v1/push/register")
229
149
  .setJsonBody(body)
230
150
  .setOnError("Failed to register for push")
231
- .execute(function (response) {
151
+ .execute((response) => {
232
152
  NotificationModule_1.NotificationsModule.setNotificationList(response);
233
- _this.logVerbose("Finished register PubSub");
153
+ this.logVerbose("Finished register PubSub");
234
154
  });
235
- }, "debounce-register", _this.timeout);
155
+ }, "debounce-register", this.timeout);
236
156
  };
237
157
  window.name = window.name || ts_common_1.generateHex(32);
238
- _this.pushSessionId = pushSessionId.set(window.name);
239
- return _this;
158
+ this.pushSessionId = pushSessionId.set(window.name);
240
159
  }
241
- PushPubSubModule_Class.prototype.init = function () {
160
+ init() {
242
161
  var _a;
243
162
  if (((_a = this.config) === null || _a === void 0 ? void 0 : _a.registerOnInit) === false)
244
163
  return;
245
164
  this.initApp();
246
- };
247
- PushPubSubModule_Class.prototype.getPushSessionId = function () {
165
+ }
166
+ getPushSessionId() {
248
167
  return this.pushSessionId;
249
- };
250
- PushPubSubModule_Class.prototype.subscribeImpl = function (subscription) {
251
- if (this.subscriptions.find(function (d) { return d.pushKey === subscription.pushKey && ts_common_1.compare(subscription.props, d.props); }))
168
+ }
169
+ subscribeImpl(subscription) {
170
+ if (this.subscriptions.find(d => d.pushKey === subscription.pushKey && ts_common_1.compare(subscription.props, d.props)))
252
171
  return;
253
172
  ts_common_1.addItemToArray(this.subscriptions, subscription);
254
- };
255
- return PushPubSubModule_Class;
256
- }(ts_common_1.Module));
173
+ }
174
+ }
257
175
  exports.PushPubSubModule_Class = PushPubSubModule_Class;
258
176
  exports.PushPubSubModule = new PushPubSubModule_Class();
259
177
  //# sourceMappingURL=PushPubSubModule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PushPubSubModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/PushPubSubModule.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,0DAUsC;AAEtC,qEAIkD;AAalD,gEAA2D;AAC3D,iEAI8C;AAC9C,2DAAyD;AAE5C,QAAA,eAAe,GAAG,SAAS,CAAC;AAwB5B,QAAA,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,IAAM,aAAa,GAAG,IAAI,qBAAU,CAAS,wBAAgB,EAAE,KAAK,CAAC,CAAC;AAEtE;IACS,0CAAwB;IAWhC;QAAA,YACC,iBAAO,SAGP;QAbO,mBAAa,GAA2B,EAAE,CAAC;QAI3C,0BAAoB,GAAG,IAAI,4BAAiB,CAA2E,qBAAqB,CAAC,CAAC;QAG5I,aAAO,GAAW,GAAG,CAAC;QAmBxB,2BAAqB,GAAG;;;;wBAC/B,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;wBACtC,qBAAM,SAAS,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAI,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,sBAAsB,CAAE,CAAC,EAAA;4BAArG,sBAAO,SAA8F,EAAC;;;aACtG,CAAC;QAEF,aAAO,GAAG;;YACT,IAAI,QAAC,KAAI,CAAC,MAAM,0CAAE,eAAe,C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