@aiot-toolkit/shared-utils
Advanced tools
Comparing version 2.0.2-beta.18 to 2.0.2-beta.19
@@ -101,3 +101,3 @@ "use strict"; | ||
const { message, instancePath, keyword } = item; | ||
const errorMessage = `${instancePath ? `${instancePath}: ` : ''} ${message}`; | ||
const errorMessage = `${instancePath ? `${instancePath}: ` : ''}${message}`; | ||
if (keyword === 'required') { | ||
@@ -104,0 +104,0 @@ return new TypeError(errorMessage); |
@@ -19,2 +19,3 @@ "use strict"; | ||
const fswin_1 = __importDefault(require("fswin")); | ||
const minimatch_1 = require("minimatch"); | ||
/** | ||
@@ -55,3 +56,3 @@ * FileUtil | ||
case 'string': | ||
return matchType === value; | ||
return (0, minimatch_1.minimatch)(value, matchType, { dot: true }); | ||
case 'object': | ||
@@ -83,5 +84,8 @@ if (matchType instanceof RegExp) { | ||
const itemPath = path_1.default.join(dir, item.name); | ||
if (item.isDirectory() && item) { | ||
const children = this.readAlldirSync(itemPath, includes, excludes); | ||
result.push(...children); | ||
if (item.isDirectory()) { | ||
// 当目录不被排除时,递归获取子目录 | ||
if (this.include(itemPath, undefined, excludes)) { | ||
const children = this.readAlldirSync(itemPath, includes, excludes); | ||
result.push(...children); | ||
} | ||
} | ||
@@ -88,0 +92,0 @@ else { |
{ | ||
"name": "@aiot-toolkit/shared-utils", | ||
"version": "2.0.2-beta.18", | ||
"version": "2.0.2-beta.19", | ||
"description": "The common method functions of the aiot-toolkit.", | ||
@@ -27,4 +27,5 @@ "homepage": "", | ||
"koa": "^2.15.3", | ||
"koa-router": "^12.0.1", | ||
"koa-router": "^13.0.1", | ||
"koa-static": "^5.0.0", | ||
"minimatch": "^10.0.1", | ||
"portfinder": "^1.0.32", | ||
@@ -41,5 +42,6 @@ "qrcode": "^1.5.4", | ||
"@types/koa-static": "^4.0.4", | ||
"@types/minimatch": "^5.1.2", | ||
"@types/qrcode": "^1.5.5" | ||
}, | ||
"gitHead": "e39f0ad4fe3bfe8e733499742c5a39ab80fa2cd0" | ||
"gitHead": "7c6ed600fe84ee9de9b00c6e95dfabf3bfb3ad65" | ||
} |
@@ -0,0 +0,0 @@ # `shared-utils` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42320
1290
15
7
+ Addedminimatch@^10.0.1
+ Addedkoa-router@13.0.1(transitive)
+ Addedminimatch@10.0.1(transitive)
+ Addedpath-to-regexp@8.2.0(transitive)
- Removedkoa-router@12.0.1(transitive)
- Removedmethods@1.1.2(transitive)
- Removedpath-to-regexp@6.3.0(transitive)
Updatedkoa-router@^13.0.1