qcobjects 2.5.124-beta → 2.5.133-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.
Files changed (105) hide show
  1. package/Dockerfile +3 -3
  2. package/VERSION +1 -1
  3. package/build/ArrayCollection.js +2 -2
  4. package/build/Base64.js +14 -12
  5. package/build/ComponentFactory.js +2 -2
  6. package/build/DataStringify.js +1 -1
  7. package/build/DefaultTemplateHandler.js +5 -5
  8. package/build/ObjectName.js +1 -1
  9. package/build/QCObjects.js +0 -1
  10. package/build/Ready.js +3 -3
  11. package/build/WidgetsFactory.js +2 -2
  12. package/build/asyncLoad.js +3 -3
  13. package/build/basePath.js +6 -11
  14. package/build/index.js +1 -1
  15. package/build/introspection.js +1 -1
  16. package/build/is_a.js +1 -1
  17. package/build/is_forbidden_name.js +1 -1
  18. package/build/is_raw_class.js +1 -1
  19. package/build/loadSDK.js +2 -2
  20. package/build/make_global.js +1 -1
  21. package/build/range.js +1 -1
  22. package/build/routings.js +2 -2
  23. package/build/shortCode.js +1 -1
  24. package/build/waitUntil.js +2 -2
  25. package/build-esbuild.js +5 -6
  26. package/eslint.config.mjs +1 -1
  27. package/package.json +17 -9
  28. package/public/browser/QCObjects.js +127 -136
  29. package/public/browser/QCObjects.js.map +4 -4
  30. package/public/cjs/{QCObjects.cjs → index.cjs} +141 -242
  31. package/public/cjs/index.cjs.map +7 -0
  32. package/public/esm/{QCObjects.mjs → index.mjs} +229 -231
  33. package/public/esm/index.mjs.map +7 -0
  34. package/public/types/index.d.ts +99 -108
  35. package/public/types/index.d.ts.map +1 -0
  36. package/spec/helpers/mock-sdk.helper.ts +0 -3
  37. package/spec/testsClassFactorySpec.ts +1 -1
  38. package/spec/testsConfigSpec.ts +1 -1
  39. package/src/ArrayCollection.ts +7 -7
  40. package/src/BackendMicroservice.ts +14 -13
  41. package/src/Base64.ts +87 -87
  42. package/src/CONFIG.ts +3 -3
  43. package/src/Class.ts +1 -1
  44. package/src/ClassFactory.ts +1 -1
  45. package/src/ComplexStorageCache.ts +5 -5
  46. package/src/Component.ts +19 -19
  47. package/src/ComponentFactory.ts +4 -4
  48. package/src/Controller.ts +7 -7
  49. package/src/Crypt.ts +16 -16
  50. package/src/DDO.ts +2 -2
  51. package/src/DOMCreateElement.ts +9 -9
  52. package/src/DataStringify.ts +14 -14
  53. package/src/DefaultTemplateHandler.ts +45 -45
  54. package/src/Effect.ts +7 -7
  55. package/src/Export.ts +6 -6
  56. package/src/IncrementInstanceID.ts +1 -1
  57. package/src/InheritClass.ts +26 -26
  58. package/src/Logger.ts +4 -4
  59. package/src/MainProcess.ts +1 -1
  60. package/src/ObjectName.ts +1 -1
  61. package/src/PrimaryCollections.ts +2 -2
  62. package/src/Processor.ts +20 -20
  63. package/src/QCObjects.ts +1 -2
  64. package/src/Ready.ts +4 -4
  65. package/src/Service.ts +8 -8
  66. package/src/SourceCSS.ts +42 -42
  67. package/src/SourceJS.ts +8 -8
  68. package/src/Tag.ts +4 -4
  69. package/src/Timer.ts +2 -2
  70. package/src/Toggle.ts +2 -2
  71. package/src/TransitionEffect.ts +3 -4
  72. package/src/View.ts +2 -1
  73. package/src/WidgetsFactory.ts +3 -3
  74. package/src/assign.ts +1 -0
  75. package/src/asyncLoad.ts +5 -5
  76. package/src/basePath.ts +7 -14
  77. package/src/captureFalseTouch.ts +1 -1
  78. package/src/componentLoader.ts +1 -1
  79. package/src/defaultProcessors.ts +3 -3
  80. package/src/globalSettings.ts +24 -24
  81. package/src/index.cts +1 -1
  82. package/src/index.mts +1 -1
  83. package/src/index.ts +1 -1
  84. package/src/introspection.ts +78 -78
  85. package/src/is_a.ts +12 -12
  86. package/src/is_forbidden_name.ts +11 -12
  87. package/src/is_raw_class.ts +3 -3
  88. package/src/loadSDK.ts +2 -2
  89. package/src/make_global.ts +1 -1
  90. package/src/range.ts +12 -12
  91. package/src/routings.ts +3 -3
  92. package/src/secretKey.ts +1 -1
  93. package/src/serviceLoader.ts +1 -1
  94. package/src/shortCode.ts +9 -9
  95. package/src/top.ts +4 -4
  96. package/src/types/global/index.d.ts +4 -5
  97. package/src/uniqueID.ts +1 -1
  98. package/src/waitUntil.ts +2 -2
  99. package/tsconfig.d.json +30 -4
  100. package/tsconfig.jasmine.json +30 -5
  101. package/tsconfig.json +18 -2
  102. package/build/index.cjs +0 -7
  103. package/build/index.mjs +0 -2
  104. package/public/cjs/QCObjects.cjs.map +0 -7
  105. package/public/esm/QCObjects.mjs.map +0 -7
