@funkai/agents 0.1.0 → 0.1.1

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 (45) hide show
  1. package/.turbo/turbo-build.log +19 -21
  2. package/CHANGELOG.md +6 -0
  3. package/README.md +1 -1
  4. package/package.json +1 -1
  5. package/.turbo/turbo-test$colon$coverage.log +0 -109
  6. package/.turbo/turbo-test.log +0 -141
  7. package/.turbo/turbo-typecheck.log +0 -4
  8. package/coverage/lcov-report/base.css +0 -224
  9. package/coverage/lcov-report/block-navigation.js +0 -87
  10. package/coverage/lcov-report/core/agents/base/agent.ts.html +0 -1705
  11. package/coverage/lcov-report/core/agents/base/index.html +0 -146
  12. package/coverage/lcov-report/core/agents/base/output.ts.html +0 -256
  13. package/coverage/lcov-report/core/agents/base/utils.ts.html +0 -694
  14. package/coverage/lcov-report/core/agents/flow/engine.ts.html +0 -928
  15. package/coverage/lcov-report/core/agents/flow/flow-agent.ts.html +0 -1462
  16. package/coverage/lcov-report/core/agents/flow/index.html +0 -146
  17. package/coverage/lcov-report/core/agents/flow/messages.ts.html +0 -508
  18. package/coverage/lcov-report/core/agents/flow/steps/factory.ts.html +0 -1975
  19. package/coverage/lcov-report/core/agents/flow/steps/index.html +0 -116
  20. package/coverage/lcov-report/core/index.html +0 -131
  21. package/coverage/lcov-report/core/logger.ts.html +0 -541
  22. package/coverage/lcov-report/core/models/providers/index.html +0 -116
  23. package/coverage/lcov-report/core/models/providers/openai.ts.html +0 -337
  24. package/coverage/lcov-report/core/provider/index.html +0 -131
  25. package/coverage/lcov-report/core/provider/provider.ts.html +0 -346
  26. package/coverage/lcov-report/core/provider/usage.ts.html +0 -376
  27. package/coverage/lcov-report/core/tool.ts.html +0 -577
  28. package/coverage/lcov-report/favicon.png +0 -0
  29. package/coverage/lcov-report/index.html +0 -221
  30. package/coverage/lcov-report/lib/hooks.ts.html +0 -262
  31. package/coverage/lcov-report/lib/index.html +0 -161
  32. package/coverage/lcov-report/lib/middleware.ts.html +0 -274
  33. package/coverage/lcov-report/lib/runnable.ts.html +0 -151
  34. package/coverage/lcov-report/lib/trace.ts.html +0 -520
  35. package/coverage/lcov-report/prettify.css +0 -1
  36. package/coverage/lcov-report/prettify.js +0 -2
  37. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  38. package/coverage/lcov-report/sorter.js +0 -210
  39. package/coverage/lcov-report/utils/attempt.ts.html +0 -199
  40. package/coverage/lcov-report/utils/error.ts.html +0 -421
  41. package/coverage/lcov-report/utils/index.html +0 -176
  42. package/coverage/lcov-report/utils/resolve.ts.html +0 -208
  43. package/coverage/lcov-report/utils/result.ts.html +0 -538
  44. package/coverage/lcov-report/utils/zod.ts.html +0 -178
  45. package/coverage/lcov.info +0 -1566
