@fairfox/polly 0.12.1 → 0.12.3
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.
|
@@ -1835,6 +1835,12 @@ class TLAGenerator {
|
|
|
1835
1835
|
if (fieldConfig.type === "enum" && fieldConfig.values && fieldConfig.values.length > 0) {
|
|
1836
1836
|
return `"${fieldConfig.values[0]}"`;
|
|
1837
1837
|
}
|
|
1838
|
+
if (fieldConfig.type === "array") {
|
|
1839
|
+
return "<<>>";
|
|
1840
|
+
}
|
|
1841
|
+
if (fieldConfig.type === "string") {
|
|
1842
|
+
return '""';
|
|
1843
|
+
}
|
|
1838
1844
|
}
|
|
1839
1845
|
if ("maxLength" in fieldConfig) {
|
|
1840
1846
|
return "<<>>";
|
|
@@ -1943,12 +1949,13 @@ class DockerRunner {
|
|
|
1943
1949
|
"-v",
|
|
1944
1950
|
`${specDir}:/work`,
|
|
1945
1951
|
this.IMAGE_NAME,
|
|
1952
|
+
"tlc",
|
|
1946
1953
|
"-workers",
|
|
1947
1954
|
`${options?.workers || 1}`,
|
|
1948
1955
|
`${specName}.tla`
|
|
1949
1956
|
];
|
|
1950
1957
|
const result = await this.runCommand("docker", args, {
|
|
1951
|
-
timeout: options?.timeout
|
|
1958
|
+
timeout: options?.timeout
|
|
1952
1959
|
});
|
|
1953
1960
|
return this.parseTLCOutput(result);
|
|
1954
1961
|
}
|
|
@@ -2029,7 +2036,7 @@ class DockerRunner {
|
|
|
2029
2036
|
const timeoutValue = options?.timeout ?? 0;
|
|
2030
2037
|
const timeout = timeoutValue > 0 ? setTimeout(() => {
|
|
2031
2038
|
proc.kill();
|
|
2032
|
-
reject(new Error(`Command timed out after ${Math.floor(timeoutValue / 1000)}s. TLC was still making progress. Consider increasing the timeout or
|
|
2039
|
+
reject(new Error(`Command timed out after ${Math.floor(timeoutValue / 1000)}s. TLC was still making progress. Consider increasing the timeout or setting timeout: 0 for no timeout.`));
|
|
2033
2040
|
}, timeoutValue) : null;
|
|
2034
2041
|
proc.on("close", (exitCode) => {
|
|
2035
2042
|
if (timeout)
|
|
@@ -2457,22 +2464,6 @@ class ConfigGenerator {
|
|
|
2457
2464
|
this.line("//");
|
|
2458
2465
|
this.line("onRelease: 'error',");
|
|
2459
2466
|
this.line("");
|
|
2460
|
-
this.line("// Verification options (optional)");
|
|
2461
|
-
this.line("// ─────────────────────");
|
|
2462
|
-
this.line("//");
|
|
2463
|
-
this.line("// Presets provide quick configuration:");
|
|
2464
|
-
this.line("// • 'quick': 1 minute timeout, 1 worker");
|
|
2465
|
-
this.line("// • 'balanced': 5 minutes timeout, 2 workers (default)");
|
|
2466
|
-
this.line("// • 'thorough': No timeout, 4 workers");
|
|
2467
|
-
this.line("//");
|
|
2468
|
-
this.line("// Or customize with verification options:");
|
|
2469
|
-
this.line("// verification: {");
|
|
2470
|
-
this.line("// timeout: 300, // Timeout in seconds (0 = no timeout)");
|
|
2471
|
-
this.line("// workers: 2, // Number of TLC workers");
|
|
2472
|
-
this.line("// }");
|
|
2473
|
-
this.line("//");
|
|
2474
|
-
this.line("// preset: 'balanced',");
|
|
2475
|
-
this.line("");
|
|
2476
2467
|
this.line("// ─────────────────────────────────────────────────────────");
|
|
2477
2468
|
this.line("// Tier 2 Optimizations (controlled approximations) - ADVANCED");
|
|
2478
2469
|
this.line("// ─────────────────────────────────────────────────────────");
|
|
@@ -5068,36 +5059,10 @@ Stack trace:`, COLORS.gray));
|
|
|
5068
5059
|
}
|
|
5069
5060
|
}
|
|
5070
5061
|
function getTimeout(config) {
|
|
5071
|
-
|
|
5072
|
-
return config.verification.timeout;
|
|
5073
|
-
}
|
|
5074
|
-
const preset = config.preset || "balanced";
|
|
5075
|
-
switch (preset) {
|
|
5076
|
-
case "quick":
|
|
5077
|
-
return 300;
|
|
5078
|
-
case "balanced":
|
|
5079
|
-
return 900;
|
|
5080
|
-
case "thorough":
|
|
5081
|
-
return 0;
|
|
5082
|
-
default:
|
|
5083
|
-
return 900;
|
|
5084
|
-
}
|
|
5062
|
+
return config.verification?.timeout ?? 0;
|
|
5085
5063
|
}
|
|
5086
5064
|
function getWorkers(config) {
|
|
5087
|
-
|
|
5088
|
-
return config.verification.workers;
|
|
5089
|
-
}
|
|
5090
|
-
const preset = config.preset || "balanced";
|
|
5091
|
-
switch (preset) {
|
|
5092
|
-
case "quick":
|
|
5093
|
-
return 1;
|
|
5094
|
-
case "balanced":
|
|
5095
|
-
return 2;
|
|
5096
|
-
case "thorough":
|
|
5097
|
-
return 4;
|
|
5098
|
-
default:
|
|
5099
|
-
return 2;
|
|
5100
|
-
}
|
|
5065
|
+
return config.verification?.workers ?? 1;
|
|
5101
5066
|
}
|
|
5102
5067
|
async function runFullVerification(configPath) {
|
|
5103
5068
|
const config = await loadVerificationConfig(configPath);
|
|
@@ -5338,4 +5303,4 @@ main().catch((error) => {
|
|
|
5338
5303
|
process.exit(1);
|
|
5339
5304
|
});
|
|
5340
5305
|
|
|
5341
|
-
//# debugId=
|
|
5306
|
+
//# debugId=83F06EAF1B4FA6A964756E2164756E21
|