package/Dockerfile CHANGED
@@ -2,10 +2,10 @@ FROM alpine/git:latest
2
2
  FROM alpine/openssl
3
3
  FROM certbot/certbot
4
4
  FROM docker/extension-npm-installer
5
- FROM --platform=$BUILDPLATFORM node:lts-alpine as builder
5
+ FROM --platform=$BUILDPLATFORM node:lts-alpine AS builder
6
6
 
7
7
  ###
8
- # QCObjects 2.4
8
+ # QCObjects 2.5
9
9
  # ________________
10
10
  #
11
11
  # Author: Jean Machuca <correojean@gmail.com>
@@ -29,7 +29,7 @@ FROM --platform=$BUILDPLATFORM node:lts-alpine as builder
29
29
  # license document, but changing it is not allowed.
30
30
  ###
31
31
 
32
- LABEL org.quickcorp.qcobjects.cli.version="2.4.62"
32
+ LABEL org.quickcorp.qcobjects.cli.version="2.5.108-beta"
33
33
  LABEL vendor1="QuickCorp"
34
34
  LABEL vendor2="QCObjects"
35
35
  LABEL org.quickcorp.qcobjects.release-date="2019-06-01"
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.124-beta
1
+ 2.5.133-beta
@@ -96,12 +96,12 @@ class ArrayCollection {
96
96
  const self = this;
97
97
  Logger_1.logger.debug("VALUE ADDED");
98
98
  Logger_1.logger.debug(value);
99
- self.source.push(value);
99
+ return self.source.push(value);
100
100
  }
101
101
  pop() {
102
102
  const self = this;
103
103
  Logger_1.logger.debug("VALUE POPPED");
104
- self.source.pop();
104
+ return self.source.pop();
105
105
  }
