@cyclonedx/cyclonedx-library 9.2.0 → 9.4.1
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/dist.d/builders/fromNodePackageJson.node.d.ts +17 -18
- package/dist.d/builders/fromNodePackageJson.node.d.ts.map +1 -1
- package/dist.d/builders/index.node.d.ts +1 -0
- package/dist.d/builders/index.node.d.ts.map +1 -1
- package/dist.d/contrib/bom/index.d.ts +20 -0
- package/dist.d/contrib/bom/index.d.ts.map +1 -0
- package/dist.d/contrib/bom/utils.d.ts +23 -0
- package/dist.d/contrib/bom/utils.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/_helpers/gitUrl.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/_helpers/packageJson.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/builders.d.ts +52 -0
- package/dist.d/contrib/fromNodePackageJson/builders.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/factories.d.ts +50 -0
- package/dist.d/contrib/fromNodePackageJson/factories.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/index.node.d.ts +31 -0
- package/dist.d/contrib/fromNodePackageJson/index.node.d.ts.map +1 -0
- package/dist.d/{types/nodePackageJson.d.ts → contrib/fromNodePackageJson/types.d.ts} +1 -1
- package/dist.d/contrib/fromNodePackageJson/types.d.ts.map +1 -0
- package/dist.d/contrib/fromNodePackageJson/utils.d.ts +29 -0
- package/dist.d/contrib/fromNodePackageJson/utils.d.ts.map +1 -0
- package/dist.d/contrib/index.common.d.ts +24 -0
- package/dist.d/contrib/index.common.d.ts.map +1 -0
- package/dist.d/contrib/index.node.d.ts +25 -0
- package/dist.d/contrib/index.node.d.ts.map +1 -0
- package/dist.d/contrib/index.web.d.ts +24 -0
- package/dist.d/contrib/index.web.d.ts.map +1 -0
- package/dist.d/contrib/license/_helpers/mime.node.d.ts.map +1 -0
- package/dist.d/contrib/license/factories.d.ts +34 -0
- package/dist.d/contrib/license/factories.d.ts.map +1 -0
- package/dist.d/contrib/license/index.common.d.ts +20 -0
- package/dist.d/contrib/license/index.common.d.ts.map +1 -0
- package/dist.d/contrib/license/index.node.d.ts +21 -0
- package/dist.d/contrib/license/index.node.d.ts.map +1 -0
- package/dist.d/contrib/license/index.web.d.ts +20 -0
- package/dist.d/contrib/license/index.web.d.ts.map +1 -0
- package/dist.d/contrib/license/utils.node.d.ts +55 -0
- package/dist.d/contrib/license/utils.node.d.ts.map +1 -0
- package/dist.d/contrib/packageUrl/factories.d.ts +27 -0
- package/dist.d/contrib/packageUrl/factories.d.ts.map +1 -0
- package/dist.d/contrib/packageUrl/index.d.ts +20 -0
- package/dist.d/contrib/packageUrl/index.d.ts.map +1 -0
- package/dist.d/factories/fromNodePackageJson.node.d.ts +8 -24
- package/dist.d/factories/fromNodePackageJson.node.d.ts.map +1 -1
- package/dist.d/factories/index.common.d.ts +2 -0
- package/dist.d/factories/index.common.d.ts.map +1 -1
- package/dist.d/factories/index.node.d.ts +1 -0
- package/dist.d/factories/index.node.d.ts.map +1 -1
- package/dist.d/factories/license.d.ts +7 -14
- package/dist.d/factories/license.d.ts.map +1 -1
- package/dist.d/factories/packageUrl.d.ts +7 -7
- package/dist.d/factories/packageUrl.d.ts.map +1 -1
- package/dist.d/index.node.d.ts +4 -0
- package/dist.d/index.node.d.ts.map +1 -1
- package/dist.d/index.web.d.ts +3 -0
- package/dist.d/index.web.d.ts.map +1 -1
- package/dist.d/types/index.d.ts +19 -1
- package/dist.d/types/index.d.ts.map +1 -1
- package/dist.d/utils/bomUtility.d.ts +5 -2
- package/dist.d/utils/bomUtility.d.ts.map +1 -1
- package/dist.d/utils/index.common.d.ts +1 -0
- package/dist.d/utils/index.common.d.ts.map +1 -1
- package/dist.d/utils/index.node.d.ts +2 -0
- package/dist.d/utils/index.node.d.ts.map +1 -1
- package/dist.d/utils/licenseUtility.node.d.ts +32 -26
- package/dist.d/utils/licenseUtility.node.d.ts.map +1 -1
- package/dist.d/utils/npmjsUtility.node.d.ts +8 -5
- package/dist.d/utils/npmjsUtility.node.d.ts.map +1 -1
- package/dist.node/builders/fromNodePackageJson.node.js +3 -84
- package/dist.node/builders/fromNodePackageJson.node.js.map +1 -1
- package/dist.node/builders/index.node.js.map +1 -1
- package/dist.node/contrib/bom/index.js +56 -0
- package/dist.node/contrib/bom/index.js.map +1 -0
- package/dist.node/contrib/bom/utils.js +35 -0
- package/dist.node/contrib/bom/utils.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/_helpers/gitUrl.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/_helpers/packageJson.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/builders.js +110 -0
- package/dist.node/contrib/fromNodePackageJson/builders.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/factories.js +146 -0
- package/dist.node/contrib/fromNodePackageJson/factories.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/index.node.js +59 -0
- package/dist.node/contrib/fromNodePackageJson/index.node.js.map +1 -0
- package/dist.node/{types/nodePackageJson.js → contrib/fromNodePackageJson/types.js} +1 -1
- package/dist.node/contrib/fromNodePackageJson/types.js.map +1 -0
- package/dist.node/contrib/fromNodePackageJson/utils.js +43 -0
- package/dist.node/contrib/fromNodePackageJson/utils.js.map +1 -0
- package/dist.node/contrib/index.common.js +57 -0
- package/dist.node/contrib/index.common.js.map +1 -0
- package/dist.node/contrib/index.node.js +61 -0
- package/dist.node/contrib/index.node.js.map +1 -0
- package/dist.node/contrib/license/_helpers/mime.node.js.map +1 -0
- package/dist.node/contrib/license/factories.js +65 -0
- package/dist.node/contrib/license/factories.js.map +1 -0
- package/dist.node/contrib/license/index.common.js +56 -0
- package/dist.node/contrib/license/index.common.js.map +1 -0
- package/dist.node/contrib/license/index.node.js +60 -0
- package/dist.node/contrib/license/index.node.js.map +1 -0
- package/dist.node/contrib/license/utils.node.js +59 -0
- package/dist.node/contrib/license/utils.node.js.map +1 -0
- package/dist.node/contrib/packageUrl/factories.js +68 -0
- package/dist.node/contrib/packageUrl/factories.js.map +1 -0
- package/dist.node/contrib/packageUrl/index.js +56 -0
- package/dist.node/contrib/packageUrl/index.js.map +1 -0
- package/dist.node/factories/fromNodePackageJson.node.js +3 -120
- package/dist.node/factories/fromNodePackageJson.node.js.map +1 -1
- package/dist.node/factories/index.common.js.map +1 -1
- package/dist.node/factories/index.node.js.map +1 -1
- package/dist.node/factories/license.js +2 -41
- package/dist.node/factories/license.js.map +1 -1
- package/dist.node/factories/packageUrl.js +2 -44
- package/dist.node/factories/packageUrl.js.map +1 -1
- package/dist.node/index.node.js +2 -1
- package/dist.node/index.node.js.map +1 -1
- package/dist.node/types/index.js +4 -1
- package/dist.node/types/index.js.map +1 -1
- package/dist.node/utils/bomUtility.js +3 -14
- package/dist.node/utils/bomUtility.js.map +1 -1
- package/dist.node/utils/index.common.js.map +1 -1
- package/dist.node/utils/index.node.js.map +1 -1
- package/dist.node/utils/licenseUtility.node.js +2 -35
- package/dist.node/utils/licenseUtility.node.js.map +1 -1
- package/dist.node/utils/npmjsUtility.node.js +4 -22
- package/dist.node/utils/npmjsUtility.node.js.map +1 -1
- package/dist.web/lib.dev.js +622 -140
- package/dist.web/lib.dev.js.map +1 -1
- package/dist.web/lib.js +1 -1
- package/dist.web/lib.js.map +1 -1
- package/package.json +25 -3
- package/res/schema/README.md +3 -1
- package/src/builders/fromNodePackageJson.node.ts +10 -115
- package/src/builders/index.node.ts +1 -0
- package/src/contrib/README.md +20 -0
- package/src/contrib/bom/index.ts +20 -0
- package/src/contrib/bom/utils.ts +37 -0
- package/src/contrib/fromNodePackageJson/_helpers/README.md +6 -0
- package/src/contrib/fromNodePackageJson/builders.ts +150 -0
- package/src/contrib/fromNodePackageJson/factories.ts +186 -0
- package/src/contrib/fromNodePackageJson/index.node.ts +34 -0
- package/src/contrib/fromNodePackageJson/utils.ts +89 -0
- package/src/contrib/index.common.ts +25 -0
- package/src/contrib/index.node.ts +31 -0
- package/src/contrib/index.web.ts +30 -0
- package/src/contrib/license/_helpers/README.md +6 -0
- package/src/contrib/license/factories.ts +75 -0
- package/src/contrib/license/index.common.ts +22 -0
- package/src/contrib/license/index.node.ts +28 -0
- package/src/contrib/license/index.web.ts +28 -0
- package/src/contrib/license/utils.node.ts +104 -0
- package/src/contrib/packageUrl/factories.ts +92 -0
- package/src/contrib/packageUrl/index.ts +20 -0
- package/src/factories/fromNodePackageJson.node.ts +9 -161
- package/src/factories/index.common.ts +2 -0
- package/src/factories/index.node.ts +1 -0
- package/src/factories/license.ts +8 -56
- package/src/factories/packageUrl.ts +8 -73
- package/src/index.common.ts +1 -0
- package/src/index.node.ts +7 -0
- package/src/index.web.ts +6 -0
- package/src/types/index.ts +31 -2
- package/src/utils/bomUtility.ts +6 -16
- package/src/utils/index.common.ts +1 -0
- package/src/utils/index.node.ts +2 -0
- package/src/utils/licenseUtility.node.ts +32 -72
- package/src/utils/npmjsUtility.node.ts +8 -63
- package/dist.d/_helpers/gitUrl.d.ts.map +0 -1
- package/dist.d/_helpers/mime.node.d.ts.map +0 -1
- package/dist.d/_helpers/packageJson.d.ts.map +0 -1
- package/dist.d/types/nodePackageJson.d.ts.map +0 -1
- package/dist.node/_helpers/gitUrl.js.map +0 -1
- package/dist.node/_helpers/mime.node.js.map +0 -1
- package/dist.node/_helpers/packageJson.js.map +0 -1
- package/dist.node/types/nodePackageJson.js.map +0 -1
- /package/dist.d/{_helpers → contrib/fromNodePackageJson/_helpers}/gitUrl.d.ts +0 -0
- /package/dist.d/{_helpers → contrib/fromNodePackageJson/_helpers}/packageJson.d.ts +0 -0
- /package/dist.d/{_helpers → contrib/license/_helpers}/mime.node.d.ts +0 -0
- /package/dist.node/{_helpers → contrib/fromNodePackageJson/_helpers}/gitUrl.js +0 -0
- /package/dist.node/{_helpers → contrib/fromNodePackageJson/_helpers}/packageJson.js +0 -0
- /package/dist.node/{_helpers → contrib/license/_helpers}/mime.node.js +0 -0
- /package/src/{_helpers → contrib/fromNodePackageJson/_helpers}/gitUrl.ts +0 -0
- /package/src/{_helpers → contrib/fromNodePackageJson/_helpers}/packageJson.ts +0 -0
- /package/src/{types/nodePackageJson.ts → contrib/fromNodePackageJson/types.ts} +0 -0
- /package/src/{_helpers → contrib/license/_helpers}/mime.node.ts +0 -0
|
@@ -16,28 +16,27 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
-
import { ComponentType } from '../enums/componentType';
|
|
20
|
-
import type * as Factories from '../factories/index.node';
|
|
21
|
-
import { Component } from '../models/component';
|
|
22
|
-
import { Tool } from '../models/tool';
|
|
23
|
-
import type { NodePackageJson } from '../types/nodePackageJson';
|
|
24
19
|
/**
|
|
25
|
-
* Node-
|
|
20
|
+
* Node-specifics.
|
|
21
|
+
*
|
|
22
|
+
* Intended to run on normalized data structures
|
|
23
|
+
* based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)
|
|
24
|
+
* and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).
|
|
25
|
+
* Normalization should be done downstream, for example via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
import { ComponentBuilder as _ComponentBuilder, ToolBuilder as _ToolBuilder } from '../contrib/fromNodePackageJson/builders';
|
|
28
|
+
/**
|
|
29
|
+
* Deprecated — Alias of {@link Contrib.FromNodePackageJson.Builders.ToolBuilder}.
|
|
30
|
+
*
|
|
31
|
+
* @deprecated Use `Contrib.FromNodePackageJson.Builders.ToolBuilder` instead.
|
|
32
|
+
*/
|
|
33
|
+
export declare class ToolBuilder extends _ToolBuilder {
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
|
-
*
|
|
36
|
+
* Deprecated — Alias of {@link Contrib.FromNodePackageJson.Builders.ComponentBuilder}.
|
|
37
|
+
*
|
|
38
|
+
* @deprecated Use `Contrib.FromNodePackageJson.Builders.ComponentBuilder` instead.
|
|
35
39
|
*/
|
|
36
|
-
export declare class ComponentBuilder {
|
|
37
|
-
#private;
|
|
38
|
-
constructor(extRefFactory: ComponentBuilder['extRefFactory'], licenseFactory: ComponentBuilder['licenseFactory']);
|
|
39
|
-
get extRefFactory(): Factories.FromNodePackageJson.ExternalReferenceFactory;
|
|
40
|
-
get licenseFactory(): Factories.LicenseFactory;
|
|
41
|
-
makeComponent(data: NodePackageJson, type?: ComponentType): Component | undefined;
|
|
40
|
+
export declare class ComponentBuilder extends _ComponentBuilder {
|
|
42
41
|
}
|
|
43
42
|
//# sourceMappingURL=fromNodePackageJson.node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/builders/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;
|
|
1
|
+
{"version":3,"file":"fromNodePackageJson.node.d.ts","sourceRoot":"","sources":["../../src/builders/fromNodePackageJson.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;;GAOG;AAEH,OAAO,EAAC,gBAAgB,IAAI,iBAAiB,EAAE,WAAW,IAAI,YAAY,EAAC,MAAM,yCAAyC,CAAA;AAG1H;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,YAAY;CAAG;AAEhD;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,iBAAiB;CAAG"}
|
|
@@ -16,5 +16,6 @@ limitations under the License.
|
|
|
16
16
|
SPDX-License-Identifier: Apache-2.0
|
|
17
17
|
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
18
|
*/
|
|
19
|
+
/** @deprecated next */
|
|
19
20
|
export * as FromNodePackageJson from './fromNodePackageJson.node';
|
|
20
21
|
//# sourceMappingURL=index.node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../src/builders/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../src/builders/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,uBAAuB;AACvB,OAAO,KAAK,mBAAmB,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
export * as Utils from './utils';
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contrib/bom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Generate valid random SerialNumbers for {@link Models.Bom.serialNumber | Models.Bom.serialNumber}.
|
|
21
|
+
*/
|
|
22
|
+
export declare function randomSerialNumber(): string;
|
|
23
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/contrib/bom/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,IAAK,MAAM,CAc5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitUrl.d.ts","sourceRoot":"","sources":["../../../../src/contrib/fromNodePackageJson/_helpers/gitUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AASF;;GAEG;AACH,wBAAgB,qBAAqB,CAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,GAAG,GAAG,MAAM,GAAG,SAAS,CA0B1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageJson.d.ts","sourceRoot":"","sources":["../../../../src/contrib/fromNodePackageJson/_helpers/packageJson.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAE,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAO/D"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Node-specifics.
|
|
21
|
+
*
|
|
22
|
+
* Intended to run on normalized data structures
|
|
23
|
+
* based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)
|
|
24
|
+
* and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).
|
|
25
|
+
* Normalization should be done downstream, for example via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).
|
|
26
|
+
*/
|
|
27
|
+
import { ComponentType } from '../../enums/componentType';
|
|
28
|
+
import { Component } from '../../models/component';
|
|
29
|
+
import { Tool } from '../../models/tool';
|
|
30
|
+
import type { LicenseFactory } from '../license/factories';
|
|
31
|
+
import type { ExternalReferenceFactory } from './factories';
|
|
32
|
+
import type { NodePackageJson } from './types';
|
|
33
|
+
/**
|
|
34
|
+
* Node-specific ToolBuilder.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ToolBuilder {
|
|
37
|
+
#private;
|
|
38
|
+
constructor(extRefFactory: ToolBuilder['extRefFactory']);
|
|
39
|
+
get extRefFactory(): ExternalReferenceFactory;
|
|
40
|
+
makeTool(data: NodePackageJson): Tool | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Node-specific ComponentBuilder.
|
|
44
|
+
*/
|
|
45
|
+
export declare class ComponentBuilder {
|
|
46
|
+
#private;
|
|
47
|
+
constructor(extRefFactory: ComponentBuilder['extRefFactory'], licenseFactory: ComponentBuilder['licenseFactory']);
|
|
48
|
+
get extRefFactory(): ExternalReferenceFactory;
|
|
49
|
+
get licenseFactory(): LicenseFactory;
|
|
50
|
+
makeComponent(data: NodePackageJson, type?: ComponentType): Component | undefined;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../src/contrib/fromNodePackageJson/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;;GAOG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAGlD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C;;GAEG;AACH,qBAAa,WAAW;;gBAGT,aAAa,EAAE,WAAW,CAAC,eAAe,CAAC;IAIxD,IAAI,aAAa,IAAK,wBAAwB,CAE7C;IAID,QAAQ,CAAE,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS;CAcnD;AAED;;GAEG;AACH,qBAAa,gBAAgB;;gBAKzB,aAAa,EAAE,gBAAgB,CAAC,eAAe,CAAC,EAChD,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAMpD,IAAI,aAAa,IAAK,wBAAwB,CAE7C;IAED,IAAI,cAAc,IAAK,cAAc,CAEpC;IAED,aAAa,CAAE,IAAI,EAAE,eAAe,EAAE,IAAI,GAAE,aAAqC,GAAG,SAAS,GAAG,SAAS;CAwD1G"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Node-specifics.
|
|
21
|
+
*
|
|
22
|
+
* Intended to run on normalized data structures
|
|
23
|
+
* based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)
|
|
24
|
+
* and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).
|
|
25
|
+
* Normalization should be done downstream, for example via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).
|
|
26
|
+
*/
|
|
27
|
+
import type { PackageURL } from 'packageurl-js';
|
|
28
|
+
import type { Component } from '../../models/component';
|
|
29
|
+
import { ExternalReference } from '../../models/externalReference';
|
|
30
|
+
import { PackageUrlFactory as PlainPackageUrlFactory } from '../packageUrl/factories';
|
|
31
|
+
import type { NodePackageJson } from './types';
|
|
32
|
+
/**
|
|
33
|
+
* Node-specific ExternalReferenceFactory.
|
|
34
|
+
*/
|
|
35
|
+
export declare class ExternalReferenceFactory {
|
|
36
|
+
makeExternalReferences(data: NodePackageJson): ExternalReference[];
|
|
37
|
+
makeVcs(data: NodePackageJson): ExternalReference | undefined;
|
|
38
|
+
makeHomepage(data: NodePackageJson): ExternalReference | undefined;
|
|
39
|
+
makeIssueTracker(data: NodePackageJson): ExternalReference | undefined;
|
|
40
|
+
makeDist(data: NodePackageJson): ExternalReference | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Node-specific PackageUrlFactory.
|
|
44
|
+
* @see {@link https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#npm}
|
|
45
|
+
*/
|
|
46
|
+
export declare class PackageUrlFactory extends PlainPackageUrlFactory<'npm'> {
|
|
47
|
+
#private;
|
|
48
|
+
makeFromComponent(component: Component, sort?: boolean): PackageURL | undefined;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/contrib/fromNodePackageJson/factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAM/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAElE,OAAO,EAAE,iBAAiB,IAAI,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAErF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C;;GAEG;AACH,qBAAa,wBAAwB;IACnC,sBAAsB,CAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,EAAE;IAWnE,OAAO,CAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS;IAuB9D,YAAY,CAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS;IAUnE,gBAAgB,CAAE,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS;IAiBvE,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,iBAAiB,GAAG,SAAS;CAwB/D;AAED;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,sBAAsB,CAAC,KAAK,CAAC;;IAEzD,iBAAiB,CAAE,SAAS,EAAE,SAAS,EAAE,IAAI,GAAE,OAAe,GAAG,UAAU,GAAG,SAAS;CA8CjG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Node-specifics.
|
|
21
|
+
*
|
|
22
|
+
* Intended to run on normalized data structures
|
|
23
|
+
* based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)
|
|
24
|
+
* and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).
|
|
25
|
+
* Normalization should be done downstream, for example via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).
|
|
26
|
+
*/
|
|
27
|
+
export * as Builders from './builders';
|
|
28
|
+
export * as Factories from './factories';
|
|
29
|
+
export * as Types from './types';
|
|
30
|
+
export * as Utils from './utils';
|
|
31
|
+
//# sourceMappingURL=index.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../../src/contrib/fromNodePackageJson/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;;GAOG;AAEH,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA"}
|
|
@@ -66,4 +66,4 @@ export declare function isNodePackageJson(value: any): value is NodePackageJson;
|
|
|
66
66
|
* @alpha
|
|
67
67
|
*/
|
|
68
68
|
export declare function assertNodePackageJson(value: any): asserts value is NodePackageJson;
|
|
69
|
-
//# sourceMappingURL=
|
|
69
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/contrib/fromNodePackageJson/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAC,CAAA;IACF,MAAM,CAAC,EAAE,MAAM,GAAG;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,IAAI,CAAC,EAAE,MAAM,GAAG;QACd,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAA;IAED,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAE,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,eAAe,CAOvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAOnF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
import { HashAlgorithm } from '../../enums/hashAlogorithm';
|
|
20
|
+
/**
|
|
21
|
+
* @throws {@link RangeError} if value is unparsable
|
|
22
|
+
*/
|
|
23
|
+
export declare function parsePackageIntegrity(integrity: string): [HashAlgorithm, string];
|
|
24
|
+
/**
|
|
25
|
+
* The default registry is `https://registry.npmjs.org`.
|
|
26
|
+
* @see {@link https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#npm}
|
|
27
|
+
*/
|
|
28
|
+
export declare const defaultRegistryMatcher: RegExp;
|
|
29
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/contrib/fromNodePackageJson/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAA;AAgDxD;;GAEG;AACH,wBAAgB,qBAAqB,CAAE,SAAS,EAAE,MAAM,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAWjF;AAGD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAA6C,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Some features in this library are marked as contrib. These are community-provided extensions and are not part of the official standard. They are optional and may evolve independently from the core.
|
|
21
|
+
*/
|
|
22
|
+
export * as Bom from './bom';
|
|
23
|
+
export * as PackageUrl from './packageUrl';
|
|
24
|
+
//# sourceMappingURL=index.common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.common.d.ts","sourceRoot":"","sources":["../../src/contrib/index.common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;GAEG;AAEH,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Some features in this library are marked as contrib. These are community-provided extensions and are not part of the official standard. They are optional and may evolve independently from the core.
|
|
21
|
+
*/
|
|
22
|
+
export * from './index.common';
|
|
23
|
+
export * as FromNodePackageJson from './fromNodePackageJson/index.node';
|
|
24
|
+
export * as License from './license/index.node';
|
|
25
|
+
//# sourceMappingURL=index.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../src/contrib/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;GAEG;AAEH,cAAc,gBAAgB,CAAA;AAI9B,OAAO,KAAK,mBAAmB,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Some features in this library are marked as contrib. These are community-provided extensions and are not part of the official standard. They are optional and may evolve independently from the core.
|
|
21
|
+
*/
|
|
22
|
+
export * from './index.common';
|
|
23
|
+
export * as License from './license/index.web';
|
|
24
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../src/contrib/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;GAEG;AAEH,cAAc,gBAAgB,CAAA;AAI9B,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mime.node.d.ts","sourceRoot":"","sources":["../../../../src/contrib/license/_helpers/mime.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAIF,KAAK,QAAQ,GAAG,MAAM,CAAA;AA8BtB,wBAAgB,2BAA2B,CAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAKnF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
import type { DisjunctiveLicense, License } from '../../models/license';
|
|
20
|
+
import { LicenseExpression, NamedLicense, SpdxLicense } from '../../models/license';
|
|
21
|
+
export declare class LicenseFactory {
|
|
22
|
+
makeFromString(value: string): License;
|
|
23
|
+
/**
|
|
24
|
+
* @throws {@link RangeError} if expression is not eligible
|
|
25
|
+
*/
|
|
26
|
+
makeExpression(value: string | any): LicenseExpression;
|
|
27
|
+
makeDisjunctive(value: string): DisjunctiveLicense;
|
|
28
|
+
/**
|
|
29
|
+
* @throws {@link RangeError} if value is not supported SPDX id
|
|
30
|
+
*/
|
|
31
|
+
makeSpdxLicense(value: string | any): SpdxLicense;
|
|
32
|
+
makeNamedLicense(value: string | any): NamedLicense;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/contrib/license/factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAGnF,qBAAa,cAAc;IACzB,cAAc,CAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAgBvC;;OAEG;IACH,cAAc,CAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,iBAAiB;IAQvD,eAAe,CAAE,KAAK,EAAE,MAAM,GAAG,kBAAkB;IAQnD;;OAEG;IACH,eAAe,CAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,WAAW;IASlD,gBAAgB,CAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,YAAY;CAGrD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
export * as Factories from './factories';
|
|
20
|
+
//# sourceMappingURL=index.common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.common.d.ts","sourceRoot":"","sources":["../../../src/contrib/license/index.common.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
export * from './index.common';
|
|
20
|
+
export * as Utils from './utils.node';
|
|
21
|
+
//# sourceMappingURL=index.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../../../src/contrib/license/index.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,cAAc,gBAAgB,CAAA;AAI9B,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
export * from './index.common';
|
|
20
|
+
//# sourceMappingURL=index.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/contrib/license/index.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* This module tries to be as compatible as possible, it only uses basic methods that are known to be working in all FileSystem abstraction-layers.
|
|
21
|
+
* In addition, we use type parameters for all `PathLike`s, so downstream users can utilize their implementations accordingly.
|
|
22
|
+
*
|
|
23
|
+
* @module
|
|
24
|
+
*/
|
|
25
|
+
import type { Stats } from 'node:fs';
|
|
26
|
+
import { Attachment } from '../../models/attachment';
|
|
27
|
+
export interface FsUtils<P extends string> {
|
|
28
|
+
readdirSync: (path: P) => P[];
|
|
29
|
+
readFileSync: (path: P) => Buffer;
|
|
30
|
+
statSync: (path: P) => Stats;
|
|
31
|
+
}
|
|
32
|
+
export interface PathUtils<P extends string> {
|
|
33
|
+
join: (...paths: P[]) => P;
|
|
34
|
+
}
|
|
35
|
+
export interface FileAttachment<P extends string> {
|
|
36
|
+
filePath: P;
|
|
37
|
+
file: P;
|
|
38
|
+
text: Attachment;
|
|
39
|
+
}
|
|
40
|
+
export type ErrorReporter = (e: Error) => any;
|
|
41
|
+
export declare class LicenseEvidenceGatherer<P extends string = string> {
|
|
42
|
+
#private;
|
|
43
|
+
/**
|
|
44
|
+
* `fs` and `path` can be supplied, if any compatibility-layer or drop-in replacement is used.
|
|
45
|
+
*
|
|
46
|
+
* @param options.fs - If omitted, the native `node:fs` is used.
|
|
47
|
+
* @param options.path - If omitted, the native `node:path` is used.
|
|
48
|
+
*/
|
|
49
|
+
constructor(options?: {
|
|
50
|
+
fs?: FsUtils<P>;
|
|
51
|
+
path?: PathUtils<P>;
|
|
52
|
+
});
|
|
53
|
+
getFileAttachments(prefixPath: P, onError?: ErrorReporter): Generator<FileAttachment<P>>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=utils.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.node.d.ts","sourceRoot":"","sources":["../../../src/contrib/license/utils.node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAGpC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGpD,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,MAAM;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC,KAAM,CAAC,EAAE,CAAA;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;IACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAA;CAC7B;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM;IACzC,IAAI,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;CAC3B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,MAAM;IAC9C,QAAQ,EAAE,CAAC,CAAA;IACX,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,UAAU,CAAA;CACjB;AAID,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,EAAC,KAAK,KAAK,GAAG,CAAA;AAE5C,qBAAa,uBAAuB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;;IAK5D;;;;;OAKG;gBACU,OAAO,GAAE;QAAE,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;KAAO;IAQjE,kBAAkB,CAAE,UAAU,EAAE,CAAC,EAAE,OAAO,GAAE,aAAoB,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;CA6BlG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
This file is part of CycloneDX JavaScript Library.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
Copyright (c) OWASP Foundation. All Rights Reserved.
|
|
18
|
+
*/
|
|
19
|
+
import { PackageURL } from 'packageurl-js';
|
|
20
|
+
import type { Component } from '../../models/component';
|
|
21
|
+
export declare class PackageUrlFactory<PurlType extends PackageURL['type'] = PackageURL['type']> {
|
|
22
|
+
#private;
|
|
23
|
+
constructor(type: PurlType);
|
|
24
|
+
get type(): PurlType;
|
|
25
|
+
makeFromComponent(component: Component, sort?: boolean): PackageURL | undefined;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.d.ts","sourceRoot":"","sources":["../../../src/contrib/packageUrl/factories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;EAiBE;AAEF,OAAO,EAAE,UAAU,EAAsB,MAAM,eAAe,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,qBAAa,iBAAiB,CAAC,QAAQ,SAAS,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;;gBAGxE,IAAI,EAAE,QAAQ;IAI3B,IAAI,IAAI,IAAK,QAAQ,CAEpB;IAGD,iBAAiB,CAAE,SAAS,EAAE,SAAS,EAAE,IAAI,GAAE,OAAe,GAAG,UAAU,GAAG,SAAS;CAuDxF"}
|