@imqueue/rpc 1.17.1 → 2.0.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.
Files changed (47) hide show
  1. package/LICENSE +585 -13
  2. package/README.md +2 -1
  3. package/index.d.ts +16 -12
  4. package/index.js +16 -12
  5. package/package.json +15 -15
  6. package/src/IMQCache.d.ts +17 -11
  7. package/src/IMQClient.d.ts +26 -13
  8. package/src/IMQClient.js +49 -20
  9. package/src/IMQDelay.d.ts +17 -11
  10. package/src/IMQDelay.js +17 -11
  11. package/src/IMQLock.d.ts +17 -11
  12. package/src/IMQLock.js +0 -17
  13. package/src/IMQMetadata.d.ts +17 -11
  14. package/src/IMQRPCDescription.d.ts +17 -11
  15. package/src/IMQRPCDescription.js +0 -17
  16. package/src/IMQRPCError.d.ts +17 -11
  17. package/src/IMQRPCOptions.d.ts +18 -11
  18. package/src/IMQRPCOptions.js +17 -11
  19. package/src/IMQRPCRequest.d.ts +17 -11
  20. package/src/IMQRPCResponse.d.ts +17 -11
  21. package/src/IMQService.d.ts +18 -12
  22. package/src/IMQService.js +18 -12
  23. package/src/cache/ICache.d.ts +17 -11
  24. package/src/cache/RedisCache.d.ts +24 -17
  25. package/src/cache/RedisCache.js +11 -10
  26. package/src/cache/index.d.ts +19 -11
  27. package/src/cache/index.js +19 -11
  28. package/src/decorators/cache.d.ts +17 -11
  29. package/src/decorators/cache.js +17 -11
  30. package/src/decorators/expose.d.ts +17 -11
  31. package/src/decorators/expose.js +17 -11
  32. package/src/decorators/index.d.ts +19 -11
  33. package/src/decorators/index.js +19 -11
  34. package/src/decorators/indexed.js +19 -13
  35. package/src/decorators/lock.js +17 -11
  36. package/src/decorators/logged.d.ts +17 -11
  37. package/src/decorators/property.js +19 -13
  38. package/src/decorators/remote.d.ts +17 -11
  39. package/src/decorators/remote.js +17 -11
  40. package/src/helpers/fs.js +17 -11
  41. package/src/helpers/index.d.ts +18 -11
  42. package/src/helpers/index.js +18 -11
  43. package/src/helpers/os-uuid.js +17 -11
  44. package/src/helpers/pid.js +17 -11
  45. package/src/helpers/signature.js +17 -11
  46. package/src/index.d.ts +17 -11
  47. package/src/index.js +17 -11
package/index.js CHANGED
@@ -15,21 +15,25 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /*!
18
- * I Message Queue exports
18
+ * I'm Queue Software Project
19
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
19
20
  *
20
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
21
+ * This program is free software: you can redistribute it and/or modify
22
+ * it under the terms of the GNU General Public License as published by
23
+ * the Free Software Foundation, either version 3 of the License, or
24
+ * (at your option) any later version.
21
25
  *
22
- * Permission to use, copy, modify, and/or distribute this software for any
23
- * purpose with or without fee is hereby granted, provided that the above
24
- * copyright notice and this permission notice appear in all copies.
26
+ * This program is distributed in the hope that it will be useful,
27
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ * GNU General Public License for more details.
25
30
  *
26
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
27
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
28
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
29
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
30
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
31
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32
- * PERFORMANCE OF THIS SOFTWARE.
31
+ * You should have received a copy of the GNU General Public License
32
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
33
+ *
34
+ * If you want to use this code in a closed source (commercial) project, you can
35
+ * purchase a proprietary commercial license. Please contact us at
36
+ * <support@imqueue.com> to get commercial licensing options.
33
37
  */
34
38
  __exportStar(require("./src"), exports);
