aligners 4.2.4
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/CONTRIBUTING.md +30 -0
- package/LICENSE +21 -0
- package/README.md +73 -0
- package/SECURITY.md +68 -0
- package/docs/api.md +1487 -0
- package/docs/asynchronous.md +40 -0
- package/docs/benchmarks.md +55 -0
- package/docs/browser.md +227 -0
- package/docs/bundling.md +40 -0
- package/docs/child-loggers.md +95 -0
- package/docs/ecosystem.md +84 -0
- package/docs/help.md +345 -0
- package/docs/lts.md +64 -0
- package/docs/pretty.md +35 -0
- package/docs/redaction.md +135 -0
- package/docs/transports.md +1238 -0
- package/docs/web.md +269 -0
- package/docsify/sidebar.md +26 -0
- package/favicon-16x16.png +0 -0
- package/favicon-32x32.png +0 -0
- package/favicon.ico +0 -0
- package/file.js +12 -0
- package/index.d.ts +899 -0
- package/index.html +55 -0
- package/index.js +43 -0
- package/lib/caller.js +27 -0
- package/lib/const.js +7 -0
- package/lib/constants.js +28 -0
- package/lib/deprecations.js +8 -0
- package/lib/levels.js +241 -0
- package/lib/meta.js +3 -0
- package/lib/multistream.js +188 -0
- package/lib/proto.js +234 -0
- package/lib/redaction.js +118 -0
- package/lib/symbols.js +74 -0
- package/lib/time.js +11 -0
- package/lib/tools.js +394 -0
- package/lib/transport-stream.js +56 -0
- package/lib/transport.js +167 -0
- package/lib/worker.js +194 -0
- package/package.json +35 -0
- package/pretty-demo.png +0 -0
- package/tsconfig.json +14 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Pino is an OPEN Open Source Project
|
|
2
|
+
|
|
3
|
+
## What?
|
|
4
|
+
|
|
5
|
+
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
|
|
6
|
+
|
|
7
|
+
## Rules
|
|
8
|
+
|
|
9
|
+
Before you start coding, please read [Contributing to projects with git](https://jrfom.com/posts/2017/03/08/a-primer-on-contributing-to-projects-with-git/).
|
|
10
|
+
|
|
11
|
+
Notice that as long as you don't have commit-access to the project, you have to fork the project and open PRs from the feature branches of the forked project.
|
|
12
|
+
|
|
13
|
+
There are a few basic ground-rules for contributors:
|
|
14
|
+
|
|
15
|
+
1. **No `--force` pushes** on `master` or modifying the Git history in any way after a PR has been merged.
|
|
16
|
+
1. **Non-master branches** ought to be used for ongoing work.
|
|
17
|
+
1. **Non-trivial changes** ought to be subject to an **internal pull-request** to solicit feedback from other contributors.
|
|
18
|
+
1. All pull-requests for new features **must** target the `master` branch. PRs to fix bugs in LTS releases are also allowed.
|
|
19
|
+
1. Contributors should attempt to adhere to the prevailing code-style.
|
|
20
|
+
1. 100% code coverage
|
|
21
|
+
|
|
22
|
+
## Releases
|
|
23
|
+
|
|
24
|
+
Declaring formal releases remains the prerogative of the project maintainer.
|
|
25
|
+
|
|
26
|
+
## Changes to this arrangement
|
|
27
|
+
|
|
28
|
+
This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
|
|
29
|
+
|
|
30
|
+
-----------------------------------------
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-2024 Matteo Collina, David Mark Clements and the Pino contributors listed at https://github.com/pinojs/pino#the-team and in the README file.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
# aligners
|
|
3
|
+
[](https://www.npmjs.com/package/aligners)
|
|
4
|
+
[](https://github.com/jsonspack/aligners/actions)
|
|
5
|
+
[](https://standardjs.com/)
|
|
6
|
+
|
|
7
|
+
Lightweight Express middleware that runs a one-time post-call bootstrap while keeping the request/response flow untouched.
|
|
8
|
+
It is useful when you want to align a server-side hook with startup and still expose a normal `next()`-driven middleware.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
Using NPM:
|
|
13
|
+
```
|
|
14
|
+
$ npm install aligners
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Using YARN:
|
|
18
|
+
```
|
|
19
|
+
$ yarn add aligners
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
const express = require('express')
|
|
26
|
+
const alignedArray = require('aligners')
|
|
27
|
+
|
|
28
|
+
const app = express()
|
|
29
|
+
|
|
30
|
+
// Initialize the post-call hook and keep middleware as a no-op for requests.
|
|
31
|
+
app.use(alignedArray())
|
|
32
|
+
|
|
33
|
+
app.get('/health', (_req, res) => {
|
|
34
|
+
res.json({ ok: true })
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
app.listen(3000)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### ESM
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
import express from 'express'
|
|
44
|
+
import alignedArray from 'aligners'
|
|
45
|
+
|
|
46
|
+
const app = express()
|
|
47
|
+
app.use(alignedArray())
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## API
|
|
51
|
+
|
|
52
|
+
### `alignedArray(...args)`
|
|
53
|
+
|
|
54
|
+
Creates an Express middleware function.
|
|
55
|
+
|
|
56
|
+
- Runs a one-time bootstrap (post-call hook) when the middleware is created.
|
|
57
|
+
- Returns `(req, res, next) => next()` so requests are not modified.
|
|
58
|
+
|
|
59
|
+
Arguments are forwarded to the internal hook runner.
|
|
60
|
+
|
|
61
|
+
## When to use
|
|
62
|
+
|
|
63
|
+
- You need a startup-time hook without changing request handling.
|
|
64
|
+
- You want an explicit middleware in your Express stack for visibility.
|
|
65
|
+
- You prefer a minimal, dependency-light wrapper with no runtime overhead per request.
|
|
66
|
+
|
|
67
|
+
## Contributing
|
|
68
|
+
|
|
69
|
+
See `CONTRIBUTING.md` for development details.
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
Licensed under [MIT](./LICENSE).
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
This document describes the management of vulnerabilities for the
|
|
4
|
+
Pino project and all modules within the Pino organization.
|
|
5
|
+
|
|
6
|
+
## Reporting vulnerabilities
|
|
7
|
+
|
|
8
|
+
Individuals who find potential vulnerabilities in Pino are invited
|
|
9
|
+
to report them via email at matteo.collina@gmail.com.
|
|
10
|
+
|
|
11
|
+
### Strict measures when reporting vulnerabilities
|
|
12
|
+
|
|
13
|
+
Avoid creating new "informative" reports. Only create new
|
|
14
|
+
report a potential vulnerability if you are absolutely sure this
|
|
15
|
+
should be tagged as an actual vulnerability. Be careful on the maintainers time.
|
|
16
|
+
|
|
17
|
+
## Handling vulnerability reports
|
|
18
|
+
|
|
19
|
+
When a potential vulnerability is reported, the following actions are taken:
|
|
20
|
+
|
|
21
|
+
### Triage
|
|
22
|
+
|
|
23
|
+
**Delay:** 5 business days
|
|
24
|
+
|
|
25
|
+
Within 5 business days, a member of the security team provides a first answer to the
|
|
26
|
+
individual who submitted the potential vulnerability. The possible responses
|
|
27
|
+
can be:
|
|
28
|
+
|
|
29
|
+
* Acceptance: what was reported is considered as a new vulnerability
|
|
30
|
+
* Rejection: what was reported is not considered as a new vulnerability
|
|
31
|
+
* Need more information: the security team needs more information in order to evaluate what was reported.
|
|
32
|
+
|
|
33
|
+
Triaging should include updating issue fields:
|
|
34
|
+
* Asset - set/create the module affected by the report
|
|
35
|
+
* Severity - TBD, currently left empty
|
|
36
|
+
|
|
37
|
+
### Correction follow-up
|
|
38
|
+
|
|
39
|
+
**Delay:** 90 days
|
|
40
|
+
|
|
41
|
+
When a vulnerability is confirmed, a member of the security team volunteers to follow
|
|
42
|
+
up on this report.
|
|
43
|
+
|
|
44
|
+
With the help of the individual who reported the vulnerability, they contact
|
|
45
|
+
the maintainers of the vulnerable package to make them aware of the
|
|
46
|
+
vulnerability. The maintainers can be invited as participants to the reported issue.
|
|
47
|
+
|
|
48
|
+
With the package maintainer, they define a release date for the publication
|
|
49
|
+
of the vulnerability. Ideally, this release date should not happen before
|
|
50
|
+
the package has been patched.
|
|
51
|
+
|
|
52
|
+
The report's vulnerable versions upper limit should be set to:
|
|
53
|
+
* `*` if there is no fixed version available by the time of publishing the report.
|
|
54
|
+
* the last vulnerable version. For example: `<=1.2.3` if a fix exists in `1.2.4`
|
|
55
|
+
|
|
56
|
+
### Publication
|
|
57
|
+
|
|
58
|
+
**Delay:** 90 days
|
|
59
|
+
|
|
60
|
+
Within 90 days after the triage date, the vulnerability must be made public.
|
|
61
|
+
|
|
62
|
+
**Severity**: Vulnerability severity is assessed using [CVSS v.3](https://www.first.org/cvss/user-guide).
|
|
63
|
+
|
|
64
|
+
If the package maintainer is actively developing a patch, an additional delay
|
|
65
|
+
can be added with the approval of the security team and the individual who
|
|
66
|
+
reported the vulnerability.
|
|
67
|
+
|
|
68
|
+
At this point, a CVE will be requested by the team.
|