@glubean/sdk 0.2.0 → 0.2.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 (104) hide show
  1. package/dist/configure/http.d.ts +25 -0
  2. package/dist/configure/http.d.ts.map +1 -0
  3. package/dist/configure/http.js +88 -0
  4. package/dist/configure/http.js.map +1 -0
  5. package/dist/configure/index.d.ts +78 -0
  6. package/dist/configure/index.d.ts.map +1 -0
  7. package/dist/configure/index.js +78 -0
  8. package/dist/configure/index.js.map +1 -0
  9. package/dist/configure/plugin.d.ts +23 -0
  10. package/dist/configure/plugin.d.ts.map +1 -0
  11. package/dist/configure/plugin.js +81 -0
  12. package/dist/configure/plugin.js.map +1 -0
  13. package/dist/configure/runtime.d.ts +24 -0
  14. package/dist/configure/runtime.d.ts.map +1 -0
  15. package/dist/configure/runtime.js +45 -0
  16. package/dist/configure/runtime.js.map +1 -0
  17. package/dist/configure/template.d.ts +22 -0
  18. package/dist/configure/template.d.ts.map +1 -0
  19. package/dist/configure/template.js +34 -0
  20. package/dist/configure/template.js.map +1 -0
  21. package/dist/configure/vars.d.ts +20 -0
  22. package/dist/configure/vars.d.ts.map +1 -0
  23. package/dist/configure/vars.js +48 -0
  24. package/dist/configure/vars.js.map +1 -0
  25. package/dist/configure.d.ts +2 -150
  26. package/dist/configure.d.ts.map +1 -1
  27. package/dist/configure.js +2 -562
  28. package/dist/configure.js.map +1 -1
  29. package/dist/contract-artifacts.d.ts +268 -0
  30. package/dist/contract-artifacts.d.ts.map +1 -0
  31. package/dist/contract-artifacts.js +402 -0
  32. package/dist/contract-artifacts.js.map +1 -0
  33. package/dist/contract-core.d.ts +33 -1
  34. package/dist/contract-core.d.ts.map +1 -1
  35. package/dist/contract-core.js +51 -2
  36. package/dist/contract-core.js.map +1 -1
  37. package/dist/contract-http/adapter.d.ts.map +1 -1
  38. package/dist/contract-http/adapter.js +22 -7
  39. package/dist/contract-http/adapter.js.map +1 -1
  40. package/dist/contract-http/factory.d.ts.map +1 -1
  41. package/dist/contract-http/factory.js +13 -14
  42. package/dist/contract-http/factory.js.map +1 -1
  43. package/dist/contract-http/index.d.ts +4 -3
  44. package/dist/contract-http/index.d.ts.map +1 -1
  45. package/dist/contract-http/index.js +4 -3
  46. package/dist/contract-http/index.js.map +1 -1
  47. package/dist/contract-http/openapi.d.ts +56 -7
  48. package/dist/contract-http/openapi.d.ts.map +1 -1
  49. package/dist/contract-http/openapi.js +371 -21
  50. package/dist/contract-http/openapi.js.map +1 -1
  51. package/dist/contract-http/types.d.ts +2 -13
  52. package/dist/contract-http/types.d.ts.map +1 -1
  53. package/dist/contract-types.d.ts +59 -10
  54. package/dist/contract-types.d.ts.map +1 -1
  55. package/dist/expect.d.ts +13 -0
  56. package/dist/expect.d.ts.map +1 -1
  57. package/dist/expect.js +18 -0
  58. package/dist/expect.js.map +1 -1
  59. package/dist/index.d.ts +61 -518
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +26 -835
  62. package/dist/index.js.map +1 -1
  63. package/dist/install-plugin.d.ts +94 -0
  64. package/dist/install-plugin.d.ts.map +1 -0
  65. package/dist/install-plugin.js +222 -0
  66. package/dist/install-plugin.js.map +1 -0
  67. package/dist/internal.d.ts +2 -0
  68. package/dist/internal.d.ts.map +1 -1
  69. package/dist/internal.js +6 -0
  70. package/dist/internal.js.map +1 -1
  71. package/dist/plugin.d.ts +45 -34
  72. package/dist/plugin.d.ts.map +1 -1
  73. package/dist/plugin.js +47 -34
  74. package/dist/plugin.js.map +1 -1
  75. package/dist/runtime-carrier.d.ts +142 -0
  76. package/dist/runtime-carrier.d.ts.map +1 -0
  77. package/dist/runtime-carrier.js +148 -0
  78. package/dist/runtime-carrier.js.map +1 -0
  79. package/dist/session.d.ts.map +1 -1
  80. package/dist/session.js +2 -1
  81. package/dist/session.js.map +1 -1
  82. package/dist/test/builder.d.ts +249 -0
  83. package/dist/test/builder.d.ts.map +1 -0
  84. package/dist/test/builder.js +265 -0
  85. package/dist/test/builder.js.map +1 -0
  86. package/dist/test/each-builder.d.ts +244 -0
  87. package/dist/test/each-builder.d.ts.map +1 -0
  88. package/dist/test/each-builder.js +268 -0
  89. package/dist/test/each-builder.js.map +1 -0
  90. package/dist/test/extend.d.ts +59 -0
  91. package/dist/test/extend.d.ts.map +1 -0
  92. package/dist/test/extend.js +111 -0
  93. package/dist/test/extend.js.map +1 -0
  94. package/dist/test/utils.d.ts +39 -0
  95. package/dist/test/utils.d.ts.map +1 -0
  96. package/dist/test/utils.js +91 -0
  97. package/dist/test/utils.js.map +1 -0
  98. package/dist/types.d.ts +89 -111
  99. package/dist/types.d.ts.map +1 -1
  100. package/package.json +1 -1
  101. package/dist/contract-http/markdown.d.ts +0 -10
  102. package/dist/contract-http/markdown.d.ts.map +0 -1
  103. package/dist/contract-http/markdown.js +0 -21
  104. package/dist/contract-http/markdown.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
