ng2-rest 21.0.11 → 21.0.15

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.
Files changed (115) hide show
  1. package/README.md +0 -8
  2. package/browser/fesm2022/ng2-rest-browser.mjs +11 -9
  3. package/browser/fesm2022/ng2-rest-browser.mjs.map +1 -1
  4. package/browser/package.json +1 -1
  5. package/browser/types/ng2-rest-browser.d.ts +0 -2
  6. package/browser-prod/README.md +24 -0
  7. package/browser-prod/fesm2022/ng2-rest-browser.mjs +1804 -0
  8. package/browser-prod/fesm2022/ng2-rest-browser.mjs.map +1 -0
  9. package/browser-prod/types/ng2-rest-browser.d.ts +427 -0
  10. package/lib/axios-interceptors.js.map +1 -1
  11. package/lib/build-info._auto-generated_.d.ts +5 -1
  12. package/lib/build-info._auto-generated_.js +6 -2
  13. package/lib/build-info._auto-generated_.js.map +1 -1
  14. package/lib/env/env.angular-node-app.d.ts +30 -30
  15. package/lib/env/env.angular-node-app.js +32 -32
  16. package/lib/env/env.angular-node-app.js.map +1 -1
  17. package/lib/env/env.docs-webapp.d.ts +30 -30
  18. package/lib/env/env.docs-webapp.js +32 -32
  19. package/lib/env/env.docs-webapp.js.map +1 -1
  20. package/lib/env/env.electron-app.d.ts +30 -30
  21. package/lib/env/env.electron-app.js +32 -32
  22. package/lib/env/env.electron-app.js.map +1 -1
  23. package/lib/env/env.mobile-app.d.ts +30 -30
  24. package/lib/env/env.mobile-app.js +32 -32
  25. package/lib/env/env.mobile-app.js.map +1 -1
  26. package/lib/env/env.npm-lib-and-cli-tool.d.ts +30 -30
  27. package/lib/env/env.npm-lib-and-cli-tool.js +32 -32
  28. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  29. package/lib/env/env.vscode-plugin.d.ts +30 -30
  30. package/lib/env/env.vscode-plugin.js +32 -32
  31. package/lib/env/env.vscode-plugin.js.map +1 -1
  32. package/lib/index._auto-generated_.js +1 -1
  33. package/lib/index._auto-generated_.js.map +1 -1
  34. package/lib/resource-service.d.ts +0 -1
  35. package/lib/resource-service.js +5 -7
  36. package/lib/resource-service.js.map +1 -1
  37. package/lib/rest-request.d.ts +0 -1
  38. package/lib/rest-request.js +4 -3
  39. package/lib/rest-request.js.map +1 -1
  40. package/lib-prod/axios-interceptors.d.ts +22 -0
  41. package/lib-prod/axios-interceptors.js +22 -0
  42. package/lib-prod/axios-interceptors.js.map +1 -0
  43. package/lib-prod/build-info._auto-generated_.d.ts +24 -0
  44. package/lib-prod/build-info._auto-generated_.js +30 -0
  45. package/lib-prod/build-info._auto-generated_.js.map +1 -0
  46. package/lib-prod/content-type.d.ts +5 -0
  47. package/lib-prod/content-type.js +15 -0
  48. package/lib-prod/content-type.js.map +1 -0
  49. package/lib-prod/cookie.d.ts +8 -0
  50. package/lib-prod/cookie.js +32 -0
  51. package/lib-prod/cookie.js.map +1 -0
  52. package/lib-prod/env/env.angular-node-app.d.ts +64 -0
  53. package/lib-prod/env/env.angular-node-app.js +71 -0
  54. package/lib-prod/env/env.angular-node-app.js.map +1 -0
  55. package/lib-prod/env/env.docs-webapp.d.ts +64 -0
  56. package/lib-prod/env/env.docs-webapp.js +71 -0
  57. package/lib-prod/env/env.docs-webapp.js.map +1 -0
  58. package/lib-prod/env/env.electron-app.d.ts +64 -0
  59. package/lib-prod/env/env.electron-app.js +71 -0
  60. package/lib-prod/env/env.electron-app.js.map +1 -0
  61. package/lib-prod/env/env.mobile-app.d.ts +64 -0
  62. package/lib-prod/env/env.mobile-app.js +71 -0
  63. package/lib-prod/env/env.mobile-app.js.map +1 -0
  64. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +64 -0
  65. package/lib-prod/env/env.npm-lib-and-cli-tool.js +71 -0
  66. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -0
  67. package/lib-prod/env/env.vscode-plugin.d.ts +64 -0
  68. package/lib-prod/env/env.vscode-plugin.js +71 -0
  69. package/lib-prod/env/env.vscode-plugin.js.map +1 -0
  70. package/lib-prod/env/index.d.ts +6 -0
  71. package/lib-prod/env/index.js +23 -0
  72. package/lib-prod/env/index.js.map +1 -0
  73. package/lib-prod/helpers.d.ts +11 -0
  74. package/lib-prod/helpers.js +26 -0
  75. package/lib-prod/helpers.js.map +1 -0
  76. package/lib-prod/index._auto-generated_.d.ts +0 -0
  77. package/lib-prod/index._auto-generated_.js +6 -0
  78. package/lib-prod/index._auto-generated_.js.map +1 -0
  79. package/lib-prod/index.d.ts +10 -0
  80. package/lib-prod/index.js +30 -0
  81. package/lib-prod/index.js.map +1 -0
  82. package/lib-prod/mapping.d.ts +13 -0
  83. package/lib-prod/mapping.js +280 -0
  84. package/lib-prod/mapping.js.map +1 -0
  85. package/lib-prod/models.d.ts +186 -0
  86. package/lib-prod/models.js +214 -0
  87. package/lib-prod/models.js.map +1 -0
  88. package/lib-prod/other/simple-resource.d.ts +30 -0
  89. package/lib-prod/other/simple-resource.js +138 -0
  90. package/lib-prod/other/simple-resource.js.map +1 -0
  91. package/lib-prod/params.d.ts +24 -0
  92. package/lib-prod/params.js +319 -0
  93. package/lib-prod/params.js.map +1 -0
  94. package/lib-prod/resource-service.d.ts +43 -0
  95. package/lib-prod/resource-service.js +210 -0
  96. package/lib-prod/resource-service.js.map +1 -0
  97. package/lib-prod/rest-headers.d.ts +58 -0
  98. package/lib-prod/rest-headers.js +141 -0
  99. package/lib-prod/rest-headers.js.map +1 -0
  100. package/lib-prod/rest-request.d.ts +29 -0
  101. package/lib-prod/rest-request.js +376 -0
  102. package/lib-prod/rest-request.js.map +1 -0
  103. package/lib-prod/rest.class.d.ts +36 -0
  104. package/lib-prod/rest.class.js +145 -0
  105. package/lib-prod/rest.class.js.map +1 -0
  106. package/package.json +9 -7
  107. package/tmp-environment.json +8 -4
  108. package/websql/fesm2022/ng2-rest-websql.mjs +11 -9
  109. package/websql/fesm2022/ng2-rest-websql.mjs.map +1 -1
  110. package/websql/package.json +1 -1
  111. package/websql/types/ng2-rest-websql.d.ts +0 -2
  112. package/websql-prod/README.md +24 -0
  113. package/websql-prod/fesm2022/ng2-rest-websql.mjs +1804 -0
  114. package/websql-prod/fesm2022/ng2-rest-websql.mjs.map +1 -0
  115. package/websql-prod/types/ng2-rest-websql.d.ts +427 -0
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ //#region import
3
+ // import { Log, Level } from 'ng2-logger/src';
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Rest = void 0;
6
+ // const log = Log.create('rest.class', Level.__NOTHING)
7
+ const lib_prod_1 = require("typescript-class-helpers/lib-prod");
8
+ const content_type_1 = require("./content-type");
9
+ const params_1 = require("./params");
10
+ const rest_headers_1 = require("./rest-headers");
11
+ //#endregion
12
+ class Rest {
13
+ request;
14
+ meta;
15
+ customContentType;
16
+ mockHttp;
17
+ mock(mock) {
18
+ if (typeof mock === 'function' || typeof mock === 'object') {
19
+ this.mockHttp = mock;
20
+ }
21
+ else {
22
+ throw `[ng2-rest]
23
+ .model(...)
24
+ .mock( < BAD MOCK DATA > )
25
+ ...
26
+ `;
27
+ }
28
+ return this;
29
+ }
30
+ //#region private fields
31
+ __meta_endpoint;
32
+ _endpointRest;
33
+ get endpoint() {
34
+ let e = this.__meta_endpoint;
35
+ if (this.restQueryParams !== void 0 &&
36
+ this._endpointRest !== void 0 &&
37
+ typeof this._endpointRest === 'string' &&
38
+ this._endpointRest.trim() !== '')
39
+ e = this._endpointRest;
40
+ return e;
41
+ }
42
+ restQueryParams;
43
+ set __rest_endpoint(endpoint) {
44
+ this._endpointRest = endpoint;
45
+ if (endpoint === void 0) {
46
+ this.restQueryParams = void 0;
47
+ }
48
+ else {
49
+ this.restQueryParams = (0, params_1.getRestParams)(endpoint, this.__meta_endpoint);
50
+ }
51
+ }
52
+ creatUrl(params, doNotSerializeParams = false) {
53
+ return `${this.endpoint}${(0, params_1.getParamsUrl)(params, doNotSerializeParams)}`;
54
+ }
55
+ //#endregion
56
+ //#region constructor
57
+ _headers = rest_headers_1.RestHeaders.from(content_type_1.CONTENT_TYPE.APPLICATION_JSON);
58
+ get headers() {
59
+ return this._headers;
60
+ }
61
+ constructor(endpoint, request, meta, customContentType) {
62
+ this.request = request;
63
+ this.meta = meta;
64
+ this.customContentType = customContentType;
65
+ this.__meta_endpoint = endpoint;
66
+ }
67
+ //#endregion
68
+ //#region req
69
+ req(method, requestBody, params, axiosOptions, isArray = false) {
70
+ axiosOptions = axiosOptions || {};
71
+ const modelUrl = this.creatUrl(params, !!axiosOptions.doNotSerializeParams);
72
+ const isFormData = lib_prod_1.CLASS.getNameFromObject(requestBody) === 'FormData';
73
+ const body = isFormData
74
+ ? requestBody
75
+ : requestBody
76
+ ? JSON.stringify(requestBody)
77
+ : void 0;
78
+ // console.log('this.customContentType', this.customContentType)
79
+ if (this.customContentType) {
80
+ const customHeaderKeys = this.customContentType.keys();
81
+ const currentHeaderKeys = this._headers.keys();
82
+ currentHeaderKeys
83
+ .filter(key => !customHeaderKeys.includes(key))
84
+ .forEach(key => {
85
+ this.customContentType.set(key, this._headers.get(key));
86
+ });
87
+ this._headers = this.customContentType;
88
+ }
89
+ else {
90
+ this._headers = rest_headers_1.RestHeaders.from(content_type_1.CONTENT_TYPE.APPLICATION_JSON);
91
+ }
92
+ // console.log("_headers", this.headers)
93
+ const result = this.request[method.toLowerCase()](modelUrl, body, this.headers, this.meta, isArray, this.mockHttp, axiosOptions);
94
+ this.mockHttp = void 0;
95
+ return result;
96
+ }
97
+ //#endregion
98
+ //#region http methods
99
+ array = {
100
+ get: (item, params = void 0, axiosOptions) => {
101
+ return this.req('get', item, params, axiosOptions, true);
102
+ },
103
+ head: (item, params = void 0, axiosOptions) => {
104
+ return this.req('head', item, params, axiosOptions, true);
105
+ },
106
+ post: (item, params, axiosOptions) => {
107
+ return this.req('post', item, params, axiosOptions, true);
108
+ },
109
+ put: (item, params, axiosOptions) => {
110
+ return this.req('put', item, params, axiosOptions, true);
111
+ },
112
+ patch: (item, params, axiosOptions) => {
113
+ return this.req('patch', item, params, axiosOptions, true);
114
+ },
115
+ delete: (item, params, axiosOptions) => {
116
+ return this.req('delete', item, params, axiosOptions, true);
117
+ },
118
+ jsonp: (item, params, axiosOptions) => {
119
+ return this.req('jsonp', item, params, axiosOptions, true);
120
+ },
121
+ };
122
+ get(item, params, axiosOptions) {
123
+ return this.req('get', item, params, axiosOptions);
124
+ }
125
+ head(item, params, axiosOptions) {
126
+ return this.req('head', item, params, axiosOptions);
127
+ }
128
+ post(item, params, axiosOptions) {
129
+ return this.req('post', item, params, axiosOptions);
130
+ }
131
+ put(item, params, axiosOptions) {
132
+ return this.req('put', item, params, axiosOptions);
133
+ }
134
+ patch(item, params, axiosOptions) {
135
+ return this.req('patch', item, params, axiosOptions);
136
+ }
137
+ delete(item, params, axiosOptions) {
138
+ return this.req('delete', item, params, axiosOptions);
139
+ }
140
+ jsonp(item, params, axiosOptions) {
141
+ return this.req('jsonp', item, params, axiosOptions);
142
+ }
143
+ }
144
+ exports.Rest = Rest;
145
+ //# sourceMappingURL=rest.class.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest.class.js","sourceRoot":"","sources":[""],"names":[],"mappings":";AAAA,gBAAgB;AAChB,+CAA+C;;;AAE/C,wDAAwD;AAExD,gEAA0D;AAE1D,iDAA8C;AAE9C,qCAAuD;AACvD,iDAA6C;AAE7C,YAAY;AAEZ,MAAa,IAAI;IAoDL;IACA;IACA;IArDF,QAAQ,CAAkB;IAClC,IAAI,CAAC,IAAqB;QACxB,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC3D,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,MAAM;;;;OAIL,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,yBAAyB;IACjB,eAAe,CAAS;IACxB,aAAa,CAAS;IAC9B,IAAY,QAAQ;QAClB,IAAI,CAAC,GAAG,IAAI,CAAC,eAAe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AAO,EACP,MAA2B,EAC3B,YAA+C;QAE/C,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC;IACvD,CAAC;CAEF;AA7ND,oBA6NC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng2-rest",
3
- "version": "21.0.11",
3
+ "version": "21.0.15",
4
4
  "scripts": {
5
5
  "taon init": "taon init",
6
6
  "taon start": "taon start",
@@ -30,14 +30,16 @@
30
30
  "url": "https://github.com/darekf77/ng2-rest/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@types/diff": "~5.2.3",
34
- "diff": "~4.0.2",
35
33
  "axios": "~1.13.2",
36
- "lodash": "~4.17.21",
37
- "@types/lodash": "4.14.92",
34
+ "diff": "~4.0.2",
35
+ "express": "~4.22.1",
36
+ "form-data": "~4.0.5",
37
+ "rxjs": "~7.8.2",
38
+ "json10": "~21.0.0",
39
+ "lodash-walk-object": "~21.0.0",
38
40
  "ng2-logger": "~21.0.0",
39
- "json5": "~2.2.3",
40
- "json10": "~21.0.0"
41
+ "tnp-core": "~21.0.0",
42
+ "typescript-class-helpers": "~21.0.0"
41
43
  },
