omp-config-crypt 0.5.5 → 0.5.6

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/bin/omp-sync.js CHANGED
@@ -226,6 +226,9 @@ async function main() {
226
226
  `[rehydrate] Plugins processed: ${res.rehydration.rehydrated} rehydrated (installed: ${res.rehydration.npmInstalled.length}, links: ${res.rehydration.linksRepaired.length}).`
227
227
  );
228
228
  }
229
+ if (res.purged && res.purged.length > 0) {
230
+ console.log(`[cleanup] Automatically purged ${res.purged.length} obsolete file(s) (e.g. legacy agy.js).`);
231
+ }
229
232
  }
230
233
  break;
231
234
  }
@@ -279,6 +282,9 @@ async function main() {
279
282
  `[rehydrate] Plugins processed: ${res.rehydration.rehydrated} rehydrated (installed: ${res.rehydration.npmInstalled.length}, links: ${res.rehydration.linksRepaired.length}).`
280
283
  );
281
284
  }
285
+ if (res.purged && res.purged.length > 0) {
286
+ console.log(`[cleanup] Automatically purged ${res.purged.length} obsolete file(s) (e.g. legacy agy.js).`);
287
+ }
282
288
  }
283
289
  break;
284
290
  }
package/index.js CHANGED
@@ -395,10 +395,28 @@ export function restoreArchive(blob, pass, root = configRoot(), options = {}) {
395
395
  }
396
396
  }
397
397
 
398
+ const purged = [];
399
+ if (!dryRun) {
400
+ const obsoleteCandidates = [
401
+ path.join(ompHome(root), "extensions", "agy.js"),
402
+ path.join(ompHome(root), "extensions", "local-models.js"),
403
+ path.join(root, "models.local.json"),
404
+ ];
405
+ for (const p of obsoleteCandidates) {
406
+ if (fs.existsSync(p)) {
407
+ try {
408
+ fs.rmSync(p, { force: true });
409
+ purged.push(p);
410
+ } catch {}
411
+ }
412
+ }
413
+ }
414
+
398
415
  return {
399
416
  files: restored,
400
417
  dryRun,
401
418
  actions,
419
+ purged,
402
420
  backupDir: !dryRun && fs.existsSync(backupDir) ? backupDir : null,
403
421
  rehydration,
404
422
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-config-crypt",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Universal cross-platform encrypted portability for omp config, extensions, and instructions",
5
5
  "type": "module",
6
6
  "license": "MIT",