@fluidframework/runtime-definitions 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/api-report/runtime-definitions.api.md +8 -12
  3. package/dist/dataStoreContext.d.ts +16 -21
  4. package/dist/dataStoreContext.d.ts.map +1 -1
  5. package/dist/dataStoreContext.js.map +1 -1
  6. package/dist/dataStoreFactory.d.ts +1 -1
  7. package/dist/dataStoreFactory.js.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/legacy.d.ts +56 -0
  12. package/dist/public.d.ts +19 -0
  13. package/dist/summary.d.ts +1 -1
  14. package/dist/summary.d.ts.map +1 -1
  15. package/dist/summary.js.map +1 -1
  16. package/internal.d.ts +11 -0
  17. package/legacy.d.ts +11 -0
  18. package/lib/dataStoreContext.d.ts +16 -21
  19. package/lib/dataStoreContext.d.ts.map +1 -1
  20. package/lib/dataStoreContext.js.map +1 -1
  21. package/lib/dataStoreFactory.d.ts +1 -1
  22. package/lib/dataStoreFactory.js.map +1 -1
  23. package/lib/index.d.ts +1 -1
  24. package/lib/index.d.ts.map +1 -1
  25. package/lib/index.js.map +1 -1
  26. package/lib/legacy.d.ts +56 -0
  27. package/lib/public.d.ts +19 -0
  28. package/lib/summary.d.ts +1 -1
  29. package/lib/summary.d.ts.map +1 -1
  30. package/lib/summary.js.map +1 -1
  31. package/package.json +33 -49
  32. package/src/dataStoreContext.ts +22 -28
  33. package/src/dataStoreFactory.ts +1 -1
  34. package/src/index.ts +0 -1
  35. package/src/summary.ts +3 -2
  36. package/api-extractor-cjs.json +0 -8
  37. package/dist/runtime-definitions-alpha.d.ts +0 -1025
  38. package/dist/runtime-definitions-beta.d.ts +0 -244
  39. package/dist/runtime-definitions-public.d.ts +0 -244
  40. package/dist/runtime-definitions-untrimmed.d.ts +0 -1106
  41. package/lib/runtime-definitions-alpha.d.ts +0 -1025
  42. package/lib/runtime-definitions-beta.d.ts +0 -244
  43. package/lib/runtime-definitions-public.d.ts +0 -244
  44. package/lib/runtime-definitions-untrimmed.d.ts +0 -1106
  45. /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "2.0.0-rc.2.0.1",
3
+ "version": "2.0.0-rc.3.0.0",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,31 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/index.d.ts",
19
- "default": "./lib/index.js"
20
- },
21
- "require": {
22
- "types": "./dist/index.d.ts",
23
- "default": "./dist/index.js"
24
- }
25
- },
26
- "./public": {
27
- "import": {
28
- "types": "./lib/runtime-definitions-public.d.ts",
18
+ "types": "./lib/public.d.ts",
29
19
  "default": "./lib/index.js"
30
20
  },
31
21
  "require": {
32
- "types": "./dist/runtime-definitions-public.d.ts",
22
+ "types": "./dist/public.d.ts",
33
23
  "default": "./dist/index.js"
34
24
  }
35
25
  },
36
- "./alpha": {
26
+ "./legacy": {
37
27
  "import": {
38
- "types": "./lib/runtime-definitions-alpha.d.ts",
28
+ "types": "./lib/legacy.d.ts",
39
29
  "default": "./lib/index.js"
40
30
  },
41
31
  "require": {
42
- "types": "./dist/runtime-definitions-alpha.d.ts",
32
+ "types": "./dist/legacy.d.ts",
43
33
  "default": "./dist/index.js"
44
34
  }
45
35
  },
@@ -54,21 +44,22 @@
54
44
  }
55
45
  }
56
46
  },
57
- "main": "dist/index.js",
58
- "types": "dist/index.d.ts",
47
+ "main": "lib/index.js",
48
+ "types": "lib/public.d.ts",
59
49
  "dependencies": {
60
- "@fluidframework/container-definitions": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
61
- "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
62
- "@fluidframework/driver-definitions": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
63
- "@fluidframework/id-compressor": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
50
+ "@fluidframework/container-definitions": ">=2.0.0-rc.3.0.0 <2.0.0-rc.3.1.0",
51
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.0 <2.0.0-rc.3.1.0",
52
+ "@fluidframework/driver-definitions": ">=2.0.0-rc.3.0.0 <2.0.0-rc.3.1.0",
53
+ "@fluidframework/id-compressor": ">=2.0.0-rc.3.0.0 <2.0.0-rc.3.1.0",
64
54
  "@fluidframework/protocol-definitions": "^3.2.0"
65
55
  },
