feat(FN-1400): add getPluginStore() lazy getter to TaskStore
- Add PluginStore lazy getter to TaskStore class - Update memory documentation with plugin foundation learnings
This commit is contained in:
@@ -10,6 +10,7 @@ import { GlobalSettingsStore } from "./global-settings.js";
|
||||
import { Database, toJson, toJsonNullable, fromJson } from "./db.js";
|
||||
import { detectLegacyData, migrateFromLegacy } from "./db-migrate.js";
|
||||
import { MissionStore } from "./mission-store.js";
|
||||
import { PluginStore } from "./plugin-store.js";
|
||||
import { BackwardCompat, ProjectRequiredError } from "./migration.js";
|
||||
import { CentralCore } from "./central-core.js";
|
||||
import { getTaskMergeBlocker } from "./task-merge.js";
|
||||
@@ -95,6 +96,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
|
||||
}
|
||||
/** Cached MissionStore instance */
|
||||
private missionStore: MissionStore | null = null;
|
||||
/** Cached PluginStore instance */
|
||||
private pluginStore: PluginStore | null = null;
|
||||
|
||||
constructor(private rootDir: string, globalSettingsDir?: string) {
|
||||
super();
|
||||
@@ -3890,6 +3893,17 @@ ${notificationsSection}`;
|
||||
return this.missionStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the PluginStore instance for plugin registry operations.
|
||||
* Lazily initializes the PluginStore on first access.
|
||||
*/
|
||||
getPluginStore(): PluginStore {
|
||||
if (!this.pluginStore) {
|
||||
this.pluginStore = new PluginStore(this.rootDir);
|
||||
}
|
||||
return this.pluginStore;
|
||||
}
|
||||
|
||||
// ── Backward Compatibility (Multi-Project Support) ────────────────────────
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user