Skip to content

Commit

Permalink
add dts source map
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmachuca committed Dec 23, 2024
1 parent fc160a1 commit f570961
Show file tree
Hide file tree
Showing 86 changed files with 927 additions and 944 deletions.
2 changes: 1 addition & 1 deletion build-esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const baseSettings = {
})
],
external: ["os", "path", "http", "url",
"child_process", "events", "fs", "process",
"child_process", "events", "fs", "process","node:process",
"node:fs", "node:os", "node:child_process",
"node:path", "readline", "node:net", "node:repl",
"node:vm", "http2", "vm", "qcobjects", "qcobjects-sdk"
Expand Down
4 changes: 2 additions & 2 deletions build/ArrayCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ class ArrayCollection {
const self = this;
Logger_1.logger.debug("VALUE ADDED");
Logger_1.logger.debug(value);
self.source.push(value);
return self.source.push(value);
}
pop() {
const self = this;
Logger_1.logger.debug("VALUE POPPED");
self.source.pop();
return self.source.pop();
}
_new_(source) {
const self = this;
Expand Down
26 changes: 14 additions & 12 deletions build/Base64.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Base64 = void 0;
exports.Base64 = {
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
encode(e) {
class Base64 {
static _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
static encode(e) {
let t = "";
let n, r, i, s, o, u, a;
let f = 0;
e = exports.Base64._utf8_encode(e);
e = Base64._utf8_encode(e);
while (f < e.length) {
n = e.charCodeAt(f++);
r = e.charCodeAt(f++);
Expand All @@ -25,8 +25,8 @@ exports.Base64 = {
t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);
}
return t;
},
decode(e) {
}
static decode(e) {
let t = "";
let n, r, i;
let s, o, u, a;
Expand All @@ -48,10 +48,10 @@ exports.Base64 = {
t = t + String.fromCharCode(i);
}
}
t = exports.Base64._utf8_decode(t);
t = Base64._utf8_decode(t);
return t;
},
_utf8_encode(e) {
}
static _utf8_encode(e) {
e = e.replace(/rn/g, "n");
let t = "";
for (let n = 0; n < e.length; n++) {
Expand All @@ -70,8 +70,8 @@ exports.Base64 = {
}
}
return t;
},
_utf8_decode(e) {
}
static _utf8_decode(e) {
let t = "";
let n = 0;
let r = 0;
Expand All @@ -97,4 +97,6 @@ exports.Base64 = {
}
return t;
}
};
}
exports.Base64 = Base64;
;
4 changes: 2 additions & 2 deletions build/ComponentFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXT
return templateURI;
};
exports.ComponentURI = ComponentURI;
const _buildComponentFromElement_ = function (element, __parent__) {
const _buildComponentFromElement_ = (element, __parent__) => {
const __shadowed_not_set = (element.getAttribute("shadowed") === null);
const __tplsource_attr_not_set = (element.getAttribute("template-source") === null);
const shadowed = (element.getAttribute("shadowed") === "true");
Expand Down Expand Up @@ -92,7 +92,7 @@ const _buildComponentFromElement_ = function (element, __parent__) {
return newComponent;
};
exports._buildComponentFromElement_ = _buildComponentFromElement_;
const _buildComponentsFromElements_ = function (elements, __parent__) {
const _buildComponentsFromElements_ = (elements, __parent__) => {
let componentsBuiltWith = [];
if (platform_1.isBrowser) {
componentsBuiltWith = elements.map(function (element) {
Expand Down
2 changes: 1 addition & 1 deletion build/DataStringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports._DataStringify = void 0;
const LegacyCopy_1 = require("./LegacyCopy");
const _DataStringify = function (data) {
const _DataStringify = (data) => {
const getCircularReplacer = function () {
const seen = new WeakSet();
let _level = 0;
Expand Down
10 changes: 5 additions & 5 deletions build/DefaultTemplateHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ class DefaultTemplateHandler {
parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, "g")), _value);
}
catch (e) {
Logger_1.logger.warn(`${templateInstance.component.name} could not parse processors.`);
throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
Logger_1.logger.warn(`${templateInstance.component?.name} could not parse processors.`);
throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
}
}
return k;
});
}
else {
Logger_1.logger.debug(`${templateInstance.component.name}.data is not an object`);
Logger_1.logger.debug(`${templateInstance.component?.name}.data is not an object`);
}
try {
parsedAssignmentText = Processor_1.GlobalProcessor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);
}
catch (e) {
Logger_1.logger.warn(`${templateInstance.component.name} could not parse processors.`);
throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);
Logger_1.logger.warn(`${templateInstance.component?.name} could not parse processors.`);
throw Error(`${templateInstance.component?.name} could not parse processors. Reason: ${e.message}`);
}
return parsedAssignmentText;
}
Expand Down
2 changes: 1 addition & 1 deletion build/ObjectName.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports.ObjectName = void 0;
*
* @param Object or function
*/
const ObjectName = function (o) {
const ObjectName = (o) => {
let ret = "";
if (typeof o === "function" && Object.hasOwn(o, "name") && o.name !== "") {
ret = o.name;
Expand Down
6 changes: 3 additions & 3 deletions build/Ready.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const top_1 = require("./top");
/**
* Defines a Custom Ready listener
*/
const Ready = function Ready(e) {
const Ready = (e) => {
if (platform_1.isBrowser) {
PrimaryCollections_1._QC_READY_LISTENERS.push(e.bind(window));
}
Expand All @@ -24,8 +24,8 @@ exports.ready = exports.Ready; // case insensitive ready option
* @param {Object} e
*/
// eslint-disable-next-line no-unused-vars
const _Ready = function (e) {
const _execReady = function () {
const _Ready = (e) => {
const _execReady = () => {
// eslint-disable-next-line array-callback-return
PrimaryCollections_1._QC_READY_LISTENERS.map(function (_ready_listener_, _r) {
if (typeof _ready_listener_ === "function") {
Expand Down
4 changes: 2 additions & 2 deletions build/WidgetsFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ else {
};
}
(0, Export_1.Export)(exports._ComponentWidget_);
const RegisterWidget = function (widgetName) {
const RegisterWidget = (widgetName) => {
if (platform_1.isBrowser) {
customElements.define(widgetName, class extends exports._ComponentWidget_ {
});
Expand All @@ -527,7 +527,7 @@ const RegisterWidget = function (widgetName) {
}
};
exports.RegisterWidget = RegisterWidget;
const RegisterWidgets = function (...args) {
const RegisterWidgets = (...args) => {
const widgetList = [...args];
widgetList.filter(function (widgetName) {
return typeof widgetName === "string";
Expand Down
6 changes: 3 additions & 3 deletions build/asyncLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ function asyncLoad(callback, args) {
exports._asyncLoad.push((new AsyncCallback(callback, args)));
return AsyncCallback;
}
const _fireAsyncLoad = function () {
const _fireAsyncLoad = () => {
if (platform_1.isBrowser) {
document.addEventListener("readystatechange", () => {
if (document.readyState === "complete") {
// eslint-disable-next-line array-callback-return
exports._asyncLoad.map(function (fc) {
fc.dispatch.call(fc);
(fc).dispatch.call(fc);
});
}
});
}
else if (typeof top_1._top.global !== "undefined") {
// eslint-disable-next-line array-callback-return
exports._asyncLoad.map(function (fc) {
fc.dispatch.call(fc);
(fc).dispatch.call(fc);
});
}
};
Expand Down
17 changes: 6 additions & 11 deletions build/basePath.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setBasePath = exports._basePath_ = void 0;
const Logger_1 = require("./Logger");
const platform_1 = require("./platform");
const node_process_1 = __importDefault(require("node:process"));
exports._basePath_ = (function () {
let _basePath = "";
if (platform_1.isBrowser) {
Expand All @@ -11,16 +14,8 @@ exports._basePath_ = (function () {
_basePath = baseURI.join("/") + "/";
}
else {
let process;
try {
process = (0, platform_1._require_)("process");
}
catch (e) {
Logger_1.logger.debug(`An error ocurred: ${e}.`);
// not a process module
}
if (typeof process !== "undefined") {
_basePath = `${(process).cwd()}/`;
if (typeof node_process_1.default !== "undefined") {
_basePath = `${(node_process_1.default).cwd()}/`;
}
else {
_basePath = "";
Expand Down
2 changes: 1 addition & 1 deletion build/introspection.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._methods_ = exports._protected_code_ = void 0;
const _protected_code_ = function (_) {
const _protected_code_ = (_) => {
const __oldtoString = (typeof _.prototype !== "undefined") ? (_.prototype.toString) : (function () {
return "";
});
Expand Down
2 changes: 1 addition & 1 deletion build/is_a.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ObjectName_1 = require("./ObjectName");
* @param {Object} object
* @param {String} typeName
*/
const is_a = function is_a(obj, typeName) {
const is_a = (obj, typeName) => {
return !!((typeof obj !== "undefined" && obj !== null &&
((((0, isQCObjects_1.isQCObjects_Class)(obj) || (0, isQCObjects_1.isQCObjects_Object)(obj)) && (obj.hierarchy().includes(typeName))) ||
(0, getType_1.__getType__)(obj) === typeName ||
Expand Down
2 changes: 1 addition & 1 deletion build/is_forbidden_name.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports.__is__forbidden_name__ = void 0;
* @param {Object} type
* @param {Object} definition
*/
const __is__forbidden_name__ = function (name) {
const __is__forbidden_name__ = (name) => {
return (["__proto__", "prototype", "Object", "Map", "defineProperty", "indexOf", "toString", "__instanceID", "function", "Function"].indexOf(name) !== -1);
};
exports.__is__forbidden_name__ = __is__forbidden_name__;
2 changes: 1 addition & 1 deletion build/is_raw_class.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__is_raw_class__ = void 0;
const __is_raw_class__ = function (o_c) {
const __is_raw_class__ = (o_c) => {
return !!((typeof o_c === "function" && o_c.toString().startsWith("class")));
};
exports.__is_raw_class__ = __is_raw_class__;
4 changes: 2 additions & 2 deletions build/loadSDK.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const findPackageNodePath_1 = require("./findPackageNodePath");
const Import_1 = require("./Import");
const Logger_1 = require("./Logger");
const platform_1 = require("./platform");
function loadSDK() {
const loadSDK = () => {
if (CONFIG_1.CONFIG.get("useSDK")) {
(function () {
const remoteImportsPath = CONFIG_1.CONFIG.get("remoteImportsPath");
Expand Down Expand Up @@ -59,5 +59,5 @@ function loadSDK() {
}
})();
}
}
};
exports.default = loadSDK;
2 changes: 1 addition & 1 deletion build/make_global.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.__make_global__ = void 0;
const top_1 = require("./top");
const __make_global__ = function (f) {
const __make_global__ = (f) => {
if (!!f && !!f.name) {
if (typeof top_1._top !== "undefined" && typeof f !== "undefined" && top_1._top !== null && !Object.hasOwn(top_1._top, f.name)) {
(0, top_1.set)(f.name, f);
Expand Down
2 changes: 1 addition & 1 deletion build/range.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.range = void 0;
const introspection_1 = require("./introspection");
const range = function (start, stop = 0, step = 1) {
const range = (start, stop = 0, step = 1) => {
if (stop === 0 || typeof stop === "undefined") {
stop = start;
start = 0;
Expand Down
4 changes: 2 additions & 2 deletions build/routings.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.__valid_routing_way__ = exports.__valid_routings__ = exports.__routing_params__ = void 0;
const __routing_params__ = function (routing, routingPath) {
const __routing_params__ = (routing, routingPath) => {
const standardRoutingPath = routing.path.replace(/{(.*?)}/g, "(?<$1>.*)"); // allowing {param}
return {
...[...routingPath.matchAll((new RegExp(standardRoutingPath, "g")))][0].groups
Expand All @@ -15,7 +15,7 @@ const __valid_routings__ = function (routings, routingPath) {
}).reverse();
};
exports.__valid_routings__ = __valid_routings__;
const __valid_routing_way__ = function (validRoutingWays, routingWay) {
const __valid_routing_way__ = (validRoutingWays, routingWay) => {
return validRoutingWays.includes(routingWay);
};
exports.__valid_routing_way__ = __valid_routing_way__;
2 changes: 1 addition & 1 deletion build/shortCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.shortCode = void 0;
const Crypt_1 = require("./Crypt");
const shortCode = function () {
const shortCode = () => {
const length = 1000;
const code1 = Crypt_1._Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (new Date()).getTime().toString());
const code2 = Crypt_1._Crypt.encrypt((Math.random() * length).toString().replace(".", ""), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());
Expand Down
4 changes: 2 additions & 2 deletions build/waitUntil.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.waitUntil = void 0;
const Logger_1 = require("./Logger");
const waitUntil = function (func, exp) {
const _waitUntil = function (func, exp) {
const waitUntil = (func, exp) => {
const _waitUntil = (func, exp) => {
const maxWaitCycles = 2000;
let _w = 0;
var _t = setInterval(function () {
Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,21 @@
"exports": {
".": {
"types": "./public/types/index.d.ts",
"require": "./public/cjs/QCObjects.cjs",
"import": "./public/esm/QCObjects.mjs"
"require": "./public/cjs/index.cjs",
"import": "./public/esm/index.mjs"
},
"./types/*": "./types/*",
"./package.json": "./package.json",
"./tsconfig.json": "./tsconfig.json",
"./tsconfig.d.json": "./tsconfig.d.json",
"./tsconfig.jasmine.json": "./tsconfig.jasmine.json"
"./tsconfig.jasmine.json": "./tsconfig.jasmine.json",
"./*.js": "./public/*.js",
"./*.cjs": "./public/cjs/*.cjs",
"./*.mjs": "./public/esm/*.mjs",
"./*": {
"require": "./public/cjs/*.cjs",
"import": "./public/esm/*.mjs"
}
},
"license": "LGPL-3.0",
"scripts": {
Expand Down
Loading

0 comments on commit f570961

Please sign in to comment.