@contractkit/openapi-to-ck 0.7.1 → 0.7.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.
Files changed (42) hide show
  1. package/.turbo/turbo-build$colon$ci.log +24 -40
  2. package/.turbo/turbo-test$colon$ci.log +37 -77
  3. package/CHANGELOG.md +14 -0
  4. package/README.md +78 -0
  5. package/coverage/clover.xml +11 -11
  6. package/coverage/coverage-final.json +9 -9
  7. package/coverage/index.html +1 -1
  8. package/coverage/src/ast-to-ck.ts.html +1 -1
  9. package/coverage/src/circular-refs.ts.html +1 -1
  10. package/coverage/src/convert.ts.html +1 -1
  11. package/coverage/src/index.html +1 -1
  12. package/coverage/src/normalize.ts.html +1 -1
  13. package/coverage/src/paths-to-ast.ts.html +1 -1
  14. package/coverage/src/schema-to-ast.ts.html +1 -1
  15. package/coverage/src/tag-splitter.ts.html +1 -1
  16. package/coverage/src/warnings.ts.html +1 -1
  17. package/coverage/tests/helpers.ts.html +1 -1
  18. package/coverage/tests/index.html +1 -1
  19. package/package.json +4 -4
  20. package/.turbo/turbo-build.log +0 -20
  21. package/.turbo/turbo-format.log +0 -36
  22. package/.turbo/turbo-test.log +0 -19
  23. package/dist/chunk-CQGFQKBJ.js +0 -1681
  24. package/dist/chunk-CQGFQKBJ.js.map +0 -1
  25. package/dist/chunk-FNUU2DWY.js +0 -1779
  26. package/dist/chunk-FNUU2DWY.js.map +0 -1
  27. package/dist/chunk-LD2HAFZG.js +0 -1681
  28. package/dist/chunk-LD2HAFZG.js.map +0 -1
  29. package/dist/chunk-LQ2B3EJG.js +0 -1777
  30. package/dist/chunk-LQ2B3EJG.js.map +0 -1
  31. package/dist/chunk-M6JA6WY2.js +0 -1714
  32. package/dist/chunk-M6JA6WY2.js.map +0 -1
  33. package/dist/chunk-MQTKLXTN.js +0 -1681
  34. package/dist/chunk-MQTKLXTN.js.map +0 -1
  35. package/dist/chunk-NV7RGUUS.js +0 -1699
  36. package/dist/chunk-NV7RGUUS.js.map +0 -1
  37. package/dist/chunk-REM25FDE.js +0 -1779
  38. package/dist/chunk-REM25FDE.js.map +0 -1
  39. package/dist/chunk-SNW7GJOM.js +0 -1681
  40. package/dist/chunk-SNW7GJOM.js.map +0 -1
  41. package/dist/chunk-UWOSCBRG.js +0 -1681
  42. package/dist/chunk-UWOSCBRG.js.map +0 -1
