mm_os 2.9.1 → 2.9.2
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/core/com/api/drive.js +9 -89
- package/core/com/api/index.js +3 -31
- package/core/com/cmd/drive.js +10 -1
- package/core/com/cmd/index.js +15 -1
- package/core/com/component/drive.js +1 -1
- package/core/com/component/index.js +16 -12
- package/core/com/db/drive.js +1 -1
- package/core/com/db/index.js +15 -17
- package/core/com/event/drive.js +3 -1
- package/core/com/event/index.js +74 -61
- package/core/com/eventer/com.js +2 -2
- package/core/com/middleware/com.js +41 -16
- package/core/com/mqtt/drive.js +4 -3
- package/core/com/mqtt/index.js +8 -6
- package/core/com/nav/drive.js +1 -19
- package/core/com/nav/index.js +1 -1
- package/core/com/param/drive.js +1 -1
- package/core/com/param/index.js +1 -27
- package/core/com/plugin/drive.js +18 -19
- package/core/com/plugin/index.js +16 -21
- package/core/com/plugin/script.js +109 -58
- package/core/com/rpc/com.json +4 -0
- package/core/com/rpc/drive.js +160 -0
- package/core/com/rpc/index.js +87 -0
- package/core/com/socket/drive.js +0 -1
- package/core/com/socket/index.js +5 -15
- package/core/com/sql/drive.js +1 -1
- package/core/com/sql/index.js +4 -31
- package/core/com/static/drive.js +13 -54
- package/core/com/static/index.js +14 -6
- package/core/com/task/index.js +14 -36
- package/core/com/tpl/com.js +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/cache/sys/main/config.json +0 -1
- package/cache/user/main/config.json +0 -1
- package/demo/app/dev/LICENSE +0 -201
- package/demo/app/dev/README.md +0 -1
- package/demo/app/dev/app.js +0 -147
- package/demo/app/dev/app.json +0 -12
- package/demo/app/dev/event_api/client/event.json +0 -10
- package/demo/app/dev/event_api/client/main.js +0 -17
- package/demo/app/dev/plugin/main/api_dev_client/api/api.json +0 -10
- package/demo/app/dev/plugin/main/api_dev_client/api/index.js +0 -54
- package/demo/app/dev/plugin/main/api_dev_client/api/param.json +0 -31
- package/demo/app/dev/plugin/main/api_dev_client/com.js +0 -348
- package/demo/app/dev/plugin/main/api_dev_client/event/api.json +0 -10
- package/demo/app/dev/plugin/main/api_dev_client/event/index.js +0 -31
- package/demo/app/dev/plugin/main/api_dev_client/event/param.json +0 -31
- package/demo/app/sys/.gitmodules +0 -3
- package/demo/app/sys/LICENSE +0 -201
- package/demo/app/sys/README.md +0 -1
- package/demo/app/sys/app.js +0 -148
- package/demo/app/sys/app.json +0 -10
- package/demo/app/sys/event_api/api/after.js +0 -12
- package/demo/app/sys/event_api/api/before.js +0 -78
- package/demo/app/sys/event_api/api/check.js +0 -56
- package/demo/app/sys/event_api/api/event.json +0 -41
- package/demo/app/sys/event_api/api/main.js +0 -17
- package/demo/app/sys/event_api/apis/before.js +0 -76
- package/demo/app/sys/event_api/apis/event.json +0 -21
- package/demo/app/sys/event_api/apis/main.js +0 -17
- package/demo/app/sys/event_api/client/event.json +0 -10
- package/demo/app/sys/event_api/client/main.js +0 -15
- package/demo/app/sys/event_api/manage/event.json +0 -10
- package/demo/app/sys/event_api/manage/main.js +0 -15
- package/demo/app/sys/event_api/upload/event.json +0 -10
- package/demo/app/sys/event_api/upload/main.js +0 -15
- package/demo/app/sys/event_api/web/check.js +0 -34
- package/demo/app/sys/event_api/web/event.json +0 -39
- package/demo/app/sys/event_api/web/main.js +0 -36
- package/demo/app/sys/event_api/ws/event.json +0 -10
- package/demo/app/sys/event_api/ws/main.js +0 -15
- package/demo/app/sys/plugin/main/api_client/activation/api.json +0 -29
- package/demo/app/sys/plugin/main/api_client/activation/index.js +0 -185
- package/demo/app/sys/plugin/main/api_client/activation/param.json +0 -56
- package/demo/app/sys/plugin/main/api_client/app_balance/api.json +0 -18
- package/demo/app/sys/plugin/main/api_client/app_balance/index.js +0 -61
- package/demo/app/sys/plugin/main/api_client/app_balance/param.json +0 -36
- package/demo/app/sys/plugin/main/api_client/app_pay/api.json +0 -23
- package/demo/app/sys/plugin/main/api_client/app_pay/index.js +0 -65
- package/demo/app/sys/plugin/main/api_client/app_pay/param.json +0 -61
- package/demo/app/sys/plugin/main/api_client/app_state/api.json +0 -27
- package/demo/app/sys/plugin/main/api_client/app_state/index.js +0 -46
- package/demo/app/sys/plugin/main/api_client/app_state/param.json +0 -36
- package/demo/app/sys/plugin/main/api_client/component/api.json +0 -27
- package/demo/app/sys/plugin/main/api_client/component/index.js +0 -331
- package/demo/app/sys/plugin/main/api_client/config/api.json +0 -37
- package/demo/app/sys/plugin/main/api_client/config/index.js +0 -36
- package/demo/app/sys/plugin/main/api_client/config/param.json +0 -27
- package/demo/app/sys/plugin/main/api_client/download/api.json +0 -37
- package/demo/app/sys/plugin/main/api_client/download/index.js +0 -60
- package/demo/app/sys/plugin/main/api_client/download/param.json +0 -34
- package/demo/app/sys/plugin/main/api_client/install/api.json +0 -24
- package/demo/app/sys/plugin/main/api_client/install/index.js +0 -216
- package/demo/app/sys/plugin/main/api_client/install/param.json +0 -64
- package/demo/app/sys/plugin/main/api_client/nav/api.json +0 -15
- package/demo/app/sys/plugin/main/api_client/nav/index.js +0 -37
- package/demo/app/sys/plugin/main/api_client/nav/param.json +0 -87
- package/demo/app/sys/plugin/main/api_client/overview/api.json +0 -24
- package/demo/app/sys/plugin/main/api_client/overview/index.js +0 -29
- package/demo/app/sys/plugin/main/api_client/overview/param.json +0 -130
- package/demo/app/sys/plugin/main/api_client/overview/sql.json +0 -70
- package/demo/app/sys/plugin/main/api_client/query/api.json +0 -35
- package/demo/app/sys/plugin/main/api_client/query/index.js +0 -48
- package/demo/app/sys/plugin/main/api_client/theme/api.json +0 -37
- package/demo/app/sys/plugin/main/api_client/theme/index.js +0 -30
- package/demo/app/sys/plugin/main/api_client/theme/param.json +0 -31
- package/demo/app/sys/plugin/main/api_client/version/api.json +0 -29
- package/demo/app/sys/plugin/main/api_client/version/index.js +0 -132
- package/demo/app/sys/plugin/main/api_client/version/param.json +0 -130
- package/demo/app/sys/plugin/main/api_client/zip/api.json +0 -31
- package/demo/app/sys/plugin/main/api_client/zip/index.js +0 -29
- package/demo/app/sys/plugin/main/api_client/zip/param.json +0 -48
- package/demo/app/sys/plugin/main/api_sys_client/count/api.json +0 -27
- package/demo/app/sys/plugin/main/api_sys_client/count/index.js +0 -73
- package/demo/app/sys/plugin/main/api_sys_client/lang/api.json +0 -37
- package/demo/app/sys/plugin/main/api_sys_client/lang/index.js +0 -28
- package/demo/app/sys/plugin/main/api_sys_client/lang/param.json +0 -22
- package/demo/app/sys/plugin/main/api_sys_client/log/api.json +0 -29
- package/demo/app/sys/plugin/main/api_sys_client/log/index.js +0 -42
- package/demo/app/sys/plugin/main/api_sys_client/log/param.json +0 -130
- package/demo/app/sys/plugin/main/api_sys_client/options/api.json +0 -30
- package/demo/app/sys/plugin/main/api_sys_client/options/index.js +0 -28
- package/demo/app/sys/plugin/main/api_sys_client/options/param.json +0 -130
- package/demo/app/sys/plugin/main/api_sys_client/query/api.json +0 -35
- package/demo/app/sys/plugin/main/api_sys_client/query/index.js +0 -48
- package/demo/app/sys/plugin/main/api_sys_client/theme/api.json +0 -37
- package/demo/app/sys/plugin/main/api_sys_client/theme/index.js +0 -30
- package/demo/app/sys/plugin/main/api_sys_client/theme/param.json +0 -31
- package/demo/app/sys/plugin/main/api_sys_web/index/api.json +0 -37
- package/demo/app/sys/plugin/main/api_sys_web/index/index.js +0 -26
- package/demo/app/sys/plugin/main/api_upload/chunk/api.json +0 -29
- package/demo/app/sys/plugin/main/api_upload/chunk/index.js +0 -38
- package/demo/app/sys/plugin/main/api_upload/chunk/param.json +0 -27
- package/demo/app/sys/plugin/main/api_upload/delete/api.json +0 -29
- package/demo/app/sys/plugin/main/api_upload/delete/index.js +0 -38
- package/demo/app/sys/plugin/main/api_upload/delete/param.json +0 -27
- package/demo/app/sys/plugin/main/api_upload/file/api.json +0 -15
- package/demo/app/sys/plugin/main/api_upload/file/index.js +0 -114
- package/demo/app/sys/plugin/main/api_upload/file/param.json +0 -9
- package/demo/app/sys/plugin/main/api_upload/image/api.json +0 -16
- package/demo/app/sys/plugin/main/api_upload/image/index.js +0 -45
- package/demo/app/sys/plugin/main/api_upload/image/param.json +0 -9
- package/demo/app/sys/plugin/main/api_upload/merge/api.json +0 -29
- package/demo/app/sys/plugin/main/api_upload/merge/index.js +0 -38
- package/demo/app/sys/plugin/main/api_upload/merge/param.json +0 -27
- package/demo/app/sys/plugin/main/api_upload/video/api.json +0 -29
- package/demo/app/sys/plugin/main/api_upload/video/index.js +0 -48
- package/demo/app/sys/plugin/main/api_upload/video/param.json +0 -25
- package/demo/app/sys/plugin/main/index.js +0 -127
- package/demo/app/sys/plugin/main/plugin.json +0 -19
- package/demo/app/sys/plugin/main/static/article_list.vue +0 -488
- package/demo/app/sys/plugin/main/static/img/logo.png +0 -0
- package/demo/app/sys/plugin/main/static/static.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_client/ad/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/ad/param.json +0 -685
- package/demo/app/sys/plugin/server/api_sys_client/ad/sql.json +0 -114
- package/demo/app/sys/plugin/server/api_sys_client/address_province/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/address_province/param.json +0 -156
- package/demo/app/sys/plugin/server/api_sys_client/address_province/sql.json +0 -25
- package/demo/app/sys/plugin/server/api_sys_client/app/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/app/param.json +0 -437
- package/demo/app/sys/plugin/server/api_sys_client/app/sql.json +0 -71
- package/demo/app/sys/plugin/server/api_sys_client/app_refresh/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/app_refresh/param.json +0 -158
- package/demo/app/sys/plugin/server/api_sys_client/app_refresh/sql.json +0 -28
- package/demo/app/sys/plugin/server/api_sys_client/block/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/block/param.json +0 -318
- package/demo/app/sys/plugin/server/api_sys_client/block/sql.json +0 -48
- package/demo/app/sys/plugin/server/api_sys_client/config/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/config/param.json +0 -259
- package/demo/app/sys/plugin/server/api_sys_client/config/sql.json +0 -93
- package/demo/app/sys/plugin/server/api_sys_client/file/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/file/param.json +0 -268
- package/demo/app/sys/plugin/server/api_sys_client/file/sql.json +0 -30
- package/demo/app/sys/plugin/server/api_sys_client/lang/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/lang/param.json +0 -175
- package/demo/app/sys/plugin/server/api_sys_client/lang/sql.json +0 -40
- package/demo/app/sys/plugin/server/api_sys_client/message/api.json +0 -13
- package/demo/app/sys/plugin/server/api_sys_client/message/index.js +0 -31
- package/demo/app/sys/plugin/server/api_sys_client/message/param.json +0 -147
- package/demo/app/sys/plugin/server/api_sys_client/message/sql.json +0 -24
- package/demo/app/sys/plugin/server/api_sys_client/nav/api.json +0 -13
- package/demo/app/sys/plugin/server/api_sys_client/nav/index.js +0 -52
- package/demo/app/sys/plugin/server/api_sys_client/nav/param.json +0 -295
- package/demo/app/sys/plugin/server/api_sys_client/nav/sql.json +0 -63
- package/demo/app/sys/plugin/server/api_sys_client/pay/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/pay/param.json +0 -391
- package/demo/app/sys/plugin/server/api_sys_client/pay/sql.json +0 -76
- package/demo/app/sys/plugin/server/api_sys_client/pay_type/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/pay_type/param.json +0 -242
- package/demo/app/sys/plugin/server/api_sys_client/pay_type/sql.json +0 -74
- package/demo/app/sys/plugin/server/api_sys_client/project/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/project/param.json +0 -796
- package/demo/app/sys/plugin/server/api_sys_client/project/sql.json +0 -163
- package/demo/app/sys/plugin/server/api_sys_client/recharge/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/recharge/param.json +0 -311
- package/demo/app/sys/plugin/server/api_sys_client/recharge/sql.json +0 -102
- package/demo/app/sys/plugin/server/api_sys_client/scene/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/scene/param.json +0 -226
- package/demo/app/sys/plugin/server/api_sys_client/scene/sql.json +0 -49
- package/demo/app/sys/plugin/server/api_sys_client/seo/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/seo/param.json +0 -145
- package/demo/app/sys/plugin/server/api_sys_client/seo/sql.json +0 -49
- package/demo/app/sys/plugin/server/api_sys_client/withdrawal/api.json +0 -12
- package/demo/app/sys/plugin/server/api_sys_client/withdrawal/param.json +0 -378
- package/demo/app/sys/plugin/server/api_sys_client/withdrawal/sql.json +0 -92
- package/demo/app/sys/plugin/server/api_sys_manage/ad/api.json +0 -19
- package/demo/app/sys/plugin/server/api_sys_manage/ad/index.js +0 -27
- package/demo/app/sys/plugin/server/api_sys_manage/ad/param.json +0 -685
- package/demo/app/sys/plugin/server/api_sys_manage/ad/sql.json +0 -111
- package/demo/app/sys/plugin/server/api_sys_manage/address_province/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/address_province/param.json +0 -156
- package/demo/app/sys/plugin/server/api_sys_manage/address_province/sql.json +0 -23
- package/demo/app/sys/plugin/server/api_sys_manage/app/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/app/param.json +0 -437
- package/demo/app/sys/plugin/server/api_sys_manage/app/sql.json +0 -69
- package/demo/app/sys/plugin/server/api_sys_manage/app_refresh/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/app_refresh/param.json +0 -158
- package/demo/app/sys/plugin/server/api_sys_manage/app_refresh/sql.json +0 -27
- package/demo/app/sys/plugin/server/api_sys_manage/block/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/block/param.json +0 -318
- package/demo/app/sys/plugin/server/api_sys_manage/block/sql.json +0 -47
- package/demo/app/sys/plugin/server/api_sys_manage/config/api.json +0 -19
- package/demo/app/sys/plugin/server/api_sys_manage/config/index.js +0 -35
- package/demo/app/sys/plugin/server/api_sys_manage/config/param.json +0 -261
- package/demo/app/sys/plugin/server/api_sys_manage/config/sql.json +0 -92
- package/demo/app/sys/plugin/server/api_sys_manage/file/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/file/param.json +0 -268
- package/demo/app/sys/plugin/server/api_sys_manage/file/sql.json +0 -29
- package/demo/app/sys/plugin/server/api_sys_manage/lang/api.json +0 -19
- package/demo/app/sys/plugin/server/api_sys_manage/lang/index.js +0 -27
- package/demo/app/sys/plugin/server/api_sys_manage/lang/param.json +0 -175
- package/demo/app/sys/plugin/server/api_sys_manage/lang/sql.json +0 -40
- package/demo/app/sys/plugin/server/api_sys_manage/message/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/message/param.json +0 -152
- package/demo/app/sys/plugin/server/api_sys_manage/message/sql.json +0 -21
- package/demo/app/sys/plugin/server/api_sys_manage/nav/api.json +0 -19
- package/demo/app/sys/plugin/server/api_sys_manage/nav/index.js +0 -27
- package/demo/app/sys/plugin/server/api_sys_manage/nav/param.json +0 -295
- package/demo/app/sys/plugin/server/api_sys_manage/nav/sql.json +0 -61
- package/demo/app/sys/plugin/server/api_sys_manage/pay/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/pay/param.json +0 -391
- package/demo/app/sys/plugin/server/api_sys_manage/pay/sql.json +0 -75
- package/demo/app/sys/plugin/server/api_sys_manage/pay_type/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/pay_type/param.json +0 -242
- package/demo/app/sys/plugin/server/api_sys_manage/pay_type/sql.json +0 -73
- package/demo/app/sys/plugin/server/api_sys_manage/project/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/project/param.json +0 -796
- package/demo/app/sys/plugin/server/api_sys_manage/project/sql.json +0 -162
- package/demo/app/sys/plugin/server/api_sys_manage/recharge/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/recharge/param.json +0 -311
- package/demo/app/sys/plugin/server/api_sys_manage/recharge/sql.json +0 -101
- package/demo/app/sys/plugin/server/api_sys_manage/scene/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/scene/param.json +0 -226
- package/demo/app/sys/plugin/server/api_sys_manage/scene/sql.json +0 -48
- package/demo/app/sys/plugin/server/api_sys_manage/seo/api.json +0 -19
- package/demo/app/sys/plugin/server/api_sys_manage/seo/index.js +0 -26
- package/demo/app/sys/plugin/server/api_sys_manage/seo/param.json +0 -145
- package/demo/app/sys/plugin/server/api_sys_manage/seo/sql.json +0 -48
- package/demo/app/sys/plugin/server/api_sys_manage/withdrawal/api.json +0 -18
- package/demo/app/sys/plugin/server/api_sys_manage/withdrawal/param.json +0 -378
- package/demo/app/sys/plugin/server/api_sys_manage/withdrawal/sql.json +0 -91
- package/demo/app/sys/plugin/server/db/ad.db.json +0 -622
- package/demo/app/sys/plugin/server/db/address_province.db.json +0 -82
- package/demo/app/sys/plugin/server/db/app.db.json +0 -369
- package/demo/app/sys/plugin/server/db/app_refresh.db.json +0 -117
- package/demo/app/sys/plugin/server/db/block.db.json +0 -352
- package/demo/app/sys/plugin/server/db/config.db.json +0 -226
- package/demo/app/sys/plugin/server/db/file.db.json +0 -172
- package/demo/app/sys/plugin/server/db/lang.db.json +0 -208
- package/demo/app/sys/plugin/server/db/message.db.json +0 -99
- package/demo/app/sys/plugin/server/db/nav.db.json +0 -298
- package/demo/app/sys/plugin/server/db/pay.db.json +0 -316
- package/demo/app/sys/plugin/server/db/pay_type.db.json +0 -226
- package/demo/app/sys/plugin/server/db/project.db.json +0 -622
- package/demo/app/sys/plugin/server/db/recharge.db.json +0 -226
- package/demo/app/sys/plugin/server/db/scene.db.json +0 -208
- package/demo/app/sys/plugin/server/db/seo.db.json +0 -136
- package/demo/app/sys/plugin/server/db/withdrawal.db.json +0 -298
- package/demo/app/user/LICENSE +0 -201
- package/demo/app/user/app.js +0 -144
- package/demo/app/user/app.json +0 -10
- package/demo/app/user/event_api/client/event.json +0 -10
- package/demo/app/user/event_api/client/main.js +0 -17
- package/demo/app/user/event_api/manage/event.json +0 -10
- package/demo/app/user/event_api/manage/main.js +0 -17
- package/demo/app/user/event_api/web/event.json +0 -20
- package/demo/app/user/event_api/web/main.js +0 -39
- package/demo/app/user/plugin/main/api_user_client/account/api.json +0 -41
- package/demo/app/user/plugin/main/api_user_client/account/index.js +0 -54
- package/demo/app/user/plugin/main/api_user_client/account/param.json +0 -130
- package/demo/app/user/plugin/main/api_user_client/account/sql.json +0 -70
- package/demo/app/user/plugin/main/api_user_client/address_login/api.json +0 -27
- package/demo/app/user/plugin/main/api_user_client/address_login/index.js +0 -35
- package/demo/app/user/plugin/main/api_user_client/address_login/param.json +0 -130
- package/demo/app/user/plugin/main/api_user_client/base/api.json +0 -27
- package/demo/app/user/plugin/main/api_user_client/base/index.js +0 -92
- package/demo/app/user/plugin/main/api_user_client/base/param.json +0 -130
- package/demo/app/user/plugin/main/api_user_client/count/api.json +0 -27
- package/demo/app/user/plugin/main/api_user_client/count/chongzhi.js +0 -103
- package/demo/app/user/plugin/main/api_user_client/count/index.js +0 -24
- package/demo/app/user/plugin/main/api_user_client/count/param.json +0 -40
- package/demo/app/user/plugin/main/api_user_client/count/sql.json +0 -70
- package/demo/app/user/plugin/main/api_user_client/data_count/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/data_count/index.js +0 -61
- package/demo/app/user/plugin/main/api_user_client/email_code/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/email_code/email_code.js +0 -300
- package/demo/app/user/plugin/main/api_user_client/email_code/index.js +0 -18
- package/demo/app/user/plugin/main/api_user_client/email_code/param.json +0 -56
- package/demo/app/user/plugin/main/api_user_client/forgot/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/forgot/index.js +0 -36
- package/demo/app/user/plugin/main/api_user_client/forgot/param.json +0 -57
- package/demo/app/user/plugin/main/api_user_client/ip/api.json +0 -39
- package/demo/app/user/plugin/main/api_user_client/ip/index.js +0 -43
- package/demo/app/user/plugin/main/api_user_client/ip/param.json +0 -130
- package/demo/app/user/plugin/main/api_user_client/ip/sql.json +0 -70
- package/demo/app/user/plugin/main/api_user_client/message/api.json +0 -29
- package/demo/app/user/plugin/main/api_user_client/message/index.js +0 -19
- package/demo/app/user/plugin/main/api_user_client/message/param.json +0 -36
- package/demo/app/user/plugin/main/api_user_client/message/sql.json +0 -21
- package/demo/app/user/plugin/main/api_user_client/oauth/WXBizDataCrypt.js +0 -33
- package/demo/app/user/plugin/main/api_user_client/oauth/api.json +0 -31
- package/demo/app/user/plugin/main/api_user_client/oauth/index.js +0 -16
- package/demo/app/user/plugin/main/api_user_client/oauth/oauth.js +0 -315
- package/demo/app/user/plugin/main/api_user_client/oauth/oauth.json +0 -88
- package/demo/app/user/plugin/main/api_user_client/oauth/param.json +0 -111
- package/demo/app/user/plugin/main/api_user_client/password/api.json +0 -21
- package/demo/app/user/plugin/main/api_user_client/password/index.js +0 -64
- package/demo/app/user/plugin/main/api_user_client/password/param.json +0 -45
- package/demo/app/user/plugin/main/api_user_client/phone_code/aliyun.js +0 -230
- package/demo/app/user/plugin/main/api_user_client/phone_code/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/phone_code/index.js +0 -18
- package/demo/app/user/plugin/main/api_user_client/phone_code/param.json +0 -58
- package/demo/app/user/plugin/main/api_user_client/phone_code/phone_code.js +0 -297
- package/demo/app/user/plugin/main/api_user_client/realname/api.json +0 -21
- package/demo/app/user/plugin/main/api_user_client/realname/index.js +0 -45
- package/demo/app/user/plugin/main/api_user_client/realname/param.json +0 -74
- package/demo/app/user/plugin/main/api_user_client/servicer/api.json +0 -29
- package/demo/app/user/plugin/main/api_user_client/servicer/index.js +0 -19
- package/demo/app/user/plugin/main/api_user_client/servicer/param.json +0 -41
- package/demo/app/user/plugin/main/api_user_client/servicer/sql.json +0 -113
- package/demo/app/user/plugin/main/api_user_client/set_address/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/set_address/index.js +0 -98
- package/demo/app/user/plugin/main/api_user_client/set_address/param.json +0 -165
- package/demo/app/user/plugin/main/api_user_client/set_avatar/api.json +0 -35
- package/demo/app/user/plugin/main/api_user_client/set_avatar/index.js +0 -77
- package/demo/app/user/plugin/main/api_user_client/set_info/api.json +0 -35
- package/demo/app/user/plugin/main/api_user_client/set_info/index.js +0 -44
- package/demo/app/user/plugin/main/api_user_client/set_nickname/api.json +0 -35
- package/demo/app/user/plugin/main/api_user_client/set_nickname/index.js +0 -46
- package/demo/app/user/plugin/main/api_user_client/set_pay_password/api.json +0 -21
- package/demo/app/user/plugin/main/api_user_client/set_pay_password/index.js +0 -64
- package/demo/app/user/plugin/main/api_user_client/sign_address/api.json +0 -39
- package/demo/app/user/plugin/main/api_user_client/sign_address/index.js +0 -114
- package/demo/app/user/plugin/main/api_user_client/sign_address/param.json +0 -130
- package/demo/app/user/plugin/main/api_user_client/sign_address/sql.json +0 -70
- package/demo/app/user/plugin/main/api_user_client/sign_auto/api.json +0 -29
- package/demo/app/user/plugin/main/api_user_client/sign_auto/index.js +0 -141
- package/demo/app/user/plugin/main/api_user_client/sign_auto/param.json +0 -42
- package/demo/app/user/plugin/main/api_user_client/sign_in/api.json +0 -11
- package/demo/app/user/plugin/main/api_user_client/sign_in/index.js +0 -274
- package/demo/app/user/plugin/main/api_user_client/sign_in/param.json +0 -125
- package/demo/app/user/plugin/main/api_user_client/sign_in/state.js +0 -37
- package/demo/app/user/plugin/main/api_user_client/sign_out/api.json +0 -9
- package/demo/app/user/plugin/main/api_user_client/sign_out/index.js +0 -28
- package/demo/app/user/plugin/main/api_user_client/sign_up/api.json +0 -12
- package/demo/app/user/plugin/main/api_user_client/sign_up/index.js +0 -189
- package/demo/app/user/plugin/main/api_user_client/sign_up/param.json +0 -83
- package/demo/app/user/plugin/main/api_user_client/sign_up_in/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_client/sign_up_in/index.js +0 -137
- package/demo/app/user/plugin/main/api_user_client/sign_up_in/param.json +0 -33
- package/demo/app/user/plugin/main/api_user_client/state/api.json +0 -9
- package/demo/app/user/plugin/main/api_user_client/state/index.js +0 -19
- package/demo/app/user/plugin/main/api_user_client/token/api.json +0 -25
- package/demo/app/user/plugin/main/api_user_client/token/index.js +0 -20
- package/demo/app/user/plugin/main/api_user_client/token/param.json +0 -16
- package/demo/app/user/plugin/main/api_user_client/unsubscribe/api.json +0 -29
- package/demo/app/user/plugin/main/api_user_client/unsubscribe/index.js +0 -91
- package/demo/app/user/plugin/main/api_user_client/unsubscribe/param.json +0 -71
- package/demo/app/user/plugin/main/api_user_client/yun_avatar/api.json +0 -31
- package/demo/app/user/plugin/main/api_user_client/yun_avatar/index.js +0 -56
- package/demo/app/user/plugin/main/api_user_client/yun_avatar/param.json +0 -50
- package/demo/app/user/plugin/main/api_user_web/avatar/api.json +0 -28
- package/demo/app/user/plugin/main/api_user_web/avatar/index.js +0 -51
- package/demo/app/user/plugin/main/api_user_web/login/api.json +0 -37
- package/demo/app/user/plugin/main/api_user_web/login/index.js +0 -12
- package/demo/app/user/plugin/main/api_user_web/root/api.json +0 -38
- package/demo/app/user/plugin/main/api_user_web/root/index.js +0 -67
- package/demo/app/user/plugin/main/index.js +0 -144
- package/demo/app/user/plugin/main/plugin.json +0 -20
- package/demo/app/user/plugin/server/api_user_client/address/api.json +0 -16
- package/demo/app/user/plugin/server/api_user_client/address/index.js +0 -79
- package/demo/app/user/plugin/server/api_user_client/address/param.json +0 -288
- package/demo/app/user/plugin/server/api_user_client/address/sql.json +0 -56
- package/demo/app/user/plugin/server/api_user_client/count/api.json +0 -12
- package/demo/app/user/plugin/server/api_user_client/count/param.json +0 -646
- package/demo/app/user/plugin/server/api_user_client/count/sql.json +0 -82
- package/demo/app/user/plugin/server/api_user_client/info/api.json +0 -16
- package/demo/app/user/plugin/server/api_user_client/info/index.js +0 -42
- package/demo/app/user/plugin/server/api_user_client/info/param.json +0 -531
- package/demo/app/user/plugin/server/api_user_client/info/sql.json +0 -84
- package/demo/app/user/plugin/server/api_user_client/message/api.json +0 -12
- package/demo/app/user/plugin/server/api_user_client/message/param.json +0 -366
- package/demo/app/user/plugin/server/api_user_client/message/sql.json +0 -88
- package/demo/app/user/plugin/server/api_user_client/nation/api.json +0 -12
- package/demo/app/user/plugin/server/api_user_client/nation/param.json +0 -74
- package/demo/app/user/plugin/server/api_user_client/nation/sql.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/account/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/account/param.json +0 -620
- package/demo/app/user/plugin/server/api_user_manage/account/sql.json +0 -105
- package/demo/app/user/plugin/server/api_user_manage/address/api.json +0 -19
- package/demo/app/user/plugin/server/api_user_manage/address/index.js +0 -57
- package/demo/app/user/plugin/server/api_user_manage/address/param.json +0 -288
- package/demo/app/user/plugin/server/api_user_manage/address/sql.json +0 -44
- package/demo/app/user/plugin/server/api_user_manage/admin/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/admin/param.json +0 -147
- package/demo/app/user/plugin/server/api_user_manage/admin/sql.json +0 -24
- package/demo/app/user/plugin/server/api_user_manage/admin_log/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/admin_log/param.json +0 -226
- package/demo/app/user/plugin/server/api_user_manage/admin_log/sql.json +0 -32
- package/demo/app/user/plugin/server/api_user_manage/count/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/count/param.json +0 -646
- package/demo/app/user/plugin/server/api_user_manage/count/sql.json +0 -72
- package/demo/app/user/plugin/server/api_user_manage/group/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/group/param.json +0 -187
- package/demo/app/user/plugin/server/api_user_manage/group/sql.json +0 -39
- package/demo/app/user/plugin/server/api_user_manage/group_log/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/group_log/param.json +0 -235
- package/demo/app/user/plugin/server/api_user_manage/group_log/sql.json +0 -32
- package/demo/app/user/plugin/server/api_user_manage/info/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/info/param.json +0 -531
- package/demo/app/user/plugin/server/api_user_manage/info/sql.json +0 -71
- package/demo/app/user/plugin/server/api_user_manage/message/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/message/param.json +0 -366
- package/demo/app/user/plugin/server/api_user_manage/message/sql.json +0 -75
- package/demo/app/user/plugin/server/api_user_manage/nation/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/nation/param.json +0 -74
- package/demo/app/user/plugin/server/api_user_manage/nation/sql.json +0 -16
- package/demo/app/user/plugin/server/api_user_manage/state/api.json +0 -18
- package/demo/app/user/plugin/server/api_user_manage/state/param.json +0 -98
- package/demo/app/user/plugin/server/api_user_manage/state/sql.json +0 -29
- package/demo/app/user/plugin/server/db/account.db.json +0 -460
- package/demo/app/user/plugin/server/db/address.db.json +0 -262
- package/demo/app/user/plugin/server/db/admin.db.json +0 -117
- package/demo/app/user/plugin/server/db/admin_log.db.json +0 -189
- package/demo/app/user/plugin/server/db/count.db.json +0 -298
- package/demo/app/user/plugin/server/db/group.db.json +0 -117
- package/demo/app/user/plugin/server/db/group_log.db.json +0 -190
- package/demo/app/user/plugin/server/db/info.db.json +0 -496
- package/demo/app/user/plugin/server/db/message.db.json +0 -262
- package/demo/app/user/plugin/server/db/nation.db.json +0 -46
- package/demo/app/user/plugin/server/db/state.db.json +0 -64
- package/demo/config/development.json +0 -109
- package/demo/config/local.json +0 -111
- package/demo/config/lock.cache +0 -5
- package/demo/config/test.json +0 -109
- package/demo/config/tpl.json +0 -107
- package/demo/index.js +0 -30
- package/demo/static/file/image/1.png +0 -0
- /package/core/com/{api → rpc}/rpc.js +0 -0
package/core/com/static/drive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const Item = require('mm_machine').Item;
|
|
2
|
-
|
|
3
1
|
const fs = require("fs");
|
|
4
2
|
const send = require('koa-send');
|
|
3
|
+
const conf = require('mm_config');
|
|
4
|
+
const Item = require('mm_machine').Item;
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Plugin插件驱动类
|
|
@@ -15,10 +15,11 @@ class Drive extends Item {
|
|
|
15
15
|
* @param {Object} config 配置
|
|
16
16
|
* @constructor
|
|
17
17
|
*/
|
|
18
|
-
constructor(dir
|
|
18
|
+
constructor(dir) {
|
|
19
19
|
super(dir, __dirname);
|
|
20
20
|
this.default_file = "./static.json";
|
|
21
|
-
|
|
21
|
+
// 更新并重载
|
|
22
|
+
this.mode = 3;
|
|
22
23
|
/* 通用项 */
|
|
23
24
|
// 配置参数
|
|
24
25
|
this.config = {
|
|
@@ -57,29 +58,6 @@ class Drive extends Item {
|
|
|
57
58
|
// 是否将ES6转换AMD
|
|
58
59
|
"convert_amd": true
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
this.init(config);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
Drive.prototype.init = function(config) {
|
|
66
|
-
if (config) {
|
|
67
|
-
$.push(this.config, config);
|
|
68
|
-
this.dir = config.root.fullname();
|
|
69
|
-
var f = this.default_file.fullname(this.dir);
|
|
70
|
-
if (f.hasFile()) {
|
|
71
|
-
var obj = f.loadJson();
|
|
72
|
-
if (obj) {
|
|
73
|
-
this.loadObj(obj);
|
|
74
|
-
} else {
|
|
75
|
-
var text = "./config.tpl.json".loadText(__dirname);
|
|
76
|
-
text = text.replace('"path": "/"', '"path": "' + config.path + '"');
|
|
77
|
-
f.saveText(text);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (this.config.convert_amd) {
|
|
82
|
-
this.run_mode(true);
|
|
83
61
|
}
|
|
84
62
|
}
|
|
85
63
|
|
|
@@ -89,36 +67,17 @@ Drive.prototype.init = function(config) {
|
|
|
89
67
|
Drive.prototype.send = send;
|
|
90
68
|
|
|
91
69
|
/**
|
|
92
|
-
*
|
|
93
|
-
* @param {Object}
|
|
70
|
+
* 加载配置对象前
|
|
71
|
+
* @param {Object} config 配置对象
|
|
94
72
|
*/
|
|
95
|
-
Drive.prototype.
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
$.push(this.config, obj, true);
|
|
100
|
-
var cg = this.config;
|
|
101
|
-
if (cg.convert_amd) {
|
|
102
|
-
this.run_mode(true);
|
|
103
|
-
}
|
|
104
|
-
var f = cg.func_file;
|
|
105
|
-
if (f) {
|
|
106
|
-
var file = f.fullname(this.dir);
|
|
107
|
-
if (file.hasFile()) {
|
|
108
|
-
var cs = require(file);
|
|
109
|
-
if (cs) {
|
|
110
|
-
var name = cg.func_name;
|
|
111
|
-
if (name) {
|
|
112
|
-
this.main = cs[name];
|
|
113
|
-
} else {
|
|
114
|
-
$.push(this, cs);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
} else {
|
|
118
|
-
var fl = __dirname + "/script.js";
|
|
119
|
-
fl.copyFile(file);
|
|
73
|
+
Drive.prototype.set_config = function(config) {
|
|
74
|
+
if (config) {
|
|
75
|
+
if (config.maxAge) {
|
|
76
|
+
config.maxAge *= 1000;
|
|
120
77
|
}
|
|
121
78
|
}
|
|
79
|
+
this.config = conf(Object.assign({}, this.config, config || {}), this.filename);
|
|
80
|
+
this.run_mode(this.config.convert_amd);
|
|
122
81
|
};
|
|
123
82
|
|
|
124
83
|
/**
|
package/core/com/static/index.js
CHANGED
|
@@ -21,6 +21,9 @@ class Static extends Index {
|
|
|
21
21
|
constructor(scope, title) {
|
|
22
22
|
super(scope, __dirname);
|
|
23
23
|
this.Drive = Drive;
|
|
24
|
+
|
|
25
|
+
// 更新并重载
|
|
26
|
+
this.mode = 3;
|
|
24
27
|
this.type = "static";
|
|
25
28
|
this.title = title;
|
|
26
29
|
var $this = this;
|
|
@@ -87,7 +90,7 @@ class Static extends Index {
|
|
|
87
90
|
* @param {Object} dir 目录
|
|
88
91
|
* @return {Drive} 静态文件驱动类
|
|
89
92
|
*/
|
|
90
|
-
Static.prototype.getObj = function(dir) {
|
|
93
|
+
Static.prototype.getObj = async function(dir) {
|
|
91
94
|
var d = join(dir).replace(process.cwd() + $.slash, '/');
|
|
92
95
|
var app = d.between(join('app/'), join('/'));
|
|
93
96
|
var plugin = d.between(join('/plugin/'), join('/'));
|
|
@@ -101,14 +104,18 @@ Static.prototype.getObj = function(dir) {
|
|
|
101
104
|
root: d.substring(0, d.length - 1).fullname(),
|
|
102
105
|
path: path
|
|
103
106
|
};
|
|
104
|
-
|
|
107
|
+
var file = ("./" + this.type + ".json").fullname(obj.root);
|
|
108
|
+
var drive = new Drive(dir, obj);
|
|
109
|
+
await drive.exec('load_config', file);
|
|
110
|
+
await drive.exec('set_config', obj);
|
|
111
|
+
return drive
|
|
105
112
|
};
|
|
106
113
|
|
|
107
114
|
/**
|
|
108
115
|
* 加载接口
|
|
109
116
|
* @param {String} path 加载的路径
|
|
110
117
|
*/
|
|
111
|
-
Static.prototype.
|
|
118
|
+
Static.prototype.update_config_all = async function(path) {
|
|
112
119
|
if (!path) {
|
|
113
120
|
path = $.runPath + 'app' + $.slash;
|
|
114
121
|
}
|
|
@@ -117,10 +124,11 @@ Static.prototype.load = function(path) {
|
|
|
117
124
|
var list_scope = $.dir.getAll(path, search_dir);
|
|
118
125
|
// 遍历目录路径
|
|
119
126
|
var _this = this;
|
|
120
|
-
list_scope.
|
|
121
|
-
var
|
|
127
|
+
for (var i = 0; i < list_scope.length; i++) {
|
|
128
|
+
var dir = list_scope[i];
|
|
129
|
+
var obj = await _this.getObj(dir);
|
|
122
130
|
_this.list.push(obj);
|
|
123
|
-
}
|
|
131
|
+
}
|
|
124
132
|
};
|
|
125
133
|
|
|
126
134
|
/**
|
package/core/com/task/index.js
CHANGED
|
@@ -31,7 +31,7 @@ Task.prototype.run = async function(name) {
|
|
|
31
31
|
for (var i = 0, o; o = lt[i++];) {
|
|
32
32
|
if (o.config.state === 1 && o.config.name === name) {
|
|
33
33
|
try {
|
|
34
|
-
o.run();
|
|
34
|
+
await o.run();
|
|
35
35
|
} catch (error) {
|
|
36
36
|
$.log.error("定时任务错误", o.name, error);
|
|
37
37
|
}
|
|
@@ -42,7 +42,7 @@ Task.prototype.run = async function(name) {
|
|
|
42
42
|
for (var i = 0, o; o = lt[i++];) {
|
|
43
43
|
if (o.config.state === 1) {
|
|
44
44
|
try {
|
|
45
|
-
o.run();
|
|
45
|
+
await o.run();
|
|
46
46
|
} catch (error) {
|
|
47
47
|
$.log.error("定时任务错误", o.name, error);
|
|
48
48
|
}
|
|
@@ -57,44 +57,22 @@ Task.prototype.run = async function(name) {
|
|
|
57
57
|
* @param {Object} cg 配置参数
|
|
58
58
|
* @param {String} file 配置文件
|
|
59
59
|
*/
|
|
60
|
-
Task.prototype.load_item = function(dir, cg, file) {
|
|
61
|
-
var drive = new this.Drive(dir);
|
|
62
|
-
drive.loadObj(cg);
|
|
63
|
-
drive.filename = file;
|
|
60
|
+
Task.prototype.load_item = async function(dir, cg, file) {
|
|
64
61
|
var _this = this;
|
|
62
|
+
var drive = new this.Drive(dir, this.dir_base.fullname());
|
|
63
|
+
drive.mode = this.mode;
|
|
64
|
+
if (cg) {
|
|
65
|
+
await drive.exec('load_config', file, cg.name);
|
|
66
|
+
await drive.exec('set_config', cg);
|
|
67
|
+
} else {
|
|
68
|
+
await drive.exec('load_config', file);
|
|
69
|
+
}
|
|
70
|
+
|
|
65
71
|
drive.admin = function() {
|
|
66
|
-
return
|
|
72
|
+
return _this;
|
|
67
73
|
};
|
|
68
74
|
this.list.push(drive);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 加载列表
|
|
73
|
-
* @param {Array} list 文件列表
|
|
74
|
-
*/
|
|
75
|
-
Task.prototype.load_list = function(list) {
|
|
76
|
-
var _this = this;
|
|
77
|
-
// 遍历文件路径
|
|
78
|
-
list.map(function(file) {
|
|
79
|
-
var dir = file.dirname();
|
|
80
|
-
// 载入文件
|
|
81
|
-
var obj = file.loadJson(dir);
|
|
82
|
-
if (obj) {
|
|
83
|
-
if (obj.constructor == Array) {
|
|
84
|
-
obj.map(function(o) {
|
|
85
|
-
// 实例化一个驱动
|
|
86
|
-
_this.load_item(dir, o, file);
|
|
87
|
-
});
|
|
88
|
-
} else {
|
|
89
|
-
_this.load_item(dir, obj, file);
|
|
90
|
-
}
|
|
91
|
-
} else {
|
|
92
|
-
var fl = _this.dir_base + "/config.tpl.json";
|
|
93
|
-
if (fl.hasFile()) {
|
|
94
|
-
fl.copyFile(file);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
});
|
|
75
|
+
return drive;
|
|
98
76
|
};
|
|
99
77
|
|
|
100
78
|
exports.Task = Task;
|
package/core/com/tpl/com.js
CHANGED
|
@@ -8,11 +8,11 @@ class Controller extends Base {
|
|
|
8
8
|
super();
|
|
9
9
|
|
|
10
10
|
// 检索的文件路径
|
|
11
|
-
this.path = "./
|
|
11
|
+
this.path = "./app/controller".fullname();
|
|
12
12
|
// 文件拓展名
|
|
13
13
|
this.extension = "controller.json";
|
|
14
14
|
// 文件存放目录
|
|
15
|
-
this.dir = "./
|
|
15
|
+
this.dir = "./app";
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
package/index.js
CHANGED
|
@@ -158,7 +158,7 @@ OS.prototype.init = function(config) {
|
|
|
158
158
|
*/
|
|
159
159
|
OS.prototype.initBase = function(cg) {
|
|
160
160
|
var middleware = $.middleware;
|
|
161
|
-
middleware.
|
|
161
|
+
middleware.update();
|
|
162
162
|
var mqtt, web;
|
|
163
163
|
if (cg.web && cg.web.state) {
|
|
164
164
|
web = new WEB(cg.web);
|
|
@@ -214,7 +214,6 @@ OS.prototype.initBase = function(cg) {
|
|
|
214
214
|
$.timer.run();
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
|
|
218
217
|
/**
|
|
219
218
|
* 运行主程序
|
|
220
219
|
* @param {String} state 状态
|
|
@@ -243,6 +242,7 @@ OS.prototype.main = async function(state) {
|
|
|
243
242
|
$.task.update().then(() => {
|
|
244
243
|
$.task.run();
|
|
245
244
|
});
|
|
245
|
+
tip += " task";
|
|
246
246
|
}
|
|
247
247
|
console.log(tip);
|
|
248
248
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_os",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
4
4
|
"description": "这是超级美眉服务端框架,用于快速构建应用程序。",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"mm_html": "^1.1.6",
|
|
43
43
|
"mm_koa_proxy": "^1.0.0",
|
|
44
44
|
"mm_logs": "^1.1.7",
|
|
45
|
-
"mm_machine": "^1.9.
|
|
45
|
+
"mm_machine": "^1.9.7",
|
|
46
46
|
"mm_mongodb": "^1.4.2",
|
|
47
47
|
"mm_mqtt": "^1.0.6",
|
|
48
48
|
"mm_mysql": "^1.9.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
package/demo/app/dev/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
package/demo/app/dev/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
## 开发者工具
|
package/demo/app/dev/app.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileOverview dev
|
|
3
|
-
* @author <a href="作者主页地址">插件作者</a>
|
|
4
|
-
* @version 1.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description 插件对象
|
|
9
|
-
*/
|
|
10
|
-
module.exports = {
|
|
11
|
-
/**
|
|
12
|
-
* @description 初始化
|
|
13
|
-
* @param {Object} option 配置参数
|
|
14
|
-
* @return {String} 成功返回null, 否则返回错误提示
|
|
15
|
-
*/
|
|
16
|
-
init(option) {
|
|
17
|
-
// 创建数据库管理器
|
|
18
|
-
var db = $.db_admin('sys');
|
|
19
|
-
db.update(__dirname);
|
|
20
|
-
var msg = null;
|
|
21
|
-
return msg;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @description 安装
|
|
26
|
-
* @param {Object} option 配置参数
|
|
27
|
-
* @return {String} 成功返回null,否则返回错误提示
|
|
28
|
-
*/
|
|
29
|
-
install(option) {
|
|
30
|
-
var msg = null;
|
|
31
|
-
return msg;
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @description 卸载
|
|
36
|
-
* @param {Object} option 配置参数
|
|
37
|
-
* @return {String} 成功返回null,否则返回错误提示
|
|
38
|
-
*/
|
|
39
|
-
uninstall(option) {
|
|
40
|
-
var msg = null;
|
|
41
|
-
return msg;
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @description 更新
|
|
46
|
-
* @param {Object} option 配置参数
|
|
47
|
-
* @return {String} 成功返回null, 否则返回错误提示
|
|
48
|
-
*/
|
|
49
|
-
update(option) {
|
|
50
|
-
var msg = null;
|
|
51
|
-
return msg;
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description 启动
|
|
56
|
-
* @param {Object} opiton 配置参数
|
|
57
|
-
* @return {String} 成功返回null,否则返回错误提示
|
|
58
|
-
*/
|
|
59
|
-
start(option) {
|
|
60
|
-
var msg = null;
|
|
61
|
-
return msg;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @description 暂停
|
|
66
|
-
* @param {Object} opiton 配置参数
|
|
67
|
-
* @return {String} 成功返回null,否则返回错误提示
|
|
68
|
-
*/
|
|
69
|
-
stop(option) {
|
|
70
|
-
var msg = null;
|
|
71
|
-
return msg;
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @description 结束
|
|
76
|
-
* @param {Object} opiton 配置参数
|
|
77
|
-
* @return {String} 成功返回null,否则返回错误提示
|
|
78
|
-
*/
|
|
79
|
-
end(option) {
|
|
80
|
-
var msg = null;
|
|
81
|
-
return msg;
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @description 插件
|
|
86
|
-
* @param {String} item 插件项
|
|
87
|
-
* @return {Object} 旗下插件和信息
|
|
88
|
-
*/
|
|
89
|
-
help(item) {
|
|
90
|
-
var tip = "";
|
|
91
|
-
switch (item) {
|
|
92
|
-
case "run":
|
|
93
|
-
break;
|
|
94
|
-
default:
|
|
95
|
-
break;
|
|
96
|
-
}
|
|
97
|
-
return tip;
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* @description 主程序
|
|
102
|
-
* @param {Object} param1 参数1
|
|
103
|
-
* @param {Object} param2 参数2
|
|
104
|
-
* @return {Object} 返回执行结果
|
|
105
|
-
*/
|
|
106
|
-
main(param1, param2) {
|
|
107
|
-
var ret = null;
|
|
108
|
-
return ret;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @description 指令(类似命令提示符)
|
|
113
|
-
* @param {String} content 指令内容
|
|
114
|
-
* @return {String} 执行结果
|
|
115
|
-
*/
|
|
116
|
-
cmd(content) {
|
|
117
|
-
var ret = "";
|
|
118
|
-
return ret;
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* @description API接口(用于其他插件调用该插件时)
|
|
123
|
-
* @param {Object} ctx HTTP上下文
|
|
124
|
-
* @param {Object} db 数据库管理器
|
|
125
|
-
* @return {Object} 执行结果
|
|
126
|
-
*/
|
|
127
|
-
api(ctx, db) {
|
|
128
|
-
var ret = "";
|
|
129
|
-
return ret;
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @description 聊天(通过聊天的方式驱动插件, 用于机器人开发)
|
|
134
|
-
* @param {String} from_user 发送消息人
|
|
135
|
-
* @param {String} to_user 接收消息人
|
|
136
|
-
* @param {String} content 内容
|
|
137
|
-
* @param {String} group 群组 如果是个人,群组为空
|
|
138
|
-
* @param {Number} type 群类型, 1永久会话/群、2临时会话/群
|
|
139
|
-
* @param {String} msg_type 消息类型, event事件型、message消息型。默认消息型
|
|
140
|
-
* @param {Object} 数据管理器
|
|
141
|
-
* @return {String} 回复内容
|
|
142
|
-
*/
|
|
143
|
-
async chat(from_user, to_user, group, content, type, msg_type, db) {
|
|
144
|
-
var ret = "";
|
|
145
|
-
return ret;
|
|
146
|
-
}
|
|
147
|
-
};
|
package/demo/app/dev/app.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dev",
|
|
3
|
-
"title": "开发工具",
|
|
4
|
-
"description": "该应用便于开发和管理自由人服务端,可管理“应用、插件、事件、接口、任务、数据库”等",
|
|
5
|
-
"version": "1.0",
|
|
6
|
-
"identifier": "dev",
|
|
7
|
-
"lang_path": "./lang/",
|
|
8
|
-
"icon": "/dev/img/logo.png",
|
|
9
|
-
"script": "./app.js",
|
|
10
|
-
"sort": 10,
|
|
11
|
-
"state": 1
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var api = $.api_admin('dev_client', '开发者客户端');
|
|
2
|
-
// 首次启动更新api接口;
|
|
3
|
-
api.update('dev/');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @description 接口主函数
|
|
7
|
-
* @param {Object} ctx HTTP上下文
|
|
8
|
-
* @param {Object} db 数据管理器,如: { next: async function{}, ret: {} }
|
|
9
|
-
* @return {Object} 执行结果
|
|
10
|
-
*/
|
|
11
|
-
async function main(ctx, db) {
|
|
12
|
-
// 在这定义要访问的数据库 (分布式开发时设置不同的数据库名)
|
|
13
|
-
$.push(db, $.sql.db(), true);
|
|
14
|
-
return api.run(ctx, db);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.main = main;
|