@cabloy/module-glob 5.1.10 → 5.1.12

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/dist/index.js +19 -1
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -112,6 +112,11 @@ async function __loadPackage(context, modules) {
112
112
  const moduleNode = getPackageModuleNode(context.options.projectMode);
113
113
  const capabilities = module.package[moduleNode]?.capabilities;
114
114
  module.info.capabilities = capabilities;
115
+ module.info.onionsMeta = {
116
+ onions: module.package[moduleNode]?.onions,
117
+ metas: module.package[moduleNode]?.metas,
118
+ onionsConfig: module.package[moduleNode]?.onionsConfig,
119
+ };
115
120
  }
116
121
  }
117
122
  function __orderModules(context, modules) {
@@ -390,7 +395,7 @@ function __checkSuites(context, suites) {
390
395
  for (const key in suites) {
391
396
  const suite = suites[key];
392
397
  // check if disable
393
- if (!context.disabledSuites[key]) {
398
+ if (_checkSuiteValid(context, suites, key)) {
394
399
  context.suites[key] = suite;
395
400
  }
396
401
  else {
@@ -401,4 +406,17 @@ function __checkSuites(context, suites) {
401
406
  }
402
407
  }
403
408
  }
409
+ function _checkSuiteValid(context, suites, suiteRelativeName) {
410
+ // suite
411
+ const suite = suites[suiteRelativeName];
412
+ // check if disable
413
+ if (context.disabledSuites[suiteRelativeName])
414
+ return false;
415
+ // check meta
416
+ const capabilities = suite.package.zovaModule?.capabilities ?? suite.package.vonaModule?.capabilities;
417
+ if (context.meta && capabilities && !(0, utils_1.checkMeta)(capabilities.meta, context.meta))
418
+ return false;
419
+ // ok
420
+ return true;
421
+ }
404
422
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cabloy/module-glob",
3
- "version": "5.1.10",
3
+ "version": "5.1.12",
4
4
  "description": "cabloy module-glob",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,8 +32,8 @@
32
32
  "boxen": "^4.2.0",
33
33
  "chalk": "^3.0.0",
34
34
  "egg-born-utils": "^1.2.0",
35
- "@cabloy/module-info": "^1.2.5",
36
- "@cabloy/utils": "^1.0.2"
35
+ "@cabloy/module-info": "^1.2.7",
36
+ "@cabloy/utils": "^1.0.3"
37
37
  },
38
38
  "gitHead": "2d40c063c115b230fdbc89f5a78b4412ebd0dfc9",
39
39
  "scripts": {