@http-forge/core 1.0.4 → 1.0.5

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.
@@ -36,6 +36,12 @@ export declare class FolderCollectionStore implements ICollectionStore {
36
36
  private cache;
37
37
  private slugToIdMap;
38
38
  private idToSlugMap;
39
+ /**
40
+ * Lazily-derived item id → on-disk directory path index, per collection.
41
+ * Built from the in-memory tree (no extra disk I/O) so resolving a path for
42
+ * one item does not re-scan the whole collection folder for every lookup.
43
+ */
44
+ private itemPathIndex;
39
45
  /**
40
46
  * When true, `loadRequestFromDir` delegates to the light loader
41
47
  * (metadata only). Set only inside `loadAllLight()`; never left on.
@@ -235,6 +241,17 @@ export declare class FolderCollectionStore implements ICollectionStore {
235
241
  */
236
242
  private sortItemsByOrder;
237
243
  private findItemPath;
244
+ /**
245
+ * Resolve an item directory from the in-memory tree using a per-collection
246
+ * id→path index. The index is derived (no disk I/O) and rebuilt when a
247
+ * cached path disappears after a move/rename.
248
+ */
249
+ private findIndexedItemPath;
250
+ /**
251
+ * Build the id→directory index for one collection from its in-memory tree.
252
+ * Uses `idToSlugMap` for each segment, matching the names written on disk.
253
+ */
254
+ private buildItemPathIndex;
238
255
  /**
239
256
  * Build the on-disk slug path (root → item) for the given item id by walking the
240
257
  * in-memory collection tree. Each segment is resolved via idToSlugMap so it matches
@@ -193,6 +193,11 @@ export declare class TestSuiteStore implements ITestSuiteStore {
193
193
  slug?: string;
194
194
  description?: string;
195
195
  }>;
196
+ /**
197
+ * Index a collection's request items by id from the in-memory tree only.
198
+ * Never triggers heavy-field hydration — used for display resolution.
199
+ */
200
+ private indexRequestsById;
196
201
  /**
197
202
  * Get selected requests in order
198
203
  * Always resolves fresh from collection service to ensure latest data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@http-forge/core",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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",
@@ -107,7 +107,7 @@
107
107
  "@types/uuid": "^9.0.7",
108
108
  "@types/ws": "^8.18.2",
109
109
  "esbuild": "0.28.2",
110
- "rimraf": "^5.0.5",
110
+ "rimraf": "^6.1.4",
111
111
  "tsup": "^8.0.1",
112
112
  "typescript": "^5.3.0",
113
113
  "vitest": "^4.1.9"
@@ -120,5 +120,8 @@
120
120
  "homepage": "https://github.com/hsl1230/http-forge.core",
121
121
  "bugs": {
122
122
  "url": "https://github.com/hsl1230/http-forge.core/issues"
123
+ },
124
+ "allowScripts": {
125
+ "esbuild@0.28.2": true
123
126
  }
124
127
  }