@visulima/ono 2.0.0-alpha.9 → 2.0.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 (42) hide show
  1. package/CHANGELOG.md +270 -0
  2. package/README.md +44 -6
  3. package/dist/error-inspector/page/create-request-context.d.ts +41 -3
  4. package/dist/error-inspector/page/create-request-context.js +70 -70
  5. package/dist/index.d.ts +112 -18
  6. package/dist/index.js +224 -209
  7. package/dist/packem_shared/process-DVasYamT.js +1 -0
  8. package/dist/packem_shared/sanitize-D2LcyiFA.js +1 -0
  9. package/dist/packem_shared/types.d-D1UE67tt.d.ts +54 -0
  10. package/dist/server/open-in-editor.d.ts +22 -22
  11. package/dist/server/open-in-editor.js +1 -1
  12. package/package.json +44 -73
  13. package/dist/error-inspector/components/causes-viewer/index.d.ts +0 -7
  14. package/dist/error-inspector/components/copy-button.d.ts +0 -8
  15. package/dist/error-inspector/components/copy-dropdown.d.ts +0 -10
  16. package/dist/error-inspector/components/error-card/index.d.ts +0 -13
  17. package/dist/error-inspector/components/error-card/solutions.d.ts +0 -7
  18. package/dist/error-inspector/components/error-card/sticky-header.d.ts +0 -5
  19. package/dist/error-inspector/components/header-bar/editor-selector.d.ts +0 -3
  20. package/dist/error-inspector/components/header-bar/index.d.ts +0 -11
  21. package/dist/error-inspector/components/header-bar/theme-toggle.d.ts +0 -6
  22. package/dist/error-inspector/components/header-tabs.d.ts +0 -10
  23. package/dist/error-inspector/components/raw-stack-trace.d.ts +0 -2
  24. package/dist/error-inspector/components/shortcuts-button.d.ts +0 -5
  25. package/dist/error-inspector/components/stack-trace-viewer/index.d.ts +0 -7
  26. package/dist/error-inspector/components/stack-trace-viewer/types.d.ts +0 -5
  27. package/dist/error-inspector/components/stack-trace-viewer/utils/get-type.d.ts +0 -3
  28. package/dist/error-inspector/components/stack-trace-viewer/utils/group-similar-types.d.ts +0 -4
  29. package/dist/error-inspector/components/tooltip.d.ts +0 -4
  30. package/dist/error-inspector/index.d.ts +0 -6
  31. package/dist/error-inspector/layout.d.ts +0 -12
  32. package/dist/error-inspector/page/stack.d.ts +0 -15
  33. package/dist/error-inspector/page/types.d.ts +0 -62
  34. package/dist/error-inspector/types.d.ts +0 -43
  35. package/dist/error-inspector/utils/cn.d.ts +0 -2
  36. package/dist/error-inspector/utils/sanitize.d.ts +0 -7
  37. package/dist/packem_shared/clipboard-jWc8JBuB.js +0 -1
  38. package/dist/packem_shared/process-BO_aZsiL.js +0 -1
  39. package/dist/types.d.ts +0 -1
  40. package/dist/utils/process.d.ts +0 -7
  41. package/dist/utils/revision-hash.d.ts +0 -2
  42. package/dist/utils/runtimes.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,273 @@
