@http-forge/core 0.6.1 → 0.6.2-2.beta.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.
- package/README.md +223 -251
- package/dist/di/platform-adapters.d.ts +11 -4
- package/dist/index.d.ts +13 -2
- package/dist/index.js +499 -283
- package/dist/index.mjs +498 -282
- package/dist/infrastructure/ai/ai-provider.d.ts +16 -0
- package/dist/infrastructure/analysis/ai-env-suggester.d.ts +22 -0
- package/dist/infrastructure/analysis/collection-enhancer.d.ts +23 -0
- package/dist/infrastructure/analysis/env-suggester.d.ts +57 -0
- package/dist/infrastructure/collection/collection-store.d.ts +1 -1
- package/dist/infrastructure/config/config-service.d.ts +20 -1
- package/dist/infrastructure/config/config.interface.d.ts +26 -2
- package/dist/infrastructure/config/default-config.d.ts +4 -2
- package/dist/infrastructure/environment/environment-config-service.d.ts +2 -1
- package/dist/infrastructure/execution/collection-request-executor.d.ts +3 -2
- package/dist/infrastructure/execution/request-executor.d.ts +5 -0
- package/dist/infrastructure/execution/request-preparer.d.ts +1 -0
- package/dist/infrastructure/http/native-http-client.d.ts +6 -1
- package/dist/infrastructure/openapi/openapi-exporter.d.ts +5 -0
- package/dist/infrastructure/parsers/curl-parser.d.ts +61 -0
- package/dist/infrastructure/script/expect-chain.d.ts +120 -0
- package/dist/infrastructure/script/interfaces.d.ts +3 -0
- package/dist/infrastructure/script/json-schema-validator.d.ts +9 -0
- package/dist/infrastructure/script/module-loader.d.ts +1 -1
- package/dist/infrastructure/script/script-factories.d.ts +10 -73
- package/dist/infrastructure/test-suite/interfaces.d.ts +103 -6
- package/dist/infrastructure/test-suite/result-storage.d.ts +6 -0
- package/dist/infrastructure/test-suite/statistics-service.d.ts +1 -1
- package/dist/infrastructure/test-suite/test-suite-service.d.ts +2 -2
- package/dist/infrastructure/test-suite/test-suite-store.d.ts +27 -9
- package/dist/runtime/mcp-collection-utils.d.ts +29 -1
- package/dist/runtime/mcp-prompts.d.ts +39 -0
- package/dist/runtime/mcp-run-store.d.ts +11 -1
- package/dist/runtime/mcp-tool-builder.d.ts +6 -0
- package/dist/runtime/mcp-tool-name.d.ts +4 -5
- package/dist/runtime/mcp-tool-schemas.d.ts +45 -0
- package/dist/runtime/node-bootstrap.d.ts +9 -0
- package/dist/runtime/runtime-contracts.d.ts +14 -0
- package/dist/types/types.d.ts +67 -1
- package/dist/utils/typed-value.d.ts +14 -0
- package/package.json +20 -6
package/dist/types/types.d.ts
CHANGED
|
@@ -39,6 +39,24 @@ export interface UnifiedFolder {
|
|
|
39
39
|
scripts?: CollectionScripts;
|
|
40
40
|
items: (UnifiedFolder | UnifiedRequest)[];
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Operation example (for OpenAPI generation)
|
|
44
|
+
*/
|
|
45
|
+
export interface OperationExample {
|
|
46
|
+
name: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
value: any;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Operation response definition (for OpenAPI generation)
|
|
52
|
+
*/
|
|
53
|
+
export interface OperationResponse {
|
|
54
|
+
description: string;
|
|
55
|
+
contentType?: string;
|
|
56
|
+
schema?: JSONSchema7;
|
|
57
|
+
examples?: Record<string, any>;
|
|
58
|
+
headers?: Record<string, KeyValueEntry>;
|
|
59
|
+
}
|
|
42
60
|
/**
|
|
43
61
|
* Unified Request - normalized request format
|
|
44
62
|
* Supports full feature set from CollectionRequest with metadata preservation
|
|
@@ -71,6 +89,18 @@ export interface UnifiedRequest {
|
|
|
71
89
|
responseSchema?: ResponseSchemaDefinition;
|
|
72
90
|
/** Body schema for validation */
|
|
73
91
|
bodySchema?: BodySchemaDefinition;
|
|
92
|
+
/** Explicit OpenAPI operationId (e.g., from @Operation, @RequestMapping) */
|
|
93
|
+
operationId?: string;
|
|
94
|
+
/** Explicit OpenAPI summary, separate from name */
|
|
95
|
+
summary?: string;
|
|
96
|
+
/** Explicit OpenAPI tags (e.g., from @Tag, controller class) */
|
|
97
|
+
tags?: string[];
|
|
98
|
+
/** Request/response examples for OpenAPI */
|
|
99
|
+
examples?: OperationExample[];
|
|
100
|
+
/** Per-status-code response definitions */
|
|
101
|
+
responses?: Record<string, OperationResponse>;
|
|
102
|
+
/** Operation-level security requirements */
|
|
103
|
+
security?: Record<string, string[]>[];
|
|
74
104
|
}
|
|
75
105
|
/**
|
|
76
106
|
* Collection-level scripts
|
|
@@ -161,6 +191,36 @@ export interface RequestSettings {
|
|
|
161
191
|
strictSSL?: boolean;
|
|
162
192
|
decompress?: boolean;
|
|
163
193
|
includeCookies?: boolean;
|
|
194
|
+
tls?: TlsSettings;
|
|
195
|
+
certificates?: TlsCertificateMapping[];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* TLS options for HTTPS requests
|
|
199
|
+
*/
|
|
200
|
+
export interface TlsSettings {
|
|
201
|
+
/** Path to CA certificate bundle (PEM) */
|
|
202
|
+
caPath?: string;
|
|
203
|
+
/** Path to client certificate (PEM) */
|
|
204
|
+
certPath?: string;
|
|
205
|
+
/** Path to client private key (PEM) */
|
|
206
|
+
keyPath?: string;
|
|
207
|
+
/** Path to client certificate/key bundle (PFX/P12) */
|
|
208
|
+
pfxPath?: string;
|
|
209
|
+
/** Passphrase for key/pfx if required */
|
|
210
|
+
passphrase?: string;
|
|
211
|
+
/** Optional TLS servername (SNI override) */
|
|
212
|
+
servername?: string;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Host-based TLS certificate mapping (Postman-style global certificate settings)
|
|
216
|
+
*/
|
|
217
|
+
export interface TlsCertificateMapping extends TlsSettings {
|
|
218
|
+
/** Host matcher: exact host (api.example.com), wildcard (*.example.com), or '*' */
|
|
219
|
+
host: string;
|
|
220
|
+
/** Optional port filter */
|
|
221
|
+
port?: number;
|
|
222
|
+
/** Enable/disable mapping */
|
|
223
|
+
enabled?: boolean;
|
|
164
224
|
}
|
|
165
225
|
/**
|
|
166
226
|
* HTTP request ready for execution
|
|
@@ -578,11 +638,17 @@ export interface CollectionRequest {
|
|
|
578
638
|
deprecated?: boolean;
|
|
579
639
|
responseSchema?: ResponseSchemaDefinition;
|
|
580
640
|
bodySchema?: BodySchemaDefinition;
|
|
641
|
+
operationId?: string;
|
|
642
|
+
summary?: string;
|
|
643
|
+
tags?: string[];
|
|
644
|
+
examples?: OperationExample[];
|
|
645
|
+
responses?: Record<string, OperationResponse>;
|
|
646
|
+
security?: Record<string, string[]>[];
|
|
581
647
|
}
|
|
582
648
|
/**
|
|
583
649
|
* Encoded request body ready for HTTP transmission
|
|
584
650
|
*/
|
|
585
|
-
export type RequestBodyEncoded = string | Buffer | null;
|
|
651
|
+
export type RequestBodyEncoded = string | Buffer | FormData | URLSearchParams | null;
|
|
586
652
|
/**
|
|
587
653
|
* Resolved body ready for HTTP transmission
|
|
588
654
|
*/
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize a value for storage in variable scopes.
|
|
3
|
+
* Strings are stored as-is; other values are JSON payloads with U+001E marker.
|
|
4
|
+
*/
|
|
5
|
+
export declare function serializeTypedValue(raw: unknown): string;
|
|
6
|
+
/**
|
|
7
|
+
* Deserialize a value stored by script variable scopes.
|
|
8
|
+
* Values prefixed with U+001E are JSON payloads and are parsed back.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deserializeTypedValue(raw: unknown): unknown;
|
|
11
|
+
/**
|
|
12
|
+
* Deserialize every value in a variable map.
|
|
13
|
+
*/
|
|
14
|
+
export declare function deserializeTypedRecord(record: Record<string, unknown> | undefined): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@http-forge/core",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "Headless
|
|
3
|
+
"version": "0.6.22.beta.2",
|
|
4
|
+
"description": "Headless Postman-compatible API testing engine for Node.js, CI/CD, OpenAPI workflows, and HTTP Forge automation",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -27,18 +27,32 @@
|
|
|
27
27
|
"clean": "rimraf dist"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
|
+
"http-forge",
|
|
31
|
+
"http forge",
|
|
30
32
|
"http",
|
|
31
33
|
"api",
|
|
32
34
|
"testing",
|
|
33
|
-
"
|
|
35
|
+
"api testing",
|
|
34
36
|
"postman",
|
|
37
|
+
"postman alternative",
|
|
38
|
+
"postman runtime",
|
|
39
|
+
"openapi",
|
|
40
|
+
"graphql",
|
|
41
|
+
"automation",
|
|
42
|
+
"ci",
|
|
43
|
+
"cd",
|
|
44
|
+
"ci-cd",
|
|
45
|
+
"api engine",
|
|
35
46
|
"collection",
|
|
47
|
+
"headless",
|
|
48
|
+
"headless api testing",
|
|
49
|
+
"nodejs",
|
|
50
|
+
"mcp",
|
|
51
|
+
"mcp server",
|
|
36
52
|
"scripting",
|
|
37
53
|
"variables",
|
|
38
54
|
"cookies",
|
|
39
|
-
"
|
|
40
|
-
"headless",
|
|
41
|
-
"http-forge"
|
|
55
|
+
"runtime"
|
|
42
56
|
],
|
|
43
57
|
"author": "Henry Huang",
|
|
44
58
|
"license": "MIT",
|