mm_machine 2.0.9 → 2.1.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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -210,14 +210,14 @@ Index.prototype.updateConfigAll = async function(searchPath, accurate) {
210
210
  // 处理找到的目录
211
211
  for (const f of list_scope) {
212
212
  // 直接检查并加载demo.json文件
213
- const config_file = `${this.type}.json`.fullname(f);
213
+ const config_file = `./${this.type}.json`.fullname(f);
214
214
  if (config_file && config_file.hasFile && config_file.hasFile()) {
215
215
  // 直接加载这个文件
216
216
  await this.loadFile(config_file, true);
217
217
  }
218
218
 
219
219
  // 同时也检查config_demo.json文件
220
- const config_file2 = `config_${this.type}.json`.fullname(f);
220
+ const config_file2 = `./config_${this.type}.json`.fullname(f);
221
221
  if (config_file2 && config_file2.hasFile && config_file2.hasFile()) {
222
222
  // 直接加载这个文件
223
223
  await this.loadFile(config_file2, true);
@@ -245,10 +245,10 @@ Index.prototype.updateConfigHave = async function(dir) {
245
245
  // 使用find方法查找匹配项
246
246
  const targetConfig = config.find(cg => cg.name === o.config.name);
247
247
  if (targetConfig) {
248
- await o.exec('set_config', targetConfig);
248
+ await o.exec('setConfig', targetConfig);
249
249
  }
250
250
  } else {
251
- await o.exec('set_config', config);
251
+ await o.exec('setConfig', config);
252
252
  }
253
253
  }
254
254
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "2.0.9",
3
+ "version": "2.1.1",
4
4
  "description": "这是超级美眉框架机制构建辅助模块,用于快速构建一个机制,支持动态加载、热更新、模块管理等功能,并具有增强的错误处理和现代JavaScript特性支持。",
5
5
  "main": "index.js",
6
6
  "scripts": {