- import type { EachTestFunction, ExtensionFn, ResolveExtensions, SimpleTestFunction, StepMeta, Test, TestContext, TestMeta } from "./types.js";
1
+ import type { EachTestFunction, ExtensionFn, ResolveExtensions, SimpleTestFunction, Test, TestMeta } from "./types.js";
2
+ import { TestBuilder } from "./test/builder.js";
3
+ import { EachBuilder } from "./test/each-builder.js";
4
+ import type { ExtendedTest } from "./test/extend.js";
2
5
  /**
3
6
  * Glubean SDK spec version.
4
7
  *
@@ -13,243 +16,6 @@ import type { EachTestFunction, ExtensionFn, ResolveExtensions, SimpleTestFuncti
13
16
  * ```
14
17
  */
15
18
  export declare const SPEC_VERSION = "2.0";
16
- /**
17
- * Builder class for creating tests with a fluent API.
18
- *
19
- * @template S The state type for multi-step tests
20
- * @template Ctx The context type (defaults to TestContext; augmented by test.extend())
21
- *
22
- * @example Simple test (quick mode)
23
- * ```ts
24
- * export const login = test("login", async (ctx) => {
25
- * ctx.assert(true, "works");
26
- * });
27
- * ```
28
- *
29
- * @example Multi-step test (builder mode)
30
- * ```ts
31
- * export const checkout = test("checkout")
32
- * .meta({ tags: ["e2e"] })
33
- * .setup(async (ctx) => ({ cart: await createCart() }))
34
- * .step("Add to cart", async (ctx, state) => {
35
- * await addItem(state.cart, "item-1");
36
- * return state;
37
- * })
38
- * .step("Checkout", async (ctx, state) => {
39
- * await checkout(state.cart);
40
- * return state;
41
- * })
42
- * .teardown(async (ctx, state) => {
43
- * await cleanup(state.cart);
44
- * })
45
- * .build();
46
- * ```
47
- */
48
- export declare class TestBuilder<S = unknown, Ctx extends TestContext = TestContext> {
49
- private _meta;
50
- private _setup?;
51
- private _teardown?;
52
- private _steps;
53
- private _built;
54
- _fixtures?: Record<string, ExtensionFn<any>>;
55
- /**
56
- * Marker property so the runner can detect un-built TestBuilder exports
57
- * without importing the SDK. The runner checks this string to auto-build.
58
- */
59
- readonly __glubean_type: "builder";
60
- constructor(id: string, fixtures?: Record<string, ExtensionFn<any>>);
61
- /**
62
- * Set additional metadata for the test.
63
- *
64
- * @example
65
- * ```ts
66
- * test("my-test")
67
- * .meta({ tags: ["smoke"], description: "A smoke test" })
68
- * .step(...)
69
- * ```
70
- */
71
- meta(meta: Omit<TestMeta, "id">): TestBuilder<S, Ctx>;
72
- /**
73
- * Mark this test as focused.
74
- *
75
- * Focused tests are intended for local debugging sessions. When any tests in
76
- * a run are marked as `only`, non-focused tests may be excluded by discovery
77
- * tooling/orchestrators. If `skip` is also set on the same test, `skip`
78
- * still wins during run selection.
79
- */
80
- only(): TestBuilder<S, Ctx>;
81
- /**
82
- * Mark this test as skipped.
83
- *
84
- * Skip takes precedence over `only` when both are present.
85
- */
86
- skip(): TestBuilder<S, Ctx>;
87
- /**
88
- * Set the setup function that runs before all steps.
89
- * The returned state is passed to all steps and teardown.
90
- *
91
- * @example
92
- * ```ts
93
- * test("auth")
94
- * .setup(async (ctx) => {
95
- * const baseUrl = ctx.vars.require("BASE_URL");
96
- * const apiKey = ctx.secrets.require("API_KEY");
97
- * const { token } = await ctx.http.post(`${baseUrl}/auth/token`, {
98
- * headers: { "X-API-Key": apiKey },
99
- * }).json();
100
- * return { token };
101
- * })
102
- * .step("verify", async (ctx, { token }) => { ... })
103
- * ```
104
- */
105
- setup<NewS>(fn: (ctx: Ctx) => Promise<NewS>): TestBuilder<NewS, Ctx>;
106
- /**
107
- * Set the teardown function that runs after all steps (even on failure).
108
- *
109
- * @example
110
- * ```ts
111
- * test("db-test")
112
- * .setup(async (ctx) => ({ conn: await connect() }))
113
- * .step(...)
114
- * .teardown(async (ctx, { conn }) => {
115
- * await conn.close();
116
- * })
117
- * ```
118
- */
119
- teardown(fn: (ctx: Ctx, state: S) => Promise<void>): TestBuilder<S, Ctx>;
120
- /**
121
- * Add a step that does not return state (void).
122
- * The state type is preserved for subsequent steps.
123
- *
124
- * @param name Step name (displayed in reports)
125
- * @param fn Step function that performs assertions/side-effects without returning state
126
- */
127
- step(name: string, fn: (ctx: Ctx, state: S) => Promise<void>): TestBuilder<S, Ctx>;
128
- /**
129
- * Add a step that returns new state, replacing the current state type.
130
- *
131
- * The returned value becomes the `state` argument for subsequent steps.
132
- * This enables fully type-safe chained steps without needing `.setup()`.
133
- *
134
- * @param name Step name (displayed in reports)
135
- * @param fn Step function receiving context and current state, returning new state
136
- *
137
- * @example
138
- * ```ts
139
- * test("auth-flow")
140
- * .step("login", async (ctx) => {
141
- * const data = await ctx.http.post("/auth/login", { json: creds }).json<{ token: string }>();
142
- * return { token: data.token };
143
- * })
144
- * .step("get profile", async (ctx, { token }) => {
145
- * // token is inferred as string ✓
146
- * const profile = await ctx.http.get("/auth/me", {
147
- * headers: { Authorization: `Bearer ${token}` },
148
- * }).json<{ name: string }>();
149
- * return { token, name: profile.name };
150
- * })
151
- * ```
152
- */
153
- step<NewS>(name: string, fn: (ctx: Ctx, state: S) => Promise<NewS>): TestBuilder<NewS, Ctx>;
154
- /**
155
- * Add a step with options (void return).
156
- */
157
- step(name: string, options: Omit<StepMeta, "name">, fn: (ctx: Ctx, state: S) => Promise<void>): TestBuilder<S, Ctx>;
158
- /**
159
- * Add a step with additional options, returning new state.
160
- */
161
- step<NewS>(name: string, options: Omit<StepMeta, "name">, fn: (ctx: Ctx, state: S) => Promise<NewS>): TestBuilder<NewS, Ctx>;
162
- /**
163
- * Apply a builder transform function for step composition.
164
- *
165
- * Reusable step sequences are just plain functions that take a builder
166
- * and return a builder. `.use()` applies such a function to the current
167
- * chain, preserving state flow.
168
- *
169
- * @param fn Transform function that receives this builder and returns a (possibly re-typed) builder
170
- *
171
- * @example Reusable step sequence
172
- * ```ts
173
- * // Define once — just a function
174
- * const withAuth = (b: TestBuilder<unknown>) => b
175
- * .step("login", async (ctx) => {
176
- * const data = await ctx.http.post("/login", { json: creds }).json<{ token: string }>();
177
- * return { token: data.token };
178
- * });
179
- *
180
- * // Reuse across tests
181
- * export const testA = test("test-a").use(withAuth).step("act", async (ctx, { token }) => { ... });
182
- * export const testB = test("test-b").use(withAuth).step("verify", async (ctx, { token }) => { ... });
183
- * ```
184
- */
185
- use<NewS>(fn: (builder: TestBuilder<S, Ctx>) => TestBuilder<NewS, Ctx>): TestBuilder<NewS, Ctx>;
186
- /**
187
- * Apply a builder transform and tag all newly added steps with a group ID.
188
- *
189
- * Works exactly like `.use()`, but every step added by `fn` is marked with
190
- * `group` metadata for visual grouping in reports and dashboards.
191
- *
192
- * @param id Group identifier (displayed in reports as a section header)
193
- * @param fn Transform function that adds steps to the builder
194
- *
195
- * @example Reusable steps with grouping
196
- * ```ts
197
- * const withAuth = (b: TestBuilder<unknown>) => b
198
- * .step("login", async (ctx) => ({ token: "..." }))
199
- * .step("verify", async (ctx, { token }) => ({ token, verified: true }));
200
- *
201
- * export const checkout = test("checkout")
202
- * .group("auth", withAuth)
203
- * .step("pay", async (ctx, { token }) => { ... });
204
- *
205
- * // Report output:
206
- * // checkout
207
- * // ├─ [auth]
208
- * // │ ├─ login ✓
209
- * // │ └─ verify ✓
210
- * // └─ pay ✓
211
- * ```
212
- *
213
- * @example Inline grouping (no reuse, just organization)
214
- * ```ts
215
- * export const e2e = test("e2e")
216
- * .group("setup", b => b
217
- * .step("seed db", async (ctx) => ({ dbId: "..." }))
218
- * .step("create user", async (ctx, { dbId }) => ({ dbId, userId: "..." }))
219
- * )
220
- * .step("verify", async (ctx, { dbId, userId }) => { ... });
221
- * ```
222
- */
223
- group<NewS>(id: string, fn: (builder: TestBuilder<S, Ctx>) => TestBuilder<NewS, Ctx>): TestBuilder<NewS, Ctx>;
224
- /**
225
- * Finalize and register the test in the global registry.
226
- * Called automatically via microtask if not explicitly invoked via build().
227
- * Idempotent — safe to call multiple times.
228
- * @internal
229
- */
230
- private _finalize;
231
- /**
232
- * Build and register the test. Returns a plain `Test<S>` object.
233
- *
234
- * **Optional** — if omitted, the builder auto-finalizes via microtask
235
- * after all synchronous chaining completes, and the runner will
236
- * auto-detect the builder export. Calling `.build()` explicitly is
237
- * still supported for backward compatibility.
238
- *
239
- * @example
240
- * ```ts
241
- * // With .build() (explicit — backward compatible)
242
- * export const myTest = test("my-test")
243
- * .step("step-1", async (ctx) => { ... })
244
- * .build();
245
- *
246
- * // Without .build() (auto-finalized — recommended)
247
- * export const myTest = test("my-test")
248
- * .step("step-1", async (ctx) => { ... });
249
- * ```
250
- */
251
- build(): Test<S>;
252
- }
253
19
  /**
254
20
  * Create a new test.
255
21
  *
@@ -292,278 +58,6 @@ export declare class TestBuilder<S = unknown, Ctx extends TestContext = TestCont
292
58
  */
