@scenarist/core 0.3.2 → 0.4.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/domain/config-builder.d.ts.map +1 -1
- package/dist/domain/config-builder.js +1 -0
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/response-selector.d.ts.map +1 -1
- package/dist/domain/response-selector.js +48 -24
- package/dist/domain/scenario-manager.d.ts.map +1 -1
- package/dist/domain/scenario-manager.js +3 -0
- package/dist/domain/state-response-resolver.d.ts +23 -1
- package/dist/domain/state-response-resolver.d.ts.map +1 -1
- package/dist/domain/state-response-resolver.js +12 -2
- package/dist/ports/driving/scenario-manager.d.ts +12 -0
- package/dist/ports/driving/scenario-manager.d.ts.map +1 -1
- package/dist/schemas/scenario-definition.d.ts +6 -0
- package/dist/schemas/scenario-definition.d.ts.map +1 -1
- package/dist/schemas/scenarios-object.d.ts +3 -0
- package/dist/schemas/scenarios-object.d.ts.map +1 -1
- package/dist/schemas/state-aware-mocking.d.ts +13 -1
- package/dist/schemas/state-aware-mocking.d.ts.map +1 -1
- package/dist/schemas/state-aware-mocking.js +50 -2
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-builder.d.ts","sourceRoot":"","sources":["../../src/domain/config-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAa3B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,kBAAkB,EACtD,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAC7B,
|
|
1
|
+
{"version":3,"file":"config-builder.d.ts","sourceRoot":"","sources":["../../src/domain/config-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,mBAAmB,CAAC;AAa3B;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,kBAAkB,EACtD,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAC7B,eAkBF,CAAC"}
|
|
@@ -23,6 +23,7 @@ export const buildConfig = (input) => {
|
|
|
23
23
|
endpoints: {
|
|
24
24
|
setScenario: input.endpoints?.setScenario ?? "/__scenario__",
|
|
25
25
|
getScenario: input.endpoints?.getScenario ?? "/__scenario__",
|
|
26
|
+
getState: input.endpoints?.getState ?? "/__scenarist__/state",
|
|
26
27
|
},
|
|
27
28
|
defaultTestId: input.defaultTestId ?? "default-test",
|
|
28
29
|
errorBehaviors: {
|
package/dist/domain/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { buildConfig } from "./config-builder.js";
|
|
|
3
3
|
export { createResponseSelector } from "./response-selector.js";
|
|
4
4
|
export { matchesRegex } from "./regex-matching.js";
|
|
5
5
|
export { createStateConditionEvaluator, type StateConditionEvaluator, } from "./state-condition-evaluator.js";
|
|
6
|
-
export { createStateResponseResolver, type StateResponseResolver, } from "./state-response-resolver.js";
|
|
6
|
+
export { createStateResponseResolver, type StateResponseResolver, type StateResponseResult, } from "./state-response-resolver.js";
|
|
7
7
|
export { deepEquals } from "./deep-equals.js";
|
|
8
8
|
export { LogCategories, LogEvents, type LogEvent } from "./log-events.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,6BAA6B,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,6BAA6B,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,2BAA2B,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-selector.d.ts","sourceRoot":"","sources":["../../src/domain/response-selector.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,MAAM,EACP,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"response-selector.d.ts","sourceRoot":"","sources":["../../src/domain/response-selector.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,MAAM,EACP,MAAM,mBAAmB,CAAC;AAuC3B;;GAEG;AACH,KAAK,6BAA6B,GAAG;IACnC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GACjC,UAAS,6BAAkC,KAC1C,gBAgRF,CAAC"}
|
|
@@ -115,8 +115,8 @@ export const createResponseSelector = (options = {}) => {
|
|
|
115
115
|
specificity,
|
|
116
116
|
});
|
|
117
117
|
// Select response (single, sequence, or stateResponse)
|
|
118
|
-
const
|
|
119
|
-
if (!
|
|
118
|
+
const responseResult = selectResponseFromMock(testId, scenarioId, mockIndex, mock, sequenceTracker, stateManager, logger);
|
|
119
|
+
if (!responseResult) {
|
|
120
120
|
return {
|
|
121
121
|
success: false,
|
|
122
122
|
error: new ScenaristError(`Mock has neither response nor sequence field`, {
|
|
@@ -137,7 +137,7 @@ export const createResponseSelector = (options = {}) => {
|
|
|
137
137
|
captureState(testId, context, mock.captureState, stateManager);
|
|
138
138
|
}
|
|
139
139
|
// Apply templates to response (both state AND params)
|
|
140
|
-
let finalResponse = response;
|
|
140
|
+
let finalResponse = responseResult.response;
|
|
141
141
|
if (stateManager || mockWithParams.params) {
|
|
142
142
|
const currentState = stateManager ? stateManager.getAll(testId) : {};
|
|
143
143
|
// Merge state and params for template replacement
|
|
@@ -147,13 +147,18 @@ export const createResponseSelector = (options = {}) => {
|
|
|
147
147
|
params: mockWithParams.params || {},
|
|
148
148
|
};
|
|
149
149
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- applyTemplates preserves structure; input ScenaristResponse → output ScenaristResponse
|
|
150
|
-
finalResponse = applyTemplates(response, templateData);
|
|
150
|
+
finalResponse = applyTemplates(responseResult.response, templateData);
|
|
151
151
|
}
|
|
152
152
|
// Apply afterResponse.setState to mutate state for subsequent requests
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
// Uses condition-level afterResponse if available (#338)
|
|
154
|
+
const effectiveAfterResponse = resolveEffectiveAfterResponse(mock.afterResponse, responseResult.matchedCondition);
|
|
155
|
+
if (effectiveAfterResponse?.setState && stateManager) {
|
|
156
|
+
stateManager.merge(testId, effectiveAfterResponse.setState);
|
|
155
157
|
logger.debug(LogCategories.STATE, LogEvents.STATE_SET, logContext, {
|
|
156
|
-
setState:
|
|
158
|
+
setState: effectiveAfterResponse.setState,
|
|
159
|
+
source: responseResult.matchedCondition
|
|
160
|
+
? "condition"
|
|
161
|
+
: "mock-level",
|
|
157
162
|
});
|
|
158
163
|
}
|
|
159
164
|
return { success: true, data: finalResponse };
|
|
@@ -204,6 +209,25 @@ export const createResponseSelector = (options = {}) => {
|
|
|
204
209
|
},
|
|
205
210
|
};
|
|
206
211
|
};
|
|
212
|
+
/**
|
|
213
|
+
* Determine which afterResponse to apply.
|
|
214
|
+
*
|
|
215
|
+
* Resolution order (per #338):
|
|
216
|
+
* 1. If condition matched AND has 'afterResponse' key → use condition's (including null)
|
|
217
|
+
* 2. Otherwise → use mock-level afterResponse
|
|
218
|
+
*
|
|
219
|
+
* @param mockAfterResponse - Mock-level afterResponse (fallback)
|
|
220
|
+
* @param matchedCondition - The matched condition from stateResponse (or null)
|
|
221
|
+
* @returns The effective afterResponse to apply (or null/undefined for no mutation)
|
|
222
|
+
*/
|
|
223
|
+
const resolveEffectiveAfterResponse = (mockAfterResponse, matchedCondition) => {
|
|
224
|
+
// If a condition matched and has its own afterResponse key, use it (including null)
|
|
225
|
+
if (matchedCondition && "afterResponse" in matchedCondition) {
|
|
226
|
+
return matchedCondition.afterResponse;
|
|
227
|
+
}
|
|
228
|
+
// Otherwise, fall back to mock-level afterResponse
|
|
229
|
+
return mockAfterResponse;
|
|
230
|
+
};
|
|
207
231
|
/**
|
|
208
232
|
* Select a response from a mock (single response, sequence, or stateResponse).
|
|
209
233
|
*
|
|
@@ -214,7 +238,7 @@ export const createResponseSelector = (options = {}) => {
|
|
|
214
238
|
* @param sequenceTracker - Optional sequence tracker for Phase 2
|
|
215
239
|
* @param stateManager - Optional state manager for stateResponse
|
|
216
240
|
* @param logger - Logger for debugging
|
|
217
|
-
* @returns
|
|
241
|
+
* @returns MockResponseResult or null if mock has no response type
|
|
218
242
|
*/
|
|
219
243
|
const selectResponseFromMock = (testId, scenarioId, mockIndex, mock, sequenceTracker, stateManager, logger) => {
|
|
220
244
|
const logContext = { testId, scenarioId };
|
|
@@ -222,7 +246,12 @@ const selectResponseFromMock = (testId, scenarioId, mockIndex, mock, sequenceTra
|
|
|
222
246
|
if (mock.sequence) {
|
|
223
247
|
if (!sequenceTracker) {
|
|
224
248
|
// Sequence defined but no tracker provided - return first response
|
|
225
|
-
|
|
249
|
+
// Note: Schema validation ensures responses array has at least 1 element,
|
|
250
|
+
// but defensive check handles malformed data that bypasses validation
|
|
251
|
+
const firstResponse = mock.sequence.responses[0];
|
|
252
|
+
return firstResponse
|
|
253
|
+
? { response: firstResponse, matchedCondition: null }
|
|
254
|
+
: null;
|
|
226
255
|
}
|
|
227
256
|
// Get current position from tracker
|
|
228
257
|
const { position } = sequenceTracker.getPosition(testId, scenarioId, mockIndex);
|
|
@@ -234,7 +263,7 @@ const selectResponseFromMock = (testId, scenarioId, mockIndex, mock, sequenceTra
|
|
|
234
263
|
// Advance position for next call
|
|
235
264
|
const repeatMode = mock.sequence.repeat || "last";
|
|
236
265
|
sequenceTracker.advance(testId, scenarioId, mockIndex, mock.sequence.responses.length, repeatMode);
|
|
237
|
-
return response;
|
|
266
|
+
return { response, matchedCondition: null };
|
|
238
267
|
}
|
|
239
268
|
// State-aware response: evaluate conditions against current state
|
|
240
269
|
if (mock.stateResponse) {
|
|
@@ -242,13 +271,13 @@ const selectResponseFromMock = (testId, scenarioId, mockIndex, mock, sequenceTra
|
|
|
242
271
|
}
|
|
243
272
|
// Phase 1: Single response
|
|
244
273
|
if (mock.response) {
|
|
245
|
-
return mock.response;
|
|
274
|
+
return { response: mock.response, matchedCondition: null };
|
|
246
275
|
}
|
|
247
276
|
// No response type defined
|
|
248
277
|
return null;
|
|
249
278
|
};
|
|
250
279
|
/**
|
|
251
|
-
* Resolve a stateResponse configuration to a
|
|
280
|
+
* Resolve a stateResponse configuration to a response and matched condition.
|
|
252
281
|
*
|
|
253
282
|
* Uses the StateResponseResolver to evaluate conditions against
|
|
254
283
|
* current test state and return the appropriate response.
|
|
@@ -258,7 +287,7 @@ const selectResponseFromMock = (testId, scenarioId, mockIndex, mock, sequenceTra
|
|
|
258
287
|
* @param stateManager - Optional state manager for state lookup
|
|
259
288
|
* @param logger - Logger for debugging
|
|
260
289
|
* @param logContext - Context for log messages
|
|
261
|
-
* @returns
|
|
290
|
+
* @returns MockResponseResult with response and matched condition
|
|
262
291
|
*/
|
|
263
292
|
const resolveStateResponse = (testId, stateResponse, stateManager, logger, logContext) => {
|
|
264
293
|
// Without stateManager, always return default
|
|
@@ -267,25 +296,20 @@ const resolveStateResponse = (testId, stateResponse, stateManager, logger, logCo
|
|
|
267
296
|
result: "default",
|
|
268
297
|
reason: "no_state_manager",
|
|
269
298
|
});
|
|
270
|
-
return stateResponse.default;
|
|
299
|
+
return { response: stateResponse.default, matchedCondition: null };
|
|
271
300
|
}
|
|
272
301
|
// Get current state for this test
|
|
273
302
|
const currentState = stateManager.getAll(testId);
|
|
274
|
-
// Create resolver and evaluate conditions
|
|
303
|
+
// Create resolver and evaluate conditions with matched condition tracking
|
|
275
304
|
const resolver = createStateResponseResolver();
|
|
276
|
-
const
|
|
277
|
-
// Log which response was selected and why
|
|
278
|
-
const isDefault = response === stateResponse.default;
|
|
279
|
-
const matchedCondition = isDefault
|
|
280
|
-
? null
|
|
281
|
-
: stateResponse.conditions.find((c) => resolver.resolveResponse({ default: stateResponse.default, conditions: [c] }, currentState) !== stateResponse.default);
|
|
305
|
+
const result = resolver.resolveResponseWithCondition(stateResponse, currentState);
|
|
282
306
|
logger.debug(LogCategories.STATE, LogEvents.STATE_RESPONSE_RESOLVED, logContext, {
|
|
283
|
-
result:
|
|
307
|
+
result: result.matchedCondition ? "condition" : "default",
|
|
284
308
|
currentState,
|
|
285
309
|
conditionsCount: stateResponse.conditions.length,
|
|
286
|
-
matchedWhen: matchedCondition?.when ?? null,
|
|
310
|
+
matchedWhen: result.matchedCondition?.when ?? null,
|
|
287
311
|
});
|
|
288
|
-
return
|
|
312
|
+
return result;
|
|
289
313
|
};
|
|
290
314
|
/**
|
|
291
315
|
* Calculate specificity score for match criteria.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-manager.d.ts","sourceRoot":"","sources":["../../src/domain/scenario-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,MAAM,EACP,MAAM,mBAAmB,CAAC;AAwC3B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAAI,6DAMnC;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,
|
|
1
|
+
{"version":3,"file":"scenario-manager.d.ts","sourceRoot":"","sources":["../../src/domain/scenario-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,YAAY,EACZ,MAAM,EACP,MAAM,mBAAmB,CAAC;AAwC3B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAAI,6DAMnC;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,KAAG,eAmIH,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import type { StatefulMockResponse } from "../schemas/state-aware-mocking.js";
|
|
1
|
+
import type { StatefulMockResponse, StateCondition } from "../schemas/state-aware-mocking.js";
|
|
2
2
|
import type { ScenaristResponse } from "../schemas/scenario-definition.js";
|
|
3
3
|
import type { StateConditionEvaluator } from "./state-condition-evaluator.js";
|
|
4
|
+
/**
|
|
5
|
+
* Result of resolving a stateResponse configuration.
|
|
6
|
+
*
|
|
7
|
+
* Contains both the resolved response and the matched condition (if any).
|
|
8
|
+
* This enables callers to determine which afterResponse to apply.
|
|
9
|
+
*/
|
|
10
|
+
export type StateResponseResult = {
|
|
11
|
+
readonly response: ScenaristResponse;
|
|
12
|
+
readonly matchedCondition: StateCondition | null;
|
|
13
|
+
};
|
|
4
14
|
/**
|
|
5
15
|
* StateResponseResolver port for resolving stateResponse configurations.
|
|
6
16
|
*
|
|
@@ -15,8 +25,20 @@ export type StateResponseResolver = {
|
|
|
15
25
|
* @param stateResponse - The stateResponse configuration
|
|
16
26
|
* @param currentState - Current test state
|
|
17
27
|
* @returns The resolved response (matching condition or default)
|
|
28
|
+
* @deprecated Use resolveResponseWithCondition for condition-level afterResponse support
|
|
18
29
|
*/
|
|
19
30
|
resolveResponse(stateResponse: StatefulMockResponse, currentState: Readonly<Record<string, unknown>>): ScenaristResponse;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the response from a stateResponse configuration with matched condition.
|
|
33
|
+
*
|
|
34
|
+
* Returns both the response and the matched condition, enabling callers
|
|
35
|
+
* to determine which afterResponse to apply (condition-level or mock-level).
|
|
36
|
+
*
|
|
37
|
+
* @param stateResponse - The stateResponse configuration
|
|
38
|
+
* @param currentState - Current test state
|
|
39
|
+
* @returns Result with response and matched condition (null if default was used)
|
|
40
|
+
*/
|
|
41
|
+
resolveResponseWithCondition(stateResponse: StatefulMockResponse, currentState: Readonly<Record<string, unknown>>): StateResponseResult;
|
|
20
42
|
};
|
|
21
43
|
/**
|
|
22
44
|
* Options for creating a StateResponseResolver.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-response-resolver.d.ts","sourceRoot":"","sources":["../../src/domain/state-response-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"state-response-resolver.d.ts","sourceRoot":"","sources":["../../src/domain/state-response-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACf,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,cAAc,GAAG,IAAI,CAAC;CAClD,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;;;OAOG;IACH,eAAe,CACb,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC9C,iBAAiB,CAAC;IAErB;;;;;;;;;OASG;IACH,4BAA4B,CAC1B,aAAa,EAAE,oBAAoB,EACnC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC9C,mBAAmB,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,KAAK,kCAAkC,GAAG;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACtC,UAAS,kCAAuC,KAC/C,qBAqCF,CAAC"}
|
|
@@ -6,11 +6,21 @@ export const createStateResponseResolver = (options = {}) => {
|
|
|
6
6
|
const evaluator = options.evaluator ?? createStateConditionEvaluator();
|
|
7
7
|
return {
|
|
8
8
|
resolveResponse(stateResponse, currentState) {
|
|
9
|
+
const result = this.resolveResponseWithCondition(stateResponse, currentState);
|
|
10
|
+
return result.response;
|
|
11
|
+
},
|
|
12
|
+
resolveResponseWithCondition(stateResponse, currentState) {
|
|
9
13
|
const matchingCondition = evaluator.findMatchingCondition(stateResponse.conditions, currentState);
|
|
10
14
|
if (matchingCondition) {
|
|
11
|
-
return
|
|
15
|
+
return {
|
|
16
|
+
response: matchingCondition.then,
|
|
17
|
+
matchedCondition: matchingCondition,
|
|
18
|
+
};
|
|
12
19
|
}
|
|
13
|
-
return
|
|
20
|
+
return {
|
|
21
|
+
response: stateResponse.default,
|
|
22
|
+
matchedCondition: null,
|
|
23
|
+
};
|
|
14
24
|
},
|
|
15
25
|
};
|
|
16
26
|
};
|
|
@@ -95,5 +95,17 @@ export interface ScenarioManager {
|
|
|
95
95
|
* @returns Scenario definition or undefined if not found
|
|
96
96
|
*/
|
|
97
97
|
getScenarioById(id: string): ScenaristScenario | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Get the current state for a test ID.
|
|
100
|
+
*
|
|
101
|
+
* Delegates to: StateManager.getAll()
|
|
102
|
+
*
|
|
103
|
+
* Useful for debugging test state during test development.
|
|
104
|
+
* Returns empty object if no state has been set or no stateManager is configured.
|
|
105
|
+
*
|
|
106
|
+
* @param testId Unique identifier for the test
|
|
107
|
+
* @returns Current state (read-only), or empty object if no state
|
|
108
|
+
*/
|
|
109
|
+
getState(testId: string): Readonly<Record<string, unknown>>;
|
|
98
110
|
}
|
|
99
111
|
//# sourceMappingURL=scenario-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-manager.d.ts","sourceRoot":"","sources":["../../../src/ports/driving/scenario-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;OAOG;IACH,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,CAAC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CAAC;IAE3D;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC7D"}
|
|
@@ -207,6 +207,9 @@ export declare const ScenaristMockSchema: z.ZodObject<{
|
|
|
207
207
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
208
208
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
209
209
|
}, z.core.$strip>;
|
|
210
|
+
afterResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
211
|
+
setState: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
212
|
+
}, z.core.$strip>>>;
|
|
210
213
|
}, z.core.$strip>>;
|
|
211
214
|
}, z.core.$strip>>;
|
|
212
215
|
captureState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -307,6 +310,9 @@ export declare const ScenaristScenarioSchema: z.ZodObject<{
|
|
|
307
310
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
308
311
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
309
312
|
}, z.core.$strip>;
|
|
313
|
+
afterResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
314
|
+
setState: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
315
|
+
}, z.core.$strip>>>;
|
|
310
316
|
}, z.core.$strip>>;
|
|
311
317
|
}, z.core.$strip>>;
|
|
312
318
|
captureState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenario-definition.d.ts","sourceRoot":"","sources":["../../src/schemas/scenario-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,OAAO,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE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AAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -101,6 +101,9 @@ export declare const ScenariosObjectSchema: z.ZodRecord<z.ZodString, z.ZodObject
|
|
|
101
101
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
102
102
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
103
103
|
}, z.core.$strip>;
|
|
104
|
+
afterResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
105
|
+
setState: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
106
|
+
}, z.core.$strip>>>;
|
|
104
107
|
}, z.core.$strip>>;
|
|
105
108
|
}, z.core.$strip>>;
|
|
106
109
|
captureState: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scenarios-object.d.ts","sourceRoot":"","sources":["../../src/schemas/scenarios-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"scenarios-object.d.ts","sourceRoot":"","sources":["../../src/schemas/scenarios-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAI9B,CAAC"}
|
|
@@ -13,11 +13,17 @@ import { z } from "zod";
|
|
|
13
13
|
* The `when` clause is a partial match object - all keys must match
|
|
14
14
|
* the current state for the condition to apply.
|
|
15
15
|
*
|
|
16
|
+
* The optional `afterResponse` field overrides the mock-level afterResponse:
|
|
17
|
+
* - If present with a value: use condition's afterResponse (replaces mock-level)
|
|
18
|
+
* - If present as null: explicitly skip state mutation
|
|
19
|
+
* - If absent: inherit mock-level afterResponse (backward compatible)
|
|
20
|
+
*
|
|
16
21
|
* @example
|
|
17
22
|
* ```typescript
|
|
18
23
|
* {
|
|
19
24
|
* when: { checked: true, step: 'reviewed' },
|
|
20
|
-
* then: { status: 200, body: { state: 'approved' } }
|
|
25
|
+
* then: { status: 200, body: { state: 'approved' } },
|
|
26
|
+
* afterResponse: { setState: { phase: 'approved' } } // Optional
|
|
21
27
|
* }
|
|
22
28
|
* ```
|
|
23
29
|
*/
|
|
@@ -29,6 +35,9 @@ export declare const StateConditionSchema: z.ZodObject<{
|
|
|
29
35
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
30
36
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
31
37
|
}, z.core.$strip>;
|
|
38
|
+
afterResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
39
|
+
setState: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
32
41
|
}, z.core.$strip>;
|
|
33
42
|
export type StateCondition = z.infer<typeof StateConditionSchema>;
|
|
34
43
|
/**
|
|
@@ -62,6 +71,9 @@ export declare const StatefulMockResponseSchema: z.ZodObject<{
|
|
|
62
71
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
63
72
|
delay: z.ZodOptional<z.ZodNumber>;
|
|
64
73
|
}, z.core.$strip>;
|
|
74
|
+
afterResponse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
75
|
+
setState: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
76
|
+
}, z.core.$strip>>>;
|
|
65
77
|
}, z.core.$strip>>;
|
|
66
78
|
}, z.core.$strip>;
|
|
67
79
|
export type StatefulMockResponse = z.infer<typeof StatefulMockResponseSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-aware-mocking.d.ts","sourceRoot":"","sources":["../../src/schemas/state-aware-mocking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;GAOG;AAEH
|
|
1
|
+
{"version":3,"file":"state-aware-mocking.d.ts","sourceRoot":"","sources":["../../src/schemas/state-aware-mocking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;iBAiB/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAkClE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;iBAQnC,CAAC;AACL,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB;;iBAMnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,wCAAoC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -14,11 +14,17 @@ import { ScenaristResponseSchema } from "./response.js";
|
|
|
14
14
|
* The `when` clause is a partial match object - all keys must match
|
|
15
15
|
* the current state for the condition to apply.
|
|
16
16
|
*
|
|
17
|
+
* The optional `afterResponse` field overrides the mock-level afterResponse:
|
|
18
|
+
* - If present with a value: use condition's afterResponse (replaces mock-level)
|
|
19
|
+
* - If present as null: explicitly skip state mutation
|
|
20
|
+
* - If absent: inherit mock-level afterResponse (backward compatible)
|
|
21
|
+
*
|
|
17
22
|
* @example
|
|
18
23
|
* ```typescript
|
|
19
24
|
* {
|
|
20
25
|
* when: { checked: true, step: 'reviewed' },
|
|
21
|
-
* then: { status: 200, body: { state: 'approved' } }
|
|
26
|
+
* then: { status: 200, body: { state: 'approved' } },
|
|
27
|
+
* afterResponse: { setState: { phase: 'approved' } } // Optional
|
|
22
28
|
* }
|
|
23
29
|
* ```
|
|
24
30
|
*/
|
|
@@ -29,7 +35,45 @@ export const StateConditionSchema = z.object({
|
|
|
29
35
|
message: "when clause must have at least one key",
|
|
30
36
|
}),
|
|
31
37
|
then: ScenaristResponseSchema,
|
|
38
|
+
afterResponse: z
|
|
39
|
+
.object({
|
|
40
|
+
setState: z
|
|
41
|
+
.record(z.string(), z.unknown())
|
|
42
|
+
.refine((obj) => Object.keys(obj).length > 0, {
|
|
43
|
+
message: "setState must have at least one key",
|
|
44
|
+
}),
|
|
45
|
+
})
|
|
46
|
+
.nullable()
|
|
47
|
+
.optional(),
|
|
32
48
|
});
|
|
49
|
+
/**
|
|
50
|
+
* Normalize a when clause to a canonical string for comparison.
|
|
51
|
+
* Sorts keys alphabetically and stringifies the object.
|
|
52
|
+
*/
|
|
53
|
+
const normalizeWhenClause = (when) => {
|
|
54
|
+
const sortedKeys = Object.keys(when).sort();
|
|
55
|
+
const sortedObj = {};
|
|
56
|
+
for (const key of sortedKeys) {
|
|
57
|
+
sortedObj[key] = when[key];
|
|
58
|
+
}
|
|
59
|
+
return JSON.stringify(sortedObj);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Check for duplicate when clauses in conditions array.
|
|
63
|
+
* Two when clauses are considered duplicates if they have the same keys
|
|
64
|
+
* with the same values, regardless of key order.
|
|
65
|
+
*/
|
|
66
|
+
const hasDuplicateWhenClauses = (conditions) => {
|
|
67
|
+
const seen = new Set();
|
|
68
|
+
for (const condition of conditions) {
|
|
69
|
+
const normalized = normalizeWhenClause(condition.when);
|
|
70
|
+
if (seen.has(normalized)) {
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
seen.add(normalized);
|
|
74
|
+
}
|
|
75
|
+
return false;
|
|
76
|
+
};
|
|
33
77
|
/**
|
|
34
78
|
* Schema for stateful mock response (stateResponse).
|
|
35
79
|
*
|
|
@@ -46,9 +90,13 @@ export const StateConditionSchema = z.object({
|
|
|
46
90
|
* }
|
|
47
91
|
* ```
|
|
48
92
|
*/
|
|
49
|
-
export const StatefulMockResponseSchema = z
|
|
93
|
+
export const StatefulMockResponseSchema = z
|
|
94
|
+
.object({
|
|
50
95
|
default: ScenaristResponseSchema,
|
|
51
96
|
conditions: z.array(StateConditionSchema),
|
|
97
|
+
})
|
|
98
|
+
.refine((data) => !hasDuplicateWhenClauses(data.conditions), {
|
|
99
|
+
message: "Duplicate 'when' clauses found in stateResponse conditions. Each condition must have a unique 'when' clause.",
|
|
52
100
|
});
|
|
53
101
|
/**
|
|
54
102
|
* Schema for afterResponse configuration.
|
package/dist/types/config.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export type ScenaristConfig = {
|
|
|
50
50
|
readonly setScenario: string;
|
|
51
51
|
/** Endpoint to get current scenario (default: '/__scenario__') */
|
|
52
52
|
readonly getScenario: string;
|
|
53
|
+
/** Endpoint to get current test state for debugging (default: '/__scenarist__/state') */
|
|
54
|
+
readonly getState: string;
|
|
53
55
|
};
|
|
54
56
|
/**
|
|
55
57
|
* The default test ID to use when no x-scenarist-test-id header is present.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,O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