@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/package.json CHANGED
@@ -1,76 +1,66 @@
1
1
  {
2
- "name": "@fluidframework/runtime-definitions",
3
- "version": "2.0.0-internal.3.0.1",
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 eslint",
29
- "lint: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.0.1 <2.0.0-internal.4.0.0",
40
- "@fluidframework/core-interfaces": ">=2.0.0-internal.3.0.1 <2.0.0-internal.4.0.0",
41
- "@fluidframework/driver-definitions": ">=2.0.0-internal.3.0.1 <2.0.0-internal.4.0.0",
42
- "@fluidframework/protocol-definitions": "^1.1.0"
43
- },
44
- "devDependencies": {
45
- "@fluid-tools/build-cli": "^0.8.0",
46
- "@fluidframework/build-common": "^1.1.0",
47
- "@fluidframework/build-tools": "^0.8.0",
48
- "@fluidframework/eslint-config-fluid": "^2.0.0",
49
- "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.2.2.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.0.0",
61
- "baselineRange": ">=2.0.0-internal.2.0.0 <2.0.0-internal.3.0.0",
62
- "baselineVersion": "2.0.0-internal.2.1.1",
63
- "broken": {
64
- "RemovedVariableDeclaration_gcBlobKey": {
65
- "forwardCompat": false,
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
  }
@@ -4,5 +4,5 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- ...require("@fluidframework/build-common/prettier.config.cjs"),
7
+ ...require("@fluidframework/build-common/prettier.config.cjs"),
8
8
  };
@@ -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
+ }