@cabloy/module-glob 5.0.3 → 5.0.4
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/LICENSE.en-US +3 -0
- package/LICENSE.zh-CN +3 -0
- package/dist/index.js +12 -4
- package/package.json +2 -2
package/LICENSE.en-US
ADDED
package/LICENSE.zh-CN
ADDED
package/dist/index.js
CHANGED
|
@@ -106,7 +106,15 @@ async function __loadPackage(modules) {
|
|
|
106
106
|
const modulesPackage = await Promise.all(promises);
|
|
107
107
|
for (let i = 0; i < modulesPackage.length; i++) {
|
|
108
108
|
const moduleName = modulesArray[i];
|
|
109
|
-
|
|
109
|
+
const module = modules[moduleName];
|
|
110
|
+
module.package = JSON.parse(modulesPackage[i].toString());
|
|
111
|
+
const capabilities = module.package.cabloyModule?.capabilities;
|
|
112
|
+
if (capabilities?.icon)
|
|
113
|
+
module.info.icon = capabilities?.icon;
|
|
114
|
+
if (capabilities?.monkey)
|
|
115
|
+
module.info.monkey = capabilities?.monkey;
|
|
116
|
+
if (capabilities?.sync)
|
|
117
|
+
module.info.sync = capabilities?.sync;
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
function __orderModules(context, modules) {
|
|
@@ -139,7 +147,7 @@ function __pushModule(context, modules, moduleRelativeName) {
|
|
|
139
147
|
}
|
|
140
148
|
// push this
|
|
141
149
|
context.modules[moduleRelativeName] = module;
|
|
142
|
-
if (module.package && module.package.
|
|
150
|
+
if (module.package && module.package.cabloyModule && module.package.cabloyModule.last === true) {
|
|
143
151
|
context.modulesLast.push(module);
|
|
144
152
|
}
|
|
145
153
|
else {
|
|
@@ -150,10 +158,10 @@ function __pushModule(context, modules, moduleRelativeName) {
|
|
|
150
158
|
function __orderDependencies(context, modules, module, moduleRelativeName) {
|
|
151
159
|
if (context.options.disableCheckDependencies)
|
|
152
160
|
return true;
|
|
153
|
-
if (!module.package.
|
|
161
|
+
if (!module.package.cabloyModule || !module.package.cabloyModule.dependencies)
|
|
154
162
|
return true;
|
|
155
163
|
let enabled = true;
|
|
156
|
-
const dependencies = module.package.
|
|
164
|
+
const dependencies = module.package.cabloyModule.dependencies;
|
|
157
165
|
for (const key in dependencies) {
|
|
158
166
|
const subModule = modules[key];
|
|
159
167
|
if (!subModule) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabloy/module-glob",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "cabloy module-glob",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"boxen": "^4.2.0",
|
|
33
33
|
"egg-born-utils": "^1.1.9",
|
|
34
|
-
"@cabloy/module-info": "^1.0.
|
|
34
|
+
"@cabloy/module-info": "^1.0.12"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"lint": "eslint ."
|