106
106
  _new_(source) {
107
107
  const self = this;
package/build/Base64.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Base64 = void 0;
4
- exports.Base64 = {
5
- _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
6
- encode(e) {
4
+ class Base64 {
5
+ static _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
6
+ static encode(e) {
7
7
  let t = "";
8
8
  let n, r, i, s, o, u, a;
9
9
  let f = 0;
10
- e = exports.Base64._utf8_encode(e);
10
+ e = Base64._utf8_encode(e);
11
11
  while (f < e.length) {
12
12
  n = e.charCodeAt(f++);
13
13
  r = e.charCodeAt(f++);
@@ -25,8 +25,8 @@ exports.Base64 = {
25
25
  t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);
26
26
  }
27
27
  return t;
28
- },
29
- decode(e) {
28
+ }
29
+ static decode(e) {
30
30
  let t = "";
31
31
  let n, r, i;
32
32
  let s, o, u, a;
@@ -48,10 +48,10 @@ exports.Base64 = {
48
48
  t = t + String.fromCharCode(i);
49
49
  }
50
50
  }
51
- t = exports.Base64._utf8_decode(t);
51
+ t = Base64._utf8_decode(t);
52
52
  return t;
53
- },
54
- _utf8_encode(e) {
53
+ }
54
+ static _utf8_encode(e) {
55
55
  e = e.replace(/rn/g, "n");
56
56
  let t = "";
57
57
  for (let n = 0; n < e.length; n++) {
@@ -70,8 +70,8 @@ exports.Base64 = {
70
70
  }
71
71
  }
72
72
  return t;
73
- },
74
- _utf8_decode(e) {
73
+ }
74
+ static _utf8_decode(e) {
75
75
  let t = "";
76
76
  let n = 0;
77
77
  let r = 0;
@@ -97,4 +97,6 @@ exports.Base64 = {
97
97
  }
98
98
  return t;
99
99
  }
100
- };
100
+ }
101
+ exports.Base64 = Base64;
102
+ ;
@@ -24,7 +24,7 @@ const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXT
24
24
  return templateURI;
25
25
  };
26
26
  exports.ComponentURI = ComponentURI;
