@fluidframework/runtime-definitions 2.0.0-internal.3.0.1 → 2.0.0-internal.3.1.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/.eslintrc.js +5 -7
- package/README.md +6 -6
- package/api-extractor.json +2 -2
- package/dist/attribution.d.ts +66 -0
- package/dist/attribution.d.ts.map +1 -0
- package/dist/attribution.js +7 -0
- package/dist/attribution.js.map +1 -0
- package/dist/dataStoreContext.d.ts +3 -3
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/garbageCollection.d.ts.map +1 -1
- package/dist/garbageCollection.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/package.json +64 -74
- package/prettier.config.cjs +1 -1
- package/src/attribution.ts +72 -0
- package/src/dataStoreContext.ts +405 -407
- package/src/dataStoreFactory.ts +14 -11
- package/src/dataStoreRegistry.ts +8 -6
- package/src/garbageCollection.ts +12 -12
- package/src/index.ts +21 -9
- package/src/protocol.ts +39 -38
- package/src/summary.ts +210 -211
- package/tsconfig.json +8 -12
package/package.json
CHANGED
|
@@ -1,76 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"backCompat": false
|
|
67
|
-
},
|
|
68
|
-
"InterfaceDeclaration_IFluidDataStoreContext": {
|
|
69
|
-
"forwardCompat": false
|
|
70
|
-
},
|
|
71
|
-
"InterfaceDeclaration_IFluidDataStoreContextDetached": {
|
|
72
|
-
"forwardCompat": false
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
2
|
+
"name": "@fluidframework/runtime-definitions",
|
|
3
|
+
"version": "2.0.0-internal.3.1.0",
|
|
4
|
+
"description": "Fluid Runtime definitions",
|
|
5
|
+
"homepage": "https://fluidframework.com",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/microsoft/FluidFramework.git",
|
|
9
|
+
"directory": "packages/runtime/runtime-definitions"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "Microsoft and contributors",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "concurrently npm:build:compile npm:lint && npm run build:docs",
|
|
18
|
+
"build:compile": "npm run tsc && npm run typetests:gen && npm run build:test",
|
|
19
|
+
"build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
|
|
20
|
+
"build:full": "npm run build",
|
|
21
|
+
"build:full:compile": "npm run build:compile",
|
|
22
|
+
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
23
|
+
"ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
|
|
24
|
+
"clean": "rimraf dist *.tsbuildinfo *.build.log",
|
|
25
|
+
"eslint": "eslint --format stylish src",
|
|
26
|
+
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
27
|
+
"format": "npm run prettier:fix",
|
|
28
|
+
"lint": "npm run prettier && npm run eslint",
|
|
29
|
+
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
30
|
+
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
31
|
+
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
32
|
+
"tsc": "tsc",
|
|
33
|
+
"typetests:gen": "flub generate typetests --generate --dir .",
|
|
34
|
+
"typetests:prepare": "flub generate typetests --prepare --dir . --pin"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@fluidframework/common-definitions": "^0.20.1",
|
|
38
|
+
"@fluidframework/common-utils": "^1.0.0",
|
|
39
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.3.1.0 <2.0.0-internal.4.0.0",
|
|
40
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.3.1.0 <2.0.0-internal.4.0.0",
|
|
41
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.3.1.0 <2.0.0-internal.4.0.0",
|
|
42
|
+
"@fluidframework/protocol-definitions": "^1.1.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@fluid-tools/build-cli": "^0.9.0",
|
|
46
|
+
"@fluidframework/build-common": "^1.1.0",
|
|
47
|
+
"@fluidframework/build-tools": "^0.9.0",
|
|
48
|
+
"@fluidframework/eslint-config-fluid": "^2.0.0",
|
|
49
|
+
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.3.0.0",
|
|
50
|
+
"@microsoft/api-extractor": "^7.22.2",
|
|
51
|
+
"@rushstack/eslint-config": "^2.5.1",
|
|
52
|
+
"concurrently": "^6.2.0",
|
|
53
|
+
"copyfiles": "^2.4.1",
|
|
54
|
+
"eslint": "~8.6.0",
|
|
55
|
+
"prettier": "~2.6.2",
|
|
56
|
+
"rimraf": "^2.6.2",
|
|
57
|
+
"typescript": "~4.5.5"
|
|
58
|
+
},
|
|
59
|
+
"typeValidation": {
|
|
60
|
+
"version": "2.0.0-internal.3.1.0",
|
|
61
|
+
"previousVersionStyle": "~previousMinor",
|
|
62
|
+
"baselineRange": ">=2.0.0-internal.3.0.0 <2.0.0-internal.3.1.0",
|
|
63
|
+
"baselineVersion": "2.0.0-internal.3.0.0",
|
|
64
|
+
"broken": {}
|
|
65
|
+
}
|
|
76
66
|
}
|
package/prettier.config.cjs
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { IUser } from "@fluidframework/protocol-definitions";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* AttributionKey representing a reference to some op in the op stream.
|
|
10
|
+
* Content associated with this key aligns with content modified by that op.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
*/
|
|
14
|
+
export interface OpAttributionKey {
|
|
15
|
+
/**
|
|
16
|
+
* The type of attribution this key corresponds to.
|
|
17
|
+
*
|
|
18
|
+
* Keys currently all represent op-based attribution, so have the form `{ type: "op", key: sequenceNumber }`.
|
|
19
|
+
* Thus, they can be used with an `OpStreamAttributor` to recover timestamp/user information.
|
|
20
|
+
*/
|
|
21
|
+
type: "op";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The sequenceNumber of the op this attribution key is for.
|
|
25
|
+
*/
|
|
26
|
+
seq: number;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* AttributionKey associated with content that was inserted while the container was in a detached state.
|
|
31
|
+
*
|
|
32
|
+
* @remarks - Retrieving an {@link AttributionInfo} from content associated with detached attribution keys
|
|
33
|
+
* is currently unsupported, as applications can effectively modify content anonymously while detached.
|
|
34
|
+
* The runtime has no mechanism for reliably obtaining the user. It would be reasonable to start supporting
|
|
35
|
+
* this functionality if the host provided additional context to their attributor or attach calls.
|
|
36
|
+
*
|
|
37
|
+
* @alpha
|
|
38
|
+
*/
|
|
39
|
+
export interface DetachedAttributionKey {
|
|
40
|
+
type: "detached";
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Arbitrary discriminator associated with content inserted while detached.
|
|
44
|
+
*
|
|
45
|
+
* @remarks - For now, the runtime assumes all content created while detached is associated
|
|
46
|
+
* with the same user/timestamp.
|
|
47
|
+
* We could weaken this assumption in the future with further API support and
|
|
48
|
+
* allow arbitrary strings or numbers as part of this key.
|
|
49
|
+
*/
|
|
50
|
+
id: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Can be indexed into the ContainerRuntime in order to retrieve {@link AttributionInfo}.
|
|
55
|
+
* @alpha
|
|
56
|
+
*/
|
|
57
|
+
export type AttributionKey = OpAttributionKey | DetachedAttributionKey;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Attribution information associated with a change.
|
|
61
|
+
* @alpha
|
|
62
|
+
*/
|
|
63
|
+
export interface AttributionInfo {
|
|
64
|
+
/**
|
|
65
|
+
* The user that performed the change.
|
|
66
|
+
*/
|
|
67
|
+
user: IUser;
|
|
68
|
+
/**
|
|
69
|
+
* When the change happened.
|
|
70
|
+
*/
|
|
71
|
+
timestamp: number;
|
|
72
|
+
}
|