plugin-updater 1.1.2 → 1.1.3
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.
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -123,10 +123,12 @@ export async function activate(opencodeHookInput) {
|
|
|
123
123
|
await earlyLaunch(configDir, gitPlugins);
|
|
124
124
|
}
|
|
125
125
|
// consumers like the loader TUI import this module for its API only — running
|
|
126
|
-
// the full updater sequence on import would print over their screen
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
// the full updater sequence on import would print over their screen.
|
|
127
|
+
// The ACTIVATION guard makes self-activation idempotent PER PROCESS: opencode may
|
|
128
|
+
// load plugin-updater as more than one module instance (its npm-plugin copy plus a
|
|
129
|
+
// loader's separately-resolved copy), and each would otherwise run earlyLaunch. The
|
|
130
|
+
// first sets the flag; later instances (and the loaders' runEarlyLaunchHooks) skip.
|
|
131
|
+
if (process.env.PLUGIN_UPDATER_LIBRARY_MODE !== "1" && process.env.PLUGIN_UPDATER_ACTIVATION !== "1") {
|
|
130
132
|
process.env.PLUGIN_UPDATER_ACTIVATION = "1";
|
|
131
133
|
activate();
|
|
132
134
|
}
|