Skip to content

Commit 9661d38

Browse files
committed
2.0.0-beta.8
1 parent 16fab69 commit 9661d38

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+349
-204
lines changed

docs/api/access/classes/Access.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ remoteStorage.access.claim('*', 'rw');
4040

4141
#### Defined in
4242

43-
[access.ts:73](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/access.ts#L73)
43+
[access.ts:68](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/access.ts#L68)

docs/api/baseclient/classes/BaseClient.md

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Events with origin `remote` are fired when remote changes are discovered
132132
during sync.
133133

134134
> [!NOTE]
135-
> Automatically receiving remote changes depends on the [caching!Caching](../../caching/classes/Caching.md) settings
136-
> for your module/paths.
135+
> Automatically receiving remote changes depends on the
136+
> [caching](../../caching/classes/Caching.md) settings for your module/paths.
137137
138138
### `window`
139139

@@ -164,13 +164,13 @@ you have set `config.changeEvents.window` to `true` for your RemoteStorage insta
164164
}
165165
```
166166

167-
But when this change is pushed out by asynchronous synchronization, this change
168-
may be rejected by the server, if the remote version has in the meantime changed
169-
from `white` to for instance `red`; this will then lead to a change event with
170-
origin `conflict` (usually a few seconds after the event with origin `window`,
171-
if you have those activated). Note that since you already changed it from
172-
`white` to `blue` in the local version a few seconds ago, `oldValue` is now
173-
your local value of `blue`:
167+
However, when this change is pushed out by the sync process, it will be
168+
rejected by the server, if the remote version has changed in the meantime,
169+
for example from `white` to `red`. This will lead to a change event with
170+
origin `conflict`, usually a few seconds after the event with origin
171+
`window`. Note that since you already changed it from `white` to `blue` in
172+
the local version a few seconds ago, `oldValue` is now your local value of
173+
`blue`:
174174

175175
```js
176176
{
@@ -196,11 +196,6 @@ conflict.
196196

197197
If there is an algorithm to merge the differences between local and remote
198198
versions of the data, conflicts may be automatically resolved.
199-
[storeObject](BaseClient.md#storeobject) or [storeFile](BaseClient.md#storefile) must not be called synchronously from
200-
the change event handler, nor by chaining Promises. [storeObject](BaseClient.md#storeobject) or
201-
[storeFile](BaseClient.md#storefile) must not be called until the next iteration of the JavaScript
202-
Task Queue, using for example
203-
[`setTimeout()`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout).
204199

205200
If no algorithm exists, conflict resolution typically involves displaying local
206201
and remote versions to the user, and having the user merge them, or choose
@@ -223,7 +218,7 @@ corresponding `publicClient` it is `/public/<moduleName>/`.
223218

224219
#### Defined in
225220

226-
[baseclient.ts:239](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L239)
221+
[baseclient.ts:234](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L234)
227222

228223
## Methods
229224

@@ -247,7 +242,7 @@ Usually called via [`on()`](#on)
247242

248243
#### Defined in
249244

250-
[eventhandling.ts:29](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/eventhandling.ts#L29)
245+
[eventhandling.ts:29](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L29)
251246

252247
***
253248

@@ -286,7 +281,7 @@ client.cache('lists/', 'SEEN');
286281

287282
#### Defined in
288283

289-
[baseclient.ts:684](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L684)
284+
[baseclient.ts:678](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L678)
290285

291286
***
292287

@@ -344,7 +339,7 @@ client.declareType('todo-item', {
344339

345340
#### Defined in
346341

347-
[baseclient.ts:734](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L734)
342+
[baseclient.ts:728](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L728)
348343

349344
***
350345

@@ -420,7 +415,7 @@ Example response:
420415
421416
#### Defined in
422417

423-
[baseclient.ts:395](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L395)
418+
[baseclient.ts:390](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L390)
424419

425420
***
426421

@@ -470,7 +465,7 @@ client.getFile('path/to/some/image').then(file => {
470465

471466
#### Defined in
472467

473-
[baseclient.ts:457](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L457)
468+
[baseclient.ts:452](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L452)
474469

475470
***
476471

@@ -501,7 +496,7 @@ The full URL of the item, including the storage origin, or `undefined`
501496
502497
#### Defined in
503498

504-
[baseclient.ts:656](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L656)
499+
[baseclient.ts:650](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L650)
505500

506501
***
507502

@@ -571,7 +566,7 @@ Example of a listing object:
571566
572567
#### Defined in
573568

574-
[baseclient.ts:326](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L326)
569+
[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L321)
575570

576571
***
577572

@@ -607,7 +602,7 @@ client.getObject('/path/to/object').then(obj => console.log(obj));
607602

608603
#### Defined in
609604

610-
[baseclient.ts:541](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L541)
605+
[baseclient.ts:536](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L536)
611606

612607
***
613608

@@ -643,13 +638,13 @@ remoteStorage.on('connected', function() {
643638

644639
#### Defined in
645640

646-
[eventhandling.ts:55](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/eventhandling.ts#L55)
641+
[eventhandling.ts:55](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L55)
647642

648643
***
649644

650645
### remove()
651646

652-
> **remove**(`path`): `Promise`\<`unknown`\>
647+
> **remove**(`path`): `Promise`\<`QueuedRequestResponse`\>
653648
654649
Remove node at given path from storage. Triggers synchronization.
655650

@@ -661,7 +656,7 @@ Path relative to the module root.
661656

662657
#### Returns
663658

664-
`Promise`\<`unknown`\>
659+
`Promise`\<`QueuedRequestResponse`\>
665660

666661
#### Example
667662

@@ -671,7 +666,7 @@ client.remove('path/to/object').then(() => console.log('item deleted'));
671666

672667
#### Defined in
673668

674-
[baseclient.ts:630](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L630)
669+
[baseclient.ts:624](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L624)
675670

676671
***
677672

@@ -693,7 +688,7 @@ Remove a previously installed event handler
693688

694689
#### Defined in
695690

696-
[eventhandling.ts:62](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/eventhandling.ts#L62)
691+
[eventhandling.ts:62](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L62)
697692

698693
***
699694

@@ -718,7 +713,7 @@ A new `BaseClient` operating on a subpath of the current base path
718713

719714
#### Defined in
720715

721-
[baseclient.ts:272](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L272)
716+
[baseclient.ts:267](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L267)
722717

723718
***
724719

@@ -774,7 +769,7 @@ fileReader.readAsArrayBuffer(file);
774769

775770
#### Defined in
776771

777-
[baseclient.ts:503](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L503)
772+
[baseclient.ts:498](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L498)
778773

779774
***
780775

@@ -827,7 +822,7 @@ client.storeObject('bookmark', path, bookmark)
827822

828823
#### Defined in
829824

830-
[baseclient.ts:589](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L589)
825+
[baseclient.ts:584](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L584)
831826

832827
***
833828

@@ -864,4 +859,4 @@ var result = client.validate(document);
864859

865860
#### Defined in
866861

867-
[baseclient.ts:766](https://github.com/remotestorage/remotestorage.js/blob/a883b85da66e86fad01e632f66b390973ef0772e/src/baseclient.ts#L766)
862+
[baseclient.ts:760](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/baseclient.ts#L760)

docs/api/caching/classes/Caching.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Class: Caching
22

33
The caching class gets initialized as `remoteStorage.caching`, unless the
4-
[RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance is created with the option `cache: false`, disabling
5-
caching entirely.
4+
[RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance is created with
5+
the option `cache: false`, disabling caching entirely.
66

77
In case your app hasn't explictly configured caching, the default setting is to
88
cache any documents that have been either created or requested since your app
@@ -61,14 +61,14 @@ caching strategy for the path
6161

6262
```js
6363
remoteStorage.caching.checkPath('documents/').then(strategy => {
64-
console.log(`caching strategy for 'documents/': ${strategy}`));
64+
console.log(`caching strategy for 'documents/': ${strategy}`);
6565
// "caching strategy for 'documents/': SEEN"
6666
});
6767
```
6868

6969
#### Defined in
7070

71-
[caching.ts:157](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L157)
71+
[caching.ts:158](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L158)
7272

7373
***
7474

@@ -99,7 +99,7 @@ remoteStorage.caching.disable('/bookmarks/');
9999

100100
#### Defined in
101101

102-
[caching.ts:124](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L124)
102+
[caching.ts:125](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L125)
103103

104104
***
105105

@@ -129,7 +129,7 @@ remoteStorage.caching.enable('/bookmarks/');
129129

130130
#### Defined in
131131

132-
[caching.ts:107](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L107)
132+
[caching.ts:108](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L108)
133133

134134
***
135135

@@ -151,7 +151,7 @@ Callback function
151151

152152
#### Defined in
153153

154-
[caching.ts:133](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L133)
154+
[caching.ts:134](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L134)
155155

156156
***
157157

@@ -173,7 +173,7 @@ remoteStorage.caching.reset();
173173

174174
#### Defined in
175175

176-
[caching.ts:175](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L175)
176+
[caching.ts:176](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L176)
177177

178178
***
179179

@@ -207,4 +207,4 @@ remoteStorage.caching.set('/bookmarks/archive/', 'SEEN');
207207

208208
#### Defined in
209209

210-
[caching.ts:67](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/caching.ts#L67)
210+
[caching.ts:70](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/caching.ts#L70)

docs/api/eventhandling/type-aliases/EventHandler.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212

1313
## Defined in
1414

15-
[eventhandling.ts:5](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/eventhandling.ts#L5)
15+
[eventhandling.ts:5](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L5)

docs/api/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# remoteStorage.js v2.0.0-beta.6
1+
# remoteStorage.js v2.0.0-beta.8
22

33
## Modules
44

docs/api/remote/classes/RemoteBase.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Usually called via [`on()`](#on)
3232

3333
#### Defined in
3434

35-
[eventhandling.ts:29](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/eventhandling.ts#L29)
35+
[eventhandling.ts:29](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L29)
3636

3737
***
3838

@@ -72,7 +72,7 @@ remoteStorage.on('connected', function() {
7272

7373
#### Defined in
7474

75-
[eventhandling.ts:55](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/eventhandling.ts#L55)
75+
[eventhandling.ts:55](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L55)
7676

7777
***
7878

@@ -98,4 +98,4 @@ Remove a previously installed event handler
9898

9999
#### Defined in
100100

101-
[eventhandling.ts:62](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/eventhandling.ts#L62)
101+
[eventhandling.ts:62](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/eventhandling.ts#L62)

docs/api/remote/interfaces/Remote.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Whether or not a remote store is connected
1212

1313
#### Defined in
1414

15-
[remote.ts:82](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/remote.ts#L82)
15+
[remote.ts:82](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/remote.ts#L82)
1616

1717
***
1818

@@ -24,7 +24,7 @@ Whether last sync action was successful or not
2424

2525
#### Defined in
2626

27-
[remote.ts:87](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/remote.ts#L87)
27+
[remote.ts:87](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/remote.ts#L87)
2828

2929
***
3030

@@ -36,7 +36,7 @@ The JSON-parsed properties object from the user's WebFinger record
3636

3737
#### Defined in
3838

39-
[remote.ts:123](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/remote.ts#L123)
39+
[remote.ts:123](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/remote.ts#L123)
4040

4141
***
4242

@@ -48,4 +48,4 @@ The user address of the connected user
4848

4949
#### Defined in
5050

51-
[remote.ts:92](https://github.com/remotestorage/remotestorage.js/blob/a199c15fb409a17fd444aa7fba846e7fecc5981d/src/remote.ts#L92)
51+
[remote.ts:92](https://github.com/remotestorage/remotestorage.js/blob/16fab691d67a1b3ad2e8a6ceaebe1544aa1cae54/src/remote.ts#L92)

0 commit comments

Comments
 (0)