@supernova-studio/client 0.47.63 → 0.47.64

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": "@supernova-studio/client",
3
- "version": "0.47.63",
3
+ "version": "0.47.64",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -139,7 +139,7 @@ export class FrontendVersionRoomYDoc {
139
139
  }
140
140
 
141
141
  // Calculate draft
142
- const draftState = this.createDraftState(currentState, publishedState);
142
+ const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
143
143
  if (draftState) result.set(page.id, draftState);
144
144
  });
145
145
 
@@ -188,7 +188,7 @@ export class FrontendVersionRoomYDoc {
188
188
  }
189
189
 
190
190
  // Calculate draft
191
- const draftState = this.createDraftState(currentState, publishedState);
191
+ const draftState = this.createDraftState(group.persistentId, currentState, publishedState);
192
192
  if (draftState) result.set(group.id, draftState);
193
193
  });
194
194
 
@@ -208,6 +208,7 @@ export class FrontendVersionRoomYDoc {
208
208
  //
209
209
 
210
210
  private createDraftState(
211
+ itemPersistentId: string,
211
212
  currentState: ItemState,
212
213
  publishedState: ItemState | undefined
213
214
  ): DTODocumentationDraftState | undefined {
@@ -223,15 +224,27 @@ export class FrontendVersionRoomYDoc {
223
224
  };
224
225
 
225
226
  if (currentState.title !== publishedState.title) {
227
+ if (this.debug) {
228
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated title`);
229
+ }
230
+
226
231
  updatedDraftState.changes.previousTitle = publishedState.title;
227
232
  }
228
233
 
229
234
  if (!deepEqual(currentState.configuration, publishedState.configuration)) {
235
+ if (this.debug) {
236
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated configuration`);
237
+ }
238
+
230
239
  const configurationDto = documentationItemConfigurationToDTOV2(publishedState.configuration);
231
240
  updatedDraftState.changes.previousConfiguration = configurationDto;
232
241
  }
233
242
 
234
243
  if (currentState.contentHash !== publishedState.contentHash) {
244
+ if (this.debug) {
245
+ console.log(`Item ${itemPersistentId} (${currentState.title}): updated content hash`);
246
+ }
247
+
235
248
  updatedDraftState.changes.previousContentHash = publishedState.contentHash;
236
249
  }
237
250