@intuitionrobotics/push-pub-sub 0.41.69 → 0.41.72
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/app-backend/api/_push.js +1 -1
- package/app-backend/api/_push.js.map +1 -1
- package/app-backend/api/v1/push/read.js +12 -60
- package/app-backend/api/v1/push/read.js.map +1 -1
- package/app-backend/api/v1/push/register.js +12 -60
- package/app-backend/api/v1/push/register.js.map +1 -1
- package/app-backend/core/module-pack.js +2 -2
- package/app-backend/core/module-pack.js.map +1 -1
- package/app-backend/modules/PushKey.js +8 -39
- package/app-backend/modules/PushKey.js.map +1 -1
- package/app-backend/modules/PushPubSubModule.js +156 -326
- package/app-backend/modules/PushPubSubModule.js.map +1 -1
- package/app-backend/modules/ScheduledPushCleanup.js +10 -55
- package/app-backend/modules/ScheduledPushCleanup.js.map +1 -1
- package/app-frontend/core/module-pack.js +3 -3
- package/app-frontend/core/module-pack.js.map +1 -1
- package/app-frontend/modules/NotificationModule.js +24 -40
- package/app-frontend/modules/NotificationModule.js.map +1 -1
- package/app-frontend/modules/PushPubSubModule.js +110 -192
- package/app-frontend/modules/PushPubSubModule.js.map +1 -1
- package/package.json +3 -3
|
@@ -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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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,
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
32
|
-
|
|
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
|
-
|
|
22
|
+
this.readNotification(notification._id, read);
|
|
37
23
|
};
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
this.readNotification = (id, read) => {
|
|
25
|
+
const body = {
|
|
40
26
|
_id: id,
|
|
41
|
-
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(
|
|
35
|
+
.execute(() => {
|
|
50
36
|
exports.dispatch_NotificationsUpdated.dispatchUI([]);
|
|
51
37
|
});
|
|
52
38
|
};
|
|
53
|
-
return _this;
|
|
54
39
|
}
|
|
55
|
-
|
|
40
|
+
getNotifications() {
|
|
56
41
|
return this.notifications;
|
|
57
|
-
}
|
|
58
|
-
|
|
42
|
+
}
|
|
43
|
+
addNotification(newNotification) {
|
|
59
44
|
this.notifications.push(newNotification);
|
|
60
45
|
exports.dispatch_NotificationsUpdated.dispatchUI([]);
|
|
61
|
-
}
|
|
62
|
-
|
|
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
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"NotificationModule.js","sourceRoot":"","sources":["../../../src/main/app-frontend/modules/NotificationModule.ts"],"names":[],"mappings":";;;AAAA,6GAAuG;AACvG,4DAIsC;AAKtC,uEAAuE;AACvE,kEAA2D;AAM9C,QAAA,6BAA6B,GAAG,IAAI,sCAAiB,CAAqD,0BAA0B,CAAC,CAAC;AAGnJ,MAAa,yBACZ,SAAQ,kBAAM;IADf;;QAGS,kBAAa,GAAuB,EAAE,CAAC;QAM/C,wBAAmB,GAAG,CAAC,aAAiC,EAAE,EAAE;YAC3D,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;YACnC,qCAA6B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC;QAaF,SAAI,GAAG,CAAC,YAA8B,EAAE,IAAa,EAAE,EAAE;YACxD,MAAM,gBAAgB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,KAAK,YAAY,CAAC,GAAG,CAAC,CAAC;YAC1G,IAAI,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,UAAU;gBACpD,OAAO;YAER,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,GAAG,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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
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 =
|
|
98
|
-
throw new ts_common_1.ImplementationMissingException(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
110
|
+
this.processMessage(data.message);
|
|
187
111
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
arr.forEach(
|
|
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
|
-
|
|
117
|
+
this.dispatch_pushMessage.dispatchModule([s]);
|
|
194
118
|
});
|
|
195
119
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
return
|
|
120
|
+
this.subscribe = (subscription) => {
|
|
121
|
+
this.subscribeImpl(subscription);
|
|
122
|
+
return this.register();
|
|
199
123
|
};
|
|
200
|
-
|
|
201
|
-
subscriptions.forEach(
|
|
202
|
-
return
|
|
124
|
+
this.subscribeMulti = (subscriptions) => {
|
|
125
|
+
subscriptions.forEach(subscription => this.subscribeImpl(subscription));
|
|
126
|
+
return this.register();
|
|
203
127
|
};
|
|
204
|
-
|
|
205
|
-
ts_common_1.removeFromArray(
|
|
206
|
-
return
|
|
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
|
-
|
|
209
|
-
|
|
132
|
+
this.register = () => {
|
|
133
|
+
const firebaseToken = this.firebaseToken;
|
|
210
134
|
if (!firebaseToken)
|
|
211
|
-
return
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
firebaseToken
|
|
215
|
-
pushSessionId:
|
|
216
|
-
subscriptions:
|
|
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
|
-
|
|
222
|
-
for (
|
|
223
|
-
|
|
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(
|
|
151
|
+
.execute((response) => {
|
|
232
152
|
NotificationModule_1.NotificationsModule.setNotificationList(response);
|
|
233
|
-
|
|
153
|
+
this.logVerbose("Finished register PubSub");
|
|
234
154
|
});
|
|
235
|
-
}, "debounce-register",
|
|
155
|
+
}, "debounce-register", this.timeout);
|
|
236
156
|
};
|
|
237
157
|
window.name = window.name || ts_common_1.generateHex(32);
|
|
238
|
-
|
|
239
|
-
return _this;
|
|
158
|
+
this.pushSessionId = pushSessionId.set(window.name);
|
|
240
159
|
}
|
|
241
|
-
|
|
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
|
-
|
|
165
|
+
}
|
|
166
|
+
getPushSessionId() {
|
|
248
167
|
return this.pushSessionId;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (this.subscriptions.find(
|
|
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
|
-
|
|
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
|
|
1
|
+
{"version":3,"file":"PushPubSubModule.js","sourceRoot":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