| applyDeferral |
Record a "later" answer for a plugin on a branch. |
| configPath |
Locate .opx/config.json. |
| createConsoleLogger |
Create a Logger that writes to the console. |
| defaultConfig |
Create the starter config: no plugins enabled, and release and test off. |
| defaultSkipUntilDate |
Compute a default skipUntilDate for a "later" choice: today (the deferral expires when the calendar day rolls over). The diff function treats a deferral as active while skipUntilDate >= today, so storing today suppresses for the rest of the day on the current branch. |
| defaultState |
Create an empty state with no deferrals. |
| detectPackageManager |
Detect the host project's package manager. See inspectPackageManager for the order and for how sure the answer is. |
| diff |
Reconcile detector matches against config + state. - enabled: the detector's short name is present in config.lint. - deferred: state has a deferral whose branch matches AND date hasn't expired. - needsPrompt: detector matches files, is not enabled, and not currently deferred. |
| enabledNames |
Names of the plugins switched on in a task map. A plugin set to false is present in the config but disabled, so it is excluded. |
| ensureGitignored |
Add an entry to .gitignore unless it is already listed. |
| ensureOpxIgnored |
Ignore opx's local files while keeping .opx/config.json committable. |
| filterPathsByExtension |
Filter CLI path arguments to those a detector should handle, given the file extensions it owns. |
| inspectPackageManager |
Work out the host project's package manager, and how sure that is. |
| installCommand |
Build the command that installs packages with a package manager. |
| installPostCommitHook |
Install the husky post-commit hook that nudges the user about new file types after each commit. Runs in a backgrounded subshell and always exits 0, so it never blocks the commit. |
| isDeferred |
Whether a plugin's suggestion is currently deferred: a "later" answer recorded for this branch that has not yet expired. A deferral stays active through skipUntilDate inclusive, and never applies on another branch. |
| isValidPluginName |
Whether a package name follows the opx plugin naming convention: @allons-y/opx-*, opx-plugin-*, or @scope/opx-plugin-*. |
| loadPlugins |
Dynamically load plugin packages declared in the concern array. Enforces: 1. The fully-qualified package id matches the official/community naming pattern. 2. The package is present in the host's deps/devDeps (warn + skip otherwise). |
| normalizeDetectorId |
Normalize a detector reference (short or full) to a canonical package id by checking the host's dependencies. Returns null if no candidate is installed. |
| readConfig |
Read .opx/config.json, filling gaps with defaults. |
| readState |
Read .opx/state.json. The file is a disposable cache, so a missing or unreadable file gives an empty state rather than an error. |
| resolvePluginPackageName |
Resolve a short slug or fully-qualified package name to a candidate ordered list of package ids to try. The first one that exists in the host's deps wins. |
| resolveTool |
Try to resolve a tool (e.g. "eslint") from the host project first; fall back to the bundled copy that ships with the calling detector package. |
| statePath |
Locate .opx/state.json. |
| uninstallCommand |
Build the command that removes packages with a package manager. |
| writeConfig |
Write .opx/config.json, creating the folder if needed. Empty task maps are left out. |
| writeState |
Write .opx/state.json, creating the folder if needed. |