293
59
  export declare function test<S = unknown>(idOrMeta: string | TestMeta): TestBuilder<S>;
294
60
  export declare function test(idOrMeta: string | TestMeta, fn: SimpleTestFunction): Test;
295
- /**
296
- * Step function for data-driven builder tests.
297
- * Receives context, current state, and the data row for this test.
298
- *
299
- * @template S The state type passed between steps
300
- * @template T The data row type
301
- * @template Ctx The context type (defaults to TestContext)
302
- *
303
- * @example
304
- * ```ts
305
- * const stepFn: EachStepFunction<{ token: string }, { userId: number }> =
306
- * async (ctx, state, row) => {
307
- * const res = await ctx.http.get(`/users/${row.userId}`);
308
- * ctx.assert(res.ok, `user ${row.userId} found`);
309
- * return state; // pass state to next step
310
- * };
311
- * ```
312
- */
313
- export type EachStepFunction<S, T, Ctx extends TestContext = TestContext> = (ctx: Ctx, state: S, row: T) => Promise<S | void>;
314
- /**
315
- * Setup function for data-driven builder tests.
316
- * Receives context and the data row, returns initial state.
317
- *
318
- * @template S The state type to return
319
- * @template T The data row type
320
- * @template Ctx The context type (defaults to TestContext)
321
- *
322
- * @example
323
- * ```ts
324
- * const setupFn: EachSetupFunction<{ api: HttpClient }, { env: string }> =
325
- * async (ctx, row) => {
326
- * const api = ctx.http.extend({ prefixUrl: row.env });
327
- * return { api };
328
- * };
329
- * ```
330
- */
331
- export type EachSetupFunction<S, T, Ctx extends TestContext = TestContext> = (ctx: Ctx, row: T) => Promise<S>;
332
- /**
333
- * Teardown function for data-driven builder tests.
334
- *
335
- * @template S The state type received from setup
336
- * @template T The data row type
337
- * @template Ctx The context type (defaults to TestContext)
338
- *
339
- * @example
340
- * ```ts
341
- * const teardownFn: EachTeardownFunction<{ sessionId: string }, { userId: number }> =
342
- * async (ctx, state, row) => {
343
- * await ctx.http.delete(`/sessions/${state.sessionId}`);
344
- * ctx.log(`cleaned up session for user ${row.userId}`);
345
- * };
346
- * ```
347
- */
348
- export type EachTeardownFunction<S, T, Ctx extends TestContext = TestContext> = (ctx: Ctx, state: S, row: T) => Promise<void>;
349
- /**
350
- * Builder for data-driven tests with multi-step workflow support.
351
- *
352
- * Created by `test.each(table)(idTemplate)` (without a callback).
353
- * Provides the same fluent `.step()` / `.setup()` / `.teardown()` API
354
- * as `TestBuilder`, but each step/setup/teardown also receives the
355
- * data row for the current test.
356
- *
357
- * On finalization, creates one `Test` per row in the table, each with
358
- * full step definitions visible in `glubean scan` metadata and dashboards.
359
- *
360
- * @template S The state type for multi-step tests
361
- * @template T The data row type
362
- *
363
- * @example
364
- * ```ts
365
- * export const userFlows = test.each([
366
- * { userId: 1 },
367
- * { userId: 2 },
368
- * ])("user-flow-$userId")
369
- * .step("fetch user", async (ctx, state, { userId }) => {
370
- * const res = await ctx.http.get(`/users/${userId}`);
371
- * ctx.assert(res.ok, "user exists");
372
- * return { user: await res.json() };
373
- * })
374
- * .step("verify posts", async (ctx, { user }) => {
375
- * const res = await ctx.http.get(`/users/${user.id}/posts`);
376
- * ctx.assert(res.ok, "posts accessible");
377
- * });
378
- * ```
379
- */
380
- export declare class EachBuilder<S = unknown, T extends Record<string, unknown> = Record<string, unknown>, Ctx extends TestContext = TestContext> {
381
- private _baseMeta;
382
- private _table;
383
- private _setup?;
384
- private _teardown?;
385
- private _steps;
386
- private _built;
387
- private _parallel;
388
- _fixtures?: Record<string, ExtensionFn<any>>;
389
- /**
390
- * Marker property so the runner and scanner can detect EachBuilder exports.
391
- */
392
- readonly __glubean_type: "each-builder";
393
- constructor(baseMeta: TestMeta, table: readonly T[], fixtures?: Record<string, ExtensionFn<any>>, parallel?: boolean);
394
- /**
395
- * Set additional metadata for all generated tests.
396
- *
397
- * @example
398
- * ```ts
399
- * test.each(table)("user-$userId")
400
- * .meta({ tags: ["smoke"], timeout: 10000 })
401
- * .step("fetch", async (ctx, state, row) => { ... });
402
- * ```
403
- */
404
- meta(meta: Omit<TestMeta, "id">): EachBuilder<S, T, Ctx>;
405
- /**
406
- * Mark all generated tests from this data set as focused.
407
- * If `skip` is also set, skipped tests are still excluded.
408
- */
409
- only(): EachBuilder<S, T, Ctx>;
410
- /**
411
- * Mark all generated tests from this data set as skipped.
412
- * Skip takes precedence over `only` when both are present.
413
- */
414
- skip(): EachBuilder<S, T, Ctx>;
415
- /**
416
- * Set the setup function. Receives context and data row, returns state.
417
- *
418
- * @example
419
- * ```ts
420
- * test.each(table)("id-$key")
421
- * .setup(async (ctx, row) => {
422
- * const api = ctx.http.extend({ headers: { "X-User": row.userId } });
423
- * return { api };
424
- * })
425
- * .step("use api", async (ctx, { api }) => { ... });
426
- * ```
427
- */
428
- setup<NewS>(fn: (ctx: Ctx, row: T) => Promise<NewS>): EachBuilder<NewS, T, Ctx>;
429
- /**
430
- * Set the teardown function. Runs after all steps (even on failure).
431
- *
432
- * @example
433
- * ```ts
434
- * test.each(table)("user-$userId")
435
- * .setup(async (ctx, row) => ({ token: await login(ctx, row) }))
436
- * .step("test", async (ctx, { token }) => { ... })
437
- * .teardown(async (ctx, state, row) => {
438
- * await ctx.http.post("/logout", { body: { token: state.token } });
439
- * });
440
- * ```
441
- */
442
- teardown(fn: (ctx: Ctx, state: S, row: T) => Promise<void>): EachBuilder<S, T, Ctx>;
443
- /**
444
- * Add a step that does not return state (void).
445
- *
446
- * @example
447
- * ```ts
448
- * test.each(users)("user-$id")
449
- * .step("verify", async (ctx, state, row) => {
450
- * const res = await ctx.http.get(`/users/${row.id}`);
451
- * ctx.expect(res.status).toBe(200);
452
- * });
453
- * ```
454
- */
455
- step(name: string, fn: (ctx: Ctx, state: S, row: T) => Promise<void>): EachBuilder<S, T, Ctx>;
456
- /**
457
- * Add a step that returns new state, replacing the current state type.
458
- */
459
- step<NewS>(name: string, fn: (ctx: Ctx, state: S, row: T) => Promise<NewS>): EachBuilder<NewS, T, Ctx>;
460
- /**
461
- * Add a step with options (void return).
462
- */
463
- step(name: string, options: Omit<StepMeta, "name">, fn: (ctx: Ctx, state: S, row: T) => Promise<void>): EachBuilder<S, T, Ctx>;
464
- /**
465
- * Add a step with options, returning new state.
466
- */
467
- step<NewS>(name: string, options: Omit<StepMeta, "name">, fn: (ctx: Ctx, state: S, row: T) => Promise<NewS>): EachBuilder<NewS, T, Ctx>;
468
- /**
469
- * Apply a builder transform function for step composition.
470
- *
471
- * Works the same as `TestBuilder.use()` — reusable step sequences
472
- * are plain functions that take a builder and return a builder.
473
- *
474
- * @param fn Transform function that receives this builder and returns a (possibly re-typed) builder
475
- *
476
- * @example
477
- * ```ts
478
- * const withVerify = (b: EachBuilder<{ id: string }, { userId: number }>) => b
479
- * .step("verify", async (ctx, { id }, row) => {
480
- * ctx.expect(id).toBeTruthy();
481
- * });
482
- *
483
- * export const users = test.each(table)("user-$userId")
484
- * .setup(async (ctx, row) => ({ id: String(row.userId) }))
485
- * .use(withVerify);
486
- * ```
487
- */
488
- use<NewS>(fn: (builder: EachBuilder<S, T, Ctx>) => EachBuilder<NewS, T, Ctx>): EachBuilder<NewS, T, Ctx>;
489
- /**
490
- * Apply a builder transform and tag all newly added steps with a group ID.
491
- *
492
- * Works the same as `TestBuilder.group()` — steps added by `fn` are marked
493
- * with `group` metadata for visual grouping in reports.
494
- *
495
- * @param id Group identifier (displayed in reports as a section header)
496
- * @param fn Transform function that adds steps to the builder
497
- *
498
- * @example
499
- * ```ts
500
- * export const users = test.each(table)("user-$userId")
501
- * .group("setup", b => b
502
- * .step("init", async (ctx, state, row) => ({ id: String(row.userId) }))
503
- * )
504
- * .step("verify", async (ctx, { id }) => { ... });
505
- * ```
506
- */
507
- group<NewS>(id: string, fn: (builder: EachBuilder<S, T, Ctx>) => EachBuilder<NewS, T, Ctx>): EachBuilder<NewS, T, Ctx>;
508
- /**
509
- * Get the filtered table (apply filter callback if present).
510
- * @internal
511
- */
512
- private _filteredTable;
513
- /**
514
- * Compute tags for a specific row (static tags + tagFields).
515
- * @internal
516
- */
517
- private _tagsForRow;
518
- /**
519
- * Finalize and register all tests in the global registry.
520
- * Called automatically via microtask if not explicitly invoked via build().
521
- * Idempotent — safe to call multiple times.
522
- * @internal
523
- */
524
- private _finalize;
525
- /**
526
- * Build and register all tests. Returns a `Test[]` array.
527
- *
528
- * **Optional** — if omitted, the builder auto-finalizes via microtask
529
- * and the runner will auto-detect the EachBuilder export.
530
- */
531
- build(): Test<S>[];
532
- }
533
- /**
534
- * An extended `test` function created by `test.extend()`.
535
- *
536
- * Behaves identically to the base `test()` but augments the context type
537
- * with fixture properties. Supports quick mode, builder mode, `.each()`,
538
- * `.pick()`, and chained `.extend()`.
539
- *
540
- * @template Ctx The augmented context type (TestContext & extensions)
541
- */
542
- export interface ExtendedTest<Ctx extends TestContext> {
543
- /** Quick mode: single-function test with augmented context. */
544
- (idOrMeta: string | TestMeta, fn: (ctx: Ctx) => Promise<void>): Test;
545
- /** Builder mode: multi-step test with augmented context. */
546
- <S = unknown>(idOrMeta: string | TestMeta): TestBuilder<S, Ctx>;
547
- /**
548
- * Chain another set of extensions on top of the current ones.
549
- * The returned test function has `Ctx & NewExtensions` as its context type.
550
- */
551
- extend<E extends Record<string, ExtensionFn<unknown>>>(extensions: E): ExtendedTest<Ctx & ResolveExtensions<E>>;
552
- /** Data-driven tests with augmented context. */
553
- each<T extends Record<string, unknown>>(table: readonly T[], options?: test.EachOptions): {
554
- (idOrMeta: string | TestMeta, fn: (ctx: Ctx, data: T) => Promise<void>): Test[];
555
- (idOrMeta: string | TestMeta): EachBuilder<unknown, T, Ctx>;
556
- };
557
- /** Example-selection tests with augmented context. */
558
- pick<T extends Record<string, unknown>>(examples: Record<string, T>, count?: number): {
559
- (idOrMeta: string | TestMeta, fn: (ctx: Ctx, data: T & {
560
- _pick: string;
561
- }) => Promise<void>): Test[];
562
- (idOrMeta: string | TestMeta): EachBuilder<unknown, T & {
563
- _pick: string;
564
- }, Ctx>;
565
- };
566
- }
567
61
  export declare namespace test {
568
62
  /**
569
63
  * Mark a test definition as focused (`only: true`).
@@ -716,15 +210,58 @@ export declare namespace test {
716
210
  * export const test = withAuth.extend({ db: ... });
717
211
  * ```
718
212
  */
719
- function extend<E extends Record<string, ExtensionFn<unknown>>>(extensions: E): ExtendedTest<TestContext & ResolveExtensions<E>>;
213
+ function extend<E extends Record<string, ExtensionFn<unknown>>>(extensions: E): ExtendedTest<import("./types.js").TestContext & ResolveExtensions<E>>;
720
214
  }
