@lunora/testing 1.0.0-alpha.45 → 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.d.mts +247 -256
- package/dist/index.d.ts +247 -256
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/{lunoraTest-BuoclXGw.mjs → lunoraTest-CHix6VWB.mjs} +16 -1
- package/package.json +6 -6
|
@@ -151,12 +151,21 @@ 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,
|
|
163
|
+
fatal: () => void 0,
|
|
157
164
|
info: () => void 0,
|
|
158
165
|
log: () => void 0,
|
|
159
|
-
|
|
166
|
+
trace: () => void 0,
|
|
167
|
+
warn: () => void 0,
|
|
168
|
+
with: () => noopLog
|
|
160
169
|
};
|
|
161
170
|
const buildSubscribe = (runRegistered, queryContext, mutationListeners) => {
|
|
162
171
|
const factory = (referenceOrInline, args) => {
|
|
@@ -369,7 +378,9 @@ const lunoraTest = (schema, options) => {
|
|
|
369
378
|
db: database,
|
|
370
379
|
env: options?.env,
|
|
371
380
|
log: noopLog,
|
|
381
|
+
metrics: noopMetrics,
|
|
372
382
|
now: harnessNow,
|
|
383
|
+
trace: passthroughTrace,
|
|
373
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
|
|
374
385
|
runQuery: (reference, args) => runInternal("query", reference, queryContext, args),
|
|
375
386
|
secrets: stubProxy("secrets"),
|
|
@@ -381,7 +392,9 @@ const lunoraTest = (schema, options) => {
|
|
|
381
392
|
db: database,
|
|
382
393
|
env: options?.env,
|
|
383
394
|
log: noopLog,
|
|
395
|
+
metrics: noopMetrics,
|
|
384
396
|
now: harnessNow,
|
|
397
|
+
trace: passthroughTrace,
|
|
385
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
|
|
386
399
|
runMutation: (reference, args) => runInternal("mutation", reference, mutationContext, args),
|
|
387
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
|
|
@@ -400,7 +413,9 @@ const lunoraTest = (schema, options) => {
|
|
|
400
413
|
// Use the injected fetch when provided; fall back to the v1 stub otherwise.
|
|
401
414
|
fetch: options?.fetch ?? stubProxy("fetch"),
|
|
402
415
|
log: noopLog,
|
|
416
|
+
metrics: noopMetrics,
|
|
403
417
|
now: harnessNow,
|
|
418
|
+
trace: passthroughTrace,
|
|
404
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
|
|
405
420
|
runAction: (reference, args) => runInternal("action", reference, actionContext, args),
|
|
406
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.
|
|
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.
|
|
50
|
-
"@lunora/do": "1.0.0-alpha.
|
|
51
|
-
"@lunora/errors": "1.0.0-alpha.
|
|
52
|
-
"@lunora/mail": "1.0.0-alpha.
|
|
53
|
-
"@lunora/server": "1.0.0-alpha.
|
|
49
|
+
"@lunora/agent": "1.0.0-alpha.6",
|
|
50
|
+
"@lunora/do": "1.0.0-alpha.35",
|
|
51
|
+
"@lunora/errors": "1.0.0-alpha.6",
|
|
52
|
+
"@lunora/mail": "1.0.0-alpha.16",
|
|
53
|
+
"@lunora/server": "1.0.0-alpha.29"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": "^22.15.0 || >=24.11.0"
|