@warp-drive/ember 0.0.0-beta.1 → 0.0.0-beta.11
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.
- package/LICENSE.md +19 -7
- package/README.md +15 -6
- package/dist/index.js +419 -148
- package/dist/index.js.map +1 -1
- package/logos/NCC-1701-a-blue.svg +4 -0
- package/logos/NCC-1701-a-gold.svg +4 -0
- package/logos/NCC-1701-a-gold_100.svg +1 -0
- package/logos/NCC-1701-a-gold_base-64.txt +1 -0
- package/logos/NCC-1701-a.svg +4 -0
- package/logos/README.md +4 -0
- package/logos/docs-badge.svg +2 -0
- package/logos/ember-data-logo-dark.svg +12 -0
- package/logos/ember-data-logo-light.svg +12 -0
- package/logos/github-header.svg +444 -0
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +4 -0
- package/logos/warp-drive-logo-gold.svg +4 -0
- package/package.json +57 -68
- package/unstable-preview-types/-private/await.d.ts.map +1 -1
- package/unstable-preview-types/-private/request.d.ts +120 -2
- package/unstable-preview-types/-private/request.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +2 -2
package/LICENSE.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Copyright (c) 2017-2025 Ember.js and contributors
|
|
4
|
+
Copyright (c) 2011-2017 Tilde, Inc. and contributors
|
|
5
|
+
Copyright (c) 2011 LivingSocial Inc.
|
|
6
6
|
|
|
7
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
8
13
|
|
|
9
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
10
16
|
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<img
|
|
3
3
|
class="project-logo"
|
|
4
|
-
src="./NCC-1701-a-blue.svg#gh-light-mode-only"
|
|
4
|
+
src="./logos/NCC-1701-a-blue.svg#gh-light-mode-only"
|
|
5
5
|
alt="WarpDrive"
|
|
6
6
|
width="120px"
|
|
7
7
|
title="WarpDrive" />
|
|
8
8
|
<img
|
|
9
9
|
class="project-logo"
|
|
10
|
-
src="./NCC-1701-a.svg#gh-dark-mode-only"
|
|
10
|
+
src="./logos/NCC-1701-a.svg#gh-dark-mode-only"
|
|
11
11
|
alt="WarpDrive"
|
|
12
12
|
width="120px"
|
|
13
13
|
title="WarpDrive" />
|
|
@@ -472,9 +472,18 @@ import { Request } from '@warp-drive/ember';
|
|
|
472
472
|
|
|
473
473
|
- Autorefresh behavior
|
|
474
474
|
|
|
475
|
-
Requests can be made to automatically refresh
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
Requests can be made to automatically refresh under any combination of three separate conditions
|
|
476
|
+
by supplying a value to the `@autorefresh` arg.
|
|
477
|
+
|
|
478
|
+
- `online` when a browser window or tab comes back to the foreground after being backgrounded
|
|
479
|
+
or when the network reports as being online after having been offline.
|
|
480
|
+
- `interval` which occurs whenever `@autorefreshThreshold` has been exceeded
|
|
481
|
+
- `invalid` which occurs when the store associated to the request emits an invalidation notification for the request in use.
|
|
482
|
+
|
|
483
|
+
These conditions can be used in any combination by providing a comma separated list e.g.
|
|
484
|
+
`interval,invalid`
|
|
485
|
+
|
|
486
|
+
A value of `true` is equivalent to `online,invalid`.
|
|
478
487
|
|
|
479
488
|
```gjs
|
|
480
489
|
import { Request } from '@warp-drive/ember';
|
|
@@ -496,7 +505,7 @@ Options are:
|
|
|
496
505
|
|
|
497
506
|
- `refresh` update while continuing to show the current state.
|
|
498
507
|
- `reload` update and show the loading state until update completes)
|
|
499
|
-
- `
|
|
508
|
+
- `policy` (**default**) trigger the request, but let the cache handler decide whether the update should occur or if the cache is still valid.
|
|
500
509
|
|
|
501
510
|
---
|
|
502
511
|
|