@rxap/remote-method 21.0.1 → 22.0.0-dev.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/compodoc/changelog.html +5 -0
  3. package/compodoc/dependencies.html +4 -4
  4. package/compodoc/js/search/search_index.js +2 -2
  5. package/compodoc/properties.html +1 -1
  6. package/docs/documentation.json +130 -130
  7. package/docs/html/classes/BaseRemoteMethod.html +10 -10
  8. package/docs/html/classes/ProxyRemoteMethod.html +10 -10
  9. package/docs/html/classes/RemoteMethodLoader.html +2 -2
  10. package/docs/html/classes/RxapRemoteMethodError.html +5 -5
  11. package/docs/html/functions/RxapRemoteMethod.html +1 -1
  12. package/docs/html/hierarchy.html +1 -1
  13. package/docs/html/index.html +2 -2
  14. package/docs/html/interfaces/BaseRemoteMethodMetadata.html +2 -2
  15. package/docs/html/modules.html +1 -1
  16. package/docs/html/variables/REMOTE_METHOD_META_DATA.html +1 -1
  17. package/docs/html/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.html +1 -1
  18. package/docs/markdown/README.md +1 -1
  19. package/docs/markdown/classes/BaseRemoteMethod.md +31 -31
  20. package/docs/markdown/classes/ProxyRemoteMethod.md +32 -32
  21. package/docs/markdown/classes/RemoteMethodLoader.md +4 -4
  22. package/docs/markdown/classes/RxapRemoteMethodError.md +16 -16
  23. package/docs/markdown/functions/RxapRemoteMethod.md +2 -2
  24. package/docs/markdown/globals.md +2 -2
  25. package/docs/markdown/interfaces/BaseRemoteMethodMetadata.md +4 -4
  26. package/docs/markdown/variables/REMOTE_METHOD_META_DATA.md +2 -2
  27. package/docs/markdown/variables/RXAP_PROXY_REMOTE_METHOD_TARGET.md +2 -2
  28. package/docs/wiki/Class.BaseRemoteMethod.md +30 -30
  29. package/docs/wiki/Class.ProxyRemoteMethod.md +31 -31
  30. package/docs/wiki/Class.RemoteMethodLoader.md +3 -3
  31. package/docs/wiki/Class.RxapRemoteMethodError.md +15 -15
  32. package/docs/wiki/Function.RxapRemoteMethod.md +1 -1
  33. package/docs/wiki/Interface.BaseRemoteMethodMetadata.md +3 -3
  34. package/docs/wiki/Variable.REMOTE_METHOD_META_DATA.md +1 -1
  35. package/docs/wiki/Variable.RXAP_PROXY_REMOTE_METHOD_TARGET.md +1 -1
  36. package/docs/wiki/globals.md +1 -1
  37. package/fesm2022/rxap-remote-method-directive.mjs +804 -522
  38. package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
  39. package/fesm2022/rxap-remote-method-http-directive.mjs +352 -99
  40. package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
  41. package/fesm2022/rxap-remote-method-http.mjs +206 -162
  42. package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
  43. package/fesm2022/rxap-remote-method-testing.mjs +37 -54
  44. package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
  45. package/fesm2022/rxap-remote-method.mjs +199 -134
  46. package/fesm2022/rxap-remote-method.mjs.map +1 -1
  47. package/package.json +8 -8
  48. package/types/rxap-remote-method-directive.d.ts +295 -203
  49. package/types/rxap-remote-method-http-directive.d.ts +104 -39
  50. package/types/rxap-remote-method-http.d.ts +63 -64
  51. package/types/rxap-remote-method-testing.d.ts +15 -16
  52. package/types/rxap-remote-method.d.ts +47 -48
