@http-forge/core 0.2.1 → 0.2.3

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.
Files changed (165) hide show
  1. package/dist/application/dto/index.d.ts +8 -0
  2. package/dist/application/dto/request-dtos.d.ts +105 -0
  3. package/dist/application/dto/response-dtos.d.ts +185 -0
  4. package/dist/application/events/application-events.d.ts +53 -0
  5. package/dist/application/events/index.d.ts +6 -0
  6. package/dist/application/index.d.ts +25 -0
  7. package/dist/application/mappers/collection-mapper.d.ts +39 -0
  8. package/dist/application/mappers/execution-result-mapper.d.ts +16 -0
  9. package/dist/application/mappers/index.d.ts +9 -0
  10. package/dist/application/mappers/request-mapper.d.ts +29 -0
  11. package/dist/application/queries/get-request-schema.query.d.ts +32 -0
  12. package/dist/application/queries/index.d.ts +6 -0
  13. package/dist/application/use-cases/create-request.use-case.d.ts +23 -0
  14. package/dist/application/use-cases/delete-request.use-case.d.ts +15 -0
  15. package/dist/application/use-cases/execute-request.use-case.d.ts +46 -0
  16. package/dist/application/use-cases/export-collection.use-case.d.ts +22 -0
  17. package/dist/application/use-cases/get-collection.use-case.d.ts +13 -0
  18. package/dist/application/use-cases/index.d.ts +12 -0
  19. package/dist/application/use-cases/list-requests.use-case.d.ts +14 -0
  20. package/dist/application/use-cases/load-collection.use-case.d.ts +30 -0
  21. package/dist/application/use-cases/save-collection.use-case.d.ts +25 -0
  22. package/dist/application/use-cases/update-request.use-case.d.ts +17 -0
  23. package/dist/container.d.ts +30 -13
  24. package/dist/di/index.d.ts +8 -0
  25. package/dist/di/platform-adapters.d.ts +14 -1
  26. package/dist/di/service-container.d.ts +12 -12
  27. package/dist/di/service-identifiers.d.ts +1 -1
  28. package/dist/domain/errors/domain-errors.d.ts +52 -0
  29. package/dist/domain/errors/index.d.ts +4 -0
  30. package/dist/domain/index.d.ts +24 -0
  31. package/dist/domain/models/execution.d.ts +88 -0
  32. package/dist/domain/models/index.d.ts +4 -0
  33. package/dist/domain/services/domain-events.d.ts +60 -0
  34. package/dist/domain/services/execution-planner.domain-service.d.ts +40 -0
  35. package/dist/domain/services/index.d.ts +9 -0
  36. package/dist/domain/services/schema-inference.domain-service.d.ts +54 -0
  37. package/dist/domain/value-objects/entity-id.d.ts +26 -0
  38. package/dist/domain/value-objects/http-method.d.ts +30 -0
  39. package/dist/domain/value-objects/index.d.ts +9 -0
  40. package/dist/domain/value-objects/request-url.d.ts +28 -0
  41. package/dist/index.d.ts +86 -86
  42. package/dist/index.js +111 -111
  43. package/dist/index.mjs +117 -117
  44. package/dist/infrastructure/adapters/index.d.ts +5 -0
  45. package/dist/infrastructure/adapters/logger.adapter.d.ts +25 -0
  46. package/dist/infrastructure/adapters/node-file-system.adapter.d.ts +18 -0
  47. package/dist/{auth → infrastructure/auth}/interfaces.d.ts +1 -1
  48. package/dist/{auth → infrastructure/auth}/oauth2-token-manager.d.ts +3 -3
  49. package/dist/{collection → infrastructure/collection}/collection-loader.d.ts +3 -3
  50. package/dist/{collection → infrastructure/collection}/collection-service.d.ts +2 -2
  51. package/dist/{collection → infrastructure/collection}/collection-store.d.ts +2 -2
  52. package/dist/{collection → infrastructure/collection}/folder-collection-loader.d.ts +2 -2
  53. package/dist/{collection → infrastructure/collection}/folder-collection-store.d.ts +1 -1
  54. package/dist/{collection → infrastructure/collection}/folder-io.d.ts +1 -1
  55. package/dist/{collection → infrastructure/collection}/json-collection-loader.d.ts +1 -1
  56. package/dist/{collection → infrastructure/collection}/parser-registry.d.ts +1 -1
  57. package/dist/{config → infrastructure/config}/config-service.d.ts +1 -1
  58. package/dist/{cookie → infrastructure/cookie}/cookie-service.d.ts +1 -1
  59. package/dist/infrastructure/di/complete-bootstrap.d.ts +24 -0
  60. package/dist/infrastructure/di/index.d.ts +6 -0
  61. package/dist/infrastructure/di/infrastructure-di-config.d.ts +33 -0
  62. package/dist/infrastructure/di/simple-event-publisher.d.ts +17 -0
  63. package/dist/{environment → infrastructure/environment}/environment-config-service.d.ts +2 -2
  64. package/dist/{environment → infrastructure/environment}/environment-resolver.d.ts +1 -1
  65. package/dist/{environment → infrastructure/environment}/forge-env.d.ts +1 -1
  66. package/dist/{environment → infrastructure/environment}/variable-interpolator.d.ts +1 -1
  67. package/dist/{execution → infrastructure/execution}/collection-request-executor-interfaces.d.ts +1 -1
  68. package/dist/{execution → infrastructure/execution}/collection-request-executor.d.ts +2 -2
  69. package/dist/{execution → infrastructure/execution}/request-executor.d.ts +2 -2
  70. package/dist/{execution → infrastructure/execution}/request-preparer-interfaces.d.ts +2 -2
  71. package/dist/{execution → infrastructure/execution}/request-preparer.d.ts +3 -3
  72. package/dist/{graphql → infrastructure/graphql}/graphql-schema-service.d.ts +1 -1
  73. package/dist/{history → infrastructure/history}/history-interfaces.d.ts +1 -1
  74. package/dist/{history → infrastructure/history}/request-history.d.ts +1 -1
  75. package/dist/{http → infrastructure/http}/fetch-http-client.d.ts +2 -2
  76. package/dist/{http → infrastructure/http}/http-request-service.d.ts +2 -2
  77. package/dist/infrastructure/http/index.d.ts +4 -0
  78. package/dist/{http → infrastructure/http}/interceptor-chain.d.ts +1 -1
  79. package/dist/{http → infrastructure/http}/interfaces.d.ts +1 -1
  80. package/dist/{http → infrastructure/http}/merge-request-settings.d.ts +1 -1
  81. package/dist/{http → infrastructure/http}/native-http-client.d.ts +2 -2
  82. package/dist/infrastructure/http/node-http-executor.adapter.d.ts +25 -0
  83. package/dist/{http → infrastructure/http}/request-preprocessor.d.ts +1 -1
  84. package/dist/{import-export → infrastructure/import-export}/import-postman-environment.d.ts +3 -3
  85. package/dist/{import-export → infrastructure/import-export}/rest-client-export.d.ts +3 -3
  86. package/dist/infrastructure/index.d.ts +31 -0
  87. package/dist/{openapi → infrastructure/openapi}/example-generator.d.ts +1 -1
  88. package/dist/{openapi → infrastructure/openapi}/history-analyzer.d.ts +1 -1
  89. package/dist/{openapi → infrastructure/openapi}/interfaces.d.ts +2 -2
  90. package/dist/{openapi → infrastructure/openapi}/openapi-exporter.d.ts +2 -2
  91. package/dist/{openapi → infrastructure/openapi}/openapi-importer.d.ts +2 -2
  92. package/dist/{openapi → infrastructure/openapi}/schema-inference-service.d.ts +1 -1
  93. package/dist/{openapi → infrastructure/openapi}/schema-inferrer.d.ts +1 -1
  94. package/dist/infrastructure/parsers/collection-parser.adapter.d.ts +32 -0
  95. package/dist/{parsers → infrastructure/parsers}/http-forge-parser.d.ts +2 -2
  96. package/dist/infrastructure/parsers/index.d.ts +7 -0
  97. package/dist/infrastructure/persistence/file-system-history-loader.d.ts +31 -0
  98. package/dist/infrastructure/persistence/index.d.ts +6 -0
  99. package/dist/{platform → infrastructure/platform}/node-file-system.d.ts +1 -1
  100. package/dist/infrastructure/repositories/file-system/fs-collection-repository.d.ts +72 -0
  101. package/dist/infrastructure/repositories/file-system/fs-environment-file-loader.adapter.d.ts +41 -0
  102. package/dist/infrastructure/repositories/file-system/fs-environment-repository.d.ts +34 -0
  103. package/dist/infrastructure/repositories/file-system/fs-request-repository.d.ts +31 -0
  104. package/dist/infrastructure/repositories/file-system/index.d.ts +7 -0
  105. package/dist/infrastructure/repositories/in-memory/in-memory-collection-repository.d.ts +18 -0
  106. package/dist/infrastructure/repositories/in-memory/in-memory-environment-repository.d.ts +25 -0
  107. package/dist/infrastructure/repositories/in-memory/in-memory-request-repository.d.ts +25 -0
  108. package/dist/infrastructure/repositories/in-memory/index.d.ts +7 -0
  109. package/dist/infrastructure/script/index.d.ts +4 -0
  110. package/dist/{script → infrastructure/script}/interfaces.d.ts +1 -1
  111. package/dist/{script → infrastructure/script}/script-utils.d.ts +1 -1
  112. package/dist/infrastructure/script/vm-script-executor.adapter.d.ts +19 -0
  113. package/dist/{test-suite → infrastructure/test-suite}/result-storage-service.d.ts +1 -1
  114. package/dist/{test-suite → infrastructure/test-suite}/result-storage.d.ts +1 -1
  115. package/dist/{test-suite → infrastructure/test-suite}/test-suite-service.d.ts +1 -1
  116. package/dist/{test-suite → infrastructure/test-suite}/test-suite-store.d.ts +1 -1
  117. package/dist/ports/executors/http-executor.interface.d.ts +34 -0
  118. package/dist/ports/executors/index.d.ts +5 -0
  119. package/dist/ports/executors/script-executor.interface.d.ts +43 -0
  120. package/dist/ports/external/file-system.interface.d.ts +44 -0
  121. package/dist/ports/external/http-client.interface.d.ts +25 -0
  122. package/dist/ports/external/index.d.ts +7 -0
  123. package/dist/ports/external/logger.interface.d.ts +17 -0
  124. package/dist/ports/index.d.ts +17 -0
  125. package/dist/ports/parsers/collection-parser.interface.d.ts +23 -0
  126. package/dist/ports/parsers/index.d.ts +4 -0
  127. package/dist/ports/repositories/collection-repository.interface.d.ts +32 -0
  128. package/dist/ports/repositories/environment-repository.interface.d.ts +31 -0
  129. package/dist/ports/repositories/index.d.ts +6 -0
  130. package/dist/ports/repositories/request-repository.interface.d.ts +32 -0
  131. package/dist/ports/storage/cache-store.interface.d.ts +26 -0
  132. package/dist/ports/storage/history-loader.interface.d.ts +37 -0
  133. package/dist/ports/storage/index.d.ts +5 -0
  134. package/dist/{collection/collection-service-interfaces.d.ts → types/collection.d.ts} +19 -4
  135. package/dist/types/environment-config.d.ts +143 -0
  136. package/dist/types/types.d.ts +20 -7
  137. package/package.json +1 -1
  138. package/dist/collection/interfaces.d.ts +0 -32
  139. package/dist/parsers/index.d.ts +0 -6
  140. /package/dist/{collection → infrastructure/collection}/collection-loader-factory.d.ts +0 -0
  141. /package/dist/{config → infrastructure/config}/config.interface.d.ts +0 -0
  142. /package/dist/{config → infrastructure/config}/default-config.d.ts +0 -0
  143. /package/dist/{config → infrastructure/config}/index.d.ts +0 -0
  144. /package/dist/{cookie → infrastructure/cookie}/cookie-jar.d.ts +0 -0
  145. /package/dist/{cookie → infrastructure/cookie}/cookie-utils.d.ts +0 -0
  146. /package/dist/{cookie → infrastructure/cookie}/in-memory-cookie-jar.d.ts +0 -0
  147. /package/dist/{cookie → infrastructure/cookie}/interfaces.d.ts +0 -0
  148. /package/dist/{cookie → infrastructure/cookie}/persistent-cookie-jar.d.ts +0 -0
  149. /package/dist/{environment → infrastructure/environment}/environment-file-loader.d.ts +0 -0
  150. /package/dist/{environment → infrastructure/environment}/interfaces.d.ts +0 -0
  151. /package/dist/{graphql → infrastructure/graphql}/graphql-completion-provider.d.ts +0 -0
  152. /package/dist/{history → infrastructure/history}/request-history-service-interfaces.d.ts +0 -0
  153. /package/dist/{history → infrastructure/history}/request-history-service.d.ts +0 -0
  154. /package/dist/{http → infrastructure/http}/url-builder.d.ts +0 -0
  155. /package/dist/{openapi → infrastructure/openapi}/index.d.ts +0 -0
  156. /package/dist/{openapi → infrastructure/openapi}/ref-resolver.d.ts +0 -0
  157. /package/dist/{openapi → infrastructure/openapi}/script-analyzer.d.ts +0 -0
  158. /package/dist/{platform → infrastructure/platform}/data-file-parser.d.ts +0 -0
  159. /package/dist/{script → infrastructure/script}/module-loader.d.ts +0 -0
  160. /package/dist/{script → infrastructure/script}/request-script-session.d.ts +0 -0
  161. /package/dist/{script → infrastructure/script}/script-executor.d.ts +0 -0
  162. /package/dist/{script → infrastructure/script}/script-factories.d.ts +0 -0
  163. /package/dist/{test-suite → infrastructure/test-suite}/index.d.ts +0 -0
  164. /package/dist/{test-suite → infrastructure/test-suite}/interfaces.d.ts +0 -0
  165. /package/dist/{test-suite → infrastructure/test-suite}/statistics-service.d.ts +0 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * External Adapters
