@lunora/testing 1.0.0-alpha.46 → 1.0.0-alpha.47

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.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  export { agentHarness, finalTurn, toolCallTurn } from './packem_shared/agentHarness-GTPhWdQ8.mjs';
2
- export { lunoraTest } from './packem_shared/lunoraTest-zjGOq924.mjs';
2
+ export { lunoraTest } from './packem_shared/lunoraTest-CHix6VWB.mjs';
3
3
  export { containsScorer, evaluate, exactMatchScorer, keywordScorer, llmScorer, regexScorer, scoreSample } from './packem_shared/containsScorer-DGwtvUNp.mjs';
4
4
  export { extractLink, listCapturedMail, waitForMail } from '@lunora/mail/testing';
@@ -151,6 +151,12 @@ const stubProxy = (surface) => /* @__PURE__ */ new Proxy((..._args) => unavailab
151
151
  apply: () => unavailable(surface),
152
152
  get: () => unavailable(surface)
153
153
  });
154
+ const passthroughTrace = async (_name, function_) => await function_(passthroughTrace);
155
+ const noopMetrics = {
156
+ count: () => void 0,
157
+ gauge: () => void 0,
158
+ record: () => void 0
159
+ };
154
160
  const noopLog = {
155
161
  debug: () => void 0,
156
162
  error: () => void 0,
@@ -372,7 +378,9 @@ const lunoraTest = (schema, options) => {
372
378
  db: database,
373
379
  env: options?.env,
374
380
  log: noopLog,
381
+ metrics: noopMetrics,
375
382
  now: harnessNow,
383
+ trace: passthroughTrace,
376
384
  // eslint-disable-next-line @typescript-eslint/no-use-before-define -- lazy closure: `runInternal` is invoked only when a handler calls ctx.runQuery, after construction completes
377
385
  runQuery: (reference, args) => runInternal("query", reference, queryContext, args),
378
386
  secrets: stubProxy("secrets"),
@@ -384,7 +392,9 @@ const lunoraTest = (schema, options) => {
384
392
  db: database,
385
393
  env: options?.env,
386
394
  log: noopLog,
395
+ metrics: noopMetrics,
387
396
  now: harnessNow,
397
+ trace: passthroughTrace,
388
398
  // eslint-disable-next-line @typescript-eslint/no-use-before-define -- lazy closure: `runInternal` is invoked only when a handler calls ctx.runMutation, after construction completes
389
399
  runMutation: (reference, args) => runInternal("mutation", reference, mutationContext, args),
390
400
  // eslint-disable-next-line @typescript-eslint/no-use-before-define -- lazy closure: `runInternal` is invoked only when a handler calls ctx.runQuery, after construction completes
@@ -403,7 +413,9 @@ const lunoraTest = (schema, options) => {
403
413
  // Use the injected fetch when provided; fall back to the v1 stub otherwise.
404
414
  fetch: options?.fetch ?? stubProxy("fetch"),
405
415
  log: noopLog,
416
+ metrics: noopMetrics,
406
417
  now: harnessNow,
418
+ trace: passthroughTrace,
407
419
  // eslint-disable-next-line @typescript-eslint/no-use-before-define -- lazy closure: `runInternal` is invoked only when a handler calls ctx.runAction, after construction completes
408
420
  runAction: (reference, args) => runInternal("action", reference, actionContext, args),
409
421
  // eslint-disable-next-line @typescript-eslint/no-use-before-define -- lazy closure: `runInternal` is invoked only when a handler calls ctx.runMutation, after construction completes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/testing",
3
- "version": "1.0.0-alpha.46",
3
+ "version": "1.0.0-alpha.47",
4
4
  "description": "Testing toolkit for Lunora: an in-memory harness for queries, mutations, and actions",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -46,11 +46,11 @@
46
46
  "access": "public"
47
47
  },
48
48
  "dependencies": {
49
- "@lunora/agent": "1.0.0-alpha.5",
50
- "@lunora/do": "1.0.0-alpha.34",
49
+ "@lunora/agent": "1.0.0-alpha.6",
50
+ "@lunora/do": "1.0.0-alpha.35",
51
51
  "@lunora/errors": "1.0.0-alpha.6",
52
52
  "@lunora/mail": "1.0.0-alpha.16",
53
- "@lunora/server": "1.0.0-alpha.28"
53
+ "@lunora/server": "1.0.0-alpha.29"
54
54
  },
55
55
  "engines": {
56
56
  "node": "^22.15.0 || >=24.11.0"