@@ -1,21 +1,19 @@
1
-
2
- 
3
- > @funkai/agents@0.1.0 build /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
4
- > tsdown
5
-
6
- ℹ tsdown v0.21.2 powered by rolldown v1.0.0-rc.9
7
- ℹ config file: /Users/zacrosenbauer/Code/joggr/funkai/packages/agents/tsdown.config.ts
8
- ℹ entry: src/index.ts
9
- ℹ target: node22
10
- ℹ tsconfig: tsconfig.json
11
-
12
-  WARN  `external` is deprecated. Use `deps.neverBundle` instead.
13
-
14
- ℹ Build start
15
- ℹ Cleaning 4 files
16
- ℹ dist/index.mjs  66.70 kB │ gzip: 16.43 kB
17
- ℹ dist/index.mjs.map 154.48 kB │ gzip: 35.44 kB
18
- ℹ dist/index.d.mts.map  17.15 kB │ gzip: 4.77 kB
19
- ℹ dist/index.d.mts  92.50 kB │ gzip: 21.21 kB
20
- ℹ 4 files, total: 330.82 kB
21
- ✔ Build complete in 546ms
1
+
2
+ > @funkai/agents@0.1.1 build /home/runner/work/funkai/funkai/packages/agents
3
+ > tsdown
4
+
5
+ ℹ tsdown v0.21.2 powered by rolldown v1.0.0-rc.9
6
+ ℹ config file: /home/runner/work/funkai/funkai/packages/agents/tsdown.config.ts
7
+ ℹ entry: src/index.ts
8
+ ℹ target: node22
9
+ ℹ tsconfig: tsconfig.json
10
+
11
+  WARN  `external` is deprecated. Use `deps.neverBundle` instead.
12
+
13
+ ℹ Build start
14
+ ℹ dist/index.mjs  66.70 kB │ gzip: 16.43 kB
15
+ ℹ dist/index.mjs.map 154.48 kB │ gzip: 35.44 kB
16
+ ℹ dist/index.d.mts.map  17.15 kB │ gzip: 4.77 kB
17
+ ℹ dist/index.d.mts  92.50 kB │ gzip: 21.21 kB
18
+ ℹ 4 files, total: 330.82 kB
19
+ ✔ Build complete in 2624ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @funkai/agents
2
2
 
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1beb2d2: Update package README documentation
8
+
3
9
  ## 0.1.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
 
12
12
  - :zap: **Functions all the way down** — `agent`, `tool`, `workflow` are functions that return plain objects.
13
13
  - :jigsaw: **Composition over configuration** — Combine small pieces instead of configuring large ones.
14
- - :shield: **Result, never throw** — Every public method returns `Result<T>`. Pattern-match on `ok` instead of try/catch.
14
+ - :shield: **Result, never ~~panic~~ throw** — Every public method returns `Result<T>`. Pattern-match on `ok` instead of try/catch.
15
15
  - :lock: **Closures are state** — Workflow state is just `let` variables in your handler.
16
16
  - :mag: **`$` is optional sugar** — The `$` helpers register data flow for observability; plain imperative code works too.
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkai/agents",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "private": false,
5
5
  "description": "Lightweight workflow and agent orchestration framework",
