ember-data-resources 5.0.0 → 5.2.0
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/package.json +27 -24
- package/README.md +0 -292
- package/dist/-private/find.js +0 -2
- package/dist/-private/find.js.map +0 -1
- package/dist/-private/query.js +0 -2
- package/dist/-private/query.js.map +0 -1
- package/dist/-private/resources/errors.js +0 -13
- package/dist/-private/resources/errors.js.map +0 -1
- package/dist/-private/resources/find-all.js +0 -30
- package/dist/-private/resources/find-all.js.map +0 -1
- package/dist/-private/resources/find-record.js +0 -44
- package/dist/-private/resources/find-record.js.map +0 -1
- package/dist/-private/resources/query-record.js +0 -30
- package/dist/-private/resources/query-record.js.map +0 -1
- package/dist/-private/resources/query.js +0 -30
- package/dist/-private/resources/query.js.map +0 -1
- package/dist/-private/resources/request.js +0 -9
- package/dist/-private/resources/request.js.map +0 -1
- package/dist/-private/resources/types.js +0 -2
- package/dist/-private/resources/types.js.map +0 -1
- package/dist/_app_/helpers/find-all.js +0 -1
- package/dist/_app_/helpers/find-record.js +0 -1
- package/dist/_app_/helpers/query-record.js +0 -1
- package/dist/_app_/helpers/query.js +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/js-helpers.js +0 -88
- package/dist/js-helpers.js.map +0 -1
- package/dist/loose-mode-compat/helpers/find-all.js +0 -9
- package/dist/loose-mode-compat/helpers/find-all.js.map +0 -1
- package/dist/loose-mode-compat/helpers/find-record.js +0 -9
- package/dist/loose-mode-compat/helpers/find-record.js.map +0 -1
- package/dist/loose-mode-compat/helpers/query-record.js +0 -9
- package/dist/loose-mode-compat/helpers/query-record.js.map +0 -1
- package/dist/loose-mode-compat/helpers/query.js +0 -9
- package/dist/loose-mode-compat/helpers/query.js.map +0 -1
- package/dist/request-17f93aea.js +0 -141
- package/dist/request-17f93aea.js.map +0 -1
- package/dist-types/-private/find.d.ts +0 -2
- package/dist-types/-private/find.d.ts.map +0 -1
- package/dist-types/-private/query.d.ts +0 -1
- package/dist-types/-private/query.d.ts.map +0 -1
- package/dist-types/-private/resources/errors.d.ts +0 -7
- package/dist-types/-private/resources/errors.d.ts.map +0 -1
- package/dist-types/-private/resources/find-all.d.ts +0 -18
- package/dist-types/-private/resources/find-all.d.ts.map +0 -1
- package/dist-types/-private/resources/find-record.d.ts +0 -18
- package/dist-types/-private/resources/find-record.d.ts.map +0 -1
- package/dist-types/-private/resources/query-record.d.ts +0 -19
- package/dist-types/-private/resources/query-record.d.ts.map +0 -1
- package/dist-types/-private/resources/query.d.ts +0 -20
- package/dist-types/-private/resources/query.d.ts.map +0 -1
- package/dist-types/-private/resources/request.d.ts +0 -0
- package/dist-types/-private/resources/request.d.ts.map +0 -1
- package/dist-types/-private/resources/types.d.ts +0 -2
- package/dist-types/-private/resources/types.d.ts.map +0 -1
- package/dist-types/defineProperty-796354a6.d.ts +0 -2
- package/dist-types/index.d.ts +0 -5
- package/dist-types/index.d.ts.map +0 -1
- package/dist-types/js-helpers.d.ts +0 -16
- package/dist-types/js-helpers.d.ts.map +0 -1
- package/dist-types/loose-mode-compat/helpers/find-all.d.ts +0 -2
- package/dist-types/loose-mode-compat/helpers/find-all.d.ts.map +0 -1
- package/dist-types/loose-mode-compat/helpers/find-record.d.ts +0 -2
- package/dist-types/loose-mode-compat/helpers/find-record.d.ts.map +0 -1
- package/dist-types/loose-mode-compat/helpers/query-record.d.ts +0 -2
- package/dist-types/loose-mode-compat/helpers/query-record.d.ts.map +0 -1
- package/dist-types/loose-mode-compat/helpers/query.d.ts +0 -2
- package/dist-types/loose-mode-compat/helpers/query.d.ts.map +0 -1
- package/dist-types/request-17f93aea.d.ts +0 -31
- package/dist-types/toPropertyKey-796354a6.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-data-resources",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Resource helpers for reactively (re)fetching data with ember-data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -15,25 +15,27 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@ember/string": "^3.1.1",
|
|
18
|
-
"@ember/test-waiters": "^3.0
|
|
19
|
-
"@embroider/addon-shim": "^1.0.0"
|
|
18
|
+
"@ember/test-waiters": "^3.1.0",
|
|
19
|
+
"@embroider/addon-shim": "^1.0.0",
|
|
20
|
+
"ember-modify-based-class-resource": "^1.1.0"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
|
-
"@arethetypeswrong/cli": "^0.
|
|
23
|
-
"@babel/core": "^7.
|
|
23
|
+
"@arethetypeswrong/cli": "^0.13.5",
|
|
24
|
+
"@babel/core": "^7.23.7",
|
|
24
25
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
25
26
|
"@babel/plugin-proposal-decorators": "^7.22.5",
|
|
26
27
|
"@babel/preset-typescript": "^7.22.5",
|
|
27
28
|
"@babel/runtime": "^7.22.5",
|
|
28
29
|
"@ember-data/store": "^5.0.0",
|
|
30
|
+
"@ember-data/tracking": "^5.3.0",
|
|
29
31
|
"@embroider/addon-dev": "^3.1.1",
|
|
30
32
|
"@glimmer/component": "^1.1.2",
|
|
31
33
|
"@glimmer/tracking": "^1.1.2",
|
|
32
|
-
"@glint/core": "^1.0
|
|
34
|
+
"@glint/core": "^1.3.0",
|
|
33
35
|
"@glint/environment-ember-loose": "^1.0.2",
|
|
34
36
|
"@glint/template": "^1.0.2",
|
|
35
37
|
"@nullvoxpopuli/eslint-configs": "^3.1.3",
|
|
36
|
-
"@tsconfig/ember": "^
|
|
38
|
+
"@tsconfig/ember": "^3.0.3",
|
|
37
39
|
"@types/ember": "^4.0.0",
|
|
38
40
|
"@types/ember-data__store": "^4.0.3",
|
|
39
41
|
"@types/ember__application": "^4.0.0",
|
|
@@ -53,26 +55,27 @@
|
|
|
53
55
|
"@types/ember__template": "^4.0.0",
|
|
54
56
|
"@types/ember__test": "^4.0.0",
|
|
55
57
|
"@types/ember__utils": "^4.0.0",
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
57
|
-
"@typescript-eslint/parser": "^
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
59
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
58
60
|
"concurrently": "^8.2.0",
|
|
59
|
-
"ember-
|
|
60
|
-
"ember-
|
|
61
|
+
"ember-resources": "^6.0.0",
|
|
62
|
+
"ember-source": "~5.6.0",
|
|
61
63
|
"ember-template-lint": "^5.10.3",
|
|
62
64
|
"eslint": "^8.43.0",
|
|
63
|
-
"eslint-config-prettier": "^
|
|
64
|
-
"eslint-plugin-ember": "^
|
|
65
|
+
"eslint-config-prettier": "^9.1.0",
|
|
66
|
+
"eslint-plugin-ember": "^12.0.0",
|
|
65
67
|
"eslint-plugin-n": "^16.0.0",
|
|
66
|
-
"eslint-plugin-prettier": "^
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"prettier
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"rollup
|
|
68
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
69
|
+
"eslint-plugin-qunit": "^8.0.1",
|
|
70
|
+
"execa": "^8.0.1",
|
|
71
|
+
"prettier": "^3.2.4",
|
|
72
|
+
"prettier-plugin-ember-template-tag": "^2.0.0",
|
|
73
|
+
"publint": "^0.2.7",
|
|
74
|
+
"rollup": "~4.11.0",
|
|
75
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
73
76
|
"rollup-plugin-delete": "^2.0.0",
|
|
74
|
-
"rollup-plugin-ts": "^3.
|
|
75
|
-
"typescript": "^
|
|
77
|
+
"rollup-plugin-ts": "^3.4.5",
|
|
78
|
+
"typescript": "^5.3.3"
|
|
76
79
|
},
|
|
77
80
|
"publishConfig": {
|
|
78
81
|
"registry": "https://registry.npmjs.org"
|
|
@@ -116,8 +119,8 @@
|
|
|
116
119
|
"@ember-data/store": "^3.25 || >= 4.0.0",
|
|
117
120
|
"@glimmer/tracking": "^1.1.2",
|
|
118
121
|
"ember-data": "^3.25.0 || >=4.0.0",
|
|
119
|
-
"ember-
|
|
120
|
-
"ember-
|
|
122
|
+
"ember-resources": "^5.3.0 || >= 6.0.0",
|
|
123
|
+
"ember-source": "^3.25.0 || >=4.0.0"
|
|
121
124
|
},
|
|
122
125
|
"scripts": {
|
|
123
126
|
"build": "concurrently 'npm:build:*'",
|
package/README.md
DELETED
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
# ember-data-resources
|
|
2
|
-
|
|
3
|
-
Resources for reactive data fetching with ember-data
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Compatibility
|
|
7
|
-
|
|
8
|
-
* ember-source v3.28 or above
|
|
9
|
-
* ember-data v3.28 or above
|
|
10
|
-
* ember-auto-import v2 or above
|
|
11
|
-
* typescript v4.8 or above
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
ember install ember-data-resources
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
### `findAll`
|
|
24
|
-
|
|
25
|
-
```js
|
|
26
|
-
import { findAll } from 'ember-data-resources';
|
|
27
|
-
|
|
28
|
-
export default class MyComponent extends Component {
|
|
29
|
-
@tracked included = '';
|
|
30
|
-
|
|
31
|
-
blog = findAll(this, 'blog', () => ({ included: this.included }));
|
|
32
|
-
// blog = findAll(this, 'blog');
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
```hbs
|
|
36
|
-
Available properties:
|
|
37
|
-
- {{this.blog.records}}
|
|
38
|
-
- {{this.blog.error}}
|
|
39
|
-
- {{this.blog.isLoading}}
|
|
40
|
-
- {{this.blog.isSuccess}}
|
|
41
|
-
- {{this.blog.isError}}
|
|
42
|
-
- {{this.blog.hasRun}}
|
|
43
|
-
|
|
44
|
-
Available methods:
|
|
45
|
-
- <button {{on 'click' this.blog.retry}}>Retry</button>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**in a template**
|
|
49
|
-
|
|
50
|
-
```hbs
|
|
51
|
-
{{#let (find-all 'blog') as |blogs|}}
|
|
52
|
-
{{#if blogs.isLoading}}
|
|
53
|
-
...
|
|
54
|
-
{{else if blogs.isError}}
|
|
55
|
-
{{blogs.error}}
|
|
56
|
-
{{else}}
|
|
57
|
-
{{blogs.records}}
|
|
58
|
-
{{/if}}
|
|
59
|
-
|
|
60
|
-
Available properties:
|
|
61
|
-
- {{blog.records}}
|
|
62
|
-
- {{blog.error}}
|
|
63
|
-
- {{blog.isLoading}}
|
|
64
|
-
- {{blog.isSuccess}}
|
|
65
|
-
- {{blog.isError}}
|
|
66
|
-
- {{blog.hasRun}}
|
|
67
|
-
|
|
68
|
-
Available methods:
|
|
69
|
-
- <button {{on 'click' blog.retry}}>Retry</button>
|
|
70
|
-
{{/let}}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**in strict mode**
|
|
74
|
-
|
|
75
|
-
See: [First-class Component Templates](https://github.com/emberjs/rfcs/pull/779)
|
|
76
|
-
|
|
77
|
-
```jsx
|
|
78
|
-
import { FindAll } from 'ember-data-resources';
|
|
79
|
-
|
|
80
|
-
<template>
|
|
81
|
-
{{#let (FindAll 'blog') as |blogs|}}
|
|
82
|
-
...
|
|
83
|
-
{{/let}}
|
|
84
|
-
</template>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### `findRecord`
|
|
88
|
-
|
|
89
|
-
```js
|
|
90
|
-
import { findRecord } from 'ember-data-resources';
|
|
91
|
-
|
|
92
|
-
export default class MyComponent extends Component {
|
|
93
|
-
@tracked id = 1;
|
|
94
|
-
|
|
95
|
-
blog = findRecord(this, 'blog', () => this.id)
|
|
96
|
-
// blog = findRecord(this, 'blog', () => [this.id])
|
|
97
|
-
// blog = findRecord(this, 'blog', () => [this.id, { ...options }])
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
```hbs
|
|
101
|
-
Available properties:
|
|
102
|
-
- {{this.blog.record}}
|
|
103
|
-
- {{this.blog.error}}
|
|
104
|
-
- {{this.blog.isLoading}}
|
|
105
|
-
- {{this.blog.isSuccess}}
|
|
106
|
-
- {{this.blog.isError}}
|
|
107
|
-
- {{this.blog.hasRun}}
|
|
108
|
-
|
|
109
|
-
Available methods:
|
|
110
|
-
- <button {{on 'click' this.blog.retry}}>Retry</button>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
**in a template**
|
|
114
|
-
|
|
115
|
-
```hbs
|
|
116
|
-
{{#let (find-record 'blog' @id) as |blog|}}
|
|
117
|
-
{{!-- or: (find-record 'blog' @id options=...) --}}
|
|
118
|
-
{{#if blog.isLoading}}
|
|
119
|
-
...
|
|
120
|
-
{{else if blog.isError}}
|
|
121
|
-
{{blog.error}}
|
|
122
|
-
{{else}}
|
|
123
|
-
{{blog.record}}
|
|
124
|
-
{{/if}}
|
|
125
|
-
|
|
126
|
-
Available properties:
|
|
127
|
-
- {{blog.record}}
|
|
128
|
-
- {{blog.error}}
|
|
129
|
-
- {{blog.isLoading}}
|
|
130
|
-
- {{blog.isSuccess}}
|
|
131
|
-
- {{blog.isError}}
|
|
132
|
-
- {{blog.hasRun}}
|
|
133
|
-
|
|
134
|
-
Available methods:
|
|
135
|
-
- <button {{on 'click' blog.retry}}>Retry</button>
|
|
136
|
-
{{/let}}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**in strict mode**
|
|
140
|
-
|
|
141
|
-
See: [First-class Component Templates](https://github.com/emberjs/rfcs/pull/779)
|
|
142
|
-
|
|
143
|
-
```jsx
|
|
144
|
-
import { FindRecord } from 'ember-data-resources';
|
|
145
|
-
|
|
146
|
-
<template>
|
|
147
|
-
{{#let (FindRecord 'blog' @id) as |blog|}}
|
|
148
|
-
...
|
|
149
|
-
{{/let}}
|
|
150
|
-
</template>
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### `query`
|
|
154
|
-
|
|
155
|
-
```js
|
|
156
|
-
import { query } from 'ember-data-resources';
|
|
157
|
-
|
|
158
|
-
export default class MyComponent extends Component {
|
|
159
|
-
blog = query(this, 'blog', () => ({ ...query }));
|
|
160
|
-
// blog = query(this, 'blog', () => [{ ...query }]);
|
|
161
|
-
// blog = query(this, 'blog', () => [{ ...query }, { ...options }]);
|
|
162
|
-
}
|
|
163
|
-
```
|
|
164
|
-
```hbs
|
|
165
|
-
Available properties:
|
|
166
|
-
- {{this.blog.records}}
|
|
167
|
-
- {{this.blog.error}}
|
|
168
|
-
- {{this.blog.isLoading}}
|
|
169
|
-
- {{this.blog.isSuccess}}
|
|
170
|
-
- {{this.blog.isError}}
|
|
171
|
-
- {{this.blog.hasRun}}
|
|
172
|
-
|
|
173
|
-
Available methods:
|
|
174
|
-
- <button {{on 'click' this.blog.retry}}>Retry</button>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**in a template**
|
|
178
|
-
|
|
179
|
-
```hbs
|
|
180
|
-
{{#let (query 'blog' query=(hash ...)) as |blogs|}}
|
|
181
|
-
{{#if blogs.isLoading}}
|
|
182
|
-
...
|
|
183
|
-
{{else if blogs.isError}}
|
|
184
|
-
{{blogs.error}}
|
|
185
|
-
{{else}}
|
|
186
|
-
{{blogs.records}}
|
|
187
|
-
{{/if}}
|
|
188
|
-
|
|
189
|
-
Available properties:
|
|
190
|
-
- {{blog.records}}
|
|
191
|
-
- {{blog.error}}
|
|
192
|
-
- {{blog.isLoading}}
|
|
193
|
-
- {{blog.isSuccess}}
|
|
194
|
-
- {{blog.isError}}
|
|
195
|
-
- {{blog.hasRun}}
|
|
196
|
-
|
|
197
|
-
Available methods:
|
|
198
|
-
- <button {{on 'click' blog.retry}}>Retry</button>
|
|
199
|
-
{{/let}}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
**in strict mode**
|
|
203
|
-
|
|
204
|
-
See: [First-class Component Templates](https://github.com/emberjs/rfcs/pull/779)
|
|
205
|
-
|
|
206
|
-
```jsx
|
|
207
|
-
import { Query } from 'ember-data-resources';
|
|
208
|
-
|
|
209
|
-
<template>
|
|
210
|
-
{{#let (Query 'blog' query=(hash ...)) as |blogs|}}
|
|
211
|
-
...
|
|
212
|
-
{{/let}}
|
|
213
|
-
</template>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
### `queryRecord`
|
|
218
|
-
|
|
219
|
-
```js
|
|
220
|
-
import { queryRecord } from 'ember-data-resources';
|
|
221
|
-
|
|
222
|
-
export default class MyComponent extends Component {
|
|
223
|
-
@tracked id = 1;
|
|
224
|
-
|
|
225
|
-
blog = queryRecord(this, 'blog', () => ({ ...query }))
|
|
226
|
-
// blog = findRecord(this, 'blog', () => [{ ...query }])
|
|
227
|
-
// blog = findRecord(this, 'blog', () => [{ ...query }, { ...options }])
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
```hbs
|
|
231
|
-
Available properties:
|
|
232
|
-
- {{this.blog.record}}
|
|
233
|
-
- {{this.blog.error}}
|
|
234
|
-
- {{this.blog.isLoading}}
|
|
235
|
-
- {{this.blog.isSuccess}}
|
|
236
|
-
- {{this.blog.isError}}
|
|
237
|
-
- {{this.blog.hasRun}}
|
|
238
|
-
|
|
239
|
-
Available methods:
|
|
240
|
-
- <button {{on 'click' this.blog.retry}}>Retry</button>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
**in a template**
|
|
244
|
-
|
|
245
|
-
```hbs
|
|
246
|
-
{{#let (query-record 'blog' query=(hash ...)) as |blog|}}
|
|
247
|
-
{{#if blog.isLoading}}
|
|
248
|
-
...
|
|
249
|
-
{{else if blog.isError}}
|
|
250
|
-
{{blog.error}}
|
|
251
|
-
{{else}}
|
|
252
|
-
{{blog.record}}
|
|
253
|
-
{{/if}}
|
|
254
|
-
|
|
255
|
-
Available properties:
|
|
256
|
-
- {{blog.record}}
|
|
257
|
-
- {{blog.error}}
|
|
258
|
-
- {{blog.isLoading}}
|
|
259
|
-
- {{blog.isSuccess}}
|
|
260
|
-
- {{blog.isError}}
|
|
261
|
-
- {{blog.hasRun}}
|
|
262
|
-
|
|
263
|
-
Available methods:
|
|
264
|
-
- <button {{on 'click' blog.retry}}>Retry</button>
|
|
265
|
-
|
|
266
|
-
{{/let}}
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
**in strict mode**
|
|
270
|
-
|
|
271
|
-
See: [First-class Component Templates](https://github.com/emberjs/rfcs/pull/779)
|
|
272
|
-
|
|
273
|
-
```jsx
|
|
274
|
-
import { QueryRecord } from 'ember-data-resources';
|
|
275
|
-
|
|
276
|
-
<template>
|
|
277
|
-
{{#let (QueryRecord 'blog' query=(hash ...)) as |blog|}}
|
|
278
|
-
...
|
|
279
|
-
{{/let}}
|
|
280
|
-
</template>
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
Contributing
|
|
284
|
-
------------------------------------------------------------------------------
|
|
285
|
-
|
|
286
|
-
See the [Contributing](CONTRIBUTING.md) guide for details.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
License
|
|
290
|
-
------------------------------------------------------------------------------
|
|
291
|
-
|
|
292
|
-
This project is licensed under the [MIT License](LICENSE.md).
|
package/dist/-private/find.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/-private/query.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class IdRequiredError extends TypeError {
|
|
2
|
-
constructor(modelName) {
|
|
3
|
-
super(`While trying to request a resource from ${modelName}, the ID was either null or undefined, and the ID is required for fetching resources`);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
class IdTypeError extends TypeError {
|
|
7
|
-
constructor(modelName, id) {
|
|
8
|
-
super(`While trying to request a resource from ${modelName}, the ID was of invalid type ${typeof id}: only string and number are supported`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { IdRequiredError, IdTypeError };
|
|
13
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../src/-private/resources/errors.ts"],"sourcesContent":["export class IdRequiredError extends TypeError {\n constructor(modelName: string) {\n super(\n `While trying to request a resource from ${modelName}, the ID was either null or undefined, and the ID is required for fetching resources`\n );\n }\n}\n\nexport class IdTypeError extends TypeError {\n constructor(modelName: string, id: unknown) {\n super(\n `While trying to request a resource from ${modelName}, the ID was of invalid type ${typeof id}: only string and number are supported`\n );\n }\n}\n"],"names":["IdRequiredError","TypeError","constructor","modelName","IdTypeError","id"],"mappings":"AAAO,MAAMA,eAAe,SAASC,SAAS,CAAC;EAC7CC,WAAWA,CAACC,SAAiB,EAAE;AAC7B,IAAA,KAAK,CACF,CAAA,wCAAA,EAA0CA,SAAU,CAAA,oFAAA,CACvD,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAEO,MAAMC,WAAW,SAASH,SAAS,CAAC;AACzCC,EAAAA,WAAWA,CAACC,SAAiB,EAAEE,EAAW,EAAE;AAC1C,IAAA,KAAK,CACF,CAA0CF,wCAAAA,EAAAA,SAAU,gCAA+B,OAAOE,EAAG,wCAChG,CAAC,CAAA;AACH,GAAA;AACF;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { _ as _applyDecoratedDescriptor, R as Request, a as _initializerDefineProperty } from '../../request-17f93aea.js';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { isDestroyed, isDestroying } from '@ember/destroyable';
|
|
4
|
-
import { action } from '@ember/object';
|
|
5
|
-
|
|
6
|
-
var _class, _descriptor;
|
|
7
|
-
let FindAll = (_class = class FindAll extends Request {
|
|
8
|
-
constructor(...args) {
|
|
9
|
-
super(...args);
|
|
10
|
-
_initializerDefineProperty(this, "_records", _descriptor, this);
|
|
11
|
-
}
|
|
12
|
-
async __WRAPPED_FUNCTION__([modelName], {
|
|
13
|
-
options
|
|
14
|
-
}) {
|
|
15
|
-
const records = await this.store.findAll(modelName, options);
|
|
16
|
-
if (isDestroyed(this) || isDestroying(this)) return;
|
|
17
|
-
this._records = records;
|
|
18
|
-
}
|
|
19
|
-
get records() {
|
|
20
|
-
return this._records;
|
|
21
|
-
}
|
|
22
|
-
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "_records", [tracked], {
|
|
23
|
-
configurable: true,
|
|
24
|
-
enumerable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
initializer: null
|
|
27
|
-
}), _applyDecoratedDescriptor(_class.prototype, "__WRAPPED_FUNCTION__", [action], Object.getOwnPropertyDescriptor(_class.prototype, "__WRAPPED_FUNCTION__"), _class.prototype)), _class);
|
|
28
|
-
|
|
29
|
-
export { FindAll };
|
|
30
|
-
//# sourceMappingURL=find-all.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-all.js","sources":["../../../src/-private/resources/find-all.ts"],"sourcesContent":["import { tracked } from '@glimmer/tracking';\nimport { isDestroyed, isDestroying } from '@ember/destroyable';\nimport { action } from '@ember/object';\n\nimport { Request } from './request';\n\nimport type ArrayProxy from '@ember/array/proxy';\nimport type Store from '@ember-data/store';\n\nexport type FindAllOptions = Parameters<Store['findAll']>[1];\n\ntype PositionalArgs = [string];\nexport interface NamedArgs {\n options: FindAllOptions;\n}\n\nexport interface Args {\n named: NamedArgs;\n positional: PositionalArgs;\n}\n\nexport class FindAll<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {\n @tracked private _records: ArrayProxy<Model> | undefined;\n\n @action\n async __WRAPPED_FUNCTION__([modelName]: PositionalArgs, { options }: NamedArgs): Promise<void> {\n const records = await this.store.findAll(modelName as never, options);\n\n if (isDestroyed(this) || isDestroying(this)) return;\n\n this._records = records;\n }\n\n get records(): ArrayProxy<Model> | undefined {\n return this._records;\n }\n}\n"],"names":["FindAll","_class","Request","constructor","args","_initializerDefineProperty","_descriptor","__WRAPPED_FUNCTION__","modelName","options","records","store","findAll","isDestroyed","isDestroying","_records","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;AAqBaA,IAAAA,OAAO,IAAAC,MAAA,GAAb,MAAMD,OAAO,SAA+CE,OAAO,CAAY;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,mBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAGpF,EAAA,MACMC,oBAAoBA,CAAC,CAACC,SAAS,CAAiB,EAAE;AAAEC,IAAAA,OAAAA;AAAmB,GAAC,EAAiB;AAC7F,IAAA,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACC,KAAK,CAACC,OAAO,CAACJ,SAAS,EAAWC,OAAO,CAAC,CAAA;IAErE,IAAII,WAAW,CAAC,IAAI,CAAC,IAAIC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAA;IAE7C,IAAI,CAACC,QAAQ,GAAGL,OAAO,CAAA;AACzB,GAAA;EAEA,IAAIA,OAAOA,GAAkC;IAC3C,OAAO,IAAI,CAACK,QAAQ,CAAA;AACtB,GAAA;AACF,CAAC,GAAAT,WAAA,GAAAU,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAAA,UAAA,EAAA,CAdEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAEPM,sBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAAxB,MAAA,CAAAgB,SAAA,EAAA,sBAAA,CAAA,EAAAhB,MAAA,CAAAgB,SAAA,IAAAhB,MAAA;;;;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { _ as _applyDecoratedDescriptor, R as Request, a as _initializerDefineProperty } from '../../request-17f93aea.js';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { isDestroyed, isDestroying } from '@ember/destroyable';
|
|
4
|
-
import { action } from '@ember/object';
|
|
5
|
-
import { waitFor } from '@ember/test-waiters';
|
|
6
|
-
import { IdRequiredError, IdTypeError } from './errors.js';
|
|
7
|
-
|
|
8
|
-
var _class, _descriptor;
|
|
9
|
-
let FindRecord = (_class = class FindRecord extends Request {
|
|
10
|
-
constructor(...args) {
|
|
11
|
-
super(...args);
|
|
12
|
-
_initializerDefineProperty(this, "_record", _descriptor, this);
|
|
13
|
-
}
|
|
14
|
-
async __WRAPPED_FUNCTION__([modelName, id], {
|
|
15
|
-
options
|
|
16
|
-
}) {
|
|
17
|
-
/**
|
|
18
|
-
* ember-data forbids usage of invalid arguments
|
|
19
|
-
* in JS, this is typically fine as we can also try-catch, but
|
|
20
|
-
* since this *might* be used in a template as well as JS, we need to instead
|
|
21
|
-
* throw our own error that gives a bit more context to the user so
|
|
22
|
-
* they can pass in the correct arguments
|
|
23
|
-
*/
|
|
24
|
-
if (id === null || id === undefined) {
|
|
25
|
-
throw new IdRequiredError(modelName);
|
|
26
|
-
} else if (typeof id !== 'string' && typeof id !== 'number') {
|
|
27
|
-
throw new IdTypeError(modelName, id);
|
|
28
|
-
}
|
|
29
|
-
const record = await this.store.findRecord(modelName, id, options);
|
|
30
|
-
if (isDestroyed(this) || isDestroying(this)) return;
|
|
31
|
-
this._record = record;
|
|
32
|
-
}
|
|
33
|
-
get record() {
|
|
34
|
-
return this._record;
|
|
35
|
-
}
|
|
36
|
-
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "_record", [tracked], {
|
|
37
|
-
configurable: true,
|
|
38
|
-
enumerable: true,
|
|
39
|
-
writable: true,
|
|
40
|
-
initializer: null
|
|
41
|
-
}), _applyDecoratedDescriptor(_class.prototype, "__WRAPPED_FUNCTION__", [action, waitFor], Object.getOwnPropertyDescriptor(_class.prototype, "__WRAPPED_FUNCTION__"), _class.prototype)), _class);
|
|
42
|
-
|
|
43
|
-
export { FindRecord };
|
|
44
|
-
//# sourceMappingURL=find-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-record.js","sources":["../../../src/-private/resources/find-record.ts"],"sourcesContent":["import { tracked } from '@glimmer/tracking';\nimport { isDestroyed, isDestroying } from '@ember/destroyable';\nimport { action } from '@ember/object';\nimport { waitFor } from '@ember/test-waiters';\n\nimport { IdRequiredError, IdTypeError } from './errors';\nimport { Request } from './request';\n\nimport type { Id } from './types';\nimport type Store from '@ember-data/store';\n\nexport type FindRecordOptions = Parameters<Store['findRecord']>[2];\n\ntype PositionalArgs = [string, Id];\nexport interface NamedArgs {\n options: FindRecordOptions;\n}\n\nexport interface Args {\n named: NamedArgs;\n positional: PositionalArgs;\n}\n\nexport class FindRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {\n @tracked private _record: Model | undefined;\n\n @action\n @waitFor\n async __WRAPPED_FUNCTION__([modelName, id]: PositionalArgs, { options }: NamedArgs) {\n /**\n * ember-data forbids usage of invalid arguments\n * in JS, this is typically fine as we can also try-catch, but\n * since this *might* be used in a template as well as JS, we need to instead\n * throw our own error that gives a bit more context to the user so\n * they can pass in the correct arguments\n */\n if (id === null || id === undefined) {\n throw new IdRequiredError(modelName);\n } else if (typeof id !== 'string' && typeof id !== 'number') {\n throw new IdTypeError(modelName, id);\n }\n\n const record = await this.store.findRecord(modelName as never, id, options);\n\n if (isDestroyed(this) || isDestroying(this)) return;\n\n this._record = record;\n }\n\n get record(): Model | undefined {\n return this._record;\n }\n}\n"],"names":["FindRecord","_class","Request","constructor","args","_initializerDefineProperty","_descriptor","__WRAPPED_FUNCTION__","modelName","id","options","undefined","IdRequiredError","IdTypeError","record","store","findRecord","isDestroyed","isDestroying","_record","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","waitFor","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;;;AAuBaA,IAAAA,UAAU,IAAAC,MAAA,GAAhB,MAAMD,UAAU,SAA+CE,OAAO,CAAY;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,kBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAGvF,EAAA,MAEMC,oBAAoBA,CAAC,CAACC,SAAS,EAAEC,EAAE,CAAiB,EAAE;AAAEC,IAAAA,OAAAA;AAAmB,GAAC,EAAE;AAClF;AACJ;AACA;AACA;AACA;AACA;AACA;AACI,IAAA,IAAID,EAAE,KAAK,IAAI,IAAIA,EAAE,KAAKE,SAAS,EAAE;AACnC,MAAA,MAAM,IAAIC,eAAe,CAACJ,SAAS,CAAC,CAAA;KACrC,MAAM,IAAI,OAAOC,EAAE,KAAK,QAAQ,IAAI,OAAOA,EAAE,KAAK,QAAQ,EAAE;AAC3D,MAAA,MAAM,IAAII,WAAW,CAACL,SAAS,EAAEC,EAAE,CAAC,CAAA;AACtC,KAAA;AAEA,IAAA,MAAMK,MAAM,GAAG,MAAM,IAAI,CAACC,KAAK,CAACC,UAAU,CAACR,SAAS,EAAWC,EAAE,EAAEC,OAAO,CAAC,CAAA;IAE3E,IAAIO,WAAW,CAAC,IAAI,CAAC,IAAIC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAA;IAE7C,IAAI,CAACC,OAAO,GAAGL,MAAM,CAAA;AACvB,GAAA;EAEA,IAAIA,MAAMA,GAAsB;IAC9B,OAAO,IAAI,CAACK,OAAO,CAAA;AACrB,GAAA;AACF,CAAC,GAAAb,WAAA,GAAAc,yBAAA,CAAAnB,MAAA,CAAAoB,SAAA,EAAA,SAAA,EAAA,CA5BEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAnB,MAAA,CAAAoB,SAAA,EAEPM,sBAAAA,EAAAA,CAAAA,MAAM,EACNC,OAAO,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA7B,MAAA,CAAAoB,SAAA,2BAAApB,MAAA,CAAAoB,SAAA,CAAA,GAAApB,MAAA;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { _ as _applyDecoratedDescriptor, R as Request, a as _initializerDefineProperty } from '../../request-17f93aea.js';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { isDestroyed, isDestroying } from '@ember/destroyable';
|
|
4
|
-
import { action } from '@ember/object';
|
|
5
|
-
|
|
6
|
-
var _class, _descriptor;
|
|
7
|
-
let QueryRecord = (_class = class QueryRecord extends Request {
|
|
8
|
-
constructor(...args) {
|
|
9
|
-
super(...args);
|
|
10
|
-
_initializerDefineProperty(this, "_record", _descriptor, this);
|
|
11
|
-
}
|
|
12
|
-
async __WRAPPED_FUNCTION__([modelName, query], {
|
|
13
|
-
options
|
|
14
|
-
}) {
|
|
15
|
-
const record = await this.store.queryRecord(modelName, query, options);
|
|
16
|
-
if (isDestroyed(this) || isDestroying(this)) return;
|
|
17
|
-
this._record = record;
|
|
18
|
-
}
|
|
19
|
-
get record() {
|
|
20
|
-
return this._record;
|
|
21
|
-
}
|
|
22
|
-
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "_record", [tracked], {
|
|
23
|
-
configurable: true,
|
|
24
|
-
enumerable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
initializer: null
|
|
27
|
-
}), _applyDecoratedDescriptor(_class.prototype, "__WRAPPED_FUNCTION__", [action], Object.getOwnPropertyDescriptor(_class.prototype, "__WRAPPED_FUNCTION__"), _class.prototype)), _class);
|
|
28
|
-
|
|
29
|
-
export { QueryRecord };
|
|
30
|
-
//# sourceMappingURL=query-record.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-record.js","sources":["../../../src/-private/resources/query-record.ts"],"sourcesContent":["import { tracked } from '@glimmer/tracking';\nimport { isDestroyed, isDestroying } from '@ember/destroyable';\nimport { action } from '@ember/object';\n\nimport { Request } from './request';\n\nimport type Store from '@ember-data/store';\n\ntype QueryParams = Parameters<Store['queryRecord']>;\nexport type QueryRecordQuery = QueryParams[1];\nexport type QueryRecordOptions = QueryParams[2];\n\ntype PositionalArgs = [string, QueryRecordQuery];\nexport interface NamedArgs {\n options: QueryRecordOptions;\n}\n\nexport interface Args {\n named: NamedArgs;\n positional: PositionalArgs;\n}\n\nexport class QueryRecord<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {\n @tracked private _record: Model | undefined;\n\n @action\n async __WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs) {\n const record = await this.store.queryRecord(modelName as never, query, options);\n\n if (isDestroyed(this) || isDestroying(this)) return;\n\n this._record = record;\n }\n\n get record(): Model | undefined {\n return this._record;\n }\n}\n"],"names":["QueryRecord","_class","Request","constructor","args","_initializerDefineProperty","_descriptor","__WRAPPED_FUNCTION__","modelName","query","options","record","store","queryRecord","isDestroyed","isDestroying","_record","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;AAsBaA,IAAAA,WAAW,IAAAC,MAAA,GAAjB,MAAMD,WAAW,SAA+CE,OAAO,CAAY;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,kBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAGxF,EAAA,MACMC,oBAAoBA,CAAC,CAACC,SAAS,EAAEC,KAAK,CAAiB,EAAE;AAAEC,IAAAA,OAAAA;AAAmB,GAAC,EAAE;AACrF,IAAA,MAAMC,MAAM,GAAG,MAAM,IAAI,CAACC,KAAK,CAACC,WAAW,CAACL,SAAS,EAAWC,KAAK,EAAEC,OAAO,CAAC,CAAA;IAE/E,IAAII,WAAW,CAAC,IAAI,CAAC,IAAIC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAA;IAE7C,IAAI,CAACC,OAAO,GAAGL,MAAM,CAAA;AACvB,GAAA;EAEA,IAAIA,MAAMA,GAAsB;IAC9B,OAAO,IAAI,CAACK,OAAO,CAAA;AACrB,GAAA;AACF,CAAC,GAAAV,WAAA,GAAAW,yBAAA,CAAAhB,MAAA,CAAAiB,SAAA,EAAA,SAAA,EAAA,CAdEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAhB,MAAA,CAAAiB,SAAA,EAEPM,sBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAAzB,MAAA,CAAAiB,SAAA,EAAA,sBAAA,CAAA,EAAAjB,MAAA,CAAAiB,SAAA,IAAAjB,MAAA;;;;"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { _ as _applyDecoratedDescriptor, R as Request, a as _initializerDefineProperty } from '../../request-17f93aea.js';
|
|
2
|
-
import { tracked } from '@glimmer/tracking';
|
|
3
|
-
import { isDestroyed, isDestroying } from '@ember/destroyable';
|
|
4
|
-
import { action } from '@ember/object';
|
|
5
|
-
|
|
6
|
-
var _class, _descriptor;
|
|
7
|
-
let Query = (_class = class Query extends Request {
|
|
8
|
-
constructor(...args) {
|
|
9
|
-
super(...args);
|
|
10
|
-
_initializerDefineProperty(this, "_records", _descriptor, this);
|
|
11
|
-
}
|
|
12
|
-
async __WRAPPED_FUNCTION__([modelName, query], {
|
|
13
|
-
options
|
|
14
|
-
}) {
|
|
15
|
-
const records = await this.store.query(modelName, query, options);
|
|
16
|
-
if (isDestroyed(this) || isDestroying(this)) return;
|
|
17
|
-
this._records = records;
|
|
18
|
-
}
|
|
19
|
-
get records() {
|
|
20
|
-
return this._records;
|
|
21
|
-
}
|
|
22
|
-
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "_records", [tracked], {
|
|
23
|
-
configurable: true,
|
|
24
|
-
enumerable: true,
|
|
25
|
-
writable: true,
|
|
26
|
-
initializer: null
|
|
27
|
-
}), _applyDecoratedDescriptor(_class.prototype, "__WRAPPED_FUNCTION__", [action], Object.getOwnPropertyDescriptor(_class.prototype, "__WRAPPED_FUNCTION__"), _class.prototype)), _class);
|
|
28
|
-
|
|
29
|
-
export { Query };
|
|
30
|
-
//# sourceMappingURL=query.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sources":["../../../src/-private/resources/query.ts"],"sourcesContent":["import { tracked } from '@glimmer/tracking';\nimport { isDestroyed, isDestroying } from '@ember/destroyable';\nimport { action } from '@ember/object';\n\nimport { Request } from './request';\n\nimport type ArrayProxy from '@ember/array/proxy';\nimport type Store from '@ember-data/store';\n\ntype QueryParams = Parameters<Store['query']>;\nexport type QueryQuery = QueryParams[1];\nexport type QueryOptions = QueryParams[2];\n\ntype PositionalArgs = [string, QueryQuery];\nexport interface NamedArgs {\n options: QueryOptions;\n}\n\nexport interface Args {\n named: NamedArgs;\n positional: PositionalArgs;\n}\n\nexport class Query<Model, LocalArgs extends Args = Args> extends Request<LocalArgs> {\n @tracked private _records: ArrayProxy<Model> | undefined;\n\n @action\n async __WRAPPED_FUNCTION__([modelName, query]: PositionalArgs, { options }: NamedArgs) {\n const records = await this.store.query(modelName as never, query, options);\n\n if (isDestroyed(this) || isDestroying(this)) return;\n\n this._records = records;\n }\n\n get records(): ArrayProxy<Model> | undefined {\n return this._records;\n }\n}\n"],"names":["Query","_class","Request","constructor","args","_initializerDefineProperty","_descriptor","__WRAPPED_FUNCTION__","modelName","query","options","records","store","isDestroyed","isDestroying","_records","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor"],"mappings":";;;;;;AAuBaA,IAAAA,KAAK,IAAAC,MAAA,GAAX,MAAMD,KAAK,SAA+CE,OAAO,CAAY;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,mBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAGlF,EAAA,MACMC,oBAAoBA,CAAC,CAACC,SAAS,EAAEC,KAAK,CAAiB,EAAE;AAAEC,IAAAA,OAAAA;AAAmB,GAAC,EAAE;AACrF,IAAA,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACC,KAAK,CAACH,KAAK,CAACD,SAAS,EAAWC,KAAK,EAAEC,OAAO,CAAC,CAAA;IAE1E,IAAIG,WAAW,CAAC,IAAI,CAAC,IAAIC,YAAY,CAAC,IAAI,CAAC,EAAE,OAAA;IAE7C,IAAI,CAACC,QAAQ,GAAGJ,OAAO,CAAA;AACzB,GAAA;EAEA,IAAIA,OAAOA,GAAkC;IAC3C,OAAO,IAAI,CAACI,QAAQ,CAAA;AACtB,GAAA;AACF,CAAC,GAAAT,WAAA,GAAAU,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAAA,UAAA,EAAA,CAdEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAEPM,sBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAAxB,MAAA,CAAAgB,SAAA,EAAA,sBAAA,CAAA,EAAAhB,MAAA,CAAAgB,SAAA,IAAAhB,MAAA;;;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { R as Request } from '../../request-17f93aea.js';
|
|
2
|
-
import '@glimmer/tracking';
|
|
3
|
-
import '@ember/debug';
|
|
4
|
-
import '@ember/destroyable';
|
|
5
|
-
import '@ember/object';
|
|
6
|
-
import '@ember/service';
|
|
7
|
-
import '@ember/test-waiters';
|
|
8
|
-
import 'ember-resources';
|
|
9
|
-
//# sourceMappingURL=request.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-data-resources/loose-mode-compat/helpers/find-all";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-data-resources/loose-mode-compat/helpers/find-record";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-data-resources/loose-mode-compat/helpers/query-record";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "ember-data-resources/loose-mode-compat/helpers/query";
|
package/dist/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { FindAll } from './-private/resources/find-all.js';
|
|
2
|
-
export { FindRecord } from './-private/resources/find-record.js';
|
|
3
|
-
export { Query } from './-private/resources/query.js';
|
|
4
|
-
export { QueryRecord } from './-private/resources/query-record.js';
|
|
5
|
-
export { findAll, findRecord, query, queryRecord } from './js-helpers.js';
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|