@probelabs/visor 0.1.82 → 0.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/config-schema.d.ts +4 -0
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +4 -0
- package/dist/index.js +37 -7
- package/dist/providers/command-check-provider.d.ts.map +1 -1
- package/dist/sdk/{check-execution-engine-PO5XKTHP.mjs → check-execution-engine-47X4MPHW.mjs} +2 -2
- package/dist/sdk/{chunk-G24UL45Z.mjs → chunk-ROXFJUTY.mjs} +29 -4
- package/dist/sdk/chunk-ROXFJUTY.mjs.map +1 -0
- package/dist/sdk/sdk.d.mts +2 -0
- package/dist/sdk/sdk.d.ts +2 -0
- package/dist/sdk/sdk.js +31 -2
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -1
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/sdk/chunk-G24UL45Z.mjs.map +0 -1
- /package/dist/sdk/{check-execution-engine-PO5XKTHP.mjs.map → check-execution-engine-47X4MPHW.mjs.map} +0 -0
|
@@ -187,6 +187,10 @@ export declare const configSchema: {
|
|
|
187
187
|
readonly $ref: "#/definitions/EnvConfig";
|
|
188
188
|
readonly description: "Environment variables for this check";
|
|
189
189
|
};
|
|
190
|
+
readonly timeout: {
|
|
191
|
+
readonly type: "number";
|
|
192
|
+
readonly description: "Timeout in seconds for command execution (default: 60)";
|
|
193
|
+
};
|
|
190
194
|
readonly depends_on: {
|
|
191
195
|
readonly type: "array";
|
|
192
196
|
readonly items: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-schema.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/generated/config-schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"config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
@@ -194,6 +194,10 @@
|
|
|
194
194
|
"$ref": "#/definitions/EnvConfig",
|
|
195
195
|
"description": "Environment variables for this check"
|
|
196
196
|
},
|
|
197
|
+
"timeout": {
|
|
198
|
+
"type": "number",
|
|
199
|
+
"description": "Timeout in seconds for command execution (default: 60)"
|
|
200
|
+
},
|
|
197
201
|
"depends_on": {
|
|
198
202
|
"type": "array",
|
|
199
203
|
"items": {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.83';
|
|
3
3
|
process.env.PROBE_VERSION = '0.6.0-rc122';
|
|
4
4
|
/******/ (() => { // webpackBootstrap
|
|
5
5
|
/******/ var __webpack_modules__ = ({
|
|
@@ -106952,6 +106952,10 @@ exports.configSchema = {
|
|
|
106952
106952
|
$ref: '#/definitions/EnvConfig',
|
|
106953
106953
|
description: 'Environment variables for this check',
|
|
106954
106954
|
},
|
|
106955
|
+
timeout: {
|
|
106956
|
+
type: 'number',
|
|
106957
|
+
description: 'Timeout in seconds for command execution (default: 60)',
|
|
106958
|
+
},
|
|
106955
106959
|
depends_on: {
|
|
106956
106960
|
type: 'array',
|
|
106957
106961
|
items: {
|
|
@@ -112913,6 +112917,19 @@ class CommandCheckProvider extends check_provider_interface_1.CheckProvider {
|
|
|
112913
112917
|
}
|
|
112914
112918
|
catch (error) {
|
|
112915
112919
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
112920
|
+
// Check if this is a timeout error
|
|
112921
|
+
let isTimeout = false;
|
|
112922
|
+
if (error && typeof error === 'object') {
|
|
112923
|
+
const execError = error;
|
|
112924
|
+
// Node's child_process sets killed=true and signal='SIGTERM' on timeout
|
|
112925
|
+
if (execError.killed && execError.signal === 'SIGTERM') {
|
|
112926
|
+
isTimeout = true;
|
|
112927
|
+
}
|
|
112928
|
+
// Some versions may also set code to 'ETIMEDOUT'
|
|
112929
|
+
if (execError.code === 'ETIMEDOUT') {
|
|
112930
|
+
isTimeout = true;
|
|
112931
|
+
}
|
|
112932
|
+
}
|
|
112916
112933
|
// Extract stderr from the error if available (child_process errors include stdout/stderr)
|
|
112917
112934
|
let stderrOutput = '';
|
|
112918
112935
|
if (error && typeof error === 'object') {
|
|
@@ -112921,17 +112938,30 @@ class CommandCheckProvider extends check_provider_interface_1.CheckProvider {
|
|
|
112921
112938
|
stderrOutput = execError.stderr.trim();
|
|
112922
112939
|
}
|
|
112923
112940
|
}
|
|
112924
|
-
// Construct detailed error message
|
|
112925
|
-
|
|
112926
|
-
|
|
112927
|
-
|
|
112941
|
+
// Construct detailed error message
|
|
112942
|
+
let detailedMessage;
|
|
112943
|
+
let ruleId;
|
|
112944
|
+
if (isTimeout) {
|
|
112945
|
+
const timeoutSeconds = config.timeout || 60;
|
|
112946
|
+
detailedMessage = `Command execution timed out after ${timeoutSeconds} seconds`;
|
|
112947
|
+
if (stderrOutput) {
|
|
112948
|
+
detailedMessage += `\n\nStderr output:\n${stderrOutput}`;
|
|
112949
|
+
}
|
|
112950
|
+
ruleId = 'command/timeout';
|
|
112951
|
+
}
|
|
112952
|
+
else {
|
|
112953
|
+
detailedMessage = stderrOutput
|
|
112954
|
+
? `Command execution failed: ${errorMessage}\n\nStderr output:\n${stderrOutput}`
|
|
112955
|
+
: `Command execution failed: ${errorMessage}`;
|
|
112956
|
+
ruleId = 'command/execution_error';
|
|
112957
|
+
}
|
|
112928
112958
|
logger_1.logger.error(`✗ ${detailedMessage}`);
|
|
112929
112959
|
return {
|
|
112930
112960
|
issues: [
|
|
112931
112961
|
{
|
|
112932
112962
|
file: 'command',
|
|
112933
112963
|
line: 0,
|
|
112934
|
-
ruleId
|
|
112964
|
+
ruleId,
|
|
112935
112965
|
message: detailedMessage,
|
|
112936
112966
|
severity: 'error',
|
|
112937
112967
|
category: 'logic',
|
|
@@ -228821,7 +228851,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
|
|
|
228821
228851
|
/***/ ((module) => {
|
|
228822
228852
|
|
|
228823
228853
|
"use strict";
|
|
228824
|
-
module.exports = {"rE":"0.1.
|
|
228854
|
+
module.exports = {"rE":"0.1.83"};
|
|
228825
228855
|
|
|
228826
228856
|
/***/ })
|
|
228827
228857
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/command-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAMzD;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAY1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"command-check-provider.d.ts","sourceRoot":"","sources":["file:///home/runner/work/visor/visor/src/providers/command-check-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAe,MAAM,aAAa,CAAC;AAMzD;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAC,CAAU;;IAY1B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIlB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAejD,OAAO,CACX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,mBAAmB,EAC3B,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAC7C,OAAO,CAAC,aAAa,CAAC;IAoWzB,OAAO,CAAC,kBAAkB;IAkB1B;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAgFrB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAyB1B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,2BAA2B;IAgBnC,sBAAsB,IAAI,MAAM,EAAE;IAgB5B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAKrC,eAAe,IAAI,MAAM,EAAE;IAQ3B,OAAO,CAAC,uBAAuB;IAkD/B,OAAO,CAAC,uBAAuB;IAkB/B,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,cAAc;IAmEtB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,QAAQ;YAWF,qBAAqB;IAiBnC,OAAO,CAAC,uBAAuB;CA6ChC"}
|
package/dist/sdk/{check-execution-engine-PO5XKTHP.mjs → check-execution-engine-47X4MPHW.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckExecutionEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ROXFJUTY.mjs";
|
|
4
4
|
import "./chunk-FIL2OGF6.mjs";
|
|
5
5
|
import "./chunk-WMJKH4XE.mjs";
|
|
6
6
|
export {
|
|
7
7
|
CheckExecutionEngine
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=check-execution-engine-
|
|
9
|
+
//# sourceMappingURL=check-execution-engine-47X4MPHW.mjs.map
|
|
@@ -1549,7 +1549,7 @@ var PRReviewer = class {
|
|
|
1549
1549
|
async reviewPR(owner, repo, prNumber, prInfo, options = {}) {
|
|
1550
1550
|
const { debug = false, config, checks } = options;
|
|
1551
1551
|
if (config && checks && checks.length > 0) {
|
|
1552
|
-
const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-
|
|
1552
|
+
const { CheckExecutionEngine: CheckExecutionEngine2 } = await import("./check-execution-engine-47X4MPHW.mjs");
|
|
1553
1553
|
const engine = new CheckExecutionEngine2();
|
|
1554
1554
|
const { results } = await engine.executeGroupedChecks(
|
|
1555
1555
|
prInfo,
|
|
@@ -4097,6 +4097,16 @@ return ${returnTarget};
|
|
|
4097
4097
|
return result;
|
|
4098
4098
|
} catch (error) {
|
|
4099
4099
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
4100
|
+
let isTimeout = false;
|
|
4101
|
+
if (error && typeof error === "object") {
|
|
4102
|
+
const execError = error;
|
|
4103
|
+
if (execError.killed && execError.signal === "SIGTERM") {
|
|
4104
|
+
isTimeout = true;
|
|
4105
|
+
}
|
|
4106
|
+
if (execError.code === "ETIMEDOUT") {
|
|
4107
|
+
isTimeout = true;
|
|
4108
|
+
}
|
|
4109
|
+
}
|
|
4100
4110
|
let stderrOutput = "";
|
|
4101
4111
|
if (error && typeof error === "object") {
|
|
4102
4112
|
const execError = error;
|
|
@@ -4104,17 +4114,32 @@ return ${returnTarget};
|
|
|
4104
4114
|
stderrOutput = execError.stderr.trim();
|
|
4105
4115
|
}
|
|
4106
4116
|
}
|
|
4107
|
-
|
|
4117
|
+
let detailedMessage;
|
|
4118
|
+
let ruleId;
|
|
4119
|
+
if (isTimeout) {
|
|
4120
|
+
const timeoutSeconds = config.timeout || 60;
|
|
4121
|
+
detailedMessage = `Command execution timed out after ${timeoutSeconds} seconds`;
|
|
4122
|
+
if (stderrOutput) {
|
|
4123
|
+
detailedMessage += `
|
|
4124
|
+
|
|
4125
|
+
Stderr output:
|
|
4126
|
+
${stderrOutput}`;
|
|
4127
|
+
}
|
|
4128
|
+
ruleId = "command/timeout";
|
|
4129
|
+
} else {
|
|
4130
|
+
detailedMessage = stderrOutput ? `Command execution failed: ${errorMessage}
|
|
4108
4131
|
|
|
4109
4132
|
Stderr output:
|
|
4110
4133
|
${stderrOutput}` : `Command execution failed: ${errorMessage}`;
|
|
4134
|
+
ruleId = "command/execution_error";
|
|
4135
|
+
}
|
|
4111
4136
|
logger.error(`\u2717 ${detailedMessage}`);
|
|
4112
4137
|
return {
|
|
4113
4138
|
issues: [
|
|
4114
4139
|
{
|
|
4115
4140
|
file: "command",
|
|
4116
4141
|
line: 0,
|
|
4117
|
-
ruleId
|
|
4142
|
+
ruleId,
|
|
4118
4143
|
message: detailedMessage,
|
|
4119
4144
|
severity: "error",
|
|
4120
4145
|
category: "logic"
|
|
@@ -8648,4 +8673,4 @@ export {
|
|
|
8648
8673
|
logger,
|
|
8649
8674
|
CheckExecutionEngine
|
|
8650
8675
|
};
|
|
8651
|
-
//# sourceMappingURL=chunk-
|
|
8676
|
+
//# sourceMappingURL=chunk-ROXFJUTY.mjs.map
|