mainflow 0.35.0 → 0.36.0

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.
@@ -1,4 +1,4 @@
1
- import { $ as ACCESS_HEADERS, B as applyOperation, F as renumberRequest, I as renumberFiles, L as renumberPath, P as applyOffline, Q as nodeStorage, R as renumberText, X as nowMinute, _t as DATA_DIR, at as comparePaths, bt as splitFrontMatter, ct as requestTime, et as BLOB_HASH, gt as ConflictError, it as SOCKET_MAX_AGE_CLOSE, lt as textBytes, nt as MAX_FILE_BYTES, ot as exceedsFileLimit, rt as ROUTES, st as readsAsText, tt as MAX_BLOB_BYTES, vt as WriteError, yt as contentHash, z as scopeOfPath } from "./host-bnHYIwuY.js";
1
+ import { $ as nowMinute, B as applyOperation, Ct as splitFrontMatter, F as renumberRequest, I as renumberFiles, L as renumberPath, P as applyOffline, R as renumberText, St as contentHash, at as MAX_FILE_BYTES, bt as DATA_DIR, ct as comparePaths, dt as requestTime, ft as textBytes, it as MAX_BLOB_BYTES, lt as exceedsFileLimit, nt as ACCESS_HEADERS, ot as ROUTES, rt as BLOB_HASH, st as SOCKET_MAX_AGE_CLOSE, tt as nodeStorage, ut as readsAsText, xt as WriteError, yt as ConflictError, z as scopeOfPath } from "./host-BauijAdm.js";
2
2
  import { createHash, randomBytes } from "node:crypto";
3
3
  import { accessSync, appendFileSync, chmodSync, closeSync, constants, copyFileSync, createReadStream, createWriteStream, existsSync, linkSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
4
4
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -1,8 +1,8 @@
1
- import { F as configSchema, f as GROUP_SECTIONS } from "./dist-BdvWGTsb.js";
2
- import { C as readSession, G as sectionText, H as HubError, J as linksInto, K as dependencyGraph, M as traceTranscript, N as transcriptTitle, S as loadSessions, U as loadConfig, W as loadHub, Y as refIndex, Z as readYaml, _t as DATA_DIR, a as openInApp, g as setArchivedMany, gt as ConflictError, h as ARCHIVE_KINDS, j as attributeTrace, q as mainlineEdges, vt as WriteError, w as transcriptPath } from "./host-bnHYIwuY.js";
1
+ import { F as configSchema, f as GROUP_SECTIONS } from "./dist-ud09dzZo.js";
2
+ import { C as readSession, G as sectionText, H as HubError, J as linksInto, K as dependencyGraph, M as traceTranscript, N as transcriptTitle, S as loadSessions, U as loadConfig, W as loadHub, X as refIndex, Z as remoteMembers, a as openInApp, bt as DATA_DIR, et as readYaml, g as setArchivedMany, h as ARCHIVE_KINDS, j as attributeTrace, q as mainlineEdges, w as transcriptPath, xt as WriteError, yt as ConflictError } from "./host-BauijAdm.js";
3
3
  import { t as listProgress } from "./progress-1BfPg2zN.js";
4
- import { A as isSynced, _ as readDaemon, a as remoteMode, b as readRemote, h as callDaemon, j as syncPaths, k as SYNC_DIR, m as DaemonUnavailable, n as hubWriter, r as writtenLines, y as watchTree } from "./operation-DVcJgKM9.js";
5
- import { c as realRoot, f as CLI_VERSION, s as readUiRecord } from "./launch-D80CYPcm.js";
4
+ import { A as isSynced, _ as readDaemon, a as remoteMode, b as readRemote, h as callDaemon, j as syncPaths, k as SYNC_DIR, m as DaemonUnavailable, n as hubWriter, r as writtenLines, y as watchTree } from "./operation-DGRH4iBE.js";
5
+ import { c as realRoot, f as CLI_VERSION, s as readUiRecord } from "./launch-n2ZDF0BF.js";
6
6
  import { createRequire } from "node:module";
7
7
  import { closeSync, existsSync, lstatSync, openSync, readFileSync, readSync, realpathSync, statSync } from "node:fs";
8
8
  import { basename, dirname, extname, join, normalize, relative, resolve, sep } from "node:path";
@@ -23,7 +23,7 @@ const WRITE_HEADER = "x-mainflow-write";
23
23
  /** Every reference with a hub prefix in the documents of `hub`: links, origins and replaced items. */
24
24
  function prefixedRefs(hub) {
25
25
  const refs = [];
26
- const doc = (d) => refs.push(d.origin, ...(d.links ?? []).map((l) => l.to));
26
+ const doc = (d) => refs.push(d.origin, d.group, ...(d.links ?? []).map((l) => l.to));
27
27
  for (const m of hub.mainlines) {
28
28
  doc(m);
29
29
  refs.push(...m.criteria.map((c) => c.supersededBy));
@@ -46,7 +46,13 @@ function relationsView(hub) {
46
46
  const targets = {};
47
47
  const graph = dependencyGraph(hub);
48
48
  const depRefs = graph.edges.flatMap((e) => [e.from, e.to]);
49
- for (const ref of /* @__PURE__ */ new Set([...prefixedRefs(hub), ...depRefs.filter((r) => r.includes(":"))])) {
49
+ const groupMembers = remoteMembers(hub.remotes, hub.config.hub);
50
+ const memberRefs = [...groupMembers.values()].flatMap((list) => list.map((m) => m.ref));
51
+ for (const ref of /* @__PURE__ */ new Set([
52
+ ...prefixedRefs(hub),
53
+ ...depRefs.filter((r) => r.includes(":")),
54
+ ...memberRefs
55
+ ])) {
50
56
  const colon = ref.indexOf(":");
51
57
  const name = ref.slice(0, colon);
52
58
  const found = name === hub.config.hub ? own.get(ref.slice(colon + 1)) : indexes.get(name)?.get(ref.slice(colon + 1));
@@ -77,6 +83,7 @@ function relationsView(hub) {
77
83
  targets,
78
84
  backlinks,
79
85
  deps: graph.edges,
86
+ groupMembers: Object.fromEntries(groupMembers),
80
87
  mainlineDeps: mainlineEdges(graph),
81
88
  cycles: graph.cycles
82
89
  };