3
+ */
4
+ export * from './node-file-system.adapter';
5
+ export * from './logger.adapter';
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Console Logger Adapter - ILogger implementation
3
+ */
4
+ import { ILogger, LogLevel } from '../../ports/external/logger.interface';
5
+ /**
6
+ * Simple console-based logger implementation
7
+ */
8
+ export declare class ConsoleLoggerAdapter implements ILogger {
9
+ private minLevel;
10
+ constructor(minLevel?: LogLevel);
11
+ debug(message: string, context?: Record<string, any>): void;
12
+ info(message: string, context?: Record<string, any>): void;
13
+ warn(message: string, context?: Record<string, any>): void;
14
+ error(message: string, error?: Error | Record<string, any>): void;
15
+ private canLog;
16
+ }
17
+ /**
18
+ * Silent logger - no output
19
+ */
20
+ export declare class SilentLoggerAdapter implements ILogger {
21
+ debug(): void;
22
+ info(): void;
23
+ warn(): void;
24
+ error(): void;
25
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Node File System Adapter - IFileSystem implementation for Node.js
3
+ */
4
+ import { IFileSystem, FileStat } from '../../ports/external/file-system.interface';
5
+ /**
6
+ * Node.js implementation of IFileSystem
7
+ */
8
+ export declare class NodeFileSystemAdapter implements IFileSystem {
9
+ exists(path: string): Promise<boolean>;
10
+ readFile(filePath: string): Promise<string>;
11
+ writeFile(filePath: string, content: string): Promise<void>;
12
+ readDir(dirPath: string): Promise<string[]>;
13
+ mkdir(dirPath: string, options?: {
14
+ recursive?: boolean;
15
+ }): Promise<void>;
16
+ delete(filePath: string): Promise<void>;
17
+ stat(filePath: string): Promise<FileStat>;
18
+ }
@@ -8,7 +8,7 @@
8
8
  * CLI/Standalone impl: uses system browser + local HTTP callback server
9
9
  * Browser impl: uses window.open() + postMessage
10
10
  */
11
- import { OAuth2Config } from '../types/types';
11
+ import { OAuth2Config } from '../../types/types';
12
12
  export interface TokenInfo {
13
13
  accessToken: string;
14
14
  /** e.g. "Bearer" */
@@ -13,10 +13,10 @@
13
13
  * Platform-specific behaviour (browser opening, secret storage, callback URIs)
14
14
  * is injected via IExternalBrowserService and ISecretStore interfaces.
15
15
  */
16
- import { IEnvironmentConfigService } from '../environment/interfaces';
16
+ import { IEnvironmentConfigService } from '../../types/environment-config';
17
17
  import { IHttpRequestService } from '../http/interfaces';
18
- import { IExternalBrowserService, ISecretStore } from '../types/platform';
19
- import { OAuth2Config } from '../types/types';
18
+ import { IExternalBrowserService, ISecretStore } from '../../types/platform';
19
+ import { OAuth2Config } from '../../types/types';
20
20
  import { IOAuth2TokenManager, TokenCacheKey, TokenInfo } from './interfaces';
21
21
  export declare class OAuth2TokenManager implements IOAuth2TokenManager {
22
22
  private readonly secretStore;
@@ -4,9 +4,9 @@
4
4
  * Single Responsibility: Load collections from file system
5
5
  * Dependency Inversion: Uses IFileSystem and ParserRegistry abstractions
6
6
  */
7
- import { IFileSystem } from '../types/platform';
8
- import { UnifiedCollection } from '../types/types';
9
- import { ICollectionLoader } from './interfaces';
7
+ import { IFileSystem } from '../../types/platform';
8
+ import { UnifiedCollection } from '../../types/types';
9
+ import type { ICollectionLoader } from '../../types/collection';
10
10
  import { ParserRegistry } from './parser-registry';
11
11
  /**
12
12
  * Options for loading a collection
@@ -9,8 +9,8 @@
9
9
  * - CollectionLoader for storage abstraction (supports folder and json formats)
10
10
  */
11
11
  import { IConfigService } from '../config';
12
- import { IFileWatcherFactory } from '../types/platform';
13
- import { Collection, CollectionItem, CollectionRequestItem, CreateRequestOptions, ICollectionService } from './collection-service-interfaces';
12
+ import { IFileWatcherFactory } from '../../types/platform';
13
+ import type { Collection, CollectionItem, CollectionRequestItem, CreateRequestOptions, ICollectionService } from '../../types/collection';
14
14
  /**
15
15
  * Service for managing HTTP Forge collections
16
16
  */
@@ -6,8 +6,8 @@
6
6
  * - JsonCollectionLoader: Loads from single JSON files
7
7
  * - FolderCollectionStore: Loads from directory structure
8
8
  */
9
- import type { CollectionRequest } from '../types/types';
10
- import type { Collection, CollectionItem, RequestScripts } from './collection-service-interfaces';
9
+ import type { CollectionRequest } from '../../types/types';
10
+ import type { Collection, CollectionItem, RequestScripts } from '../../types/collection';
11
11
  /**
12
12
  * Rich interface for loading, saving, and managing collections
13
13
  */
@@ -9,9 +9,9 @@
9
9
  * All disk I/O is delegated to FolderCollectionStore — this class only
10
10
  * performs type conversion on the way in and out.
11
11
  */
12
- import type { CollectionScripts, UnifiedCollection, UnifiedFolder, UnifiedRequest } from '../types/types';
12
+ import type { CollectionScripts, UnifiedCollection, UnifiedFolder, UnifiedRequest } from '../../types/types';
13
13
  import type { CollectionMetadata } from './collection-store';
14
- import type { ICollectionLoader } from './interfaces';
14
+ import type { ICollectionLoader } from '../../types/collection';
15
15
  export { generateSlug } from './folder-io';
16
16
  type UnifiedItem = UnifiedFolder | UnifiedRequest;
17
17
  /**
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * Ported from the VS Code extension's FolderCollectionLoader.
14
14
  */
15
- import type { Collection, CollectionItem, RequestScripts } from './collection-service-interfaces';
15
+ import type { Collection, CollectionItem, RequestScripts } from '../../types/collection';
16
16
  import type { CollectionMetadata, ICollectionStore } from './collection-store';
17
17
  /**
18
18
  * Loads and manages collections from folder structure using Collection types.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Eliminates ~200 lines of duplicated code between the two implementations.
9
9
  */
10
- import type { RequestBody } from '../types/types';
10
+ import type { RequestBody } from '../../types/types';
11
11
  /** Script file names within a scripts/ directory */
12
12
  export declare const SCRIPT_FILES: {
13
13
  preRequest: string;
@@ -7,7 +7,7 @@
7
7
  * For JSON format, all item-level operations fall back to saving the entire collection
8
8
  * since everything is in one file anyway.
9
9
  */
10
- import type { Collection, CollectionItem, RequestScripts } from './collection-service-interfaces';
10
+ import type { Collection, CollectionItem, RequestScripts } from '../../types/collection';
11
11
  import type { CollectionMetadata, ICollectionStore } from './collection-store';
12
12
  /**
13
13
  * Loads collections from JSON files
@@ -4,7 +4,7 @@
4
4
  * Open/Closed Principle: New parsers can be added without modifying existing code
5
5
  * Single Responsibility: Manage collection parser registration and lookup
6
6
  */
7
- import { ICollectionParser } from './interfaces';
7
+ import type { ICollectionParser } from '../../types/collection';
8
8
  /**
9
9
  * Registry for collection parsers
10
10
  * Allows registering parsers for different collection formats
@@ -7,7 +7,7 @@
7
7
  * Platform-agnostic — uses IFileWatcherFactory and INotificationService
8
8
  * instead of VS Code APIs.
9
9
  */
10
- import { IFileWatcherFactory, INotificationService } from '../types/platform';
10
+ import { IFileWatcherFactory, INotificationService } from '../../types/platform';
11
11
  import type { EnvironmentsConfig, HttpForgeConfig, IConfigService, ProxyConfig, RequestConfig, RunnerConfig, ScriptsConfig, StorageConfig } from './config.interface';
12
12
  /**
13
13
  * Configuration Service Implementation
@@ -5,7 +5,7 @@
5
5
  * Platform-agnostic — uses IKeyValueStore for persistence
6
6
  * instead of VS Code globalState.
7
7
  */
8
- import { IKeyValueStore } from '../types/platform';
8
+ import { IKeyValueStore } from '../../types/platform';
9
9
  import { Cookie, ICookieParser, ICookieReader } from './interfaces';
10
10
  /**
11
11
  * Full cookie service interface (async write operations for platform persistence)
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Complete Infrastructure Bootstrap
3
+ *
4
+ * Registers all infrastructure implementations including:
5
+ * - File system repositories
6
+ * - History loaders
7
+ * - HTTP/Script executors
8
+ * - Parsers
9
+ * - Adapters
10
+ */
11
+ import { PlatformAdapters } from '../../di/platform-adapters';
12
+ import { ServiceContainer } from '../../di/service-container';
13
+ export interface FullBootstrapOptions {
14
+ /** Use file system repositories instead of in-memory */
15
+ useFileSystem?: boolean;
16
+ /** Base path for file system operations */
17
+ basePath?: string;
18
+ /** Platform adapters (file system, logger, HTTP client, etc) */
19
+ adapters?: Partial<PlatformAdapters>;
20
+ }
21
+ /**
22
+ * Complete bootstrap with all implementations
23
+ */
24
+ export declare function bootstrapComplete(container: ServiceContainer, options?: FullBootstrapOptions): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Dependency Injection Configuration
3
+ */
4
+ export * from './infrastructure-di-config';
5
+ export * from './simple-event-publisher';
6
+ export * from './complete-bootstrap';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Infrastructure DI Configuration
3
+ *
4
+ * Registers all infrastructure implementations and wires up the dependency graph
5
+ *
6
+ * Usage:
7
+ * ```typescript
8
+ * const container = new ServiceContainer();
9
+ * registerInfrastructureServices(container);
10
+ * registerDomainServices(container);
11
+ * registerApplicationServices(container);
12
+ * ```
13
+ */
14
+ import { ServiceContainer } from '../../di/service-container';
15
+ import { PlatformAdapters } from '../../di/platform-adapters';
16
+ /**
17
+ * Register infrastructure layer services
18
+ *
19
+ * These are concrete implementations of port interfaces
20
+ */
21
+ export declare function registerInfrastructureServices(container: ServiceContainer, adapters?: Partial<PlatformAdapters>): void;
22
+ /**
23
+ * Register domain layer services
24
+ */
25
+ export declare function registerDomainServices(container: ServiceContainer): void;
26
+ /**
27
+ * Register application layer services (use cases)
28
+ */
29
+ export declare function registerApplicationServices(container: ServiceContainer): void;
30
+ /**
31
+ * Bootstrap all layers
32
+ */
33
+ export declare function bootstrapAllServices(container: ServiceContainer, adapters?: Partial<PlatformAdapters>): void;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Domain Event Publisher Implementation
3
+ */
4
+ import { IDomainEventPublisher } from '../../domain/services/domain-events';
5
+ import { DomainEvent } from '../../domain/services/domain-events';
6
+ /**
7
+ * Simple in-memory event publisher
8
+ */
9
+ export declare class SimpleEventPublisher implements IDomainEventPublisher {
10
+ private subscriptions;
11
+ publish(event: DomainEvent): Promise<void>;
12
+ subscribe(eventType: string, handler: (event: DomainEvent) => Promise<void>): void;
13
+ /**
14
+ * Clear all subscriptions (useful for testing)
15
+ */
16
+ clear(): void;
17
+ }
@@ -5,8 +5,8 @@
5
5
  * VS Code's workspaceState/globalState.
6
6
  */
7
7
  import { IConfigService } from '../config';
8
- import { IKeyValueStore } from '../types/platform';
9
- import { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from './interfaces';
8
+ import { IKeyValueStore } from '../../types/platform';
9
+ import type { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from '../../types/environment-config';
10
10
  export declare class EnvironmentConfigService implements IEnvironmentConfigService {
11
11
  private workspaceFolder;
12
12
  private workspaceStore;
@@ -4,7 +4,7 @@
4
4
  * Single Responsibility: Resolve environment variables for request execution
5
5
  * Dependency Inversion: Implements IEnvironmentStore interface
6
6
  */
7
- import { IEnvironmentStore } from './interfaces';
7
+ import type { IEnvironmentStore } from '../../types/environment-config';
8
8
  /**
9
9
  * Environment definition
10
10
  */
@@ -31,7 +31,7 @@
31
31
  * ```
32
32
  */
33
33
  import { EnvironmentResolver } from './environment-resolver';
34
- import { IEnvironmentStore, IVariableInterpolator } from './interfaces';
34
+ import type { IEnvironmentStore, IVariableInterpolator } from '../../types/environment-config';
35
35
  /**
36
36
  * ForgeEnv interface - the public API for environment management
37
37
  */
@@ -20,7 +20,7 @@
20
20
  * 4. JavaScript expressions: {{price * quantity + 10}}
21
21
  * 5. Return original {{...}} if nothing matched
22
22
  */
23
- import { IVariableInterpolator } from './interfaces';
23
+ import type { IVariableInterpolator } from '../../types/environment-config';
24
24
  /**
25
25
  * Configuration for variable resolution
26
26
  */
@@ -7,7 +7,7 @@
7
7
  * - Supports nested folder scripts (multiple levels)
8
8
  * - JavaScript variables declared in pre-request are accessible in post-response (shared VM session)
9
9
  */
10
- import { ExecutionRequest, ExecutionResult } from '../types/types';
10
+ import { ExecutionRequest, ExecutionResult } from '../../types/types';
11
11
  /**
12
12
  * Console output streaming callback
13
13
  */
@@ -10,10 +10,10 @@
10
10
  * Extracted from extension's request-execution/collection-request-executor.ts.
11
11
  * Platform-independent — no vscode dependency.
12
12
  */
13
- import { IEnvironmentConfigService } from '../environment/interfaces';
13
+ import { IEnvironmentConfigService } from '../../types/environment-config';
14
+ import { ExecutionRequest, ExecutionResult, PreparedRequest, RequestScripts } from '../../types/types';
14
15
  import { IHttpRequestService } from '../http/interfaces';
15
16
  import { ICookieJar, IScriptExecutor } from '../script/interfaces';
16
- import { ExecutionRequest, ExecutionResult, PreparedRequest, RequestScripts } from '../types/types';
17
17
  import { ConsoleOutputCallback, ICollectionRequestExecutor } from './collection-request-executor-interfaces';
18
18
  import { IRequestPreparer } from './request-preparer-interfaces';
19
19
  /**
@@ -7,8 +7,8 @@
7
7
  import { IForgeEnv } from '../environment/forge-env';
8
8
  import { IRequestPreprocessor } from '../http/request-preprocessor';
9
9
  import { IScriptExecutor } from '../script/interfaces';
10
- import { IHttpClient } from '../types/platform';
11
- import { HttpRequest, HttpResponse, RequestOverrides, ScriptResult, UnifiedCollection, UnifiedRequest } from '../types/types';
10
+ import { IHttpClient } from '../../types/platform';
11
+ import { HttpRequest, HttpResponse, RequestOverrides, ScriptResult, UnifiedCollection, UnifiedRequest } from '../../types/types';
12
12
  /**
13
13
  * Options for request execution
14
14
  */
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * Used by both Request Tester (manual) and Collection Runner (batch).
8
8
  */
9
- import { ResolvedEnvironment } from '../environment/interfaces';
10
- import { ExecutionRequest, PreparedRequest } from '../types/types';
9
+ import { ResolvedEnvironment } from '../../types/environment-config';
10
+ import { ExecutionRequest, PreparedRequest } from '../../types/types';
11
11
  /**
12
12
  * Request Preparer Service Interface
13
13
  *
@@ -10,11 +10,11 @@
10
10
  * Used by both Request Tester (manual) and Collection Runner (batch).
11
11
  */
12
12
  import { IOAuth2TokenManager } from '../auth/interfaces';
13
- import { IEnvironmentConfigService, ResolvedEnvironment } from '../environment/interfaces';
13
+ import { IEnvironmentConfigService, ResolvedEnvironment } from '../../types/environment-config';
14
14
  import { IHttpRequestService } from '../http/interfaces';
15
15
  import { IRequestPreprocessor } from '../http/request-preprocessor';
16
- import { IApplicationInfo } from '../types/platform';
17
- import { ExecutionRequest, PreparedRequest } from '../types/types';
16
+ import { IApplicationInfo } from '../../types/platform';
17
+ import { ExecutionRequest, PreparedRequest } from '../../types/types';
18
18
  import { IRequestPreparer } from './request-preparer-interfaces';
19
19
  /**
20
20
  * RequestPreparer implementation
@@ -12,7 +12,7 @@
12
12
  *
13
13
  * Zero Dependencies: Uses only the project's IHttpClient abstraction.
14
14
  */
15
- import { IHttpClient } from '../types/platform';
15
+ import { IHttpClient } from '../../types/platform';
16
16
  export interface GraphQLField {
17
17
  name: string;
18
18
  type: string;
@@ -4,7 +4,7 @@
4
4
  * Extracted from VS Code plugin: src/services/interfaces/request-history.interface.ts
5
5
  * Adapted for core package - storage-agnostic design
6
6
  */
7
- import { HttpRequest, HttpResponse, RequestBody } from '../types/types';
7
+ import { HttpRequest, HttpResponse, RequestBody } from '../../types/types';
8
8
  /**
9
9
  * History entry - records a single request execution
10
10
  */
@@ -7,7 +7,7 @@
7
7
  * Based on VS Code plugin's RequestHistoryService logic,
8
8
  * but adapted for storage-agnostic design.
9
9
  */
10
- import { HttpRequest, HttpResponse } from '../types/types';
10
+ import { HttpRequest, HttpResponse } from '../../types/types';
11
11
  import { FullResponse, HistoryEntry, IRequestHistory } from './history-interfaces';
12
12
  /**
13
13
  * In-memory request history storage
@@ -4,8 +4,8 @@
4
4
  * Single Responsibility: Execute HTTP requests using fetch API
5
5
  * Dependency Inversion: Implements IHttpClient interface
6
6
  */
7
- import { IHttpClient } from '../types/platform';
8
- import { HttpRequest, HttpResponse } from '../types/types';
7
+ import { IHttpClient } from '../../types/platform';
8
+ import { HttpRequest, HttpResponse } from '../../types/types';
9
9
  /**
10
10
  * HTTP client implementation using Node.js native fetch.
11
11
  * Requires Node.js 18+.
@@ -15,8 +15,8 @@
15
15
  * - Open/Closed: Extended through interceptor chain
16
16
  * - Dependency Inversion: Depends on IHttpClient, IUrlBuilder, IInterceptorChain, IRequestPreprocessor
17
17
  */
18
- import type { IHttpClient } from '../types/platform';
19
- import { HttpRequestOptions, HttpResponse } from '../types/types';
18
+ import type { IHttpClient } from '../../types/platform';
19
+ import { HttpRequestOptions, HttpResponse } from '../../types/types';
20
20
  import { IInterceptorChain } from './interceptor-chain';
21
21
  import { IHttpRequestService } from './interfaces';
22
22
  import { IUrlBuilder } from './url-builder';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * HTTP Infrastructure Adapters and Implementations
3
+ */
4
+ export * from './node-http-executor.adapter';
@@ -12,7 +12,7 @@
12
12
  * - Post-response processing (modify response after receiving)
13
13
  * - Error handling
14
14
  */
15
- import { HttpRequest, HttpResponse } from '../types/types';
15
+ import { HttpRequest, HttpResponse } from '../../types/types';
16
16
  /**
17
17
  * Context passed to interceptors
18
18
  * Same as plugin's InterceptorContext
@@ -7,7 +7,7 @@
7
7
  * This is the high-level service interface that consumers use.
8
8
  * It delegates to IHttpClient for actual network calls and IUrlBuilder for URL construction.
9
9
  */
10
- import { HttpRequestOptions, HttpResponse } from '../types/types';
10
+ import { HttpRequestOptions, HttpResponse } from '../../types/types';
11
11
  /**
12
12
  * Full HTTP request service interface.
13
13
  * Combines execution + URL building in a single facade.
@@ -4,7 +4,7 @@
4
4
  * Merges user-provided request settings with defaults.
5
5
  * Extracted from extension's utils/merge-request-settings.ts.
6
6
  */
7
- import { RequestSettings } from '../types/types';
7
+ import { RequestSettings } from '../../types/types';
8
8
  /**
9
9
  * Merge user-provided RequestSettings with defaults.
10
10
  * Idempotent and safe to call from multiple layers.
@@ -14,8 +14,8 @@
14
14
  * - Request cancellation via AbortSignal
15
15
  * - Cookie parsing from Set-Cookie headers
16
16
  */
17
- import { IHttpClient } from '../types/platform';
18
- import { HttpRequest, HttpResponse, RequestSettings } from '../types/types';
17
+ import { IHttpClient } from '../../types/platform';
18
+ import { HttpRequest, HttpResponse, RequestSettings } from '../../types/types';
19
19
  /**
20
20
  * Default request settings
21
21
  * Same as plugin's DEFAULT_REQUEST_SETTINGS from shared/constants.ts
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Node HTTP Executor Adapter - Implements IHttpExecutor
3
+ *
4
+ * Wraps existing InterceptorChain and CookieService to conform to port interface
5
+ */
6
+ import { IHttpExecutor, IExecutionPlan } from '../../ports/executors/http-executor.interface';
7
+ import { HttpRequest, HttpResponse } from '../../types/types';
8
+ import type { IInterceptorChain } from './interceptor-chain';
9
+ import type { ICookieService } from '../cookie/interfaces';
10
+ /**
11
+ * Adapter that implements IHttpExecutor using existing infrastructure
12
+ */
13
+ export declare class NodeHttpExecutorAdapter implements IHttpExecutor {
14
+ private interceptorChain;
15
+ private cookieJar;
16
+ constructor(interceptorChain: IInterceptorChain, cookieJar: ICookieService);
17
+ /**
18
+ * Prepare request for execution
19
+ */
20
+ prepare(plan: IExecutionPlan): Promise<HttpRequest>;
21
+ /**
22
+ * Execute prepared HTTP request
23
+ */
24
+ execute(prepared: HttpRequest): Promise<HttpResponse>;
25
+ }
@@ -6,7 +6,7 @@
6
6
  * Single Responsibility: Handles request preparation (header sanitization, body encoding)
7
7
  * DO NOT modify the core logic - it has been tested and is reliable.
8
8
  */
9
- import { RequestBody } from '../types/types';
9
+ import { RequestBody } from '../../types/types';
10
10
  /**
11
11
  * Request Preprocessor Interface
12
12
  * Same as plugin's IRequestPreprocessor
@@ -6,9 +6,9 @@
6
6
  *
7
7
  * Pure function — no platform dependencies.
8
8
  */
9
- import { ImportedEnvironment } from '../environment/interfaces';
10
- import { IFileSystem } from '../types/platform';
11
- export type { ImportedEnvironment } from '../environment/interfaces';
9
+ import { ImportedEnvironment } from '../../types/environment-config';
10
+ import { IFileSystem } from '../../types/platform';
11
+ export type { ImportedEnvironment } from '../../types/environment-config';
12
12
  /**
13
13
  * Parse Postman environment JSON content.
14
14
  * Supports both standard and nested Postman export formats.
@@ -4,9 +4,9 @@
4
4
  * Pure functions for exporting collections to REST Client format (.http files).
5
5
  * No VS Code dependency — uses only Node.js fs/path and core types.
6
6
  */
7
- import type { Collection, CollectionItem, ICollectionService } from '../collection/interfaces';
8
- import type { IEnvironmentConfigService } from '../environment/interfaces';
9
- import type { RequestScripts } from '../types/types';
7
+ import type { Collection, CollectionItem, ICollectionService } from '../../types/collection';
8
+ import type { IEnvironmentConfigService } from '../../types/environment-config';
9
+ import type { RequestScripts } from '../../types/types';
10
10
  /**
11
11
  * Write an env file given an object of key/value pairs. Existing file is overwritten.
12
12
  */
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Infrastructure Layer - Implementations and Adapters
3
+ *
4
+ * Contains:
5
+ * - Repository implementations (file-system, in-memory, cloud)
6
+ * - HTTP executor implementations
7
+ * - Script executor implementations
8
+ * - Storage implementations (history, cache)
9
+ * - Parser implementations
10
+ * - External adapters (FileSystem, HTTP client, Logger)
11
+ * - DI configuration
12
+ *
13
+ * Constraints:
14
+ * - Depends on Ports and Domain layers
15
+ * - NO direct dependencies on Application layer
16
+ * - Contains all platform-specific code
17
+ * - All implementations must conform to port interfaces
18
+ *
19
+ * Usage:
20
+ * - Imported during bootstrap phase
21
+ * - Never imported by domain layer
22
+ * - Imported by application layer only through ports
23
+ */
24
+ export * from './adapters';
25
+ export * from './repositories/in-memory';
26
+ export * from './repositories/file-system';
27
+ export * from './http';
28
+ export * from './script';
29
+ export * from './persistence';
30
+ export * from './parsers';
31
+ export * from './di';
@@ -5,7 +5,7 @@
5
5
  * Handles allOf (flatten + merge), oneOf/anyOf (first variant),
6
6
  * discriminator injection, enum, formats, readOnly omission.
7
7
  */
8
- import { JSONSchema7 } from '../types/types';
8
+ import { JSONSchema7 } from '../../types/types';
9
9
  export declare class ExampleGenerator {
10
10
  /**
11
11
  * Generate an example value from a JSON Schema.
@@ -5,7 +5,7 @@
5
5
  * to build response schemas by inferring from actual response data.
6
6
  */
7
7
  import { IRequestHistoryService } from '../history/request-history-service-interfaces';
8
- import { ResponseSchemaDefinition } from '../types/types';
8
+ import { ResponseSchemaDefinition } from '../../types/types';
9
9
  import { SchemaInferrer } from './schema-inferrer';
10
10
  export declare class HistoryAnalyzer {
11
11
  private historyService;
@@ -4,8 +4,8 @@
4
4
  * DI abstractions for OpenAPI-related services.
5
5
  * The concrete implementations live in services/openapi/.
6
6
  */
7
- import type { Collection } from '../collection/collection-service-interfaces';
8
- import type { BodySchemaDefinition, JSONSchema7, KeyValueEntry, ResponseSchemaDefinition } from '../types/types';
7
+ import type { Collection } from '../../types/collection';
8
+ import type { BodySchemaDefinition, JSONSchema7, KeyValueEntry, ResponseSchemaDefinition } from '../../types/types';
9
9
  import type { OpenApiExportOptions } from './openapi-exporter';
10
10
  import type { OpenApiImportOptions } from './openapi-importer';
11
11
  /**