@ember-data/store 4.9.0-alpha.4 → 4.9.0-alpha.5
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.
|
@@ -414,7 +414,7 @@ export class NonSingletonRecordDataManager implements RecordData {
|
|
|
414
414
|
* @method hasChangedAttributes
|
|
415
415
|
* @public
|
|
416
416
|
* @deprecated
|
|
417
|
-
* @returns
|
|
417
|
+
* @returns {boolean}
|
|
418
418
|
*/
|
|
419
419
|
hasChangedAttributes(): boolean {
|
|
420
420
|
const recordData = this.#recordData;
|
|
@@ -429,7 +429,7 @@ export class NonSingletonRecordDataManager implements RecordData {
|
|
|
429
429
|
* @method hasChangedAttrs
|
|
430
430
|
* @public
|
|
431
431
|
* @param identifier
|
|
432
|
-
* @returns
|
|
432
|
+
* @returns {boolean}
|
|
433
433
|
*/
|
|
434
434
|
hasChangedAttrs(identifier: StableRecordIdentifier): boolean {
|
|
435
435
|
const recordData = this.#recordData;
|
|
@@ -13,6 +13,7 @@ import { reject, resolve } from 'rsvp';
|
|
|
13
13
|
|
|
14
14
|
import type DSModelClass from '@ember-data/model';
|
|
15
15
|
import { HAS_MODEL_PACKAGE, HAS_RECORD_DATA_PACKAGE } from '@ember-data/private-build-infra';
|
|
16
|
+
import { LOG_PAYLOADS } from '@ember-data/private-build-infra/debugging';
|
|
16
17
|
import {
|
|
17
18
|
DEPRECATE_HAS_RECORD,
|
|
18
19
|
DEPRECATE_JSON_API_FALLBACK,
|
|
@@ -2119,6 +2120,16 @@ class Store extends Service {
|
|
|
2119
2120
|
if (DEBUG) {
|
|
2120
2121
|
assertDestroyingStore(this, '_push');
|
|
2121
2122
|
}
|
|
2123
|
+
if (LOG_PAYLOADS) {
|
|
2124
|
+
try {
|
|
2125
|
+
let data = JSON.parse(JSON.stringify(jsonApiDoc));
|
|
2126
|
+
// eslint-disable-next-line no-console
|
|
2127
|
+
console.log('EmberData | Payload - push', data);
|
|
2128
|
+
} catch (e) {
|
|
2129
|
+
// eslint-disable-next-line no-console
|
|
2130
|
+
console.log('EmberData | Payload - push', jsonApiDoc);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2122
2133
|
let ret;
|
|
2123
2134
|
this._join(() => {
|
|
2124
2135
|
let included = jsonApiDoc.included;
|
|
@@ -2300,6 +2311,16 @@ class Store extends Service {
|
|
|
2300
2311
|
let fetchManagerPromise = this._fetchManager.scheduleSave(identifier, saveOptions);
|
|
2301
2312
|
return fetchManagerPromise.then(
|
|
2302
2313
|
(payload) => {
|
|
2314
|
+
if (LOG_PAYLOADS) {
|
|
2315
|
+
try {
|
|
2316
|
+
let data = payload ? JSON.parse(JSON.stringify(payload)) : payload;
|
|
2317
|
+
// eslint-disable-next-line no-console
|
|
2318
|
+
console.log(`EmberData | Payload - ${operation}`, data);
|
|
2319
|
+
} catch (e) {
|
|
2320
|
+
// eslint-disable-next-line no-console
|
|
2321
|
+
console.log(`EmberData | Payload - ${operation}`, payload);
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2303
2324
|
/*
|
|
2304
2325
|
// TODO @runspired re-evaluate the below claim now that
|
|
2305
2326
|
// the save request pipeline is more streamlined.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/store",
|
|
3
|
-
"version": "4.9.0-alpha.
|
|
3
|
+
"version": "4.9.0-alpha.5",
|
|
4
4
|
"description": "The core of EmberData. Provides the Store service which coordinates the cache with the network and presentation layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -12,17 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"author": "",
|
|
15
|
-
"directories": {
|
|
16
|
-
"doc": "doc",
|
|
17
|
-
"test": "tests"
|
|
18
|
-
},
|
|
15
|
+
"directories": {},
|
|
19
16
|
"scripts": {
|
|
20
17
|
"build": "ember build",
|
|
21
18
|
"start": "ember serve"
|
|
22
19
|
},
|
|
23
20
|
"dependencies": {
|
|
24
|
-
"@ember-data/canary-features": "4.9.0-alpha.
|
|
25
|
-
"@ember-data/private-build-infra": "4.9.0-alpha.
|
|
21
|
+
"@ember-data/canary-features": "4.9.0-alpha.5",
|
|
22
|
+
"@ember-data/private-build-infra": "4.9.0-alpha.5",
|
|
26
23
|
"@ember/string": "^3.0.0",
|
|
27
24
|
"@embroider/macros": "^1.8.3",
|
|
28
25
|
"@glimmer/tracking": "^1.1.2",
|
|
@@ -33,7 +30,7 @@
|
|
|
33
30
|
"ember-cli-typescript": "^5.1.1"
|
|
34
31
|
},
|
|
35
32
|
"devDependencies": {
|
|
36
|
-
"@ember-data/unpublished-test-infra": "4.9.0-alpha.
|
|
33
|
+
"@ember-data/unpublished-test-infra": "4.9.0-alpha.5",
|
|
37
34
|
"@ember/optional-features": "^2.0.0",
|
|
38
35
|
"@ember/test-helpers": "~2.7.0",
|
|
39
36
|
"@types/ember": "^4.0.1",
|