mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Move ConfigurationError out of util.ts
This commit is contained in:
6
lib/entry-points.js
generated
6
lib/entry-points.js
generated
@@ -169373,6 +169373,10 @@ var semver = __toESM(require_semver2());
|
||||
var maximumVersion = "3.23";
|
||||
var minimumVersion = "3.18";
|
||||
|
||||
// src/errors/index.ts
|
||||
var ConfigurationError = class extends Error {
|
||||
};
|
||||
|
||||
// src/json/index.ts
|
||||
function parseString(data) {
|
||||
return JSON.parse(data);
|
||||
@@ -169830,8 +169834,6 @@ var HTTPError = class extends Error {
|
||||
this.status = status;
|
||||
}
|
||||
};
|
||||
var ConfigurationError = class extends Error {
|
||||
};
|
||||
function asHTTPError(arg) {
|
||||
if (!isObject2(arg) || !isString(arg.message)) {
|
||||
return void 0;
|
||||
|
||||
5
src/errors/index.ts
Normal file
5
src/errors/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
* An Error class that indicates an error that occurred due to
|
||||
* a misconfiguration of the action or the CodeQL CLI.
|
||||
*/
|
||||
export class ConfigurationError extends Error {}
|
||||
@@ -23,11 +23,13 @@ import {
|
||||
getEnv,
|
||||
type Env,
|
||||
} from "./environment";
|
||||
import { ConfigurationError } from "./errors";
|
||||
import * as json from "./json";
|
||||
import { Language } from "./languages";
|
||||
import { Logger } from "./logging";
|
||||
|
||||
// Re-export for backwards compatibility to avoid updating a lot of imports elsewhere.
|
||||
export { ConfigurationError } from "./errors";
|
||||
export {
|
||||
getRequiredEnvParam,
|
||||
getOptionalEnvVar,
|
||||
@@ -573,12 +575,6 @@ export class HTTPError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An Error class that indicates an error that occurred due to
|
||||
* a misconfiguration of the action or the CodeQL CLI.
|
||||
*/
|
||||
export class ConfigurationError extends Error {}
|
||||
|
||||
export function asHTTPError(arg: any): HTTPError | undefined {
|
||||
if (!json.isObject<any>(arg) || !json.isString(arg.message)) {
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user