@http-forge/core 1.0.2 → 1.0.4

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.
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "lib",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "node --test"
7
+ },
8
+ "author": "",
9
+ "license": "ISC",
10
+ "description": "",
11
+ "dependencies": {
12
+ "yaml": "^2.8.2",
13
+ "lodash": "^4.17.21",
14
+ "moment": "^2.30.1",
15
+ "crypto-js": "^4.2.0",
16
+ "xml2js": "^0.6.2",
17
+ "tv4": "^1.3.0",
18
+ "ajv": "^8.17.1",
19
+ "cheerio": "^1.1.2"
20
+ },
21
+ "devDependencies": {
22
+ "@types/node": "^20.0.0",
23
+ "@types/lodash": "^4.17.0",
24
+ "@types/moment": "^2.13.0"
25
+ }
26
+ }
@@ -0,0 +1,23 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ > HTTP testing workspace powered by HTTP Forge.
4
+
5
+ ## AI Context
6
+ - Agent Guide: .http-forge/AGENTS.md (full reference for AI assistants)
7
+ - Script API: .http-forge/assets/http-forge-globals.d.ts (pm, ctx, hf, postman, etc.)
8
+ - Full docs: https://github.com/hsl1230/http-forge/tree/main/docs/user-guide
9
+
10
+ ## Key concepts
11
+ - Collections, requests, folders, environments, scripts (pre-request/post-response)
12
+ - Template syntax: {{variable}}, {{$guid}}, {{value | upper | trim}}
13
+ - Script API: pm/ctx/hf, pm.test(), pm.expect() (Chai-style), pm.response, pm.request
14
+ - Postman-compatible: pm.sendRequest, pm.setNextRequest, postman.* legacy globals
15
+ - MCP server for AI-driven testing
16
+ - Test suites with control flow (if/for/while/switch)
17
+
18
+ ## Quick reference
19
+ - Run collection: http-forge run collection <name> --env <env> --json
20
+ - Run suite: http-forge run suite <name> --json
21
+ - Discover endpoints: http-forge discover --path <project>
22
+ - Generate tests: http-forge qa --path <project> --collection <ref> --base-url <url>
23
+ - Design API: http-forge architect "intent" --apply
@@ -116,6 +116,7 @@ export interface IVariableManager {
116
116
  deleteGlobalVariable(key: string): void;
117
117
  clearGlobalVariables(): void;
118
118
  getGlobalVariables(): Record<string, string>;
119
+ getGlobalVariableLocals(): Record<string, string>;
119
120
  }
120
121
  /**
121
122
  * Full environment configuration service interface
@@ -117,6 +117,10 @@ export interface UnifiedRequest {
117
117
  export interface CollectionScripts {
118
118
  preRequest?: string;
119
119
  postResponse?: string;
120
+ /** Absolute file path of pre-request.js (for debugging / source mapping). */
121
+ preRequestPath?: string;
122
+ /** Absolute file path of post-response.js (for debugging / source mapping). */
123
+ postResponsePath?: string;
120
124
  }
121
125
  /**
122
126
  * Collection authentication configuration
@@ -749,9 +753,7 @@ export interface RequestAuth {
749
753
  /**
750
754
  * Request scripts configuration
751
755
  */
752
- export interface RequestScripts {
753
- preRequest?: string;
754
- postResponse?: string;
756
+ export interface RequestScripts extends CollectionScripts {
755
757
  }
756
758
  /**
757
759
  * Collection request - the on-disk/storage format
@@ -821,6 +823,7 @@ export interface ExecutionResult {
821
823
  assertions: TestAssertion[];
822
824
  consoleOutput?: string[];
823
825
  modifiedVariables?: Record<string, string>;
826
+ requestLocalWrites?: Record<string, string>;
824
827
  modifiedEnvironmentVariables?: Record<string, string>;
825
828
  modifiedCollectionVariables?: Record<string, string>;
826
829
  error?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@http-forge/core",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Headless Postman-compatible API testing engine for Node.js, CI/CD, OpenAPI workflows, and HTTP Forge automation",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",