@signageos/lib 23.9.1 → 23.9.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 +2 -2
- package/dist/AMQP/CQRS/ICommand.d.ts +3 -36
- package/dist/AMQP/CQRS/ICommand.js +18 -0
- package/dist/AMQP/CQRS/ICommand.js.map +1 -1
- package/dist/AMQP/CQRS/ICommandError.d.ts +4 -4
- package/dist/AMQP/CQRS/commandQueue.d.ts +4 -59
- package/dist/AMQP/CQRS/commandQueue.js +16 -308
- package/dist/AMQP/CQRS/commandQueue.js.map +1 -1
- package/dist/AMQP/CQRS/commandResponseHelper.d.ts +4 -3
- package/dist/AMQP/CQRS/commandResponseHelper.js +18 -5
- package/dist/AMQP/CQRS/commandResponseHelper.js.map +1 -1
- package/dist/AMQP/CQRS/storedCommandQueue.d.ts +4 -27
- package/dist/AMQP/CQRS/storedCommandQueue.js +16 -296
- package/dist/AMQP/CQRS/storedCommandQueue.js.map +1 -1
- package/dist/AMQP/ChannelProvider.d.ts +5 -37
- package/dist/AMQP/ChannelProvider.js +9 -868
- package/dist/AMQP/ChannelProvider.js.map +1 -1
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.d.ts +4 -39
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js +16 -287
- package/dist/AMQP/DeviceActions/Bridge/deviceActionBridgeFactory.js.map +1 -1
- package/dist/AMQP/DeviceActions/IDeviceAction.d.ts +4 -4
- package/dist/AMQP/DeviceActions/deviceActionsQueue.d.ts +2 -81
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js +14 -531
- package/dist/AMQP/DeviceActions/deviceActionsQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.d.ts +2 -45
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js +14 -211
- package/dist/AMQP/EventSourcing/EventConsumer/AmqpEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.d.ts +2 -11
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js +18 -0
- package/dist/AMQP/EventSourcing/EventConsumer/IEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.d.ts +2 -13
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js +14 -69
- package/dist/AMQP/EventSourcing/EventConsumer/InMemoryEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/IEvent.d.ts +3 -70
- package/dist/AMQP/EventSourcing/IEvent.js +18 -0
- package/dist/AMQP/EventSourcing/IEvent.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/deferredState.d.ts +2 -19
- package/dist/AMQP/EventSourcing/Locked/deferredState.js +15 -66
- package/dist/AMQP/EventSourcing/Locked/deferredState.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.d.ts +2 -68
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js +14 -429
- package/dist/AMQP/EventSourcing/Locked/lockedEventConsumer.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.d.ts +2 -22
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js +16 -59
- package/dist/AMQP/EventSourcing/Locked/rejectedTimestamps.js.map +1 -1
- package/dist/AMQP/EventSourcing/Locked/withLock.d.ts +2 -40
- package/dist/AMQP/EventSourcing/Locked/withLock.js +14 -134
- package/dist/AMQP/EventSourcing/Locked/withLock.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.d.ts +2 -85
- package/dist/AMQP/EventSourcing/eventQueue.js +14 -132
- package/dist/AMQP/EventSourcing/eventQueue.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueue.utils.d.ts +2 -71
- package/dist/AMQP/EventSourcing/eventQueue.utils.js +16 -152
- package/dist/AMQP/EventSourcing/eventQueue.utils.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDetached.d.ts +2 -47
- package/dist/AMQP/EventSourcing/eventQueueDetached.js +14 -421
- package/dist/AMQP/EventSourcing/eventQueueDetached.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueueDomain.d.ts +2 -53
- package/dist/AMQP/EventSourcing/eventQueueDomain.js +14 -611
- package/dist/AMQP/EventSourcing/eventQueueDomain.js.map +1 -1
- package/dist/AMQP/EventSourcing/eventQueuePublish.d.ts +2 -17
- package/dist/AMQP/EventSourcing/eventQueuePublish.js +14 -202
- package/dist/AMQP/EventSourcing/eventQueuePublish.js.map +1 -1
- package/dist/AMQP/EventSourcing/synchronization.d.ts +2 -37
- package/dist/AMQP/EventSourcing/synchronization.js +18 -9
- package/dist/AMQP/EventSourcing/synchronization.js.map +1 -1
- package/dist/AMQP/Exchange.d.ts +4 -1
- package/dist/AMQP/Exchange.js +18 -0
- package/dist/AMQP/Exchange.js.map +1 -1
- package/dist/AMQP/IAsyncGotMessage.d.ts +2 -13
- package/dist/AMQP/IAsyncGotMessage.js +18 -0
- package/dist/AMQP/IAsyncGotMessage.js.map +1 -1
- package/dist/AMQP/IChannel.d.ts +5 -43
- package/dist/AMQP/IChannel.js +18 -0
- package/dist/AMQP/IChannel.js.map +1 -1
- package/dist/AMQP/IConsumeOptions.d.ts +5 -106
- package/dist/AMQP/IConsumeOptions.js +18 -0
- package/dist/AMQP/IConsumeOptions.js.map +1 -1
- package/dist/AMQP/IMessageOptions.d.ts +5 -6
- package/dist/AMQP/IMessageOptions.js +18 -0
- package/dist/AMQP/IMessageOptions.js.map +1 -1
- package/dist/AMQP/INackOptions.d.ts +5 -4
- package/dist/AMQP/INackOptions.js +18 -0
- package/dist/AMQP/INackOptions.js.map +1 -1
- package/dist/AMQP/IQueueOptions.d.ts +5 -8
- package/dist/AMQP/IQueueOptions.js +18 -0
- package/dist/AMQP/IQueueOptions.js.map +1 -1
- package/dist/AMQP/Logging/IDeviceLog.d.ts +4 -15
- package/dist/AMQP/Logging/IDeviceLog.js +18 -7
- package/dist/AMQP/Logging/IDeviceLog.js.map +1 -1
- package/dist/AMQP/Logging/logDeviceQueue.d.ts +4 -12
- package/dist/AMQP/Logging/logDeviceQueue.js +16 -102
- package/dist/AMQP/Logging/logDeviceQueue.js.map +1 -1
- package/dist/AMQP/QueueFetcher.d.ts +3 -11
- package/dist/AMQP/QueueFetcher.js +17 -156
- package/dist/AMQP/QueueFetcher.js.map +1 -1
- package/dist/AMQP/QueuePublisher.d.ts +5 -7
- package/dist/AMQP/QueuePublisher.js +19 -127
- package/dist/AMQP/QueuePublisher.js.map +1 -1
- package/dist/AMQP/QueueRepeatableSubscription.d.ts +5 -14
- package/dist/AMQP/QueueRepeatableSubscription.js +19 -154
- package/dist/AMQP/QueueRepeatableSubscription.js.map +1 -1
- package/dist/AMQP/QueueSubscriber.d.ts +5 -27
- package/dist/AMQP/QueueSubscriber.js +9 -303
- package/dist/AMQP/QueueSubscriber.js.map +1 -1
- package/dist/AMQP/ResponseProvider.d.ts +4 -20
- package/dist/AMQP/ResponseProvider.js +16 -188
- package/dist/AMQP/ResponseProvider.js.map +1 -1
- package/dist/AMQP/Static/filesQueue.d.ts +4 -12
- package/dist/AMQP/Static/filesQueue.js +6 -205
- package/dist/AMQP/Static/filesQueue.js.map +1 -1
- package/dist/AMQP/amqpConnectionFactory.d.ts +2 -25
- package/dist/AMQP/amqpConnectionFactory.js +4 -219
- package/dist/AMQP/amqpConnectionFactory.js.map +1 -1
- package/dist/AMQP/amqpErrors.d.ts +4 -5
- package/dist/AMQP/amqpErrors.js +18 -27
- package/dist/AMQP/amqpErrors.js.map +1 -1
- package/dist/AMQP/errors.d.ts +4 -3
- package/dist/AMQP/errors.js +18 -27
- package/dist/AMQP/errors.js.map +1 -1
- package/dist/AMQP/fetchNextMessage.d.ts +3 -12
- package/dist/AMQP/fetchNextMessage.js +20 -111
- package/dist/AMQP/fetchNextMessage.js.map +1 -1
- package/dist/AMQP/queueConfigurator.d.ts +2 -3
- package/dist/AMQP/queueConfigurator.js +14 -71
- package/dist/AMQP/queueConfigurator.js.map +1 -1
- package/dist/DateTime/waitUntil.d.ts +4 -15
- package/dist/DateTime/waitUntil.js +17 -139
- package/dist/DateTime/waitUntil.js.map +1 -1
- package/dist/Events/AsyncEventEmitter.d.ts +2 -29
- package/dist/Events/AsyncEventEmitter.js +14 -118
- package/dist/Events/AsyncEventEmitter.js.map +1 -1
- package/dist/Events/eventsHelpers.d.ts +4 -3
- package/dist/Events/eventsHelpers.js +18 -21
- package/dist/Events/eventsHelpers.js.map +1 -1
- package/dist/Hash/checksum.d.ts +2 -3
- package/dist/Hash/checksum.js +16 -15
- package/dist/Hash/checksum.js.map +1 -1
- package/dist/Hash/checksumFile.d.ts +2 -2
- package/dist/Hash/checksumFile.js +4 -65
- package/dist/Hash/checksumFile.js.map +1 -1
- package/dist/Hash/generator.d.ts +4 -2
- package/dist/Hash/generator.js +18 -12
- package/dist/Hash/generator.js.map +1 -1
- package/dist/HttpStatus/checks/amqpStatusCheck.d.ts +1 -1
- package/dist/HttpStatus/statuses/amqpStatus.d.ts +1 -1
- package/dist/Metrics/MetricsClient.d.ts +2 -44
- package/dist/Metrics/MetricsClient.js +6 -86
- package/dist/Metrics/MetricsClient.js.map +1 -1
- package/dist/Metrics/metrics.d.ts +2 -82
- package/dist/Metrics/metrics.js +4 -238
- package/dist/Metrics/metrics.js.map +1 -1
- package/dist/Metrics/processSocketsMetrics.d.ts +4 -10
- package/dist/Metrics/processSocketsMetrics.js +17 -88
- package/dist/Metrics/processSocketsMetrics.js.map +1 -1
- package/dist/Service/dbConnections.d.ts +1 -1
- package/dist/Service/metrics/connections.js +7 -7
- package/dist/Service/metrics/connections.js.map +1 -1
- package/dist/ThirdParty/connection.d.ts +0 -11
- package/package.json +5 -9
- package/dist/AMQP/IAMQPPool.d.ts +0 -5
- package/dist/AMQP/IAMQPPool.js +0 -3
- package/dist/AMQP/IAMQPPool.js.map +0 -1
- package/dist/Events/genericGracefulExit.d.ts +0 -11
- package/dist/Events/genericGracefulExit.js +0 -90
- package/dist/Events/genericGracefulExit.js.map +0 -1
- package/dist/GenericPool/options.d.ts +0 -63
- package/dist/GenericPool/options.js +0 -3
- package/dist/GenericPool/options.js.map +0 -1
- package/dist/Metrics/deviceConsumerMetrics.d.ts +0 -6
- package/dist/Metrics/deviceConsumerMetrics.js +0 -59
- package/dist/Metrics/deviceConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventConsumerMetrics.d.ts +0 -19
- package/dist/Metrics/eventConsumerMetrics.js +0 -52
- package/dist/Metrics/eventConsumerMetrics.js.map +0 -1
- package/dist/Metrics/eventQueueMetrics.d.ts +0 -7
- package/dist/Metrics/eventQueueMetrics.js +0 -19
- package/dist/Metrics/eventQueueMetrics.js.map +0 -1
- package/dist/Pool/IBasePool.d.ts +0 -6
- package/dist/Pool/IBasePool.js +0 -3
- package/dist/Pool/IBasePool.js.map +0 -1
- package/dist/System/signalSender.d.ts +0 -1
- package/dist/System/signalSender.js +0 -7
- package/dist/System/signalSender.js.map +0 -1
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { IAMQPConnection } from './amqpConnectionFactory';
|
|
2
|
-
import { ExchangeType } from './Exchange';
|
|
3
1
|
/**
|
|
4
|
-
* @deprecated
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
5
3
|
*/
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
maxPriority?: number;
|
|
9
|
-
durable?: boolean;
|
|
10
|
-
singleActiveConsumer?: boolean;
|
|
11
|
-
deadLetterExchange?: string;
|
|
12
|
-
deadLetterRoutingKey?: string;
|
|
13
|
-
queueType?: 'quorum' | 'classic';
|
|
14
|
-
}, exchangeType?: ExchangeType, alternateExchangeType?: ExchangeType): Promise<TMessage | null>;
|
|
4
|
+
export * from '@signageos/amqp/dist/fetchNextMessage';
|
|
5
|
+
export { default } from '@signageos/amqp/dist/fetchNextMessage';
|
|
@@ -1,118 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
36
7
|
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
18
|
};
|
|
38
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.default =
|
|
40
|
-
var queueConfigurator_1 = require("./queueConfigurator");
|
|
41
|
-
var jsonHelper_1 = require("../JSON/jsonHelper");
|
|
20
|
+
exports.default = void 0;
|
|
42
21
|
/**
|
|
43
|
-
* @deprecated
|
|
22
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
44
23
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (exchangeName === void 0) { exchangeName = ''; }
|
|
49
|
-
if (alternateExchangeName === void 0) { alternateExchangeName = ''; }
|
|
50
|
-
if (options === void 0) { options = {}; }
|
|
51
|
-
if (exchangeType === void 0) { exchangeType = 'topic'; }
|
|
52
|
-
if (alternateExchangeType === void 0) { alternateExchangeType = 'topic'; }
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
if (exchangeName === '' && queueName !== routingKey) {
|
|
57
|
-
throw new Error('If default exchange is used, queue name must match the routing key');
|
|
58
|
-
}
|
|
59
|
-
return [4 /*yield*/, amqpConnection.pool.acquire(options.priority)];
|
|
60
|
-
case 1:
|
|
61
|
-
connection = _a.sent();
|
|
62
|
-
_a.label = 2;
|
|
63
|
-
case 2:
|
|
64
|
-
_a.trys.push([2, 15, , 17]);
|
|
65
|
-
return [4 /*yield*/, connection.createConfirmChannel()];
|
|
66
|
-
case 3:
|
|
67
|
-
channel = _a.sent();
|
|
68
|
-
if (!(exchangeName !== '')) return [3 /*break*/, 8];
|
|
69
|
-
if (!(alternateExchangeName !== '')) return [3 /*break*/, 6];
|
|
70
|
-
return [4 /*yield*/, channel.assertExchange(alternateExchangeName, alternateExchangeType)];
|
|
71
|
-
case 4:
|
|
72
|
-
_a.sent();
|
|
73
|
-
return [4 /*yield*/, channel.assertExchange(exchangeName, exchangeType, {
|
|
74
|
-
alternateExchange: alternateExchangeName,
|
|
75
|
-
})];
|
|
76
|
-
case 5:
|
|
77
|
-
_a.sent();
|
|
78
|
-
return [3 /*break*/, 8];
|
|
79
|
-
case 6: return [4 /*yield*/, channel.assertExchange(exchangeName, exchangeType)];
|
|
80
|
-
case 7:
|
|
81
|
-
_a.sent();
|
|
82
|
-
_a.label = 8;
|
|
83
|
-
case 8: return [4 /*yield*/, (0, queueConfigurator_1.assertRejectableQueue)(channel, queueName, options.maxPriority, options.durable, options.singleActiveConsumer, options.deadLetterExchange, options.deadLetterRoutingKey, options.queueType)];
|
|
84
|
-
case 9:
|
|
85
|
-
_a.sent();
|
|
86
|
-
if (!(exchangeName !== '')) return [3 /*break*/, 11];
|
|
87
|
-
return [4 /*yield*/, channel.bindQueue(queueName, exchangeName, routingKey)];
|
|
88
|
-
case 10:
|
|
89
|
-
_a.sent();
|
|
90
|
-
_a.label = 11;
|
|
91
|
-
case 11: return [4 /*yield*/, channel.get(queueName, { noAck: true })];
|
|
92
|
-
case 12:
|
|
93
|
-
message = _a.sent();
|
|
94
|
-
return [4 /*yield*/, channel.close()];
|
|
95
|
-
case 13:
|
|
96
|
-
_a.sent();
|
|
97
|
-
return [4 /*yield*/, amqpConnection.pool.release(connection)];
|
|
98
|
-
case 14:
|
|
99
|
-
_a.sent();
|
|
100
|
-
if (message && typeof message !== 'boolean') {
|
|
101
|
-
return [2 /*return*/, message.content ? JSON.parse(message.content.toString(), jsonHelper_1.deserializeJSON) : null];
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
return [2 /*return*/, null];
|
|
105
|
-
}
|
|
106
|
-
return [3 /*break*/, 17];
|
|
107
|
-
case 15:
|
|
108
|
-
error_1 = _a.sent();
|
|
109
|
-
return [4 /*yield*/, amqpConnection.pool.destroy(connection)];
|
|
110
|
-
case 16:
|
|
111
|
-
_a.sent();
|
|
112
|
-
throw error_1;
|
|
113
|
-
case 17: return [2 /*return*/];
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
});
|
|
117
|
-
}
|
|
24
|
+
__exportStar(require("@signageos/amqp/dist/fetchNextMessage"), exports);
|
|
25
|
+
var fetchNextMessage_1 = require("@signageos/amqp/dist/fetchNextMessage");
|
|
26
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(fetchNextMessage_1).default; } });
|
|
118
27
|
//# sourceMappingURL=fetchNextMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchNextMessage.js","sourceRoot":"","sources":["../../src/AMQP/fetchNextMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchNextMessage.js","sourceRoot":"","sources":["../../src/AMQP/fetchNextMessage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,wEAAsD;AACtD,0EAAgE;AAAvD,4HAAA,OAAO,OAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Channel } from 'amqplib';
|
|
2
1
|
/**
|
|
3
|
-
* @deprecated
|
|
2
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
4
3
|
*/
|
|
5
|
-
export
|
|
4
|
+
export * from '@signageos/amqp/dist/queueConfigurator';
|
|
@@ -1,78 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
36
7
|
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
15
|
};
|
|
38
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.assertRejectableQueue = assertRejectableQueue;
|
|
40
|
-
var ChannelProvider_1 = require("./ChannelProvider");
|
|
41
17
|
/**
|
|
42
|
-
* @deprecated
|
|
18
|
+
* @deprecated Use `@signageos/amqp` instead.
|
|
43
19
|
*/
|
|
44
|
-
|
|
45
|
-
return __awaiter(this, arguments, void 0, function (channel, queueName, maxPriority, durable, singleActiveConsumer, deadLetterExchange, deadLetterRoutingKey, queueType) {
|
|
46
|
-
var args;
|
|
47
|
-
if (durable === void 0) { durable = true; }
|
|
48
|
-
if (singleActiveConsumer === void 0) { singleActiveConsumer = false; }
|
|
49
|
-
if (deadLetterExchange === void 0) { deadLetterExchange = ''; }
|
|
50
|
-
if (deadLetterRoutingKey === void 0) { deadLetterRoutingKey = ChannelProvider_1.REJECTED_QUEUE_PREFIX + queueName; }
|
|
51
|
-
if (queueType === void 0) { queueType = 'classic'; }
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0:
|
|
55
|
-
args = {};
|
|
56
|
-
if (singleActiveConsumer) {
|
|
57
|
-
args['x-single-active-consumer'] = singleActiveConsumer;
|
|
58
|
-
}
|
|
59
|
-
if (queueType === 'quorum') {
|
|
60
|
-
// default is classic
|
|
61
|
-
args['x-queue-type'] = 'quorum';
|
|
62
|
-
args['x-quorum-initial-group-size'] = ChannelProvider_1.DEFAULT_QUORUM_INITIAL_GROUP_SIZE;
|
|
63
|
-
}
|
|
64
|
-
return [4 /*yield*/, channel.assertQueue(queueName, {
|
|
65
|
-
deadLetterExchange: deadLetterExchange,
|
|
66
|
-
deadLetterRoutingKey: deadLetterRoutingKey,
|
|
67
|
-
maxPriority: maxPriority,
|
|
68
|
-
durable: durable,
|
|
69
|
-
arguments: args,
|
|
70
|
-
})];
|
|
71
|
-
case 1:
|
|
72
|
-
_a.sent();
|
|
73
|
-
return [2 /*return*/];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}
|
|
20
|
+
__exportStar(require("@signageos/amqp/dist/queueConfigurator"), exports);
|
|
78
21
|
//# sourceMappingURL=queueConfigurator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queueConfigurator.js","sourceRoot":"","sources":["../../src/AMQP/queueConfigurator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queueConfigurator.js","sourceRoot":"","sources":["../../src/AMQP/queueConfigurator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,yEAAuD"}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @returns the first truthy value returned by predicate
|
|
2
|
+
* @deprecated Use `@signageos/core/dist/Timer/waitUntil` instead.
|
|
4
3
|
*/
|
|
5
|
-
export
|
|
4
|
+
export * from '@signageos/core/dist/Timer/waitUntil';
|
|
5
|
+
import { waitUntil } from '@signageos/core/dist/Timer/waitUntil';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @throws TimeoutError if resultCallback does not return a non-null value within the specified timeoutMs
|
|
9
|
-
* @returns the first non-null value returned by resultCallback
|
|
7
|
+
* @deprecated Use `@signageos/core/dist/Timer/waitUntil` instead.
|
|
10
8
|
*/
|
|
11
|
-
export declare function waitUntilNotNull<TResult>(resultCallback: () => Promise<TResult | null>, options?: {
|
|
12
|
-
intervalMs?: number;
|
|
13
|
-
timeoutMs?: number;
|
|
14
|
-
}): Promise<TResult>;
|
|
15
|
-
export declare class TimeoutError extends Error {
|
|
16
|
-
readonly timeoutMs: number;
|
|
17
|
-
constructor(timeoutMs: number);
|
|
18
|
-
}
|
|
19
|
-
/** @deprecated use named import instead */
|
|
20
9
|
export default waitUntil;
|
|
@@ -1,148 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
-
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;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
54
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
55
|
-
if (ar || !(i in from)) {
|
|
56
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
57
|
-
ar[i] = from[i];
|
|
58
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
59
7
|
}
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
64
15
|
};
|
|
65
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
66
|
-
exports.TimeoutError = exports.waitUntil = void 0;
|
|
67
|
-
exports.waitUntilNotNull = waitUntilNotNull;
|
|
68
|
-
var timeout_ts_1 = __importDefault(require("timeout-ts"));
|
|
69
17
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @returns the first truthy value returned by predicate
|
|
18
|
+
* @deprecated Use `@signageos/core/dist/Timer/waitUntil` instead.
|
|
72
19
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
76
|
-
args_1[_i - 1] = arguments[_i];
|
|
77
|
-
}
|
|
78
|
-
return __awaiter(void 0, __spreadArray([predicate_1], args_1, true), void 0, function (predicate, interval) {
|
|
79
|
-
var result;
|
|
80
|
-
if (interval === void 0) { interval = 100; }
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
switch (_a.label) {
|
|
83
|
-
case 0:
|
|
84
|
-
if (!true) return [3 /*break*/, 3];
|
|
85
|
-
return [4 /*yield*/, predicate()];
|
|
86
|
-
case 1:
|
|
87
|
-
result = _a.sent();
|
|
88
|
-
if (result) {
|
|
89
|
-
return [2 /*return*/, result];
|
|
90
|
-
}
|
|
91
|
-
return [4 /*yield*/, (0, timeout_ts_1.default)(interval)];
|
|
92
|
-
case 2:
|
|
93
|
-
_a.sent();
|
|
94
|
-
return [3 /*break*/, 0];
|
|
95
|
-
case 3: return [2 /*return*/];
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
exports.waitUntil = waitUntil;
|
|
20
|
+
__exportStar(require("@signageos/core/dist/Timer/waitUntil"), exports);
|
|
21
|
+
var waitUntil_1 = require("@signageos/core/dist/Timer/waitUntil");
|
|
101
22
|
/**
|
|
102
|
-
*
|
|
103
|
-
* @throws TimeoutError if resultCallback does not return a non-null value within the specified timeoutMs
|
|
104
|
-
* @returns the first non-null value returned by resultCallback
|
|
23
|
+
* @deprecated Use `@signageos/core/dist/Timer/waitUntil` instead.
|
|
105
24
|
*/
|
|
106
|
-
|
|
107
|
-
return __awaiter(this, arguments, void 0, function (resultCallback, options) {
|
|
108
|
-
var startTime, result;
|
|
109
|
-
var _a, _b;
|
|
110
|
-
if (options === void 0) { options = {}; }
|
|
111
|
-
return __generator(this, function (_c) {
|
|
112
|
-
switch (_c.label) {
|
|
113
|
-
case 0:
|
|
114
|
-
// Default options
|
|
115
|
-
options.intervalMs = (_a = options.intervalMs) !== null && _a !== void 0 ? _a : 1e3;
|
|
116
|
-
options.timeoutMs = (_b = options.timeoutMs) !== null && _b !== void 0 ? _b : 30e3;
|
|
117
|
-
startTime = new Date().valueOf();
|
|
118
|
-
_c.label = 1;
|
|
119
|
-
case 1:
|
|
120
|
-
if (!(startTime + options.timeoutMs > new Date().valueOf())) return [3 /*break*/, 6];
|
|
121
|
-
return [4 /*yield*/, resultCallback()];
|
|
122
|
-
case 2:
|
|
123
|
-
result = _c.sent();
|
|
124
|
-
if (!(result === null)) return [3 /*break*/, 4];
|
|
125
|
-
return [4 /*yield*/, (0, timeout_ts_1.default)(options.intervalMs)];
|
|
126
|
-
case 3:
|
|
127
|
-
_c.sent();
|
|
128
|
-
return [3 /*break*/, 5];
|
|
129
|
-
case 4: return [2 /*return*/, result];
|
|
130
|
-
case 5: return [3 /*break*/, 1];
|
|
131
|
-
case 6: throw new TimeoutError(options.timeoutMs);
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
var TimeoutError = /** @class */ (function (_super) {
|
|
137
|
-
__extends(TimeoutError, _super);
|
|
138
|
-
function TimeoutError(timeoutMs) {
|
|
139
|
-
var _this = _super.call(this, "Wait until has timed-out after ".concat(timeoutMs, " ms")) || this;
|
|
140
|
-
_this.timeoutMs = timeoutMs;
|
|
141
|
-
return _this;
|
|
142
|
-
}
|
|
143
|
-
return TimeoutError;
|
|
144
|
-
}(Error));
|
|
145
|
-
exports.TimeoutError = TimeoutError;
|
|
146
|
-
/** @deprecated use named import instead */
|
|
147
|
-
exports.default = exports.waitUntil;
|
|
25
|
+
exports.default = waitUntil_1.waitUntil;
|
|
148
26
|
//# sourceMappingURL=waitUntil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitUntil.js","sourceRoot":"","sources":["../../src/DateTime/waitUntil.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"waitUntil.js","sourceRoot":"","sources":["../../src/DateTime/waitUntil.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,uEAAqD;AACrD,kEAAiE;AAEjE;;GAEG;AACH,kBAAe,qBAAS,CAAC"}
|
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @deprecated Use `@signageos/core` instead.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
5
|
-
private listeners;
|
|
6
|
-
/**
|
|
7
|
-
* Adds a listener for the event. The listener will be called every time the event is emitted. The listener may be async.
|
|
8
|
-
*/
|
|
9
|
-
on(event: string, listener: Function): this;
|
|
10
|
-
/**
|
|
11
|
-
* Adds a listener for the event. The listener will be called only once, the first time the event is emitted. The listener may be async.
|
|
12
|
-
*/
|
|
13
|
-
once(event: string, listener: Function): this;
|
|
14
|
-
/**
|
|
15
|
-
* Removes a listener for the event.
|
|
16
|
-
*/
|
|
17
|
-
off(event: string, listener: Function): this;
|
|
18
|
-
/**
|
|
19
|
-
* Alias for `on`.
|
|
20
|
-
*/
|
|
21
|
-
addListener(event: string, listener: Function): this;
|
|
22
|
-
/**
|
|
23
|
-
* Alias for `off`.
|
|
24
|
-
*/
|
|
25
|
-
removeListener(event: string, listener: Function): this;
|
|
26
|
-
/**
|
|
27
|
-
* Emits event and resolves, once all listeners have resolved.
|
|
28
|
-
*/
|
|
29
|
-
emit(event: string, ...args: any[]): Promise<void>;
|
|
30
|
-
private addNewListener;
|
|
31
|
-
}
|
|
4
|
+
export * from '@signageos/core/dist/Events/AsyncEventEmitter';
|