mm_machine 5.0.0 → 5.0.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/README.md +5 -0
- package/lib/manager.js +0 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -576,6 +576,11 @@ mm_machine 模块系统基于以下核心设计理念:
|
|
|
576
576
|
|
|
577
577
|
## 更新日志
|
|
578
578
|
|
|
579
|
+
### 5.0.1
|
|
580
|
+
|
|
581
|
+
- 配置加载依赖升级到 `mm_loader@^4.0.1`:该版本修复了 `load()` 在 JSON5 解析之外额外对整串 `{表达式}` 做模板字段求值的 BUG,现在 `load()` 只委托 `mm_helper.loadJson` 把配置读成对象,花括号内容一律原样保留。
|
|
582
|
+
- 本模块源码无需改动:`_readModConfig` 本就通过 `_getLoader().load()` 加载配置,**配置加载职责保持在 mm_machine 这一层**。子类(如 `mm_mcps`)不必覆盖 `_readModConfig`,也不必直接依赖 `mm_loader`;运行时内变量由各业务模块在消费配置时自行解析。
|
|
583
|
+
|
|
579
584
|
### v4.1.0
|
|
580
585
|
|
|
581
586
|
- 配置加载器改为共享:`_getLoader()` 默认取 mm_loader 实例池中的同一个 `Loader`(`loadAdmin(config.use_scope || 'os')`),不再为每个管理器各建实例
|
package/lib/manager.js
CHANGED
|
@@ -338,7 +338,6 @@ Manager.prototype._readModConfig = function (config_file, config = {}) {
|
|
|
338
338
|
}
|
|
339
339
|
// 归属信息:app 为所属应用(声明值优先,兼作注册域),plugin 为所属插件(应用级资源为空),
|
|
340
340
|
// scope 为注册域(与管理器域一致的推导口径,即该资源配置到 require(module).admin 的哪个域)。
|
|
341
|
-
// 旧版 update(dir) 全量扫描注册(如 xxx_web 网关镜像)不经过 load_resources/_addResource,
|
|
342
341
|
// 归属信息统一在这里兜底注入
|
|
343
342
|
if (config_file) {
|
|
344
343
|
const norm_path = String(config_file).replace(/\\/g, '/');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"name": "mm_machine",
|
|
3
|
+
"version": "5.0.1",
|
|
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": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@prettier/sync": "^0.6.1",
|
|
43
43
|
"mm_config": "^2.5.3",
|
|
44
44
|
"mm_helper": "^1.0.3",
|
|
45
|
-
"mm_loader": "^4.0.
|
|
45
|
+
"mm_loader": "^4.0.1",
|
|
46
46
|
"mm_mod": "^1.0.6",
|
|
47
47
|
"mm_tpl": "^2.7.3"
|
|
48
48
|
},
|