@visulima/pail 4.0.0-alpha.12 → 4.0.0-alpha.13
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 +16 -0
- package/LICENSE.md +0 -27
- package/dist/error.js +5 -76
- package/dist/index.browser.js +19 -1499
- package/dist/index.server.js +31 -2804
- package/dist/middleware/elysia.d.ts +3 -3
- package/dist/middleware/elysia.js +1 -70
- package/dist/middleware/express.d.ts +3 -3
- package/dist/middleware/express.js +1 -29
- package/dist/middleware/fastify.d.ts +3 -3
- package/dist/middleware/fastify.js +1 -46
- package/dist/middleware/hono.d.ts +3 -3
- package/dist/middleware/hono.js +1 -33
- package/dist/middleware/next/handler.d.ts +5 -5
- package/dist/middleware/next/handler.js +1 -53
- package/dist/middleware/sveltekit.d.ts +3 -3
- package/dist/middleware/sveltekit.js +1 -43
- package/dist/object-tree.js +2 -89
- package/dist/packem_shared/AbstractJsonReporter-BawNFYxI.js +1 -0
- package/dist/packem_shared/AbstractJsonReporter-Dt5-5x2R.js +1 -0
- package/dist/packem_shared/JsonReporter-15ln04rX.js +2 -0
- package/dist/packem_shared/JsonReporter-CerNvhg-.js +1 -0
- package/dist/packem_shared/PrettyReporter-Br5njEEy.js +5 -0
- package/dist/packem_shared/PrettyReporter-CgXnwIip.js +44 -0
- package/dist/packem_shared/{abstract-json-reporter.d-BAgznjyU.d.ts → abstract-json-reporter.d-Bz3lZEDi.d.ts} +1 -1
- package/dist/packem_shared/abstract-pretty-reporter-BiHgKxG_.js +33 -0
- package/dist/packem_shared/constants-DKfCaSUR.js +1 -0
- package/dist/packem_shared/constants-ep2nsfdy.js +1 -0
- package/dist/packem_shared/{create-middleware-logger.d-DheMh8q4.d.ts → create-middleware-logger.d-DeNLii5l.d.ts} +2 -2
- package/dist/packem_shared/createPailError-53jAfQ-T.js +5 -0
- package/dist/packem_shared/headers-S8WyX-2m.js +1 -0
- package/dist/packem_shared/index-Bzp4LnJ5.js +1 -0
- package/dist/packem_shared/pailMiddleware-CWOJRmJq.js +1 -0
- package/dist/packem_shared/storage-DHM1EP2P.js +1 -0
- package/dist/packem_shared/{types.d-BeLumqgD.d.ts → types.d-ByY2ZuYG.d.ts} +1 -1
- package/dist/packem_shared/useLogger-qyZrjy4D.js +1 -0
- package/dist/packem_shared/{wide-event.d-B-t8ZnhI.d.ts → wide-event.d-Ke44zirU.d.ts} +1 -1
- package/dist/packem_shared/write-console-log-based-on-level-DfD64owL.js +1 -0
- package/dist/packem_shared/write-stream-Dd4_PTcm.js +1 -0
- package/dist/processor/caller/caller-processor.d.ts +1 -1
- package/dist/processor/caller/caller-processor.js +1 -59
- package/dist/processor/environment-processor.d.ts +1 -1
- package/dist/processor/environment-processor.js +1 -82
- package/dist/processor/message-formatter-processor.d.ts +1 -1
- package/dist/processor/message-formatter-processor.js +1 -715
- package/dist/processor/opentelemetry-processor.d.ts +1 -1
- package/dist/processor/opentelemetry-processor.js +1 -52
- package/dist/processor/redact-processor.d.ts +1 -1
- package/dist/processor/redact-processor.js +1 -31
- package/dist/processor/sampling-processor.d.ts +1 -1
- package/dist/processor/sampling-processor.js +1 -59
- package/dist/reporter/file/json-file-reporter.d.ts +2 -2
- package/dist/reporter/file/json-file-reporter.js +2 -136
- package/dist/reporter/http/abstract-http-reporter.d.ts +2 -2
- package/dist/reporter/http/abstract-http-reporter.js +2 -432
- package/dist/reporter/http/http-reporter.d.ts +2 -2
- package/dist/reporter/http/http-reporter.edge-light.js +2 -728
- package/dist/reporter/http/http-reporter.js +1 -13
- package/dist/reporter/json/index.browser.js +1 -2
- package/dist/reporter/json/index.d.ts +2 -2
- package/dist/reporter/json/index.js +1 -2
- package/dist/reporter/pretty/index.browser.js +1 -1
- package/dist/reporter/pretty/index.d.ts +3 -36
- package/dist/reporter/pretty/index.js +1 -1
- package/dist/reporter/simple/simple-reporter.server.d.ts +1 -1
- package/dist/reporter/simple/simple-reporter.server.js +8 -183
- package/dist/wide-event.d.ts +2 -2
- package/dist/wide-event.js +1 -284
- package/package.json +24 -24
- package/dist/packem_shared/AbstractJsonReporter-BO8Calb4.js +0 -284
- package/dist/packem_shared/AbstractJsonReporter-nOj0Ft1F.js +0 -284
- package/dist/packem_shared/JsonReporter-CCmj7oYL.js +0 -28
- package/dist/packem_shared/JsonReporter-Ck2PIAEw.js +0 -58
- package/dist/packem_shared/PrettyReporter-CIbrmjUV.js +0 -213
- package/dist/packem_shared/PrettyReporter-CNJEO9g7.js +0 -2723
- package/dist/packem_shared/abstract-pretty-reporter-CkqCt5hg.js +0 -2637
- package/dist/packem_shared/constants-B1RjD_ps.js +0 -99
- package/dist/packem_shared/constants-omsTHUWB.js +0 -119
- package/dist/packem_shared/createPailError-B_sgL0nF.js +0 -76
- package/dist/packem_shared/headers-BxHWM6KI.js +0 -127
- package/dist/packem_shared/index-6cG1Kp0t.js +0 -658
- package/dist/packem_shared/pailMiddleware-Ci88geIF.js +0 -24
- package/dist/packem_shared/storage-D0vqz8OX.js +0 -36
- package/dist/packem_shared/useLogger-D0rU3lcX.js +0 -33
- package/dist/packem_shared/write-console-log-based-on-level-ree2lDPw.js +0 -15
- package/dist/packem_shared/write-stream-MDqyXmc_.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## @visulima/pail [4.0.0-alpha.13](https://github.com/visulima/visulima/compare/@visulima/pail@4.0.0-alpha.12...@visulima/pail@4.0.0-alpha.13) (2026-05-06)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* **pail:** apply prettier and eslint quote-style auto-fix ([3c15292](https://github.com/visulima/visulima/commit/3c152922610130de7728183efccfb552f2939fdf))
|
|
6
|
+
* **pail:** fix lint errors ([03bcc1f](https://github.com/visulima/visulima/commit/03bcc1f2a5588f6730a71e21d56e280d8e537eca))
|
|
7
|
+
|
|
8
|
+
### Continuous Integration
|
|
9
|
+
|
|
10
|
+
* integrate codspeed for benchmark tracking ([e758f3d](https://github.com/visulima/visulima/commit/e758f3da491cc00d3f8bbf10d7ba3fdf8deb5325))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Dependencies
|
|
14
|
+
|
|
15
|
+
* **@visulima/error:** upgraded to 6.0.0-alpha.16
|
|
16
|
+
|
|
1
17
|
## @visulima/pail [4.0.0-alpha.12](https://github.com/visulima/visulima/compare/@visulima/pail@4.0.0-alpha.11...@visulima/pail@4.0.0-alpha.12) (2026-04-28)
|
|
2
18
|
|
|
3
19
|
### Bug Fixes
|
package/LICENSE.md
CHANGED
|
@@ -75,33 +75,6 @@ Repository: git+https://github.com/visulima/visulima.git
|
|
|
75
75
|
> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
76
76
|
> >
|
|
77
77
|
> > 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.
|
|
78
|
-
>
|
|
79
|
-
>
|
|
80
|
-
>
|
|
81
|
-
>
|
|
82
|
-
>
|
|
83
|
-
> # Licenses of bundled types
|
|
84
|
-
> The published @visulima/error artifact additionally contains code with the following licenses:
|
|
85
|
-
> Apache-2.0
|
|
86
|
-
>
|
|
87
|
-
> # Bundled types:
|
|
88
|
-
> ## ai
|
|
89
|
-
> License: Apache-2.0
|
|
90
|
-
> Repository: git+https://github.com/vercel/ai.git
|
|
91
|
-
>
|
|
92
|
-
> > Copyright 2023 Vercel, Inc.
|
|
93
|
-
> >
|
|
94
|
-
> > Licensed under the Apache License, Version 2.0 (the "License");
|
|
95
|
-
> > you may not use this file except in compliance with the License.
|
|
96
|
-
> > You may obtain a copy of the License at
|
|
97
|
-
> >
|
|
98
|
-
> > http://www.apache.org/licenses/LICENSE-2.0
|
|
99
|
-
> >
|
|
100
|
-
> > Unless required by applicable law or agreed to in writing, software
|
|
101
|
-
> > distributed under the License is distributed on an "AS IS" BASIS,
|
|
102
|
-
> > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
103
|
-
> > See the License for the specific language governing permissions and
|
|
104
|
-
> > limitations under the License.
|
|
105
78
|
|
|
106
79
|
---------------------------------------
|
|
107
80
|
|
package/dist/error.js
CHANGED
|
@@ -1,76 +1,5 @@
|
|
|
1
|
-
class
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Suggested resolution steps */
|
|
7
|
-
fix;
|
|
8
|
-
/** Link to relevant documentation */
|
|
9
|
-
link;
|
|
10
|
-
constructor(options) {
|
|
11
|
-
const resolvedOptions = typeof options === "string" ? { message: options } : options;
|
|
12
|
-
super(resolvedOptions.message, resolvedOptions.cause === void 0 ? void 0 : { cause: resolvedOptions.cause });
|
|
13
|
-
this.name = "PailError";
|
|
14
|
-
this.status = resolvedOptions.status ?? 500;
|
|
15
|
-
this.why = resolvedOptions.why;
|
|
16
|
-
this.fix = resolvedOptions.fix;
|
|
17
|
-
this.link = resolvedOptions.link;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Converts the error to a JSON-serializable object.
|
|
21
|
-
*
|
|
22
|
-
* Includes all self-documenting fields in the output for structured logging.
|
|
23
|
-
* @returns A plain object representation of the error
|
|
24
|
-
*/
|
|
25
|
-
toJSON() {
|
|
26
|
-
const json = {
|
|
27
|
-
message: this.message,
|
|
28
|
-
name: this.name,
|
|
29
|
-
status: this.status
|
|
30
|
-
};
|
|
31
|
-
if (this.why) {
|
|
32
|
-
json.why = this.why;
|
|
33
|
-
}
|
|
34
|
-
if (this.fix) {
|
|
35
|
-
json.fix = this.fix;
|
|
36
|
-
}
|
|
37
|
-
if (this.link) {
|
|
38
|
-
json.link = this.link;
|
|
39
|
-
}
|
|
40
|
-
if (this.stack) {
|
|
41
|
-
json.stack = this.stack;
|
|
42
|
-
}
|
|
43
|
-
if (this.cause !== void 0) {
|
|
44
|
-
json.cause = this.cause instanceof Error ? { message: this.cause.message, name: this.cause.name, stack: this.cause.stack } : this.cause;
|
|
45
|
-
}
|
|
46
|
-
return json;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Returns a formatted string representation including self-documenting fields.
|
|
50
|
-
* @returns Formatted error string with why/fix/link context
|
|
51
|
-
*/
|
|
52
|
-
toString() {
|
|
53
|
-
let output = `${this.name} [${String(this.status)}]: ${this.message}`;
|
|
54
|
-
if (this.why) {
|
|
55
|
-
output += `
|
|
56
|
-
Why: ${this.why}`;
|
|
57
|
-
}
|
|
58
|
-
if (this.fix) {
|
|
59
|
-
output += `
|
|
60
|
-
Fix: ${this.fix}`;
|
|
61
|
-
}
|
|
62
|
-
if (this.link) {
|
|
63
|
-
output += `
|
|
64
|
-
Link: ${this.link}`;
|
|
65
|
-
}
|
|
66
|
-
if (this.cause !== void 0) {
|
|
67
|
-
const causeMessage = this.cause instanceof Error ? this.cause.message : String(this.cause);
|
|
68
|
-
output += `
|
|
69
|
-
Cause: ${causeMessage}`;
|
|
70
|
-
}
|
|
71
|
-
return output;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const createPailError = (options) => new PailError(options);
|
|
75
|
-
|
|
76
|
-
export { PailError, createPailError };
|
|
1
|
+
var h=Object.defineProperty;var e=(i,s)=>h(i,"name",{value:s,configurable:!0});var r=Object.defineProperty,a=e((i,s)=>r(i,"name",{value:s,configurable:!0}),"e");class n extends Error{static{e(this,"n")}static{a(this,"PailError")}status;why;fix;link;constructor(s){const t=typeof s=="string"?{message:s}:s;super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="PailError",this.status=t.status??500,this.why=t.why,this.fix=t.fix,this.link=t.link}toJSON(){const s={message:this.message,name:this.name,status:this.status};return this.why&&(s.why=this.why),this.fix&&(s.fix=this.fix),this.link&&(s.link=this.link),this.stack&&(s.stack=this.stack),this.cause!==void 0&&(s.cause=this.cause instanceof Error?{message:this.cause.message,name:this.cause.name,stack:this.cause.stack}:this.cause),s}toString(){let s=`${this.name} [${String(this.status)}]: ${this.message}`;if(this.why&&(s+=`
|
|
2
|
+
Why: ${this.why}`),this.fix&&(s+=`
|
|
3
|
+
Fix: ${this.fix}`),this.link&&(s+=`
|
|
4
|
+
Link: ${this.link}`),this.cause!==void 0){const t=this.cause instanceof Error?this.cause.message:String(this.cause);s+=`
|
|
5
|
+
Cause: ${t}`}return s}}const u=a(i=>new n(i),"createPailError");export{n as PailError,u as createPailError};
|