1
+ ## @visulima/ono [2.0.1](https://github.com/visulima/visulima/compare/%40visulima%2Fono%402.0.0...%40visulima%2Fono%402.0.1) (2026-07-15)
2
+
3
+ ## @visulima/ono [2.0.0](https://github.com/visulima/visulima/compare/@visulima/ono@1.0.12...@visulima/ono@2.0.0) (2026-07-03)
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * change min node version to 22.13
8
+
9
+ ### Features
10
+
11
+ * **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
12
+
13
+ ### Bug Fixes
14
+
15
+ * add new package image, fixed readme rendering on npm, fixed building of packages ([b790ba2](https://github.com/visulima/visulima/commit/b790ba253ea07fef83528fd822a678facf021b5f))
16
+ * **dependencies:** update hono and isomorphic-dompurify to versions 4.11.3 and 2.35.0 in package.json files ([0169fa9](https://github.com/visulima/visulima/commit/0169fa94d187c5e6a22e2ed48353124953996aee))
17
+ * **dependencies:** update hono and related packages to version 4.11.2 and update @hono/swagger-ui to version 0.5.3 ([5d3eed5](https://github.com/visulima/visulima/commit/5d3eed57d30d8216bf91484f35d39678938651fb))
18
+ * **error-debugging:** resolve eslint and type-safety issues ([886dbff](https://github.com/visulima/visulima/commit/886dbffe3f744c9493fcc54e781de3fd21eebf78))
19
+ * **ono:** 4 bug fixes ([c42baed](https://github.com/visulima/visulima/commit/c42baedb403b69d57ee25f81abf61e01ca8e71ad))
20
+ * **ono:** annotate renderJson for isolatedDeclarations ([bf8853f](https://github.com/visulima/visulima/commit/bf8853f1ffe39485fabbe3486eac4af1dc70d5d7))
21
+ * **ono:** collapse stringifiedBody to a single toString() call ([1847db9](https://github.com/visulima/visulima/commit/1847db944e78349f932bb6dc51e3247c5a71b01e))
22
+ * **ono:** fix runtime detection, request masking, add json renderer ([dcbd84b](https://github.com/visulima/visulima/commit/dcbd84b80a9153e262a645e0f6ffa2b5b0dd60c6))
23
+ * **ono:** guard circular request bodies and mask password-shaped body keys ([42a288c](https://github.com/visulima/visulima/commit/42a288cf3c0e2f3f00a02812b4879db95e718fda))
24
+ * **ono:** properly fix eslint errors in code ([ca1d1a2](https://github.com/visulima/visulima/commit/ca1d1a2aa4d4db69f2f38d2b85d8df5e32b906fb))
25
+ * **ono:** remove remaining eslint suppressions with proper code fixes ([ab20811](https://github.com/visulima/visulima/commit/ab20811c01df07a836303c4b4a478de79d1d338c))
26
+ * **ono:** resolve eslint and formatting issues ([3113c1f](https://github.com/visulima/visulima/commit/3113c1fbd668a0f99016f8f590977b033d19aa96))
27
+ * **ono:** resolve eslint errors ([4d8e045](https://github.com/visulima/visulima/commit/4d8e0455f2420bef082e3aa3f00e76461e8c17c8))
28
+ * **ono:** update package files ([2e8a1dd](https://github.com/visulima/visulima/commit/2e8a1dd987c061f57e9e60c64a40245c499f8c98))
29
+ * **ono:** update packem to 2.0.0-alpha.54 ([e3bf220](https://github.com/visulima/visulima/commit/e3bf220c8813bb04a1d5061c62e1897010f5340b))
30
+ * **ono:** use min-dark/min-light shiki themes for code highlighting ([793a345](https://github.com/visulima/visulima/commit/793a345bbb9dc6520ce8d37a3488a83b1cbe8ce2))
31
+ * **ono:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([2e4ff1a](https://github.com/visulima/visulima/commit/2e4ff1a1ae8f849f9fb4cf26e7b58446bb47c1f1))
32
+ * remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
33
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
34
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
35
+ * update dependencies and improve error handling in error-debugging packages ([b95fea4](https://github.com/visulima/visulima/commit/b95fea4ef0e0a6777b3dd465603b1dd3c40aa4e8))
36
+ * update Node.js engine version requirement to >=22.13 in multiple package.json files for improved compatibility ([b828e9a](https://github.com/visulima/visulima/commit/b828e9aeaebfc798eecddccd90e6ec7560c6d36a))
37
+ * update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
38
+ * **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * **@visulima/error:** upgraded to 6.0.0
44
+ * **@visulima/path:** upgraded to 3.0.0
45
+
46
+ ## @visulima/ono [2.0.0-alpha.38](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.37...@visulima/ono@2.0.0-alpha.38) (2026-06-30)
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * **@visulima/error:** upgraded to 6.0.0-alpha.35
52
+
53
+ ## @visulima/ono [2.0.0-alpha.37](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.36...@visulima/ono@2.0.0-alpha.37) (2026-06-19)
54
+
55
+
56
+ ### Dependencies
57
+
58
+ * **@visulima/error:** upgraded to 6.0.0-alpha.34
59
+
60
+ ## @visulima/ono [2.0.0-alpha.36](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.35...@visulima/ono@2.0.0-alpha.36) (2026-06-13)
61
+
62
+ ### Bug Fixes
63
+
64
+ * **ono:** annotate renderJson for isolatedDeclarations ([bf8853f](https://github.com/visulima/visulima/commit/bf8853f1ffe39485fabbe3486eac4af1dc70d5d7))
65
+ * **ono:** fix runtime detection, request masking, add json renderer ([dcbd84b](https://github.com/visulima/visulima/commit/dcbd84b80a9153e262a645e0f6ffa2b5b0dd60c6))
66
+ * **ono:** guard circular request bodies and mask password-shaped body keys ([42a288c](https://github.com/visulima/visulima/commit/42a288cf3c0e2f3f00a02812b4879db95e718fda))
67
+
68
+
69
+ ### Dependencies
70
+
71
+ * **@visulima/error:** upgraded to 6.0.0-alpha.33
72
+ * **@visulima/path:** upgraded to 3.0.0-alpha.13
73
+
74
+ ## @visulima/ono [2.0.0-alpha.35](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.34...@visulima/ono@2.0.0-alpha.35) (2026-06-04)
75
+
76
+ ### Bug Fixes
77
+
78
+ * **ono:** 4 bug fixes ([c42baed](https://github.com/visulima/visulima/commit/c42baedb403b69d57ee25f81abf61e01ca8e71ad))
79
+
80
+
81
+ ### Dependencies
82
+
83
+ * **@visulima/error:** upgraded to 6.0.0-alpha.32
84
+ * **@visulima/path:** upgraded to 3.0.0-alpha.12
85
+
86
+ ## @visulima/ono [2.0.0-alpha.34](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.33...@visulima/ono@2.0.0-alpha.34) (2026-06-02)
87
+
88
+
89
+ ### Dependencies
90
+
91
+ * **@visulima/error:** upgraded to 6.0.0-alpha.31
92
+
93
+ ## @visulima/ono [2.0.0-alpha.33](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.32...@visulima/ono@2.0.0-alpha.33) (2026-05-27)
94
+
95
+ ### Bug Fixes
96
+
97
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
98
+
99
+
100
+ ### Dependencies
101
+
102
+ * **@visulima/error:** upgraded to 6.0.0-alpha.30
103
+ * **@visulima/path:** upgraded to 3.0.0-alpha.11
104
+
105
+ ## @visulima/ono [2.0.0-alpha.32](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.31...@visulima/ono@2.0.0-alpha.32) (2026-05-26)
106
+
107
+
108
+ ### Dependencies
109
+
110
+ * **@visulima/error:** upgraded to 6.0.0-alpha.29
111
+
112
+ ## @visulima/ono [2.0.0-alpha.31](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.30...@visulima/ono@2.0.0-alpha.31) (2026-05-26)
113
+
114
+
115
+ ### Dependencies
116
+
117
+ * **@visulima/error:** upgraded to 6.0.0-alpha.28
118
+
119
+ ## @visulima/ono [2.0.0-alpha.30](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.29...@visulima/ono@2.0.0-alpha.30) (2026-05-20)
120
+
121
+
122
+ ### Dependencies
123
+
124
+ * **@visulima/error:** upgraded to 6.0.0-alpha.27
125
+
126
+ ## @visulima/ono [2.0.0-alpha.29](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.28...@visulima/ono@2.0.0-alpha.29) (2026-05-19)
127
+
128
+
129
+ ### Dependencies
130
+
131
+ * **@visulima/error:** upgraded to 6.0.0-alpha.26
132
+
133
+ ## @visulima/ono [2.0.0-alpha.28](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.27...@visulima/ono@2.0.0-alpha.28) (2026-05-16)
134
+
135
+
136
+ ### Dependencies
137
+
138
+ * **@visulima/error:** upgraded to 6.0.0-alpha.25
139
+
140
+ ## @visulima/ono [2.0.0-alpha.27](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.26...@visulima/ono@2.0.0-alpha.27) (2026-05-14)
141
+
142
+
143
+ ### Dependencies
144
+
145
+ * **@visulima/error:** upgraded to 6.0.0-alpha.24
146
+
147
+ ## @visulima/ono [2.0.0-alpha.26](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.25...@visulima/ono@2.0.0-alpha.26) (2026-05-11)
148
+
149
+
150
+ ### Dependencies
151
+
152
+ * **@visulima/error:** upgraded to 6.0.0-alpha.23
153
+
154
+ ## @visulima/ono [2.0.0-alpha.25](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.24...@visulima/ono@2.0.0-alpha.25) (2026-05-11)
155
+
156
+
157
+ ### Dependencies
158
+
159
+ * **@visulima/error:** upgraded to 6.0.0-alpha.22
160
+
161
+ ## @visulima/ono [2.0.0-alpha.24](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.23...@visulima/ono@2.0.0-alpha.24) (2026-05-10)
162
+
163
+
164
+ ### Dependencies
165
+
166
+ * **@visulima/error:** upgraded to 6.0.0-alpha.21
167
+
168
+ ## @visulima/ono [2.0.0-alpha.23](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.22...@visulima/ono@2.0.0-alpha.23) (2026-05-10)
169
+
170
+
171
+ ### Dependencies
172
+
173
+ * **@visulima/error:** upgraded to 6.0.0-alpha.20
174
+
175
+ ## @visulima/ono [2.0.0-alpha.22](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.21...@visulima/ono@2.0.0-alpha.22) (2026-05-07)
176
+
177
+
178
+ ### Dependencies
179
+
180
+ * **@visulima/error:** upgraded to 6.0.0-alpha.19
181
+
182
+ ## @visulima/ono [2.0.0-alpha.21](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.20...@visulima/ono@2.0.0-alpha.21) (2026-05-07)
183
+
184
+
185
+ ### Dependencies
186
+
187
+ * **@visulima/error:** upgraded to 6.0.0-alpha.18
188
+
189
+ ## @visulima/ono [2.0.0-alpha.20](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.19...@visulima/ono@2.0.0-alpha.20) (2026-05-06)
190
+
191
+
192
+ ### Dependencies
193
+
194
+ * **@visulima/error:** upgraded to 6.0.0-alpha.17
195
+
196
+ ## @visulima/ono [2.0.0-alpha.19](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.18...@visulima/ono@2.0.0-alpha.19) (2026-05-06)
197
+
198
+ ### Bug Fixes
199
+
200
+ * **ono:** collapse stringifiedBody to a single toString() call ([1847db9](https://github.com/visulima/visulima/commit/1847db944e78349f932bb6dc51e3247c5a71b01e))
201
+
202
+
203
+ ### Dependencies
204
+
205
+ * **@visulima/error:** upgraded to 6.0.0-alpha.16
206
+
207
+ ## @visulima/ono [2.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.17...@visulima/ono@2.0.0-alpha.18) (2026-05-04)
208
+
209
+
210
+ ### Dependencies
211
+
212
+ * **@visulima/error:** upgraded to 6.0.0-alpha.15
213
+
214
+ ## @visulima/ono [2.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.16...@visulima/ono@2.0.0-alpha.17) (2026-04-30)
215
+
216
+
217
+ ### Dependencies
218
+
219
+ * **@visulima/error:** upgraded to 6.0.0-alpha.14
220
+
221
+ ## @visulima/ono [2.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.15...@visulima/ono@2.0.0-alpha.16) (2026-04-28)
222
+
223
+ ## @visulima/ono [2.0.0-alpha.15](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.14...@visulima/ono@2.0.0-alpha.15) (2026-04-22)
224
+
225
+ ### Bug Fixes
226
+
227
+ * Remove JSR configuration generation script and generated jsr.json files ([#616](https://github.com/visulima/visulima/issues/616)) ([533744b](https://github.com/visulima/visulima/commit/533744b103b74896941db5b727173e617a27a63b))
228
+
229
+
230
+ ### Dependencies
231
+
232
+ * **@visulima/error:** upgraded to 6.0.0-alpha.13
233
+ * **@visulima/path:** upgraded to 3.0.0-alpha.10
234
+
235
+ ## @visulima/ono [2.0.0-alpha.14](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.13...@visulima/ono@2.0.0-alpha.14) (2026-04-21)
236
+
237
+
238
+ ### Dependencies
239
+
240
+ * **@visulima/error:** upgraded to 6.0.0-alpha.12
241
+
242
+ ## @visulima/ono [2.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.12...@visulima/ono@2.0.0-alpha.13) (2026-04-21)
243
+
244
+
245
+ ### Dependencies
246
+
247
+ * **@visulima/error:** upgraded to 6.0.0-alpha.11
248
+
249
+ ## @visulima/ono [2.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.11...@visulima/ono@2.0.0-alpha.12) (2026-04-21)
250
+
251
+
252
+ ### Dependencies
253
+
254
+ * **@visulima/error:** upgraded to 6.0.0-alpha.10
255
+
256
+ ## @visulima/ono [2.0.0-alpha.11](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.10...@visulima/ono@2.0.0-alpha.11) (2026-04-15)
257
+
258
+ ### Bug Fixes
259
+
260
+ * **error-debugging:** resolve eslint and type-safety issues ([886dbff](https://github.com/visulima/visulima/commit/886dbffe3f744c9493fcc54e781de3fd21eebf78))
261
+ * **ono:** resolve eslint and formatting issues ([3113c1f](https://github.com/visulima/visulima/commit/3113c1fbd668a0f99016f8f590977b033d19aa96))
262
+
263
+
264
+ ### Dependencies
265
+
266
+ * **@visulima/error:** upgraded to 6.0.0-alpha.9
267
+ * **@visulima/path:** upgraded to 3.0.0-alpha.9
268
+
269
+ ## @visulima/ono [2.0.0-alpha.10](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.9...@visulima/ono@2.0.0-alpha.10) (2026-04-09)
270
+
1
271
  ## @visulima/ono [2.0.0-alpha.9](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.8...@visulima/ono@2.0.0-alpha.9) (2026-04-08)
2
272
 
3
273
  ### Bug Fixes
package/README.md CHANGED
@@ -263,6 +263,44 @@ Renders an error as ANSI terminal output.
263
263
 
264
264
  Returns an object with `errorAnsi` (the formatted error) and optional `solutionBox` (suggested solutions).
265
265
 
266
+ ##### `toJSON(error, options?)` => `Promise<OnoJson>`
267
+
268
+ Renders an error as a structured, JSON-serializable payload — the error name/message, the parsed
269
+ stack frames for the error and every entry in its `cause` chain, the detected runtime, and a
270
+ suggested solution (using the same solution-finder protocol as `toHTML`/`toANSI`). Useful for
271
+ SPA/REST error responses when the client sends `Accept: application/json`.
272
+
273
+ - **error**: `unknown` - The error to render
274
+ - **options**: `ToJsonOptions` (optional)
275
+ - `solutionFinders?: SolutionFinder[]` - Custom solution finders
276
+
277
+ ```ts
278
+ import { renderJson } from "@visulima/ono";
279
+
280
+ app.use((error, request, response, next) => {
281
+ if (request.accepts("json")) {
282
+ renderJson(error).then((payload) => response.status(500).json(payload));
283
+
284
+ return;
285
+ }
286
+
287
+ next(error);
288
+ });
289
+ ```
290
+
291
+ #### Standalone renderers
292
+
293
+ The same three renderers are also exported as standalone, tree-shakeable functions — prefer these
294
+ over instantiating `Ono`:
295
+
296
+ ```ts
297
+ import { renderAnsi, renderHtml, renderJson } from "@visulima/ono";
298
+
299
+ const html = await renderHtml(error);
300
+ const { errorAnsi } = await renderAnsi(error);
301
+ const json = await renderJson(error);
302
+ ```
303
+
266
304
  ### createRequestContextPage(request, options) => `Promise<ContentPage | undefined>`
267
305
 
268
306
  Creates a context page with detailed request debugging information.
@@ -323,10 +361,10 @@ try {
323
361
  Use `createRequestContextPage()` to create a "Context" tab with comprehensive debugging information:
324
362
 
325
363
  - **Request Overview** - cURL command with proper formatting and copy functionality
326
- - **Headers** - HTTP headers with smart masking for sensitive data
327
- - **Body** - Request body content with proper formatting
364
+ - **Headers** - HTTP headers with smart masking for sensitive data (authorization, cookies, API keys, tokens, secrets)
365
+ - **Body** - Request body content with sensitive-looking keys (password, token, secret, …) masked in both the rendered body and the copyable cURL
328
366
  - **Session** - Session data in organized key-value tables
329
- - **Cookies** - Cookie information in readable format
367
+ - **Cookies** - Cookie values are masked by default (the `cookie` header is treated as sensitive); pass an empty `maskValue` to disable
330
368
  - **Dynamic Context Sections** - Any additional context keys you provide are automatically rendered as sections with:
331
369
  - Proper titles (capitalized)
332
370
  - Copy buttons for JSON data
@@ -495,9 +533,9 @@ Try these routes:
495
533
 
496
534
  From `@visulima/ono/server/open-in-editor`:
497
535
 
498
- - `openInEditor(request, options)` — core function (uses `open-editor` under the hood)
499
- - `createNodeHttpHandler(options)` — returns `(req, res) => void` for Node http servers
500
- - `createExpressHandler(options)` — returns `(req, res) => void` for Express/Connect
536
+ - `createOpenInEditorMiddleware(options)` — universal handler factory (Node `http` and Connect/Express), backed by `launch-editor-middleware`
537
+ - `createNodeHttpHandler(options)` — returns `(req, res) => Promise<void>` for Node `http` servers
538
+ - `createExpressHandler(options)` — returns an Express/Connect-compatible handler
501
539
 
502
540
  Options:
503
541
 
@@ -1,4 +1,42 @@
1
- import type { ContentPage } from "../types.d.ts";
2
- import type { ContextContentOptions, RequestLike } from "./types.d.ts";
1
+ import { C as ContentPage } from "../../packem_shared/types.d-D1UE67tt.js";
2
+ import { IncomingMessage } from 'node:http';
3
+ type NativeRequest = typeof globalThis.Request;
4
+ type NativeHeaders = typeof globalThis.Headers;
5
+ interface CustomHeaders {
6
+ entries: () => IterableIterator<[string, string]>;
7
+ forEach: (callback: (value: string, key: string) => void) => void;
8
+ get: (name: string) => string | null;
9
+ }
10
+ interface CustomRequest {
11
+ clone?: () => CustomRequest;
12
+ headers?: Record<string, string | string[]> | CustomHeaders;
13
+ json?: () => Promise<unknown>;
14
+ method?: string;
15
+ text?: () => Promise<string>;
16
+ url?: string;
17
+ }
18
+ type HeadersLike = NativeHeaders | CustomHeaders;
19
+ type RequestLike = NativeRequest | (IncomingMessage & {
20
+ body?: unknown;
21
+ clone?: () => RequestLike;
22
+ json?: () => Promise<unknown>;
23
+ text?: () => Promise<string>;
24
+ }) | CustomRequest | {
25
+ body?: unknown;
26
+ headers?: Record<string, string | string[]> | HeadersLike;
27
+ method?: string;
28
+ off?: (event: string, handler: (chunk: unknown) => void) => void;
29
+ on?: (event: string, handler: (chunk: unknown) => void) => void;
30
+ setEncoding?: (encoding: string) => void;
31
+ url?: string;
32
+ };
33
+ type ContextContentOptions = {
34
+ context?: Record<string, unknown>;
35
+ headerAllowlist?: string[];
36
+ headerDenylist?: string[];
37
+ maskValue?: string;
38
+ previewBytes?: number;
39
+ totalCapBytes?: number;
40
+ };
3
41
  declare const createRequestContext: (request: RequestLike, options: ContextContentOptions) => Promise<ContentPage | undefined>;
4
- export default createRequestContext;
42
+ export { createRequestContext as default };