@dxos/timeframe 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d

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.
@@ -4,8 +4,8 @@ import "@dxos/node-std/globals";
4
4
  import { inspect } from "@dxos/node-std/util";
5
5
  import { equalsSymbol } from "@dxos/debug";
6
6
  var Timeframe = class _Timeframe {
7
+ _frames = /* @__PURE__ */ new Map();
7
8
  constructor(frames = []) {
8
- this._frames = /* @__PURE__ */ new Map();
9
9
  for (const [key, seq] of frames) {
10
10
  this.set(key, seq);
11
11
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/timeframe.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nimport { equalsSymbol, type Equatable } from '@dxos/debug';\nimport { type PublicKey } from '@dxos/keys';\n\ntype Entry = {\n key: PublicKey;\n seq: number;\n};\n\n/**\n * A vector clock that implements ordering over a set of feed messages.\n */\nexport class Timeframe implements Equatable {\n private readonly _frames = new Map<string, Entry>();\n\n constructor(frames: [PublicKey, number][] = []) {\n for (const [key, seq] of frames) {\n this.set(key, seq);\n }\n }\n\n toJSON(): Record<string, number> {\n return this.frames().reduce((frames: Record<string, number>, [key, seq]) => {\n frames[key.truncate()] = seq;\n return frames;\n }, {});\n }\n\n toString(): string {\n return `(${this.frames()\n .map(([key, seq]) => `${key.truncate()}[${seq}]`)\n .join(', ')})`;\n }\n\n equals(object: Timeframe): boolean {\n return this.size() === object.size() && this.frames().every(([key, seq]) => object.get(key) === seq);\n }\n\n // TODO(burdon): Rename getFrame.\n get(key: PublicKey): number | undefined {\n return this._frames.get(key.toHex())?.seq;\n }\n\n // TODO(burdon): Rename setFrame.\n set(key: PublicKey, seq: number): void {\n const hex = key.toHex();\n this._frames.set(hex, { key, seq });\n }\n\n // TODO(burdon): Change to getter.\n frames(): [PublicKey, number][] {\n return Array.from(this._frames.values()).map(({ key, seq }) => [key, seq]);\n }\n\n // TODO(burdon): Change to getter.\n size(): number {\n return this._frames.size;\n }\n\n // TODO(burdon): Change to getter (empty).\n isEmpty(): boolean {\n return this.size() === 0;\n }\n\n /**\n * Returns a new timeframe with specified keys removed.\n * @param keys\n */\n withoutKeys(keys: PublicKey[]): Timeframe {\n return new Timeframe(this.frames().filter(([frameKey]) => keys.every((key) => !key.equals(frameKey))));\n }\n\n map(fn: (frame: [key: PublicKey, seq: number]) => [PublicKey, number]): Timeframe {\n return new Timeframe(this.frames().map(fn));\n }\n\n /**\n * Returns a total amount of messages represented by this timeframe.\n */\n totalMessages(): number {\n return Array.from(this._frames.values()).reduce((result, { seq }) => result + seq + 1, 0);\n }\n\n /**\n * Returns a total amount of messages that are present in this timeframe but are missing in `base`.\n */\n newMessages(base: Timeframe): number {\n return Array.from(this._frames.entries()).reduce(\n (result, [hex, { seq }]) => result + Math.max(seq - (base._frames.get(hex)?.seq ?? -1), 0),\n 0,\n );\n }\n\n /**\n * Used by NodeJS to get textual representation of this object in `console.log`.\n */\n [inspect.custom](): string {\n return `Timeframe${this.toString()}`;\n }\n\n [equalsSymbol](other: any): boolean {\n if (!(other instanceof Timeframe)) {\n return false;\n }\n\n return this.equals(other);\n }\n\n /**\n * Merges the values, updating the highest sequence numbers.\n * @param timeframes\n */\n static merge(...timeframes: Timeframe[]): Timeframe {\n const result = new Timeframe();\n for (const timeframe of timeframes) {\n for (const [hex, entry] of timeframe._frames) {\n const currentEntry = result._frames.get(hex);\n if (currentEntry === undefined || entry.seq > currentEntry.seq) {\n result._frames.set(hex, entry);\n }\n }\n }\n\n return result;\n }\n\n /**\n * Compares two timeframes and returns an array of frames from the first timeframe where the sequence number\n * is greater than the associated sequence number from the second timeframe.\n */\n static dependencies(tf1: Timeframe, tf2: Timeframe): Timeframe {\n const result = new Timeframe();\n for (const [hex, entry] of tf1._frames) {\n const otherEntry = tf2._frames.get(hex);\n if (otherEntry === undefined || otherEnt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MAAMuC,aAAavC,KAAK;AAC9DyB,iBAAO5B,QAAQI,IAAIa,KAAKwB,KAAAA;QAC1B;MACF;IACF;AAEA,WAAOb;EACT;;;;;EAMA,OAAOgB,aAAaC,KAAgBC,KAA2B;AAC7D,UAAMlB,SAAS,IAAI9B,WAAAA;AACnB,eAAW,CAACmB,KAAKwB,KAAAA,KAAUI,IAAI7C,SAAS;AACtC,YAAM+C,aAAaD,IAAI9C,QAAQe,IAAIE,GAAAA;AACnC,UAAI8B,eAAeJ,UAAaI,WAAW5C,MAAMsC,MAAMtC,KAAK;AAC1DyB,eAAO5B,QAAQI,IAAIa,KAAKwB,KAAAA;MAC1B;IACF;AAEA,WAAOb;EACT;AACF;",
6
- "names": ["inspect", "equalsSymbol", "Timeframe", "frames", "_frames", "Map", "key", "seq", "set", "toJSON", "reduce", "truncate", "toString", "map", "join", "equals", "object", "size", "every", "get", "toHex", "hex", "Array", "from", "values", "isEmpty", "withoutKeys", "keys", "filter", "frameKey", "fn", "totalMessages", "result", "newMessages", "base", "entries", "Math", "max", "inspect", "custom", "equalsSymbol", "other", "merge", "timeframes", "timeframe", "entry", "currentEntry", "undefined", "dependencies", "tf1", "tf2", "otherEntry"]
4
+ "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nimport { type Equatable, equalsSymbol } from '@dxos/debug';\nimport { type PublicKey } from '@dxos/keys';\n\ntype Entry = {\n key: PublicKey;\n seq: number;\n};\n\n/**\n * A vector clock that implements ordering over a set of feed messages.\n */\nexport class Timeframe implements Equatable {\n private readonly _frames = new Map<string, Entry>();\n\n constructor(frames: [PublicKey, number][] = []) {\n for (const [key, seq] of frames) {\n this.set(key, seq);\n }\n }\n\n toJSON(): Record<string, number> {\n return this.frames().reduce((frames: Record<string, number>, [key, seq]) => {\n frames[key.truncate()] = seq;\n return frames;\n }, {});\n }\n\n toString(): string {\n return `(${this.frames()\n .map(([key, seq]) => `${key.truncate()}[${seq}]`)\n .join(', ')})`;\n }\n\n equals(object: Timeframe): boolean {\n return this.size() === object.size() && this.frames().every(([key, seq]) => object.get(key) === seq);\n }\n\n // TODO(burdon): Rename getFrame.\n get(key: PublicKey): number | undefined {\n return this._frames.get(key.toHex())?.seq;\n }\n\n // TODO(burdon): Rename setFrame.\n set(key: PublicKey, seq: number): void {\n const hex = key.toHex();\n this._frames.set(hex, { key, seq });\n }\n\n // TODO(burdon): Change to getter.\n frames(): [PublicKey, number][] {\n return Array.from(this._frames.values()).map(({ key, seq }) => [key, seq]);\n }\n\n // TODO(burdon): Change to getter.\n size(): number {\n return this._frames.size;\n }\n\n // TODO(burdon): Change to getter (empty).\n isEmpty(): boolean {\n return this.size() === 0;\n }\n\n /**\n * Returns a new timeframe with specified keys removed.\n * @param keys\n */\n withoutKeys(keys: PublicKey[]): Timeframe {\n return new Timeframe(this.frames().filter(([frameKey]) => keys.every((key) => !key.equals(frameKey))));\n }\n\n map(fn: (frame: [key: PublicKey, seq: number]) => [PublicKey, number]): Timeframe {\n return new Timeframe(this.frames().map(fn));\n }\n\n /**\n * Returns a total amount of messages represented by this timeframe.\n */\n totalMessages(): number {\n return Array.from(this._frames.values()).reduce((result, { seq }) => result + seq + 1, 0);\n }\n\n /**\n * Returns a total amount of messages that are present in this timeframe but are missing in `base`.\n */\n newMessages(base: Timeframe): number {\n return Array.from(this._frames.entries()).reduce(\n (result, [hex, { seq }]) => result + Math.max(seq - (base._frames.get(hex)?.seq ?? -1), 0),\n 0,\n );\n }\n\n /**\n * Used by NodeJS to get textual representation of this object in `console.log`.\n */\n [inspect.custom](): string {\n return `Timeframe${this.toString()}`;\n }\n\n [equalsSymbol](other: any): boolean {\n if (!(other instanceof Timeframe)) {\n return false;\n }\n\n return this.equals(other);\n }\n\n /**\n * Merges the values, updating the highest sequence numbers.\n * @param timeframes\n */\n static merge(...timeframes: Timeframe[]): Timeframe {\n const result = new Timeframe();\n for (const timeframe of timeframes) {\n for (const [hex, entry] of timeframe._frames) {\n const currentEntry = result._frames.get(hex);\n if (currentEntry === undefined || entry.seq > currentEntry.seq) {\n result._frames.set(hex, entry);\n }\n }\n }\n\n return result;\n }\n\n /**\n * Compares two timeframes and returns an array of frames from the first timeframe where the sequence number\n * is greater than the associated sequence number from the second timeframe.\n */\n static dependencies(tf1: Timeframe, tf2: Timeframe): Timeframe {\n const result = new Timeframe();\n for (const [hex, entry] of tf1._frames) {\n const otherEntry = tf2._frames.get(hex);\n if (otherEntry === undefined || otherEntry.seq < entry.seq) {\n result._frames.set(hex, entry);\n }\n }\n\n return result;\n }\n}\n"],
5
+ "mappings": ";;;AAIA,SAASA,eAAe;AAExB,SAAyBC,oBAAoB;AAWtC,IAAMC,YAAN,MAAMA,WAAAA;EACMC,UAAU,oBAAIC,IAAAA;EAE/B,YAAYC,SAAgC,CAAA,GAAI;AAC9C,eAAW,CAACC,KAAKC,GAAAA,KAAQF,QAAQ;AAC/B,WAAKG,IAAIF,KAAKC,GAAAA;IAChB;EACF;EAEAE,SAAiC;AAC/B,WAAO,KAAKJ,OAAM,EAAGK,OAAO,CAACL,QAAgC,CAACC,KAAKC,GAAAA,MAAI;AACrEF,aAAOC,IAAIK,SAAQ,CAAA,IAAMJ;AACzB,aAAOF;IACT,GAAG,CAAC,CAAA;EACN;EAEAO,WAAmB;AACjB,WAAO,IAAI,KAAKP,OAAM,EACnBQ,IAAI,CAAC,CAACP,KAAKC,GAAAA,MAAS,GAAGD,IAAIK,SAAQ,CAAA,IAAMJ,GAAAA,GAAM,EAC/CO,KAAK,IAAA,CAAA;EACV;EAEAC,OAAOC,QAA4B;AACjC,WAAO,KAAKC,KAAI,MAAOD,OAAOC,KAAI,KAAM,KAAKZ,OAAM,EAAGa,MAAM,CAAC,CAACZ,KAAKC,GAAAA,MAASS,OAAOG,IAAIb,GAAAA,MAASC,GAAAA;EAClG;;EAGAY,IAAIb,KAAoC;AACtC,WAAO,KAAKH,QAAQgB,IAAIb,IAAIc,MAAK,CAAA,GAAKb;EACxC;;EAGAC,IAAIF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AO;IACT;AAEA,WAAO,KAAKa,OAAO0B,KAAAA;EACrB;;;;;EAMA,OAAOC,SAASC,YAAoC;AAClD,UAAMX,SAAS,IAAI9B,WAAAA;AACnB,eAAW0C,aAAaD,YAAY;AAClC,iBAAW,CAACtB,KAAKwB,KAAAA,KAAUD,UAAUzC,SAAS;AAC5C,cAAM2C,eAAed,OAAO7B,QAAQgB,IAAIE,GAAAA;AACxC,YAAIyB,iBAAiBC,UAAaF,MAAMtC,MAAMuC,aAAavC,KAAK;AAC9DyB,iBAAO7B,QAAQK,IAAIa,KAAKwB,KAAAA;QAC1B;MACF;IACF;AAEA,WAAOb;EACT;;;;;EAMA,OAAOgB,aAAaC,KAAgBC,KAA2B;AAC7D,UAAMlB,SAAS,IAAI9B,WAAAA;AACnB,eAAW,CAACmB,KAAKwB,KAAAA,KAAUI,IAAI9C,SAAS;AACtC,YAAMgD,aAAaD,IAAI/C,QAAQgB,IAAIE,GAAAA;AACnC,UAAI8B,eAAeJ,UAAaI,WAAW5C,MAAMsC,MAAMtC,KAAK;AAC1DyB,eAAO7B,QAAQK,IAAIa,KAAKwB,KAAAA;MAC1B;IACF;AAEA,WAAOb;EACT;AACF;",
6
+ "names": ["inspect", "equalsSymbol", "Timeframe", "_frames", "Map", "frames", "key", "seq", "set", "toJSON", "reduce", "truncate", "toString", "map", "join", "equals", "object", "size", "every", "get", "toHex", "hex", "Array", "from", "values", "isEmpty", "withoutKeys", "keys", "filter", "frameKey", "fn", "totalMessages", "result", "newMessages", "base", "entries", "Math", "max", "inspect", "custom", "equalsSymbol", "other", "merge", "timeframes", "timeframe", "entry", "currentEntry", "undefined", "dependencies", "tf1", "tf2", "otherEntry"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/timeframe.ts":{"bytes":13804,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":457,"imports":[{"path":"src/timeframe.ts","kind":"import-statement","original":"./timeframe"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7157},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"src/index.ts","inputs":{"src/timeframe.ts":{"bytesInOutput":3277},"src/index.ts":{"bytesInOutput":0}},"bytes":3390}}}
1
+ {"inputs":{"src/timeframe.ts":{"bytes":13804,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":457,"imports":[{"path":"src/timeframe.ts","kind":"import-statement","original":"./timeframe"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7161},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"src/index.ts","inputs":{"src/timeframe.ts":{"bytesInOutput":3270},"src/index.ts":{"bytesInOutput":0}},"bytes":3383}}}
@@ -4,8 +4,8 @@ import { createRequire } from 'node:module';const require = createRequire(import
4
4
  import { inspect } from "node:util";
5
5
  import { equalsSymbol } from "@dxos/debug";
6
6
  var Timeframe = class _Timeframe {
7
+ _frames = /* @__PURE__ */ new Map();
7
8
  constructor(frames = []) {
8
- this._frames = /* @__PURE__ */ new Map();
9
9
  for (const [key, seq] of frames) {
10
10
  this.set(key, seq);
11
11
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/timeframe.ts"],
4
- "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nimport { equalsSymbol, type Equatable } from '@dxos/debug';\nimport { type PublicKey } from '@dxos/keys';\n\ntype Entry = {\n key: PublicKey;\n seq: number;\n};\n\n/**\n * A vector clock that implements ordering over a set of feed messages.\n */\nexport class Timeframe implements Equatable {\n private readonly _frames = new Map<string, Entry>();\n\n constructor(frames: [PublicKey, number][] = []) {\n for (const [key, seq] of frames) {\n this.set(key, seq);\n }\n }\n\n toJSON(): Record<string, number> {\n return this.frames().reduce((frames: Record<string, number>, [key, seq]) => {\n frames[key.truncate()] = seq;\n return frames;\n }, {});\n }\n\n toString(): string {\n return `(${this.frames()\n .map(([key, seq]) => `${key.truncate()}[${seq}]`)\n .join(', ')})`;\n }\n\n equals(object: Timeframe): boolean {\n return this.size() === object.size() && this.frames().every(([key, seq]) => object.get(key) === seq);\n }\n\n // TODO(burdon): Rename getFrame.\n get(key: PublicKey): number | undefined {\n return this._frames.get(key.toHex())?.seq;\n }\n\n // TODO(burdon): Rename setFrame.\n set(key: PublicKey, seq: number): void {\n const hex = key.toHex();\n this._frames.set(hex, { key, seq });\n }\n\n // TODO(burdon): Change to getter.\n frames(): [PublicKey, number][] {\n return Array.from(this._frames.values()).map(({ key, seq }) => [key, seq]);\n }\n\n // TODO(burdon): Change to getter.\n size(): number {\n return this._frames.size;\n }\n\n // TODO(burdon): Change to getter (empty).\n isEmpty(): boolean {\n return this.size() === 0;\n }\n\n /**\n * Returns a new timeframe with specified keys removed.\n * @param keys\n */\n withoutKeys(keys: PublicKey[]): Timeframe {\n return new Timeframe(this.frames().filter(([frameKey]) => keys.every((key) => !key.equals(frameKey))));\n }\n\n map(fn: (frame: [key: PublicKey, seq: number]) => [PublicKey, number]): Timeframe {\n return new Timeframe(this.frames().map(fn));\n }\n\n /**\n * Returns a total amount of messages represented by this timeframe.\n */\n totalMessages(): number {\n return Array.from(this._frames.values()).reduce((result, { seq }) => result + seq + 1, 0);\n }\n\n /**\n * Returns a total amount of messages that are present in this timeframe but are missing in `base`.\n */\n newMessages(base: Timeframe): number {\n return Array.from(this._frames.entries()).reduce(\n (result, [hex, { seq }]) => result + Math.max(seq - (base._frames.get(hex)?.seq ?? -1), 0),\n 0,\n );\n }\n\n /**\n * Used by NodeJS to get textual representation of this object in `console.log`.\n */\n [inspect.custom](): string {\n return `Timeframe${this.toString()}`;\n }\n\n [equalsSymbol](other: any): boolean {\n if (!(other instanceof Timeframe)) {\n return false;\n }\n\n return this.equals(other);\n }\n\n /**\n * Merges the values, updating the highest sequence numbers.\n * @param timeframes\n */\n static merge(...timeframes: Timeframe[]): Timeframe {\n const result = new Timeframe();\n for (const timeframe of timeframes) {\n for (const [hex, entry] of timeframe._frames) {\n const currentEntry = result._frames.get(hex);\n if (currentEntry === undefined || entry.seq > currentEntry.seq) {\n result._frames.set(hex, entry);\n }\n }\n }\n\n return result;\n }\n\n /**\n * Compares two timeframes and returns an array of frames from the first timeframe where the sequence number\n * is greater than the associated sequence number from the second timeframe.\n */\n static dependencies(tf1: Timeframe, tf2: Timeframe): Timeframe {\n const result = new Timeframe();\n for (const [hex, entry] of tf1._frames) {\n const otherEntry = tf2._frames.get(hex);\n if (otherEntry === undefined || otherEntry.seq < entry.seq) {\n result._frames.set(hex, entry);\n }\n }\n\n return result;\n }\n}\n"],
5
- "mappings": ";;;AAIA,SAASA,eAAe;AAExB,SAASC,oBAAoC;AAWtC,IAAMC,YAAN,MAAMA,WAAAA;EAGX,YAAYC,SAAgC,CAAA,GAAI;AAF/BC,mBAAU,oBAAIC,IAAAA;AAG7B,eAAW,CAACC,KAAKC,GAAAA,KAAQJ,QAAQ;AAC/B,WAAKK,IAAIF,KAAKC,GAAAA;IAChB;EACF;EAEAE,SAAiC;AAC/B,WAAO,KAAKN,OAAM,EAAGO,OAAO,CAACP,QAAgC,CAACG,KAAKC,GAAAA,MAAI;AACrEJ,aAAOG,IAAIK,SAAQ,CAAA,IAAMJ;AACzB,aAAOJ;IACT,GAAG,CAAC,CAAA;EACN;EAEAS,WAAmB;AACjB,WAAO,IAAI,KAAKT,OAAM,EACnBU,IAAI,CAAC,CAACP,KAAKC,GAAAA,MAAS,GAAGD,IAAIK,SAAQ,CAAA,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B,OACxC,CAACsB,QAAQ,CAACX,KAAK,EAAEd,IAAG,CAAE,MAAMyB,SAASI,KAAKC,IAAI9B,OAAO2B,KAAK9B,QAAQe,IAAIE,GAAAA,GAAMd,OAAO,KAAK,CAAA,GACxF,CAAA;EAEJ;;;;EAKA,CAAC+B,QAAQC,MAAM,IAAY;AACzB,WAAO,YAAY,KAAK3B,SAAQ,CAAA;EAClC;EAEA,CAAC4B,YAAAA,EAAcC,OAAqB;AAClC,QAAI,EAAEA,iBAAiBvC,aAAY;AACjC,aAAO;IACT;AAEA,WAAO,KAAKa,OAAO0B,KAAAA;EACrB;;;;;EAMA,OAAOC,SAASC,YAAoC;AAClD,UAAMX,SAAS,IAAI9B,WAAAA;AACnB,eAAW0C,aAAaD,YAAY;AAClC,iBAAW,CAACtB,KAAKwB,KAAAA,KAAUD,UAAUxC,SAAS;AAC5C,cAAM0C,eAAed,OAAO5B,QAAQe,IAAIE,GAAAA;AACxC,YAAIyB,iBAAiBC,UAAaF,MAAMtC,MAAMuC,aAAavC,KAAK;AAC9DyB,iBAAO5B,QAAQI,IAAIa,KAAKwB,KAAAA;QAC1B;MACF;IACF;AAEA,WAAOb;EACT;;;;;EAMA,OAAOgB,aAAaC,KAAgBC,KAA2B;AAC7D,UAAMlB,SAAS,IAAI9B,WAAAA;AACnB,eAAW,CAACmB,KAAKwB,KAAAA,KAAUI,IAAI7C,SAAS;AACtC,YAAM+C,aAAaD,IAAI9C,QAAQe,IAAIE,GAAAA;AACnC,UAAI8B,eAAeJ,UAAaI,WAAW5C,MAAMsC,MAAMtC,KAAK;AAC1DyB,eAAO5B,QAAQI,IAAIa,KAAKwB,KAAAA;MAC1B;IACF;AAEA,WAAOb;EACT;AACF;",
6
- "names": ["inspect", "equalsSymbol", "Timeframe", "frames", "_frames", "Map", "key", "seq", "set", "toJSON", "reduce", "truncate", "toString", "map", "join", "equals", "object", "size", "every", "get", "toHex", "hex", "Array", "from", "values", "isEmpty", "withoutKeys", "keys", "filter", "frameKey", "fn", "totalMessages", "result", "newMessages", "base", "entries", "Math", "max", "inspect", "custom", "equalsSymbol", "other", "merge", "timeframes", "timeframe", "entry", "currentEntry", "undefined", "dependencies", "tf1", "tf2", "otherEntry"]
4
+ "sourcesContent": ["//\n// Copyright 2020 DXOS.org\n//\n\nimport { inspect } from 'node:util';\n\nimport { type Equatable, equalsSymbol } from '@dxos/debug';\nimport { type PublicKey } from '@dxos/keys';\n\ntype Entry = {\n key: PublicKey;\n seq: number;\n};\n\n/**\n * A vector clock that implements ordering over a set of feed messages.\n */\nexport class Timeframe implements Equatable {\n private readonly _frames = new Map<string, Entry>();\n\n constructor(frames: [PublicKey, number][] = []) {\n for (const [key, seq] of frames) {\n this.set(key, seq);\n }\n }\n\n toJSON(): Record<string, number> {\n return this.frames().reduce((frames: Record<string, number>, [key, seq]) => {\n frames[key.truncate()] = seq;\n return frames;\n }, {});\n }\n\n toString(): string {\n return `(${this.frames()\n .map(([key, seq]) => `${key.truncate()}[${seq}]`)\n .join(', ')})`;\n }\n\n equals(object: Timeframe): boolean {\n return this.size() === object.size() && this.frames().every(([key, seq]) => object.get(key) === seq);\n }\n\n // TODO(burdon): Rename getFrame.\n get(key: PublicKey): number | undefined {\n return this._frames.get(key.toHex())?.seq;\n }\n\n // TODO(burdon): Rename setFrame.\n set(key: PublicKey, seq: number): void {\n const hex = key.toHex();\n this._frames.set(hex, { key, seq });\n }\n\n // TODO(burdon): Change to getter.\n frames(): [PublicKey, number][] {\n return Array.from(this._frames.values()).map(({ key, seq }) => [key, seq]);\n }\n\n // TODO(burdon): Change to getter.\n size(): number {\n return this._frames.size;\n }\n\n // TODO(burdon): Change to getter (empty).\n isEmpty(): boolean {\n return this.size() === 0;\n }\n\n /**\n * Returns a new timeframe with specified keys removed.\n * @param keys\n */\n withoutKeys(keys: PublicKey[]): Timeframe {\n return new Timeframe(this.frames().filter(([frameKey]) => keys.every((key) => !key.equals(frameKey))));\n }\n\n map(fn: (frame: [key: PublicKey, seq: number]) => [PublicKey, number]): Timeframe {\n return new Timeframe(this.frames().map(fn));\n }\n\n /**\n * Returns a total amount of messages represented by this timeframe.\n */\n totalMessages(): number {\n return Array.from(this._frames.values()).reduce((result, { seq }) => result + seq + 1, 0);\n }\n\n /**\n * Returns a total amount of messages that are present in this timeframe but are missing in `base`.\n */\n newMessages(base: Timeframe): number {\n return Array.from(this._frames.entries()).reduce(\n (result, [hex, { seq }]) => result + Math.max(seq - (base._frames.get(hex)?.seq ?? -1), 0),\n 0,\n );\n }\n\n /**\n * Used by NodeJS to get textual representation of this object in `console.log`.\n */\n [inspect.custom](): string {\n return `Timeframe${this.toString()}`;\n }\n\n [equalsSymbol](other: any): boolean {\n if (!(other instanceof Timeframe)) {\n return false;\n }\n\n return this.equals(other);\n }\n\n /**\n * Merges the values, updating the highest sequence numbers.\n * @param timeframes\n */\n static merge(...timeframes: Timeframe[]): Timeframe {\n const result = new Timeframe();\n for (const timeframe of timeframes) {\n for (const [hex, entry] of timeframe._frames) {\n const currentEntry = result._frames.get(hex);\n if (currentEntry === undefined || entry.seq > currentEntry.seq) {\n result._frames.set(hex, entry);\n }\n }\n }\n\n return result;\n }\n\n /**\n * Compares two timeframes and returns an array of frames from the first timeframe where the sequence number\n * is greater than the associated sequence number from the second timeframe.\n */\n static dependencies(tf1: Timeframe, tf2: Timeframe): Timeframe {\n const result = new Timeframe();\n for (const [hex, entry] of tf1._frames) {\n const otherEntry = tf2._frames.get(hex);\n if (otherEntry === undefined || otherEntry.seq < entry.seq) {\n result._frames.set(hex, entry);\n }\n }\n\n return result;\n }\n}\n"],
5
+ "mappings": ";;;AAIA,SAASA,eAAe;AAExB,SAAyBC,oBAAoB;AAWtC,IAAMC,YAAN,MAAMA,WAAAA;EACMC,UAAU,oBAAIC,IAAAA;EAE/B,YAAYC,SAAgC,CAAA,GAAI;AAC9C,eAAW,CAACC,KAAKC,GAAAA,KAAQF,QAAQ;AAC/B,WAAKG,IAAIF,KAAKC,GAAAA;IAChB;EACF;EAEAE,SA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,UAAaI,WAAW5C,MAAMsC,MAAMtC,KAAK;AAC1DyB,eAAO7B,QAAQK,IAAIa,KAAKwB,KAAAA;MAC1B;IACF;AAEA,WAAOb;EACT;AACF;",
6
+ "names": ["inspect", "equalsSymbol", "Timeframe", "_frames", "Map", "frames", "key", "seq", "set", "toJSON", "reduce", "truncate", "toString", "map", "join", "equals", "object", "size", "every", "get", "toHex", "hex", "Array", "from", "values", "isEmpty", "withoutKeys", "keys", "filter", "frameKey", "fn", "totalMessages", "result", "newMessages", "base", "entries", "Math", "max", "inspect", "custom", "equalsSymbol", "other", "merge", "timeframes", "timeframe", "entry", "currentEntry", "undefined", "dependencies", "tf1", "tf2", "otherEntry"]
7
7
  }
@@ -1 +1 @@
1
- {"inputs":{"src/timeframe.ts":{"bytes":13804,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":457,"imports":[{"path":"src/timeframe.ts","kind":"import-statement","original":"./timeframe"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7157},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"src/index.ts","inputs":{"src/timeframe.ts":{"bytesInOutput":3267},"src/index.ts":{"bytesInOutput":0}},"bytes":3439}}}
1
+ {"inputs":{"src/timeframe.ts":{"bytes":13804,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":457,"imports":[{"path":"src/timeframe.ts","kind":"import-statement","original":"./timeframe"}],"format":"esm"}},"outputs":{"dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7161},"dist/lib/node-esm/index.mjs":{"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"src/index.ts","inputs":{"src/timeframe.ts":{"bytesInOutput":3260},"src/index.ts":{"bytesInOutput":0}},"bytes":3432}}}
@@ -1,5 +1,5 @@
1
1
  import { inspect } from 'node:util';
2
- import { equalsSymbol, type Equatable } from '@dxos/debug';
2
+ import { type Equatable, equalsSymbol } from '@dxos/debug';
3
3
  import { type PublicKey } from '@dxos/keys';
4
4
  /**
5
5
  * A vector clock that implements ordering over a set of feed messages.
@@ -1 +1 @@
1
- {"version":3,"file":"timeframe.d.ts","sourceRoot":"","sources":["../../../src/timeframe.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C;;GAEG;AACH,qBAAa,SAAU,YAAW,SAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA4B;gBAExC,MAAM,GAAE,CAAC,SAAS,EAAE,MAAM,CAAC,EAAO;IAM9C,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAOhC,QAAQ,IAAI,MAAM;IAMlB,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO;IAKlC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS;IAKvC,GAAG,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAMtC,MAAM,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE;IAK/B,IAAI,IAAI,MAAM;IAKd,OAAO,IAAI,OAAO;IAIlB;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS;IAIzC,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,GAA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