@http-forge/core 0.2.0 → 0.2.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 +25 -4
- package/dist/auth/oauth2-token-manager.d.ts +1 -1
- package/dist/collection/collection-loader-factory.d.ts +1 -1
- package/dist/collection/collection-service.d.ts +2 -2
- package/dist/collection/collection-store.d.ts +1 -1
- package/dist/collection/folder-collection-loader.d.ts +17 -228
- package/dist/collection/folder-collection-store.d.ts +8 -1
- package/dist/collection/folder-io.d.ts +113 -0
- package/dist/container.d.ts +13 -14
- package/dist/cookie/cookie-service.d.ts +1 -1
- package/dist/cookie/in-memory-cookie-jar.d.ts +1 -1
- package/dist/cookie/persistent-cookie-jar.d.ts +1 -1
- package/dist/di/core-bootstrap.d.ts +25 -0
- package/dist/di/index.d.ts +11 -0
- package/dist/di/platform-adapters.d.ts +53 -0
- package/dist/di/service-container.d.ts +97 -0
- package/dist/di/service-identifiers.d.ts +34 -0
- package/dist/environment/environment-config-service.d.ts +6 -3
- package/dist/environment/environment-file-loader.d.ts +42 -0
- package/dist/environment/forge-env.d.ts +1 -1
- package/dist/execution/collection-request-executor.d.ts +3 -3
- package/dist/execution/request-executor.d.ts +3 -3
- package/dist/execution/request-preparer.d.ts +3 -3
- package/dist/history/request-history.d.ts +1 -1
- package/dist/http/http-request-service.d.ts +2 -2
- package/dist/import-export/import-postman-environment.d.ts +1 -1
- package/dist/index.d.ts +25 -19
- package/dist/index.js +187 -187
- package/dist/index.mjs +187 -187
- package/dist/openapi/interfaces.d.ts +2 -2
- package/dist/script/interfaces.d.ts +12 -0
- package/dist/script/request-script-session.d.ts +3 -0
- package/dist/script/script-executor.d.ts +1 -1
- package/dist/script/script-factories.d.ts +15 -4
- package/dist/script/script-utils.d.ts +2 -1
- package/dist/test-suite/result-storage-service.d.ts +1 -1
- package/dist/types/types.d.ts +7 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform Adapters
|
|
3
|
+
*
|
|
4
|
+
* Interface for platform-specific implementations that must be
|
|
5
|
+
* provided by the host environment (VS Code, CLI, etc.).
|
|
6
|
+
*
|
|
7
|
+
* The core bootstrap uses these adapters to wire up services
|
|
8
|
+
* without depending on any specific platform.
|
|
9
|
+
*/
|
|
10
|
+
import type { IConsoleService } from '../types/console-service';
|
|
11
|
+
import type { IApplicationInfo, IExternalBrowserService, IFileWatcherFactory, IKeyValueStore, INotificationService, ISecretStore } from '../types/platform';
|
|
12
|
+
/**
|
|
13
|
+
* Platform adapters required by core service bootstrap.
|
|
14
|
+
*
|
|
15
|
+
* The host environment (VS Code extension, CLI tool, etc.) creates
|
|
16
|
+
* concrete implementations and passes them to `registerCoreServices()`.
|
|
17
|
+
*
|
|
18
|
+
* @example VS Code extension:
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const adapters: PlatformAdapters = {
|
|
21
|
+
* workspaceFolder: '/path/to/workspace',
|
|
22
|
+
* fileWatcherFactory: new VscodeFileWatcherFactory(),
|
|
23
|
+
* notificationService: new VscodeNotificationService(),
|
|
24
|
+
* workspaceStore: new VscodeKeyValueStore(context.workspaceState),
|
|
25
|
+
* globalStore: new VscodeKeyValueStore(context.globalState),
|
|
26
|
+
* secretStore: vscodeSecretStoreAdapter,
|
|
27
|
+
* browserService: vscodeBrowserAdapter,
|
|
28
|
+
* applicationInfo: { name: 'HttpForge', version: '1.0.0' },
|
|
29
|
+
* consoleService: new ConsoleService('HTTP Forge'),
|
|
30
|
+
* };
|
|
31
|
+
* registerCoreServices(container, adapters);
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export interface PlatformAdapters {
|
|
35
|
+
/** Workspace root folder path */
|
|
36
|
+
workspaceFolder: string;
|
|
37
|
+
/** File watcher factory — watches for file changes (ConfigService, CollectionService) */
|
|
38
|
+
fileWatcherFactory: IFileWatcherFactory;
|
|
39
|
+
/** Notification service — shows info/warning/error messages (ConfigService) */
|
|
40
|
+
notificationService: INotificationService;
|
|
41
|
+
/** Per-workspace key-value store (EnvironmentConfigService) */
|
|
42
|
+
workspaceStore: IKeyValueStore;
|
|
43
|
+
/** Global key-value store (CookieService) */
|
|
44
|
+
globalStore: IKeyValueStore;
|
|
45
|
+
/** Secret storage for tokens (OAuth2TokenManager). Optional — OAuth2 disabled if absent. */
|
|
46
|
+
secretStore?: ISecretStore;
|
|
47
|
+
/** External browser service for OAuth2 flows. Optional — OAuth2 disabled if absent. */
|
|
48
|
+
browserService?: IExternalBrowserService;
|
|
49
|
+
/** Application name/version for User-Agent header (RequestPreparer) */
|
|
50
|
+
applicationInfo?: IApplicationInfo;
|
|
51
|
+
/** Structured logging service. Optional — a no-op console is used if absent. */
|
|
52
|
+
consoleService?: IConsoleService;
|
|
53
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Container
|
|
3
|
+
*
|
|
4
|
+
* Generic dependency injection container.
|
|
5
|
+
* Platform-agnostic — no VS Code dependencies.
|
|
6
|
+
*
|
|
7
|
+
* Principles:
|
|
8
|
+
* - Dependency Inversion: Services accessed through interfaces
|
|
9
|
+
* - Single Responsibility: Container only manages service lifecycle
|
|
10
|
+
* - Open/Closed: New services registered without modifying existing code
|
|
11
|
+
*/
|
|
12
|
+
import type { IAsyncCookieService } from '../cookie/interfaces';
|
|
13
|
+
import type { IRequestPreparer } from '../execution/request-preparer-interfaces';
|
|
14
|
+
import type { IRequestHistoryService } from '../history/request-history-service-interfaces';
|
|
15
|
+
import type { IHttpRequestService } from '../http/interfaces';
|
|
16
|
+
import type { IScriptExecutor } from '../script/interfaces';
|
|
17
|
+
import type { IConsoleService } from '../types/console-service';
|
|
18
|
+
import type { IHttpClient } from '../types/platform';
|
|
19
|
+
import type { ServiceIdentifier } from './service-identifiers';
|
|
20
|
+
import type { IOAuth2TokenManager } from '../auth/interfaces';
|
|
21
|
+
import type { ICollectionService } from '../collection/collection-service-interfaces';
|
|
22
|
+
import type { IConfigService } from '../config';
|
|
23
|
+
import type { IEnvironmentConfigService } from '../environment/interfaces';
|
|
24
|
+
import type { IGraphQLSchemaService } from '../graphql/graphql-schema-service';
|
|
25
|
+
import type { IDataFileParser } from '../platform/data-file-parser';
|
|
26
|
+
import type { ICookieJar } from '../script/interfaces';
|
|
27
|
+
/**
|
|
28
|
+
* Factory function type for creating services
|
|
29
|
+
*/
|
|
30
|
+
type ServiceFactory<T> = (container: ServiceContainer) => T;
|
|
31
|
+
/**
|
|
32
|
+
* Service Container implementation
|
|
33
|
+
* Provides dependency injection capabilities
|
|
34
|
+
*/
|
|
35
|
+
export declare class ServiceContainer {
|
|
36
|
+
private static _instance;
|
|
37
|
+
private services;
|
|
38
|
+
private primitives;
|
|
39
|
+
private constructor();
|
|
40
|
+
/**
|
|
41
|
+
* Get the singleton instance
|
|
42
|
+
*/
|
|
43
|
+
static get instance(): ServiceContainer;
|
|
44
|
+
/**
|
|
45
|
+
* Reset the container (useful for testing)
|
|
46
|
+
*/
|
|
47
|
+
static reset(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Register a primitive value (like workspace folder path)
|
|
50
|
+
*/
|
|
51
|
+
registerValue<T>(identifier: ServiceIdentifier, value: T): this;
|
|
52
|
+
/**
|
|
53
|
+
* Register a service factory as a singleton
|
|
54
|
+
* The service will be created on first resolution and reused
|
|
55
|
+
*/
|
|
56
|
+
registerSingleton<T>(identifier: ServiceIdentifier, factory: ServiceFactory<T>): this;
|
|
57
|
+
/**
|
|
58
|
+
* Register a service factory as transient
|
|
59
|
+
* A new instance will be created on each resolution
|
|
60
|
+
*/
|
|
61
|
+
registerTransient<T>(identifier: ServiceIdentifier, factory: ServiceFactory<T>): this;
|
|
62
|
+
/**
|
|
63
|
+
* Register an already instantiated service
|
|
64
|
+
*/
|
|
65
|
+
registerInstance<T>(identifier: ServiceIdentifier, instance: T): this;
|
|
66
|
+
/**
|
|
67
|
+
* Resolve a service by its identifier
|
|
68
|
+
*/
|
|
69
|
+
resolve<T>(identifier: ServiceIdentifier): T;
|
|
70
|
+
/**
|
|
71
|
+
* Check if a service is registered
|
|
72
|
+
*/
|
|
73
|
+
has(identifier: ServiceIdentifier): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Clear all registrations
|
|
76
|
+
*/
|
|
77
|
+
clear(): void;
|
|
78
|
+
get config(): IConfigService;
|
|
79
|
+
get console(): IConsoleService;
|
|
80
|
+
get environmentConfig(): IEnvironmentConfigService;
|
|
81
|
+
get collection(): ICollectionService;
|
|
82
|
+
get httpRequest(): IHttpRequestService;
|
|
83
|
+
get httpClient(): IHttpClient;
|
|
84
|
+
get cookie(): IAsyncCookieService;
|
|
85
|
+
get requestHistory(): IRequestHistoryService;
|
|
86
|
+
get dataFileParser(): IDataFileParser;
|
|
87
|
+
get scriptExecutor(): IScriptExecutor;
|
|
88
|
+
get requestPreparer(): IRequestPreparer;
|
|
89
|
+
get persistentCookieJar(): ICookieJar;
|
|
90
|
+
get oauth2TokenManager(): IOAuth2TokenManager;
|
|
91
|
+
get graphqlSchemaService(): IGraphQLSchemaService;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Convenience function to get the service container instance
|
|
95
|
+
*/
|
|
96
|
+
export declare function getServiceContainer(): ServiceContainer;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Service Identifiers
|
|
3
|
+
*
|
|
4
|
+
* Symbol-based identifiers for type-safe service resolution.
|
|
5
|
+
* Used by ServiceContainer for dependency injection.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ServiceIdentifiers: {
|
|
8
|
+
readonly Config: symbol;
|
|
9
|
+
readonly Console: symbol;
|
|
10
|
+
readonly EnvironmentConfig: symbol;
|
|
11
|
+
readonly Collection: symbol;
|
|
12
|
+
readonly HttpRequest: symbol;
|
|
13
|
+
readonly HttpClient: symbol;
|
|
14
|
+
readonly Cookie: symbol;
|
|
15
|
+
readonly RequestHistory: symbol;
|
|
16
|
+
readonly UrlBuilder: symbol;
|
|
17
|
+
readonly RequestPreprocessor: symbol;
|
|
18
|
+
readonly RequestPreparer: symbol;
|
|
19
|
+
readonly InterceptorChain: symbol;
|
|
20
|
+
readonly ScriptExecutor: symbol;
|
|
21
|
+
readonly DataFileParser: symbol;
|
|
22
|
+
readonly CollectionRequestExecutor: symbol;
|
|
23
|
+
readonly WorkspaceFolder: symbol;
|
|
24
|
+
readonly PersistentCookieJar: symbol;
|
|
25
|
+
readonly OAuth2TokenManager: symbol;
|
|
26
|
+
readonly GraphQLSchemaService: symbol;
|
|
27
|
+
readonly SchemaInferrer: symbol;
|
|
28
|
+
readonly HistoryAnalyzer: symbol;
|
|
29
|
+
readonly ScriptAnalyzer: symbol;
|
|
30
|
+
readonly SchemaInferenceService: symbol;
|
|
31
|
+
readonly OpenApiExporter: symbol;
|
|
32
|
+
readonly OpenApiImporter: symbol;
|
|
33
|
+
};
|
|
34
|
+
export type ServiceIdentifier = typeof ServiceIdentifiers[keyof typeof ServiceIdentifiers];
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Platform-agnostic — uses IKeyValueStore for persistence instead of
|
|
5
5
|
* VS Code's workspaceState/globalState.
|
|
6
6
|
*/
|
|
7
|
-
import { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from './interfaces';
|
|
8
|
-
import { IKeyValueStore } from '../types/platform';
|
|
9
7
|
import { IConfigService } from '../config';
|
|
8
|
+
import { IKeyValueStore } from '../types/platform';
|
|
9
|
+
import { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from './interfaces';
|
|
10
10
|
export declare class EnvironmentConfigService implements IEnvironmentConfigService {
|
|
11
11
|
private workspaceFolder;
|
|
12
12
|
private workspaceStore;
|
|
@@ -69,9 +69,12 @@ export declare class EnvironmentConfigService implements IEnvironmentConfigServi
|
|
|
69
69
|
importPostmanEnvironmentFile(filePath: string): ImportedEnvironment;
|
|
70
70
|
saveEnvLocalConfig(envName: string, variables: Record<string, string>): void;
|
|
71
71
|
getEnvLocalPath(envName: string): string;
|
|
72
|
-
private isSystemEnvironmentFile;
|
|
73
72
|
private getEnvLocalConfigPath;
|
|
74
73
|
private loadFolderConfigs;
|
|
74
|
+
/**
|
|
75
|
+
* Create a VariableResolver pre-loaded with environment + session variables.
|
|
76
|
+
*/
|
|
77
|
+
private createResolver;
|
|
75
78
|
private saveFolderSharedConfig;
|
|
76
79
|
reload(): void;
|
|
77
80
|
getAllEnvironments(): Array<{
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment File Loader
|
|
3
|
+
*
|
|
4
|
+
* Shared logic for reading the multi-file environment folder format:
|
|
5
|
+
* _global.json — global variables + default headers
|
|
6
|
+
* {env}.json — per-environment variables
|
|
7
|
+
* _global.local.json — local variable overrides (gitignored)
|
|
8
|
+
* {env}.local.json — per-environment local overrides (gitignored)
|
|
9
|
+
*
|
|
10
|
+
* Used by both EnvironmentConfigService (extension) and
|
|
11
|
+
* ForgeContainer.fromForgeRoot (standalone).
|
|
12
|
+
*/
|
|
13
|
+
export interface EnvironmentFolderData {
|
|
14
|
+
/** Variables available in all environments */
|
|
15
|
+
globalVariables: Record<string, string>;
|
|
16
|
+
/** Default headers sent with every request */
|
|
17
|
+
defaultHeaders: Record<string, string>;
|
|
18
|
+
/** Per-environment configs keyed by environment name */
|
|
19
|
+
environments: Record<string, EnvironmentEntry>;
|
|
20
|
+
/** Local global variable overrides from _global.local.json */
|
|
21
|
+
localVariables: Record<string, string>;
|
|
22
|
+
/** Per-environment local variable overrides from {env}.local.json */
|
|
23
|
+
localCredentials: Record<string, {
|
|
24
|
+
variables: Record<string, string>;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
27
|
+
export interface EnvironmentEntry {
|
|
28
|
+
description?: string;
|
|
29
|
+
requiresConfirmation?: boolean;
|
|
30
|
+
variables: Record<string, string>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Determine whether a filename is a system/meta file (not an environment file).
|
|
34
|
+
*/
|
|
35
|
+
export declare function isSystemEnvironmentFile(fileName: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Load environment configuration from a multi-file folder.
|
|
38
|
+
*
|
|
39
|
+
* @param envDir - Absolute path to the environments folder
|
|
40
|
+
* @returns Parsed environment data (or empty defaults when the folder is missing)
|
|
41
|
+
*/
|
|
42
|
+
export declare function loadEnvironmentsFromFolder(envDir: string): EnvironmentFolderData;
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
* env.get('token'); // 'abc'
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
|
-
import { IEnvironmentStore, IVariableInterpolator } from './interfaces';
|
|
34
33
|
import { EnvironmentResolver } from './environment-resolver';
|
|
34
|
+
import { IEnvironmentStore, IVariableInterpolator } from './interfaces';
|
|
35
35
|
/**
|
|
36
36
|
* ForgeEnv interface - the public API for environment management
|
|
37
37
|
*/
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* Extracted from extension's request-execution/collection-request-executor.ts.
|
|
11
11
|
* Platform-independent — no vscode dependency.
|
|
12
12
|
*/
|
|
13
|
-
import { ExecutionRequest, ExecutionResult, PreparedRequest, RequestScripts } from '../types/types';
|
|
14
|
-
import { ICookieJar, IScriptExecutor } from '../script/interfaces';
|
|
15
13
|
import { IEnvironmentConfigService } from '../environment/interfaces';
|
|
16
|
-
import { ConsoleOutputCallback, ICollectionRequestExecutor } from './collection-request-executor-interfaces';
|
|
17
14
|
import { IHttpRequestService } from '../http/interfaces';
|
|
15
|
+
import { ICookieJar, IScriptExecutor } from '../script/interfaces';
|
|
16
|
+
import { ExecutionRequest, ExecutionResult, PreparedRequest, RequestScripts } from '../types/types';
|
|
17
|
+
import { ConsoleOutputCallback, ICollectionRequestExecutor } from './collection-request-executor-interfaces';
|
|
18
18
|
import { IRequestPreparer } from './request-preparer-interfaces';
|
|
19
19
|
/**
|
|
20
20
|
* Enhanced implementation with Postman parity.
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Single Responsibility: Orchestrate the complete request execution flow
|
|
5
5
|
* Facade Pattern: Provides simplified interface to complex subsystem
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import { IScriptExecutor } from '../script/interfaces';
|
|
7
|
+
import { IForgeEnv } from '../environment/forge-env';
|
|
9
8
|
import { IRequestPreprocessor } from '../http/request-preprocessor';
|
|
9
|
+
import { IScriptExecutor } from '../script/interfaces';
|
|
10
|
+
import { IHttpClient } from '../types/platform';
|
|
10
11
|
import { HttpRequest, HttpResponse, RequestOverrides, ScriptResult, UnifiedCollection, UnifiedRequest } from '../types/types';
|
|
11
|
-
import { IForgeEnv } from '../environment/forge-env';
|
|
12
12
|
/**
|
|
13
13
|
* Options for request execution
|
|
14
14
|
*/
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Used by both Request Tester (manual) and Collection Runner (batch).
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
import { ExecutionRequest, PreparedRequest } from '../types/types';
|
|
12
|
+
import { IOAuth2TokenManager } from '../auth/interfaces';
|
|
14
13
|
import { IEnvironmentConfigService, ResolvedEnvironment } from '../environment/interfaces';
|
|
15
14
|
import { IHttpRequestService } from '../http/interfaces';
|
|
16
|
-
import {
|
|
15
|
+
import { IRequestPreprocessor } from '../http/request-preprocessor';
|
|
17
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
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Based on VS Code plugin's RequestHistoryService logic,
|
|
8
8
|
* but adapted for storage-agnostic design.
|
|
9
9
|
*/
|
|
10
|
-
import { FullResponse, HistoryEntry, IRequestHistory } from './history-interfaces';
|
|
11
10
|
import { HttpRequest, HttpResponse } from '../types/types';
|
|
11
|
+
import { FullResponse, HistoryEntry, IRequestHistory } from './history-interfaces';
|
|
12
12
|
/**
|
|
13
13
|
* In-memory request history storage
|
|
14
14
|
*
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* - Open/Closed: Extended through interceptor chain
|
|
16
16
|
* - Dependency Inversion: Depends on IHttpClient, IUrlBuilder, IInterceptorChain, IRequestPreprocessor
|
|
17
17
|
*/
|
|
18
|
-
import { IInterceptorChain } from './interceptor-chain';
|
|
19
|
-
import { HttpRequestOptions, HttpResponse } from '../types/types';
|
|
20
18
|
import type { IHttpClient } from '../types/platform';
|
|
19
|
+
import { HttpRequestOptions, HttpResponse } from '../types/types';
|
|
20
|
+
import { IInterceptorChain } from './interceptor-chain';
|
|
21
21
|
import { IHttpRequestService } from './interfaces';
|
|
22
22
|
import { IUrlBuilder } from './url-builder';
|
|
23
23
|
export declare class HttpRequestService implements IHttpRequestService {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Pure function — no platform dependencies.
|
|
8
8
|
*/
|
|
9
|
-
import { IFileSystem } from '../types/platform';
|
|
10
9
|
import { ImportedEnvironment } from '../environment/interfaces';
|
|
10
|
+
import { IFileSystem } from '../types/platform';
|
|
11
11
|
export type { ImportedEnvironment } from '../environment/interfaces';
|
|
12
12
|
/**
|
|
13
13
|
* Parse Postman environment JSON content.
|
package/dist/index.d.ts
CHANGED
|
@@ -18,72 +18,78 @@
|
|
|
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 './
|
|
24
|
+
export * from './types/platform';
|
|
25
|
+
export * from './types/types';
|
|
25
26
|
export { CookieJar } from './cookie/cookie-jar';
|
|
27
|
+
export { CookieService } from './cookie/cookie-service';
|
|
26
28
|
export { CookieUtils } from './cookie/cookie-utils';
|
|
27
29
|
export { InMemoryCookieJar } from './cookie/in-memory-cookie-jar';
|
|
30
|
+
export * from './cookie/interfaces';
|
|
28
31
|
export { PersistentCookieJar } from './cookie/persistent-cookie-jar';
|
|
29
|
-
export { CookieService } from './cookie/cookie-service';
|
|
30
|
-
export type { IHttpRequestService } from './http/interfaces';
|
|
31
32
|
export { FetchHttpClient } from './http/fetch-http-client';
|
|
32
|
-
export {
|
|
33
|
+
export { HttpRequestService } from './http/http-request-service';
|
|
33
34
|
export { InterceptorChain, LoggingRequestInterceptor, RetryErrorInterceptor, TimingResponseInterceptor } from './http/interceptor-chain';
|
|
34
|
-
export type { IErrorInterceptor, IInterceptorChain,
|
|
35
|
+
export type { IErrorInterceptor, IInterceptorChain, IRequestInterceptor, IResponseInterceptor, InterceptorContext } from './http/interceptor-chain';
|
|
36
|
+
export type { IHttpRequestService } from './http/interfaces';
|
|
35
37
|
export { mergeRequestSettings } from './http/merge-request-settings';
|
|
38
|
+
export { DEFAULT_REQUEST_SETTINGS, NodeHttpClient } from './http/native-http-client';
|
|
36
39
|
export { RequestPreprocessor } from './http/request-preprocessor';
|
|
37
40
|
export type { IRequestPreprocessor } from './http/request-preprocessor';
|
|
38
|
-
export { HttpRequestService } from './http/http-request-service';
|
|
39
41
|
export { UrlBuilder } from './http/url-builder';
|
|
40
42
|
export type { IUrlBuilder } from './http/url-builder';
|
|
41
43
|
export * from './script/interfaces';
|
|
42
|
-
export {
|
|
44
|
+
export { ModuleLoader, createLodashShim, createModuleLoader, createMomentShim } from './script/module-loader';
|
|
45
|
+
export type { ModuleLoaderOptions } from './script/module-loader';
|
|
43
46
|
export { RequestScriptSession } from './script/request-script-session';
|
|
44
47
|
export type { SessionDependencies } from './script/request-script-session';
|
|
48
|
+
export { ScriptExecutor } from './script/script-executor';
|
|
45
49
|
export { createExpectChain, createResponseObject } from './script/script-factories';
|
|
46
50
|
export type { ExpectChain, ResponseAssertions, ScriptResponse } from './script/script-factories';
|
|
47
51
|
export { concatenateScripts, createScriptConsole, createTestFunction, formatConsoleOutput, hasChanged, normalizeHeaders } from './script/script-utils';
|
|
48
52
|
export type { ConsoleMessage } from './script/script-utils';
|
|
49
|
-
export { ModuleLoader, createLodashShim, createModuleLoader, createMomentShim } from './script/module-loader';
|
|
50
|
-
export type { ModuleLoaderOptions } from './script/module-loader';
|
|
51
|
-
export * from './collection/interfaces';
|
|
52
53
|
export { CollectionLoader } from './collection/collection-loader';
|
|
53
54
|
export type { LoadOptions } from './collection/collection-loader';
|
|
54
55
|
export { CollectionLoaderFactory } from './collection/collection-loader-factory';
|
|
55
56
|
export { CollectionService } from './collection/collection-service';
|
|
56
|
-
export { FolderCollectionLoader
|
|
57
|
+
export { FolderCollectionLoader } from './collection/folder-collection-loader';
|
|
57
58
|
export { FolderCollectionStore } from './collection/folder-collection-store';
|
|
59
|
+
export * from './collection/folder-io';
|
|
60
|
+
export { generateSlug } from './collection/folder-io';
|
|
61
|
+
export * from './collection/interfaces';
|
|
58
62
|
export { JsonCollectionLoader } from './collection/json-collection-loader';
|
|
59
63
|
export { ParserRegistry } from './collection/parser-registry';
|
|
60
|
-
export * from './environment/interfaces';
|
|
61
64
|
export { EnvironmentConfigService } from './environment/environment-config-service';
|
|
65
|
+
export { isSystemEnvironmentFile, loadEnvironmentsFromFolder } from './environment/environment-file-loader';
|
|
66
|
+
export type { EnvironmentEntry, EnvironmentFolderData } from './environment/environment-file-loader';
|
|
62
67
|
export { EnvironmentResolver } from './environment/environment-resolver';
|
|
63
68
|
export type { Environment, EnvironmentStoreConfig } from './environment/environment-resolver';
|
|
64
69
|
export { ForgeEnv } from './environment/forge-env';
|
|
65
70
|
export type { IForgeEnv } from './environment/forge-env';
|
|
71
|
+
export * from './environment/interfaces';
|
|
66
72
|
export { VariableInterpolator, VariableResolver, createVariableResolver } from './environment/variable-interpolator';
|
|
67
73
|
export type { VariableResolverConfig } from './environment/variable-interpolator';
|
|
68
|
-
export * from './execution/collection-request-executor-interfaces';
|
|
69
|
-
export * from './execution/request-preparer-interfaces';
|
|
70
74
|
export { CollectionRequestExecutor } from './execution/collection-request-executor';
|
|
75
|
+
export * from './execution/collection-request-executor-interfaces';
|
|
71
76
|
export { RequestExecutor } from './execution/request-executor';
|
|
72
77
|
export type { ExecuteOptions, ExecuteResult } from './execution/request-executor';
|
|
73
78
|
export { RequestPreparer } from './execution/request-preparer';
|
|
79
|
+
export * from './execution/request-preparer-interfaces';
|
|
74
80
|
export * from './history/history-interfaces';
|
|
75
|
-
export type { IRequestHistoryService, IResponseStorage } from './history/request-history-service-interfaces';
|
|
76
81
|
export { RequestHistoryStore } from './history/request-history';
|
|
77
82
|
export { RequestHistoryService } from './history/request-history-service';
|
|
83
|
+
export type { IRequestHistoryService, IResponseStorage } from './history/request-history-service-interfaces';
|
|
78
84
|
export * from './auth/interfaces';
|
|
79
85
|
export { OAuth2TokenManager } from './auth/oauth2-token-manager';
|
|
80
86
|
export { getCompletions, parseQueryContext } from './graphql/graphql-completion-provider';
|
|
81
87
|
export type { CompletionItem, ContextType, QueryContext } from './graphql/graphql-completion-provider';
|
|
82
88
|
export { GraphQLSchemaService } from './graphql/graphql-schema-service';
|
|
83
89
|
export type { GraphQLDirective, GraphQLField, GraphQLOperation, GraphQLSchema, GraphQLType, IGraphQLSchemaService } from './graphql/graphql-schema-service';
|
|
84
|
-
export * from './openapi/interfaces';
|
|
85
90
|
export { ExampleGenerator, HistoryAnalyzer, OpenApiExporter, OpenApiImporter, RefResolver, SchemaInferenceService, SchemaInferrer, ScriptAnalyzer } from './openapi';
|
|
86
91
|
export type { OpenApiExportOptions, OpenApiImportOptions, ScriptAnalysisResult } from './openapi';
|
|
92
|
+
export * from './openapi/interfaces';
|
|
87
93
|
export { CONFIG_FILES, ConfigService, DEFAULT_CONFIG, ROOT_DIRECTORIES } from './config';
|
|
88
94
|
export type { EnvironmentsConfig, HttpForgeConfig, IConfigService, ProxyConfig, RequestConfig, RestClientExportConfig, RunnerConfig, ScriptsConfig, StorageConfig } from './config';
|
|
89
95
|
export { DEFAULT_SUITE_CONFIG } from './test-suite/interfaces';
|
|
@@ -100,9 +106,9 @@ export { HttpForgeParser } from './parsers';
|
|
|
100
106
|
export { parsePostmanEnvironment, parsePostmanEnvironmentFile } from './import-export/import-postman-environment';
|
|
101
107
|
export type { ImportedEnvironment } from './import-export/import-postman-environment';
|
|
102
108
|
export { exportCollectionToRestClient, getRestClientExportFolder, writeEnvFile, writeFolderItems, writeScriptFile } from './import-export/rest-client-export';
|
|
103
|
-
export { NodeFileSystem } from './platform/node-file-system';
|
|
104
109
|
export { DataFileParser } from './platform/data-file-parser';
|
|
105
110
|
export type { IDataFileParser } from './platform/data-file-parser';
|
|
111
|
+
export { NodeFileSystem } from './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';
|