phecda-core 4.1.0-alpha.0 → 4.1.0-alpha.1
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/dist/index.js +9 -4
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,8 +26,8 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
// src/index.ts
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var index_exports = {};
|
|
30
|
+
__export(index_exports, {
|
|
31
31
|
Assign: () => Assign,
|
|
32
32
|
Base: () => Base,
|
|
33
33
|
CLEAR_KEY: () => CLEAR_KEY,
|
|
@@ -78,7 +78,7 @@ __export(src_exports, {
|
|
|
78
78
|
setMeta: () => setMeta,
|
|
79
79
|
wait: () => wait
|
|
80
80
|
});
|
|
81
|
-
module.exports = __toCommonJS(
|
|
81
|
+
module.exports = __toCommonJS(index_exports);
|
|
82
82
|
|
|
83
83
|
// src/core.ts
|
|
84
84
|
var SHARE_KEY = Symbol("phecda[share]");
|
|
@@ -255,7 +255,12 @@ function invoke(instance, key, ...params) {
|
|
|
255
255
|
const metaKeys = getMetaKey(instance);
|
|
256
256
|
return Promise.allSettled(metaKeys.map((k) => {
|
|
257
257
|
return getMeta(instance, k);
|
|
258
|
-
}).flat().filter((item) => typeof item[key] === "function").map((item) => item[key](instance, ...params)))
|
|
258
|
+
}).flat().filter((item) => typeof item[key] === "function").map((item) => item[key](instance, ...params))).then((res) => {
|
|
259
|
+
res.filter((item) => item.status === "rejected").forEach((item) => {
|
|
260
|
+
console.error(item.reason);
|
|
261
|
+
});
|
|
262
|
+
return res;
|
|
263
|
+
});
|
|
259
264
|
}
|
|
260
265
|
function invokeInit(instance) {
|
|
261
266
|
return instance.__PROMISE_SYMBOL__ = invoke(instance, "init");
|
package/dist/index.mjs
CHANGED
|
@@ -184,7 +184,12 @@ function invoke(instance, key, ...params) {
|
|
|
184
184
|
const metaKeys = getMetaKey(instance);
|
|
185
185
|
return Promise.allSettled(metaKeys.map((k) => {
|
|
186
186
|
return getMeta(instance, k);
|
|
187
|
-
}).flat().filter((item) => typeof item[key] === "function").map((item) => item[key](instance, ...params)))
|
|
187
|
+
}).flat().filter((item) => typeof item[key] === "function").map((item) => item[key](instance, ...params))).then((res) => {
|
|
188
|
+
res.filter((item) => item.status === "rejected").forEach((item) => {
|
|
189
|
+
console.error(item.reason);
|
|
190
|
+
});
|
|
191
|
+
return res;
|
|
192
|
+
});
|
|
188
193
|
}
|
|
189
194
|
function invokeInit(instance) {
|
|
190
195
|
return instance.__PROMISE_SYMBOL__ = invoke(instance, "init");
|