tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
limit mutations pushed at once
awarm.space
2 years ago
a47a5968
e8405edb
+12
-2
1 changed file
expand all
collapse all
unified
split
src
replicache
index.tsx
+12
-2
src/replicache/index.tsx
···
1
1
"use client";
2
2
import { createContext, useContext, useEffect, useMemo, useState } from "react";
3
3
import { useSubscribe } from "replicache-react";
4
4
-
import { DeepReadonlyObject, Replicache, WriteTransaction } from "replicache";
4
4
+
import {
5
5
+
DeepReadonlyObject,
6
6
+
PushRequest,
7
7
+
PushRequestV1,
8
8
+
Replicache,
9
9
+
WriteTransaction,
10
10
+
} from "replicache";
5
11
import { Pull } from "./pull";
6
12
import { mutations } from "./mutations";
7
13
import { Attributes, Data } from "./attributes";
···
69
75
) as ReplicacheMutators,
70
76
licenseKey: "l381074b8d5224dabaef869802421225a",
71
77
pusher: async (pushRequest) => {
78
78
+
let smolpushRequest = {
79
79
+
...pushRequest,
80
80
+
mutations: pushRequest.mutations.slice(0, 250),
81
81
+
} as PushRequest;
72
82
return {
73
73
-
response: await Push(pushRequest, props.name, props.token),
83
83
+
response: await Push(smolpushRequest, props.name, props.token),
74
84
httpRequestInfo: { errorMessage: "", httpStatusCode: 200 },
75
85
};
76
86
},