@http-forge/core 0.2.14 → 0.2.15

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 (83) hide show
  1. package/README.md +6 -0
  2. package/dist/index.js +116 -116
  3. package/dist/index.mjs +114 -114
  4. package/dist/infrastructure/collection/collection-service.d.ts +3 -0
  5. package/dist/infrastructure/collection/collection-store.d.ts +5 -1
  6. package/dist/infrastructure/collection/folder-collection-store.d.ts +4 -0
  7. package/dist/infrastructure/collection/folder-io.d.ts +1 -0
  8. package/dist/infrastructure/collection/json-collection-loader.d.ts +5 -0
  9. package/dist/types/collection.d.ts +2 -0
  10. package/package.json +1 -1
  11. package/dist/application/dto/index.d.ts +0 -8
  12. package/dist/application/dto/request-dtos.d.ts +0 -105
  13. package/dist/application/dto/response-dtos.d.ts +0 -185
  14. package/dist/application/events/application-events.d.ts +0 -53
  15. package/dist/application/events/index.d.ts +0 -6
  16. package/dist/application/index.d.ts +0 -25
  17. package/dist/application/mappers/collection-mapper.d.ts +0 -39
  18. package/dist/application/mappers/execution-result-mapper.d.ts +0 -16
  19. package/dist/application/mappers/index.d.ts +0 -9
  20. package/dist/application/mappers/request-mapper.d.ts +0 -29
  21. package/dist/application/queries/get-request-schema.query.d.ts +0 -32
  22. package/dist/application/queries/index.d.ts +0 -6
  23. package/dist/application/use-cases/create-request.use-case.d.ts +0 -23
  24. package/dist/application/use-cases/delete-request.use-case.d.ts +0 -15
  25. package/dist/application/use-cases/execute-request.use-case.d.ts +0 -46
  26. package/dist/application/use-cases/export-collection.use-case.d.ts +0 -22
  27. package/dist/application/use-cases/get-collection.use-case.d.ts +0 -13
  28. package/dist/application/use-cases/index.d.ts +0 -12
  29. package/dist/application/use-cases/list-requests.use-case.d.ts +0 -14
  30. package/dist/application/use-cases/load-collection.use-case.d.ts +0 -30
  31. package/dist/application/use-cases/save-collection.use-case.d.ts +0 -25
  32. package/dist/application/use-cases/update-request.use-case.d.ts +0 -17
  33. package/dist/domain/errors/domain-errors.d.ts +0 -52
  34. package/dist/domain/errors/index.d.ts +0 -4
  35. package/dist/domain/index.d.ts +0 -24
  36. package/dist/domain/models/execution.d.ts +0 -88
  37. package/dist/domain/models/index.d.ts +0 -4
  38. package/dist/domain/services/domain-events.d.ts +0 -60
  39. package/dist/domain/services/execution-planner.domain-service.d.ts +0 -40
  40. package/dist/domain/services/index.d.ts +0 -9
  41. package/dist/domain/services/schema-inference.domain-service.d.ts +0 -54
  42. package/dist/domain/value-objects/entity-id.d.ts +0 -26
  43. package/dist/domain/value-objects/http-method.d.ts +0 -30
  44. package/dist/domain/value-objects/index.d.ts +0 -9
  45. package/dist/domain/value-objects/request-url.d.ts +0 -28
  46. package/dist/infrastructure/adapters/index.d.ts +0 -5
  47. package/dist/infrastructure/adapters/logger.adapter.d.ts +0 -25
  48. package/dist/infrastructure/adapters/node-file-system.adapter.d.ts +0 -18
  49. package/dist/infrastructure/di/complete-bootstrap.d.ts +0 -24
  50. package/dist/infrastructure/di/index.d.ts +0 -6
  51. package/dist/infrastructure/di/infrastructure-di-config.d.ts +0 -33
  52. package/dist/infrastructure/di/simple-event-publisher.d.ts +0 -17
  53. package/dist/infrastructure/environment/interfaces.d.ts +0 -139
  54. package/dist/infrastructure/http/index.d.ts +0 -4
  55. package/dist/infrastructure/http/node-http-executor.adapter.d.ts +0 -25
  56. package/dist/infrastructure/index.d.ts +0 -31
  57. package/dist/infrastructure/persistence/file-system-history-loader.d.ts +0 -31
  58. package/dist/infrastructure/persistence/index.d.ts +0 -6
  59. package/dist/infrastructure/repositories/file-system/fs-collection-repository.d.ts +0 -72
  60. package/dist/infrastructure/repositories/file-system/fs-environment-file-loader.adapter.d.ts +0 -41
  61. package/dist/infrastructure/repositories/file-system/fs-environment-repository.d.ts +0 -34
  62. package/dist/infrastructure/repositories/file-system/fs-request-repository.d.ts +0 -31
  63. package/dist/infrastructure/repositories/file-system/index.d.ts +0 -7
  64. package/dist/infrastructure/repositories/in-memory/in-memory-collection-repository.d.ts +0 -18
  65. package/dist/infrastructure/repositories/in-memory/in-memory-environment-repository.d.ts +0 -25
  66. package/dist/infrastructure/repositories/in-memory/in-memory-request-repository.d.ts +0 -25
  67. package/dist/infrastructure/repositories/in-memory/index.d.ts +0 -7
  68. package/dist/infrastructure/script/index.d.ts +0 -4
  69. package/dist/infrastructure/script/vm-script-executor.adapter.d.ts +0 -19
  70. package/dist/infrastructure/test-suite/index.d.ts +0 -10
  71. package/dist/ports/executors/index.d.ts +0 -5
  72. package/dist/ports/external/file-system.interface.d.ts +0 -44
  73. package/dist/ports/external/http-client.interface.d.ts +0 -25
  74. package/dist/ports/external/index.d.ts +0 -7
  75. package/dist/ports/index.d.ts +0 -17
  76. package/dist/ports/parsers/index.d.ts +0 -4
  77. package/dist/ports/repositories/collection-repository.interface.d.ts +0 -32
  78. package/dist/ports/repositories/environment-repository.interface.d.ts +0 -31
  79. package/dist/ports/repositories/index.d.ts +0 -6
  80. package/dist/ports/repositories/request-repository.interface.d.ts +0 -32
  81. package/dist/ports/storage/cache-store.interface.d.ts +0 -26
  82. package/dist/ports/storage/history-loader.interface.d.ts +0 -37
  83. package/dist/ports/storage/index.d.ts +0 -5
