fleetfizz 0.2.1 → 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.
Files changed (2) hide show
  1. package/dist/fleetfizz.mjs +19 -6
  2. package/package.json +1 -1
@@ -31719,7 +31719,7 @@ const runWith = (command, config) => {
31719
31719
  };
31720
31720
  //#endregion
31721
31721
  //#region package.json
31722
- var version = "0.2.1";
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;
@@ -35130,7 +35136,16 @@ const quotePath = (path) => {
35130
35136
  if (path.startsWith("~/")) return `"$HOME"${quote(path.slice(1))}`;
35131
35137
  return quote(path);
35132
35138
  };
35133
- const prelude = [`ff_json() { printf '%s' "$1" | sed -e 's/\\\\/\\\\\\\\/g' -e 's/"/\\\\"/g' | tr -d '\\n'; }`, `ff_state() { printf 'ff-state %s\\n' "$1"; }`].join("\n");
35139
+ const vpEnv = [
35140
+ `ff_env="\${XDG_CONFIG_HOME:-$HOME/.config}/vite-plus/env"`,
35141
+ `{ [ ! -f "$ff_env" ] || . "$ff_env"; }`,
35142
+ `export PATH="\${VP_HOME:-$HOME/.vite-plus}/bin:\${XDG_DATA_HOME:-$HOME/.local/share}/vite-plus/bin:$PATH"`
35143
+ ].join("\n");
35144
+ const prelude = [
35145
+ vpEnv,
35146
+ `ff_json() { printf '%s' "$1" | sed -e 's/\\\\/\\\\\\\\/g' -e 's/"/\\\\"/g' | tr -d '\\n'; }`,
35147
+ `ff_state() { printf 'ff-state %s\\n' "$1"; }`
35148
+ ].join("\n");
35134
35149
  const fingerprintFn = [
35135
35150
  "ff_fp() {",
35136
35151
  " if [ -L \"$1\" ]; then printf 'link:%s' \"$(readlink \"$1\")\";",
@@ -35223,9 +35238,7 @@ const vpStepId = (step) => step.kind === "reinstall" ? `vp:reinstall:${step.name
35223
35238
  const CONFIG_STEP = "config";
35224
35239
  const VP_INSTALL = [
35225
35240
  "curl -fsSL https://vite.plus | bash",
35226
- `ff_env="\${XDG_CONFIG_HOME:-$HOME/.config}/vite-plus/env"`,
35227
- `{ [ ! -f "$ff_env" ] || . "$ff_env"; }`,
35228
- `export PATH="\${VP_HOME:-$HOME/.vite-plus}/bin:\${XDG_DATA_HOME:-$HOME/.local/share}/vite-plus/bin:$PATH"`,
35241
+ ...vpEnv.split("\n"),
35229
35242
  "{ hash -r 2>/dev/null || true; }"
35230
35243
  ].join(" && ");
35231
35244
  const vpStep = (step) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetfizz",
3
- "version": "0.2.1",
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": {