plugin-updater 1.1.1 → 1.1.2

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/cli.js CHANGED
@@ -111,6 +111,18 @@ function addPluginEntry(configDir, url, branch, sync) {
111
111
  fs.writeFileSync(file, JSON.stringify(entries, null, 2), "utf8");
112
112
  console.log(`Added ${name} to ${file}`);
113
113
  }
114
+ else if (sync) {
115
+ // already present: honor --sync by enabling sync on the existing entry
116
+ const existing = entries.find((e) => e.name === name);
117
+ if (existing && existing.sync !== true) {
118
+ existing.sync = true;
119
+ fs.writeFileSync(file, JSON.stringify(entries, null, 2), "utf8");
120
+ console.log(`Enabled sync on ${name} in ${file}`);
121
+ }
122
+ else {
123
+ console.log(`${name} already present (sync on) in ${file}`);
124
+ }
125
+ }
114
126
  else {
115
127
  console.log(`${name} already present in ${file}`);
116
128
  }
package/dist/deploy.js CHANGED
@@ -95,6 +95,13 @@ export async function deployToExecutionDir(pluginName, executionPath, changed, c
95
95
  else if (fs.existsSync(path.join(distPath, "index.js"))) {
96
96
  deploySource = path.join(distPath, "index.js");
97
97
  }
98
+ // the build may have produced nothing (e.g. it failed, or the repo was deployed
99
+ // bundle-only with its source stripped) — skip gracefully rather than throwing
100
+ // ENOENT on the copy. Any already-deployed plugin/<name>.js stays in place.
101
+ if (!fs.existsSync(deploySource)) {
102
+ writeLog(`Skipping deploy for ${pluginName}: built file not found at ${deploySource}`, true);
103
+ return fs.existsSync(pluginExecutionFile);
104
+ }
98
105
  if (!fs.existsSync(executionPath))
99
106
  fs.mkdirSync(executionPath, { recursive: true });
100
107
  await callPluginCleanup(pluginExecutionFile, configDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plugin-updater",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Plugin lifecycle manager for OpenCode and Claude Code launchers",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",