document-drive 1.0.0-alpha.43 → 1.0.0-alpha.44
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 +5 -5
- package/src/server/index.ts +6 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "document-drive",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.44",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./src/index.ts",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"test:watch": "vitest watch"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"document-model": "^1.0.
|
|
36
|
-
"document-model-libs": "^1.
|
|
35
|
+
"document-model": "^1.0.52",
|
|
36
|
+
"document-model-libs": "^1.36.0"
|
|
37
37
|
},
|
|
38
38
|
"optionalDependencies": {
|
|
39
39
|
"@prisma/client": "5.11.0",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
61
61
|
"@typescript-eslint/parser": "^6.21.0",
|
|
62
62
|
"@vitest/coverage-v8": "^1.4.0",
|
|
63
|
-
"document-model": "^1.0.
|
|
64
|
-
"document-model-libs": "^1.
|
|
63
|
+
"document-model": "^1.0.52",
|
|
64
|
+
"document-model-libs": "^1.36.0",
|
|
65
65
|
"eslint": "^8.57.0",
|
|
66
66
|
"eslint-config-prettier": "^9.1.0",
|
|
67
67
|
"fake-indexeddb": "^5.0.2",
|
package/src/server/index.ts
CHANGED
|
@@ -855,6 +855,10 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
855
855
|
};
|
|
856
856
|
});
|
|
857
857
|
|
|
858
|
+
if (document) {
|
|
859
|
+
this.cache.setDocument(drive, id, document).catch(logger.error);
|
|
860
|
+
}
|
|
861
|
+
|
|
858
862
|
// gets all the different scopes and branches combinations from the operations
|
|
859
863
|
const { scopes, branches } = [
|
|
860
864
|
...operationsApplied,
|
|
@@ -903,12 +907,6 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
903
907
|
throw error;
|
|
904
908
|
}
|
|
905
909
|
|
|
906
|
-
if (document) {
|
|
907
|
-
this.cache.setDocument(drive, id, document).catch(logger.error);
|
|
908
|
-
} else {
|
|
909
|
-
logger.warn("Successfully applied operations but no document returned");
|
|
910
|
-
}
|
|
911
|
-
|
|
912
910
|
return {
|
|
913
911
|
status: 'SUCCESS',
|
|
914
912
|
document,
|
|
@@ -1013,6 +1011,8 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
1013
1011
|
throw error ?? new Error('Invalid Document Drive document');
|
|
1014
1012
|
}
|
|
1015
1013
|
|
|
1014
|
+
this.cache.setDocument("drives", drive, document).catch(logger.error);
|
|
1015
|
+
|
|
1016
1016
|
for (const operation of operationsApplied) {
|
|
1017
1017
|
switch (operation.type) {
|
|
1018
1018
|
case 'ADD_LISTENER': {
|
|
@@ -1077,12 +1077,6 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
|
|
|
1077
1077
|
throw error;
|
|
1078
1078
|
}
|
|
1079
1079
|
|
|
1080
|
-
if (document) {
|
|
1081
|
-
this.cache.setDocument("drives", drive, document).catch(logger.error);;
|
|
1082
|
-
} else {
|
|
1083
|
-
logger.warn("Successfully applied operations but no drive returned");
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
1080
|
return {
|
|
1087
1081
|
status: 'SUCCESS',
|
|
1088
1082
|
document,
|