taon 19.0.52 → 19.0.53

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.
@@ -718,29 +718,26 @@ const inject = (entity) => {
718
718
  //#region @browser
719
719
  //#endregion
720
720
  class BaseAngularsService {
721
+ //#endregion
721
722
  constructor() {
722
723
  //#region @browser
723
724
  this.currentContext = inject$1(TAON_CONTEXT);
724
- //#region @browser
725
- this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
726
- optional: true,
727
- });
728
- // #endregion
729
725
  }
726
+ injectController(ctor,
730
727
  /**
731
- * @deprecated
732
- * Returns the host URL for the backend service
733
- * that is running on localhost (normal NodeJS/ExpressJS mode).
728
+ * optional override context
734
729
  */
735
- get host() {
736
- return `http://localhost:${this.CURRENT_HOST_BACKEND_PORT}`;
737
- }
738
- injectController(ctor) {
739
- let currentContext;
740
- //#region @browser
741
- currentContext = this.currentContext;
742
- //#endregion
743
- return inject(() => currentContext.getClass(ctor));
730
+ overrideCurrentContext) {
731
+ return inject(() => {
732
+ let currentContext;
733
+ //#region @browser
734
+ currentContext = overrideCurrentContext ? overrideCurrentContext : this.currentContext;
735
+ //#endregion
736
+ if (!currentContext) {
737
+ throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
738
+ }
739
+ return currentContext ? currentContext.getClass(ctor) : void 0;
740
+ });
744
741
  }
745
742
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseAngularsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
746
743
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseAngularsService }); }
@@ -1513,7 +1510,8 @@ class RealtimeClient {
1513
1510
  };
1514
1511
  // console.log('[browser] nspPath', nspPath);
1515
1512
  if (this.core.ctx.config.frontendHost &&
1516
- this.core.ctx.config.frontendHost !== '') {
1513
+ this.core.ctx.config.frontendHost !== '' &&
1514
+ this.core.ctx.isRunningInsideDocker) {
1517
1515
  console.log(`[${this.core.ctx.contextName}] USING FRONTEND HOST ${this.core.ctx.config.frontendHost}`);
1518
1516
  nspPath.global = new URL(`${this.core.ctx.frontendHostUri.origin}${nspPath.global.pathname}`);
1519
1517
  nspPath.realtime = new URL(`${this.core.ctx.frontendHostUri.origin}${nspPath.realtime.pathname}`);
@@ -3119,6 +3117,10 @@ class EndpointContext {
3119
3117
  /* */
3120
3118
  /* */
3121
3119
  /* */
3120
+ /* */
3121
+ /* */
3122
+ /* */
3123
+ /* */
3122
3124
  await this.initFrontnedMiddlewares();
3123
3125
  }
3124
3126
  //#endregion
@@ -3340,6 +3342,7 @@ class EndpointContext {
3340
3342
  /* */
3341
3343
  /* */
3342
3344
  /* */
3345
+ /* */
3343
3346
  return (void 0);
3344
3347
  }
3345
3348
  //#endregion