@artstesh/postboy 3.0.0 → 3.0.2
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/README.md +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/lib/locker.store.d.ts +9 -0
- package/lib/locker.store.d.ts.map +1 -0
- package/lib/locker.store.js +27 -0
- package/lib/locker.store.js.map +1 -0
- package/lib/mocks/message-history-item-mock.d.ts +10 -0
- package/lib/mocks/message-history-item-mock.d.ts.map +1 -0
- package/lib/mocks/message-history-item-mock.js +26 -0
- package/lib/mocks/message-history-item-mock.js.map +1 -0
- package/lib/mocks/message-history-mock.d.ts +9 -0
- package/lib/mocks/message-history-mock.d.ts.map +1 -0
- package/lib/mocks/message-history-mock.js +23 -0
- package/lib/mocks/message-history-mock.js.map +1 -0
- package/lib/mocks/postboy-service-mock.d.ts +22 -0
- package/lib/mocks/postboy-service-mock.d.ts.map +1 -0
- package/lib/mocks/postboy-service-mock.js +51 -0
- package/lib/mocks/postboy-service-mock.js.map +1 -0
- package/lib/models/message-queue.model.d.ts +43 -43
- package/lib/models/message-queue.model.js +65 -65
- package/lib/models/message-queue.model.js.map +1 -1
- package/lib/models/postboy-callback.message.d.ts.map +1 -1
- package/lib/models/postboy-executor.d.ts +1 -1
- package/lib/models/postboy-executor.d.ts.map +1 -1
- package/lib/models/postboy-executor.js.map +1 -1
- package/lib/models/postboy-generic-message.d.ts +1 -1
- package/lib/models/postboy-generic-message.d.ts.map +1 -1
- package/lib/models/postboy-generic-message.js +2 -2
- package/lib/models/postboy-generic-message.js.map +1 -1
- package/lib/models/postboy-middleware.d.ts +1 -1
- package/lib/models/postboy-middleware.d.ts.map +1 -1
- package/lib/models/postboy-subscription.d.ts +6 -3
- package/lib/models/postboy-subscription.d.ts.map +1 -1
- package/lib/models/postboy-subscription.js +11 -2
- package/lib/models/postboy-subscription.js.map +1 -1
- package/lib/models/postboy.locker.d.ts +6 -0
- package/lib/models/postboy.locker.d.ts.map +1 -0
- package/lib/models/postboy.locker.js +3 -0
- package/lib/models/postboy.locker.js.map +1 -0
- package/lib/postboy-abstract.registrator.d.ts.map +1 -1
- package/lib/postboy.service.d.ts +44 -21
- package/lib/postboy.service.d.ts.map +1 -1
- package/lib/postboy.service.js +57 -49
- package/lib/postboy.service.js.map +1 -1
- package/lib/services/postboy-dependency.resolver.d.ts +7 -0
- package/lib/services/postboy-dependency.resolver.d.ts.map +1 -0
- package/lib/services/postboy-dependency.resolver.js +13 -0
- package/lib/services/postboy-dependency.resolver.js.map +1 -0
- package/lib/services/postboy-message.store.d.ts +16 -0
- package/lib/services/postboy-message.store.d.ts.map +1 -0
- package/lib/services/postboy-message.store.js +39 -0
- package/lib/services/postboy-message.store.js.map +1 -0
- package/lib/services/postboy-middleware.service.d.ts +9 -0
- package/lib/services/postboy-middleware.service.d.ts.map +1 -0
- package/lib/services/postboy-middleware.service.js +20 -0
- package/lib/services/postboy-middleware.service.js.map +1 -0
- package/lib/tests/integration/models/test-callback-message.d.ts +6 -0
- package/lib/tests/integration/models/test-callback-message.d.ts.map +1 -0
- package/lib/tests/integration/models/test-callback-message.js +13 -0
- package/lib/tests/integration/models/test-callback-message.js.map +1 -0
- package/lib/tests/integration/models/test-executor.d.ts +7 -0
- package/lib/tests/integration/models/test-executor.d.ts.map +1 -0
- package/lib/tests/integration/models/test-executor.js +13 -0
- package/lib/tests/integration/models/test-executor.js.map +1 -0
- package/lib/tests/integration/models/test-handler.d.ts +8 -0
- package/lib/tests/integration/models/test-handler.d.ts.map +1 -0
- package/lib/tests/integration/models/test-handler.js +15 -0
- package/lib/tests/integration/models/test-handler.js.map +1 -0
- package/lib/tests/integration/models/test-message.d.ts +6 -0
- package/lib/tests/integration/models/test-message.d.ts.map +1 -0
- package/lib/tests/integration/models/test-message.js +13 -0
- package/lib/tests/integration/models/test-message.js.map +1 -0
- package/lib/tests/integration/models/test-postboy.d.ts +4 -0
- package/lib/tests/integration/models/test-postboy.d.ts.map +1 -0
- package/lib/tests/integration/models/test-postboy.js +8 -0
- package/lib/tests/integration/models/test-postboy.js.map +1 -0
- package/lib/tests/integration/models/test-registry.d.ts +8 -0
- package/lib/tests/integration/models/test-registry.d.ts.map +1 -0
- package/lib/tests/integration/models/test-registry.js +15 -0
- package/lib/tests/integration/models/test-registry.js.map +1 -0
- package/package.json +1 -1
- package/lib/models/queue.d.ts +0 -11
- package/lib/models/queue.d.ts.map +0 -1
- package/lib/models/queue.js +0 -34
- package/lib/models/queue.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyAbstractRegistrator } from '../../../postboy-abstract.registrator';
|
|
2
|
+
import { TestPostboy } from './test-postboy';
|
|
3
|
+
export declare class TestReg extends PostboyAbstractRegistrator {
|
|
4
|
+
ups: ((r: this) => void)[];
|
|
5
|
+
constructor(postboy: TestPostboy);
|
|
6
|
+
protected _up(): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=test-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-registry.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,OAAQ,SAAQ,0BAA0B;IACrD,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC,EAAE,CAAM;gBAEpB,OAAO,EAAE,WAAW;IAIhC,SAAS,CAAC,GAAG,IAAI,IAAI;CAGtB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TestReg = void 0;
|
|
4
|
+
const postboy_abstract_registrator_1 = require("../../../postboy-abstract.registrator");
|
|
5
|
+
class TestReg extends postboy_abstract_registrator_1.PostboyAbstractRegistrator {
|
|
6
|
+
constructor(postboy) {
|
|
7
|
+
super(postboy);
|
|
8
|
+
this.ups = [];
|
|
9
|
+
}
|
|
10
|
+
_up() {
|
|
11
|
+
this.ups.forEach((up) => up(this));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.TestReg = TestReg;
|
|
15
|
+
//# sourceMappingURL=test-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-registry.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-registry.ts"],"names":[],"mappings":";;;AAAA,wFAAmF;AAGnF,MAAa,OAAQ,SAAQ,yDAA0B;IAGrD,YAAY,OAAoB;QAC9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHjB,QAAG,GAA0B,EAAE,CAAC;IAIhC,CAAC;IAES,GAAG;QACX,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;CACF;AAVD,0BAUC"}
|
package/package.json
CHANGED
package/lib/models/queue.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class Queue<T> {
|
|
2
|
-
private storage;
|
|
3
|
-
private head;
|
|
4
|
-
private tail;
|
|
5
|
-
put(item: T): this;
|
|
6
|
-
putMany(items: T[]): this;
|
|
7
|
-
take(): T | undefined;
|
|
8
|
-
get size(): number;
|
|
9
|
-
each(action: (e: T) => void): void;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=queue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/models/queue.ts"],"names":[],"mappings":"AAAA,qBAAa,KAAK,CAAC,CAAC;IAClB,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,IAAI,CAAa;IAEzB,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI;IAMlB,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI;IAKzB,IAAI,IAAI,CAAC,GAAG,SAAS;IAMrB,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI;CAG5B"}
|
package/lib/models/queue.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Queue = void 0;
|
|
4
|
-
class Queue {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.storage = {};
|
|
7
|
-
this.head = 0;
|
|
8
|
-
this.tail = 0;
|
|
9
|
-
}
|
|
10
|
-
put(item) {
|
|
11
|
-
this.storage[this.tail] = item;
|
|
12
|
-
this.tail++;
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
putMany(items) {
|
|
16
|
-
items.forEach((i) => this.put(i));
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
take() {
|
|
20
|
-
const item = this.storage[this.head];
|
|
21
|
-
if (item)
|
|
22
|
-
delete this.storage[this.head++];
|
|
23
|
-
return item;
|
|
24
|
-
}
|
|
25
|
-
get size() {
|
|
26
|
-
return this.tail - this.head;
|
|
27
|
-
}
|
|
28
|
-
each(action) {
|
|
29
|
-
while (this.size)
|
|
30
|
-
action(this.take());
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.Queue = Queue;
|
|
34
|
-
//# sourceMappingURL=queue.js.map
|
package/lib/models/queue.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["../../src/models/queue.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;IAAlB;QACU,YAAO,GAAsB,EAAE,CAAC;QAChC,SAAI,GAAW,CAAC,CAAC;QACjB,SAAI,GAAW,CAAC,CAAC;IA0B3B,CAAC;IAxBC,GAAG,CAAC,IAAO;QACT,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CAAC,KAAU;QAChB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI;QACF,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,IAAI,CAAC,MAAsB;QACzB,OAAO,IAAI,CAAC,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAG,CAAC,CAAC;IACzC,CAAC;CACF;AA7BD,sBA6BC"}
|