@superdoc-dev/cli 0.2.0-next.79 → 0.2.0-next.80

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 (2) hide show
  1. package/dist/index.js +5 -2
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -371652,7 +371652,8 @@ class InMemorySessionPool {
371652
371652
  if (!session)
371653
371653
  return;
371654
371654
  this.clearAutosaveTimer(session);
371655
- if (session.dirty && !options2?.discard) {
371655
+ const shouldCheckpoint = !options2?.discard && (session.dirty || session.sessionType === "collab");
371656
+ if (shouldCheckpoint) {
371656
371657
  await this.checkpointUnsafe(sessionId);
371657
371658
  }
371658
371659
  await this.destroySession(session);
@@ -371712,7 +371713,9 @@ class InMemorySessionPool {
371712
371713
  }
371713
371714
  async checkpointUnsafe(sessionId) {
371714
371715
  const session = this.sessions.get(sessionId);
371715
- if (!session?.dirty)
371716
+ if (!session)
371717
+ return;
371718
+ if (!session.dirty && session.sessionType !== "collab")
371716
371719
  return;
371717
371720
  if (session.sessionType === "collab") {
371718
371721
  await this.checkpointCollabSession(session);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.2.0-next.79",
3
+ "version": "0.2.0-next.80",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -21,20 +21,20 @@
21
21
  "@types/node": "22.19.2",
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
- "@superdoc/pm-adapter": "0.0.0",
24
+ "superdoc": "1.17.0",
25
25
  "@superdoc/super-editor": "0.0.1",
26
- "superdoc": "1.17.0"
26
+ "@superdoc/pm-adapter": "0.0.0"
27
27
  },
28
28
  "module": "src/index.ts",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.79",
34
- "@superdoc-dev/cli-darwin-x64": "0.2.0-next.79",
35
- "@superdoc-dev/cli-linux-x64": "0.2.0-next.79",
36
- "@superdoc-dev/cli-windows-x64": "0.2.0-next.79",
37
- "@superdoc-dev/cli-linux-arm64": "0.2.0-next.79"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.2.0-next.80",
34
+ "@superdoc-dev/cli-darwin-x64": "0.2.0-next.80",
35
+ "@superdoc-dev/cli-linux-arm64": "0.2.0-next.80",
36
+ "@superdoc-dev/cli-linux-x64": "0.2.0-next.80",
37
+ "@superdoc-dev/cli-windows-x64": "0.2.0-next.80"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "bun run src/index.ts",