plugin-updater 1.0.33 → 1.0.34

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -243,7 +243,9 @@ function updatePlugin(pluginName, gitUrl, branch, commitHash, updateInterval = 1
243
243
  if (!fs.existsSync(reposDir))
244
244
  fs.mkdirSync(reposDir, { recursive: true });
245
245
  const branchFlag = branch ? `--branch ${branch}` : "";
246
- executeGit(`git clone --recurse-submodules ${branchFlag} ${gitUrl} ${pluginName}`, reposDir);
246
+ const cloned = executeGit(`git clone --recurse-submodules ${branchFlag} ${gitUrl} ${pluginName}`, reposDir);
247
+ if (!cloned)
248
+ return { success: false, changed: false };
247
249
  fs.writeFileSync(lastCheckFile, Date.now().toString());
248
250
  didChange = true;
249
251
  }
@@ -481,6 +483,8 @@ export async function updatePluginPublic(pluginName, gitUrl, branch, commitHash)
481
483
  const configDir = getAppConfigDir(getAppName());
482
484
  // interval 0: an explicit update request must never fast-path-skip
483
485
  const result = updatePlugin(pluginName, gitUrl, branch, commitHash ?? null, 0);
486
+ if (!result.success)
487
+ throw new Error(`could not set up ${pluginName} - see the updater log`);
484
488
  await deployToExecutionDir(pluginName, path.join(configDir, "plugin"), result.changed, configDir);
485
489
  }
486
490
  export async function earlyLaunch(configDir, plugins) {
@@ -526,6 +530,10 @@ export async function earlyLaunch(configDir, plugins) {
526
530
  writeLog(`Processing earlyLaunch for ${plugin.name}`);
527
531
  try {
528
532
  const updateResult = updatePlugin(plugin.name, plugin.url, plugin.branch, null, plugin.updateInterval ?? 1);
533
+ if (!updateResult.success) {
534
+ writeLog(`Skipping deploy for ${plugin.name}: update failed`, true);
535
+ continue;
536
+ }
529
537
  await deployToExecutionDir(plugin.name, path.join(configDir, "plugin"), updateResult.changed, configDir);
530
538
  }
531
539
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugin-updater",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "Plugin lifecycle manager for OpenCode and Claude Code launchers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",