Installations
npm install fastify-locks
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
21.4.0
NPM Version
10.2.4
Score
61.6
Supply Chain
77.3
Quality
77.5
Maintenance
100
Vulnerability
99.6
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (63.01%)
TypeScript (36.99%)
Developer
piscinajs
Download Statistics
Total Downloads
1,353
Last Day
1
Last Week
38
Last Month
74
Last Year
718
GitHub Statistics
10 Stars
4 Commits
2 Forks
5 Watching
3 Branches
4 Contributors
Package Meta Information
Latest Version
3.0.0
Package Id
fastify-locks@3.0.0
Unpacked Size
13.93 kB
Size
6.11 kB
File Count
15
NPM Version
10.2.4
Node Version
21.4.0
Publised On
21 Dec 2023
Total Downloads
Cumulative downloads
Total Downloads
1,353
Last day
0%
1
Compared to previous day
Last week
171.4%
38
Compared to previous week
Last month
25.4%
74
Compared to previous month
Last year
203%
718
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
7
fastify-locks - A Piscina Locks plugin for Fastify
Example
1const fastify = require('fastify')(); 2 3fastify.register(require('fastify-locks'), {}); 4 5// Declare a route 6fastify.get('/', async (request, reply) => { 7 await fastify.locks.request('hello', () => { 8 // Do something that requires an exclusive lock, 9 // such as updating a shared resource. 10 }); 11 reply.send('hello world'); 12}); 13 14// Run the server! 15fastify.listen(3000, function (err, address) { 16 if (err) { 17 fastify.log.error(err); 18 process.exit(1); 19 } 20 fastify.log.info(`server listening on ${address}`); 21});
Once registered, the plugin decorates the fastify
instance
with a new locks
property:
fastify.locks.request(name[, options], callback)
fastify.locks.query()
See the Piscina-locks docs for more information.
The Team
- James M Snell jasnell@gmail.com
Acknowledgements
Piscina development is sponsored by NearForm Research.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/ci.yml:1
- Info: no jobLevel write permissions found
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/piscinajs/fastify-locks/ci.yml/current?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/piscinajs/fastify-locks/ci.yml/current?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:23
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
3.8
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More