@moq/net 0.3.5 → 0.4.1
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/announce.d.ts +7 -0
- package/announce.d.ts.map +1 -0
- package/announce.js +8 -0
- package/announce.js.map +1 -0
- package/announced.d.ts +49 -91
- package/announced.d.ts.map +1 -1
- package/announced.js +21 -156
- package/announced.js.map +1 -1
- package/bandwidth.d.ts +163 -0
- package/bandwidth.d.ts.map +1 -0
- package/bandwidth.js +304 -0
- package/bandwidth.js.map +1 -0
- package/bandwidth_api.d.ts +7 -0
- package/bandwidth_api.d.ts.map +1 -0
- package/bandwidth_api.js +8 -0
- package/bandwidth_api.js.map +1 -0
- package/broadcast.d.ts +23 -28
- package/broadcast.d.ts.map +1 -1
- package/broadcast.js +61 -40
- package/broadcast.js.map +1 -1
- package/connection/accept.d.ts +16 -1
- package/connection/accept.d.ts.map +1 -1
- package/connection/accept.js +48 -25
- package/connection/accept.js.map +1 -1
- package/connection/browser.d.ts.map +1 -1
- package/connection/browser.js +9 -7
- package/connection/browser.js.map +1 -1
- package/connection/connect.d.ts +30 -6
- package/connection/connect.d.ts.map +1 -1
- package/connection/connect.js +95 -46
- package/connection/connect.js.map +1 -1
- package/connection/established.d.ts +17 -21
- package/connection/established.d.ts.map +1 -1
- package/connection/established.js.map +1 -1
- package/connection/forward.d.ts +2 -0
- package/connection/forward.d.ts.map +1 -0
- package/connection/forward.js +166 -0
- package/connection/forward.js.map +1 -0
- package/connection/handshake.d.ts +1 -0
- package/connection/handshake.d.ts.map +1 -1
- package/connection/handshake.js +5 -2
- package/connection/handshake.js.map +1 -1
- package/connection/index.d.ts +5 -5
- package/connection/index.d.ts.map +1 -1
- package/connection/index.js +4 -5
- package/connection/index.js.map +1 -1
- package/connection/pool.d.ts +186 -0
- package/connection/pool.d.ts.map +1 -0
- package/connection/pool.js +361 -0
- package/connection/pool.js.map +1 -0
- package/connection/reload.d.ts +14 -93
- package/connection/reload.d.ts.map +1 -1
- package/connection/reload.js +217 -81
- package/connection/reload.js.map +1 -1
- package/connection/stats.d.ts +3 -26
- package/connection/stats.d.ts.map +1 -1
- package/connection/stats.js.map +1 -1
- package/connection/transport.d.ts +0 -7
- package/connection/transport.d.ts.map +1 -1
- package/consume.d.ts +1 -43
- package/consume.d.ts.map +1 -1
- package/consume.js +1 -1
- package/consume.js.map +1 -1
- package/error.d.ts +180 -29
- package/error.d.ts.map +1 -1
- package/error.js +331 -16
- package/error.js.map +1 -1
- package/errors.d.ts +7 -0
- package/errors.d.ts.map +1 -0
- package/errors.js +8 -0
- package/errors.js.map +1 -0
- package/group.d.ts +9 -43
- package/group.d.ts.map +1 -1
- package/group.js +283 -69
- package/group.js.map +1 -1
- package/hop.d.ts +107 -0
- package/hop.d.ts.map +1 -0
- package/hop.js +103 -0
- package/hop.js.map +1 -0
- package/ietf/adapter.d.ts +5 -1
- package/ietf/adapter.d.ts.map +1 -1
- package/ietf/adapter.js +27 -9
- package/ietf/adapter.js.map +1 -1
- package/ietf/aliases.d.ts +1 -78
- package/ietf/aliases.d.ts.map +1 -1
- package/ietf/cluster.d.ts +6 -120
- package/ietf/cluster.d.ts.map +1 -1
- package/ietf/cluster.js +81 -41
- package/ietf/cluster.js.map +1 -1
- package/ietf/connection.d.ts +6 -72
- package/ietf/connection.d.ts.map +1 -1
- package/ietf/connection.js +17 -49
- package/ietf/connection.js.map +1 -1
- package/ietf/error.d.ts +11 -0
- package/ietf/error.d.ts.map +1 -0
- package/ietf/error.js +193 -0
- package/ietf/error.js.map +1 -0
- package/ietf/filter.d.ts.map +1 -1
- package/ietf/filter.js +6 -1
- package/ietf/filter.js.map +1 -1
- package/ietf/goaway.d.ts.map +1 -1
- package/ietf/goaway.js +22 -5
- package/ietf/goaway.js.map +1 -1
- package/ietf/hidden.d.ts +2 -0
- package/ietf/hidden.d.ts.map +1 -0
- package/ietf/hidden.js +30 -0
- package/ietf/hidden.js.map +1 -0
- package/ietf/index.d.ts +1 -0
- package/ietf/index.d.ts.map +1 -1
- package/ietf/index.js +1 -0
- package/ietf/index.js.map +1 -1
- package/ietf/object.d.ts +8 -2
- package/ietf/object.d.ts.map +1 -1
- package/ietf/object.js +17 -3
- package/ietf/object.js.map +1 -1
- package/ietf/parameters.d.ts +7 -2
- package/ietf/parameters.d.ts.map +1 -1
- package/ietf/parameters.js +35 -17
- package/ietf/parameters.js.map +1 -1
- package/ietf/properties.d.ts +1 -0
- package/ietf/properties.d.ts.map +1 -1
- package/ietf/properties.js +14 -0
- package/ietf/properties.js.map +1 -1
- package/ietf/publish.d.ts +19 -2
- package/ietf/publish.d.ts.map +1 -1
- package/ietf/publish.js +40 -6
- package/ietf/publish.js.map +1 -1
- package/ietf/publish_namespace.d.ts +25 -0
- package/ietf/publish_namespace.d.ts.map +1 -1
- package/ietf/publish_namespace.js +63 -0
- package/ietf/publish_namespace.js.map +1 -1
- package/ietf/publisher.d.ts +1 -82
- package/ietf/publisher.d.ts.map +1 -1
- package/ietf/publisher.js +302 -181
- package/ietf/publisher.js.map +1 -1
- package/ietf/solicit.d.ts +1 -40
- package/ietf/solicit.d.ts.map +1 -1
- package/ietf/subscribe.d.ts +1 -5
- package/ietf/subscribe.d.ts.map +1 -1
- package/ietf/subscribe.js +11 -13
- package/ietf/subscribe.js.map +1 -1
- package/ietf/subscribe_namespace.d.ts +8 -2
- package/ietf/subscribe_namespace.d.ts.map +1 -1
- package/ietf/subscribe_namespace.js +18 -8
- package/ietf/subscribe_namespace.js.map +1 -1
- package/ietf/subscriber.d.ts +1 -65
- package/ietf/subscriber.d.ts.map +1 -1
- package/ietf/subscriber.js +325 -121
- package/ietf/subscriber.js.map +1 -1
- package/ietf/version.d.ts +12 -1
- package/ietf/version.d.ts.map +1 -1
- package/ietf/version.js +13 -0
- package/ietf/version.js.map +1 -1
- package/index.d.ts +11 -6
- package/index.d.ts.map +1 -1
- package/index.js +10 -5
- package/index.js.map +1 -1
- package/internal.d.ts +104 -1
- package/internal.d.ts.map +1 -1
- package/internal.js +76 -0
- package/internal.js.map +1 -1
- package/lite/announce.d.ts +60 -10
- package/lite/announce.d.ts.map +1 -1
- package/lite/announce.js +173 -31
- package/lite/announce.js.map +1 -1
- package/lite/connection.d.ts +9 -59
- package/lite/connection.d.ts.map +1 -1
- package/lite/connection.js +26 -32
- package/lite/connection.js.map +1 -1
- package/lite/fetch.d.ts +15 -1
- package/lite/fetch.d.ts.map +1 -1
- package/lite/fetch.js +39 -7
- package/lite/fetch.js.map +1 -1
- package/lite/goaway.d.ts.map +1 -1
- package/lite/goaway.js +7 -1
- package/lite/goaway.js.map +1 -1
- package/lite/group.d.ts +18 -4
- package/lite/group.d.ts.map +1 -1
- package/lite/group.js +31 -10
- package/lite/group.js.map +1 -1
- package/lite/priority.d.ts +1 -61
- package/lite/priority.d.ts.map +1 -1
- package/lite/priority.js +4 -5
- package/lite/priority.js.map +1 -1
- package/lite/publisher.d.ts +1 -69
- package/lite/publisher.d.ts.map +1 -1
- package/lite/publisher.js +593 -227
- package/lite/publisher.js.map +1 -1
- package/lite/setup.d.ts +7 -7
- package/lite/setup.d.ts.map +1 -1
- package/lite/setup.js +13 -13
- package/lite/setup.js.map +1 -1
- package/lite/subscribe.d.ts +71 -17
- package/lite/subscribe.d.ts.map +1 -1
- package/lite/subscribe.js +205 -53
- package/lite/subscribe.js.map +1 -1
- package/lite/subscriber.d.ts +15 -56
- package/lite/subscriber.d.ts.map +1 -1
- package/lite/subscriber.js +316 -188
- package/lite/subscriber.js.map +1 -1
- package/lite/track.d.ts +4 -10
- package/lite/track.d.ts.map +1 -1
- package/lite/track.js +34 -29
- package/lite/track.js.map +1 -1
- package/lite/version.d.ts +42 -6
- package/lite/version.d.ts.map +1 -1
- package/lite/version.js +126 -10
- package/lite/version.js.map +1 -1
- package/origin.d.ts +248 -29
- package/origin.d.ts.map +1 -1
- package/origin.js +1232 -37
- package/origin.js.map +1 -1
- package/package.json +8 -3
- package/path.d.ts +25 -7
- package/path.d.ts.map +1 -1
- package/path.js +5 -3
- package/path.js.map +1 -1
- package/stream.d.ts +2 -2
- package/stream.d.ts.map +1 -1
- package/stream.js +39 -25
- package/stream.js.map +1 -1
- package/tail.d.ts +11 -0
- package/tail.d.ts.map +1 -0
- package/tail.js +121 -0
- package/tail.js.map +1 -0
- package/time.d.ts +15 -2
- package/time.d.ts.map +1 -1
- package/time.js +28 -9
- package/time.js.map +1 -1
- package/track.d.ts +195 -84
- package/track.d.ts.map +1 -1
- package/track.js +694 -196
- package/track.js.map +1 -1
- package/wire.d.ts +69 -0
- package/wire.d.ts.map +1 -0
- package/wire.js +32 -0
- package/wire.js.map +1 -0
- package/zod.d.ts +1 -1
- package/zod.d.ts.map +1 -1
- package/zod.js.map +1 -1
- package/mock.d.ts +0 -66
- package/mock.d.ts.map +0 -1
- package/mock.js +0 -243
- package/mock.js.map +0 -1
package/time.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time.js","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,yEAAyE;AACzE,+FAA+F;AAC/F,oGAAoG;AACpG,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAa,EAAQ,EAAE,CAAC,KAAa,EAAE;IACzE,IAAI,EAAE,CAAS;IACf,SAAS,EAAE,CAAC,EAAS,EAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAS;IACpD,SAAS,EAAE,CAAC,EAAS,EAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAS;IACxD,UAAU,EAAE,CAAC,CAAS,EAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,aAAa,CAAS;IAC5D,OAAO,EAAE,CAAC,EAAQ,EAAS,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAU;IACnD,OAAO,EAAE,CAAC,EAAQ,EAAS,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAU;IACvD,QAAQ,EAA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;IACxD,GAAG,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAW;IACxD,GAAG,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAW;IAC/D,GAAG,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAW;CAC/D,CAAC,CAAC","sourcesContent":["/**\n * Branded time types (nanoseconds, microseconds, milliseconds, seconds) with conversions,\n * plus {@link Timescale} and {@link Timestamp} for presentation timing.\n *\n * @module\n */\n\n/** A duration in nanoseconds, branded so it can't be mixed with other units. */\nexport type Nano = number & { readonly _brand: \"nano\" };\n\n/** Constructors, conversions, and arithmetic for {@link Nano} values. */\n// Calling `Nano(x)` brands a raw number as nanoseconds. The unit is the caller's assertion: no\n// conversion happens, so reach for `fromMicro`/`fromMilli`/`fromSecond` when the source has a unit.\nexport const Nano = Object.assign((value: number): Nano => value as Nano, {\n\tzero: 0 as Nano,\n\tfromMicro: (us: Micro): Nano => (us * 1_000) as Nano,\n\tfromMilli: (ms: Milli): Nano => (ms * 1_000_000) as Nano,\n\tfromSecond: (s: Second): Nano => (s * 1_000_000_000) as Nano,\n\ttoMicro: (ns: Nano): Micro => (ns / 1_000) as Micro,\n\ttoMilli: (ns: Nano): Milli => (ns / 1_000_000) as Milli,\n\ttoSecond: (ns: Nano): Second => (ns / 1_000_000_000) as Second,\n\tnow: (): Nano => (performance.now() * 1_000_000) as Nano,\n\tadd: (a: Nano, b: Nano): Nano => (a + b) as Nano,\n\tsub: (a: Nano, b: Nano): Nano => (a - b) as Nano,\n\tmul: (a: Nano, b: number): Nano => (a * b) as Nano,\n\tdiv: (a: Nano, b: number): Nano => (a / b) as Nano,\n\tmax: (a: Nano, b: Nano): Nano => Math.max(a, b) as Nano,\n\tmin: (a: Nano, b: Nano): Nano => Math.min(a, b) as Nano,\n});\n\n/** A duration in microseconds, branded so it can't be mixed with other units. */\nexport type Micro = number & { readonly _brand: \"micro\" };\n\n/** Constructors, conversions, and arithmetic for {@link Micro} values. */\n// Calling `Micro(x)` brands a raw number as microseconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMilli`/`fromSecond` to convert from another unit.\nexport const Micro = Object.assign((value: number): Micro => value as Micro, {\n\tzero: 0 as Micro,\n\tfromNano: (ns: Nano): Micro => (ns / 1_000) as Micro,\n\tfromMilli: (ms: Milli): Micro => (ms * 1_000) as Micro,\n\tfromSecond: (s: Second): Micro => (s * 1_000_000) as Micro,\n\ttoNano: (us: Micro): Nano => (us * 1_000) as Nano,\n\ttoMilli: (us: Micro): Milli => (us / 1_000) as Milli,\n\ttoSecond: (us: Micro): Second => (us / 1_000_000) as Second,\n\tnow: (): Micro => (performance.now() * 1_000) as Micro,\n\tadd: (a: Micro, b: Micro): Micro => (a + b) as Micro,\n\tsub: (a: Micro, b: Micro): Micro => (a - b) as Micro,\n\tmul: (a: Micro, b: number): Micro => (a * b) as Micro,\n\tdiv: (a: Micro, b: number): Micro => (a / b) as Micro,\n\tmax: (a: Micro, b: Micro): Micro => Math.max(a, b) as Micro,\n\tmin: (a: Micro, b: Micro): Micro => Math.min(a, b) as Micro,\n});\n\n/** A duration in milliseconds, branded so it can't be mixed with other units. */\nexport type Milli = number & { readonly _brand: \"milli\" };\n\n/** Constructors, conversions, and arithmetic for {@link Milli} values. */\n// Calling `Milli(x)` brands a raw number as milliseconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMicro`/`fromSecond` to convert from another unit.\nexport const Milli = Object.assign((value: number): Milli => value as Milli, {\n\tzero: 0 as Milli,\n\tfromNano: (ns: Nano): Milli => (ns / 1_000_000) as Milli,\n\tfromMicro: (us: Micro): Milli => (us / 1_000) as Milli,\n\tfromSecond: (s: Second): Milli => (s * 1_000) as Milli,\n\ttoNano: (ms: Milli): Nano => (ms * 1_000_000) as Nano,\n\ttoMicro: (ms: Milli): Micro => (ms * 1_000) as Micro,\n\ttoSecond: (ms: Milli): Second => (ms / 1_000) as Second,\n\tnow: (): Milli => performance.now() as Milli,\n\tadd: (a: Milli, b: Milli): Milli => (a + b) as Milli,\n\tsub: (a: Milli, b: Milli): Milli => (a - b) as Milli,\n\tmul: (a: Milli, b: number): Milli => (a * b) as Milli,\n\tdiv: (a: Milli, b: number): Milli => (a / b) as Milli,\n\tmax: (a: Milli, b: Milli): Milli => Math.max(a, b) as Milli,\n\tmin: (a: Milli, b: Milli): Milli => Math.min(a, b) as Milli,\n});\n\n/** Units per second for a {@link Timestamp}'s value, e.g. `1000` for milliseconds. */\nexport type Timescale = number & { readonly _brand: \"timescale\" };\n\n/** Named timescales and a checked constructor (rejects non-positive / non-integer values). */\nexport const Timescale = Object.assign(\n\t(unitsPerSecond: number): Timescale => {\n\t\tif (!Number.isInteger(unitsPerSecond) || unitsPerSecond <= 0) {\n\t\t\tthrow new Error(`invalid timescale: ${unitsPerSecond}`);\n\t\t}\n\t\treturn unitsPerSecond as Timescale;\n\t},\n\t{\n\t\t/** One unit per second. */\n\t\tSECOND: 1 as Timescale,\n\t\t/** 1,000 units per second. */\n\t\tMILLI: 1_000 as Timescale,\n\t\t/** 1,000,000 units per second. */\n\t\tMICRO: 1_000_000 as Timescale,\n\t\t/** 1,000,000,000 units per second. */\n\t\tNANO: 1_000_000_000 as Timescale,\n\t},\n);\n\n/**\n * A presentation timestamp: a raw value in a given {@link Timescale}.\n *\n * Mirrors the Rust `Timestamp`. Unlike the bare `Milli`/`Micro` aliases it carries its\n * own scale, so a track can pick its units and conversions can't silently mix them up.\n */\nexport class Timestamp {\n\t/** The raw value, in `scale` units. */\n\treadonly value: number;\n\t/** Units per second the {@link value} is measured in. */\n\treadonly scale: Timescale;\n\n\t/** Build a timestamp of `value` units at `scale`. */\n\tconstructor(value: number, scale: Timescale) {\n\t\tif (!Number.isFinite(value) || value < 0) {\n\t\t\tthrow new Error(`invalid timestamp: ${value}`);\n\t\t}\n\t\tthis.value = value;\n\t\tthis.scale = scale;\n\t}\n\n\t/** Monotonic now (`performance.now()`, milliseconds since page load), not wall-clock time. */\n\tstatic now(): Timestamp {\n\t\treturn new Timestamp(performance.now(), Timescale.MILLI);\n\t}\n\n\t/** A timestamp of `ms` milliseconds. */\n\tstatic fromMillis(ms: number): Timestamp {\n\t\treturn new Timestamp(ms, Timescale.MILLI);\n\t}\n\n\t/** A timestamp of `us` microseconds. */\n\tstatic fromMicros(us: number): Timestamp {\n\t\treturn new Timestamp(us, Timescale.MICRO);\n\t}\n\n\t/** This timestamp's value re-expressed at `scale` (a raw number, not a new Timestamp). */\n\tas(scale: Timescale): number {\n\t\treturn scale === this.scale ? this.value : (this.value * scale) / this.scale;\n\t}\n\n\t/** The value in milliseconds. */\n\tasMillis(): number {\n\t\treturn this.as(Timescale.MILLI);\n\t}\n\n\t/** The value in microseconds. */\n\tasMicros(): number {\n\t\treturn this.as(Timescale.MICRO);\n\t}\n}\n\n/** A duration in seconds, branded so it can't be mixed with other units. */\nexport type Second = number & { readonly _brand: \"second\" };\n\n/** Constructors, conversions, and arithmetic for {@link Second} values. */\n// Calling `Second(x)` brands a raw number as seconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMicro`/`fromMilli` to convert from another unit.\nexport const Second = Object.assign((value: number): Second => value as Second, {\n\tzero: 0 as Second,\n\tfromNano: (ns: Nano): Second => (ns / 1_000_000_000) as Second,\n\tfromMicro: (us: Micro): Second => (us / 1_000_000) as Second,\n\tfromMilli: (ms: Milli): Second => (ms / 1_000) as Second,\n\ttoNano: (s: Second): Nano => (s * 1_000_000_000) as Nano,\n\ttoMicro: (s: Second): Micro => (s * 1_000_000) as Micro,\n\ttoMilli: (s: Second): Milli => (s * 1_000) as Milli,\n\tnow: (): Second => (performance.now() / 1_000) as Second,\n\tadd: (a: Second, b: Second): Second => (a + b) as Second,\n\tsub: (a: Second, b: Second): Second => (a - b) as Second,\n\tmul: (a: Second, b: number): Second => (a * b) as Second,\n\tdiv: (a: Second, b: number): Second => (a / b) as Second,\n\tmax: (a: Second, b: Second): Second => Math.max(a, b) as Second,\n\tmin: (a: Second, b: Second): Second => Math.min(a, b) as Second,\n});\n"]}
|
|
1
|
+
{"version":3,"file":"time.js","sourceRoot":"","sources":["../src/time.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,yEAAyE;AACzE,+FAA+F;AAC/F,oGAAoG;AACpG,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAa,EAAQ,EAAE,CAAC,KAAa,EAAE;IACzE,IAAI,EAAE,CAAS;IACf,SAAS,EAAE,CAAC,EAAS,EAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAS;IACpD,SAAS,EAAE,CAAC,EAAS,EAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAS;IACxD,UAAU,EAAE,CAAC,CAAS,EAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,aAAa,CAAS;IAC5D,OAAO,EAAE,CAAC,EAAQ,EAAS,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,CAAU;IACnD,OAAO,EAAE,CAAC,EAAQ,EAAS,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,CAAU;IACvD,QAAQ,EAAE,CAAC,EAAQ,EAAU,EAAE,CAAC,CAAC,EAAE,GAAG,aAAa,CAAW;IAC9D,GAAG,EAAE,GAAS,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAS;IACxD,GAAG,EAAE,CAAC,CAAO,EAAE,CAAO,EAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAS;IAChD,GAAG,EAAE,CAAC,CAAO,EAAE,CAAO,EAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAS;IAChD,GAAG,EAAE,CAAC,CAAO,EAAE,CAAS,EAAQ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G,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAW;IAC/D,GAAG,EAAE,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAW;CAC/D,CAAC,CAAC","sourcesContent":["/**\n * Branded time types (nanoseconds, microseconds, milliseconds, seconds) with conversions,\n * plus {@link Timescale} and {@link Timestamp} for presentation timing.\n *\n * @module\n */\n\n/** A duration in nanoseconds, branded so it can't be mixed with other units. */\nexport type Nano = number & { readonly _brand: \"nano\" };\n\n/** Constructors, conversions, and arithmetic for {@link Nano} values. */\n// Calling `Nano(x)` brands a raw number as nanoseconds. The unit is the caller's assertion: no\n// conversion happens, so reach for `fromMicro`/`fromMilli`/`fromSecond` when the source has a unit.\nexport const Nano = Object.assign((value: number): Nano => value as Nano, {\n\tzero: 0 as Nano,\n\tfromMicro: (us: Micro): Nano => (us * 1_000) as Nano,\n\tfromMilli: (ms: Milli): Nano => (ms * 1_000_000) as Nano,\n\tfromSecond: (s: Second): Nano => (s * 1_000_000_000) as Nano,\n\ttoMicro: (ns: Nano): Micro => (ns / 1_000) as Micro,\n\ttoMilli: (ns: Nano): Milli => (ns / 1_000_000) as Milli,\n\ttoSecond: (ns: Nano): Second => (ns / 1_000_000_000) as Second,\n\tnow: (): Nano => (performance.now() * 1_000_000) as Nano,\n\tadd: (a: Nano, b: Nano): Nano => (a + b) as Nano,\n\tsub: (a: Nano, b: Nano): Nano => (a - b) as Nano,\n\tmul: (a: Nano, b: number): Nano => (a * b) as Nano,\n\tdiv: (a: Nano, b: number): Nano => (a / b) as Nano,\n\tmax: (a: Nano, b: Nano): Nano => Math.max(a, b) as Nano,\n\tmin: (a: Nano, b: Nano): Nano => Math.min(a, b) as Nano,\n});\n\n/** A duration in microseconds, branded so it can't be mixed with other units. */\nexport type Micro = number & { readonly _brand: \"micro\" };\n\n/** Constructors, conversions, and arithmetic for {@link Micro} values. */\n// Calling `Micro(x)` brands a raw number as microseconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMilli`/`fromSecond` to convert from another unit.\nexport const Micro = Object.assign((value: number): Micro => value as Micro, {\n\tzero: 0 as Micro,\n\tfromNano: (ns: Nano): Micro => (ns / 1_000) as Micro,\n\tfromMilli: (ms: Milli): Micro => (ms * 1_000) as Micro,\n\tfromSecond: (s: Second): Micro => (s * 1_000_000) as Micro,\n\ttoNano: (us: Micro): Nano => (us * 1_000) as Nano,\n\ttoMilli: (us: Micro): Milli => (us / 1_000) as Milli,\n\ttoSecond: (us: Micro): Second => (us / 1_000_000) as Second,\n\tnow: (): Micro => (performance.now() * 1_000) as Micro,\n\tadd: (a: Micro, b: Micro): Micro => (a + b) as Micro,\n\tsub: (a: Micro, b: Micro): Micro => (a - b) as Micro,\n\tmul: (a: Micro, b: number): Micro => (a * b) as Micro,\n\tdiv: (a: Micro, b: number): Micro => (a / b) as Micro,\n\tmax: (a: Micro, b: Micro): Micro => Math.max(a, b) as Micro,\n\tmin: (a: Micro, b: Micro): Micro => Math.min(a, b) as Micro,\n});\n\n/** A duration in milliseconds, branded so it can't be mixed with other units. */\nexport type Milli = number & { readonly _brand: \"milli\" };\n\n/** Constructors, conversions, and arithmetic for {@link Milli} values. */\n// Calling `Milli(x)` brands a raw number as milliseconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMicro`/`fromSecond` to convert from another unit.\nexport const Milli = Object.assign((value: number): Milli => value as Milli, {\n\tzero: 0 as Milli,\n\tfromNano: (ns: Nano): Milli => (ns / 1_000_000) as Milli,\n\tfromMicro: (us: Micro): Milli => (us / 1_000) as Milli,\n\tfromSecond: (s: Second): Milli => (s * 1_000) as Milli,\n\ttoNano: (ms: Milli): Nano => (ms * 1_000_000) as Nano,\n\ttoMicro: (ms: Milli): Micro => (ms * 1_000) as Micro,\n\ttoSecond: (ms: Milli): Second => (ms / 1_000) as Second,\n\tnow: (): Milli => performance.now() as Milli,\n\tadd: (a: Milli, b: Milli): Milli => (a + b) as Milli,\n\tsub: (a: Milli, b: Milli): Milli => (a - b) as Milli,\n\tmul: (a: Milli, b: number): Milli => (a * b) as Milli,\n\tdiv: (a: Milli, b: number): Milli => (a / b) as Milli,\n\tmax: (a: Milli, b: Milli): Milli => Math.max(a, b) as Milli,\n\tmin: (a: Milli, b: Milli): Milli => Math.min(a, b) as Milli,\n});\n\n/** Units per second for a {@link Timestamp}'s value, e.g. `1000` for milliseconds. */\nexport type Timescale = number & { readonly _brand: \"timescale\" };\n\n/**\n * Named timescales and a checked constructor.\n *\n * Units per second must be a safe integer ≥ 1. JavaScript numbers are exact only\n * through `Number.MAX_SAFE_INTEGER` (`2^53 - 1`); the wire varint range goes\n * to `2^62 - 1`, which Rust accepts and this constructor refuses.\n */\nexport const Timescale = Object.assign(\n\t(unitsPerSecond: number): Timescale => {\n\t\tif (!Number.isSafeInteger(unitsPerSecond) || unitsPerSecond <= 0) {\n\t\t\tthrow new RangeError(`invalid timescale: ${unitsPerSecond}`);\n\t\t}\n\t\treturn unitsPerSecond as Timescale;\n\t},\n\t{\n\t\t/** One unit per second. */\n\t\tSECOND: 1 as Timescale,\n\t\t/** 1,000 units per second. */\n\t\tMILLI: 1_000 as Timescale,\n\t\t/** 1,000,000 units per second. */\n\t\tMICRO: 1_000_000 as Timescale,\n\t\t/** 1,000,000,000 units per second. */\n\t\tNANO: 1_000_000_000 as Timescale,\n\t},\n);\n\nfunction assertTimestampValue(value: number): void {\n\tif (!Number.isFinite(value) || value < 0 || value > Number.MAX_SAFE_INTEGER) {\n\t\tthrow new RangeError(`invalid timestamp: ${value}`);\n\t}\n}\n\n/**\n * A presentation timestamp: a raw value in a given {@link Timescale}.\n *\n * Mirrors the Rust `Timestamp`. Unlike the bare `Milli`/`Micro` aliases it carries its\n * own scale, so a track can pick its units and conversions can't silently mix them up.\n *\n * The value must be finite and in `[0, Number.MAX_SAFE_INTEGER]`. Fractions are allowed\n * (`performance.now()`, scale conversion). Encoding rounds to the nearest integer at the\n * track timescale. Integer timestamps are exact through `2^53 - 1` units; this package\n * does not use BigInt for timestamps. {@link Timestamp.as} also refuses a converted\n * value that leaves that range, so a legal source timestamp cannot become an unencodable\n * wire timestamp after a scale change.\n */\nexport class Timestamp {\n\t/** The raw value, in `scale` units. */\n\treadonly value: number;\n\t/** Units per second the {@link value} is measured in. */\n\treadonly scale: Timescale;\n\n\t/** Build a timestamp of `value` units at `scale`. */\n\tconstructor(value: number, scale: Timescale) {\n\t\tassertTimestampValue(value);\n\t\tthis.value = value;\n\t\tthis.scale = Timescale(scale);\n\t}\n\n\t/** Monotonic now (`performance.now()`, milliseconds since page load), not wall-clock time. */\n\tstatic now(): Timestamp {\n\t\treturn new Timestamp(performance.now(), Timescale.MILLI);\n\t}\n\n\t/** A timestamp of `ms` milliseconds. */\n\tstatic fromMillis(ms: number): Timestamp {\n\t\treturn new Timestamp(ms, Timescale.MILLI);\n\t}\n\n\t/** A timestamp of `us` microseconds. */\n\tstatic fromMicros(us: number): Timestamp {\n\t\treturn new Timestamp(us, Timescale.MICRO);\n\t}\n\n\t/** This timestamp's value re-expressed at `scale`; throws if the result is not in the safe range. */\n\tas(scale: Timescale): number {\n\t\tconst dest = Timescale(scale);\n\t\tconst converted = dest === this.scale ? this.value : (this.value * dest) / this.scale;\n\t\tassertTimestampValue(converted);\n\t\treturn converted;\n\t}\n\n\t/** The value in milliseconds. */\n\tasMillis(): number {\n\t\treturn this.as(Timescale.MILLI);\n\t}\n\n\t/** The value in microseconds. */\n\tasMicros(): number {\n\t\treturn this.as(Timescale.MICRO);\n\t}\n}\n\n/** A duration in seconds, branded so it can't be mixed with other units. */\nexport type Second = number & { readonly _brand: \"second\" };\n\n/** Constructors, conversions, and arithmetic for {@link Second} values. */\n// Calling `Second(x)` brands a raw number as seconds. See the `Nano` note: this asserts the unit\n// rather than converting, so use `fromNano`/`fromMicro`/`fromMilli` to convert from another unit.\nexport const Second = Object.assign((value: number): Second => value as Second, {\n\tzero: 0 as Second,\n\tfromNano: (ns: Nano): Second => (ns / 1_000_000_000) as Second,\n\tfromMicro: (us: Micro): Second => (us / 1_000_000) as Second,\n\tfromMilli: (ms: Milli): Second => (ms / 1_000) as Second,\n\ttoNano: (s: Second): Nano => (s * 1_000_000_000) as Nano,\n\ttoMicro: (s: Second): Micro => (s * 1_000_000) as Micro,\n\ttoMilli: (s: Second): Milli => (s * 1_000) as Milli,\n\tnow: (): Second => (performance.now() / 1_000) as Second,\n\tadd: (a: Second, b: Second): Second => (a + b) as Second,\n\tsub: (a: Second, b: Second): Second => (a - b) as Second,\n\tmul: (a: Second, b: number): Second => (a * b) as Second,\n\tdiv: (a: Second, b: number): Second => (a / b) as Second,\n\tmax: (a: Second, b: Second): Second => Math.max(a, b) as Second,\n\tmin: (a: Second, b: Second): Second => Math.min(a, b) as Second,\n});\n"]}
|
package/track.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import { type GetPromise, type Getter } from "@moq/signals";
|
|
7
7
|
import type { Datagram } from "./datagram";
|
|
8
8
|
import { type Frame, type Consumer as GroupConsumer, Producer as GroupProducer } from "./group";
|
|
9
|
-
import { Timescale, type Timestamp } from "./time";
|
|
9
|
+
import { Milli, Timescale, type Timestamp } from "./time";
|
|
10
10
|
export type { Datagram } from "./datagram";
|
|
11
|
-
/** Default {@link Info.
|
|
12
|
-
export declare const
|
|
11
|
+
/** Default {@link Info.maxAge} window (milliseconds) when the publisher does not set one. */
|
|
12
|
+
export declare const DEFAULT_MAX_AGE_MS: Milli;
|
|
13
13
|
/** A position within a track: a group's sequence and a frame's index inside it. */
|
|
14
14
|
export interface Location {
|
|
15
15
|
/** The group's sequence number within the track. */
|
|
@@ -32,45 +32,59 @@ export interface Info {
|
|
|
32
32
|
*/
|
|
33
33
|
timescale: Timescale;
|
|
34
34
|
/**
|
|
35
|
-
* Publisher Max
|
|
35
|
+
* Publisher Max Age: the maximum age (milliseconds) of a non-latest group before
|
|
36
36
|
* the publisher evicts it. Reported in TRACK_INFO (Lite05+) so relays re-serve with the
|
|
37
37
|
* same bound. The publisher-side half of the budget a subscriber sets for itself.
|
|
38
38
|
* Rounded up to a whole millisecond by {@link infoDefaults}, which refuses a negative
|
|
39
|
-
* or non-finite value.
|
|
39
|
+
* or non-finite value and a result past `Number.MAX_SAFE_INTEGER`.
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
/** Tie-break priority between subscriptions of equal subscriber priority. */
|
|
41
|
+
maxAge: Milli;
|
|
42
|
+
/** Tie-break priority between subscriptions of equal subscriber priority (`0..=255`). */
|
|
43
43
|
priority: number;
|
|
44
|
-
/**
|
|
45
|
-
* Whether groups are prioritized in sequence order. Groups may always arrive
|
|
46
|
-
* out-of-order (or not at all) over the network. Defaults to `false` (newest-first).
|
|
47
|
-
*/
|
|
48
|
-
ordered: boolean;
|
|
49
44
|
}
|
|
50
45
|
/** Fill in any unset {@link Info} fields with their defaults. */
|
|
51
46
|
export declare function infoDefaults(info?: Partial<Info>): Info;
|
|
47
|
+
/** An explicitly included or excluded group sequence. */
|
|
48
|
+
export type Bound = {
|
|
49
|
+
included: number;
|
|
50
|
+
excluded?: never;
|
|
51
|
+
} | {
|
|
52
|
+
excluded: number;
|
|
53
|
+
included?: never;
|
|
54
|
+
};
|
|
55
|
+
/** Group limits; an omitted endpoint is unbounded. */
|
|
56
|
+
export interface Groups {
|
|
57
|
+
/** The first group boundary. */
|
|
58
|
+
start?: Bound;
|
|
59
|
+
/** The last group boundary. */
|
|
60
|
+
end?: Bound;
|
|
61
|
+
}
|
|
52
62
|
/**
|
|
53
63
|
* Per-subscription options, requested when a subscription opens and adjustable later via
|
|
54
64
|
* {@link Subscriber.update}. Mirrors the Rust `Subscription`.
|
|
55
65
|
*/
|
|
56
66
|
export interface Subscription {
|
|
57
|
-
/** Delivery priority relative to this session's other subscriptions. Defaults to `0`. */
|
|
67
|
+
/** Delivery priority relative to this session's other subscriptions (`0..=255`). Defaults to `0`. */
|
|
58
68
|
priority?: number;
|
|
59
|
-
/** Whether groups are prioritized in sequence order. Defaults to `false` (newest-first). */
|
|
60
|
-
ordered?: boolean;
|
|
61
69
|
/**
|
|
62
70
|
* Maximum age (milliseconds) of a non-latest group before it is skipped. Defaults to `0`.
|
|
63
71
|
* Rounded up to a whole millisecond, so a value derived from a measurement is never
|
|
64
|
-
* shortened. A negative or non-finite value
|
|
72
|
+
* shortened. A negative or non-finite value, or one past `Number.MAX_SAFE_INTEGER`
|
|
73
|
+
* after rounding, is refused.
|
|
74
|
+
*/
|
|
75
|
+
maxAge?: Milli;
|
|
76
|
+
/**
|
|
77
|
+
* The lowest group the publisher may deliver (a floor), or omit for none.
|
|
78
|
+
*
|
|
79
|
+
* A floor, not a request: only {@link maxAge} asks for data, and the floor bounds how
|
|
80
|
+
* far back it may reach. Omitting it and a floor of 0 mean the same thing, and a floor
|
|
81
|
+
* above the live edge simply waits there (a resumed subscription naming where it left
|
|
82
|
+
* off).
|
|
65
83
|
*/
|
|
66
|
-
|
|
67
|
-
/** First group the publisher should deliver, or omit to start at the latest group. */
|
|
68
|
-
startGroup?: number;
|
|
69
|
-
/** Last group the publisher should deliver (inclusive), or omit for no end. */
|
|
70
|
-
endGroup?: number;
|
|
84
|
+
groups?: Groups;
|
|
71
85
|
}
|
|
72
86
|
/**
|
|
73
|
-
* A request for a track the peer wants,
|
|
87
|
+
* A request for a track the peer wants, delivered to the publishing wire layer.
|
|
74
88
|
*
|
|
75
89
|
* Created internally by the broadcast when a subscription (or info lookup) needs a track
|
|
76
90
|
* served; answer it with {@link accept} or {@link reject}.
|
|
@@ -96,21 +110,6 @@ export interface FetchGroupOptions {
|
|
|
96
110
|
/** Delivery priority for the fetch stream. Defaults to `0`. */
|
|
97
111
|
priority?: number;
|
|
98
112
|
}
|
|
99
|
-
/**
|
|
100
|
-
* The per-track operations a lazy {@link Consumer} delegates to the broadcast it came from.
|
|
101
|
-
*
|
|
102
|
-
* Implemented by `broadcast.Producer` / `broadcast.Consumer` (and the wire-layer subclasses
|
|
103
|
-
* that resolve them over the network), so a track handle holds a reference to its broadcast
|
|
104
|
-
* and calls methods on it rather than capturing a bag of callbacks.
|
|
105
|
-
*/
|
|
106
|
-
export interface Broadcast {
|
|
107
|
-
/** Open a live subscription to the named track. */
|
|
108
|
-
subscribe(name: string, options?: Subscription): Subscriber;
|
|
109
|
-
/** Resolve the named track's immutable info. */
|
|
110
|
-
resolveTrackInfo(name: string): Promise<Info>;
|
|
111
|
-
/** Fetch a single group of the named track by sequence. */
|
|
112
|
-
fetchGroup(name: string, sequence: number, options?: FetchGroupOptions): Promise<GroupConsumer>;
|
|
113
|
-
}
|
|
114
113
|
/**
|
|
115
114
|
* A lazy handle to a track on a consumed broadcast.
|
|
116
115
|
*
|
|
@@ -120,8 +119,15 @@ export declare class Consumer {
|
|
|
120
119
|
#private;
|
|
121
120
|
/** The track name. */
|
|
122
121
|
readonly name: string;
|
|
123
|
-
constructor(
|
|
124
|
-
/**
|
|
122
|
+
private constructor();
|
|
123
|
+
/**
|
|
124
|
+
* Open a live subscription to the track.
|
|
125
|
+
*
|
|
126
|
+
* The cursor starts at the group the subscription named (its floor), or 0.
|
|
127
|
+
* {@link Subscription.maxAge} is what asks for data: delivery skips everything above
|
|
128
|
+
* the floor that the budget convicts, so the default budget of zero delivers only the
|
|
129
|
+
* latest group and a larger one reaches back over what it can still use.
|
|
130
|
+
*/
|
|
125
131
|
subscribe(options?: Subscription): Subscriber;
|
|
126
132
|
/** Fetch the track's immutable publisher properties without subscribing. */
|
|
127
133
|
info(): Promise<Info>;
|
|
@@ -135,7 +141,7 @@ export declare class Consumer {
|
|
|
135
141
|
* subscription the publisher serves from it) gets an independent
|
|
136
142
|
* {@link Subscriber} that receives a full copy of the groups, each with its own
|
|
137
143
|
* read cursor. Groups are mirrored into every live subscriber and retained for the
|
|
138
|
-
* track's `
|
|
144
|
+
* track's `maxAge` window so a late subscriber replays the recent groups.
|
|
139
145
|
*
|
|
140
146
|
* Obtained from {@link Request.accept} (the wire asks the application for a track to
|
|
141
147
|
* serve) or constructed directly for an in-process track.
|
|
@@ -150,6 +156,13 @@ export declare class Producer {
|
|
|
150
156
|
* Rejects if the track is closed before the properties are known.
|
|
151
157
|
*/
|
|
152
158
|
info(): Promise<Info>;
|
|
159
|
+
/**
|
|
160
|
+
* Publisher priority from the committed {@link Info}, or 0 before {@link accept}.
|
|
161
|
+
*
|
|
162
|
+
* Higher is served first. Hang publishers set this from `Catalog.PRIORITY` so
|
|
163
|
+
* audio outranks video on the wire and in the bandwidth allocator.
|
|
164
|
+
*/
|
|
165
|
+
get priority(): number;
|
|
153
166
|
/**
|
|
154
167
|
* Settles once the track closes: `null` on a clean close, or the abort {@link Error}.
|
|
155
168
|
* Peek it synchronously (`undefined` while open), observe it reactively, or `await` it.
|
|
@@ -162,7 +175,14 @@ export declare class Producer {
|
|
|
162
175
|
get subscription(): Getter<Subscription | undefined>;
|
|
163
176
|
/** Commit the immutable publisher properties, resolving {@link info}. Returns `this`. */
|
|
164
177
|
accept(info?: Partial<Info>): this;
|
|
165
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* An independent {@link Subscriber} reading this track's groups.
|
|
180
|
+
*
|
|
181
|
+
* Its cursor starts at the group the subscription named (its floor), or 0.
|
|
182
|
+
* {@link Subscription.maxAge} is what asks for data: delivery skips everything above
|
|
183
|
+
* the floor that the budget convicts, so the default budget of zero delivers only the
|
|
184
|
+
* latest group and a larger one reaches back over what it can still use.
|
|
185
|
+
*/
|
|
166
186
|
subscribe(options?: Subscription): Subscriber;
|
|
167
187
|
/**
|
|
168
188
|
* Whether the track currently has any subscribers.
|
|
@@ -195,18 +215,34 @@ export declare class Producer {
|
|
|
195
215
|
* keep datagram payloads small (e.g. a single audio frame). Datagrams are never delivered
|
|
196
216
|
* over IETF moq-transport or stream-only transports (the WebSocket fallback). A payload over
|
|
197
217
|
* 65535 bytes (the QUIC datagram frame ceiling) throws. An origin publisher uses this; a
|
|
198
|
-
* relay preserving upstream numbering uses {@link
|
|
218
|
+
* relay preserving upstream numbering uses {@link insertDatagram}.
|
|
199
219
|
*/
|
|
200
220
|
appendDatagram(timestamp: Timestamp, payload: Uint8Array): number;
|
|
201
221
|
/**
|
|
202
|
-
*
|
|
222
|
+
* Insert a datagram with an explicit sequence number.
|
|
203
223
|
*
|
|
204
224
|
* Preserves the supplied sequence (advancing the shared counter if needed) so a relay can
|
|
205
225
|
* forward a datagram without renumbering it. The size limits of {@link appendDatagram}
|
|
206
226
|
* apply. Most origin publishers want {@link appendDatagram} instead.
|
|
207
227
|
*/
|
|
208
|
-
|
|
209
|
-
/**
|
|
228
|
+
insertDatagram(sequence: number, timestamp: Timestamp, payload: Uint8Array): void;
|
|
229
|
+
/**
|
|
230
|
+
* Declare the track's exclusive end, possibly ahead of the live edge, mirroring the Rust
|
|
231
|
+
* `finish_at`.
|
|
232
|
+
*
|
|
233
|
+
* `final` is the first sequence that will never be produced, so a track whose last group
|
|
234
|
+
* is 89 finishes at 90. Groups and datagrams below it are still accepted; anything at or
|
|
235
|
+
* above it is refused. Unlike {@link close} it is not terminal: call `close()` once the
|
|
236
|
+
* remaining groups are written. Throws if the track is closed, already has an end, or
|
|
237
|
+
* `final` is at or below a sequence already produced.
|
|
238
|
+
*/
|
|
239
|
+
finishAt(final: number): void;
|
|
240
|
+
/**
|
|
241
|
+
* Close the track and every subscriber, mirroring the abort to their groups. Idempotent.
|
|
242
|
+
*
|
|
243
|
+
* A clean close keeps the end {@link finishAt} declared, or declares one past the highest
|
|
244
|
+
* sequence produced; an abort ends without one.
|
|
245
|
+
*/
|
|
210
246
|
close(abort?: Error): void;
|
|
211
247
|
/** Append a frame as its own single-frame group. */
|
|
212
248
|
writeFrame(frame: Frame): void;
|
|
@@ -243,6 +279,23 @@ export declare class Subscriber {
|
|
|
243
279
|
get subscription(): Getter<Subscription | undefined>;
|
|
244
280
|
/** Return the latest group sequence observed on this track, if any. */
|
|
245
281
|
latest(): number | undefined;
|
|
282
|
+
/**
|
|
283
|
+
* The track's exclusive final boundary: the end {@link Producer.finishAt} declared, which
|
|
284
|
+
* can be ahead of the live edge, or one past the highest sequence produced once the
|
|
285
|
+
* producer closes cleanly (0 for a track that produced none). Groups and datagrams share
|
|
286
|
+
* the sequence namespace, so this can exceed `latest() + 1`. Undefined until declared,
|
|
287
|
+
* and after an abort that declared none.
|
|
288
|
+
*/
|
|
289
|
+
final(): number | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Resolve with the track's exclusive final boundary once it is known, mirroring the Rust
|
|
292
|
+
* `finished`.
|
|
293
|
+
*
|
|
294
|
+
* Resolves as soon as the end is declared, which may be ahead of the live edge, so it
|
|
295
|
+
* says nothing about every group having arrived: read until the cursor returns
|
|
296
|
+
* `undefined` for that. Rejects with the abort, or if the track closes without an end.
|
|
297
|
+
*/
|
|
298
|
+
finished(): Promise<number>;
|
|
246
299
|
/**
|
|
247
300
|
* The newest frame this track has produced, or `undefined` while it has none.
|
|
248
301
|
*
|
|
@@ -252,39 +305,33 @@ export declare class Subscriber {
|
|
|
252
305
|
* left can no longer say where the edge is.
|
|
253
306
|
*/
|
|
254
307
|
largest(): Location | undefined;
|
|
308
|
+
/** Limit subsequent reads to these groups and return this reader for chaining. */
|
|
309
|
+
withGroups(groups: Groups): this;
|
|
255
310
|
/**
|
|
256
|
-
*
|
|
257
|
-
* the
|
|
258
|
-
*
|
|
259
|
-
* Reads here do not consume anything this one would deliver, which is what lets a
|
|
260
|
-
* publisher read the cache alongside the cursor it is serving from. Resolving the track
|
|
261
|
-
* again through the broadcast would not do: a dynamic serve is one request per peer
|
|
262
|
-
* subscription, so that mints a second producer the application has to answer separately.
|
|
263
|
-
*
|
|
264
|
-
* @internal Wire layers only.
|
|
311
|
+
* Limit subsequent reads without rewinding read progress or changing the wire request.
|
|
312
|
+
* An omitted start preserves the current floor; an omitted end removes the cap.
|
|
313
|
+
* Raising the end makes unread buffered groups available again.
|
|
265
314
|
*/
|
|
266
|
-
|
|
267
|
-
/** Start this subscriber's local read cursor at `sequence`, without changing its wire request. */
|
|
268
|
-
startAt(sequence: number): void;
|
|
269
|
-
/**
|
|
270
|
-
* Cap {@link nextGroup} and {@link recvGroup} at `sequence` inclusively, or omit it to
|
|
271
|
-
* remove the cap. Groups above the cap remain buffered and become readable if the cap
|
|
272
|
-
* is raised. This local cursor does not change the subscription's wire request.
|
|
273
|
-
*/
|
|
274
|
-
endAt(sequence?: number): void;
|
|
315
|
+
setGroups(groups: Groups): void;
|
|
275
316
|
/** Close the track (optionally with an error), closing any pending groups. Idempotent. */
|
|
276
317
|
close(abort?: Error): void;
|
|
277
318
|
/**
|
|
278
319
|
* Receive every group on this track exactly once, as it becomes available.
|
|
279
320
|
*
|
|
280
321
|
* Groups may arrive out of order or with gaps due to network conditions; unlike
|
|
281
|
-
* {@link nextGroup}, one that arrives after a newer group was already returned
|
|
282
|
-
* still delivered. When several groups are buffered, the lowest sequence is
|
|
322
|
+
* {@link Ordered.nextGroup}, one that arrives after a newer group was already returned
|
|
323
|
+
* is still delivered. When several groups are buffered, the lowest sequence is
|
|
283
324
|
* returned first.
|
|
284
325
|
*
|
|
285
|
-
* Honors the
|
|
326
|
+
* Honors the range set by {@link setGroups}: a group
|
|
286
327
|
* beyond the cap stays buffered (not dropped) and is offered once the cap rises, even
|
|
287
328
|
* after a clean close, without blocking in-range groups that arrive behind it.
|
|
329
|
+
* A group whose presentation time is further behind the live edge than this
|
|
330
|
+
* subscriber's `maxAge` is skipped. The default of zero takes the live edge.
|
|
331
|
+
* The budget remains attached after return, so a pending frame read rejects if a stalled
|
|
332
|
+
* group becomes stale while newer data advances.
|
|
333
|
+
*
|
|
334
|
+
* The first call commits this track to arrival order: {@link ordered} throws afterwards.
|
|
288
335
|
*/
|
|
289
336
|
recvGroup(): Promise<GroupConsumer | undefined>;
|
|
290
337
|
/**
|
|
@@ -293,7 +340,7 @@ export declare class Subscriber {
|
|
|
293
340
|
*
|
|
294
341
|
* Returns `undefined` when nothing is deliverable right now, which is not by itself the
|
|
295
342
|
* end of the track: a group may still arrive, or one may be parked beyond the
|
|
296
|
-
* {@link
|
|
343
|
+
* {@link setGroups} cap. Use it to drain what the retained window already holds, where
|
|
297
344
|
* waiting for a sequence nothing will republish would park forever.
|
|
298
345
|
*/
|
|
299
346
|
tryRecvGroup(): GroupConsumer | undefined;
|
|
@@ -303,40 +350,104 @@ export declare class Subscriber {
|
|
|
303
350
|
* Datagrams are a separate best-effort channel from groups (see
|
|
304
351
|
* {@link Producer.appendDatagram}); they share only the sequence namespace. A consumer
|
|
305
352
|
* that falls too far behind silently loses the oldest datagrams. Read this alongside
|
|
306
|
-
* {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently.
|
|
307
|
-
* a datagram
|
|
353
|
+
* {@link recvGroup} (e.g. in a separate loop) to receive both channels concurrently.
|
|
354
|
+
* The two cursors are independent: a datagram never moves the group cursor.
|
|
308
355
|
*/
|
|
309
356
|
recvDatagram(): Promise<Datagram | undefined>;
|
|
310
357
|
/**
|
|
311
|
-
*
|
|
358
|
+
* Read this track's groups in sequence order instead of arrival order.
|
|
312
359
|
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
360
|
+
* Both cursors draw from the same buffer, so a track is read one way or the other: this
|
|
361
|
+
* hands the subscription to the returned {@link Ordered} and leaves this handle inert.
|
|
362
|
+
* {@link recvGroup} and {@link recvDatagram} throw afterwards. Throws once a
|
|
363
|
+
* {@link recvGroup} call has already committed the track to arrival order.
|
|
364
|
+
*
|
|
365
|
+
* Datagrams come along: they are a separate cursor either way, so the choice of group
|
|
366
|
+
* order says nothing about them, and reading them commits nothing.
|
|
315
367
|
*/
|
|
316
|
-
|
|
368
|
+
ordered(): Ordered;
|
|
317
369
|
/**
|
|
318
|
-
*
|
|
319
|
-
*
|
|
370
|
+
* Update this subscription's options (e.g. priority), triggering a SUBSCRIBE_UPDATE to the
|
|
371
|
+
* publisher. Mirrors the Rust `Subscriber::update`.
|
|
320
372
|
*/
|
|
321
|
-
|
|
373
|
+
update(options: Subscription): void;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* A {@link Subscriber} that reads groups in sequence order.
|
|
377
|
+
*
|
|
378
|
+
* Created by {@link Subscriber.ordered}, which takes the subscription over: the two
|
|
379
|
+
* cursors draw from one buffer, so a track is read one way or the other and never both.
|
|
380
|
+
* Every group this returns has a higher sequence than the last, so a late arrival is
|
|
381
|
+
* skipped rather than delivered out of turn.
|
|
382
|
+
*
|
|
383
|
+
* `maxAge` applies as this cursor reads, exactly as it does on the arrival cursor: a
|
|
384
|
+
* group is skipped once its reach, where its immediate successor begins, is that far
|
|
385
|
+
* behind the newest frame on the track. Nothing weaker convicts it, since the reach is
|
|
386
|
+
* the only proof that every frame it could still hold is past the budget, so a backlog
|
|
387
|
+
* inside the budget is still delivered whole, as a burst in order. The budget follows a
|
|
388
|
+
* group already handed out too: a stalled group's pending frame read rejects once newer
|
|
389
|
+
* content has pulled that far ahead.
|
|
390
|
+
*/
|
|
391
|
+
export declare class Ordered {
|
|
392
|
+
#private;
|
|
393
|
+
/** The track name. */
|
|
394
|
+
readonly name: string;
|
|
395
|
+
private constructor();
|
|
396
|
+
/** Resolve this track's immutable publisher properties; see {@link Subscriber.info}. */
|
|
397
|
+
info(): Promise<Info>;
|
|
398
|
+
/** Settles once the track closes; see {@link Producer.closed}. */
|
|
399
|
+
get closed(): GetPromise<Error | null>;
|
|
400
|
+
/** This subscriber's current options, including defaults and the last {@link update}. */
|
|
401
|
+
get subscription(): Getter<Subscription | undefined>;
|
|
402
|
+
/** The latest group sequence observed on this track, if any. */
|
|
403
|
+
latest(): number | undefined;
|
|
404
|
+
/** The track's exclusive final boundary; see {@link Subscriber.final}. */
|
|
405
|
+
final(): number | undefined;
|
|
406
|
+
/** Resolve with the track's exclusive final boundary once known; see {@link Subscriber.finished}. */
|
|
407
|
+
finished(): Promise<number>;
|
|
408
|
+
/** Limit subsequent reads to these groups and return this reader for chaining. */
|
|
409
|
+
withGroups(groups: Groups): this;
|
|
410
|
+
/** Limit subsequent reads to these groups; see {@link Subscriber.setGroups}. */
|
|
411
|
+
setGroups(groups: Groups): void;
|
|
412
|
+
/** Update this subscription's options; see {@link Subscriber.update}. */
|
|
413
|
+
update(options: Subscription): void;
|
|
414
|
+
/** Close the track (optionally with an error), closing any pending groups. Idempotent. */
|
|
415
|
+
close(abort?: Error): void;
|
|
416
|
+
/**
|
|
417
|
+
* Return the next group with a strictly-greater sequence number than the last returned.
|
|
418
|
+
*
|
|
419
|
+
* Late arrivals (sequence at or below the last returned) are silently skipped, as is a
|
|
420
|
+
* group whose every frame is further behind the live edge than `maxAge` (the default of
|
|
421
|
+
* zero keeps only what nothing newer has superseded). Honors the bounds set by
|
|
422
|
+
* {@link setGroups}.
|
|
423
|
+
*/
|
|
424
|
+
nextGroup(): Promise<GroupConsumer | undefined>;
|
|
322
425
|
/**
|
|
323
|
-
*
|
|
426
|
+
* Read the next frame across groups, in sequence order, with its group and frame numbers.
|
|
427
|
+
*
|
|
428
|
+
* Rides the same cursor as {@link nextGroup} and shares this handle's contract: a
|
|
429
|
+
* buffered backlog is drained in full up to the point `maxAge` proves it useless.
|
|
324
430
|
* Treat the returned frame bytes as read-only; they are shared with other consumers.
|
|
325
431
|
*/
|
|
326
|
-
|
|
432
|
+
readFrame(): Promise<({
|
|
327
433
|
group: number;
|
|
328
434
|
frame: number;
|
|
329
435
|
} & Frame) | undefined>;
|
|
330
|
-
/**
|
|
436
|
+
/** Read the next frame and decode it as a UTF-8 string. */
|
|
331
437
|
readString(): Promise<string | undefined>;
|
|
332
|
-
/**
|
|
438
|
+
/** Read the next frame and parse it as JSON. */
|
|
333
439
|
readJson(): Promise<unknown | undefined>;
|
|
334
|
-
/**
|
|
440
|
+
/** Read the next frame and decode it as a one-byte boolean, throwing on a malformed frame. */
|
|
335
441
|
readBool(): Promise<boolean | undefined>;
|
|
336
442
|
/**
|
|
337
|
-
*
|
|
338
|
-
*
|
|
443
|
+
* Receive the next datagram in arrival order.
|
|
444
|
+
*
|
|
445
|
+
* Datagrams are a separate best-effort channel from groups (see
|
|
446
|
+
* {@link Producer.appendDatagram}); they share only the sequence namespace, and
|
|
447
|
+
* neither cursor moves the other. Unordered by construction, so this behaves
|
|
448
|
+
* identically on either handle; it is here so a track carrying both channels needs
|
|
449
|
+
* one subscription rather than two.
|
|
339
450
|
*/
|
|
340
|
-
|
|
451
|
+
recvDatagram(): Promise<Datagram | undefined>;
|
|
341
452
|
}
|
|
342
453
|
//# sourceMappingURL=track.d.ts.map
|
package/track.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../src/track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"track.d.ts","sourceRoot":"","sources":["../src/track.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,MAAM,EAAgB,MAAM,cAAc,CAAC;AACxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,QAAQ,IAAI,aAAa,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AASnG,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG7D,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,OAAc,CAAC;AAY9C,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACxB,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,IAAI;IACpB;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH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