@visulima/pail 4.0.2 → 4.1.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/LICENSE.md +346 -0
  3. package/README.md +17 -0
  4. package/dist/error.d.ts +69 -69
  5. package/dist/index.browser.d.ts +446 -445
  6. package/dist/index.browser.js +17 -17
  7. package/dist/index.server.d.ts +582 -582
  8. package/dist/index.server.js +27 -27
  9. package/dist/middleware/elysia.d.ts +44 -42
  10. package/dist/middleware/elysia.js +1 -1
  11. package/dist/middleware/express.d.ts +58 -59
  12. package/dist/middleware/express.js +1 -1
  13. package/dist/middleware/fastify.d.ts +55 -56
  14. package/dist/middleware/fastify.js +1 -1
  15. package/dist/middleware/hono.d.ts +56 -57
  16. package/dist/middleware/hono.js +1 -1
  17. package/dist/middleware/next/handler.d.ts +67 -68
  18. package/dist/middleware/next/handler.js +1 -1
  19. package/dist/middleware/sveltekit.d.ts +72 -73
  20. package/dist/middleware/sveltekit.js +1 -1
  21. package/dist/object-tree.d.ts +44 -44
  22. package/dist/packem_shared/AbstractJsonReporter-BpWRnN0L.js +1 -0
  23. package/dist/packem_shared/AbstractJsonReporter-DxZwImm5.js +1 -0
  24. package/dist/packem_shared/JsonReporter-9IcELa1m.js +2 -0
  25. package/dist/packem_shared/JsonReporter-Dd3kuj8X.js +1 -0
  26. package/dist/packem_shared/{PrettyReporter-DsHfKOU7.js → PrettyReporter-BUWNEg3_.js} +1 -1
  27. package/dist/packem_shared/{PrettyReporter-CcDdPQSt.js → PrettyReporter-DbgD89ck.js} +56 -30
  28. package/dist/packem_shared/abstract-json-reporter.d-B6NoO-hG.d.ts +61 -0
  29. package/dist/packem_shared/{abstract-pretty-reporter-DrLBJ6ds.js → abstract-pretty-reporter-CyfTvmKf.js} +41 -39
  30. package/dist/packem_shared/create-middleware-logger.d-BRkkBMlk.d.ts +47 -0
  31. package/dist/packem_shared/headers-DI58djdG.js +1 -0
  32. package/dist/packem_shared/index-CbkPnylC.js +1 -0
  33. package/dist/packem_shared/serializeError-52C4oiKx-CrnRcq9R.js +1 -0
  34. package/dist/packem_shared/storage-DVcJumyk.js +1 -0
  35. package/dist/packem_shared/types.d-4ge_rME4.d.ts +246 -0
  36. package/dist/packem_shared/{types.d-Cz9S7jZh.d.ts → types.d-BW8kAXUv.d.ts} +95 -95
  37. package/dist/packem_shared/types.d-DGHeA2iJ.d.ts +194 -0
  38. package/dist/packem_shared/useLogger-7p55yvvc.js +1 -0
  39. package/dist/packem_shared/wide-event.d-BMLastMR.d.ts +716 -0
  40. package/dist/packem_shared/write-stream-ytl_vhg_.js +1 -0
  41. package/dist/processor/caller/caller-processor.d.ts +32 -33
  42. package/dist/processor/environment-processor.d.ts +83 -84
  43. package/dist/processor/message-formatter-processor.d.ts +40 -45
  44. package/dist/processor/message-formatter-processor.js +1 -1
  45. package/dist/processor/opentelemetry-processor.d.ts +51 -52
  46. package/dist/processor/redact-processor.d.ts +57 -65
  47. package/dist/processor/sampling-processor.d.ts +90 -91
  48. package/dist/reporter/file/json-file-reporter.d.ts +77 -78
  49. package/dist/reporter/file/json-file-reporter.js +1 -1
  50. package/dist/reporter/http/abstract-http-reporter.d.ts +125 -121
  51. package/dist/reporter/http/abstract-http-reporter.js +2 -2
  52. package/dist/reporter/http/http-reporter.d.ts +33 -34
  53. package/dist/reporter/http/http-reporter.edge-light.d.ts +235 -230
  54. package/dist/reporter/http/http-reporter.edge-light.js +2 -2
  55. package/dist/reporter/json/index.browser.d.ts +62 -61
  56. package/dist/reporter/json/index.browser.js +1 -1
  57. package/dist/reporter/json/index.d.ts +36 -37
  58. package/dist/reporter/json/index.js +1 -1
  59. package/dist/reporter/pretty/index.browser.d.ts +57 -56
  60. package/dist/reporter/pretty/index.browser.js +1 -1
  61. package/dist/reporter/pretty/index.d.ts +133 -133
  62. package/dist/reporter/pretty/index.js +1 -1
  63. package/dist/reporter/simple/simple-reporter.server.d.ts +91 -90
  64. package/dist/reporter/simple/simple-reporter.server.js +7 -7
  65. package/dist/wide-event.d.ts +2 -3
  66. package/dist/wide-event.js +1 -1
  67. package/package.json +58 -37
  68. package/dist/packem_shared/AbstractJsonReporter-Bp_JCrMQ.js +0 -1
  69. package/dist/packem_shared/AbstractJsonReporter-w_bGGiD-.js +0 -1
  70. package/dist/packem_shared/JsonReporter-Sd_lJGS-.js +0 -2
  71. package/dist/packem_shared/JsonReporter-bmem9lcg.js +0 -1
  72. package/dist/packem_shared/abstract-json-reporter.d-wfESoEa-.d.ts +0 -62
  73. package/dist/packem_shared/addKnownErrorConstructor-C1OJTj2D-0FlJMfXz.js +0 -25
  74. package/dist/packem_shared/create-middleware-logger.d-B-JmQ1Sl.d.ts +0 -47
  75. package/dist/packem_shared/headers-DH0H2s8W.js +0 -1
  76. package/dist/packem_shared/index-Q1764hvO.js +0 -1
  77. package/dist/packem_shared/serializeError-C-NFvZ8_-D0CA_Qlx.js +0 -1
  78. package/dist/packem_shared/storage-DaXAlpiO.js +0 -1
  79. package/dist/packem_shared/types.d-bWnqHJKL.d.ts +0 -211
  80. package/dist/packem_shared/types.d-xxE3FOD3.d.ts +0 -229
  81. package/dist/packem_shared/useLogger-DB34CuU5.js +0 -1
  82. package/dist/packem_shared/wide-event.d-D3ATYpoK.d.ts +0 -717
  83. package/dist/packem_shared/write-stream-C7jxLxIT.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## @visulima/pail [4.1.0](https://github.com/visulima/visulima/compare/%40visulima%2Fpail%404.0.2...%40visulima%2Fpail%404.1.0) (2026-08-02)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/colorize:** upgraded to 2.1.0
