Gathering detailed insights and metrics for slonik-interceptor-preset
Gathering detailed insights and metrics for slonik-interceptor-preset
Gathering detailed insights and metrics for slonik-interceptor-preset
Gathering detailed insights and metrics for slonik-interceptor-preset
npm install slonik-interceptor-preset
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
8 Stars
19 Commits
3 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Aug 21, 2023
Latest Version
1.2.10
Package Id
slonik-interceptor-preset@1.2.10
Unpacked Size
17.04 kB
Size
4.38 kB
File Count
16
NPM Version
6.13.7
Node Version
13.8.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
Slonik interceptor preset.
Slonik functionality is extendable using interceptors. Each interceptor is contained in a separate package. Installing and configuring each interceptor becomes a tedious task when using Slonik across multiple projects. slonik-interceptor-preset
provides a factory function (createInterceptors
) for constructing a collection of selected interceptors.
slonik-interceptor-preset
installs these presets:
Name | Description |
---|---|
slonik-interceptor-field-name-transformation | Transforms Slonik query result field names. |
slonik-interceptor-query-benchmarking | Benchmarks Slonik queries. |
slonik-interceptor-query-logging | Logs Slonik queries. |
slonik-interceptor-query-normalisation | Normalises Slonik queries. |
Each interceptor can be selectively enabled/ disabled (see API).
1import { 2 createInterceptors 3} from 'slonik-interceptor-preset'; 4
1/** 2 * @property benchmarkQueries Dictates whether to enable the [query benchmarking interceptor](https://github.com/gajus/slonik-interceptor-query-benchmarking). (Default: false) 3 * @property logQueries Dictates whether to enable the [query logging interceptor](https://github.com/gajus/slonik-interceptor-query-logging). (Default: true) 4 * @property normaliseQueries Dictates whether to enable the [query normalisation interceptor](https://github.com/gajus/slonik-interceptor-query-normalisation). (Default: true) 5 * @property transformFieldNames Dictates whether to enable the [field name transformation interceptor](https://github.com/gajus/slonik-interceptor-field-name-transformation). (Default: true) 6 */ 7type UserConfigurationType = {| 8 +benchmarkQueries: boolean, 9 +logQueries: boolean, 10 +normaliseQueries: boolean, 11 +transformFieldNames: boolean 12|}; 13 14(userConfiguration: UserConfigurationType) => $ReadOnlyArray<InterceptorType>; 15
1import { 2 createPool 3} from 'slonik'; 4import { 5 createInterceptors 6} from 'slonik-interceptor-preset'; 7 8const connection = createPool('postgres://', { 9 interceptors: [ 10 ...createInterceptors() 11 ] 12}); 13
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
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