@http-forge/core 0.2.3 → 0.2.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.
@@ -8,9 +8,9 @@
8
8
  * - ConfigService for configuration
9
9
  * - CollectionLoader for storage abstraction (supports folder and json formats)
10
10
  */
11
- import { IConfigService } from '../config';
12
- import { IFileWatcherFactory } from '../../types/platform';
13
11
  import type { Collection, CollectionItem, CollectionRequestItem, CreateRequestOptions, ICollectionService } from '../../types/collection';
12
+ import { IFileWatcherFactory } from '../../types/platform';
13
+ import { IConfigService } from '../config';
14
14
  /**
15
15
  * Service for managing HTTP Forge collections
16
16
  */
@@ -26,6 +26,11 @@ export declare class CollectionService implements ICollectionService {
26
26
  * In-memory Local Values for collection variables (not persisted)
27
27
  */
28
28
  private localCollectionValues;
29
+ /**
30
+ * Callback invoked when collections are reloaded due to file system changes.
31
+ * Set by the extension host to refresh tree views and panels.
32
+ */
33
+ onCollectionsChanged?: () => void;
29
34
  constructor(workspaceRoot: string, configService: IConfigService, fileWatcherFactory?: IFileWatcherFactory | undefined);
30
35
  private ensureCollectionsDir;
31
36
  private loadCollections;
@@ -9,9 +9,9 @@
9
9
  * All disk I/O is delegated to FolderCollectionStore — this class only
10
10
  * performs type conversion on the way in and out.
11
11
  */
12
+ import type { ICollectionLoader } from '../../types/collection';
12
13
  import type { CollectionScripts, UnifiedCollection, UnifiedFolder, UnifiedRequest } from '../../types/types';
13
14
  import type { CollectionMetadata } from './collection-store';
14
- import type { ICollectionLoader } from '../../types/collection';
15
15
  export { generateSlug } from './folder-io';
16
16
  type UnifiedItem = UnifiedFolder | UnifiedRequest;
17
17
  /**
@@ -4,13 +4,14 @@
4
4
  * Platform-agnostic — uses IKeyValueStore for persistence instead of
5
5
  * VS Code's workspaceState/globalState.
6
6
  */
7
- import { IConfigService } from '../config';
8
- import { IKeyValueStore } from '../../types/platform';
9
7
  import type { IEnvironmentConfigService, ImportedEnvironment, LocalConfig, ResolvedEnvironment, SharedConfig } from '../../types/environment-config';
8
+ import { IFileWatcherFactory, IKeyValueStore } from '../../types/platform';
9
+ import { IConfigService } from '../config';
10
10
  export declare class EnvironmentConfigService implements IEnvironmentConfigService {
11
11
  private workspaceFolder;
12
12
  private workspaceStore;
13
13
  private configService;
14
+ private fileWatcherFactory?;
14
15
  private environmentsPath;
15
16
  private sharedConfigPath;
16
17
  private localConfigPath;
@@ -18,6 +19,7 @@ export declare class EnvironmentConfigService implements IEnvironmentConfigServi
18
19
  private sharedConfig;
19
20
  private localConfig;
20
21
  private selectedEnvironment;
22
+ private fileWatcher?;
21
23
  /**
22
24
  * In-memory Local Values for variables (not persisted)
23
25
  * These are set via forge.*.set() in scripts and override file values
@@ -25,7 +27,14 @@ export declare class EnvironmentConfigService implements IEnvironmentConfigServi
25
27
  */
26
28
  private localGlobalValues;
27
29
  private localEnvironmentValues;
28
- constructor(workspaceFolder: string, workspaceStore: IKeyValueStore, configService: IConfigService);
30
+ /**
31
+ * Callback invoked when environment files change on disk.
32
+ * Set by the extension host to refresh tree views and panels.
33
+ */
34
+ onEnvironmentsChanged?: () => void;
35
+ constructor(workspaceFolder: string, workspaceStore: IKeyValueStore, configService: IConfigService, fileWatcherFactory?: IFileWatcherFactory | undefined);
36
+ private setupFileWatcher;
37
+ dispose(): void;
29
38
  getWorkspaceFolder(): string;
30
39
  getRootPath(): string;
31
40
  loadConfigs(): void;
@@ -48,6 +48,7 @@ export interface UnifiedRequest {
48
48
  id: string;
49
49
  name: string;
50
50
  description?: string;
51
+ doc?: string;
51
52
  method: string;
52
53
  url: string;
53
54
  /** Headers with per-header enabled/disabled flag and OpenAPI metadata */
@@ -542,6 +543,7 @@ export interface CollectionRequest {
542
543
  scripts?: RequestScripts;
543
544
  auth?: RequestAuth;
544
545
  description?: string;
546
+ doc?: string;
545
547
  disabled?: boolean;
546
548
  deprecated?: boolean;
547
549
  responseSchema?: ResponseSchemaDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@http-forge/core",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
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",