@alchemy_cms/json_api 1.2.0 → 1.3.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/dist/alchemy-json_api.js +1 -7
- package/dist/deserialize.js +1 -7
- package/package.json +5 -4
package/dist/alchemy-json_api.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var structuredClone = require('@ungap/structured-clone');
|
|
6
4
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var structuredClone__default = /*#__PURE__*/_interopDefaultLegacy(structuredClone);
|
|
10
|
-
|
|
11
5
|
function deserialize(originalResponse) {
|
|
12
|
-
const response =
|
|
6
|
+
const response = structuredClone(originalResponse);
|
|
13
7
|
const included = response.included || [];
|
|
14
8
|
if (Array.isArray(response.data)) {
|
|
15
9
|
return response.data.map(data => {
|
package/dist/deserialize.js
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var structuredClone = require('@ungap/structured-clone');
|
|
6
4
|
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var structuredClone__default = /*#__PURE__*/_interopDefaultLegacy(structuredClone);
|
|
10
|
-
|
|
11
5
|
function deserialize(originalResponse) {
|
|
12
|
-
const response =
|
|
6
|
+
const response = structuredClone(originalResponse);
|
|
13
7
|
const included = response.included || [];
|
|
14
8
|
if (Array.isArray(response.data)) {
|
|
15
9
|
return response.data.map(data => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alchemy_cms/json_api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "JSON API deserializer for AlchemyCMS",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": {
|
|
@@ -28,14 +28,15 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/core": "^7.19.0",
|
|
30
30
|
"@babel/preset-env": "^7.19.0",
|
|
31
|
-
"@rollup/plugin-babel": "^
|
|
31
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
32
32
|
"babel-jest": "^29.0.2",
|
|
33
33
|
"jest": "^29.0.2",
|
|
34
|
-
"prettier": "^
|
|
35
|
-
"rollup": "^
|
|
34
|
+
"prettier": "^3.3.3",
|
|
35
|
+
"rollup": "^4.24.4"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "rollup --config",
|
|
39
|
+
"lint": "prettier --check 'src/**/*.js'",
|
|
39
40
|
"test": "jest"
|
|
40
41
|
},
|
|
41
42
|
"browserslist": "> 0.25%, not dead"
|