66
56
  "devDependencies": {
67
- "@arethetypeswrong/cli": "^0.13.3",
68
- "@fluid-tools/build-cli": "^0.34.0",
57
+ "@arethetypeswrong/cli": "^0.15.2",
58
+ "@biomejs/biome": "^1.6.2",
59
+ "@fluid-tools/build-cli": "^0.37.0",
69
60
  "@fluidframework/build-common": "^2.0.3",
70
- "@fluidframework/build-tools": "^0.34.0",
71
- "@fluidframework/eslint-config-fluid": "^4.0.0",
61
+ "@fluidframework/build-tools": "^0.37.0",
62
+ "@fluidframework/eslint-config-fluid": "^5.1.0",
72
63
  "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.8.0.0",
73
64
  "@microsoft/api-extractor": "^7.42.3",
74
65
  "copyfiles": "^2.4.1",
@@ -78,18 +69,6 @@
78
69
  "rimraf": "^4.4.0",
79
70
  "typescript": "~5.1.6"
80
71
  },
81
- "fluidBuild": {
82
- "tasks": {
83
- "build:docs": {
84
- "dependsOn": [
85
- "...",
86
- "api-extractor:commonjs",
87
- "api-extractor:esnext"
88
- ],
89
- "script": false
90
- }
91
- }
92
- },
93
72
  "typeValidation": {
94
73
  "broken": {
95
74
  "InterfaceDeclaration_IFluidDataStoreContext": {
@@ -145,35 +124,40 @@
145
124
  "backCompat": false
146
125
  },
147
126
  "InterfaceDeclaration_IFluidDataStoreChannel": {
148
- "backCompat": false
127
+ "backCompat": false,
128
+ "forwardCompat": false
149
129
  },
150
130
  "InterfaceDeclaration_IContainerRuntimeBase": {
151
131
  "forwardCompat": false
132
+ },
133
+ "RemovedInterfaceDeclaration_IFluidDataStoreContextEvents": {
134
+ "forwardCompat": false,
135
+ "backCompat": false
152
136
  }
153
137
  }
154
138
  },
