Merge pull request #3404 from github/henrymercer/include-oids-in-bundle

Include base database OIDs when bundling database
This commit is contained in:
Henry Mercer
2026-01-20 06:13:13 -08:00
committed by GitHub
15 changed files with 264 additions and 96 deletions
+13 -4
View File
@@ -89381,6 +89381,7 @@ var safeDump = renamed("safeDump", "dump");
// src/util.ts
var semver = __toESM(require_semver2());
var BASE_DATABASE_OIDS_FILE_NAME = "base-database-oids.json";
var BROKEN_VERSIONS = ["0.0.0-20211207"];
var GITHUB_DOTCOM_URL = "https://github.com";
var MINIMUM_CGROUP_MEMORY_LIMIT_BYTES = 1024 * 1024;
@@ -89500,6 +89501,9 @@ function getCachedCodeQlVersion() {
async function codeQlVersionAtLeast(codeql, requiredVersion) {
return semver.gte((await codeql.getVersion()).version, requiredVersion);
}
function getBaseDatabaseOidsFilePath(config) {
return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME);
}
async function delay(milliseconds, opts) {
const { allowProcessExit } = opts || {};
return new Promise((resolve6) => {
@@ -90449,9 +90453,6 @@ async function readBaseDatabaseOidsFile(config, logger) {
throw e;
}
}
function getBaseDatabaseOidsFilePath(config) {
return path3.join(config.dbLocation, "base-database-oids.json");
}
async function writeOverlayChangesFile(config, sourceRoot, logger) {
const baseFileOids = await readBaseDatabaseOidsFile(config, logger);
const overlayFileOids = await getFileOidsUnderPath(sourceRoot);
@@ -92080,7 +92081,7 @@ ${output}`
await runCli(cmd, codeqlArgs);
}
},
async databaseBundle(databasePath, outputFilePath, databaseName) {
async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) {
const args = [
"database",
"bundle",
@@ -92089,6 +92090,14 @@ ${output}`
`--name=${databaseName}`,
...getExtraOptionsFromEnv(["database", "bundle"])
];
if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) {
args.push(
...alsoIncludeRelativePaths.flatMap((relativePath) => [
"--include",
relativePath
])
);
}
await new toolrunner3.ToolRunner(cmd, args).exec();
},
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {