@http-forge/core 0.4.6 → 0.4.8
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/README.md +55 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +214 -214
- package/dist/index.mjs +214 -214
- package/dist/infrastructure/auth/oauth2-token-manager.d.ts +1 -1
- package/dist/infrastructure/config/config-service.d.ts +1 -0
- package/dist/infrastructure/config/config.interface.d.ts +8 -0
- package/dist/infrastructure/environment/variable-interpolator.d.ts +24 -1
- package/dist/infrastructure/execution/request-executor.d.ts +1 -0
- package/dist/infrastructure/script/async-drain.d.ts +53 -0
- package/dist/infrastructure/script/interfaces.d.ts +1 -0
- package/dist/infrastructure/script/request-script-session.d.ts +21 -1
- package/dist/infrastructure/script/script-executor.d.ts +6 -1
- package/dist/infrastructure/script/script-factories.d.ts +1 -0
- package/dist/runtime/mcp-tool-name.d.ts +46 -0
- package/dist/runtime/mcp-tool-schemas.d.ts +170 -0
- package/package.json +1 -1
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* is injected via IExternalBrowserService and ISecretStore interfaces.
|
|
15
15
|
*/
|
|
16
16
|
import { IEnvironmentConfigService } from '../../types/environment-config';
|
|
17
|
-
import { IHttpRequestService } from '../http/interfaces';
|
|
18
17
|
import { IExternalBrowserService, ISecretStore } from '../../types/platform';
|
|
19
18
|
import { OAuth2Config } from '../../types/types';
|
|
19
|
+
import { IHttpRequestService } from '../http/interfaces';
|
|
20
20
|
import { IOAuth2TokenManager, TokenCacheKey, TokenInfo } from './interfaces';
|
|
21
21
|
export declare class OAuth2TokenManager implements IOAuth2TokenManager {
|
|
22
22
|
private readonly secretStore;
|
|
@@ -66,6 +66,7 @@ export declare class ConfigService implements IConfigService {
|
|
|
66
66
|
getSuitesPath(): string;
|
|
67
67
|
getModulePaths(): string[];
|
|
68
68
|
getScriptScope(): 'shared' | 'isolated';
|
|
69
|
+
getScriptTimeout(): number;
|
|
69
70
|
getWorkspacePath(): string;
|
|
70
71
|
reload(): void;
|
|
71
72
|
configExists(): boolean;
|
|
@@ -44,6 +44,12 @@ export interface ScriptsConfig {
|
|
|
44
44
|
* must pass through pm.variables / pm.environment / pm.globals.
|
|
45
45
|
*/
|
|
46
46
|
scope?: 'shared' | 'isolated';
|
|
47
|
+
/**
|
|
48
|
+
* Per-script timeout in milliseconds (default 5000). Bounds both the synchronous
|
|
49
|
+
* script CPU guard and the async event-loop drain budget (pending setTimeout /
|
|
50
|
+
* un-awaited Promises) that the runner waits on before advancing to the next request.
|
|
51
|
+
*/
|
|
52
|
+
timeout?: number;
|
|
47
53
|
}
|
|
48
54
|
/**
|
|
49
55
|
* Runner configuration
|
|
@@ -212,6 +218,8 @@ export interface IConfigService {
|
|
|
212
218
|
getModulePaths(): string[];
|
|
213
219
|
/** Get the script scope mode ('shared' default, or 'isolated' for Postman parity) */
|
|
214
220
|
getScriptScope(): 'shared' | 'isolated';
|
|
221
|
+
/** Get the per-script timeout in milliseconds (default 5000) */
|
|
222
|
+
getScriptTimeout(): number;
|
|
215
223
|
/** Get the workspace root path */
|
|
216
224
|
getWorkspacePath(): string;
|
|
217
225
|
/** Reload configuration from disk */
|
|
@@ -37,10 +37,19 @@ export interface VariableResolverConfig {
|
|
|
37
37
|
*/
|
|
38
38
|
export declare class VariableResolver {
|
|
39
39
|
private readonly allVariables;
|
|
40
|
+
/**
|
|
41
|
+
* Maximum nesting depth for recursive {{var}} resolution.
|
|
42
|
+
* Postman-compatible cap that guards against reference cycles
|
|
43
|
+
* (e.g. a -> {{b}}, b -> {{a}}).
|
|
44
|
+
*/
|
|
45
|
+
private static readonly MAX_RESOLUTION_DEPTH;
|
|
40
46
|
constructor(config: VariableResolverConfig);
|
|
41
47
|
/**
|
|
42
48
|
* Resolve variables in a string ({{varName}} syntax)
|
|
43
|
-
* Uses the full 5-step pipeline with optional escaping for quoted strings
|
|
49
|
+
* Uses the full 5-step pipeline with optional escaping for quoted strings.
|
|
50
|
+
* Nested references — a variable whose value itself contains {{...}} — are
|
|
51
|
+
* resolved recursively (Postman-style) by repeating the substitution until
|
|
52
|
+
* the string stabilizes or the depth cap is reached.
|
|
44
53
|
*/
|
|
45
54
|
resolveString(str: string, escape?: boolean): string;
|
|
46
55
|
/**
|
|
@@ -48,6 +57,20 @@ export declare class VariableResolver {
|
|
|
48
57
|
* Extra variables take highest precedence
|
|
49
58
|
*/
|
|
50
59
|
resolveStringWithExtra(str: string, extraVariables: Record<string, string>, escape?: boolean): string;
|
|
60
|
+
/**
|
|
61
|
+
* Repeatedly apply a single substitution pass until the result stops changing
|
|
62
|
+
* (fixed point) or the nesting depth cap is hit. This resolves variable values
|
|
63
|
+
* that themselves contain {{...}} references. Undefined tokens are left as-is,
|
|
64
|
+
* so a pass that resolves nothing produces no change and terminates the loop;
|
|
65
|
+
* the depth cap guards against reference cycles (a -> {{b}}, b -> {{a}}).
|
|
66
|
+
*/
|
|
67
|
+
private resolveUntilStable;
|
|
68
|
+
/**
|
|
69
|
+
* Single substitution pass over a string using the 5-step pipeline.
|
|
70
|
+
* With escaping enabled, resolved values are escaped for their surrounding
|
|
71
|
+
* quote context.
|
|
72
|
+
*/
|
|
73
|
+
private resolveSinglePass;
|
|
51
74
|
/**
|
|
52
75
|
* Resolve variables in an object recursively
|
|
53
76
|
*/
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Async Drain — Postman-compatible event-loop draining for script sandboxes
|
|
3
|
+
*
|
|
4
|
+
* Postman/Newman keep a script's sandbox alive after its synchronous body returns,
|
|
5
|
+
* pumping the event loop until all pending timers (`setTimeout`/`setInterval`) and
|
|
6
|
+
* microtasks (un-awaited Promises) have settled — bounded by a script timeout. Only
|
|
7
|
+
* then does the runner advance, committing any variable mutations made by those late
|
|
8
|
+
* callbacks so the next request can see them.
|
|
9
|
+
*
|
|
10
|
+
* This module provides an instrumented timer set plus a `drain()` loop that replicates
|
|
11
|
+
* that behavior. The timers wrap the real Node timers, track outstanding handles, and
|
|
12
|
+
* swallow errors thrown inside deferred callbacks (reporting them as non-fatal) so a
|
|
13
|
+
* late failure never rejects the surrounding request — matching Postman, where such
|
|
14
|
+
* callbacks run on a later tick outside the script's try/catch.
|
|
15
|
+
*/
|
|
16
|
+
/** Sandbox-facing timer functions, drop-in replacements for the Node globals. */
|
|
17
|
+
export interface SandboxTimers {
|
|
18
|
+
setTimeout: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => any;
|
|
19
|
+
clearTimeout: (handle: any) => void;
|
|
20
|
+
setInterval: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => any;
|
|
21
|
+
clearInterval: (handle: any) => void;
|
|
22
|
+
}
|
|
23
|
+
/** Result of a drain operation. */
|
|
24
|
+
export interface DrainResult {
|
|
25
|
+
/** True if the timeout cap was hit while timers were still pending. */
|
|
26
|
+
timedOut: boolean;
|
|
27
|
+
/** Approximate wall-clock time spent draining, in milliseconds. */
|
|
28
|
+
elapsedMs: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A registry of instrumented timers bound to a single script session.
|
|
32
|
+
*/
|
|
33
|
+
export interface TimerRegistry {
|
|
34
|
+
/** Timer functions to expose inside the VM sandbox. */
|
|
35
|
+
readonly timers: SandboxTimers;
|
|
36
|
+
/** Number of timers still pending (not yet fired or cleared, or active intervals). */
|
|
37
|
+
pendingCount(): number;
|
|
38
|
+
/** Cancel every outstanding timer. Used at the drain cap and on dispose. */
|
|
39
|
+
clearAll(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Pump the event loop until no timers are pending (and a final microtask flush
|
|
42
|
+
* yields nothing new) or until `timeoutMs` of wall-clock time elapses, whichever
|
|
43
|
+
* comes first. On timeout, all remaining timers are force-cleared.
|
|
44
|
+
*/
|
|
45
|
+
drain(timeoutMs: number): Promise<DrainResult>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create a timer registry whose deferred-callback errors are routed to `onTimerError`.
|
|
49
|
+
*
|
|
50
|
+
* @param onTimerError Invoked (never throws) when a timer callback throws. The error is
|
|
51
|
+
* swallowed relative to the request so the run continues.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createTimerRegistry(onTimerError: (error: unknown) => void): TimerRegistry;
|
|
@@ -49,6 +49,7 @@ export interface ResponseContext {
|
|
|
49
49
|
status: number;
|
|
50
50
|
statusText: string;
|
|
51
51
|
headers: Record<string, string>;
|
|
52
|
+
/** Raw response body string (Postman-compatible). Parse on demand via response.json(). */
|
|
52
53
|
body: any;
|
|
53
54
|
cookies?: Record<string, string>;
|
|
54
55
|
responseTime?: number;
|
|
@@ -8,16 +8,22 @@
|
|
|
8
8
|
* This matches Postman's behavior for per-request script execution.
|
|
9
9
|
*/
|
|
10
10
|
import * as vm from 'vm';
|
|
11
|
+
import { SandboxTimers } from './async-drain';
|
|
11
12
|
import { CommonScriptContext, IRequestScriptSession, PostResponseScriptResult, PreRequestScriptContext, PreRequestScriptResult, ResponseContext } from './interfaces';
|
|
12
13
|
/**
|
|
13
14
|
* Dependencies injected from ScriptExecutor
|
|
14
15
|
* Interface Segregation: Only the methods needed by the session
|
|
15
16
|
*/
|
|
16
17
|
export interface SessionDependencies {
|
|
17
|
-
createVM: (ctx: any, scriptConsole: any) => vm.Context;
|
|
18
|
+
createVM: (ctx: any, scriptConsole: any, timers?: SandboxTimers) => vm.Context;
|
|
18
19
|
createCommonContext: (context: CommonScriptContext, eventName: 'prerequest' | 'test') => any;
|
|
19
20
|
/** When true, each script level runs in its own scope (Postman-compatible). */
|
|
20
21
|
isolateScripts?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Per-script timeout in milliseconds. Bounds BOTH the synchronous VM CPU guard and
|
|
24
|
+
* the async event-loop drain budget (pending timers / un-awaited Promises).
|
|
25
|
+
*/
|
|
26
|
+
scriptTimeoutMs?: number;
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
29
|
* Request Script Session Implementation
|
|
@@ -43,6 +49,7 @@ export declare class RequestScriptSession implements IRequestScriptSession {
|
|
|
43
49
|
private _nextRequest;
|
|
44
50
|
private _skipRequest;
|
|
45
51
|
private _visualizerData;
|
|
52
|
+
private readonly timerRegistry;
|
|
46
53
|
constructor(deps: SessionDependencies, initialContext: PreRequestScriptContext);
|
|
47
54
|
/**
|
|
48
55
|
* Initialize the shared VM context
|
|
@@ -57,6 +64,19 @@ export declare class RequestScriptSession implements IRequestScriptSession {
|
|
|
57
64
|
* Maps HTTP Forge body types to Postman modes for script API compatibility
|
|
58
65
|
*/
|
|
59
66
|
private createRequestObject;
|
|
67
|
+
/**
|
|
68
|
+
* Inject the legacy (pre-`pm.*`) Postman/Newman sandbox globals into the VM context.
|
|
69
|
+
*
|
|
70
|
+
* Older Postman scripts (and many Newman-exported collections) rely on bare globals
|
|
71
|
+
* that the modern `pm.*` sandbox no longer injects. Evaluating them (e.g. `request.name`,
|
|
72
|
+
* `responseCode.code`, `tv4.validate(...)`) otherwise throws `ReferenceError`.
|
|
73
|
+
*
|
|
74
|
+
* Available in BOTH phases: `request`, `environment`, `globals`, `data`, `iteration`.
|
|
75
|
+
* Available in the TEST phase only: `responseBody`, `responseCode`, `responseHeaders`,
|
|
76
|
+
* `responseTime`, `responseCookies`, `tests`, plus `postman.getResponseHeader()` /
|
|
77
|
+
* `postman.getResponseCookie()`.
|
|
78
|
+
*/
|
|
79
|
+
private injectLegacyGlobals;
|
|
60
80
|
/**
|
|
61
81
|
* Execute pre-request scripts in the shared session
|
|
62
82
|
*/
|
|
@@ -23,8 +23,9 @@ export declare class ScriptExecutor implements IScriptExecutor {
|
|
|
23
23
|
private readonly httpService?;
|
|
24
24
|
private readonly secretRegistry?;
|
|
25
25
|
private readonly scopeMode;
|
|
26
|
+
private readonly scriptTimeoutMs;
|
|
26
27
|
private readonly moduleLoader;
|
|
27
|
-
constructor(httpService?: IHttpRequestService | undefined, modulePaths?: string[], secretRegistry?: SecretResolverRegistry | undefined, scopeMode?: 'shared' | 'isolated');
|
|
28
|
+
constructor(httpService?: IHttpRequestService | undefined, modulePaths?: string[], secretRegistry?: SecretResolverRegistry | undefined, scopeMode?: 'shared' | 'isolated', scriptTimeoutMs?: number);
|
|
28
29
|
/**
|
|
29
30
|
* Create a request execution session
|
|
30
31
|
* Factory method implementing IScriptExecutor
|
|
@@ -33,6 +34,10 @@ export declare class ScriptExecutor implements IScriptExecutor {
|
|
|
33
34
|
/**
|
|
34
35
|
* Create VM context with sandbox configuration
|
|
35
36
|
* Returns a context object that can be used with vm.runInContext()
|
|
37
|
+
*
|
|
38
|
+
* @param timers Optional instrumented timer set. When provided, the sandbox uses
|
|
39
|
+
* these instead of the Node globals so the session can track and
|
|
40
|
+
* drain pending timers (Postman-compatible async behavior).
|
|
36
41
|
*/
|
|
37
42
|
private createVM;
|
|
38
43
|
/**
|
|
@@ -22,6 +22,7 @@ export interface ScriptResponse {
|
|
|
22
22
|
code: number;
|
|
23
23
|
statusText: string;
|
|
24
24
|
headers: Record<string, string>;
|
|
25
|
+
/** Raw response body string (Postman-compatible). Use json() to parse, text() for the string. */
|
|
25
26
|
body: any;
|
|
26
27
|
cookies: Record<string, string>;
|
|
27
28
|
responseTime?: number;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP tool-name encoding / decoding.
|
|
3
|
+
*
|
|
4
|
+
* MCP tool names must stay under Anthropic's 128-character limit. HTTP Forge
|
|
5
|
+
* IDs embed the human-readable entity name (up to ~100 chars each), so a raw
|
|
6
|
+
* tool name like `request__<collectionId>__<requestId>` can exceed 240 chars
|
|
7
|
+
* and be rejected by the model provider.
|
|
8
|
+
*
|
|
9
|
+
* To stay short we put a deterministic short hash token (not the raw ID) in the
|
|
10
|
+
* tool name, and resolve a call back to the real entity by hashing the current
|
|
11
|
+
* collections / requests / folders / suites and matching. A raw-value fallback
|
|
12
|
+
* keeps any previously-listed long names working after the upgrade.
|
|
13
|
+
*
|
|
14
|
+
* IDs are NOT changed — they remain the stable external references used by
|
|
15
|
+
* suites, result filenames, and history. Only the tool *name* is shortened.
|
|
16
|
+
*
|
|
17
|
+
* The model selects a tool by its *description* (which still contains the
|
|
18
|
+
* human-readable names), so an opaque short name does not affect tool choice.
|
|
19
|
+
*/
|
|
20
|
+
/** Deterministic short token for an ID or folder path (12 hex chars). */
|
|
21
|
+
export declare function mcpToolToken(value: string): string;
|
|
22
|
+
export type McpToolKind = 'request' | 'collection' | 'folder' | 'suite';
|
|
23
|
+
export declare function buildRequestToolName(prefix: string, collectionId: string, requestId: string): string;
|
|
24
|
+
export declare function buildCollectionToolName(prefix: string, collectionId: string): string;
|
|
25
|
+
export declare function buildFolderToolName(prefix: string, collectionId: string, folderPath: string): string;
|
|
26
|
+
export declare function buildSuiteToolName(prefix: string, suiteId: string): string;
|
|
27
|
+
export interface ParsedMcpToolName {
|
|
28
|
+
kind: McpToolKind;
|
|
29
|
+
tokens: string[];
|
|
30
|
+
}
|
|
31
|
+
/** Parse a tool name (prefix already stripped) into its kind + token segments. */
|
|
32
|
+
export declare function parseMcpToolName(name: string): ParsedMcpToolName;
|
|
33
|
+
/**
|
|
34
|
+
* Resolve a token back to one of `candidates` by matching its hash token, or
|
|
35
|
+
* (legacy fallback) the raw candidate value itself.
|
|
36
|
+
*/
|
|
37
|
+
export declare function resolveToken(token: string, candidates: readonly string[]): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve a folder token to a folder path. Adds a base64url legacy fallback for
|
|
40
|
+
* folder tool names emitted before hashing (which embedded base64url(path)).
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveFolderToken(token: string, folderPaths: readonly string[]): string | undefined;
|
|
43
|
+
export declare function buildRequestToolDescription(method: string, requestName: string, collectionName: string, folderPath: string): string;
|
|
44
|
+
export declare function buildCollectionToolDescription(collectionName: string, requestCount: number): string;
|
|
45
|
+
export declare function buildFolderToolDescription(folderPath: string, collectionName: string, requestCount: number): string;
|
|
46
|
+
export declare function buildSuiteToolDescription(suiteName: string, requestCount: number, iterations: number): string;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared MCP tool input schemas.
|
|
3
|
+
*
|
|
4
|
+
* Both MCP server implementations (the embeddable core runtime and the VS Code
|
|
5
|
+
* extension) expose the same tools, so they must advertise identical input
|
|
6
|
+
* schemas. Keeping these in one place prevents the two sides from drifting
|
|
7
|
+
* (e.g. the extension previously omitted `iterations`/`delay`/`include` for
|
|
8
|
+
* collection and folder runs even though its executor supported them).
|
|
9
|
+
*/
|
|
10
|
+
export declare const REQUEST_INPUT_SCHEMA: {
|
|
11
|
+
readonly type: "object";
|
|
12
|
+
readonly properties: {
|
|
13
|
+
readonly environment: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "Environment name to use (defaults to the currently selected environment)";
|
|
16
|
+
};
|
|
17
|
+
readonly variables: {
|
|
18
|
+
readonly type: "object";
|
|
19
|
+
readonly description: "Extra variables to inject — merged with environment variables, {{name}} syntax";
|
|
20
|
+
readonly additionalProperties: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
readonly headers: {
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly description: "Override or add request headers";
|
|
27
|
+
readonly additionalProperties: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly query: {
|
|
32
|
+
readonly type: "object";
|
|
33
|
+
readonly description: "Override query parameters";
|
|
34
|
+
readonly additionalProperties: {
|
|
35
|
+
readonly type: "string";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
readonly body: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly description: "Replace the request body (JSON string). Omit to use the saved body.";
|
|
41
|
+
};
|
|
42
|
+
readonly include: {
|
|
43
|
+
readonly type: "array";
|
|
44
|
+
readonly items: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly enum: readonly ["headers", "cookies", "tests", "consoleOutput", "report"];
|
|
47
|
+
};
|
|
48
|
+
readonly description: "Extra fields to include in the response (default: status, ok, body, allPassed)";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const COLLECTION_INPUT_SCHEMA: {
|
|
53
|
+
readonly type: "object";
|
|
54
|
+
readonly properties: {
|
|
55
|
+
readonly environment: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
readonly description: "Environment name to use";
|
|
58
|
+
};
|
|
59
|
+
readonly variables: {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
readonly description: "Extra variables injected into every request";
|
|
62
|
+
readonly additionalProperties: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly iterations: {
|
|
67
|
+
readonly type: "number";
|
|
68
|
+
readonly description: "Number of iterations (default: 1)";
|
|
69
|
+
};
|
|
70
|
+
readonly stopOnError: {
|
|
71
|
+
readonly type: "boolean";
|
|
72
|
+
readonly description: "Stop on first failure";
|
|
73
|
+
};
|
|
74
|
+
readonly delay: {
|
|
75
|
+
readonly type: "number";
|
|
76
|
+
readonly description: "Delay between requests in ms";
|
|
77
|
+
};
|
|
78
|
+
readonly include: {
|
|
79
|
+
readonly type: "array";
|
|
80
|
+
readonly items: {
|
|
81
|
+
readonly type: "string";
|
|
82
|
+
readonly enum: readonly ["perRequest", "failedOnly", "consoleOutput", "report"];
|
|
83
|
+
};
|
|
84
|
+
readonly description: "Result detail level";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export declare const FOLDER_INPUT_SCHEMA: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly properties: {
|
|
91
|
+
readonly environment: {
|
|
92
|
+
readonly type: "string";
|
|
93
|
+
readonly description: "Environment name to use";
|
|
94
|
+
};
|
|
95
|
+
readonly variables: {
|
|
96
|
+
readonly type: "object";
|
|
97
|
+
readonly description: "Extra variables injected into every request";
|
|
98
|
+
readonly additionalProperties: {
|
|
99
|
+
readonly type: "string";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly iterations: {
|
|
103
|
+
readonly type: "number";
|
|
104
|
+
readonly description: "Number of iterations (default: 1)";
|
|
105
|
+
};
|
|
106
|
+
readonly stopOnError: {
|
|
107
|
+
readonly type: "boolean";
|
|
108
|
+
readonly description: "Stop on first failure";
|
|
109
|
+
};
|
|
110
|
+
readonly delay: {
|
|
111
|
+
readonly type: "number";
|
|
112
|
+
readonly description: "Delay between requests in ms";
|
|
113
|
+
};
|
|
114
|
+
readonly recursive: {
|
|
115
|
+
readonly type: "boolean";
|
|
116
|
+
readonly description: "Include requests in nested subfolders (default: true)";
|
|
117
|
+
};
|
|
118
|
+
readonly include: {
|
|
119
|
+
readonly type: "array";
|
|
120
|
+
readonly items: {
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly enum: readonly ["perRequest", "failedOnly", "consoleOutput", "report"];
|
|
123
|
+
};
|
|
124
|
+
readonly description: "Result detail level";
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export declare const SUITE_INPUT_SCHEMA: {
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly properties: {
|
|
131
|
+
readonly environment: {
|
|
132
|
+
readonly type: "string";
|
|
133
|
+
readonly description: "Environment name to use";
|
|
134
|
+
};
|
|
135
|
+
readonly iterations: {
|
|
136
|
+
readonly type: "number";
|
|
137
|
+
readonly description: "Number of iterations (overrides suite default)";
|
|
138
|
+
};
|
|
139
|
+
readonly stopOnError: {
|
|
140
|
+
readonly type: "boolean";
|
|
141
|
+
readonly description: "Stop on first failure";
|
|
142
|
+
};
|
|
143
|
+
readonly delay: {
|
|
144
|
+
readonly type: "number";
|
|
145
|
+
readonly description: "Delay between requests in ms";
|
|
146
|
+
};
|
|
147
|
+
readonly variables: {
|
|
148
|
+
readonly type: "object";
|
|
149
|
+
readonly description: "Extra variables injected into every request";
|
|
150
|
+
readonly additionalProperties: {
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
readonly requestFilter: {
|
|
155
|
+
readonly type: "array";
|
|
156
|
+
readonly items: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
};
|
|
159
|
+
readonly description: "Run only requests whose names match one of these strings (case-insensitive)";
|
|
160
|
+
};
|
|
161
|
+
readonly include: {
|
|
162
|
+
readonly type: "array";
|
|
163
|
+
readonly items: {
|
|
164
|
+
readonly type: "string";
|
|
165
|
+
readonly enum: readonly ["perRequest", "failedOnly", "consoleOutput", "report"];
|
|
166
|
+
};
|
|
167
|
+
readonly description: "Result detail level (default: summary + failedRequests)";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
};
|
package/package.json
CHANGED