mm_machine 2.9.6 → 2.9.7
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/mod.js +4 -0
- package/package.json +1 -1
package/mod.js
CHANGED
|
@@ -124,6 +124,10 @@ Mod.prototype._initCore = async function () {
|
|
|
124
124
|
if (this.lifecycle_state === 'inited') {
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
|
+
// 如果是 created 状态,自动加载
|
|
128
|
+
if (this.lifecycle_state === 'created') {
|
|
129
|
+
await this.load();
|
|
130
|
+
}
|
|
127
131
|
if (this.lifecycle_state !== 'loaded') {
|
|
128
132
|
throw new Error('模块未加载,无法初始化');
|
|
129
133
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_machine",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|