@@ -1,44 +0,0 @@
1
- /**
2
- * File System Port - Abstract file system operations
3
- * Enables platform-agnostic code (Node.js, browser, etc.)
4
- *
5
- * Implementation: NodeFileSystem
6
- */
7
- export interface IFileSystem {
8
- /**
9
- * Check if a path exists (file or directory)
10
- */
11
- exists(path: string): Promise<boolean>;
12
- /**
13
- * Read file contents as UTF-8 string
14
- */
15
- readFile(path: string): Promise<string>;
16
- /**
17
- * Write file contents
18
- */
19
- writeFile(path: string, content: string): Promise<void>;
20
- /**
21
- * List directory contents
22
- */
23
- readDir(path: string): Promise<string[]>;
24
- /**
25
- * Create directory (recursively)
26
- */
27
- mkdir(path: string, options?: {
28
- recursive?: boolean;
29
- }): Promise<void>;
30
- /**
31
- * Delete file or empty directory
32
- */
33
- delete(path: string): Promise<void>;
34
- /**
35
- * Get file metadata
36
- */
37
- stat(path: string): Promise<FileStat>;
38
- }
39
- export interface FileStat {
40
- isDirectory(): boolean;
41
- isFile(): boolean;
42
- size: number;
43
- mtimeMs?: number;
44
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * HTTP Client Port - Abstract HTTP operations
3
- * Enables switching between fetch, Node.js fetch, Node.js http, etc.
4
- *
5
- * Implementations: NodeHttpClient, FetchHttpClient
6
- */
7
- export interface IHttpClient {
8
- /**
9
- * Execute HTTP request
10
- */
11
- execute(request: IHttpClientRequest): Promise<IHttpClientResponse>;
12
- }
13
- export interface IHttpClientRequest {
14
- method: string;
15
- url: string;
16
- headers: Record<string, string>;
17
- body?: string | Buffer;
18
- timeout?: number;
19
- }
20
- export interface IHttpClientResponse {
21
- status: number;
22
- statusText: string;
23
- headers: Record<string, string | string[]>;
24
- body: Buffer | string;
25
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * External Ports - Platform and infrastructure abstractions
3
- * Enables dependency injection and platform independence
4
- */
5
- export * from './file-system.interface';
6
- export * from './http-client.interface';
7
- export * from './logger.interface';
@@ -1,17 +0,0 @@
1
- /**
2
- * Ports Layer - Abstract interfaces (Hexagonal Architecture)
3
- *
4
- * Defines contracts for:
5
- * - Data access (Repositories)
6
- * - Execution (HTTP, Scripts)
7
- * - Storage (History, Cache)
8
- * - External systems (FileSystem, HTTP Client, Logger)
9
- * - Parsing (Collection formats)
10
- *
11
- * Implementations are in the infrastructure layer
12
- */
13
- export * from './external';
14
- export * from './repositories';
15
- export * from './executors';
16
- export * from './storage';
17
- export * from './parsers';
@@ -1,4 +0,0 @@
1
- /**
2
- * Parser Ports - Parsing abstraction
3
- */
4
- export * from './collection-parser.interface';
@@ -1,32 +0,0 @@
1
- /**
2
- * Collection Repository Port - Abstract collection data access
3
- * Enables switching between file-based, in-memory, cloud storage, etc.
4
- *
5
- * Implementations: FileSystemCollectionRepository, InMemoryCollectionRepository
6
- */
7
- import { UnifiedCollection } from '../../types/types';
8
- /**
9
- * Repository for managing collections
10
- */
11
- export interface ICollectionRepository {
12
- /**
13
- * Find collection by ID
14
- */
15
- findById(id: string): Promise<UnifiedCollection | null>;
16
- /**
17
- * Find all collections
18
- */
19
- findAll(): Promise<UnifiedCollection[]>;
20
- /**
21
- * Save or update collection
22
- */
23
- save(id: string, collection: UnifiedCollection): Promise<void>;
24
- /**
25
- * Delete collection by ID
26
- */
27
- delete(id: string): Promise<void>;
28
- /**
29
- * Check if collection exists
30
- */
31
- exists(id: string): Promise<boolean>;
32
- }
@@ -1,31 +0,0 @@
1
- /**
2
- * Environment Repository Port - Abstract environment data access
3
- *
4
- * Implementations: FileSystemEnvironmentRepository
5
- */
6
- import { Environment } from '../../infrastructure/environment/environment-resolver';
7
- /**
8
- * Repository for managing environments
9
- */
10
- export interface IEnvironmentRepository {
11
- /**
12
- * Find environment by ID/name
13
- */
14
- findById(id: string): Promise<Environment | null>;
15
- /**
16
- * Find active environment
17
- */
18
- findActive(): Promise<Environment | null>;
19
- /**
20
- * Find all environments
21
- */
22
- findAll(): Promise<Environment[]>;
23
- /**
24
- * Save or update environment
25
- */
26
- save(environment: Environment): Promise<void>;
27
- /**
28
- * Delete environment by ID
29
- */
30
- delete(id: string): Promise<void>;
31
- }
@@ -1,6 +0,0 @@
1
- /**
2
- * Repository Ports - Data access abstraction
3
- */
4
- export * from './request-repository.interface';
5
- export * from './collection-repository.interface';
6
- export * from './environment-repository.interface';
@@ -1,32 +0,0 @@
1
- /**
2
- * Request Repository Port - Abstract request data access
3
- * Enables switching between file-based, in-memory, cloud storage, etc.
4
- *
5
- * Implementations: FileSystemRequestRepository, InMemoryRequestRepository
6
- */
7
- import { UnifiedRequest } from '../../types/types';
8
- /**
9
- * Repository for managing individual requests
10
- */
11
- export interface IRequestRepository {
12
- /**
13
- * Find request by ID
14
- */
15
- findById(id: string): Promise<UnifiedRequest | null>;
16
- /**
17
- * Find all requests in a collection
18
- */
19
- findAll(collectionId: string): Promise<UnifiedRequest[]>;
20
- /**
21
- * Save or update request
22
- */
23
- save(request: UnifiedRequest): Promise<void>;
24
- /**
25
- * Delete request by ID
26
- */
27
- delete(id: string): Promise<void>;
28
- /**
29
- * Check if request exists
30
- */
31
- exists(id: string): Promise<boolean>;
32
- }
@@ -1,26 +0,0 @@
1
- /**
2
- * Cache Store Port - Abstract caching
3
- *
4
- * Implementations: GraphQLSchemaCacheStore, MemoryCacheStore
5
- */
6
- /**
7
- * Generic cache store
8
- */
9
- export interface ICacheStore<T> {
10
- /**
11
- * Get value from cache
12
- */
13
- get(key: string): Promise<T | null>;
14
- /**
15
- * Set value in cache
16
- */
17
- set(key: string, value: T, ttl?: number): Promise<void>;
18
- /**
19
- * Delete value from cache
20
- */
21
- delete(key: string): Promise<void>;
22
- /**
23
- * Clear all cache
24
- */
25
- clear(): Promise<void>;
26
- }
@@ -1,37 +0,0 @@
1
- /**
2
- * History Loader Port - Abstract history loading
3
- *
4
- * Implementations: FileSystemHistoryLoader, InMemoryHistoryLoader
5
- */
6
- import { HttpResponse } from '../../types/types';
7
- /**
8
- * History entry metadata
9
- */
10
- export interface IHistoryEntry {
11
- id: string;
12
- requestId: string;
13
- collectionId: string;
14
- timestamp: Date;
15
- status: number;
16
- duration: number;
17
- }
18
- /**
19
- * History Loader - Loads request execution history
20
- */
21
- export interface IHistoryLoader {
22
- /**
23
- * Load history entries for a request
24
- */
25
- loadHistory(collectionId: string, requestId: string, options?: {
26
- limit?: number;
27
- offset?: number;
28
- }): Promise<IHistoryEntry[]>;
29
- /**
30
- * Load full response from history
31
- */
32
- loadFullResponse(collectionId: string, requestId: string, entryId: string): Promise<HttpResponse | null>;
33
- /**
34
- * Save history entry
35
- */
36
- saveEntry(collectionId: string, requestId: string, response: HttpResponse, duration: number): Promise<IHistoryEntry>;
37
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * Storage Ports - Storage and caching abstraction
3
- */
4
- export * from './history-loader.interface';
5
- export * from './cache-store.interface';