@@ -1,40 +1,24 @@
1
-
2
- 
3
- > @contractkit/openapi-to-ck@0.7.0 build:ci /Users/robert/projects/contractkit/packages/openapi-to-ck
4
- > eslint --max-warnings=0 && pnpm run build
5
-
6
- =============
7
-
8
-
9
- WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
10
-
11
-
12
- * @typescript-eslint/typescript-estree version: 8.57.2
13
- * Supported TypeScript versions: >=4.8.4 <6.0.0
14
- * Your TypeScript version: 6.0.2
15
-
16
-
17
- Please only submit bug reports when using the officially supported version.
18
-
19
-
20
- =============
21
-
22
- > @contractkit/openapi-to-ck@0.7.0 build /Users/robert/projects/contractkit/packages/openapi-to-ck
23
- > tsup src/index.ts src/plugin.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration
24
-
25
- CLI Building entry: src/index.ts, src/plugin.ts
26
- CLI Using tsconfig: tsconfig.json
27
- CLI tsup v8.5.1
28
- CLI Target: esnext
29
- ESM Build start
30
- ESM dist/index.js 498.00 B
31
- ESM dist/chunk-YP7FWA4H.js 50.65 KB
32
- ESM dist/plugin.js 2.51 KB
33
- ESM dist/index.js.map 71.00 B
34
- ESM dist/chunk-YP7FWA4H.js.map 117.23 KB
35
- ESM dist/plugin.js.map 4.95 KB
36
- ESM ⚡️ Build success in 71ms
37
- DTS Build start
38
- DTS ⚡️ Build success in 1043ms
39
- DTS dist/index.d.ts 8.29 KB
40
- DTS dist/plugin.d.ts 128.00 B
1
+
2
+ > @contractkit/openapi-to-ck@0.7.3 build:ci /home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck
3
+ > eslint --max-warnings=0 && pnpm run build
4
+
5
+
6
+ > @contractkit/openapi-to-ck@0.7.3 build /home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck
7
+ > tsup src/index.ts src/plugin.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration
8
+
9
+ CLI Building entry: src/index.ts, src/plugin.ts
10
+ CLI Using tsconfig: tsconfig.json
11
+ CLI tsup v8.5.1
12
+ CLI Target: esnext
13
+ ESM Build start
14
+ ESM dist/index.js 498.00 B
15
+ ESM dist/plugin.js 2.51 KB
16
+ ESM dist/chunk-YP7FWA4H.js 50.65 KB
17
+ ESM dist/index.js.map 71.00 B
18
+ ESM dist/plugin.js.map 4.95 KB
19
+ ESM dist/chunk-YP7FWA4H.js.map 117.23 KB
20
+ ESM ⚡️ Build success in 200ms
21
+ DTS Build start
22
+ DTS ⚡️ Build success in 6425ms
23
+ DTS dist/index.d.ts 8.29 KB
24
+ DTS dist/plugin.d.ts 128.00 B
@@ -1,77 +1,37 @@
1
-
2
- 
3
- > @contractkit/openapi-to-ck@0.7.0 test:ci /Users/robert/projects/contractkit/packages/openapi-to-ck
4
- > vitest run --coverage
5
-
6
- [?25l
7
-  RUN  v4.1.5 /Users/robert/projects/contractkit/packages/openapi-to-ck
8
- Coverage enabled with v8
9
-
10
- [?2026h
11
-  ❯ tests/convert.test.ts [queued]
12
-
13
-  Test Files 0 passed (6)
14
-  Tests 0 passed (0)
15
-  Start at 08:51:09
16
-  Duration 205ms
17
- [?2026l[?2026h
18
-  tests/convert.test.ts [queued]
19
-  ❯ tests/normalize.test.ts [queued]
20
-  ❯ tests/schema-to-ast.test.ts [queued]
21
-  tests/tag-splitter.test.ts [queued]
22
-
23
-  Test Files 0 passed (6)
24
-  Tests 0 passed (0)
25
-  Start at 08:51:09
26
-  Duration 442ms
27
- [?2026l[?2026h ✓ tests/circular-refs.test.ts (8 tests) 3ms
28
-
29
-  tests/ast-to-ck.test.ts [queued]
30
-  tests/convert.test.ts [queued]
31
-  tests/normalize.test.ts [queued]
32
-  ❯ tests/schema-to-ast.test.ts [queued]
33
-  ❯ tests/tag-splitter.test.ts 0/5
34
-
35
-  Test Files 1 passed (6)
36
-  Tests 8 passed (13)
37
-  Start at 08:51:09
38
-  Duration 562ms
39
- [?2026l[?2026h ✓ tests/normalize.test.ts (6 tests) 4ms
40
- ✓ tests/tag-splitter.test.ts (5 tests) 9ms
41
- ✓ tests/schema-to-ast.test.ts (36 tests) 9ms
42
- ✓ tests/ast-to-ck.test.ts (35 tests) 5ms
43
-
44
-
45
-
46
-
47
-  ❯ tests/convert.test.ts 0/16
48
-
49
-  Test Files 5 passed (6)
50
-  Tests 90 passed (106)
51
-  Start at 08:51:09
52
-  Duration 884ms
53
- [?2026l ✓ tests/convert.test.ts (16 tests) 17ms
54
-
55
-  Test Files  6 passed (6)
56
-  Tests  106 passed (106)
57
-  Start at  08:51:09
58
-  Duration  1.13s (transform 549ms, setup 0ms, import 1.57s, tests 46ms, environment 0ms)
59
-
60
-  % Coverage report from v8
61
- -------------------|---------|----------|---------|---------|-------------------------------------------------------------
62
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
63
- -------------------|---------|----------|---------|---------|-------------------------------------------------------------
64
- All files  |  80.49 |  70.11 |  94.69 |  82.95 |  
65
-  src  |  80.24 |  70.39 |  93.47 |  82.57 |  
66
-  ast-to-ck.ts  |  90.65 |  82.01 |  100 |  91.91 | 82-91,168,263,295-296,311,344-345,355,415 
67
-  circular-refs.ts |  100 |  90 |  100 |  100 | 20-23 
68
-  convert.ts  |  77.19 |  87.5 |  80 |  77.77 | 83-98,112-117 
69
-  normalize.ts  |  62.96 |  56.6 |  80 |  63.33 | 79,121-163,237-255,270-271,280-309,346,350,358 
70
-  paths-to-ast.ts  |  81.2 |  64.48 |  100 |  85.12 | 100,125,130,140-141,149,192,206,247,277,283,320-332 
71
-  schema-to-ast.ts |  84.69 |  75 |  95.65 |  87.65 | 128-129,151,159,173,196-197,205-206,311-314,353-360,396-404
72
-  tag-splitter.ts  |  70 |  57.14 |  81.81 |  76.47 | 63-71,137-138,141-146,162-163,171-178 
73
-  warnings.ts  |  100 |  100 |  100 |  100 |  
74
-  tests  |  86.48 |  60 |  100 |  93.33 |  
75
-  helpers.ts  |  86.48 |  60 |  100 |  93.33 | 138-139 
76
- -------------------|---------|----------|---------|---------|-------------------------------------------------------------
77
- [?25h
1
+
2
+ > @contractkit/openapi-to-ck@0.7.3 test:ci /home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck
3
+ > vitest run --coverage
4
+
5
+
6
+  RUN  v4.1.5 /home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck
7
+ Coverage enabled with v8
8
+
9
+ ✓ tests/ast-to-ck.test.ts (35 tests) 83ms
10
+ ✓ tests/schema-to-ast.test.ts (36 tests) 70ms
11
+ ✓ tests/normalize.test.ts (6 tests) 45ms
12
+ ✓ tests/tag-splitter.test.ts (5 tests) 53ms
13
+ ✓ tests/convert.test.ts (16 tests) 162ms
14
+ ✓ tests/circular-refs.test.ts (8 tests) 15ms
15
+
16
+  Test Files  6 passed (6)
17
+  Tests  106 passed (106)
18
+  Start at  18:49:08
19
+  Duration  5.30s (transform 3.09s, setup 0ms, import 6.09s, tests 428ms, environment 1ms)
20
+
21
+  % Coverage report from v8
22
+ -------------------|---------|----------|---------|---------|-------------------------------------------------------------
23
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
24
+ -------------------|---------|----------|---------|---------|-------------------------------------------------------------
25
+ All files | 80.49 | 70.11 | 94.69 | 82.95 |
26
+ src | 80.24 | 70.39 | 93.47 | 82.57 |
27
+ ast-to-ck.ts | 90.65 | 82.01 | 100 | 91.91 | 82-91,168,263,295-296,311,344-345,355,415
28
+ circular-refs.ts | 100 | 90 | 100 | 100 | 20-23
29
+ convert.ts | 77.19 | 87.5 | 80 | 77.77 | 83-98,112-117
30
+ normalize.ts | 62.96 | 56.6 | 80 | 63.33 | 79,121-163,237-255,270-271,280-309,346,350,358
31
+ paths-to-ast.ts | 81.2 | 64.48 | 100 | 85.12 | 100,125,130,140-141,149,192,206,247,277,283,320-332
32
+ schema-to-ast.ts | 84.69 | 75 | 95.65 | 87.65 | 128-129,151,159,173,196-197,205-206,311-314,353-360,396-404
33
+ tag-splitter.ts | 70 | 57.14 | 81.81 | 76.47 | 63-71,137-138,141-146,162-163,171-178
34
+ warnings.ts | 100 | 100 | 100 | 100 |
35
+ tests | 86.48 | 60 | 100 | 93.33 |
36
+ helpers.ts | 86.48 | 60 | 100 | 93.33 | 138-139
37
+ -------------------|---------|----------|---------|---------|-------------------------------------------------------------
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @contractkit/openapi-to-ck
2
2
 
3
+ ## 0.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7555412]
8
+ - @contractkit/core@0.13.0
9
+
10
+ ## 0.7.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [876696f]
15
+ - @contractkit/core@0.12.0
16
+
3
17
  ## 0.7.1
4
18
 
5
19
  ### Patch Changes
package/README.md ADDED
@@ -0,0 +1,78 @@
1
+ # @contractkit/openapi-to-ck
2
+
3
+ Convert OpenAPI specs (2.0, 3.0, 3.1) into ContractKit `.ck` files. Useful for adopting ContractKit in projects that already have an OpenAPI document, or for round-tripping a spec through CK.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add -D @contractkit/openapi-to-ck
9
+ ```
10
+
11
+ ## Use as a CLI subcommand
12
+
13
+ When the package is installed, the `@contractkit/cli` binary picks up an `openapi-to-ck` subcommand:
14
+
15
+ ```bash
16
+ contractkit openapi-to-ck --input openapi.yaml --output contracts/
17
+ ```
18
+
19
+ | Flag | Description |
20
+ | --- | --- |
21
+ | `--input <path>` | Path to an OpenAPI YAML or JSON file. |
22
+ | `--output <dir>` | Directory to write `.ck` files into. |
23
+ | `--split <single \| by-tag>` | Output mode. `by-tag` (default) writes one file per OpenAPI tag; `single` writes one combined file. |
24
+ | `--no-comments` | Don't emit OpenAPI descriptions as `#` comments. |
25
+
26
+ ## Programmatic use
27
+
28
+ ```typescript
29
+ import { convertOpenApiToCk } from '@contractkit/openapi-to-ck';
30
+
31
+ const { files, warnings } = await convertOpenApiToCk({
32
+ input: 'openapi.yaml', // file path, JSON/YAML string, or pre-parsed object
33
+ split: 'by-tag', // 'single' | 'by-tag' (default: 'by-tag')
34
+ includeComments: true, // emit OpenAPI descriptions as # comments (default: true)
35
+ onWarning: w => console.warn(w),
36
+ });
37
+
38
+ // `files` is a Map<filename, ckSource>
39
+ for (const [filename, source] of files) {
40
+ await fs.writeFile(filename, source);
41
+ }
42
+ ```
43
+
44
+ `Warning` entries carry a JSON-pointer-style `path` into the OpenAPI spec, a human-readable `message`, and a `severity` of `'info' | 'warn'`.
45
+
46
+ ## What's converted
47
+
48
+ | OpenAPI | `.ck` |
49
+ | --- | --- |
50
+ | `paths` | `operation /path: { ... }` blocks |
51
+ | `components.schemas` | `contract Name: { ... }` declarations |
52
+ | `parameters` (path / query / header) | `params: { ... }` / `query: { ... }` / `headers: { ... }` blocks |
53
+ | `requestBody.content[mime].schema` | `request: { mime: Type }` |
54
+ | `responses[code].content[mime].schema` | `response: { code: { mime: Type } }` |
55
+ | `responses[code].headers` | per-status `headers: { name: type }` |
56
+ | `allOf` | `&` intersection on `contract` declarations |
57
+ | `oneOf` + `discriminator` | `discriminated(by=field, A \| B)` |
58
+ | `oneOf` / `anyOf` (no discriminator) | `\|` union |
59
+ | `enum`, `pattern`, `minimum/maximum`, `minLength/maxLength` | type constraint args |
60
+
61
+ ## Other exports
62
+
63
+ For tools that want to operate on the intermediate AST rather than emit `.ck` source:
64
+
65
+ ```typescript
66
+ import {
67
+ schemasToModels, // OpenAPI schemas → ContractKit ModelNode[]
68
+ pathsToRoutes, // OpenAPI paths → ContractKit OpRouteNode[]
69
+ splitByTag, // group routes by OpenAPI tag
70
+ mergeIntoSingle, // collapse roots into one
71
+ detectCircularRefs, // find $ref cycles
72
+ extractRefName, // "#/components/schemas/Foo" → "Foo"
73
+ sanitizeName, // turn an arbitrary string into a valid CK identifier
74
+ normalize, // upgrade 2.0/3.0 → 3.1 + dereference
75
+ astToCk, // ContractKit AST → `.ck` source string
76
+ serializeType, // ContractTypeNode → `.ck` type expression
77
+ } from '@contractkit/openapi-to-ck';
78
+ ```
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1777467070166" clover="3.2.0">
3
- <project timestamp="1777467070166" name="All files">
2
+ <coverage generated="1777661353649" clover="3.2.0">
3
+ <project timestamp="1777661353649" name="All files">
4
4
  <metrics statements="839" coveredstatements="696" conditionals="753" coveredconditionals="528" methods="113" coveredmethods="107" elements="1705" coveredelements="1331" complexity="0" loc="839" ncloc="839" packages="2" files="9" classes="9"/>
5
5
  <package name="src">
6
6
  <metrics statements="809" coveredstatements="668" conditionals="733" coveredconditionals="516" methods="92" coveredmethods="86"/>
7
- <file name="ast-to-ck.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/ast-to-ck.ts">
7
+ <file name="ast-to-ck.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/ast-to-ck.ts">
8
8
  <metrics statements="198" coveredstatements="182" conditionals="189" coveredconditionals="155" methods="18" coveredmethods="18"/>
9
9
  <line num="17" count="2" type="stmt"/>
10
10
  <line num="27" count="47" type="cond" truecount="1" falsecount="0"/>
@@ -205,7 +205,7 @@
205
205
  <line num="413" count="1" type="stmt"/>
206
206
  <line num="415" count="0" type="stmt"/>
207
207
  </file>
208
- <file name="circular-refs.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/circular-refs.ts">
208
+ <file name="circular-refs.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/circular-refs.ts">
209
209
  <metrics statements="33" coveredstatements="33" conditionals="20" coveredconditionals="18" methods="5" coveredmethods="5"/>
210
210
  <line num="7" count="21" type="stmt"/>
211
211
  <line num="8" count="21" type="stmt"/>
@@ -241,7 +241,7 @@
241
241
  <line num="69" count="58" type="stmt"/>
242
242
  <line num="70" count="58" type="stmt"/>
243
243
  </file>
244
- <file name="convert.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/convert.ts">
244
+ <file name="convert.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/convert.ts">
245
245
  <metrics statements="54" coveredstatements="42" conditionals="24" coveredconditionals="21" methods="5" coveredmethods="4"/>
246
246
  <line num="19" count="16" type="cond" truecount="2" falsecount="0"/>
247
247
  <line num="20" count="16" type="stmt"/>
@@ -298,7 +298,7 @@
298
298
  <line num="147" count="693" type="stmt"/>
299
299
  <line num="148" count="1528" type="stmt"/>
300
300
  </file>
301
- <file name="normalize.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/normalize.ts">
301
+ <file name="normalize.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/normalize.ts">
302
302
  <metrics statements="150" coveredstatements="95" conditionals="159" coveredconditionals="90" methods="10" coveredmethods="8"/>
303
303
  <line num="13" count="22" type="stmt"/>
304
304
  <line num="15" count="22" type="cond" truecount="2" falsecount="0"/>
@@ -451,7 +451,7 @@
451
451
  <line num="354" count="8" type="stmt"/>
452
452
  <line num="358" count="0" type="stmt"/>
453
453
  </file>
454
- <file name="paths-to-ast.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/paths-to-ast.ts">
454
+ <file name="paths-to-ast.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/paths-to-ast.ts">
455
455
  <metrics statements="121" coveredstatements="103" conditionals="107" coveredconditionals="69" methods="16" coveredmethods="16"/>
456
456
  <line num="25" count="1" type="stmt"/>
457
457
  <line num="26" count="1" type="stmt"/>
@@ -575,7 +575,7 @@
575
575
  <line num="354" count="53" type="stmt"/>
576
576
  <line num="359" count="88" type="stmt"/>
577
577
  </file>
578
- <file name="schema-to-ast.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/schema-to-ast.ts">
578
+ <file name="schema-to-ast.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/schema-to-ast.ts">
579
579
  <metrics statements="162" coveredstatements="142" conditionals="164" coveredconditionals="123" methods="23" coveredmethods="22"/>
580
580
  <line num="25" count="2" type="stmt"/>
581
581
  <line num="29" count="2" type="stmt"/>
@@ -740,7 +740,7 @@
740
740
  <line num="427" count="3" type="stmt"/>
741
741
  <line num="430" count="40" type="cond" truecount="1" falsecount="1"/>
742
742
  </file>
743
- <file name="tag-splitter.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/tag-splitter.ts">
743
+ <file name="tag-splitter.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/tag-splitter.ts">
744
744
  <metrics statements="85" coveredstatements="65" conditionals="70" coveredconditionals="40" methods="11" coveredmethods="9"/>
745
745
  <line num="14" count="8" type="stmt"/>
746
746
  <line num="15" count="8" type="stmt"/>
@@ -828,7 +828,7 @@
828
828
  <line num="186" count="10" type="stmt"/>
829
829
  <line num="193" count="19" type="stmt"/>
830
830
  </file>
831
- <file name="warnings.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/src/warnings.ts">
831
+ <file name="warnings.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/src/warnings.ts">
832
832
  <metrics statements="6" coveredstatements="6" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="4"/>
833
833
  <line num="4" count="58" type="stmt"/>
834
834
  <line num="8" count="58" type="stmt"/>
@@ -840,7 +840,7 @@
840
840
  </package>
841
841
  <package name="tests">
842
842
  <metrics statements="30" coveredstatements="28" conditionals="20" coveredconditionals="12" methods="21" coveredmethods="21"/>
843
- <file name="helpers.ts" path="/Users/robert/projects/contractkit/packages/openapi-to-ck/tests/helpers.ts">
843
+ <file name="helpers.ts" path="/home/runner/work/ContractKit/ContractKit/packages/openapi-to-ck/tests/helpers.ts">
844
844
  <metrics statements="30" coveredstatements="28" conditionals="20" coveredconditionals="12" methods="21" coveredmethods="21"/>
845
845
  <line num="32" count="74" type="stmt"/>
846
846
  <line num="36" count="42" type="stmt"/>