@http-forge/core 0.3.2 → 0.4.0
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 +12 -1
- package/dist/di/service-container.d.ts +4 -2
- package/dist/di/service-identifiers.d.ts +2 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +270 -267
- package/dist/index.mjs +272 -269
- package/dist/infrastructure/config/config.interface.d.ts +32 -0
- package/dist/infrastructure/environment/environment-config-service.d.ts +26 -2
- package/dist/infrastructure/environment/environment-file-loader.d.ts +5 -0
- package/dist/infrastructure/execution/request-preparer.d.ts +3 -1
- package/dist/infrastructure/secrets/aws-secret-resolver.d.ts +18 -0
- package/dist/infrastructure/secrets/azure-keyvault-resolver.d.ts +20 -0
- package/dist/infrastructure/secrets/doppler-resolver.d.ts +22 -0
- package/dist/infrastructure/secrets/gcp-secret-resolver.d.ts +21 -0
- package/dist/infrastructure/secrets/hashicorp-vault-resolver.d.ts +25 -0
- package/dist/infrastructure/secrets/onepassword-resolver.d.ts +26 -0
- package/dist/infrastructure/secrets/secret-resolver-registry.d.ts +43 -0
- package/dist/infrastructure/security/sensitive-data-redactor.d.ts +11 -0
- package/dist/runtime/direct-execution.d.ts +27 -0
- package/dist/runtime/mcp-runtime.d.ts +19 -0
- package/dist/runtime/node-adapters.d.ts +24 -0
- package/dist/runtime/node-bootstrap.d.ts +29 -0
- package/dist/runtime/runtime-contracts.d.ts +125 -0
- package/dist/types/environment-config.d.ts +13 -0
- package/dist/types/secret-resolver.d.ts +106 -0
- package/package.json +13 -1
package/README.md
CHANGED
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
- 📝 **JavaScript Scripting** - Pre-request and post-response scripts with full `pm.*` API (variables, assertions, execution flow, visualizer)
|
|
15
15
|
- 🔄 **Dynamic Variables** - Built-in generators: `{{$randomInt}}`, `{{$timestamp}}`, `{{$uuid}}`, `{{$guid}}`, etc.
|
|
16
16
|
- 🌍 **Environments** - Full variable scoping (globals, collection, environment, session, iterationData)
|
|
17
|
-
-
|
|
17
|
+
- � **Cloud Secret Resolvers** - Resolve `{{secret:alias/path}}` from AWS Secrets Manager, Azure Key Vault, Google Secret Manager, HashiCorp Vault, 1Password, and Doppler; credentials read from the ambient environment, never from config
|
|
18
|
+
- �👁️ **File Watching** - Automatic reload on collection/environment file changes with notification callbacks
|
|
18
19
|
- 🍪 **Cookie Persistence** - Automatic cookie storage and reuse, `pm.cookies.jar()` and `.toObject()`
|
|
19
20
|
- 📊 **Test Assertions** - BDD-style testing with `pm.test()` (sync/async) and full Chai `expect()` chains
|
|
20
21
|
- 🔐 **CryptoJS** - Full crypto library: hash, HMAC, AES/DES/TripleDES, PBKDF2, encoding helpers
|
|
@@ -42,6 +43,16 @@ Or using the tarball:
|
|
|
42
43
|
npm install ./http-forge-core-0.1.0.tgz
|
|
43
44
|
```
|
|
44
45
|
|
|
46
|
+
## Runtime APIs (Headless + MCP)
|
|
47
|
+
|
|
48
|
+
For current programmatic runtime APIs, see [RUNTIME-API.md](RUNTIME-API.md):
|
|
49
|
+
- `runRequest(options)`
|
|
50
|
+
- `runCollection(options)`
|
|
51
|
+
- `runSuite(options)`
|
|
52
|
+
- `createMcpRuntime(options)`
|
|
53
|
+
|
|
54
|
+
This covers direct execution, embeddable MCP runtime lifecycle, response include options, and report behavior.
|
|
55
|
+
|
|
45
56
|
## ⚡ Quick Start
|
|
46
57
|
|
|
47
58
|
### Basic Usage
|
|
@@ -18,12 +18,13 @@ import type { IConsoleService } from '../types/console-service';
|
|
|
18
18
|
import type { IHttpClient } from '../types/platform';
|
|
19
19
|
import type { ServiceIdentifier } from './service-identifiers';
|
|
20
20
|
import type { IOAuth2TokenManager } from '../infrastructure/auth/interfaces';
|
|
21
|
-
import type { ICollectionService } from '../types/collection';
|
|
22
21
|
import type { IConfigService } from '../infrastructure/config';
|
|
23
|
-
import type { IEnvironmentConfigService } from '../types/environment-config';
|
|
24
22
|
import type { IGraphQLSchemaService } from '../infrastructure/graphql/graphql-schema-service';
|
|
25
23
|
import type { IDataFileParser } from '../infrastructure/platform/data-file-parser';
|
|
26
24
|
import type { ICookieJar } from '../infrastructure/script/interfaces';
|
|
25
|
+
import type { ITestSuiteService } from '../infrastructure/test-suite/interfaces';
|
|
26
|
+
import type { ICollectionService } from '../types/collection';
|
|
27
|
+
import type { IEnvironmentConfigService } from '../types/environment-config';
|
|
27
28
|
/**
|
|
28
29
|
* Factory function type for creating services
|
|
29
30
|
*/
|
|
@@ -89,6 +90,7 @@ export declare class ServiceContainer {
|
|
|
89
90
|
get persistentCookieJar(): ICookieJar;
|
|
90
91
|
get oauth2TokenManager(): IOAuth2TokenManager;
|
|
91
92
|
get graphqlSchemaService(): IGraphQLSchemaService;
|
|
93
|
+
get testSuite(): ITestSuiteService;
|
|
92
94
|
}
|
|
93
95
|
/**
|
|
94
96
|
* Convenience function to get the service container instance
|
|
@@ -13,6 +13,7 @@ export declare const ServiceIdentifiers: {
|
|
|
13
13
|
readonly HttpClient: symbol;
|
|
14
14
|
readonly Cookie: symbol;
|
|
15
15
|
readonly RequestHistory: symbol;
|
|
16
|
+
readonly TestSuite: symbol;
|
|
16
17
|
readonly UrlBuilder: symbol;
|
|
17
18
|
readonly RequestPreprocessor: symbol;
|
|
18
19
|
readonly RequestPreparer: symbol;
|
|
@@ -30,5 +31,6 @@ export declare const ServiceIdentifiers: {
|
|
|
30
31
|
readonly SchemaInferenceService: symbol;
|
|
31
32
|
readonly OpenApiExporter: symbol;
|
|
32
33
|
readonly OpenApiImporter: symbol;
|
|
34
|
+
readonly SecretResolverRegistry: symbol;
|
|
33
35
|
};
|
|
34
36
|
export type ServiceIdentifier = typeof ServiceIdentifiers[keyof typeof ServiceIdentifiers] | string;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,10 @@ export { ForgeContainer } from './container';
|
|
|
20
20
|
export type { ForgeContainerOptions, StorageFormat } from './container';
|
|
21
21
|
export { getServiceContainer, registerCoreServices, ServiceContainer, ServiceIdentifiers } from './di';
|
|
22
22
|
export type { PlatformAdapters, ServiceIdentifier } from './di';
|
|
23
|
+
export { createMcpRuntime, runCollection, runRequest, runSuite } from './runtime/runtime-contracts';
|
|
24
|
+
export type { McpRuntimeHandle, McpRuntimeOptions, RunCollectionOptions, RunRequestOptions, RunSuiteOptions } from './runtime/runtime-contracts';
|
|
25
|
+
export { bootstrapNodeRuntime, createNodeContainer } from './runtime/node-bootstrap';
|
|
26
|
+
export type { NodeBootstrapOptions } from './runtime/node-bootstrap';
|
|
23
27
|
export * from './types/console-service';
|
|
24
28
|
export * from './types/platform';
|
|
25
29
|
export * from './types/types';
|
|
@@ -72,7 +76,7 @@ export { ForgeEnv } from './infrastructure/environment/forge-env';
|
|
|
72
76
|
export type { IForgeEnv } from './infrastructure/environment/forge-env';
|
|
73
77
|
export { createVariableResolver, VariableInterpolator, VariableResolver } from './infrastructure/environment/variable-interpolator';
|
|
74
78
|
export type { VariableResolverConfig } from './infrastructure/environment/variable-interpolator';
|
|
75
|
-
export type { IEnvironmentConfigService, ResolvedEnvironment } from './types/environment-config';
|
|
79
|
+
export type { IEnvironmentConfigService, LocalConfig, ResolvedEnvironment, SharedConfig } from './types/environment-config';
|
|
76
80
|
export { CollectionRequestExecutor } from './infrastructure/execution/collection-request-executor';
|
|
77
81
|
export * from './infrastructure/execution/collection-request-executor-interfaces';
|
|
78
82
|
export { RequestExecutor } from './infrastructure/execution/request-executor';
|
|
@@ -112,6 +116,14 @@ export { exportCollectionToRestClient, getRestClientExportFolder, writeEnvFile,
|
|
|
112
116
|
export { DataFileParser } from './infrastructure/platform/data-file-parser';
|
|
113
117
|
export type { IDataFileParser } from './infrastructure/platform/data-file-parser';
|
|
114
118
|
export { NodeFileSystem } from './infrastructure/platform/node-file-system';
|
|
119
|
+
export { AwsSecretResolver } from './infrastructure/secrets/aws-secret-resolver';
|
|
120
|
+
export { AzureKeyVaultResolver } from './infrastructure/secrets/azure-keyvault-resolver';
|
|
121
|
+
export { DopplerResolver } from './infrastructure/secrets/doppler-resolver';
|
|
122
|
+
export { GcpSecretResolver } from './infrastructure/secrets/gcp-secret-resolver';
|
|
123
|
+
export { HashiCorpVaultResolver } from './infrastructure/secrets/hashicorp-vault-resolver';
|
|
124
|
+
export { OnePasswordResolver } from './infrastructure/secrets/onepassword-resolver';
|
|
125
|
+
export { SecretResolverRegistry } from './infrastructure/secrets/secret-resolver-registry';
|
|
126
|
+
export type { DopplerConfig, GcpSecretsConfig, ISecretResolver, SecretProviderConfig, SecretsConfig } from './types/secret-resolver';
|
|
115
127
|
export { augmentWithDynamicVars, DYNAMIC_VARIABLES, resolveDynamicVariable, resolveDynamicVariablesInString } from './utils/dynamic-variables';
|
|
116
128
|
export { evaluateExpression, isExpression } from './utils/expression-evaluator';
|
|
117
129
|
export { applyFilterChain, parseFilterChain } from './utils/filter-engine';
|