xcraft-core-utils 4.2.0 → 4.3.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.
Files changed (2) hide show
  1. package/lib/modules.js +13 -0
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -28,6 +28,8 @@ function applyOverloads(appDir, appId, variantId, app) {
28
28
  }
29
29
  }
30
30
 
31
+ exports.mergeOverloads = merge;
32
+
31
33
  exports.extractForEtc = (appDir, appId, variantId) => {
32
34
  const app = JSON.parse(
33
35
  fse.readFileSync(path.join(appDir, appId, 'app.json'))
@@ -167,6 +169,17 @@ exports.extractAllJs = (libDir, modules) => {
167
169
  const location = path.join(libDir, mod);
168
170
  const files = xFs
169
171
  .lsall(location, true)
172
+ .filter((file) => {
173
+ const relativePath = file.substring(location.length + 1);
174
+ const items = relativePath.split(path.sep);
175
+ if (items.includes('node_modules')) {
176
+ return false;
177
+ }
178
+ if (items[0] === 'test' || items[0] === 'species') {
179
+ return false;
180
+ }
181
+ return true;
182
+ })
170
183
  .filter((file) => /\.js$/.test(file));
171
184
  list = list.concat(files);
172
185
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xcraft-core-utils",
3
- "version": "4.2.0",
3
+ "version": "4.3.2",
4
4
  "description": "Xcraft utils",
5
5
  "main": "index.js",
6
6
  "engines": {