@hahnpro/hpc-api 2026.2.3 → 2026.2.4
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/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DataMockService = void 0;
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
4
|
const _1 = require(".");
|
|
6
5
|
const interfaces_1 = require("../interfaces");
|
|
7
6
|
class DataMockService extends _1.APIBaseMock {
|
|
@@ -9,7 +8,7 @@ class DataMockService extends _1.APIBaseMock {
|
|
|
9
8
|
super();
|
|
10
9
|
}
|
|
11
10
|
async addOne(dto) {
|
|
12
|
-
const dtoWithId = { id:
|
|
11
|
+
const dtoWithId = { id: globalThis.crypto.randomUUID(), ...dto };
|
|
13
12
|
this.data.push(dtoWithId);
|
|
14
13
|
return Promise.resolve(dtoWithId);
|
|
15
14
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrganizationsMockService = void 0;
|
|
4
|
-
const crypto_1 = require("crypto");
|
|
5
4
|
const _1 = require(".");
|
|
6
5
|
class OrganizationsMockService extends _1.APIBaseMock {
|
|
7
6
|
constructor(organizations) {
|
|
@@ -19,7 +18,7 @@ class OrganizationsMockService extends _1.APIBaseMock {
|
|
|
19
18
|
return Promise.resolve({ id });
|
|
20
19
|
}
|
|
21
20
|
async addOne(dto) {
|
|
22
|
-
const dtoWithId = { id:
|
|
21
|
+
const dtoWithId = { id: globalThis.crypto.randomUUID(), ...dto };
|
|
23
22
|
this.data.push(dtoWithId);
|
|
24
23
|
return Promise.resolve(dtoWithId);
|
|
25
24
|
}
|
package/src/lib/queue.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import PQueue from 'p-queue';
|
|
2
|
-
|
|
2
|
+
declare const PQueueBase: typeof PQueue;
|
|
3
|
+
export declare class Queue extends PQueueBase {
|
|
3
4
|
private peak;
|
|
4
5
|
private total;
|
|
5
6
|
constructor(options: QueueOptions);
|
|
@@ -15,3 +16,4 @@ export interface QueueOptions {
|
|
|
15
16
|
timeout?: number;
|
|
16
17
|
throwOnTimeout?: boolean;
|
|
17
18
|
}
|
|
19
|
+
export {};
|
package/src/lib/queue.js
CHANGED
|
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Queue = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const p_queue_1 = tslib_1.__importDefault(require("p-queue"));
|
|
6
|
-
|
|
6
|
+
const PQueueBase = p_queue_1.default.default ?? p_queue_1.default;
|
|
7
|
+
class Queue extends PQueueBase {
|
|
7
8
|
constructor(options) {
|
|
8
9
|
super(options);
|
|
9
10
|
this.peak = 0;
|