braid-text 0.2.90 → 0.2.91

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/index.js +4 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -124,7 +124,8 @@ function create_braid_text() {
124
124
  var r = await braid_fetch(b.href, {
125
125
  signal: ac.signal,
126
126
  method: "HEAD",
127
- version
127
+ version,
128
+ headers: options.headers
128
129
  })
129
130
  if (!r.ok && r.status !== 309 && r.status !== 500)
130
131
  throw new Error(`unexpected HEAD status: ${r.status}`)
@@ -177,6 +178,7 @@ function create_braid_text() {
177
178
  update.signal = ac.signal
178
179
  update.dont_retry = true
179
180
  if (options.peer) update.peer = options.peer
181
+ if (options.headers) update.headers = options.headers
180
182
  var x = await braid_text.put(b, update)
181
183
  if (x.ok) {
182
184
  local_first_put()
@@ -260,7 +262,7 @@ function create_braid_text() {
260
262
  var b_ops = {
261
263
  signal: ac.signal,
262
264
  dont_retry: true,
263
- headers: { 'Merge-Type': 'dt', 'accept-encoding': 'updates(dt)' },
265
+ headers: { ...options.headers, 'Merge-Type': 'dt', 'accept-encoding': 'updates(dt)' },
264
266
  parents: resource.meta.fork_point,
265
267
  peer: options.peer,
266
268
  heartbeats: 120,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braid-text",
3
- "version": "0.2.90",
3
+ "version": "0.2.91",
4
4
  "description": "Library for collaborative text over http using braid.",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braid-text",