@cannbot-ai/install-helper 1.2.2-beta.0 → 1.2.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/index.js CHANGED
@@ -3921,6 +3921,12 @@ function findRecordOwner(targetPath) {
3921
3921
  }
3922
3922
  return null;
3923
3923
  }
3924
+ function isPreservedTarget(targetPath) {
3925
+ const resolved = resolve3(targetPath);
3926
+ return readAllRecords().some(
3927
+ (record) => (record.preservedTargets || []).some((p) => resolve3(p) === resolved)
3928
+ );
3929
+ }
3924
3930
  function findBackups(configRoot) {
3925
3931
  const dirs = Array.isArray(configRoot) ? configRoot : [configRoot];
3926
3932
  const backups = [];
@@ -4440,6 +4446,9 @@ function classifyConfigTarget(targetPath, pluginConfigSource, pluginId, pluginNa
4440
4446
  } catch {
4441
4447
  }
4442
4448
  }
4449
+ if (isPreservedTarget(targetPath)) {
4450
+ return { kind: "unowned", pluginId: UNOWNED_PLUGIN_ID, pluginName: UNOWNED_PLUGIN_ID };
4451
+ }
4443
4452
  const recordOwner = findRecordOwner(targetPath);
4444
4453
  if (recordOwner) {
4445
4454
  return recordOwner.pluginId === pluginId ? { kind: "same-plugin", pluginId, pluginName } : { kind: "other-plugin", ...recordOwner };