721
- export * from "./types.js";
722
- export { fromCsv, fromDir, fromJson, fromJsonl, fromYaml, toArray } from "./data.js";
723
- export type { FromCsvOptions, FromDirConcatOptions, FromDirOptions, FromJsonOptions, FromYamlOptions } from "./data.js";
724
- export { configure, resolveTemplate } from "./configure.js";
725
- export { definePlugin } from "./plugin.js";
726
- export { runFlow, normalizeFlow, extractMappings, extractMappingsOut, traceComputeFn, getAdapter, LensPurityError, } from "./contract-core.js";
727
- export type { CaseLifecycle, CaseSeverity, CaseRequires, CaseDefaultRun, FailureKind, FailureClassification, Extensions, ContractProtocolAdapter, ContractProjection, ExtractedContractProjection, CaseMeta, ExtractedCaseMeta, ContractRegistryMeta, PayloadDescriptor, ProtocolContract, ContractCaseRef, InferInputs, InferOutput, FlowBuilder, FlowContract, FlowMeta, FlowRegistryMeta, RuntimeFlowProjection, RuntimeFlowStep, RuntimeContractCallStep, RuntimeComputeStep, ExtractedFlowProjection, ExtractedFlowStep, ExtractedContractCallStep, ExtractedComputeStep, FieldMapping, } from "./contract-types.js";
215
+ export { TestBuilder } from "./test/builder.js";
216
+ export { EachBuilder } from "./test/each-builder.js";
217
+ export type { EachStepFunction, EachSetupFunction, EachTeardownFunction } from "./test/each-builder.js";
218
+ export type { ExtendedTest } from "./test/extend.js";
219
+ export { runFlow, normalizeFlow, extractMappings, extractMappingsOut, traceComputeFn, getAdapter, listRegisteredProtocols, LensPurityError, } from "./contract-core.js";
220
+ /**
221
+ * Map of known artifact kind names to their Final (merged) types.
222
+ *
223
+ * Augmentation pattern for plugins introducing new kinds:
224
+ *
225
+ * ```ts
226
+ * declare module "@glubean/sdk" {
227
+ * interface KnownArtifacts { proto: string; }
228
+ * interface KnownArtifactParts { proto: ProtoPart; }
229
+ * interface KnownArtifactOptions { proto: ProtoOptions; }
230
+ * }
231
+ * ```
232
+ */
233
+ import type { OpenApiDocument as _OpenApiDocument, OpenApiOptions as _OpenApiOptions } from "./contract-http/openapi.js";
234
+ import type { MarkdownPart as _MarkdownPart } from "./contract-artifacts.js";
235
+ export interface KnownArtifacts {
236
+ /** OpenAPI 3.1 document (cross-contract merged). HTTP adapter only. */
237
+ openapi: _OpenApiDocument;
238
+ /** Protocol-agnostic feature-grouped markdown document. */
239
+ markdown: string;
240
+ }
241
+ /**
242
+ * Map of known artifact kind names to their per-contract Part types
243
+ * (what producers / defaultRender emit; merge consumes).
244
+ * Keys must mirror `KnownArtifacts`.
245
+ */
246
+ export interface KnownArtifactParts {
247
+ /** Per-contract partial OpenAPI document (single path + scoped components). */
248
+ openapi: _OpenApiDocument;
249
+ /** Per-contract structured markdown part (body + feature + caseCount). */
250
+ markdown: _MarkdownPart;
251
+ }
252
+ /**
253
+ * Map of known artifact kind names to their per-render Options types.
254
+ * Keys must mirror `KnownArtifacts`.
255
+ */
256
+ export interface KnownArtifactOptions {
257
+ openapi: _OpenApiOptions;
258
+ markdown: void;
259
+ }
260
+ export type { OpenApiDocument, OpenApiOptions } from "./contract-http/openapi.js";
261
+ export type { MarkdownPart } from "./contract-artifacts.js";
262
+ export { defineArtifactKind, registerArtifactKind, getArtifactKind, listArtifactKinds, renderArtifact, renderArtifactByName, renderArtifactWithSummary, listArtifactProducers, listArtifactCapability, openapiArtifact, markdownArtifact, genericMarkdownPart, assembleMarkdownDocument, } from "./contract-artifacts.js";
263
+ export type { ArtifactKind, RenderArtifactControl, ArtifactContribution, ArtifactSkip, ArtifactRenderSummary, } from "./contract-artifacts.js";
264
+ export type { CaseLifecycle, CaseSeverity, CaseRequires, CaseDefaultRun, BaseCaseSpec, FailureKind, FailureClassification, Extensions, ContractProtocolAdapter, ContractProjection, ExtractedContractProjection, CaseMeta, ExtractedCaseMeta, ContractRegistryMeta, PayloadDescriptor, ProtocolContract, ContractCaseRef, InferInputs, InferOutput, FlowBuilder, FlowContract, FlowMeta, FlowRegistryMeta, RuntimeFlowProjection, RuntimeFlowStep, RuntimeContractCallStep, RuntimeComputeStep, ExtractedFlowProjection, ExtractedFlowStep, ExtractedContractCallStep, ExtractedComputeStep, FieldMapping, } from "./contract-types.js";
728
265
  import type { HttpContractRoot } from "./contract-http/types.js";
