@fluidframework/file-driver 2.0.0-rc.1.0.3 → 2.0.0-rc.2.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.
- package/{.eslintrc.js → .eslintrc.cjs} +4 -1
- package/CHANGELOG.md +20 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -2
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/file-driver.api.md +4 -2
- package/dist/file-driver-alpha.d.ts +2 -0
- package/dist/file-driver-beta.d.ts +2 -0
- package/dist/file-driver-public.d.ts +2 -0
- package/dist/file-driver-untrimmed.d.ts +4 -2
- package/dist/fileDocumentDeltaConnection.d.ts +1 -1
- package/dist/fileDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/fileDocumentDeltaConnection.js.map +1 -1
- package/dist/fileDocumentService.d.ts +3 -2
- package/dist/fileDocumentService.d.ts.map +1 -1
- package/dist/fileDocumentService.js +3 -1
- package/dist/fileDocumentService.js.map +1 -1
- package/dist/fileDocumentServiceFactory.d.ts +1 -1
- package/dist/fileDocumentServiceFactory.d.ts.map +1 -1
- package/dist/fileDocumentServiceFactory.js +2 -2
- package/dist/fileDocumentServiceFactory.js.map +1 -1
- package/dist/fileDocumentStorageService.d.ts +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/file-driver-alpha.d.ts +53 -0
- package/lib/file-driver-beta.d.ts +71 -0
- package/lib/file-driver-public.d.ts +71 -0
- package/lib/file-driver-untrimmed.d.ts +211 -0
- package/lib/fileDeltaStorageService.d.ts +26 -0
- package/lib/fileDeltaStorageService.d.ts.map +1 -0
- package/lib/fileDeltaStorageService.js +59 -0
- package/lib/fileDeltaStorageService.js.map +1 -0
- package/lib/fileDocumentDeltaConnection.d.ts +61 -0
- package/lib/fileDocumentDeltaConnection.d.ts.map +1 -0
- package/lib/fileDocumentDeltaConnection.js +161 -0
- package/lib/fileDocumentDeltaConnection.js.map +1 -0
- package/lib/fileDocumentService.d.ts +31 -0
- package/lib/fileDocumentService.d.ts.map +1 -0
- package/lib/fileDocumentService.js +37 -0
- package/lib/fileDocumentService.js.map +1 -0
- package/lib/fileDocumentServiceFactory.d.ts +28 -0
- package/lib/fileDocumentServiceFactory.d.ts.map +1 -0
- package/lib/fileDocumentServiceFactory.js +31 -0
- package/lib/fileDocumentServiceFactory.js.map +1 -0
- package/lib/fileDocumentStorageService.d.ts +91 -0
- package/lib/fileDocumentStorageService.d.ts.map +1 -0
- package/lib/fileDocumentStorageService.js +197 -0
- package/lib/fileDocumentStorageService.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/test/types/validateFileDriverPrevious.generated.d.ts +2 -0
- package/lib/test/types/validateFileDriverPrevious.generated.d.ts.map +1 -0
- package/lib/test/types/validateFileDriverPrevious.generated.js +26 -0
- package/lib/test/types/validateFileDriverPrevious.generated.js.map +1 -0
- package/package.json +61 -19
- package/src/fileDocumentDeltaConnection.ts +1 -1
- package/src/fileDocumentService.ts +9 -3
- package/src/fileDocumentServiceFactory.ts +2 -2
- package/src/index.ts +4 -4
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/file-driver",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2.0.0",
|
|
4
4
|
"description": "A driver that reads/write from/to local file storage.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -11,29 +11,61 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
-
"type": "
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
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/file-driver-public.d.ts",
|
|
29
|
+
"default": "./lib/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/file-driver-public.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./internal": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./lib/index.d.ts",
|
|
39
|
+
"default": "./lib/index.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"default": "./dist/index.js"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
15
47
|
"main": "dist/index.js",
|
|
16
48
|
"types": "dist/index.d.ts",
|
|
17
49
|
"dependencies": {
|
|
18
|
-
"@fluid-internal/client-utils": ">=2.0.0-rc.
|
|
19
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.
|
|
20
|
-
"@fluidframework/core-utils": ">=2.0.0-rc.
|
|
21
|
-
"@fluidframework/driver-definitions": ">=2.0.0-rc.
|
|
22
|
-
"@fluidframework/driver-utils": ">=2.0.0-rc.
|
|
23
|
-
"@fluidframework/protocol-definitions": "^3.
|
|
24
|
-
"@fluidframework/replay-driver": ">=2.0.0-rc.
|
|
50
|
+
"@fluid-internal/client-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
51
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
52
|
+
"@fluidframework/core-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
53
|
+
"@fluidframework/driver-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
54
|
+
"@fluidframework/driver-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
55
|
+
"@fluidframework/protocol-definitions": "^3.2.0",
|
|
56
|
+
"@fluidframework/replay-driver": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0"
|
|
25
57
|
},
|
|
26
58
|
"devDependencies": {
|
|
27
59
|
"@arethetypeswrong/cli": "^0.13.3",
|
|
28
|
-
"@fluid-tools/build-cli": "^0.
|
|
60
|
+
"@fluid-tools/build-cli": "^0.34.0",
|
|
29
61
|
"@fluidframework/build-common": "^2.0.3",
|
|
30
|
-
"@fluidframework/build-tools": "^0.
|
|
31
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
62
|
+
"@fluidframework/build-tools": "^0.34.0",
|
|
63
|
+
"@fluidframework/eslint-config-fluid": "^4.0.0",
|
|
32
64
|
"@fluidframework/file-driver-previous": "npm:@fluidframework/file-driver@2.0.0-internal.8.0.0",
|
|
33
|
-
"@microsoft/api-extractor": "^7.
|
|
65
|
+
"@microsoft/api-extractor": "^7.42.3",
|
|
34
66
|
"@types/node": "^18.19.0",
|
|
35
67
|
"copyfiles": "^2.4.1",
|
|
36
|
-
"eslint": "~8.
|
|
68
|
+
"eslint": "~8.55.0",
|
|
37
69
|
"prettier": "~3.0.3",
|
|
38
70
|
"rimraf": "^4.4.0",
|
|
39
71
|
"typescript": "~5.1.6"
|
|
@@ -43,7 +75,8 @@
|
|
|
43
75
|
"build:docs": {
|
|
44
76
|
"dependsOn": [
|
|
45
77
|
"...",
|
|
46
|
-
"api-extractor:commonjs"
|
|
78
|
+
"api-extractor:commonjs",
|
|
79
|
+
"api-extractor:esnext"
|
|
47
80
|
],
|
|
48
81
|
"script": false
|
|
49
82
|
},
|
|
@@ -54,15 +87,24 @@
|
|
|
54
87
|
}
|
|
55
88
|
},
|
|
56
89
|
"typeValidation": {
|
|
57
|
-
"broken": {
|
|
90
|
+
"broken": {
|
|
91
|
+
"ClassDeclaration_FluidFetchReader": {
|
|
92
|
+
"backCompat": false
|
|
93
|
+
},
|
|
94
|
+
"InterfaceDeclaration_ISnapshotWriterStorage": {
|
|
95
|
+
"backCompat": false
|
|
96
|
+
}
|
|
97
|
+
}
|
|
58
98
|
},
|
|
59
99
|
"scripts": {
|
|
60
100
|
"api": "fluid-build . --task api",
|
|
61
|
-
"api-extractor:commonjs": "api-extractor run --
|
|
101
|
+
"api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
|
|
102
|
+
"api-extractor:esnext": "api-extractor run --local",
|
|
62
103
|
"build": "fluid-build . --task build",
|
|
63
104
|
"build:compile": "fluid-build . --task compile",
|
|
64
105
|
"build:docs": "fluid-build . --task api",
|
|
65
|
-
"
|
|
106
|
+
"build:esnext": "tsc --project ./tsconfig.json",
|
|
107
|
+
"check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
|
66
108
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
67
109
|
"ci:build:docs": "api-extractor run",
|
|
68
110
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
@@ -73,7 +115,7 @@
|
|
|
73
115
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
74
116
|
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
75
117
|
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
76
|
-
"tsc": "tsc",
|
|
118
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
77
119
|
"typetests:gen": "fluid-type-test-generator",
|
|
78
120
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
79
121
|
}
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
ScopeType,
|
|
21
21
|
} from "@fluidframework/protocol-definitions";
|
|
22
22
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
23
|
-
import { FileDeltaStorageService } from "./fileDeltaStorageService";
|
|
23
|
+
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
24
24
|
|
|
25
25
|
const MaxBatchDeltas = 2000;
|
|
26
26
|
|
|
@@ -3,22 +3,28 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
7
|
import * as api from "@fluidframework/driver-definitions";
|
|
7
8
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { FileDeltaStorageService } from "./fileDeltaStorageService";
|
|
9
|
+
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* The DocumentService manages the different endpoints for connecting to
|
|
12
13
|
* underlying storage for file document service.
|
|
13
14
|
*/
|
|
14
15
|
// eslint-disable-next-line import/namespace
|
|
15
|
-
export class FileDocumentService
|
|
16
|
+
export class FileDocumentService
|
|
17
|
+
extends TypedEventEmitter<api.IDocumentServiceEvents>
|
|
18
|
+
implements api.IDocumentService
|
|
19
|
+
{
|
|
16
20
|
constructor(
|
|
17
21
|
public readonly resolvedUrl: api.IResolvedUrl,
|
|
18
22
|
private readonly storage: api.IDocumentStorageService,
|
|
19
23
|
private readonly deltaStorage: FileDeltaStorageService,
|
|
20
24
|
private readonly deltaConnection: api.IDocumentDeltaConnection,
|
|
21
|
-
) {
|
|
25
|
+
) {
|
|
26
|
+
super();
|
|
27
|
+
}
|
|
22
28
|
|
|
23
29
|
public dispose() {}
|
|
24
30
|
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
} from "@fluidframework/driver-definitions";
|
|
13
13
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
14
14
|
import { ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
15
|
-
import { FileDeltaStorageService } from "./fileDeltaStorageService";
|
|
16
|
-
import { FileDocumentService } from "./fileDocumentService";
|
|
15
|
+
import { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
16
|
+
import { FileDocumentService } from "./fileDocumentService.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Factory for creating the file document service. Use this if you want to
|
package/src/index.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { FileDeltaStorageService } from "./fileDeltaStorageService";
|
|
7
|
-
export { FileDocumentServiceFactory } from "./fileDocumentServiceFactory";
|
|
8
|
-
export { Replayer, ReplayFileDeltaConnection } from "./fileDocumentDeltaConnection";
|
|
6
|
+
export { FileDeltaStorageService } from "./fileDeltaStorageService.js";
|
|
7
|
+
export { FileDocumentServiceFactory } from "./fileDocumentServiceFactory.js";
|
|
8
|
+
export { Replayer, ReplayFileDeltaConnection } from "./fileDocumentDeltaConnection.js";
|
|
9
9
|
export {
|
|
10
10
|
FileSnapshotWriterClassFactory,
|
|
11
11
|
FileStorageDocumentName,
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
FluidFetchReaderFileSnapshotWriter,
|
|
14
14
|
ISnapshotWriterStorage,
|
|
15
15
|
ReaderConstructor,
|
|
16
|
-
} from "./fileDocumentStorageService";
|
|
16
|
+
} from "./fileDocumentStorageService.js";
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends":
|
|
3
|
-
"../../../common/build/build-common/tsconfig.base.json",
|
|
4
|
-
"../../../common/build/build-common/tsconfig.cjs.json",
|
|
5
|
-
],
|
|
2
|
+
"extends": "../../../common/build/build-common/tsconfig.node16.json",
|
|
6
3
|
"include": ["src/**/*"],
|
|
7
4
|
"exclude": ["dist", "node_modules"],
|
|
8
5
|
"compilerOptions": {
|
|
9
6
|
"rootDir": "./src",
|
|
10
|
-
"outDir": "./
|
|
7
|
+
"outDir": "./lib",
|
|
11
8
|
"types": ["node"],
|
|
12
9
|
"noUnusedLocals": false,
|
|
13
10
|
},
|