6
6
  "keywords": [
@@ -1,109 +0,0 @@
1
-
2
- > @funkai/agents@0.4.0 test:coverage /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
3
- > vitest run --coverage
4
-
5
-
6
-  RUN  v4.1.0 /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
7
- Coverage enabled with v8
8
-
9
- ✓ src/lib/trace.test.ts (19 tests) 4ms
10
- ✓ src/utils/zod.test.ts (11 tests) 5ms
11
- ✓ src/core/agents/flow/steps/race.test.ts (13 tests) 7ms
12
- ✓ src/core/agents/flow/steps/reduce.test.ts (14 tests) 10ms
13
- ✓ src/core/agents/flow/steps/agent.test.ts (14 tests) 13ms
14
- ✓ src/core/agents/flow/steps/step.test.ts (19 tests) 14ms
15
- ✓ src/core/agents/flow/steps/while.test.ts (14 tests) 14ms
16
- ✓ src/lib/middleware.test.ts (5 tests) 10ms
17
- ✓ src/core/agents/flow/steps/all.test.ts (14 tests) 38ms
18
- stdout | src/core/agents/flow/flow-agent.test.ts > edge cases > uses default logger when none provided
19
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow' } flowAgent.generate start
20
-
21
- stdout | src/core/agents/flow/flow-agent.test.ts > edge cases > uses default logger when none provided
22
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow', duration: 1 } flowAgent.generate finish
23
-
24
- ✓ src/core/agents/flow/engine.test.ts (14 tests) 8ms
25
- ✓ src/core/agents/base/output.test.ts (9 tests) 46ms
26
- ✓ src/core/agents/flow/flow-agent.test.ts (47 tests) 22ms
27
- ✓ src/core/agents/flow/steps/map.test.ts (13 tests) 74ms
28
- ✓ src/core/agents/flow/steps/factory.test.ts (35 tests) 72ms
29
- ✓ src/lib/hooks.test.ts (7 tests) 6ms
30
- ✓ src/core/logger.test.ts (14 tests) 4ms
31
- stdout | src/core/agents/base/agent.test.ts > edge cases > uses default logger when none provided
32
- { agentId: 'no-logger-agent', name: 'no-logger-agent' } agent.generate start
33
-
34
- stdout | src/core/agents/base/agent.test.ts > edge cases > uses default logger when none provided
35
- { agentId: 'no-logger-agent', name: 'no-logger-agent', duration: 1 } agent.generate finish
36
-
37
- ✓ src/lib/context.test.ts (10 tests) 5ms
38
- ✓ src/core/agents/base/agent.test.ts (69 tests) 95ms
39
- ✓ src/core/agents/flow/steps/each.test.ts (13 tests) 6ms
40
- ✓ src/core/provider/provider.test.ts (9 tests) 5ms
41
- ✓ src/core/models/index.test.ts (16 tests) 4ms
42
- ✓ src/core/provider/usage.test.ts (17 tests) 4ms
43
- ✓ src/core/agents/flow/messages.test.ts (14 tests) 3ms
44
- ✓ src/utils/result.test.ts (10 tests) 4ms
45
- ✓ src/core/agents/base/utils.test.ts (28 tests) 6ms
46
- ✓ src/utils/error.test.ts (32 tests) 3ms
47
- ✓ src/utils/attempt.test.ts (12 tests) 3ms
48
- ✓ src/lib/runnable.test.ts (5 tests) 2ms
49
- ✓ src/utils/resolve.test.ts (6 tests) 3ms
50
- ✓ src/core/tool.test.ts (6 tests) 3ms
51
-
52
-  Test Files  30 passed (30)
53
-  Tests  509 passed (509)
54
-  Start at  20:28:55
55
-  Duration  627ms (transform 1.16s, setup 0ms, import 2.72s, tests 492ms, environment 1ms)
56
-
57
-  % Coverage report from v8
58
- -------------------|---------|----------|---------|---------|-------------------
59
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
60
- -------------------|---------|----------|---------|---------|-------------------
61
- All files | 92.68 | 87.01 | 91.2 | 92.58 |
62
- core | 88 | 78.57 | 100 | 88 |
63
- logger.ts | 100 | 100 | 100 | 100 |
64
- tool.ts | 78.57 | 70 | 100 | 78.57 | 152,156,160
65
- types.ts | 0 | 0 | 0 | 0 |
66
- core/agents/base | 89.03 | 88.67 | 79.59 | 89.03 |
67
- agent.ts | 85.97 | 80 | 66.66 | 85.97 | ...26-427,470-475
68
- output.ts | 100 | 100 | 100 | 100 |
69
- types.ts | 0 | 0 | 0 | 0 |
70
- utils.ts | 96.36 | 100 | 90 | 96.36 | 174,180
71
- core/agents/flow | 93.7 | 82.81 | 84.37 | 93.66 |
72
- engine.ts | 97.14 | 83.33 | 100 | 97.05 | 252
73
- flow-agent.ts | 94.84 | 82.5 | 85.71 | 94.84 | ...23,346,352-353
74
- messages.ts | 72.72 | 83.33 | 66.66 | 72.72 | 136-138
75
- types.ts | 0 | 0 | 0 | 0 |
76
- ...nts/flow/steps | 91.86 | 79.36 | 92.59 | 91.77 |
77
- agent.ts | 0 | 0 | 0 | 0 |
78
- all.ts | 0 | 0 | 0 | 0 |
79
- builder.ts | 0 | 0 | 0 | 0 |
80
- each.ts | 0 | 0 | 0 | 0 |
81
- factory.ts | 91.86 | 79.36 | 92.59 | 91.77 | ...29,265-284,613
82
- map.ts | 0 | 0 | 0 | 0 |
83
- race.ts | 0 | 0 | 0 | 0 |
84
- reduce.ts | 0 | 0 | 0 | 0 |
85
- result.ts | 0 | 0 | 0 | 0 |
86
- step.ts | 0 | 0 | 0 | 0 |
87
- while.ts | 0 | 0 | 0 | 0 |
88
- ...dels/providers | 100 | 100 | 100 | 100 |
89
- openai.ts | 100 | 100 | 100 | 100 |
90
- core/provider | 100 | 100 | 100 | 100 |
91
- provider.ts | 100 | 100 | 100 | 100 |
92
- types.ts | 0 | 0 | 0 | 0 |
93
- usage.ts | 100 | 100 | 100 | 100 |
94
- lib | 100 | 94.11 | 100 | 100 |
95
- context.ts | 0 | 0 | 0 | 0 |
96
- hooks.ts | 100 | 100 | 100 | 100 |
97
- middleware.ts | 100 | 88.88 | 100 | 100 | 39
98
- runnable.ts | 100 | 100 | 100 | 100 |
99
- trace.ts | 100 | 100 | 100 | 100 |
100
- testing | 100 | 100 | 100 | 100 |
101
- context.ts | 100 | 100 | 100 | 100 |
102
- logger.ts | 100 | 100 | 100 | 100 |
103
- utils | 100 | 100 | 100 | 100 |
104
- attempt.ts | 100 | 100 | 100 | 100 |
105
- error.ts | 100 | 100 | 100 | 100 |
106
- resolve.ts | 100 | 100 | 100 | 100 |
107
- result.ts | 100 | 100 | 100 | 100 |
108
- zod.ts | 100 | 100 | 100 | 100 |
109
- -------------------|---------|----------|---------|---------|-------------------
@@ -1,141 +0,0 @@
1
-
2
- 
3
- > @funkai/agents@0.4.0 test /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
4
- > vitest run --typecheck
5
-
6
- [?25lTesting types with tsc and vue-tsc is an experimental feature.
7
- Breaking changes might not follow SemVer, please pin Vitest's version when using it.
8
-
9
-  RUN  v4.1.0 /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
10
-
11
- [?2026h
12
-  ❯ src/core/agents/base/output.test.ts [queued]
13
-
14
-  Test Files 0 passed (32)
15
-  Tests 0 passed (0)
16
-  Start at 21:15:41
17
-  Duration 100ms
18
- [?2026l[?2026h
19
-  ❯ src/core/agents/base/agent.test.ts [queued]
20
-  ❯ src/core/agents/base/output.test.ts 0/9
21
-  ❯ src/core/agents/base/utils.test.ts [queued]
22
-  ❯ src/core/agents/flow/engine.test.ts [queued]
23
-  ❯ src/core/agents/flow/flow-agent.test.ts [queued]
24
-  ❯ src/core/agents/flow/steps/agent.test.ts [queued]
25
-  ❯ src/core/agents/flow/steps/all.test.ts [queued]
26
-  ❯ src/core/agents/flow/steps/each.test.ts [queued]
27
-  ❯ src/core/agents/flow/steps/factory.test.ts [queued]
28
-  ❯ src/core/agents/flow/steps/map.test.ts [queued]
29
-  ❯ src/core/agents/flow/steps/race.test.ts [queued]
30
-  ❯ src/core/agents/flow/steps/reduce.test.ts [queued]
31
-  ❯ src/core/agents/flow/steps/step.test.ts [queued]
32
-  ❯ src/core/agents/flow/steps/while.test.ts [queued]
33
-  ❯ src/lib/middleware.test.ts [queued]
34
-
35
-  Test Files 0 passed (32)
36
-  Tests 0 passed (9)
37
-  Start at 21:15:41
38
-  Duration 203ms
39
- [?2026l[?2026h ✓ src/lib/middleware.test.ts (6 tests) 9ms
40
- ✓ src/core/agents/flow/steps/race.test.ts (13 tests) 6ms
41
- ✓ src/core/agents/flow/steps/each.test.ts (13 tests) 5ms
42
- ✓ src/core/agents/flow/steps/reduce.test.ts (14 tests) 5ms
43
- ✓ src/core/agents/base/utils.test.ts (30 tests) 5ms
44
- ✓ src/core/agents/flow/steps/while.test.ts (14 tests) 8ms
45
- ✓ src/core/agents/flow/steps/agent.test.ts (14 tests) 7ms
46
- ✓ src/core/agents/flow/steps/step.test.ts (19 tests) 13ms
47
- ✓ src/core/agents/base/output.test.ts (9 tests) 33ms
48
- stdout | src/core/agents/flow/engine.test.ts > createFlowEngine > edge cases > falls back to createDefaultLogger when logger is omitted from config
49
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow' } flowAgent.generate start
50
-
51
- stdout | src/core/agents/flow/engine.test.ts > createFlowEngine > edge cases > falls back to createDefaultLogger when logger is omitted from config
52
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow', duration: 1 } flowAgent.generate finish
53
-
54
- ✓ src/core/agents/flow/engine.test.ts (17 tests) 10ms
55
- stdout | src/core/agents/flow/flow-agent.test.ts > edge cases > uses default logger when none provided
56
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow' } flowAgent.generate start
57
-
58
- stdout | src/core/agents/flow/flow-agent.test.ts > edge cases > uses default logger when none provided
59
- { flowAgentId: 'no-logger-flow', name: 'no-logger-flow', duration: 0 } flowAgent.generate finish
60
-
61
- ✓ src/core/agents/flow/steps/all.test.ts (14 tests) 40ms
62
- ✓ src/core/agents/flow/flow-agent.test.ts (52 tests) 19ms
63
- ✓ src/core/agents/flow/steps/factory.test.ts (40 tests) 65ms
64
- ✓ src/core/agents/flow/steps/map.test.ts (13 tests) 75ms
65
-
66
-  ❯ src/core/agents/base/agent.test.ts 0/76
67
-  ❯ src/core/agents/base/output.test.ts 9/9
68
-  ❯ src/core/agents/base/utils.test.ts 30/30
69
-  ❯ src/core/agents/flow/engine.test.ts 17/17
70
-  ❯ src/core/agents/flow/flow-agent.test.ts 52/52
71
-  ❯ src/core/agents/flow/steps/agent.test.ts 14/14
72
-  ❯ src/core/agents/flow/steps/all.test.ts 14/14
73
-  ❯ src/core/agents/flow/steps/each.test.ts 13/13
74
-  ❯ src/core/agents/flow/steps/factory.test.ts 40/40
75
-  ❯ src/core/agents/flow/steps/map.test.ts 13/13
76
-  ❯ src/core/agents/flow/steps/race.test.ts 13/13
77
-  ❯ src/core/agents/flow/steps/reduce.test.ts 14/14
78
-  ❯ src/core/agents/flow/steps/step.test.ts 19/19
79
-  ❯ src/core/agents/flow/steps/while.test.ts 14/14
80
-  ❯ src/core/provider/provider.test.ts [queued]
81
-
82
-  Test Files 14 passed (32)
83
-  Tests 268 passed (344)
84
-  Start at 21:15:41
85
-  Duration 404ms
86
- [?2026l[?2026h ✓ src/lib/hooks.test.ts (7 tests) 3ms
87
- ✓ src/lib/trace.test.ts (19 tests) 3ms
88
- ✓ src/lib/context.test.ts (10 tests) 3ms
89
- ✓ src/core/logger.test.ts (14 tests) 4ms
90
- ✓ src/core/provider/provider.test.ts (9 tests) 4ms
91
- ✓ src/core/models/index.test.ts (16 tests) 4ms
92
- ✓ src/utils/zod.test.ts (11 tests) 4ms
93
- stdout | src/core/agents/base/agent.test.ts > edge cases > uses default logger when none provided
94
- { agentId: 'no-logger-agent', name: 'no-logger-agent' } agent.generate start
95
-
96
- stdout | src/core/agents/base/agent.test.ts > edge cases > uses default logger when none provided
97
- { agentId: 'no-logger-agent', name: 'no-logger-agent', duration: 1 } agent.generate finish
98
-
99
- ✓ src/core/agents/flow/messages.test.ts (18 tests) 3ms
100
- ✓ src/utils/error.test.ts (32 tests) 3ms
101
- ✓ src/core/provider/usage.test.ts (17 tests) 3ms
102
- ✓ src/utils/attempt.test.ts (12 tests) 3ms
103
- ✓ src/lib/runnable.test.ts (5 tests) 2ms
104
- ✓ src/utils/resolve.test.ts (6 tests) 2ms
105
-
106
-
107
-
108
-
109
-  ❯ src/core/agents/base/agent.test.ts 55/76
110
-  ❯ src/core/tool.test.ts [queued]
111
-  ❯ src/lib/trace.test.ts 19/19
112
-  ❯ src/utils/result.test.ts 0/10
113
-
114
-  Test Files 27 passed (32)
115
-  Tests 499 passed (530)
116
-  Start at 21:15:41
117
-  Duration 504ms
118
- [?2026l[?2026h ✓ src/utils/result.test.ts (10 tests) 2ms
119
- ✓ src/core/tool.test.ts (6 tests) 2ms
120
- ✓ src/core/agents/base/agent.test.ts (76 tests) 225ms
121
-
122
-
123
-
124
-
125
-  ❯  TS  src/core/agents/base/types.test-d.ts 0/13
126
-  ❯  TS  src/core/agents/flow/steps/factory.test-d.ts 0/8
127
-
128
-  Test Files 30 passed (32)
129
-  Tests 536 passed (557)
130
-  Start at 21:15:41
131
-  Duration 908ms
132
- [?2026l ✓  TS  src/core/agents/base/types.test-d.ts (13 tests)
133
- ✓  TS  src/core/agents/flow/steps/factory.test-d.ts (8 tests)
134
-
135
-  Test Files  32 passed (32)
136
-  Tests  557 passed (557)
137
- Type Errors  no errors
138
-  Start at  21:15:41
139
-  Duration  1.05s (transform 1.34s, setup 0ms, import 2.93s, tests 573ms, environment 2ms, typecheck 481ms)
140
-
141
- [?25h
@@ -1,4 +0,0 @@
1
-
2
- > @funkai/agents@0.1.0 typecheck /Users/zacrosenbauer/Code/joggr/funkai/packages/agents
3
- > tsc --noEmit
4
-
@@ -1,224 +0,0 @@
1
- body, html {
2
- margin:0; padding: 0;
3
- height: 100%;
4
- }
5
- body {
6
- font-family: Helvetica Neue, Helvetica, Arial;
7
- font-size: 14px;
8
- color:#333;
9
- }
10
- .small { font-size: 12px; }
11
- *, *:after, *:before {
12
- -webkit-box-sizing:border-box;
13
- -moz-box-sizing:border-box;
14
- box-sizing:border-box;
15
- }
16
- h1 { font-size: 20px; margin: 0;}
17
- h2 { font-size: 14px; }
18
- pre {
19
- font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20
- margin: 0;
21
- padding: 0;
22
- -moz-tab-size: 2;
23
- -o-tab-size: 2;
24
- tab-size: 2;
25
- }
26
- a { color:#0074D9; text-decoration:none; }
27
- a:hover { text-decoration:underline; }
28
- .strong { font-weight: bold; }
29
- .space-top1 { padding: 10px 0 0 0; }
30
- .pad2y { padding: 20px 0; }
31
- .pad1y { padding: 10px 0; }
32
- .pad2x { padding: 0 20px; }
33
- .pad2 { padding: 20px; }
34
- .pad1 { padding: 10px; }
35
- .space-left2 { padding-left:55px; }
36
- .space-right2 { padding-right:20px; }
37
- .center { text-align:center; }
38
- .clearfix { display:block; }
39
- .clearfix:after {
40
- content:'';
41
- display:block;
42
- height:0;
43
- clear:both;
44
- visibility:hidden;
45
- }
46
- .fl { float: left; }
47
- @media only screen and (max-width:640px) {
48
- .col3 { width:100%; max-width:100%; }
49
- .hide-mobile { display:none!important; }
50
- }
51
-
52
- .quiet {
53
- color: #7f7f7f;
54
- color: rgba(0,0,0,0.5);
55
- }
56
- .quiet a { opacity: 0.7; }
57
-
58
- .fraction {
59
- font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60
- font-size: 10px;
61
- color: #555;
62
- background: #E8E8E8;
63
- padding: 4px 5px;
64
- border-radius: 3px;
65
- vertical-align: middle;
66
- }
67
-
68
- div.path a:link, div.path a:visited { color: #333; }
69
- table.coverage {
70
- border-collapse: collapse;
71
- margin: 10px 0 0 0;
72
- padding: 0;
73
- }
74
-
75
- table.coverage td {
76
- margin: 0;
77
- padding: 0;
78
- vertical-align: top;
79
- }
80
- table.coverage td.line-count {
81
- text-align: right;
82
- padding: 0 5px 0 20px;
83
- }
84
- table.coverage td.line-coverage {
85
- text-align: right;
86
- padding-right: 10px;
87
- min-width:20px;
88
- }
89
-
90
- table.coverage td span.cline-any {
91
- display: inline-block;
92
- padding: 0 5px;
93
- width: 100%;
94
- }
95
- .missing-if-branch {
96
- display: inline-block;
97
- margin-right: 5px;
98
- border-radius: 3px;
99
- position: relative;
100
- padding: 0 4px;
101
- background: #333;
102
- color: yellow;
103
- }
104
-
105
- .skip-if-branch {
106
- display: none;
107
- margin-right: 10px;
108
- position: relative;
109
- padding: 0 4px;
110
- background: #ccc;
111
- color: white;
112
- }
113
- .missing-if-branch .typ, .skip-if-branch .typ {
114
- color: inherit !important;
115
- }
116
- .coverage-summary {
117
- border-collapse: collapse;
118
- width: 100%;
119
- }
120
- .coverage-summary tr { border-bottom: 1px solid #bbb; }
121
- .keyline-all { border: 1px solid #ddd; }
122
- .coverage-summary td, .coverage-summary th { padding: 10px; }
123
- .coverage-summary tbody { border: 1px solid #bbb; }
124
- .coverage-summary td { border-right: 1px solid #bbb; }
125
- .coverage-summary td:last-child { border-right: none; }
126
- .coverage-summary th {
127
- text-align: left;
128
- font-weight: normal;
129
- white-space: nowrap;
130
- }
131
- .coverage-summary th.file { border-right: none !important; }
132
- .coverage-summary th.pct { }
133
- .coverage-summary th.pic,
134
- .coverage-summary th.abs,
135
- .coverage-summary td.pct,
136
- .coverage-summary td.abs { text-align: right; }
137
- .coverage-summary td.file { white-space: nowrap; }
138
- .coverage-summary td.pic { min-width: 120px !important; }
139
- .coverage-summary tfoot td { }
140
-
141
- .coverage-summary .sorter {
142
- height: 10px;
143
- width: 7px;
144
- display: inline-block;
145
- margin-left: 0.5em;
146
- background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147
- }
148
- .coverage-summary .sorted .sorter {
149
- background-position: 0 -20px;
150
- }
151
- .coverage-summary .sorted-desc .sorter {
152
- background-position: 0 -10px;
153
- }
154
- .status-line { height: 10px; }
155
- /* yellow */
156
- .cbranch-no { background: yellow !important; color: #111; }
157
- /* dark red */
158
- .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159
- .low .chart { border:1px solid #C21F39 }
160
- .highlighted,
161
- .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162
- background: #C21F39 !important;
163
- }
164
- /* medium red */
165
- .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166
- /* light red */
167
- .low, .cline-no { background:#FCE1E5 }
168
- /* light green */
169
- .high, .cline-yes { background:rgb(230,245,208) }
170
- /* medium green */
171
- .cstat-yes { background:rgb(161,215,106) }
172
- /* dark green */
173
- .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174
- .high .chart { border:1px solid rgb(77,146,33) }
175
- /* dark yellow (gold) */
176
- .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177
- .medium .chart { border:1px solid #f9cd0b; }
178
- /* light yellow */
179
- .medium { background: #fff4c2; }
180
-
181
- .cstat-skip { background: #ddd; color: #111; }
182
- .fstat-skip { background: #ddd; color: #111 !important; }
183
- .cbranch-skip { background: #ddd !important; color: #111; }
184
-
185
- span.cline-neutral { background: #eaeaea; }
186
-
187
- .coverage-summary td.empty {
188
- opacity: .5;
189
- padding-top: 4px;
190
- padding-bottom: 4px;
191
- line-height: 1;
192
- color: #888;
193
- }
194
-
195
- .cover-fill, .cover-empty {
196
- display:inline-block;
197
- height: 12px;
198
- }
199
- .chart {
200
- line-height: 0;
201
- }
202
- .cover-empty {
203
- background: white;
204
- }
205
- .cover-full {
206
- border-right: none !important;
207
- }
208
- pre.prettyprint {
209
- border: none !important;
210
- padding: 0 !important;
211
- margin: 0 !important;
212
- }
213
- .com { color: #999 !important; }
214
- .ignore-none { color: #999; font-weight: normal; }
215
-
216
- .wrapper {
217
- min-height: 100%;
218
- height: auto !important;
219
- height: 100%;
220
- margin: 0 auto -48px;
221
- }
222
- .footer, .push {
223
- height: 48px;
224
- }
@@ -1,87 +0,0 @@
1
- /* eslint-disable */
2
- var jumpToCode = (function init() {
3
- // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
-
6
- // Elements to highlight in the file listing view
7
- var fileListingElements = ['td.pct.low'];
8
-
9
- // We don't want to select elements that are direct descendants of another match
10
- var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
-
12
- // Selector that finds elements on the page to which we can jump
13
- var selector =
14
- fileListingElements.join(', ') +
15
- ', ' +
16
- notSelector +
17
- missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18
-
19
- // The NodeList of matching elements
20
- var missingCoverageElements = document.querySelectorAll(selector);
21
-
22
- var currentIndex;
23
-
24
- function toggleClass(index) {
25
- missingCoverageElements
26
- .item(currentIndex)
27
- .classList.remove('highlighted');
28
- missingCoverageElements.item(index).classList.add('highlighted');
29
- }
30
-
31
- function makeCurrent(index) {
32
- toggleClass(index);
33
- currentIndex = index;
34
- missingCoverageElements.item(index).scrollIntoView({
35
- behavior: 'smooth',
36
- block: 'center',
37
- inline: 'center'
38
- });
39
- }
40
-
41
- function goToPrevious() {
42
- var nextIndex = 0;
43
- if (typeof currentIndex !== 'number' || currentIndex === 0) {
44
- nextIndex = missingCoverageElements.length - 1;
45
- } else if (missingCoverageElements.length > 1) {
46
- nextIndex = currentIndex - 1;
47
- }
48
-
49
- makeCurrent(nextIndex);
50
- }
51
-
52
- function goToNext() {
53
- var nextIndex = 0;
54
-
55
- if (
56
- typeof currentIndex === 'number' &&
57
- currentIndex < missingCoverageElements.length - 1
58
- ) {
59
- nextIndex = currentIndex + 1;
60
- }
61
-
62
- makeCurrent(nextIndex);
63
- }
64
-
65
- return function jump(event) {
66
- if (
67
- document.getElementById('fileSearch') === document.activeElement &&
68
- document.activeElement != null
69
- ) {
70
- // if we're currently focused on the search input, we don't want to navigate
71
- return;
72
- }
73
-
74
- switch (event.which) {
75
- case 78: // n
76
- case 74: // j
77
- goToNext();
78
- break;
79
- case 66: // b
80
- case 75: // k
81
- case 80: // p
82
- goToPrevious();
83
- break;
84
- }
85
- };
86
- })();
87
- window.addEventListener('keydown', jumpToCode);