qcobjects 2.5.118-beta → 2.5.120-beta

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/src/Component.ts CHANGED
@@ -126,7 +126,11 @@ export class Component extends InheritClass implements IComponent {
126
126
  });
127
127
  const self = this;
128
128
 
129
- if (typeof self.name === "undefined") {
129
+ if (typeof name !== "undefined"){
130
+ self.name = name;
131
+ }
132
+
133
+ if (typeof self.name === "undefined" && typeof name === "undefined") {
130
134
  logger.warn("A name is not defined for " + __getType__(self));
131
135
  }
132
136
 
@@ -3,7 +3,7 @@ import { asyncLoad } from "./asyncLoad";
3
3
  import { ComplexStorageCache } from "./ComplexStorageCache";
4
4
  import { _DataStringify } from "./DataStringify";
5
5
  import { logger } from "./Logger";
6
- import { _require_, is_phonegap, isBrowser } from "./platform";
6
+ import { is_phonegap, isBrowser } from "./platform";
7
7
  import { _top } from "./top";
8
8
 
9
9
  /**
@@ -188,9 +188,10 @@ export const componentLoader = function (component: IComponent, _async: boolean)
188
188
  } else {
189
189
  logger.debug("Loading the component as a local file in server...");
190
190
  const _directLoad = function () {
191
- const fs = _require_("fs");
191
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
192
+ const {readFile} = require("node:fs");
192
193
  logger.debug("SENDING THE NORMAL REQUEST ");
193
- (fs).readFile(component.url, _componentLoaded);
194
+ readFile(component.url, _componentLoaded);
194
195
  };
195
196
 
196
197
  if (component.cached) {