@rxap/remote-method 16.0.0-dev.2 → 16.0.0-dev.4
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/CHANGELOG.md +258 -0
- package/README.md +8 -73
- package/directive/index.d.ts +5 -5
- package/directive/lib/remote-method-template-collection.directive.d.ts +38 -38
- package/directive/lib/remote-method-template.directive.d.ts +7 -7
- package/directive/lib/remote-method.directive.d.ts +7 -7
- package/esm2022/directive/index.mjs +6 -0
- package/esm2022/directive/lib/error.mjs +1 -1
- package/esm2022/directive/lib/remote-method-template-collection.directive.mjs +114 -110
- package/esm2022/directive/lib/remote-method-template.directive.mjs +44 -38
- package/esm2022/directive/lib/remote-method.directive.mjs +27 -24
- package/esm2022/directive/lib/tokens.mjs +1 -1
- package/esm2022/directive/rxap-remote-method-directive.mjs +2 -2
- package/esm2022/http/directive/index.mjs +3 -0
- package/esm2022/http/directive/lib/contenteditable.directive.mjs +8 -9
- package/esm2022/http/directive/lib/http-remote-method.directive.mjs +7 -8
- package/esm2022/http/directive/rxap-remote-method-http-directive.mjs +2 -2
- package/esm2022/http/index.mjs +4 -0
- package/esm2022/http/lib/base-http.remote-method.mjs +19 -20
- package/esm2022/http/lib/http-remote-method.loader.mjs +7 -8
- package/esm2022/http/lib/http.remote-method.mjs +31 -22
- package/esm2022/http/rxap-remote-method-http.mjs +2 -2
- package/esm2022/index.mjs +1 -1
- package/esm2022/lib/base.remote-method.mjs +8 -9
- package/esm2022/lib/error.mjs +1 -1
- package/esm2022/lib/proxy.remote-method.mjs +8 -9
- package/esm2022/lib/remote-method-loader.mjs +7 -8
- package/esm2022/lib/tokens.mjs +1 -1
- package/esm2022/rxap-remote-method.mjs +1 -1
- package/esm2022/testing/index.mjs +2 -0
- package/esm2022/testing/lib/remote-method-testing-loader.mjs +3 -3
- package/esm2022/testing/rxap-remote-method-testing.mjs +2 -2
- package/fesm2022/rxap-remote-method-directive.mjs +169 -153
- package/fesm2022/rxap-remote-method-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http-directive.mjs +8 -8
- package/fesm2022/rxap-remote-method-http-directive.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-http.mjs +43 -33
- package/fesm2022/rxap-remote-method-http.mjs.map +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs +1 -1
- package/fesm2022/rxap-remote-method-testing.mjs.map +1 -1
- package/fesm2022/rxap-remote-method.mjs +10 -10
- package/fesm2022/rxap-remote-method.mjs.map +1 -1
- package/http/directive/index.d.ts +2 -5
- package/http/directive/lib/http-remote-method.directive.d.ts +1 -1
- package/http/index.d.ts +3 -5
- package/http/lib/base-http.remote-method.d.ts +3 -3
- package/http/lib/http-remote-method.loader.d.ts +2 -2
- package/http/lib/http.remote-method.d.ts +3 -3
- package/lib/base.remote-method.d.ts +2 -2
- package/lib/proxy.remote-method.d.ts +1 -1
- package/lib/remote-method-loader.d.ts +1 -1
- package/package.json +47 -42
- package/testing/index.d.ts +1 -5
- package/testing/lib/remote-method-testing-loader.d.ts +2 -2
- package/LICENSE +0 -24
- package/collection.json +0 -25
- package/directive/public_api.d.ts +0 -5
- package/esm2022/directive/public_api.mjs +0 -6
- package/esm2022/http/directive/public_api.mjs +0 -3
- package/esm2022/http/public_api.mjs +0 -4
- package/esm2022/testing/public_api.mjs +0 -2
- package/http/directive/public_api.d.ts +0 -2
- package/http/public_api.d.ts +0 -3
- package/migration.json +0 -4
- package/src/schematics/base/files/__name@dasherize__.remote-method.ts.template +0 -14
- package/src/schematics/base/index.d.ts +0 -12
- package/src/schematics/base/index.js +0 -116
- package/src/schematics/base/index.js.map +0 -1
- package/src/schematics/base/schema.json +0 -54
- package/src/schematics/directive/index.d.ts +0 -18
- package/src/schematics/directive/index.js +0 -346
- package/src/schematics/directive/index.js.map +0 -1
- package/src/schematics/directive/schema.json +0 -50
- package/src/schematics/http/files/__name@dasherize__.remote-method.ts.template +0 -16
- package/src/schematics/http/index.d.ts +0 -3
- package/src/schematics/http/index.js +0 -26
- package/src/schematics/http/index.js.map +0 -1
- package/src/schematics/http/schema.json +0 -30
- package/src/schematics/ng-add/index.d.ts +0 -2
- package/src/schematics/ng-add/index.js +0 -8
- package/src/schematics/ng-add/index.js.map +0 -1
- package/src/schematics/ng-add/schema.json +0 -7
- package/testing/public_api.d.ts +0 -1
|
@@ -3,7 +3,7 @@ import { InjectionToken, Injector, InjectFlags, INJECTOR, Injectable, Optional,
|
|
|
3
3
|
import { DefinitionMetadata, BaseDefinition, DefinitionLoader } from '@rxap/definition';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { RxapError } from '@rxap/utilities';
|
|
6
|
-
import { CounterSubject } from '@rxap/
|
|
6
|
+
import { CounterSubject } from '@rxap/rxjs';
|
|
7
7
|
|
|
8
8
|
const REMOTE_METHOD_META_DATA = new InjectionToken('rxap/remote-method/REMOTE_METHOD_META_DATA');
|
|
9
9
|
const RXAP_PROXY_REMOTE_METHOD_TARGET = new InjectionToken('rxap/remote-method/proxy/target');
|
|
@@ -63,10 +63,10 @@ class BaseRemoteMethod extends BaseDefinition {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
67
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod, deps: [{ token: INJECTOR, optional: true }, { token: REMOTE_METHOD_META_DATA, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
67
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod }); }
|
|
68
68
|
}
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: BaseRemoteMethod, decorators: [{
|
|
70
70
|
type: Injectable
|
|
71
71
|
}], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
|
|
72
72
|
type: Optional
|
|
@@ -86,10 +86,10 @@ class RemoteMethodLoader extends DefinitionLoader {
|
|
|
86
86
|
.load(remoteMethodIdOrInstanceOrToken, metadata, injector, notFoundValue, flags)
|
|
87
87
|
.call(parameters);
|
|
88
88
|
}
|
|
89
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
90
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
90
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, providedIn: 'root' }); }
|
|
91
91
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: RemoteMethodLoader, decorators: [{
|
|
93
93
|
type: Injectable,
|
|
94
94
|
args: [{ providedIn: 'root' }]
|
|
95
95
|
}] });
|
|
@@ -102,10 +102,10 @@ class ProxyRemoteMethod extends BaseRemoteMethod {
|
|
|
102
102
|
async _call(parameters) {
|
|
103
103
|
return this.remoteMethod.call(await this.transformParameters(parameters));
|
|
104
104
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
106
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProxyRemoteMethod, deps: [{ token: RXAP_PROXY_REMOTE_METHOD_TARGET }, { token: INJECTOR }, { token: REMOTE_METHOD_META_DATA }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
106
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ProxyRemoteMethod }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", 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;;ACD7F,MAAO,qBAAsB,SAAQ,SAAS,CAAA;AAElD,IAAA,WAAA,CAAY,OAAe,EAAE,IAAY,EAAE,SAAkB,EAAA;QAC3D,KAAK,CAAC,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KACxD;AAEF;;ACkBK,SAAU,gBAAgB,CAC9B,YAA+B,EAC/B,SAAsB,GAAA,kBAAkB,EACxC,WAAA,GAAsB,qBAAqB,EAAA;AAE3C,IAAA,OAAO,UAAS,MAAW,EAAA;QACzB,kBAAkB,CAAC,YAAY,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AACnE,KAAC,CAAC;AACJ,CAAC;AAED,MACsB,gBAEkD,SAAQ,cAAwB,CAAA;AAUtG,IAAA,WAAA,CAGI,QAA4B,GAAA,IAAI,EAGhC,QAAA,GAAuB,IAAI,EAAA;QAE7B,KAAK,CAAC,QAAQ,CAAC,CAAC;AAhBX,QAAA,IAAA,CAAA,SAAS,GAAwB,IAAI,OAAO,EAAc,CAAC;AAE3D,QAAA,IAAA,CAAA,qBAAqB,GAAmB,IAAI,cAAc,EAAE,CAAC;QAI5D,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;QAW5B,IAAI,QAAQ,KAAK,SAAS,EAAE;AAC1B,YAAA,MAAM,IAAI,qBAAqB,CAAC,gFAA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A,EAAA;;2FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACClC,MACsB,iBACpB,SAAQ,gBAA6C,CAAA;IAErD,WAEmB,CAAA,YAA8B,EAE7C,QAA4B,GAAA,IAAI,EAEhC,QAAqC,GAAA,YAAY,CAAC,QAAQ,EAAA;AAE5D,QAAA,KAAK,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QANT,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;KAOhD;IAES,MAAM,KAAK,CAAC,UAA4B,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC;KAC3E;AAhBmB,IAAA,SAAA,IAAA,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,EAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA,EAAA;;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;;;;"}
|
|
1
|
+
{"version":3,"file":"rxap-remote-method.mjs","sources":["../../../../../packages/angular/remote-method/src/lib/tokens.ts","../../../../../packages/angular/remote-method/src/lib/error.ts","../../../../../packages/angular/remote-method/src/lib/base.remote-method.ts","../../../../../packages/angular/remote-method/src/lib/remote-method-loader.ts","../../../../../packages/angular/remote-method/src/lib/proxy.remote-method.ts","../../../../../packages/angular/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 AbstractType,\n Inject,\n Injectable,\n InjectFlags,\n InjectionToken,\n Injector,\n INJECTOR,\n Optional,\n Type,\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/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 = 'BaseRemoteMethod',\n packageName = '@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(\n 'Injector is undefined. Ensure that the Injector is added to the deps property!',\n '',\n this.constructor.name,\n );\n }\n this.injector = injector ?? Injector.NULL;\n if (typeof this.injector.get !== 'function') {\n throw new RxapRemoteMethodError(\n 'The property injector is not Injector like. Check the deps property!',\n '',\n this.constructor.name,\n );\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 InjectFlags,\n Injector,\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 Inject,\n Injectable,\n INJECTOR,\n Injector,\n} from '@angular/core';\nimport {\n BaseRemoteMethod,\n BaseRemoteMethodMetadata,\n} from './base.remote-method';\nimport {\n REMOTE_METHOD_META_DATA,\n RXAP_PROXY_REMOTE_METHOD_TARGET,\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 public abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;\n\n protected async _call(parameters?: SourceParameter): Promise<any> {\n return this.remoteMethod.call(await this.transformParameters(parameters));\n }\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;;ACD7F,MAAO,qBAAsB,SAAQ,SAAS,CAAA;AAElD,IAAA,WAAA,CAAY,OAAe,EAAE,IAAY,EAAE,SAAkB,EAAA;QAC3D,KAAK,CAAC,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;KACxD;AAEF;;ACkBK,SAAU,gBAAgB,CAC9B,YAA+B,EAC/B,SAAS,GAAG,kBAAkB,EAC9B,WAAW,GAAG,qBAAqB,EAA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AA,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,EAAA;kHARb,iBAAiB,EAAA,CAAA,CAAA,EAAA;;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;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RemoteMethodDirective } from '@rxap/remote-method/directive';
|
|
2
|
-
import {
|
|
2
|
+
import { HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from '@rxap/remote-method/http';
|
|
3
3
|
import { BaseRemoteMethod } from '@rxap/remote-method';
|
|
4
4
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
5
5
|
import * as i0 from "@angular/core";
|
package/http/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
/// <amd-module name="@rxap/remote-method/http" />
|
|
5
|
-
export * from './public_api';
|
|
1
|
+
export * from './lib/http.remote-method';
|
|
2
|
+
export * from './lib/http-remote-method.loader';
|
|
3
|
+
export * from './lib/base-http.remote-method';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
|
-
import { HttpClient,
|
|
2
|
+
import { HttpClient, HttpHeaders, HttpParams, HttpRequest } from '@angular/common/http';
|
|
3
3
|
import { BaseRemoteMethod, BaseRemoteMethodMetadata } from '@rxap/remote-method';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface HttpRemoteMethodMetadata extends BaseRemoteMethodMetadata {
|
|
@@ -30,13 +30,13 @@ export interface HttpRemoteMethodParameter<PathParams = any> {
|
|
|
30
30
|
}
|
|
31
31
|
export declare abstract class BaseHttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseRemoteMethod<ReturnType, Parameter, MetaData> {
|
|
32
32
|
readonly http: HttpClient;
|
|
33
|
-
protected _httpRequest: HttpRequest<ReturnType>;
|
|
34
33
|
timeout: number;
|
|
34
|
+
protected _httpRequest: HttpRequest<ReturnType>;
|
|
35
35
|
constructor(http: HttpClient, injector: Injector, metaData?: any | null);
|
|
36
|
-
protected getRequestUrl(): string;
|
|
37
36
|
init(): void;
|
|
38
37
|
updateRequest(parameters: Partial<HttpRemoteMethodParameter>): HttpRequest<ReturnType>;
|
|
39
38
|
buildUrlWithParams(url: string, pathParams?: PathParams): string;
|
|
39
|
+
protected getRequestUrl(): string;
|
|
40
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseHttpRemoteMethod<any, any, any, any>, [null, null, { optional: true; }]>;
|
|
41
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<BaseHttpRemoteMethod<any, any, any, any>>;
|
|
42
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
2
|
+
import { InjectFlags, Injector } from '@angular/core';
|
|
3
3
|
import { IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class HttpRemoteMethodLoader {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseHttpRemoteMethod,
|
|
1
|
+
import { HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpSentEvent } from '@angular/common/http';
|
|
2
|
+
import { BaseHttpRemoteMethod, HttpRemoteMethodMetadata, HttpRemoteMethodParameter } from './base-http.remote-method';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class HttpRemoteMethod<ReturnType = any, PathParams = any, Parameter extends object = HttpRemoteMethodParameter<PathParams>, MetaData extends HttpRemoteMethodMetadata = HttpRemoteMethodMetadata> extends BaseHttpRemoteMethod<ReturnType, PathParams, Parameter, MetaData> {
|
|
5
|
-
protected _call(parameters?: Parameter): Promise<ReturnType>;
|
|
6
5
|
onSentEvent(event: HttpSentEvent): void;
|
|
7
6
|
onHeaderResponse(event: HttpHeaderResponse): void;
|
|
8
7
|
onResponse(event: HttpResponse<ReturnType>): void;
|
|
9
8
|
onProgressEvent(event: HttpProgressEvent): void;
|
|
10
9
|
createHttpRequestParameters(parameters?: Parameter): Partial<HttpRemoteMethodParameter>;
|
|
11
10
|
transformer(response: any): ReturnType;
|
|
11
|
+
protected _call(parameters?: Parameter): Promise<ReturnType>;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpRemoteMethod<any, any, any, any>, never>;
|
|
13
13
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpRemoteMethod<any, any, any, any>>;
|
|
14
14
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractType, InjectionToken, Injector, Type } from '@angular/core';
|
|
2
2
|
import { BaseDefinition, BaseDefinitionMetadata } from '@rxap/definition';
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { Refreshable } from '@rxap/utilities';
|
|
5
|
-
import { CounterSubject } from '@rxap/
|
|
5
|
+
import { CounterSubject } from '@rxap/rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export interface BaseRemoteMethodMetadata extends BaseDefinitionMetadata {
|
|
8
8
|
refresh?: Array<Type<Refreshable> | InjectionToken<Refreshable> | AbstractType<Refreshable>>;
|
|
@@ -4,8 +4,8 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare abstract class ProxyRemoteMethod<ReturnType = any, SourceParameter = any, TargetParameter = SourceParameter> extends BaseRemoteMethod<ReturnType, SourceParameter> {
|
|
5
5
|
private readonly remoteMethod;
|
|
6
6
|
constructor(remoteMethod: BaseRemoteMethod, injector?: Injector | null, metadata?: BaseRemoteMethodMetadata);
|
|
7
|
-
protected _call(parameters?: SourceParameter): Promise<any>;
|
|
8
7
|
abstract transformParameters(parameters?: SourceParameter): TargetParameter | Promise<TargetParameter>;
|
|
8
|
+
protected _call(parameters?: SourceParameter): Promise<any>;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProxyRemoteMethod<any, any, any>, never>;
|
|
10
10
|
static ɵprov: i0.ɵɵInjectableDeclaration<ProxyRemoteMethod<any, any, any>>;
|
|
11
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectFlags, Injector } from '@angular/core';
|
|
2
2
|
import { BaseRemoteMethod, BaseRemoteMethodMetadata } from './base.remote-method';
|
|
3
3
|
import { DefinitionLoader, IdOrInstanceOrToken } from '@rxap/definition';
|
|
4
4
|
import * as i0 from "@angular/core";
|
package/package.json
CHANGED
|
@@ -1,55 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/remote-method",
|
|
3
|
-
"version": "16.0.0-dev.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
"version": "16.0.0-dev.4",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.1.4",
|
|
6
|
+
"@angular/core": "^16.1.4",
|
|
7
|
+
"@rxap/definition": "^16.0.0-dev.4",
|
|
8
|
+
"@rxap/rxjs": "^1.0.1-dev.0",
|
|
9
|
+
"@rxap/utilities": "^16.0.0-dev.2",
|
|
10
|
+
"rxjs": "^7.8.0",
|
|
11
|
+
"@angular/platform-browser": "16.1.4"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"tslib": "2.5.3"
|
|
16
|
+
},
|
|
17
|
+
"description": "Provides the RemoteMethod concept for RxAP.",
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public",
|
|
20
|
+
"directory": "../../../dist/packages/angular/remote-method"
|
|
21
|
+
},
|
|
8
22
|
"keywords": [
|
|
9
23
|
"rxap",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
24
|
+
"angular",
|
|
25
|
+
"ngx"
|
|
12
26
|
],
|
|
13
|
-
"
|
|
27
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/angular/remote-method",
|
|
14
28
|
"bugs": {
|
|
15
29
|
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
16
30
|
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
17
31
|
},
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"@rxap/utilities": "^16.0.0-dev.1",
|
|
28
|
-
"@schematics/angular": "^16.0.2",
|
|
29
|
-
"reflect-metadata": "^0.1.13",
|
|
30
|
-
"rxjs": "^6.6.0"
|
|
32
|
+
"license": "GPL-3.0-or-later",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://gitlab.com/rxap/packages.git",
|
|
36
|
+
"directory": "packages/angular/remote-method"
|
|
37
|
+
},
|
|
38
|
+
"author": {
|
|
39
|
+
"name": "Merzough Münker",
|
|
40
|
+
"email": "mmuenker@digitaix.com"
|
|
31
41
|
},
|
|
32
|
-
"
|
|
33
|
-
"ng-update": {
|
|
34
|
-
"migrations": "./migration.json",
|
|
42
|
+
"nx-migrations": {
|
|
35
43
|
"packageGroup": [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
{
|
|
45
|
+
"package": "@rxap/utilities",
|
|
46
|
+
"version": "16.0.0-dev.2"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"package": "@rxap/definition",
|
|
50
|
+
"version": "16.0.0-dev.4"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"package": "@rxap/rxjs",
|
|
54
|
+
"version": "1.0.1-dev.0"
|
|
55
|
+
}
|
|
39
56
|
]
|
|
40
57
|
},
|
|
41
|
-
"
|
|
42
|
-
"directory": "../../dist/libs/remote-method",
|
|
43
|
-
"access": "public"
|
|
44
|
-
},
|
|
45
|
-
"ng-add": {
|
|
46
|
-
"save": "dependencies"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@rxap/schematics-utilities": "^16.0.0-dev.1",
|
|
50
|
-
"ts-morph": "^13.0.3",
|
|
51
|
-
"tslib": "^2.3.1"
|
|
52
|
-
},
|
|
58
|
+
"gitHead": "9ad96f2d4db9225ab199d03fc172efff52609d5d",
|
|
53
59
|
"module": "fesm2022/rxap-remote-method.mjs",
|
|
54
60
|
"typings": "index.d.ts",
|
|
55
61
|
"exports": {
|
|
@@ -86,6 +92,5 @@
|
|
|
86
92
|
"esm": "./esm2022/http/directive/rxap-remote-method-http-directive.mjs",
|
|
87
93
|
"default": "./fesm2022/rxap-remote-method-http-directive.mjs"
|
|
88
94
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
}
|
|
95
|
+
}
|
|
96
|
+
}
|
package/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BaseRemoteMethod, BaseRemoteMethodMetadata, RemoteMethodLoader } from '@rxap/remote-method';
|
|
2
|
+
import { AbstractType, InjectionToken, Provider, Type } from '@angular/core';
|
|
3
3
|
export type MockRemoteMethod = (parameters?: any, metadata?: any) => any;
|
|
4
4
|
export declare class RemoteMethodTestingLoader extends RemoteMethodLoader {
|
|
5
5
|
private mockedRemoteMethods;
|
package/LICENSE
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2021, Merzough Münker
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
|
6
|
-
1. Redistributions of source code must retain the above copyright
|
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
|
8
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
|
10
|
-
documentation and/or other materials provided with the distribution.
|
|
11
|
-
3. Neither the name of Merzough Münker nor the
|
|
12
|
-
names of its contributors may be used to endorse or promote products
|
|
13
|
-
derived from this software without specific prior written permission.
|
|
14
|
-
|
|
15
|
-
THIS SOFTWARE IS PROVIDED BY MERZOGUH MÜNKER ''AS IS'' AND ANY
|
|
16
|
-
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
-
DISCLAIMED. IN NO EVENT SHALL MERZOGUH MÜNKER BE LIABLE FOR ANY
|
|
19
|
-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/collection.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schematics": {
|
|
3
|
-
"ng-add": {
|
|
4
|
-
"description": "Setup the package @rxap/remote-method for the workspace.",
|
|
5
|
-
"factory": "./src/schematics/ng-add/index",
|
|
6
|
-
"schema": "./src/schematics/ng-add/schema.json"
|
|
7
|
-
},
|
|
8
|
-
"base": {
|
|
9
|
-
"description": "create a base remote method",
|
|
10
|
-
"factory": "./src/schematics/base/index",
|
|
11
|
-
"schema": "./src/schematics/base/schema.json"
|
|
12
|
-
},
|
|
13
|
-
"http": {
|
|
14
|
-
"description": "Creates a http remote method",
|
|
15
|
-
"factory": "./src/schematics/http/index",
|
|
16
|
-
"schema": "./src/schematics/http/schema.json"
|
|
17
|
-
},
|
|
18
|
-
"directive": {
|
|
19
|
-
"description": "add a directive for the remote method",
|
|
20
|
-
"factory": "./src/schematics/directive/index",
|
|
21
|
-
"schema": "./src/schematics/directive/schema.json"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"$schema": "../../node_modules/@angular-devkit/schematics/collection-schema.json"
|
|
25
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './lib/remote-method.directive';
|
|
2
|
-
export * from './lib/remote-method-template-collection.directive';
|
|
3
|
-
export * from './lib/remote-method-template.directive';
|
|
4
|
-
export * from './lib/error';
|
|
5
|
-
export * from './lib/tokens';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9kaXJlY3RpdmUvc3JjL3B1YmxpY19hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLG1EQUFtRCxDQUFDO0FBQ2xFLGNBQWMsd0NBQXdDLENBQUM7QUFDdkQsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLXRlbXBsYXRlLWNvbGxlY3Rpb24uZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3JlbW90ZS1tZXRob2QtdGVtcGxhdGUuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Vycm9yJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3Rva2Vucyc7XG4iXX0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from './lib/http-remote-method.directive';
|
|
2
|
-
export * from './lib/contenteditable.directive';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9odHRwL2RpcmVjdGl2ZS9zcmMvcHVibGljX2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG9DQUFvQyxDQUFDO0FBQ25ELGNBQWMsaUNBQWlDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9odHRwLXJlbW90ZS1tZXRob2QuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvbnRlbnRlZGl0YWJsZS5kaXJlY3RpdmUnO1xuIl19
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './lib/http.remote-method';
|
|
2
|
-
export * from './lib/http-remote-method.loader';
|
|
3
|
-
export * from './lib/base-http.remote-method';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC9odHRwL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyxpQ0FBaUMsQ0FBQztBQUNoRCxjQUFjLCtCQUErQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvaHR0cC5yZW1vdGUtbWV0aG9kJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2h0dHAtcmVtb3RlLW1ldGhvZC5sb2FkZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvYmFzZS1odHRwLnJlbW90ZS1tZXRob2QnO1xuIl19
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export * from './lib/remote-method-testing-loader';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcmVtb3RlLW1ldGhvZC90ZXN0aW5nL3NyYy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsb0NBQW9DLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9yZW1vdGUtbWV0aG9kLXRlc3RpbmctbG9hZGVyJztcbiJdfQ==
|
package/http/public_api.d.ts
DELETED
package/migration.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RxapRemoteMethod, BaseRemoteMethod } from '@rxap/remote-method';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
|
|
4
|
-
@RxapRemoteMethod({
|
|
5
|
-
id: '<%= dasherize(name) %>'
|
|
6
|
-
})
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class <%= classify(name) %>RemoteMethod extends BaseRemoteMethod {
|
|
9
|
-
|
|
10
|
-
protected async _call(parameters?: any): Promise<any> {
|
|
11
|
-
return parameters;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
import { BaseSchema } from './schema';
|
|
3
|
-
export interface CreateRemoteMethodOptions {
|
|
4
|
-
filePath: string;
|
|
5
|
-
name: string;
|
|
6
|
-
parametersType: string;
|
|
7
|
-
returnType: string;
|
|
8
|
-
collection: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function CreateRemoteMethod({ filePath, name, parametersType, returnType, collection }: CreateRemoteMethodOptions): Rule;
|
|
11
|
-
export declare function AddExport(basePath: string, filePath: string): Rule;
|
|
12
|
-
export default function (options: BaseSchema): Rule;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AddExport = exports.CreateRemoteMethod = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
7
|
-
const path_1 = require("path");
|
|
8
|
-
const ts_morph_1 = require("ts-morph");
|
|
9
|
-
const core_1 = require("@angular-devkit/core");
|
|
10
|
-
const { classify, camelize, dasherize } = core_1.strings;
|
|
11
|
-
function CreateRemoteMethod({ filePath, name, parametersType, returnType, collection }) {
|
|
12
|
-
return tree => {
|
|
13
|
-
if (tree.exists(filePath)) {
|
|
14
|
-
console.warn(`The file '${filePath}' already exists!`);
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
const project = new ts_morph_1.Project({
|
|
18
|
-
manipulationSettings: { quoteKind: ts_morph_1.QuoteKind.Single, indentationText: ts_morph_1.IndentationText.TwoSpaces, useTrailingCommas: true },
|
|
19
|
-
useInMemoryFileSystem: true
|
|
20
|
-
});
|
|
21
|
-
const sourceFile = project.createSourceFile(filePath);
|
|
22
|
-
const remoteMethodName = classify([name, 'remote-method'].join('-'));
|
|
23
|
-
sourceFile.addClass({
|
|
24
|
-
name: remoteMethodName,
|
|
25
|
-
decorators: [
|
|
26
|
-
{
|
|
27
|
-
name: 'RxapRemoteMethod',
|
|
28
|
-
arguments: [ts_morph_1.Writers.object({
|
|
29
|
-
id: writer => writer.quote(dasherize(name))
|
|
30
|
-
})]
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: 'Injectable',
|
|
34
|
-
arguments: [],
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
isExported: true,
|
|
38
|
-
extends: `BaseRemoteMethod<${returnType}${collection ? '[]' : ''}, ${parametersType}>`,
|
|
39
|
-
methods: [
|
|
40
|
-
{
|
|
41
|
-
name: '_call',
|
|
42
|
-
isAsync: true,
|
|
43
|
-
parameters: [
|
|
44
|
-
{
|
|
45
|
-
name: 'parameters',
|
|
46
|
-
hasQuestionToken: true,
|
|
47
|
-
type: parametersType
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
scope: ts_morph_1.Scope.Protected,
|
|
51
|
-
returnType: `Promise<${returnType}${collection ? '[]' : ''}>`,
|
|
52
|
-
statements: [
|
|
53
|
-
`return Promise.reject('Not yet implemented')`,
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
});
|
|
58
|
-
sourceFile.addImportDeclarations([
|
|
59
|
-
{
|
|
60
|
-
namedImports: [{ name: 'Injectable' }],
|
|
61
|
-
moduleSpecifier: '@angular/core'
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
moduleSpecifier: '@rxap/remote-method',
|
|
65
|
-
namedImports: [
|
|
66
|
-
{ name: 'RxapRemoteMethod' },
|
|
67
|
-
{ name: 'BaseRemoteMethod' }
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
]);
|
|
71
|
-
tree.create(filePath, sourceFile.getFullText());
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
exports.CreateRemoteMethod = CreateRemoteMethod;
|
|
75
|
-
function AddExport(basePath, filePath) {
|
|
76
|
-
return tree => {
|
|
77
|
-
const indexFilePath = (0, path_1.join)(basePath, 'index.ts');
|
|
78
|
-
if (!tree.exists(indexFilePath)) {
|
|
79
|
-
console.warn('Could not find index file!');
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
const relPath = (0, path_1.relative)(basePath.replace(/^\//, ''), filePath.replace(/^\//, ''));
|
|
83
|
-
let indexFile = tree.get(indexFilePath).content.toString('utf-8');
|
|
84
|
-
indexFile += `\nexport * from './${relPath.replace(/\.ts$/, '')}';`;
|
|
85
|
-
tree.overwrite(indexFilePath, indexFile);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
exports.AddExport = AddExport;
|
|
89
|
-
function default_1(options) {
|
|
90
|
-
return (host) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
91
|
-
const projectBasePath = yield (0, workspace_1.createDefaultPath)(host, options.project);
|
|
92
|
-
let path = projectBasePath;
|
|
93
|
-
if (options.path) {
|
|
94
|
-
if (options.path[0] === '/') {
|
|
95
|
-
path = (0, path_1.join)(path, options.path);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
path = options.path;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
const filePath = (0, path_1.join)(path, [dasherize(options.name), 'remote-method', 'ts'].join('.'));
|
|
102
|
-
return (0, schematics_1.chain)([
|
|
103
|
-
CreateRemoteMethod({
|
|
104
|
-
filePath,
|
|
105
|
-
name: options.name,
|
|
106
|
-
collection: options.collection,
|
|
107
|
-
returnType: options.returnType,
|
|
108
|
-
parametersType: options.parametersType,
|
|
109
|
-
}),
|
|
110
|
-
(0, schematics_1.schematic)('directive', options),
|
|
111
|
-
options.export ? AddExport((0, path_1.join)(projectBasePath, '..'), filePath) : (0, schematics_1.noop)(),
|
|
112
|
-
]);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
exports.default = default_1;
|
|
116
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/remote-method/src/schematics/base/index.ts"],"names":[],"mappings":";;;;AAAA,2DAMoC;AACpC,qEAA0E;AAC1E,+BAGc;AAEd,uCAOkB;AAElB,+CAA+C;AAE/C,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,cAAO,CAAC;AAUlD,SAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAA6B;IACtH,OAAO,IAAI,CAAC,EAAE;QAEZ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACzB,OAAO,CAAC,IAAI,CAAC,aAAa,QAAQ,mBAAmB,CAAC,CAAC;YACvD,OAAO;SACR;QAED,MAAM,OAAO,GAAG,IAAI,kBAAO,CAAC;YAC1B,oBAAoB,EAAG,EAAE,SAAS,EAAE,oBAAS,CAAC,MAAM,EAAE,eAAe,EAAE,0BAAe,CAAC,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE;YAC3H,qBAAqB,EAAE,IAAI;SAC5B,CAAC,CAAC;QAEH,MAAM,UAAU,GAAe,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAElE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAE,IAAI,EAAE,eAAe,CAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAEvE,UAAU,CAAC,QAAQ,CAAC;YAClB,IAAI,EAAE,gBAAgB;YACtB,UAAU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