@budibase/backend-core 2.21.8 → 2.21.9
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/dist/index.js +0 -38
- package/dist/index.js.map +3 -3
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/plugins.js.meta.json +1 -1
- package/dist/src/context/types.d.ts +1 -2
- package/dist/src/timers/timers.d.ts +0 -12
- package/dist/src/timers/timers.js +1 -38
- package/dist/src/timers/timers.js.map +1 -1
- package/package.json +4 -4
- package/src/context/types.ts +1 -2
- package/src/timers/timers.ts +0 -38
package/dist/index.js
CHANGED
|
@@ -58481,8 +58481,6 @@ function logWarn(message, e) {
|
|
|
58481
58481
|
// src/timers/index.ts
|
|
58482
58482
|
var timers_exports = {};
|
|
58483
58483
|
__export(timers_exports, {
|
|
58484
|
-
ExecutionTimeTracker: () => ExecutionTimeTracker,
|
|
58485
|
-
ExecutionTimeoutError: () => ExecutionTimeoutError,
|
|
58486
58484
|
cleanup: () => cleanup,
|
|
58487
58485
|
clear: () => clear,
|
|
58488
58486
|
set: () => set
|
|
@@ -58508,42 +58506,6 @@ function cleanup() {
|
|
|
58508
58506
|
}
|
|
58509
58507
|
intervals = [];
|
|
58510
58508
|
}
|
|
58511
|
-
var ExecutionTimeoutError = class extends Error {
|
|
58512
|
-
constructor() {
|
|
58513
|
-
super(...arguments);
|
|
58514
|
-
this.name = "ExecutionTimeoutError";
|
|
58515
|
-
}
|
|
58516
|
-
};
|
|
58517
|
-
var ExecutionTimeTracker = class _ExecutionTimeTracker {
|
|
58518
|
-
constructor(limitMs) {
|
|
58519
|
-
this.limitMs = limitMs;
|
|
58520
|
-
this.totalTimeMs = 0;
|
|
58521
|
-
}
|
|
58522
|
-
static withLimit(limitMs) {
|
|
58523
|
-
return new _ExecutionTimeTracker(limitMs);
|
|
58524
|
-
}
|
|
58525
|
-
track(f) {
|
|
58526
|
-
this.checkLimit();
|
|
58527
|
-
const start2 = process.hrtime.bigint();
|
|
58528
|
-
try {
|
|
58529
|
-
return f();
|
|
58530
|
-
} finally {
|
|
58531
|
-
const end2 = process.hrtime.bigint();
|
|
58532
|
-
this.totalTimeMs += Number(end2 - start2) / 1e6;
|
|
58533
|
-
this.checkLimit();
|
|
58534
|
-
}
|
|
58535
|
-
}
|
|
58536
|
-
get elapsedMS() {
|
|
58537
|
-
return this.totalTimeMs;
|
|
58538
|
-
}
|
|
58539
|
-
checkLimit() {
|
|
58540
|
-
if (this.totalTimeMs > this.limitMs) {
|
|
58541
|
-
throw new ExecutionTimeoutError(
|
|
58542
|
-
`Execution time limit of ${this.limitMs}ms exceeded: ${this.totalTimeMs}ms`
|
|
58543
|
-
);
|
|
58544
|
-
}
|
|
58545
|
-
}
|
|
58546
|
-
};
|
|
58547
58509
|
|
|
58548
58510
|
// src/redis/redis.ts
|
|
58549
58511
|
var MockRedis;
|