@@ -1,163 +1,207 @@
1
- import * as i0 from '@angular/core';
2
- import { Injector, Inject, Optional, Injectable, inject } from '@angular/core';
3
- import * as i1 from '@angular/common/http';
4
- import { HttpClient, HttpRequest, HttpEventType, HttpResponse } from '@angular/common/http';
5
- import { BaseRemoteMethod, RxapRemoteMethodError, REMOTE_METHOD_META_DATA, RemoteMethodLoader } from '@rxap/remote-method';
6
- import { hasIndexSignature } from '@rxap/utilities';
7
- import { retry, tap, filter, map, timeout } from 'rxjs/operators';
8
- import { firstValueFrom } from 'rxjs';
9
-
10
- class BaseHttpRemoteMethod extends BaseRemoteMethod {
11
- constructor(http, injector, metaData = null) {
12
- super(injector, metaData);
13
- this.http = http;
14
- this.timeout = 60 * 1000;
15
- this.timeout = this.metadata.timeout ?? this.timeout;
16
- if (http === undefined) {
17
- throw new RxapRemoteMethodError('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);
18
- }
19
- if (!(http instanceof HttpClient)) {
20
- throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);
21
- }
22
- }
23
- init() {
24
- super.init();
25
- this._httpRequest = new HttpRequest(this.metadata.method, this.getRequestUrl(), null, {
26
- headers: this.metadata.headers,
27
- reportProgress: this.metadata.reportProgress,
28
- params: this.metadata.params,
29
- responseType: this.metadata.responseType || 'json',
30
- withCredentials: this.metadata.withCredentials,
31
- });
32
- }
33
- updateRequest(parameters) {
34
- let url = this._httpRequest.url;
35
- if (parameters && parameters['pathParams']) {
36
- url = this.buildUrlWithParams(url, parameters.pathParams);
37
- }
38
- return this._httpRequest.clone({
39
- withCredentials: this.metadata.withCredentials,
40
- context: this.metadata.context,
41
- ...parameters,
42
- url,
43
- });
44
- }
45
- buildUrlWithParams(url, pathParams) {
46
- if (pathParams) {
47
- if (!hasIndexSignature(pathParams)) {
48
- throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);
49
- }
50
- const matches = url.match(/\{[^}]+\}/g);
51
- if (matches) {
52
- for (const match of matches) {
53
- const param = match.substr(1, match.length - 2);
54
- if (pathParams[param] === undefined) {
55
- throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);
56
- }
57
- url = url.replace(match, encodeURIComponent(pathParams[param]));
58
- }
59
- }
60
- }
61
- return url;
62
- }
63
- getRequestUrl() {
64
- if (typeof this.metadata.url === 'function') {
65
- return this.metadata.url();
66
- }
67
- return this.metadata.url;
68
- }
69
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
70
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod }); }
71
- }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
73
- type: Injectable
74
- }], ctorParameters: () => [{ type: i1.HttpClient, decorators: [{
75
- type: Inject,
76
- args: [HttpClient]
77
- }] }, { type: i0.Injector, decorators: [{
78
- type: Inject,
79
- args: [Injector]
80
- }] }, { type: undefined, decorators: [{
81
- type: Optional
82
- }, {
83
- type: Inject,
84
- args: [REMOTE_METHOD_META_DATA]
85
- }] }] });
86
-
87
- class HttpRemoteMethod extends BaseHttpRemoteMethod {
88
- // eslint-disable-next-line @typescript-eslint/no-empty-function
89
- onSentEvent(event) {
90
- }
91
- // eslint-disable-next-line @typescript-eslint/no-empty-function
92
- onHeaderResponse(event) {
93
- }
94
- // eslint-disable-next-line @typescript-eslint/no-empty-function
95
- onResponse(event) {
96
- }
97
- // eslint-disable-next-line @typescript-eslint/no-empty-function
98
- onProgressEvent(event) {
99
- }
100
- // TODO : make abstract to force implementation to handel parameter transformation
101
- createHttpRequestParameters(parameters) {
102
- return parameters ?? {};
103
- }
104
- transformer(response) {
105
- return response;
106
- }
107
- _call(parameters) {
108
- return firstValueFrom(this.http.request(this.updateRequest(this.createHttpRequestParameters(parameters)))
109
- .pipe(retry(this.metadata.retry ?? 0), tap(event => {
110
- switch (event.type) {
111
- case HttpEventType.Sent:
112
- this.onSentEvent(event);
113
- break;
114
- case HttpEventType.Response:
115
- this.onResponse(event);
116
- break;
117
- case HttpEventType.DownloadProgress:
118
- this.onProgressEvent(event);
119
- break;
120
- case HttpEventType.UploadProgress:
121
- this.onProgressEvent(event);
122
- break;
123
- case HttpEventType.ResponseHeader:
124
- this.onHeaderResponse(event);
125
- break;
126
- }
127
- }), filter((event) => event instanceof HttpResponse), map((event) => event.body), map(body => this.transformer(body)), timeout(this.timeout)));
128
- }
129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
130
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod }); }
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethod, decorators: [{
133
- type: Injectable
134
- }] });
135
-
136
- class HttpRemoteMethodLoader {
137
- constructor() {
138
- this.remoteMethodLoader = inject(RemoteMethodLoader);
139
- }
140
- request$(remoteMethodIdOrInstanceOrToken, parameters, metadata, injector, notFoundValue, flags) {
141
- const remoteMethod = this.remoteMethodLoader.load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags);
142
- if (!(remoteMethod instanceof HttpRemoteMethod)) {
143
- throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');
144
- }
145
- return remoteMethod.call(parameters);
146
- }
147
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
148
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' }); }
149
- }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
151
- type: Injectable,
152
- args: [{ providedIn: 'root' }]
153
- }] });
154
-
155
- // region
156
- // endregion
157
-
158
- /**
159
- * Generated bundle index. Do not edit.
160
- */
161
-
1
+ import * as i0 from "@angular/core";
2
+ import { Inject, Injectable, Injector, Optional, inject } from "@angular/core";
3
+ import * as i1 from "@angular/common/http";
4
+ import { HttpClient, HttpEventType, HttpRequest, HttpResponse } from "@angular/common/http";
5
+ import { BaseRemoteMethod, REMOTE_METHOD_META_DATA, RemoteMethodLoader, RxapRemoteMethodError } from "@rxap/remote-method";
6
+ import { hasIndexSignature } from "@rxap/utilities";
7
+ import { filter, map, retry, tap, timeout } from "rxjs/operators";
8
+ import { firstValueFrom } from "rxjs";
9
+ var BaseHttpRemoteMethod = class BaseHttpRemoteMethod extends BaseRemoteMethod {
10
+ constructor(http, injector, metaData = null) {
11
+ super(injector, metaData);
12
+ this.http = http;
13
+ this.timeout = 6e4;
14
+ this.timeout = this.metadata.timeout ?? this.timeout;
15
+ if (http === void 0) throw new RxapRemoteMethodError("HttpClient is undefined. Ensure that the HttpClient is added to the deps property!", "", this.constructor.name);
16
+ if (!(http instanceof HttpClient)) throw new RxapRemoteMethodError("The property http is not an instance of HttpClinent. Check the deps property!", "", this.constructor.name);
17
+ }
18
+ init() {
19
+ super.init();
20
+ this._httpRequest = new HttpRequest(this.metadata.method, this.getRequestUrl(), null, {
21
+ headers: this.metadata.headers,
22
+ reportProgress: this.metadata.reportProgress,
23
+ params: this.metadata.params,
24
+ responseType: this.metadata.responseType || "json",
25
+ withCredentials: this.metadata.withCredentials
26
+ });
27
+ }
28
+ updateRequest(parameters) {
29
+ let url = this._httpRequest.url;
30
+ if (parameters && parameters["pathParams"]) url = this.buildUrlWithParams(url, parameters.pathParams);
31
+ return this._httpRequest.clone({
32
+ withCredentials: this.metadata.withCredentials,
33
+ context: this.metadata.context,
34
+ ...parameters,
35
+ url
36
+ });
37
+ }
38
+ buildUrlWithParams(url, pathParams) {
39
+ if (pathParams) {
40
+ if (!hasIndexSignature(pathParams)) throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not an index signature`, "", this.constructor.name);
41
+ const matches = url.match(/\{[^}]+\}/g);
42
+ if (matches) for (const match of matches) {
43
+ const param = match.substr(1, match.length - 2);
44
+ if (pathParams[param] === void 0) throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, "", this.constructor.name);
45
+ url = url.replace(match, encodeURIComponent(pathParams[param]));
46
+ }
47
+ }
48
+ return url;
49
+ }
50
+ getRequestUrl() {
51
+ if (typeof this.metadata.url === "function") return this.metadata.url();
52
+ return this.metadata.url;
53
+ }
54
+ static {
55
+ this.ɵfac = i0.ɵɵngDeclareFactory({
56
+ minVersion: "12.0.0",
57
+ version: "22.3.0",
58
+ ngImport: i0,
59
+ type: BaseHttpRemoteMethod,
60
+ deps: [
61
+ { token: HttpClient },
62
+ { token: Injector },
63
+ {
64
+ token: REMOTE_METHOD_META_DATA,
65
+ optional: true
66
+ }
67
+ ],
68
+ target: i0.ɵɵFactoryTarget.Injectable
69
+ });
70
+ }
71
+ static {
72
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
73
+ minVersion: "12.0.0",
74
+ version: "22.3.0",
75
+ ngImport: i0,
76
+ type: BaseHttpRemoteMethod
77
+ });
78
+ }
79
+ };
80
+ i0.ɵɵngDeclareClassMetadata({
81
+ minVersion: "12.0.0",
82
+ version: "22.3.0",
83
+ ngImport: i0,
84
+ type: BaseHttpRemoteMethod,
85
+ decorators: [{ type: Injectable }],
86
+ ctorParameters: () => [
87
+ {
88
+ type: i1.HttpClient,
89
+ decorators: [{
90
+ type: Inject,
91
+ args: [HttpClient]
92
+ }]
93
+ },
94
+ {
95
+ type: i0.Injector,
96
+ decorators: [{
97
+ type: Inject,
98
+ args: [Injector]
99
+ }]
100
+ },
101
+ {
102
+ type: void 0,
103
+ decorators: [{ type: Optional }, {
104
+ type: Inject,
105
+ args: [REMOTE_METHOD_META_DATA]
106
+ }]
107
+ }
108
+ ]
109
+ });
110
+ var HttpRemoteMethod = class HttpRemoteMethod extends BaseHttpRemoteMethod {
111
+ onSentEvent(event) {}
112
+ onHeaderResponse(event) {}
113
+ onResponse(event) {}
114
+ onProgressEvent(event) {}
115
+ createHttpRequestParameters(parameters) {
116
+ return parameters ?? {};
117
+ }
118
+ transformer(response) {
119
+ return response;
120
+ }
121
+ _call(parameters) {
122
+ return firstValueFrom(this.http.request(this.updateRequest(this.createHttpRequestParameters(parameters))).pipe(retry(this.metadata.retry ?? 0), tap((event) => {
123
+ switch (event.type) {
124
+ case HttpEventType.Sent:
125
+ this.onSentEvent(event);
126
+ break;
127
+ case HttpEventType.Response:
128
+ this.onResponse(event);
129
+ break;
130
+ case HttpEventType.DownloadProgress:
131
+ this.onProgressEvent(event);
132
+ break;
133
+ case HttpEventType.UploadProgress:
134
+ this.onProgressEvent(event);
135
+ break;
136
+ case HttpEventType.ResponseHeader: this.onHeaderResponse(event);
137
+ }
138
+ }), filter((event) => event instanceof HttpResponse), map((event) => event.body), map((body) => this.transformer(body)), timeout(this.timeout)));
139
+ }
140
+ static {
141
+ this.ɵfac = i0.ɵɵngDeclareFactory({
142
+ minVersion: "12.0.0",
143
+ version: "22.3.0",
144
+ ngImport: i0,
145
+ type: HttpRemoteMethod,
146
+ deps: null,
147
+ target: i0.ɵɵFactoryTarget.Injectable
148
+ });
149
+ }
150
+ static {
151
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
152
+ minVersion: "12.0.0",
153
+ version: "22.3.0",
154
+ ngImport: i0,
155
+ type: HttpRemoteMethod
156
+ });
157
+ }
158
+ };
159
+ i0.ɵɵngDeclareClassMetadata({
160
+ minVersion: "12.0.0",
161
+ version: "22.3.0",
162
+ ngImport: i0,
163
+ type: HttpRemoteMethod,
164
+ decorators: [{ type: Injectable }]
165
+ });
166
+ var HttpRemoteMethodLoader = class HttpRemoteMethodLoader {
167
+ constructor() {
168
+ this.remoteMethodLoader = inject(RemoteMethodLoader);
169
+ }
170
+ request$(remoteMethodIdOrInstanceOrToken, parameters, metadata, injector, notFoundValue, flags) {
171
+ const remoteMethod = this.remoteMethodLoader.load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags);
172
+ if (!(remoteMethod instanceof HttpRemoteMethod)) throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, "", "HttpRemoteMethodLoader");
173
+ return remoteMethod.call(parameters);
174
+ }
175
+ static {
176
+ this.ɵfac = i0.ɵɵngDeclareFactory({
177
+ minVersion: "12.0.0",
178
+ version: "22.3.0",
179
+ ngImport: i0,
180
+ type: HttpRemoteMethodLoader,
181
+ deps: [],
182
+ target: i0.ɵɵFactoryTarget.Injectable
183
+ });
184
+ }
185
+ static {
186
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
187
+ minVersion: "12.0.0",
188
+ version: "22.3.0",
189
+ ngImport: i0,
190
+ type: HttpRemoteMethodLoader,
191
+ providedIn: "root"
192
+ });
193
+ }
194
+ };
195
+ i0.ɵɵngDeclareClassMetadata({
196
+ minVersion: "12.0.0",
197
+ version: "22.3.0",
198
+ ngImport: i0,
199
+ type: HttpRemoteMethodLoader,
200
+ decorators: [{
201
+ type: Injectable,
202
+ args: [{ providedIn: "root" }]
203
+ }]
204
+ });
162
205
  export { BaseHttpRemoteMethod, HttpRemoteMethod, HttpRemoteMethodLoader };
163
- //# sourceMappingURL=rxap-remote-method-http.mjs.map
206
+
207
+ //# sourceMappingURL=rxap-remote-method-http.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../../packages/angular/remote-method/http/src/lib/base-http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../../packages/angular/remote-method/http/src/index.ts","../../../../../packages/angular/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n HttpClient,\n HttpContext,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n context?: HttpContext;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n context?: HttpContext;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n public timeout = 60 * 1000;\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null,\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError(\n 'HttpClient is undefined. Ensure that the HttpClient is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError(\n 'The property http is not an instance of HttpClinent. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public override init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials,\n },\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters['pathParams']) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n context: this.metadata.context,\n ...parameters,\n url,\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not an index signature`,\n '',\n this.constructor.name,\n );\n }\n\n const matches = url.match(/\\{[^}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (pathParams[param] === undefined) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not a defined value for '${ param }'`,\n '',\n this.constructor.name,\n );\n }\n url = url.replace(match, encodeURIComponent(pathParams[param]));\n }\n }\n }\n\n return url;\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';\nimport {\n filter,\n map,\n retry,\n tap,\n timeout,\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodMetadata,\n HttpRemoteMethodParameter,\n} from './base-http.remote-method';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onSentEvent(event: HttpSentEvent): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onHeaderResponse(event: HttpHeaderResponse): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onResponse(event: HttpResponse<ReturnType>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onProgressEvent(event: HttpProgressEvent): void {\n }\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return firstValueFrom(this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters)))\n .pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ));\n }\n\n}\n","import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport { Injectable, InjectOptions, Injector, inject } from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n private readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectOptions,\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags,\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'HttpRemoteMethodLoader');\n }\n\n return remoteMethod.call(parameters);\n }\n\n}\n","// region \nexport * from './lib/base-http.remote-method';\nexport * from './lib/http-remote-method.loader';\nexport * from './lib/http.remote-method';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoDM,MAAgB,oBAIpB,SAAQ,gBAAiD,CAAA;AAKzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAJW,IAAA,CAAA,IAAI,GAAJ,IAAI;AAJnC,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI;AASxB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;AACpD,QAAA,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,qBAAqB,CAC7B,oFAAoF,EACpF,EAAE,EACF,IAAI,CAAC,WAAW,CAAC,IAAI,CACtB;QACH;AACA,QAAA,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;AACjC,YAAA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sB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cADT,MAAM,EAAA,CAAA,CAAA;;2FACnB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACVlC;AAIA;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method-http.mjs","names":[],"sources":["../../../../../packages/angular/remote-method/http/src/lib/base-http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http.remote-method.ts","../../../../../packages/angular/remote-method/http/src/lib/http-remote-method.loader.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n Injector,\n Optional,\n} from '@angular/core';\nimport {\n HttpClient,\n HttpContext,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n} from '@angular/common/http';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n REMOTE_METHOD_META_DATA,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { hasIndexSignature } from '@rxap/utilities';\n\nexport interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {\n url: string | (() => string);\n method: 'DELETE' | 'GET' | 'HEAD' | 'JSONP' | 'OPTIONS' | 'POST' | 'PUT' | 'PATCH';\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n timeout?: number;\n retry?: number;\n context?: HttpContext;\n}\n\nexport interface HttpRemoteMethodParameter<PathParams = any> {\n headers?: HttpHeaders;\n reportProgress?: boolean;\n params?: HttpParams;\n responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';\n withCredentials?: boolean;\n body?: any | null;\n setHeaders?: {\n [name: string]: string | string[];\n };\n setParams?: {\n [param: string]: string;\n };\n pathParams?: PathParams;\n context?: HttpContext;\n}\n\n@Injectable()\nexport abstract class BaseHttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {\n\n public timeout = 60 * 1000;\n protected _httpRequest!: HttpRequest<ReturnType>;\n\n constructor(\n @Inject(HttpClient) public readonly http: HttpClient,\n @Inject(Injector) injector: Injector,\n @Optional() @Inject(REMOTE_METHOD_META_DATA) metaData: any | null = null,\n ) {\n super(injector, metaData);\n this.timeout = this.metadata.timeout ?? this.timeout;\n if (http === undefined) {\n throw new RxapRemoteMethodError(\n 'HttpClient is undefined. Ensure that the HttpClient is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError(\n 'The property http is not an instance of HttpClinent. Check the deps property!',\n '',\n this.constructor.name,\n );\n }\n }\n\n public override init() {\n super.init();\n this._httpRequest = new HttpRequest<ReturnType>(\n this.metadata.method,\n this.getRequestUrl(),\n null,\n {\n headers: this.metadata.headers,\n reportProgress: this.metadata.reportProgress,\n params: this.metadata.params,\n responseType: this.metadata.responseType || 'json',\n withCredentials: this.metadata.withCredentials,\n },\n );\n }\n\n public updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType> {\n let url = this._httpRequest.url;\n\n if (parameters && parameters['pathParams']) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\n context: this.metadata.context,\n ...parameters,\n url,\n });\n }\n\n public buildUrlWithParams(url: string, pathParams?: PathParams): string {\n if (pathParams) {\n\n if (!hasIndexSignature(pathParams)) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not an index signature`,\n '',\n this.constructor.name,\n );\n }\n\n const matches = url.match(/\\{[^}]+\\}/g);\n\n if (matches) {\n for (const match of matches) {\n const param = match.substr(1, match.length - 2);\n if (pathParams[param] === undefined) {\n throw new RxapRemoteMethodError(\n `Path params for remote method '${ this.id }' has not a defined value for '${ param }'`,\n '',\n this.constructor.name,\n );\n }\n url = url.replace(match, encodeURIComponent(pathParams[param]));\n }\n }\n }\n\n return url;\n }\n\n protected getRequestUrl(): string {\n if (typeof this.metadata.url === 'function') {\n return this.metadata.url();\n }\n return this.metadata.url;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEventType, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';\nimport {\n filter,\n map,\n retry,\n tap,\n timeout,\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodMetadata,\n HttpRemoteMethodParameter,\n} from './base-http.remote-method';\nimport { firstValueFrom } from 'rxjs';\n\n@Injectable()\nexport class HttpRemoteMethod<ReturnType = any,\n PathParams = any,\n Parameter extends object = HttpRemoteMethodParameter<PathParams>,\n MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata>\n extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onSentEvent(event: HttpSentEvent): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onHeaderResponse(event: HttpHeaderResponse): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onResponse(event: HttpResponse<ReturnType>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n public onProgressEvent(event: HttpProgressEvent): void {\n }\n\n // TODO : make abstract to force implementation to handel parameter transformation\n public createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter> {\n return parameters ?? {} as any;\n }\n\n public transformer(response: any): ReturnType {\n return response;\n }\n\n protected _call(parameters?: Parameter): Promise<ReturnType> {\n return firstValueFrom(this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters)))\n .pipe(\n retry(this.metadata.retry ?? 0),\n tap(event => {\n switch (event.type) {\n\n case HttpEventType.Sent:\n this.onSentEvent(event);\n break;\n\n case HttpEventType.Response:\n this.onResponse(event);\n break;\n\n case HttpEventType.DownloadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.UploadProgress:\n this.onProgressEvent(event);\n break;\n\n case HttpEventType.ResponseHeader:\n this.onHeaderResponse(event);\n break;\n\n }\n }),\n filter((event: any) => event instanceof HttpResponse),\n map((event: HttpResponse<ReturnType>) => event.body),\n map(body => this.transformer(body)),\n timeout(this.timeout),\n ));\n }\n\n}\n","import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n RxapRemoteMethodError,\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport { Injectable, InjectOptions, Injector, inject } from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n private readonly remoteMethodLoader = inject<RemoteMethodLoader>(RemoteMethodLoader);\n\n\n public request$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodIdOrInstanceOrToken: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters: Parameters,\n metadata?: Partial<BaseRemoteMethodMetadata>,\n injector?: Injector,\n notFoundValue?: BaseRemoteMethod<ReturnType, Parameters, Metadata>,\n flags?: InjectOptions,\n ) {\n\n const remoteMethod = this.remoteMethodLoader.load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags,\n );\n\n if (!(remoteMethod instanceof HttpRemoteMethod)) {\n throw new RxapRemoteMethodError(`The remote method is not a HttpRemoteMethod`, '', 'H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A;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,YADT;EAAM,CAAA;CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EADlC,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE"}
@@ -1,57 +1,40 @@
1
- import { RemoteMethodLoader } from '@rxap/remote-method';
2
-
3
- class RemoteMethodTestingLoader extends RemoteMethodLoader {
4
- constructor() {
5
- super(...arguments);
6
- this.mockedRemoteMethods = new Map();
7
- }
8
- mock(remoteMethodId, resultOrFunction) {
9
- let resultFunction;
10
- if (typeof resultOrFunction !== 'function') {
11
- resultFunction = () => resultOrFunction;
12
- }
13
- else {
14
- resultFunction = resultOrFunction;
15
- }
16
- this.mockedRemoteMethods.set(remoteMethodId, resultFunction);
17
- }
18
- clearMocks() {
19
- this.mockedRemoteMethods.clear();
20
- }
21
- deleteMock(remoteMethodId) {
22
- return this.mockedRemoteMethods.delete(remoteMethodId);
23
- }
24
- hasMock(remoteMethodId) {
25
- return this.mockedRemoteMethods.has(remoteMethodId);
26
- }
27
- getMock(remoteMethodId) {
28
- if (!this.hasMock(remoteMethodId)) {
29
- throw new Error(`A remote method mock with the id '${remoteMethodId}' is not registered`);
30
- }
31
- return this.mockedRemoteMethods.get(remoteMethodId);
32
- }
33
- async call$(remoteMethodOrIdOrToken, parameters, metadata) {
34
- if (typeof remoteMethodOrIdOrToken === 'string') {
35
- if (this.hasMock(remoteMethodOrIdOrToken)) {
36
- const resultFunction = this.getMock(remoteMethodOrIdOrToken);
37
- return await resultFunction(parameters, metadata);
38
- }
39
- return super.call$(remoteMethodOrIdOrToken, parameters, metadata);
40
- }
41
- return super.call$(remoteMethodOrIdOrToken, parameters, metadata);
42
- }
43
- }
1
+ import { RemoteMethodLoader } from "@rxap/remote-method";
2
+ var RemoteMethodTestingLoader = class extends RemoteMethodLoader {
3
+ constructor() {
4
+ super(...arguments);
5
+ this.mockedRemoteMethods = /* @__PURE__ */ new Map();
6
+ }
7
+ mock(remoteMethodId, resultOrFunction) {
8
+ let resultFunction;
9
+ if (typeof resultOrFunction !== "function") resultFunction = () => resultOrFunction;
10
+ else resultFunction = resultOrFunction;
11
+ this.mockedRemoteMethods.set(remoteMethodId, resultFunction);
12
+ }
13
+ clearMocks() {
14
+ this.mockedRemoteMethods.clear();
15
+ }
16
+ deleteMock(remoteMethodId) {
17
+ return this.mockedRemoteMethods.delete(remoteMethodId);
18
+ }
19
+ hasMock(remoteMethodId) {
20
+ return this.mockedRemoteMethods.has(remoteMethodId);
21
+ }
22
+ getMock(remoteMethodId) {
23
+ if (!this.hasMock(remoteMethodId)) throw new Error(`A remote method mock with the id '${remoteMethodId}' is not registered`);
24
+ return this.mockedRemoteMethods.get(remoteMethodId);
25
+ }
26
+ async call$(remoteMethodOrIdOrToken, parameters, metadata) {
27
+ if (typeof remoteMethodOrIdOrToken === "string") {
28
+ if (this.hasMock(remoteMethodOrIdOrToken)) return await this.getMock(remoteMethodOrIdOrToken)(parameters, metadata);
29
+ return super.call$(remoteMethodOrIdOrToken, parameters, metadata);
30
+ }
31
+ return super.call$(remoteMethodOrIdOrToken, parameters, metadata);
32
+ }
33
+ };
44
34
  const REMOTE_METHOD_TESTING_LOADER_PROVIDER = {
45
- provide: RemoteMethodLoader,
46
- useClass: RemoteMethodTestingLoader,
35
+ provide: RemoteMethodLoader,
36
+ useClass: RemoteMethodTestingLoader
47
37
  };
48
-
49
- // region
50
- // endregion
51
-
52
- /**
53
- * Generated bundle index. Do not edit.
54
- */
55
-
56
38
  export { REMOTE_METHOD_TESTING_LOADER_PROVIDER, RemoteMethodTestingLoader };
57
- //# sourceMappingURL=rxap-remote-method-testing.mjs.map
39
+
40
+ //# sourceMappingURL=rxap-remote-method-testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../../packages/angular/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../../packages/angular/remote-method/testing/src/index.ts","../../../../../packages/angular/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n AbstractType,\n InjectionToken,\n Provider,\n Type,\n} from '@angular/core';\n\nexport type MockRemoteMethod = (parameters?: any, metadata?: any) => any;\n\nexport class RemoteMethodTestingLoader extends RemoteMethodLoader {\n\n private mockedRemoteMethods = new Map<string, MockRemoteMethod>();\n\n public mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void {\n let resultFunction: MockRemoteMethod;\n if (typeof resultOrFunction !== 'function') {\n resultFunction = () => resultOrFunction;\n } else {\n resultFunction = resultOrFunction;\n }\n this.mockedRemoteMethods.set(remoteMethodId, resultFunction);\n }\n\n public clearMocks(): void {\n this.mockedRemoteMethods.clear();\n }\n\n public deleteMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.delete(remoteMethodId);\n }\n\n public hasMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.has(remoteMethodId);\n }\n\n public getMock(remoteMethodId: string): MockRemoteMethod {\n if (!this.hasMock(remoteMethodId)) {\n throw new Error(`A remote method mock with the id '${ remoteMethodId }' is not registered`);\n }\n return this.mockedRemoteMethods.get(remoteMethodId)!;\n }\n\n public override async call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters?: Parameters,\n metadata?: Metadata,\n ): Promise<ReturnType> {\n\n if (typeof remoteMethodOrIdOrToken === 'string') {\n\n if (this.hasMock(remoteMethodOrIdOrToken)) {\n const resultFunction = this.getMock(remoteMethodOrIdOrToken)!;\n return await resultFunction(parameters, metadata);\n }\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n\n }\n\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n }\n\n}\n\nexport const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider = {\n provide: RemoteMethodLoader,\n useClass: RemoteMethodTestingLoader,\n};\n","// region \nexport * from './lib/remote-method-testing-loader';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAcM,MAAO,yBAA0B,SAAQ,kBAAkB,CAAA;AAAjE,IAAA,WAAA,GAAA;;AAEU,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAA4B;IAkDnE;IAhDS,IAAI,CAAC,cAAsB,EAAE,gBAAwC,EAAA;AAC1E,QAAA,IAAI,cAAgC;AACpC,QAAA,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;AAC1C,YAAA,cAAc,GAAG,MAAM,gBAAgB;QACzC;aAAO;YACL,cAAc,GAAG,gBAAgB;QACnC;QACA,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,EAAE,cAAc,CAAC;IAC9D;IAEO,UAAU,GAAA;AACf,QAAA,IAAI,CAAC,mBAAmB,CAAC,KAAK,EAAE;IAClC;AAEO,IAAA,UAAU,CAAC,cAAsB,EAAA;QACtC,OAAO,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC;IACxD;AAEO,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAC;IACrD;AAEO,IAAA,OAAO,CAAC,cAAsB,EAAA;QACnC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,KAAK,CAAC,qCAAsC,cAAe,CAAA,mBAAA,CAAqB,CAAC;QAC7F;QACA,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,cAAc,CAAE;IACtD;AAEgB,IAAA,MAAM,KAAK,CACzB,uBAAuR,EACvR,UAAuB,EACvB,QAAmB,EAAA;AAGnB,QAAA,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE;AAE/C,YAAA,IAAI,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE;gBACzC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAE;AAC7D,gBAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC;YACnD;YACA,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC;QAEnE;QAEA,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC;IACnE;AAED;AAEM,MAAM,qCAAqC,GAAa;AAC7D,IAAA,OAAO,EAAE,kBAAkB;AAC3B,IAAA,QAAQ,EAAE,yBAAyB;;;ACtErC;AAEA;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"rxap-remote-method-testing.mjs","names":[],"sources":["../../../../../packages/angular/remote-method/testing/src/lib/remote-method-testing-loader.ts"],"sourcesContent":["import {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n RemoteMethodLoader,\n} from '@rxap/remote-method';\nimport {\n AbstractType,\n InjectionToken,\n Provider,\n Type,\n} from '@angular/core';\n\nexport type MockRemoteMethod = (parameters?: any, metadata?: any) => any;\n\nexport class RemoteMethodTestingLoader extends RemoteMethodLoader {\n\n private mockedRemoteMethods = new Map<string, MockRemoteMethod>();\n\n public mock(remoteMethodId: string, resultOrFunction: any | MockRemoteMethod): void {\n let resultFunction: MockRemoteMethod;\n if (typeof resultOrFunction !== 'function') {\n resultFunction = () => resultOrFunction;\n } else {\n resultFunction = resultOrFunction;\n }\n this.mockedRemoteMethods.set(remoteMethodId, resultFunction);\n }\n\n public clearMocks(): void {\n this.mockedRemoteMethods.clear();\n }\n\n public deleteMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.delete(remoteMethodId);\n }\n\n public hasMock(remoteMethodId: string): boolean {\n return this.mockedRemoteMethods.has(remoteMethodId);\n }\n\n public getMock(remoteMethodId: string): MockRemoteMethod {\n if (!this.hasMock(remoteMethodId)) {\n throw new Error(`A remote method mock with the id '${ remoteMethodId }' is not registered`);\n }\n return this.mockedRemoteMethods.get(remoteMethodId)!;\n }\n\n public override async call$<ReturnType = any, Parameters = any, Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata>(\n remoteMethodOrIdOrToken: string | BaseRemoteMethod<ReturnType, Parameters, Metadata> | Type<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | InjectionToken<BaseRemoteMethod<ReturnType, Parameters, Metadata>> | AbstractType<BaseRemoteMethod<ReturnType, Parameters, Metadata>>,\n parameters?: Parameters,\n metadata?: Metadata,\n ): Promise<ReturnType> {\n\n if (typeof remoteMethodOrIdOrToken === 'string') {\n\n if (this.hasMock(remoteMethodOrIdOrToken)) {\n const resultFunction = this.getMock(remoteMethodOrIdOrToken)!;\n return await resultFunction(parameters, metadata);\n }\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n\n }\n\n return super.call$(remoteMethodOrIdOrToken, parameters, metadata);\n }\n\n}\n\nexport const REMOTE_METHOD_TESTING_LOADER_PROVIDER: Provider = {\n provide: RemoteMethodLoader,\n useClass: RemoteMethodTestingLoader,\n};\n"],"mappings":";AAcA,IAAa,4BAAb,cAA+C,mBAAkB;CAAjE,cAAA;;EAEU,KAAA,sCAAsB,IAAI,IAAG;CAkDvC;CAhDS,KAAK,gBAAwB,kBAAwC;EAC1E,IAAI;EACJ,IAAI,OAAO,qBAAqB,YAC9B,uBAAuB;OAEvB,iBAAiB;EAEnB,KAAK,oBAAoB,IAAI,gBAAgB,cAAc;CAC7D;CAEO,aAAU;EACf,KAAK,oBAAoB,MAAK;CAChC;CAEO,WAAW,gBAAsB;EACtC,OAAO,KAAK,oBAAoB,OAAO,cAAc;CACvD;CAEO,QAAQ,gBAAsB;EACnC,OAAO,KAAK,oBAAoB,IAAI,cAAc;CACpD;CAEO,QAAQ,gBAAsB;EACnC,IAAI,CAAC,KAAK,QAAQ,cAAc,GAC9B,MAAM,IAAI,MAAM,qCAAsC,eAAe,oBAAqB;EAE5F,OAAO,KAAK,oBAAoB,IAAI,cAAc;CACpD;CAEgB,MAAM,MACpB,yBACA,YACA,UAAmB;EAGnB,IAAI,OAAO,4BAA4B,UAAU;GAE/C,IAAI,KAAK,QAAQ,uBAAuB,GAEtC,OAAO,MADgB,KAAK,QAAQ,uBACvB,CAAA,CAAe,YAAY,QAAQ;GAElD,OAAO,MAAM,MAAM,yBAAyB,YAAY,QAAQ;EAElE;EAEA,OAAO,MAAM,MAAM,yBAAyB,YAAY,QAAQ;CAClE;AAED;AAED,MAAa,wCAAkD;CAC7D,SAAS;CACT,UAAU;AACX"}