mirror of
https://github.com/github/codeql-action.git
synced 2026-04-08 21:22:25 +00:00
Override query configuration for Code Quality only analyses
This commit is contained in:
50
lib/analyze-action-post.js
generated
50
lib/analyze-action-post.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -31821,14 +31821,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -31839,7 +31839,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -102910,7 +102910,7 @@ var require_dist_node16 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -102918,7 +102918,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -102928,12 +102928,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -102941,12 +102941,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -102961,7 +102961,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
|
||||
36
lib/analyze-action.js
generated
36
lib/analyze-action.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -37670,14 +37670,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -37688,7 +37688,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
36
lib/autobuild-action.js
generated
36
lib/autobuild-action.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -31821,14 +31821,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -31839,7 +31839,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
50
lib/init-action-post.js
generated
50
lib/init-action-post.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -37670,14 +37670,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -37688,7 +37688,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -108759,7 +108759,7 @@ var require_dist_node16 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -108767,7 +108767,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
function getValues(context3, operator, key, modifier) {
|
||||
var value = context3[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -108777,12 +108777,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -108790,12 +108790,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -108810,7 +108810,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
|
||||
60
lib/init-action.js
generated
60
lib/init-action.js
generated
@@ -22196,7 +22196,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -22204,7 +22204,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -22216,14 +22216,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -22231,12 +22231,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -22251,7 +22251,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -22936,7 +22936,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -22944,7 +22944,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -22956,14 +22956,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -22971,12 +22971,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -22991,7 +22991,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -37670,14 +37670,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -37688,7 +37688,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -85778,6 +85778,9 @@ async function asyncSome(array, predicate) {
|
||||
const results = await Promise.all(array.map(predicate));
|
||||
return results.some((result) => result);
|
||||
}
|
||||
function isDefined(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
|
||||
// src/actions-util.ts
|
||||
var pkg = require_package();
|
||||
@@ -86167,6 +86170,7 @@ async function parseAnalysisKinds(input) {
|
||||
new Set(components.map((component) => component))
|
||||
);
|
||||
}
|
||||
var codeQualityQueries = ["code-quality"];
|
||||
|
||||
// src/feature-flags.ts
|
||||
var fs7 = __toESM(require("fs"));
|
||||
@@ -87578,6 +87582,9 @@ function dbLocationOrDefault(dbLocation, tempDir) {
|
||||
function userConfigFromActionPath(tempDir) {
|
||||
return path10.resolve(tempDir, "user-config-from-action.yml");
|
||||
}
|
||||
function hasQueryCustomisation(userConfig) {
|
||||
return isDefined(userConfig["disable-default-queries"]) || isDefined(userConfig.queries) || isDefined(userConfig["query-filters"]);
|
||||
}
|
||||
async function initConfig(inputs) {
|
||||
const { logger, tempDir } = inputs;
|
||||
if (inputs.configInput) {
|
||||
@@ -87603,6 +87610,20 @@ async function initConfig(inputs) {
|
||||
);
|
||||
}
|
||||
const config = await initActionState(inputs, userConfig);
|
||||
if (!isCodeScanningEnabled(config)) {
|
||||
if (hasQueryCustomisation(config.computedConfig)) {
|
||||
logger.warning(
|
||||
"Query customizations will be ignored, because only `code-quality` analysis is enabled."
|
||||
);
|
||||
}
|
||||
const queries = codeQualityQueries.map((v) => ({ uses: v }));
|
||||
config.originalUserInput["disable-default-queries"] = true;
|
||||
config.originalUserInput.queries = queries;
|
||||
config.originalUserInput["query-filters"] = [];
|
||||
config.computedConfig["disable-default-queries"] = true;
|
||||
config.computedConfig.queries = queries;
|
||||
config.computedConfig["query-filters"] = [];
|
||||
}
|
||||
const { overlayDatabaseMode, useOverlayDatabaseCaching } = await getOverlayDatabaseMode(
|
||||
inputs.codeql,
|
||||
inputs.repository,
|
||||
@@ -87836,6 +87857,9 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) {
|
||||
}
|
||||
return augmentedConfig;
|
||||
}
|
||||
function isCodeScanningEnabled(config) {
|
||||
return config.analysisKinds.includes("code-scanning" /* CodeScanning */);
|
||||
}
|
||||
|
||||
// src/dependency-caching.ts
|
||||
var os2 = __toESM(require("os"));
|
||||
|
||||
36
lib/resolve-environment-action.js
generated
36
lib/resolve-environment-action.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -31821,14 +31821,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -31839,7 +31839,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
50
lib/start-proxy-action-post.js
generated
50
lib/start-proxy-action-post.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -31821,14 +31821,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -31839,7 +31839,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -101570,7 +101570,7 @@ var require_dist_node16 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -101578,7 +101578,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -101588,12 +101588,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -101601,12 +101601,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -101621,7 +101621,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
|
||||
36
lib/upload-lib.js
generated
36
lib/upload-lib.js
generated
@@ -21585,7 +21585,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21593,7 +21593,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21605,14 +21605,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21620,12 +21620,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21640,7 +21640,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -22325,7 +22325,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -22333,7 +22333,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -22345,14 +22345,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -22360,12 +22360,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -22380,7 +22380,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -38967,14 +38967,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -38985,7 +38985,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
50
lib/upload-sarif-action-post.js
generated
50
lib/upload-sarif-action-post.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -35658,14 +35658,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -35676,7 +35676,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -95692,7 +95692,7 @@ var require_dist_node16 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -95700,7 +95700,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -95710,12 +95710,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(encodeValue(operator, value2, isKeyOperator(operator) ? key : ""));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -95723,12 +95723,12 @@ var require_dist_node16 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -95743,7 +95743,7 @@ var require_dist_node16 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
|
||||
36
lib/upload-sarif-action.js
generated
36
lib/upload-sarif-action.js
generated
@@ -20288,7 +20288,7 @@ var require_dist_node2 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -20296,7 +20296,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -20308,14 +20308,14 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -20323,12 +20323,12 @@ var require_dist_node2 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -20343,7 +20343,7 @@ var require_dist_node2 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -21028,7 +21028,7 @@ var require_dist_node6 = __commonJS({
|
||||
return value;
|
||||
}
|
||||
}
|
||||
function isDefined(value) {
|
||||
function isDefined2(value) {
|
||||
return value !== void 0 && value !== null;
|
||||
}
|
||||
function isKeyOperator(operator) {
|
||||
@@ -21036,7 +21036,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
function getValues(context2, operator, key, modifier) {
|
||||
var value = context2[key], result = [];
|
||||
if (isDefined(value) && value !== "") {
|
||||
if (isDefined2(value) && value !== "") {
|
||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
||||
value = value.toString();
|
||||
if (modifier && modifier !== "*") {
|
||||
@@ -21048,14 +21048,14 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
if (modifier === "*") {
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
result.push(
|
||||
encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
|
||||
);
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
result.push(encodeValue(operator, value[k], k));
|
||||
}
|
||||
});
|
||||
@@ -21063,12 +21063,12 @@ var require_dist_node6 = __commonJS({
|
||||
} else {
|
||||
const tmp = [];
|
||||
if (Array.isArray(value)) {
|
||||
value.filter(isDefined).forEach(function(value2) {
|
||||
value.filter(isDefined2).forEach(function(value2) {
|
||||
tmp.push(encodeValue(operator, value2));
|
||||
});
|
||||
} else {
|
||||
Object.keys(value).forEach(function(k) {
|
||||
if (isDefined(value[k])) {
|
||||
if (isDefined2(value[k])) {
|
||||
tmp.push(encodeUnreserved(k));
|
||||
tmp.push(encodeValue(operator, value[k].toString()));
|
||||
}
|
||||
@@ -21083,7 +21083,7 @@ var require_dist_node6 = __commonJS({
|
||||
}
|
||||
} else {
|
||||
if (operator === ";") {
|
||||
if (isDefined(value)) {
|
||||
if (isDefined2(value)) {
|
||||
result.push(encodeUnreserved(key));
|
||||
}
|
||||
} else if (value === "" && (operator === "&" || operator === "?")) {
|
||||
@@ -37670,14 +37670,14 @@ var require_typeGuards = __commonJS({
|
||||
"node_modules/@azure/core-util/dist/commonjs/typeGuards.js"(exports2) {
|
||||
"use strict";
|
||||
Object.defineProperty(exports2, "__esModule", { value: true });
|
||||
exports2.isDefined = isDefined;
|
||||
exports2.isDefined = isDefined2;
|
||||
exports2.isObjectWithProperties = isObjectWithProperties;
|
||||
exports2.objectHasProperty = objectHasProperty;
|
||||
function isDefined(thing) {
|
||||
function isDefined2(thing) {
|
||||
return typeof thing !== "undefined" && thing !== null;
|
||||
}
|
||||
function isObjectWithProperties(thing, properties) {
|
||||
if (!isDefined(thing) || typeof thing !== "object") {
|
||||
if (!isDefined2(thing) || typeof thing !== "object") {
|
||||
return false;
|
||||
}
|
||||
for (const property of properties) {
|
||||
@@ -37688,7 +37688,7 @@ var require_typeGuards = __commonJS({
|
||||
return true;
|
||||
}
|
||||
function objectHasProperty(thing, property) {
|
||||
return isDefined(thing) && typeof thing === "object" && property in thing;
|
||||
return isDefined2(thing) && typeof thing === "object" && property in thing;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -197,18 +197,36 @@ test("load code quality config", async (t) => {
|
||||
}),
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
config,
|
||||
await configUtils.getDefaultConfig(
|
||||
createTestInitConfigInputs({
|
||||
analysisKindsInput: "code-quality",
|
||||
languagesInput: languages,
|
||||
tempDir,
|
||||
codeql,
|
||||
logger,
|
||||
}),
|
||||
),
|
||||
);
|
||||
const userConfig: configUtils.UserConfig = {
|
||||
"disable-default-queries": true,
|
||||
queries: [{ uses: "code-quality" }],
|
||||
"query-filters": [],
|
||||
};
|
||||
|
||||
// And the config we expect it to result in
|
||||
const expectedConfig: configUtils.Config = {
|
||||
analysisKinds: [AnalysisKind.CodeQuality],
|
||||
languages: [KnownLanguage.actions],
|
||||
buildMode: undefined,
|
||||
// This gets set because we only have `AnalysisKind.CodeQuality`
|
||||
originalUserInput: userConfig,
|
||||
computedConfig: userConfig,
|
||||
tempDir,
|
||||
codeQLCmd: codeql.getPath(),
|
||||
gitHubVersion: githubVersion,
|
||||
dbLocation: path.resolve(tempDir, "codeql_databases"),
|
||||
debugMode: false,
|
||||
debugArtifactName: "",
|
||||
debugDatabaseName: "",
|
||||
trapCaches: {},
|
||||
trapCacheDownloadTime: 0,
|
||||
dependencyCachingEnabled: CachingKind.None,
|
||||
extraQueryExclusions: [],
|
||||
overlayDatabaseMode: OverlayDatabaseMode.None,
|
||||
useOverlayDatabaseCaching: false,
|
||||
};
|
||||
|
||||
t.deepEqual(config, expectedConfig);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
AnalysisConfig,
|
||||
AnalysisKind,
|
||||
CodeQuality,
|
||||
codeQualityQueries,
|
||||
CodeScanning,
|
||||
parseAnalysisKinds,
|
||||
} from "./analyses";
|
||||
@@ -34,6 +35,7 @@ import {
|
||||
BuildMode,
|
||||
codeQlVersionAtLeast,
|
||||
cloneObject,
|
||||
isDefined,
|
||||
} from "./util";
|
||||
|
||||
// Property names from the user-supplied config file.
|
||||
@@ -1080,6 +1082,19 @@ function userConfigFromActionPath(tempDir: string): string {
|
||||
return path.resolve(tempDir, "user-config-from-action.yml");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given `UserConfig` contains any query customisations.
|
||||
*
|
||||
* @returns Returns `true` if the `UserConfig` customises which queries are run.
|
||||
*/
|
||||
function hasQueryCustomisation(userConfig: UserConfig): boolean {
|
||||
return (
|
||||
isDefined(userConfig["disable-default-queries"]) ||
|
||||
isDefined(userConfig.queries) ||
|
||||
isDefined(userConfig["query-filters"])
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load and return the config.
|
||||
*
|
||||
@@ -1116,6 +1131,29 @@ export async function initConfig(inputs: InitConfigInputs): Promise<Config> {
|
||||
|
||||
const config = await initActionState(inputs, userConfig);
|
||||
|
||||
// If Code Scanning analysis is disabled, then we initialise the database for Code Quality.
|
||||
// That entails disabling the default queries and only running quality queries.
|
||||
if (!isCodeScanningEnabled(config)) {
|
||||
// Warn if any query customisations are present in the computed configuration.
|
||||
if (hasQueryCustomisation(config.computedConfig)) {
|
||||
logger.warning(
|
||||
"Query customizations will be ignored, because only `code-quality` analysis is enabled.",
|
||||
);
|
||||
}
|
||||
|
||||
const queries = codeQualityQueries.map((v) => ({ uses: v }));
|
||||
|
||||
// Set the query customisation options for Code Quality only analysis.
|
||||
config.originalUserInput["disable-default-queries"] = true;
|
||||
config.originalUserInput.queries = queries;
|
||||
config.originalUserInput["query-filters"] = [];
|
||||
|
||||
// Update the computed configuration for the call to `getOverlayDatabaseMode`.
|
||||
config.computedConfig["disable-default-queries"] = true;
|
||||
config.computedConfig.queries = queries;
|
||||
config.computedConfig["query-filters"] = [];
|
||||
}
|
||||
|
||||
// The choice of overlay database mode depends on the selection of languages
|
||||
// and queries, which in turn depends on the user config and the augmentation
|
||||
// properties. So we need to calculate the overlay database mode after the
|
||||
|
||||
Reference in New Issue
Block a user