42
44
  "description": "Description for ng2-rest. Hello world!",
43
45
  "keywords": [
@@ -8,7 +8,11 @@
8
8
  "container": {
9
9
  "only": []
10
10
  },
11
- "ports": {},
11
+ "ports": {
12
+ "ngNormalAppPort": 4245,
13
+ "ngWebsqlAppPort": 4246,
14
+ "nodeBeAppPort": 4120
15
+ },
12
16
  "init": {},
13
17
  "build": {
14
18
  "pwa": {},
@@ -26,12 +30,12 @@
26
30
  "releaseType": "manual",
27
31
  "targetArtifact": "npm-lib-and-cli-tool",
28
32
  "envName": "__",
29
- "resolvedNewVersion": "19.0.23"
33
+ "resolvedNewVersion": "19.0.21"
30
34
  },
31
35
  "copyToManager": {},
32
36
  "buildInfo": {
33
- "date": "2025-05-29T20:31:23.000Z",
34
- "hash": "90550ec50dcb4ba363573058503cfbc7f053abbb"
37
+ "date": "2025-05-28T01:49:22.000Z",
38
+ "hash": "ac8fd77b08f971ae984b26605f9d468c12f27334"
35
39
  },
36
40
  "currentProjectName": "ng2-rest",
37
41
  "currentProjectType": "isomorphic-lib",
@@ -1,6 +1,6 @@
1
1
  import { from, firstValueFrom, Subject, Observable } from 'rxjs';
2
- import { _, UtilsOs, CoreHelpers, CoreModels, Helpers as Helpers$1 } from 'tnp-core/websql';
3
2
  import { diffChars } from 'diff';
3
+ import { _, UtilsOs, CoreHelpers, CoreModels, Helpers as Helpers$1 } from 'tnp-core/websql';
4
4
  import { Log, Level } from 'ng2-logger/websql';
5
5
  import { walk } from 'lodash-walk-object/websql';
6
6
  import { CLASS, SYMBOL, Models as Models$1 } from 'typescript-class-helpers/websql';
@@ -992,6 +992,7 @@ class RestRequest {
992
992
  //#endregion
993
993
  this.replaySubjects = {};
994
994
  }
995
+ //#region fields
995
996
  static { this.jobId = 0; }
996
997
  handlerResult(options, sourceRequest) {
997
998
  if (_.isUndefined(options)) {
@@ -1231,8 +1232,10 @@ class RestRequest {
1231
1232
  next: a => observer.next(a),
1232
1233
  error: a => observer.error(a),
1233
1234
  complete: () => {
1234
- sub.unsubscribe();
1235
- observer.complete();
1235
+ setTimeout(() => {
1236
+ sub.unsubscribe();
1237
+ observer.complete();
1238
+ });
1236
1239
  },
1237
1240
  });
1238
1241
  });
@@ -1477,9 +1480,6 @@ class Resource {
1477
1480
  }
1478
1481
  static { this.enableWarnings = true; }
1479
1482
  //#region private mthods and fields
1480
- static initAngularNgZone(zone) {
1481
- RestRequest.zone = zone;
1482
- }
1483
1483
  checkNestedModels(model, allModels) {
1484
1484
  // if (model.indexOf('/') !== -1) { //TODO make this better, becouse now I unecesary checking shit
1485
1485
  for (let p in allModels) {
@@ -1557,9 +1557,11 @@ Instead use nested approach: /book/:bookid/author/:authorid
1557
1557
  url = url.slice(0, url.length - 1);
1558
1558
  // log.i('url after', url);
1559
1559
  if (Resource.endpoints[e] !== void 0) {
1560
- Helpers$1.log('Cannot use map function at the same API endpoint again (' +
1561
- Resource.endpoints[e].url +
1562
- ')');
1560
+ // Helpers.log(
1561
+ // 'Cannot use map function at the same API endpoint again (' +
1562
+ // Resource.endpoints[e].url +
1563
+ // ')',
1564
+ // );
1563
1565
  return false;
1564
1566
  }
1565
1567
  Resource.endpoints[e] = {