@teamkeel/testing-runtime 0.470.0 → 0.472.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/testing-runtime",
3
- "version": "0.470.0",
3
+ "version": "0.472.0",
4
4
  "description": "Internal package used by the generated @teamkeel/testing package",
5
5
  "exports": "./src/index.mjs",
6
6
  "typings": "src/index.d.ts",
package/src/Executor.mjs CHANGED
@@ -95,7 +95,14 @@ export class Executor {
95
95
  try {
96
96
  d = JSON.parse(t);
97
97
  } catch (e) {
98
- if ("DEBUG" in process.env) {
98
+ // testing-runtime is a separate package from functions-runtime
99
+ // (its own independent `pnpm install`, not a live workspace
100
+ // link - see packages/functions-runtime/src/logger.ts's
101
+ // top-of-file note), so it can't cleanly reach for the
102
+ // structured `log` helper there. Keep console.log but gate it
103
+ // on KEEL_LOG_LEVEL (the one env var the whole project now
104
+ // uses) instead of the retired DEBUG var.
105
+ if (process.env.KEEL_LOG_LEVEL === "debug") {
99
106
  console.log(e);
100
107
  }
101
108
  // If JSON parsing fails then throw an error with the
@@ -281,7 +281,12 @@ function handleResponse(r) {
281
281
  try {
282
282
  d = JSON.parse(t);
283
283
  } catch (e) {
284
- if ("DEBUG" in process.env) {
284
+ // testing-runtime is a separate package from functions-runtime (its
285
+ // own independent `pnpm install`, not a live workspace link), so it
286
+ // can't cleanly reach for the structured `log` helper there. Keep
287
+ // console.log but gate it on KEEL_LOG_LEVEL instead of the retired
288
+ // DEBUG var.
289
+ if (process.env.KEEL_LOG_LEVEL === "debug") {
285
290
  console.log(e);
286
291
  }
287
292
  // If JSON parsing fails then throw an error with the
package/src/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import type { Assertion, AsymmetricMatchersContaining } from "vitest";
5
5
  interface ActionError {
6
6
  code: string;
7
7
  message: string;
8
+ data?: { errors?: { error: string; field?: string }[] };
8
9
  }
9
10
 
10
11
  interface CustomMatchers<R = unknown> {