ng2-rest 21.0.11 → 21.0.12

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 (40) 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/lib/axios-interceptors.js.map +1 -1
  7. package/lib/build-info._auto-generated_.d.ts +1 -1
  8. package/lib/build-info._auto-generated_.js +1 -1
  9. package/lib/env/env.angular-node-app.d.ts +0 -2
  10. package/lib/env/env.angular-node-app.js +1 -3
  11. package/lib/env/env.angular-node-app.js.map +1 -1
  12. package/lib/env/env.docs-webapp.d.ts +0 -2
  13. package/lib/env/env.docs-webapp.js +1 -3
  14. package/lib/env/env.docs-webapp.js.map +1 -1
  15. package/lib/env/env.electron-app.d.ts +0 -2
  16. package/lib/env/env.electron-app.js +1 -3
  17. package/lib/env/env.electron-app.js.map +1 -1
  18. package/lib/env/env.mobile-app.d.ts +0 -2
  19. package/lib/env/env.mobile-app.js +1 -3
  20. package/lib/env/env.mobile-app.js.map +1 -1
  21. package/lib/env/env.npm-lib-and-cli-tool.d.ts +0 -2
  22. package/lib/env/env.npm-lib-and-cli-tool.js +1 -3
  23. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  24. package/lib/env/env.vscode-plugin.d.ts +0 -2
  25. package/lib/env/env.vscode-plugin.js +1 -3
  26. package/lib/env/env.vscode-plugin.js.map +1 -1
  27. package/lib/index._auto-generated_.js +1 -1
  28. package/lib/index._auto-generated_.js.map +1 -1
  29. package/lib/resource-service.d.ts +0 -1
  30. package/lib/resource-service.js +5 -7
  31. package/lib/resource-service.js.map +1 -1
  32. package/lib/rest-request.d.ts +0 -1
  33. package/lib/rest-request.js +4 -3
  34. package/lib/rest-request.js.map +1 -1
  35. package/package.json +1 -1
  36. package/tmp-environment.json +8 -4
  37. package/websql/fesm2022/ng2-rest-websql.mjs +11 -9
  38. package/websql/fesm2022/ng2-rest-websql.mjs.map +1 -1
  39. package/websql/package.json +1 -1
  40. package/websql/types/ng2-rest-websql.d.ts +0 -2
@@ -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] = {