zen-fs-config 0.7.18 → 0.7.19

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
@@ -5073,6 +5073,14 @@ var ConfigRepo = class {
5073
5073
  log5.log(`[ConfigRepo] assigned group instanceId ${this.instanceId} (kind=${existingDescriptor?.kind ?? "config"})`);
5074
5074
  }
5075
5075
  log5.log(`[ConfigRepo] group-type set to "${type}"`);
5076
+ if (await this.safeExists(this.cachedFS, LEGACY_GROUP_TYPE_FILE)) {
5077
+ try {
5078
+ await this.cachedFS.unlink(LEGACY_GROUP_TYPE_FILE);
5079
+ log5.log("[ConfigRepo] removed stale legacy .meta/group-type");
5080
+ } catch (err) {
5081
+ log5.warn(`[ConfigRepo] failed to remove legacy .meta/group-type: ${err.message}`);
5082
+ }
5083
+ }
5076
5084
  }
5077
5085
  /** Read the group-type marker. Returns null if not set (new path, then legacy). */
5078
5086
  async getGroupType() {
@@ -6561,6 +6569,11 @@ async function createConfigRepo(appId, options = {}) {
6561
6569
  features: CONFIG_GROUP_FEATURES
6562
6570
  });
6563
6571
  }
6572
+ try {
6573
+ await primaryInstance.unlink(`${META_DIR}/group-type`);
6574
+ log5.log("[createConfigRepo] removed stale legacy .meta/group-type");
6575
+ } catch {
6576
+ }
6564
6577
  } catch (err) {
6565
6578
  log5.warn(`[createConfigRepo] Failed to write group metadata:`, err.message);
6566
6579
  }
package/dist/index.mjs CHANGED
@@ -4314,6 +4314,14 @@ var ConfigRepo = class {
4314
4314
  log5.log(`[ConfigRepo] assigned group instanceId ${this.instanceId} (kind=${existingDescriptor?.kind ?? "config"})`);
4315
4315
  }
4316
4316
  log5.log(`[ConfigRepo] group-type set to "${type}"`);
4317
+ if (await this.safeExists(this.cachedFS, LEGACY_GROUP_TYPE_FILE)) {
4318
+ try {
4319
+ await this.cachedFS.unlink(LEGACY_GROUP_TYPE_FILE);
4320
+ log5.log("[ConfigRepo] removed stale legacy .meta/group-type");
4321
+ } catch (err) {
4322
+ log5.warn(`[ConfigRepo] failed to remove legacy .meta/group-type: ${err.message}`);
4323
+ }
4324
+ }
4317
4325
  }
4318
4326
  /** Read the group-type marker. Returns null if not set (new path, then legacy). */
4319
4327
  async getGroupType() {
@@ -5802,6 +5810,11 @@ async function createConfigRepo(appId, options = {}) {
5802
5810
  features: CONFIG_GROUP_FEATURES
5803
5811
  });
5804
5812
  }
5813
+ try {
5814
+ await primaryInstance.unlink(`${META_DIR}/group-type`);
5815
+ log5.log("[createConfigRepo] removed stale legacy .meta/group-type");
5816
+ } catch {
5817
+ }
5805
5818
  } catch (err) {
5806
5819
  log5.warn(`[createConfigRepo] Failed to write group metadata:`, err.message);
5807
5820
  }
@@ -31030,6 +31030,14 @@ var ZenFSConfig = (() => {
31030
31030
  log9.log(`[ConfigRepo] assigned group instanceId ${this.instanceId} (kind=${existingDescriptor?.kind ?? "config"})`);
31031
31031
  }
31032
31032
  log9.log(`[ConfigRepo] group-type set to "${type}"`);
31033
+ if (await this.safeExists(this.cachedFS, LEGACY_GROUP_TYPE_FILE)) {
31034
+ try {
31035
+ await this.cachedFS.unlink(LEGACY_GROUP_TYPE_FILE);
31036
+ log9.log("[ConfigRepo] removed stale legacy .meta/group-type");
31037
+ } catch (err2) {
31038
+ log9.warn(`[ConfigRepo] failed to remove legacy .meta/group-type: ${err2.message}`);
31039
+ }
31040
+ }
31033
31041
  }
31034
31042
  /** Read the group-type marker. Returns null if not set (new path, then legacy). */
31035
31043
  async getGroupType() {
@@ -32518,6 +32526,11 @@ var ZenFSConfig = (() => {
32518
32526
  features: CONFIG_GROUP_FEATURES
32519
32527
  });
32520
32528
  }
32529
+ try {
32530
+ await primaryInstance.unlink(`${META_DIR}/group-type`);
32531
+ log9.log("[createConfigRepo] removed stale legacy .meta/group-type");
32532
+ } catch {
32533
+ }
32521
32534
  } catch (err2) {
32522
32535
  log9.warn(`[createConfigRepo] Failed to write group metadata:`, err2.message);
32523
32536
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-fs-config",
3
- "version": "0.7.18",
3
+ "version": "0.7.19",
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",