adding dist

This commit is contained in:
Federico Builes
2022-09-19 17:34:53 +02:00
parent 1ef21ab130
commit aeb9ff5438
2 changed files with 23 additions and 4 deletions
Generated Vendored
+22 -3
View File
@@ -365,6 +365,7 @@ exports.ConfigurationOptionsSchema = z
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
allow_licenses: z.array(z.string()).default([]),
deny_licenses: z.array(z.string()).default([]),
config_file: z.string().optional().default('false'),
base_ref: z.string(),
head_ref: z.string()
})
@@ -14923,19 +14924,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.readConfigFile = exports.readConfig = exports.CONFIG_FILEPATH = void 0;
exports.readConfigFile = exports.readInlineConfig = exports.readConfig = exports.CONFIG_FILEPATH = void 0;
const fs = __importStar(__nccwpck_require__(7147));
const path_1 = __importDefault(__nccwpck_require__(1017));
const yaml_1 = __importDefault(__nccwpck_require__(4083));
const core = __importStar(__nccwpck_require__(2186));
const z = __importStar(__nccwpck_require__(3301));
const schemas_1 = __nccwpck_require__(1129);
exports.CONFIG_FILEPATH = './.github/dependency-review.yml';
exports.CONFIG_FILEPATH = './.github/dependency-review-config.yml';
function getOptionalInput(name) {
const value = core.getInput(name);
return value.length > 0 ? value : undefined;
}
function readConfig() {
const hasExternalConfig = getOptionalInput('config-file');
if (hasExternalConfig !== undefined) {
return readConfigFile(exports.CONFIG_FILEPATH);
}
else {
return readInlineConfig();
}
}
exports.readConfig = readConfig;
function readInlineConfig() {
const fail_on_severity = z
.enum(schemas_1.SEVERITIES)
.default('low')
@@ -14955,7 +14966,7 @@ function readConfig() {
head_ref
};
}
exports.readConfig = readConfig;
exports.readInlineConfig = readInlineConfig;
function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
let data;
try {
@@ -14965,6 +14976,13 @@ function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
throw error;
}
const values = yaml_1.default.parse(data);
// get rid of the ugly dashes from the actions conventions
for (const key of Object.keys(values)) {
if (key.includes('-')) {
values[key.replace(/-/g, '_')] = values[key];
delete values[key];
}
}
return values;
}
exports.readConfigFile = readConfigFile;
@@ -15067,6 +15085,7 @@ exports.ConfigurationOptionsSchema = z
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
allow_licenses: z.array(z.string()).default([]),
deny_licenses: z.array(z.string()).default([]),
config_file: z.string().optional().default('false'),
base_ref: z.string(),
head_ref: z.string()
})
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long