35
39
  __exportStar(require("@imqueue/core"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imqueue/rpc",
3
- "version": "1.17.1",
3
+ "version": "2.0.0",
4
4
  "description": "RPC-like client-service implementation over messaging queue",
5
5
  "keywords": [
6
6
  "redis",
@@ -36,34 +36,34 @@
36
36
  },
37
37
  "homepage": "https://imqueue.com/",
38
38
  "author": "imqueue.com <support@imqueue.com> (https://imqueue.com)",
39
- "license": "ISC",
39
+ "license": "GPL-3.0-only",
40
40
  "dependencies": {
41
- "@imqueue/core": "^1.15.0",
42
- "@types/node": "^22.9.0",
43
- "acorn": "^8.14.0",
44
- "farmhash": "^4.0.1",
41
+ "@imqueue/core": "^2.0.0",
42
+ "@types/node": "^24.0.8",
43
+ "acorn": "^8.15.0",
44
+ "farmhash": "^4.0.2",
45
45
  "node-machine-id": "^1.1.12",
46
46
  "reflect-metadata": "^0.2.2",
47
- "typescript": "^5.6.3"
47
+ "typescript": "^5.8.3"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/chai": "^5.0.1",
51
- "@types/mocha": "^10.0.9",
50
+ "@types/chai": "^5.2.2",
51
+ "@types/mocha": "^10.0.10",
52
52
  "@types/mock-require": "^3.0.0",
53
- "@types/sinon": "^17.0.3",
54
- "chai": "^4.3.10",
53
+ "@types/sinon": "^17.0.4",
54
+ "chai": "^5.2.0",
55
55
  "codeclimate-test-reporter": "^0.5.1",
56
56
  "coveralls-next": "^4.2.1",
57
57
  "minimist": "^1.2.8",
58
- "mocha": "^10.8.2",
58
+ "mocha": "^11.7.1",
59
59
  "mocha-lcov-reporter": "^1.3.0",
60
60
  "mock-require": "^3.0.3",
61
61
  "nyc": "^17.1.0",
62
- "open": "^10.1.0",
63
- "sinon": "^19.0.2",
62
+ "open": "^10.1.2",
63
+ "sinon": "^21.0.0",
64
64
  "source-map-support": "^0.5.21",
65
65
  "ts-node": "^10.9.2",
66
- "typedoc": "^0.26.11"
66
+ "typedoc": "^0.28.7"
67
67
  },
68
68
  "main": "index.js",
69
69
  "typescript": {
package/src/IMQCache.d.ts CHANGED
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQCache implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  import { ICache, ICacheAdapter } from '.';
19
25
  /**
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQClient implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  import { JsonObject } from '@imqueue/core';
19
25
  import { IMQClientOptions, IMQRPCResponse, IMQRPCRequest, IMQDelay, Description } from '.';
@@ -25,25 +31,32 @@ export declare abstract class IMQClient extends EventEmitter {
25
31
  readonly options: IMQClientOptions;
26
32
  readonly id: number;
27
33
  readonly name: string;
34
+ readonly hostName: string;
28
35
  readonly serviceName: string;
36
+ readonly queueName: string;
29
37
  private readonly baseName;
30
- private imq;
38
+ private readonly imq;
39
+ private readonly subscriptionImq;
40
+ private static singleImq;
31
41
  private readonly logger;
32
42
  private resolvers;
33
43
  /**
34
44
  * Class constructor
35
45
  *
36
46
  * @constructor
37
- * @param {Partial<IMQOptions>} options
47
+ * @param {Partial<IMQClientOptions>} options
38
48
  * @param {string} serviceName
39
49
  * @param {string} name
40
50
  */
41
51
  constructor(options?: Partial<IMQClientOptions>, serviceName?: string, name?: string);
52
+ private createImq;
53
+ private createSubscriptionImq;
42
54
  /**
43
55
  * Sends call to remote service method
44
56
  *
45
57
  * @access protected
46
58
  * @param {...any[]} args
59
+ * @template T
47
60
  * @returns {Promise<T>}
48
61
  */
49
62
  protected remoteCall<T>(...args: any[]): Promise<T>;
package/src/IMQClient.js CHANGED
@@ -15,19 +15,25 @@ exports.imqCallRejector = imqCallRejector;
15
15
  /*!
16
16
  * IMQClient implementation
17
17
  *
18
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
18
+ * I'm Queue Software Project
19
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
19
20
  *
20
- * Permission to use, copy, modify, and/or distribute this software for any
21
- * purpose with or without fee is hereby granted, provided that the above
22
- * copyright notice and this permission notice appear in all copies.
21
+ * This program is free software: you can redistribute it and/or modify
22
+ * it under the terms of the GNU General Public License as published by
23
+ * the Free Software Foundation, either version 3 of the License, or
24
+ * (at your option) any later version.
23
25
  *
24
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
25
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
26
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
27
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
28
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
29
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
30
- * PERFORMANCE OF THIS SOFTWARE.
26
+ * This program is distributed in the hope that it will be useful,
27
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
28
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
+ * GNU General Public License for more details.
30
+ *
31
+ * You should have received a copy of the GNU General Public License
32
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
33
+ *
34
+ * If you want to use this code in a closed source (commercial) project, you can
35
+ * purchase a proprietary commercial license. Please contact us at
36
+ * <support@imqueue.com> to get commercial licensing options.
31
37
  */
32
38
  const core_1 = require("@imqueue/core");
33
39
  const _1 = require(".");
@@ -46,11 +52,12 @@ class IMQClient extends events_1.EventEmitter {
46
52
  * Class constructor
47
53
  *
48
54
  * @constructor
49
- * @param {Partial<IMQOptions>} options
55
+ * @param {Partial<IMQClientOptions>} options
50
56
  * @param {string} serviceName
51
57
  * @param {string} name
52
58
  */
53
59
  constructor(options, serviceName, name) {
60
+ var _a;
54
61
  super();
55
62
  this.resolvers = {};
56
63
  const baseName = name || this.constructor.name;
@@ -62,26 +69,46 @@ class IMQClient extends events_1.EventEmitter {
62
69
  this.options = Object.assign(Object.assign({}, _1.DEFAULT_IMQ_CLIENT_OPTIONS), options);
63
70
  this.id = (0, _1.pid)(baseName);
64
71
  this.logger = this.options.logger || /* istanbul ignore next */ console;
65
- this.name = `${baseName}-${(0, _1.osUuid)()}-${this.id}:client`;
72
+ this.hostName = ((_a = IMQClient.singleImq) === null || _a === void 0 ? void 0 : _a.name) ||
73
+ `${(0, _1.osUuid)()}-${this.id}:client`;
74
+ this.name = `${baseName}-${this.hostName}`;
66
75
  this.serviceName = serviceName || baseName.replace(/Client$/, '');
67
- this.imq = core_1.default.create(this.name, this.options);
76
+ this.queueName = this.options.singleQueue ? this.hostName : this.name;
77
+ this.imq = this.createImq();
78
+ this.subscriptionImq = this.createSubscriptionImq();
68
79
  _1.SIGNALS.forEach((signal) => process.on(signal, async () => {
69
80
  this.destroy().catch(this.logger.error);
70
81
  // istanbul ignore next
71
82
  setTimeout(() => process.exit(0), core_1.IMQ_SHUTDOWN_TIMEOUT);
72
83
  }));
73
84
  }
85
+ createImq() {
86
+ if (!this.options.singleQueue) {
87
+ return core_1.default.create(this.queueName, this.options);
88
+ }
89
+ if (!IMQClient.singleImq) {
90
+ IMQClient.singleImq = core_1.default.create(this.queueName, this.options);
91
+ }
92
+ return IMQClient.singleImq;
93
+ }
94
+ createSubscriptionImq() {
95
+ if (!this.options.singleQueue) {
96
+ return this.imq;
97
+ }
98
+ return core_1.default.create(this.name, this.options);
99
+ }
74
100
  /**
75
101
  * Sends call to remote service method
76
102
  *
77
103
  * @access protected
78
104
  * @param {...any[]} args
105
+ * @template T
79
106
  * @returns {Promise<T>}
80
107
  */
81
108
  async remoteCall(...args) {
82
109
  const logger = this.options.logger || console;
83
110
  const method = args.pop();
84
- const from = this.name;
111
+ const from = this.queueName;
85
112
  const to = this.serviceName;
86
113
  let delay = 0;
87
114
  let metadata;
@@ -130,7 +157,7 @@ class IMQClient extends events_1.EventEmitter {
130
157
  * @return {Promise<void>}
131
158
  */
132
159
  async subscribe(handler) {
133
- return this.imq.subscribe(this.serviceName, handler);
160
+ return this.subscriptionImq.subscribe(this.name, handler);
134
161
  }
135
162
  // noinspection JSUnusedGlobalSymbols
136
163
  /**
@@ -139,7 +166,7 @@ class IMQClient extends events_1.EventEmitter {
139
166
  * @return {Promise<void>}
140
167
  */
141
168
  async unsubscribe() {
142
- return this.imq.unsubscribe();
169
+ return this.subscriptionImq.unsubscribe();
143
170
  }
144
171
  // noinspection JSUnusedGlobalSymbols
145
172
  /**
@@ -150,7 +177,7 @@ class IMQClient extends events_1.EventEmitter {
150
177
  * @return {Promise<void>}
151
178
  */
152
179
  async broadcast(payload) {
153
- return this.imq.publish(payload, this.serviceName);
180
+ return this.imq.publish(payload, this.queueName);
154
181
  }
155
182
  /**
156
183
  * Initializes client work
@@ -165,7 +192,7 @@ class IMQClient extends events_1.EventEmitter {
165
192
  // istanbul ignore if
166
193
  if (!this.resolvers[message.to]) {
167
194
  // when there is no resolvers it means
168
- // we have massage in queue which was initiated
195
+ // we have message in queue which was initiated
169
196
  // by some process which is broken. So we provide an
170
197
  // ability to handle enqueued messages via EventEmitter
171
198
  // interface
@@ -179,7 +206,9 @@ class IMQClient extends events_1.EventEmitter {
179
206
  }
180
207
  resolve && resolve(message.data, message);
181
208
  });
182
- await this.imq.start();
209
+ if (this.imq) {
210
+ await this.imq.start();
211
+ }
183
212
  }
184
213
  // noinspection JSUnusedGlobalSymbols
185
214
  /**
package/src/IMQDelay.d.ts CHANGED
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQDelay implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  export declare class IMQDelay {
19
25
  timer: number;
package/src/IMQDelay.js CHANGED
@@ -4,19 +4,25 @@ exports.IMQDelay = void 0;
4
4
  /*!
5
5
  * IMQDelay implementation
6
6
  *
7
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
7
+ * I'm Queue Software Project
8
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
8
9
  *
9
- * Permission to use, copy, modify, and/or distribute this software for any
10
- * purpose with or without fee is hereby granted, provided that the above
11
- * copyright notice and this permission notice appear in all copies.
10
+ * This program is free software: you can redistribute it and/or modify
11
+ * it under the terms of the GNU General Public License as published by
12
+ * the Free Software Foundation, either version 3 of the License, or
13
+ * (at your option) any later version.
12
14
  *
13
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- * PERFORMANCE OF THIS SOFTWARE.
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License
21
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
+ *
23
+ * If you want to use this code in a closed source (commercial) project, you can
24
+ * purchase a proprietary commercial license. Please contact us at
25
+ * <support@imqueue.com> to get commercial licensing options.
20
26
  */
21
27
  class IMQDelay {
22
28
  get ms() {
package/src/IMQLock.d.ts CHANGED
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQLock implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  import { ILogger } from '@imqueue/core';
19
25
  export type AcquiredLock<T> = T | boolean;
package/src/IMQLock.js CHANGED
@@ -1,21 +1,4 @@
1
1
  "use strict";
2
- /*!
3
- * IMQLock implementation
4
- *
5
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
6
- *
7
- * Permission to use, copy, modify, and/or distribute this software for any
8
- * purpose with or without fee is hereby granted, provided that the above
9
- * copyright notice and this permission notice appear in all copies.
10
- *
11
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
- * PERFORMANCE OF THIS SOFTWARE.
18
- */
19
2
  Object.defineProperty(exports, "__esModule", { value: true });
20
3
  exports.IMQLock = void 0;
21
4
  /**
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQMetadata implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  import { AnyJson, JsonObject } from '@imqueue/core';
19
25
  export declare class IMQMetadata {
@@ -1,19 +1,25 @@
1
1
  /*!
2
2
  * IMQRPCDescription implementation
3
3
  *
4
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
4
+ * I'm Queue Software Project
5
+ * Copyright (C) 2025 imqueue.com <support@imqueue.com>
5
6
  *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
9
11
  *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
15
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16
- * PERFORMANCE OF THIS SOFTWARE.
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
+ *
20
+ * If you want to use this code in a closed source (commercial) project, you can
21
+ * purchase a proprietary commercial license. Please contact us at
22
+ * <support@imqueue.com> to get commercial licensing options.
17
23
  */
18
24
  /**
19
25
  * Method argument description
@@ -1,21 +1,4 @@
1
1
  "use strict";
2
- /*!
3
- * IMQRPCDescription implementation
4
- *
5
- * Copyright (c) 2018, imqueue.com <support@imqueue.com>
6
- *
7
- * Permission to use, copy, modify, and/or distribute this software for any
8
- * purpose with or without fee is hereby granted, provided that the above
9
- * copyright notice and this permission notice appear in all copies.
10
- *
11
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12
- * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13
- * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14
- * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15
- * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
- * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
- * PERFORMANCE OF THIS SOFTWARE.
18
- */
19
2
  Object.defineProperty(exports, "__esModule", { value: true });
20
3
  exports.IMQRPCDescription = void 0;
21
4
  class IMQRPCDescription {