@visulima/ono 2.0.0-alpha.8 → 2.0.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/CHANGELOG.md +284 -0
- package/README.md +44 -6
- package/dist/error-inspector/page/create-request-context.d.ts +41 -3
- package/dist/error-inspector/page/create-request-context.js +67 -67
- package/dist/index.d.ts +112 -18
- package/dist/index.js +255 -211
- package/dist/packem_chunks/min-dark.js +1 -0
- package/dist/packem_chunks/min-light.js +1 -0
- package/dist/packem_shared/process-DVasYamT.js +1 -0
- package/dist/packem_shared/sanitize-D2LcyiFA.js +1 -0
- package/dist/packem_shared/types.d-D1UE67tt.d.ts +54 -0
- package/dist/server/open-in-editor.d.ts +22 -22
- package/dist/server/open-in-editor.js +1 -1
- package/package.json +137 -167
- package/dist/error-inspector/components/causes-viewer/index.d.ts +0 -7
- package/dist/error-inspector/components/copy-button.d.ts +0 -8
- package/dist/error-inspector/components/copy-dropdown.d.ts +0 -10
- package/dist/error-inspector/components/error-card/index.d.ts +0 -13
- package/dist/error-inspector/components/error-card/solutions.d.ts +0 -7
- package/dist/error-inspector/components/error-card/sticky-header.d.ts +0 -5
- package/dist/error-inspector/components/header-bar/editor-selector.d.ts +0 -3
- package/dist/error-inspector/components/header-bar/index.d.ts +0 -11
- package/dist/error-inspector/components/header-bar/theme-toggle.d.ts +0 -6
- package/dist/error-inspector/components/header-tabs.d.ts +0 -10
- package/dist/error-inspector/components/raw-stack-trace.d.ts +0 -2
- package/dist/error-inspector/components/shortcuts-button.d.ts +0 -5
- package/dist/error-inspector/components/stack-trace-viewer/index.d.ts +0 -7
- package/dist/error-inspector/components/stack-trace-viewer/types.d.ts +0 -5
- package/dist/error-inspector/components/stack-trace-viewer/utils/get-type.d.ts +0 -3
- package/dist/error-inspector/components/stack-trace-viewer/utils/group-similar-types.d.ts +0 -4
- package/dist/error-inspector/components/tooltip.d.ts +0 -4
- package/dist/error-inspector/index.d.ts +0 -6
- package/dist/error-inspector/layout.d.ts +0 -12
- package/dist/error-inspector/page/stack.d.ts +0 -15
- package/dist/error-inspector/page/types.d.ts +0 -62
- package/dist/error-inspector/types.d.ts +0 -43
- package/dist/error-inspector/utils/cn.d.ts +0 -2
- package/dist/error-inspector/utils/sanitize.d.ts +0 -7
- package/dist/packem_chunks/github-dark-default.js +0 -1
- package/dist/packem_chunks/github-light.js +0 -1
- package/dist/packem_shared/clipboard-CzFaiOZC.js +0 -1
- package/dist/packem_shared/process-B37didfB.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/process.d.ts +0 -7
- package/dist/utils/revision-hash.d.ts +0 -2
- package/dist/utils/runtimes.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,287 @@
|
|
|
1
|
+
## @visulima/ono [2.0.0](https://github.com/visulima/visulima/compare/@visulima/ono@1.0.12...@visulima/ono@2.0.0) (2026-07-03)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* change min node version to 22.13
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **web:** auto-generate packages page from workspace metadata ([623e520](https://github.com/visulima/visulima/commit/623e5207693a7fe720f5f2f179593a3654c880e3))
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add new package image, fixed readme rendering on npm, fixed building of packages ([b790ba2](https://github.com/visulima/visulima/commit/b790ba253ea07fef83528fd822a678facf021b5f))
|
|
14
|
+
* **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))
|
|
15
|
+
* **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))
|
|
16
|
+
* **error-debugging:** resolve eslint and type-safety issues ([886dbff](https://github.com/visulima/visulima/commit/886dbffe3f744c9493fcc54e781de3fd21eebf78))
|
|
17
|
+
* **ono:** 4 bug fixes ([c42baed](https://github.com/visulima/visulima/commit/c42baedb403b69d57ee25f81abf61e01ca8e71ad))
|
|
18
|
+
* **ono:** annotate renderJson for isolatedDeclarations ([bf8853f](https://github.com/visulima/visulima/commit/bf8853f1ffe39485fabbe3486eac4af1dc70d5d7))
|
|
19
|
+
* **ono:** collapse stringifiedBody to a single toString() call ([1847db9](https://github.com/visulima/visulima/commit/1847db944e78349f932bb6dc51e3247c5a71b01e))
|
|
20
|
+
* **ono:** fix runtime detection, request masking, add json renderer ([dcbd84b](https://github.com/visulima/visulima/commit/dcbd84b80a9153e262a645e0f6ffa2b5b0dd60c6))
|
|
21
|
+
* **ono:** guard circular request bodies and mask password-shaped body keys ([42a288c](https://github.com/visulima/visulima/commit/42a288cf3c0e2f3f00a02812b4879db95e718fda))
|
|
22
|
+
* **ono:** properly fix eslint errors in code ([ca1d1a2](https://github.com/visulima/visulima/commit/ca1d1a2aa4d4db69f2f38d2b85d8df5e32b906fb))
|
|
23
|
+
* **ono:** remove remaining eslint suppressions with proper code fixes ([ab20811](https://github.com/visulima/visulima/commit/ab20811c01df07a836303c4b4a478de79d1d338c))
|
|
24
|
+
* **ono:** resolve eslint and formatting issues ([3113c1f](https://github.com/visulima/visulima/commit/3113c1fbd668a0f99016f8f590977b033d19aa96))
|
|
25
|
+
* **ono:** resolve eslint errors ([4d8e045](https://github.com/visulima/visulima/commit/4d8e0455f2420bef082e3aa3f00e76461e8c17c8))
|
|
26
|
+
* **ono:** update package files ([2e8a1dd](https://github.com/visulima/visulima/commit/2e8a1dd987c061f57e9e60c64a40245c499f8c98))
|
|
27
|
+
* **ono:** update packem to 2.0.0-alpha.54 ([e3bf220](https://github.com/visulima/visulima/commit/e3bf220c8813bb04a1d5061c62e1897010f5340b))
|
|
28
|
+
* **ono:** use min-dark/min-light shiki themes for code highlighting ([793a345](https://github.com/visulima/visulima/commit/793a345bbb9dc6520ce8d37a3488a83b1cbe8ce2))
|
|
29
|
+
* **ono:** use workspace:* for internal [@visulima](https://github.com/visulima) deps ([2e4ff1a](https://github.com/visulima/visulima/commit/2e4ff1a1ae8f849f9fb4cf26e7b58446bb47c1f1))
|
|
30
|
+
* remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
|
|
31
|
+
* 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))
|
|
32
|
+
* **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
|
|
33
|
+
* update dependencies and improve error handling in error-debugging packages ([b95fea4](https://github.com/visulima/visulima/commit/b95fea4ef0e0a6777b3dd465603b1dd3c40aa4e8))
|
|
34
|
+
* 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))
|
|
35
|
+
* update package OG images across multiple packages ([f08e4dd](https://github.com/visulima/visulima/commit/f08e4dd2b105ccb29c8412020a9c2be36d6c1e9e))
|
|
36
|
+
* **web:** improve build setup with incremental stats caching and prod install ([fe33e75](https://github.com/visulima/visulima/commit/fe33e75827586779b4b3a0c6d57b39f889ee6207))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* **@visulima/error:** upgraded to 6.0.0
|
|
42
|
+
* **@visulima/path:** upgraded to 3.0.0
|
|
43
|
+
|
|
44
|
+
## @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)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Dependencies
|
|
48
|
+
|
|
49
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.35
|
|
50
|
+
|
|
51
|
+
## @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)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Dependencies
|
|
55
|
+
|
|
56
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.34
|
|
57
|
+
|
|
58
|
+
## @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)
|
|
59
|
+
|
|
60
|
+
### Bug Fixes
|
|
61
|
+
|
|
62
|
+
* **ono:** annotate renderJson for isolatedDeclarations ([bf8853f](https://github.com/visulima/visulima/commit/bf8853f1ffe39485fabbe3486eac4af1dc70d5d7))
|
|
63
|
+
* **ono:** fix runtime detection, request masking, add json renderer ([dcbd84b](https://github.com/visulima/visulima/commit/dcbd84b80a9153e262a645e0f6ffa2b5b0dd60c6))
|
|
64
|
+
* **ono:** guard circular request bodies and mask password-shaped body keys ([42a288c](https://github.com/visulima/visulima/commit/42a288cf3c0e2f3f00a02812b4879db95e718fda))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Dependencies
|
|
68
|
+
|
|
69
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.33
|
|
70
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.13
|
|
71
|
+
|
|
72
|
+
## @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)
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
* **ono:** 4 bug fixes ([c42baed](https://github.com/visulima/visulima/commit/c42baedb403b69d57ee25f81abf61e01ca8e71ad))
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Dependencies
|
|
80
|
+
|
|
81
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.32
|
|
82
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.12
|
|
83
|
+
|
|
84
|
+
## @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)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Dependencies
|
|
88
|
+
|
|
89
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.31
|
|
90
|
+
|
|
91
|
+
## @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)
|
|
92
|
+
|
|
93
|
+
### Bug Fixes
|
|
94
|
+
|
|
95
|
+
* **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Dependencies
|
|
99
|
+
|
|
100
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.30
|
|
101
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.11
|
|
102
|
+
|
|
103
|
+
## @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)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Dependencies
|
|
107
|
+
|
|
108
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.29
|
|
109
|
+
|
|
110
|
+
## @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)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Dependencies
|
|
114
|
+
|
|
115
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.28
|
|
116
|
+
|
|
117
|
+
## @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)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Dependencies
|
|
121
|
+
|
|
122
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.27
|
|
123
|
+
|
|
124
|
+
## @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)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Dependencies
|
|
128
|
+
|
|
129
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.26
|
|
130
|
+
|
|
131
|
+
## @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)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Dependencies
|
|
135
|
+
|
|
136
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.25
|
|
137
|
+
|
|
138
|
+
## @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)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Dependencies
|
|
142
|
+
|
|
143
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.24
|
|
144
|
+
|
|
145
|
+
## @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)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Dependencies
|
|
149
|
+
|
|
150
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.23
|
|
151
|
+
|
|
152
|
+
## @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)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Dependencies
|
|
156
|
+
|
|
157
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.22
|
|
158
|
+
|
|
159
|
+
## @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)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Dependencies
|
|
163
|
+
|
|
164
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.21
|
|
165
|
+
|
|
166
|
+
## @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)
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
### Dependencies
|
|
170
|
+
|
|
171
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.20
|
|
172
|
+
|
|
173
|
+
## @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)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### Dependencies
|
|
177
|
+
|
|
178
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.19
|
|
179
|
+
|
|
180
|
+
## @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)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
### Dependencies
|
|
184
|
+
|
|
185
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.18
|
|
186
|
+
|
|
187
|
+
## @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)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Dependencies
|
|
191
|
+
|
|
192
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.17
|
|
193
|
+
|
|
194
|
+
## @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)
|
|
195
|
+
|
|
196
|
+
### Bug Fixes
|
|
197
|
+
|
|
198
|
+
* **ono:** collapse stringifiedBody to a single toString() call ([1847db9](https://github.com/visulima/visulima/commit/1847db944e78349f932bb6dc51e3247c5a71b01e))
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
### Dependencies
|
|
202
|
+
|
|
203
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.16
|
|
204
|
+
|
|
205
|
+
## @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)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Dependencies
|
|
209
|
+
|
|
210
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.15
|
|
211
|
+
|
|
212
|
+
## @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)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
### Dependencies
|
|
216
|
+
|
|
217
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.14
|
|
218
|
+
|
|
219
|
+
## @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)
|
|
220
|
+
|
|
221
|
+
## @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)
|
|
222
|
+
|
|
223
|
+
### Bug Fixes
|
|
224
|
+
|
|
225
|
+
* 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))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Dependencies
|
|
229
|
+
|
|
230
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.13
|
|
231
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.10
|
|
232
|
+
|
|
233
|
+
## @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)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
### Dependencies
|
|
237
|
+
|
|
238
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.12
|
|
239
|
+
|
|
240
|
+
## @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)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### Dependencies
|
|
244
|
+
|
|
245
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.11
|
|
246
|
+
|
|
247
|
+
## @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)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
### Dependencies
|
|
251
|
+
|
|
252
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.10
|
|
253
|
+
|
|
254
|
+
## @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)
|
|
255
|
+
|
|
256
|
+
### Bug Fixes
|
|
257
|
+
|
|
258
|
+
* **error-debugging:** resolve eslint and type-safety issues ([886dbff](https://github.com/visulima/visulima/commit/886dbffe3f744c9493fcc54e781de3fd21eebf78))
|
|
259
|
+
* **ono:** resolve eslint and formatting issues ([3113c1f](https://github.com/visulima/visulima/commit/3113c1fbd668a0f99016f8f590977b033d19aa96))
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Dependencies
|
|
263
|
+
|
|
264
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.9
|
|
265
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.9
|
|
266
|
+
|
|
267
|
+
## @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)
|
|
268
|
+
|
|
269
|
+
## @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)
|
|
270
|
+
|
|
271
|
+
### Bug Fixes
|
|
272
|
+
|
|
273
|
+
* **ono:** properly fix eslint errors in code ([ca1d1a2](https://github.com/visulima/visulima/commit/ca1d1a2aa4d4db69f2f38d2b85d8df5e32b906fb))
|
|
274
|
+
* **ono:** remove remaining eslint suppressions with proper code fixes ([ab20811](https://github.com/visulima/visulima/commit/ab20811c01df07a836303c4b4a478de79d1d338c))
|
|
275
|
+
* **ono:** resolve eslint errors ([4d8e045](https://github.com/visulima/visulima/commit/4d8e0455f2420bef082e3aa3f00e76461e8c17c8))
|
|
276
|
+
* **ono:** use min-dark/min-light shiki themes for code highlighting ([793a345](https://github.com/visulima/visulima/commit/793a345bbb9dc6520ce8d37a3488a83b1cbe8ce2))
|
|
277
|
+
* remove deprecated baseUrl and downlevelIteration from tsconfigs ([a708366](https://github.com/visulima/visulima/commit/a708366b5c3bc73cfde480a712ed397bd921fb93))
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
### Dependencies
|
|
281
|
+
|
|
282
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.8
|
|
283
|
+
* **@visulima/path:** upgraded to 3.0.0-alpha.8
|
|
284
|
+
|
|
1
285
|
## @visulima/ono [2.0.0-alpha.8](https://github.com/visulima/visulima/compare/@visulima/ono@2.0.0-alpha.7...@visulima/ono@2.0.0-alpha.8) (2026-03-26)
|
|
2
286
|
|
|
3
287
|
### Features
|
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
|
|
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
|
|
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
|
-
- `
|
|
499
|
-
- `createNodeHttpHandler(options)` — returns `(req, res) => void
|
|
500
|
-
- `createExpressHandler(options)` — returns
|
|
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
|
|
2
|
-
import
|
|
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
|
|
42
|
+
export { createRequestContext as default };
|