@danhachuel/thunderbolt 0.5.46 → 0.5.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.5.46",
3
+ "version": "0.5.47",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",
@@ -216,6 +216,8 @@ function legacyNpxPackageRoots() {
216
216
 
217
217
  function migrateLegacyNpxStorage() {
218
218
  const targetStorage = join(thunderboltHome, "storage");
219
+ const migrationMarker = join(targetStorage, "state", "npx-storage-migration-v1.json");
220
+ if (existsSync(migrationMarker)) return;
219
221
  const candidates = legacyNpxPackageRoots();
220
222
  let mergedFiles = 0;
221
223
  for (const candidate of candidates) {
@@ -223,6 +225,8 @@ function migrateLegacyNpxStorage() {
223
225
  mergedFiles += mergeLegacyStorage(candidate);
224
226
  }
225
227
  if (mergedFiles > 0) console.log(`Dados locais recuperados do cache npm para ${targetStorage} (${mergedFiles} ficheiro(s) unido(s)).`);
228
+ mkdirSync(dirname(migrationMarker), { recursive: true });
229
+ writeFileSync(migrationMarker, JSON.stringify({ version: 1, migrated_at: new Date().toISOString() }) + "\n", "utf8");
226
230
  }
227
231
 
228
232
  function copyOrMove(source, target, label) {