@rxap/remote-method 13.0.0 → 14.0.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/directive/{rxap-remote-method-directive.d.ts → index.d.ts} +0 -0
- package/directive/lib/remote-method-template-collection.directive.d.ts +1 -1
- package/directive/lib/remote-method-template.directive.d.ts +1 -1
- package/directive/lib/remote-method.directive.d.ts +1 -1
- package/esm2020/directive/lib/remote-method-template-collection.directive.mjs +8 -8
- package/esm2020/directive/lib/remote-method-template.directive.mjs +8 -8
- package/esm2020/directive/lib/remote-method.directive.mjs +8 -8
- package/esm2020/http/directive/lib/contenteditable.directive.mjs +8 -8
- package/esm2020/http/directive/lib/http-remote-method.directive.mjs +7 -7
- package/esm2020/http/lib/base-http.remote-method.mjs +3 -3
- package/esm2020/http/lib/http-remote-method.loader.mjs +3 -3
- package/esm2020/http/lib/http.remote-method.mjs +3 -3
- package/esm2020/lib/base.remote-method.mjs +3 -3
- package/esm2020/lib/proxy.remote-method.mjs +3 -3
- package/esm2020/lib/remote-method-loader.mjs +3 -3
- package/fesm2015/rxap-remote-method-directive.mjs +22 -22
- package/fesm2015/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2015/rxap-remote-method-http-directive.mjs +14 -14
- package/fesm2015/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2015/rxap-remote-method-http.mjs +9 -9
- package/fesm2015/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2015/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2015/rxap-remote-method.mjs +9 -9
- package/fesm2015/rxap-remote-method.mjs.map +1 -1
- package/fesm2020/rxap-remote-method-directive.mjs +22 -22
- package/fesm2020/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2020/rxap-remote-method-http-directive.mjs +14 -14
- package/fesm2020/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2020/rxap-remote-method-http.mjs +9 -9
- package/fesm2020/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2020/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2020/rxap-remote-method.mjs +9 -9
- package/fesm2020/rxap-remote-method.mjs.map +1 -1
- package/http/directive/{rxap-remote-method-http-directive.d.ts → index.d.ts} +0 -0
- package/http/directive/lib/contenteditable.directive.d.ts +1 -1
- package/http/directive/lib/http-remote-method.directive.d.ts +1 -1
- package/http/{rxap-remote-method-http.d.ts → index.d.ts} +0 -0
- package/package.json +16 -17
- package/src/schematics/base/index.js +1 -1
- package/src/schematics/directive/index.js +1 -1
- package/src/schematics/http/index.js +1 -1
- package/testing/{rxap-remote-method-testing.d.ts → index.d.ts} +0 -0
- package/directive/package.json +0 -10
- package/http/directive/package.json +0 -10
- package/http/package.json +0 -10
- package/rxap-remote-method.d.ts +0 -5
- package/testing/package.json +0 -10
|
@@ -66,9 +66,9 @@ class BaseHttpRemoteMethod extends BaseRemoteMethod {
|
|
|
66
66
|
return url;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
BaseHttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
69
|
+
BaseHttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod, deps: [{ token: HttpClient }, { token: Injector }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
70
|
+
BaseHttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod });
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseHttpRemoteMethod, decorators: [{
|
|
72
72
|
type: Injectable
|
|
73
73
|
}], ctorParameters: function () { return [{ type: i1.HttpClient, decorators: [{
|
|
74
74
|
type: Inject,
|
|
@@ -117,9 +117,9 @@ class HttpRemoteMethod extends BaseHttpRemoteMethod {
|
|
|
117
117
|
return response;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
HttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
121
|
-
HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
120
|
+
HttpRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
121
|
+
HttpRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod });
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethod, decorators: [{
|
|
123
123
|
type: Injectable
|
|
124
124
|
}] });
|
|
125
125
|
|
|
@@ -138,9 +138,9 @@ class HttpRemoteMethodLoader {
|
|
|
138
138
|
return remoteMethod.call(parameters);
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
HttpRemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
142
|
-
HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
143
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
141
|
+
HttpRemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, deps: [{ token: RemoteMethodLoader }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
142
|
+
HttpRemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, providedIn: 'root' });
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: HttpRemoteMethodLoader, decorators: [{
|
|
144
144
|
type: Injectable,
|
|
145
145
|
args: [{ providedIn: 'root' }]
|
|
146
146
|
}], ctorParameters: function () { return [{ type: i1$1.RemoteMethodLoader, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../libs/remote-method/http/src/lib/base-http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../libs/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Injectable,\n Optional,\n Inject,\n Injector\n} from '@angular/core';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams\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}\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}\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 protected _httpRequest!: HttpRequest<ReturnType>;\n\n public timeout = 60 * 1000;\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('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);\n }\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 public 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.hasOwnProperty('pathParams')) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\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(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);\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.hasOwnProperty(param)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);\n }\n url = url.replace(match, encodeURIComponent(pathParams[ param ]));\n }\n }\n }\n\n return url;\n }\n\n}\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}\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}\n","import { Injectable } from '@angular/core';\nimport {\n HttpSentEvent,\n HttpHeaderResponse,\n HttpResponse,\n HttpProgressEvent,\n HttpEventType\n} from '@angular/common/http';\nimport {\n tap,\n filter,\n map,\n timeout,\n retry\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from './base-http.remote-method';\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 protected _call(parameters?: Parameter): Promise<ReturnType> {\n return this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters))).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 ).toPromise();\n }\n\n public onSentEvent(event: HttpSentEvent): void {}\n\n public onHeaderResponse(event: HttpHeaderResponse): void {}\n\n public onResponse(event: HttpResponse<ReturnType>): void {}\n\n public onProgressEvent(event: HttpProgressEvent): void {}\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}\n","import {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n RxapRemoteMethodError,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Injectable,\n Inject,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {}\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?: InjectFlags\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAiDsB,oBAIpB,SAAQ,gBAAiD;IAMzD,YACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI;QAExE,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAJU,SAAI,GAAJ,IAAI,CAAY;QAH/C,YAAO,GAAG,EAAE,GAAG,IAAI,CAAC;QAQzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QACrD,IAAI,IAAI,KAAK,SAAS,EAAE;YACtB,MAAM,IAAI,qBAAqB,CAAC,oFAAoF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAClJ;QACD,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;YACjC,MAAM,IAAI,qBAAqB,CAAC,+EAA+E,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC7I;KACF;IAES,aAAa;QACrB,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,UAAU,EAAE;YAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE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,CAAC;QAEF,IAAI,EAAE,YAAY,YAAY,gBAAgB,CAAC,EAAE;YAC/C,MAAM,IAAI,qBAAqB,CAAC,6CAA6C,EAAE,EAAE,EAAE,wBAAwB,CAAC,CAAC;SAC9G;QAED,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACtC;;mHA7BU,sBAAsB,kBAKb,kBAAkB;uHAL3B,sBAAsB,cADT,MAAM;2FACnB,sBAAsB;kBADlC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAMnB,MAAM;2BAAC,kBAAkB;;;ACrBxC;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-http.mjs","sources":["../../../../libs/remote-method/http/src/lib/base-http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http.remote-method.ts","../../../../libs/remote-method/http/src/lib/http-remote-method.loader.ts","../../../../libs/remote-method/http/src/rxap-remote-method-http.ts"],"sourcesContent":["import {\n Injectable,\n Optional,\n Inject,\n Injector\n} from '@angular/core';\nimport {\n HttpClient,\n HttpRequest,\n HttpHeaders,\n HttpParams\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}\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}\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 protected _httpRequest!: HttpRequest<ReturnType>;\n\n public timeout = 60 * 1000;\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('HttpClient is undefined. Ensure that the HttpClient is added to the deps property!', '', this.constructor.name);\n }\n if (!(http instanceof HttpClient)) {\n throw new RxapRemoteMethodError('The property http is not an instance of HttpClinent. Check the deps property!', '', this.constructor.name);\n }\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 public 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.hasOwnProperty('pathParams')) {\n url = this.buildUrlWithParams(url, (parameters as any).pathParams);\n }\n\n return this._httpRequest.clone({\n withCredentials: this.metadata.withCredentials,\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(`Path params for remote method '${this.id}' has not an index signature`, '', this.constructor.name);\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.hasOwnProperty(param)) {\n throw new RxapRemoteMethodError(`Path params for remote method '${this.id}' has not a defined value for '${param}'`, '', this.constructor.name);\n }\n url = url.replace(match, encodeURIComponent(pathParams[ param ]));\n }\n }\n }\n\n return url;\n }\n\n}\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}\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}\n","import { Injectable } from '@angular/core';\nimport {\n HttpSentEvent,\n HttpHeaderResponse,\n HttpResponse,\n HttpProgressEvent,\n HttpEventType\n} from '@angular/common/http';\nimport {\n tap,\n filter,\n map,\n timeout,\n retry\n} from 'rxjs/operators';\nimport {\n BaseHttpRemoteMethod,\n HttpRemoteMethodParameter,\n HttpRemoteMethodMetadata\n} from './base-http.remote-method';\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 protected _call(parameters?: Parameter): Promise<ReturnType> {\n return this.http.request<ReturnType>(this.updateRequest(this.createHttpRequestParameters(parameters))).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 ).toPromise();\n }\n\n public onSentEvent(event: HttpSentEvent): void {}\n\n public onHeaderResponse(event: HttpHeaderResponse): void {}\n\n public onResponse(event: HttpResponse<ReturnType>): void {}\n\n public onProgressEvent(event: HttpProgressEvent): void {}\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}\n","import {\n RemoteMethodLoader,\n BaseRemoteMethodMetadata,\n RxapRemoteMethodError,\n BaseRemoteMethod\n} from '@rxap/remote-method';\nimport { HttpRemoteMethod } from './http.remote-method';\nimport {\n Injectable,\n Inject,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport { IdOrInstanceOrToken } from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class HttpRemoteMethodLoader {\n\n // Instead of extanding the RemoteMethodLoader class the RemoteMethodLoader instance\n // will be injected, else there could be multiple instance of RemoteMethodLoader's. Then\n // the RefreshService will not trigger a refresh for HttpRemoteMethod's\n constructor(@Inject(RemoteMethodLoader) private readonly remoteMethodLoader: RemoteMethodLoader) {}\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?: InjectFlags\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;AAiDM,MAAgB,oBAIpB,SAAQ,gBAAiD,CAAA;AAMzD,IAAA,WAAA,CACsC,IAAgB,EAClC,QAAkB,EACS,WAAuB,IAAI,EAAA;AAExE,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAJU,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;AAH/C,QAAA,IAAA,CAAA,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC;AAQzB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC;QACrD,IAAI,IAAI,KAAK,SAAS,EAAE;AACtB,YAAA,MAAM,IAAI,qBAAqB,CAAC,oFAAoF,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAClJ,SAAA;AACD,QAAA,IAAI,EAAE,IAAI,YAAY,UAAU,CAAC,EAAE;AACjC,YAAA,MAAM,IAAI,qBAAqB,CAAC,+EAA+E,EAAE,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7I,SAAA;KACF;IAES,aAAa,GAAA;QACrB,IAAI,OAAO,IAAI,CAAC,QAAQ,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A7BU,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,kBAKb,kBAAkB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAL3B,sBAAA,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,CAAA;;0BAMnB,MAAM;2BAAC,kBAAkB,CAAA;;;ACrBxC;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../libs/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../libs/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n RemoteMethodLoader,\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from '@rxap/remote-method';\nimport {\n Provider,\n Type,\n InjectionToken,\n AbstractType\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 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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"rxap-remote-method-testing.mjs","sources":["../../../../libs/remote-method/testing/src/lib/remote-method-testing-loader.ts","../../../../libs/remote-method/testing/src/rxap-remote-method-testing.ts"],"sourcesContent":["import {\n RemoteMethodLoader,\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from '@rxap/remote-method';\nimport {\n Provider,\n Type,\n InjectionToken,\n AbstractType\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 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\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;AAE/C,YAAA,IAAI,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE;gBACzC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAE,CAAC;AAC9D,gBAAA,OAAO,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACnD,aAAA;YACD,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAEnE,SAAA;QAED,OAAO,KAAK,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;KACnE;AAEF,CAAA;AAEY,MAAA,qCAAqC,GAAa;AAC7D,IAAA,OAAO,EAAG,kBAAkB;AAC5B,IAAA,QAAQ,EAAE,yBAAyB;;;ACtErC;;AAEG;;;;"}
|
|
@@ -64,9 +64,9 @@ class BaseRemoteMethod extends BaseDefinition {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
BaseRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
68
|
-
BaseRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
BaseRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
68
|
+
BaseRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: BaseRemoteMethod, decorators: [{
|
|
70
70
|
type: Injectable
|
|
71
71
|
}], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
|
|
72
72
|
type: Optional
|
|
@@ -87,9 +87,9 @@ class RemoteMethodLoader extends DefinitionLoader {
|
|
|
87
87
|
.call(parameters);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
RemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
91
|
-
RemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
90
|
+
RemoteMethodLoader.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
91
|
+
RemoteMethodLoader.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: RemoteMethodLoader, decorators: [{
|
|
93
93
|
type: Injectable,
|
|
94
94
|
args: [{ providedIn: 'root' }]
|
|
95
95
|
}] });
|
|
@@ -103,9 +103,9 @@ class ProxyRemoteMethod extends BaseRemoteMethod {
|
|
|
103
103
|
return this.remoteMethod.call(await this.transformParameters(parameters));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
ProxyRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
107
|
-
ProxyRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
ProxyRemoteMethod.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
107
|
+
ProxyRemoteMethod.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod });
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.2", ngImport: i0, type: ProxyRemoteMethod, decorators: [{
|
|
109
109
|
type: Injectable
|
|
110
110
|
}], ctorParameters: function () { return [{ type: BaseRemoteMethod, decorators: [{
|
|
111
111
|
type: Inject,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../libs/remote-method/src/lib/tokens.ts","../../../../libs/remote-method/src/lib/error.ts","../../../../libs/remote-method/src/lib/base.remote-method.ts","../../../../libs/remote-method/src/lib/remote-method-loader.ts","../../../../libs/remote-method/src/lib/proxy.remote-method.ts","../../../../libs/remote-method/src/rxap-remote-method.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');\nexport const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');\n","import { RxapError } from '@rxap/utilities';\n\nexport class RxapRemoteMethodError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/remote-method', message, code, className);\n }\n\n}\n\n","import {\n Injectable,\n Optional,\n Inject,\n Injector,\n Type,\n InjectionToken,\n AbstractType,\n InjectFlags,\n INJECTOR\n} from '@angular/core';\nimport { REMOTE_METHOD_META_DATA } from './tokens';\nimport {\n BaseDefinition,\n BaseDefinitionMetadata,\n DefinitionMetadata\n} from '@rxap/definition';\nimport { Subject } from 'rxjs';\nimport { RxapRemoteMethodError } from './error';\nimport { Refreshable } from '@rxap/utilities';\nimport { CounterSubject } from '@rxap/utilities/rxjs';\n\nexport interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {\n refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;\n}\n\nexport function RxapRemoteMethod<MetaData extends BaseDefinitionMetadata = BaseDefinitionMetadata>(\n metadataOrId: MetaData | string,\n className: string = 'BaseRemoteMethod',\n packageName: string = '@rxap/remote-method'\n) {\n return function(target: any) {\n DefinitionMetadata(metadataOrId, className, packageName)(target);\n };\n}\n\n@Injectable()\nexport abstract class BaseRemoteMethod<ReturnType = any,\n Parameter = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> extends BaseDefinition<Metadata> {\n\n public executed$: Subject<ReturnType> = new Subject<ReturnType>();\n\n public executionsInProgress$: CounterSubject = new CounterSubject();\n\n public readonly injector: Injector;\n\n private _pauseRefresh = false;\n\n constructor(\n @Optional()\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Optional()\n @Inject(REMOTE_METHOD_META_DATA)\n metaData: any | null = null\n ) {\n super(metaData);\n if (injector === undefined) {\n throw new RxapRemoteMethodError('Injector is undefined. Ensure that the Injector is added to the deps property!', '', this.constructor.name);\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError('The property injector is not Injector like. Check the deps property!', '', this.constructor.name);\n }\n }\n\n public async call(parameters?: Parameter): Promise<ReturnType> {\n this.init();\n this.executionsInProgress$.increase();\n const result = await this._call(parameters);\n this.executionsInProgress$.decrease();\n this.executed$.next(result);\n this.executed(result);\n return result;\n }\n\n public executed(result: ReturnType): void {\n if (!this._pauseRefresh) {\n this.refresh();\n }\n }\n\n public pauseRefresh(): void {\n this._pauseRefresh = true;\n }\n\n public resumeRefresh(): void {\n this._pauseRefresh = false;\n }\n\n public refresh(): void {\n if (this.metadata.refresh) {\n for (const refresh of this.metadata.refresh) {\n const canRefresh = this.injector.get(refresh, null, InjectFlags.Optional);\n if (canRefresh) {\n canRefresh.refresh();\n }\n }\n }\n }\n\n protected abstract _call(parameters?: Parameter): Promise<ReturnType> | ReturnType;\n\n}\n\n\n","import {\n Injectable,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n DefinitionLoader,\n IdOrInstanceOrToken\n} from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteMethodLoader extends DefinitionLoader {\n\n public async call$<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?: InjectFlags\n ): Promise<ReturnType> {\n return this\n .load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n )\n .call(parameters);\n }\n\n}\n","import {\n Injectable,\n Inject,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n RXAP_PROXY_REMOTE_METHOD_TARGET,\n REMOTE_METHOD_META_DATA\n} from './tokens';\n\n@Injectable()\nexport abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter>\n extends BaseRemoteMethod<ReturnType, SourceParameter> {\n\n constructor(\n @Inject(RXAP_PROXY_REMOTE_METHOD_TARGET)\n private readonly remoteMethod: BaseRemoteMethod,\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Inject(REMOTE_METHOD_META_DATA)\n metadata: BaseRemoteMethodMetadata = remoteMethod.metadata,\n ) {\n super(injector, metadata);\n }\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\n\n public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CAAC,4CAA4C,EAAE;MAC3F,+BAA+B,GAAG,IAAI,cAAc,CAAC,iCAAiC;;
|
|
1
|
+
{"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../libs/remote-method/src/lib/tokens.ts","../../../../libs/remote-method/src/lib/error.ts","../../../../libs/remote-method/src/lib/base.remote-method.ts","../../../../libs/remote-method/src/lib/remote-method-loader.ts","../../../../libs/remote-method/src/lib/proxy.remote-method.ts","../../../../libs/remote-method/src/rxap-remote-method.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');\nexport const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');\n","import { RxapError } from '@rxap/utilities';\n\nexport class RxapRemoteMethodError extends RxapError {\n\n constructor(message: string, code: string, className?: string) {\n super('@rxap/remote-method', message, code, className);\n }\n\n}\n\n","import {\n Injectable,\n Optional,\n Inject,\n Injector,\n Type,\n InjectionToken,\n AbstractType,\n InjectFlags,\n INJECTOR\n} from '@angular/core';\nimport { REMOTE_METHOD_META_DATA } from './tokens';\nimport {\n BaseDefinition,\n BaseDefinitionMetadata,\n DefinitionMetadata\n} from '@rxap/definition';\nimport { Subject } from 'rxjs';\nimport { RxapRemoteMethodError } from './error';\nimport { Refreshable } from '@rxap/utilities';\nimport { CounterSubject } from '@rxap/utilities/rxjs';\n\nexport interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {\n refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;\n}\n\nexport function RxapRemoteMethod<MetaData extends BaseDefinitionMetadata = BaseDefinitionMetadata>(\n metadataOrId: MetaData | string,\n className: string = 'BaseRemoteMethod',\n packageName: string = '@rxap/remote-method'\n) {\n return function(target: any) {\n DefinitionMetadata(metadataOrId, className, packageName)(target);\n };\n}\n\n@Injectable()\nexport abstract class BaseRemoteMethod<ReturnType = any,\n Parameter = any,\n Metadata extends BaseRemoteMethodMetadata = BaseRemoteMethodMetadata> extends BaseDefinition<Metadata> {\n\n public executed$: Subject<ReturnType> = new Subject<ReturnType>();\n\n public executionsInProgress$: CounterSubject = new CounterSubject();\n\n public readonly injector: Injector;\n\n private _pauseRefresh = false;\n\n constructor(\n @Optional()\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Optional()\n @Inject(REMOTE_METHOD_META_DATA)\n metaData: any | null = null\n ) {\n super(metaData);\n if (injector === undefined) {\n throw new RxapRemoteMethodError('Injector is undefined. Ensure that the Injector is added to the deps property!', '', this.constructor.name);\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError('The property injector is not Injector like. Check the deps property!', '', this.constructor.name);\n }\n }\n\n public async call(parameters?: Parameter): Promise<ReturnType> {\n this.init();\n this.executionsInProgress$.increase();\n const result = await this._call(parameters);\n this.executionsInProgress$.decrease();\n this.executed$.next(result);\n this.executed(result);\n return result;\n }\n\n public executed(result: ReturnType): void {\n if (!this._pauseRefresh) {\n this.refresh();\n }\n }\n\n public pauseRefresh(): void {\n this._pauseRefresh = true;\n }\n\n public resumeRefresh(): void {\n this._pauseRefresh = false;\n }\n\n public refresh(): void {\n if (this.metadata.refresh) {\n for (const refresh of this.metadata.refresh) {\n const canRefresh = this.injector.get(refresh, null, InjectFlags.Optional);\n if (canRefresh) {\n canRefresh.refresh();\n }\n }\n }\n }\n\n protected abstract _call(parameters?: Parameter): Promise<ReturnType> | ReturnType;\n\n}\n\n\n","import {\n Injectable,\n Injector,\n InjectFlags\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n DefinitionLoader,\n IdOrInstanceOrToken\n} from '@rxap/definition';\n\n@Injectable({ providedIn: 'root' })\nexport class RemoteMethodLoader extends DefinitionLoader {\n\n public async call$<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?: InjectFlags\n ): Promise<ReturnType> {\n return this\n .load(\n remoteMethodIdOrInstanceOrToken,\n metadata,\n injector,\n notFoundValue,\n flags\n )\n .call(parameters);\n }\n\n}\n","import {\n Injectable,\n Inject,\n INJECTOR,\n Injector\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata\n} from './base.remote-method';\nimport {\n RXAP_PROXY_REMOTE_METHOD_TARGET,\n REMOTE_METHOD_META_DATA\n} from './tokens';\n\n@Injectable()\nexport abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter>\n extends BaseRemoteMethod<ReturnType, SourceParameter> {\n\n constructor(\n @Inject(RXAP_PROXY_REMOTE_METHOD_TARGET)\n private readonly remoteMethod: BaseRemoteMethod,\n @Inject(INJECTOR)\n injector: Injector | null = null,\n @Inject(REMOTE_METHOD_META_DATA)\n metadata: BaseRemoteMethodMetadata = remoteMethod.metadata,\n ) {\n super(injector, metadata);\n }\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\n\n public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAEa,uBAAuB,GAAG,IAAI,cAAc,CAAC,4CAA4C,EAAE;MA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,KAAK,CAAC,UAA4B,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;KAC3E;;AAhBmB,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAI3B,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,+BAA+B,EAE/B,EAAA,EAAA,KAAA,EAAA,QAAQ,aAER,uBAAuB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;;0BAKN,MAAM;2BAAC,+BAA+B,CAAA;;0BAEtC,MAAM;2BAAC,QAAQ,CAAA;;0BAEf,MAAM;2BAAC,uBAAuB,CAAA;;;ACxBnC;;AAEG;;;;"}
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ export declare class ContenteditableDirective {
|
|
|
10
10
|
onClick($event: Event): void;
|
|
11
11
|
onInput($event: any): Promise<any>;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContenteditableDirective, never>;
|
|
13
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": "rxapContenteditable"; "property": "property"; "uuid": "uuid"; }, {}, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableDirective, "[rxapContenteditable]", never, { "remoteMethodId": "rxapContenteditable"; "property": "property"; "uuid": "uuid"; }, {}, never, never, false>;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @deprecated removed
|
|
@@ -15,7 +15,7 @@ export declare class HttpRemoteMethodDirective<ReturnType = any, Metadata extend
|
|
|
15
15
|
set pathParams(pathParams: HttpRemoteMethodParameter['pathParams']);
|
|
16
16
|
set remoteMethodOrIdOrToken(value: IdOrInstanceOrToken<BaseRemoteMethod<ReturnType, HttpRemoteMethodParameter, Metadata>>);
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodDirective<any, any>, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": "headers"; "reportProgress": "reportProgress"; "params": "params"; "responseType": "responseType"; "withCredentials": "withCredentials"; "body": "body"; "setHeaders": "setHeaders"; "setParams": "setParams"; "pathParams": "pathParams"; "remoteMethodOrIdOrToken": "rxapHttpRemoteMethod"; }, {}, never>;
|
|
18
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<HttpRemoteMethodDirective<any, any>, "button[rxapHttpRemoteMethod]", never, { "headers": "headers"; "reportProgress": "reportProgress"; "params": "params"; "responseType": "responseType"; "withCredentials": "withCredentials"; "body": "body"; "setHeaders": "setHeaders"; "setParams": "setParams"; "pathParams": "pathParams"; "remoteMethodOrIdOrToken": "rxapHttpRemoteMethod"; }, {}, never, never, false>;
|
|
19
19
|
}
|
|
20
20
|
export declare class HttpRemoteMethodDirectiveModule {
|
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethodDirectiveModule, never>;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/remote-method",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Merzough Münker",
|
|
6
6
|
"homepage": "https://gitlab.com/rxap/packages/libs/remote-method",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
},
|
|
18
18
|
"description": "Provides the RemoteMethod concept for RxAP.",
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@angular-devkit/schematics": "^
|
|
21
|
-
"@angular/common": "^
|
|
22
|
-
"@angular/core": "^
|
|
23
|
-
"@angular/platform-browser": "^
|
|
24
|
-
"@angular/platform-browser-dynamic": "^
|
|
20
|
+
"@angular-devkit/schematics": "^14.2.3",
|
|
21
|
+
"@angular/common": "^14.2.2",
|
|
22
|
+
"@angular/core": "^14.2.2",
|
|
23
|
+
"@angular/platform-browser": "^14.2.2",
|
|
24
|
+
"@angular/platform-browser-dynamic": "^14.2.2",
|
|
25
25
|
"@rxap/definition": "^13.0.0",
|
|
26
26
|
"@rxap/utilities": "^13.0.0",
|
|
27
27
|
"@schematics/angular": "^13.2.4",
|
|
28
28
|
"reflect-metadata": "^0.1.13",
|
|
29
|
-
"rxjs": "^6.
|
|
29
|
+
"rxjs": "^6.6.0"
|
|
30
30
|
},
|
|
31
31
|
"schematics": "./collection.json",
|
|
32
32
|
"ng-update": {
|
|
@@ -45,23 +45,22 @@
|
|
|
45
45
|
"save": "dependencies"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@rxap/schematics-utilities": "^
|
|
48
|
+
"@rxap/schematics-utilities": "^14.0.0",
|
|
49
49
|
"ts-morph": "^13.0.3",
|
|
50
|
-
"tslib": "^2.3.1"
|
|
51
|
-
"uuid": "8.3.2"
|
|
50
|
+
"tslib": "^2.3.1"
|
|
52
51
|
},
|
|
53
52
|
"module": "fesm2015/rxap-remote-method.mjs",
|
|
54
53
|
"es2020": "fesm2020/rxap-remote-method.mjs",
|
|
55
54
|
"esm2020": "esm2020/rxap-remote-method.mjs",
|
|
56
55
|
"fesm2020": "fesm2020/rxap-remote-method.mjs",
|
|
57
56
|
"fesm2015": "fesm2015/rxap-remote-method.mjs",
|
|
58
|
-
"typings": "
|
|
57
|
+
"typings": "index.d.ts",
|
|
59
58
|
"exports": {
|
|
60
59
|
"./package.json": {
|
|
61
60
|
"default": "./package.json"
|
|
62
61
|
},
|
|
63
62
|
".": {
|
|
64
|
-
"types": "./
|
|
63
|
+
"types": "./index.d.ts",
|
|
65
64
|
"esm2020": "./esm2020/rxap-remote-method.mjs",
|
|
66
65
|
"es2020": "./fesm2020/rxap-remote-method.mjs",
|
|
67
66
|
"es2015": "./fesm2015/rxap-remote-method.mjs",
|
|
@@ -69,7 +68,7 @@
|
|
|
69
68
|
"default": "./fesm2020/rxap-remote-method.mjs"
|
|
70
69
|
},
|
|
71
70
|
"./directive": {
|
|
72
|
-
"types": "./directive/
|
|
71
|
+
"types": "./directive/index.d.ts",
|
|
73
72
|
"esm2020": "./esm2020/directive/rxap-remote-method-directive.mjs",
|
|
74
73
|
"es2020": "./fesm2020/rxap-remote-method-directive.mjs",
|
|
75
74
|
"es2015": "./fesm2015/rxap-remote-method-directive.mjs",
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
"default": "./fesm2020/rxap-remote-method-directive.mjs"
|
|
78
77
|
},
|
|
79
78
|
"./http/directive": {
|
|
80
|
-
"types": "./http/directive/
|
|
79
|
+
"types": "./http/directive/index.d.ts",
|
|
81
80
|
"esm2020": "./esm2020/http/directive/rxap-remote-method-http-directive.mjs",
|
|
82
81
|
"es2020": "./fesm2020/rxap-remote-method-http-directive.mjs",
|
|
83
82
|
"es2015": "./fesm2015/rxap-remote-method-http-directive.mjs",
|
|
@@ -85,7 +84,7 @@
|
|
|
85
84
|
"default": "./fesm2020/rxap-remote-method-http-directive.mjs"
|
|
86
85
|
},
|
|
87
86
|
"./http": {
|
|
88
|
-
"types": "./http/
|
|
87
|
+
"types": "./http/index.d.ts",
|
|
89
88
|
"esm2020": "./esm2020/http/rxap-remote-method-http.mjs",
|
|
90
89
|
"es2020": "./fesm2020/rxap-remote-method-http.mjs",
|
|
91
90
|
"es2015": "./fesm2015/rxap-remote-method-http.mjs",
|
|
@@ -93,7 +92,7 @@
|
|
|
93
92
|
"default": "./fesm2020/rxap-remote-method-http.mjs"
|
|
94
93
|
},
|
|
95
94
|
"./testing": {
|
|
96
|
-
"types": "./testing/
|
|
95
|
+
"types": "./testing/index.d.ts",
|
|
97
96
|
"esm2020": "./esm2020/testing/rxap-remote-method-testing.mjs",
|
|
98
97
|
"es2020": "./fesm2020/rxap-remote-method-testing.mjs",
|
|
99
98
|
"es2015": "./fesm2015/rxap-remote-method-testing.mjs",
|
|
@@ -102,4 +101,4 @@
|
|
|
102
101
|
}
|
|
103
102
|
},
|
|
104
103
|
"sideEffects": false
|
|
105
|
-
}
|
|
104
|
+
}
|
|
@@ -87,7 +87,7 @@ function AddExport(basePath, filePath) {
|
|
|
87
87
|
}
|
|
88
88
|
exports.AddExport = AddExport;
|
|
89
89
|
function default_1(options) {
|
|
90
|
-
return (host) =>
|
|
90
|
+
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
91
91
|
const projectBasePath = yield (0, workspace_1.createDefaultPath)(host, options.project);
|
|
92
92
|
let path = projectBasePath;
|
|
93
93
|
if (options.path) {
|
|
@@ -319,7 +319,7 @@ function CreateDirectiveRule(options) {
|
|
|
319
319
|
}
|
|
320
320
|
exports.CreateDirectiveRule = CreateDirectiveRule;
|
|
321
321
|
function default_1(options) {
|
|
322
|
-
return (host) =>
|
|
322
|
+
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
323
323
|
const projectRootPath = yield (0, workspace_1.createDefaultPath)(host, options.project);
|
|
324
324
|
if (!options.path) {
|
|
325
325
|
options.path = projectRootPath;
|
|
@@ -6,7 +6,7 @@ const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const core_1 = require("@angular-devkit/core");
|
|
8
8
|
function default_1(options) {
|
|
9
|
-
return (host) =>
|
|
9
|
+
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
10
|
const projectRootPath = yield (0, workspace_1.createDefaultPath)(host, options.project);
|
|
11
11
|
if (!options.path) {
|
|
12
12
|
options.path = projectRootPath;
|
|
File without changes
|
package/directive/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": "../fesm2015/rxap-remote-method-directive.mjs",
|
|
3
|
-
"es2020": "../fesm2020/rxap-remote-method-directive.mjs",
|
|
4
|
-
"esm2020": "../esm2020/directive/rxap-remote-method-directive.mjs",
|
|
5
|
-
"fesm2020": "../fesm2020/rxap-remote-method-directive.mjs",
|
|
6
|
-
"fesm2015": "../fesm2015/rxap-remote-method-directive.mjs",
|
|
7
|
-
"typings": "rxap-remote-method-directive.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@rxap/remote-method/directive"
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": "../../fesm2015/rxap-remote-method-http-directive.mjs",
|
|
3
|
-
"es2020": "../../fesm2020/rxap-remote-method-http-directive.mjs",
|
|
4
|
-
"esm2020": "../../esm2020/http/directive/rxap-remote-method-http-directive.mjs",
|
|
5
|
-
"fesm2020": "../../fesm2020/rxap-remote-method-http-directive.mjs",
|
|
6
|
-
"fesm2015": "../../fesm2015/rxap-remote-method-http-directive.mjs",
|
|
7
|
-
"typings": "rxap-remote-method-http-directive.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@rxap/remote-method/http/directive"
|
|
10
|
-
}
|
package/http/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": "../fesm2015/rxap-remote-method-http.mjs",
|
|
3
|
-
"es2020": "../fesm2020/rxap-remote-method-http.mjs",
|
|
4
|
-
"esm2020": "../esm2020/http/rxap-remote-method-http.mjs",
|
|
5
|
-
"fesm2020": "../fesm2020/rxap-remote-method-http.mjs",
|
|
6
|
-
"fesm2015": "../fesm2015/rxap-remote-method-http.mjs",
|
|
7
|
-
"typings": "rxap-remote-method-http.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@rxap/remote-method/http"
|
|
10
|
-
}
|
package/rxap-remote-method.d.ts
DELETED
package/testing/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"module": "../fesm2015/rxap-remote-method-testing.mjs",
|
|
3
|
-
"es2020": "../fesm2020/rxap-remote-method-testing.mjs",
|
|
4
|
-
"esm2020": "../esm2020/testing/rxap-remote-method-testing.mjs",
|
|
5
|
-
"fesm2020": "../fesm2020/rxap-remote-method-testing.mjs",
|
|
6
|
-
"fesm2015": "../fesm2015/rxap-remote-method-testing.mjs",
|
|
7
|
-
"typings": "rxap-remote-method-testing.d.ts",
|
|
8
|
-
"sideEffects": false,
|
|
9
|
-
"name": "@rxap/remote-method/testing"
|
|
10
|
-
}
|