@@ -11,7 +11,7 @@ Scorecard](https://api.securityscorecards.dev/projects/github.com/NodeSecure/sca
1111
1212## Requirements
1313
14- - [ Node.js] ( https://nodejs.org/en/ ) version 20 or higher
14+ - [ Node.js] ( https://nodejs.org/en/ ) version 22 or higher
1515
1616## Getting Started
1717
@@ -47,32 +47,54 @@ await Promise.allSettled(promises);
4747
4848## API
4949
50- See ` types/api.d .ts ` for a complete TypeScript definition.
50+ See [ types.ts ] ( https://github.com/NodeSecure/scanner/blob/master/workspaces/scanner/src/types .ts) for a complete TypeScript definition.
5151
5252``` ts
5353function cwd(
5454 location : string ,
55- options ? : Scanner .Options
55+ options ? : Scanner .CwdOptions ,
56+ logger ? : Scanner .Logger
5657): Promise <Scanner .Payload >;
5758function from(
5859 packageName : string ,
59- options ? : Omit <Scanner .Options , " includeDevDeps" >
60+ options ? : Scanner .FromOptions ,
61+ logger ? : Scanner .Logger
6062): Promise <Scanner .Payload >;
6163function verify(
62- packageName ? : string | null
64+ packageName ? : string
6365): Promise <tarball .ScannedPackageResult >;
6466```
6567
66- ` Options ` is described with the following TypeScript interface :
68+ ` CwdOptions ` and ` FromOptions ` are described with the following TypeScript interfaces :
6769
6870``` ts
71+
72+ type CwdOptions = Options & {
73+ /**
74+ * NPM runtime configuration (such as local .npmrc file)
75+ * It is optionally used to fetch registry authentication tokens
76+ */
77+ npmRcConfig? : Config ;
78+ };
79+
80+ type FromOptions = Omit <Options , " includeDevDeps" >;
81+
6982interface Options {
7083 /**
71- * Maximum tree depth
84+ * Specifies the maximum depth to traverse for each root dependency.
85+ * For example, a value of 2 would mean only traversing dependencies and their immediate dependencies.
7286 *
7387 * @default Infinity
7488 */
75- readonly maxDepth? : number ;
89+ maxDepth? : number ;
90+
91+ /**
92+ * Includes development dependencies in the walk.
93+ * Note that enabling this option can significantly increase I/O and processing time.
94+ *
95+ * @default false
96+ */
97+ includeDevDeps? : boolean ;
7698
7799 readonly registry? : string | URL ;
78100
@@ -103,13 +125,6 @@ interface Options {
103125 contacts: Contact [];
104126 };
105127
106- /**
107- * Include project devDependencies (only available for cwd command)
108- *
109- * @default false
110- */
111- readonly includeDevDeps? : boolean ;
112-
113128 /**
114129 * Vulnerability strategy name (npm, snyk, node)
115130 *
0 commit comments