@http-forge/core 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.
- package/README.md +25 -4
- package/dist/application/dto/index.d.ts +8 -0
- package/dist/application/dto/request-dtos.d.ts +105 -0
- package/dist/application/dto/response-dtos.d.ts +185 -0
- package/dist/application/events/application-events.d.ts +53 -0
- package/dist/application/events/index.d.ts +6 -0
- package/dist/application/index.d.ts +25 -0
- package/dist/application/mappers/collection-mapper.d.ts +39 -0
- package/dist/application/mappers/execution-result-mapper.d.ts +16 -0
- package/dist/application/mappers/index.d.ts +9 -0
- package/dist/application/mappers/request-mapper.d.ts +29 -0
- package/dist/application/queries/get-request-schema.query.d.ts +32 -0
- package/dist/application/queries/index.d.ts +6 -0
- package/dist/application/use-cases/create-request.use-case.d.ts +23 -0
- package/dist/application/use-cases/delete-request.use-case.d.ts +15 -0
- package/dist/application/use-cases/execute-request.use-case.d.ts +46 -0
- package/dist/application/use-cases/export-collection.use-case.d.ts +22 -0
- package/dist/application/use-cases/get-collection.use-case.d.ts +13 -0
- package/dist/application/use-cases/index.d.ts +12 -0
- package/dist/application/use-cases/list-requests.use-case.d.ts +14 -0
- package/dist/application/use-cases/load-collection.use-case.d.ts +30 -0
- package/dist/application/use-cases/save-collection.use-case.d.ts +25 -0
- package/dist/application/use-cases/update-request.use-case.d.ts +17 -0
- package/dist/container.d.ts +34 -18
- package/dist/di/core-bootstrap.d.ts +25 -0
- package/dist/di/index.d.ts +19 -0
- package/dist/di/platform-adapters.d.ts +66 -0
- package/dist/di/service-container.d.ts +97 -0
- package/dist/di/service-identifiers.d.ts +34 -0
- package/dist/domain/errors/domain-errors.d.ts +52 -0
- package/dist/domain/errors/index.d.ts +4 -0
- package/dist/domain/index.d.ts +24 -0
- package/dist/domain/models/execution.d.ts +88 -0
- package/dist/domain/models/index.d.ts +4 -0
- package/dist/domain/services/domain-events.d.ts +60 -0
- package/dist/domain/services/execution-planner.domain-service.d.ts +40 -0
- package/dist/domain/services/index.d.ts +9 -0
- package/dist/domain/services/schema-inference.domain-service.d.ts +54 -0
- package/dist/domain/value-objects/entity-id.d.ts +26 -0
- package/dist/domain/value-objects/http-method.d.ts +30 -0
- package/dist/domain/value-objects/index.d.ts +9 -0
- package/dist/domain/value-objects/request-url.d.ts +28 -0
- package/dist/index.d.ts +90 -84
- package/dist/index.js +187 -187
- package/dist/index.mjs +187 -187
- package/dist/infrastructure/adapters/index.d.ts +5 -0
- package/dist/infrastructure/adapters/logger.adapter.d.ts +25 -0
- package/dist/infrastructure/adapters/node-file-system.adapter.d.ts +18 -0
- package/dist/{auth → infrastructure/auth}/interfaces.d.ts +1 -1
- package/dist/{auth → infrastructure/auth}/oauth2-token-manager.d.ts +3 -3
- package/dist/{collection → infrastructure/collection}/collection-loader.d.ts +3 -3
- package/dist/{collection → infrastructure/collection}/collection-service.d.ts +2 -2
- package/dist/{collection → infrastructure/collection}/collection-store.d.ts +2 -2
- package/dist/infrastructure/collection/folder-collection-loader.d.ts +45 -0
- package/dist/{collection → infrastructure/collection}/folder-collection-store.d.ts +9 -2
- package/dist/infrastructure/collection/folder-io.d.ts +113 -0
- package/dist/{collection → infrastructure/collection}/json-collection-loader.d.ts +1 -1
- package/dist/{collection → infrastructure/collection}/parser-registry.d.ts +1 -1
- package/dist/{config → infrastructure/config}/config-service.d.ts +1 -1
- package/dist/{cookie → infrastructure/cookie}/cookie-service.d.ts +1 -1
- package/dist/infrastructure/di/complete-bootstrap.d.ts +24 -0
- package/dist/infrastructure/di/index.d.ts +6 -0
- package/dist/infrastructure/di/infrastructure-di-config.d.ts +33 -0
- package/dist/infrastructure/di/simple-event-publisher.d.ts +17 -0
- package/dist/{environment → infrastructure/environment}/environment-config-service.d.ts +6 -3
- package/dist/infrastructure/environment/environment-file-loader.d.ts +42 -0
- package/dist/{environment → infrastructure/environment}/environment-resolver.d.ts +1 -1
- package/dist/{environment → infrastructure/environment}/forge-env.d.ts +1 -1
- package/dist/{environment → infrastructure/environment}/variable-interpolator.d.ts +1 -1
- package/dist/{execution → infrastructure/execution}/collection-request-executor-interfaces.d.ts +1 -1
- package/dist/{execution → infrastructure/execution}/collection-request-executor.d.ts +3 -3
- package/dist/{execution → infrastructure/execution}/request-executor.d.ts +4 -4
- package/dist/{execution → infrastructure/execution}/request-preparer-interfaces.d.ts +2 -2
- package/dist/{execution → infrastructure/execution}/request-preparer.d.ts +5 -5
- package/dist/{graphql → infrastructure/graphql}/graphql-schema-service.d.ts +1 -1
- package/dist/{history → infrastructure/history}/history-interfaces.d.ts +1 -1
- package/dist/{history → infrastructure/history}/request-history.d.ts +1 -1
- package/dist/{http → infrastructure/http}/fetch-http-client.d.ts +2 -2
- package/dist/{http → infrastructure/http}/http-request-service.d.ts +2 -2
- package/dist/infrastructure/http/index.d.ts +4 -0
- package/dist/{http → infrastructure/http}/interceptor-chain.d.ts +1 -1
- package/dist/{http → infrastructure/http}/interfaces.d.ts +1 -1
- package/dist/{http → infrastructure/http}/merge-request-settings.d.ts +1 -1
- package/dist/{http → infrastructure/http}/native-http-client.d.ts +2 -2
- package/dist/infrastructure/http/node-http-executor.adapter.d.ts +25 -0
- package/dist/{http → infrastructure/http}/request-preprocessor.d.ts +1 -1
- package/dist/{import-export → infrastructure/import-export}/import-postman-environment.d.ts +3 -3
- package/dist/{import-export → infrastructure/import-export}/rest-client-export.d.ts +3 -3
- package/dist/infrastructure/index.d.ts +31 -0
- package/dist/{openapi → infrastructure/openapi}/example-generator.d.ts +1 -1
- package/dist/{openapi → infrastructure/openapi}/history-analyzer.d.ts +1 -1
- package/dist/{openapi → infrastructure/openapi}/interfaces.d.ts +2 -2
- package/dist/{openapi → infrastructure/openapi}/openapi-exporter.d.ts +2 -2
- package/dist/{openapi → infrastructure/openapi}/openapi-importer.d.ts +2 -2
- package/dist/{openapi → infrastructure/openapi}/schema-inference-service.d.ts +1 -1
- package/dist/{openapi → infrastructure/openapi}/schema-inferrer.d.ts +1 -1
- package/dist/infrastructure/parsers/collection-parser.adapter.d.ts +32 -0
- package/dist/{parsers → infrastructure/parsers}/http-forge-parser.d.ts +2 -2
- package/dist/infrastructure/parsers/index.d.ts +7 -0
- package/dist/infrastructure/persistence/file-system-history-loader.d.ts +31 -0
- package/dist/infrastructure/persistence/index.d.ts +6 -0
- package/dist/{platform → infrastructure/platform}/node-file-system.d.ts +1 -1
- package/dist/infrastructure/repositories/file-system/fs-collection-repository.d.ts +72 -0
- package/dist/infrastructure/repositories/file-system/fs-environment-file-loader.adapter.d.ts +41 -0
- package/dist/infrastructure/repositories/file-system/fs-environment-repository.d.ts +34 -0
- package/dist/infrastructure/repositories/file-system/fs-request-repository.d.ts +31 -0
- package/dist/infrastructure/repositories/file-system/index.d.ts +7 -0
- package/dist/infrastructure/repositories/in-memory/in-memory-collection-repository.d.ts +18 -0
- package/dist/infrastructure/repositories/in-memory/in-memory-environment-repository.d.ts +25 -0
- package/dist/infrastructure/repositories/in-memory/in-memory-request-repository.d.ts +25 -0
- package/dist/infrastructure/repositories/in-memory/index.d.ts +7 -0
- package/dist/infrastructure/script/index.d.ts +4 -0
- package/dist/{script → infrastructure/script}/interfaces.d.ts +13 -1
- package/dist/{script → infrastructure/script}/request-script-session.d.ts +3 -0
- package/dist/{script → infrastructure/script}/script-factories.d.ts +15 -4
- package/dist/{script → infrastructure/script}/script-utils.d.ts +3 -2
- package/dist/infrastructure/script/vm-script-executor.adapter.d.ts +19 -0
- package/dist/{test-suite → infrastructure/test-suite}/result-storage-service.d.ts +1 -1
- package/dist/{test-suite → infrastructure/test-suite}/result-storage.d.ts +1 -1
- package/dist/{test-suite → infrastructure/test-suite}/test-suite-service.d.ts +1 -1
- package/dist/{test-suite → infrastructure/test-suite}/test-suite-store.d.ts +1 -1
- package/dist/ports/executors/http-executor.interface.d.ts +34 -0
- package/dist/ports/executors/index.d.ts +5 -0
- package/dist/ports/executors/script-executor.interface.d.ts +43 -0
- package/dist/ports/external/file-system.interface.d.ts +44 -0
- package/dist/ports/external/http-client.interface.d.ts +25 -0
- package/dist/ports/external/index.d.ts +7 -0
- package/dist/ports/external/logger.interface.d.ts +17 -0
- package/dist/ports/index.d.ts +17 -0
- package/dist/ports/parsers/collection-parser.interface.d.ts +23 -0
- package/dist/ports/parsers/index.d.ts +4 -0
- package/dist/ports/repositories/collection-repository.interface.d.ts +32 -0
- package/dist/ports/repositories/environment-repository.interface.d.ts +31 -0
- package/dist/ports/repositories/index.d.ts +6 -0
- package/dist/ports/repositories/request-repository.interface.d.ts +32 -0
- package/dist/ports/storage/cache-store.interface.d.ts +26 -0
- package/dist/ports/storage/history-loader.interface.d.ts +37 -0
- package/dist/ports/storage/index.d.ts +5 -0
- package/dist/{collection/collection-service-interfaces.d.ts → types/collection.d.ts} +19 -4
- package/dist/types/environment-config.d.ts +143 -0
- package/dist/types/types.d.ts +27 -7
- package/package.json +2 -2
- package/dist/collection/folder-collection-loader.d.ts +0 -256
- package/dist/collection/interfaces.d.ts +0 -32
- package/dist/parsers/index.d.ts +0 -6
- package/dist/{collection → infrastructure/collection}/collection-loader-factory.d.ts +1 -1
- package/dist/{config → infrastructure/config}/config.interface.d.ts +0 -0
- package/dist/{config → infrastructure/config}/default-config.d.ts +0 -0
- package/dist/{config → infrastructure/config}/index.d.ts +0 -0
- package/dist/{cookie → infrastructure/cookie}/cookie-jar.d.ts +0 -0
- package/dist/{cookie → infrastructure/cookie}/cookie-utils.d.ts +0 -0
- package/dist/{cookie → infrastructure/cookie}/in-memory-cookie-jar.d.ts +1 -1
- package/dist/{cookie → infrastructure/cookie}/interfaces.d.ts +0 -0
- package/dist/{cookie → infrastructure/cookie}/persistent-cookie-jar.d.ts +1 -1
- package/dist/{environment → infrastructure/environment}/interfaces.d.ts +0 -0
- package/dist/{graphql → infrastructure/graphql}/graphql-completion-provider.d.ts +0 -0
- package/dist/{history → infrastructure/history}/request-history-service-interfaces.d.ts +0 -0
- package/dist/{history → infrastructure/history}/request-history-service.d.ts +0 -0
- package/dist/{http → infrastructure/http}/url-builder.d.ts +0 -0
- package/dist/{openapi → infrastructure/openapi}/index.d.ts +0 -0
- package/dist/{openapi → infrastructure/openapi}/ref-resolver.d.ts +0 -0
- package/dist/{openapi → infrastructure/openapi}/script-analyzer.d.ts +0 -0
- package/dist/{platform → infrastructure/platform}/data-file-parser.d.ts +0 -0
- package/dist/{script → infrastructure/script}/module-loader.d.ts +0 -0
- package/dist/{script → infrastructure/script}/script-executor.d.ts +1 -1
- /package/dist/{test-suite → infrastructure/test-suite}/index.d.ts +0 -0
- /package/dist/{test-suite → infrastructure/test-suite}/interfaces.d.ts +0 -0
- /package/dist/{test-suite → infrastructure/test-suite}/statistics-service.d.ts +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Events - Events published by domain to application layer
|
|
3
|
+
*
|
|
4
|
+
* Domain events decouple domain logic from side effects
|
|
5
|
+
*/
|
|
6
|
+
import { IExecutionResult } from '../models/execution';
|
|
7
|
+
/**
|
|
8
|
+
* Base domain event
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class DomainEvent {
|
|
11
|
+
readonly aggregateId: string;
|
|
12
|
+
readonly eventType: string;
|
|
13
|
+
readonly occurredAt: Date;
|
|
14
|
+
constructor(aggregateId: string, eventType: string);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* RequestExecuted - Published when a request is successfully executed
|
|
18
|
+
*/
|
|
19
|
+
export declare class RequestExecutedEvent extends DomainEvent {
|
|
20
|
+
readonly collectionId: string;
|
|
21
|
+
readonly result: IExecutionResult;
|
|
22
|
+
constructor(requestId: string, collectionId: string, result: IExecutionResult);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* RequestExecutionFailed - Published when request execution fails
|
|
26
|
+
*/
|
|
27
|
+
export declare class RequestExecutionFailedEvent extends DomainEvent {
|
|
28
|
+
readonly collectionId: string;
|
|
29
|
+
readonly error: Error;
|
|
30
|
+
readonly stage: 'preparation' | 'execution' | 'script';
|
|
31
|
+
constructor(requestId: string, collectionId: string, error: Error, stage: 'preparation' | 'execution' | 'script');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* VariableUpdated - Published when execution changes variables
|
|
35
|
+
*/
|
|
36
|
+
export declare class VariableUpdatedEvent extends DomainEvent {
|
|
37
|
+
readonly variables: Record<string, any>;
|
|
38
|
+
readonly changes: Record<string, any>;
|
|
39
|
+
constructor(variables: Record<string, any>, changes: Record<string, any>);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* CookieUpdated - Published when HTTP response sets cookies
|
|
43
|
+
*/
|
|
44
|
+
export declare class CookieUpdatedEvent extends DomainEvent {
|
|
45
|
+
readonly cookies: Record<string, string>;
|
|
46
|
+
constructor(cookies: Record<string, string>);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Domain event publisher abstraction
|
|
50
|
+
*/
|
|
51
|
+
export interface IDomainEventPublisher {
|
|
52
|
+
/**
|
|
53
|
+
* Publish domain event
|
|
54
|
+
*/
|
|
55
|
+
publish(event: DomainEvent): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Subscribe to events
|
|
58
|
+
*/
|
|
59
|
+
subscribe(eventType: string, handler: (event: DomainEvent) => Promise<void>): void;
|
|
60
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Execution Planner Domain Service - Pure business logic for execution planning
|
|
3
|
+
*
|
|
4
|
+
* No external dependencies - only domain models and exceptions
|
|
5
|
+
* All logic is deterministic and testable without mocks
|
|
6
|
+
*/
|
|
7
|
+
import { UnifiedRequest } from '../../types/types';
|
|
8
|
+
import { IExecutionContext, IExecutionPlan } from '../models/execution';
|
|
9
|
+
/**
|
|
10
|
+
* Domain service for planning HTTP request execution
|
|
11
|
+
* Encapsulates rules for:
|
|
12
|
+
* - Request validation
|
|
13
|
+
* - Script preparation
|
|
14
|
+
* - Variable interpolation
|
|
15
|
+
*/
|
|
16
|
+
export declare class ExecutionPlannerDomainService {
|
|
17
|
+
/**
|
|
18
|
+
* Validate request before execution
|
|
19
|
+
*/
|
|
20
|
+
validateRequest(request: UnifiedRequest): void;
|
|
21
|
+
/**
|
|
22
|
+
* Create execution plan from request and context
|
|
23
|
+
*
|
|
24
|
+
* Pure logic - no side effects
|
|
25
|
+
*/
|
|
26
|
+
createExecutionPlan(request: UnifiedRequest, context: IExecutionContext): IExecutionPlan;
|
|
27
|
+
/**
|
|
28
|
+
* Check if request requires script execution
|
|
29
|
+
*/
|
|
30
|
+
hasScripts(request: UnifiedRequest): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check if request requires variable interpolation
|
|
33
|
+
*/
|
|
34
|
+
needsVariableInterpolation(request: UnifiedRequest): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Build execution context from request and environment
|
|
37
|
+
*/
|
|
38
|
+
buildExecutionContext(requestId: string, collectionId: string, variables: Record<string, any>, environment: Record<string, any>, cookies?: Record<string, string>): IExecutionContext;
|
|
39
|
+
private kvArrayToRecord;
|
|
40
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Services - Pure business logic
|
|
3
|
+
*
|
|
4
|
+
* Services contain only domain rules, no infrastructure concerns
|
|
5
|
+
* Zero external dependencies - fully testable without mocks
|
|
6
|
+
*/
|
|
7
|
+
export * from './execution-planner.domain-service';
|
|
8
|
+
export * from './schema-inference.domain-service';
|
|
9
|
+
export * from './domain-events';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema Inference Domain Service - Pure business logic for schema analysis
|
|
3
|
+
*
|
|
4
|
+
* Merges information from multiple sources to infer response schema
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Response schema representation
|
|
8
|
+
*/
|
|
9
|
+
export interface ResponseSchema {
|
|
10
|
+
type?: string;
|
|
11
|
+
properties?: Record<string, unknown>;
|
|
12
|
+
required?: string[];
|
|
13
|
+
description?: string;
|
|
14
|
+
example?: unknown;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Script hints extracted from post-response script
|
|
18
|
+
*/
|
|
19
|
+
export interface ScriptHints {
|
|
20
|
+
propertyAccess: string[];
|
|
21
|
+
assertions: string[];
|
|
22
|
+
dataExtracted: string[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Schema validation result
|
|
26
|
+
*/
|
|
27
|
+
export interface ValidationResult {
|
|
28
|
+
valid: boolean;
|
|
29
|
+
errors: string[];
|
|
30
|
+
warnings: string[];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Domain service for schema inference
|
|
34
|
+
* Pure logic for merging and validating schemas
|
|
35
|
+
*/
|
|
36
|
+
export declare class SchemaInferenceDomainService {
|
|
37
|
+
/**
|
|
38
|
+
* Merge multiple schemas into a final schema
|
|
39
|
+
* Priority: user-edited > inferred from history > script hints
|
|
40
|
+
*/
|
|
41
|
+
mergeResponseSchemas(userEdited: ResponseSchema | null, inferredFromHistory: ResponseSchema | null, scriptHints: ScriptHints | null): ResponseSchema;
|
|
42
|
+
/**
|
|
43
|
+
* Validate schema is well-formed
|
|
44
|
+
*/
|
|
45
|
+
validateSchema(schema: ResponseSchema): ValidationResult;
|
|
46
|
+
/**
|
|
47
|
+
* Extract property hints from script accesses
|
|
48
|
+
*/
|
|
49
|
+
private buildPropertiesFromHints;
|
|
50
|
+
/**
|
|
51
|
+
* Merge two schemas using set union logic
|
|
52
|
+
*/
|
|
53
|
+
private mergeSchemas;
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EntityId Value Object
|
|
3
|
+
*
|
|
4
|
+
* Base class for typed entity identifiers (RequestId, CollectionId).
|
|
5
|
+
* Prevents accidentally passing a collection ID where a request ID is expected.
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class EntityId {
|
|
8
|
+
readonly value: string;
|
|
9
|
+
constructor(value: string);
|
|
10
|
+
equals(other: EntityId): boolean;
|
|
11
|
+
toString(): string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* RequestId — uniquely identifies a request within a collection
|
|
15
|
+
*/
|
|
16
|
+
export declare class RequestId extends EntityId {
|
|
17
|
+
static create(id: string): RequestId;
|
|
18
|
+
static generate(): RequestId;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* CollectionId — uniquely identifies a collection
|
|
22
|
+
*/
|
|
23
|
+
export declare class CollectionId extends EntityId {
|
|
24
|
+
static create(id: string): CollectionId;
|
|
25
|
+
static generate(): CollectionId;
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HttpMethod Value Object
|
|
3
|
+
*
|
|
4
|
+
* Ensures only valid HTTP methods are used throughout the domain.
|
|
5
|
+
* Immutable — validated at construction time.
|
|
6
|
+
*/
|
|
7
|
+
declare const VALID_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "TRACE", "CONNECT"];
|
|
8
|
+
export type HttpMethodValue = typeof VALID_METHODS[number];
|
|
9
|
+
export declare class HttpMethod {
|
|
10
|
+
readonly value: HttpMethodValue;
|
|
11
|
+
private constructor();
|
|
12
|
+
/**
|
|
13
|
+
* Create an HttpMethod from a string.
|
|
14
|
+
* Normalizes to uppercase and validates.
|
|
15
|
+
*/
|
|
16
|
+
static create(method: string): HttpMethod;
|
|
17
|
+
/**
|
|
18
|
+
* Create without validation (for trusted internal data).
|
|
19
|
+
*/
|
|
20
|
+
static fromTrusted(method: HttpMethodValue): HttpMethod;
|
|
21
|
+
equals(other: HttpMethod): boolean;
|
|
22
|
+
toString(): string;
|
|
23
|
+
/** Whether this method typically has a request body */
|
|
24
|
+
get hasBody(): boolean;
|
|
25
|
+
/** Whether this method is considered safe (no side effects) */
|
|
26
|
+
get isSafe(): boolean;
|
|
27
|
+
/** Whether this method is idempotent */
|
|
28
|
+
get isIdempotent(): boolean;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domain Value Objects
|
|
3
|
+
*
|
|
4
|
+
* Immutable, validated building blocks for the domain model.
|
|
5
|
+
* These enforce business invariants at construction time.
|
|
6
|
+
*/
|
|
7
|
+
export { HttpMethod, type HttpMethodValue } from './http-method';
|
|
8
|
+
export { RequestUrl } from './request-url';
|
|
9
|
+
export { EntityId, RequestId, CollectionId } from './entity-id';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RequestUrl Value Object
|
|
3
|
+
*
|
|
4
|
+
* Validates and normalizes request URLs.
|
|
5
|
+
* Supports both absolute URLs and URL templates with variables (e.g. {{baseUrl}}/users).
|
|
6
|
+
*/
|
|
7
|
+
export declare class RequestUrl {
|
|
8
|
+
readonly value: string;
|
|
9
|
+
private constructor();
|
|
10
|
+
/**
|
|
11
|
+
* Create a RequestUrl from a string.
|
|
12
|
+
* Allows variable templates like {{baseUrl}}/path.
|
|
13
|
+
*/
|
|
14
|
+
static create(url: string): RequestUrl;
|
|
15
|
+
/**
|
|
16
|
+
* Create without validation (for trusted internal data).
|
|
17
|
+
*/
|
|
18
|
+
static fromTrusted(url: string): RequestUrl;
|
|
19
|
+
/** Whether the URL contains template variables */
|
|
20
|
+
get hasVariables(): boolean;
|
|
21
|
+
/** Extract variable names from the URL template */
|
|
22
|
+
get variableNames(): string[];
|
|
23
|
+
/** Get the protocol if present */
|
|
24
|
+
get protocol(): string | undefined;
|
|
25
|
+
equals(other: RequestUrl): boolean;
|
|
26
|
+
toString(): string;
|
|
27
|
+
private static isValidUrl;
|
|
28
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,91 +18,97 @@
|
|
|
18
18
|
*/
|
|
19
19
|
export { ForgeContainer } from './container';
|
|
20
20
|
export type { ForgeContainerOptions, StorageFormat } from './container';
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export { ServiceContainer, ServiceIdentifiers, getServiceContainer, registerCoreServices } from './di';
|
|
22
|
+
export type { PlatformAdapters, ServiceIdentifier } from './di';
|
|
23
23
|
export * from './types/console-service';
|
|
24
|
-
export * from './
|
|
25
|
-
export
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export type {
|
|
41
|
-
export
|
|
42
|
-
export {
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export {
|
|
46
|
-
export
|
|
47
|
-
export {
|
|
48
|
-
export
|
|
49
|
-
export {
|
|
50
|
-
export type {
|
|
51
|
-
export
|
|
52
|
-
export {
|
|
53
|
-
export
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export {
|
|
57
|
-
export {
|
|
58
|
-
export {
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export {
|
|
62
|
-
export {
|
|
63
|
-
export
|
|
64
|
-
export {
|
|
65
|
-
export
|
|
66
|
-
export {
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
70
|
-
export {
|
|
71
|
-
export {
|
|
72
|
-
export
|
|
73
|
-
export {
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export {
|
|
77
|
-
export {
|
|
78
|
-
export
|
|
79
|
-
export
|
|
80
|
-
export
|
|
81
|
-
export
|
|
82
|
-
export {
|
|
83
|
-
export type {
|
|
84
|
-
export * from './
|
|
85
|
-
export {
|
|
86
|
-
export
|
|
87
|
-
export {
|
|
88
|
-
export
|
|
89
|
-
export {
|
|
90
|
-
export
|
|
91
|
-
export {
|
|
92
|
-
export
|
|
93
|
-
export {
|
|
94
|
-
export {
|
|
95
|
-
export {
|
|
96
|
-
export type {
|
|
97
|
-
export {
|
|
98
|
-
export type {
|
|
99
|
-
export {
|
|
100
|
-
export {
|
|
101
|
-
export
|
|
102
|
-
export {
|
|
103
|
-
export {
|
|
104
|
-
export {
|
|
105
|
-
export
|
|
24
|
+
export * from './types/platform';
|
|
25
|
+
export * from './types/types';
|
|
26
|
+
export { CookieJar } from './infrastructure/cookie/cookie-jar';
|
|
27
|
+
export { CookieService } from './infrastructure/cookie/cookie-service';
|
|
28
|
+
export { CookieUtils } from './infrastructure/cookie/cookie-utils';
|
|
29
|
+
export { InMemoryCookieJar } from './infrastructure/cookie/in-memory-cookie-jar';
|
|
30
|
+
export * from './infrastructure/cookie/interfaces';
|
|
31
|
+
export { PersistentCookieJar } from './infrastructure/cookie/persistent-cookie-jar';
|
|
32
|
+
export { FetchHttpClient } from './infrastructure/http/fetch-http-client';
|
|
33
|
+
export { HttpRequestService } from './infrastructure/http/http-request-service';
|
|
34
|
+
export { InterceptorChain, LoggingRequestInterceptor, RetryErrorInterceptor, TimingResponseInterceptor } from './infrastructure/http/interceptor-chain';
|
|
35
|
+
export type { IErrorInterceptor, IInterceptorChain, IRequestInterceptor, IResponseInterceptor, InterceptorContext } from './infrastructure/http/interceptor-chain';
|
|
36
|
+
export type { IHttpRequestService } from './infrastructure/http/interfaces';
|
|
37
|
+
export { mergeRequestSettings } from './infrastructure/http/merge-request-settings';
|
|
38
|
+
export { DEFAULT_REQUEST_SETTINGS, NodeHttpClient } from './infrastructure/http/native-http-client';
|
|
39
|
+
export { RequestPreprocessor } from './infrastructure/http/request-preprocessor';
|
|
40
|
+
export type { IRequestPreprocessor } from './infrastructure/http/request-preprocessor';
|
|
41
|
+
export { UrlBuilder } from './infrastructure/http/url-builder';
|
|
42
|
+
export type { IUrlBuilder } from './infrastructure/http/url-builder';
|
|
43
|
+
export * from './infrastructure/script/interfaces';
|
|
44
|
+
export { ModuleLoader, createLodashShim, createModuleLoader, createMomentShim } from './infrastructure/script/module-loader';
|
|
45
|
+
export type { ModuleLoaderOptions } from './infrastructure/script/module-loader';
|
|
46
|
+
export { RequestScriptSession } from './infrastructure/script/request-script-session';
|
|
47
|
+
export type { SessionDependencies } from './infrastructure/script/request-script-session';
|
|
48
|
+
export { ScriptExecutor } from './infrastructure/script/script-executor';
|
|
49
|
+
export { createExpectChain, createResponseObject } from './infrastructure/script/script-factories';
|
|
50
|
+
export type { ExpectChain, ResponseAssertions, ScriptResponse } from './infrastructure/script/script-factories';
|
|
51
|
+
export { concatenateScripts, createScriptConsole, createTestFunction, formatConsoleOutput, hasChanged, normalizeHeaders } from './infrastructure/script/script-utils';
|
|
52
|
+
export type { ConsoleMessage } from './infrastructure/script/script-utils';
|
|
53
|
+
export { CollectionLoader } from './infrastructure/collection/collection-loader';
|
|
54
|
+
export type { LoadOptions } from './infrastructure/collection/collection-loader';
|
|
55
|
+
export { CollectionLoaderFactory } from './infrastructure/collection/collection-loader-factory';
|
|
56
|
+
export { CollectionService } from './infrastructure/collection/collection-service';
|
|
57
|
+
export { FolderCollectionLoader } from './infrastructure/collection/folder-collection-loader';
|
|
58
|
+
export { FolderCollectionStore } from './infrastructure/collection/folder-collection-store';
|
|
59
|
+
export * from './infrastructure/collection/folder-io';
|
|
60
|
+
export { generateSlug } from './infrastructure/collection/folder-io';
|
|
61
|
+
export { ParserRegistry } from './infrastructure/collection/parser-registry';
|
|
62
|
+
export type { Collection, ICollectionService } from './types/collection';
|
|
63
|
+
export { JsonCollectionLoader } from './infrastructure/collection/json-collection-loader';
|
|
64
|
+
export { EnvironmentConfigService } from './infrastructure/environment/environment-config-service';
|
|
65
|
+
export { isSystemEnvironmentFile, loadEnvironmentsFromFolder } from './infrastructure/environment/environment-file-loader';
|
|
66
|
+
export type { EnvironmentEntry, EnvironmentFolderData } from './infrastructure/environment/environment-file-loader';
|
|
67
|
+
export { EnvironmentResolver } from './infrastructure/environment/environment-resolver';
|
|
68
|
+
export type { Environment, EnvironmentStoreConfig } from './infrastructure/environment/environment-resolver';
|
|
69
|
+
export { ForgeEnv } from './infrastructure/environment/forge-env';
|
|
70
|
+
export type { IForgeEnv } from './infrastructure/environment/forge-env';
|
|
71
|
+
export type { IEnvironmentConfigService } from './types/environment-config';
|
|
72
|
+
export { VariableInterpolator, VariableResolver, createVariableResolver } from './infrastructure/environment/variable-interpolator';
|
|
73
|
+
export type { VariableResolverConfig } from './infrastructure/environment/variable-interpolator';
|
|
74
|
+
export { CollectionRequestExecutor } from './infrastructure/execution/collection-request-executor';
|
|
75
|
+
export * from './infrastructure/execution/collection-request-executor-interfaces';
|
|
76
|
+
export { RequestExecutor } from './infrastructure/execution/request-executor';
|
|
77
|
+
export type { ExecuteOptions, ExecuteResult } from './infrastructure/execution/request-executor';
|
|
78
|
+
export { RequestPreparer } from './infrastructure/execution/request-preparer';
|
|
79
|
+
export * from './infrastructure/execution/request-preparer-interfaces';
|
|
80
|
+
export * from './infrastructure/history/history-interfaces';
|
|
81
|
+
export { RequestHistoryStore } from './infrastructure/history/request-history';
|
|
82
|
+
export { RequestHistoryService } from './infrastructure/history/request-history-service';
|
|
83
|
+
export type { IRequestHistoryService, IResponseStorage } from './infrastructure/history/request-history-service-interfaces';
|
|
84
|
+
export * from './infrastructure/auth/interfaces';
|
|
85
|
+
export { OAuth2TokenManager } from './infrastructure/auth/oauth2-token-manager';
|
|
86
|
+
export { getCompletions, parseQueryContext } from './infrastructure/graphql/graphql-completion-provider';
|
|
87
|
+
export type { CompletionItem, ContextType, QueryContext } from './infrastructure/graphql/graphql-completion-provider';
|
|
88
|
+
export { GraphQLSchemaService } from './infrastructure/graphql/graphql-schema-service';
|
|
89
|
+
export type { GraphQLDirective, GraphQLField, GraphQLOperation, GraphQLSchema, GraphQLType, IGraphQLSchemaService } from './infrastructure/graphql/graphql-schema-service';
|
|
90
|
+
export { ExampleGenerator, HistoryAnalyzer, OpenApiExporter, OpenApiImporter, RefResolver, SchemaInferenceService, SchemaInferrer, ScriptAnalyzer } from './infrastructure/openapi';
|
|
91
|
+
export type { OpenApiExportOptions, OpenApiImportOptions, ScriptAnalysisResult } from './infrastructure/openapi';
|
|
92
|
+
export * from './infrastructure/openapi/interfaces';
|
|
93
|
+
export { CONFIG_FILES, ConfigService, DEFAULT_CONFIG, ROOT_DIRECTORIES } from './infrastructure/config';
|
|
94
|
+
export type { EnvironmentsConfig, HttpForgeConfig, IConfigService, ProxyConfig, RequestConfig, RestClientExportConfig, RunnerConfig, ScriptsConfig, StorageConfig } from './infrastructure/config';
|
|
95
|
+
export { DEFAULT_SUITE_CONFIG } from './infrastructure/test-suite/interfaces';
|
|
96
|
+
export type { ErrorSummary, IStatisticsService, ITestSuiteService, RequestStatistics, RunStatistics, RunSummary, SuiteConfig, SuiteRequest, TestSuite } from './infrastructure/test-suite/interfaces';
|
|
97
|
+
export { HTTP_METHOD_MAP, HTTP_METHOD_REVERSE, buildResultFileName, expandSummary } from './infrastructure/test-suite/result-storage';
|
|
98
|
+
export type { FullResultDetails, IResultStorageService, IndexPage, RecentError, RequestStats, ResultSummary, RunConfig, RunManifest, RunStats } from './infrastructure/test-suite/result-storage';
|
|
99
|
+
export { ResultStorageService } from './infrastructure/test-suite/result-storage-service';
|
|
100
|
+
export { StatisticsService } from './infrastructure/test-suite/statistics-service';
|
|
101
|
+
export { TestSuiteService } from './infrastructure/test-suite/test-suite-service';
|
|
102
|
+
export type { SuitesChangedCallback } from './infrastructure/test-suite/test-suite-service';
|
|
103
|
+
export { TestSuiteStore } from './infrastructure/test-suite/test-suite-store';
|
|
104
|
+
export type { ITestSuiteStore, SuiteRequestEntry } from './infrastructure/test-suite/test-suite-store';
|
|
105
|
+
export { HttpForgeParser } from './infrastructure/parsers';
|
|
106
|
+
export { parsePostmanEnvironment, parsePostmanEnvironmentFile } from './infrastructure/import-export/import-postman-environment';
|
|
107
|
+
export type { ImportedEnvironment } from './infrastructure/import-export/import-postman-environment';
|
|
108
|
+
export { exportCollectionToRestClient, getRestClientExportFolder, writeEnvFile, writeFolderItems, writeScriptFile } from './infrastructure/import-export/rest-client-export';
|
|
109
|
+
export { DataFileParser } from './infrastructure/platform/data-file-parser';
|
|
110
|
+
export type { IDataFileParser } from './infrastructure/platform/data-file-parser';
|
|
111
|
+
export { NodeFileSystem } from './infrastructure/platform/node-file-system';
|
|
106
112
|
export { DYNAMIC_VARIABLES, augmentWithDynamicVars, resolveDynamicVariable, resolveDynamicVariablesInString } from './utils/dynamic-variables';
|
|
107
113
|
export { evaluateExpression, isExpression } from './utils/expression-evaluator';
|
|
108
114
|
export { applyFilterChain, parseFilterChain } from './utils/filter-engine';
|