@imqueue/core 1.11.10 → 1.13.0

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/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -52,7 +56,6 @@ class IMQ {
52
56
  return new Adapter(name, options, mode);
53
57
  }
54
58
  }
55
- exports.default = IMQ;
56
59
  /**
57
60
  * Base generic queue factory options
58
61
  *
@@ -61,4 +64,5 @@ exports.default = IMQ;
61
64
  IMQ.options = {
62
65
  vendor: 'Redis', // default vendor
63
66
  };
67
+ exports.default = IMQ;
64
68
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imqueue/core",
3
- "version": "1.11.10",
3
+ "version": "1.13.0",
4
4
  "description": "Simple JSON-based messaging queue for inter service communication",
5
5
  "keywords": [
6
6
  "message-queue",
@@ -13,8 +13,8 @@
13
13
  "scripts": {
14
14
  "prepare": "./node_modules/.bin/tsc",
15
15
  "test": "./node_modules/.bin/tsc && ./node_modules/.bin/nyc mocha && ./node_modules/.bin/nyc report --reporter=text-lcov && npm run test-coverage",
16
- "test-fast": "./node_modules/.bin/tsc && ./node_modules/.bin/nyc mocha && /usr/bin/env node -e \"require('open')('file://`pwd`/coverage/index.html', { wait: false })\"",
17
- "test-local": "export COVERALLS_REPO_TOKEN=$IMQ_COVERALLS_TOKEN && npm test && /usr/bin/env node -e \"require('open')('https://coveralls.io/github/imqueue/imq', { wait: false })\"",
16
+ "test-fast": "./node_modules/.bin/tsc && ./node_modules/.bin/nyc mocha && /usr/bin/env node -e \"import('open').then(open => open.default('file://`pwd`/coverage/index.html', { wait: false }))\"",
17
+ "test-local": "export COVERALLS_REPO_TOKEN=$IMQ_COVERALLS_TOKEN && npm test && /usr/bin/env node -e \"import('open').then(open => open.default('https://coveralls.io/github/imqueue/imq', { wait: false }))\"",
18
18
  "test-dev": "npm run test && npm run clean-js && npm run clean-typedefs && npm run clean-maps",
19
19
  "test-coverage": "cat ./coverage/lcov.info | CODECLIMATE_API_HOST=https://codebeat.co/webhooks/code_coverage CODECLIMATE_REPO_TOKEN=85bb2a18-4ebb-4e48-a2ce-92b7bf438b1a ./node_modules/.bin/codeclimate-test-reporter",
20
20
  "clean-typedefs": "find . -name '*.d.ts' -not -wholename '*node_modules*' -not -wholename '*generator*' -type f -delete",
@@ -24,7 +24,7 @@
24
24
  "clean-doc": "rm -rf docs",
25
25
  "clean-benchmark": "rm -rf benchmark-result",
26
26
  "clean": "npm run clean-tests && npm run clean-typedefs && npm run clean-maps && npm run clean-js && npm run clean-doc && npm run clean-benchmark",
27
- "doc": "rm -rf docs && typedoc --excludePrivate --excludeExternals --hideGenerator --exclude \"**/+(test|node_modules|docs|coverage|benchmark|.nyc_output)/**/*\" --mode file --out ./docs . && /usr/bin/env node -e \"require('open')('file://`pwd`/docs/index.html',{wait:false})\""
27
+ "doc": "rm -rf docs && typedoc --excludePrivate --excludeExternals --hideGenerator --exclude \"**/+(test|node_modules|docs|coverage|benchmark|.nyc_output)/**/*\" --mode file --out ./docs . && /usr/bin/env node -e \"import('open').then(open => open.default('file://`pwd`/docs/index.html',{wait:false}))\""
28
28
  },