7
+ * **@visulima/interactive-manager:** upgraded to 1.0.1
8
+ * **@visulima/ansi:** upgraded to 4.1.0
9
+ * **@visulima/error:** upgraded to 6.1.0
10
+ * **@visulima/fmt:** upgraded to 2.1.0
11
+ * **@visulima/inspector:** upgraded to 2.1.0
12
+ * **@visulima/redact:** upgraded to 3.1.0
13
+ * **@visulima/string:** upgraded to 3.1.0
14
+
1
15
  ## @visulima/pail [4.0.2](https://github.com/visulima/visulima/compare/%40visulima%2Fpail%404.0.1...%40visulima%2Fpail%404.0.2) (2026-07-27)
2
16
 
3
17
  ## @visulima/pail [4.0.1](https://github.com/visulima/visulima/compare/%40visulima%2Fpail%404.0.0...%40visulima%2Fpail%404.0.1) (2026-07-26)
package/LICENSE.md CHANGED
@@ -979,6 +979,352 @@ The published @visulima/pail artifact additionally contains code with the follow
979
979
  MIT, (MIT OR CC0-1.0)
980
980
 
981
981
  # Bundled types:
982
+ ## @visulima/error
983
+ License: MIT
984
+ By: Daniel Bannert
985
+ Repository: git+https://github.com/visulima/visulima.git
986
+
987
+ > MIT License
988
+ >
989
+ > Copyright (c) 2026 visulima
990
+ >
991
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
992
+ > of this software and associated documentation files (the "Software"), to deal
993
+ > in the Software without restriction, including without limitation the rights
994
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
995
+ > copies of the Software, and to permit persons to whom the Software is
996
+ > furnished to do so, subject to the following conditions:
997
+ >
998
+ > The above copyright notice and this permission notice shall be included in all
999
+ > copies or substantial portions of the Software.
1000
+ >
1001
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1002
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1003
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1004
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1005
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1006
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1007
+ > SOFTWARE.
1008
+ >
1009
+ > <!-- DEPENDENCIES -->
1010
+ >
1011
+ > # Licenses of bundled dependencies
1012
+ >
1013
+ > The published @visulima/error artifact additionally contains code with the following licenses:
1014
+ > MIT
1015
+ >
1016
+ > # Bundled dependencies:
1017
+ >
1018
+ > ## is-plain-obj
1019
+ >
1020
+ > License: MIT
1021
+ > By: Sindre Sorhus
1022
+ > Repository: sindresorhus/is-plain-obj
1023
+ >
1024
+ > > MIT License
1025
+ > >
1026
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
1027
+ > >
1028
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1029
+ > >
1030
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1031
+ > >
1032
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1033
+ >
1034
+ > <!-- /DEPENDENCIES -->
1035
+ >
1036
+ >
1037
+ >
1038
+ > # Licenses of bundled types
1039
+ > The published @visulima/error artifact additionally contains code with the following licenses:
1040
+ > Apache-2.0
1041
+ >
1042
+ > # Bundled types:
1043
+ > ## ai
1044
+ > License: Apache-2.0
1045
+ > Repository: https://github.com/vercel/ai
1046
+ >
1047
+ > > Copyright 2023 Vercel, Inc.
1048
+ > >
1049
+ > > Licensed under the Apache License, Version 2.0 (the "License");
1050
+ > > you may not use this file except in compliance with the License.
1051
+ > > You may obtain a copy of the License at
1052
+ > >
1053
+ > > http://www.apache.org/licenses/LICENSE-2.0
1054
+ > >
1055
+ > > Unless required by applicable law or agreed to in writing, software
1056
+ > > distributed under the License is distributed on an "AS IS" BASIS,
1057
+ > > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1058
+ > > See the License for the specific language governing permissions and
1059
+ > > limitations under the License.
1060
+
1061
+ ---------------------------------------
1062
+
1063
+ ## @visulima/fmt
1064
+ License: MIT
1065
+ By: Daniel Bannert
1066
+ Repository: git+https://github.com/visulima/visulima.git
1067
+
1068
+ > MIT License
1069
+ >
1070
+ > Copyright (c) 2026 visulima
1071
+ >
1072
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1073
+ > of this software and associated documentation files (the "Software"), to deal
1074
+ > in the Software without restriction, including without limitation the rights
1075
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1076
+ > copies of the Software, and to permit persons to whom the Software is
1077
+ > furnished to do so, subject to the following conditions:
1078
+ >
1079
+ > The above copyright notice and this permission notice shall be included in all
1080
+ > copies or substantial portions of the Software.
1081
+ >
1082
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1083
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1084
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1085
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1086
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1087
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1088
+ > SOFTWARE.
1089
+ >
1090
+ > <!-- DEPENDENCIES -->
1091
+ > <!-- /DEPENDENCIES -->
1092
+
1093
+ ---------------------------------------
1094
+
1095
+ ## @visulima/inspector
1096
+ License: MIT
1097
+ By: Daniel Bannert
1098
+ Repository: git+https://github.com/visulima/visulima.git
1099
+
1100
+ > MIT License
1101
+ >
1102
+ > Copyright (c) 2026 visulima
1103
+ >
1104
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1105
+ > of this software and associated documentation files (the "Software"), to deal
1106
+ > in the Software without restriction, including without limitation the rights
1107
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1108
+ > copies of the Software, and to permit persons to whom the Software is
1109
+ > furnished to do so, subject to the following conditions:
1110
+ >
1111
+ > The above copyright notice and this permission notice shall be included in all
1112
+ > copies or substantial portions of the Software.
1113
+ >
1114
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1115
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1116
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1117
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1118
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1119
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1120
+ > SOFTWARE.
1121
+ >
1122
+ > ---
1123
+ >
1124
+ > Modified code from the original [loupe](https://github.com/chaijs/loupe/tree/main) repository.
1125
+ >
1126
+ > (The MIT License)
1127
+ >
1128
+ > Copyright (c) 2011-2013 Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)
1129
+ >
1130
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1131
+ >
1132
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1133
+ >
1134
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1135
+ >
1136
+ > <!-- DEPENDENCIES -->
1137
+ > <!-- /DEPENDENCIES -->
1138
+ >
1139
+ >
1140
+ >
1141
+ > # Licenses of bundled types
1142
+ > The published @visulima/inspector artifact additionally contains code with the following licenses:
1143
+ > (MIT OR CC0-1.0)
1144
+ >
1145
+ > # Bundled types:
1146
+ > ## type-fest
1147
+ > License: (MIT OR CC0-1.0)
1148
+ > By: Sindre Sorhus
1149
+ > Repository: sindresorhus/type-fest
1150
+ >
1151
+ > > Creative Commons Legal Code
1152
+ > >
1153
+ > > CC0 1.0 Universal
1154
+ > >
1155
+ > > CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
1156
+ > > LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
1157
+ > > ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
1158
+ > > INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
1159
+ > > REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
1160
+ > > PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
1161
+ > > THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
1162
+ > > HEREUNDER.
1163
+ > >
1164
+ > > Statement of Purpose
1165
+ > >
1166
+ > > The laws of most jurisdictions throughout the world automatically confer
1167
+ > > exclusive Copyright and Related Rights (defined below) upon the creator
1168
+ > > and subsequent owner(s) (each and all, an "owner") of an original work of
1169
+ > > authorship and/or a database (each, a "Work").
1170
+ > >
1171
+ > > Certain owners wish to permanently relinquish those rights to a Work for
1172
+ > > the purpose of contributing to a commons of creative, cultural and
1173
+ > > scientific works ("Commons") that the public can reliably and without fear
1174
+ > > of later claims of infringement build upon, modify, incorporate in other
1175
+ > > works, reuse and redistribute as freely as possible in any form whatsoever
1176
+ > > and for any purposes, including without limitation commercial purposes.
1177
+ > > These owners may contribute to the Commons to promote the ideal of a free
1178
+ > > culture and the further production of creative, cultural and scientific
1179
+ > > works, or to gain reputation or greater distribution for their Work in
1180
+ > > part through the use and efforts of others.
1181
+ > >
1182
+ > > For these and/or other purposes and motivations, and without any
1183
+ > > expectation of additional consideration or compensation, the person
1184
+ > > associating CC0 with a Work (the "Affirmer"), to the extent that he or she
1185
+ > > is an owner of Copyright and Related Rights in the Work, voluntarily
1186
+ > > elects to apply CC0 to the Work and publicly distribute the Work under its
1187
+ > > terms, with knowledge of his or her Copyright and Related Rights in the
1188
+ > > Work and the meaning and intended legal effect of CC0 on those rights.
1189
+ > >
1190
+ > > 1. Copyright and Related Rights. A Work made available under CC0 may be
1191
+ > > protected by copyright and related or neighboring rights ("Copyright and
1192
+ > > Related Rights"). Copyright and Related Rights include, but are not
1193
+ > > limited to, the following:
1194
+ > >
1195
+ > > i. the right to reproduce, adapt, distribute, perform, display,
1196
+ > > communicate, and translate a Work;
1197
+ > > ii. moral rights retained by the original author(s) and/or performer(s);
1198
+ > > iii. publicity and privacy rights pertaining to a person's image or
1199
+ > > likeness depicted in a Work;
1200
+ > > iv. rights protecting against unfair competition in regards to a Work,
1201
+ > > subject to the limitations in paragraph 4(a), below;
1202
+ > > v. rights protecting the extraction, dissemination, use and reuse of data
1203
+ > > in a Work;
1204
+ > > vi. database rights (such as those arising under Directive 96/9/EC of the
1205
+ > > European Parliament and of the Council of 11 March 1996 on the legal
1206
+ > > protection of databases, and under any national implementation
1207
+ > > thereof, including any amended or successor version of such
1208
+ > > directive); and
1209
+ > > vii. other similar, equivalent or corresponding rights throughout the
1210
+ > > world based on applicable law or treaty, and any national
1211
+ > > implementations thereof.
1212
+ > >
1213
+ > > 2. Waiver. To the greatest extent permitted by, but not in contravention
1214
+ > > of, applicable law, Affirmer hereby overtly, fully, permanently,
1215
+ > > irrevocably and unconditionally waives, abandons, and surrenders all of
1216
+ > > Affirmer's Copyright and Related Rights and associated claims and causes
1217
+ > > of action, whether now known or unknown (including existing as well as
1218
+ > > future claims and causes of action), in the Work (i) in all territories
1219
+ > > worldwide, (ii) for the maximum duration provided by applicable law or
1220
+ > > treaty (including future time extensions), (iii) in any current or future
1221
+ > > medium and for any number of copies, and (iv) for any purpose whatsoever,
1222
+ > > including without limitation commercial, advertising or promotional
1223
+ > > purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
1224
+ > > member of the public at large and to the detriment of Affirmer's heirs and
1225
+ > > successors, fully intending that such Waiver shall not be subject to
1226
+ > > revocation, rescission, cancellation, termination, or any other legal or
1227
+ > > equitable action to disrupt the quiet enjoyment of the Work by the public
1228
+ > > as contemplated by Affirmer's express Statement of Purpose.
1229
+ > >
1230
+ > > 3. Public License Fallback. Should any part of the Waiver for any reason
1231
+ > > be judged legally invalid or ineffective under applicable law, then the
1232
+ > > Waiver shall be preserved to the maximum extent permitted taking into
1233
+ > > account Affirmer's express Statement of Purpose. In addition, to the
1234
+ > > extent the Waiver is so judged Affirmer hereby grants to each affected
1235
+ > > person a royalty-free, non transferable, non sublicensable, non exclusive,
1236
+ > > irrevocable and unconditional license to exercise Affirmer's Copyright and
1237
+ > > Related Rights in the Work (i) in all territories worldwide, (ii) for the
1238
+ > > maximum duration provided by applicable law or treaty (including future
1239
+ > > time extensions), (iii) in any current or future medium and for any number
1240
+ > > of copies, and (iv) for any purpose whatsoever, including without
1241
+ > > limitation commercial, advertising or promotional purposes (the
1242
+ > > "License"). The License shall be deemed effective as of the date CC0 was
1243
+ > > applied by Affirmer to the Work. Should any part of the License for any
1244
+ > > reason be judged legally invalid or ineffective under applicable law, such
1245
+ > > partial invalidity or ineffectiveness shall not invalidate the remainder
1246
+ > > of the License, and in such case Affirmer hereby affirms that he or she
1247
+ > > will not (i) exercise any of his or her remaining Copyright and Related
1248
+ > > Rights in the Work or (ii) assert any associated claims and causes of
1249
+ > > action with respect to the Work, in either case contrary to Affirmer's
1250
+ > > express Statement of Purpose.
1251
+ > >
1252
+ > > 4. Limitations and Disclaimers.
1253
+ > >
1254
+ > > a. No trademark or patent rights held by Affirmer are waived, abandoned,
1255
+ > > surrendered, licensed or otherwise affected by this document.
1256
+ > > b. Affirmer offers the Work as-is and makes no representations or
1257
+ > > warranties of any kind concerning the Work, express, implied,
1258
+ > > statutory or otherwise, including without limitation warranties of
1259
+ > > title, merchantability, fitness for a particular purpose, non
1260
+ > > infringement, or the absence of latent or other defects, accuracy, or
1261
+ > > the present or absence of errors, whether or not discoverable, all to
1262
+ > > the greatest extent permissible under applicable law.
1263
+ > > c. Affirmer disclaims responsibility for clearing rights of other persons
1264
+ > > that may apply to the Work or any use thereof, including without
1265
+ > > limitation any person's Copyright and Related Rights in the Work.
1266
+ > > Further, Affirmer disclaims responsibility for obtaining any necessary
1267
+ > > consents, permissions or other rights required for any use of the
1268
+ > > Work.
1269
+ > > d. Affirmer understands and acknowledges that Creative Commons is not a
1270
+ > > party to this document and has no duty or obligation with respect to
1271
+ > > this CC0 or use of the Work.
1272
+
1273
+ ---------------------------------------
1274
+
1275
+ ## @visulima/redact
1276
+ License: MIT
1277
+ By: Daniel Bannert
1278
+ Repository: git+https://github.com/visulima/visulima.git
1279
+
1280
+ > MIT License
1281
+ >
1282
+ > Copyright (c) 2026 visulima
1283
+ >
1284
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1285
+ > of this software and associated documentation files (the "Software"), to deal
1286
+ > in the Software without restriction, including without limitation the rights
1287
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1288
+ > copies of the Software, and to permit persons to whom the Software is
1289
+ > furnished to do so, subject to the following conditions:
1290
+ >
1291
+ > The above copyright notice and this permission notice shall be included in all
1292
+ > copies or substantial portions of the Software.
1293
+ >
1294
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1295
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1296
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1297
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1298
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1299
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1300
+ > SOFTWARE.
1301
+ >
1302
+ > <!-- DEPENDENCIES -->
1303
+ >
1304
+ > # Licenses of bundled dependencies
1305
+ > The published @visulima/redact artifact additionally contains code with the following licenses:
1306
+ > MIT
1307
+ >
1308
+ > # Bundled dependencies:
1309
+ > ## dot-prop
1310
+ > License: MIT
1311
+ > By: Sindre Sorhus
1312
+ > Repository: sindresorhus/dot-prop
1313
+ >
1314
+ > > MIT License
1315
+ > >
1316
+ > > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
1317
+ > >
1318
+ > > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
1319
+ > >
1320
+ > > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
1321
+ > >
1322
+ > > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1323
+ >
1324
+ > <!-- /DEPENDENCIES -->
1325
+
1326
+ ---------------------------------------
1327
+
982
1328
  ## safe-stable-stringify
983
1329
  License: MIT
984
1330
  By: Ruben Bridgewater
package/README.md CHANGED
@@ -180,6 +180,23 @@ pail.complete({
180
180
 
181
181
  ![usage](./__assets__/usage.png)
182
182
 
183
+ ### Which build `@visulima/pail` resolves to
184
+
185
+ The `.` entry point picks a build from the export conditions your runtime or bundler sets:
186
+
187
+ | Runtime | Condition matched | Build | Default reporter |
188
+ | ------------------------------------------- | ------------------------ | ----------------------- | ---------------------- |
189
+ | Node.js, Bun, Deno (Node compat) | `import` | `dist/index.server.js` | Pretty (stdout/stderr) |
190
+ | Browsers and bundlers targeting the browser | `browser` | `dist/index.browser.js` | JSON (console) |
191
+ | Cloudflare Workers, Vercel Edge | `workerd` / `edge-light` | `dist/index.browser.js` | JSON (console) |
192
+
193
+ The server build writes to `process.stdout` / `process.stderr` and measures the terminal, so it needs
194
+ Node's core modules. Edge runtimes get the console-based build instead, which keeps `.` importable on
195
+ Cloudflare Workers **without** the `nodejs_compat` flag and on Vercel Edge.
196
+
197
+ Importing `@visulima/pail/server` always gives you the server build, on every runtime — use it only
198
+ where Node core is available (on Cloudflare Workers that means enabling `nodejs_compat`).
199
+
183
200
  ### Custom Loggers
184
201
 
185
202
  To create a custom logger define an `options` object yielding a types field with the logger data and pass it as argument to the createPail function.
package/dist/error.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Options for creating a PailError.
3
- *
4
- * Extends standard error properties with self-documenting fields
5
- * that provide actionable context for debugging, particularly useful
6
- * for AI-assisted log analysis.
7
- */
2
+ * Options for creating a PailError.
3
+ *
4
+ * Extends standard error properties with self-documenting fields
5
+ * that provide actionable context for debugging, particularly useful
6
+ * for AI-assisted log analysis.
7
+ */
8
8
  interface PailErrorOptions {
9
9
  /** The root cause of this error */
10
10
  cause?: unknown;
@@ -20,41 +20,41 @@ interface PailErrorOptions {
20
20
  why?: string;
21
21
  }
22
22
  /**
23
- * Self-documenting error class for structured logging.
24
- *
25
- * Inspired by evlog's structured error approach, PailError extends the native
26
- * Error class with additional fields that make log entries immediately actionable:
27
- * - `why`: Explains what caused the failure
28
- * - `fix`: Suggests how to resolve the issue
29
- * - `link`: Points to relevant documentation
30
- * - `status`: HTTP status code for request-related errors
31
- *
32
- * These fields are preserved through the logging pipeline and displayed by reporters,
33
- * making it easier for both humans and AI agents to understand and resolve issues.
34
- * @example
35
- * ```typescript
36
- * import { PailError, createPailError } from "@visulima/pail/error";
37
- *
38
- * // Using the class directly
39
- * throw new PailError({
40
- * message: "Payment processing failed",
41
- * status: 402,
42
- * why: "The customer's card was declined by the payment provider",
43
- * fix: "Retry with a different payment method or contact the card issuer",
44
- * link: "https://docs.example.com/payments/declined",
45
- * });
46
- *
47
- * // Using the factory function
48
- * throw createPailError("Connection timeout");
49
- *
50
- * // With full options
51
- * throw createPailError({
52
- * message: "Database connection failed",
53
- * why: "Connection pool exhausted after 30s timeout",
54
- * fix: "Increase pool size or check for connection leaks",
55
- * });
56
- * ```
57
- */
23
+ * Self-documenting error class for structured logging.
24
+ *
25
+ * Inspired by evlog's structured error approach, PailError extends the native
26
+ * Error class with additional fields that make log entries immediately actionable:
27
+ * - `why`: Explains what caused the failure
28
+ * - `fix`: Suggests how to resolve the issue
29
+ * - `link`: Points to relevant documentation
30
+ * - `status`: HTTP status code for request-related errors
31
+ *
32
+ * These fields are preserved through the logging pipeline and displayed by reporters,
33
+ * making it easier for both humans and AI agents to understand and resolve issues.
34
+ * @example
35
+ * ```typescript
36
+ * import { PailError, createPailError } from "@visulima/pail/error";
37
+ *
38
+ * // Using the class directly
39
+ * throw new PailError({
40
+ * message: "Payment processing failed",
41
+ * status: 402,
42
+ * why: "The customer's card was declined by the payment provider",
43
+ * fix: "Retry with a different payment method or contact the card issuer",
44
+ * link: "https://docs.example.com/payments/declined",
45
+ * });
46
+ *
47
+ * // Using the factory function
48
+ * throw createPailError("Connection timeout");
49
+ *
50
+ * // With full options
51
+ * throw createPailError({
52
+ * message: "Database connection failed",
53
+ * why: "Connection pool exhausted after 30s timeout",
54
+ * fix: "Increase pool size or check for connection leaks",
55
+ * });
56
+ * ```
57
+ */
58
58
  declare class PailError extends Error {
59
59
  /** HTTP status code (defaults to 500) */
60
60
  readonly status: number;
@@ -66,38 +66,38 @@ declare class PailError extends Error {
66
66
  readonly link: string | undefined;
67
67
  constructor(options: PailErrorOptions | string);
68
68
  /**
69
- * Converts the error to a JSON-serializable object.
70
- *
71
- * Includes all self-documenting fields in the output for structured logging.
72
- * @returns A plain object representation of the error
73
- */
69
+ * Converts the error to a JSON-serializable object.
70
+ *
71
+ * Includes all self-documenting fields in the output for structured logging.
72
+ * @returns A plain object representation of the error
73
+ */
74
74
  toJSON(): Record<string, unknown>;
75
75
  /**
76
- * Returns a formatted string representation including self-documenting fields.
77
- * @returns Formatted error string with why/fix/link context
78
- */
76
+ * Returns a formatted string representation including self-documenting fields.
77
+ * @returns Formatted error string with why/fix/link context
78
+ */
79
79
  override toString(): string;
80
80
  }
81
81
  /**
82
- * Factory function for creating PailError instances.
83
- *
84
- * A convenient shorthand for creating PailError objects. Accepts either
85
- * a string message or a full PailErrorOptions object.
86
- * @param options Error message string or PailErrorOptions object
87
- * @returns A new PailError instance
88
- * @example
89
- * ```typescript
90
- * import { createPailError } from "@visulima/pail/error";
91
- *
92
- * throw createPailError("Something went wrong");
93
- *
94
- * throw createPailError({
95
- * message: "Auth failed",
96
- * status: 401,
97
- * why: "Token expired",
98
- * fix: "Refresh the authentication token",
99
- * });
100
- * ```
101
- */
82
+ * Factory function for creating PailError instances.
83
+ *
84
+ * A convenient shorthand for creating PailError objects. Accepts either
85
+ * a string message or a full PailErrorOptions object.
86
+ * @param options Error message string or PailErrorOptions object
87
+ * @returns A new PailError instance
88
+ * @example
89
+ * ```typescript
90
+ * import { createPailError } from "@visulima/pail/error";
91
+ *
92
+ * throw createPailError("Something went wrong");
93
+ *
94
+ * throw createPailError({
95
+ * message: "Auth failed",
96
+ * status: 401,
97
+ * why: "Token expired",
98
+ * fix: "Refresh the authentication token",
99
+ * });
100
+ * ```
101
+ */
102
102
  declare const createPailError: (options: PailErrorOptions | string) => PailError;
103
103
  export { PailError, type PailErrorOptions, createPailError };