qcobjects 2.5.112-beta → 2.5.114-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/QCObjects.js +3 -2
- package/build/findPackageNodePath.js +10 -11
- package/build/make_global.js +7 -13
- package/build/platform.js +3 -2
- package/build/top.js +1 -1
- package/package.json +1 -1
- package/public/browser/QCObjects.js +64 -52
- package/public/browser/QCObjects.js.map +4 -4
- package/public/cjs/QCObjects.cjs +65 -52
- package/public/cjs/QCObjects.cjs.map +4 -4
- package/public/esm/QCObjects.mjs +66 -50
- package/public/esm/QCObjects.mjs.map +4 -4
- package/public/types/index.d.ts +13 -12
- package/src/QCObjects.ts +2 -1
- package/src/make_global.ts +11 -13
- package/src/top.ts +1 -1
package/public/cjs/QCObjects.cjs
CHANGED
|
@@ -78,6 +78,41 @@ var init_PrimaryCollections = __esm({
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
// src/make_global.ts
|
|
82
|
+
var __make_global__;
|
|
83
|
+
var init_make_global = __esm({
|
|
84
|
+
"src/make_global.ts"() {
|
|
85
|
+
"use strict";
|
|
86
|
+
init_top();
|
|
87
|
+
__make_global__ = /* @__PURE__ */ __name(function(f) {
|
|
88
|
+
if (!!f && !!f.name) {
|
|
89
|
+
if (typeof _top !== "undefined" && typeof f !== "undefined" && _top !== null && !Object.hasOwn(_top, f.name)) {
|
|
90
|
+
set(f.name, f);
|
|
91
|
+
} else if (typeof global !== "undefined") {
|
|
92
|
+
global[f.name] = f;
|
|
93
|
+
} else if (typeof globalThis !== "undefined") {
|
|
94
|
+
globalThis[f.name] = f;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}, "__make_global__");
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// src/Export.ts
|
|
102
|
+
var Export;
|
|
103
|
+
var init_Export = __esm({
|
|
104
|
+
"src/Export.ts"() {
|
|
105
|
+
"use strict";
|
|
106
|
+
init_make_global();
|
|
107
|
+
Export = /* @__PURE__ */ __name(function(f) {
|
|
108
|
+
return __make_global__(f);
|
|
109
|
+
}, "Export");
|
|
110
|
+
Export.prototype.toString = function() {
|
|
111
|
+
return "Export(function or symbol) { [QCObjects native code] }";
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
|
|
81
116
|
// src/_import_.ts
|
|
82
117
|
async function _import_(name) {
|
|
83
118
|
logger.debug(`Importing ${name}...`);
|
|
@@ -122,7 +157,9 @@ var init_platform = __esm({
|
|
|
122
157
|
return isDeno ? deno_require(name) : ((name2) => {
|
|
123
158
|
let r;
|
|
124
159
|
try {
|
|
125
|
-
|
|
160
|
+
(async () => {
|
|
161
|
+
r = await _import_(name2);
|
|
162
|
+
})().then((m) => {
|
|
126
163
|
r = m && m.default || m;
|
|
127
164
|
}).catch((e) => {
|
|
128
165
|
logger.warn(`An error ocurred: ${e}`);
|
|
@@ -140,47 +177,6 @@ var init_platform = __esm({
|
|
|
140
177
|
}
|
|
141
178
|
});
|
|
142
179
|
|
|
143
|
-
// src/make_global.ts
|
|
144
|
-
var __make_global__;
|
|
145
|
-
var init_make_global = __esm({
|
|
146
|
-
"src/make_global.ts"() {
|
|
147
|
-
"use strict";
|
|
148
|
-
init_platform();
|
|
149
|
-
init_top();
|
|
150
|
-
__make_global__ = /* @__PURE__ */ __name(function(f) {
|
|
151
|
-
if (typeof f !== "undefined") {
|
|
152
|
-
if (isBrowser) {
|
|
153
|
-
try {
|
|
154
|
-
_top[f.name] = f;
|
|
155
|
-
window[f.name] = f;
|
|
156
|
-
} catch (e) {
|
|
157
|
-
throw Error(`An error ocurred: ${e}`);
|
|
158
|
-
}
|
|
159
|
-
} else if (typeof global !== "undefined") {
|
|
160
|
-
if (!Object.hasOwn(global, f.name)) {
|
|
161
|
-
global[f.name] = f;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}, "__make_global__");
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
// src/Export.ts
|
|
170
|
-
var Export;
|
|
171
|
-
var init_Export = __esm({
|
|
172
|
-
"src/Export.ts"() {
|
|
173
|
-
"use strict";
|
|
174
|
-
init_make_global();
|
|
175
|
-
Export = /* @__PURE__ */ __name(function(f) {
|
|
176
|
-
return __make_global__(f);
|
|
177
|
-
}, "Export");
|
|
178
|
-
Export.prototype.toString = function() {
|
|
179
|
-
return "Export(function or symbol) { [QCObjects native code] }";
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
|
|
184
180
|
// src/Logger.ts
|
|
185
181
|
var Logger, logger;
|
|
186
182
|
var init_Logger = __esm({
|
|
@@ -2274,9 +2270,9 @@ var init_componentLoader = __esm({
|
|
|
2274
2270
|
} else {
|
|
2275
2271
|
logger.debug("Loading the component as a local file in server...");
|
|
2276
2272
|
const _directLoad = /* @__PURE__ */ __name(function() {
|
|
2277
|
-
const
|
|
2273
|
+
const fs = _require_("fs");
|
|
2278
2274
|
logger.debug("SENDING THE NORMAL REQUEST ");
|
|
2279
|
-
|
|
2275
|
+
fs.readFile(component2.url, _componentLoaded);
|
|
2280
2276
|
}, "_directLoad");
|
|
2281
2277
|
if (component2.cached) {
|
|
2282
2278
|
logger.debug("USING CACHE FOR COMPONENT: " + component2.name);
|
|
@@ -3769,6 +3765,17 @@ var init_globalSettings = __esm({
|
|
|
3769
3765
|
});
|
|
3770
3766
|
|
|
3771
3767
|
// src/top.ts
|
|
3768
|
+
var top_exports = {};
|
|
3769
|
+
__export(top_exports, {
|
|
3770
|
+
_top: () => _top,
|
|
3771
|
+
buildComponentsStack: () => buildComponentsStack,
|
|
3772
|
+
componentsStack: () => componentsStack,
|
|
3773
|
+
configService: () => configService,
|
|
3774
|
+
get: () => get,
|
|
3775
|
+
resetTop: () => resetTop,
|
|
3776
|
+
set: () => set,
|
|
3777
|
+
setConfigService: () => setConfigService
|
|
3778
|
+
});
|
|
3772
3779
|
var _top, componentsStack, resetTop, buildComponentsStack, configService, setConfigService, set, get;
|
|
3773
3780
|
var init_top = __esm({
|
|
3774
3781
|
"src/top.ts"() {
|
|
@@ -3776,7 +3783,7 @@ var init_top = __esm({
|
|
|
3776
3783
|
init_ComponentFactory();
|
|
3777
3784
|
init_Cast();
|
|
3778
3785
|
init_globalSettings();
|
|
3779
|
-
_top = typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports || typeof global !== "undefined" && global || typeof globalThis !== "undefined" && globalThis || typeof window !== "undefined" && window || typeof self !== "undefined" && self || void 0;
|
|
3786
|
+
_top = typeof module !== "undefined" && typeof module.exports !== "undefined" && module.exports || typeof global !== "undefined" && global || typeof globalThis !== "undefined" && globalThis || typeof window !== "undefined" && window || typeof self !== "undefined" && self !== null && self || void 0;
|
|
3780
3787
|
_top.lastCache = void 0;
|
|
3781
3788
|
componentsStack = [];
|
|
3782
3789
|
resetTop = /* @__PURE__ */ __name(() => {
|
|
@@ -4325,19 +4332,22 @@ var init_Tag = __esm({
|
|
|
4325
4332
|
});
|
|
4326
4333
|
|
|
4327
4334
|
// src/findPackageNodePath.ts
|
|
4328
|
-
var
|
|
4335
|
+
var findPackageNodePath;
|
|
4329
4336
|
var init_findPackageNodePath = __esm({
|
|
4330
4337
|
"src/findPackageNodePath.ts"() {
|
|
4331
4338
|
"use strict";
|
|
4339
|
+
init_import();
|
|
4332
4340
|
init_CONFIG();
|
|
4333
4341
|
init_Export();
|
|
4334
4342
|
init_Logger();
|
|
4335
4343
|
init_platform();
|
|
4336
|
-
import_node_fs = __toESM(require("node:fs"));
|
|
4337
4344
|
findPackageNodePath = /* @__PURE__ */ __name(function(packagename) {
|
|
4338
4345
|
let sdkPath = null;
|
|
4339
4346
|
if (!isBrowser) {
|
|
4340
|
-
|
|
4347
|
+
let fs;
|
|
4348
|
+
(async () => {
|
|
4349
|
+
fs = await _import_("node:fs");
|
|
4350
|
+
})().then(() => {
|
|
4341
4351
|
let sdkPaths = [
|
|
4342
4352
|
`${CONFIG.get("projectPath")}${CONFIG.get("relativeImportPath")}`,
|
|
4343
4353
|
`${CONFIG.get("basePath")}${CONFIG.get("relativeImportPath")}`,
|
|
@@ -4353,7 +4363,7 @@ var init_findPackageNodePath = __esm({
|
|
|
4353
4363
|
""
|
|
4354
4364
|
].concat(module.paths);
|
|
4355
4365
|
sdkPaths = sdkPaths.filter((p) => {
|
|
4356
|
-
return
|
|
4366
|
+
return fs.existsSync(p + "/" + packagename);
|
|
4357
4367
|
});
|
|
4358
4368
|
if (sdkPaths.length > 0) {
|
|
4359
4369
|
sdkPath = sdkPaths[0];
|
|
@@ -4362,9 +4372,9 @@ var init_findPackageNodePath = __esm({
|
|
|
4362
4372
|
sdkPath = "";
|
|
4363
4373
|
logger.info(`${packagename} is not in a standard path.`);
|
|
4364
4374
|
}
|
|
4365
|
-
}
|
|
4366
|
-
|
|
4367
|
-
}
|
|
4375
|
+
}).catch((e) => {
|
|
4376
|
+
throw new Error(e);
|
|
4377
|
+
});
|
|
4368
4378
|
}
|
|
4369
4379
|
return sdkPath;
|
|
4370
4380
|
}, "findPackageNodePath");
|
|
@@ -5101,6 +5111,7 @@ __export(QCObjects_exports, {
|
|
|
5101
5111
|
__is_raw_class__: () => __is_raw_class__,
|
|
5102
5112
|
__make_global__: () => __make_global__,
|
|
5103
5113
|
__to_number: () => __to_number,
|
|
5114
|
+
__top__: () => top_exports,
|
|
5104
5115
|
_buildComponentsFromElements_: () => _buildComponentsFromElements_,
|
|
5105
5116
|
_fireAsyncLoad: () => _fireAsyncLoad,
|
|
5106
5117
|
_methods_: () => _methods_,
|
|
@@ -5136,6 +5147,7 @@ __export(QCObjects_exports, {
|
|
|
5136
5147
|
module.exports = __toCommonJS(QCObjects_exports);
|
|
5137
5148
|
var AssignPolyfill = __toESM(require_assign());
|
|
5138
5149
|
init_top();
|
|
5150
|
+
init_top();
|
|
5139
5151
|
init_PrimaryCollections();
|
|
5140
5152
|
init_DataStringify();
|
|
5141
5153
|
init_DOMCreateElement();
|
|
@@ -6624,6 +6636,7 @@ var QCObjects = __toESM(require_MainProcess());
|
|
|
6624
6636
|
__is_raw_class__,
|
|
6625
6637
|
__make_global__,
|
|
6626
6638
|
__to_number,
|
|
6639
|
+
__top__,
|
|
6627
6640
|
_buildComponentsFromElements_,
|
|
6628
6641
|
_fireAsyncLoad,
|
|
6629
6642
|
_methods_,
|