qcobjects 2.5.140-beta → 2.5.142-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 +1 -1
- package/build/CONFIG.js +6 -1
- package/build/Processor.js +24 -0
- package/build/findPackageNodePath.js +5 -3
- package/build/index.cjs +1 -1
- package/framework-audit-v2.5.141-beta.md +184 -0
- package/package.json +9 -7
- package/public/browser/QCObjects.js +31 -4
- package/public/browser/QCObjects.js.map +3 -3
- package/public/cjs/index.cjs +31 -4
- package/public/cjs/index.cjs.map +3 -3
- package/public/esm/index.mjs +29 -2
- package/public/esm/index.mjs.map +2 -2
- package/public/types/index.d.ts +5 -0
- package/public/types/index.d.ts.map +1 -1
- package/spec/testsConfigSpec.ts +87 -14
- package/src/CONFIG.ts +6 -1
- package/src/Processor.ts +35 -1
- package/src/findPackageNodePath.ts +0 -1
- package/src/index.cts +1 -1
- package/src/types/global/index.d.ts +1 -1
package/public/cjs/index.cjs
CHANGED
|
@@ -1516,7 +1516,11 @@ var init_CONFIG = __esm({
|
|
|
1516
1516
|
logger.debug("No config value for: " + name);
|
|
1517
1517
|
_value = _default;
|
|
1518
1518
|
}
|
|
1519
|
-
|
|
1519
|
+
const processedValue = GlobalProcessor.processObject(_value);
|
|
1520
|
+
if (_value === null && processedValue === null) {
|
|
1521
|
+
return null;
|
|
1522
|
+
}
|
|
1523
|
+
return processedValue || _default;
|
|
1520
1524
|
}
|
|
1521
1525
|
static _instance;
|
|
1522
1526
|
static get instance() {
|
|
@@ -1574,16 +1578,30 @@ var init_Processor = __esm({
|
|
|
1574
1578
|
}
|
|
1575
1579
|
return _Processor._instance;
|
|
1576
1580
|
}
|
|
1581
|
+
static setProcessor(_proc_) {
|
|
1582
|
+
if (typeof _proc_ === "function" && _proc_.name !== "") {
|
|
1583
|
+
_Processor.instance.processors[_proc_.name] = _proc_;
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1577
1586
|
setProcessor(_proc_) {
|
|
1578
1587
|
if (typeof _proc_ === "function" && _proc_.name !== "") {
|
|
1579
1588
|
this.processors[_proc_.name] = _proc_;
|
|
1580
1589
|
}
|
|
1581
1590
|
}
|
|
1591
|
+
static getProcessor(_procName_) {
|
|
1592
|
+
return _Processor.instance.processors[_procName_];
|
|
1593
|
+
}
|
|
1594
|
+
static getProcessorNames() {
|
|
1595
|
+
return Object.keys(_Processor.instance.processors);
|
|
1596
|
+
}
|
|
1582
1597
|
component;
|
|
1583
1598
|
execute(component, processorName, args) {
|
|
1584
1599
|
const processorHandler = typeof component !== "undefined" && component !== null ? component.processorHandler : this;
|
|
1585
1600
|
return processorHandler?.processors[processorName].bind(processorHandler).apply(processorHandler, [component, args?.split(",")]);
|
|
1586
1601
|
}
|
|
1602
|
+
static process(template, component = null) {
|
|
1603
|
+
return _Processor.instance.process(template, component);
|
|
1604
|
+
}
|
|
1587
1605
|
process(template, component = null) {
|
|
1588
1606
|
const processorHandler = component !== null ? component.processorHandler : New(_Processor, { component: null });
|
|
1589
1607
|
if (typeof template === "string") {
|
|
@@ -1599,7 +1617,16 @@ var init_Processor = __esm({
|
|
|
1599
1617
|
}
|
|
1600
1618
|
return template;
|
|
1601
1619
|
}
|
|
1620
|
+
static processObject(obj, component) {
|
|
1621
|
+
if (obj === null || obj === void 0) {
|
|
1622
|
+
return obj;
|
|
1623
|
+
}
|
|
1624
|
+
return _Processor.instance.processObject(obj, component);
|
|
1625
|
+
}
|
|
1602
1626
|
processObject(obj, component = null) {
|
|
1627
|
+
if (obj === null || obj === void 0) {
|
|
1628
|
+
return obj;
|
|
1629
|
+
}
|
|
1603
1630
|
let __instance__ = component === null ? this : component.processorHandler;
|
|
1604
1631
|
if (typeof __instance__ === "undefined") {
|
|
1605
1632
|
__instance__ = new _Processor({ component });
|
|
@@ -4021,7 +4048,7 @@ var init_defaultProcessors = __esm({
|
|
|
4021
4048
|
});
|
|
4022
4049
|
|
|
4023
4050
|
// src/findPackageNodePath.ts
|
|
4024
|
-
var findPackageNodePath;
|
|
4051
|
+
var import_node_fs, findPackageNodePath;
|
|
4025
4052
|
var init_findPackageNodePath = __esm({
|
|
4026
4053
|
"src/findPackageNodePath.ts"() {
|
|
4027
4054
|
"use strict";
|
|
@@ -4029,10 +4056,10 @@ var init_findPackageNodePath = __esm({
|
|
|
4029
4056
|
init_Export();
|
|
4030
4057
|
init_Logger();
|
|
4031
4058
|
init_platform();
|
|
4059
|
+
import_node_fs = __toESM(require("node:fs"));
|
|
4032
4060
|
findPackageNodePath = /* @__PURE__ */ __name(function(packagename) {
|
|
4033
4061
|
let sdkPath = null;
|
|
4034
4062
|
if (!isBrowser) {
|
|
4035
|
-
const fs = require("fs");
|
|
4036
4063
|
try {
|
|
4037
4064
|
let sdkPaths = [
|
|
4038
4065
|
`${CONFIG.get("projectPath")}${CONFIG.get("relativeImportPath")}`,
|
|
@@ -4049,7 +4076,7 @@ var init_findPackageNodePath = __esm({
|
|
|
4049
4076
|
""
|
|
4050
4077
|
].concat(module.paths);
|
|
4051
4078
|
sdkPaths = sdkPaths.filter((p) => {
|
|
4052
|
-
return
|
|
4079
|
+
return import_node_fs.default.existsSync(p + "/" + packagename);
|
|
4053
4080
|
});
|
|
4054
4081
|
if (sdkPaths.length > 0) {
|
|
4055
4082
|
sdkPath = sdkPaths[0];
|