@fluidframework/datastore 2.1.0-274160 → 2.1.0-276326
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/dataStoreRuntime.d.ts +5 -0
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js +27 -13
- package/dist/dataStoreRuntime.js.map +1 -1
- package/dist/fluidHandle.d.ts +1 -0
- package/dist/fluidHandle.d.ts.map +1 -1
- package/dist/fluidHandle.js +1 -0
- package/dist/fluidHandle.js.map +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/dataStoreRuntime.d.ts +5 -0
- package/lib/dataStoreRuntime.d.ts.map +1 -1
- package/lib/dataStoreRuntime.js +28 -14
- package/lib/dataStoreRuntime.js.map +1 -1
- package/lib/fluidHandle.d.ts +1 -0
- package/lib/fluidHandle.d.ts.map +1 -1
- package/lib/fluidHandle.js +1 -0
- package/lib/fluidHandle.js.map +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +16 -16
- package/src/dataStoreRuntime.ts +29 -15
- package/src/fluidHandle.ts +1 -0
- package/src/packageVersion.ts +1 -1
- /package/api-report/{datastore.alpha.api.md → datastore.legacy.alpha.api.md} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore",
|
|
3
|
-
"version": "2.1.0-
|
|
3
|
+
"version": "2.1.0-276326",
|
|
4
4
|
"description": "Fluid data store implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -67,29 +67,29 @@
|
|
|
67
67
|
"temp-directory": "nyc/.nyc_output"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@fluid-internal/client-utils": "2.1.0-
|
|
71
|
-
"@fluidframework/container-definitions": "2.1.0-
|
|
72
|
-
"@fluidframework/core-interfaces": "2.1.0-
|
|
73
|
-
"@fluidframework/core-utils": "2.1.0-
|
|
74
|
-
"@fluidframework/datastore-definitions": "2.1.0-
|
|
75
|
-
"@fluidframework/driver-definitions": "2.1.0-
|
|
76
|
-
"@fluidframework/driver-utils": "2.1.0-
|
|
77
|
-
"@fluidframework/id-compressor": "2.1.0-
|
|
78
|
-
"@fluidframework/runtime-definitions": "2.1.0-
|
|
79
|
-
"@fluidframework/runtime-utils": "2.1.0-
|
|
80
|
-
"@fluidframework/telemetry-utils": "2.1.0-
|
|
70
|
+
"@fluid-internal/client-utils": "2.1.0-276326",
|
|
71
|
+
"@fluidframework/container-definitions": "2.1.0-276326",
|
|
72
|
+
"@fluidframework/core-interfaces": "2.1.0-276326",
|
|
73
|
+
"@fluidframework/core-utils": "2.1.0-276326",
|
|
74
|
+
"@fluidframework/datastore-definitions": "2.1.0-276326",
|
|
75
|
+
"@fluidframework/driver-definitions": "2.1.0-276326",
|
|
76
|
+
"@fluidframework/driver-utils": "2.1.0-276326",
|
|
77
|
+
"@fluidframework/id-compressor": "2.1.0-276326",
|
|
78
|
+
"@fluidframework/runtime-definitions": "2.1.0-276326",
|
|
79
|
+
"@fluidframework/runtime-utils": "2.1.0-276326",
|
|
80
|
+
"@fluidframework/telemetry-utils": "2.1.0-276326",
|
|
81
81
|
"uuid": "^9.0.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
85
85
|
"@biomejs/biome": "^1.7.3",
|
|
86
|
-
"@fluid-internal/mocha-test-setup": "2.1.0-
|
|
86
|
+
"@fluid-internal/mocha-test-setup": "2.1.0-276326",
|
|
87
87
|
"@fluid-tools/build-cli": "^0.39.0",
|
|
88
88
|
"@fluidframework/build-common": "^2.0.3",
|
|
89
89
|
"@fluidframework/build-tools": "^0.39.0",
|
|
90
90
|
"@fluidframework/datastore-previous": "npm:@fluidframework/datastore@2.0.0-rc.5.0.0",
|
|
91
91
|
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
92
|
-
"@fluidframework/test-runtime-utils": "2.1.0-
|
|
92
|
+
"@fluidframework/test-runtime-utils": "2.1.0-276326",
|
|
93
93
|
"@microsoft/api-extractor": "^7.45.1",
|
|
94
94
|
"@types/lodash": "^4.14.118",
|
|
95
95
|
"@types/mocha": "^9.1.1",
|
|
@@ -113,8 +113,8 @@
|
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"api": "fluid-build . --task api",
|
|
116
|
-
"api-extractor:commonjs": "flub generate entrypoints --
|
|
117
|
-
"api-extractor:esnext": "flub generate entrypoints --
|
|
116
|
+
"api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
|
|
117
|
+
"api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
|
|
118
118
|
"build": "fluid-build . --task build",
|
|
119
119
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
120
120
|
"build:compile": "fluid-build . --task compile",
|
package/src/dataStoreRuntime.ts
CHANGED
|
@@ -64,13 +64,13 @@ import {
|
|
|
64
64
|
convertSummaryTreeToITree,
|
|
65
65
|
create404Response,
|
|
66
66
|
createResponseError,
|
|
67
|
-
encodeCompactIdToString,
|
|
68
67
|
exceptionToResponse,
|
|
69
68
|
generateHandleContextPath,
|
|
70
69
|
processAttachMessageGCData,
|
|
71
70
|
toFluidHandleInternal,
|
|
72
71
|
unpackChildNodesUsedRoutes,
|
|
73
72
|
toDeltaManagerErased,
|
|
73
|
+
encodeCompactIdToString,
|
|
74
74
|
} from "@fluidframework/runtime-utils/internal";
|
|
75
75
|
import {
|
|
76
76
|
ITelemetryLoggerExt,
|
|
@@ -96,6 +96,7 @@ import { pkgVersion } from "./packageVersion.js";
|
|
|
96
96
|
import { RemoteChannelContext } from "./remoteChannelContext.js";
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
+
* @legacy
|
|
99
100
|
* @alpha
|
|
100
101
|
*/
|
|
101
102
|
export enum DataStoreMessageType {
|
|
@@ -105,6 +106,7 @@ export enum DataStoreMessageType {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
/**
|
|
109
|
+
* @legacy
|
|
108
110
|
* @alpha
|
|
109
111
|
*/
|
|
110
112
|
export interface ISharedObjectRegistry {
|
|
@@ -115,6 +117,7 @@ export interface ISharedObjectRegistry {
|
|
|
115
117
|
|
|
116
118
|
/**
|
|
117
119
|
* Base data store class
|
|
120
|
+
* @legacy
|
|
118
121
|
* @alpha
|
|
119
122
|
*/
|
|
120
123
|
export class FluidDataStoreRuntime
|
|
@@ -439,21 +442,30 @@ export class FluidDataStoreRuntime
|
|
|
439
442
|
id = idArg;
|
|
440
443
|
this.validateChannelId(id);
|
|
441
444
|
} else {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
//
|
|
450
|
-
|
|
445
|
+
/**
|
|
446
|
+
* There is currently a bug where certain data store ids such as "[" are getting converted to ASCII characters
|
|
447
|
+
* in the snapshot.
|
|
448
|
+
* So, return short ids only if explicitly enabled via feature flags. Else, return uuid();
|
|
449
|
+
*/
|
|
450
|
+
if (this.mc.config.getBoolean("Fluid.Runtime.UseShortIds") === true) {
|
|
451
|
+
// We use three non-overlapping namespaces:
|
|
452
|
+
// - detached state: even numbers
|
|
453
|
+
// - attached state: odd numbers
|
|
454
|
+
// - uuids
|
|
455
|
+
// In first two cases we will encode result as strings in more compact form, with leading underscore,
|
|
456
|
+
// to ensure no overlap with user-provided DDS names (see validateChannelId())
|
|
457
|
+
if (this.visibilityState !== VisibilityState.GloballyVisible) {
|
|
458
|
+
// container is detached, only one client observes content, no way to hit collisions with other clients.
|
|
459
|
+
id = encodeCompactIdToString(2 * this.contexts.size, "_");
|
|
460
|
+
} else {
|
|
461
|
+
// Due to back-compat, we could not depend yet on generateDocumentUniqueId() being there.
|
|
462
|
+
// We can remove the need to leverage uuid() as fall-back in couple releases.
|
|
463
|
+
const res =
|
|
464
|
+
this.dataStoreContext.containerRuntime.generateDocumentUniqueId?.() ?? uuid();
|
|
465
|
+
id = typeof res === "number" ? encodeCompactIdToString(2 * res + 1, "_") : res;
|
|
466
|
+
}
|
|
451
467
|
} else {
|
|
452
|
-
|
|
453
|
-
// We can remove the need to leverage uuid() as fall-back in couple releases.
|
|
454
|
-
const res =
|
|
455
|
-
this.dataStoreContext.containerRuntime.generateDocumentUniqueId?.() ?? uuid();
|
|
456
|
-
id = typeof res === "number" ? encodeCompactIdToString(2 * res + 1, "_") : res;
|
|
468
|
+
id = uuid();
|
|
457
469
|
}
|
|
458
470
|
assert(!id.includes("/"), 0x8fc /* slash */);
|
|
459
471
|
}
|
|
@@ -1234,6 +1246,7 @@ export class FluidDataStoreRuntime
|
|
|
1234
1246
|
* Request handler is only called when data store can't resolve request, i.e. for custom requests.
|
|
1235
1247
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
1236
1248
|
* @param requestHandler - request handler to mix in
|
|
1249
|
+
* @legacy
|
|
1237
1250
|
* @alpha
|
|
1238
1251
|
*/
|
|
1239
1252
|
export const mixinRequestHandler = (
|
|
@@ -1255,6 +1268,7 @@ export const mixinRequestHandler = (
|
|
|
1255
1268
|
* @param handler - handler that returns info about blob to be added to summary.
|
|
1256
1269
|
* Or undefined not to add anything to summary.
|
|
1257
1270
|
* @param Base - base class, inherits from FluidDataStoreRuntime
|
|
1271
|
+
* @legacy
|
|
1258
1272
|
* @alpha
|
|
1259
1273
|
*/
|
|
1260
1274
|
export const mixinSummaryHandler = (
|
package/src/fluidHandle.ts
CHANGED
package/src/packageVersion.ts
CHANGED
|
File without changes
|