ng2-rest 13.0.34 → 13.1.2
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/app.d.ts +1 -1
- package/app.js +4 -4
- package/app.js.map +1 -1
- package/browser/esm2020/lib/mapping.mjs +1 -4
- package/browser/esm2020/lib/models.mjs +7 -1
- package/browser/esm2020/lib/rest-headers.mjs +2 -2
- package/browser/fesm2015/ng2-rest.mjs +8 -4
- package/browser/fesm2015/ng2-rest.mjs.map +1 -1
- package/browser/fesm2020/ng2-rest.mjs +8 -4
- package/browser/fesm2020/ng2-rest.mjs.map +1 -1
- package/browser/lib/models.d.ts +2 -2
- package/client/esm2020/lib/mapping.mjs +1 -4
- package/client/esm2020/lib/models.mjs +7 -1
- package/client/esm2020/lib/rest-headers.mjs +2 -2
- package/client/fesm2015/ng2-rest.mjs +8 -4
- package/client/fesm2015/ng2-rest.mjs.map +1 -1
- package/client/fesm2020/ng2-rest.mjs +8 -4
- package/client/fesm2020/ng2-rest.mjs.map +1 -1
- package/client/lib/models.d.ts +2 -2
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/lib/content-type.js +1 -1
- package/lib/content-type.js.map +1 -1
- package/lib/cookie.js +1 -1
- package/lib/cookie.js.map +1 -1
- package/lib/helpers.js +2 -2
- package/lib/helpers.js.map +1 -1
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/mapping.js +1 -4
- package/lib/mapping.js.map +1 -1
- package/lib/models.d.ts +2 -2
- package/lib/models.js +11 -5
- package/lib/models.js.map +1 -1
- package/lib/other/simple-resource.js +1 -1
- package/lib/other/simple-resource.js.map +1 -1
- package/lib/params.js +1 -1
- package/lib/params.js.map +1 -1
- package/lib/request-cache.js +1 -1
- package/lib/request-cache.js.map +1 -1
- package/lib/resource.service.js +1 -1
- package/lib/resource.service.js.map +1 -1
- package/lib/rest-headers.js +4 -3
- package/lib/rest-headers.js.map +1 -1
- package/lib/rest-request.js +3 -3
- package/lib/rest-request.js.map +1 -1
- package/lib/rest.class.js +1 -1
- package/lib/rest.class.js.map +1 -1
- package/package.json +4 -4
- package/package.json_tnp.json5 +9 -0
- package/tmp-environment.json +56 -52
- package/websql/esm2020/lib/mapping.mjs +1 -4
- package/websql/esm2020/lib/models.mjs +7 -1
- package/websql/esm2020/lib/rest-headers.mjs +2 -2
- package/websql/fesm2015/ng2-rest.mjs +8 -4
- package/websql/fesm2015/ng2-rest.mjs.map +1 -1
- package/websql/fesm2020/ng2-rest.mjs +8 -4
- package/websql/fesm2020/ng2-rest.mjs.map +1 -1
- package/websql/lib/models.d.ts +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Subject, Observable, firstValueFrom } from 'rxjs';
|
|
2
2
|
import { Log, Level } from 'ng2-logger/browser';
|
|
3
3
|
import { diffChars } from 'diff';
|
|
4
|
-
import { Helpers as Helpers$1,
|
|
4
|
+
import { _, Helpers as Helpers$1, CoreHelpers } from 'tnp-core/browser';
|
|
5
5
|
import { walk } from 'lodash-walk-object/browser';
|
|
6
6
|
import { CLASS, SYMBOL, Models as Models$1 } from 'typescript-class-helpers/browser';
|
|
7
7
|
import { JSON10 } from 'json10/browser';
|
|
@@ -10,7 +10,6 @@ import axios from 'axios';
|
|
|
10
10
|
var Mapping;
|
|
11
11
|
(function (Mapping) {
|
|
12
12
|
function decode(json, autodetect = false) {
|
|
13
|
-
Helpers$1.simulateBrowser = true;
|
|
14
13
|
// console.log('DECODE isBrowser', HelpersLog.isBrowser)
|
|
15
14
|
if (_.isUndefined(json)) {
|
|
16
15
|
return void 0;
|
|
@@ -19,7 +18,6 @@ var Mapping;
|
|
|
19
18
|
if (autodetect) {
|
|
20
19
|
mapping = _.merge(getMappingNaive(json), mapping);
|
|
21
20
|
}
|
|
22
|
-
Helpers$1.simulateBrowser = false;
|
|
23
21
|
return mapping;
|
|
24
22
|
}
|
|
25
23
|
Mapping.decode = decode;
|
|
@@ -699,7 +697,7 @@ class RestHeaders {
|
|
|
699
697
|
toJSON() {
|
|
700
698
|
const serialized = {};
|
|
701
699
|
if (!this._headers) {
|
|
702
|
-
debugger
|
|
700
|
+
// debugger
|
|
703
701
|
}
|
|
704
702
|
this._headers.forEach((values, name) => {
|
|
705
703
|
const split = [];
|
|
@@ -1017,6 +1015,9 @@ var Models;
|
|
|
1017
1015
|
return res;
|
|
1018
1016
|
}
|
|
1019
1017
|
get json() {
|
|
1018
|
+
if (this.entity && typeof this.entity === 'function') {
|
|
1019
|
+
return this.entity(); // @LAST
|
|
1020
|
+
}
|
|
1020
1021
|
if (this.entity && typeof this.entity === 'object') {
|
|
1021
1022
|
const json = this.toJSON(this.body, this.isArray);
|
|
1022
1023
|
return Mapping.encode(json, this.entity, this.circular);
|
|
@@ -1069,6 +1070,9 @@ var Models;
|
|
|
1069
1070
|
this.circular = circular;
|
|
1070
1071
|
this.jobid = jobid;
|
|
1071
1072
|
this.isArray = isArray;
|
|
1073
|
+
// console.log({
|
|
1074
|
+
// sourceRequest, responseText, headers, statusCode, entity, circular, jobid, isArray
|
|
1075
|
+
// })
|
|
1072
1076
|
this.init();
|
|
1073
1077
|
}
|
|
1074
1078
|
init() {
|