@cyclonedx/cyclonedx-library 9.0.0 → 9.2.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.
Files changed (66) hide show
  1. package/README.md +1 -0
  2. package/dist.d/_helpers/sortable.d.ts.map +1 -1
  3. package/dist.d/_helpers/stringable.d.ts +2 -2
  4. package/dist.d/enums/externalReferenceType.d.ts +4 -0
  5. package/dist.d/enums/externalReferenceType.d.ts.map +1 -1
  6. package/dist.d/enums/hashAlogorithm.d.ts +3 -1
  7. package/dist.d/enums/hashAlogorithm.d.ts.map +1 -1
  8. package/dist.d/factories/fromNodePackageJson.node.d.ts.map +1 -1
  9. package/dist.d/serialize/json/normalize.d.ts.map +1 -1
  10. package/dist.d/serialize/xml/normalize.d.ts.map +1 -1
  11. package/dist.d/spec/consts.d.ts +2 -0
  12. package/dist.d/spec/consts.d.ts.map +1 -1
  13. package/dist.d/spec/enums.d.ts +1 -0
  14. package/dist.d/spec/enums.d.ts.map +1 -1
  15. package/dist.d/validation/jsonValidator.node.d.ts.map +1 -1
  16. package/dist.node/_helpers/sortable.js.map +1 -1
  17. package/dist.node/enums/externalReferenceType.js +4 -0
  18. package/dist.node/enums/externalReferenceType.js.map +1 -1
  19. package/dist.node/enums/hashAlogorithm.js +2 -0
  20. package/dist.node/enums/hashAlogorithm.js.map +1 -1
  21. package/dist.node/factories/fromNodePackageJson.node.js.map +1 -1
  22. package/dist.node/resources.node.js +6 -0
  23. package/dist.node/resources.node.js.map +1 -1
  24. package/dist.node/serialize/json/normalize.js +1 -0
  25. package/dist.node/serialize/json/normalize.js.map +1 -1
  26. package/dist.node/serialize/xml/normalize.js +1 -0
  27. package/dist.node/serialize/xml/normalize.js.map +1 -1
  28. package/dist.node/spec/consts.js +92 -1
  29. package/dist.node/spec/consts.js.map +1 -1
  30. package/dist.node/spec/enums.js +1 -0
  31. package/dist.node/spec/enums.js.map +1 -1
  32. package/dist.node/validation/jsonValidator.node.js +1 -0
  33. package/dist.node/validation/jsonValidator.node.js.map +1 -1
  34. package/dist.web/lib.dev.js +101 -1
  35. package/dist.web/lib.dev.js.map +1 -1
  36. package/dist.web/lib.js +1 -1
  37. package/dist.web/lib.js.map +1 -1
  38. package/package.json +9 -7
  39. package/res/schema/README.md +3 -1
  40. package/res/schema/bom-1.4.SNAPSHOT.schema.json +2 -2
  41. package/res/schema/bom-1.4.SNAPSHOT.xsd +1 -1
  42. package/res/schema/bom-1.5.SNAPSHOT.schema.json +2 -2
  43. package/res/schema/bom-1.5.SNAPSHOT.xsd +3 -3
  44. package/res/schema/bom-1.6.SNAPSHOT.schema.json +4 -4
  45. package/res/schema/bom-1.6.SNAPSHOT.xsd +6 -6
  46. package/res/schema/bom-1.7.SNAPSHOT.schema.json +6700 -0
  47. package/res/schema/bom-1.7.SNAPSHOT.xsd +9742 -0
  48. package/res/schema/cryptography-defs.SNAPSHOT.schema.json +576 -0
  49. package/src/_helpers/sortable.ts +1 -0
  50. package/src/_helpers/uri.ts +1 -1
  51. package/src/enums/externalReferenceType.ts +4 -0
  52. package/src/enums/hashAlogorithm.ts +2 -0
  53. package/src/factories/fromNodePackageJson.node.ts +2 -0
  54. package/src/resources.node.ts +6 -0
  55. package/src/serialize/json/normalize.ts +1 -0
  56. package/src/serialize/xml/normalize.ts +1 -0
  57. package/src/serialize/xmlSerializer.web.ts +1 -1
  58. package/src/spec/consts.ts +117 -0
  59. package/src/spec/enums.ts +1 -0
  60. package/src/validation/jsonValidator.node.ts +1 -0
  61. package/tsconfig.d.tsbuildinfo +1 -1
  62. package/tsconfig.node.tsbuildinfo +1 -1
  63. package/dist.d/_helpers/stringable.d.ts.map +0 -1
  64. package/dist.node/_helpers/stringable.js +0 -21
  65. package/dist.node/_helpers/stringable.js.map +0 -1
  66. /package/src/_helpers/{stringable.ts → stringable.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cyclonedx-library",
3
- "version": "9.0.0",
3
+ "version": "9.2.0",
4
4
  "description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -88,7 +88,7 @@
88
88
  "ajv-formats": "^3.0.1",
89
89
  "ajv-formats-draft2019": "^1.6.1",
90
90
  "libxmljs2": "^0.35||^0.37",
91
- "xmlbuilder2": "^3.0.2"
91
+ "xmlbuilder2": "^3.0.2||^4.0.0"
92
92
  },
