document-drive 1.0.0-experimental.23 → 1.0.0-experimental.25

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,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "1.0.0-experimental.23",
3
+ "version": "1.0.0-experimental.25",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -65,7 +65,7 @@
65
65
  "@typescript-eslint/eslint-plugin": "^6.21.0",
66
66
  "@typescript-eslint/parser": "^6.21.0",
67
67
  "@vitest/coverage-v8": "^1.4.0",
68
- "document-model": "1.1.0-experimental.5",
68
+ "document-model": "1.1.0-experimental.6",
69
69
  "document-model-libs": "1.55.1-experimental",
70
70
  "eslint": "^8.57.0",
71
71
  "eslint-config-prettier": "^9.1.0",
@@ -789,7 +789,8 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
789
789
  }
790
790
 
791
791
  const operationSignals: (() => Promise<SignalResult>)[] = [];
792
- const reducer = (document.documentType === "powerhouse/document-drive") ? utils.unsafeReducer as Reducer<unknown, Action, unknown> : documentModel.reducer;
792
+ const reducer = (document.documentType === "powerhouse/document-drive")
793
+ ? utils.unsafeReducer as Reducer<unknown, Action, unknown> : documentModel.reducer;
793
794
  newDocument = reducer(
794
795
  newDocument,
795
796
  operation,
@@ -1247,7 +1248,9 @@ export class DocumentDriveServer extends BaseDocumentDriveServer {
1247
1248
  actions: (T | BaseAction)[]
1248
1249
  ): Operation<T | BaseAction>[] {
1249
1250
  const operations: Operation<T | BaseAction>[] = [];
1250
- const { reducer } = this._getDocumentModel(document.documentType);
1251
+ const documentModel = this._getDocumentModel(document.documentType);
1252
+ const reducer = (document.documentType === "powerhouse/document-drive")
1253
+ ? utils.unsafeReducer as Reducer<unknown, Action, unknown> : documentModel.reducer;
1251
1254
  for (const action of actions) {
1252
1255
  document = reducer(document, action);
1253
1256
  const operation = document.operations[action.scope].slice().pop();