zen-fs-config 0.7.22 → 0.7.23

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
@@ -4439,22 +4439,7 @@ var ConfigRepo = class {
4439
4439
  const items = [...fresh.items];
4440
4440
  const corruptFiles = [...fresh.corruptFiles];
4441
4441
  for (const corruptPath of corruptFiles) {
4442
- for (const [, replica] of this.replicaBackends) {
4443
- try {
4444
- await replica.instance.unlink(corruptPath);
4445
- } catch {
4446
- }
4447
- await this.unlinkVersionSidecar(replica.instance, corruptPath);
4448
- }
4449
- try {
4450
- await this.deleteFile(corruptPath);
4451
- } catch {
4452
- try {
4453
- await this.cachedFS.unlink(corruptPath);
4454
- } catch {
4455
- }
4456
- await this.unlinkVersionSidecar(this.cachedFS, corruptPath);
4457
- }
4442
+ log5.warn(`[ConfigRepo] readAllBackendDescriptors: ignoring unreadable descriptor ${corruptPath}`);
4458
4443
  }
4459
4444
  const seen = /* @__PURE__ */ new Map();
4460
4445
  const duplicates = [];
@@ -4474,28 +4459,8 @@ var ConfigRepo = class {
4474
4459
  }
4475
4460
  if (duplicates.length > 0) {
4476
4461
  log5.log(
4477
- `[ConfigRepo] readAllBackendDescriptors: removing ${duplicates.length} duplicate(s): ${duplicates.join(", ")}`
4462
+ `[ConfigRepo] readAllBackendDescriptors: ignoring ${duplicates.length} duplicate descriptor(s) (kept on disk): ${duplicates.join(", ")}`
4478
4463
  );
4479
- for (const dupId of duplicates) {
4480
- for (const descPath of [this.backendFilePath(dupId), this.legacyBackendFilePath(dupId)]) {
4481
- for (const [, replica] of this.replicaBackends) {
4482
- try {
4483
- await replica.instance.unlink(descPath);
4484
- } catch {
4485
- }
4486
- await this.unlinkVersionSidecar(replica.instance, descPath);
4487
- }
4488
- try {
4489
- await this.deleteFile(descPath);
4490
- } catch {
4491
- try {
4492
- await this.cachedFS.unlink(descPath);
4493
- } catch {
4494
- }
4495
- await this.unlinkVersionSidecar(this.cachedFS, descPath);
4496
- }
4497
- }
4498
- }
4499
4464
  }
4500
4465
  const result = Array.from(seen.values()).map((i) => i.desc);
4501
4466
  this.backendDescriptorCache = result;
package/dist/index.mjs CHANGED
@@ -3680,22 +3680,7 @@ var ConfigRepo = class {
3680
3680
  const items = [...fresh.items];
3681
3681
  const corruptFiles = [...fresh.corruptFiles];
3682
3682
  for (const corruptPath of corruptFiles) {
3683
- for (const [, replica] of this.replicaBackends) {
3684
- try {
3685
- await replica.instance.unlink(corruptPath);
3686
- } catch {
3687
- }
3688
- await this.unlinkVersionSidecar(replica.instance, corruptPath);
3689
- }
3690
- try {
3691
- await this.deleteFile(corruptPath);
3692
- } catch {
3693
- try {
3694
- await this.cachedFS.unlink(corruptPath);
3695
- } catch {
3696
- }
3697
- await this.unlinkVersionSidecar(this.cachedFS, corruptPath);
3698
- }
3683
+ log5.warn(`[ConfigRepo] readAllBackendDescriptors: ignoring unreadable descriptor ${corruptPath}`);
3699
3684
  }
3700
3685
  const seen = /* @__PURE__ */ new Map();
3701
3686
  const duplicates = [];
@@ -3715,28 +3700,8 @@ var ConfigRepo = class {
3715
3700
  }
3716
3701
  if (duplicates.length > 0) {
3717
3702
  log5.log(
3718
- `[ConfigRepo] readAllBackendDescriptors: removing ${duplicates.length} duplicate(s): ${duplicates.join(", ")}`
3703
+ `[ConfigRepo] readAllBackendDescriptors: ignoring ${duplicates.length} duplicate descriptor(s) (kept on disk): ${duplicates.join(", ")}`
3719
3704
  );
3720
- for (const dupId of duplicates) {
3721
- for (const descPath of [this.backendFilePath(dupId), this.legacyBackendFilePath(dupId)]) {
3722
- for (const [, replica] of this.replicaBackends) {
3723
- try {
3724
- await replica.instance.unlink(descPath);
3725
- } catch {
3726
- }
3727
- await this.unlinkVersionSidecar(replica.instance, descPath);
3728
- }
3729
- try {
3730
- await this.deleteFile(descPath);
3731
- } catch {
3732
- try {
3733
- await this.cachedFS.unlink(descPath);
3734
- } catch {
3735
- }
3736
- await this.unlinkVersionSidecar(this.cachedFS, descPath);
3737
- }
3738
- }
3739
- }
3740
3705
  }
3741
3706
  const result = Array.from(seen.values()).map((i) => i.desc);
3742
3707
  this.backendDescriptorCache = result;
@@ -30396,22 +30396,7 @@ var ZenFSConfig = (() => {
30396
30396
  const items = [...fresh.items];
30397
30397
  const corruptFiles = [...fresh.corruptFiles];
30398
30398
  for (const corruptPath of corruptFiles) {
30399
- for (const [, replica] of this.replicaBackends) {
30400
- try {
30401
- await replica.instance.unlink(corruptPath);
30402
- } catch {
30403
- }
30404
- await this.unlinkVersionSidecar(replica.instance, corruptPath);
30405
- }
30406
- try {
30407
- await this.deleteFile(corruptPath);
30408
- } catch {
30409
- try {
30410
- await this.cachedFS.unlink(corruptPath);
30411
- } catch {
30412
- }
30413
- await this.unlinkVersionSidecar(this.cachedFS, corruptPath);
30414
- }
30399
+ log9.warn(`[ConfigRepo] readAllBackendDescriptors: ignoring unreadable descriptor ${corruptPath}`);
30415
30400
  }
30416
30401
  const seen = /* @__PURE__ */ new Map();
30417
30402
  const duplicates = [];
@@ -30431,28 +30416,8 @@ var ZenFSConfig = (() => {
30431
30416
  }
30432
30417
  if (duplicates.length > 0) {
30433
30418
  log9.log(
30434
- `[ConfigRepo] readAllBackendDescriptors: removing ${duplicates.length} duplicate(s): ${duplicates.join(", ")}`
30419
+ `[ConfigRepo] readAllBackendDescriptors: ignoring ${duplicates.length} duplicate descriptor(s) (kept on disk): ${duplicates.join(", ")}`
30435
30420
  );
30436
- for (const dupId of duplicates) {
30437
- for (const descPath of [this.backendFilePath(dupId), this.legacyBackendFilePath(dupId)]) {
30438
- for (const [, replica] of this.replicaBackends) {
30439
- try {
30440
- await replica.instance.unlink(descPath);
30441
- } catch {
30442
- }
30443
- await this.unlinkVersionSidecar(replica.instance, descPath);
30444
- }
30445
- try {
30446
- await this.deleteFile(descPath);
30447
- } catch {
30448
- try {
30449
- await this.cachedFS.unlink(descPath);
30450
- } catch {
30451
- }
30452
- await this.unlinkVersionSidecar(this.cachedFS, descPath);
30453
- }
30454
- }
30455
- }
30456
30421
  }
30457
30422
  const result = Array.from(seen.values()).map((i) => i.desc);
30458
30423
  this.backendDescriptorCache = result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-fs-config",
3
- "version": "0.7.22",
3
+ "version": "0.7.23",
4
4
  "description": "Distributed config management library built on ZenFS, zen-fs-cache, and zen-fs-sync",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",