@impz/testing 7.2.0 → 7.4.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/dist/index.js +14 -5
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21779,6 +21779,7 @@ var EnvSchema = z54.object({
|
|
|
21779
21779
|
IMP_HOST_ADDRESSES: z54.string().default(""),
|
|
21780
21780
|
IMP_RAM_BUDGET_MIB: CountSchema3.default(16384),
|
|
21781
21781
|
IMP_PRIORITY_RAM_MIB: CountSchema3.optional(),
|
|
21782
|
+
IMP_PRIORITY_ORDINARY_RAM_MIB: z54.coerce.number().pipe(z54.int().nonnegative()).optional(),
|
|
21782
21783
|
IMP_PRIORITY_IMPS: z54.string().transform(splitList).pipe(z54.array(ImpPatternSchema)).optional(),
|
|
21783
21784
|
IMP_IDLE_TIMEOUT_S: CountSchema3.default(60),
|
|
21784
21785
|
IMP_IDLE_CPU_PERCENT: z54.coerce.number().nonnegative().default(10),
|
|
@@ -22006,7 +22007,11 @@ function loadConfig(env) {
|
|
|
22006
22007
|
function parsePriorityRam(parsed) {
|
|
22007
22008
|
const mib = parsed.IMP_PRIORITY_RAM_MIB;
|
|
22008
22009
|
const patterns = parsed.IMP_PRIORITY_IMPS;
|
|
22010
|
+
const ordinaryMib = parsed.IMP_PRIORITY_ORDINARY_RAM_MIB;
|
|
22009
22011
|
if (mib === undefined && patterns === undefined) {
|
|
22012
|
+
if (ordinaryMib !== undefined) {
|
|
22013
|
+
throw new Error("IMP_PRIORITY_ORDINARY_RAM_MIB needs IMP_PRIORITY_RAM_MIB and IMP_PRIORITY_IMPS");
|
|
22014
|
+
}
|
|
22010
22015
|
return null;
|
|
22011
22016
|
}
|
|
22012
22017
|
if (mib === undefined || patterns === undefined) {
|
|
@@ -22015,7 +22020,10 @@ function parsePriorityRam(parsed) {
|
|
|
22015
22020
|
if (mib >= parsed.IMP_RAM_BUDGET_MIB) {
|
|
22016
22021
|
throw new Error(`IMP_PRIORITY_RAM_MIB ${String(mib)} leaves no room for other imps in the ${String(parsed.IMP_RAM_BUDGET_MIB)} MiB IMP_RAM_BUDGET_MIB`);
|
|
22017
22022
|
}
|
|
22018
|
-
|
|
22023
|
+
if (ordinaryMib !== undefined && ordinaryMib > mib) {
|
|
22024
|
+
throw new Error(`IMP_PRIORITY_ORDINARY_RAM_MIB ${String(ordinaryMib)} is more than the ${String(mib)} MiB IMP_PRIORITY_RAM_MIB`);
|
|
22025
|
+
}
|
|
22026
|
+
return { mib, patterns, ...ordinaryMib !== undefined && { ordinaryMib } };
|
|
22019
22027
|
}
|
|
22020
22028
|
function parseTestRegistry(parsed) {
|
|
22021
22029
|
const registry = parsed.IMP_BUILD_TEST_REGISTRY;
|
|
@@ -22066,7 +22074,7 @@ import { join as join49 } from "path";
|
|
|
22066
22074
|
// packages/daemon/package.json
|
|
22067
22075
|
var package_default = {
|
|
22068
22076
|
name: "@impz/daemon",
|
|
22069
|
-
version: "7.
|
|
22077
|
+
version: "7.4.0",
|
|
22070
22078
|
private: true,
|
|
22071
22079
|
description: "impd: the imp host daemon",
|
|
22072
22080
|
type: "module",
|
|
@@ -33481,7 +33489,7 @@ var EVENT_TOOL = defineTool({
|
|
|
33481
33489
|
input: z72.strictObject({
|
|
33482
33490
|
after: EventCursorSchema.shape.after.describe("The after of the last call; omit it at first"),
|
|
33483
33491
|
logId: EventCursorSchema.shape.logId.describe("The logId of the last call"),
|
|
33484
|
-
limit: z72.int().min(1).max(1000).optional().describe("The most events to return, 100 when omitted")
|
|
33492
|
+
limit: z72.int().min(1).max(1000).optional().describe("The most events to return after a valid cursor, 100 when omitted. A call with no after, and a Reset, return every imp whatever the limit")
|
|
33485
33493
|
}),
|
|
33486
33494
|
annotations: { title: "List imp events", readOnlyHint: true, openWorldHint: false },
|
|
33487
33495
|
run: async (input, context) => {
|
|
@@ -39961,7 +39969,7 @@ function buildUsageTotals(input) {
|
|
|
39961
39969
|
ordinaryEffectiveMib,
|
|
39962
39970
|
kept: {
|
|
39963
39971
|
ramMib: Math.max(0, input.priorityMib - priority.ramMib),
|
|
39964
|
-
ordinaryMib: Math.max(0, input.
|
|
39972
|
+
ordinaryMib: Math.max(0, input.priorityOrdinaryMib - priority.ordinaryMib),
|
|
39965
39973
|
poolMib: Math.max(0, input.priorityMib - priority.poolMib)
|
|
39966
39974
|
}
|
|
39967
39975
|
};
|
|
@@ -40189,7 +40197,8 @@ function createRamGovernor(deps) {
|
|
|
40189
40197
|
pendingPool,
|
|
40190
40198
|
lockedMib,
|
|
40191
40199
|
headroomMib,
|
|
40192
|
-
priorityMib: priority?.mib ?? 0
|
|
40200
|
+
priorityMib: priority?.mib ?? 0,
|
|
40201
|
+
priorityOrdinaryMib: priority?.ordinaryMib ?? priority?.mib ?? 0
|
|
40193
40202
|
});
|
|
40194
40203
|
return { awake, headroomMib, ...totals };
|
|
40195
40204
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impz/testing",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "A real impd on stand-ins, for Bun tests of code that drives impd through @impz/client",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"ts-pattern": "^5.9.2",
|
|
43
43
|
"xstate": "^5.33.3",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@impz/client": "7.
|
|
45
|
+
"@impz/client": "7.4.0"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"bun": ">=1.4.3"
|