Commit ac8a858
authored
feat(edge-worker): add workerConfig to handler execution context (#203)
Adds workerConfig to handler execution context, allowing handlers to access worker configuration for intelligent decision-making based on retry limits, concurrency settings, and other parameters.
Key Changes
Added workerConfig to MessageExecution and StepTaskExecution contexts
Deep frozen config prevents accidental handler modifications while keeping worker config mutable
Performance optimized - config frozen once at startup and cached for reuse
Reorganized configuration handling with cleaner factory methods and consolidated defaults
Simplified EdgeWorker API by removing unnecessary union types
Environment variables always sourced from platform (users cannot override)1 parent 7109987 commit ac8a858
File tree
15 files changed
+864
-255
lines changed- .changeset
- pkgs
- edge-worker
- src
- core
- flow
- queue
- test
- tests
- integration
- unit
- website/src/content/docs
- concepts
- edge-worker/getting-started
- getting-started
15 files changed
+864
-255
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 16 | | |
23 | 17 | | |
24 | 18 | | |
| |||
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
91 | | - | |
92 | | - | |
| 85 | + | |
| 86 | + | |
93 | 87 | | |
94 | | - | |
| 88 | + | |
95 | 89 | | |
96 | | - | |
| 90 | + | |
97 | 91 | | |
98 | 92 | | |
99 | | - | |
| 93 | + | |
100 | 94 | | |
101 | | - | |
| 95 | + | |
102 | 96 | | |
103 | 97 | | |
104 | 98 | | |
| |||
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
145 | | - | |
| 139 | + | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
149 | 143 | | |
150 | 144 | | |
151 | | - | |
| 145 | + | |
152 | 146 | | |
153 | 147 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 148 | | |
161 | 149 | | |
162 | 150 | | |
| |||
165 | 153 | | |
166 | 154 | | |
167 | 155 | | |
| 156 | + | |
| 157 | + | |
168 | 158 | | |
169 | 159 | | |
170 | 160 | | |
| |||
196 | 186 | | |
197 | 187 | | |
198 | 188 | | |
199 | | - | |
| 189 | + | |
200 | 190 | | |
201 | 191 | | |
202 | 192 | | |
203 | 193 | | |
204 | 194 | | |
205 | | - | |
| 195 | + | |
206 | 196 | | |
207 | 197 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 198 | | |
214 | 199 | | |
215 | 200 | | |
216 | 201 | | |
217 | 202 | | |
218 | 203 | | |
219 | 204 | | |
| 205 | + | |
| 206 | + | |
220 | 207 | | |
221 | 208 | | |
222 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
54 | 71 | | |
55 | 72 | | |
56 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | | - | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| 60 | + | |
56 | 61 | | |
57 | | - | |
| 62 | + | |
58 | 63 | | |
59 | 64 | | |
60 | 65 | | |
| |||
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| 84 | + | |
79 | 85 | | |
80 | 86 | | |
81 | 87 | | |
| |||
0 commit comments