@cyclonedx/cdxgen 10.3.5 → 10.4.0

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/types/utils.d.ts CHANGED
@@ -4,7 +4,11 @@
4
4
  * @param {string} dirPath Root directory for search
5
5
  * @param {string} pattern Glob pattern (eg: *.gradle)
6
6
  */
7
- export function getAllFiles(dirPath: string, pattern: string, options?: {}): string[];
7
+ export function getAllFiles(
8
+ dirPath: string,
9
+ pattern: string,
10
+ options?: {},
11
+ ): string[];
8
12
  /**
9
13
  * Method to get files matching a pattern
10
14
  *
@@ -12,7 +16,11 @@ export function getAllFiles(dirPath: string, pattern: string, options?: {}): str
12
16
  * @param {string} pattern Glob pattern (eg: *.gradle)
13
17
  * @param {Array} ignoreList Directory patterns to ignore
14
18
  */
15
- export function getAllFilesWithIgnore(dirPath: string, pattern: string, ignoreList: any[]): string[];
19
+ export function getAllFilesWithIgnore(
20
+ dirPath: string,
21
+ pattern: string,
22
+ ignoreList: any[],
23
+ ): string[];
16
24
  /**
17
25
  * Performs a lookup + validation of the license specified in the
18
26
  * package. If the license is a valid SPDX license ID, set the 'id'
@@ -38,8 +46,11 @@ export function addLicenseText(pkg: any, l: any, licenseContent: any): void;
38
46
  * Read the file from the given path to the license text object and includes
39
47
  * content-type attribute, if not default. Returns the license text object.
40
48
  */