29
29
  "repository": {
30
30
  "type": "git",
@@ -37,32 +37,32 @@
37
37
  "author": "imqueue.com <support@imqueue.com> (https://imqueue.com)",
38
38
  "license": "ISC",
39
39
  "dependencies": {
40
- "@types/redis": "^2.8.31",
40
+ "@types/redis": "^2.8.32",
41
41
  "redis": "3.1.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/chai": "^4.2.21",
45
- "@types/mocha": "^9.0.0",
46
- "@types/mock-require": "^2.0.0",
47
- "@types/node": "^16.7.10",
48
- "@types/sinon": "^10.0.2",
49
- "@types/yargs": "^17.0.2",
50
- "chai": "^4.3.4",
44
+ "@types/chai": "^4.3.10",
45
+ "@types/mocha": "^10.0.4",
46
+ "@types/mock-require": "^2.0.3",
47
+ "@types/node": "^20.9.0",
48
+ "@types/sinon": "^17.0.1",
49
+ "@types/yargs": "^17.0.31",
50
+ "chai": "^4.3.10",
51
51
  "codeclimate-test-reporter": "^0.5.1",
52
52
  "coveralls": "^3.1.1",
53
- "mocha": "^9.1.1",
53
+ "mocha": "^10.2.0",
54
54
  "mocha-lcov-reporter": "^1.3.0",
55
55
  "mock-require": "^3.0.3",
56
56
  "nyc": "^15.1.0",
57
- "open": "^8.2.1",
57
+ "open": "^9.1.0",
58
58
  "reflect-metadata": "^0.1.13",
59
- "sinon": "^11.1.2",
60
- "source-map-support": "^0.5.19",
61
- "ts-node": "^10.2.1",
59
+ "sinon": "^17.0.1",
60
+ "source-map-support": "^0.5.21",
61
+ "ts-node": "^10.9.1",
62
62
  "tslint": "^6.1.3",
63
- "typedoc": "^0.22.7",
64
- "typescript": "^4.4.4",
65
- "yargs": "^17.1.1"
63
+ "typedoc": "^0.25.3",
64
+ "typescript": "^5.2.2",
65
+ "yargs": "^17.7.2"
66
66
  },
67
67
  "main": "index.js",
68
68
  "typescript": {
package/src/IMQMode.js CHANGED
@@ -21,5 +21,5 @@ var IMQMode;
21
21
  IMQMode[IMQMode["BOTH"] = 0] = "BOTH";
22
22
  IMQMode[IMQMode["WORKER"] = 1] = "WORKER";
23
23
  IMQMode[IMQMode["PUBLISHER"] = 2] = "PUBLISHER";
24
- })(IMQMode = exports.IMQMode || (exports.IMQMode = {}));
24
+ })(IMQMode || (exports.IMQMode = IMQMode = {}));
25
25
  //# sourceMappingURL=IMQMode.js.map
@@ -22,7 +22,7 @@ export { EventEmitter } from 'events';
22
22
  /**
23
23
  * Represents any JSON-serializable value
24
24
  */
25
- export declare type AnyJson = boolean | number | string | null | undefined | JsonArray | JsonObject;
25
+ export type AnyJson = boolean | number | string | null | undefined | JsonArray | JsonObject;
26
26
  /**
27
27
  * Represents JSON serializable object
28
28
  */
@@ -40,7 +40,7 @@ export interface JsonArray extends Array<AnyJson> {
40
40
  *
41
41
  * @deprecated
42
42
  */
43
- export declare type IJson = JsonObject;
43
+ export type IJson = JsonObject;
44
44
  /**
45
45
  * Logger interface
46
46
  */
@@ -192,7 +192,7 @@ export interface IMQOptions {
192
192
  port: number;
193
193
  }[];
194
194
  }
195
- export declare type IMessageQueueConstructor = new (name: string, options?: Partial<IMQOptions>, mode?: IMQMode) => IMessageQueue;
195
+ export type IMessageQueueConstructor = new (name: string, options?: Partial<IMQOptions>, mode?: IMQMode) => IMessageQueue;
196
196
  /**
197
197
  * Generic messaging queue implementation interface
198
198
  *
package/src/RedisQueue.js CHANGED
@@ -991,6 +991,7 @@ class RedisQueue extends events_1.EventEmitter {
991
991
  });
992
992
  }
993
993
  }
994
+ exports.RedisQueue = RedisQueue;
994
995
  /**
995
996
  * Writer connections collection
996
997
  *
@@ -1033,5 +1034,4 @@ __decorate([
1033
1034
  __metadata("design:paramtypes", []),
1034
1035
  __metadata("design:returntype", void 0)
1035
1036
  ], RedisQueue.prototype, "destroyWriter", null);
1036
- exports.RedisQueue = RedisQueue;
1037
1037
  //# sourceMappingURL=RedisQueue.js.map
package/src/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/src/profile.d.ts CHANGED
@@ -46,7 +46,7 @@ export interface ProfileDecoratorOptions {
46
46
  */
47
47
  export declare function verifyLogLevel(level: any): LogLevel;
48
48
  export declare const IMQ_LOG_LEVEL: LogLevel;
49
- export declare type AllowedTimeFormat = 'microseconds' | 'milliseconds' | 'seconds';
49
+ export type AllowedTimeFormat = 'microseconds' | 'milliseconds' | 'seconds';
50
50
  /**
51
51
  * Environment variable IMQ_LOG_TIME=[1, 0] - enables/disables profiled
52
52
  * timings logging
package/src/profile.js CHANGED
@@ -26,7 +26,7 @@ var LogLevel;
26
26
  LogLevel["INFO"] = "info";
27
27
  LogLevel["WARN"] = "warn";
28
28
  LogLevel["ERROR"] = "error";
29
- })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
29
+ })(LogLevel || (exports.LogLevel = LogLevel = {}));
30
30
  /**
31
31
  * Checks if log level is set to proper value or returns default one
32
32
  *