@message-queue-toolkit/core
Advanced tools
Comparing version
export type { QueueConsumer, AsyncPublisher, SyncPublisher, TransactionObservabilityManager, Logger, } from './lib/types/MessageQueueTypes'; | ||
export { AbstractQueueService } from './lib/queues/AbstractQueueService'; | ||
export type { QueueOptions, QueueDependencies, QueueConsumerDependencies, } from './lib/queues/AbstractQueueService'; | ||
export type { QueueOptions, QueueDependencies, QueueConsumerDependencies, Deserializer, } from './lib/queues/AbstractQueueService'; | ||
export { isMessageError, MessageValidationError, MessageInvalidFormatError, } from './lib/errors/Errors'; | ||
export { objectToBuffer } from './lib/utils/queueUtils'; | ||
export { waitAndRetry } from './lib/utils/waitUtils'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.waitAndRetry = exports.objectToBuffer = exports.AbstractQueueService = void 0; | ||
exports.waitAndRetry = exports.objectToBuffer = exports.MessageInvalidFormatError = exports.MessageValidationError = exports.isMessageError = exports.AbstractQueueService = void 0; | ||
var AbstractQueueService_1 = require("./lib/queues/AbstractQueueService"); | ||
Object.defineProperty(exports, "AbstractQueueService", { enumerable: true, get: function () { return AbstractQueueService_1.AbstractQueueService; } }); | ||
var Errors_1 = require("./lib/errors/Errors"); | ||
Object.defineProperty(exports, "isMessageError", { enumerable: true, get: function () { return Errors_1.isMessageError; } }); | ||
Object.defineProperty(exports, "MessageValidationError", { enumerable: true, get: function () { return Errors_1.MessageValidationError; } }); | ||
Object.defineProperty(exports, "MessageInvalidFormatError", { enumerable: true, get: function () { return Errors_1.MessageInvalidFormatError; } }); | ||
var queueUtils_1 = require("./lib/utils/queueUtils"); | ||
@@ -7,0 +11,0 @@ Object.defineProperty(exports, "objectToBuffer", { enumerable: true, get: function () { return queueUtils_1.objectToBuffer; } }); |
@@ -1,3 +0,4 @@ | ||
import type { ErrorReporter, ErrorResolver } from '@lokalise/node-core'; | ||
import type { ZodSchema } from 'zod'; | ||
import type { ErrorReporter, ErrorResolver, Either } from '@lokalise/node-core'; | ||
import type { ZodSchema, ZodType } from 'zod'; | ||
import type { MessageInvalidFormatError, MessageValidationError } from '../errors/Errors'; | ||
import type { Logger, TransactionObservabilityManager } from '../types/MessageQueueTypes'; | ||
@@ -12,2 +13,3 @@ export type QueueDependencies = { | ||
}; | ||
export type Deserializer<MessagePayloadType extends object, QueueEngineMessageType extends object> = (message: QueueEngineMessageType, type: ZodType<MessagePayloadType>, errorProcessor: ErrorResolver) => Either<MessageInvalidFormatError | MessageValidationError, MessagePayloadType>; | ||
export type QueueOptions<MessagePayloadType extends object, QueueConfiguration extends object> = { | ||
@@ -14,0 +16,0 @@ messageSchema: ZodSchema<MessagePayloadType>; |
{ | ||
"name": "@message-queue-toolkit/core", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"private": false, | ||
@@ -16,3 +16,3 @@ "license": "MIT", | ||
"scripts": { | ||
"build": "tsc", | ||
"build": "del-cli dist && del-cli coverage && tsc", | ||
"build:release": "del-cli dist && del-cli coverage && npm run lint && tsc --project tsconfig.release.json", | ||
@@ -22,2 +22,3 @@ "lint": "eslint . --ext .ts", | ||
"test:coverage": "", | ||
"test:ci": "npm run docker:start:dev && npm run test:coverage && npm run docker:stop:dev", | ||
"docker:start:dev": "", | ||
@@ -24,0 +25,0 @@ "docker:stop:dev": "", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
14059
36.36%19
18.75%193
35.92%