mm_os 4.1.8 → 4.2.0

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/com/cmd/index.js CHANGED
@@ -204,7 +204,7 @@ Cmd.prototype._fullList = async function () {
204
204
  * @returns {object|string} 返回指令执行结果
205
205
  */
206
206
  Cmd.prototype.cmd = async function (name, state, ...params) {
207
- var obj = this.get(name);
207
+ var obj = this.getMod(name);
208
208
  if (!obj) {
209
209
  return '错误: 指令不存在';
210
210
  }
@@ -102,7 +102,7 @@ Param.prototype.sort = function() {
102
102
  * @returns {object} 验证失败返回错误信息,成功返回null
103
103
  */
104
104
  Param.prototype.run = async function(db, name, query, body) {
105
- var obj = this.get(name);
105
+ var obj = this.getMod(name);
106
106
  if (obj) {
107
107
  // 检查参数状态,状态为0时跳过执行
108
108
  if (obj.config && obj.config.state === 0) {
@@ -360,7 +360,7 @@ Pendant.prototype.renderBlock = async function (ctx, db, blocks) {
360
360
  var html = '';
361
361
  for (var i = 0; i < blocks.length; i++) {
362
362
  var block = blocks[i];
363
- var o = this.get(block.Pendant);
363
+ var o = this.getMod(block.pendant);
364
364
  if (o) {
365
365
  var option = this.optionModel(block);
366
366
  var ret = await o.call('main', ctx, db, option);
package/com/sql/index.js CHANGED
@@ -102,7 +102,7 @@ Sql.prototype.sort = function () {
102
102
  * @returns {object} 执行结果
103
103
  */
104
104
  Sql.prototype.run = async function (name, query, body, db) {
105
- var obj = this.get(name);
105
+ var obj = this.getMod(name);
106
106
  if (obj) {
107
107
  var ret = await obj.run(query, body, db);
108
108
  if (this.mode > 4) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mm_os",
3
3
  "description": "MM_OS服务端架构,用于快速构建应用程序,支持网站建设、小程序后台、AI应用、物联网(IOT/AIOT)、游戏服务端等多种场景。",
4
- "version": "4.1.8",
4
+ "version": "4.2.0",
5
5
  "main": "index.js",
6
6
  "keywords": [
7
7
  "AI",