729
266
  import type { ContractProtocolAdapter } from "./contract-types.js";
730
267
  import type { FlowBuilder, FlowMeta } from "./contract-types.js";
@@ -744,6 +281,12 @@ export declare const contract: {
744
281
  };
745
282
  export { createHttpFactory, createHttpRoot, } from "./contract-http/factory.js";
746
283
  export type { HttpContractSpec, HttpContractDefaults, HttpSecurityScheme, HttpContractRoot, HttpContractFactory, ContractCase, ContractExpect, ContractExample, NormalizedHeaders, ParamValue, RequestSpec, HttpPayloadSchemas, HttpSafeSchemas, HttpContractMeta, HttpParamSchema, HttpParamMeta, HttpFlowCaseOutput, InferHttpInputs, InferHttpOutput, } from "./contract-http/index.js";
284
+ export * from "./types.js";
285
+ export { fromCsv, fromDir, fromJson, fromJsonl, fromYaml, toArray } from "./data.js";
286
+ export type { FromCsvOptions, FromDirConcatOptions, FromDirOptions, FromJsonOptions, FromYamlOptions } from "./data.js";
287
+ export { configure, resolveTemplate } from "./configure.js";
288
+ export { definePlugin, defineClientFactory } from "./plugin.js";
289
+ export { installPlugin, listInstalledPlugins } from "./install-plugin.js";
747
290
  export { defineSession, session } from "./session.js";
748
291
  export { Expectation, ExpectFailError } from "./expect.js";
749
292
  export type { AssertEmitter, AssertionEmission, CustomMatchers, MatcherFn, MatcherResult } from "./expect.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,EAEjB,kBAAkB,EAGlB,QAAQ,EAER,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,QAAQ,CAAC;AAYlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,SAAS,WAAW,GAAG,WAAW;IACzE,OAAO,CAAC,KAAK,CAAW;IACxB,OAAO,CAAC,MAAM,CAAC,CAAmB;IAClC,OAAO,CAAC,SAAS,CAAC,CAAsB;IAExC,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,MAAM,CAAS;IAEvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAA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