@fluidframework/presence 2.92.0 → 2.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/alpha.d.ts +6 -4
- package/dist/beta.d.ts +5 -2
- package/dist/getPresence.d.ts +4 -9
- package/dist/getPresence.d.ts.map +1 -1
- package/dist/getPresence.js +6 -86
- package/dist/getPresence.js.map +1 -1
- package/dist/index.d.ts +4 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/legacy.alpha.d.ts +6 -4
- package/dist/package.json +1 -15
- package/dist/public.d.ts +69 -0
- package/lib/alpha.d.ts +6 -4
- package/lib/beta.d.ts +5 -2
- package/lib/getPresence.d.ts +4 -9
- package/lib/getPresence.d.ts.map +1 -1
- package/lib/getPresence.js +6 -85
- package/lib/getPresence.js.map +1 -1
- package/lib/index.d.ts +4 -13
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/legacy.alpha.d.ts +6 -4
- package/lib/public.d.ts +69 -0
- package/package.json +27 -76
- package/dist/baseTypes.d.ts +0 -24
- package/dist/baseTypes.d.ts.map +0 -1
- package/dist/baseTypes.js +0 -7
- package/dist/baseTypes.js.map +0 -1
- package/dist/broadcastControls.d.ts +0 -37
- package/dist/broadcastControls.d.ts.map +0 -1
- package/dist/broadcastControls.js +0 -60
- package/dist/broadcastControls.js.map +0 -1
- package/dist/broadcastControlsTypes.d.ts +0 -38
- package/dist/broadcastControlsTypes.d.ts.map +0 -1
- package/dist/broadcastControlsTypes.js +0 -7
- package/dist/broadcastControlsTypes.js.map +0 -1
- package/dist/exposedInternalTypes.d.ts +0 -138
- package/dist/exposedInternalTypes.d.ts.map +0 -1
- package/dist/exposedInternalTypes.js +0 -19
- package/dist/exposedInternalTypes.js.map +0 -1
- package/dist/exposedUtilityTypes.d.ts +0 -108
- package/dist/exposedUtilityTypes.d.ts.map +0 -1
- package/dist/exposedUtilityTypes.js +0 -7
- package/dist/exposedUtilityTypes.js.map +0 -1
- package/dist/internalUtils.d.ts +0 -125
- package/dist/internalUtils.d.ts.map +0 -1
- package/dist/internalUtils.js +0 -99
- package/dist/internalUtils.js.map +0 -1
- package/dist/latestMapTypes.d.ts +0 -343
- package/dist/latestMapTypes.d.ts.map +0 -1
- package/dist/latestMapTypes.js +0 -7
- package/dist/latestMapTypes.js.map +0 -1
- package/dist/latestMapValueManager.d.ts +0 -52
- package/dist/latestMapValueManager.d.ts.map +0 -1
- package/dist/latestMapValueManager.js +0 -250
- package/dist/latestMapValueManager.js.map +0 -1
- package/dist/latestTypes.d.ts +0 -183
- package/dist/latestTypes.d.ts.map +0 -1
- package/dist/latestTypes.js +0 -7
- package/dist/latestTypes.js.map +0 -1
- package/dist/latestValueManager.d.ts +0 -10
- package/dist/latestValueManager.d.ts.map +0 -1
- package/dist/latestValueManager.js +0 -117
- package/dist/latestValueManager.js.map +0 -1
- package/dist/latestValueTypes.d.ts +0 -108
- package/dist/latestValueTypes.d.ts.map +0 -1
- package/dist/latestValueTypes.js +0 -7
- package/dist/latestValueTypes.js.map +0 -1
- package/dist/notificationsManager.d.ts +0 -27
- package/dist/notificationsManager.d.ts.map +0 -1
- package/dist/notificationsManager.js +0 -98
- package/dist/notificationsManager.js.map +0 -1
- package/dist/notificationsManagerTypes.d.ts +0 -144
- package/dist/notificationsManagerTypes.d.ts.map +0 -1
- package/dist/notificationsManagerTypes.js +0 -7
- package/dist/notificationsManagerTypes.js.map +0 -1
- package/dist/packageVersion.d.ts +0 -9
- package/dist/packageVersion.d.ts.map +0 -1
- package/dist/packageVersion.js +0 -12
- package/dist/packageVersion.js.map +0 -1
- package/dist/presence.d.ts +0 -229
- package/dist/presence.d.ts.map +0 -1
- package/dist/presence.js +0 -23
- package/dist/presence.js.map +0 -1
- package/dist/presenceDatastoreManager.d.ts +0 -149
- package/dist/presenceDatastoreManager.d.ts.map +0 -1
- package/dist/presenceDatastoreManager.js +0 -667
- package/dist/presenceDatastoreManager.js.map +0 -1
- package/dist/presenceManager.d.ts +0 -16
- package/dist/presenceManager.d.ts.map +0 -1
- package/dist/presenceManager.js +0 -140
- package/dist/presenceManager.js.map +0 -1
- package/dist/presenceStates.d.ts +0 -102
- package/dist/presenceStates.d.ts.map +0 -1
- package/dist/presenceStates.js +0 -231
- package/dist/presenceStates.js.map +0 -1
- package/dist/protocol.d.ts +0 -111
- package/dist/protocol.d.ts.map +0 -1
- package/dist/protocol.js +0 -20
- package/dist/protocol.js.map +0 -1
- package/dist/runtimeTypes.d.ts +0 -26
- package/dist/runtimeTypes.d.ts.map +0 -1
- package/dist/runtimeTypes.js +0 -7
- package/dist/runtimeTypes.js.map +0 -1
- package/dist/stateDatastore.d.ts +0 -56
- package/dist/stateDatastore.d.ts.map +0 -1
- package/dist/stateDatastore.js +0 -22
- package/dist/stateDatastore.js.map +0 -1
- package/dist/stateFactory.d.ts +0 -18
- package/dist/stateFactory.d.ts.map +0 -1
- package/dist/stateFactory.js +0 -23
- package/dist/stateFactory.js.map +0 -1
- package/dist/statesManagerTypes.d.ts +0 -27
- package/dist/statesManagerTypes.d.ts.map +0 -1
- package/dist/statesManagerTypes.js +0 -7
- package/dist/statesManagerTypes.js.map +0 -1
- package/dist/systemWorkspace.d.ts +0 -58
- package/dist/systemWorkspace.d.ts.map +0 -1
- package/dist/systemWorkspace.js +0 -265
- package/dist/systemWorkspace.js.map +0 -1
- package/dist/timerManager.d.ts +0 -37
- package/dist/timerManager.d.ts.map +0 -1
- package/dist/timerManager.js +0 -65
- package/dist/timerManager.js.map +0 -1
- package/dist/types.d.ts +0 -132
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -7
- package/dist/types.js.map +0 -1
- package/dist/validatableTypes.d.ts +0 -69
- package/dist/validatableTypes.d.ts.map +0 -1
- package/dist/validatableTypes.js +0 -7
- package/dist/validatableTypes.js.map +0 -1
- package/dist/validatedGetter.d.ts +0 -18
- package/dist/validatedGetter.d.ts.map +0 -1
- package/dist/validatedGetter.js +0 -43
- package/dist/validatedGetter.js.map +0 -1
- package/dist/valueManager.d.ts +0 -15
- package/dist/valueManager.d.ts.map +0 -1
- package/dist/valueManager.js +0 -22
- package/dist/valueManager.js.map +0 -1
- package/lib/baseTypes.d.ts +0 -24
- package/lib/baseTypes.d.ts.map +0 -1
- package/lib/baseTypes.js +0 -6
- package/lib/baseTypes.js.map +0 -1
- package/lib/broadcastControls.d.ts +0 -37
- package/lib/broadcastControls.d.ts.map +0 -1
- package/lib/broadcastControls.js +0 -55
- package/lib/broadcastControls.js.map +0 -1
- package/lib/broadcastControlsTypes.d.ts +0 -38
- package/lib/broadcastControlsTypes.d.ts.map +0 -1
- package/lib/broadcastControlsTypes.js +0 -6
- package/lib/broadcastControlsTypes.js.map +0 -1
- package/lib/exposedInternalTypes.d.ts +0 -138
- package/lib/exposedInternalTypes.d.ts.map +0 -1
- package/lib/exposedInternalTypes.js +0 -16
- package/lib/exposedInternalTypes.js.map +0 -1
- package/lib/exposedUtilityTypes.d.ts +0 -108
- package/lib/exposedUtilityTypes.d.ts.map +0 -1
- package/lib/exposedUtilityTypes.js +0 -6
- package/lib/exposedUtilityTypes.js.map +0 -1
- package/lib/internalUtils.d.ts +0 -125
- package/lib/internalUtils.d.ts.map +0 -1
- package/lib/internalUtils.js +0 -90
- package/lib/internalUtils.js.map +0 -1
- package/lib/latestMapTypes.d.ts +0 -343
- package/lib/latestMapTypes.d.ts.map +0 -1
- package/lib/latestMapTypes.js +0 -6
- package/lib/latestMapTypes.js.map +0 -1
- package/lib/latestMapValueManager.d.ts +0 -52
- package/lib/latestMapValueManager.d.ts.map +0 -1
- package/lib/latestMapValueManager.js +0 -246
- package/lib/latestMapValueManager.js.map +0 -1
- package/lib/latestTypes.d.ts +0 -183
- package/lib/latestTypes.d.ts.map +0 -1
- package/lib/latestTypes.js +0 -6
- package/lib/latestTypes.js.map +0 -1
- package/lib/latestValueManager.d.ts +0 -10
- package/lib/latestValueManager.d.ts.map +0 -1
- package/lib/latestValueManager.js +0 -113
- package/lib/latestValueManager.js.map +0 -1
- package/lib/latestValueTypes.d.ts +0 -108
- package/lib/latestValueTypes.d.ts.map +0 -1
- package/lib/latestValueTypes.js +0 -6
- package/lib/latestValueTypes.js.map +0 -1
- package/lib/notificationsManager.d.ts +0 -27
- package/lib/notificationsManager.d.ts.map +0 -1
- package/lib/notificationsManager.js +0 -94
- package/lib/notificationsManager.js.map +0 -1
- package/lib/notificationsManagerTypes.d.ts +0 -144
- package/lib/notificationsManagerTypes.d.ts.map +0 -1
- package/lib/notificationsManagerTypes.js +0 -6
- package/lib/notificationsManagerTypes.js.map +0 -1
- package/lib/packageVersion.d.ts +0 -9
- package/lib/packageVersion.d.ts.map +0 -1
- package/lib/packageVersion.js +0 -9
- package/lib/packageVersion.js.map +0 -1
- package/lib/presence.d.ts +0 -229
- package/lib/presence.d.ts.map +0 -1
- package/lib/presence.js +0 -20
- package/lib/presence.js.map +0 -1
- package/lib/presenceDatastoreManager.d.ts +0 -149
- package/lib/presenceDatastoreManager.d.ts.map +0 -1
- package/lib/presenceDatastoreManager.js +0 -663
- package/lib/presenceDatastoreManager.js.map +0 -1
- package/lib/presenceManager.d.ts +0 -16
- package/lib/presenceManager.d.ts.map +0 -1
- package/lib/presenceManager.js +0 -136
- package/lib/presenceManager.js.map +0 -1
- package/lib/presenceStates.d.ts +0 -102
- package/lib/presenceStates.d.ts.map +0 -1
- package/lib/presenceStates.js +0 -225
- package/lib/presenceStates.js.map +0 -1
- package/lib/protocol.d.ts +0 -111
- package/lib/protocol.d.ts.map +0 -1
- package/lib/protocol.js +0 -17
- package/lib/protocol.js.map +0 -1
- package/lib/runtimeTypes.d.ts +0 -26
- package/lib/runtimeTypes.d.ts.map +0 -1
- package/lib/runtimeTypes.js +0 -6
- package/lib/runtimeTypes.js.map +0 -1
- package/lib/stateDatastore.d.ts +0 -56
- package/lib/stateDatastore.d.ts.map +0 -1
- package/lib/stateDatastore.js +0 -17
- package/lib/stateDatastore.js.map +0 -1
- package/lib/stateFactory.d.ts +0 -18
- package/lib/stateFactory.d.ts.map +0 -1
- package/lib/stateFactory.js +0 -20
- package/lib/stateFactory.js.map +0 -1
- package/lib/statesManagerTypes.d.ts +0 -27
- package/lib/statesManagerTypes.d.ts.map +0 -1
- package/lib/statesManagerTypes.js +0 -6
- package/lib/statesManagerTypes.js.map +0 -1
- package/lib/systemWorkspace.d.ts +0 -58
- package/lib/systemWorkspace.d.ts.map +0 -1
- package/lib/systemWorkspace.js +0 -261
- package/lib/systemWorkspace.js.map +0 -1
- package/lib/timerManager.d.ts +0 -37
- package/lib/timerManager.d.ts.map +0 -1
- package/lib/timerManager.js +0 -61
- package/lib/timerManager.js.map +0 -1
- package/lib/types.d.ts +0 -132
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -6
- package/lib/types.js.map +0 -1
- package/lib/validatableTypes.d.ts +0 -69
- package/lib/validatableTypes.d.ts.map +0 -1
- package/lib/validatableTypes.js +0 -6
- package/lib/validatableTypes.js.map +0 -1
- package/lib/validatedGetter.d.ts +0 -18
- package/lib/validatedGetter.d.ts.map +0 -1
- package/lib/validatedGetter.js +0 -39
- package/lib/validatedGetter.js.map +0 -1
- package/lib/valueManager.d.ts +0 -15
- package/lib/valueManager.d.ts.map +0 -1
- package/lib/valueManager.js +0 -17
- package/lib/valueManager.js.map +0 -1
package/lib/getPresence.js
CHANGED
|
@@ -2,99 +2,20 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { createPresenceManager } from "./presenceManager.js";
|
|
9
|
-
const presenceCompatibility = {
|
|
10
|
-
generation: 1,
|
|
11
|
-
version: pkgVersion,
|
|
12
|
-
capabilities: new Set([]),
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Minimal compatible package version.
|
|
16
|
-
* If an existing presence extension is registered with this version or higher,
|
|
17
|
-
* it can be used instead of instantiating new instance from this version of
|
|
18
|
-
* the package (assuming also capabilities are compatible).
|
|
19
|
-
*/
|
|
20
|
-
const minimalCompatiblePackageVersion = "2.71.0";
|
|
21
|
-
function assertCompatibilityInvariants(compatibility) {
|
|
22
|
-
assert(compatibility.generation === presenceCompatibility.generation, 0xc97 /* Presence compatibility generation mismatch. */);
|
|
23
|
-
assert(compatibility.version.startsWith("2."), 0xc98 /* Registered version is not major version 2. */);
|
|
24
|
-
assert(Number.parseFloat(compatibility.version.slice(2)) <
|
|
25
|
-
Number.parseFloat(presenceCompatibility.version.slice(2)), 0xc99 /* Registered version is not less than the current version. */);
|
|
26
|
-
assert(presenceCompatibility.capabilities.size === 0, 0xc9a /* Presence capabilities should be empty. */);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Common Presence manager for a container
|
|
30
|
-
*/
|
|
31
|
-
class ContainerPresenceManager {
|
|
32
|
-
constructor(host) {
|
|
33
|
-
// ContainerExtensionFactory return elements
|
|
34
|
-
this.compatibility = presenceCompatibility;
|
|
35
|
-
this.extension = this;
|
|
36
|
-
this.interface = this.manager = createPresenceManager({
|
|
37
|
-
...host,
|
|
38
|
-
submitSignal: (message) => {
|
|
39
|
-
host.submitAddressedSignal([], message);
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
handleVersionOrCapabilitiesMismatch(ourExistingInstantiation, newCompatibilityRequest) {
|
|
44
|
-
assert(ourExistingInstantiation.compatibility === presenceCompatibility, 0xc9b /* Presence extension called without own compatibility details */);
|
|
45
|
-
assertCompatibilityInvariants(newCompatibilityRequest);
|
|
46
|
-
// There have not yet been any changes that would require action to upgrade.
|
|
47
|
-
// But also mixed runtime versions are not yet expected.
|
|
48
|
-
fail(0xcb1 /* Presence is only expected to be accessed with a single version. */);
|
|
49
|
-
}
|
|
50
|
-
onNewUse() {
|
|
51
|
-
// No-op
|
|
52
|
-
}
|
|
53
|
-
processSignal(addressChain, message, local) {
|
|
54
|
-
this.manager.processSignal(addressChain, message, local);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
const extensionId = "dis:bb89f4c0-80fd-4f0c-8469-4f2848ee7f4a";
|
|
58
|
-
const ContainerPresenceFactory = {
|
|
59
|
-
hostRequirements: {
|
|
60
|
-
minSupportedGeneration: 1,
|
|
61
|
-
requiredFeatures: [],
|
|
62
|
-
},
|
|
63
|
-
instanceExpectations: { ...presenceCompatibility, version: minimalCompatiblePackageVersion },
|
|
64
|
-
resolvePriorInstantiation(existingInstantiation) {
|
|
65
|
-
// Validate assumptions about existing instance
|
|
66
|
-
assertCompatibilityInvariants(existingInstantiation.compatibility);
|
|
67
|
-
// There have not yet been any changes that would require action to upgrade.
|
|
68
|
-
// But also mixed runtime versions are not yet expected.
|
|
69
|
-
fail(0xcb2 /* Presence is only expected to be accessed with a single version. */);
|
|
70
|
-
},
|
|
71
|
-
instantiateExtension(host) {
|
|
72
|
-
return new ContainerPresenceManager(host);
|
|
73
|
-
},
|
|
74
|
-
[Symbol.hasInstance]: (instance) => {
|
|
75
|
-
return instance instanceof ContainerPresenceManager;
|
|
76
|
-
},
|
|
77
|
-
};
|
|
5
|
+
import { ContainerPresenceFactory, extensionId, } from "@fluid-internal/presence-runtime/extension";
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
import { getPresenceAlpha } from "@fluidframework/fluid-static/internal";
|
|
78
8
|
/**
|
|
79
9
|
* Acquire a {@link Presence} from a Fluid Container
|
|
80
10
|
* @param fluidContainer - Fluid Container to acquire the map from
|
|
81
11
|
* @returns the {@link Presence}
|
|
82
12
|
*
|
|
83
13
|
* @beta
|
|
84
|
-
*/
|
|
85
|
-
export const getPresence = getPresenceAlpha;
|
|
86
|
-
/**
|
|
87
|
-
* Acquire a {@link PresenceWithNotifications} from a Fluid Container
|
|
88
|
-
* @param fluidContainer - Fluid Container to acquire the map from
|
|
89
|
-
* @returns the {@link PresenceWithNotifications}
|
|
90
14
|
*
|
|
91
|
-
* @
|
|
15
|
+
* @deprecated Import from `fluid-framework` instead. This export will be removed in the 2.110.0 release.
|
|
16
|
+
* See {@link https://github.com/microsoft/FluidFramework/issues/26397}
|
|
92
17
|
*/
|
|
93
|
-
export
|
|
94
|
-
assert(isInternalFluidContainer(fluidContainer), 0xa2f /* IFluidContainer was not recognized. Only Containers generated by the Fluid Framework are supported. */);
|
|
95
|
-
const presence = fluidContainer.acquireExtension(extensionId, ContainerPresenceFactory);
|
|
96
|
-
return presence;
|
|
97
|
-
}
|
|
18
|
+
export const getPresence = getPresenceAlpha;
|
|
98
19
|
function assertContextHasExtensionProvider(context) {
|
|
99
20
|
assert("getExtension" in context, 0xc9c /* Data store context does not implement ContainerExtensionProvider */);
|
|
100
21
|
}
|
package/lib/getPresence.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPresence.js","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"getPresence.js","sourceRoot":"","sources":["../src/getPresence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,wBAAwB,EACxB,WAAW,GACX,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAMzE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAkD,gBAAgB,CAAC;AAE3F,SAAS,iCAAiC,CACzC,OAA+B;IAE/B,MAAM,CACL,cAAc,IAAI,OAAO,EACzB,KAAK,CAAC,sEAAsE,CAC5E,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAAC,OAA+B;IAC9E,iCAAiC,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC;AACpE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Presence } from \"@fluid-internal/presence-definitions\";\nimport {\n\tContainerPresenceFactory,\n\textensionId,\n} from \"@fluid-internal/presence-runtime/extension\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IFluidContainer } from \"@fluidframework/fluid-static\";\nimport { getPresenceAlpha } from \"@fluidframework/fluid-static/internal\";\nimport type {\n\tFluidDataStoreContextInternal,\n\tIFluidDataStoreContext,\n} from \"@fluidframework/runtime-definitions/internal\";\n\n/**\n * Acquire a {@link Presence} from a Fluid Container\n * @param fluidContainer - Fluid Container to acquire the map from\n * @returns the {@link Presence}\n *\n * @beta\n *\n * @deprecated Import from `fluid-framework` instead. This export will be removed in the 2.110.0 release.\n * See {@link https://github.com/microsoft/FluidFramework/issues/26397}\n */\nexport const getPresence: (fluidContainer: IFluidContainer) => Presence = getPresenceAlpha;\n\nfunction assertContextHasExtensionProvider(\n\tcontext: IFluidDataStoreContext,\n): asserts context is FluidDataStoreContextInternal {\n\tassert(\n\t\t\"getExtension\" in context,\n\t\t0xc9c /* Data store context does not implement ContainerExtensionProvider */,\n\t);\n}\n\n/**\n * Get {@link Presence} from a Fluid Data Store Context\n *\n * @legacy @alpha\n */\nexport function getPresenceFromDataStoreContext(context: IFluidDataStoreContext): Presence {\n\tassertContextHasExtensionProvider(context);\n\treturn context.getExtension(extensionId, ContainerPresenceFactory);\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -9,17 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
export type { ClientConnectionId } from "
|
|
13
|
-
export
|
|
14
|
-
export {
|
|
15
|
-
export
|
|
16
|
-
export { getPresence, getPresenceAlpha, getPresenceFromDataStoreContext, } from "./getPresence.js";
|
|
17
|
-
export type { KeySchemaValidator, LatestMap, LatestMapArguments, LatestMapArgumentsRaw, LatestMapClientData, LatestMapConfiguration, LatestMapEvents, LatestMapFactory, LatestMapItemRemovedClientData, LatestMapItemUpdatedClientData, LatestMapRaw, LatestMapRawConfiguration, LatestMapRawEvents, StateMap, } from "./latestMapTypes.js";
|
|
18
|
-
export type { Latest, LatestArguments, LatestArgumentsRaw, LatestConfiguration, LatestEvents, LatestFactory, LatestRaw, LatestRawConfiguration, LatestRawEvents, } from "./latestTypes.js";
|
|
19
|
-
export type { Accessor, LatestClientData, LatestData, LatestMetadata, ProxiedValueAccessor, RawValueAccessor, StateSchemaValidator, ValueAccessor, } from "./latestValueTypes.js";
|
|
20
|
-
export { Notifications } from "./notificationsManager.js";
|
|
21
|
-
export type { NotificationEmitter, NotificationListenable, NotificationsConfiguration, NotificationSubscriberSignatures, NotificationsManager, NotificationsManagerEvents, NotificationsWithSubscriptionsConfiguration, } from "./notificationsManagerTypes.js";
|
|
22
|
-
export { StateFactory } from "./stateFactory.js";
|
|
23
|
-
export type { InternalTypes as InternalPresenceTypes } from "./exposedInternalTypes.js";
|
|
24
|
-
export type { InternalUtilityTypes as InternalPresenceUtilityTypes } from "./exposedUtilityTypes.js";
|
|
12
|
+
export type { Accessor, Attendee, AttendeeId, AttendeesEvents, BroadcastControls, BroadcastControlSettings, ClientConnectionId, InternalPresenceTypes, InternalPresenceUtilityTypes, KeySchemaValidator, Latest, LatestArguments, LatestArgumentsRaw, LatestClientData, LatestConfiguration, LatestData, LatestEvents, LatestFactory, LatestMap, LatestMapArguments, LatestMapArgumentsRaw, LatestMapClientData, LatestMapConfiguration, LatestMapEvents, LatestMapFactory, LatestMapItemRemovedClientData, LatestMapItemUpdatedClientData, LatestMapRaw, LatestMapRawConfiguration, LatestMapRawEvents, LatestMetadata, LatestRaw, LatestRawConfiguration, LatestRawEvents, NotificationEmitter, NotificationListenable, NotificationsConfiguration, NotificationsManager, NotificationsManagerEvents, NotificationSubscriberSignatures, NotificationsWithSubscriptionsConfiguration, NotificationsWorkspace, NotificationsWorkspaceSchema, Presence, PresenceEvents, PresenceWithNotifications, ProxiedValueAccessor, RawValueAccessor, StateMap, StateSchemaValidator, StatesWorkspace, StatesWorkspaceEntries, StatesWorkspaceEntry, StatesWorkspaceSchema, ValueAccessor, WorkspaceAddress, } from "@fluid-internal/presence-definitions";
|
|
13
|
+
export { AttendeeStatus } from "@fluid-internal/presence-definitions";
|
|
14
|
+
export { Notifications, StateFactory, } from "@fluid-internal/presence-runtime/states";
|
|
15
|
+
export { getPresence, getPresenceFromDataStoreContext, } from "./getPresence.js";
|
|
25
16
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAGH,YAAY,EACX,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,MAAM,EACN,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,YAAY,EACZ,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,gBAAgB,EAChB,8BAA8B,EAC9B,8BAA8B,EAC9B,YAAY,EACZ,yBAAyB,EACzB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,EACpB,0BAA0B,EAC1B,gCAAgC,EAChC,2CAA2C,EAC3C,sBAAsB,EACtB,4BAA4B,EAC5B,QAAQ,EACR,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,gBAAgB,GAChB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAGtE,OAAO,EACN,aAAa,EACb,YAAY,GACZ,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EACN,WAAW,EACX,+BAA+B,GAC/B,MAAM,kBAAkB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { AttendeeStatus
|
|
6
|
-
export
|
|
7
|
-
export { Notifications } from "
|
|
8
|
-
|
|
5
|
+
export { AttendeeStatus } from "@fluid-internal/presence-definitions";
|
|
6
|
+
// Re-export from presence-runtime
|
|
7
|
+
export { Notifications, StateFactory, } from "@fluid-internal/presence-runtime/states";
|
|
8
|
+
// Local exports
|
|
9
|
+
export { getPresence, getPresenceFromDataStoreContext, } from "./getPresence.js";
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqEH,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,kCAAkC;AAClC,OAAO,EACN,aAAa,EACb,YAAY,GACZ,MAAM,yCAAyC,CAAC;AAEjD,gBAAgB;AAChB,OAAO,EACN,WAAW,EACX,+BAA+B,GAC/B,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Package for client presence within a connected session.\n *\n * See {@link https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#readme | README.md } for an overview of the package.\n *\n * @packageDocumentation\n */\n\n// Re-export from presence-definitions\nexport type {\n\tAccessor,\n\tAttendee,\n\tAttendeeId,\n\tAttendeesEvents,\n\tBroadcastControls,\n\tBroadcastControlSettings,\n\tClientConnectionId,\n\tInternalPresenceTypes,\n\tInternalPresenceUtilityTypes,\n\tKeySchemaValidator,\n\tLatest,\n\tLatestArguments,\n\tLatestArgumentsRaw,\n\tLatestClientData,\n\tLatestConfiguration,\n\tLatestData,\n\tLatestEvents,\n\tLatestFactory,\n\tLatestMap,\n\tLatestMapArguments,\n\tLatestMapArgumentsRaw,\n\tLatestMapClientData,\n\tLatestMapConfiguration,\n\tLatestMapEvents,\n\tLatestMapFactory,\n\tLatestMapItemRemovedClientData,\n\tLatestMapItemUpdatedClientData,\n\tLatestMapRaw,\n\tLatestMapRawConfiguration,\n\tLatestMapRawEvents,\n\tLatestMetadata,\n\tLatestRaw,\n\tLatestRawConfiguration,\n\tLatestRawEvents,\n\tNotificationEmitter,\n\tNotificationListenable,\n\tNotificationsConfiguration,\n\tNotificationsManager,\n\tNotificationsManagerEvents,\n\tNotificationSubscriberSignatures,\n\tNotificationsWithSubscriptionsConfiguration,\n\tNotificationsWorkspace,\n\tNotificationsWorkspaceSchema,\n\tPresence,\n\tPresenceEvents,\n\tPresenceWithNotifications,\n\tProxiedValueAccessor,\n\tRawValueAccessor,\n\tStateMap,\n\tStateSchemaValidator,\n\tStatesWorkspace,\n\tStatesWorkspaceEntries,\n\tStatesWorkspaceEntry,\n\tStatesWorkspaceSchema,\n\tValueAccessor,\n\tWorkspaceAddress,\n} from \"@fluid-internal/presence-definitions\";\nexport { AttendeeStatus } from \"@fluid-internal/presence-definitions\";\n\n// Re-export from presence-runtime\nexport {\n\tNotifications,\n\tStateFactory,\n} from \"@fluid-internal/presence-runtime/states\";\n\n// Local exports\nexport {\n\tgetPresence,\n\tgetPresenceFromDataStoreContext,\n} from \"./getPresence.js\";\n"]}
|
package/lib/legacy.alpha.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
export {
|
|
20
|
-
// #region @
|
|
20
|
+
// #region @public APIs
|
|
21
21
|
Accessor,
|
|
22
22
|
Attendee,
|
|
23
23
|
AttendeeId,
|
|
@@ -64,7 +64,10 @@ export {
|
|
|
64
64
|
StatesWorkspaceEntry,
|
|
65
65
|
StatesWorkspaceSchema,
|
|
66
66
|
ValueAccessor,
|
|
67
|
-
WorkspaceAddress,
|
|
67
|
+
WorkspaceAddress,
|
|
68
|
+
// #endregion
|
|
69
|
+
|
|
70
|
+
// #region @beta APIs
|
|
68
71
|
getPresence,
|
|
69
72
|
// #endregion
|
|
70
73
|
|
|
@@ -80,8 +83,7 @@ export {
|
|
|
80
83
|
NotificationsWithSubscriptionsConfiguration,
|
|
81
84
|
NotificationsWorkspace,
|
|
82
85
|
NotificationsWorkspaceSchema,
|
|
83
|
-
PresenceWithNotifications,
|
|
84
|
-
getPresenceAlpha,
|
|
86
|
+
PresenceWithNotifications,
|
|
85
87
|
// #endregion
|
|
86
88
|
|
|
87
89
|
// #region @legacyAlpha APIs
|
package/lib/public.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyAlpha legacy.alpha --outDir ./lib" in @fluid-tools/build-cli.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Package for client presence within a connected session.
|
|
13
|
+
*
|
|
14
|
+
* See {@link https://github.com/microsoft/FluidFramework/tree/main/packages/framework/presence#readme | README.md } for an overview of the package.
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
// #region @public APIs
|
|
21
|
+
Accessor,
|
|
22
|
+
Attendee,
|
|
23
|
+
AttendeeId,
|
|
24
|
+
AttendeeStatus,
|
|
25
|
+
AttendeesEvents,
|
|
26
|
+
BroadcastControlSettings,
|
|
27
|
+
BroadcastControls,
|
|
28
|
+
ClientConnectionId,
|
|
29
|
+
InternalPresenceTypes,
|
|
30
|
+
KeySchemaValidator,
|
|
31
|
+
Latest,
|
|
32
|
+
LatestArguments,
|
|
33
|
+
LatestArgumentsRaw,
|
|
34
|
+
LatestClientData,
|
|
35
|
+
LatestConfiguration,
|
|
36
|
+
LatestData,
|
|
37
|
+
LatestEvents,
|
|
38
|
+
LatestFactory,
|
|
39
|
+
LatestMap,
|
|
40
|
+
LatestMapArguments,
|
|
41
|
+
LatestMapArgumentsRaw,
|
|
42
|
+
LatestMapClientData,
|
|
43
|
+
LatestMapConfiguration,
|
|
44
|
+
LatestMapEvents,
|
|
45
|
+
LatestMapFactory,
|
|
46
|
+
LatestMapItemRemovedClientData,
|
|
47
|
+
LatestMapItemUpdatedClientData,
|
|
48
|
+
LatestMapRaw,
|
|
49
|
+
LatestMapRawConfiguration,
|
|
50
|
+
LatestMapRawEvents,
|
|
51
|
+
LatestMetadata,
|
|
52
|
+
LatestRaw,
|
|
53
|
+
LatestRawConfiguration,
|
|
54
|
+
LatestRawEvents,
|
|
55
|
+
Presence,
|
|
56
|
+
PresenceEvents,
|
|
57
|
+
ProxiedValueAccessor,
|
|
58
|
+
RawValueAccessor,
|
|
59
|
+
StateFactory,
|
|
60
|
+
StateMap,
|
|
61
|
+
StateSchemaValidator,
|
|
62
|
+
StatesWorkspace,
|
|
63
|
+
StatesWorkspaceEntries,
|
|
64
|
+
StatesWorkspaceEntry,
|
|
65
|
+
StatesWorkspaceSchema,
|
|
66
|
+
ValueAccessor,
|
|
67
|
+
WorkspaceAddress
|
|
68
|
+
// #endregion
|
|
69
|
+
} from "./index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/presence",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.93.0",
|
|
4
4
|
"description": "A component for lightweight data sharing within a single session",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./lib/public.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/public.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
16
26
|
"./beta": {
|
|
17
27
|
"import": {
|
|
18
28
|
"types": "./lib/beta.d.ts",
|
|
@@ -50,87 +60,42 @@
|
|
|
50
60
|
"*.d.ts",
|
|
51
61
|
"!**/test/**"
|
|
52
62
|
],
|
|
53
|
-
"c8": {
|
|
54
|
-
"all": true,
|
|
55
|
-
"cache-dir": "nyc/.cache",
|
|
56
|
-
"exclude": [
|
|
57
|
-
"src/test/**/*.*ts",
|
|
58
|
-
"dist/test/**/*.*js",
|
|
59
|
-
"lib/test/**/*.*js"
|
|
60
|
-
],
|
|
61
|
-
"exclude-after-remap": false,
|
|
62
|
-
"include": [
|
|
63
|
-
"src/**/*.*ts",
|
|
64
|
-
"dist/**/*.*js",
|
|
65
|
-
"lib/**/*.*js"
|
|
66
|
-
],
|
|
67
|
-
"report-dir": "nyc/report",
|
|
68
|
-
"reporter": [
|
|
69
|
-
"cobertura",
|
|
70
|
-
"html",
|
|
71
|
-
"text"
|
|
72
|
-
],
|
|
73
|
-
"temp-directory": "nyc/.nyc_output"
|
|
74
|
-
},
|
|
75
63
|
"dependencies": {
|
|
76
|
-
"@fluid-internal/
|
|
77
|
-
"@
|
|
78
|
-
"@fluidframework/
|
|
79
|
-
"@fluidframework/
|
|
80
|
-
"@fluidframework/
|
|
81
|
-
"@fluidframework/fluid-static": "~2.92.0",
|
|
82
|
-
"@fluidframework/id-compressor": "~2.92.0",
|
|
83
|
-
"@fluidframework/runtime-definitions": "~2.92.0",
|
|
84
|
-
"@fluidframework/telemetry-utils": "~2.92.0"
|
|
64
|
+
"@fluid-internal/presence-definitions": "~2.93.0",
|
|
65
|
+
"@fluid-internal/presence-runtime": "~2.93.0",
|
|
66
|
+
"@fluidframework/core-utils": "~2.93.0",
|
|
67
|
+
"@fluidframework/fluid-static": "~2.93.0",
|
|
68
|
+
"@fluidframework/runtime-definitions": "~2.93.0"
|
|
85
69
|
},
|
|
86
70
|
"devDependencies": {
|
|
87
71
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
88
72
|
"@biomejs/biome": "~2.4.5",
|
|
89
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
73
|
+
"@fluid-internal/mocha-test-setup": "~2.93.0",
|
|
90
74
|
"@fluid-tools/build-cli": "^0.64.0",
|
|
91
75
|
"@fluidframework/build-common": "^2.0.3",
|
|
92
76
|
"@fluidframework/build-tools": "^0.64.0",
|
|
93
|
-
"@fluidframework/driver-definitions": "~2.92.0",
|
|
94
77
|
"@fluidframework/eslint-config-fluid": "^9.0.0",
|
|
95
|
-
"@
|
|
96
|
-
"@fluidframework/test-utils": "~2.92.0",
|
|
97
|
-
"@microsoft/api-extractor": "7.52.11",
|
|
98
|
-
"@types/mocha": "^10.0.10",
|
|
99
|
-
"@types/node": "~20.19.30",
|
|
100
|
-
"@types/sinon": "^17.0.3",
|
|
101
|
-
"c8": "^10.1.3",
|
|
78
|
+
"@microsoft/api-extractor": "7.58.1",
|
|
102
79
|
"concurrently": "^9.2.1",
|
|
103
80
|
"copyfiles": "^2.4.1",
|
|
104
81
|
"cross-env": "^10.1.0",
|
|
105
82
|
"eslint": "~9.39.1",
|
|
106
83
|
"jiti": "^2.6.1",
|
|
107
|
-
"mocha": "^11.7.5",
|
|
108
|
-
"mocha-multi-reporters": "^1.5.1",
|
|
109
84
|
"rimraf": "^6.1.3",
|
|
110
|
-
"sinon": "^18.0.1",
|
|
111
85
|
"typescript": "~5.4.5"
|
|
112
86
|
},
|
|
113
87
|
"fluidBuild": {
|
|
114
88
|
"tasks": {
|
|
115
|
-
"build:esnext
|
|
116
|
-
"build:esnext:main"
|
|
117
|
-
],
|
|
118
|
-
"build:esnext:main": [
|
|
89
|
+
"build:esnext": [
|
|
119
90
|
"^api",
|
|
120
|
-
"^build:esnext"
|
|
121
|
-
"build:genver"
|
|
91
|
+
"^build:esnext"
|
|
122
92
|
],
|
|
123
93
|
"eslint": [
|
|
124
|
-
"api-extractor:esnext"
|
|
125
|
-
"^build:test:esm"
|
|
126
|
-
],
|
|
127
|
-
"tsc:experimental": [
|
|
128
|
-
"tsc:main"
|
|
94
|
+
"api-extractor:esnext"
|
|
129
95
|
],
|
|
130
|
-
"tsc
|
|
96
|
+
"tsc": [
|
|
131
97
|
"^api",
|
|
132
|
-
"^tsc"
|
|
133
|
-
"build:genver"
|
|
98
|
+
"^tsc"
|
|
134
99
|
]
|
|
135
100
|
}
|
|
136
101
|
},
|
|
@@ -148,13 +113,7 @@
|
|
|
148
113
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
149
114
|
"build:compile": "fluid-build . --task compile",
|
|
150
115
|
"build:docs": "api-extractor run --local",
|
|
151
|
-
"build:esnext": "
|
|
152
|
-
"build:esnext:experimental": "tsc --project ./tsconfig.json",
|
|
153
|
-
"build:esnext:main": "tsc --project ./tsconfig.main.json",
|
|
154
|
-
"build:genver": "gen-version",
|
|
155
|
-
"build:test": "npm run build:test:esm && npm run build:test:cjs",
|
|
156
|
-
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
157
|
-
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
116
|
+
"build:esnext": "tsc --project ./tsconfig.json",
|
|
158
117
|
"check:are-the-types-wrong": "attw --pack . --profile node16",
|
|
159
118
|
"check:biome": "biome check .",
|
|
160
119
|
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
@@ -162,9 +121,11 @@
|
|
|
162
121
|
"check:exports:cjs:alpha": "api-extractor run --config api-extractor/api-extractor-lint-alpha.cjs.json",
|
|
163
122
|
"check:exports:cjs:beta": "api-extractor run --config api-extractor/api-extractor-lint-beta.cjs.json",
|
|
164
123
|
"check:exports:cjs:legacy.alpha": "api-extractor run --config api-extractor/api-extractor-lint-legacy.alpha.cjs.json",
|
|
124
|
+
"check:exports:cjs:public": "api-extractor run --config api-extractor/api-extractor-lint-public.cjs.json",
|
|
165
125
|
"check:exports:esm:alpha": "api-extractor run --config api-extractor/api-extractor-lint-alpha.esm.json",
|
|
166
126
|
"check:exports:esm:beta": "api-extractor run --config api-extractor/api-extractor-lint-beta.esm.json",
|
|
167
127
|
"check:exports:esm:legacy.alpha": "api-extractor run --config api-extractor/api-extractor-lint-legacy.alpha.esm.json",
|
|
128
|
+
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
168
129
|
"check:format": "npm run check:biome",
|
|
169
130
|
"ci:build:docs": "api-extractor run",
|
|
170
131
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
@@ -174,16 +135,6 @@
|
|
|
174
135
|
"format:biome": "biome check . --write",
|
|
175
136
|
"lint": "fluid-build . --task lint",
|
|
176
137
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
|
177
|
-
"
|
|
178
|
-
"test:coverage": "c8 npm test",
|
|
179
|
-
"test:mocha": "npm run test:mocha:esm && npm run test:mocha:cjs",
|
|
180
|
-
"test:mocha:cjs": "cross-env FLUID_TEST_MODULE_SYSTEM=CJS mocha",
|
|
181
|
-
"test:mocha:esm": "mocha",
|
|
182
|
-
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
183
|
-
"tsc": "npm run tsc:main && npm run tsc:experimental",
|
|
184
|
-
"tsc:experimental": "fluid-tsc commonjs --project ./tsconfig.cjs.json",
|
|
185
|
-
"tsc:main": "fluid-tsc commonjs --project ./tsconfig.main.cjs.json && copyfiles -f ./src/cjs/package.json ./dist",
|
|
186
|
-
"typetests:gen": "flub generate typetests --dir . -v",
|
|
187
|
-
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
138
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist"
|
|
188
139
|
}
|
|
189
140
|
}
|
package/dist/baseTypes.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* A Fluid client connection identifier.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Each client connection is given a unique identifier for the duration of the
|
|
10
|
-
* connection. If a client disconnects and reconnects, it will be given a new
|
|
11
|
-
* identifier. Prefer use of {@link Attendee} as a way to identify clients
|
|
12
|
-
* in a session. {@link Attendee.getConnectionId} will provide the current
|
|
13
|
-
* connection identifier for a logical attendee.
|
|
14
|
-
*
|
|
15
|
-
* @privateRemarks
|
|
16
|
-
* This represents what is commonly `clientId` in Fluid code. Ideally this is
|
|
17
|
-
* moved somewhere more central and we brand it to avoid confusion with other
|
|
18
|
-
* strings. Branding broadly is likely a breaking change and may take decent
|
|
19
|
-
* effort to manage.
|
|
20
|
-
*
|
|
21
|
-
* @beta
|
|
22
|
-
*/
|
|
23
|
-
export type ClientConnectionId = string;
|
|
24
|
-
//# sourceMappingURL=baseTypes.d.ts.map
|
package/dist/baseTypes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseTypes.d.ts","sourceRoot":"","sources":["../src/baseTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC"}
|
package/dist/baseTypes.js
DELETED
package/dist/baseTypes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseTypes.js","sourceRoot":"","sources":["../src/baseTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * A Fluid client connection identifier.\n *\n * @remarks\n * Each client connection is given a unique identifier for the duration of the\n * connection. If a client disconnects and reconnects, it will be given a new\n * identifier. Prefer use of {@link Attendee} as a way to identify clients\n * in a session. {@link Attendee.getConnectionId} will provide the current\n * connection identifier for a logical attendee.\n *\n * @privateRemarks\n * This represents what is commonly `clientId` in Fluid code. Ideally this is\n * moved somewhere more central and we brand it to avoid confusion with other\n * strings. Branding broadly is likely a breaking change and may take decent\n * effort to manage.\n *\n * @beta\n */\nexport type ClientConnectionId = string;\n"]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
import type { BroadcastControls, BroadcastControlSettings } from "./broadcastControlsTypes.js";
|
|
6
|
-
declare class ForcedRefreshControl implements Pick<BroadcastControls & {
|
|
7
|
-
forcedRefreshIntervalMs: number | undefined;
|
|
8
|
-
}, "forcedRefreshIntervalMs"> {
|
|
9
|
-
private _forcedRefreshInterval;
|
|
10
|
-
constructor(settings?: BroadcastControlSettings);
|
|
11
|
-
get forcedRefreshIntervalMs(): number | undefined;
|
|
12
|
-
set forcedRefreshIntervalMs(value: number | undefined);
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Implements {@link BroadcastControls} for States Managers
|
|
16
|
-
* where returning `undefined` settings are allowed.
|
|
17
|
-
*/
|
|
18
|
-
export declare class OptionalBroadcastControl extends ForcedRefreshControl implements BroadcastControls {
|
|
19
|
-
allowableUpdateLatencyMs: number | undefined;
|
|
20
|
-
constructor(settings?: BroadcastControlSettings);
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Implements {@link BroadcastControls} but always provides defined value for
|
|
24
|
-
* {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}.
|
|
25
|
-
*
|
|
26
|
-
* If {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}
|
|
27
|
-
* is set to `undefined`, the default will be restored.
|
|
28
|
-
*/
|
|
29
|
-
export declare class RequiredBroadcastControl extends ForcedRefreshControl implements BroadcastControls {
|
|
30
|
-
private readonly defaultAllowableUpdateLatencyMs;
|
|
31
|
-
private _allowableUpdateLatencyMs;
|
|
32
|
-
constructor(defaultAllowableUpdateLatencyMs: number);
|
|
33
|
-
get allowableUpdateLatencyMs(): number;
|
|
34
|
-
set allowableUpdateLatencyMs(value: number | undefined);
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=broadcastControls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broadcastControls.d.ts","sourceRoot":"","sources":["../src/broadcastControls.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAE/F,cAAM,oBACL,YACC,IAAI,CACH,iBAAiB,GAAG;IAAE,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EACnE,yBAAyB,CACzB;IAEF,OAAO,CAAC,sBAAsB,CAAqB;gBAEhC,QAAQ,CAAC,EAAE,wBAAwB;IAItD,IAAW,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAEvD;IACD,IAAW,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAU3D;CACD;AAED;;;GAGG;AACH,qBAAa,wBACZ,SAAQ,oBACR,YAAW,iBAAiB;IAErB,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEjC,QAAQ,CAAC,EAAE,wBAAwB;CAItD;AAED;;;;;;GAMG;AACH,qBAAa,wBACZ,SAAQ,oBACR,YAAW,iBAAiB;IAIT,OAAO,CAAC,QAAQ,CAAC,+BAA+B;IAFnE,OAAO,CAAC,yBAAyB,CAAS;gBAEN,+BAA+B,EAAE,MAAM;IAK3E,IAAW,wBAAwB,IAAI,MAAM,CAE5C;IACD,IAAW,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAE5D;CACD"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
-
* Licensed under the MIT License.
|
|
5
|
-
*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.RequiredBroadcastControl = exports.OptionalBroadcastControl = void 0;
|
|
8
|
-
class ForcedRefreshControl {
|
|
9
|
-
constructor(settings) {
|
|
10
|
-
// this._forcedRefreshInterval = settings?.forcedRefreshIntervalMs;
|
|
11
|
-
}
|
|
12
|
-
get forcedRefreshIntervalMs() {
|
|
13
|
-
return this._forcedRefreshInterval;
|
|
14
|
-
}
|
|
15
|
-
set forcedRefreshIntervalMs(value) {
|
|
16
|
-
if (value === undefined) {
|
|
17
|
-
this._forcedRefreshInterval = undefined;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
this._forcedRefreshInterval = value >= 10 ? value : undefined;
|
|
21
|
-
if (value >= 10) {
|
|
22
|
-
// TODO: enable periodic forced refresh
|
|
23
|
-
throw new Error("Forced Refresh feature is not implemented");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Implements {@link BroadcastControls} for States Managers
|
|
30
|
-
* where returning `undefined` settings are allowed.
|
|
31
|
-
*/
|
|
32
|
-
class OptionalBroadcastControl extends ForcedRefreshControl {
|
|
33
|
-
constructor(settings) {
|
|
34
|
-
super(settings);
|
|
35
|
-
this.allowableUpdateLatencyMs = settings?.allowableUpdateLatencyMs;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.OptionalBroadcastControl = OptionalBroadcastControl;
|
|
39
|
-
/**
|
|
40
|
-
* Implements {@link BroadcastControls} but always provides defined value for
|
|
41
|
-
* {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}.
|
|
42
|
-
*
|
|
43
|
-
* If {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}
|
|
44
|
-
* is set to `undefined`, the default will be restored.
|
|
45
|
-
*/
|
|
46
|
-
class RequiredBroadcastControl extends ForcedRefreshControl {
|
|
47
|
-
constructor(defaultAllowableUpdateLatencyMs) {
|
|
48
|
-
super();
|
|
49
|
-
this.defaultAllowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;
|
|
50
|
-
this._allowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;
|
|
51
|
-
}
|
|
52
|
-
get allowableUpdateLatencyMs() {
|
|
53
|
-
return this._allowableUpdateLatencyMs;
|
|
54
|
-
}
|
|
55
|
-
set allowableUpdateLatencyMs(value) {
|
|
56
|
-
this._allowableUpdateLatencyMs = value ?? this.defaultAllowableUpdateLatencyMs;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.RequiredBroadcastControl = RequiredBroadcastControl;
|
|
60
|
-
//# sourceMappingURL=broadcastControls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"broadcastControls.js","sourceRoot":"","sources":["../src/broadcastControls.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,MAAM,oBAAoB;IASzB,YAAmB,QAAmC;QACrD,mEAAmE;IACpE,CAAC;IAED,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACpC,CAAC;IACD,IAAW,uBAAuB,CAAC,KAAyB;QAC3D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACzC,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,sBAAsB,GAAG,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;gBACjB,uCAAuC;gBACvC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC9D,CAAC;QACF,CAAC;IACF,CAAC;CACD;AAED;;;GAGG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAmB,QAAmC;QACrD,KAAK,CAAC,QAAQ,CAAC,CAAC;QAChB,IAAI,CAAC,wBAAwB,GAAG,QAAQ,EAAE,wBAAwB,CAAC;IACpE,CAAC;CACD;AAVD,4DAUC;AAED;;;;;;GAMG;AACH,MAAa,wBACZ,SAAQ,oBAAoB;IAK5B,YAAoC,+BAAuC;QAC1E,KAAK,EAAE,CAAC;QAD2B,oCAA+B,GAA/B,+BAA+B,CAAQ;QAE1E,IAAI,CAAC,yBAAyB,GAAG,+BAA+B,CAAC;IAClE,CAAC;IAED,IAAW,wBAAwB;QAClC,OAAO,IAAI,CAAC,yBAAyB,CAAC;IACvC,CAAC;IACD,IAAW,wBAAwB,CAAC,KAAyB;QAC5D,IAAI,CAAC,yBAAyB,GAAG,KAAK,IAAI,IAAI,CAAC,+BAA+B,CAAC;IAChF,CAAC;CACD;AAjBD,4DAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { BroadcastControls, BroadcastControlSettings } from \"./broadcastControlsTypes.js\";\n\nclass ForcedRefreshControl\n\timplements\n\t\tPick<\n\t\t\tBroadcastControls & { forcedRefreshIntervalMs: number | undefined },\n\t\t\t\"forcedRefreshIntervalMs\"\n\t\t>\n{\n\tprivate _forcedRefreshInterval: number | undefined;\n\n\tpublic constructor(settings?: BroadcastControlSettings) {\n\t\t// this._forcedRefreshInterval = settings?.forcedRefreshIntervalMs;\n\t}\n\n\tpublic get forcedRefreshIntervalMs(): number | undefined {\n\t\treturn this._forcedRefreshInterval;\n\t}\n\tpublic set forcedRefreshIntervalMs(value: number | undefined) {\n\t\tif (value === undefined) {\n\t\t\tthis._forcedRefreshInterval = undefined;\n\t\t} else {\n\t\t\tthis._forcedRefreshInterval = value >= 10 ? value : undefined;\n\t\t\tif (value >= 10) {\n\t\t\t\t// TODO: enable periodic forced refresh\n\t\t\t\tthrow new Error(\"Forced Refresh feature is not implemented\");\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Implements {@link BroadcastControls} for States Managers\n * where returning `undefined` settings are allowed.\n */\nexport class OptionalBroadcastControl\n\textends ForcedRefreshControl\n\timplements BroadcastControls\n{\n\tpublic allowableUpdateLatencyMs: number | undefined;\n\n\tpublic constructor(settings?: BroadcastControlSettings) {\n\t\tsuper(settings);\n\t\tthis.allowableUpdateLatencyMs = settings?.allowableUpdateLatencyMs;\n\t}\n}\n\n/**\n * Implements {@link BroadcastControls} but always provides defined value for\n * {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}.\n *\n * If {@link BroadcastControls.allowableUpdateLatencyMs | allowableUpdateLatencyMs}\n * is set to `undefined`, the default will be restored.\n */\nexport class RequiredBroadcastControl\n\textends ForcedRefreshControl\n\timplements BroadcastControls\n{\n\tprivate _allowableUpdateLatencyMs: number;\n\n\tpublic constructor(private readonly defaultAllowableUpdateLatencyMs: number) {\n\t\tsuper();\n\t\tthis._allowableUpdateLatencyMs = defaultAllowableUpdateLatencyMs;\n\t}\n\n\tpublic get allowableUpdateLatencyMs(): number {\n\t\treturn this._allowableUpdateLatencyMs;\n\t}\n\tpublic set allowableUpdateLatencyMs(value: number | undefined) {\n\t\tthis._allowableUpdateLatencyMs = value ?? this.defaultAllowableUpdateLatencyMs;\n\t}\n}\n"]}
|