mm_module 1.0.0 → 1.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/index.js +3 -27
- package/package.json +6 -2
package/index.js
CHANGED
|
@@ -1,32 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 模块管理入口
|
|
3
|
-
* 基于
|
|
4
|
-
* 并按模块声明的 group 分层装载、对模块声明做静态体检
|
|
3
|
+
* 基于 mm_corejs 的 Manager 基类,对外只暴露 ModuleManager 一个门面类
|
|
5
4
|
*/
|
|
6
5
|
|
|
7
|
-
const
|
|
8
|
-
const { readSpec, checkSpec, matchSpec, groupSpecs } = require('./lib/spec');
|
|
9
|
-
const { CatalogError } = require('./lib/catalog_error');
|
|
10
|
-
const { LocalCatalog } = require('./lib/local_catalog');
|
|
11
|
-
const { RemoteCatalog } = require('./lib/remote_catalog');
|
|
12
|
-
const { loadAll } = require('./lib/load_all');
|
|
13
|
-
const { Doctor, doctor } = require('./lib/doctor');
|
|
14
|
-
const { Catalog } = require('./lib/manager');
|
|
6
|
+
const ModuleManager = require('./lib/module_manager');
|
|
15
7
|
|
|
16
|
-
module.exports = {
|
|
17
|
-
KEYWORD,
|
|
18
|
-
GROUPS,
|
|
19
|
-
UNKNOWN_GROUP,
|
|
20
|
-
groupOrder,
|
|
21
|
-
readSpec,
|
|
22
|
-
checkSpec,
|
|
23
|
-
matchSpec,
|
|
24
|
-
groupSpecs,
|
|
25
|
-
CatalogError,
|
|
26
|
-
LocalCatalog,
|
|
27
|
-
RemoteCatalog,
|
|
28
|
-
loadAll,
|
|
29
|
-
Doctor,
|
|
30
|
-
doctor,
|
|
31
|
-
Catalog
|
|
32
|
-
};
|
|
8
|
+
module.exports = { ModuleManager };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "内核模块管理框架件:基于 npm 实现模块的搜索、安装、卸载与清单编排,并按声明的层级分层装载与声明体检(不注册能力)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"test": "jest --passWithNoTests --maxWorkers=1 2>&1",
|
|
16
16
|
"lint": "eslint src/ test/ index.js --fix",
|
|
17
17
|
"check": "eslint src/ test/ index.js",
|
|
18
|
-
"format": "prettier --write \"src/**/*.js\" \"test/**/*.js\" \"*.js\" \"*.json\""
|
|
18
|
+
"format": "prettier --write \"src/**/*.js\" \"test/**/*.js\" \"*.js\" \"*.json\"",
|
|
19
|
+
"demo": "node example/demo.js"
|
|
19
20
|
},
|
|
20
21
|
"keywords": [
|
|
21
22
|
"mm_mod",
|
|
@@ -30,6 +31,9 @@
|
|
|
30
31
|
"engines": {
|
|
31
32
|
"node": ">=18"
|
|
32
33
|
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"mm_corejs": "file:../mm_corejs"
|
|
36
|
+
},
|
|
33
37
|
"devDependencies": {
|
|
34
38
|
"@eslint/js": "^10.0.1",
|
|
35
39
|
"eslint": "^10.9.1",
|