93
93
  "peerDependenciesMeta": {
94
94
  "ajv": {
@@ -112,20 +112,21 @@
112
112
  "ajv-formats": "^3.0.1",
113
113
  "ajv-formats-draft2019": "^1.6.1",
114
114
  "libxmljs2": "^0.35||^0.37",
115
- "xmlbuilder2": "^3.0.2",
115
+ "xmlbuilder2": "^3.0.2||^4.0.0",
116
116
  "@types/mocha": "^10",
117
117
  "@types/node": "ts5.7",
118
118
  "@types/spdx-expression-parse": "^3",
119
119
  "c8": "^10",
120
+ "copyfiles": "^2.4.1",
120
121
  "deepmerge": "^4.2.2",
121
122
  "fast-glob": "^3.3.1",
122
- "memfs": "4.39.0",
123
- "mocha": "11.7.2",
123
+ "memfs": "^4.46.1",
124
+ "mocha": "11.7.4",
124
125
  "npm-run-all2": "^8",
125
126
  "rimraf": "^6",
126
127
  "ts-loader": "9.5.4",
127
- "typescript": "5.9.2",
128
- "webpack": "5.101.3",
128
+ "typescript": "5.9.3",
129
+ "webpack": "5.102.1",
129
130
  "webpack-cli": "6.0.1",
130
131
  "webpack-node-externals": "3.0.0"
131
132
  },
@@ -209,6 +210,7 @@
209
210
  "build:web": "webpack build",
210
211
  "prebuild:d": "rimraf dist.d",
211
212
  "build:d": "tsc -b ./tsconfig.d.json",
213
+ "postbuild:d": "copyfiles -u 1 src/**/*.d.ts dist.d",
212
214
  "test": "run-p --aggregate-output -lc test:\\*",
213
215
  "test:node": "c8 mocha -p",
214
216
  "test:web": "node -e 'console.log(\"TODO: write web test\")'",
@@ -4,7 +4,7 @@ some schema for offline use as download via [script](../../tools/schema-download
4
4
  original sources: <https://github.com/CycloneDX/specification/blob/master>
5
5
 
6
6
  Currently using version
7
- [8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7](https://github.com/CycloneDX/specification/commit/8a27bfd1be5be0dcb2c208a34d2f4fa0b6d75bd7)
7
+ [4b3f59453366e27c8073fd24e98bf21ef8892c8e](https://github.com/CycloneDX/specification/commit/4b3f59453366e27c8073fd24e98bf21ef8892c8e)
8
8
 
9
9
  | file | note |
10
10
  |------|------|
@@ -15,11 +15,13 @@ Currently using version
15
15
  | [`bom-1.4.SNAPSHOT.xsd`](bom-1.4.SNAPSHOT.xsd) | applied changes: 1 |
16
16
  | [`bom-1.5.SNAPSHOT.xsd`](bom-1.5.SNAPSHOT.xsd) | applied changes: 1 |
17
17
  | [`bom-1.6.SNAPSHOT.xsd`](bom-1.6.SNAPSHOT.xsd) | applied changes: 1 |
18
+ | [`bom-1.7.SNAPSHOT.xsd`](bom-1.7.SNAPSHOT.xsd) | applied changes: 1 |
18
19
  | [`bom-1.2.SNAPSHOT.schema.json`](bom-1.2.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
19
20
  | [`bom-1.3.SNAPSHOT.schema.json`](bom-1.3.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
20
21
  | [`bom-1.4.SNAPSHOT.schema.json`](bom-1.4.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
21
22
  | [`bom-1.5.SNAPSHOT.schema.json`](bom-1.5.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
22
23
  | [`bom-1.6.SNAPSHOT.schema.json`](bom-1.6.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
24
+ | [`bom-1.7.SNAPSHOT.schema.json`](bom-1.7.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
23
25
  | [`bom-1.2-strict.SNAPSHOT.schema.json`](bom-1.2-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
24
26
  | [`bom-1.3-strict.SNAPSHOT.schema.json`](bom-1.3-strict.SNAPSHOT.schema.json) | applied changes: 2,3,4,5,6 |
25
27
  | [`spdx.SNAPSHOT.xsd`](spdx.SNAPSHOT.xsd) | |
@@ -1636,7 +1636,7 @@
1636
1636
  "$ref": "#/definitions/version"
1637
1637
  },
1638
1638
  "range": {
1639
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
1639
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
1640
1640
  "$ref": "#/definitions/range"
1641
1641
  },
1642
1642
  "status": {
@@ -1679,7 +1679,7 @@
1679
1679
  "maxLength": 1024
1680
1680
  },
1681
1681
  "range": {
1682
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
1682
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
1683
1683
  "type": "string",
1684
1684
  "minLength": 1,
1685
1685
  "maxLength": 1024
@@ -1993,7 +1993,7 @@ limitations under the License.
1993
1993
  </xs:element>
1994
1994
  <xs:element name="range" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
1995
1995
  <xs:annotation>
1996
- <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst</xs:documentation>
1996
+ <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec</xs:documentation>
1997
1997
  </xs:annotation>
1998
1998
  </xs:element>
1999
1999
  </xs:choice>
@@ -2281,7 +2281,7 @@
2281
2281
  "$ref": "#/definitions/version"
2282
2282
  },
2283
2283
  "range": {
2284
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
2284
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
2285
2285
  "$ref": "#/definitions/range"
2286
2286
  },
2287
2287
  "status": {
@@ -2323,7 +2323,7 @@
2323
2323
  "maxLength": 1024
2324
2324
  },
2325
2325
  "range": {
2326
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
2326
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
2327
2327
  "type": "string",
2328
2328
  "minLength": 1,
2329
2329
  "maxLength": 1024
@@ -2433,12 +2433,12 @@ limitations under the License.
2433
2433
  </xs:enumeration>
2434
2434
  <xs:enumeration value="incomplete_first_party_proprietary_only">
2435
2435
  <xs:annotation>
2436
- <xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2436
+ <xs:documentation>The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2437
2437
  </xs:annotation>
2438
2438
  </xs:enumeration>
2439
2439
  <xs:enumeration value="incomplete_first_party_opensource_only">
2440
2440
  <xs:annotation>
2441
- <xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2441
+ <xs:documentation>The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2442
2442
  </xs:annotation>
2443
2443
  </xs:enumeration>
2444
2444
  <xs:enumeration value="incomplete_third_party_only">
@@ -3644,7 +3644,7 @@ limitations under the License.
3644
3644
  </xs:element>
3645
3645
  <xs:element name="range" type="xs:normalizedString" minOccurs="1" maxOccurs="1">
3646
3646
  <xs:annotation>
3647
- <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst</xs:documentation>
3647
+ <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec</xs:documentation>
3648
3648
  </xs:annotation>
3649
3649
  </xs:element>
3650
3650
  </xs:choice>
@@ -25,7 +25,7 @@
25
25
  "type": "string",
26
26
  "title": "CycloneDX Specification Version",
27
27
  "description": "The version of the CycloneDX specification the BOM conforms to.",
28
- "examples": ["1.6.1"]
28
+ "examples": ["1.6"]
29
29
  },
30
30
  "serialNumber": {
31
31
  "type": "string",
@@ -2237,7 +2237,7 @@
2237
2237
  "aggregate": {
2238
2238
  "$ref": "#/definitions/aggregateType",
2239
2239
  "title": "Aggregate",
2240
- "description": "Specifies an aggregate type that describe how complete a relationship is."
2240
+ "description": "Specifies an aggregate type that describes how complete a relationship is."
2241
2241
  },
2242
2242
  "assemblies": {
2243
2243
  "type": "array",
@@ -2928,7 +2928,7 @@
2928
2928
  },
2929
2929
  "range": {
2930
2930
  "title": "Version Range",
2931
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
2931
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
2932
2932
  "$ref": "#/definitions/versionRange"
2933
2933
  },
2934
2934
  "status": {
@@ -2983,7 +2983,7 @@
2983
2983
  ]
2984
2984
  },
2985
2985
  "versionRange": {
2986
- "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst",
2986
+ "description": "A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec",
2987
2987
  "type": "string",
2988
2988
  "minLength": 1,
2989
2989
  "maxLength": 4096,
@@ -76,7 +76,7 @@ limitations under the License.
76
76
  <xs:simpleType name="versionRangeType">
77
77
  <xs:annotation>
78
78
  <xs:documentation xml:lang="en"><![CDATA[
79
- A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst
79
+ A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec
80
80
 
81
81
  Example values:
82
82
  - "vers:cargo/9.0.14"
@@ -2672,7 +2672,7 @@ limitations under the License.
2672
2672
  <xs:element name="copyright" type="bom:copyrightsType" minOccurs="0" maxOccurs="1">
2673
2673
  <xs:annotation>
2674
2674
  <xs:documentation>
2675
- opyright evidence captures intellectual property assertions, providing evidence of possible ownership and legal protection.
2675
+ Copyright evidence captures intellectual property assertions, providing evidence of possible ownership and legal protection.
2676
2676
  </xs:documentation>
2677
2677
  </xs:annotation>
2678
2678
  </xs:element>
@@ -2715,7 +2715,7 @@ limitations under the License.
2715
2715
  <xs:sequence minOccurs="0" maxOccurs="unbounded">
2716
2716
  <xs:element name="aggregate" type="bom:aggregateType" default="not_specified">
2717
2717
  <xs:annotation>
2718
- <xs:documentation>Specifies an aggregate type that describe how complete a relationship is.</xs:documentation>
2718
+ <xs:documentation>Specifies an aggregate type that describes how complete a relationship is.</xs:documentation>
2719
2719
  </xs:annotation>
2720
2720
  </xs:element>
2721
2721
  <xs:element name="assemblies" minOccurs="0" maxOccurs="1">
@@ -2810,12 +2810,12 @@ limitations under the License.
2810
2810
  </xs:enumeration>
2811
2811
  <xs:enumeration value="incomplete_first_party_proprietary_only">
2812
2812
  <xs:annotation>
2813
- <xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2813
+ <xs:documentation>The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are proprietary.</xs:documentation>
2814
2814
  </xs:annotation>
2815
2815
  </xs:enumeration>
2816
2816
  <xs:enumeration value="incomplete_first_party_opensource_only">
2817
2817
  <xs:annotation>
2818
- <xs:documentation>The relationship is incomplete. Only relationships for third-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2818
+ <xs:documentation>The relationship is incomplete. Only relationships for first-party components, services, or their dependencies are represented, limited specifically to those that are opensource.</xs:documentation>
2819
2819
  </xs:annotation>
2820
2820
  </xs:enumeration>
2821
2821
  <xs:enumeration value="incomplete_third_party_only">
@@ -4475,7 +4475,7 @@ limitations under the License.
4475
4475
  </xs:element>
4476
4476
  <xs:element name="range" type="bom:versionRangeType" minOccurs="1" maxOccurs="1">
4477
4477
  <xs:annotation>
4478
- <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/purl-spec/VERSION-RANGE-SPEC.rst</xs:documentation>
4478
+ <xs:documentation>A version range specified in Package URL Version Range syntax (vers) which is defined at https://github.com/package-url/vers-spec</xs:documentation>
4479
4479
  </xs:annotation>
4480
4480
  </xs:element>
4481
4481
  </xs:choice>