155
139
  "scripts": {
156
140
  "api": "fluid-build . --task api",
157
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
158
- "api-extractor:esnext": "api-extractor run --local",
141
+ "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist",
142
+ "api-extractor:esnext": "flub generate entrypoints --outFileAlpha legacy --outDir ./lib --node10TypeCompat",
159
143
  "build": "fluid-build . --task build",
160
144
  "build:compile": "fluid-build . --task compile",
161
- "build:docs": "fluid-build . --task api",
145
+ "build:docs": "api-extractor run --local",
162
146
  "build:esnext": "tsc --project ./tsconfig.json",
163
147
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
164
148
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
165
149
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
166
- "check:are-the-types-wrong": "attw --pack . --entrypoints .",
150
+ "check:are-the-types-wrong": "attw --pack .",
151
+ "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
167
152
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
168
153
  "ci:build:docs": "api-extractor run",
169
- "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
154
+ "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
170
155
  "eslint": "eslint --format stylish src",
171
156
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
172
- "format": "npm run prettier:fix",
173
- "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
174
- "lint:fix": "npm run prettier:fix && npm run eslint:fix",
175
- "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
176
- "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
157
+ "format": "fluid-build --task format .",
158
+ "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
159
+ "lint": "fluid-build . --task lint",
160
+ "lint:fix": "fluid-build . --task eslint:fix --task format",
177
161
  "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
178
162
  "typetests:gen": "fluid-type-test-generator",
179
163
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
@@ -3,19 +3,20 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import type { AttachState, IAudience, IDeltaManager } from "@fluidframework/container-definitions";
6
7
  import type {
8
+ FluidObject,
9
+ IDisposable,
7
10
  IEvent,
8
11
  IEventProvider,
9
- ITelemetryBaseLogger,
10
- IDisposable,
11
- IProvideFluidHandleContext,
12
12
  IFluidHandle,
13
+ IProvideFluidHandleContext,
13
14
  IRequest,
14
15
  IResponse,
15
- FluidObject,
16
+ ITelemetryBaseLogger,
16
17
  } from "@fluidframework/core-interfaces";
17
- import type { IAudience, IDeltaManager, AttachState } from "@fluidframework/container-definitions";
18
- import type { IDocumentStorageService } from "@fluidframework/driver-definitions";
18
+ import type { IDocumentStorageService } from "@fluidframework/driver-definitions/internal";
19
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
19
20
  import type {
20
21
  IClientDetails,
21
22
  IDocumentMessage,
@@ -23,7 +24,7 @@ import type {
23
24
  ISequencedDocumentMessage,
24
25
  ISnapshotTree,
25
26
  } from "@fluidframework/protocol-definitions";
26
- import type { IIdCompressor } from "@fluidframework/id-compressor";
27
+
27
28
  import type { IProvideFluidDataStoreFactory } from "./dataStoreFactory.js";
28
29
  import type { IProvideFluidDataStoreRegistry } from "./dataStoreRegistry.js";
29
30
  import type {
@@ -182,10 +183,10 @@ export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeB
182
183
  /**
183
184
  * Submits a container runtime level signal to be sent to other clients.
184
185
  * @param type - Type of the signal.
185
- * @param content - Content of the signal.
186
+ * @param content - Content of the signal. Should be a JSON serializable object or primitive.
186
187
  * @param targetClientId - When specified, the signal is only sent to the provided client id.
187
188
  */
188
- submitSignal(type: string, content: any, targetClientId?: string): void;
189
+ submitSignal: (type: string, content: unknown, targetClientId?: string) => void;
189
190
 
190
191
  /**
191
192
  * @deprecated 0.16 Issue #1537, #3631
@@ -364,6 +365,8 @@ export interface IFluidDataStoreChannel extends IDisposable {
364
365
  readonly entryPoint: IFluidHandle<FluidObject>;
365
366
 
366
367
  request(request: IRequest): Promise<IResponse>;
368
+
369
+ setAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;
367
370
  }
368
371
 
369
372
  /**
@@ -378,13 +381,6 @@ export type CreateChildSummarizerNodeFn = (
378
381
  getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
379
382
  ) => ISummarizerNodeWithGC;
380
383
 
381
- /**
382
- * @alpha
383
- */
384
- export interface IFluidDataStoreContextEvents extends IEvent {
385
- (event: "attaching" | "attached", listener: () => void);
386
- }
387
-
388
384
  /**
389
385
  * Represents the context for the data store like objects. It is used by the data store runtime to
390
386
  * get information and call functionality to its parent.
@@ -457,10 +453,10 @@ export interface IFluidParentContext
457
453
  /**
458
454
  * Submits the signal to be sent to other clients.
459
455
  * @param type - Type of the signal.
460
- * @param content - Content of the signal.
456
+ * @param content - Content of the signal. Should be a JSON serializable object or primitive.
461
457
  * @param targetClientId - When specified, the signal is only sent to the provided client id.
462
458
  */
463
- submitSignal(type: string, content: any, targetClientId?: string): void;
459
+ submitSignal: (type: string, content: unknown, targetClientId?: string) => void;
464
460
 
465
461
  /**
466
462
  * Called to make the data store locally visible in the container. This happens automatically for root data stores
@@ -489,7 +485,7 @@ export interface IFluidParentContext
489
485
  createParam: CreateChildSummarizerNodeParam,
490
486
  ): CreateChildSummarizerNodeFn;
491
487
 
492
- deleteChildSummarizerNode?(id: string): void;
488
+ deleteChildSummarizerNode(id: string): void;
493
489
 
494
490
  uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
495
491
 
@@ -508,6 +504,12 @@ export interface IFluidParentContext
508
504
  srcHandle: { absolutePath: string },
509
505
  outboundHandle: { absolutePath: string },
510
506
  ): void;
507
+
508
+ /**
509
+ * Called by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
510
+ * @param address - The address of the channel that is dirty.
511
+ */
512
+ setChannelDirty(address: string): void;
511
513
  }
512
514
 
513
515
  /**
@@ -515,9 +517,7 @@ export interface IFluidParentContext
515
517
  * get information and call functionality to the container.
516
518
  * @alpha
517
519
  */
518
- export interface IFluidDataStoreContext
519
- extends IEventProvider<IFluidDataStoreContextEvents>,
520
- IFluidParentContext {
520
+ export interface IFluidDataStoreContext extends IFluidParentContext {
521
521
  readonly id: string;
522
522
  /**
523
523
  * A data store created by a client, is a local data store for that client. Also, when a detached container loads
@@ -539,12 +539,6 @@ export interface IFluidDataStoreContext
539
539
  */
540
540
  readonly createProps?: any;
541
541
 
542
- /**
543
- * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.
544
- * @param address - The address of the channel that is dirty.
545
- */
546
- setChannelDirty(address: string): void;
547
-
548
542
  /**
549
543
  * @deprecated The functionality to get base GC details has been moved to summarizer node.
550
544
  *
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import type { IFluidDataStoreContext, IFluidDataStoreChannel } from "./dataStoreContext.js";
6
+ import type { IFluidDataStoreChannel, IFluidDataStoreContext } from "./dataStoreContext.js";
7
7
 
8
8
  /**
9
9
  * @alpha
package/src/index.ts CHANGED
@@ -20,7 +20,6 @@ export type {
20
20
  IFluidDataStoreContext,
21
21
  IFluidParentContext,
22
22
  IFluidDataStoreContextDetached,
23
- IFluidDataStoreContextEvents,
24
23
  } from "./dataStoreContext.js";
25
24
  export { FlushMode, FlushModeExperimental, VisibilityState } from "./dataStoreContext.js";
26
25
  export type { IProvideFluidDataStoreFactory } from "./dataStoreFactory.js";
package/src/summary.ts CHANGED
@@ -5,12 +5,13 @@
5
5
 
6
6
  import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
7
7
  import type {
8
- SummaryTree,
9
- ISummaryTree,
10
8
  ISequencedDocumentMessage,
11
9
  ISnapshotTree,
10
+ ISummaryTree,
12
11
  ITree,
12
+ SummaryTree,
13
13
  } from "@fluidframework/protocol-definitions";
14
+
14
15
  import type {
15
16
  IGarbageCollectionData,
16
17
  IGarbageCollectionDetailsBase,
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }