adding dist
This commit is contained in:
+22
-3
@@ -365,6 +365,7 @@ exports.ConfigurationOptionsSchema = z
|
|||||||
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
|
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
|
||||||
allow_licenses: z.array(z.string()).default([]),
|
allow_licenses: z.array(z.string()).default([]),
|
||||||
deny_licenses: z.array(z.string()).default([]),
|
deny_licenses: z.array(z.string()).default([]),
|
||||||
|
config_file: z.string().optional().default('false'),
|
||||||
base_ref: z.string(),
|
base_ref: z.string(),
|
||||||
head_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 };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
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 fs = __importStar(__nccwpck_require__(7147));
|
||||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
const yaml_1 = __importDefault(__nccwpck_require__(4083));
|
const yaml_1 = __importDefault(__nccwpck_require__(4083));
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const z = __importStar(__nccwpck_require__(3301));
|
const z = __importStar(__nccwpck_require__(3301));
|
||||||
const schemas_1 = __nccwpck_require__(1129);
|
const schemas_1 = __nccwpck_require__(1129);
|
||||||
exports.CONFIG_FILEPATH = './.github/dependency-review.yml';
|
exports.CONFIG_FILEPATH = './.github/dependency-review-config.yml';
|
||||||
function getOptionalInput(name) {
|
function getOptionalInput(name) {
|
||||||
const value = core.getInput(name);
|
const value = core.getInput(name);
|
||||||
return value.length > 0 ? value : undefined;
|
return value.length > 0 ? value : undefined;
|
||||||
}
|
}
|
||||||
function readConfig() {
|
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
|
const fail_on_severity = z
|
||||||
.enum(schemas_1.SEVERITIES)
|
.enum(schemas_1.SEVERITIES)
|
||||||
.default('low')
|
.default('low')
|
||||||
@@ -14955,7 +14966,7 @@ function readConfig() {
|
|||||||
head_ref
|
head_ref
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
exports.readConfig = readConfig;
|
exports.readInlineConfig = readInlineConfig;
|
||||||
function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
|
function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
|
||||||
let data;
|
let data;
|
||||||
try {
|
try {
|
||||||
@@ -14965,6 +14976,13 @@ function readConfigFile(filePath = exports.CONFIG_FILEPATH) {
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
const values = yaml_1.default.parse(data);
|
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;
|
return values;
|
||||||
}
|
}
|
||||||
exports.readConfigFile = readConfigFile;
|
exports.readConfigFile = readConfigFile;
|
||||||
@@ -15067,6 +15085,7 @@ exports.ConfigurationOptionsSchema = z
|
|||||||
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
|
fail_on_severity: z.enum(exports.SEVERITIES).default('low'),
|
||||||
allow_licenses: z.array(z.string()).default([]),
|
allow_licenses: z.array(z.string()).default([]),
|
||||||
deny_licenses: z.array(z.string()).default([]),
|
deny_licenses: z.array(z.string()).default([]),
|
||||||
|
config_file: z.string().optional().default('false'),
|
||||||
base_ref: z.string(),
|
base_ref: z.string(),
|
||||||
head_ref: z.string()
|
head_ref: z.string()
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user