41
- export function readLicenseText(licenseFilepath: any, licenseContentType: any): {
42
- content: string;
49
+ export function readLicenseText(
50
+ licenseFilepath: any,
51
+ licenseContentType: any,
52
+ ): {
53
+ content: string;
43
54
  };
44
55
  export function getSwiftPackageMetadata(pkgList: any): Promise<any[]>;
45
56
  /**
@@ -54,16 +65,22 @@ export function getNpmMetadata(pkgList: any[]): Promise<any[]>;
54
65
  * @param {string} pkgJsonFile package.json file
55
66
  * @param {boolean} simple Return a simpler representation of the component by skipping extended attributes and license fetch.
56
67
  */
57
- export function parsePkgJson(pkgJsonFile: string, simple?: boolean): Promise<any[]>;
68
+ export function parsePkgJson(
69
+ pkgJsonFile: string,
70
+ simple?: boolean,
71
+ ): Promise<any[]>;
58
72
  /**
59
73
  * Parse nodejs package lock file
60
74
  *
61
75
  * @param {string} pkgLockFile package-lock.json file
62
76
  * @param {object} options Command line options
63
77
  */
64
- export function parsePkgLock(pkgLockFile: string, options?: object): Promise<{
65
- pkgList: any;
66
- dependenciesList: any;
78
+ export function parsePkgLock(
79
+ pkgLockFile: string,
80
+ options?: object,
81
+ ): Promise<{
82
+ pkgList: any;
83
+ dependenciesList: any;
67
84
  }>;
68
85
  /**
69
86
  * Given a lock file this method would return an Object with the identiy as the key and parsed name and value
@@ -80,8 +97,8 @@ export function yarnLockToIdentMap(lockData: string): {};
80
97
  * @param {string} yarnLockFile yarn.lock file
81
98
  */
82
99
  export function parseYarnLock(yarnLockFile: string): Promise<{
83
- pkgList: any[];
84
- dependenciesList: any[];
100
+ pkgList: any[];
101
+ dependenciesList: any[];
85
102
  }>;
86
103
  /**
87
104
  * Parse nodejs shrinkwrap deps file
@@ -95,16 +112,22 @@ export function parseNodeShrinkwrap(swFile: string): Promise<any[]>;
95
112
  * @param {string} pnpmLock pnpm-lock.yaml file
96
113
  * @param {object} parentComponent parent component
97
114
  */
98
- export function parsePnpmLock(pnpmLock: string, parentComponent?: object): Promise<{
99
- pkgList?: undefined;
100
- dependenciesList?: undefined;
101
- } | {
102
- pkgList: any[];
103
- dependenciesList: {
115
+ export function parsePnpmLock(
116
+ pnpmLock: string,
117
+ parentComponent?: object,
118
+ ): Promise<
119
+ | {
120
+ pkgList?: undefined;
121
+ dependenciesList?: undefined;
122
+ }
123
+ | {
124
+ pkgList: any[];
125
+ dependenciesList: {
104
126
  ref: string;
105
127
  dependsOn: string[];
106
- }[];
107
- }>;
128
+ }[];
129
+ }
130
+ >;
108
131
  /**
109
132
  * Parse bower json file
110
133
  *
@@ -123,42 +146,44 @@ export function parseMinJs(minJsFile: string): Promise<any[]>;
123
146
  * @param {string} pom file to parse
124
147
  */
125
148
  export function parsePom(pomFile: any): {
126
- group: any;
127
- name: any;
128
- version: any;
129
- qualifiers: {
130
- type: string;
131
- };
132
- properties: {
133
- name: string;
149
+ group: any;
150
+ name: any;
151
+ version: any;
152
+ qualifiers: {
153
+ type: string;
154
+ };
155
+ properties: {
156
+ name: string;
157
+ value: any;
158
+ }[];
159
+ evidence: {
160
+ identity: {
161
+ field: string;
162
+ confidence: number;
163
+ methods: {
164
+ technique: string;
165
+ confidence: number;
134
166
  value: any;
135
- }[];
136
- evidence: {
137
- identity: {
138
- field: string;
139
- confidence: number;
140
- methods: {
141
- technique: string;
142
- confidence: number;
143
- value: any;
144
- }[];
145
- };
167
+ }[];
146
168
  };
169
+ };
147
170
  }[];
148
171
  /**
149
172
  * Parse maven tree output
150
173
  * @param {string} rawOutput Raw string output
151
174
  */
152
- export function parseMavenTree(rawOutput: string): {
153
- pkgList?: undefined;
154
- dependenciesList?: undefined;
155
- } | {
156
- pkgList: any[];
157
- dependenciesList: {
175
+ export function parseMavenTree(rawOutput: string):
176
+ | {
177
+ pkgList?: undefined;
178
+ dependenciesList?: undefined;
179
+ }
180
+ | {
181
+ pkgList: any[];
182
+ dependenciesList: {
158
183
  ref: string;
159
184
  dependsOn: any;
160
- }[];
161
- };
185
+ }[];
186
+ };
162
187
  /**
163
188
  * Parse gradle dependencies output
164
189
  * @param {string} rawOutput Raw string output
@@ -166,23 +191,30 @@ export function parseMavenTree(rawOutput: string): {
166
191
  * @param {string} rootProjectName Root project name
167
192
  * @param {string} rootProjectVersion Root project version
168
193
  */
169
- export function parseGradleDep(rawOutput: string, rootProjectGroup?: string, rootProjectName?: string, rootProjectVersion?: string): {
170
- pkgList: {
194
+ export function parseGradleDep(
195
+ rawOutput: string,
196
+ rootProjectGroup?: string,
197
+ rootProjectName?: string,
198
+ rootProjectVersion?: string,
199
+ ):
200
+ | {
201
+ pkgList: {
171
202
  group: any;
172
203
  name: any;
173
204
  version: any;
174
205
  qualifiers: {
175
- type: string;
206
+ type: string;
176
207
  };
177
- }[];
178
- dependenciesList: {
208
+ }[];
209
+ dependenciesList: {
179
210
  ref: string;
180
211
  dependsOn: any;
181
- }[];
182
- } | {
183
- pkgList?: undefined;
184
- dependenciesList?: undefined;
185
- };
212
+ }[];
213
+ }
214
+ | {
215
+ pkgList?: undefined;
216
+ dependenciesList?: undefined;
217
+ };
186
218
  /**
187
219
  * Parse clojure cli dependencies output
188
220
  * @param {string} rawOutput Raw string output
@@ -200,8 +232,8 @@ export function parseLeinMap(node: any, keys_cache: any, deps: any): any;
200
232
  * @param {string} rawOutput Raw string output
201
233
  */
202
234
  export function parseGradleProjects(rawOutput: string): {
203
- rootProject: string;
204
- projects: any[];
235
+ rootProject: string;
236
+ projects: any[];
205
237
  };
206
238
  /**
207
239
  * Parse gradle properties output
@@ -209,13 +241,13 @@ export function parseGradleProjects(rawOutput: string): {
209
241
  * @param {string} rawOutput Raw string output
210
242
  */
211
243
  export function parseGradleProperties(rawOutput: string): {
212
- rootProject: string;
213
- projects: any[];
214
- metadata: {
215
- group: string;
216
- version: string;
217
- properties: any[];
218
- };
244
+ rootProject: string;
245
+ projects: any[];
246
+ metadata: {
247
+ group: string;
248
+ version: string;
249
+ properties: any[];
250
+ };
219
251
  };
220
252
  /**
221
253
  * Execute gradle properties command and return parsed output
@@ -224,7 +256,11 @@ export function parseGradleProperties(rawOutput: string): {
224
256
  * @param {string} rootPath Root directory
225
257
  * @param {string} subProject Sub project name
226
258
  */
227
- export function executeGradleProperties(dir: string, rootPath: string, subProject: string): {};
259
+ export function executeGradleProperties(
260
+ dir: string,
261
+ rootPath: string,
262
+ subProject: string,
263
+ ): {};
228
264
  /**
229
265
  * Parse bazel action graph output
230
266
  * @param {string} rawOutput Raw string output
@@ -262,7 +298,10 @@ export function guessLicenseId(content: any): any;
262
298
  * @param {Array} pkgList Package list
263
299
  * @param {Object} jarNSMapping Jar Namespace mapping object
264
300
  */
265
- export function getMvnMetadata(pkgList: any[], jarNSMapping?: any): Promise<any[]>;
301
+ export function getMvnMetadata(
302
+ pkgList: any[],
303
+ jarNSMapping?: any,
304
+ ): Promise<any[]>;
266
305
  /**
267
306
  * Method to compose URL of pom.xml
268
307
  *
@@ -273,7 +312,12 @@ export function getMvnMetadata(pkgList: any[], jarNSMapping?: any): Promise<any[
273
312
  *
274
313
  * @return {String} fullUrl
275
314
  */
276
- export function composePomXmlUrl({ urlPrefix, group, name, version }: string): string;
315
+ export function composePomXmlUrl({
316
+ urlPrefix,
317
+ group,
318
+ name,
319
+ version,
320
+ }: string): string;
277
321
  /**
278
322
  * Method to fetch pom.xml data and parse it to JSON
279
323
  *
@@ -284,7 +328,12 @@ export function composePomXmlUrl({ urlPrefix, group, name, version }: string): s
284
328
  *
285
329
  * @return {Object|undefined}
286
330
  */
287
- export function fetchPomXmlAsJson({ urlPrefix, group, name, version }: string): any | undefined;
331
+ export function fetchPomXmlAsJson({
332
+ urlPrefix,
333
+ group,
334
+ name,
335
+ version,
336
+ }: string): any | undefined;
288
337
  /**
289
338
  * Method to fetch pom.xml data
290
339
  *
@@ -295,7 +344,12 @@ export function fetchPomXmlAsJson({ urlPrefix, group, name, version }: string):
295
344
  *
296
345
  * @return {Promise<String>}
297
346
  */
298
- export function fetchPomXml({ urlPrefix, group, name, version }: string): Promise<string>;
347
+ export function fetchPomXml({
348
+ urlPrefix,
349
+ group,
350
+ name,
351
+ version,
352
+ }: string): Promise<string>;
299
353
  /**
300
354
  * Method extract single or multiple license entries that might appear in pom.xml
301
355
  *
@@ -312,15 +366,20 @@ export function parseLicenseEntryOrArrayFromPomXml(license: any | any[]): any[];
312
366
  *
313
367
  * @return {Promise<String>} License ID
314
368
  */
315
- export function extractLicenseCommentFromPomXml({ urlPrefix, group, name, version }: string): Promise<string>;
369
+ export function extractLicenseCommentFromPomXml({
370
+ urlPrefix,
371
+ group,
372
+ name,
373
+ version,
374
+ }: string): Promise<string>;
316
375
  /**
317
376
  * Method to parse python requires_dist attribute found in pypi setup.py
318
377
  *
319
378
  * @param requires_dist string
320
379
  */
321
380
  export function parsePyRequiresDist(dist_string: any): {
322
- name: string;
323
- version: string;
381
+ name: string;
382
+ version: string;
324
383
  };
325
384
  /**
326
385
  * Method to mimic pip version solver using node-semver
@@ -328,14 +387,20 @@ export function parsePyRequiresDist(dist_string: any): {
328
387
  * @param {Array} versionsList List of version numbers available
329
388
  * @param {*} versionSpecifiers pip version specifier
330
389
  */
331
- export function guessPypiMatchingVersion(versionsList: any[], versionSpecifiers: any): any;
390
+ export function guessPypiMatchingVersion(
391
+ versionsList: any[],
392
+ versionSpecifiers: any,
393
+ ): any;
332
394
  /**
333
395
  * Method to retrieve metadata for python packages by querying pypi
334
396
  *
335
397
  * @param {Array} pkgList Package list
336
398
  * @param {Boolean} fetchDepsInfo Fetch dependencies info from pypi
337
399
  */
338
- export function getPyMetadata(pkgList: any[], fetchDepsInfo: boolean): Promise<any[]>;
400
+ export function getPyMetadata(
401
+ pkgList: any[],
402
+ fetchDepsInfo: boolean,
403
+ ): Promise<any[]>;
339
404
  /**
340
405
  * Method to parse bdist_wheel metadata
341
406
  *
@@ -360,21 +425,30 @@ export function parsePyProjectToml(tomlFile: string): {};
360
425
  * @param {Object} lockData JSON data from poetry.lock
361
426
  * @param {string} lockFile Lock file name for evidence
362
427
  */
363
- export function parsePoetrylockData(lockData: any, lockFile: string): Promise<any[] | {
364
- pkgList: any[];
365
- rootList: any[];
366
- dependenciesList: {
428
+ export function parsePoetrylockData(
429
+ lockData: any,
430
+ lockFile: string,
431
+ ): Promise<
432
+ | any[]
433
+ | {
434
+ pkgList: any[];
435
+ rootList: any[];
436
+ dependenciesList: {
367
437
  ref: string;
368
438
  dependsOn: any[];
369
- }[];
370
- }>;
439
+ }[];
440
+ }
441
+ >;
371
442
  /**
372
443
  * Method to parse requirements.txt data
373
444
  *
374
445
  * @param {Object} reqData Requirements.txt data
375
446
  * @param {Boolean} fetchDepsInfo Fetch dependencies info from pypi
376
447
  */
377
- export function parseReqFile(reqData: any, fetchDepsInfo: boolean): Promise<any[]>;
448
+ export function parseReqFile(
449
+ reqData: any,
450
+ fetchDepsInfo: boolean,
451
+ ): Promise<any[]>;
378
452
  /**
379
453
  * Method to find python modules by parsing the imports and then checking with PyPI to obtain the latest version
380
454
  *
@@ -382,14 +456,18 @@ export function parseReqFile(reqData: any, fetchDepsInfo: boolean): Promise<any[
382
456
  * @param {Array} epkgList Existing package list
383
457
  * @returns List of packages
384
458
  */
385
- export function getPyModules(src: string, epkgList: any[], options: any): Promise<{
386
- allImports: {};
387
- pkgList: any;
388
- dependenciesList: {
389
- ref: string;
390
- dependsOn: any[];
391
- }[];
392
- modList: any;
459
+ export function getPyModules(
460
+ src: string,
461
+ epkgList: any[],
462
+ options: any,
463
+ ): Promise<{
464
+ allImports: {};
465
+ pkgList: any;
466
+ dependenciesList: {
467
+ ref: string;
468
+ dependsOn: any[];
469
+ }[];
470
+ modList: any;
393
471
  }>;
394
472
  /**
395
473
  * Method to parse setup.py data
@@ -402,7 +480,9 @@ export function parseSetupPyFile(setupPyData: any): Promise<any[]>;
402
480
  * @param {Object} repoMetadata Repo metadata with group and name
403
481
  * @return {String|undefined} github api url (or undefined - if not enough data)
404
482
  */
405
- export function repoMetadataToGitHubApiUrl(repoMetadata: any): string | undefined;
483
+ export function repoMetadataToGitHubApiUrl(
484
+ repoMetadata: any,
485
+ ): string | undefined;
406
486
  /**
407
487
  * Method to split GitHub url into its parts
408
488
  * @param {String} repoUrl Repository url
@@ -415,7 +495,10 @@ export function getGithubUrlParts(repoUrl: string): [string];
415
495
  * @param {Object} repoMetadata Object containing group and package name strings
416
496
  * @return {String|undefined} github api url (or undefined - if not a GitHub repo)
417
497
  */
418
- export function toGitHubApiUrl(repoUrl: string, repoMetadata: any): string | undefined;
498
+ export function toGitHubApiUrl(
499
+ repoUrl: string,
500
+ repoMetadata: any,
501
+ ): string | undefined;
419
502
  /**
420
503
  * Method to retrieve repo license by querying github api
421
504
  *
@@ -423,14 +506,22 @@ export function toGitHubApiUrl(repoUrl: string, repoMetadata: any): string | und
423
506
  * @param {Object} repoMetadata Object containing group and package name strings
424
507
  * @return {Promise<String>} SPDX license id
425
508
  */
426
- export function getRepoLicense(repoUrl: string, repoMetadata: any): Promise<string>;
509
+ export function getRepoLicense(
510
+ repoUrl: string,
511
+ repoMetadata: any,
512
+ ): Promise<string>;
427
513
  /**
428
514
  * Method to get go pkg license from go.dev site.
429
515
  *
430
516
  * @param {Object} repoMetadata Repo metadata
431
517
  */
432
518
  export function getGoPkgLicense(repoMetadata: any): Promise<any>;
433
- export function getGoPkgComponent(group: any, name: any, version: any, hash: any): Promise<{}>;
519
+ export function getGoPkgComponent(
520
+ group: any,
521
+ name: any,
522
+ version: any,
523
+ hash: any,
524
+ ): Promise<{}>;
434
525
  export function parseGoModData(goModData: any, gosumMap: any): Promise<any[]>;
435
526
  /**
436
527
  * Parse go list output
@@ -438,9 +529,12 @@ export function parseGoModData(goModData: any, gosumMap: any): Promise<any[]>;
438
529
  * @param {string} rawOutput Output from go list invocation
439
530
  * @returns Object with parent component and List of packages
440
531
  */
441
- export function parseGoListDep(rawOutput: string, gosumMap: any): Promise<{
442
- parentComponent: {};
443
- pkgList: {}[];
532
+ export function parseGoListDep(
533
+ rawOutput: string,
534
+ gosumMap: any,
535
+ ): Promise<{
536
+ parentComponent: {};
537
+ pkgList: {}[];
444
538
  }>;
445
539
  /**
446
540
  * Parse go mod graph
@@ -452,12 +546,18 @@ export function parseGoListDep(rawOutput: string, gosumMap: any): Promise<{
452
546
  *
453
547
  * @returns Object containing List of packages and dependencies
454
548
  */
455
- export function parseGoModGraph(rawOutput: string, goModFile: string, gosumMap: any, epkgList?: any[], parentComponent?: {}): Promise<{
456
- pkgList: any[];
457
- dependenciesList: {
458
- ref: string;
459
- dependsOn: any[];
460
- }[];
549
+ export function parseGoModGraph(
550
+ rawOutput: string,
551
+ goModFile: string,
552
+ gosumMap: any,
553
+ epkgList?: any[],
554
+ parentComponent?: {},
555
+ ): Promise<{
556
+ pkgList: any[];
557
+ dependenciesList: {
558
+ ref: string;
559
+ dependsOn: any[];
560
+ }[];
461
561
  }>;
462
562
  /**
463
563
  * Parse go mod why output
@@ -491,21 +591,28 @@ export function parseGemspecData(gemspecData: string): Promise<any[]>;
491
591
  * @param {object} gemLockData Gemfile.lock data
492
592
  * @param {string} lockFile Lock file
493
593
  */
494
- export function parseGemfileLockData(gemLockData: object, lockFile: string): Promise<any[] | {
495
- pkgList: any[];
496
- dependenciesList: {
594
+ export function parseGemfileLockData(
595
+ gemLockData: object,
596
+ lockFile: string,
597
+ ): Promise<
598
+ | any[]
599
+ | {
600
+ pkgList: any[];
601
+ dependenciesList: {
497
602
  ref: string;
498
603
  dependsOn: any[];
499
- }[];
500
- rootList?: undefined;
501
- } | {
502
- pkgList: any[];
503
- dependenciesList: {
604
+ }[];
605
+ rootList?: undefined;
606
+ }
607
+ | {
608
+ pkgList: any[];
609
+ dependenciesList: {
504
610
  ref: string;
505
611
  dependsOn: any[];
506
- }[];
507
- rootList: any[];
508
- }>;
612
+ }[];
613
+ rootList: any[];
614
+ }
615
+ >;
509
616
  /**
510
617
  * Method to retrieve metadata for rust packages by querying crates
511
618
  *
@@ -535,7 +642,10 @@ export function getDartMetadata(pkgList: any[]): Promise<any[]>;
535
642
  *
536
643
  * @returns {array} Package list
537
644
  */
538
- export function parseCargoTomlData(cargoTomlFile: string, simple?: boolean): any[];
645
+ export function parseCargoTomlData(
646
+ cargoTomlFile: string,
647
+ simple?: boolean,
648
+ ): any[];
539
649
  /**
540
650
  * Parse a Cargo.lock file to find components within the Rust project.
541
651
  *
@@ -546,19 +656,23 @@ export function parseCargoTomlData(cargoTomlFile: string, simple?: boolean): any
546
656
  */
547
657
  export function parseCargoData(cargoLockFile: string, simple?: boolean): any[];
548
658
  export function parseCargoDependencyData(cargoLockData: any): {
549
- ref: string;
550
- dependsOn: any;
659
+ ref: string;
660
+ dependsOn: any;
551
661
  }[];
552
662
  export function parseCargoAuditableData(cargoData: any): Promise<any[]>;
553
663
  export function parsePubLockData(pubLockData: any): Promise<any[]>;
554
664
  export function parsePubYamlData(pubYamlData: any): any[];
555
665
  export function parseHelmYamlData(helmData: any): any[];
556
- export function recurseImageNameLookup(keyValueObj: any, pkgList: any, imgList: any): any;
666
+ export function recurseImageNameLookup(
667
+ keyValueObj: any,
668
+ pkgList: any,
669
+ imgList: any,
670
+ ): any;
557
671
  export function parseContainerFile(fileContents: any): {
558
- image: any;
672
+ image: any;
559
673
  }[];
560
674
  export function parseBitbucketPipelinesFile(fileContents: any): {
561
- image: any;
675
+ image: any;
562
676
  }[];
563
677
  export function parseContainerSpecData(dcData: any): any[];
564
678
  export function identifyFlow(processingObj: any): string;
@@ -576,18 +690,27 @@ export function parseNupkg(nupkgFile: any): Promise<any[]>;
576
690
  export function parseNuspecData(nupkgFile: any, nuspecData: any): any[];
577
691
  export function parseCsPkgData(pkgData: any): any[];
578
692
  export function parseCsProjData(csProjData: any, projFile: any): any[];
579
- export function parseCsProjAssetsData(csProjData: any, assetsJsonFile: any): {
580
- pkgList: any[];
581
- dependenciesList: any[];
693
+ export function parseCsProjAssetsData(
694
+ csProjData: any,
695
+ assetsJsonFile: any,
696
+ ): {
697
+ pkgList: any[];
698
+ dependenciesList: any[];
582
699
  };
583
- export function parseCsPkgLockData(csLockData: any, pkgLockFile: any): {
584
- pkgList: any[];
585
- dependenciesList: any[];
586
- rootList: any[];
700
+ export function parseCsPkgLockData(
701
+ csLockData: any,
702
+ pkgLockFile: any,
703
+ ): {
704
+ pkgList: any[];
705
+ dependenciesList: any[];
706
+ rootList: any[];
587
707
  };
588
- export function parsePaketLockData(paketLockData: any, pkgLockFile: any): {
589
- pkgList: any[];
590
- dependenciesList: any[];
708
+ export function parsePaketLockData(
709
+ paketLockData: any,
710
+ pkgLockFile: any,
711
+ ): {
712
+ pkgList: any[];
713
+ dependenciesList: any[];
591
714
  };
592
715
  /**
593
716
  * Parse composer lock file
@@ -595,8 +718,13 @@ export function parsePaketLockData(paketLockData: any, pkgLockFile: any): {
595
718
  * @param {string} pkgLockFile composer.lock file
596
719
  * @param {array} rootRequires require section from composer.json
597
720
  */
598
- export function parseComposerLock(pkgLockFile: string, rootRequires: any[]): any[] | {
599
- pkgList: {
721
+ export function parseComposerLock(
722
+ pkgLockFile: string,
723
+ rootRequires: any[],
724
+ ):
725
+ | any[]
726
+ | {
727
+ pkgList: {
600
728
  group: string;
601
729
  name: string;
602
730
  purl: string;
@@ -607,26 +735,26 @@ export function parseComposerLock(pkgLockFile: string, rootRequires: any[]): any
607
735
  description: any;
608
736
  scope: string;
609
737
  properties: {
610
- name: string;
611
- value: string;
738
+ name: string;
739
+ value: string;
612
740
  }[];
613
741
  evidence: {
614
- identity: {
615
- field: string;
616
- confidence: number;
617
- methods: {
618
- technique: string;
619
- confidence: number;
620
- value: string;
621
- }[];
622
- };
742
+ identity: {
743
+ field: string;
744
+ confidence: number;
745
+ methods: {
746
+ technique: string;
747
+ confidence: number;
748
+ value: string;
749
+ }[];
750
+ };
623
751
  };
624
- }[];
625
- dependenciesList: {
752
+ }[];
753
+ dependenciesList: {
626
754
  ref: string;
627
755
  dependsOn: any[];
628
- }[];
629
- rootList: {
756
+ }[];
757
+ rootList: {
630
758
  group: string;
631
759
  name: string;
632
760
  purl: string;
@@ -637,28 +765,28 @@ export function parseComposerLock(pkgLockFile: string, rootRequires: any[]): any
637
765
  description: any;
638
766
  scope: string;
639
767
  properties: {
640
- name: string;
641
- value: string;
768
+ name: string;
769
+ value: string;
642
770
  }[];
643
771
  evidence: {
644
- identity: {
645
- field: string;
646
- confidence: number;
647
- methods: {
648
- technique: string;
649
- confidence: number;
650
- value: string;
651
- }[];
652
- };
772
+ identity: {
773
+ field: string;
774
+ confidence: number;
775
+ methods: {
776
+ technique: string;
777
+ confidence: number;
778
+ value: string;
779
+ }[];
780
+ };
653
781
  };
654
- }[];
655
- };
782
+ }[];
783
+ };
656
784
  export function parseSbtTree(sbtTreeFile: any): {
657
- pkgList: any[];
658
- dependenciesList: {
659
- ref: string;
660
- dependsOn: any;
661
- }[];
785
+ pkgList: any[];
786
+ dependenciesList: {
787
+ ref: string;
788
+ dependsOn: any;
789
+ }[];
662
790
  };
663
791
  /**
664
792
  * Parse sbt lock file
@@ -666,26 +794,26 @@ export function parseSbtTree(sbtTreeFile: any): {
666
794
  * @param {string} pkgLockFile build.sbt.lock file
667
795
  */
668
796
  export function parseSbtLock(pkgLockFile: string): {
669
- group: any;
670
- name: any;
671
- version: any;
672
- _integrity: string;
673
- scope: string;
674
- properties: {
675
- name: string;
797
+ group: any;
798
+ name: any;
799
+ version: any;
800
+ _integrity: string;
801
+ scope: string;
802
+ properties: {
803
+ name: string;
804
+ value: string;
805
+ }[];
806
+ evidence: {
807
+ identity: {
808
+ field: string;
809
+ confidence: number;
810
+ methods: {
811
+ technique: string;
812
+ confidence: number;
676
813
  value: string;
677
- }[];
678
- evidence: {
679
- identity: {
680
- field: string;
681
- confidence: number;
682
- methods: {
683
- technique: string;
684
- confidence: number;
685
- value: string;
686
- }[];
687
- };
814
+ }[];
688
815
  };
816
+ };
689
817
  }[];
690
818
  /**
691
819
  * Method to execute dpkg --listfiles to determine the files provided by a given package
@@ -730,60 +858,75 @@ export function executeEqueryList(pkgName: string): string[];
730
858
  * @param {Array} results Query Results
731
859
  * @param {Boolean} enhance Optionally enhance results by invoking additional package manager commands
732
860
  */
733
- export function convertOSQueryResults(queryCategory: any, queryObj: any, results: any[], enhance?: boolean): {
734
- name: any;
735
- group: string;
736
- version: any;
737
- description: any;
738
- publisher: any;
739
- "bom-ref": string;
740
- purl: string;
741
- scope: any;
742
- type: any;
861
+ export function convertOSQueryResults(
862
+ queryCategory: any,
863
+ queryObj: any,
864
+ results: any[],
865
+ enhance?: boolean,
866
+ ): {
867
+ name: any;
868
+ group: string;
869
+ version: any;
870
+ description: any;
871
+ publisher: any;
872
+ "bom-ref": string;
873
+ purl: string;
874
+ scope: any;
875
+ type: any;
743
876
  }[];
744
877
  /**
745
878
  * Parse swift dependency tree output json object
746
879
  * @param {string} jsonObject Swift dependencies json object
747
880
  * @param {string} pkgFile Package.swift file
748
881
  */
749
- export function parseSwiftJsonTreeObject(pkgList: any, dependenciesList: any, jsonObject: string, pkgFile: string): string;
882
+ export function parseSwiftJsonTreeObject(
883
+ pkgList: any,
884
+ dependenciesList: any,
885
+ jsonObject: string,
886
+ pkgFile: string,
887
+ ): string;
750
888
  /**
751
889
  * Parse swift dependency tree output
752
890
  * @param {string} rawOutput Swift dependencies json output
753
891
  * @param {string} pkgFile Package.swift file
754
892
  */
755
- export function parseSwiftJsonTree(rawOutput: string, pkgFile: string): {
756
- pkgList?: undefined;
757
- dependenciesList?: undefined;
758
- } | {
759
- pkgList: any[];
760
- dependenciesList: any[];
761
- };
893
+ export function parseSwiftJsonTree(
894
+ rawOutput: string,
895
+ pkgFile: string,
896
+ ):
897
+ | {
898
+ pkgList?: undefined;
899
+ dependenciesList?: undefined;
900
+ }
901
+ | {
902
+ pkgList: any[];
903
+ dependenciesList: any[];
904
+ };
762
905
  /**
763
906
  * Parse swift package resolved file
764
907
  * @param {string} resolvedFile Package.resolved file
765
908
  */
766
909
  export function parseSwiftResolved(resolvedFile: string): {
910
+ name: string;
911
+ group: string;
912
+ version: string;
913
+ purl: string;
914
+ "bom-ref": string;
915
+ properties: {
767
916
  name: string;
768
- group: string;
769
- version: string;
770
- purl: string;
771
- "bom-ref": string;
772
- properties: {
773
- name: string;
917
+ value: string;
918
+ }[];
919
+ evidence: {
920
+ identity: {
921
+ field: string;
922
+ confidence: number;
923
+ methods: {
924
+ technique: string;
925
+ confidence: number;
774
926
  value: string;
775
- }[];
776
- evidence: {
777
- identity: {
778
- field: string;
779
- confidence: number;
780
- methods: {
781
- technique: string;
782
- confidence: number;
783
- value: string;
784
- }[];
785
- };
927
+ }[];
786
928
  };
929
+ };
787
930
  }[];
788
931
  /**
789
932
  * Collect maven dependencies
@@ -793,8 +936,18 @@ export function parseSwiftResolved(resolvedFile: string): {
793
936
  * @param {boolean} cleanup Remove temporary directories
794
937
  * @param {boolean} includeCacheDir Include maven and gradle cache directories
795
938
  */
796
- export function collectMvnDependencies(mavenCmd: string, basePath: string, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
797
- export function collectGradleDependencies(gradleCmd: any, basePath: any, cleanup?: boolean, includeCacheDir?: boolean): Promise<{}>;
939
+ export function collectMvnDependencies(
940
+ mavenCmd: string,
941
+ basePath: string,
942
+ cleanup?: boolean,
943
+ includeCacheDir?: boolean,
944
+ ): Promise<{}>;
945
+ export function collectGradleDependencies(
946
+ gradleCmd: any,
947
+ basePath: any,
948
+ cleanup?: boolean,
949
+ includeCacheDir?: boolean,
950
+ ): Promise<{}>;
798
951
  /**
799
952
  * Method to collect class names from all jars in a directory
800
953
  *
@@ -805,35 +958,35 @@ export function collectGradleDependencies(gradleCmd: any, basePath: any, cleanup
805
958
  */
806
959
  export function collectJarNS(jarPath: string, pomPathMap?: object): Promise<{}>;
807
960
  export function convertJarNSToPackages(jarNSMapping: any): {
808
- name: any;
809
- group: any;
810
- version: any;
811
- description: any;
812
- purl: string;
813
- "bom-ref": string;
814
- evidence: {
815
- identity: {
816
- field: string;
817
- confidence: number;
818
- methods: {
819
- technique: string;
820
- confidence: number;
821
- value: any;
822
- }[];
823
- };
824
- };
825
- properties: {
826
- name: string;
961
+ name: any;
962
+ group: any;
963
+ version: any;
964
+ description: any;
965
+ purl: string;
966
+ "bom-ref": string;
967
+ evidence: {
968
+ identity: {
969
+ field: string;
970
+ confidence: number;
971
+ methods: {
972
+ technique: string;
973
+ confidence: number;
827
974
  value: any;
828
- }[];
975
+ }[];
976
+ };
977
+ };
978
+ properties: {
979
+ name: string;
980
+ value: any;
981
+ }[];
829
982
  }[];
830
983
  export function parsePomXml(pomXmlData: any): {
831
- artifactId: any;
832
- groupId: any;
833
- version: any;
834
- description: any;
835
- url: any;
836
- scm: any;
984
+ artifactId: any;
985
+ groupId: any;
986
+ version: any;
987
+ description: any;
988
+ url: any;
989
+ scm: any;
837
990
  };
838
991
  export function parseJarManifest(jarMetadata: any): {};
839
992
  export function parsePomProperties(pomProperties: any): {};
@@ -862,7 +1015,11 @@ export function checksumFile(hashName: string, path: string): Promise<string>;
862
1015
  *
863
1016
  * @return pkgList Package list
864
1017
  */
865
- export function extractJarArchive(jarFile: string, tempDir: string, jarNSMapping?: object): Promise<any[]>;
1018
+ export function extractJarArchive(
1019
+ jarFile: string,
1020
+ tempDir: string,
1021
+ jarNSMapping?: object,
1022
+ ): Promise<any[]>;
866
1023
  /**
867
1024
  * Determine the version of SBT used in compilation of this project.
868
1025
  * By default it looks into a standard SBT location i.e.
@@ -892,7 +1049,10 @@ export function addPlugin(projectPath: string, plugin: string): string;
892
1049
  * @param {string} projectPath Path to the SBT project
893
1050
  * @param {string} originalPluginsFile Location of the original plugins file, if any
894
1051
  */
895
- export function cleanupPlugin(projectPath: string, originalPluginsFile: string): boolean;
1052
+ export function cleanupPlugin(
1053
+ projectPath: string,
1054
+ originalPluginsFile: string,
1055
+ ): boolean;
896
1056
  /**
897
1057
  * Returns a default location of the plugins file.
898
1058
  *
@@ -908,7 +1068,11 @@ export function sbtPluginsPath(projectPath: string): string;
908
1068
  *
909
1069
  * @returns File contents
910
1070
  */
911
- export function readZipEntry(zipFile: string, filePattern: string, contentEncoding?: string): Promise<any>;
1071
+ export function readZipEntry(
1072
+ zipFile: string,
1073
+ filePattern: string,
1074
+ contentEncoding?: string,
1075
+ ): Promise<any>;
912
1076
  /**
913
1077
  * Method to get the classes and relevant sources in a jar file
914
1078
  *
@@ -945,7 +1109,12 @@ export function executeAtom(src: any, args: any): boolean;
945
1109
  * @param {string} slicesFile
946
1110
  * @returns List of imported modules
947
1111
  */
948
- export function findAppModules(src: string, language: string, methodology?: string, slicesFile?: string): any;
1112
+ export function findAppModules(
1113
+ src: string,
1114
+ language: string,
1115
+ methodology?: string,
1116
+ slicesFile?: string,
1117
+ ): any;
949
1118
  /**
950
1119
  * Execute pip freeze by creating a virtual env in a temp directory and construct the dependency tree
951
1120
  *
@@ -954,39 +1123,43 @@ export function findAppModules(src: string, language: string, methodology?: stri
954
1123
  * @param {string} tempVenvDir Temp venv dir
955
1124
  * @returns List of packages from the virtual env
956
1125
  */
957
- export function getPipFrozenTree(basePath: string, reqOrSetupFile: string, tempVenvDir: string): {
958
- pkgList: {
959
- name: any;
960
- version: any;
961
- purl: string;
962
- "bom-ref": string;
963
- evidence: {
964
- identity: {
965
- field: string;
966
- confidence: number;
967
- methods: {
968
- technique: string;
969
- confidence: number;
970
- value: any;
971
- }[];
972
- };
973
- };
974
- }[];
975
- rootList: {
976
- name: any;
977
- version: any;
978
- }[];
979
- dependenciesList: {
980
- ref: string;
981
- dependsOn: any;
982
- }[];
983
- frozen: boolean;
1126
+ export function getPipFrozenTree(
1127
+ basePath: string,
1128
+ reqOrSetupFile: string,
1129
+ tempVenvDir: string,
1130
+ ): {
1131
+ pkgList: {
1132
+ name: any;
1133
+ version: any;
1134
+ purl: string;
1135
+ "bom-ref": string;
1136
+ evidence: {
1137
+ identity: {
1138
+ field: string;
1139
+ confidence: number;
1140
+ methods: {
1141
+ technique: string;
1142
+ confidence: number;
1143
+ value: any;
1144
+ }[];
1145
+ };
1146
+ };
1147
+ }[];
1148
+ rootList: {
1149
+ name: any;
1150
+ version: any;
1151
+ }[];
1152
+ dependenciesList: {
1153
+ ref: string;
1154
+ dependsOn: any;
1155
+ }[];
1156
+ frozen: boolean;
984
1157
  };
985
1158
  export function parsePackageJsonName(name: any): {
986
- scope: any;
987
- fullName: string;
988
- projectName: string;
989
- moduleName: string;
1159
+ scope: any;
1160
+ fullName: string;
1161
+ projectName: string;
1162
+ moduleName: string;
990
1163
  };
991
1164
  /**
992
1165
  * Method to add occurrence evidence for components based on import statements. Currently useful for js
@@ -995,19 +1168,32 @@ export function parsePackageJsonName(name: any): {
995
1168
  * @param {object} allImports Import statements object with package name as key and an object with file and location details
996
1169
  * @param {object} allExports Exported modules if available from node_modules
997
1170
  */
998
- export function addEvidenceForImports(pkgList: any[], allImports: object, allExports: object, deep: any): Promise<any[]>;
1171
+ export function addEvidenceForImports(
1172
+ pkgList: any[],
1173
+ allImports: object,
1174
+ allExports: object,
1175
+ deep: any,
1176
+ ): Promise<any[]>;
999
1177
  export function componentSorter(a: any, b: any): any;
1000
- export function parseCmakeDotFile(dotFile: any, pkgType: any, options?: {}): {
1001
- parentComponent: {};
1002
- pkgList: any[];
1003
- dependenciesList: {
1004
- ref: string;
1005
- dependsOn: any[];
1006
- }[];
1178
+ export function parseCmakeDotFile(
1179
+ dotFile: any,
1180
+ pkgType: any,
1181
+ options?: {},
1182
+ ): {
1183
+ parentComponent: {};
1184
+ pkgList: any[];
1185
+ dependenciesList: {
1186
+ ref: string;
1187
+ dependsOn: any[];
1188
+ }[];
1007
1189
  };
1008
- export function parseCmakeLikeFile(cmakeListFile: any, pkgType: any, options?: {}): {
1009
- parentComponent: {};
1010
- pkgList: any[];
1190
+ export function parseCmakeLikeFile(
1191
+ cmakeListFile: any,
1192
+ pkgType: any,
1193
+ options?: {},
1194
+ ): {
1195
+ parentComponent: {};
1196
+ pkgList: any[];
1011
1197
  };
1012
1198
  export function getOSPackageForFile(afile: any, osPkgsList: any): any;
1013
1199
  /**
@@ -1018,13 +1204,18 @@ export function getOSPackageForFile(afile: any, osPkgsList: any): any;
1018
1204
  * @param {array} osPkgsList Array of OS pacakges represented as components
1019
1205
  * @param {array} epkgList Existing packages list
1020
1206
  */
1021
- export function getCppModules(src: string, options: object, osPkgsList: any[], epkgList: any[]): {
1022
- parentComponent: {};
1023
- pkgList: any[];
1024
- dependenciesList: {
1025
- ref: any;
1026
- dependsOn: any[];
1027
- }[];
1207
+ export function getCppModules(
1208
+ src: string,
1209
+ options: object,
1210
+ osPkgsList: any[],
1211
+ epkgList: any[],
1212
+ ): {
1213
+ parentComponent: {};
1214
+ pkgList: any[];
1215
+ dependenciesList: {
1216
+ ref: any;
1217
+ dependsOn: any[];
1218
+ }[];
1028
1219
  };
1029
1220
  /**
1030
1221
  * NOT IMPLEMENTED YET.
@@ -1040,9 +1231,12 @@ export function parseCUsageSlice(sliceData: any): {};
1040
1231
  *
1041
1232
  * @param {Array} pkgList Package list
1042
1233
  */
1043
- export function getNugetMetadata(pkgList: any[], dependencies?: any): Promise<{
1044
- pkgList: any[];
1045
- dependencies: any[];
1234
+ export function getNugetMetadata(
1235
+ pkgList: any[],
1236
+ dependencies?: any,
1237
+ ): Promise<{
1238
+ pkgList: any[];
1239
+ dependencies: any[];
1046
1240
  }>;
1047
1241
  export function addEvidenceForDotnet(pkgList: any, slicesFile: any): any;
1048
1242
  export const dirNameStr: string;
@@ -1072,4 +1266,4 @@ export let LEIN_CMD: string;
1072
1266
  export let SWIFT_CMD: string;
1073
1267
  export const cdxgenAgent: any;
1074
1268
  export const RUBY_PLATFORM_PREFIXES: string[];
1075
- //# sourceMappingURL=utils.d.ts.map
1269
+ //# sourceMappingURL=utils.d.ts.map