@impz/testing 6.4.0 → 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.
Files changed (2) hide show
  1. package/dist/index.js +14 -8
  2. package/package.json +10 -10
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.0",
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 claimTrustPending(db, id) {
22491
- const taken = await db.updateTable("imps").set({ trust_pending: 0 }).where("id", "=", id).where("trust_pending", "=", 1).returning("id").executeTakeFirst();
22492
- return taken !== undefined;
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
- if (!await claimTrustPending(context.db, imp.id)) {
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.readExecEnv(imp, paths.vsockSocket);
42666
+ const trusted = await removeTrustPending(context.db, imp.id);
42667
+ return toLockedImp(imp, trusted);
42665
42668
  } catch (error) {
42666
- getImpdLogger("imps").with({ imp: imp.name }).warning("broker CA after the wake: {error}", { error: getErrorMessage(error) });
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.0",
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": {
@@ -17,20 +17,20 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@balena/dockerignore": "^1.0.2",
20
- "@better-auth/mcp": "^1.7.11",
21
- "@better-auth/oauth-provider": "^1.7.11",
20
+ "@better-auth/mcp": "^1.7.14",
21
+ "@better-auth/oauth-provider": "^1.7.14",
22
22
  "@bufbuild/protobuf": "^2.16.0",
23
23
  "@logtape/logtape": "^2.4.2",
24
24
  "@modelcontextprotocol/server": "^2.4.0",
25
25
  "@opentelemetry/api": "^1.10.0",
26
- "@orpc/client": "^1.16.0",
27
- "@orpc/contract": "^1.16.0",
28
- "@orpc/openapi": "^1.16.0",
29
- "@orpc/openapi-client": "^1.16.0",
30
- "@orpc/server": "^1.16.0",
26
+ "@orpc/client": "^1.16.1",
27
+ "@orpc/contract": "^1.16.1",
28
+ "@orpc/openapi": "^1.16.1",
29
+ "@orpc/openapi-client": "^1.16.1",
30
+ "@orpc/server": "^1.16.1",
31
31
  "@peculiar/x509": "^2.2.0",
32
32
  "@zgeoff/kysely-bun-sqlite": "^0.3.0",
33
- "better-auth": "^1.7.11",
33
+ "better-auth": "^1.7.14",
34
34
  "dns-packet": "^5.6.1",
35
35
  "elysia": "^1.4.30",
36
36
  "ipaddr.js": "^2.5.0",
@@ -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.0"
46
+ "@impz/client": "6.4.2"
47
47
  },
48
48
  "engines": {
49
49
  "bun": ">=1.4.3"