@meiti/healer-sdk 0.5.0 → 0.6.0
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/README.md +15 -0
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,21 @@ console.log(result.cobertura.lenguajes_no_cubiertos); // what was not, e.g. ["go
|
|
|
30
30
|
console.log(result.pentagono_report?.puntaje); // quality score 0-100, null if it did not run
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
### Not accepted
|
|
34
|
+
|
|
35
|
+
When the tests cannot even run and Healer does not try to repair anything, the job is **not accepted**: `status` is
|
|
36
|
+
`"unresolved"` (so older clients keep working) and `not_accepted` says why. It does not count as a repair success or
|
|
37
|
+
failure, and it is never charged.
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
if (result.not_accepted) {
|
|
41
|
+
console.log(result.not_accepted.reason_code); // "requires_source_build" | "dependencies_unavailable" | "declared_test_not_found" | "tests_did_not_run"
|
|
42
|
+
console.log(result.not_accepted.reason); // e.g. "A dependency (docopt) only installs by running its own installer..."
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`requires_source_build` is a security rule: Healer only installs published wheels and never runs a third-party installer.
|
|
47
|
+
|
|
33
48
|
`repair()` sends the code, waits until the job finishes (polling on its own) and returns the final result.
|
|
34
49
|
Pass `{ onProgress }` as a second argument to follow the job while it runs.
|
|
35
50
|
|
package/dist/types.d.ts
CHANGED
|
@@ -54,6 +54,11 @@ export interface Cobertura {
|
|
|
54
54
|
}
|
|
55
55
|
export interface ResultadoReparacion {
|
|
56
56
|
status: 'production_ready' | 'unresolved' | 'unsupported_stack';
|
|
57
|
+
not_accepted?: {
|
|
58
|
+
reason_code: 'requires_source_build' | 'dependencies_unavailable' | 'declared_test_not_found' | 'tests_did_not_run';
|
|
59
|
+
reason: string;
|
|
60
|
+
};
|
|
61
|
+
counts_in_stats?: boolean;
|
|
57
62
|
cobertura: Cobertura;
|
|
58
63
|
mensaje?: string;
|
|
59
64
|
iterations: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meiti/healer-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Official SDK for Healer: send code, get it back repaired or unchanged, never worse. Thin layer over the REST API with polling, safe apply and partial delivery.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|