openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 1.59 kB
JavaScript
import{s as resolveOpenClawStateSqlitePath}from"./openclaw-state-db.paths-CbgXfEg1.mjs";import{r as resolveActivePluginInstallRoots,t as hasActivePluginInstallRoots}from"./install-root-context-CqAZmMOW.mjs";import path from"node:path";
//!src/plugins/installed-plugin-index-store-path.ts
const LEGACY_INSTALLED_PLUGIN_INDEX_STORE_PATH=path.join(`plugins`,`installs.json`);function resolveStoreEnv(e){const t=e.env??process.env;if(e.stateDir)return{...t,OPENCLAW_STATE_DIR:e.stateDir};if(hasActivePluginInstallRoots())return{...t,OPENCLAW_STATE_DIR:resolveActivePluginInstallRoots(t).stateDir};return t}function resolveInstalledPluginIndexStorePath(e={}){if(e.filePath)return e.filePath;return resolveOpenClawStateSqlitePath(resolveStoreEnv(e))}function resolveInstalledPluginIndexStateDatabaseOptions(e={}){if(e.filePath)return{...e.env?{env:e.env}:{},path:e.filePath};return{env:resolveStoreEnv(e)}}function resolveLegacyInstalledPluginIndexStorePath(e={}){if(e.filePath)return e.filePath;const t=e.env??process.env;const n=e.stateDir??resolveActivePluginInstallRoots(t).stateDir;return path.join(n,LEGACY_INSTALLED_PLUGIN_INDEX_STORE_PATH)}function legacyInstalledPluginIndexUnsupportedMessage(e){return`Plugin install index ${e} uses a retired JSON format and was left unchanged. Run openclaw doctor --fix to archive the original bytes in the retired-state recovery archive and continue.`}export{resolveLegacyInstalledPluginIndexStorePath as i,resolveInstalledPluginIndexStateDatabaseOptions as n,resolveInstalledPluginIndexStorePath as r,legacyInstalledPluginIndexUnsupportedMessage as t};