27
- const _buildComponentFromElement_ = function (element, __parent__) {
27
+ const _buildComponentFromElement_ = (element, __parent__) => {
28
28
  const __shadowed_not_set = (element.getAttribute("shadowed") === null);
29
29
  const __tplsource_attr_not_set = (element.getAttribute("template-source") === null);
30
30
  const shadowed = (element.getAttribute("shadowed") === "true");
@@ -92,7 +92,7 @@ const _buildComponentFromElement_ = function (element, __parent__) {
92
92
  return newComponent;
93
93
  };
94
94
  exports._buildComponentFromElement_ = _buildComponentFromElement_;
95
- const _buildComponentsFromElements_ = function (elements, __parent__) {
95
+ const _buildComponentsFromElements_ = (elements, __parent__) => {
96
96
  let componentsBuiltWith = [];
97
97
  if (platform_1.isBrowser) {
98
98
  componentsBuiltWith = elements.map(function (element) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports._DataStringify = void 0;
4
4
  const LegacyCopy_1 = require("./LegacyCopy");
5
- const _DataStringify = function (data) {
5
+ const _DataStringify = (data) => {
6
6
  const getCircularReplacer = function () {
7
7
  const seen = new WeakSet();
8
8
  let _level = 0;
@@ -33,22 +33,22 @@ class DefaultTemplateHandler {
33
33
  parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, "g")), _value);
34
34
  }
35
35
  catch (e) {
36
- Logger_1.logger.warn(`${templateInstance.component.name} could not parse processors.`);
37
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
36
+ Logger_1.logger.warn(`${templateInstance.component?.name} could not parse processors.`);
37
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
38
38
  }
39
39
  }
40
40
  return k;
41
41
  });
42
42
  }
43
43
  else {
44
- Logger_1.logger.debug(`${templateInstance.component.name}.data is not an object`);
44
+ Logger_1.logger.debug(`${templateInstance.component?.name}.data is not an object`);
45
45
  }
46
46
  try {
47
47
  parsedAssignmentText = Processor_1.GlobalProcessor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
48
48
  }
49
49
  catch (e) {
50
- Logger_1.logger.warn(`${templateInstance.component.name} could not parse processors.`);
51
- throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
50
+ Logger_1.logger.warn(`${templateInstance.component?.name} could not parse processors.`);
51
+ throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
52
52
  }
53
53
  return parsedAssignmentText;
54
54
  }
@@ -6,7 +6,7 @@ exports.ObjectName = void 0;
6
6
  *
7
7
  * @param Object or function
8
8
  */
9
- const ObjectName = function (o) {
9
+ const ObjectName = (o) => {
10
10
  let ret = "";
11
11
  if (typeof o === "function" && Object.hasOwn(o, "name") && o.name !== "") {
12
12
  ret = o.name;
@@ -219,4 +219,3 @@ Object.defineProperty(exports, "__make_global__", { enumerable: true, get: funct
219
219
  var top_3 = require("./top");
220
220
  Object.defineProperty(exports, "get", { enumerable: true, get: function () { return top_3.get; } });
221
221
  Object.defineProperty(exports, "set", { enumerable: true, get: function () { return top_3.set; } });
222
- exports.default = {};
package/build/Ready.js CHANGED
@@ -8,7 +8,7 @@ const top_1 = require("./top");
8
8
  /**
9
9
  * Defines a Custom Ready listener
10
10
  */
11
- const Ready = function Ready(e) {
11
+ const Ready = (e) => {
12
12
  if (platform_1.isBrowser) {
13
13
  PrimaryCollections_1._QC_READY_LISTENERS.push(e.bind(window));
14
14
  }
@@ -24,8 +24,8 @@ exports.ready = exports.Ready; // case insensitive ready option
24
24
  * @param {Object} e
25
25
  */
26
26
  // eslint-disable-next-line no-unused-vars
27
- const _Ready = function (e) {
28
- const _execReady = function () {
27
+ const _Ready = (e) => {
28
+ const _execReady = () => {
29
29
  // eslint-disable-next-line array-callback-return
30
30
  PrimaryCollections_1._QC_READY_LISTENERS.map(function (_ready_listener_, _r) {
31
31
  if (typeof _ready_listener_ === "function") {
@@ -517,7 +517,7 @@ else {
517
517
  };
518
518
  }
519
519
  (0, Export_1.Export)(exports._ComponentWidget_);
520
- const RegisterWidget = function (widgetName) {
520
+ const RegisterWidget = (widgetName) => {
521
521
  if (platform_1.isBrowser) {
522
522
  customElements.define(widgetName, class extends exports._ComponentWidget_ {
523
523
  });
@@ -527,7 +527,7 @@ const RegisterWidget = function (widgetName) {
527
527
  }
528
528
  };
529
529
  exports.RegisterWidget = RegisterWidget;
530
- const RegisterWidgets = function (...args) {
530
+ const RegisterWidgets = (...args) => {
531
531
  const widgetList = [...args];
532
532
  widgetList.filter(function (widgetName) {
533
533
  return typeof widgetName === "string";
@@ -21,13 +21,13 @@ function asyncLoad(callback, args) {
21
21
  exports._asyncLoad.push((new AsyncCallback(callback, args)));
22
22
  return AsyncCallback;
23
23
  }
24
- const _fireAsyncLoad = function () {
24
+ const _fireAsyncLoad = () => {
25
25
  if (platform_1.isBrowser) {
26
26
  document.addEventListener("readystatechange", () => {
27
27
  if (document.readyState === "complete") {
28
28
  // eslint-disable-next-line array-callback-return
29
29
  exports._asyncLoad.map(function (fc) {
30
- fc.dispatch.call(fc);
30
+ (fc).dispatch.call(fc);
31
31
  });
32
32
  }
33
33
  });
@@ -35,7 +35,7 @@ const _fireAsyncLoad = function () {
35
35
  else if (typeof top_1._top.global !== "undefined") {
36
36
  // eslint-disable-next-line array-callback-return
37
37
  exports._asyncLoad.map(function (fc) {
38
- fc.dispatch.call(fc);
38
+ (fc).dispatch.call(fc);
39
39
  });
40
40
  }
41
41
  };
package/build/basePath.js CHANGED
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.setBasePath = exports._basePath_ = void 0;
4
- const Logger_1 = require("./Logger");
5
7
  const platform_1 = require("./platform");
8
+ const node_process_1 = __importDefault(require("node:process"));
6
9
  exports._basePath_ = (function () {
7
10
  let _basePath = "";
8
11
  if (platform_1.isBrowser) {
@@ -11,16 +14,8 @@ exports._basePath_ = (function () {
11
14
  _basePath = baseURI.join("/") + "/";
12
15
  }
13
16
  else {
14
- let process;
15
- try {
16
- process = (0, platform_1._require_)("process");
17
- }
18
- catch (e) {
19
- Logger_1.logger.debug(`An error ocurred: ${e}.`);
20
- // not a process module
21
- }
22
- if (typeof process !== "undefined") {
23
- _basePath = `${(process).cwd()}/`;
17
+ if (typeof node_process_1.default !== "undefined") {
18
+ _basePath = `${(node_process_1.default).cwd()}/`;
24
19
  }
25
20
  else {
26
21
  _basePath = "";
package/build/index.js CHANGED
@@ -33,5 +33,5 @@ var __importStar = (this && this.__importStar) || (function () {
33
33
  };
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
- const QCObjects = __importStar(require("./qcobjects"));
36
+ const QCObjects = __importStar(require("./QCObjects"));
37
37
  exports.default = QCObjects;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports._methods_ = exports._protected_code_ = void 0;
4
- const _protected_code_ = function (_) {
4
+ const _protected_code_ = (_) => {
5
5
  const __oldtoString = (typeof _.prototype !== "undefined") ? (_.prototype.toString) : (function () {
6
6
  return "";
7
7
  });
package/build/is_a.js CHANGED
@@ -9,7 +9,7 @@ const ObjectName_1 = require("./ObjectName");
9
9
  * @param {Object} object
10
10
  * @param {String} typeName
11
11
  */
12
- const is_a = function is_a(obj, typeName) {
12
+ const is_a = (obj, typeName) => {
13
13
  return !!((typeof obj !== "undefined" && obj !== null &&
14
14
  ((((0, isQCObjects_1.isQCObjects_Class)(obj) || (0, isQCObjects_1.isQCObjects_Object)(obj)) && (obj.hierarchy().includes(typeName))) ||
15
15
  (0, getType_1.__getType__)(obj) === typeName ||
@@ -9,7 +9,7 @@ exports.__is__forbidden_name__ = void 0;
9
9
  * @param {Object} type
10
10
  * @param {Object} definition
11
11
  */
12
- const __is__forbidden_name__ = function (name) {
12
+ const __is__forbidden_name__ = (name) => {
13
13
  return (["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1);
14
14
  };
15
15
  exports.__is__forbidden_name__ = __is__forbidden_name__;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.__is_raw_class__ = void 0;
4
- const __is_raw_class__ = function (o_c) {
4
+ const __is_raw_class__ = (o_c) => {
5
5
  return !!((typeof o_c === "function" && o_c.toString().startsWith("class")));
6
6
  };
7
7
  exports.__is_raw_class__ = __is_raw_class__;
package/build/loadSDK.js CHANGED
@@ -5,7 +5,7 @@ const findPackageNodePath_1 = require("./findPackageNodePath");
5
5
  const Import_1 = require("./Import");
6
6
  const Logger_1 = require("./Logger");
7
7
  const platform_1 = require("./platform");
8
- function loadSDK() {
8
+ const loadSDK = () => {
9
9
  if (CONFIG_1.CONFIG.get("useSDK")) {
10
10
  (function () {
11
11
  const remoteImportsPath = CONFIG_1.CONFIG.get("remoteImportsPath");
@@ -59,5 +59,5 @@ function loadSDK() {
59
59
  }
60
60
  })();
61
61
  }
62
- }
62
+ };
63
63
  exports.default = loadSDK;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.__make_global__ = void 0;
4
4
  const top_1 = require("./top");
5
- const __make_global__ = function (f) {
5
+ const __make_global__ = (f) => {
6
6
  if (!!f && !!f.name) {
7
7
  if (typeof top_1._top !== "undefined" && typeof f !== "undefined" && top_1._top !== null && !Object.hasOwn(top_1._top, f.name)) {
8
8
  (0, top_1.set)(f.name, f);
package/build/range.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.range = void 0;
4
4
  const introspection_1 = require("./introspection");
5
- const range = function (start, stop = 0, step = 1) {
5
+ const range = (start, stop = 0, step = 1) => {
6
6
  if (stop === 0 || typeof stop === "undefined") {
7
7
  stop = start;
8
8
  start = 0;
package/build/routings.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.__valid_routing_way__ = exports.__valid_routings__ = exports.__routing_params__ = void 0;
4
- const __routing_params__ = function (routing, routingPath) {
4
+ const __routing_params__ = (routing, routingPath) => {
5
5
  const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)"); // allowing {param}
6
6
  return {
7
7
  ...[...routingPath.matchAll((new RegExp(standardRoutingPath, "g")))][0].groups
@@ -15,7 +15,7 @@ const __valid_routings__ = function (routings, routingPath) {
15
15
  }).reverse();
16
16
  };
17
17
  exports.__valid_routings__ = __valid_routings__;
18
- const __valid_routing_way__ = function (validRoutingWays, routingWay) {
18
+ const __valid_routing_way__ = (validRoutingWays, routingWay) => {
19
19
  return validRoutingWays.includes(routingWay);
20
20
  };
21
21
  exports.__valid_routing_way__ = __valid_routing_way__;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shortCode = void 0;
4
4
  const Crypt_1 = require("./Crypt");
5
- const shortCode = function () {
5
+ const shortCode = () => {
6
6
  const length = 1000;
7
7
  const code1 = Crypt_1._Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (new Date()).getTime().toString());
8
8
  const code2 = Crypt_1._Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.waitUntil = void 0;
4
4
  const Logger_1 = require("./Logger");
5
- const waitUntil = function (func, exp) {
6
- const _waitUntil = function (func, exp) {
5
+ const waitUntil = (func, exp) => {
6
+ const _waitUntil = (func, exp) => {
7
7
  const maxWaitCycles = 2000;
8
8
  let _w = 0;
9
9
  var _t = setInterval(function () {
package/build-esbuild.js CHANGED
@@ -4,7 +4,7 @@ const alias = require("esbuild-plugin-alias");
4
4
  const path = require("path");
5
5
 
6
6
  const baseSettings = {
7
- entryPoints: ["src/qcobjects.ts"], // Your entry file
7
+ entryPoints: [], // Your entry file
8
8
  bundle: true,
9
9
  outdir: "public/cjs", // Output dir
10
10
  format: "cjs", // or "esm" depending on your module system
@@ -18,12 +18,11 @@ const baseSettings = {
18
18
  chunkNames: "chunks/[name]-[hash]",
19
19
  plugins: [
20
20
  alias({
21
- "types": path.join(__dirname, "src/types/global/index.d.ts"),
22
- "./types/global": path.join(__dirname, "src/types/global/index.d.ts")
21
+ "types": path.join(__dirname, "src/types/global/index.d.ts")
23
22
  })
24
23
  ],
25
24
  external: ["os", "path", "http", "url",
26
- "child_process", "events", "fs", "process",
25
+ "child_process", "events", "fs", "process","node:process",
27
26
  "node:fs", "node:os", "node:child_process",
28
27
  "node:path", "readline", "node:net", "node:repl",
29
28
  "node:vm", "http2", "vm", "qcobjects", "qcobjects-sdk"
@@ -32,7 +31,7 @@ const baseSettings = {
32
31
  };
33
32
 
34
33
  const cjsSettings = {...baseSettings,
35
- entryPoints: ["src/qcobjects.ts"], // Your entry file
34
+ entryPoints: ["src/index.cts"], // Your entry file
36
35
  outdir: "public/cjs", // Output dir
37
36
  format: "cjs", // or "esm" depending on your module system
38
37
  platform: "node", // or "browser" depending on your target environment
@@ -43,7 +42,7 @@ const cjsSettings = {...baseSettings,
43
42
  };
44
43
 
45
44
  const esmSettings = {...baseSettings,
46
- entryPoints: ["src/qcobjects.ts"], // Your entry file
45
+ entryPoints: ["src/index.mts"], // Your entry file
47
46
  outdir: "public/esm", // Output dir
48
47
  format: "esm", // or "esm" depending on your module system
49
48
  platform: "browser", // or "browser" depending on your target environment
package/eslint.config.mjs CHANGED
@@ -32,7 +32,7 @@ export default [
32
32
  parserOptions: {
33
33
  projectService: true,
34
34
  tsconfigRootDir: import.meta.dirname,
35
- programs: [parser.createProgram('tsconfig.json')],
35
+ programs: [parser.createProgram('tsconfig.json')]
36
36
  }
37
37
  ,
38
38
 
package/package.json CHANGED
@@ -1,23 +1,30 @@
1
1
  {
2
2
  "name": "qcobjects",
3
- "version": "2.5.124-beta",
3
+ "version": "2.5.133-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
- "main": "public/cjs/QCObjects.cjs",
6
- "module": "public/esm/QCObjects.mjs",
5
+ "main": "public/cjs/index.cjs",
6
+ "module": "public/esm/index.mjs",
7
7
  "browser": "public/browser/QCObjects.js",
8
8
  "type": "commonjs",
9
9
  "types": "public/types/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
12
  "types": "./public/types/index.d.ts",
13
- "require": "./public/cjs/QCObjects.cjs",
14
- "import": "./public/esm/QCObjects.mjs"
13
+ "require": "./public/cjs/index.cjs",
14
+ "import": "./public/esm/index.mjs"
15
15
  },
16
16
  "./types/*": "./types/*",
17
17
  "./package.json": "./package.json",
18
18
  "./tsconfig.json": "./tsconfig.json",
19
19
  "./tsconfig.d.json": "./tsconfig.d.json",
20
- "./tsconfig.jasmine.json": "./tsconfig.jasmine.json"
20
+ "./tsconfig.jasmine.json": "./tsconfig.jasmine.json",
21
+ "./*.js": "./public/*.js",
22
+ "./*.cjs": "./public/cjs/*.cjs",
23
+ "./*.mjs": "./public/esm/*.mjs",
24
+ "./*": {
25
+ "require": "./public/cjs/*.cjs",
26
+ "import": "./public/esm/*.mjs"
27
+ }
21
28
  },
22
29
  "license": "LGPL-3.0",
23
30
  "scripts": {
@@ -29,7 +36,7 @@
29
36
  "build:esbuild": "node ./build-esbuild.js",
30
37
  "start": "qcobjects-shell",
31
38
  "test:ts-types": "npx tsc --project ./tsconfig.jasmine.json ",
32
- "test:jasmine": "npm run test:ts-types && npx ts-node --project ./tsconfig.jasmine.json ./node_modules/jasmine/bin/jasmine",
39
+ "test:jasmine": "npm run test:ts-types && npx ts-node -r tsconfig-paths/register --project ./tsconfig.jasmine.json ./node_modules/jasmine/bin/jasmine.js",
33
40
  "test": "(npm run lint && npm run test:jasmine)",
34
41
  "lint": "(npx -y eslint@latest src/**/*.ts --fix )",
35
42
  "preversion": "npm cache verify && npm test",
@@ -110,8 +117,8 @@
110
117
  "devDependencies": {
111
118
  "@eslint/eslintrc": "^3.1.0",
112
119
  "@eslint/js": "^9.13.0",
113
- "@types/jasmine": "^5.1.4",
114
- "@types/node": "^22.8.1",
120
+ "@types/jasmine": "^5.1.5",
121
+ "@types/node": "^22.10.2",
115
122
  "@typescript-eslint/eslint-plugin": "^5.58.0",
116
123
  "@typescript-eslint/parser": "^5.58.0",
117
124
  "esbuild": "^0.24.0",
@@ -128,6 +135,7 @@
128
135
  "install": "^0.13.0",
129
136
  "jasmine": "^3.99.0",
130
137
  "ts-node": "^10.9.2",
138
+ "tsconfig-paths": "^4.2.0",
131
139
  "typescript": "^5.7.2",
132
140
  "typescript-eslint": "^8.18.1"
133
141
  },