fleetfizz 0.2.2 → 0.2.3

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.
@@ -31719,7 +31719,7 @@ const runWith = (command, config) => {
31719
31719
  };
31720
31720
  //#endregion
31721
31721
  //#region package.json
31722
- var version = "0.2.2";
31722
+ var version = "0.2.3";
31723
31723
  //#endregion
31724
31724
  //#region ../../node_modules/.pnpm/effect@4.0.2/node_modules/effect/dist/Ref.js
31725
31725
  /**
@@ -34698,14 +34698,20 @@ const stampText = (text, stamp) => {
34698
34698
  getInsertionIndex: insertAfter(STAMP_KEYS.slice(0, STAMP_KEYS.indexOf(key)))
34699
34699
  }));
34700
34700
  const previous = parse(text, void 0, { allowTrailingComma: true });
34701
+ const fleet = machinesOf(previous);
34701
34702
  const shippedTo = {
34702
- ...shippedToOf(previous),
34703
+ ...Object.fromEntries(Object.entries(shippedToOf(previous)).filter(([name]) => fleet.includes(name))),
34703
34704
  ...Object.fromEntries(stamp.reached.map((name) => [name, stamp.shippedAt]))
34704
34705
  };
34705
34706
  let out = set(text, "shippedAt", stamp.shippedAt);
34706
34707
  out = set(out, "shippedFrom", stamp.shippedFrom);
34707
34708
  return set(out, "shippedTo", shippedTo);
34708
34709
  };
34710
+ const machinesOf = (config) => {
34711
+ if (typeof config !== "object" || config === null || !("machines" in config)) return [];
34712
+ const value = config.machines;
34713
+ return typeof value === "object" && value !== null ? Object.keys(value) : [];
34714
+ };
34709
34715
  const shippedToOf = (config) => {
34710
34716
  if (typeof config !== "object" || config === null || !("shippedTo" in config)) return {};
34711
34717
  const value = config.shippedTo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetfizz",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Keep every Machine on your tailnet in line with one config.",
5
5
  "license": "MIT",
6
6
  "repository": {