Update map and minified JS files
This commit is contained in:
parent
b7b85bb26f
commit
19a1da54d1
4 changed files with 29 additions and 2 deletions
7
lib/config-utils.js
generated
7
lib/config-utils.js
generated
|
|
@ -42,6 +42,7 @@ exports.parsePacksFromInput = parsePacksFromInput;
|
|||
exports.parsePacksSpecification = parsePacksSpecification;
|
||||
exports.validatePackSpecification = validatePackSpecification;
|
||||
exports.initConfig = initConfig;
|
||||
exports.parseRegistriesWithoutCredentials = parseRegistriesWithoutCredentials;
|
||||
exports.getPathToParsedConfigFile = getPathToParsedConfigFile;
|
||||
exports.getConfig = getConfig;
|
||||
exports.generateRegistries = generateRegistries;
|
||||
|
|
@ -507,6 +508,12 @@ function parseRegistries(registriesInput) {
|
|||
throw new util_1.ConfigurationError("Invalid registries input. Must be a YAML string.");
|
||||
}
|
||||
}
|
||||
function parseRegistriesWithoutCredentials(registriesInput) {
|
||||
return parseRegistries(registriesInput)?.map((r) => {
|
||||
const { url, packages } = r;
|
||||
return { url, packages };
|
||||
});
|
||||
}
|
||||
function isLocal(configPath) {
|
||||
// If the path starts with ./, look locally
|
||||
if (configPath.indexOf("./") === 0) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
20
lib/init-action.js
generated
20
lib/init-action.js
generated
|
|
@ -30,6 +30,7 @@ const safe_which_1 = require("@chrisgavin/safe-which");
|
|||
const uuid_1 = require("uuid");
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const api_client_1 = require("./api-client");
|
||||
const configUtils = __importStar(require("./config-utils"));
|
||||
const diagnostics_1 = require("./diagnostics");
|
||||
const environment_1 = require("./environment");
|
||||
const feature_flags_1 = require("./feature-flags");
|
||||
|
|
@ -82,6 +83,22 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||
: queriesInput;
|
||||
queries.push(...queriesInput.split(","));
|
||||
}
|
||||
let packs = {};
|
||||
if ((config.augmentationProperties.packsInputCombines ||
|
||||
!config.augmentationProperties.packsInput) &&
|
||||
config.originalUserInput.packs) {
|
||||
// If it is an array, then assume there is only a single language being analyzed.
|
||||
if (Array.isArray(config.originalUserInput.packs)) {
|
||||
packs[config.languages[0]] = config.originalUserInput.packs;
|
||||
}
|
||||
else {
|
||||
packs = config.originalUserInput.packs;
|
||||
}
|
||||
}
|
||||
if (config.augmentationProperties.packsInput) {
|
||||
packs[config.languages[0]] ??= [];
|
||||
packs[config.languages[0]].push(...config.augmentationProperties.packsInput);
|
||||
}
|
||||
// Append fields that are dependent on `config`
|
||||
const initWithConfigStatusReport = {
|
||||
...initStatusReport,
|
||||
|
|
@ -89,9 +106,12 @@ async function sendCompletedStatusReport(startedAt, config, toolsDownloadDuratio
|
|||
paths,
|
||||
paths_ignore: pathsIgnore,
|
||||
queries: queries.join(","),
|
||||
packs: JSON.stringify(packs),
|
||||
trap_cache_languages: Object.keys(config.trapCaches).join(","),
|
||||
trap_cache_download_size_bytes: Math.round(await (0, trap_caching_1.getTotalCacheSize)(config.trapCaches, logger)),
|
||||
trap_cache_download_duration_ms: Math.round(config.trapCacheDownloadTime),
|
||||
query_filters: JSON.stringify(config.originalUserInput["query-filters"]),
|
||||
registries: JSON.stringify(configUtils.parseRegistriesWithoutCredentials((0, actions_util_1.getOptionalInput)("registries"))),
|
||||
};
|
||||
await (0, status_report_1.sendStatusReport)({
|
||||
...initWithConfigStatusReport,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue