@fluid-experimental/data-objects 2.73.0 → 2.74.0-368706
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/dist/signaler/signaler.d.ts.map +1 -1
- package/dist/signaler/signaler.js +0 -2
- package/dist/signaler/signaler.js.map +1 -1
- package/lib/signaler/signaler.d.ts.map +1 -1
- package/lib/signaler/signaler.js +0 -2
- package/lib/signaler/signaler.js.map +1 -1
- package/package.json +10 -10
- package/src/signaler/signaler.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signaler.d.ts","sourceRoot":"","sources":["../../src/signaler/signaler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,KAAK,EACX,sBAAsB,EACtB,gCAAgC,EAChC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAM3E;;;GAGG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAC/B,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,KAChB,IAAI,CAAC;AAEV;;;;;GAKG;AACH,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,WAAW,CAAC;IAC7D;;;;;;OAMG;IACH,QAAQ,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACxE;;;;;;OAMG;IACH,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG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ACH,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IACzE;;;;OAIG;IACH,YAAY,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAE;CAC3D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,qBAAqB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,OAAE;IACxF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7D;AAmHD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE;IACtB,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG;QAC1C,QAAQ,CAAC,aAAa,EAAE,gCAAgC,CAAC;KACzD,CAAC;CACF,GAAG,gBAAgB,CAAC,SAAS,CAAuC,CAAC"}
|
|
@@ -100,7 +100,6 @@ SignalerClass.factory = new internal_1.DataObjectFactory({
|
|
|
100
100
|
type: SignalerClass.Name,
|
|
101
101
|
ctor: SignalerClass,
|
|
102
102
|
});
|
|
103
|
-
/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
104
103
|
/**
|
|
105
104
|
* Implementation of ISignaler for declarative API.
|
|
106
105
|
* @privateRemarks
|
|
@@ -109,5 +108,4 @@ SignalerClass.factory = new internal_1.DataObjectFactory({
|
|
|
109
108
|
* @alpha
|
|
110
109
|
*/
|
|
111
110
|
exports.Signaler = (0, internal_1.createDataObjectKind)(SignalerClass);
|
|
112
|
-
/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
113
111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C3B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,qDAAqD;IAE9C,QAAQ,CAAI,UAAkB,EAAE,QAA2B;QACjE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,SAAS,CAAI,UAAkB,EAAE,QAA2B;QAClE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,YAAY,CAAI,UAAkB,EAAE,OAAqB;QAC/D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;;AA5BsB,kBAAI,GAAG,yBAAyB,CAAC;AAEjC,qBAAO,GAAG,IAAI,4BAAiB,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,IAAI;IACxB,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC;AA0BJ,+FAA+F;AAC/F;;;;;;GAMG;AACU,QAAA,QAAQ,GAIa,IAAA,+BAAoB,EAAC,aAAa,CAAC,CAAC;AACtE,8FAA8F","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter, TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\tcreateDataObjectKind,\n} from \"@fluidframework/aqueduct/internal\";\nimport { IErrorEvent, type IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntry,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\n\n// TODO:\n// add way to mark with current sequence number for ordering signals relative to ops\n// throttling and batching\n\n/**\n * Signature for listening to a signal event\n * @alpha\n */\nexport type SignalListener<T> = (\n\tclientId: string,\n\tlocal: boolean,\n\tpayload: Jsonable<T>,\n) => void;\n\n/**\n * ISignaler defines an interface for working with signals that is similar to the more common\n * eventing patterns of EventEmitter. In addition to sending and responding to signals, it\n * provides explicit methods around signal requests to other connected clients.\n * @alpha\n */\nexport interface ISignaler extends IEventProvider<IErrorEvent> {\n\t/**\n\t * Adds a listener for the specified signal. It behaves in the same way as EventEmitter's `on`\n\t * method regarding multiple registrations, callback order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to add\n\t * @returns This ISignaler\n\t */\n\tonSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Remove a listener for the specified signal. It behaves in the same way as EventEmitter's\n\t * `off` method regarding multiple registrations, removal order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to remove\n\t * @returns This ISignaler\n\t */\n\toffSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Send a signal with payload to its connected listeners.\n\t * @param signalName - The name of the signal\n\t * @param payload - The data to send with the signal\n\t */\n\tsubmitSignal<T>(signalName: string, payload?: Jsonable<T>);\n}\n\n/**\n * Duck type of something that provides the expected signalling functionality:\n * A way to verify we can signal, a way to send a signal, and a way to listen for incoming signals\n * @internal\n * @privateRemarks\n * There is no use external to package and export can be removed once breaking changes are permitted.\n */\nexport interface IRuntimeSignaler {\n\tconnected: boolean;\n\ton(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\tsubmitSignal(type: string, content: Jsonable<unknown>): void;\n}\n\n/**\n * Note: currently experimental and under development\n *\n * Helper class to assist common scenarios around working with signals. InternalSignaler wraps a runtime\n * object with signaling functionality (e.g. IContainerRuntime or FluidDataStoreRuntime) and can\n * then be used in place of the original signaler. It uses a separate internal EventEmitter to\n * manage callbacks, and thus will reflect that behavior with regards to callback registration and\n * deregistration.\n */\nclass InternalSignaler extends TypedEventEmitter<IErrorEvent> implements ISignaler {\n\tprivate readonly emitter = new EventEmitter();\n\n\tprivate readonly signalerId: string | undefined;\n\n\tconstructor(\n\t\t/**\n\t\t * Object to wrap that can submit and listen to signals\n\t\t */\n\t\tprivate readonly signaler: IRuntimeSignaler,\n\t\t/**\n\t\t * Optional id to assign to this manager that will be attached to\n\t\t * signal names. Useful to avoid collisions if there are multiple\n\t\t * signal users at the Container level\n\t\t */\n\t\tsignalerId?: string,\n\t) {\n\t\tsuper();\n\t\tthis.emitter.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t\tthis.signalerId = signalerId ? `#${signalerId}` : undefined;\n\t\tthis.signaler.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\tconst clientId = message.clientId;\n\t\t\t// Only call listeners when the runtime is connected and if the signal has an\n\t\t\t// identifiable sender clientId. The listener is responsible for deciding how\n\t\t\t// it wants to handle local/remote signals\n\t\t\tif (this.signaler.connected && clientId !== null) {\n\t\t\t\tthis.emitter.emit(message.type, clientId, local, message.content);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getSignalerSignalName(signalName: string): string {\n\t\treturn this.signalerId ? `${signalName}${this.signalerId}` : signalName;\n\t}\n\n\t// ISignaler methods\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.on(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.off(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tif (this.signaler.connected) {\n\t\t\tthis.signaler.submitSignal(signalerSignalName, payload);\n\t\t}\n\t}\n}\n\n/**\n * DataObject implementation of ISignaler for fluid-static plug-and-play.\n * Allows fluid-static users to get an ISignaler without a custom DataObject.\n */\nclass SignalerClass\n\textends DataObject<{ Events: IErrorEvent }>\n\timplements EventEmitter, ISignaler\n{\n\tprivate _signaler: InternalSignaler | undefined;\n\tprivate get signaler(): InternalSignaler {\n\t\tassert(this._signaler !== undefined, 0x24b /* \"internal signaler should be defined\" */);\n\t\treturn this._signaler;\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/signaler\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: SignalerClass.Name,\n\t\tctor: SignalerClass,\n\t});\n\n\tprotected async hasInitialized() {\n\t\tthis._signaler = new InternalSignaler(this.runtime);\n\t\tthis.signaler.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t}\n\n\t// ISignaler methods Note these are all passthroughs\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.onSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.offSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tthis.signaler.submitSignal(signalName, payload);\n\t}\n}\n\n/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n/**\n * Implementation of ISignaler for declarative API.\n * @privateRemarks\n * `factory` part of the type is included here to satisfy the usage in `@fluid-example/presence-tracker`, which is accessing encapsulated API surfaces from this.\n * If this eventually gets promoted to `@public` and/or part of `fluid-framework`, an alternate LegacySignaler (`@legacy`) should be created to continue exposing `factory`.\n * @alpha\n */\nexport const Signaler: {\n\treadonly factory: IFluidDataStoreFactory & {\n\t\treadonly registryEntry: NamedFluidDataStoreRegistryEntry;\n\t};\n} & SharedObjectKind<ISignaler> = createDataObjectKind(SignalerClass);\n/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n"]}
|
|
1
|
+
{"version":3,"file":"signaler.js","sourceRoot":"","sources":["../../src/signaler/signaler.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA+E;AAC/E,gEAI2C;AAE3C,kEAA6D;AAmE7D;;;;;;;;GAQG;AACH,MAAM,gBAAiB,SAAQ,gCAA8B;IAK5D;IACC;;OAEG;IACc,QAA0B;IAC3C;;;;OAIG;IACH,UAAmB;QAEnB,KAAK,EAAE,CAAC;QARS,aAAQ,GAAR,QAAQ,CAAkB;QAR3B,YAAO,GAAG,IAAI,2BAAY,EAAE,CAAC;QAiB7C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,OAA8B,EAAE,KAAc,EAAE,EAAE;YAC7E,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YAClC,6EAA6E;YAC7E,8EAA8E;YAC9E,0CAA0C;YAC1C,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBAClD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;YACnE,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IAEO,qBAAqB,CAAC,UAAkB;QAC/C,OAAO,IAAI,CAAC,UA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AAI,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,qDAAqD;IAE9C,QAAQ,CAAI,UAAkB,EAAE,QAA2B;QACjE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,SAAS,CAAI,UAAkB,EAAE,QAA2B;QAClE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,YAAY,CAAI,UAAkB,EAAE,OAAqB;QAC/D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;;AA5BsB,kBAAI,GAAG,yBAAyB,CAAC;AAEjC,qBAAO,GAAG,IAAI,4BAAiB,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,IAAI;IACxB,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC;AA0BJ;;;;;;GAMG;AACU,QAAA,QAAQ,GAIa,IAAA,+BAAoB,EAAC,aAAa,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter, TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\tcreateDataObjectKind,\n} from \"@fluidframework/aqueduct/internal\";\nimport { IErrorEvent, type IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntry,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\n\n// TODO:\n// add way to mark with current sequence number for ordering signals relative to ops\n// throttling and batching\n\n/**\n * Signature for listening to a signal event\n * @alpha\n */\nexport type SignalListener<T> = (\n\tclientId: string,\n\tlocal: boolean,\n\tpayload: Jsonable<T>,\n) => void;\n\n/**\n * ISignaler defines an interface for working with signals that is similar to the more common\n * eventing patterns of EventEmitter. In addition to sending and responding to signals, it\n * provides explicit methods around signal requests to other connected clients.\n * @alpha\n */\nexport interface ISignaler extends IEventProvider<IErrorEvent> {\n\t/**\n\t * Adds a listener for the specified signal. It behaves in the same way as EventEmitter's `on`\n\t * method regarding multiple registrations, callback order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to add\n\t * @returns This ISignaler\n\t */\n\tonSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Remove a listener for the specified signal. It behaves in the same way as EventEmitter's\n\t * `off` method regarding multiple registrations, removal order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to remove\n\t * @returns This ISignaler\n\t */\n\toffSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Send a signal with payload to its connected listeners.\n\t * @param signalName - The name of the signal\n\t * @param payload - The data to send with the signal\n\t */\n\tsubmitSignal<T>(signalName: string, payload?: Jsonable<T>);\n}\n\n/**\n * Duck type of something that provides the expected signalling functionality:\n * A way to verify we can signal, a way to send a signal, and a way to listen for incoming signals\n * @internal\n * @privateRemarks\n * There is no use external to package and export can be removed once breaking changes are permitted.\n */\nexport interface IRuntimeSignaler {\n\tconnected: boolean;\n\ton(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\tsubmitSignal(type: string, content: Jsonable<unknown>): void;\n}\n\n/**\n * Note: currently experimental and under development\n *\n * Helper class to assist common scenarios around working with signals. InternalSignaler wraps a runtime\n * object with signaling functionality (e.g. IContainerRuntime or FluidDataStoreRuntime) and can\n * then be used in place of the original signaler. It uses a separate internal EventEmitter to\n * manage callbacks, and thus will reflect that behavior with regards to callback registration and\n * deregistration.\n */\nclass InternalSignaler extends TypedEventEmitter<IErrorEvent> implements ISignaler {\n\tprivate readonly emitter = new EventEmitter();\n\n\tprivate readonly signalerId: string | undefined;\n\n\tconstructor(\n\t\t/**\n\t\t * Object to wrap that can submit and listen to signals\n\t\t */\n\t\tprivate readonly signaler: IRuntimeSignaler,\n\t\t/**\n\t\t * Optional id to assign to this manager that will be attached to\n\t\t * signal names. Useful to avoid collisions if there are multiple\n\t\t * signal users at the Container level\n\t\t */\n\t\tsignalerId?: string,\n\t) {\n\t\tsuper();\n\t\tthis.emitter.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t\tthis.signalerId = signalerId ? `#${signalerId}` : undefined;\n\t\tthis.signaler.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\tconst clientId = message.clientId;\n\t\t\t// Only call listeners when the runtime is connected and if the signal has an\n\t\t\t// identifiable sender clientId. The listener is responsible for deciding how\n\t\t\t// it wants to handle local/remote signals\n\t\t\tif (this.signaler.connected && clientId !== null) {\n\t\t\t\tthis.emitter.emit(message.type, clientId, local, message.content);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getSignalerSignalName(signalName: string): string {\n\t\treturn this.signalerId ? `${signalName}${this.signalerId}` : signalName;\n\t}\n\n\t// ISignaler methods\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.on(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.off(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tif (this.signaler.connected) {\n\t\t\tthis.signaler.submitSignal(signalerSignalName, payload);\n\t\t}\n\t}\n}\n\n/**\n * DataObject implementation of ISignaler for fluid-static plug-and-play.\n * Allows fluid-static users to get an ISignaler without a custom DataObject.\n */\nclass SignalerClass\n\textends DataObject<{ Events: IErrorEvent }>\n\timplements EventEmitter, ISignaler\n{\n\tprivate _signaler: InternalSignaler | undefined;\n\tprivate get signaler(): InternalSignaler {\n\t\tassert(this._signaler !== undefined, 0x24b /* \"internal signaler should be defined\" */);\n\t\treturn this._signaler;\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/signaler\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: SignalerClass.Name,\n\t\tctor: SignalerClass,\n\t});\n\n\tprotected async hasInitialized() {\n\t\tthis._signaler = new InternalSignaler(this.runtime);\n\t\tthis.signaler.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t}\n\n\t// ISignaler methods Note these are all passthroughs\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.onSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.offSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tthis.signaler.submitSignal(signalName, payload);\n\t}\n}\n\n/**\n * Implementation of ISignaler for declarative API.\n * @privateRemarks\n * `factory` part of the type is included here to satisfy the usage in `@fluid-example/presence-tracker`, which is accessing encapsulated API surfaces from this.\n * If this eventually gets promoted to `@public` and/or part of `fluid-framework`, an alternate LegacySignaler (`@legacy`) should be created to continue exposing `factory`.\n * @alpha\n */\nexport const Signaler: {\n\treadonly factory: IFluidDataStoreFactory & {\n\t\treadonly registryEntry: NamedFluidDataStoreRegistryEntry;\n\t};\n} & SharedObjectKind<ISignaler> = createDataObjectKind(SignalerClass);\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C,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,qBAAqB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,OAAE;IACxF,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7D;AAmHD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE;IACtB,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG;QAC1C,QAAQ,CAAC,aAAa,EAAE,gCAAgC,CAAC;KACzD,CAAC;CACF,GAAG,gBAAgB,CAAC,SAAS,CAAuC,CAAC"}
|
package/lib/signaler/signaler.js
CHANGED
|
@@ -97,7 +97,6 @@ SignalerClass.factory = new DataObjectFactory({
|
|
|
97
97
|
type: SignalerClass.Name,
|
|
98
98
|
ctor: SignalerClass,
|
|
99
99
|
});
|
|
100
|
-
/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
101
100
|
/**
|
|
102
101
|
* Implementation of ISignaler for declarative API.
|
|
103
102
|
* @privateRemarks
|
|
@@ -106,5 +105,4 @@ SignalerClass.factory = new DataObjectFactory({
|
|
|
106
105
|
* @alpha
|
|
107
106
|
*/
|
|
108
107
|
export const Signaler = createDataObjectKind(SignalerClass);
|
|
109
|
-
/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
110
108
|
//# sourceMappingURL=signaler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signaler.js","sourceRoot":"","sources":["../../src/signaler/signaler.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EACN,UAAU,EACV,iBAAiB,EACjB,oBAAoB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MA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I,CAAC;IACb,CAAC;IAEM,SAAS,CAAI,UAAkB,EAAE,QAA2B;QAClE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,YAAY,CAAI,UAAkB,EAAE,OAAqB;QAC/D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;;AA5BsB,kBAAI,GAAG,yBAAyB,CAAC;AAEjC,qBAAO,GAAG,IAAI,iBAAiB,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,IAAI;IACxB,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC;AA0BJ,+FAA+F;AAC/F;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAIa,oBAAoB,CAAC,aAAa,CAAC,CAAC;AACtE,8FAA8F","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter, TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\tcreateDataObjectKind,\n} from \"@fluidframework/aqueduct/internal\";\nimport { IErrorEvent, type IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntry,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\n\n// TODO:\n// add way to mark with current sequence number for ordering signals relative to ops\n// throttling and batching\n\n/**\n * Signature for listening to a signal event\n * @alpha\n */\nexport type SignalListener<T> = (\n\tclientId: string,\n\tlocal: boolean,\n\tpayload: Jsonable<T>,\n) => void;\n\n/**\n * ISignaler defines an interface for working with signals that is similar to the more common\n * eventing patterns of EventEmitter. In addition to sending and responding to signals, it\n * provides explicit methods around signal requests to other connected clients.\n * @alpha\n */\nexport interface ISignaler extends IEventProvider<IErrorEvent> {\n\t/**\n\t * Adds a listener for the specified signal. It behaves in the same way as EventEmitter's `on`\n\t * method regarding multiple registrations, callback order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to add\n\t * @returns This ISignaler\n\t */\n\tonSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Remove a listener for the specified signal. It behaves in the same way as EventEmitter's\n\t * `off` method regarding multiple registrations, removal order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to remove\n\t * @returns This ISignaler\n\t */\n\toffSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Send a signal with payload to its connected listeners.\n\t * @param signalName - The name of the signal\n\t * @param payload - The data to send with the signal\n\t */\n\tsubmitSignal<T>(signalName: string, payload?: Jsonable<T>);\n}\n\n/**\n * Duck type of something that provides the expected signalling functionality:\n * A way to verify we can signal, a way to send a signal, and a way to listen for incoming signals\n * @internal\n * @privateRemarks\n * There is no use external to package and export can be removed once breaking changes are permitted.\n */\nexport interface IRuntimeSignaler {\n\tconnected: boolean;\n\ton(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\tsubmitSignal(type: string, content: Jsonable<unknown>): void;\n}\n\n/**\n * Note: currently experimental and under development\n *\n * Helper class to assist common scenarios around working with signals. InternalSignaler wraps a runtime\n * object with signaling functionality (e.g. IContainerRuntime or FluidDataStoreRuntime) and can\n * then be used in place of the original signaler. It uses a separate internal EventEmitter to\n * manage callbacks, and thus will reflect that behavior with regards to callback registration and\n * deregistration.\n */\nclass InternalSignaler extends TypedEventEmitter<IErrorEvent> implements ISignaler {\n\tprivate readonly emitter = new EventEmitter();\n\n\tprivate readonly signalerId: string | undefined;\n\n\tconstructor(\n\t\t/**\n\t\t * Object to wrap that can submit and listen to signals\n\t\t */\n\t\tprivate readonly signaler: IRuntimeSignaler,\n\t\t/**\n\t\t * Optional id to assign to this manager that will be attached to\n\t\t * signal names. Useful to avoid collisions if there are multiple\n\t\t * signal users at the Container level\n\t\t */\n\t\tsignalerId?: string,\n\t) {\n\t\tsuper();\n\t\tthis.emitter.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t\tthis.signalerId = signalerId ? `#${signalerId}` : undefined;\n\t\tthis.signaler.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\tconst clientId = message.clientId;\n\t\t\t// Only call listeners when the runtime is connected and if the signal has an\n\t\t\t// identifiable sender clientId. The listener is responsible for deciding how\n\t\t\t// it wants to handle local/remote signals\n\t\t\tif (this.signaler.connected && clientId !== null) {\n\t\t\t\tthis.emitter.emit(message.type, clientId, local, message.content);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getSignalerSignalName(signalName: string): string {\n\t\treturn this.signalerId ? `${signalName}${this.signalerId}` : signalName;\n\t}\n\n\t// ISignaler methods\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.on(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.off(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tif (this.signaler.connected) {\n\t\t\tthis.signaler.submitSignal(signalerSignalName, payload);\n\t\t}\n\t}\n}\n\n/**\n * DataObject implementation of ISignaler for fluid-static plug-and-play.\n * Allows fluid-static users to get an ISignaler without a custom DataObject.\n */\nclass SignalerClass\n\textends DataObject<{ Events: IErrorEvent }>\n\timplements EventEmitter, ISignaler\n{\n\tprivate _signaler: InternalSignaler | undefined;\n\tprivate get signaler(): InternalSignaler {\n\t\tassert(this._signaler !== undefined, 0x24b /* \"internal signaler should be defined\" */);\n\t\treturn this._signaler;\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/signaler\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: SignalerClass.Name,\n\t\tctor: SignalerClass,\n\t});\n\n\tprotected async hasInitialized() {\n\t\tthis._signaler = new InternalSignaler(this.runtime);\n\t\tthis.signaler.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t}\n\n\t// ISignaler methods Note these are all passthroughs\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.onSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.offSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tthis.signaler.submitSignal(signalName, payload);\n\t}\n}\n\n/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n/**\n * Implementation of ISignaler for declarative API.\n * @privateRemarks\n * `factory` part of the type is included here to satisfy the usage in `@fluid-example/presence-tracker`, which is accessing encapsulated API surfaces from this.\n * If this eventually gets promoted to `@public` and/or part of `fluid-framework`, an alternate LegacySignaler (`@legacy`) should be created to continue exposing `factory`.\n * @alpha\n */\nexport const Signaler: {\n\treadonly factory: IFluidDataStoreFactory & {\n\t\treadonly registryEntry: NamedFluidDataStoreRegistryEntry;\n\t};\n} & SharedObjectKind<ISignaler> = createDataObjectKind(SignalerClass);\n/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */\n"]}
|
|
1
|
+
{"version":3,"file":"signaler.js","sourceRoot":"","sources":["../../src/signaler/signaler.ts"],"names":[],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K,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,qDAAqD;IAE9C,QAAQ,CAAI,UAAkB,EAAE,QAA2B;QACjE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,SAAS,CAAI,UAAkB,EAAE,QAA2B;QAClE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,YAAY,CAAI,UAAkB,EAAE,OAAqB;QAC/D,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;;AA5BsB,kBAAI,GAAG,yBAAyB,CAAC;AAEjC,qBAAO,GAAG,IAAI,iBAAiB,CAAC;IACtD,IAAI,EAAE,aAAa,CAAC,IAAI;IACxB,IAAI,EAAE,aAAa;CACnB,CAAC,CAAC;AA0BJ;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAIa,oBAAoB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { EventEmitter, TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tDataObject,\n\tDataObjectFactory,\n\tcreateDataObjectKind,\n} from \"@fluidframework/aqueduct/internal\";\nimport { IErrorEvent, type IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntry,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { IInboundSignalMessage } from \"@fluidframework/runtime-definitions/internal\";\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\n\n// TODO:\n// add way to mark with current sequence number for ordering signals relative to ops\n// throttling and batching\n\n/**\n * Signature for listening to a signal event\n * @alpha\n */\nexport type SignalListener<T> = (\n\tclientId: string,\n\tlocal: boolean,\n\tpayload: Jsonable<T>,\n) => void;\n\n/**\n * ISignaler defines an interface for working with signals that is similar to the more common\n * eventing patterns of EventEmitter. In addition to sending and responding to signals, it\n * provides explicit methods around signal requests to other connected clients.\n * @alpha\n */\nexport interface ISignaler extends IEventProvider<IErrorEvent> {\n\t/**\n\t * Adds a listener for the specified signal. It behaves in the same way as EventEmitter's `on`\n\t * method regarding multiple registrations, callback order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to add\n\t * @returns This ISignaler\n\t */\n\tonSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Remove a listener for the specified signal. It behaves in the same way as EventEmitter's\n\t * `off` method regarding multiple registrations, removal order, etc.\n\t * @param signalName - The name of the signal\n\t * @param listener - The callback signal handler to remove\n\t * @returns This ISignaler\n\t */\n\toffSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler;\n\t/**\n\t * Send a signal with payload to its connected listeners.\n\t * @param signalName - The name of the signal\n\t * @param payload - The data to send with the signal\n\t */\n\tsubmitSignal<T>(signalName: string, payload?: Jsonable<T>);\n}\n\n/**\n * Duck type of something that provides the expected signalling functionality:\n * A way to verify we can signal, a way to send a signal, and a way to listen for incoming signals\n * @internal\n * @privateRemarks\n * There is no use external to package and export can be removed once breaking changes are permitted.\n */\nexport interface IRuntimeSignaler {\n\tconnected: boolean;\n\ton(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\tsubmitSignal(type: string, content: Jsonable<unknown>): void;\n}\n\n/**\n * Note: currently experimental and under development\n *\n * Helper class to assist common scenarios around working with signals. InternalSignaler wraps a runtime\n * object with signaling functionality (e.g. IContainerRuntime or FluidDataStoreRuntime) and can\n * then be used in place of the original signaler. It uses a separate internal EventEmitter to\n * manage callbacks, and thus will reflect that behavior with regards to callback registration and\n * deregistration.\n */\nclass InternalSignaler extends TypedEventEmitter<IErrorEvent> implements ISignaler {\n\tprivate readonly emitter = new EventEmitter();\n\n\tprivate readonly signalerId: string | undefined;\n\n\tconstructor(\n\t\t/**\n\t\t * Object to wrap that can submit and listen to signals\n\t\t */\n\t\tprivate readonly signaler: IRuntimeSignaler,\n\t\t/**\n\t\t * Optional id to assign to this manager that will be attached to\n\t\t * signal names. Useful to avoid collisions if there are multiple\n\t\t * signal users at the Container level\n\t\t */\n\t\tsignalerId?: string,\n\t) {\n\t\tsuper();\n\t\tthis.emitter.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t\tthis.signalerId = signalerId ? `#${signalerId}` : undefined;\n\t\tthis.signaler.on(\"signal\", (message: IInboundSignalMessage, local: boolean) => {\n\t\t\tconst clientId = message.clientId;\n\t\t\t// Only call listeners when the runtime is connected and if the signal has an\n\t\t\t// identifiable sender clientId. The listener is responsible for deciding how\n\t\t\t// it wants to handle local/remote signals\n\t\t\tif (this.signaler.connected && clientId !== null) {\n\t\t\t\tthis.emitter.emit(message.type, clientId, local, message.content);\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate getSignalerSignalName(signalName: string): string {\n\t\treturn this.signalerId ? `${signalName}${this.signalerId}` : signalName;\n\t}\n\n\t// ISignaler methods\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.on(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tthis.emitter.off(signalerSignalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tconst signalerSignalName = this.getSignalerSignalName(signalName);\n\t\tif (this.signaler.connected) {\n\t\t\tthis.signaler.submitSignal(signalerSignalName, payload);\n\t\t}\n\t}\n}\n\n/**\n * DataObject implementation of ISignaler for fluid-static plug-and-play.\n * Allows fluid-static users to get an ISignaler without a custom DataObject.\n */\nclass SignalerClass\n\textends DataObject<{ Events: IErrorEvent }>\n\timplements EventEmitter, ISignaler\n{\n\tprivate _signaler: InternalSignaler | undefined;\n\tprivate get signaler(): InternalSignaler {\n\t\tassert(this._signaler !== undefined, 0x24b /* \"internal signaler should be defined\" */);\n\t\treturn this._signaler;\n\t}\n\n\tpublic static readonly Name = \"@fluid-example/signaler\";\n\n\tpublic static readonly factory = new DataObjectFactory({\n\t\ttype: SignalerClass.Name,\n\t\tctor: SignalerClass,\n\t});\n\n\tprotected async hasInitialized() {\n\t\tthis._signaler = new InternalSignaler(this.runtime);\n\t\tthis.signaler.on(\"error\", (error) => {\n\t\t\tthis.emit(\"error\", error);\n\t\t});\n\t}\n\n\t// ISignaler methods Note these are all passthroughs\n\n\tpublic onSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.onSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic offSignal<T>(signalName: string, listener: SignalListener<T>): ISignaler {\n\t\tthis.signaler.offSignal(signalName, listener);\n\t\treturn this;\n\t}\n\n\tpublic submitSignal<T>(signalName: string, payload?: Jsonable<T>) {\n\t\tthis.signaler.submitSignal(signalName, payload);\n\t}\n}\n\n/**\n * Implementation of ISignaler for declarative API.\n * @privateRemarks\n * `factory` part of the type is included here to satisfy the usage in `@fluid-example/presence-tracker`, which is accessing encapsulated API surfaces from this.\n * If this eventually gets promoted to `@public` and/or part of `fluid-framework`, an alternate LegacySignaler (`@legacy`) should be created to continue exposing `factory`.\n * @alpha\n */\nexport const Signaler: {\n\treadonly factory: IFluidDataStoreFactory & {\n\t\treadonly registryEntry: NamedFluidDataStoreRegistryEntry;\n\t};\n} & SharedObjectKind<ISignaler> = createDataObjectKind(SignalerClass);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/data-objects",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.74.0-368706",
|
|
4
4
|
"description": "A collection of ready to use Fluid Data Objects",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"main": "lib/index.js",
|
|
28
28
|
"types": "lib/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fluid-internal/client-utils": "
|
|
31
|
-
"@fluidframework/aqueduct": "
|
|
32
|
-
"@fluidframework/core-interfaces": "
|
|
33
|
-
"@fluidframework/core-utils": "
|
|
34
|
-
"@fluidframework/datastore-definitions": "
|
|
35
|
-
"@fluidframework/map": "
|
|
36
|
-
"@fluidframework/runtime-definitions": "
|
|
37
|
-
"@fluidframework/shared-object-base": "
|
|
30
|
+
"@fluid-internal/client-utils": "2.74.0-368706",
|
|
31
|
+
"@fluidframework/aqueduct": "2.74.0-368706",
|
|
32
|
+
"@fluidframework/core-interfaces": "2.74.0-368706",
|
|
33
|
+
"@fluidframework/core-utils": "2.74.0-368706",
|
|
34
|
+
"@fluidframework/datastore-definitions": "2.74.0-368706",
|
|
35
|
+
"@fluidframework/map": "2.74.0-368706",
|
|
36
|
+
"@fluidframework/runtime-definitions": "2.74.0-368706",
|
|
37
|
+
"@fluidframework/shared-object-base": "2.74.0-368706"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@fluid-tools/build-cli": "^0.60.0",
|
|
43
43
|
"@fluidframework/build-common": "^2.0.3",
|
|
44
44
|
"@fluidframework/build-tools": "^0.60.0",
|
|
45
|
-
"@fluidframework/eslint-config-fluid": "
|
|
45
|
+
"@fluidframework/eslint-config-fluid": "2.74.0-368706",
|
|
46
46
|
"@microsoft/api-extractor": "7.52.11",
|
|
47
47
|
"@types/node": "^18.19.0",
|
|
48
48
|
"concurrently": "^8.2.1",
|
package/src/signaler/signaler.ts
CHANGED
|
@@ -190,7 +190,6 @@ class SignalerClass
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
/* eslint-disable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|
|
194
193
|
/**
|
|
195
194
|
* Implementation of ISignaler for declarative API.
|
|
196
195
|
* @privateRemarks
|
|
@@ -203,4 +202,3 @@ export const Signaler: {
|
|
|
203
202
|
readonly registryEntry: NamedFluidDataStoreRegistryEntry;
|
|
204
203
|
};
|
|
205
204
|
} & SharedObjectKind<ISignaler> = createDataObjectKind(SignalerClass);
|
|
206
|
-
/* eslint-enable @fluid-internal/fluid/no-hyphen-after-jsdoc-tag -- false positive AB#50920 */
|