@http-forge/core 0.3.3 → 0.4.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.
Files changed (28) hide show
  1. package/README.md +2 -1
  2. package/dist/di/service-container.d.ts +1 -1
  3. package/dist/di/service-identifiers.d.ts +1 -0
  4. package/dist/index.d.ts +9 -1
  5. package/dist/index.js +573 -277
  6. package/dist/index.mjs +573 -277
  7. package/dist/infrastructure/config/config.interface.d.ts +32 -0
  8. package/dist/infrastructure/environment/environment-config-service.d.ts +29 -17
  9. package/dist/infrastructure/environment/environment-file-loader.d.ts +5 -0
  10. package/dist/infrastructure/execution/request-executor.d.ts +2 -4
  11. package/dist/infrastructure/execution/request-preparer.d.ts +3 -1
  12. package/dist/infrastructure/script/interfaces.d.ts +1 -2
  13. package/dist/infrastructure/script/script-executor.d.ts +10 -1
  14. package/dist/infrastructure/script/script-factories.d.ts +25 -0
  15. package/dist/infrastructure/secrets/aws-secret-resolver.d.ts +18 -0
  16. package/dist/infrastructure/secrets/azure-keyvault-resolver.d.ts +20 -0
  17. package/dist/infrastructure/secrets/doppler-resolver.d.ts +22 -0
  18. package/dist/infrastructure/secrets/gcp-secret-resolver.d.ts +21 -0
  19. package/dist/infrastructure/secrets/hashicorp-vault-resolver.d.ts +25 -0
  20. package/dist/infrastructure/secrets/onepassword-resolver.d.ts +26 -0
  21. package/dist/infrastructure/secrets/secret-resolver-registry.d.ts +43 -0
  22. package/dist/infrastructure/test-suite/html-report-generator.d.ts +24 -1
  23. package/dist/infrastructure/test-suite/result-storage-service.d.ts +1 -1
  24. package/dist/infrastructure/test-suite/result-storage.d.ts +45 -3
  25. package/dist/types/environment-config.d.ts +16 -7
  26. package/dist/types/secret-resolver.d.ts +106 -0
  27. package/dist/types/types.d.ts +6 -0
  28. package/package.json +13 -1
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Cloud Secret Resolver — Phase 3
3
+ *
4
+ * Defines the ISecretResolver abstraction and the per-provider configuration
5
+ * types used in http-forge.config.json under the `secrets` key.
6
+ *
7
+ * Token syntax resolved by this interface: {{secret:provider/path}}
8
+ * e.g. {{secret:aws/myapp/prod/db-password}}
9
+ * {{secret:azure/https://myvault.vault.azure.net/secrets/apiKey}}
10
+ * {{secret:vault/secret/data/myapp#password}}
11
+ * {{secret:1password/MyVault/MyItem/password}}
12
+ *
13
+ * Credentials are NEVER stored in HTTP Forge config.
14
+ * Each provider uses its SDK's default credential chain:
15
+ * - AWS → SDK credential chain (env vars / ~/.aws / IAM role)
16
+ * - Azure → DefaultAzureCredential (env / managed identity / CLI login)
17
+ * - Vault → VAULT_TOKEN / VAULT_ADDR env vars
18
+ * - 1Password → OP_SERVICE_ACCOUNT_TOKEN env var
19
+ */
20
+ export interface ISecretResolver {
21
+ /**
22
+ * Resolve a secret by its provider-relative path.
23
+ * @param path The path after the provider prefix, e.g. "myapp/prod/apiKey"
24
+ * @returns The plaintext secret value, or undefined if not found
25
+ */
26
+ resolve(path: string): Promise<string | undefined>;
27
+ /**
28
+ * Human-readable provider name, e.g. "aws", "azure", "vault", "1password"
29
+ */
30
+ readonly providerName: string;
31
+ }
32
+ export interface AwsSecretsConfig {
33
+ provider: 'aws';
34
+ /** AWS region, e.g. "us-east-1". Falls back to AWS_DEFAULT_REGION env var. */
35
+ region?: string;
36
+ }
37
+ export interface AzureKeyVaultConfig {
38
+ provider: 'azure';
39
+ /**
40
+ * Key Vault URL, e.g. "https://myvault.vault.azure.net"
41
+ * The path portion of the token is used as the secret name.
42
+ */
43
+ vaultUrl: string;
44
+ }
45
+ export interface HashiCorpVaultConfig {
46
+ provider: 'vault';
47
+ /**
48
+ * Vault server address, e.g. "https://vault.example.com:8200"
49
+ * Falls back to VAULT_ADDR env var.
50
+ */
51
+ address?: string;
52
+ /** Mount path prefix, e.g. "secret". Defaults to "secret". */
53
+ mountPath?: string;
54
+ /**
55
+ * Vault namespace (Enterprise / HCP Vault), e.g. "admin" or "admin/team-a".
56
+ * Sent as the X-Vault-Namespace header. Falls back to VAULT_NAMESPACE env var.
57
+ */
58
+ namespace?: string;
59
+ }
60
+ export interface OnePasswordConfig {
61
+ provider: '1password';
62
+ /**
63
+ * Vault name to search, e.g. "MyVault".
64
+ * If omitted, the path is expected to include vault/item/field.
65
+ */
66
+ vault?: string;
67
+ }
68
+ export interface GcpSecretsConfig {
69
+ provider: 'gcp';
70
+ /**
71
+ * GCP project ID, e.g. "my-project-123".
72
+ * Falls back to GOOGLE_CLOUD_PROJECT / GCLOUD_PROJECT env vars.
73
+ */
74
+ projectId?: string;
75
+ }
76
+ export interface DopplerConfig {
77
+ provider: 'doppler';
78
+ /**
79
+ * Doppler service token. Falls back to DOPPLER_TOKEN env var.
80
+ * The project/config are baked into the service token itself.
81
+ */
82
+ serviceToken?: string;
83
+ }
84
+ export type SecretProviderConfig = AwsSecretsConfig | AzureKeyVaultConfig | HashiCorpVaultConfig | OnePasswordConfig | GcpSecretsConfig | DopplerConfig;
85
+ /**
86
+ * Top-level `secrets` block in http-forge.config.json
87
+ */
88
+ export interface SecretsConfig {
89
+ /**
90
+ * Named provider configs. Keys are provider aliases used in the token:
91
+ * {{secret:<alias>/<path>}}
92
+ *
93
+ * Example:
94
+ * ```json
95
+ * {
96
+ * "secrets": {
97
+ * "providers": {
98
+ * "aws": { "provider": "aws", "region": "us-east-1" },
99
+ * "vault": { "provider": "vault", "address": "https://vault.example.com" }
100
+ * }
101
+ * }
102
+ * }
103
+ * ```
104
+ */
105
+ providers: Record<string, SecretProviderConfig>;
106
+ }
@@ -292,6 +292,8 @@ export interface TestAssertion {
292
292
  name: string;
293
293
  passed: boolean;
294
294
  message?: string;
295
+ /** True when the test was explicitly skipped via pm.test.skip(...) */
296
+ skipped?: boolean;
295
297
  }
296
298
  /**
297
299
  * Request overrides that can be applied at runtime
@@ -619,6 +621,10 @@ export interface ExecutionResult {
619
621
  modifiedCollectionVariables?: Record<string, string>;
620
622
  modifiedSessionVariables?: Record<string, string>;
621
623
  error?: string;
624
+ /** Folder path of the request within its collection (slash-separated; empty for root) */
625
+ folderPath?: string;
626
+ /** Name of the collection this request belongs to (for multi-collection suite reports) */
627
+ collectionName?: string;
622
628
  /** Postman-compatible: pm.execution.setNextRequest() value. null = stop runner. */
623
629
  nextRequest?: string | null;
624
630
  /** Postman-compatible: pm.visualizer.set(template, data) output */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@http-forge/core",
3
- "version": "0.3.3",
3
+ "version": "0.4.1",
4
4
  "description": "Headless HTTP testing engine with Postman collection support, dynamic variables, and script-based automation.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -59,6 +59,18 @@
59
59
  "uuid": "^14.0.0",
60
60
  "yaml": "^2.7.0"
61
61
  },
62
+ "peerDependencies": {
63
+ "@aws-sdk/client-secrets-manager": ">=3.0.0",
64
+ "@azure/keyvault-secrets": ">=4.0.0",
65
+ "@azure/identity": ">=3.0.0",
66
+ "node-vault": ">=0.9.0"
67
+ },
68
+ "peerDependenciesMeta": {
69
+ "@aws-sdk/client-secrets-manager": { "optional": true },
70
+ "@azure/keyvault-secrets": { "optional": true },
71
+ "@azure/identity": { "optional": true },
72
+ "node-vault": { "optional": true }
73
+ },
62
74
  "devDependencies": {
63
75
  "@types/lodash": "^4.14.202",
64
76
  "@types/node": "^20.10.0",