@secretlint/config-validator
Advanced tools
Comparing version 3.3.0 to 3.3.1-next.19
@@ -14,3 +14,3 @@ "use strict"; | ||
} | ||
const parsedResult = typescript_json_validator_1.parse([tsFilePath], tsConfig); | ||
const parsedResult = (0, typescript_json_validator_1.parse)([tsFilePath], tsConfig); | ||
/** | ||
@@ -22,3 +22,3 @@ * Note: isSecretLintConfigDescriptorRule is union type | ||
const schema = parsedResult.getType(name); | ||
const validation = typescript_json_validator_1.printSingleTypeValidator(name, true, schema, "@secretlint/types", tsConfig, { | ||
const validation = (0, typescript_json_validator_1.printSingleTypeValidator)(name, true, schema, "@secretlint/types", tsConfig, { | ||
allErrors: true, | ||
@@ -25,0 +25,0 @@ coerceTypes: "array", |
@@ -32,3 +32,3 @@ "use strict"; | ||
} | ||
SecretLintConfigDescriptor_validation_1.default(value); | ||
(0, SecretLintConfigDescriptor_validation_1.default)(value); | ||
for (const ruleOrPreset of value.rules) { | ||
@@ -39,6 +39,8 @@ // validate as preset | ||
try { | ||
SecretLintConfigDescriptorRulePreset_validation_1.default(rulePreset); | ||
(0, SecretLintConfigDescriptorRulePreset_validation_1.default)(rulePreset); | ||
} | ||
catch (error) { | ||
const errorMessage = error.message.replace(/SecretLintConfigDescriptorRulePreset/g, ruleOrPreset.id); | ||
const errorMessage = error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptorRulePreset/g, ruleOrPreset.id) | ||
: String(error); | ||
return { | ||
@@ -53,6 +55,8 @@ ok: false, | ||
try { | ||
SecretLintConfigDescriptorRule_validation_1.default(rule); | ||
(0, SecretLintConfigDescriptorRule_validation_1.default)(rule); | ||
} | ||
catch (error) { | ||
const errorMessage = error.message.replace(/SecretLintConfigDescriptorRule/g, ruleOrPreset.id); | ||
const errorMessage = error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptorRule/g, ruleOrPreset.id) | ||
: String(error); | ||
return { | ||
@@ -71,3 +75,5 @@ ok: false, | ||
// SecretLintConfigDescriptor -> secretlintrc | ||
const errorMessage = error.message.replace(/SecretLintConfigDescriptor/g, "secretlintrc"); | ||
const errorMessage = error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptor/g, "secretlintrc") | ||
: String(error); | ||
return { | ||
@@ -109,3 +115,3 @@ ok: false, | ||
ok: false, | ||
error: error, | ||
error: error instanceof Error ? error : new Error(String(error)), | ||
}; | ||
@@ -112,0 +118,0 @@ } |
@@ -285,3 +285,3 @@ "use strict"; | ||
function validate(value) { | ||
if (exports.isSecretLintConfigDescriptor(value)) { | ||
if ((0, exports.isSecretLintConfigDescriptor)(value)) { | ||
return value; | ||
@@ -292,3 +292,3 @@ } | ||
'\n\n' + | ||
util_1.inspect(value)); | ||
(0, util_1.inspect)(value)); | ||
} | ||
@@ -295,0 +295,0 @@ } |
@@ -268,3 +268,3 @@ "use strict"; | ||
function validate(value) { | ||
if (exports.isSecretLintConfigDescriptorRule(value)) { | ||
if ((0, exports.isSecretLintConfigDescriptorRule)(value)) { | ||
return value; | ||
@@ -275,3 +275,3 @@ } | ||
'\n\n' + | ||
util_1.inspect(value)); | ||
(0, util_1.inspect)(value)); | ||
} | ||
@@ -278,0 +278,0 @@ } |
@@ -343,3 +343,3 @@ "use strict"; | ||
function validate(value) { | ||
if (exports.isSecretLintConfigDescriptorRulePreset(value)) { | ||
if ((0, exports.isSecretLintConfigDescriptorRulePreset)(value)) { | ||
return value; | ||
@@ -350,3 +350,3 @@ } | ||
'\n\n' + | ||
util_1.inspect(value)); | ||
(0, util_1.inspect)(value)); | ||
} | ||
@@ -353,0 +353,0 @@ } |
{ | ||
"name": "@secretlint/config-validator", | ||
"version": "3.3.0", | ||
"version": "3.3.1-next.19+2c93303", | ||
"description": ".secretlintrc config validation library", | ||
@@ -19,7 +19,2 @@ "keywords": [ | ||
"author": "azu", | ||
"files": [ | ||
"bin/", | ||
"lib/", | ||
"src/" | ||
], | ||
"main": "lib/index.js", | ||
@@ -31,2 +26,7 @@ "types": "lib/index.d.ts", | ||
}, | ||
"files": [ | ||
"bin/", | ||
"lib/", | ||
"src/" | ||
], | ||
"scripts": { | ||
@@ -50,8 +50,8 @@ "create-validation": "ts-node src/create-validation.ts", | ||
"dependencies": { | ||
"@secretlint/types": "^3.3.0", | ||
"@secretlint/types": "^3.3.1-next.19+2c93303", | ||
"ajv": "^6.11.0" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.41", | ||
"@types/mocha": "^9.0.0", | ||
"@types/node": "^16.9.1", | ||
"cross-env": "^7.0.3", | ||
@@ -66,6 +66,9 @@ "mocha": "^9.0.1", | ||
}, | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "f6ee7794184c8cfb89c0bcd87e11e58d99301b25" | ||
"gitHead": "2c93303d1fd60f10601af494489dc55eeb5669a8" | ||
} |
@@ -36,6 +36,6 @@ import SecretLintConfigDescriptorValidate from "./SecretLintConfigDescriptor-validation"; | ||
} catch (error) { | ||
const errorMessage = error.message.replace( | ||
/SecretLintConfigDescriptorRulePreset/g, | ||
ruleOrPreset.id | ||
); | ||
const errorMessage = | ||
error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptorRulePreset/g, ruleOrPreset.id) | ||
: String(error); | ||
return { | ||
@@ -51,3 +51,6 @@ ok: false, | ||
} catch (error) { | ||
const errorMessage = error.message.replace(/SecretLintConfigDescriptorRule/g, ruleOrPreset.id); | ||
const errorMessage = | ||
error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptorRule/g, ruleOrPreset.id) | ||
: String(error); | ||
return { | ||
@@ -65,3 +68,6 @@ ok: false, | ||
// SecretLintConfigDescriptor -> secretlintrc | ||
const errorMessage = error.message.replace(/SecretLintConfigDescriptor/g, "secretlintrc"); | ||
const errorMessage = | ||
error instanceof Error | ||
? error.message.replace(/SecretLintConfigDescriptor/g, "secretlintrc") | ||
: String(error); | ||
return { | ||
@@ -102,5 +108,5 @@ ok: false, | ||
ok: false, | ||
error: error, | ||
error: error instanceof Error ? error : new Error(String(error)), | ||
}; | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
117294
2884
2
1
+ Added@secretlint/types@3.3.1-next.19(transitive)
- Removed@secretlint/types@3.3.0(transitive)