@glubean/engine 0.7.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/dist/engine.d.ts +46 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +1391 -0
- package/dist/engine.js.map +1 -0
- package/dist/http-trace.d.ts +38 -0
- package/dist/http-trace.d.ts.map +1 -0
- package/dist/http-trace.js +128 -0
- package/dist/http-trace.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/node-host.d.ts +14 -0
- package/dist/node-host.d.ts.map +1 -0
- package/dist/node-host.js +29 -0
- package/dist/node-host.js.map +1 -0
- package/dist/types.d.ts +378 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +42 -0
package/dist/engine.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { RunnerServices, ScopeInput, TestDef, TestResult } from "./types.js";
|
|
2
|
+
export declare class RunnerCore {
|
|
3
|
+
private readonly services;
|
|
4
|
+
constructor(services: RunnerServices);
|
|
5
|
+
/**
|
|
6
|
+
* Run one test in an isolated scope. The whole run-loop — including every async
|
|
7
|
+
* continuation in user code — executes inside runWithRuntime(scope.runtime).
|
|
8
|
+
*/
|
|
9
|
+
run(def: TestDef, input?: ScopeInput): Promise<TestResult>;
|
|
10
|
+
/**
|
|
11
|
+
* Runtime-authoritative resolution of a module namespace into runnable TestDefs
|
|
12
|
+
* (SoT §3.2: the static scanner is UI-only; this is the权威 resolver). Handles
|
|
13
|
+
* plain Test, Test[], TestBuilder, and EachBuilder — each `test.each` row
|
|
14
|
+
* becomes its own def. Narrow Stage-1 surface (no workflow/contract expansion).
|
|
15
|
+
*/
|
|
16
|
+
resolve(namespace: Record<string, unknown>): TestDef[];
|
|
17
|
+
private createScope;
|
|
18
|
+
/**
|
|
19
|
+
* Build a per-run ky instance: host fetch + scope-bound trace hooks. Per-request
|
|
20
|
+
* state is keyed by ky 2's stable `options.context` object (NOT the Request, which
|
|
21
|
+
* a hook may replace when an auth helper rebuilds it — codex ky2 P2 / plan 0005 §D).
|
|
22
|
+
* throwHttpErrors:false matches the node harness default so 4xx/5xx surface as
|
|
23
|
+
* responses, not throws. The auto-trace routes through scope.ctxRef.trace (→ trace
|
|
24
|
+
* event + derived action) + ctx.metric("http_duration_ms"), so it shares the run's
|
|
25
|
+
* stepIndex attribution (node parity: harness.ts:1010-1133).
|
|
26
|
+
*/
|
|
27
|
+
private createScopedKy;
|
|
28
|
+
private runLoop;
|
|
29
|
+
private makeCtx;
|
|
30
|
+
}
|
|
31
|
+
export interface SdkTestShape {
|
|
32
|
+
meta: {
|
|
33
|
+
id: string;
|
|
34
|
+
name?: string;
|
|
35
|
+
tags?: string[] | string;
|
|
36
|
+
skip?: boolean;
|
|
37
|
+
only?: boolean;
|
|
38
|
+
};
|
|
39
|
+
type: "simple" | "steps";
|
|
40
|
+
fn?: unknown;
|
|
41
|
+
setup?: unknown;
|
|
42
|
+
steps?: unknown;
|
|
43
|
+
teardown?: unknown;
|
|
44
|
+
}
|
|
45
|
+
export declare function toTestDef(t: SdkTestShape): TestDef;
|
|
46
|
+
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../src/engine.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAIV,cAAc,EACd,UAAU,EAEV,OAAO,EAEP,UAAU,EACX,MAAM,YAAY,CAAC;AAwOpB,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,cAAc;IAMrD;;;OAGG;IACH,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,GAAE,UAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IAiB9D;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE;IAMtD,OAAO,CAAC,WAAW;IAsDnB;;;;;;;;OAQG;IACH,OAAO,CAAC,cAAc;YA0FR,OAAO;IAsiBrB,OAAO,CAAC,OAAO;CAoLhB;AAqKD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC9F,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwED,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,GAAG,OAAO,CAYlD"}
|