@dabble/patches 0.8.3 → 0.8.5
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.
|
@@ -187,6 +187,7 @@ class PatchesREST {
|
|
|
187
187
|
const hasBody = init?.body !== void 0;
|
|
188
188
|
const response = await globalThis.fetch(`${this._url}${path}`, {
|
|
189
189
|
method,
|
|
190
|
+
credentials: "include",
|
|
190
191
|
headers: {
|
|
191
192
|
...hasBody ? { "Content-Type": "application/json" } : {},
|
|
192
193
|
...headers
|
|
@@ -52,6 +52,7 @@ class SSEServer {
|
|
|
52
52
|
}
|
|
53
53
|
const { readable, writable } = new TransformStream();
|
|
54
54
|
client.writer = writable.getWriter();
|
|
55
|
+
client.writer.write(client.encoder.encode(": connected\n\n"));
|
|
55
56
|
if (lastEventId) {
|
|
56
57
|
const lastId = parseInt(lastEventId, 10);
|
|
57
58
|
if (isNaN(lastId)) {
|
|
@@ -5,10 +5,10 @@ import { LWWServer } from './LWWServer.js';
|
|
|
5
5
|
import { LWWStoreBackend, BranchingStoreBackend } from './types.js';
|
|
6
6
|
import 'easy-signal';
|
|
7
7
|
import '../net/websocket/AuthorizationProvider.js';
|
|
8
|
-
import '../
|
|
8
|
+
import '../net/protocol/types.js';
|
|
9
9
|
import '../json-patch/JSONPatch.js';
|
|
10
10
|
import '@dabble/delta';
|
|
11
|
-
import '../
|
|
11
|
+
import '../json-patch/types.js';
|
|
12
12
|
import './PatchesServer.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -4,10 +4,10 @@ import { Change, CommitChangesOptions, DeleteDocOptions, ChangeInput, ChangeMuta
|
|
|
4
4
|
import { PatchesServer } from './PatchesServer.js';
|
|
5
5
|
import { LWWStoreBackend } from './types.js';
|
|
6
6
|
import '../net/websocket/AuthorizationProvider.js';
|
|
7
|
-
import '../
|
|
7
|
+
import '../net/protocol/types.js';
|
|
8
8
|
import '../json-patch/JSONPatch.js';
|
|
9
9
|
import '@dabble/delta';
|
|
10
|
-
import '../
|
|
10
|
+
import '../json-patch/types.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Configuration options for LWWServer.
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSONPatchOp } from '../json-patch/types.js';
|
|
2
|
-
import {
|
|
2
|
+
import { VersionMetadata, Change, ListVersionsOptions, EditableVersionMetadata, ListChangesOptions, DocumentTombstone, Branch } from '../types.js';
|
|
3
3
|
import '../json-patch/JSONPatch.js';
|
|
4
4
|
import '@dabble/delta';
|
|
5
5
|
|
package/dist/types.d.ts
CHANGED
|
@@ -141,6 +141,8 @@ interface VersionMetadata {
|
|
|
141
141
|
isOffline?: boolean;
|
|
142
142
|
/** User-defined name if origin is 'branch'. */
|
|
143
143
|
branchName?: string;
|
|
144
|
+
/** Whether this version was auto-saved immediately before restoring a previous version. */
|
|
145
|
+
beforeRestored?: boolean;
|
|
144
146
|
/** Unix timestamp in milliseconds of version start. */
|
|
145
147
|
startedAt: number;
|
|
146
148
|
/** Unix timestamp in milliseconds of version end. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dabble/patches",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "Immutable JSON Patch implementation based on RFC 6902 supporting operational transformation and last-writer-wins",
|
|
5
5
|
"author": "Jacob Wright <jacwright@gmail.com>",
|
|
6
6
|
"bugs": {
|