qcobjects 2.5.111-beta → 2.5.113-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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.111-beta
1
+ 2.5.113-beta
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.findPackageNodePath = void 0;
4
+ const _import_1 = require("./_import_");
7
5
  const CONFIG_1 = require("./CONFIG");
8
6
  const Export_1 = require("./Export");
9
7
  const Logger_1 = require("./Logger");
10
8
  const platform_1 = require("./platform");
11
- const node_fs_1 = __importDefault(require("node:fs"));
12
9
  const findPackageNodePath = function (packagename) {
13
10
  let sdkPath = null;
14
11
  if (!platform_1.isBrowser) {
15
- try {
12
+ let fs;
13
+ (async () => {
14
+ fs = await (0, _import_1._import_)("node:fs");
15
+ })().then(() => {
16
16
  let sdkPaths = [
17
17
  `${CONFIG_1.CONFIG.get("projectPath")}${CONFIG_1.CONFIG.get("relativeImportPath")}`,
18
18
  `${CONFIG_1.CONFIG.get("basePath")}${CONFIG_1.CONFIG.get("relativeImportPath")}`,
@@ -28,7 +28,7 @@ const findPackageNodePath = function (packagename) {
28
28
  ""
29
29
  ].concat(module.paths);
30
30
  sdkPaths = sdkPaths.filter(p => {
31
- return (node_fs_1.default).existsSync(p + "/" + packagename);
31
+ return (fs).existsSync(p + "/" + packagename);
32
32
  });
33
33
  if (sdkPaths.length > 0) {
34
34
  sdkPath = sdkPaths[0];
@@ -38,11 +38,10 @@ const findPackageNodePath = function (packagename) {
38
38
  sdkPath = "";
39
39
  Logger_1.logger.info(`${packagename} is not in a standard path.`);
40
40
  }
41
- }
42
- catch (e) {
43
- // do nothing
44
- console.log(e);
45
- }
41
+ })
42
+ .catch((e) => {
43
+ throw new Error(e);
44
+ });
46
45
  }
47
46
  return sdkPath;
48
47
  };
package/build/platform.js CHANGED
@@ -13,8 +13,9 @@ const _require_ = (name) => {
13
13
  return (exports.isDeno) ? ((0, exports.deno_require)(name)) : (((name) => {
14
14
  let r;
15
15
  try {
16
- (0, _import_1._import_)(name)
17
- .then((m) => {
16
+ (async () => {
17
+ r = await (0, _import_1._import_)(name);
18
+ })().then((m) => {
18
19
  r = (m && m.default) || m;
19
20
  })
20
21
  .catch((e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qcobjects",
3
- "version": "2.5.111-beta",
3
+ "version": "2.5.113-beta",
4
4
  "description": "QCObjects is an Open-source framework that empowers full-stack developers to make micro-services and micro-frontends into an N-Tier architecture.",
5
5
  "main": "public/cjs/QCObjects.cjs",
6
6
  "module": "public/esm/QCObjects.mjs",
@@ -129,7 +129,9 @@ var global = (() => {
129
129
  return isDeno ? deno_require(name) : ((name2) => {
130
130
  let r;
131
131
  try {
132
- _import_(name2).then((m) => {
132
+ (async () => {
133
+ r = await _import_(name2);
134
+ })().then((m) => {
133
135
  r = m && m.default || m;
134
136
  }).catch((e) => {
135
137
  logger.warn(`An error ocurred: ${e}`);
@@ -2281,9 +2283,9 @@ var global = (() => {
2281
2283
  } else {
2282
2284
  logger.debug("Loading the component as a local file in server...");
2283
2285
  const _directLoad = /* @__PURE__ */ __name(function() {
2284
- const fs2 = _require_("fs");
2286
+ const fs = _require_("fs");
2285
2287
  logger.debug("SENDING THE NORMAL REQUEST ");
2286
- fs2.readFile(component2.url, _componentLoaded);
2288
+ fs.readFile(component2.url, _componentLoaded);
2287
2289
  }, "_directLoad");
2288
2290
  if (component2.cached) {
2289
2291
  logger.debug("USING CACHE FOR COMPONENT: " + component2.name);
@@ -4332,19 +4334,22 @@ var global = (() => {
4332
4334
  });
4333
4335
 
4334
4336
  // src/findPackageNodePath.ts
4335
- var import_node_fs, findPackageNodePath;
4337
+ var findPackageNodePath;
4336
4338
  var init_findPackageNodePath = __esm({
4337
4339
  "src/findPackageNodePath.ts"() {
4338
4340
  "use strict";
4341
+ init_import();
4339
4342
  init_CONFIG();
4340
4343
  init_Export();
4341
4344
  init_Logger();
4342
4345
  init_platform();
4343
- import_node_fs = __toESM(__require("node:fs"));
4344
4346
  findPackageNodePath = /* @__PURE__ */ __name(function(packagename) {
4345
4347
  let sdkPath = null;
4346
4348
  if (!isBrowser) {
4347
- try {
4349
+ let fs;
4350
+ (async () => {
4351
+ fs = await _import_("node:fs");
4352
+ })().then(() => {
4348
4353
  let sdkPaths = [
4349
4354
  `${CONFIG.get("projectPath")}${CONFIG.get("relativeImportPath")}`,
4350
4355
  `${CONFIG.get("basePath")}${CONFIG.get("relativeImportPath")}`,
@@ -4360,7 +4365,7 @@ var global = (() => {
4360
4365
  ""
4361
4366
  ].concat(module.paths);
4362
4367
  sdkPaths = sdkPaths.filter((p) => {
4363
- return import_node_fs.default.existsSync(p + "/" + packagename);
4368
+ return fs.existsSync(p + "/" + packagename);
4364
4369
  });
4365
4370
  if (sdkPaths.length > 0) {
4366
4371
  sdkPath = sdkPaths[0];
@@ -4369,9 +4374,9 @@ var global = (() => {
4369
4374
  sdkPath = "";
4370
4375
  logger.info(`${packagename} is not in a standard path.`);
4371
4376
  }
4372
- } catch (e) {
4373
- console.log(e);
4374
- }
4377
+ }).catch((e) => {
4378
+ throw new Error(e);
4379
+ });
4375
4380
  }
4376
4381
  return sdkPath;
4377
4382
  }, "findPackageNodePath");