@apigames/sdk-core 22.1.7 → 22.1.10
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.
|
@@ -80,6 +80,7 @@ class ResourceContainer {
|
|
|
80
80
|
else {
|
|
81
81
|
this._data = obj;
|
|
82
82
|
}
|
|
83
|
+
this._countQueryHash = undefined;
|
|
83
84
|
}
|
|
84
85
|
RemoveResourceFromMemoryStructure(resource) {
|
|
85
86
|
if (this.isResourceList(this.data)) {
|
|
@@ -91,6 +92,7 @@ class ResourceContainer {
|
|
|
91
92
|
else if (this.isResourceObject(this.data) && this.data.id === resource.id) {
|
|
92
93
|
this._data = undefined;
|
|
93
94
|
}
|
|
95
|
+
this._countQueryHash = undefined;
|
|
94
96
|
}
|
|
95
97
|
LoadResourceData(resourceData) {
|
|
96
98
|
if ((0, json_1.hasProperty)(resourceData, 'type') && (0, json_1.isString)(resourceData.type)) {
|
|
@@ -242,6 +242,12 @@ class ResourceObject {
|
|
|
242
242
|
else {
|
|
243
243
|
yield this.UpdateResource();
|
|
244
244
|
}
|
|
245
|
+
if ((0, json_1.isDefined)(this.attributes)) {
|
|
246
|
+
this.shadowAttributes.LoadData(this.attributes);
|
|
247
|
+
}
|
|
248
|
+
if ((0, json_1.isDefined)(this.relationships)) {
|
|
249
|
+
this.shadowRelationships.LoadData(this.relationships);
|
|
250
|
+
}
|
|
245
251
|
});
|
|
246
252
|
}
|
|
247
253
|
get type() {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isResourceObject = exports.isResourceContainer = void 0;
|
|
4
|
+
const json_1 = require("@apigames/json");
|
|
5
|
+
const classes_1 = require("../classes");
|
|
6
|
+
function isResourceContainer(value) {
|
|
7
|
+
return (0, json_1.isDefinedAndNotNull)(value) && (value instanceof classes_1.ResourceContainer);
|
|
8
|
+
}
|
|
9
|
+
exports.isResourceContainer = isResourceContainer;
|
|
10
|
+
function isResourceObject(value) {
|
|
11
|
+
return (0, json_1.isDefinedAndNotNull)(value)
|
|
12
|
+
&& (value instanceof classes_1.ResourceObject)
|
|
13
|
+
&& (typeof value.type === 'string');
|
|
14
|
+
}
|
|
15
|
+
exports.isResourceObject = isResourceObject;
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"description": "API Games SDK Core",
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"version": "22.1.
|
|
16
|
+
"version": "22.1.10",
|
|
17
17
|
"main": "lib/index.js",
|
|
18
18
|
"types": "lib/index.d.ts",
|
|
19
19
|
"scripts": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"test:watch": "jest --watch"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@apigames/json": "22.1.
|
|
37
|
-
"@apigames/rest-client": "22.1.
|
|
36
|
+
"@apigames/json": "22.1.3",
|
|
37
|
+
"@apigames/rest-client": "22.1.4",
|
|
38
38
|
"object-hash": "2.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"@types/date-and-time": "^0.13.0",
|
|
43
43
|
"@types/jest": "27.4.1",
|
|
44
44
|
"@types/node": "14.18.12",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
46
|
-
"@typescript-eslint/parser": "5.
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "5.18.0",
|
|
46
|
+
"@typescript-eslint/parser": "5.18.0",
|
|
47
47
|
"eslint": "8.12.0",
|
|
48
48
|
"eslint-config-airbnb": "19.0.4",
|
|
49
|
-
"eslint-plugin-import": "2.
|
|
49
|
+
"eslint-plugin-import": "2.26.0",
|
|
50
50
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
51
51
|
"eslint-plugin-react": "7.29.4",
|
|
52
|
-
"eslint-plugin-react-hooks": "4.
|
|
52
|
+
"eslint-plugin-react-hooks": "4.4.0",
|
|
53
53
|
"jest": "27.5.1",
|
|
54
54
|
"ts-jest": "27.1.4",
|
|
55
55
|
"typescript": "4.6.3"
|