@impz/testing 6.4.1 → 6.4.2
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 -8
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21967,7 +21967,7 @@ import { join as join47 } from "path";
|
|
|
21967
21967
|
// packages/daemon/package.json
|
|
21968
21968
|
var package_default = {
|
|
21969
21969
|
name: "@impz/daemon",
|
|
21970
|
-
version: "6.4.
|
|
21970
|
+
version: "6.4.2",
|
|
21971
21971
|
private: true,
|
|
21972
21972
|
description: "impd: the imp host daemon",
|
|
21973
21973
|
type: "module",
|
|
@@ -22487,9 +22487,9 @@ async function updateImpCommitted(db, id, committedAt, isWarm = false) {
|
|
|
22487
22487
|
db.writes.publish({ kind: "changed", imp, reason: "updated" });
|
|
22488
22488
|
return imp;
|
|
22489
22489
|
}
|
|
22490
|
-
async function
|
|
22491
|
-
const
|
|
22492
|
-
return
|
|
22490
|
+
async function removeTrustPending(db, id) {
|
|
22491
|
+
const row = await db.updateTable("imps").set({ trust_pending: 0 }).where("id", "=", id).returningAll().executeTakeFirstOrThrow();
|
|
22492
|
+
return toImpRecord(row);
|
|
22493
22493
|
}
|
|
22494
22494
|
async function updateImpMove(db, id, moveState) {
|
|
22495
22495
|
const row = await db.transaction().execute(async (trx) => {
|
|
@@ -42658,14 +42658,17 @@ function makeWakeImpVm(deps) {
|
|
|
42658
42658
|
};
|
|
42659
42659
|
const applyPendingTrust = async (imp, paths) => {
|
|
42660
42660
|
try {
|
|
42661
|
-
|
|
42661
|
+
const env = await context.readExecEnv(imp, paths.vsockSocket);
|
|
42662
|
+
if (env.kind === "untrusted") {
|
|
42663
|
+
logTrustFailure(imp, env.detail);
|
|
42662
42664
|
return imp;
|
|
42663
42665
|
}
|
|
42664
|
-
await context.
|
|
42666
|
+
const trusted = await removeTrustPending(context.db, imp.id);
|
|
42667
|
+
return toLockedImp(imp, trusted);
|
|
42665
42668
|
} catch (error) {
|
|
42666
|
-
|
|
42669
|
+
logTrustFailure(imp, getErrorMessage(error));
|
|
42670
|
+
return imp;
|
|
42667
42671
|
}
|
|
42668
|
-
return toLockedImp(imp, { ...imp, isTrustPending: false });
|
|
42669
42672
|
};
|
|
42670
42673
|
const canBootOnPool = (imp) => pickHugePages(context.config.hugePages !== null, imp) === "2M";
|
|
42671
42674
|
const writeHostPagesIdentity = (imp, paths) => {
|
|
@@ -42727,6 +42730,9 @@ ${failure.message}`, { cause: failure }) : failure;
|
|
|
42727
42730
|
};
|
|
42728
42731
|
return wakeImpVm;
|
|
42729
42732
|
}
|
|
42733
|
+
function logTrustFailure(imp, error) {
|
|
42734
|
+
getImpdLogger("imps").with({ imp: imp.name }).warning("broker CA after the wake: {error}", { error });
|
|
42735
|
+
}
|
|
42730
42736
|
|
|
42731
42737
|
// packages/daemon/src/imps/imps/start-cold-vm.ts
|
|
42732
42738
|
import { randomBytes as randomBytes9 } from "crypto";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impz/testing",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.2",
|
|
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": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"ts-pattern": "^5.9.2",
|
|
44
44
|
"xstate": "^5.33.3",
|
|
45
45
|
"zod": "^4.6.7",
|
|
46
|
-
"@impz/client": "6.4.
|
|
46
|
+
"@impz/client": "6.4.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"bun": ">=1.4.3"
|