@http-forge/core 0.6.32 → 0.6.36-beta.1
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 +51 -0
- package/dist/__tests__/api-discovery/golden-utils.d.ts +10 -0
- package/dist/index.d.ts +49 -22
- package/dist/index.js +456 -480
- package/dist/index.mjs +456 -480
- package/dist/infrastructure/ai/ai-context.d.ts +109 -0
- package/dist/infrastructure/ai/ai-provider.d.ts +1 -1
- package/dist/infrastructure/ai/ai-utils.d.ts +38 -0
- package/dist/infrastructure/ai/http-providers.d.ts +34 -0
- package/dist/infrastructure/api-discovery/analyzer/component-analyzer.d.ts +60 -0
- package/dist/infrastructure/api-discovery/analyzer/express-component-analyzer.d.ts +14 -0
- package/dist/infrastructure/api-discovery/analyzer/fastify-component-analyzer.d.ts +14 -0
- package/dist/infrastructure/api-discovery/analyzer/index.d.ts +11 -0
- package/dist/infrastructure/api-discovery/analyzer/lambda-component-analyzer.d.ts +18 -0
- package/dist/infrastructure/api-discovery/api-discovery-service.d.ts +49 -0
- package/dist/infrastructure/api-discovery/auth-validation.d.ts +34 -0
- package/dist/infrastructure/api-discovery/drift-engine.d.ts +139 -0
- package/dist/infrastructure/api-discovery/fastapi/fastapi-discovery-provider.d.ts +19 -0
- package/dist/infrastructure/api-discovery/fastapi/fastapi-parser.d.ts +60 -0
- package/dist/infrastructure/api-discovery/framework-detector.d.ts +8 -0
- package/dist/infrastructure/api-discovery/index.d.ts +29 -0
- package/dist/infrastructure/api-discovery/path-utils.d.ts +17 -0
- package/dist/infrastructure/api-discovery/project-name.d.ts +2 -0
- package/dist/infrastructure/api-discovery/provider.d.ts +29 -0
- package/dist/infrastructure/api-discovery/providers/express-discovery-provider.d.ts +13 -0
- package/dist/infrastructure/api-discovery/providers/fastify-discovery-provider.d.ts +13 -0
- package/dist/infrastructure/api-discovery/providers/lambda-discovery-provider.d.ts +19 -0
- package/dist/infrastructure/api-discovery/providers/nest-discovery-provider.d.ts +12 -0
- package/dist/infrastructure/api-discovery/seed-loader.d.ts +11 -0
- package/dist/infrastructure/api-discovery/source-files.d.ts +1 -0
- package/dist/infrastructure/api-discovery/spring/controller-visitor.d.ts +141 -0
- package/dist/infrastructure/api-discovery/spring/endpoint-parser.d.ts +51 -0
- package/dist/infrastructure/api-discovery/spring/file-utils.d.ts +28 -0
- package/dist/infrastructure/api-discovery/spring/model.d.ts +84 -0
- package/dist/infrastructure/api-discovery/spring/schema-generator.d.ts +65 -0
- package/dist/infrastructure/api-discovery/spring/spring-discovery-provider.d.ts +30 -0
- package/dist/infrastructure/api-discovery/spring/spring-types.d.ts +27 -0
- package/dist/infrastructure/api-discovery/test-generator.d.ts +69 -0
- package/dist/infrastructure/api-discovery/types.d.ts +154 -0
- package/dist/infrastructure/api-discovery/workflow-discovery.d.ts +55 -0
- package/dist/infrastructure/architect/api-architect-service.d.ts +85 -0
- package/dist/infrastructure/architect/architect-prompt.d.ts +22 -0
- package/dist/infrastructure/architect/collection-to-endpoints.d.ts +13 -0
- package/dist/infrastructure/architect/index.d.ts +10 -0
- package/dist/infrastructure/collection/collection-service.d.ts +1 -5
- package/dist/infrastructure/collection/json-collection-loader.d.ts +0 -8
- package/dist/infrastructure/cookie/cookie-service.d.ts +2 -13
- package/dist/infrastructure/cookie/cookie-utils.d.ts +5 -0
- package/dist/infrastructure/docs/index.d.ts +5 -0
- package/dist/infrastructure/docs/release-notes.d.ts +51 -0
- package/dist/infrastructure/environment/environment-config-service.d.ts +0 -1
- package/dist/infrastructure/environment/variable-interpolator.d.ts +9 -0
- package/dist/infrastructure/http/header-utils.d.ts +13 -0
- package/dist/infrastructure/http/http-request-service.d.ts +3 -3
- package/dist/infrastructure/http/interceptor-chain.d.ts +35 -16
- package/dist/infrastructure/http/native-http-client.d.ts +0 -10
- package/dist/infrastructure/openapi/interfaces.d.ts +14 -0
- package/dist/infrastructure/openapi/openapi-exporter.d.ts +11 -91
- package/dist/infrastructure/openapi/openapi-importer.d.ts +19 -0
- package/dist/infrastructure/openapi/openapi-operation-builder.d.ts +36 -0
- package/dist/infrastructure/openapi/openapi-schema-merger.d.ts +33 -0
- package/dist/infrastructure/openapi/openapi-spec-writer.d.ts +27 -0
- package/dist/infrastructure/openapi/openapi-utils.d.ts +62 -0
- package/dist/infrastructure/parsers/har-parser.d.ts +63 -0
- package/dist/infrastructure/parsers/index.d.ts +2 -0
- package/dist/infrastructure/review/index.d.ts +5 -0
- package/dist/infrastructure/review/review-engine.d.ts +95 -0
- package/dist/infrastructure/script/crypto-js-compat.d.ts +123 -0
- package/dist/infrastructure/script/request-object-factory.d.ts +54 -0
- package/dist/infrastructure/script/request-script-session.d.ts +0 -5
- package/dist/infrastructure/script/script-executor.d.ts +4 -33
- package/dist/infrastructure/script/script-factories.d.ts +13 -0
- package/dist/infrastructure/script/variable-scopes.d.ts +101 -0
- package/dist/infrastructure/test-suite/interfaces.d.ts +6 -0
- package/dist/infrastructure/test-suite/result-storage-service.d.ts +6 -1
- package/dist/infrastructure/test-suite/result-storage.d.ts +14 -1
- package/dist/runtime/collection-traversal.d.ts +32 -0
- package/dist/runtime/direct-execution.d.ts +7 -0
- package/dist/runtime/execution-helpers.d.ts +30 -0
- package/dist/runtime/mcp-dispatcher.d.ts +10 -34
- package/dist/runtime/mcp-handlers/ai.d.ts +6 -0
- package/dist/runtime/mcp-handlers/collection.d.ts +5 -0
- package/dist/runtime/mcp-handlers/discovery.d.ts +12 -0
- package/dist/runtime/mcp-handlers/environment-management.d.ts +6 -0
- package/dist/runtime/mcp-handlers/environment.d.ts +5 -0
- package/dist/runtime/mcp-handlers/execution.d.ts +6 -0
- package/dist/runtime/mcp-handlers/helpers.d.ts +43 -0
- package/dist/runtime/mcp-handlers/inspection.d.ts +5 -0
- package/dist/runtime/mcp-handlers/registry.d.ts +12 -0
- package/dist/runtime/mcp-handlers/request.d.ts +5 -0
- package/dist/runtime/mcp-handlers/review.d.ts +10 -0
- package/dist/runtime/mcp-handlers/run-status.d.ts +5 -0
- package/dist/runtime/mcp-handlers/suite.d.ts +6 -0
- package/dist/runtime/mcp-handlers/types.d.ts +59 -0
- package/dist/runtime/mcp-prompts.d.ts +16 -2
- package/dist/runtime/mcp-tool-schemas.d.ts +8 -0
- package/dist/runtime/suite-executor.d.ts +20 -0
- package/dist/types/types.d.ts +0 -9
- package/dist/utils/env-hints.d.ts +17 -0
- package/package.json +16 -6
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Suite flow engine for direct execution.
|
|
3
|
+
*
|
|
4
|
+
* Encapsulates the node-graph interpreter used to execute a test suite
|
|
5
|
+
* (or a collection replayed as a suite): conditional/loop/switch nodes,
|
|
6
|
+
* request execution, pre/post scripts, per-iteration concurrency, result
|
|
7
|
+
* persistence, and report generation.
|
|
8
|
+
*/
|
|
9
|
+
import type { ServiceContainer } from '../di/service-container';
|
|
10
|
+
/**
|
|
11
|
+
* Executes a suite node graph against a resolved service container.
|
|
12
|
+
*
|
|
13
|
+
* The whole flow engine lives here so the public entry points in
|
|
14
|
+
* `direct-execution.ts` stay thin. One instance is scoped to one run.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SuiteExecutor {
|
|
17
|
+
private readonly container;
|
|
18
|
+
constructor(container: ServiceContainer);
|
|
19
|
+
execute(suite: any, args: Record<string, unknown>, source: 'suite' | 'collection'): Promise<unknown>;
|
|
20
|
+
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -280,15 +280,6 @@ export interface ExecutionVariables {
|
|
|
280
280
|
globals?: Record<string, string>;
|
|
281
281
|
environmentVariables?: Record<string, string>;
|
|
282
282
|
}
|
|
283
|
-
/**
|
|
284
|
-
* Environment configuration
|
|
285
|
-
*/
|
|
286
|
-
export interface Environment {
|
|
287
|
-
name: string;
|
|
288
|
-
description?: string;
|
|
289
|
-
variables: Record<string, string>;
|
|
290
|
-
headers?: Record<string, string>;
|
|
291
|
-
}
|
|
292
283
|
/**
|
|
293
284
|
* Context available to scripts during execution
|
|
294
285
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Env-suggestion heuristics shared by the rule-based suggester (env-suggester),
|
|
3
|
+
* the AI suggester (ai-env-suggester), and the curl parser (curl-parser).
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for:
|
|
6
|
+
* - Sensitive header/query key detection
|
|
7
|
+
* - `{{VAR}}` placeholder detection
|
|
8
|
+
* - Var-name derivation and secret-value heuristics
|
|
9
|
+
*/
|
|
10
|
+
export declare const SENSITIVE_HEADER_NAMES: Set<string>;
|
|
11
|
+
export declare const SENSITIVE_QUERY_KEYS: Set<string>;
|
|
12
|
+
/** True if the value contains a `{{var}}` placeholder. */
|
|
13
|
+
export declare function isForgeVar(value: string): boolean;
|
|
14
|
+
/** True if the value looks like a hardcoded secret (long, non-placeholder). */
|
|
15
|
+
export declare function looksLikeSecret(value: string, minLen?: number): boolean;
|
|
16
|
+
/** Derive an UPPER_SNAKE var name from a raw key/value. */
|
|
17
|
+
export declare function toVarName(raw: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@http-forge/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.36-beta.1",
|
|
4
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",
|
|
@@ -67,23 +67,33 @@
|
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@apidevtools/json-schema-ref-parser": "^11.7.3",
|
|
69
69
|
"ajv": "^8.12.0",
|
|
70
|
+
"java-parser": "^3.0.1",
|
|
70
71
|
"lodash": "^4.17.21",
|
|
71
72
|
"moment": "^2.30.1",
|
|
72
73
|
"tv4": "^1.3.0",
|
|
74
|
+
"typescript": "^5.3.0",
|
|
73
75
|
"uuid": "^14.0.0",
|
|
74
76
|
"yaml": "^2.7.0"
|
|
75
77
|
},
|
|
76
78
|
"peerDependencies": {
|
|
77
79
|
"@aws-sdk/client-secrets-manager": ">=3.0.0",
|
|
78
|
-
"@azure/keyvault-secrets": ">=4.0.0",
|
|
79
80
|
"@azure/identity": ">=3.0.0",
|
|
81
|
+
"@azure/keyvault-secrets": ">=4.0.0",
|
|
80
82
|
"node-vault": ">=0.9.0"
|
|
81
83
|
},
|
|
82
84
|
"peerDependenciesMeta": {
|
|
83
|
-
"@aws-sdk/client-secrets-manager": {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"
|
|
85
|
+
"@aws-sdk/client-secrets-manager": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@azure/keyvault-secrets": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"@azure/identity": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"node-vault": {
|
|
95
|
+
"optional": true
|
|
96
|
+
}
|
|
87
97
|
},
|
|
88
98
|
"devDependencies": {
|
|
89
99
|
"@types/lodash": "^4.14.202",
|