@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.
- package/README.md +1 -0
- package/dist.d/_helpers/sortable.d.ts.map +1 -1
- package/dist.d/_helpers/stringable.d.ts +2 -2
- package/dist.d/enums/externalReferenceType.d.ts +4 -0
- package/dist.d/enums/externalReferenceType.d.ts.map +1 -1
- package/dist.d/enums/hashAlogorithm.d.ts +3 -1
- package/dist.d/enums/hashAlogorithm.d.ts.map +1 -1
- package/dist.d/factories/fromNodePackageJson.node.d.ts.map +1 -1
- package/dist.d/serialize/json/normalize.d.ts.map +1 -1
- package/dist.d/serialize/xml/normalize.d.ts.map +1 -1
- package/dist.d/spec/consts.d.ts +2 -0
- package/dist.d/spec/consts.d.ts.map +1 -1
- package/dist.d/spec/enums.d.ts +1 -0
- package/dist.d/spec/enums.d.ts.map +1 -1
- package/dist.d/validation/jsonValidator.node.d.ts.map +1 -1
- package/dist.node/_helpers/sortable.js.map +1 -1
- package/dist.node/enums/externalReferenceType.js +4 -0
- package/dist.node/enums/externalReferenceType.js.map +1 -1
- package/dist.node/enums/hashAlogorithm.js +2 -0
- package/dist.node/enums/hashAlogorithm.js.map +1 -1
- package/dist.node/factories/fromNodePackageJson.node.js.map +1 -1
- package/dist.node/resources.node.js +6 -0
- package/dist.node/resources.node.js.map +1 -1
- package/dist.node/serialize/json/normalize.js +1 -0
- package/dist.node/serialize/json/normalize.js.map +1 -1
- package/dist.node/serialize/xml/normalize.js +1 -0
- package/dist.node/serialize/xml/normalize.js.map +1 -1
- package/dist.node/spec/consts.js +92 -1
- package/dist.node/spec/consts.js.map +1 -1
- package/dist.node/spec/enums.js +1 -0
- package/dist.node/spec/enums.js.map +1 -1
- package/dist.node/validation/jsonValidator.node.js +1 -0
- package/dist.node/validation/jsonValidator.node.js.map +1 -1
- package/dist.web/lib.dev.js +101 -1
- 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 +9 -7
- package/res/schema/README.md +3 -1
- package/res/schema/bom-1.4.SNAPSHOT.schema.json +2 -2
- package/res/schema/bom-1.4.SNAPSHOT.xsd +1 -1
- package/res/schema/bom-1.5.SNAPSHOT.schema.json +2 -2
- package/res/schema/bom-1.5.SNAPSHOT.xsd +3 -3
- package/res/schema/bom-1.6.SNAPSHOT.schema.json +4 -4
- package/res/schema/bom-1.6.SNAPSHOT.xsd +6 -6
- package/res/schema/bom-1.7.SNAPSHOT.schema.json +6700 -0
- package/res/schema/bom-1.7.SNAPSHOT.xsd +9742 -0
- package/res/schema/cryptography-defs.SNAPSHOT.schema.json +576 -0
- package/src/_helpers/sortable.ts +1 -0
- package/src/_helpers/uri.ts +1 -1
- package/src/enums/externalReferenceType.ts +4 -0
- package/src/enums/hashAlogorithm.ts +2 -0
- package/src/factories/fromNodePackageJson.node.ts +2 -0
- package/src/resources.node.ts +6 -0
- package/src/serialize/json/normalize.ts +1 -0
- package/src/serialize/xml/normalize.ts +1 -0
- package/src/serialize/xmlSerializer.web.ts +1 -1
- package/src/spec/consts.ts +117 -0
- package/src/spec/enums.ts +1 -0
- package/src/validation/jsonValidator.node.ts +1 -0
- package/tsconfig.d.tsbuildinfo +1 -1
- package/tsconfig.node.tsbuildinfo +1 -1
- package/dist.d/_helpers/stringable.d.ts.map +0 -1
- package/dist.node/_helpers/stringable.js +0 -21
- package/dist.node/_helpers/stringable.js.map +0 -1
- /package/src/_helpers/{stringable.ts → stringable.d.ts} +0 -0
package/dist.web/lib.dev.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.dev.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;ACVA;;;;;;;;;;;;;;;;;EAiBE;;AAEF,wBAMC;AAND,QAAgB,CAAC,CAAC,MAAM,CAAK,GAA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C,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;AAChF,CAAC;;;;;;;;;;;;ACpCD;;;;;;;;;;;;;;;;;EAiBE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,wGAA0C;;;;;;;;;;;;ACnB1C;;;;;;;;;;;;;;;;;EAiBE;;;;;;;;;;;;;;;;AAEF,gGAA8B;;;;;;;;;;;;ACnB9B;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,qGAAsD;AAGtD,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAa,OAAgB;QAC3B,KAAK,CAAC,0CAA0C,OAAO,EAAE,CAAC;IAC5D,CAAC;CACF;AAJD,kDAIC;AAED,MAAa,8BAA+B,SAAQ,qBAAY;CAAG;AAAnE,wEAAmE;;;;;;;;;;;;AC5BnE;;;;;;;;;;;;;;;;;EAiBE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,yFAAwB;AAExB,8FAAgC;;;;;;;;;;;;ACrBhC;;;;;;;;;;;;;;;;;EAiBE;;;;;;;;;;;;;;;;AAEF,qGAA8B;;;;;;;;;;;;ACnB9B;;;;;;;;;;;;;;;;;EAiBE;;;;;;;;;;;;ACjBF,0C;;;;;;;;;;ACAA,kD;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://CycloneDX_library/webpack/universalModuleDefinition","webpack://CycloneDX_library/./src/_helpers/iterable.ts","webpack://CycloneDX_library/./src/_helpers/notUndefined.ts","webpack://CycloneDX_library/./src/_helpers/sortable.ts","webpack://CycloneDX_library/./src/_helpers/tree.ts","webpack://CycloneDX_library/./src/_helpers/uri.ts","webpack://CycloneDX_library/./src/_optPlug.node/errors.ts","webpack://CycloneDX_library/./src/enums/attachmentEncoding.ts","webpack://CycloneDX_library/./src/enums/componentScope.ts","webpack://CycloneDX_library/./src/enums/componentType.ts","webpack://CycloneDX_library/./src/enums/externalReferenceType.ts","webpack://CycloneDX_library/./src/enums/hashAlogorithm.ts","webpack://CycloneDX_library/./src/enums/index.ts","webpack://CycloneDX_library/./src/enums/licenseAcknowledgement.ts","webpack://CycloneDX_library/./src/enums/lifecyclePhase.ts","webpack://CycloneDX_library/./src/enums/vulnerability/affectStatus.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisJustification.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisResponse.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisState.ts","webpack://CycloneDX_library/./src/enums/vulnerability/index.ts","webpack://CycloneDX_library/./src/enums/vulnerability/ratingMethod.ts","webpack://CycloneDX_library/./src/enums/vulnerability/severity.ts","webpack://CycloneDX_library/./src/factories/index.common.ts","webpack://CycloneDX_library/./src/factories/index.web.ts","webpack://CycloneDX_library/./src/factories/license.ts","webpack://CycloneDX_library/./src/factories/packageUrl.ts","webpack://CycloneDX_library/./src/index.common.ts","webpack://CycloneDX_library/./src/index.web.ts","webpack://CycloneDX_library/./src/models/attachment.ts","webpack://CycloneDX_library/./src/models/bom.ts","webpack://CycloneDX_library/./src/models/bomLink.ts","webpack://CycloneDX_library/./src/models/bomRef.ts","webpack://CycloneDX_library/./src/models/component.ts","webpack://CycloneDX_library/./src/models/copyright.ts","webpack://CycloneDX_library/./src/models/externalReference.ts","webpack://CycloneDX_library/./src/models/hash.ts","webpack://CycloneDX_library/./src/models/index.ts","webpack://CycloneDX_library/./src/models/license.ts","webpack://CycloneDX_library/./src/models/lifecycle.ts","webpack://CycloneDX_library/./src/models/metadata.ts","webpack://CycloneDX_library/./src/models/organizationalContact.ts","webpack://CycloneDX_library/./src/models/organizationalEntity.ts","webpack://CycloneDX_library/./src/models/property.ts","webpack://CycloneDX_library/./src/models/service.ts","webpack://CycloneDX_library/./src/models/swid.ts","webpack://CycloneDX_library/./src/models/tool.ts","webpack://CycloneDX_library/./src/models/vulnerability/advisory.ts","webpack://CycloneDX_library/./src/models/vulnerability/affect.ts","webpack://CycloneDX_library/./src/models/vulnerability/analysis.ts","webpack://CycloneDX_library/./src/models/vulnerability/credits.ts","webpack://CycloneDX_library/./src/models/vulnerability/index.ts","webpack://CycloneDX_library/./src/models/vulnerability/rating.ts","webpack://CycloneDX_library/./src/models/vulnerability/reference.ts","webpack://CycloneDX_library/./src/models/vulnerability/source.ts","webpack://CycloneDX_library/./src/models/vulnerability/vulnerability.ts","webpack://CycloneDX_library/./src/serialize/baseSerializer.ts","webpack://CycloneDX_library/./src/serialize/bomRefDiscriminator.ts","webpack://CycloneDX_library/./src/serialize/errors.ts","webpack://CycloneDX_library/./src/serialize/index.common.ts","webpack://CycloneDX_library/./src/serialize/index.web.ts","webpack://CycloneDX_library/./src/serialize/json/index.ts","webpack://CycloneDX_library/./src/serialize/json/normalize.ts","webpack://CycloneDX_library/./src/serialize/json/types.ts","webpack://CycloneDX_library/./src/serialize/jsonSerializer.ts","webpack://CycloneDX_library/./src/serialize/types.ts","webpack://CycloneDX_library/./src/serialize/xml/_xsd.ts","webpack://CycloneDX_library/./src/serialize/xml/index.ts","webpack://CycloneDX_library/./src/serialize/xml/normalize.ts","webpack://CycloneDX_library/./src/serialize/xml/types.ts","webpack://CycloneDX_library/./src/serialize/xmlBaseSerializer.ts","webpack://CycloneDX_library/./src/serialize/xmlSerializer.web.ts","webpack://CycloneDX_library/./src/spdx.ts","webpack://CycloneDX_library/./src/spec/_protocol.ts","webpack://CycloneDX_library/./src/spec/consts.ts","webpack://CycloneDX_library/./src/spec/enums.ts","webpack://CycloneDX_library/./src/spec/errors.ts","webpack://CycloneDX_library/./src/spec/index.ts","webpack://CycloneDX_library/./src/types/cpe.ts","webpack://CycloneDX_library/./src/types/cwe.ts","webpack://CycloneDX_library/./src/types/index.ts","webpack://CycloneDX_library/./src/types/integer.ts","webpack://CycloneDX_library/./src/types/mimeType.ts","webpack://CycloneDX_library/./src/types/nodePackageJson.ts","webpack://CycloneDX_library/./src/utils/bomUtility.ts","webpack://CycloneDX_library/./src/utils/index.common.ts","webpack://CycloneDX_library/./src/utils/index.web.ts","webpack://CycloneDX_library/./src/validation/errors.ts","webpack://CycloneDX_library/./src/validation/index.common.ts","webpack://CycloneDX_library/./src/validation/index.web.ts","webpack://CycloneDX_library/./src/validation/types.ts","webpack://CycloneDX_library/external commonjs \"packageurl-js\"","webpack://CycloneDX_library/external commonjs \"spdx-expression-parse\"","webpack://CycloneDX_library/webpack/bootstrap","webpack://CycloneDX_library/webpack/before-startup","webpack://CycloneDX_library/webpack/startup","webpack://CycloneDX_library/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CycloneDX_library\"] = factory();\n\telse\n\t\troot[\"CycloneDX_library\"] = factory();\n})(self, () => {\nreturn ","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport function * chainI<T> (...iterables: Array<Iterable<T>>): Generator<T> {\n for (const iterable of iterables) {\n for (const item of iterable) {\n yield item\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport type NotUndefined<T> = T extends undefined ? never : T\n\nexport function isNotUndefined<T> (value: T | undefined): value is NotUndefined<T> {\n return value !== undefined\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Stringable } from './stringable'\n\nexport interface Sortable<TItem> {\n sorted: () => TItem[]\n}\n\nexport interface Comparable<TOther> {\n /**\n * Compare one object with another.\n *\n * The purpose of this method is not to test for equality, but have deterministic comparability.\n * As long as this method is deterministic, there is no need for a proper ordering in any result/downstream.\n */\n compare: (other: TOther) => number\n}\n\nexport const compareObjectsSymbol = Symbol('internal compare function')\n\nexport type SortableIterable<TItem> = Iterable<TItem> & Sortable<TItem>\n\nexport abstract class SortableSet<TItem> extends Set<TItem> implements SortableIterable<TItem>, Comparable<Sortable<TItem>> {\n /**\n * Comparator function to apply to two items.\n */\n protected abstract [compareObjectsSymbol] (a: TItem, b: TItem): number\n\n /**\n * Get a sorted array of all items in the collection..\n */\n sorted (): TItem[] {\n return Array.from(this).sort(this[compareObjectsSymbol])\n }\n\n /**\n * Comparator function to apply to two objects of the collection..\n */\n compare (other: Sortable<TItem>): number {\n const sortedOther = other.sorted()\n const sortedSelf = this.sorted()\n\n if (sortedSelf.length !== sortedOther.length) {\n return sortedSelf.length - sortedOther.length\n }\n\n // it was asserted, that both lists have equal length -> zip-like compare\n for (let i = sortedSelf.length - 1; i >= 0; --i) {\n const iCompared = this[compareObjectsSymbol](sortedSelf[i], sortedOther[i])\n if (iCompared !== 0) {\n return iCompared\n }\n }\n\n return 0\n }\n}\n\nexport class SortableComparables<TItem extends Comparable<any>> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n if (a.constructor === b.constructor) {\n return a.compare(b)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n}\n\nexport class SortableStringables<TItem extends Stringable = Stringable> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n return a.toString().localeCompare(b.toString())\n }\n}\n\nexport class SortableNumbers<TItem extends number = number> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n return a - b\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport const treeIteratorSymbol = Symbol('iterator of a tree/nesting-like structure')\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nconst _ESCAPES: Array<[RegExp, string]> = [\n [/ /g, '%20'],\n [/\"/g, '%22'],\n [/'/g, '%27'],\n [/\\[/g, '%5B'],\n [/]/g, '%5D'],\n [/</g, '%3C'],\n [/>/g, '%3E'],\n [/\\{/g, '%7B'],\n [/}/g, '%7D'],\n]\n\n/**\n * Make a string valid to\n * - XML::anyURI spec.\n * - JSON::iri-reference spec.\n *\n * BEST EFFORT IMPLEMENTATION\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI}\n * @see {@link http://www.datypic.com/sc/xsd/t-xsd_anyURI.html}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc2396}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc3987}\n */\nexport function escapeUri<T extends (string | undefined)> (value: T): T {\n if (value === undefined) {\n return value\n }\n for (const [s, r] of _ESCAPES) {\n /* @ts-expect-error -- TS does not properly detect that value is to be forced as string, here */\n value = value.replace(s, r)\n }\n return value\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport class OptPlugError extends Error {\n override readonly cause: any | undefined\n\n constructor (message: string, cause?: any) {\n super(message)\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- intended */\n this.cause = cause\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AttachmentEncoding {\n Base64 = 'base64',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ComponentScope {\n Required = 'required',\n Optional = 'optional',\n Excluded = 'excluded',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ComponentType {\n Application = 'application',\n Framework = 'framework',\n Library = 'library',\n Container = 'container',\n Platform = 'platform',\n OperatingSystem = 'operating-system',\n Device = 'device',\n DeviceDriver = 'device-driver',\n Firmware = 'firmware',\n File = 'file',\n MachineLearningModel = 'machine-learning-model',\n Data = 'data',\n CryptographicAsset = 'cryptographic-asset',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ExternalReferenceType {\n VCS = 'vcs',\n IssueTracker = 'issue-tracker',\n Website = 'website',\n Advisories = 'advisories',\n BOM = 'bom',\n MailingList = 'mailing-list',\n Social = 'social',\n Chat = 'chat',\n Documentation = 'documentation',\n Support = 'support',\n SourceDistribution = 'source-distribution',\n Distribution = 'distribution',\n DistributionIntake = 'distribution-intake',\n License = 'license',\n BuildMeta = 'build-meta',\n BuildSystem = 'build-system',\n ReleaseNotes = 'release-notes',\n SecurityContact = 'security-contact',\n ModelCard = 'model-card',\n Log = 'log',\n Configuration = 'configuration',\n Evidence = 'evidence',\n Formulation = 'formulation',\n Attestation = 'attestation',\n ThreatModel = 'threat-model',\n AdversaryModel = 'adversary-model',\n RiskAssessment = 'risk-assessment',\n VulnerabilityAssertion = 'vulnerability-assertion',\n ExploitabilityStatement = 'exploitability-statement',\n PentestReport = 'pentest-report',\n StaticAnalysisReport = 'static-analysis-report',\n DynamicAnalysisReport = 'dynamic-analysis-report',\n RuntimeAnalysisReport = 'runtime-analysis-report',\n ComponentAnalysisReport = 'component-analysis-report',\n MaturityReport = 'maturity-report',\n CertificationReport = 'certification-report',\n CodifiedInfrastructure = 'codified-infrastructure',\n QualityMetrics = 'quality-metrics',\n POAM = 'poam',\n ElectronicSignature = 'electronic-signature',\n DigitalSignature = 'digital-signature',\n RFC9116 = 'rfc-9116',\n\n // --\n\n Other = 'other',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum HashAlgorithm {\n MD5 = 'MD5',\n 'SHA-1' = 'SHA-1',\n 'SHA-256' = 'SHA-256',\n 'SHA-384' = 'SHA-384',\n 'SHA-512' = 'SHA-512',\n 'SHA3-256' = 'SHA3-256',\n 'SHA3-384' = 'SHA3-384',\n 'SHA3-512' = 'SHA3-512',\n 'BLAKE2b-256' = 'BLAKE2b-256',\n 'BLAKE2b-384' = 'BLAKE2b-384',\n 'BLAKE2b-512' = 'BLAKE2b-512',\n BLAKE3 = 'BLAKE3',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './attachmentEncoding'\nexport * from './componentScope'\nexport * from './componentType'\nexport * from './externalReferenceType'\nexport * from './hashAlogorithm'\nexport * from './licenseAcknowledgement'\nexport * from './lifecyclePhase'\nexport * as Vulnerability from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum LicenseAcknowledgement {\n Declared = 'declared',\n Concluded = 'concluded',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum LifecyclePhase {\n Design = 'design',\n PreBuild = 'pre-build',\n Build = 'build',\n PostBuild = 'post-build',\n Operations = 'operations',\n Discovery = 'discovery',\n Decommission = 'decommission',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AffectStatus {\n Affected = 'affected',\n Unaffected = 'unaffected',\n Unknown = 'unknown',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AnalysisJustification {\n CodeNotPresent = 'code_not_present',\n CodeNotReachable = 'code_not_reachable',\n RequiresConfiguration = 'requires_configuration',\n RequiresDependency = 'requires_dependency',\n RequiresEnvironment = 'requires_environment',\n ProtectedByCompiler = 'protected_by_compiler',\n ProtectedAtRuntime = 'protected_at_runtime',\n ProtectedAtPerimeter = 'protected_at_perimeter',\n ProtectedByMitigatingControl = 'protected_by_mitigating_control',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableStringables } from '../../_helpers/sortable'\n\nexport enum AnalysisResponse {\n CanNotFix = 'can_not_fix',\n WillNotFix = 'will_not_fix',\n Update = 'update',\n Rollback = 'rollback',\n WorkaroundAvailable = 'workaround_available',\n}\n\nexport class AnalysisResponseRepository extends SortableStringables<AnalysisResponse> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AnalysisState {\n Resolved = 'resolved',\n ResolvedWithPedigree = 'resolved_with_pedigree',\n Exploitable = 'exploitable',\n InTriage = 'in_triage',\n FalsePositive = 'false_positive',\n NotAffected = 'not_affected',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './affectStatus'\nexport * from './analysisJustification'\nexport * from './analysisResponse'\nexport * from './analysisState'\nexport * from './ratingMethod'\nexport * from './severity'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Specifies the severity or risk scoring methodology or standard used.\n */\nexport enum RatingMethod {\n /** CVSSv2 - [Common Vulnerability Scoring System v2](https://www.first.org/cvss/v2/) */\n CVSSv2 = 'CVSSv2',\n /** CVSSv3 - [Common Vulnerability Scoring System v3](https://www.first.org/cvss/v3-0/) */\n CVSSv3 = 'CVSSv3',\n /** CVSSv31 - [Common Vulnerability Scoring System v3.1](https://www.first.org/cvss/v3-1/) */\n CVSSv31 = 'CVSSv31',\n /** CVSSv4 - [Common Vulnerability Scoring System v4](https://www.first.org/cvss/v4-0/) */\n CVSSv4 = 'CVSSv4',\n /** OWASP - [OWASP Risk Rating Methodology](https://owasp.org/www-community/OWASP_Risk_Rating_Methodology) */\n OWASP = 'OWASP',\n /** SSVC - [Stakeholder Specific Vulnerability Categorization](https://github.com/CERTCC/SSVC) (all versions) */\n SSVC = 'SSVC',\n\n // --\n\n /** any other */\n Other = 'other',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Textual representation of the severity of the vulnerability adopted by the analysis method.\n * If the analysis method uses values other than what is provided, the user is expected to translate appropriately.\n */\nexport enum Severity {\n Critical = 'critical',\n High = 'high',\n Medium = 'medium',\n Low = 'low',\n Info = 'info',\n None = 'none',\n Unknown = 'unknown',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// not everything is public, yet\n\nexport * from './license'\nexport * from './packageUrl'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// ... nothing yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { DisjunctiveLicense, License } from '../models/license'\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../models/license'\nimport { fixupSpdxId, isValidSpdxLicenseExpression } from '../spdx'\n\nexport class LicenseFactory {\n makeFromString (value: string): License {\n try {\n return this.makeSpdxLicense(value)\n } catch {\n /* pass */\n }\n\n try {\n return this.makeExpression(value)\n } catch {\n /* pass */\n }\n\n return this.makeNamedLicense(value)\n }\n\n /**\n * @throws {@link RangeError} if expression is not eligible\n */\n makeExpression (value: string | any): LicenseExpression {\n const expression = String(value)\n if (isValidSpdxLicenseExpression(expression)) {\n return new LicenseExpression(expression)\n }\n throw new RangeError('Invalid SPDX license expression')\n }\n\n makeDisjunctive (value: string): DisjunctiveLicense {\n try {\n return this.makeSpdxLicense(value)\n } catch {\n return this.makeNamedLicense(value)\n }\n }\n\n /**\n * @throws {@link RangeError} if value is not supported SPDX id\n */\n makeSpdxLicense (value: string | any): SpdxLicense {\n const fixed = fixupSpdxId(String(value))\n if (undefined === fixed) {\n throw new RangeError('Unsupported SPDX license ID')\n }\n\n return new SpdxLicense(fixed)\n }\n\n makeNamedLicense (value: string | any): NamedLicense {\n return new NamedLicense(String(value))\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { PackageURL, PurlQualifierNames } from 'packageurl-js'\n\nimport { ExternalReferenceType } from '../enums/externalReferenceType'\nimport type { Component } from '../models/component'\n\nexport class PackageUrlFactory<PurlType extends PackageURL['type'] = PackageURL['type']> {\n readonly #type: PurlType\n\n constructor (type: PurlType) {\n this.#type = type\n }\n\n get type (): PurlType {\n return this.#type\n }\n\n /* eslint-disable-next-line @typescript-eslint/no-inferrable-types -- docs */\n makeFromComponent (component: Component, sort: boolean = false): PackageURL | undefined {\n const qualifiers: PackageURL['qualifiers'] = {}\n /* @ts-expect-error TS2322 */\n qualifiers.__proto__ = null /* eslint-disable-line no-proto -- intended */\n let subpath: PackageURL['subpath'] = undefined\n\n // sorting to allow reproducibility: use the last instance for a `extRef.type`, if multiples exist\n const extRefs = sort\n ? component.externalReferences.sorted()\n : component.externalReferences\n for (const extRef of extRefs) {\n const url = extRef.url.toString()\n if (url.length <= 0) {\n continue\n }\n // No further need for validation.\n // According to https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst\n // there is no formal requirement to a `..._url`.\n // Everything is possible: URL-encoded, not encoded, with schema, without schema\n /* eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- intended */\n switch (extRef.type) {\n case ExternalReferenceType.VCS:\n [qualifiers[PurlQualifierNames.VcsUrl], subpath] = url.split('#', 2)\n break\n case ExternalReferenceType.Distribution:\n qualifiers[PurlQualifierNames.DownloadUrl] = url\n break\n }\n }\n\n const hashes = component.hashes\n if (hashes.size > 0) {\n qualifiers[PurlQualifierNames.Checksum] = Array.from(\n sort\n ? hashes.sorted()\n : hashes,\n ([hashAlgo, hashCont]) => `${hashAlgo.toLowerCase()}:${hashCont.toLowerCase()}`\n ).join(',')\n }\n\n try {\n // Do not beautify the parameters here, because that is in the domain of PackageURL and its representation.\n // No need to convert an empty \"subpath\" string to `undefined` and such.\n return new PackageURL(\n this.#type,\n component.group,\n component.name,\n component.version,\n qualifiers,\n subpath\n )\n } catch {\n return undefined\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Enums from './enums'\nexport * as Models from './models'\nexport * as SPDX from './spdx'\nexport * as Spec from './spec'\nexport * as Types from './types'\n// do not export the _helpers, they are for internal use only\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\nexport * as Factories from './factories/index.web'\nexport * as Serialize from './serialize/index.web'\nexport * as Utils from './utils/index.web'\nexport * as Validation from './validation/index.web'\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Stringable } from '../_helpers/stringable'\nimport type { AttachmentEncoding } from '../enums/attachmentEncoding'\n\nexport interface OptionalAttachmentProperties {\n contentType?: Attachment['contentType']\n encoding?: Attachment['encoding']\n}\n\nexport type AttachmentContent = Stringable\n\nexport class Attachment {\n contentType?: string\n content: AttachmentContent\n encoding?: AttachmentEncoding\n\n constructor (content: Attachment['content'], op: OptionalAttachmentProperties = {}) {\n this.contentType = op.contentType\n this.content = content\n this.encoding = op.encoding\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { PositiveInteger } from '../types/integer'\nimport { isPositiveInteger } from '../types/integer'\nimport { ComponentRepository } from './component'\nimport { Metadata } from './metadata'\nimport { ServiceRepository } from './service'\nimport { VulnerabilityRepository } from './vulnerability/vulnerability'\n\nexport interface OptionalBomProperties {\n metadata?: Bom['metadata']\n components?: Bom['components']\n services?: Bom['services']\n version?: Bom['version']\n vulnerabilities?: Bom['vulnerabilities']\n serialNumber?: Bom['serialNumber']\n}\n\nexport class Bom {\n metadata: Metadata\n components: ComponentRepository\n services: ServiceRepository\n vulnerabilities: VulnerabilityRepository\n\n /** @see {@link version} */\n #version: PositiveInteger = 1\n\n /** @see {@link serialNumber} */\n #serialNumber?: string\n\n // Property `bomFormat` is not part of model, it is runtime information.\n // Property `specVersion` is not part of model, it is runtime information.\n\n // Property `dependencies` is not part of this model, but part of `Component` and other models.\n // The dependency graph can be normalized on render-time, no need to store it in the bom model.\n\n /**\n * @throws {@link TypeError} if `op.version` is neither {@link PositiveInteger} nor `undefined`\n */\n constructor (op: OptionalBomProperties = {}) {\n this.metadata = op.metadata ?? new Metadata()\n this.components = op.components ?? new ComponentRepository()\n this.services= op.services?? new ServiceRepository()\n this.version = op.version ?? this.version\n this.vulnerabilities = op.vulnerabilities ?? new VulnerabilityRepository()\n this.serialNumber = op.serialNumber\n }\n\n get version (): PositiveInteger {\n return this.#version\n }\n\n /**\n * @throws {@link TypeError} if value is not {@link PositiveInteger}\n */\n set version (value: PositiveInteger) {\n if (!isPositiveInteger(value)) {\n throw new TypeError('Not PositiveInteger')\n }\n this.#version = value\n }\n\n get serialNumber (): string | undefined {\n return this.#serialNumber\n }\n\n set serialNumber (value: string | undefined) {\n this.#serialNumber = value === ''\n ? undefined\n : value\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\nabstract class BomLinkBase implements Stringable, Comparable<Stringable> {\n /* @ts-expect-error TS2564 */\n #value: string\n\n /** @internal */\n protected abstract _isValid (value: any): boolean\n\n /**\n * @throws {@link RangeError} if value is invalid\n */\n constructor (value: string) {\n this.value = value\n }\n\n get value (): string {\n return this.#value\n }\n\n /**\n * @throws {@link RangeError} if value is invalid\n */\n set value (value: string) {\n if (!this._isValid(value)) {\n throw new RangeError('invalid value')\n }\n this.#value = value\n }\n\n compare (other: Stringable): number {\n return this.toString().localeCompare(other.toString())\n }\n\n toString (): string {\n return this.value\n }\n}\n\n/**\n * Descriptor for another BOM document.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport class BomLinkDocument extends BomLinkBase {\n /* regular expressions were taken from the CycloneDX schema definitions. */\n static readonly #pattern = /^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[1-9][0-9]*$/\n\n /**\n * Whether the `value` is a valid descriptor for another BOM document.\n */\n static isValid (value: any): boolean {\n return typeof value === 'string' &&\n this.#pattern.test(value)\n }\n\n /** @internal */\n protected _isValid (value: any): boolean {\n return BomLinkDocument.isValid(value)\n }\n}\n\n/**\n * Descriptor for an element in a BOM document.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport class BomLinkElement extends BomLinkBase {\n /* regular expressions were taken from the CycloneDX schema definitions. */\n static readonly #pattern = /^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[1-9][0-9]*#.+$/\n\n /**\n * Whether the `value` is a valid descriptor for an element in a BOM document.\n */\n static isValid (value: any): boolean {\n return typeof value === 'string' &&\n this.#pattern.test(value)\n }\n\n /** @internal */\n protected _isValid (value: any): boolean {\n return BomLinkElement.isValid(value)\n }\n}\n\n/**\n * Either {@link BomLinkDocument} or {@link BomLinkElement}.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport type BomLink = BomLinkDocument | BomLinkElement\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\n/**\n * Proxy for the BomRef.\n * This way a `BomRef` gets unique by the in-memory-address of the object.\n */\nexport class BomRef implements Stringable, Comparable<Stringable> {\n value?: string\n\n constructor (value?: BomRef['value']) {\n this.value = value\n }\n\n compare (other: Stringable): number {\n return this.toString().localeCompare(other.toString())\n }\n\n toString (): string {\n return this.value ?? ''\n }\n}\n\nexport class BomRefRepository extends Set<BomRef> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { PackageURL } from 'packageurl-js'\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport { treeIteratorSymbol } from '../_helpers/tree'\nimport type { ComponentScope, ComponentType } from '../enums'\nimport type { CPE } from '../types/cpe'\nimport { isCPE } from '../types/cpe'\nimport { BomRef, BomRefRepository } from './bomRef'\nimport type { Copyright } from './copyright'\nimport { CopyrightRepository} from './copyright'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { HashDictionary } from './hash'\nimport { LicenseRepository } from './license'\nimport type { OrganizationalEntity } from './organizationalEntity'\nimport { PropertyRepository } from './property'\nimport type { SWID } from './swid'\n\nexport interface OptionalComponentProperties {\n bomRef?: BomRef['value']\n author?: Component['author']\n copyright?: Component['copyright']\n description?: Component['description']\n externalReferences?: Component['externalReferences']\n group?: Component['group']\n hashes?: Component['hashes']\n licenses?: Component['licenses']\n publisher?: Component['publisher']\n purl?: Component['purl']\n scope?: Component['scope']\n supplier?: Component['supplier']\n swid?: Component['swid']\n version?: Component['version']\n components?: Component['components']\n cpe?: Component['cpe']\n properties?: Component['properties']\n evidence?: Component['evidence']\n\n dependencies?: Component['dependencies']\n}\n\nexport class Component implements Comparable<Component> {\n type: ComponentType\n name: string\n author?: string\n copyright?: Copyright\n description?: string\n externalReferences: ExternalReferenceRepository\n group?: string\n hashes: HashDictionary\n licenses: LicenseRepository\n publisher?: string\n purl?: PackageURL\n scope?: ComponentScope\n supplier?: OrganizationalEntity\n swid?: SWID\n version?: string\n components: ComponentRepository\n properties: PropertyRepository\n evidence?: ComponentEvidence\n\n /** @see {@link bomRef} */\n readonly #bomRef: BomRef\n\n /** @see {@link cpe} */\n #cpe?: CPE\n\n dependencies: BomRefRepository\n\n /**\n * @throws {@link TypeError} if `op.cpe` is neither {@link CPE} nor `undefined`\n */\n constructor (type: Component['type'], name: Component['name'], op: OptionalComponentProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.type = type\n this.name = name\n this.supplier = op.supplier\n this.author = op.author\n this.copyright = op.copyright\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n this.group = op.group\n this.hashes = op.hashes ?? new HashDictionary()\n this.licenses = op.licenses ?? new LicenseRepository()\n this.publisher = op.publisher\n this.purl = op.purl\n this.scope = op.scope\n this.swid = op.swid\n this.version = op.version\n this.description = op.description\n this.components = op.components ?? new ComponentRepository()\n this.cpe = op.cpe\n this.properties = op.properties ?? new PropertyRepository()\n this.evidence = op.evidence\n\n this.dependencies = op.dependencies ?? new BomRefRepository()\n }\n\n get bomRef (): BomRef {\n return this.#bomRef\n }\n\n get cpe (): CPE | undefined {\n return this.#cpe\n }\n\n /**\n * @throws {@link TypeError} if value is neither {@link CPE} nor `undefined`\n */\n set cpe (value: CPE | undefined) {\n if (value !== undefined && !isCPE(value)) {\n throw new TypeError('Not CPE nor undefined')\n }\n this.#cpe = value\n }\n\n compare (other: Component): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n if (this.purl !== undefined && other.purl !== undefined) {\n return this.purl.toString().localeCompare(other.purl.toString())\n }\n if (this.#cpe !== undefined && other.#cpe !== undefined) {\n return this.#cpe.localeCompare(other.#cpe)\n }\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.group ?? '').localeCompare(other.group ?? '') ||\n this.name.localeCompare(other.name) ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class ComponentRepository extends SortableComparables<Component> {\n * [treeIteratorSymbol] (): Generator<Component> {\n for (const component of this) {\n yield component\n yield * component.components[treeIteratorSymbol]()\n }\n }\n}\n\nexport interface OptionalComponentEvidenceProperties {\n licenses?: ComponentEvidence['licenses']\n copyright?: ComponentEvidence['copyright']\n}\n\nexport class ComponentEvidence {\n licenses: LicenseRepository\n copyright: CopyrightRepository\n\n constructor (op: OptionalComponentEvidenceProperties = {}) {\n this.licenses = op.licenses ?? new LicenseRepository()\n this.copyright = op.copyright ?? new CopyrightRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableStringables } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\nexport type Copyright = Stringable\n\n/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments -- for docs reasons */\nexport class CopyrightRepository extends SortableStringables<Copyright> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport type { ExternalReferenceType } from '../enums/externalReferenceType'\nimport type { BomLink } from './bomLink'\nimport { HashDictionary } from './hash'\n\n\nexport interface OptionalExternalReferenceProperties {\n hashes?: ExternalReference['hashes']\n comment?: ExternalReference['comment']\n}\n\nexport class ExternalReference implements Comparable<ExternalReference> {\n url: URL | BomLink | string\n type: ExternalReferenceType\n hashes: HashDictionary\n comment?: string\n\n constructor (url: ExternalReference['url'], type: ExternalReference['type'], op: OptionalExternalReferenceProperties = {}) {\n this.url = url\n this.type = type\n this.hashes = op.hashes ?? new HashDictionary()\n this.comment = op.comment\n }\n\n compare (other: ExternalReference): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.type.localeCompare(other.type) ||\n this.url.toString().localeCompare(other.url.toString())\n }\n}\n\nexport class ExternalReferenceRepository extends SortableComparables<ExternalReference> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Sortable } from '../_helpers/sortable'\nimport type { HashAlgorithm } from '../enums/hashAlogorithm'\n\n// no regex for the HashContent in here. It applies at runtime of a normalization/serialization process.\nexport type HashContent = string\n\nexport type Hash = readonly [\n // order matters: it must reflect [key, value] of HashDictionary -\n // this way a HashDictionary can be constructed from multiple Hash objects.\n /* algorithm: */ HashAlgorithm,\n /* content: */ HashContent,\n // cannot use named tuple syntax ala `[a: T1, b: T2]` as it causes errors when downstream-projects compile with older versions of TypeScript\n]\n\nexport class HashDictionary extends Map<Hash[0], Hash[1]> implements Sortable<Hash> {\n static #compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return a1.localeCompare(a2) ||\n c1.localeCompare(c2)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n sorted (): Hash[] {\n return Array.from(this.entries()).sort(HashDictionary.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './attachment'\nexport * from './bom'\nexport * from './bomLink'\nexport * from './bomRef'\nexport * from './component'\nexport * from './copyright'\nexport * from './externalReference'\nexport * from './hash'\nexport * from './license'\nexport * from './lifecycle'\nexport * from './metadata'\nexport * from './organizationalContact'\nexport * from './organizationalEntity'\nexport * from './property'\nexport * from './service'\nexport * from './swid'\nexport * from './tool'\nexport * as Vulnerability from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Sortable } from '../_helpers/sortable'\nimport type { LicenseAcknowledgement } from '../enums/licenseAcknowledgement'\nimport type { SpdxId } from '../spdx'\nimport type { Attachment } from './attachment'\n\n/**\n * (SPDX) License Expression.\n *\n * No validation is done internally.\n * You may validate with {@link SPDX.isValidSpdxLicenseExpression | SPDX.isValidSpdxLicenseExpression()}.\n * You may assert valid objects with {@link Factories.LicenseFactory.makeExpression | Factories.LicenseFactory.makeExpression()}.\n */\nexport class LicenseExpression {\n /** @see {@link expression} */\n #expression!: string\n acknowledgement?: LicenseAcknowledgement\n\n /**\n * @throws {@link RangeError} if `expression` is empty string\n */\n constructor (expression: LicenseExpression['expression']) {\n this.expression = expression\n }\n\n get expression (): string {\n return this.#expression\n }\n\n /**\n * @throws {@link RangeError} if `value` is empty string\n */\n set expression (value: string) {\n if (value === '') {\n throw new RangeError('value is empty string')\n }\n this.#expression = value\n }\n\n compare (other: LicenseExpression): number {\n return this.#expression.localeCompare(other.#expression)\n }\n}\n\nclass DisjunctiveLicenseBase {\n acknowledgement?: LicenseAcknowledgement\n text?: Attachment\n #url?: URL | string\n\n constructor (op: OptionalDisjunctiveLicenseProperties = {}) {\n this.acknowledgement = op.acknowledgement\n this.text = op.text\n this.url = op.url\n }\n\n get url (): URL | string | undefined {\n return this.#url\n }\n\n set url (value: URL | string | undefined) {\n this.#url = value === ''\n ? undefined\n : value\n }\n}\n\ninterface OptionalDisjunctiveLicenseProperties {\n acknowledgement?: DisjunctiveLicenseBase['acknowledgement']\n text?: DisjunctiveLicenseBase['text']\n url?: DisjunctiveLicenseBase['url']\n}\n\nexport interface OptionalNamedLicenseProperties extends OptionalDisjunctiveLicenseProperties {}\n\nexport class NamedLicense extends DisjunctiveLicenseBase {\n name: string\n\n constructor (name: string, op: OptionalNamedLicenseProperties = {}) {\n super(op)\n this.name = name\n }\n\n compare (other: NamedLicense): number {\n return this.name.localeCompare(other.name)\n }\n}\n\nexport interface OptionalSpdxLicenseProperties extends OptionalDisjunctiveLicenseProperties {}\n\n/**\n * Disjunctive license with (SPDX-)ID - aka SpdxLicense.\n *\n * No validation is done internally.\n * You may validate with {@link SPDX.isSupportedSpdxId | SPDX.isSupportedSpdxId()}.\n * You may assert valid objects with {@link Factories.LicenseFactory.makeSpdxLicense | Factories.LicenseFactory.makeSpdxLicense()}.\n */\nexport class SpdxLicense extends DisjunctiveLicenseBase {\n /** @see {@link id} */\n #id!: SpdxId\n\n /**\n * @throws {@link RangeError} if `id` is empy string\n */\n constructor (id: SpdxId, op: OptionalSpdxLicenseProperties = {}) {\n super(op)\n this.id = id\n }\n\n get id (): SpdxId {\n return this.#id\n }\n\n /**\n * @throws {@link RangeError} if `value` is empy string\n */\n set id (value: SpdxId) {\n if (value === '') {\n throw new RangeError('value is empty string')\n }\n this.#id = value\n }\n\n compare (other: SpdxLicense): number {\n return this.#id.localeCompare(other.#id)\n }\n}\n\nexport type DisjunctiveLicense = NamedLicense | SpdxLicense\nexport type License = DisjunctiveLicense | LicenseExpression\n\nexport class LicenseRepository extends Set<License> implements Sortable<License> {\n static #compareItems (a: License, b: License): number {\n if (a.constructor === b.constructor) {\n // @ts-expect-error -- classes are from same type -> they are comparable\n return a.compare(b)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n\n sorted (): License[] {\n return Array.from(this).sort(LicenseRepository.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable, Sortable } from '../_helpers/sortable'\nimport type { LifecyclePhase } from '../enums/lifecyclePhase'\n\nexport interface OptionalNamedLifecycleProperties {\n description?: NamedLifecycle['description']\n}\n\nexport class NamedLifecycle implements Comparable<NamedLifecycle> {\n name: string\n description?: string\n\n constructor (name: string, op: OptionalNamedLifecycleProperties = {}) {\n this.name = name\n this.description = op.description\n }\n\n compare (other: NamedLifecycle): number {\n return this.name.localeCompare(other.name)\n }\n}\n\nexport type Lifecycle = LifecyclePhase | NamedLifecycle\n\nexport class LifecycleRepository extends Set<Lifecycle> implements Sortable<Lifecycle> {\n static #compareItems (a: Lifecycle, b: Lifecycle): number {\n if (a.constructor === b.constructor) {\n return a instanceof NamedLifecycle\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- false-positive */\n ? a.compare(b as typeof a)\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- false-positive */\n : a.localeCompare(b as typeof a)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n\n sorted (): Lifecycle[] {\n return Array.from(this).sort(LifecycleRepository.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Component } from './component'\nimport { LicenseRepository } from './license'\nimport { LifecycleRepository } from './lifecycle'\nimport { OrganizationalContactRepository } from './organizationalContact'\nimport type { OrganizationalEntity } from './organizationalEntity'\nimport { PropertyRepository } from './property'\nimport { Tools } from './tool'\n\nexport interface OptionalMetadataProperties {\n timestamp?: Metadata['timestamp']\n lifecycles?: Metadata['lifecycles']\n tools?: Metadata['tools']\n authors?: Metadata['authors']\n component?: Metadata['component']\n manufacture?: Metadata['manufacture']\n supplier?: Metadata['supplier']\n licenses?: Metadata['licenses']\n properties?: Metadata['properties']\n}\n\nexport class Metadata {\n timestamp?: Date\n lifecycles: LifecycleRepository\n tools: Tools\n authors: OrganizationalContactRepository\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses: LicenseRepository\n properties: PropertyRepository\n\n constructor (op: OptionalMetadataProperties = {}) {\n this.timestamp = op.timestamp\n this.lifecycles = op.lifecycles ?? new LifecycleRepository()\n this.tools = op.tools ?? new Tools()\n this.authors = op.authors ?? new OrganizationalContactRepository()\n this.component = op.component\n this.manufacture = op.manufacture\n this.supplier = op.supplier\n this.licenses = op.licenses ?? new LicenseRepository()\n this.properties = op.properties ?? new PropertyRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\n\nexport interface OptionalOrganizationalContactProperties {\n name?: OrganizationalContact['name']\n email?: OrganizationalContact['email']\n phone?: OrganizationalContact['phone']\n}\n\nexport class OrganizationalContact implements Comparable<OrganizationalContact> {\n name?: string\n email?: string\n phone?: string\n\n constructor (op: OptionalOrganizationalContactProperties = {}) {\n this.name = op.name\n this.email = op.email\n this.phone = op.phone\n }\n\n compare (other: OrganizationalContact): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.name ?? '').localeCompare(other.name ?? '') ||\n (this.email ?? '').localeCompare(other.email ?? '') ||\n (this.phone ?? '').localeCompare(other.phone ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class OrganizationalContactRepository extends SortableComparables<OrganizationalContact> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables, SortableStringables } from '../_helpers/sortable'\nimport { OrganizationalContactRepository } from './organizationalContact'\n\nexport interface OptionalOrganizationalEntityProperties {\n name?: OrganizationalEntity['name']\n url?: OrganizationalEntity['url']\n contact?: OrganizationalEntity['contact']\n}\n\nexport class OrganizationalEntity implements Comparable<OrganizationalEntity> {\n name?: string\n url: Set<URL | string>\n contact: OrganizationalContactRepository\n\n constructor (op: OptionalOrganizationalEntityProperties = {}) {\n this.name = op.name\n this.url = op.url ?? new Set()\n this.contact = op.contact ?? new OrganizationalContactRepository()\n }\n\n compare (other: OrganizationalEntity): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.name ?? '').localeCompare(other.name ?? '') ||\n this.contact.compare(other.contact) ||\n (new SortableStringables(this.url)).compare(new SortableStringables(other.url))\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class OrganizationalEntityRepository extends SortableComparables<OrganizationalEntity> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\n\n/**\n * @see [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy)\n */\nexport class Property implements Comparable<Property> {\n name: string\n value: string\n\n constructor (name: Property['name'], value: Property['value']) {\n this.name = name\n this.value = value\n }\n\n compare (other: Property): number {\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.name.localeCompare(other.name) ||\n this.value.localeCompare(other.value)\n }\n}\n\nexport class PropertyRepository extends SortableComparables<Property> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from \"../_helpers/sortable\";\nimport { SortableComparables } from \"../_helpers/sortable\";\nimport { treeIteratorSymbol } from \"../_helpers/tree\";\nimport { BomRef, BomRefRepository } from \"./bomRef\";\nimport { ExternalReferenceRepository } from \"./externalReference\";\nimport { LicenseRepository } from \"./license\";\nimport type {OrganizationalEntity } from \"./organizationalEntity\";\nimport { PropertyRepository } from \"./property\";\n\nexport interface OptionalServiceProperties {\n bomRef?: BomRef['value']\n provider?: Service['provider']\n group?: Service['group']\n version?: Service['version']\n description?: Service['description']\n licenses?: Service['licenses']\n externalReferences?: Service['externalReferences']\n services?: Service['services']\n properties?: Service['properties']\n\n dependencies?: Service['dependencies']\n}\n\nexport class Service implements Comparable<Service> {\n provider?: OrganizationalEntity\n group?: string\n name: string\n version?: string\n description?: string\n licenses: LicenseRepository\n externalReferences: ExternalReferenceRepository\n services: ServiceRepository\n properties: PropertyRepository\n\n /** @see {@link bomRef} */\n readonly #bomRef: BomRef\n\n dependencies: BomRefRepository\n\n constructor(name: Service['name'], op: OptionalServiceProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.provider = op.provider\n this.group = op.group\n this.name = name\n this.version = op.version\n this.description = op.description\n this.licenses = op.licenses ?? new LicenseRepository()\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n this.services = op.services ?? new ServiceRepository()\n this.properties = op.properties ?? new PropertyRepository()\n\n this.dependencies = op.dependencies ?? new BomRefRepository()\n }\n\n get bomRef(): BomRef {\n return this.#bomRef\n }\n\n compare(other: Service): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.group ?? '').localeCompare(other.group ?? '') ||\n this.name.localeCompare(other.name) ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n}\n\nexport class ServiceRepository extends SortableComparables<Service> {\n * [treeIteratorSymbol] (): Generator<Service> {\n for (const service of this) {\n yield service\n yield * service.services[treeIteratorSymbol]()\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { NonNegativeInteger } from '../types/integer'\nimport { isNonNegativeInteger } from '../types/integer'\nimport type { Attachment } from './attachment'\n\nexport interface OptionalSWIDProperties {\n version?: SWID['version']\n patch?: SWID['patch']\n text?: SWID['text']\n url?: SWID['url']\n tagVersion?: SWID['tagVersion']\n}\n\n/**\n * @see {@link https://csrc.nist.gov/projects/Software-Identification-SWID | SWID spec}\n */\nexport class SWID {\n tagId: string\n name: string\n version?: string\n patch?: boolean\n text?: Attachment\n url?: URL | string\n\n /** @see {@link tagVersion} */\n #tagVersion?: NonNegativeInteger\n\n /**\n * @throws {@link TypeError} if `op.tagVersion` is neither {@link NonNegativeInteger} nor `undefined`\n */\n constructor (tagId: SWID['tagId'], name: SWID['name'], op: OptionalSWIDProperties = {}) {\n this.tagId = tagId\n this.name = name\n this.version = op.version\n this.patch = op.patch\n this.text = op.text\n this.url = op.url\n this.tagVersion = op.tagVersion\n }\n\n get tagVersion (): NonNegativeInteger | undefined {\n return this.#tagVersion\n }\n\n /**\n * @throws {@link TypeError} if value is neither {@link NonNegativeInteger} nor `undefined`\n */\n set tagVersion (value: NonNegativeInteger | undefined) {\n if (value !== undefined && !isNonNegativeInteger(value)) {\n throw new TypeError('Not NonNegativeInteger nor undefined')\n }\n this.#tagVersion = value\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport type { Component } from \"./component\";\nimport { ComponentRepository} from \"./component\";\nimport { ExternalReferenceRepository } from './externalReference'\nimport { HashDictionary } from './hash'\nimport type { Service } from \"./service\";\nimport { ServiceRepository } from \"./service\";\n\nexport interface OptionalToolProperties {\n vendor?: Tool['vendor']\n name?: Tool['name']\n version?: Tool['version']\n hashes?: Tool['hashes']\n externalReferences?: Tool['externalReferences']\n}\n\nexport class Tool implements Comparable<Tool> {\n vendor?: string\n name?: string\n version?: string\n hashes: HashDictionary\n externalReferences: ExternalReferenceRepository\n\n constructor (op: OptionalToolProperties = {}) {\n this.vendor = op.vendor\n this.name = op.name\n this.version = op.version\n this.hashes = op.hashes ?? new HashDictionary()\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n }\n\n compare (other: Tool): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.vendor ?? '').localeCompare(other.vendor ?? '') ||\n (this.name ?? '').localeCompare(other.name ?? '') ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n static fromComponent(component: Component): Tool {\n return new Tool({\n vendor: component.group,\n name: component.name,\n version: component.version,\n hashes: component.hashes,\n externalReferences: component.externalReferences\n })\n }\n\n static fromService(service: Service): Tool {\n return new Tool({\n vendor: service.group,\n name: service.name,\n version: service.version,\n externalReferences: service.externalReferences\n })\n }\n}\n\nexport class ToolRepository extends SortableComparables<Tool> {\n}\n\n\nexport interface OptionalToolsProperties {\n components?: Tools['components']\n services?: Tools['services']\n tools?: Tools['tools']\n}\n\nexport class Tools {\n components: ComponentRepository\n services: ServiceRepository\n tools: ToolRepository\n\n constructor(op: OptionalToolsProperties = {}) {\n this.components = op.components ?? new ComponentRepository()\n this.services = op.services ?? new ServiceRepository()\n this.tools = op.tools ?? new ToolRepository()\n }\n\n get size(): number {\n return this.components.size\n + this.services.size\n + this.tools.size\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\n\nexport interface OptionalAdvisoryProperties {\n title?: Advisory['title']\n}\n\nexport class Advisory implements Comparable<Advisory> {\n title?: string\n url: string | URL\n\n constructor (url: string | URL, op: OptionalAdvisoryProperties = {}) {\n this.url = url\n this.title = op.title\n }\n\n compare (other: Advisory): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.url.toString().localeCompare(other.url.toString()) ||\n (this.title ?? '').localeCompare(other.title ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AdvisoryRepository extends SortableComparables<Advisory> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { AffectStatus } from '../../enums/vulnerability'\nimport type { BomLinkElement } from '../bomLink'\nimport type { BomRef } from '../bomRef'\n\nexport interface OptionalAffectProperties {\n versions?: Affect['versions']\n}\n\nexport class Affect implements Comparable<Affect> {\n ref: BomRef | BomLinkElement\n versions: AffectedVersionRepository\n\n constructor (ref: Affect['ref'], op: OptionalAffectProperties = {}) {\n this.ref = ref\n this.versions = op.versions ?? new AffectedVersionRepository()\n }\n\n compare (other: Affect): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.ref.compare(other.ref) ||\n this.versions.compare(other.versions)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AffectRepository extends SortableComparables<Affect> {\n}\n\nexport interface OptionalAffectedVersionProperties {\n status?: AffectedVersion['status']\n}\n\nexport class AffectedSingleVersion implements Comparable<AffectedSingleVersion> {\n version: string\n status?: AffectStatus\n\n constructor (version: string, op: OptionalAffectedVersionProperties = {}) {\n this.version = version\n this.status = op.status\n }\n\n compare (other: AffectedSingleVersion): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.version).localeCompare(other.version) ||\n (this.status ?? '').localeCompare(other.status ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AffectedVersionRange implements Comparable<AffectedVersionRange> {\n range: string\n status?: AffectStatus\n\n constructor (range: string, op: OptionalAffectedVersionProperties = {}) {\n this.range = range\n this.status = op.status\n }\n\n compare (other: AffectedVersionRange): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.range).localeCompare(other.range) ||\n (this.status ?? '').localeCompare(other.status ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport type AffectedVersion = AffectedSingleVersion | AffectedVersionRange\n\nexport class AffectedVersionRepository extends SortableComparables<AffectedVersion> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { AnalysisJustification, AnalysisState } from '../../enums/vulnerability'\nimport { AnalysisResponseRepository } from '../../enums/vulnerability/analysisResponse'\n\nexport interface OptionalAnalysisProperties {\n state?: Analysis['state']\n justification?: Analysis['justification']\n response?: Analysis['response']\n detail?: Analysis['detail']\n}\n\nexport class Analysis {\n state?: AnalysisState\n justification?: AnalysisJustification\n response: AnalysisResponseRepository\n detail?: string\n\n constructor (op: OptionalAnalysisProperties = {}) {\n this.state = op.state\n this.justification = op.justification\n this.response = op.response ?? new AnalysisResponseRepository()\n this.detail = op.detail\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OrganizationalContactRepository } from '../organizationalContact'\nimport { OrganizationalEntityRepository } from '../organizationalEntity'\n\nexport interface OptionalCreditsProperties {\n organizations?: Credits['organizations']\n individuals?: Credits['individuals']\n}\n\nexport class Credits {\n organizations: OrganizationalEntityRepository\n individuals: OrganizationalContactRepository\n\n constructor (op: OptionalCreditsProperties = {}) {\n this.organizations = op.organizations ?? new OrganizationalEntityRepository()\n this.individuals = op.individuals ?? new OrganizationalContactRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './advisory'\nexport * from './affect'\nexport * from './analysis'\nexport * from './credits'\nexport * from './rating'\nexport * from './reference'\nexport * from './source'\nexport * from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { RatingMethod, Severity } from '../../enums/vulnerability'\nimport type { Source } from './source'\n\nexport interface OptionalRatingProperties {\n source?: Rating['source']\n score?: Rating['score']\n severity?: Rating['severity']\n method?: Rating['method']\n vector?: Rating['vector']\n justification?: Rating['justification']\n}\n\nexport class Rating implements Comparable<Rating> {\n source?: Source\n score?: number\n severity?: Severity\n method?: RatingMethod\n vector?: string\n justification?: string\n\n constructor (op: OptionalRatingProperties = {}) {\n this.source = op.source\n this.score = op.score\n this.severity = op.severity\n this.method = op.method\n this.vector = op.vector\n this.justification = op.justification\n }\n\n /* eslint complexity: [\"error\", 50] -- acknowledged */\n compare (other: Rating): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return ((this.score ?? 0) - (other.score ?? 0)) ||\n (this.vector ?? '').localeCompare(other.vector ?? '') ||\n (this.justification ?? '').localeCompare(other.justification ?? '') ||\n (this.severity ?? '').localeCompare(other.severity ?? '') ||\n (this.method ?? '').localeCompare(other.method ?? '') ||\n (this.source && other.source ? this.source.compare(other.source) : 0)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class RatingRepository extends SortableComparables<Rating> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { Source } from './source'\n\n/**\n * @privateRemarks\n * The model is built based on the JSON spec, which has all properties mandatory.\n * In contrast to the XML spec, which has them optional.\n * see https://github.com/CycloneDX/specification/issues/154\n */\nexport class Reference implements Comparable<Reference> {\n /**\n * @example values\n * - `CVE-2021-39182`\n * - `GHSA-35m5-8cvj-8783`\n * - `SNYK-PYTHON-ENROCRYPT-1912876`\n */\n id: string\n source: Source\n\n constructor (id: string, source: Source) {\n this.id = id\n this.source = source\n }\n\n compare (other: Reference): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.id.localeCompare(other.id) ||\n this.source.compare(other.source)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class ReferenceRepository extends SortableComparables<Reference> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\n\nexport interface OptionalSourceProperties {\n name?: Source['name']\n url?: Source['url']\n}\n\nexport class Source implements Comparable<Source> {\n name?: string\n url?: URL | string\n\n constructor (op: OptionalSourceProperties = {}) {\n this.name = op.name\n this.url = op.url\n }\n\n compare (other: Source): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.url?.toString() ?? '').localeCompare(other.url?.toString() ?? '') ||\n (this.name ?? '').localeCompare(other.name ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport { CweRepository } from '../../types/cwe'\nimport { BomRef } from '../bomRef'\nimport { PropertyRepository } from '../property'\nimport { Tools } from '../tool'\nimport { AdvisoryRepository } from './advisory'\nimport { AffectRepository } from './affect'\nimport type { Analysis } from './analysis'\nimport type { Credits } from './credits'\nimport { RatingRepository } from './rating'\nimport { ReferenceRepository } from './reference'\nimport type { Source } from './source'\n\nexport interface OptionalVulnerabilityProperties {\n bomRef?: BomRef['value']\n id?: Vulnerability['id']\n source?: Vulnerability['source']\n references?: Vulnerability['references']\n ratings?: Vulnerability['ratings']\n cwes?: Vulnerability['cwes']\n description?: Vulnerability['description']\n detail?: Vulnerability['detail']\n recommendation?: Vulnerability['recommendation']\n advisories?: Vulnerability['advisories']\n created?: Vulnerability['created']\n published?: Vulnerability['published']\n updated?: Vulnerability['updated']\n credits?: Vulnerability['credits']\n tools?: Vulnerability['tools']\n analysis?: Vulnerability['analysis']\n affects?: Vulnerability['affects']\n properties?: Vulnerability['properties']\n}\n\nexport class Vulnerability implements Comparable<Vulnerability> {\n /** @see bomRef */\n readonly #bomRef: BomRef\n id?: string\n source?: Source\n references: ReferenceRepository\n ratings: RatingRepository\n cwes: CweRepository\n description?: string\n detail?: string\n recommendation?: string\n advisories: AdvisoryRepository\n created?: Date\n published?: Date\n updated?: Date\n credits?: Credits\n tools: Tools\n analysis?: Analysis\n affects: AffectRepository\n properties: PropertyRepository\n\n constructor (op: OptionalVulnerabilityProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.id = op.id\n this.source = op.source\n this.references = op.references ?? new ReferenceRepository()\n this.ratings = op.ratings ?? new RatingRepository()\n this.cwes = op.cwes ?? new CweRepository()\n this.description = op.description\n this.detail = op.detail\n this.recommendation = op.recommendation\n this.advisories = op.advisories ?? new AdvisoryRepository()\n this.created = op.created\n this.published = op.published\n this.updated = op.updated\n this.credits = op.credits\n this.tools = op.tools ?? new Tools()\n this.analysis = op.analysis\n this.affects = op.affects ?? new AffectRepository()\n this.properties = op.properties ?? new PropertyRepository()\n }\n\n get bomRef (): BomRef {\n return this.#bomRef\n }\n\n /* eslint complexity: [\"error\", 50] -- acknowledged */\n compare (other: Vulnerability): number {\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.id ?? '').localeCompare(other.id ?? '') ||\n (this.created?.getTime() ?? 0) - (other.created?.getTime() ?? 0) ||\n (this.published?.getTime() ?? 0) - (other.published?.getTime() ?? 0) ||\n (this.updated?.getTime() ?? 0) - (other.updated?.getTime() ?? 0) ||\n this.ratings.compare(other.ratings) ||\n this.cwes.compare(other.cwes) ||\n (this.description ?? '').localeCompare(other.description ?? '') ||\n (this.detail ?? '').localeCompare(other.detail ?? '') ||\n (this.recommendation ?? '').localeCompare(other.recommendation ?? '') ||\n (this.source && other.source ? this.source.compare(other.source) : 0) ||\n this.properties.compare(other.properties)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class VulnerabilityRepository extends SortableComparables<Vulnerability> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { treeIteratorSymbol } from '../_helpers/tree'\nimport type { Bom, BomRef } from '../models'\nimport { BomRefDiscriminator } from './bomRefDiscriminator'\nimport type { NormalizerOptions, Serializer, SerializerOptions } from './types'\n\nexport abstract class BaseSerializer<NormalizedBom> implements Serializer {\n * #getAllBomRefs (bom: Bom): Generator<BomRef> {\n // region from components\n if (bom.metadata.component !== undefined) {\n yield bom.metadata.component.bomRef\n for (const { bomRef } of bom.metadata.component.components[treeIteratorSymbol]()) {\n yield bomRef\n }\n }\n for (const { bomRef } of bom.components[treeIteratorSymbol]()) {\n yield bomRef\n }\n // endregion from components\n\n // region from services\n for (const { bomRef } of bom.services[treeIteratorSymbol]()) {\n yield bomRef\n }\n // endregion from services\n\n // region from vulnerabilities\n for (const { bomRef } of bom.vulnerabilities) {\n yield bomRef\n }\n // endregion from vulnerabilities\n }\n\n /**\n * @throws {@link Error}\n */\n #normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom {\n const bomRefDiscriminator = new BomRefDiscriminator(this.#getAllBomRefs(bom))\n bomRefDiscriminator.discriminate()\n // This IS NOT the place to put meaning to the BomRef values. This would be out of scope.\n // This IS the place to make BomRef values (temporary) unique in their own document scope.\n try {\n return this._normalize(bom, options)\n } finally {\n bomRefDiscriminator.reset()\n }\n }\n\n public serialize (bom: Bom, options?: SerializerOptions & NormalizerOptions): string {\n return this._serialize(\n this.#normalize(bom, options),\n options\n )\n }\n\n /**\n * @throws {@link Error}\n */\n protected abstract _normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom\n\n /**\n * @throws {@link Error}\n */\n protected abstract _serialize (normalizedBom: NormalizedBom, options?: SerializerOptions): string\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { BomRef } from '../models'\n\nexport class BomRefDiscriminator {\n readonly #originalValues: ReadonlyArray<readonly [BomRef, string | undefined]>\n\n readonly #prefix: string\n\n /* eslint-disable-next-line @typescript-eslint/no-inferrable-types -- docs */\n constructor (bomRefs: Iterable<BomRef>, prefix: string = 'BomRef') {\n this.#originalValues = Array.from(bomRefs, r => [r, r.value])\n this.#prefix = prefix\n }\n\n get prefix (): string {\n return this.#prefix\n }\n\n /** Iterate over the {@link BomRef}s. */\n * [Symbol.iterator] (): IterableIterator<BomRef> {\n for (const [bomRef] of this.#originalValues) {\n yield bomRef\n }\n }\n\n discriminate (): void {\n const knownRefValues = new Set<string>([''])\n for (const [bomRef] of this.#originalValues) {\n let value = bomRef.value\n if (value === undefined || knownRefValues.has(value)) {\n value = this.#makeUniqueId()\n bomRef.value = value\n }\n knownRefValues.add(value)\n }\n }\n\n reset (): void {\n for (const [bomRef, originalValue] of this.#originalValues) {\n bomRef.value = originalValue\n }\n }\n\n /**\n * generate a string in the format:\n * `${this.prefix}.<random-characters>.<random-characters>`\n */\n #makeUniqueId (): string {\n return `${\n this.#prefix\n }${\n Math.random().toString(32).substring(1)\n }${\n Math.random().toString(32).substring(1)\n }`\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OptPlugError } from '../_optPlug.node/errors'\n\nexport class MissingOptionalDependencyError extends OptPlugError {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// !!! not everything is public, yet\n\nexport * from './bomRefDiscriminator'\nexport * from './errors'\n/* eslint-disable-next-line @typescript-eslint/consistent-type-exports -- backwards-compat TS4 */\nexport * as Types from './types'\n\n// region base\n\nexport * from './baseSerializer'\n// export * from './baseDeserializer' // @TODO\n\n// endregion base\n\n// region JSON\n\nexport * as JSON from './json'\nexport * from './jsonSerializer'\n// export * from './jsonDeserializer' // @TODO\n\n// endregion JSON\n\n// region XML\n\nexport * as XML from './xml'\nexport * from './xmlBaseSerializer'\n// export * from './xmlBaseDeserializer' // @TODO\n\n// endregion XML\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\nexport * from './xmlSerializer.web'\n// export * from './xmlDeserializer.web' // @TODO\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Normalize from './normalize'\nexport * as Types from './types'\n// export * as Denormalize from './denormalize' // @TODO\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint complexity: [\"error\", 50 ] -- acknowledged */\n/* eslint max-lines: 'off' -- intended */\n\nimport { chainI } from \"../../_helpers/iterable\";\nimport { isNotUndefined } from '../../_helpers/notUndefined'\nimport type { SortableIterable } from '../../_helpers/sortable'\nimport type { Stringable } from '../../_helpers/stringable'\nimport { treeIteratorSymbol } from '../../_helpers/tree'\nimport { escapeUri } from '../../_helpers/uri'\nimport type * as Models from '../../models'\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../../models/license'\nimport { NamedLifecycle } from '../../models/lifecycle'\nimport { Tool, ToolRepository } from '../../models/tool'\nimport { AffectedSingleVersion, AffectedVersionRange } from '../../models/vulnerability/affect'\nimport { isSupportedSpdxId } from '../../spdx'\nimport type { _SpecProtocol as Spec } from '../../spec/_protocol'\nimport { Version as SpecVersion } from '../../spec/enums'\nimport type { NormalizerOptions } from '../types'\nimport type { Normalized } from './types'\nimport { JsonSchema } from './types'\n\n\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: Factory['spec']) {\n this.#spec = spec\n }\n\n get spec (): Spec {\n return this.#spec\n }\n\n makeForBom (): BomNormalizer {\n return new BomNormalizer(this)\n }\n\n makeForMetadata (): MetadataNormalizer {\n return new MetadataNormalizer(this)\n }\n\n makeForComponent (): ComponentNormalizer {\n return new ComponentNormalizer(this)\n }\n\n makeForService (): ServiceNormalizer {\n return new ServiceNormalizer(this)\n }\n\n makeForComponentEvidence (): ComponentEvidenceNormalizer {\n return new ComponentEvidenceNormalizer(this)\n }\n\n makeForLifecycle (): LifecycleNormalizer {\n return new LifecycleNormalizer(this)\n }\n\n makeForTool (): ToolNormalizer {\n return new ToolNormalizer(this)\n }\n\n makeForTools (): ToolsNormalizer {\n return new ToolsNormalizer(this)\n }\n\n makeForOrganizationalContact (): OrganizationalContactNormalizer {\n return new OrganizationalContactNormalizer(this)\n }\n\n makeForOrganizationalEntity (): OrganizationalEntityNormalizer {\n return new OrganizationalEntityNormalizer(this)\n }\n\n makeForHash (): HashNormalizer {\n return new HashNormalizer(this)\n }\n\n makeForLicense (): LicenseNormalizer {\n return new LicenseNormalizer(this)\n }\n\n makeForSWID (): SWIDNormalizer {\n return new SWIDNormalizer(this)\n }\n\n makeForExternalReference (): ExternalReferenceNormalizer {\n return new ExternalReferenceNormalizer(this)\n }\n\n makeForAttachment (): AttachmentNormalizer {\n return new AttachmentNormalizer(this)\n }\n\n makeForProperty (): PropertyNormalizer {\n return new PropertyNormalizer(this)\n }\n\n makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n\n makeForVulnerability (): VulnerabilityNormalizer {\n return new VulnerabilityNormalizer(this)\n }\n\n makeForVulnerabilitySource (): VulnerabilitySourceNormalizer {\n return new VulnerabilitySourceNormalizer(this)\n }\n\n makeForVulnerabilityReference (): VulnerabilityReferenceNormalizer {\n return new VulnerabilityReferenceNormalizer(this)\n }\n\n makeForVulnerabilityRating (): VulnerabilityRatingNormalizer {\n return new VulnerabilityRatingNormalizer(this)\n }\n\n makeForVulnerabilityAdvisory (): VulnerabilityAdvisoryNormalizer {\n return new VulnerabilityAdvisoryNormalizer(this)\n }\n\n makeForVulnerabilityCredits (): VulnerabilityCreditsNormalizer {\n return new VulnerabilityCreditsNormalizer(this)\n }\n\n makeForVulnerabilityAffect (): VulnerabilityAffectNormalizer {\n return new VulnerabilityAffectNormalizer(this)\n }\n\n makeForVulnerabilityAffectedVersion (): VulnerabilityAffectedVersionNormalizer {\n return new VulnerabilityAffectedVersionNormalizer(this)\n }\n\n makeForVulnerabilityAnalysis (): VulnerabilityAnalysisNormalizer {\n return new VulnerabilityAnalysisNormalizer(this)\n }\n}\n\nconst schemaUrl: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom-1.6.schema.json'],\n [SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom-1.5.schema.json'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom-1.4.schema.json'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom-1.3a.schema.json'],\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom-1.2b.schema.json']\n])\n\ninterface JsonNormalizer<TModel, TNormalized> {\n normalize: (data: TModel, options: NormalizerOptions) => TNormalized | undefined\n\n normalizeIterable?: (data: SortableIterable<TModel>, options: NormalizerOptions) => TNormalized[]\n\n}\n\nabstract class BaseJsonNormalizer<TModel, TNormalized = object> implements JsonNormalizer<TModel, TNormalized> {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n get factory (): Factory {\n return this._factory\n }\n\n abstract normalize (data: TModel, options: NormalizerOptions): TNormalized | undefined\n}\n\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions --\n * since empty strings need to be treated as undefined/null\n */\n\nexport class BomNormalizer extends BaseJsonNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): Normalized.Bom {\n return {\n $schema: schemaUrl.get(this._factory.spec.version),\n bomFormat: 'CycloneDX',\n specVersion: this._factory.spec.version,\n version: data.version,\n serialNumber: this.#isEligibleSerialNumber(data.serialNumber)\n ? data.serialNumber\n : undefined,\n metadata: this._factory.makeForMetadata().normalize(data.metadata, options),\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options)\n // spec < 1.4 requires `component` to be array\n : [],\n services: this._factory.spec.supportsServices && data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined,\n dependencies: this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options)\n : undefined,\n vulnerabilities: this._factory.spec.supportsVulnerabilities && data.vulnerabilities.size > 0\n ? this._factory.makeForVulnerability().normalizeIterable(data.vulnerabilities, options)\n : undefined\n }\n }\n\n #isEligibleSerialNumber (v: string | undefined): boolean {\n return v !== undefined &&\n // see https://github.com/CycloneDX/specification/blob/ef71717ae0ecb564c0b4c9536d6e9e57e35f2e69/schema/bom-1.4.schema.json#L39\n /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(v)\n }\n}\n\nexport class MetadataNormalizer extends BaseJsonNormalizer<Models.Metadata> {\n normalize (data: Models.Metadata, options: NormalizerOptions): Normalized.Metadata {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n return {\n timestamp: data.timestamp?.toISOString(),\n lifecycles: this._factory.spec.supportsMetadataLifecycles && data.lifecycles.size > 0\n ? this._factory.makeForLifecycle().normalizeIterable(data.lifecycles, options)\n : undefined,\n tools: data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options)\n : undefined,\n authors: data.authors.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.authors, options)\n : undefined,\n component: data.component === undefined\n ? undefined\n : this._factory.makeForComponent().normalize(data.component, options),\n manufacture: data.manufacture === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.manufacture, options),\n supplier: data.supplier === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.supplier, options),\n licenses: this._factory.spec.supportsMetadataLicenses && data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n properties: this._factory.spec.supportsMetadataProperties && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined\n }\n }\n}\n\nexport class LifecycleNormalizer extends BaseJsonNormalizer<Models.Lifecycle> {\n normalize (data: Models.Lifecycle, options: NormalizerOptions): Normalized.Lifecycle {\n return data instanceof NamedLifecycle\n ? { name: data.name, description: data.description }\n : { phase: data }\n }\n\n normalizeIterable (data: SortableIterable<Models.Lifecycle>, options: NormalizerOptions): Normalized.Lifecycle[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(lc => this.normalize(lc, options))\n }\n}\n\nexport class ToolNormalizer extends BaseJsonNormalizer<Models.Tool> {\n normalize (data: Models.Tool, options: NormalizerOptions): Normalized.Tool {\n return {\n vendor: data.vendor || undefined,\n name: data.name || undefined,\n version: data.version || undefined,\n hashes: data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n externalReferences: this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Tool>, options: NormalizerOptions): Normalized.Tool[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options))\n }\n}\n\nexport class ToolsNormalizer extends BaseJsonNormalizer<Models.Tools> {\n normalize(data: Models.Tools, options: NormalizerOptions): Normalized.ToolsType {\n if (data.tools.size > 0 || !this._factory.spec.supportsToolsComponentsServices) {\n return this._factory.makeForTool().normalizeIterable(\n new ToolRepository(chainI<Models.Tool>(\n Array.from(data.components, Tool.fromComponent),\n Array.from(data.services, Tool.fromService),\n data.tools,\n )), options)\n }\n return {\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options)\n : undefined,\n services: data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined\n }\n }\n}\n\nexport class HashNormalizer extends BaseJsonNormalizer<Models.Hash> {\n normalize ([algorithm, content]: Models.Hash, options: NormalizerOptions): Normalized.Hash | undefined {\n const spec = this._factory.spec\n return spec.supportsHashAlgorithm(algorithm) && spec.supportsHashValue(content)\n ? {\n alg: algorithm,\n content\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.Hash>, options: NormalizerOptions): Normalized.Hash[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n h => this.normalize(h, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends BaseJsonNormalizer<Models.OrganizationalContact> {\n normalize (data: Models.OrganizationalContact, options: NormalizerOptions): Normalized.OrganizationalContact {\n return {\n name: data.name || undefined,\n email: JsonSchema.isIdnEmail(data.email)\n ? data.email\n : undefined,\n phone: data.phone || undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalContact>, options: NormalizerOptions): Normalized.OrganizationalContact[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oc => this.normalize(oc, options))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends BaseJsonNormalizer<Models.OrganizationalEntity> {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions): Normalized.OrganizationalEntity {\n const urls = normalizeStringableIter(\n Array.from(data.url, (s) => escapeUri(s.toString())),\n options\n ).filter(JsonSchema.isIriReference)\n return {\n name: data.name || undefined,\n url: urls.length > 0\n ? urls\n : undefined,\n contact: data.contact.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.contact, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalEntity>, options: NormalizerOptions): Normalized.OrganizationalEntity[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oe => this.normalize(oe, options))\n }\n}\n\nexport class ComponentNormalizer extends BaseJsonNormalizer<Models.Component> {\n normalize (data: Models.Component, options: NormalizerOptions): Normalized.Component | undefined {\n const spec = this._factory.spec\n if (!spec.supportsComponentType(data.type)) {\n return undefined\n }\n const version: string = data.version ?? ''\n return {\n type: data.type,\n name: data.name,\n group: data.group || undefined,\n version: version.length > 0 || spec.requiresComponentVersion\n ? version\n : undefined,\n 'bom-ref': data.bomRef.value || undefined,\n supplier: data.supplier === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.supplier, options),\n author: data.author || undefined,\n publisher: data.publisher || undefined,\n description: data.description || undefined,\n scope: data.scope,\n hashes: data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n copyright: data.copyright?.toString() || undefined,\n cpe: data.cpe || undefined,\n purl: data.purl?.toString(),\n swid: data.swid === undefined\n ? undefined\n : this._factory.makeForSWID().normalize(data.swid, options),\n externalReferences: data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined,\n properties: spec.supportsProperties(data) && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined,\n components: data.components.size > 0\n ? this.normalizeIterable(data.components, options)\n : undefined,\n evidence: spec.supportsComponentEvidence && data.evidence !== undefined\n ? this._factory.makeForComponentEvidence().normalize(data.evidence, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Component>, options: NormalizerOptions): Normalized.Component[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n c => this.normalize(c, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class ServiceNormalizer extends BaseJsonNormalizer<Models.Service> {\n normalize (data: Models.Service, options: NormalizerOptions): Normalized.Service {\n const spec = this._factory.spec\n return {\n 'bom-ref': data.bomRef.value || undefined,\n provider: data.provider\n ? this._factory.makeForOrganizationalEntity().normalize(data.provider, options)\n : undefined,\n group: data.group,\n name: data.name,\n version: data.version|| undefined,\n description: data.description || undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n externalReferences: data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined,\n services: data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined,\n properties: spec.supportsProperties(data) && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined,\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Service>, options: NormalizerOptions): Normalized.Service[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n s => this.normalize(s, options)\n )\n }\n}\n\nexport class ComponentEvidenceNormalizer extends BaseJsonNormalizer<Models.ComponentEvidence> {\n normalize (data: Models.ComponentEvidence, options: NormalizerOptions): Normalized.ComponentEvidence {\n return {\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n copyright: data.copyright.size > 0\n ? (\n options.sortLists\n ? data.copyright.sorted().map(ComponentEvidenceNormalizer.#normalizeCopyright)\n : Array.from(data.copyright, ComponentEvidenceNormalizer.#normalizeCopyright)\n )\n : undefined\n }\n }\n\n static #normalizeCopyright (c: Stringable): Normalized.Copyright {\n return { text: c.toString() }\n }\n}\n\nexport class LicenseNormalizer extends BaseJsonNormalizer<Models.License> {\n normalize (data: Models.License, options: NormalizerOptions): Normalized.License {\n switch (true) {\n case data instanceof NamedLicense:\n return this.#normalizeNamedLicense(data, options)\n case data instanceof SpdxLicense:\n return isSupportedSpdxId(data.id)\n ? this.#normalizeSpdxLicense(data, options)\n : this.#normalizeNamedLicense(new NamedLicense(\n // prevent information loss -> convert to broader type\n data.id,\n { url: data.url }\n ), options)\n case data instanceof LicenseExpression:\n return this.#normalizeLicenseExpression(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n /* c8 ignore end */\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): Normalized.NamedLicense {\n const url = escapeUri(data.url?.toString())\n return {\n license: {\n name: data.name,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): Normalized.SpdxLicense {\n const url = escapeUri(data.url?.toString())\n return {\n license: {\n id: data.id,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): Normalized.LicenseExpression {\n return {\n expression: data.expression,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n }\n }\n\n /**\n * If there is any {@link Models.LicenseExpression | LicenseExpression} in the set, then this is the only item that is normalized.\n */\n normalizeIterable (data: SortableIterable<Models.License>, options: NormalizerOptions): Normalized.License[] {\n const licenses = options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n\n if (licenses.length > 1) {\n const expressions = licenses.filter(l => l instanceof LicenseExpression)\n if (expressions.length > 0) {\n // could have thrown {@link RangeError} when there is more than one only {@link Models.LicenseExpression | LicenseExpression}.\n // but let's be graceful and just normalize to the most relevant choice: any expression\n return [this.#normalizeLicenseExpression(expressions[0])]\n }\n }\n\n return licenses.map(l => this.normalize(l, options))\n }\n}\n\nexport class SWIDNormalizer extends BaseJsonNormalizer<Models.SWID> {\n normalize (data: Models.SWID, options: NormalizerOptions): Normalized.SWID {\n const url = escapeUri(data.url?.toString())\n return {\n tagId: data.tagId,\n name: data.name,\n version: data.version || undefined,\n tagVersion: data.tagVersion,\n patch: data.patch,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n}\n\nexport class ExternalReferenceNormalizer extends BaseJsonNormalizer<Models.ExternalReference> {\n normalize (data: Models.ExternalReference, options: NormalizerOptions): Normalized.ExternalReference | undefined {\n return this._factory.spec.supportsExternalReferenceType(data.type)\n ? {\n url: escapeUri(data.url.toString()),\n type: data.type,\n hashes: this._factory.spec.supportsExternalReferenceHashes && data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n comment: data.comment || undefined\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.ExternalReference>, options: NormalizerOptions): Normalized.ExternalReference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n r => this.normalize(r, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends BaseJsonNormalizer<Models.Attachment> {\n normalize (data: Models.Attachment, options: NormalizerOptions): Normalized.Attachment {\n return {\n content: data.content.toString(),\n contentType: data.contentType || undefined,\n encoding: data.encoding\n }\n }\n}\n\nexport class PropertyNormalizer extends BaseJsonNormalizer<Models.Property> {\n normalize (data: Models.Property, options: NormalizerOptions): Normalized.Property {\n return {\n name: data.name,\n value: data.value\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Property>, options: NormalizerOptions): Normalized.Property[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(p => this.normalize(p, options))\n }\n}\n\nexport class DependencyGraphNormalizer extends BaseJsonNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): Normalized.Dependency[] | undefined {\n const allRefs = new Map<Models.BomRef, Models.BomRefRepository>()\n if (data.metadata.component !== undefined) {\n allRefs.set(data.metadata.component.bomRef, data.metadata.component.dependencies)\n for (const component of data.metadata.component.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n for (const service of data.services[treeIteratorSymbol]()) {\n allRefs.set(service.bomRef, service.dependencies)\n }\n\n const normalized: Normalized.Dependency[] = []\n for (const [ref, deps] of allRefs) {\n const dep = this.#normalizeDependency(ref, deps, allRefs, options)\n if (isNotUndefined(dep)) {\n normalized.push(dep)\n }\n }\n\n if (options.sortLists ?? false) {\n normalized.sort(({ ref: a }, { ref: b }) => a.localeCompare(b))\n }\n\n return normalized\n }\n\n #normalizeDependency (\n ref: Models.BomRef,\n deps: Models.BomRefRepository,\n allRefs: Map<Models.BomRef, Models.BomRefRepository>,\n options: NormalizerOptions\n ): Normalized.Dependency | undefined {\n const bomRef = ref.toString()\n if (bomRef.length === 0) {\n // no value -> cannot render\n return undefined\n }\n\n const dependsOn: string[] = normalizeStringableIter(\n Array.from(deps).filter(d => allRefs.has(d) && d !== ref),\n options\n ).filter(d => d.length > 0)\n\n return {\n ref: bomRef,\n dependsOn: dependsOn.length > 0\n ? dependsOn\n : undefined\n }\n }\n}\n\nexport class VulnerabilityNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Vulnerability> {\n normalize (data: Models.Vulnerability.Vulnerability, options: NormalizerOptions): Normalized.Vulnerability {\n return {\n 'bom-ref': data.bomRef.value || undefined,\n id: data.id || undefined,\n source: data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options),\n references: data.references.size > 0\n ? this._factory.makeForVulnerabilityReference().normalizeIterable(data.references, options)\n : undefined,\n ratings: data.ratings.size > 0\n ? this._factory.makeForVulnerabilityRating().normalizeIterable(data.ratings, options)\n : undefined,\n cwes: data.cwes.size > 0\n ? (\n options.sortLists ?? false\n ? data.cwes.sorted()\n : Array.from(data.cwes)\n )\n : undefined,\n description: data.description,\n detail: data.detail,\n recommendation: data.recommendation,\n advisories: data.advisories.size > 0\n ? this._factory.makeForVulnerabilityAdvisory().normalizeIterable(data.advisories, options)\n : undefined,\n created: data.created?.toISOString(),\n published: data.published?.toISOString(),\n updated: data.updated?.toISOString(),\n credits: data.credits === undefined\n ? undefined\n : this._factory.makeForVulnerabilityCredits().normalize(data.credits, options),\n tools: data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options)\n : undefined,\n analysis: data.analysis === undefined\n ? undefined\n : this._factory.makeForVulnerabilityAnalysis().normalize(data.analysis, options),\n affects: data.affects.size > 0\n ? this._factory.makeForVulnerabilityAffect().normalizeIterable(data.affects, options)\n : undefined,\n properties: data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Vulnerability>, options: NormalizerOptions): Normalized.Vulnerability[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(v => this.normalize(v, options))\n }\n}\n\nexport class VulnerabilitySourceNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Source> {\n normalize (data: Models.Vulnerability.Source, options: NormalizerOptions): Normalized.Vulnerability.Source {\n return {\n name: data.name,\n url: data.url?.toString()\n }\n }\n}\n\nexport class VulnerabilityReferenceNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Reference> {\n normalize (data: Models.Vulnerability.Reference, options: NormalizerOptions): Normalized.Vulnerability.Reference {\n return {\n id: data.id,\n source: this._factory.makeForVulnerabilitySource().normalize(data.source, options)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Reference>, options: NormalizerOptions): Normalized.Vulnerability.Reference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options))\n }\n}\n\nexport class VulnerabilityRatingNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Rating> {\n normalize (data: Models.Vulnerability.Rating, options: NormalizerOptions): Normalized.Vulnerability.Rating {\n return {\n source: data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options),\n score: data.score,\n severity: data.severity,\n method: this._factory.spec.supportsVulnerabilityRatingMethod(data.method)\n ? data.method\n : undefined,\n vector: data.vector,\n justification: data.justification\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Rating>, options: NormalizerOptions): Normalized.Vulnerability.Rating[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options))\n }\n}\n\nexport class VulnerabilityAdvisoryNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Advisory> {\n normalize (data: Models.Vulnerability.Advisory, options: NormalizerOptions): Normalized.Vulnerability.Advisory | undefined {\n const url = escapeUri(data.url.toString())\n if (!JsonSchema.isIriReference(url)) {\n // invalid value -> cannot render\n return undefined\n }\n return {\n title: data.title,\n url\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Advisory>, options: NormalizerOptions): Normalized.Vulnerability.Advisory[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n a => this.normalize(a, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityCreditsNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Credits> {\n normalize (data: Models.Vulnerability.Credits, options: NormalizerOptions): Normalized.Vulnerability.Credits {\n return {\n organizations: data.organizations.size > 0\n ? this._factory.makeForOrganizationalEntity().normalizeIterable(data.organizations, options)\n : undefined,\n individuals: data.individuals.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.individuals, options)\n : undefined\n }\n }\n}\n\nexport class VulnerabilityAffectNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Affect> {\n normalize (data: Models.Vulnerability.Affect, options: NormalizerOptions): Normalized.Vulnerability.Affect {\n return {\n ref: data.ref.toString(),\n versions: data.versions.size > 0\n ? this._factory.makeForVulnerabilityAffectedVersion().normalizeIterable(data.versions, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Affect>, options: NormalizerOptions): Normalized.Vulnerability.Affect[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(a => this.normalize(a, options))\n }\n}\n\nexport class VulnerabilityAffectedVersionNormalizer extends BaseJsonNormalizer<Models.Vulnerability.AffectedVersion> {\n normalize (data: Models.Vulnerability.AffectedVersion, options: NormalizerOptions): Normalized.Vulnerability.AffectedVersion | undefined {\n switch (true) {\n case data instanceof AffectedSingleVersion:\n return this.#normalizeAffectedSingleVersion(data)\n case data instanceof AffectedVersionRange:\n return this.#normalizeAffectedVersionRange(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected Vulnerability AffectedVersion')\n /* c8 ignore end */\n }\n }\n\n #normalizeAffectedSingleVersion (data: Models.Vulnerability.AffectedSingleVersion): Normalized.Vulnerability.AffectedSingleVersion | undefined {\n return data.version.length < 1\n // invalid value -> cannot render\n ? undefined\n : {\n version: data.version.substring(0, 1024),\n status: data.status\n }\n }\n\n #normalizeAffectedVersionRange (data: Models.Vulnerability.AffectedVersionRange): Normalized.Vulnerability.AffectedVersionRange | undefined {\n return data.range.length < 1\n // invalid value -> cannot render\n ? undefined\n : {\n range: data.range.substring(0, 1024),\n status: data.status\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.AffectedVersion>, options: NormalizerOptions): Normalized.Vulnerability.AffectedVersion[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n av => this.normalize(av, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityAnalysisNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Analysis> {\n normalize (data: Models.Vulnerability.Analysis, options: NormalizerOptions): Normalized.Vulnerability.Analysis {\n return {\n state: data.state,\n justification: data.justification,\n response: data.response.size > 0\n ? (\n options.sortLists ?? false\n ? data.response.sorted()\n : Array.from(data.response)\n )\n : undefined,\n detail: data.detail\n }\n }\n}\n\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\nfunction normalizeStringableIter (data: Iterable<Stringable>, options: NormalizerOptions): string[] {\n const r = Array.from(data, d => d.toString())\n if (options.sortLists ?? false) {\n r.sort((a, b) => a.localeCompare(b))\n }\n return r\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type * as Enums from '../../enums'\nimport type { HashContent } from '../../models'\nimport type { SpdxId } from '../../spdx'\nimport type { CPE, CWE, Integer } from '../../types'\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace JsonSchema {\n\n /**\n * @see {@link isIriReference}\n */\n export type IriReference = string\n /**\n * Test whether format is JSON::iri-reference - best-effort.\n *\n * @see {@link https://datatracker.ietf.org/doc/html/rfc3987 | RFC 3987}\n *\n * @TODO add more validation according to spec\n */\n export function isIriReference (value: IriReference | any): value is IriReference {\n // There is just no working implementation for format \"iri-reference\": see https://github.com/luzlab/ajv-formats-draft2019/issues/22\n return typeof value === 'string' &&\n value.length > 0\n }\n\n /**\n * @see {@link isIdnEmail}\n */\n export type IdnEmail = string\n /**\n * Test whether format is JSON::idn-email - best-effort.\n *\n * @see {@link https://datatracker.ietf.org/doc/html/rfc6531 | RFC 6531}\n *\n * @TODO add more validation according to spec\n */\n export function isIdnEmail (value: IdnEmail | any): value is IdnEmail {\n return typeof value === 'string' &&\n value.length > 0\n }\n\n export type DateTime = string\n\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace Normalized {\n\n export type RefType = string\n export type RefLinkType = RefType\n\n export type BomLinkDocumentType = string\n export type BomLinkElementType = string\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n export type BomLink = BomLinkDocumentType | BomLinkElementType\n\n export interface Bom {\n $schema?: string\n bomFormat: 'CycloneDX'\n specVersion: string\n version: Integer\n serialNumber?: string\n metadata?: Metadata\n components?: Component[]\n services?: Service[]\n externalReferences?: ExternalReference[]\n dependencies?: Dependency[]\n vulnerabilities?: Vulnerability[]\n }\n\n export interface Metadata {\n timestamp?: JsonSchema.DateTime\n lifecycles?: Lifecycle[]\n tools?: ToolsType\n authors?: OrganizationalContact[]\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses?: License[]\n properties?: Property[]\n }\n\n export interface LifecyclePhase {\n phase: Enums.LifecyclePhase\n }\n\n export interface NamedLifecycle {\n name: string\n description?: string\n }\n\n export type Lifecycle = LifecyclePhase | NamedLifecycle\n\n export interface Tool {\n vendor?: string\n name?: string\n version?: string\n hashes?: Hash[]\n externalReferences?: ExternalReference[]\n }\n\n /** since CDX 1.5 */\n export interface Tools {\n components?: Component[]\n services?: Service[]\n }\n\n export type ToolsType = Tools | Tool[]\n\n export interface OrganizationalContact {\n name?: string\n email?: JsonSchema.IdnEmail\n phone?: string\n }\n\n export interface OrganizationalEntity {\n name?: string\n url?: JsonSchema.IriReference[]\n contact?: OrganizationalContact[]\n }\n\n export interface Hash {\n alg: Enums.HashAlgorithm\n content: HashContent\n }\n\n export interface Component {\n type: Enums.ComponentType\n name: string\n 'mime-type'?: string\n 'bom-ref'?: RefType\n supplier?: OrganizationalEntity\n author?: string\n publisher?: string\n group?: string\n version?: string\n description?: string\n scope?: Enums.ComponentScope\n hashes?: Hash[]\n licenses?: License[]\n copyright?: string\n cpe?: CPE\n purl?: string\n swid?: SWID\n modified?: boolean\n externalReferences?: ExternalReference[]\n components?: Component[]\n evidence?: ComponentEvidence\n properties?: Property[]\n }\n\n export interface Service {\n 'bom-ref'?: RefType\n provider?: OrganizationalEntity\n group?: string\n name: string\n version?: string\n description?: string\n licenses?: License[]\n externalReferences?: ExternalReference[]\n services?: Service[]\n properties?: Property[]\n }\n\n export interface ComponentEvidence {\n licenses?: License[]\n copyright?: Copyright[]\n }\n\n export interface Copyright {\n text: string\n }\n\n export interface NamedLicense {\n license: {\n name: string\n acknowledgement?: Enums.LicenseAcknowledgement\n text?: Attachment\n url?: string\n }\n }\n\n export interface SpdxLicense {\n license: {\n /* see http://cyclonedx.org/schema/spdx */\n id: SpdxId\n acknowledgement?: Enums.LicenseAcknowledgement\n text?: Attachment\n url?: string\n }\n }\n\n export interface LicenseExpression {\n expression: string\n acknowledgement?: Enums.LicenseAcknowledgement\n }\n\n export type License = NamedLicense | SpdxLicense | LicenseExpression\n\n export interface SWID {\n tagId: string\n name: string\n version?: string\n tagVersion?: Integer\n patch?: boolean\n text?: Attachment\n url?: JsonSchema.IriReference\n }\n\n export interface ExternalReference {\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n url: JsonSchema.IriReference | BomLink\n type: Enums.ExternalReferenceType\n hashes?: Hash[]\n comment?: string\n }\n\n export interface Attachment {\n content?: string\n contentType?: string\n encoding?: Enums.AttachmentEncoding\n }\n\n export interface Property {\n name?: string\n value?: string\n }\n\n export interface Dependency {\n ref: RefLinkType\n dependsOn?: RefLinkType[]\n }\n\n export interface Vulnerability {\n 'bom-ref'?: RefType\n id?: string\n source?: Vulnerability.Source\n references?: Vulnerability.Reference[]\n ratings?: Vulnerability.Rating[]\n cwes?: CWE[]\n description?: string\n detail?: string\n recommendation?: string\n advisories?: Vulnerability.Advisory[]\n created?: JsonSchema.DateTime\n published?: JsonSchema.DateTime\n updated?: JsonSchema.DateTime\n credits?: Vulnerability.Credits\n tools?: ToolsType\n analysis?: Vulnerability.Analysis\n affects?: Vulnerability.Affect[]\n properties?: Property[]\n }\n\n /* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\n export namespace Vulnerability {\n export interface Source {\n name?: string\n url?: string\n }\n\n export interface Reference {\n id: string\n source: Source\n }\n\n export interface Rating {\n source?: Source\n score?: number\n severity?: Enums.Vulnerability.Severity\n method?: Enums.Vulnerability.RatingMethod\n vector?: string\n justification?: string\n }\n\n export interface Advisory {\n title?: string\n url: JsonSchema.IriReference\n }\n\n export interface Credits {\n organizations?: OrganizationalEntity[]\n individuals?: OrganizationalContact[]\n }\n\n export interface Analysis {\n state?: Enums.Vulnerability.AnalysisState\n justification?: Enums.Vulnerability.AnalysisJustification\n response?: Enums.Vulnerability.AnalysisResponse[]\n detail?: string\n }\n\n export interface Affect {\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n ref: RefLinkType | BomLinkElementType\n versions?: AffectedVersion[]\n }\n\n export interface AffectedSingleVersion {\n version: string\n status?: Enums.Vulnerability.AffectStatus\n }\n\n export interface AffectedVersionRange {\n range: string\n status?: Enums.Vulnerability.AffectStatus\n }\n\n export type AffectedVersion = AffectedSingleVersion | AffectedVersionRange\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models/bom'\nimport { Format } from '../spec/enums'\nimport { UnsupportedFormatError } from '../spec/errors'\nimport { BaseSerializer } from './baseSerializer'\nimport type { Factory as NormalizerFactory } from './json/normalize'\nimport type { Normalized } from './json/types'\nimport type { NormalizerOptions, SerializerOptions } from './types'\n\n/**\n * Multi purpose Json serializer.\n */\nexport class JsonSerializer extends BaseSerializer<Normalized.Bom> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {@link Spec.UnsupportedFormatError | UnsupportedFormatError} if `normalizerFactory.spec` does not support {@link Format.JSON}.\n */\n constructor (normalizerFactory: JsonSerializer['normalizerFactory']) {\n if (!normalizerFactory.spec.supportsFormat(Format.JSON)) {\n throw new UnsupportedFormatError('Spec does not support JSON format.')\n }\n\n super()\n this.#normalizerFactory = normalizerFactory\n }\n\n get normalizerFactory (): NormalizerFactory {\n return this.#normalizerFactory\n }\n\n protected _normalize (\n bom: Bom,\n options: NormalizerOptions = {}\n ): Normalized.Bom {\n return this.#normalizerFactory.makeForBom()\n .normalize(bom, options)\n }\n\n protected _serialize (\n bom: Normalized.Bom,\n { space }: SerializerOptions = {}\n ): string {\n return JSON.stringify(bom, null, space)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models'\n\nexport interface NormalizerOptions {\n /**\n * Whether to sort lists in normalization results. Sorted lists make the output reproducible.\n */\n sortLists?: boolean\n}\n\nexport interface SerializerOptions {\n /**\n * Add indention in the serialization result. Indention increases readability for humans.\n */\n space?: string | number\n}\n\nexport interface Serializer {\n /**\n * @throws {@link Serialize.MissingOptionalDependencyError | MissingOptionalDependencyError}, when a required dependency was not installed\n * @throws {@link Error}\n */\n serialize: (bom: Bom, options?: SerializerOptions & NormalizerOptions) => string\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// region normalizedString\n\n/** search-item for {@link normalizedString} */\nconst _normalizeStringForbiddenSearch = /\\r\\n|\\t|\\n|\\r/g\n/** replace-item for {@link normalizedString} */\nconst _normalizeStringForbiddenReplace = ' '\n\n/**\n * Make a 'normalizedString', adhering XML spec.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#normalizedString}\n *\n * @remarks\n *\n * quote from the XML schema spec:\n *\n * *normalizedString* represents white space normalized strings.\n * The [·value space·](https://www.w3.org/TR/xmlschema-2/#dt-value-space) of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.\n * The [·lexical space·](https://www.w3.org/TR/xmlschema-2/#dt-lexical-space) of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.\n * The [·base type·](https://www.w3.org/TR/xmlschema-2/#dt-basetype) of normalizedString is [string](https://www.w3.org/TR/xmlschema-2/#string).\n *\n * @internal\n */\nexport function normalizedString(s: string): string {\n return s.replace(_normalizeStringForbiddenSearch, _normalizeStringForbiddenReplace)\n}\n\n// endregion\n\n// region token\n\n/** search-item for {@link token} */\nconst _tokenMultispaceSearch = / {2,}/g\n/** replace-item for {@link token} */\nconst _tokenMultispaceReplace = ' '\n\n/**\n * Make a 'token', adhering XML spec.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#token}\n *\n * @remarks\n *\n * quote from the XML schema spec:\n *\n * *token* represents tokenized strings.\n * The [·value space·](https://www.w3.org/TR/xmlschema-2/#dt-value-space) of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces.\n * The [·lexical space·](https://www.w3.org/TR/xmlschema-2/#dt-lexical-space) of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces.\n * The [·base type·](https://www.w3.org/TR/xmlschema-2/#dt-basetype) of token is [normalizedString](https://www.w3.org/TR/xmlschema-2/#normalizedString).\n *\n * @internal\n */\nexport function token(s: string): string {\n // according to spec, `token` inherits from `normalizedString` - so we utilize it here.\n return normalizedString(s).trim().replace(_tokenMultispaceSearch, _tokenMultispaceReplace)\n}\n\n// endregion\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Normalize from './normalize'\nexport * as Types from './types'\n// export * as Denormalize from './denormalize' // @TODO\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint complexity: [\"error\", 50 ] -- acknowledged */\n/* eslint max-lines: 'off' -- intended */\n\nimport { chainI } from \"../../_helpers/iterable\";\nimport { isNotUndefined } from '../../_helpers/notUndefined'\nimport type { SortableIterable } from '../../_helpers/sortable'\nimport type { Stringable } from '../../_helpers/stringable'\nimport { treeIteratorSymbol } from '../../_helpers/tree'\nimport { escapeUri } from '../../_helpers/uri'\nimport type * as Models from '../../models'\nimport { Tool, ToolRepository } from \"../../models\";\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../../models/license'\nimport { NamedLifecycle } from '../../models/lifecycle'\nimport { AffectedSingleVersion, AffectedVersionRange } from '../../models/vulnerability/affect'\nimport { isSupportedSpdxId } from '../../spdx'\nimport type { _SpecProtocol as Spec } from '../../spec/_protocol'\nimport { Version as SpecVersion } from '../../spec/enums'\nimport type { NormalizerOptions } from '../types'\nimport { normalizedString, token} from './_xsd'\nimport type { SimpleXml } from './types'\nimport { XmlSchema } from './types'\n\n\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: Factory['spec']) {\n this.#spec = spec\n }\n\n get spec (): Spec {\n return this.#spec\n }\n\n makeForBom (): BomNormalizer {\n return new BomNormalizer(this)\n }\n\n makeForMetadata (): MetadataNormalizer {\n return new MetadataNormalizer(this)\n }\n\n makeForLifecycle (): LifecycleNormalizer {\n return new LifecycleNormalizer(this)\n }\n\n makeForComponent (): ComponentNormalizer {\n return new ComponentNormalizer(this)\n }\n\n makeForService (): ServiceNormalizer {\n return new ServiceNormalizer(this)\n }\n\n\n\n makeForComponentEvidence (): ComponentEvidenceNormalizer {\n return new ComponentEvidenceNormalizer(this)\n }\n\n makeForTool (): ToolNormalizer {\n return new ToolNormalizer(this)\n }\n\n makeForTools (): ToolsNormalizer {\n return new ToolsNormalizer(this)\n }\n\n makeForOrganizationalContact (): OrganizationalContactNormalizer {\n return new OrganizationalContactNormalizer(this)\n }\n\n makeForOrganizationalEntity (): OrganizationalEntityNormalizer {\n return new OrganizationalEntityNormalizer(this)\n }\n\n makeForHash (): HashNormalizer {\n return new HashNormalizer(this)\n }\n\n makeForLicense (): LicenseNormalizer {\n return new LicenseNormalizer(this)\n }\n\n makeForSWID (): SWIDNormalizer {\n return new SWIDNormalizer(this)\n }\n\n makeForExternalReference (): ExternalReferenceNormalizer {\n return new ExternalReferenceNormalizer(this)\n }\n\n makeForAttachment (): AttachmentNormalizer {\n return new AttachmentNormalizer(this)\n }\n\n makeForProperty (): PropertyNormalizer {\n return new PropertyNormalizer(this)\n }\n\n makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n\n makeForVulnerability (): VulnerabilityNormalizer {\n return new VulnerabilityNormalizer(this)\n }\n\n makeForVulnerabilitySource (): VulnerabilitySourceNormalizer {\n return new VulnerabilitySourceNormalizer(this)\n }\n\n makeForVulnerabilityReference (): VulnerabilityReferenceNormalizer {\n return new VulnerabilityReferenceNormalizer(this)\n }\n\n makeForVulnerabilityRating (): VulnerabilityRatingNormalizer {\n return new VulnerabilityRatingNormalizer(this)\n }\n\n makeForVulnerabilityAdvisory (): VulnerabilityAdvisoryNormalizer {\n return new VulnerabilityAdvisoryNormalizer(this)\n }\n\n makeForVulnerabilityCredits (): VulnerabilityCreditsNormalizer {\n return new VulnerabilityCreditsNormalizer(this)\n }\n\n makeForVulnerabilityAffect (): VulnerabilityAffectNormalizer {\n return new VulnerabilityAffectNormalizer(this)\n }\n\n makeForVulnerabilityAffectedVersion (): VulnerabilityAffectedVersionNormalizer {\n return new VulnerabilityAffectedVersionNormalizer(this)\n }\n\n makeForVulnerabilityAnalysis (): VulnerabilityAnalysisNormalizer {\n return new VulnerabilityAnalysisNormalizer(this)\n }\n}\n\nconst xmlNamespace: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom/1.6'],\n [SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom/1.5'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom/1.4'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom/1.3'],\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom/1.2'],\n [SpecVersion.v1dot1, 'http://cyclonedx.org/schema/bom/1.1'],\n [SpecVersion.v1dot0, 'http://cyclonedx.org/schema/bom/1.0']\n])\n\ninterface XmlNormalizer<TModel, TNormalized> {\n normalize: (data: TModel, options: NormalizerOptions, elementName?: string) => TNormalized | undefined\n\n normalizeIterable?: (data: SortableIterable<TModel>, options: NormalizerOptions, elementName: string) => TNormalized[]\n}\n\nabstract class BaseXmlNormalizer<TModel, TNormalized = SimpleXml.Element> implements XmlNormalizer<TModel, TNormalized> {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n get factory (): Factory {\n return this._factory\n }\n\n /**\n * @param elementName - element name. XML defines structures; the element's name is defined on usage of a structure.\n */\n abstract normalize (data: TModel, options: NormalizerOptions, elementName?: string): TNormalized | undefined\n}\n\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions --\n * since empty strings need to be treated as undefined/null\n */\n\nexport class BomNormalizer extends BaseXmlNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): SimpleXml.Element {\n const components: SimpleXml.Element = {\n // spec < 1.4 always requires a 'components' element\n type: 'element',\n name: 'components',\n children: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options, 'component')\n : undefined\n }\n const services: SimpleXml.Element | undefined = this._factory.spec.supportsServices && data.services.size > 0\n ? {\n type: 'element',\n name: 'services',\n children: this._factory.makeForService().normalizeIterable(data.services, options, 'service')\n }\n : undefined\n const vulnerabilities: SimpleXml.Element | undefined = this._factory.spec.supportsVulnerabilities && data.vulnerabilities.size > 0\n ? {\n type: 'element',\n name: 'vulnerabilities',\n children: this._factory.makeForVulnerability().normalizeIterable(data.vulnerabilities, options, 'vulnerability')\n }\n : undefined\n return {\n type: 'element',\n // the element's name is hardcoded in the XSD\n name: 'bom',\n namespace: xmlNamespace.get(this._factory.spec.version),\n attributes: {\n version: data.version,\n serialNumber: this.#isEligibleSerialNumber(data.serialNumber)\n ? data.serialNumber\n : undefined\n },\n children: [\n this._factory.makeForMetadata().normalize(data.metadata, options, 'metadata'),\n components,\n services,\n this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options, 'dependencies')\n : undefined,\n vulnerabilities\n ].filter(isNotUndefined)\n }\n }\n\n #isEligibleSerialNumber (v: string | undefined): boolean {\n return v !== undefined &&\n // see https://github.com/CycloneDX/specification/blob/ef71717ae0ecb564c0b4c9536d6e9e57e35f2e69/schema/bom-1.4.xsd#L699\n /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$/.test(v)\n }\n}\n\nexport class MetadataNormalizer extends BaseXmlNormalizer<Models.Metadata> {\n normalize (data: Models.Metadata, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n const lifecycles: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataLifecycles && data.lifecycles.size > 0\n ? {\n type: 'element',\n name: 'lifecycles',\n children: this._factory.makeForLifecycle().normalizeIterable(data.lifecycles, options, 'lifecycle')\n }\n : undefined\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options, 'tools')\n : undefined\n const authors: SimpleXml.Element | undefined = data.authors.size > 0\n ? {\n type: 'element',\n name: 'authors',\n children: this._factory.makeForOrganizationalContact().normalizeIterable(data.authors, options, 'author')\n }\n : undefined\n const licenses: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataLicenses && data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const properties: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataProperties && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalDateTimeElement(data.timestamp, 'timestamp'),\n lifecycles,\n tools,\n authors,\n data.component === undefined\n ? undefined\n : this._factory.makeForComponent().normalize(data.component, options, 'component'),\n data.manufacture === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.manufacture, options, 'manufacture'),\n data.supplier === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.supplier, options, 'supplier'),\n licenses,\n properties\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class LifecycleNormalizer extends BaseXmlNormalizer<Models.Lifecycle> {\n normalize (data: Models.Lifecycle, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return data instanceof NamedLifecycle\n ? {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.description, 'description')\n ].filter(isNotUndefined)\n }\n : {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data, 'phase')\n ]\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Lifecycle>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options, elementName))\n }\n}\n\nexport class ToolNormalizer extends BaseXmlNormalizer<Models.Tool> {\n normalize (data: Models.Tool, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n const externalReferences: SimpleXml.Element | undefined =\n this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.vendor, 'vendor', normalizedString),\n makeOptionalTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.version, 'version', normalizedString),\n hashes,\n externalReferences\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Tool>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options, elementName))\n }\n}\n\nexport class ToolsNormalizer extends BaseXmlNormalizer<Models.Tools> {\n normalize (data: Models.Tools, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n let children: SimpleXml.Element[] = []\n if (data.tools.size > 0 || !this._factory.spec.supportsToolsComponentsServices) {\n children = this._factory.makeForTool().normalizeIterable(\n new ToolRepository(chainI(\n Array.from(data.components, Tool.fromComponent),\n Array.from(data.services, Tool.fromService),\n data.tools,\n )), options, 'tool')\n } else {\n if (data.components.size > 0) {\n children.push({\n type: 'element',\n name: 'components',\n children: this._factory.makeForComponent().normalizeIterable(data.components, options, 'component')\n })\n }\n if (data.services.size > 0) {\n children.push({\n type: 'element',\n name: 'services',\n children: this._factory.makeForService().normalizeIterable(data.services, options, 'service')\n })\n }\n }\n return {\n type: 'element',\n name: elementName,\n children\n }\n }\n}\n\nexport class HashNormalizer extends BaseXmlNormalizer<Models.Hash> {\n normalize ([algorithm, content]: Models.Hash, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const spec = this._factory.spec\n return spec.supportsHashAlgorithm(algorithm) && spec.supportsHashValue(content)\n ? {\n type: 'element',\n name: elementName,\n attributes: { alg: algorithm },\n children: token(content)\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.Hash>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n h => this.normalize(h, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends BaseXmlNormalizer<Models.OrganizationalContact> {\n normalize (data: Models.OrganizationalContact, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.email, 'email', normalizedString),\n makeOptionalTextElement(data.phone, 'phone', normalizedString)\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalContact>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oc => this.normalize(oc, options, elementName))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends BaseXmlNormalizer<Models.OrganizationalEntity> {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n ...makeTextElementIter(Array.from(\n data.url, (s): string => escapeUri(s.toString())\n ), options, 'url'\n ).filter(({ children: u }) => XmlSchema.isAnyURI(u)),\n ...this._factory.makeForOrganizationalContact().normalizeIterable(data.contact, options, 'contact')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalEntity>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oe => this.normalize(oe, options, elementName))\n }\n}\n\nexport class ComponentNormalizer extends BaseXmlNormalizer<Models.Component> {\n normalize (data: Models.Component, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const spec = this._factory.spec\n if (!spec.supportsComponentType(data.type)) {\n return undefined\n }\n const supplier: SimpleXml.Element | undefined = data.supplier === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.supplier, options, 'supplier')\n const version: SimpleXml.Element | undefined = (\n spec.requiresComponentVersion\n ? makeTextElement\n : makeOptionalTextElement\n )(\n data.version ?? '',\n 'version',\n normalizedString\n )\n const hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const swid: SimpleXml.Element | undefined = data.swid === undefined\n ? undefined\n : this._factory.makeForSWID().normalize(data.swid, options, 'swid')\n const extRefs: SimpleXml.Element | undefined = data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = spec.supportsProperties(data) && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n const components: SimpleXml.Element | undefined = data.components.size > 0\n ? {\n type: 'element',\n name: 'components',\n children: this.normalizeIterable(data.components, options, 'component')\n }\n : undefined\n const evidence: SimpleXml.Element | undefined = spec.supportsComponentEvidence && data.evidence !== undefined\n ? this._factory.makeForComponentEvidence().normalize(data.evidence, options, 'evidence')\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: {\n type: data.type,\n 'bom-ref': data.bomRef.value\n },\n children: [\n supplier,\n makeOptionalTextElement(data.author, 'author', normalizedString),\n makeOptionalTextElement(data.publisher, 'publisher', normalizedString),\n makeOptionalTextElement(data.group, 'group', normalizedString),\n makeTextElement(data.name, 'name', normalizedString),\n version,\n makeOptionalTextElement(data.description, 'description', normalizedString),\n makeOptionalTextElement(data.scope, 'scope'),\n hashes,\n licenses,\n makeOptionalTextElement(data.copyright, 'copyright', normalizedString),\n makeOptionalTextElement(data.cpe, 'cpe'),\n makeOptionalTextElement(data.purl, 'purl'),\n swid,\n extRefs,\n properties,\n components,\n evidence\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Component>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n c => this.normalize(c, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class ServiceNormalizer extends BaseXmlNormalizer<Models.Service> {\n normalize (data: Models.Service, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const spec = this._factory.spec\n const provider: SimpleXml.Element | undefined = data.provider === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.provider, options, 'provider')\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const extRefs: SimpleXml.Element | undefined = data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = spec.supportsProperties(data) && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n const services: SimpleXml.Element | undefined = data.services.size > 0\n ? {\n type: 'element',\n name: 'services',\n children: this.normalizeIterable(data.services, options, 'service')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: {\n 'bom-ref': data.bomRef.value\n },\n children: [\n provider,\n makeOptionalTextElement(data.group, 'group', normalizedString),\n makeTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.version, 'version', normalizedString),\n makeOptionalTextElement(data.description, 'description', normalizedString),\n licenses,\n extRefs,\n properties,\n services,\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Service>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n s => this.normalize(s, options, elementName)\n )\n }\n}\n\n\nexport class ComponentEvidenceNormalizer extends BaseXmlNormalizer<Models.ComponentEvidence> {\n normalize (data: Models.ComponentEvidence, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const copyright: SimpleXml.Element | undefined = data.copyright.size > 0\n ? {\n type: 'element',\n name: 'copyright',\n children: makeTextElementIter(data.copyright, options, 'text')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n licenses,\n copyright\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class LicenseNormalizer extends BaseXmlNormalizer<Models.License> {\n normalize (data: Models.License, options: NormalizerOptions): SimpleXml.Element {\n switch (true) {\n case data instanceof NamedLicense:\n return this.#normalizeNamedLicense(data, options)\n case data instanceof SpdxLicense:\n return isSupportedSpdxId(data.id)\n ? this.#normalizeSpdxLicense(data, options)\n : this.#normalizeNamedLicense(new NamedLicense(\n // prevent information loss -> convert to broader type\n data.id,\n { url: data.url }\n ), options)\n case data instanceof LicenseExpression:\n return this.#normalizeLicenseExpression(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n /* c8 ignore end */\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: 'license',\n attributes: {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n },\n children: [\n makeTextElement(data.name, 'name', normalizedString),\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: 'license',\n attributes: {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n },\n children: [\n makeTextElement(data.id, 'id'),\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): SimpleXml.Element {\n const elem = makeTextElement(data.expression, 'expression', normalizedString)\n elem.attributes = {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n }\n return elem\n }\n\n /**\n * If there is any {@link Models.LicenseExpression | LicenseExpression} in the set, then this is the only item that is normalized.\n */\n normalizeIterable (data: SortableIterable<Models.License>, options: NormalizerOptions): SimpleXml.Element[] {\n const licenses = options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n\n if (licenses.length > 1) {\n const expressions = licenses.filter(l => l instanceof LicenseExpression)\n if (expressions.length > 0) {\n // could have thrown {@link RangeError} when there is more than one only {@link Models.LicenseExpression | LicenseExpression}.\n // but let's be graceful and just normalize to the most relevant choice: any expression\n return [this.#normalizeLicenseExpression(expressions[0])]\n }\n }\n\n return licenses.map(l => this.normalize(l, options))\n }\n}\n\nexport class SWIDNormalizer extends BaseXmlNormalizer<Models.SWID> {\n normalize (data: Models.SWID, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: elementName,\n attributes: {\n tagId: data.tagId,\n name: data.name,\n version: data.version || undefined,\n tagVersion: data.tagVersion,\n patch: data.patch === undefined\n ? undefined\n : (data.patch ? 'true' : 'false')\n },\n children: [\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ExternalReferenceNormalizer extends BaseXmlNormalizer<Models.ExternalReference> {\n normalize (data: Models.ExternalReference, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = escapeUri(data.url.toString())\n const hashes: SimpleXml.Element | undefined = this._factory.spec.supportsExternalReferenceHashes && data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n return this._factory.spec.supportsExternalReferenceType(data.type) &&\n XmlSchema.isAnyURI(url)\n ? {\n type: 'element',\n name: elementName,\n attributes: {\n type: data.type\n },\n children: [\n makeTextElement(url, 'url'),\n makeOptionalTextElement(data.comment, 'comment'),\n hashes\n ].filter(isNotUndefined)\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.ExternalReference>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n r => this.normalize(r, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends BaseXmlNormalizer<Models.Attachment> {\n normalize (data: Models.Attachment, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n attributes: {\n 'content-type': data.contentType\n ? normalizedString(data.contentType)\n : undefined,\n encoding: data.encoding || undefined\n },\n children: data.content.toString()\n }\n }\n}\n\nexport class PropertyNormalizer extends BaseXmlNormalizer<Models.Property> {\n normalize (data: Models.Property, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n attributes: {\n name: data.name\n },\n children: normalizedString(data.value)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Property>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(p => this.normalize(p, options, elementName))\n }\n}\n\nexport class DependencyGraphNormalizer extends BaseXmlNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const allRefs = new Map<Models.BomRef, Models.BomRefRepository>()\n if (data.metadata.component !== undefined) {\n allRefs.set(data.metadata.component.bomRef, data.metadata.component.dependencies)\n for (const component of data.metadata.component.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n for (const service of data.services[treeIteratorSymbol]()) {\n allRefs.set(service.bomRef, service.dependencies)\n }\n\n const normalized: Array<(SimpleXml.Element & { attributes: { ref: string } })> = []\n for (const [ref, deps] of allRefs) {\n const dep = this.#normalizeDependency(ref, deps, allRefs, options)\n if (isNotUndefined(dep)) {\n normalized.push(dep)\n }\n }\n\n if (options.sortLists ?? false) {\n normalized.sort(\n ({ attributes: { ref: a } }, { attributes: { ref: b } }) => a.localeCompare(b))\n }\n\n return {\n type: 'element',\n name: elementName,\n children: normalized\n }\n }\n\n #normalizeDependency (\n ref: Models.BomRef,\n deps: Models.BomRefRepository,\n allRefs: Map<Models.BomRef, Models.BomRefRepository>,\n options: NormalizerOptions\n ): undefined | (SimpleXml.Element & { attributes: { ref: string } }) {\n const bomRef = ref.toString()\n if (bomRef.length === 0) {\n // no value -> cannot render\n return undefined\n }\n\n const dependsOn: string[] = Array.from(deps).filter(d => allRefs.has(d) && d !== ref)\n .map(d => d.toString()).filter(d => d.length > 0)\n if (options.sortLists ?? false) {\n dependsOn.sort((a, b) => a.localeCompare(b))\n }\n\n return {\n type: 'element',\n name: 'dependency',\n attributes: { ref: bomRef },\n children: dependsOn.map(d => ({\n type: 'element',\n name: 'dependency',\n attributes: { ref: d }\n }))\n }\n }\n}\n\nexport class VulnerabilityNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Vulnerability> {\n normalize (data: Models.Vulnerability.Vulnerability, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const references: SimpleXml.Element | undefined = data.references.size > 0\n ? {\n type: 'element',\n name: 'references',\n children: this._factory.makeForVulnerabilityReference().normalizeIterable(data.references, options, 'reference')\n }\n : undefined\n const ratings: SimpleXml.Element | undefined = data.ratings.size > 0\n ? {\n type: 'element',\n name: 'ratings',\n children: this._factory.makeForVulnerabilityRating().normalizeIterable(data.ratings, options, 'rating')\n }\n : undefined\n const cwes: SimpleXml.Element | undefined = data.cwes.size > 0\n ? {\n type: 'element',\n name: 'cwes',\n children: (\n options.sortLists\n ? data.cwes.sorted()\n : Array.from(data.cwes)\n ).map(cwe => makeTextElement(cwe, 'cwe'))\n }\n : undefined\n const advisories: SimpleXml.Element | undefined = data.advisories.size > 0\n ? {\n type: 'element',\n name: 'advisories',\n children: this._factory.makeForVulnerabilityAdvisory().normalizeIterable(data.advisories, options, 'advisory')\n }\n : undefined\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options, 'tools')\n : undefined\n const affects: SimpleXml.Element | undefined = data.affects.size > 0\n ? {\n type: 'element',\n name: 'affects',\n children: this._factory.makeForVulnerabilityAffect().normalizeIterable(data.affects, options, 'target')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: { 'bom-ref': data.bomRef.value || undefined },\n children: [\n makeOptionalTextElement(data.id, 'id', normalizedString),\n data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source'),\n references,\n ratings,\n cwes,\n makeOptionalTextElement(data.description, 'description'),\n makeOptionalTextElement(data.detail, 'detail'),\n makeOptionalTextElement(data.recommendation, 'recommendation'),\n advisories,\n makeOptionalDateTimeElement(data.created, 'created'),\n makeOptionalDateTimeElement(data.created, 'published'),\n makeOptionalDateTimeElement(data.created, 'updated'),\n data.credits === undefined\n ? undefined\n : this._factory.makeForVulnerabilityCredits().normalize(data.credits, options, 'credits'),\n tools,\n data.analysis === undefined\n ? undefined\n : this._factory.makeForVulnerabilityAnalysis().normalize(data.analysis, options, 'analysis'),\n affects,\n properties\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Vulnerability>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(v => this.normalize(v, options, elementName))\n }\n}\n\nexport class VulnerabilitySourceNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Source> {\n normalize (data: Models.Vulnerability.Source, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityReferenceNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Reference> {\n normalize (data: Models.Vulnerability.Reference, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.id, 'id'),\n this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source')\n ]\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Reference>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options, elementName))\n }\n}\n\nexport class VulnerabilityRatingNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Rating> {\n normalize (data: Models.Vulnerability.Rating, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source'),\n makeOptionalTextElement(data.score, 'score'),\n makeOptionalTextElement(data.severity, 'severity'),\n this._factory.spec.supportsVulnerabilityRatingMethod(data.method)\n ? makeOptionalTextElement(data.method, 'method')\n : undefined,\n makeOptionalTextElement(data.vector, 'vector', normalizedString),\n makeOptionalTextElement(data.justification, 'justification')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Rating>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options, elementName))\n }\n}\n\nexport class VulnerabilityAdvisoryNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Advisory> {\n normalize (data: Models.Vulnerability.Advisory, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = escapeUri(data.url.toString())\n if (!XmlSchema.isAnyURI(url)) {\n // invalid value -> cannot render\n return undefined\n }\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.title, 'title'),\n makeTextElement(url, 'url')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Advisory>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n a => this.normalize(a, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityCreditsNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Credits> {\n normalize (data: Models.Vulnerability.Credits, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const organizations: SimpleXml.Element | undefined = data.organizations.size > 0\n ? {\n type: 'element',\n name: 'organizations',\n children: this._factory.makeForOrganizationalEntity().normalizeIterable(data.organizations, options, 'organization')\n }\n : undefined\n const individuals: SimpleXml.Element | undefined = data.individuals.size > 0\n ? {\n type: 'element',\n name: 'individuals',\n children: this._factory.makeForOrganizationalContact().normalizeIterable(data.individuals, options, 'individual')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n organizations,\n individuals\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityAnalysisNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Analysis> {\n normalize (data: Models.Vulnerability.Analysis, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const responses: SimpleXml.Element | undefined = data.response.size > 0\n ? {\n type: 'element',\n name: 'responses',\n children: (\n options.sortLists ?? false\n ? data.response.sorted()\n : Array.from(data.response)\n ).map(ar => makeTextElement(ar, 'response'))\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.state, 'state'),\n makeOptionalTextElement(data.justification, 'justification'),\n responses,\n makeOptionalTextElement(data.detail, 'detail')\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityAffectNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Affect> {\n normalize (data: Models.Vulnerability.Affect, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const versions: SimpleXml.Element | undefined = data.versions.size > 0\n ? {\n type: 'element',\n name: 'versions',\n children: this._factory.makeForVulnerabilityAffectedVersion().normalizeIterable(data.versions, options, 'version')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.ref, 'ref'),\n versions\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Affect>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(a => this.normalize(a, options, elementName))\n }\n}\n\nexport class VulnerabilityAffectedVersionNormalizer extends BaseXmlNormalizer<Models.Vulnerability.AffectedVersion> {\n normalize (data: Models.Vulnerability.AffectedVersion, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n switch (true) {\n case data instanceof AffectedSingleVersion:\n return this.#normalizeAffectedSingleVersion(data, elementName)\n case data instanceof AffectedVersionRange:\n return this.#normalizeAffectedVersionRange(data, elementName)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected Vulnerability AffectedVersion')\n /* c8 ignore end */\n }\n }\n\n #normalizeAffectedSingleVersion (data: Models.Vulnerability.AffectedSingleVersion, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.version, 'version', normalizedString),\n makeOptionalTextElement(data.status, 'status')\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeAffectedVersionRange (data: Models.Vulnerability.AffectedVersionRange, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.range, 'range', normalizedString),\n makeOptionalTextElement(data.status, 'status')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.AffectedVersion>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(av => this.normalize(av, options, elementName))\n }\n}\n\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\ntype StrictTextElement = SimpleXml.TextElement & { children: string }\n\ntype TextElementModifier = (i:string) => string\nconst noTEM: TextElementModifier = (s) => s\n\nfunction makeOptionalTextElement (data: null | undefined | Stringable, elementName: string, mod: TextElementModifier = noTEM): undefined | StrictTextElement {\n const s = mod(data?.toString() ?? '')\n return s.length > 0\n ? makeTextElement(s, elementName)\n : undefined\n}\n\nfunction makeTextElement (data: Stringable, elementName: string, mod: TextElementModifier = noTEM): StrictTextElement {\n return {\n type: 'element',\n name: elementName,\n children: mod(data.toString())\n }\n}\n\nfunction makeTextElementIter (data: Iterable<Stringable>, options: NormalizerOptions, elementName: string, mod: TextElementModifier = noTEM): StrictTextElement[] {\n const r: StrictTextElement[] = Array.from(data, d => makeTextElement(d, elementName, mod))\n if (options.sortLists ?? false) {\n r.sort(({ children: a }, { children: b }) => a.localeCompare(b))\n }\n return r\n}\n\nfunction makeOptionalDateTimeElement (data: null | undefined | Date, elementName: string, mod: TextElementModifier = noTEM): undefined | StrictTextElement {\n const d = data?.toISOString()\n return d === undefined\n ? undefined\n : makeTextElement(d, elementName, mod)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace XmlSchema {\n\n const _AnyUriSchemePattern = /^[a-z][a-z0-9+\\-.]*$/i\n\n /**\n * @see {@link isAnyURI}\n */\n export type AnyURI = string\n\n /**\n * Test whether format is XML::anyURI - best-effort.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI | anyURI spec}\n * @see {@link https://www.w3.org/2011/04/XMLSchema/TypeLibrary-URI-RFC3986.xsd | RFC 3986}\n * @see {@link https://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd | RFC 3987}\n *\n * @TODO add more validation according to spec\n */\n export function isAnyURI (value: AnyURI | any): value is AnyURI {\n if (typeof value !== 'string') {\n // not a string\n return false\n }\n if (value.length === 0) {\n // empty string\n return false\n }\n\n const fragmentPos = value.indexOf('#')\n let beforeFragment = value\n if (fragmentPos >= 0) {\n if (value.includes('#', fragmentPos + 1)) {\n // has a second fragment marker\n return false\n }\n beforeFragment = value.slice(undefined, fragmentPos)\n }\n\n const schemePos = beforeFragment.indexOf(':')\n if (schemePos >= 0) {\n if (!_AnyUriSchemePattern.test(beforeFragment.slice(undefined, schemePos))) {\n // invalid schema\n return false\n }\n }\n\n return true\n }\n\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace SimpleXml {\n\n /**\n * Attribute's name.\n *\n * Must be alphanumeric.\n * Must start with alpha.\n * Must not contain whitespace characters.\n * Should not be literal \"xmlns\".\n */\n export type AttributeName = string\n\n /**\n * Element's name.\n *\n * Must be alphanumeric.\n * Must start with alpha.\n * Must not contain whitespace characters.\n */\n export type ElementName = string\n\n /**\n * Textual representation.\n *\n * Be aware that low-/high-bytes could be represented as numbers.\n * They might need to be converted on serialization.\n */\n export type Text = string | number\n\n /**\n * Unset representation.\n *\n * Do NOT allow null here, as it is context-aware sometimes an empty string or unset,\n * in a space where context is unknown.\n */\n export type Unset = undefined\n\n export type ElementAttributes = Record<AttributeName, Text | Unset>\n\n export type ElementChildren = Iterable<Comment | Element> | Text | Unset\n\n /**\n * Element node.\n */\n export interface Element {\n type: 'element'\n name: ElementName\n namespace?: string | URL\n attributes?: ElementAttributes\n children?: ElementChildren\n }\n\n /**\n * Element node with textual content\n */\n export interface TextElement extends Element {\n children: Text\n }\n\n /**\n * Comment node.\n */\n export interface Comment {\n type: 'comment'\n text?: Text\n }\n\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models'\nimport { Format } from '../spec/enums'\nimport { UnsupportedFormatError } from '../spec/errors'\nimport { BaseSerializer } from './baseSerializer'\nimport type { NormalizerOptions } from './types'\nimport type { Factory as NormalizerFactory } from './xml/normalize'\nimport type { SimpleXml } from './xml/types'\n\n/**\n * Base XML serializer.\n */\nexport abstract class XmlBaseSerializer extends BaseSerializer<SimpleXml.Element> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {@link Spec.UnsupportedFormatError | UnsupportedFormatError} if `normalizerFactory.spec` does not support {@link Format.XML}.\n */\n constructor (normalizerFactory: XmlBaseSerializer['normalizerFactory']) {\n if (!normalizerFactory.spec.supportsFormat(Format.XML)) {\n throw new UnsupportedFormatError('Spec does not support XML format.')\n }\n\n super()\n this.#normalizerFactory = normalizerFactory\n }\n\n get normalizerFactory (): NormalizerFactory {\n return this.#normalizerFactory\n }\n\n protected _normalize (\n bom: Bom,\n options: NormalizerOptions = {}\n ): SimpleXml.Element {\n return this.#normalizerFactory.makeForBom()\n .normalize(bom, options)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { isNotUndefined } from '../_helpers/notUndefined'\nimport type { SerializerOptions } from './types'\nimport type { SimpleXml } from './xml/types'\nimport { XmlBaseSerializer } from './xmlBaseSerializer'\n\n/**\n * XML serializer for web browsers.\n */\nexport class XmlSerializer extends XmlBaseSerializer {\n protected _serialize (\n normalizedBom: SimpleXml.Element,\n { space }: SerializerOptions = {}\n ): string {\n const doc = this.#buildXmlDocument(normalizedBom)\n // @TODO: add indention based on `space`\n return (new XMLSerializer()).serializeToString(doc)\n }\n\n #buildXmlDocument (\n rootElement: SimpleXml.Element\n ): XMLDocument {\n const namespace = null\n const doc = document.implementation.createDocument(namespace, null)\n doc.appendChild(this.#buildElement(rootElement, doc, namespace))\n return doc\n }\n\n #getNS (element: SimpleXml.Element): string | null {\n const ns = (element.namespace ?? element.attributes?.xmlns)?.toString() ?? ''\n return ns.length > 0\n ? ns\n : null\n }\n\n #buildElement (element: SimpleXml.Element, doc: XMLDocument, parentNS: string | null): Element {\n const ns = this.#getNS(element) ?? parentNS\n const node: Element = doc.createElementNS(ns, element.name)\n if (isNotUndefined(element.attributes)) {\n this.#setAttributes(node, element.attributes)\n }\n if (isNotUndefined(element.children)) {\n this.#addChildren(node, element.children, ns)\n }\n return node\n }\n\n #setAttributes (node: Element, attributes: SimpleXml.ElementAttributes): void {\n for (const [name, value] of Object.entries(attributes)) {\n if (isNotUndefined(value) && name !== 'xmlns') {\n // reminder: cannot change a namespace(xmlns) after the fact.\n node.setAttribute(name, `${value}`)\n }\n }\n }\n\n #addChildren (node: Element, children: SimpleXml.ElementChildren, parentNS: string | null = null): void {\n if (children === undefined) {\n return\n }\n\n if (typeof children === 'string' || typeof children === 'number') {\n node.textContent = children.toString()\n return\n }\n\n const doc = node.ownerDocument\n for (const child of children) {\n if (child.type === 'element') {\n node.appendChild(this.#buildElement(child, doc, parentNS))\n }\n // comments are not implemented, yet\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport spdxExpressionParse from 'spdx-expression-parse'\n\n/* @ts-expect-error: TS6059 -- this works as long as the file/path is available in dist-package. */\nimport { enum as _spdxSpecEnum } from '../res/schema/spdx.SNAPSHOT.schema.json' with { type: 'json' }\n\n/**\n * One of the known SPDX licence identifiers.\n *\n * @see {@link http://cyclonedx.org/schema/spdx | SPDX schema}\n * @see {@link isSupportedSpdxId}\n * @see {@link fixupSpdxId}\n */\nexport type SpdxId = string\n\nconst spdxIds: ReadonlySet<SpdxId> = new Set(_spdxSpecEnum)\n\nconst spdxLowerToActual: Readonly<Record<string, SpdxId>> = Object.freeze(Object.fromEntries(\n _spdxSpecEnum.map(spdxId => [spdxId.toLowerCase(), spdxId])\n))\n\nexport function isSupportedSpdxId (value: SpdxId | any): value is SpdxId {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return spdxIds.has(value)\n}\n\n/** Try to convert a `string`-like to a valid/known {@link SpdxId}. */\nexport function fixupSpdxId (value: string | any): SpdxId | undefined {\n return typeof value === 'string' && value.length > 0\n ? spdxLowerToActual[value.toLowerCase()]\n : undefined\n}\n\nexport function isValidSpdxLicenseExpression (value: string | any): boolean {\n if (typeof value !== 'string') {\n return false\n }\n try {\n spdxExpressionParse(value)\n } catch (err) {\n return false\n }\n return true\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { ComponentType, ExternalReferenceType, HashAlgorithm, Vulnerability } from '../enums'\nimport type { HashContent } from '../models'\nimport type { Format, Version } from './enums'\n\n/**\n * This interface is not intended to be public API.\n * This interface may be affected by breaking changes without notice.\n *\n * See the public exported constants, like {@link Spec.Spec1dot4}, that provide objects implementing this interface.\n * See also {@link Spec.SpecVersionDict} for implementations.\n */\nexport interface _SpecProtocol {\n version: Version\n supportsFormat: (f: Format | any) => boolean\n supportsComponentType: (ct: ComponentType | any) => boolean\n supportsHashAlgorithm: (ha: HashAlgorithm | any) => boolean\n supportsHashValue: (hv: HashContent | any) => boolean\n supportsExternalReferenceType: (ert: ExternalReferenceType | any) => boolean\n supportsDependencyGraph: boolean\n supportsToolReferences: boolean\n requiresComponentVersion: boolean\n supportsProperties: (model: any) => boolean\n supportsVulnerabilities: boolean\n supportsVulnerabilityRatingMethod: (rm: Vulnerability.RatingMethod | any) => boolean\n supportsComponentEvidence: boolean\n supportsMetadataLifecycles: boolean\n supportsMetadataLicenses: boolean\n supportsMetadataProperties: boolean\n supportsExternalReferenceHashes: boolean\n supportsLicenseAcknowledgement: boolean\n supportsServices: boolean\n supportsToolsComponentsServices: boolean\n}\n\n/**\n * This class was never intended to be public API,\n *\n * This is a helper to get the exact spec-versions implemented according to {@link _SpecProtocol | Specification}.\n *\n * @internal as this class may be affected by breaking changes without notice\n */\nexport class _Spec implements _SpecProtocol {\n readonly #version: Version\n readonly #formats: ReadonlySet<Format>\n readonly #componentTypes: ReadonlySet<ComponentType>\n readonly #hashAlgorithms: ReadonlySet<HashAlgorithm>\n readonly #hashValuePattern: RegExp\n readonly #externalReferenceTypes: ReadonlySet<ExternalReferenceType>\n readonly #vulnerabilityRatingMethods: ReadonlySet<Vulnerability.RatingMethod>\n readonly #supportsDependencyGraph: boolean\n readonly #supportsToolReferences: boolean\n readonly #requiresComponentVersion: boolean\n readonly #supportsProperties: boolean\n readonly #supportsVulnerabilities: boolean\n readonly #supportsComponentEvidence: boolean\n readonly #supportsMetadataLifecycles: boolean\n readonly #supportsMetadataLicenses: boolean\n readonly #supportsMetadataProperties: boolean\n readonly #supportsExternalReferenceHashes: boolean\n readonly #supportsLicenseAcknowledgement: boolean\n readonly #supportsServices: boolean\n readonly #supportsToolsComponentsServices: boolean\n\n /* eslint-disable-next-line @typescript-eslint/max-params -- architectural decision */\n constructor (\n version: Version,\n formats: Iterable<Format>,\n componentTypes: Iterable<ComponentType>,\n hashAlgorithms: Iterable<HashAlgorithm>,\n hashValuePattern: RegExp,\n externalReferenceTypes: Iterable<ExternalReferenceType>,\n supportsDependencyGraph: boolean,\n supportsToolReferences: boolean,\n requiresComponentVersion: boolean,\n supportsProperties: boolean,\n supportsVulnerabilities: boolean,\n vulnerabilityRatingMethods: Iterable<Vulnerability.RatingMethod>,\n supportsComponentEvidence: boolean,\n supportsMetadataLifecycles: boolean,\n supportsMetadataLicenses: boolean,\n supportsMetadataProperties: boolean,\n supportsExternalReferenceHashes: boolean,\n supportsLicenseAcknowledgement: boolean,\n supportsServices: boolean,\n supportsToolsComponentsServices: boolean\n ) {\n this.#version = version\n this.#formats = new Set(formats)\n this.#componentTypes = new Set(componentTypes)\n this.#hashAlgorithms = new Set(hashAlgorithms)\n this.#hashValuePattern = hashValuePattern\n this.#externalReferenceTypes = new Set(externalReferenceTypes)\n this.#supportsDependencyGraph = supportsDependencyGraph\n this.#supportsToolReferences = supportsToolReferences\n this.#requiresComponentVersion = requiresComponentVersion\n this.#supportsProperties = supportsProperties\n this.#supportsVulnerabilities = supportsVulnerabilities\n this.#vulnerabilityRatingMethods = new Set(vulnerabilityRatingMethods)\n this.#supportsComponentEvidence = supportsComponentEvidence\n this.#supportsMetadataLifecycles = supportsMetadataLifecycles\n this.#supportsMetadataLicenses = supportsMetadataLicenses\n this.#supportsMetadataProperties = supportsMetadataProperties\n this.#supportsExternalReferenceHashes = supportsExternalReferenceHashes\n this.#supportsLicenseAcknowledgement = supportsLicenseAcknowledgement\n this.#supportsServices = supportsServices\n this.#supportsToolsComponentsServices = supportsToolsComponentsServices\n }\n\n get version (): Version {\n return this.#version\n }\n\n supportsFormat (f: Format | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#formats.has(f)\n }\n\n supportsComponentType (ct: ComponentType | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#componentTypes.has(ct)\n }\n\n supportsHashAlgorithm (ha: HashAlgorithm | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#hashAlgorithms.has(ha)\n }\n\n supportsHashValue (hv: HashContent | any): boolean {\n return typeof hv === 'string' &&\n this.#hashValuePattern.test(hv)\n }\n\n supportsExternalReferenceType (ert: ExternalReferenceType | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#externalReferenceTypes.has(ert)\n }\n\n get supportsDependencyGraph (): boolean {\n return this.#supportsDependencyGraph\n }\n\n get supportsToolReferences (): boolean {\n return this.#supportsToolReferences\n }\n\n get requiresComponentVersion (): boolean {\n return this.#requiresComponentVersion\n }\n\n supportsProperties (): boolean {\n // currently a global allow/deny -- might work based on input, in the future\n return this.#supportsProperties\n }\n\n get supportsVulnerabilities (): boolean {\n return this.#supportsVulnerabilities\n }\n\n supportsVulnerabilityRatingMethod (rm: Vulnerability.RatingMethod | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- any */\n return this.#vulnerabilityRatingMethods.has(rm)\n }\n\n get supportsComponentEvidence (): boolean {\n return this.#supportsComponentEvidence\n }\n\n get supportsMetadataLifecycles (): boolean {\n return this.#supportsMetadataLifecycles\n }\n\n get supportsMetadataLicenses (): boolean {\n return this.#supportsMetadataLicenses\n }\n\n get supportsMetadataProperties (): boolean {\n return this.#supportsMetadataProperties\n }\n\n get supportsExternalReferenceHashes (): boolean {\n return this.#supportsExternalReferenceHashes\n }\n\n get supportsLicenseAcknowledgement (): boolean {\n return this.#supportsLicenseAcknowledgement\n }\n\n get supportsServices (): boolean {\n return this.#supportsServices\n }\n\n get supportsToolsComponentsServices(): boolean {\n return this.#supportsToolsComponentsServices\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { ComponentType } from '../enums/componentType'\nimport { ExternalReferenceType } from '../enums/externalReferenceType'\nimport { HashAlgorithm } from '../enums/hashAlogorithm'\nimport { RatingMethod as VulnerabilityRatingMethod } from '../enums/vulnerability/ratingMethod'\nimport type { _SpecProtocol } from './_protocol'\nimport { _Spec } from './_protocol'\nimport { Format, Version } from './enums'\n\n/** Specification v1.2 */\nexport const Spec1dot2: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot2,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.Other\n ],\n true,\n false,\n true,\n false,\n false,\n [],\n false,\n false,\n false,\n false,\n false,\n false,\n true,\n false\n))\n\n/** Specification v1.3 */\nexport const Spec1dot3: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot3,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.Other\n ],\n true,\n false,\n true,\n true,\n false,\n [],\n true,\n false,\n true,\n true,\n true,\n false,\n true,\n false\n))\n\n/** Specification v1.4 */\nexport const Spec1dot4: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot4,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.Other\n ],\n true,\n false,\n true,\n true,\n true,\n false,\n true,\n false\n))\n\n/** Specification v1.5 */\nexport const Spec1dot5: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot5,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.Platform,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.DeviceDriver,\n ComponentType.Firmware,\n ComponentType.File,\n ComponentType.MachineLearningModel,\n ComponentType.Data\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.DistributionIntake,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.SecurityContact,\n ExternalReferenceType.ModelCard,\n ExternalReferenceType.Log,\n ExternalReferenceType.Configuration,\n ExternalReferenceType.Evidence,\n ExternalReferenceType.Formulation,\n ExternalReferenceType.Attestation,\n ExternalReferenceType.ThreatModel,\n ExternalReferenceType.AdversaryModel,\n ExternalReferenceType.RiskAssessment,\n ExternalReferenceType.VulnerabilityAssertion,\n ExternalReferenceType.ExploitabilityStatement,\n ExternalReferenceType.PentestReport,\n ExternalReferenceType.StaticAnalysisReport,\n ExternalReferenceType.DynamicAnalysisReport,\n ExternalReferenceType.RuntimeAnalysisReport,\n ExternalReferenceType.ComponentAnalysisReport,\n ExternalReferenceType.MaturityReport,\n ExternalReferenceType.CertificationReport,\n ExternalReferenceType.CodifiedInfrastructure,\n ExternalReferenceType.QualityMetrics,\n ExternalReferenceType.POAM,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.CVSSv4,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.SSVC,\n VulnerabilityRatingMethod.Other\n ],\n true,\n true,\n true,\n true,\n true,\n false,\n true,\n true\n))\n\n/** Specification v1.6 */\nexport const Spec1dot6: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot6,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.Platform,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.DeviceDriver,\n ComponentType.Firmware,\n ComponentType.File,\n ComponentType.MachineLearningModel,\n ComponentType.Data,\n ComponentType.CryptographicAsset\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.SourceDistribution,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.DistributionIntake,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.SecurityContact,\n ExternalReferenceType.ModelCard,\n ExternalReferenceType.Log,\n ExternalReferenceType.Configuration,\n ExternalReferenceType.Evidence,\n ExternalReferenceType.Formulation,\n ExternalReferenceType.Attestation,\n ExternalReferenceType.ThreatModel,\n ExternalReferenceType.AdversaryModel,\n ExternalReferenceType.RiskAssessment,\n ExternalReferenceType.VulnerabilityAssertion,\n ExternalReferenceType.ExploitabilityStatement,\n ExternalReferenceType.PentestReport,\n ExternalReferenceType.StaticAnalysisReport,\n ExternalReferenceType.DynamicAnalysisReport,\n ExternalReferenceType.RuntimeAnalysisReport,\n ExternalReferenceType.ComponentAnalysisReport,\n ExternalReferenceType.MaturityReport,\n ExternalReferenceType.CertificationReport,\n ExternalReferenceType.CodifiedInfrastructure,\n ExternalReferenceType.QualityMetrics,\n ExternalReferenceType.POAM,\n ExternalReferenceType.ElectronicSignature,\n ExternalReferenceType.DigitalSignature,\n ExternalReferenceType.RFC9116,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.CVSSv4,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.SSVC,\n VulnerabilityRatingMethod.Other\n ],\n true,\n true,\n true,\n true,\n true,\n true,\n true,\n true\n))\n\nexport const SpecVersionDict: Readonly<Partial<Record<Version, Readonly<_SpecProtocol>>>> = Object.freeze({\n [Version.v1dot6]: Spec1dot6,\n [Version.v1dot5]: Spec1dot5,\n [Version.v1dot4]: Spec1dot4,\n [Version.v1dot3]: Spec1dot3,\n [Version.v1dot2]: Spec1dot2\n // <= v1.1 is not implemented\n})\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum Version {\n v1dot6 = '1.6',\n v1dot5 = '1.5',\n v1dot4 = '1.4',\n v1dot3 = '1.3',\n v1dot2 = '1.2',\n v1dot1 = '1.1',\n v1dot0 = '1.0',\n}\n\nexport enum Format {\n XML = 'xml',\n JSON = 'json',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport class UnsupportedFormatError extends Error {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './consts'\nexport * from './enums'\nexport * from './errors'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Specifies a well-formed CPE name that conforms to the CPE 2.2 or 2.3 specification.\n * See the [official specification](https://nvd.nist.gov/products/cpe).\n *\n * @see {@link isCPE}\n */\nexport type CPE = string\n\n/* eslint-disable-next-line no-useless-escape -- value directly from XML, revert special-chars(like `&` -> `&`), and surrounded with `^` and `$` */\nconst cpePattern = /^([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$|^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#$$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#$$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){4})$/\n\nexport function isCPE (value: any): value is CPE {\n return typeof value === 'string' &&\n cpePattern.test(value)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableNumbers } from '../_helpers/sortable'\nimport type { PositiveInteger } from './integer'\nimport { isPositiveInteger } from './integer'\n\n/**\n * Integer representation of a Common Weaknesses Enumerations (CWE).\n *\n * @example\n * value `399` might represent `https://cwe.mitre.org/data/definitions/399.html`.\n *\n * @see {@link isCWE}\n */\nexport type CWE = PositiveInteger\n\nexport function isCWE (value: any): value is CWE {\n return isPositiveInteger(value)\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments -- docs */\nexport class CweRepository extends SortableNumbers<CWE> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './cpe'\nexport * from './cwe'\nexport * from './integer'\nexport * from './mimeType'\n\n// yes, this is node-specific, but who cares - these are just types\nexport * from './nodePackageJson'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Integer\n *\n * @see {@link isInteger}\n */\n/* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- intended */\nexport type Integer = number | NonNegativeInteger\n\nexport function isInteger (value: any): value is Integer {\n return Number.isInteger(value)\n}\n\n/**\n * Integer greater than or equal to `0`\n *\n * @see {@link isNonNegativeInteger}\n */\n/* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- intended */\nexport type NonNegativeInteger = number | PositiveInteger\n\nexport function isNonNegativeInteger (value: any): value is NonNegativeInteger {\n return isInteger(value) &&\n value >= 0\n}\n\n/**\n * Integer greater `0`\n *\n * @see {@link isPositiveInteger}\n */\nexport type PositiveInteger = number\n\nexport function isPositiveInteger (value: any): value is PositiveInteger {\n return isInteger(value) &&\n value > 0\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * @see {@link isMimeType}\n */\nexport type MimeType = string\n\n/* regular expression was taken from the CycloneDX schema definitions. */\nconst mimeTypePattern = /^[-+a-z0-9.]+\\/[-+a-z0-9.]+$/\n\nexport function isMimeType (value: any): value is MimeType {\n return typeof value === 'string' &&\n mimeTypePattern.test(value)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Intended to represent normalized data structures\n * based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)\n * and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).\n *\n * Normalization should be done downstream, for example\n * via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).\n */\nexport interface NodePackageJson {\n name?: string\n version?: string\n description?: string\n license?: string\n licenses?: Array<{\n type?: string\n url?: string\n }>\n author?: string | {\n name?: string\n email?: string\n }\n bugs?: string | {\n url?: string\n }\n homepage?: string\n repository?: string | {\n type?: string\n url?: string\n directory?: string\n }\n // ... to be continued\n dist?: any // see https://github.com/CycloneDX/cyclonedx-node-npm/issues/1300\n}\n\n/**\n *\n * Not implemented, yet.\n * TODO: write type guard -- pull-requests welcome\n *\n * @alpha\n */\nexport function isNodePackageJson (value: any): value is NodePackageJson {\n throw new Error('Not implemented')\n /* possible implementation:\n try { assertNodePackageJson(value) }\n catch { return false }\n return true\n */\n}\n\n/**\n *\n * Not implemented, yet.\n * TODO: write type assertion -- pull-requests welcome\n *\n * @throws {@link Error} on error; includes qualitative message\n *\n * @alpha\n */\nexport function assertNodePackageJson (value: any): asserts value is NodePackageJson {\n throw new Error('Not implemented')\n /* possible implementation:\n if ( value === null || value === undefined ) { throw new Error('value not an object') }\n if ( !(typeof value.name in ['undefined', 'string']) ) { throw new Error('unexpected name') }\n etc...\n */\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Generate valid random SerialNumbers for {@link Models.Bom.serialNumber | Models.Bom.serialNumber}.\n */\nexport function randomSerialNumber (): string {\n const b = [\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n // UUID version 4\n Math.round(Math.random() * 0x0FFF) | 0x4000,\n // UUID version 4 variant 1\n Math.round(Math.random() * 0x3FFF) | 0x8000,\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF)\n ].map(n => n.toString(16).padStart(4, '0'))\n return `urn:uuid:${b[0]}${b[1]}-${b[2]}-${b[3]}-${b[4]}-${b[5]}${b[6]}${b[7]}`\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as BomUtility from './bomUtility'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// ... nothing yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OptPlugError } from '../_optPlug.node/errors'\nimport type { Version } from '../spec'\n\nexport class NotImplementedError extends Error {\n constructor (version: Version) {\n super(`not implemented for CycloneDX version: ${version}`)\n }\n}\n\nexport class MissingOptionalDependencyError extends OptPlugError {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './errors'\n/* eslint-disable-next-line @typescript-eslint/consistent-type-exports -- backwards-compat TS4 */\nexport * as Types from './types'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// there is no JSON validator for the web, yet\n// there is no XML validator for the web, yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Details and information describing a validation error.\n */\nexport type ValidationError = NonNullable<any>\n\nexport interface Validator {\n /**\n * Promise completes with one of the following:\n * - `null`, when data was valid\n * - {@link ValidationError | something} representing the error details, when data was invalid\n *\n * Promise rejects with one of the following:\n * - {@link Validation.NotImplementedError | NotImplementedError}, when there is no validator available\n * - {@link Validation.MissingOptionalDependencyError | MissingOptionalDependencyError}, when a required dependency was not installed\n * - {@link Error}\n */\n validate: (data: string) => Promise<null | ValidationError>\n}\n","module.exports = require(\"packageurl-js\");","module.exports = require(\"spdx-expression-parse\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.web.ts\");\n",""],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"lib.dev.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;ACVA;;;;;;;;;;;;;;;;;EAiBE;;AAEF,wBAMC;AAND,QAAgB,CAAC,CAAC,MAAM,CAAK,GAAG,SAA6B;IAC3D,KAAK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A,kD;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://CycloneDX_library/webpack/universalModuleDefinition","webpack://CycloneDX_library/./src/_helpers/iterable.ts","webpack://CycloneDX_library/./src/_helpers/notUndefined.ts","webpack://CycloneDX_library/./src/_helpers/sortable.ts","webpack://CycloneDX_library/./src/_helpers/tree.ts","webpack://CycloneDX_library/./src/_helpers/uri.ts","webpack://CycloneDX_library/./src/_optPlug.node/errors.ts","webpack://CycloneDX_library/./src/enums/attachmentEncoding.ts","webpack://CycloneDX_library/./src/enums/componentScope.ts","webpack://CycloneDX_library/./src/enums/componentType.ts","webpack://CycloneDX_library/./src/enums/externalReferenceType.ts","webpack://CycloneDX_library/./src/enums/hashAlogorithm.ts","webpack://CycloneDX_library/./src/enums/index.ts","webpack://CycloneDX_library/./src/enums/licenseAcknowledgement.ts","webpack://CycloneDX_library/./src/enums/lifecyclePhase.ts","webpack://CycloneDX_library/./src/enums/vulnerability/affectStatus.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisJustification.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisResponse.ts","webpack://CycloneDX_library/./src/enums/vulnerability/analysisState.ts","webpack://CycloneDX_library/./src/enums/vulnerability/index.ts","webpack://CycloneDX_library/./src/enums/vulnerability/ratingMethod.ts","webpack://CycloneDX_library/./src/enums/vulnerability/severity.ts","webpack://CycloneDX_library/./src/factories/index.common.ts","webpack://CycloneDX_library/./src/factories/index.web.ts","webpack://CycloneDX_library/./src/factories/license.ts","webpack://CycloneDX_library/./src/factories/packageUrl.ts","webpack://CycloneDX_library/./src/index.common.ts","webpack://CycloneDX_library/./src/index.web.ts","webpack://CycloneDX_library/./src/models/attachment.ts","webpack://CycloneDX_library/./src/models/bom.ts","webpack://CycloneDX_library/./src/models/bomLink.ts","webpack://CycloneDX_library/./src/models/bomRef.ts","webpack://CycloneDX_library/./src/models/component.ts","webpack://CycloneDX_library/./src/models/copyright.ts","webpack://CycloneDX_library/./src/models/externalReference.ts","webpack://CycloneDX_library/./src/models/hash.ts","webpack://CycloneDX_library/./src/models/index.ts","webpack://CycloneDX_library/./src/models/license.ts","webpack://CycloneDX_library/./src/models/lifecycle.ts","webpack://CycloneDX_library/./src/models/metadata.ts","webpack://CycloneDX_library/./src/models/organizationalContact.ts","webpack://CycloneDX_library/./src/models/organizationalEntity.ts","webpack://CycloneDX_library/./src/models/property.ts","webpack://CycloneDX_library/./src/models/service.ts","webpack://CycloneDX_library/./src/models/swid.ts","webpack://CycloneDX_library/./src/models/tool.ts","webpack://CycloneDX_library/./src/models/vulnerability/advisory.ts","webpack://CycloneDX_library/./src/models/vulnerability/affect.ts","webpack://CycloneDX_library/./src/models/vulnerability/analysis.ts","webpack://CycloneDX_library/./src/models/vulnerability/credits.ts","webpack://CycloneDX_library/./src/models/vulnerability/index.ts","webpack://CycloneDX_library/./src/models/vulnerability/rating.ts","webpack://CycloneDX_library/./src/models/vulnerability/reference.ts","webpack://CycloneDX_library/./src/models/vulnerability/source.ts","webpack://CycloneDX_library/./src/models/vulnerability/vulnerability.ts","webpack://CycloneDX_library/./src/serialize/baseSerializer.ts","webpack://CycloneDX_library/./src/serialize/bomRefDiscriminator.ts","webpack://CycloneDX_library/./src/serialize/errors.ts","webpack://CycloneDX_library/./src/serialize/index.common.ts","webpack://CycloneDX_library/./src/serialize/index.web.ts","webpack://CycloneDX_library/./src/serialize/json/index.ts","webpack://CycloneDX_library/./src/serialize/json/normalize.ts","webpack://CycloneDX_library/./src/serialize/json/types.ts","webpack://CycloneDX_library/./src/serialize/jsonSerializer.ts","webpack://CycloneDX_library/./src/serialize/types.ts","webpack://CycloneDX_library/./src/serialize/xml/_xsd.ts","webpack://CycloneDX_library/./src/serialize/xml/index.ts","webpack://CycloneDX_library/./src/serialize/xml/normalize.ts","webpack://CycloneDX_library/./src/serialize/xml/types.ts","webpack://CycloneDX_library/./src/serialize/xmlBaseSerializer.ts","webpack://CycloneDX_library/./src/serialize/xmlSerializer.web.ts","webpack://CycloneDX_library/./src/spdx.ts","webpack://CycloneDX_library/./src/spec/_protocol.ts","webpack://CycloneDX_library/./src/spec/consts.ts","webpack://CycloneDX_library/./src/spec/enums.ts","webpack://CycloneDX_library/./src/spec/errors.ts","webpack://CycloneDX_library/./src/spec/index.ts","webpack://CycloneDX_library/./src/types/cpe.ts","webpack://CycloneDX_library/./src/types/cwe.ts","webpack://CycloneDX_library/./src/types/index.ts","webpack://CycloneDX_library/./src/types/integer.ts","webpack://CycloneDX_library/./src/types/mimeType.ts","webpack://CycloneDX_library/./src/types/nodePackageJson.ts","webpack://CycloneDX_library/./src/utils/bomUtility.ts","webpack://CycloneDX_library/./src/utils/index.common.ts","webpack://CycloneDX_library/./src/utils/index.web.ts","webpack://CycloneDX_library/./src/validation/errors.ts","webpack://CycloneDX_library/./src/validation/index.common.ts","webpack://CycloneDX_library/./src/validation/index.web.ts","webpack://CycloneDX_library/./src/validation/types.ts","webpack://CycloneDX_library/external commonjs \"packageurl-js\"","webpack://CycloneDX_library/external commonjs \"spdx-expression-parse\"","webpack://CycloneDX_library/webpack/bootstrap","webpack://CycloneDX_library/webpack/before-startup","webpack://CycloneDX_library/webpack/startup","webpack://CycloneDX_library/webpack/after-startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CycloneDX_library\"] = factory();\n\telse\n\t\troot[\"CycloneDX_library\"] = factory();\n})(self, () => {\nreturn ","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport function * chainI<T> (...iterables: Array<Iterable<T>>): Generator<T> {\n for (const iterable of iterables) {\n for (const item of iterable) {\n yield item\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport type NotUndefined<T> = T extends undefined ? never : T\n\nexport function isNotUndefined<T> (value: T | undefined): value is NotUndefined<T> {\n return value !== undefined\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Stringable } from './stringable'\n\nexport interface Sortable<TItem> {\n sorted: () => TItem[]\n}\n\nexport interface Comparable<TOther> {\n /**\n * Compare one object with another.\n *\n * The purpose of this method is not to test for equality, but have deterministic comparability.\n * As long as this method is deterministic, there is no need for a proper ordering in any result/downstream.\n */\n compare: (other: TOther) => number\n}\n\nexport const compareObjectsSymbol = Symbol('internal compare function')\n\nexport type SortableIterable<TItem> = Iterable<TItem> & Sortable<TItem>\n\nexport abstract class SortableSet<TItem> extends Set<TItem> implements SortableIterable<TItem>, Comparable<Sortable<TItem>> {\n /**\n * Comparator function to apply to two items.\n */\n protected abstract [compareObjectsSymbol] (a: TItem, b: TItem): number\n\n /**\n * Get a sorted array of all items in the collection..\n */\n sorted (): TItem[] {\n return Array.from(this).sort(this[compareObjectsSymbol])\n }\n\n /**\n * Comparator function to apply to two objects of the collection..\n */\n compare (other: Sortable<TItem>): number {\n const sortedOther = other.sorted()\n const sortedSelf = this.sorted()\n\n if (sortedSelf.length !== sortedOther.length) {\n return sortedSelf.length - sortedOther.length\n }\n\n // it was asserted, that both lists have equal length -> zip-like compare\n /* eslint-disable-next-line no-plusplus -- ack */\n for (let i = sortedSelf.length - 1; i >= 0; --i) {\n const iCompared = this[compareObjectsSymbol](sortedSelf[i], sortedOther[i])\n if (iCompared !== 0) {\n return iCompared\n }\n }\n\n return 0\n }\n}\n\nexport class SortableComparables<TItem extends Comparable<any>> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n if (a.constructor === b.constructor) {\n return a.compare(b)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n}\n\nexport class SortableStringables<TItem extends Stringable = Stringable> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n return a.toString().localeCompare(b.toString())\n }\n}\n\nexport class SortableNumbers<TItem extends number = number> extends SortableSet<TItem> {\n protected [compareObjectsSymbol] (a: TItem, b: TItem): number {\n return a - b\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport const treeIteratorSymbol = Symbol('iterator of a tree/nesting-like structure')\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nconst _ESCAPES: Array<[RegExp, string]> = [\n [/ /g, '%20'],\n [/\"/g, '%22'],\n [/'/g, '%27'],\n [/\\[/g, '%5B'],\n [/]/g, '%5D'],\n [/</g, '%3C'],\n [/>/g, '%3E'],\n [/\\{/g, '%7B'],\n [/}/g, '%7D'],\n]\n\n/**\n * Make a string valid to\n * - XML::anyURI spec.\n * - JSON::iri-reference spec.\n *\n * BEST EFFORT IMPLEMENTATION\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI}\n * @see {@link http://www.datypic.com/sc/xsd/t-xsd_anyURI.html}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc2396}\n * @see {@link https://datatracker.ietf.org/doc/html/rfc3987}\n */\nexport function escapeUri<T extends (string | undefined)> (value: T): T {\n if (value === undefined) {\n return value\n }\n for (const [s, r] of _ESCAPES) {\n /* @ts-expect-error -- TS does not properly detect that value is to be forced as string, here */\n value = value.replace(s, r) /* eslint-disable-line no-param-reassign -- ack */\n }\n return value\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport class OptPlugError extends Error {\n override readonly cause: any | undefined\n\n constructor (message: string, cause?: any) {\n super(message)\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- intended */\n this.cause = cause\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AttachmentEncoding {\n Base64 = 'base64',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ComponentScope {\n Required = 'required',\n Optional = 'optional',\n Excluded = 'excluded',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ComponentType {\n Application = 'application',\n Framework = 'framework',\n Library = 'library',\n Container = 'container',\n Platform = 'platform',\n OperatingSystem = 'operating-system',\n Device = 'device',\n DeviceDriver = 'device-driver',\n Firmware = 'firmware',\n File = 'file',\n MachineLearningModel = 'machine-learning-model',\n Data = 'data',\n CryptographicAsset = 'cryptographic-asset',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum ExternalReferenceType {\n VCS = 'vcs',\n IssueTracker = 'issue-tracker',\n Website = 'website',\n Advisories = 'advisories',\n BOM = 'bom',\n MailingList = 'mailing-list',\n Social = 'social',\n Chat = 'chat',\n Documentation = 'documentation',\n Support = 'support',\n SourceDistribution = 'source-distribution',\n Distribution = 'distribution',\n DistributionIntake = 'distribution-intake',\n License = 'license',\n BuildMeta = 'build-meta',\n BuildSystem = 'build-system',\n ReleaseNotes = 'release-notes',\n SecurityContact = 'security-contact',\n ModelCard = 'model-card',\n Log = 'log',\n Configuration = 'configuration',\n Evidence = 'evidence',\n Formulation = 'formulation',\n Attestation = 'attestation',\n ThreatModel = 'threat-model',\n AdversaryModel = 'adversary-model',\n RiskAssessment = 'risk-assessment',\n VulnerabilityAssertion = 'vulnerability-assertion',\n ExploitabilityStatement = 'exploitability-statement',\n PentestReport = 'pentest-report',\n StaticAnalysisReport = 'static-analysis-report',\n DynamicAnalysisReport = 'dynamic-analysis-report',\n RuntimeAnalysisReport = 'runtime-analysis-report',\n ComponentAnalysisReport = 'component-analysis-report',\n MaturityReport = 'maturity-report',\n CertificationReport = 'certification-report',\n CodifiedInfrastructure = 'codified-infrastructure',\n QualityMetrics = 'quality-metrics',\n POAM = 'poam',\n ElectronicSignature = 'electronic-signature',\n DigitalSignature = 'digital-signature',\n RFC9116 = 'rfc-9116',\n Citation = 'citation',\n Patent = 'patent',\n PatentAssertion = 'patent-assertion',\n PatentFamily = 'patent-family',\n\n // --\n\n Other = 'other',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum HashAlgorithm {\n MD5 = 'MD5',\n 'SHA-1' = 'SHA-1',\n 'SHA-256' = 'SHA-256',\n 'SHA-384' = 'SHA-384',\n 'SHA-512' = 'SHA-512',\n 'SHA3-256' = 'SHA3-256',\n 'SHA3-384' = 'SHA3-384',\n 'SHA3-512' = 'SHA3-512',\n 'BLAKE2b-256' = 'BLAKE2b-256',\n 'BLAKE2b-384' = 'BLAKE2b-384',\n 'BLAKE2b-512' = 'BLAKE2b-512',\n BLAKE3 = 'BLAKE3',\n 'Streebog-256' = 'Streebog-256',\n 'Streebog-512' = 'Streebog-512',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './attachmentEncoding'\nexport * from './componentScope'\nexport * from './componentType'\nexport * from './externalReferenceType'\nexport * from './hashAlogorithm'\nexport * from './licenseAcknowledgement'\nexport * from './lifecyclePhase'\nexport * as Vulnerability from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum LicenseAcknowledgement {\n Declared = 'declared',\n Concluded = 'concluded',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum LifecyclePhase {\n Design = 'design',\n PreBuild = 'pre-build',\n Build = 'build',\n PostBuild = 'post-build',\n Operations = 'operations',\n Discovery = 'discovery',\n Decommission = 'decommission',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AffectStatus {\n Affected = 'affected',\n Unaffected = 'unaffected',\n Unknown = 'unknown',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AnalysisJustification {\n CodeNotPresent = 'code_not_present',\n CodeNotReachable = 'code_not_reachable',\n RequiresConfiguration = 'requires_configuration',\n RequiresDependency = 'requires_dependency',\n RequiresEnvironment = 'requires_environment',\n ProtectedByCompiler = 'protected_by_compiler',\n ProtectedAtRuntime = 'protected_at_runtime',\n ProtectedAtPerimeter = 'protected_at_perimeter',\n ProtectedByMitigatingControl = 'protected_by_mitigating_control',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableStringables } from '../../_helpers/sortable'\n\nexport enum AnalysisResponse {\n CanNotFix = 'can_not_fix',\n WillNotFix = 'will_not_fix',\n Update = 'update',\n Rollback = 'rollback',\n WorkaroundAvailable = 'workaround_available',\n}\n\nexport class AnalysisResponseRepository extends SortableStringables<AnalysisResponse> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum AnalysisState {\n Resolved = 'resolved',\n ResolvedWithPedigree = 'resolved_with_pedigree',\n Exploitable = 'exploitable',\n InTriage = 'in_triage',\n FalsePositive = 'false_positive',\n NotAffected = 'not_affected',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './affectStatus'\nexport * from './analysisJustification'\nexport * from './analysisResponse'\nexport * from './analysisState'\nexport * from './ratingMethod'\nexport * from './severity'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Specifies the severity or risk scoring methodology or standard used.\n */\nexport enum RatingMethod {\n /** CVSSv2 - [Common Vulnerability Scoring System v2](https://www.first.org/cvss/v2/) */\n CVSSv2 = 'CVSSv2',\n /** CVSSv3 - [Common Vulnerability Scoring System v3](https://www.first.org/cvss/v3-0/) */\n CVSSv3 = 'CVSSv3',\n /** CVSSv31 - [Common Vulnerability Scoring System v3.1](https://www.first.org/cvss/v3-1/) */\n CVSSv31 = 'CVSSv31',\n /** CVSSv4 - [Common Vulnerability Scoring System v4](https://www.first.org/cvss/v4-0/) */\n CVSSv4 = 'CVSSv4',\n /** OWASP - [OWASP Risk Rating Methodology](https://owasp.org/www-community/OWASP_Risk_Rating_Methodology) */\n OWASP = 'OWASP',\n /** SSVC - [Stakeholder Specific Vulnerability Categorization](https://github.com/CERTCC/SSVC) (all versions) */\n SSVC = 'SSVC',\n\n // --\n\n /** any other */\n Other = 'other',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Textual representation of the severity of the vulnerability adopted by the analysis method.\n * If the analysis method uses values other than what is provided, the user is expected to translate appropriately.\n */\nexport enum Severity {\n Critical = 'critical',\n High = 'high',\n Medium = 'medium',\n Low = 'low',\n Info = 'info',\n None = 'none',\n Unknown = 'unknown',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// not everything is public, yet\n\nexport * from './license'\nexport * from './packageUrl'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// ... nothing yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { DisjunctiveLicense, License } from '../models/license'\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../models/license'\nimport { fixupSpdxId, isValidSpdxLicenseExpression } from '../spdx'\n\nexport class LicenseFactory {\n makeFromString (value: string): License {\n try {\n return this.makeSpdxLicense(value)\n } catch {\n /* pass */\n }\n\n try {\n return this.makeExpression(value)\n } catch {\n /* pass */\n }\n\n return this.makeNamedLicense(value)\n }\n\n /**\n * @throws {@link RangeError} if expression is not eligible\n */\n makeExpression (value: string | any): LicenseExpression {\n const expression = String(value)\n if (isValidSpdxLicenseExpression(expression)) {\n return new LicenseExpression(expression)\n }\n throw new RangeError('Invalid SPDX license expression')\n }\n\n makeDisjunctive (value: string): DisjunctiveLicense {\n try {\n return this.makeSpdxLicense(value)\n } catch {\n return this.makeNamedLicense(value)\n }\n }\n\n /**\n * @throws {@link RangeError} if value is not supported SPDX id\n */\n makeSpdxLicense (value: string | any): SpdxLicense {\n const fixed = fixupSpdxId(String(value))\n if (undefined === fixed) {\n throw new RangeError('Unsupported SPDX license ID')\n }\n\n return new SpdxLicense(fixed)\n }\n\n makeNamedLicense (value: string | any): NamedLicense {\n return new NamedLicense(String(value))\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { PackageURL, PurlQualifierNames } from 'packageurl-js'\n\nimport { ExternalReferenceType } from '../enums/externalReferenceType'\nimport type { Component } from '../models/component'\n\nexport class PackageUrlFactory<PurlType extends PackageURL['type'] = PackageURL['type']> {\n readonly #type: PurlType\n\n constructor (type: PurlType) {\n this.#type = type\n }\n\n get type (): PurlType {\n return this.#type\n }\n\n /* eslint-disable-next-line @typescript-eslint/no-inferrable-types -- docs */\n makeFromComponent (component: Component, sort: boolean = false): PackageURL | undefined {\n const qualifiers: PackageURL['qualifiers'] = {}\n /* @ts-expect-error TS2322 */\n qualifiers.__proto__ = null /* eslint-disable-line no-proto -- intended */\n let subpath: PackageURL['subpath'] = undefined\n\n // sorting to allow reproducibility: use the last instance for a `extRef.type`, if multiples exist\n const extRefs = sort\n ? component.externalReferences.sorted()\n : component.externalReferences\n for (const extRef of extRefs) {\n const url = extRef.url.toString()\n if (url.length <= 0) {\n continue\n }\n // No further need for validation.\n // According to https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst\n // there is no formal requirement to a `..._url`.\n // Everything is possible: URL-encoded, not encoded, with schema, without schema\n /* eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- intended */\n switch (extRef.type) {\n case ExternalReferenceType.VCS:\n [qualifiers[PurlQualifierNames.VcsUrl], subpath] = url.split('#', 2)\n break\n case ExternalReferenceType.Distribution:\n qualifiers[PurlQualifierNames.DownloadUrl] = url\n break\n }\n }\n\n const hashes = component.hashes\n if (hashes.size > 0) {\n qualifiers[PurlQualifierNames.Checksum] = Array.from(\n sort\n ? hashes.sorted()\n : hashes,\n ([hashAlgo, hashCont]) => `${hashAlgo.toLowerCase()}:${hashCont.toLowerCase()}`\n ).join(',')\n }\n\n try {\n // Do not beautify the parameters here, because that is in the domain of PackageURL and its representation.\n // No need to convert an empty \"subpath\" string to `undefined` and such.\n return new PackageURL(\n this.#type,\n component.group,\n component.name,\n component.version,\n qualifiers,\n subpath\n )\n } catch {\n return undefined\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Enums from './enums'\nexport * as Models from './models'\nexport * as SPDX from './spdx'\nexport * as Spec from './spec'\nexport * as Types from './types'\n// do not export the _helpers, they are for internal use only\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\nexport * as Factories from './factories/index.web'\nexport * as Serialize from './serialize/index.web'\nexport * as Utils from './utils/index.web'\nexport * as Validation from './validation/index.web'\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Stringable } from '../_helpers/stringable'\nimport type { AttachmentEncoding } from '../enums/attachmentEncoding'\n\nexport interface OptionalAttachmentProperties {\n contentType?: Attachment['contentType']\n encoding?: Attachment['encoding']\n}\n\nexport type AttachmentContent = Stringable\n\nexport class Attachment {\n contentType?: string\n content: AttachmentContent\n encoding?: AttachmentEncoding\n\n constructor (content: Attachment['content'], op: OptionalAttachmentProperties = {}) {\n this.contentType = op.contentType\n this.content = content\n this.encoding = op.encoding\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { PositiveInteger } from '../types/integer'\nimport { isPositiveInteger } from '../types/integer'\nimport { ComponentRepository } from './component'\nimport { Metadata } from './metadata'\nimport { ServiceRepository } from './service'\nimport { VulnerabilityRepository } from './vulnerability/vulnerability'\n\nexport interface OptionalBomProperties {\n metadata?: Bom['metadata']\n components?: Bom['components']\n services?: Bom['services']\n version?: Bom['version']\n vulnerabilities?: Bom['vulnerabilities']\n serialNumber?: Bom['serialNumber']\n}\n\nexport class Bom {\n metadata: Metadata\n components: ComponentRepository\n services: ServiceRepository\n vulnerabilities: VulnerabilityRepository\n\n /** @see {@link version} */\n #version: PositiveInteger = 1\n\n /** @see {@link serialNumber} */\n #serialNumber?: string\n\n // Property `bomFormat` is not part of model, it is runtime information.\n // Property `specVersion` is not part of model, it is runtime information.\n\n // Property `dependencies` is not part of this model, but part of `Component` and other models.\n // The dependency graph can be normalized on render-time, no need to store it in the bom model.\n\n /**\n * @throws {@link TypeError} if `op.version` is neither {@link PositiveInteger} nor `undefined`\n */\n constructor (op: OptionalBomProperties = {}) {\n this.metadata = op.metadata ?? new Metadata()\n this.components = op.components ?? new ComponentRepository()\n this.services= op.services?? new ServiceRepository()\n this.version = op.version ?? this.version\n this.vulnerabilities = op.vulnerabilities ?? new VulnerabilityRepository()\n this.serialNumber = op.serialNumber\n }\n\n get version (): PositiveInteger {\n return this.#version\n }\n\n /**\n * @throws {@link TypeError} if value is not {@link PositiveInteger}\n */\n set version (value: PositiveInteger) {\n if (!isPositiveInteger(value)) {\n throw new TypeError('Not PositiveInteger')\n }\n this.#version = value\n }\n\n get serialNumber (): string | undefined {\n return this.#serialNumber\n }\n\n set serialNumber (value: string | undefined) {\n this.#serialNumber = value === ''\n ? undefined\n : value\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\nabstract class BomLinkBase implements Stringable, Comparable<Stringable> {\n /* @ts-expect-error TS2564 */\n #value: string\n\n /** @internal */\n protected abstract _isValid (value: any): boolean\n\n /**\n * @throws {@link RangeError} if value is invalid\n */\n constructor (value: string) {\n this.value = value\n }\n\n get value (): string {\n return this.#value\n }\n\n /**\n * @throws {@link RangeError} if value is invalid\n */\n set value (value: string) {\n if (!this._isValid(value)) {\n throw new RangeError('invalid value')\n }\n this.#value = value\n }\n\n compare (other: Stringable): number {\n return this.toString().localeCompare(other.toString())\n }\n\n toString (): string {\n return this.value\n }\n}\n\n/**\n * Descriptor for another BOM document.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport class BomLinkDocument extends BomLinkBase {\n /* regular expressions were taken from the CycloneDX schema definitions. */\n static readonly #pattern = /^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[1-9][0-9]*$/\n\n /**\n * Whether the `value` is a valid descriptor for another BOM document.\n */\n static isValid (value: any): boolean {\n return typeof value === 'string' &&\n this.#pattern.test(value)\n }\n\n /** @internal */\n protected _isValid (value: any): boolean {\n return BomLinkDocument.isValid(value)\n }\n}\n\n/**\n * Descriptor for an element in a BOM document.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport class BomLinkElement extends BomLinkBase {\n /* regular expressions were taken from the CycloneDX schema definitions. */\n static readonly #pattern = /^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\/[1-9][0-9]*#.+$/\n\n /**\n * Whether the `value` is a valid descriptor for an element in a BOM document.\n */\n static isValid (value: any): boolean {\n return typeof value === 'string' &&\n this.#pattern.test(value)\n }\n\n /** @internal */\n protected _isValid (value: any): boolean {\n return BomLinkElement.isValid(value)\n }\n}\n\n/**\n * Either {@link BomLinkDocument} or {@link BomLinkElement}.\n *\n * See [the docs](https://cyclonedx.org/capabilities/bomlink/)\n */\nexport type BomLink = BomLinkDocument | BomLinkElement\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\n/**\n * Proxy for the BomRef.\n * This way a `BomRef` gets unique by the in-memory-address of the object.\n */\nexport class BomRef implements Stringable, Comparable<Stringable> {\n value?: string\n\n constructor (value?: BomRef['value']) {\n this.value = value\n }\n\n compare (other: Stringable): number {\n return this.toString().localeCompare(other.toString())\n }\n\n toString (): string {\n return this.value ?? ''\n }\n}\n\nexport class BomRefRepository extends Set<BomRef> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { PackageURL } from 'packageurl-js'\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport { treeIteratorSymbol } from '../_helpers/tree'\nimport type { ComponentScope, ComponentType } from '../enums'\nimport type { CPE } from '../types/cpe'\nimport { isCPE } from '../types/cpe'\nimport { BomRef, BomRefRepository } from './bomRef'\nimport type { Copyright } from './copyright'\nimport { CopyrightRepository} from './copyright'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { HashDictionary } from './hash'\nimport { LicenseRepository } from './license'\nimport type { OrganizationalEntity } from './organizationalEntity'\nimport { PropertyRepository } from './property'\nimport type { SWID } from './swid'\n\nexport interface OptionalComponentProperties {\n bomRef?: BomRef['value']\n author?: Component['author']\n copyright?: Component['copyright']\n description?: Component['description']\n externalReferences?: Component['externalReferences']\n group?: Component['group']\n hashes?: Component['hashes']\n licenses?: Component['licenses']\n publisher?: Component['publisher']\n purl?: Component['purl']\n scope?: Component['scope']\n supplier?: Component['supplier']\n swid?: Component['swid']\n version?: Component['version']\n components?: Component['components']\n cpe?: Component['cpe']\n properties?: Component['properties']\n evidence?: Component['evidence']\n\n dependencies?: Component['dependencies']\n}\n\nexport class Component implements Comparable<Component> {\n type: ComponentType\n name: string\n author?: string\n copyright?: Copyright\n description?: string\n externalReferences: ExternalReferenceRepository\n group?: string\n hashes: HashDictionary\n licenses: LicenseRepository\n publisher?: string\n purl?: PackageURL\n scope?: ComponentScope\n supplier?: OrganizationalEntity\n swid?: SWID\n version?: string\n components: ComponentRepository\n properties: PropertyRepository\n evidence?: ComponentEvidence\n\n /** @see {@link bomRef} */\n readonly #bomRef: BomRef\n\n /** @see {@link cpe} */\n #cpe?: CPE\n\n dependencies: BomRefRepository\n\n /**\n * @throws {@link TypeError} if `op.cpe` is neither {@link CPE} nor `undefined`\n */\n constructor (type: Component['type'], name: Component['name'], op: OptionalComponentProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.type = type\n this.name = name\n this.supplier = op.supplier\n this.author = op.author\n this.copyright = op.copyright\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n this.group = op.group\n this.hashes = op.hashes ?? new HashDictionary()\n this.licenses = op.licenses ?? new LicenseRepository()\n this.publisher = op.publisher\n this.purl = op.purl\n this.scope = op.scope\n this.swid = op.swid\n this.version = op.version\n this.description = op.description\n this.components = op.components ?? new ComponentRepository()\n this.cpe = op.cpe\n this.properties = op.properties ?? new PropertyRepository()\n this.evidence = op.evidence\n\n this.dependencies = op.dependencies ?? new BomRefRepository()\n }\n\n get bomRef (): BomRef {\n return this.#bomRef\n }\n\n get cpe (): CPE | undefined {\n return this.#cpe\n }\n\n /**\n * @throws {@link TypeError} if value is neither {@link CPE} nor `undefined`\n */\n set cpe (value: CPE | undefined) {\n if (value !== undefined && !isCPE(value)) {\n throw new TypeError('Not CPE nor undefined')\n }\n this.#cpe = value\n }\n\n compare (other: Component): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n if (this.purl !== undefined && other.purl !== undefined) {\n return this.purl.toString().localeCompare(other.purl.toString())\n }\n if (this.#cpe !== undefined && other.#cpe !== undefined) {\n return this.#cpe.localeCompare(other.#cpe)\n }\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.group ?? '').localeCompare(other.group ?? '') ||\n this.name.localeCompare(other.name) ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class ComponentRepository extends SortableComparables<Component> {\n * [treeIteratorSymbol] (): Generator<Component> {\n for (const component of this) {\n yield component\n yield * component.components[treeIteratorSymbol]()\n }\n }\n}\n\nexport interface OptionalComponentEvidenceProperties {\n licenses?: ComponentEvidence['licenses']\n copyright?: ComponentEvidence['copyright']\n}\n\nexport class ComponentEvidence {\n licenses: LicenseRepository\n copyright: CopyrightRepository\n\n constructor (op: OptionalComponentEvidenceProperties = {}) {\n this.licenses = op.licenses ?? new LicenseRepository()\n this.copyright = op.copyright ?? new CopyrightRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableStringables } from '../_helpers/sortable'\nimport type { Stringable } from '../_helpers/stringable'\n\nexport type Copyright = Stringable\n\n/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments -- for docs reasons */\nexport class CopyrightRepository extends SortableStringables<Copyright> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport type { ExternalReferenceType } from '../enums/externalReferenceType'\nimport type { BomLink } from './bomLink'\nimport { HashDictionary } from './hash'\n\n\nexport interface OptionalExternalReferenceProperties {\n hashes?: ExternalReference['hashes']\n comment?: ExternalReference['comment']\n}\n\nexport class ExternalReference implements Comparable<ExternalReference> {\n url: URL | BomLink | string\n type: ExternalReferenceType\n hashes: HashDictionary\n comment?: string\n\n constructor (url: ExternalReference['url'], type: ExternalReference['type'], op: OptionalExternalReferenceProperties = {}) {\n this.url = url\n this.type = type\n this.hashes = op.hashes ?? new HashDictionary()\n this.comment = op.comment\n }\n\n compare (other: ExternalReference): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.type.localeCompare(other.type) ||\n this.url.toString().localeCompare(other.url.toString())\n }\n}\n\nexport class ExternalReferenceRepository extends SortableComparables<ExternalReference> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Sortable } from '../_helpers/sortable'\nimport type { HashAlgorithm } from '../enums/hashAlogorithm'\n\n// no regex for the HashContent in here. It applies at runtime of a normalization/serialization process.\nexport type HashContent = string\n\nexport type Hash = readonly [\n // order matters: it must reflect [key, value] of HashDictionary -\n // this way a HashDictionary can be constructed from multiple Hash objects.\n /* algorithm: */ HashAlgorithm,\n /* content: */ HashContent,\n // cannot use named tuple syntax ala `[a: T1, b: T2]` as it causes errors when downstream-projects compile with older versions of TypeScript\n]\n\nexport class HashDictionary extends Map<Hash[0], Hash[1]> implements Sortable<Hash> {\n static #compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return a1.localeCompare(a2) ||\n c1.localeCompare(c2)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n sorted (): Hash[] {\n return Array.from(this.entries()).sort(HashDictionary.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './attachment'\nexport * from './bom'\nexport * from './bomLink'\nexport * from './bomRef'\nexport * from './component'\nexport * from './copyright'\nexport * from './externalReference'\nexport * from './hash'\nexport * from './license'\nexport * from './lifecycle'\nexport * from './metadata'\nexport * from './organizationalContact'\nexport * from './organizationalEntity'\nexport * from './property'\nexport * from './service'\nexport * from './swid'\nexport * from './tool'\nexport * as Vulnerability from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Sortable } from '../_helpers/sortable'\nimport type { LicenseAcknowledgement } from '../enums/licenseAcknowledgement'\nimport type { SpdxId } from '../spdx'\nimport type { Attachment } from './attachment'\n\n/**\n * (SPDX) License Expression.\n *\n * No validation is done internally.\n * You may validate with {@link SPDX.isValidSpdxLicenseExpression | SPDX.isValidSpdxLicenseExpression()}.\n * You may assert valid objects with {@link Factories.LicenseFactory.makeExpression | Factories.LicenseFactory.makeExpression()}.\n */\nexport class LicenseExpression {\n /** @see {@link expression} */\n #expression!: string\n acknowledgement?: LicenseAcknowledgement\n\n /**\n * @throws {@link RangeError} if `expression` is empty string\n */\n constructor (expression: LicenseExpression['expression']) {\n this.expression = expression\n }\n\n get expression (): string {\n return this.#expression\n }\n\n /**\n * @throws {@link RangeError} if `value` is empty string\n */\n set expression (value: string) {\n if (value === '') {\n throw new RangeError('value is empty string')\n }\n this.#expression = value\n }\n\n compare (other: LicenseExpression): number {\n return this.#expression.localeCompare(other.#expression)\n }\n}\n\nclass DisjunctiveLicenseBase {\n acknowledgement?: LicenseAcknowledgement\n text?: Attachment\n #url?: URL | string\n\n constructor (op: OptionalDisjunctiveLicenseProperties = {}) {\n this.acknowledgement = op.acknowledgement\n this.text = op.text\n this.url = op.url\n }\n\n get url (): URL | string | undefined {\n return this.#url\n }\n\n set url (value: URL | string | undefined) {\n this.#url = value === ''\n ? undefined\n : value\n }\n}\n\ninterface OptionalDisjunctiveLicenseProperties {\n acknowledgement?: DisjunctiveLicenseBase['acknowledgement']\n text?: DisjunctiveLicenseBase['text']\n url?: DisjunctiveLicenseBase['url']\n}\n\nexport interface OptionalNamedLicenseProperties extends OptionalDisjunctiveLicenseProperties {}\n\nexport class NamedLicense extends DisjunctiveLicenseBase {\n name: string\n\n constructor (name: string, op: OptionalNamedLicenseProperties = {}) {\n super(op)\n this.name = name\n }\n\n compare (other: NamedLicense): number {\n return this.name.localeCompare(other.name)\n }\n}\n\nexport interface OptionalSpdxLicenseProperties extends OptionalDisjunctiveLicenseProperties {}\n\n/**\n * Disjunctive license with (SPDX-)ID - aka SpdxLicense.\n *\n * No validation is done internally.\n * You may validate with {@link SPDX.isSupportedSpdxId | SPDX.isSupportedSpdxId()}.\n * You may assert valid objects with {@link Factories.LicenseFactory.makeSpdxLicense | Factories.LicenseFactory.makeSpdxLicense()}.\n */\nexport class SpdxLicense extends DisjunctiveLicenseBase {\n /** @see {@link id} */\n #id!: SpdxId\n\n /**\n * @throws {@link RangeError} if `id` is empy string\n */\n constructor (id: SpdxId, op: OptionalSpdxLicenseProperties = {}) {\n super(op)\n this.id = id\n }\n\n get id (): SpdxId {\n return this.#id\n }\n\n /**\n * @throws {@link RangeError} if `value` is empy string\n */\n set id (value: SpdxId) {\n if (value === '') {\n throw new RangeError('value is empty string')\n }\n this.#id = value\n }\n\n compare (other: SpdxLicense): number {\n return this.#id.localeCompare(other.#id)\n }\n}\n\nexport type DisjunctiveLicense = NamedLicense | SpdxLicense\nexport type License = DisjunctiveLicense | LicenseExpression\n\nexport class LicenseRepository extends Set<License> implements Sortable<License> {\n static #compareItems (a: License, b: License): number {\n if (a.constructor === b.constructor) {\n // @ts-expect-error -- classes are from same type -> they are comparable\n return a.compare(b)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n\n sorted (): License[] {\n return Array.from(this).sort(LicenseRepository.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable, Sortable } from '../_helpers/sortable'\nimport type { LifecyclePhase } from '../enums/lifecyclePhase'\n\nexport interface OptionalNamedLifecycleProperties {\n description?: NamedLifecycle['description']\n}\n\nexport class NamedLifecycle implements Comparable<NamedLifecycle> {\n name: string\n description?: string\n\n constructor (name: string, op: OptionalNamedLifecycleProperties = {}) {\n this.name = name\n this.description = op.description\n }\n\n compare (other: NamedLifecycle): number {\n return this.name.localeCompare(other.name)\n }\n}\n\nexport type Lifecycle = LifecyclePhase | NamedLifecycle\n\nexport class LifecycleRepository extends Set<Lifecycle> implements Sortable<Lifecycle> {\n static #compareItems (a: Lifecycle, b: Lifecycle): number {\n if (a.constructor === b.constructor) {\n return a instanceof NamedLifecycle\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- false-positive */\n ? a.compare(b as typeof a)\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- false-positive */\n : a.localeCompare(b as typeof a)\n }\n return a.constructor.name.localeCompare(b.constructor.name)\n }\n\n sorted (): Lifecycle[] {\n return Array.from(this).sort(LifecycleRepository.#compareItems)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Component } from './component'\nimport { LicenseRepository } from './license'\nimport { LifecycleRepository } from './lifecycle'\nimport { OrganizationalContactRepository } from './organizationalContact'\nimport type { OrganizationalEntity } from './organizationalEntity'\nimport { PropertyRepository } from './property'\nimport { Tools } from './tool'\n\nexport interface OptionalMetadataProperties {\n timestamp?: Metadata['timestamp']\n lifecycles?: Metadata['lifecycles']\n tools?: Metadata['tools']\n authors?: Metadata['authors']\n component?: Metadata['component']\n manufacture?: Metadata['manufacture']\n supplier?: Metadata['supplier']\n licenses?: Metadata['licenses']\n properties?: Metadata['properties']\n}\n\nexport class Metadata {\n timestamp?: Date\n lifecycles: LifecycleRepository\n tools: Tools\n authors: OrganizationalContactRepository\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses: LicenseRepository\n properties: PropertyRepository\n\n constructor (op: OptionalMetadataProperties = {}) {\n this.timestamp = op.timestamp\n this.lifecycles = op.lifecycles ?? new LifecycleRepository()\n this.tools = op.tools ?? new Tools()\n this.authors = op.authors ?? new OrganizationalContactRepository()\n this.component = op.component\n this.manufacture = op.manufacture\n this.supplier = op.supplier\n this.licenses = op.licenses ?? new LicenseRepository()\n this.properties = op.properties ?? new PropertyRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\n\nexport interface OptionalOrganizationalContactProperties {\n name?: OrganizationalContact['name']\n email?: OrganizationalContact['email']\n phone?: OrganizationalContact['phone']\n}\n\nexport class OrganizationalContact implements Comparable<OrganizationalContact> {\n name?: string\n email?: string\n phone?: string\n\n constructor (op: OptionalOrganizationalContactProperties = {}) {\n this.name = op.name\n this.email = op.email\n this.phone = op.phone\n }\n\n compare (other: OrganizationalContact): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.name ?? '').localeCompare(other.name ?? '') ||\n (this.email ?? '').localeCompare(other.email ?? '') ||\n (this.phone ?? '').localeCompare(other.phone ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class OrganizationalContactRepository extends SortableComparables<OrganizationalContact> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables, SortableStringables } from '../_helpers/sortable'\nimport { OrganizationalContactRepository } from './organizationalContact'\n\nexport interface OptionalOrganizationalEntityProperties {\n name?: OrganizationalEntity['name']\n url?: OrganizationalEntity['url']\n contact?: OrganizationalEntity['contact']\n}\n\nexport class OrganizationalEntity implements Comparable<OrganizationalEntity> {\n name?: string\n url: Set<URL | string>\n contact: OrganizationalContactRepository\n\n constructor (op: OptionalOrganizationalEntityProperties = {}) {\n this.name = op.name\n this.url = op.url ?? new Set()\n this.contact = op.contact ?? new OrganizationalContactRepository()\n }\n\n compare (other: OrganizationalEntity): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.name ?? '').localeCompare(other.name ?? '') ||\n this.contact.compare(other.contact) ||\n (new SortableStringables(this.url)).compare(new SortableStringables(other.url))\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class OrganizationalEntityRepository extends SortableComparables<OrganizationalEntity> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\n\n/**\n * @see [CycloneDX Property Taxonomy](https://github.com/CycloneDX/cyclonedx-property-taxonomy)\n */\nexport class Property implements Comparable<Property> {\n name: string\n value: string\n\n constructor (name: Property['name'], value: Property['value']) {\n this.name = name\n this.value = value\n }\n\n compare (other: Property): number {\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.name.localeCompare(other.name) ||\n this.value.localeCompare(other.value)\n }\n}\n\nexport class PropertyRepository extends SortableComparables<Property> {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from \"../_helpers/sortable\";\nimport { SortableComparables } from \"../_helpers/sortable\";\nimport { treeIteratorSymbol } from \"../_helpers/tree\";\nimport { BomRef, BomRefRepository } from \"./bomRef\";\nimport { ExternalReferenceRepository } from \"./externalReference\";\nimport { LicenseRepository } from \"./license\";\nimport type {OrganizationalEntity } from \"./organizationalEntity\";\nimport { PropertyRepository } from \"./property\";\n\nexport interface OptionalServiceProperties {\n bomRef?: BomRef['value']\n provider?: Service['provider']\n group?: Service['group']\n version?: Service['version']\n description?: Service['description']\n licenses?: Service['licenses']\n externalReferences?: Service['externalReferences']\n services?: Service['services']\n properties?: Service['properties']\n\n dependencies?: Service['dependencies']\n}\n\nexport class Service implements Comparable<Service> {\n provider?: OrganizationalEntity\n group?: string\n name: string\n version?: string\n description?: string\n licenses: LicenseRepository\n externalReferences: ExternalReferenceRepository\n services: ServiceRepository\n properties: PropertyRepository\n\n /** @see {@link bomRef} */\n readonly #bomRef: BomRef\n\n dependencies: BomRefRepository\n\n constructor(name: Service['name'], op: OptionalServiceProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.provider = op.provider\n this.group = op.group\n this.name = name\n this.version = op.version\n this.description = op.description\n this.licenses = op.licenses ?? new LicenseRepository()\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n this.services = op.services ?? new ServiceRepository()\n this.properties = op.properties ?? new PropertyRepository()\n\n this.dependencies = op.dependencies ?? new BomRefRepository()\n }\n\n get bomRef(): BomRef {\n return this.#bomRef\n }\n\n compare(other: Service): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.group ?? '').localeCompare(other.group ?? '') ||\n this.name.localeCompare(other.name) ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n}\n\nexport class ServiceRepository extends SortableComparables<Service> {\n * [treeIteratorSymbol] (): Generator<Service> {\n for (const service of this) {\n yield service\n yield * service.services[treeIteratorSymbol]()\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { NonNegativeInteger } from '../types/integer'\nimport { isNonNegativeInteger } from '../types/integer'\nimport type { Attachment } from './attachment'\n\nexport interface OptionalSWIDProperties {\n version?: SWID['version']\n patch?: SWID['patch']\n text?: SWID['text']\n url?: SWID['url']\n tagVersion?: SWID['tagVersion']\n}\n\n/**\n * @see {@link https://csrc.nist.gov/projects/Software-Identification-SWID | SWID spec}\n */\nexport class SWID {\n tagId: string\n name: string\n version?: string\n patch?: boolean\n text?: Attachment\n url?: URL | string\n\n /** @see {@link tagVersion} */\n #tagVersion?: NonNegativeInteger\n\n /**\n * @throws {@link TypeError} if `op.tagVersion` is neither {@link NonNegativeInteger} nor `undefined`\n */\n constructor (tagId: SWID['tagId'], name: SWID['name'], op: OptionalSWIDProperties = {}) {\n this.tagId = tagId\n this.name = name\n this.version = op.version\n this.patch = op.patch\n this.text = op.text\n this.url = op.url\n this.tagVersion = op.tagVersion\n }\n\n get tagVersion (): NonNegativeInteger | undefined {\n return this.#tagVersion\n }\n\n /**\n * @throws {@link TypeError} if value is neither {@link NonNegativeInteger} nor `undefined`\n */\n set tagVersion (value: NonNegativeInteger | undefined) {\n if (value !== undefined && !isNonNegativeInteger(value)) {\n throw new TypeError('Not NonNegativeInteger nor undefined')\n }\n this.#tagVersion = value\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../_helpers/sortable'\nimport { SortableComparables } from '../_helpers/sortable'\nimport type { Component } from \"./component\";\nimport { ComponentRepository} from \"./component\";\nimport { ExternalReferenceRepository } from './externalReference'\nimport { HashDictionary } from './hash'\nimport type { Service } from \"./service\";\nimport { ServiceRepository } from \"./service\";\n\nexport interface OptionalToolProperties {\n vendor?: Tool['vendor']\n name?: Tool['name']\n version?: Tool['version']\n hashes?: Tool['hashes']\n externalReferences?: Tool['externalReferences']\n}\n\nexport class Tool implements Comparable<Tool> {\n vendor?: string\n name?: string\n version?: string\n hashes: HashDictionary\n externalReferences: ExternalReferenceRepository\n\n constructor (op: OptionalToolProperties = {}) {\n this.vendor = op.vendor\n this.name = op.name\n this.version = op.version\n this.hashes = op.hashes ?? new HashDictionary()\n this.externalReferences = op.externalReferences ?? new ExternalReferenceRepository()\n }\n\n compare (other: Tool): number {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.vendor ?? '').localeCompare(other.vendor ?? '') ||\n (this.name ?? '').localeCompare(other.name ?? '') ||\n (this.version ?? '').localeCompare(other.version ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n\n static fromComponent(component: Component): Tool {\n return new Tool({\n vendor: component.group,\n name: component.name,\n version: component.version,\n hashes: component.hashes,\n externalReferences: component.externalReferences\n })\n }\n\n static fromService(service: Service): Tool {\n return new Tool({\n vendor: service.group,\n name: service.name,\n version: service.version,\n externalReferences: service.externalReferences\n })\n }\n}\n\nexport class ToolRepository extends SortableComparables<Tool> {\n}\n\n\nexport interface OptionalToolsProperties {\n components?: Tools['components']\n services?: Tools['services']\n tools?: Tools['tools']\n}\n\nexport class Tools {\n components: ComponentRepository\n services: ServiceRepository\n tools: ToolRepository\n\n constructor(op: OptionalToolsProperties = {}) {\n this.components = op.components ?? new ComponentRepository()\n this.services = op.services ?? new ServiceRepository()\n this.tools = op.tools ?? new ToolRepository()\n }\n\n get size(): number {\n return this.components.size\n + this.services.size\n + this.tools.size\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\n\nexport interface OptionalAdvisoryProperties {\n title?: Advisory['title']\n}\n\nexport class Advisory implements Comparable<Advisory> {\n title?: string\n url: string | URL\n\n constructor (url: string | URL, op: OptionalAdvisoryProperties = {}) {\n this.url = url\n this.title = op.title\n }\n\n compare (other: Advisory): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.url.toString().localeCompare(other.url.toString()) ||\n (this.title ?? '').localeCompare(other.title ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AdvisoryRepository extends SortableComparables<Advisory> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { AffectStatus } from '../../enums/vulnerability'\nimport type { BomLinkElement } from '../bomLink'\nimport type { BomRef } from '../bomRef'\n\nexport interface OptionalAffectProperties {\n versions?: Affect['versions']\n}\n\nexport class Affect implements Comparable<Affect> {\n ref: BomRef | BomLinkElement\n versions: AffectedVersionRepository\n\n constructor (ref: Affect['ref'], op: OptionalAffectProperties = {}) {\n this.ref = ref\n this.versions = op.versions ?? new AffectedVersionRepository()\n }\n\n compare (other: Affect): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.ref.compare(other.ref) ||\n this.versions.compare(other.versions)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AffectRepository extends SortableComparables<Affect> {\n}\n\nexport interface OptionalAffectedVersionProperties {\n status?: AffectedVersion['status']\n}\n\nexport class AffectedSingleVersion implements Comparable<AffectedSingleVersion> {\n version: string\n status?: AffectStatus\n\n constructor (version: string, op: OptionalAffectedVersionProperties = {}) {\n this.version = version\n this.status = op.status\n }\n\n compare (other: AffectedSingleVersion): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.version).localeCompare(other.version) ||\n (this.status ?? '').localeCompare(other.status ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class AffectedVersionRange implements Comparable<AffectedVersionRange> {\n range: string\n status?: AffectStatus\n\n constructor (range: string, op: OptionalAffectedVersionProperties = {}) {\n this.range = range\n this.status = op.status\n }\n\n compare (other: AffectedVersionRange): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.range).localeCompare(other.range) ||\n (this.status ?? '').localeCompare(other.status ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport type AffectedVersion = AffectedSingleVersion | AffectedVersionRange\n\nexport class AffectedVersionRepository extends SortableComparables<AffectedVersion> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { AnalysisJustification, AnalysisState } from '../../enums/vulnerability'\nimport { AnalysisResponseRepository } from '../../enums/vulnerability/analysisResponse'\n\nexport interface OptionalAnalysisProperties {\n state?: Analysis['state']\n justification?: Analysis['justification']\n response?: Analysis['response']\n detail?: Analysis['detail']\n}\n\nexport class Analysis {\n state?: AnalysisState\n justification?: AnalysisJustification\n response: AnalysisResponseRepository\n detail?: string\n\n constructor (op: OptionalAnalysisProperties = {}) {\n this.state = op.state\n this.justification = op.justification\n this.response = op.response ?? new AnalysisResponseRepository()\n this.detail = op.detail\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OrganizationalContactRepository } from '../organizationalContact'\nimport { OrganizationalEntityRepository } from '../organizationalEntity'\n\nexport interface OptionalCreditsProperties {\n organizations?: Credits['organizations']\n individuals?: Credits['individuals']\n}\n\nexport class Credits {\n organizations: OrganizationalEntityRepository\n individuals: OrganizationalContactRepository\n\n constructor (op: OptionalCreditsProperties = {}) {\n this.organizations = op.organizations ?? new OrganizationalEntityRepository()\n this.individuals = op.individuals ?? new OrganizationalContactRepository()\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './advisory'\nexport * from './affect'\nexport * from './analysis'\nexport * from './credits'\nexport * from './rating'\nexport * from './reference'\nexport * from './source'\nexport * from './vulnerability'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { RatingMethod, Severity } from '../../enums/vulnerability'\nimport type { Source } from './source'\n\nexport interface OptionalRatingProperties {\n source?: Rating['source']\n score?: Rating['score']\n severity?: Rating['severity']\n method?: Rating['method']\n vector?: Rating['vector']\n justification?: Rating['justification']\n}\n\nexport class Rating implements Comparable<Rating> {\n source?: Source\n score?: number\n severity?: Severity\n method?: RatingMethod\n vector?: string\n justification?: string\n\n constructor (op: OptionalRatingProperties = {}) {\n this.source = op.source\n this.score = op.score\n this.severity = op.severity\n this.method = op.method\n this.vector = op.vector\n this.justification = op.justification\n }\n\n /* eslint complexity: [\"error\", 50] -- acknowledged */\n compare (other: Rating): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return ((this.score ?? 0) - (other.score ?? 0)) ||\n (this.vector ?? '').localeCompare(other.vector ?? '') ||\n (this.justification ?? '').localeCompare(other.justification ?? '') ||\n (this.severity ?? '').localeCompare(other.severity ?? '') ||\n (this.method ?? '').localeCompare(other.method ?? '') ||\n (this.source && other.source ? this.source.compare(other.source) : 0)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class RatingRepository extends SortableComparables<Rating> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport type { Source } from './source'\n\n/**\n * @privateRemarks\n * The model is built based on the JSON spec, which has all properties mandatory.\n * In contrast to the XML spec, which has them optional.\n * see https://github.com/CycloneDX/specification/issues/154\n */\nexport class Reference implements Comparable<Reference> {\n /**\n * @example values\n * - `CVE-2021-39182`\n * - `GHSA-35m5-8cvj-8783`\n * - `SNYK-PYTHON-ENROCRYPT-1912876`\n */\n id: string\n source: Source\n\n constructor (id: string, source: Source) {\n this.id = id\n this.source = source\n }\n\n compare (other: Reference): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return this.id.localeCompare(other.id) ||\n this.source.compare(other.source)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class ReferenceRepository extends SortableComparables<Reference> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\n\nexport interface OptionalSourceProperties {\n name?: Source['name']\n url?: Source['url']\n}\n\nexport class Source implements Comparable<Source> {\n name?: string\n url?: URL | string\n\n constructor (op: OptionalSourceProperties = {}) {\n this.name = op.name\n this.url = op.url\n }\n\n compare (other: Source): number {\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.url?.toString() ?? '').localeCompare(other.url?.toString() ?? '') ||\n (this.name ?? '').localeCompare(other.name ?? '')\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Comparable } from '../../_helpers/sortable'\nimport { SortableComparables } from '../../_helpers/sortable'\nimport { CweRepository } from '../../types/cwe'\nimport { BomRef } from '../bomRef'\nimport { PropertyRepository } from '../property'\nimport { Tools } from '../tool'\nimport { AdvisoryRepository } from './advisory'\nimport { AffectRepository } from './affect'\nimport type { Analysis } from './analysis'\nimport type { Credits } from './credits'\nimport { RatingRepository } from './rating'\nimport { ReferenceRepository } from './reference'\nimport type { Source } from './source'\n\nexport interface OptionalVulnerabilityProperties {\n bomRef?: BomRef['value']\n id?: Vulnerability['id']\n source?: Vulnerability['source']\n references?: Vulnerability['references']\n ratings?: Vulnerability['ratings']\n cwes?: Vulnerability['cwes']\n description?: Vulnerability['description']\n detail?: Vulnerability['detail']\n recommendation?: Vulnerability['recommendation']\n advisories?: Vulnerability['advisories']\n created?: Vulnerability['created']\n published?: Vulnerability['published']\n updated?: Vulnerability['updated']\n credits?: Vulnerability['credits']\n tools?: Vulnerability['tools']\n analysis?: Vulnerability['analysis']\n affects?: Vulnerability['affects']\n properties?: Vulnerability['properties']\n}\n\nexport class Vulnerability implements Comparable<Vulnerability> {\n /** @see bomRef */\n readonly #bomRef: BomRef\n id?: string\n source?: Source\n references: ReferenceRepository\n ratings: RatingRepository\n cwes: CweRepository\n description?: string\n detail?: string\n recommendation?: string\n advisories: AdvisoryRepository\n created?: Date\n published?: Date\n updated?: Date\n credits?: Credits\n tools: Tools\n analysis?: Analysis\n affects: AffectRepository\n properties: PropertyRepository\n\n constructor (op: OptionalVulnerabilityProperties = {}) {\n this.#bomRef = new BomRef(op.bomRef)\n this.id = op.id\n this.source = op.source\n this.references = op.references ?? new ReferenceRepository()\n this.ratings = op.ratings ?? new RatingRepository()\n this.cwes = op.cwes ?? new CweRepository()\n this.description = op.description\n this.detail = op.detail\n this.recommendation = op.recommendation\n this.advisories = op.advisories ?? new AdvisoryRepository()\n this.created = op.created\n this.published = op.published\n this.updated = op.updated\n this.credits = op.credits\n this.tools = op.tools ?? new Tools()\n this.analysis = op.analysis\n this.affects = op.affects ?? new AffectRepository()\n this.properties = op.properties ?? new PropertyRepository()\n }\n\n get bomRef (): BomRef {\n return this.#bomRef\n }\n\n /* eslint complexity: [\"error\", 50] -- acknowledged */\n compare (other: Vulnerability): number {\n const bomRefCompare = this.bomRef.compare(other.bomRef)\n if (bomRefCompare !== 0) {\n return bomRefCompare\n }\n\n /* eslint-disable @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return (this.id ?? '').localeCompare(other.id ?? '') ||\n (this.created?.getTime() ?? 0) - (other.created?.getTime() ?? 0) ||\n (this.published?.getTime() ?? 0) - (other.published?.getTime() ?? 0) ||\n (this.updated?.getTime() ?? 0) - (other.updated?.getTime() ?? 0) ||\n this.ratings.compare(other.ratings) ||\n this.cwes.compare(other.cwes) ||\n (this.description ?? '').localeCompare(other.description ?? '') ||\n (this.detail ?? '').localeCompare(other.detail ?? '') ||\n (this.recommendation ?? '').localeCompare(other.recommendation ?? '') ||\n (this.source && other.source ? this.source.compare(other.source) : 0) ||\n this.properties.compare(other.properties)\n /* eslint-enable @typescript-eslint/strict-boolean-expressions */\n }\n}\n\nexport class VulnerabilityRepository extends SortableComparables<Vulnerability> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { treeIteratorSymbol } from '../_helpers/tree'\nimport type { Bom, BomRef } from '../models'\nimport { BomRefDiscriminator } from './bomRefDiscriminator'\nimport type { NormalizerOptions, Serializer, SerializerOptions } from './types'\n\nexport abstract class BaseSerializer<NormalizedBom> implements Serializer {\n * #getAllBomRefs (bom: Bom): Generator<BomRef> {\n // region from components\n if (bom.metadata.component !== undefined) {\n yield bom.metadata.component.bomRef\n for (const { bomRef } of bom.metadata.component.components[treeIteratorSymbol]()) {\n yield bomRef\n }\n }\n for (const { bomRef } of bom.components[treeIteratorSymbol]()) {\n yield bomRef\n }\n // endregion from components\n\n // region from services\n for (const { bomRef } of bom.services[treeIteratorSymbol]()) {\n yield bomRef\n }\n // endregion from services\n\n // region from vulnerabilities\n for (const { bomRef } of bom.vulnerabilities) {\n yield bomRef\n }\n // endregion from vulnerabilities\n }\n\n /**\n * @throws {@link Error}\n */\n #normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom {\n const bomRefDiscriminator = new BomRefDiscriminator(this.#getAllBomRefs(bom))\n bomRefDiscriminator.discriminate()\n // This IS NOT the place to put meaning to the BomRef values. This would be out of scope.\n // This IS the place to make BomRef values (temporary) unique in their own document scope.\n try {\n return this._normalize(bom, options)\n } finally {\n bomRefDiscriminator.reset()\n }\n }\n\n public serialize (bom: Bom, options?: SerializerOptions & NormalizerOptions): string {\n return this._serialize(\n this.#normalize(bom, options),\n options\n )\n }\n\n /**\n * @throws {@link Error}\n */\n protected abstract _normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom\n\n /**\n * @throws {@link Error}\n */\n protected abstract _serialize (normalizedBom: NormalizedBom, options?: SerializerOptions): string\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { BomRef } from '../models'\n\nexport class BomRefDiscriminator {\n readonly #originalValues: ReadonlyArray<readonly [BomRef, string | undefined]>\n\n readonly #prefix: string\n\n /* eslint-disable-next-line @typescript-eslint/no-inferrable-types -- docs */\n constructor (bomRefs: Iterable<BomRef>, prefix: string = 'BomRef') {\n this.#originalValues = Array.from(bomRefs, r => [r, r.value])\n this.#prefix = prefix\n }\n\n get prefix (): string {\n return this.#prefix\n }\n\n /** Iterate over the {@link BomRef}s. */\n * [Symbol.iterator] (): IterableIterator<BomRef> {\n for (const [bomRef] of this.#originalValues) {\n yield bomRef\n }\n }\n\n discriminate (): void {\n const knownRefValues = new Set<string>([''])\n for (const [bomRef] of this.#originalValues) {\n let value = bomRef.value\n if (value === undefined || knownRefValues.has(value)) {\n value = this.#makeUniqueId()\n bomRef.value = value\n }\n knownRefValues.add(value)\n }\n }\n\n reset (): void {\n for (const [bomRef, originalValue] of this.#originalValues) {\n bomRef.value = originalValue\n }\n }\n\n /**\n * generate a string in the format:\n * `${this.prefix}.<random-characters>.<random-characters>`\n */\n #makeUniqueId (): string {\n return `${\n this.#prefix\n }${\n Math.random().toString(32).substring(1)\n }${\n Math.random().toString(32).substring(1)\n }`\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OptPlugError } from '../_optPlug.node/errors'\n\nexport class MissingOptionalDependencyError extends OptPlugError {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// !!! not everything is public, yet\n\nexport * from './bomRefDiscriminator'\nexport * from './errors'\n/* eslint-disable-next-line @typescript-eslint/consistent-type-exports -- backwards-compat TS4 */\nexport * as Types from './types'\n\n// region base\n\nexport * from './baseSerializer'\n// export * from './baseDeserializer' // @TODO\n\n// endregion base\n\n// region JSON\n\nexport * as JSON from './json'\nexport * from './jsonSerializer'\n// export * from './jsonDeserializer' // @TODO\n\n// endregion JSON\n\n// region XML\n\nexport * as XML from './xml'\nexport * from './xmlBaseSerializer'\n// export * from './xmlBaseDeserializer' // @TODO\n\n// endregion XML\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\nexport * from './xmlSerializer.web'\n// export * from './xmlDeserializer.web' // @TODO\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Normalize from './normalize'\nexport * as Types from './types'\n// export * as Denormalize from './denormalize' // @TODO\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint complexity: [\"error\", 50 ] -- acknowledged */\n/* eslint max-lines: 'off' -- intended */\n\nimport { chainI } from \"../../_helpers/iterable\";\nimport { isNotUndefined } from '../../_helpers/notUndefined'\nimport type { SortableIterable } from '../../_helpers/sortable'\nimport type { Stringable } from '../../_helpers/stringable'\nimport { treeIteratorSymbol } from '../../_helpers/tree'\nimport { escapeUri } from '../../_helpers/uri'\nimport type * as Models from '../../models'\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../../models/license'\nimport { NamedLifecycle } from '../../models/lifecycle'\nimport { Tool, ToolRepository } from '../../models/tool'\nimport { AffectedSingleVersion, AffectedVersionRange } from '../../models/vulnerability/affect'\nimport { isSupportedSpdxId } from '../../spdx'\nimport type { _SpecProtocol as Spec } from '../../spec/_protocol'\nimport { Version as SpecVersion } from '../../spec/enums'\nimport type { NormalizerOptions } from '../types'\nimport type { Normalized } from './types'\nimport { JsonSchema } from './types'\n\n\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: Factory['spec']) {\n this.#spec = spec\n }\n\n get spec (): Spec {\n return this.#spec\n }\n\n makeForBom (): BomNormalizer {\n return new BomNormalizer(this)\n }\n\n makeForMetadata (): MetadataNormalizer {\n return new MetadataNormalizer(this)\n }\n\n makeForComponent (): ComponentNormalizer {\n return new ComponentNormalizer(this)\n }\n\n makeForService (): ServiceNormalizer {\n return new ServiceNormalizer(this)\n }\n\n makeForComponentEvidence (): ComponentEvidenceNormalizer {\n return new ComponentEvidenceNormalizer(this)\n }\n\n makeForLifecycle (): LifecycleNormalizer {\n return new LifecycleNormalizer(this)\n }\n\n makeForTool (): ToolNormalizer {\n return new ToolNormalizer(this)\n }\n\n makeForTools (): ToolsNormalizer {\n return new ToolsNormalizer(this)\n }\n\n makeForOrganizationalContact (): OrganizationalContactNormalizer {\n return new OrganizationalContactNormalizer(this)\n }\n\n makeForOrganizationalEntity (): OrganizationalEntityNormalizer {\n return new OrganizationalEntityNormalizer(this)\n }\n\n makeForHash (): HashNormalizer {\n return new HashNormalizer(this)\n }\n\n makeForLicense (): LicenseNormalizer {\n return new LicenseNormalizer(this)\n }\n\n makeForSWID (): SWIDNormalizer {\n return new SWIDNormalizer(this)\n }\n\n makeForExternalReference (): ExternalReferenceNormalizer {\n return new ExternalReferenceNormalizer(this)\n }\n\n makeForAttachment (): AttachmentNormalizer {\n return new AttachmentNormalizer(this)\n }\n\n makeForProperty (): PropertyNormalizer {\n return new PropertyNormalizer(this)\n }\n\n makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n\n makeForVulnerability (): VulnerabilityNormalizer {\n return new VulnerabilityNormalizer(this)\n }\n\n makeForVulnerabilitySource (): VulnerabilitySourceNormalizer {\n return new VulnerabilitySourceNormalizer(this)\n }\n\n makeForVulnerabilityReference (): VulnerabilityReferenceNormalizer {\n return new VulnerabilityReferenceNormalizer(this)\n }\n\n makeForVulnerabilityRating (): VulnerabilityRatingNormalizer {\n return new VulnerabilityRatingNormalizer(this)\n }\n\n makeForVulnerabilityAdvisory (): VulnerabilityAdvisoryNormalizer {\n return new VulnerabilityAdvisoryNormalizer(this)\n }\n\n makeForVulnerabilityCredits (): VulnerabilityCreditsNormalizer {\n return new VulnerabilityCreditsNormalizer(this)\n }\n\n makeForVulnerabilityAffect (): VulnerabilityAffectNormalizer {\n return new VulnerabilityAffectNormalizer(this)\n }\n\n makeForVulnerabilityAffectedVersion (): VulnerabilityAffectedVersionNormalizer {\n return new VulnerabilityAffectedVersionNormalizer(this)\n }\n\n makeForVulnerabilityAnalysis (): VulnerabilityAnalysisNormalizer {\n return new VulnerabilityAnalysisNormalizer(this)\n }\n}\n\nconst schemaUrl: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot7, 'http://cyclonedx.org/schema/bom-1.7.schema.json'],\n [SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom-1.6.schema.json'],\n [SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom-1.5.schema.json'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom-1.4.schema.json'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom-1.3a.schema.json'],\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom-1.2b.schema.json']\n])\n\ninterface JsonNormalizer<TModel, TNormalized> {\n normalize: (data: TModel, options: NormalizerOptions) => TNormalized | undefined\n\n normalizeIterable?: (data: SortableIterable<TModel>, options: NormalizerOptions) => TNormalized[]\n\n}\n\nabstract class BaseJsonNormalizer<TModel, TNormalized = object> implements JsonNormalizer<TModel, TNormalized> {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n get factory (): Factory {\n return this._factory\n }\n\n abstract normalize (data: TModel, options: NormalizerOptions): TNormalized | undefined\n}\n\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions --\n * since empty strings need to be treated as undefined/null\n */\n\nexport class BomNormalizer extends BaseJsonNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): Normalized.Bom {\n return {\n $schema: schemaUrl.get(this._factory.spec.version),\n bomFormat: 'CycloneDX',\n specVersion: this._factory.spec.version,\n version: data.version,\n serialNumber: this.#isEligibleSerialNumber(data.serialNumber)\n ? data.serialNumber\n : undefined,\n metadata: this._factory.makeForMetadata().normalize(data.metadata, options),\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options)\n // spec < 1.4 requires `component` to be array\n : [],\n services: this._factory.spec.supportsServices && data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined,\n dependencies: this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options)\n : undefined,\n vulnerabilities: this._factory.spec.supportsVulnerabilities && data.vulnerabilities.size > 0\n ? this._factory.makeForVulnerability().normalizeIterable(data.vulnerabilities, options)\n : undefined\n }\n }\n\n #isEligibleSerialNumber (v: string | undefined): boolean {\n return v !== undefined &&\n // see https://github.com/CycloneDX/specification/blob/ef71717ae0ecb564c0b4c9536d6e9e57e35f2e69/schema/bom-1.4.schema.json#L39\n /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(v)\n }\n}\n\nexport class MetadataNormalizer extends BaseJsonNormalizer<Models.Metadata> {\n normalize (data: Models.Metadata, options: NormalizerOptions): Normalized.Metadata {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n return {\n timestamp: data.timestamp?.toISOString(),\n lifecycles: this._factory.spec.supportsMetadataLifecycles && data.lifecycles.size > 0\n ? this._factory.makeForLifecycle().normalizeIterable(data.lifecycles, options)\n : undefined,\n tools: data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options)\n : undefined,\n authors: data.authors.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.authors, options)\n : undefined,\n component: data.component === undefined\n ? undefined\n : this._factory.makeForComponent().normalize(data.component, options),\n manufacture: data.manufacture === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.manufacture, options),\n supplier: data.supplier === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.supplier, options),\n licenses: this._factory.spec.supportsMetadataLicenses && data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n properties: this._factory.spec.supportsMetadataProperties && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined\n }\n }\n}\n\nexport class LifecycleNormalizer extends BaseJsonNormalizer<Models.Lifecycle> {\n normalize (data: Models.Lifecycle, options: NormalizerOptions): Normalized.Lifecycle {\n return data instanceof NamedLifecycle\n ? { name: data.name, description: data.description }\n : { phase: data }\n }\n\n normalizeIterable (data: SortableIterable<Models.Lifecycle>, options: NormalizerOptions): Normalized.Lifecycle[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(lc => this.normalize(lc, options))\n }\n}\n\nexport class ToolNormalizer extends BaseJsonNormalizer<Models.Tool> {\n normalize (data: Models.Tool, options: NormalizerOptions): Normalized.Tool {\n return {\n vendor: data.vendor || undefined,\n name: data.name || undefined,\n version: data.version || undefined,\n hashes: data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n externalReferences: this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Tool>, options: NormalizerOptions): Normalized.Tool[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options))\n }\n}\n\nexport class ToolsNormalizer extends BaseJsonNormalizer<Models.Tools> {\n normalize(data: Models.Tools, options: NormalizerOptions): Normalized.ToolsType {\n if (data.tools.size > 0 || !this._factory.spec.supportsToolsComponentsServices) {\n return this._factory.makeForTool().normalizeIterable(\n new ToolRepository(chainI<Models.Tool>(\n Array.from(data.components, Tool.fromComponent),\n Array.from(data.services, Tool.fromService),\n data.tools,\n )), options)\n }\n return {\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options)\n : undefined,\n services: data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined\n }\n }\n}\n\nexport class HashNormalizer extends BaseJsonNormalizer<Models.Hash> {\n normalize ([algorithm, content]: Models.Hash, options: NormalizerOptions): Normalized.Hash | undefined {\n const spec = this._factory.spec\n return spec.supportsHashAlgorithm(algorithm) && spec.supportsHashValue(content)\n ? {\n alg: algorithm,\n content\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.Hash>, options: NormalizerOptions): Normalized.Hash[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n h => this.normalize(h, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends BaseJsonNormalizer<Models.OrganizationalContact> {\n normalize (data: Models.OrganizationalContact, options: NormalizerOptions): Normalized.OrganizationalContact {\n return {\n name: data.name || undefined,\n email: JsonSchema.isIdnEmail(data.email)\n ? data.email\n : undefined,\n phone: data.phone || undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalContact>, options: NormalizerOptions): Normalized.OrganizationalContact[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oc => this.normalize(oc, options))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends BaseJsonNormalizer<Models.OrganizationalEntity> {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions): Normalized.OrganizationalEntity {\n const urls = normalizeStringableIter(\n Array.from(data.url, (s) => escapeUri(s.toString())),\n options\n ).filter(JsonSchema.isIriReference)\n return {\n name: data.name || undefined,\n url: urls.length > 0\n ? urls\n : undefined,\n contact: data.contact.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.contact, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalEntity>, options: NormalizerOptions): Normalized.OrganizationalEntity[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oe => this.normalize(oe, options))\n }\n}\n\nexport class ComponentNormalizer extends BaseJsonNormalizer<Models.Component> {\n normalize (data: Models.Component, options: NormalizerOptions): Normalized.Component | undefined {\n const spec = this._factory.spec\n if (!spec.supportsComponentType(data.type)) {\n return undefined\n }\n const version: string = data.version ?? ''\n return {\n type: data.type,\n name: data.name,\n group: data.group || undefined,\n version: version.length > 0 || spec.requiresComponentVersion\n ? version\n : undefined,\n 'bom-ref': data.bomRef.value || undefined,\n supplier: data.supplier === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.supplier, options),\n author: data.author || undefined,\n publisher: data.publisher || undefined,\n description: data.description || undefined,\n scope: data.scope,\n hashes: data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n copyright: data.copyright?.toString() || undefined,\n cpe: data.cpe || undefined,\n purl: data.purl?.toString(),\n swid: data.swid === undefined\n ? undefined\n : this._factory.makeForSWID().normalize(data.swid, options),\n externalReferences: data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined,\n properties: spec.supportsProperties(data) && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined,\n components: data.components.size > 0\n ? this.normalizeIterable(data.components, options)\n : undefined,\n evidence: spec.supportsComponentEvidence && data.evidence !== undefined\n ? this._factory.makeForComponentEvidence().normalize(data.evidence, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Component>, options: NormalizerOptions): Normalized.Component[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n c => this.normalize(c, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class ServiceNormalizer extends BaseJsonNormalizer<Models.Service> {\n normalize (data: Models.Service, options: NormalizerOptions): Normalized.Service {\n const spec = this._factory.spec\n return {\n 'bom-ref': data.bomRef.value || undefined,\n provider: data.provider\n ? this._factory.makeForOrganizationalEntity().normalize(data.provider, options)\n : undefined,\n group: data.group,\n name: data.name,\n version: data.version|| undefined,\n description: data.description || undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n externalReferences: data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options)\n : undefined,\n services: data.services.size > 0\n ? this._factory.makeForService().normalizeIterable(data.services, options)\n : undefined,\n properties: spec.supportsProperties(data) && data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined,\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Service>, options: NormalizerOptions): Normalized.Service[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n s => this.normalize(s, options)\n )\n }\n}\n\nexport class ComponentEvidenceNormalizer extends BaseJsonNormalizer<Models.ComponentEvidence> {\n normalize (data: Models.ComponentEvidence, options: NormalizerOptions): Normalized.ComponentEvidence {\n return {\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n : undefined,\n copyright: data.copyright.size > 0\n ? (\n options.sortLists\n ? data.copyright.sorted().map(ComponentEvidenceNormalizer.#normalizeCopyright)\n : Array.from(data.copyright, ComponentEvidenceNormalizer.#normalizeCopyright)\n )\n : undefined\n }\n }\n\n static #normalizeCopyright (c: Stringable): Normalized.Copyright {\n return { text: c.toString() }\n }\n}\n\nexport class LicenseNormalizer extends BaseJsonNormalizer<Models.License> {\n normalize (data: Models.License, options: NormalizerOptions): Normalized.License {\n switch (true) {\n case data instanceof NamedLicense:\n return this.#normalizeNamedLicense(data, options)\n case data instanceof SpdxLicense:\n return isSupportedSpdxId(data.id)\n ? this.#normalizeSpdxLicense(data, options)\n : this.#normalizeNamedLicense(new NamedLicense(\n // prevent information loss -> convert to broader type\n data.id,\n { url: data.url }\n ), options)\n case data instanceof LicenseExpression:\n return this.#normalizeLicenseExpression(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n /* c8 ignore end */\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): Normalized.NamedLicense {\n const url = escapeUri(data.url?.toString())\n return {\n license: {\n name: data.name,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): Normalized.SpdxLicense {\n const url = escapeUri(data.url?.toString())\n return {\n license: {\n id: data.id,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): Normalized.LicenseExpression {\n return {\n expression: data.expression,\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n }\n }\n\n /**\n * If there is any {@link Models.LicenseExpression | LicenseExpression} in the set, then this is the only item that is normalized.\n */\n normalizeIterable (data: SortableIterable<Models.License>, options: NormalizerOptions): Normalized.License[] {\n const licenses = options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n\n if (licenses.length > 1) {\n const expressions = licenses.filter(l => l instanceof LicenseExpression)\n if (expressions.length > 0) {\n // could have thrown {@link RangeError} when there is more than one only {@link Models.LicenseExpression | LicenseExpression}.\n // but let's be graceful and just normalize to the most relevant choice: any expression\n return [this.#normalizeLicenseExpression(expressions[0])]\n }\n }\n\n return licenses.map(l => this.normalize(l, options))\n }\n}\n\nexport class SWIDNormalizer extends BaseJsonNormalizer<Models.SWID> {\n normalize (data: Models.SWID, options: NormalizerOptions): Normalized.SWID {\n const url = escapeUri(data.url?.toString())\n return {\n tagId: data.tagId,\n name: data.name,\n version: data.version || undefined,\n tagVersion: data.tagVersion,\n patch: data.patch,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: JsonSchema.isIriReference(url)\n ? url\n : undefined\n }\n }\n}\n\nexport class ExternalReferenceNormalizer extends BaseJsonNormalizer<Models.ExternalReference> {\n normalize (data: Models.ExternalReference, options: NormalizerOptions): Normalized.ExternalReference | undefined {\n return this._factory.spec.supportsExternalReferenceType(data.type)\n ? {\n url: escapeUri(data.url.toString()),\n type: data.type,\n hashes: this._factory.spec.supportsExternalReferenceHashes && data.hashes.size > 0\n ? this._factory.makeForHash().normalizeIterable(data.hashes, options)\n : undefined,\n comment: data.comment || undefined\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.ExternalReference>, options: NormalizerOptions): Normalized.ExternalReference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n r => this.normalize(r, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends BaseJsonNormalizer<Models.Attachment> {\n normalize (data: Models.Attachment, options: NormalizerOptions): Normalized.Attachment {\n return {\n content: data.content.toString(),\n contentType: data.contentType || undefined,\n encoding: data.encoding\n }\n }\n}\n\nexport class PropertyNormalizer extends BaseJsonNormalizer<Models.Property> {\n normalize (data: Models.Property, options: NormalizerOptions): Normalized.Property {\n return {\n name: data.name,\n value: data.value\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Property>, options: NormalizerOptions): Normalized.Property[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(p => this.normalize(p, options))\n }\n}\n\nexport class DependencyGraphNormalizer extends BaseJsonNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): Normalized.Dependency[] | undefined {\n const allRefs = new Map<Models.BomRef, Models.BomRefRepository>()\n if (data.metadata.component !== undefined) {\n allRefs.set(data.metadata.component.bomRef, data.metadata.component.dependencies)\n for (const component of data.metadata.component.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n for (const service of data.services[treeIteratorSymbol]()) {\n allRefs.set(service.bomRef, service.dependencies)\n }\n\n const normalized: Normalized.Dependency[] = []\n for (const [ref, deps] of allRefs) {\n const dep = this.#normalizeDependency(ref, deps, allRefs, options)\n if (isNotUndefined(dep)) {\n normalized.push(dep)\n }\n }\n\n if (options.sortLists ?? false) {\n normalized.sort(({ ref: a }, { ref: b }) => a.localeCompare(b))\n }\n\n return normalized\n }\n\n #normalizeDependency (\n ref: Models.BomRef,\n deps: Models.BomRefRepository,\n allRefs: Map<Models.BomRef, Models.BomRefRepository>,\n options: NormalizerOptions\n ): Normalized.Dependency | undefined {\n const bomRef = ref.toString()\n if (bomRef.length === 0) {\n // no value -> cannot render\n return undefined\n }\n\n const dependsOn: string[] = normalizeStringableIter(\n Array.from(deps).filter(d => allRefs.has(d) && d !== ref),\n options\n ).filter(d => d.length > 0)\n\n return {\n ref: bomRef,\n dependsOn: dependsOn.length > 0\n ? dependsOn\n : undefined\n }\n }\n}\n\nexport class VulnerabilityNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Vulnerability> {\n normalize (data: Models.Vulnerability.Vulnerability, options: NormalizerOptions): Normalized.Vulnerability {\n return {\n 'bom-ref': data.bomRef.value || undefined,\n id: data.id || undefined,\n source: data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options),\n references: data.references.size > 0\n ? this._factory.makeForVulnerabilityReference().normalizeIterable(data.references, options)\n : undefined,\n ratings: data.ratings.size > 0\n ? this._factory.makeForVulnerabilityRating().normalizeIterable(data.ratings, options)\n : undefined,\n cwes: data.cwes.size > 0\n ? (\n options.sortLists ?? false\n ? data.cwes.sorted()\n : Array.from(data.cwes)\n )\n : undefined,\n description: data.description,\n detail: data.detail,\n recommendation: data.recommendation,\n advisories: data.advisories.size > 0\n ? this._factory.makeForVulnerabilityAdvisory().normalizeIterable(data.advisories, options)\n : undefined,\n created: data.created?.toISOString(),\n published: data.published?.toISOString(),\n updated: data.updated?.toISOString(),\n credits: data.credits === undefined\n ? undefined\n : this._factory.makeForVulnerabilityCredits().normalize(data.credits, options),\n tools: data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options)\n : undefined,\n analysis: data.analysis === undefined\n ? undefined\n : this._factory.makeForVulnerabilityAnalysis().normalize(data.analysis, options),\n affects: data.affects.size > 0\n ? this._factory.makeForVulnerabilityAffect().normalizeIterable(data.affects, options)\n : undefined,\n properties: data.properties.size > 0\n ? this._factory.makeForProperty().normalizeIterable(data.properties, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Vulnerability>, options: NormalizerOptions): Normalized.Vulnerability[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(v => this.normalize(v, options))\n }\n}\n\nexport class VulnerabilitySourceNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Source> {\n normalize (data: Models.Vulnerability.Source, options: NormalizerOptions): Normalized.Vulnerability.Source {\n return {\n name: data.name,\n url: data.url?.toString()\n }\n }\n}\n\nexport class VulnerabilityReferenceNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Reference> {\n normalize (data: Models.Vulnerability.Reference, options: NormalizerOptions): Normalized.Vulnerability.Reference {\n return {\n id: data.id,\n source: this._factory.makeForVulnerabilitySource().normalize(data.source, options)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Reference>, options: NormalizerOptions): Normalized.Vulnerability.Reference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options))\n }\n}\n\nexport class VulnerabilityRatingNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Rating> {\n normalize (data: Models.Vulnerability.Rating, options: NormalizerOptions): Normalized.Vulnerability.Rating {\n return {\n source: data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options),\n score: data.score,\n severity: data.severity,\n method: this._factory.spec.supportsVulnerabilityRatingMethod(data.method)\n ? data.method\n : undefined,\n vector: data.vector,\n justification: data.justification\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Rating>, options: NormalizerOptions): Normalized.Vulnerability.Rating[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options))\n }\n}\n\nexport class VulnerabilityAdvisoryNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Advisory> {\n normalize (data: Models.Vulnerability.Advisory, options: NormalizerOptions): Normalized.Vulnerability.Advisory | undefined {\n const url = escapeUri(data.url.toString())\n if (!JsonSchema.isIriReference(url)) {\n // invalid value -> cannot render\n return undefined\n }\n return {\n title: data.title,\n url\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Advisory>, options: NormalizerOptions): Normalized.Vulnerability.Advisory[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n a => this.normalize(a, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityCreditsNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Credits> {\n normalize (data: Models.Vulnerability.Credits, options: NormalizerOptions): Normalized.Vulnerability.Credits {\n return {\n organizations: data.organizations.size > 0\n ? this._factory.makeForOrganizationalEntity().normalizeIterable(data.organizations, options)\n : undefined,\n individuals: data.individuals.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeIterable(data.individuals, options)\n : undefined\n }\n }\n}\n\nexport class VulnerabilityAffectNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Affect> {\n normalize (data: Models.Vulnerability.Affect, options: NormalizerOptions): Normalized.Vulnerability.Affect {\n return {\n ref: data.ref.toString(),\n versions: data.versions.size > 0\n ? this._factory.makeForVulnerabilityAffectedVersion().normalizeIterable(data.versions, options)\n : undefined\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Affect>, options: NormalizerOptions): Normalized.Vulnerability.Affect[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(a => this.normalize(a, options))\n }\n}\n\nexport class VulnerabilityAffectedVersionNormalizer extends BaseJsonNormalizer<Models.Vulnerability.AffectedVersion> {\n normalize (data: Models.Vulnerability.AffectedVersion, options: NormalizerOptions): Normalized.Vulnerability.AffectedVersion | undefined {\n switch (true) {\n case data instanceof AffectedSingleVersion:\n return this.#normalizeAffectedSingleVersion(data)\n case data instanceof AffectedVersionRange:\n return this.#normalizeAffectedVersionRange(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected Vulnerability AffectedVersion')\n /* c8 ignore end */\n }\n }\n\n #normalizeAffectedSingleVersion (data: Models.Vulnerability.AffectedSingleVersion): Normalized.Vulnerability.AffectedSingleVersion | undefined {\n return data.version.length < 1\n // invalid value -> cannot render\n ? undefined\n : {\n version: data.version.substring(0, 1024),\n status: data.status\n }\n }\n\n #normalizeAffectedVersionRange (data: Models.Vulnerability.AffectedVersionRange): Normalized.Vulnerability.AffectedVersionRange | undefined {\n return data.range.length < 1\n // invalid value -> cannot render\n ? undefined\n : {\n range: data.range.substring(0, 1024),\n status: data.status\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.AffectedVersion>, options: NormalizerOptions): Normalized.Vulnerability.AffectedVersion[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n av => this.normalize(av, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityAnalysisNormalizer extends BaseJsonNormalizer<Models.Vulnerability.Analysis> {\n normalize (data: Models.Vulnerability.Analysis, options: NormalizerOptions): Normalized.Vulnerability.Analysis {\n return {\n state: data.state,\n justification: data.justification,\n response: data.response.size > 0\n ? (\n options.sortLists ?? false\n ? data.response.sorted()\n : Array.from(data.response)\n )\n : undefined,\n detail: data.detail\n }\n }\n}\n\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\nfunction normalizeStringableIter (data: Iterable<Stringable>, options: NormalizerOptions): string[] {\n const r = Array.from(data, d => d.toString())\n if (options.sortLists ?? false) {\n r.sort((a, b) => a.localeCompare(b))\n }\n return r\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type * as Enums from '../../enums'\nimport type { HashContent } from '../../models'\nimport type { SpdxId } from '../../spdx'\nimport type { CPE, CWE, Integer } from '../../types'\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace JsonSchema {\n\n /**\n * @see {@link isIriReference}\n */\n export type IriReference = string\n /**\n * Test whether format is JSON::iri-reference - best-effort.\n *\n * @see {@link https://datatracker.ietf.org/doc/html/rfc3987 | RFC 3987}\n *\n * @TODO add more validation according to spec\n */\n export function isIriReference (value: IriReference | any): value is IriReference {\n // There is just no working implementation for format \"iri-reference\": see https://github.com/luzlab/ajv-formats-draft2019/issues/22\n return typeof value === 'string' &&\n value.length > 0\n }\n\n /**\n * @see {@link isIdnEmail}\n */\n export type IdnEmail = string\n /**\n * Test whether format is JSON::idn-email - best-effort.\n *\n * @see {@link https://datatracker.ietf.org/doc/html/rfc6531 | RFC 6531}\n *\n * @TODO add more validation according to spec\n */\n export function isIdnEmail (value: IdnEmail | any): value is IdnEmail {\n return typeof value === 'string' &&\n value.length > 0\n }\n\n export type DateTime = string\n\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace Normalized {\n\n export type RefType = string\n export type RefLinkType = RefType\n\n export type BomLinkDocumentType = string\n export type BomLinkElementType = string\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n export type BomLink = BomLinkDocumentType | BomLinkElementType\n\n export interface Bom {\n $schema?: string\n bomFormat: 'CycloneDX'\n specVersion: string\n version: Integer\n serialNumber?: string\n metadata?: Metadata\n components?: Component[]\n services?: Service[]\n externalReferences?: ExternalReference[]\n dependencies?: Dependency[]\n vulnerabilities?: Vulnerability[]\n }\n\n export interface Metadata {\n timestamp?: JsonSchema.DateTime\n lifecycles?: Lifecycle[]\n tools?: ToolsType\n authors?: OrganizationalContact[]\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses?: License[]\n properties?: Property[]\n }\n\n export interface LifecyclePhase {\n phase: Enums.LifecyclePhase\n }\n\n export interface NamedLifecycle {\n name: string\n description?: string\n }\n\n export type Lifecycle = LifecyclePhase | NamedLifecycle\n\n export interface Tool {\n vendor?: string\n name?: string\n version?: string\n hashes?: Hash[]\n externalReferences?: ExternalReference[]\n }\n\n /** since CDX 1.5 */\n export interface Tools {\n components?: Component[]\n services?: Service[]\n }\n\n export type ToolsType = Tools | Tool[]\n\n export interface OrganizationalContact {\n name?: string\n email?: JsonSchema.IdnEmail\n phone?: string\n }\n\n export interface OrganizationalEntity {\n name?: string\n url?: JsonSchema.IriReference[]\n contact?: OrganizationalContact[]\n }\n\n export interface Hash {\n alg: Enums.HashAlgorithm\n content: HashContent\n }\n\n export interface Component {\n type: Enums.ComponentType\n name: string\n 'mime-type'?: string\n 'bom-ref'?: RefType\n supplier?: OrganizationalEntity\n author?: string\n publisher?: string\n group?: string\n version?: string\n description?: string\n scope?: Enums.ComponentScope\n hashes?: Hash[]\n licenses?: License[]\n copyright?: string\n cpe?: CPE\n purl?: string\n swid?: SWID\n modified?: boolean\n externalReferences?: ExternalReference[]\n components?: Component[]\n evidence?: ComponentEvidence\n properties?: Property[]\n }\n\n export interface Service {\n 'bom-ref'?: RefType\n provider?: OrganizationalEntity\n group?: string\n name: string\n version?: string\n description?: string\n licenses?: License[]\n externalReferences?: ExternalReference[]\n services?: Service[]\n properties?: Property[]\n }\n\n export interface ComponentEvidence {\n licenses?: License[]\n copyright?: Copyright[]\n }\n\n export interface Copyright {\n text: string\n }\n\n export interface NamedLicense {\n license: {\n name: string\n acknowledgement?: Enums.LicenseAcknowledgement\n text?: Attachment\n url?: string\n }\n }\n\n export interface SpdxLicense {\n license: {\n /* see http://cyclonedx.org/schema/spdx */\n id: SpdxId\n acknowledgement?: Enums.LicenseAcknowledgement\n text?: Attachment\n url?: string\n }\n }\n\n export interface LicenseExpression {\n expression: string\n acknowledgement?: Enums.LicenseAcknowledgement\n }\n\n export type License = NamedLicense | SpdxLicense | LicenseExpression\n\n export interface SWID {\n tagId: string\n name: string\n version?: string\n tagVersion?: Integer\n patch?: boolean\n text?: Attachment\n url?: JsonSchema.IriReference\n }\n\n export interface ExternalReference {\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n url: JsonSchema.IriReference | BomLink\n type: Enums.ExternalReferenceType\n hashes?: Hash[]\n comment?: string\n }\n\n export interface Attachment {\n content?: string\n contentType?: string\n encoding?: Enums.AttachmentEncoding\n }\n\n export interface Property {\n name?: string\n value?: string\n }\n\n export interface Dependency {\n ref: RefLinkType\n dependsOn?: RefLinkType[]\n }\n\n export interface Vulnerability {\n 'bom-ref'?: RefType\n id?: string\n source?: Vulnerability.Source\n references?: Vulnerability.Reference[]\n ratings?: Vulnerability.Rating[]\n cwes?: CWE[]\n description?: string\n detail?: string\n recommendation?: string\n advisories?: Vulnerability.Advisory[]\n created?: JsonSchema.DateTime\n published?: JsonSchema.DateTime\n updated?: JsonSchema.DateTime\n credits?: Vulnerability.Credits\n tools?: ToolsType\n analysis?: Vulnerability.Analysis\n affects?: Vulnerability.Affect[]\n properties?: Property[]\n }\n\n /* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\n export namespace Vulnerability {\n export interface Source {\n name?: string\n url?: string\n }\n\n export interface Reference {\n id: string\n source: Source\n }\n\n export interface Rating {\n source?: Source\n score?: number\n severity?: Enums.Vulnerability.Severity\n method?: Enums.Vulnerability.RatingMethod\n vector?: string\n justification?: string\n }\n\n export interface Advisory {\n title?: string\n url: JsonSchema.IriReference\n }\n\n export interface Credits {\n organizations?: OrganizationalEntity[]\n individuals?: OrganizationalContact[]\n }\n\n export interface Analysis {\n state?: Enums.Vulnerability.AnalysisState\n justification?: Enums.Vulnerability.AnalysisJustification\n response?: Enums.Vulnerability.AnalysisResponse[]\n detail?: string\n }\n\n export interface Affect {\n /* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- as of spec */\n ref: RefLinkType | BomLinkElementType\n versions?: AffectedVersion[]\n }\n\n export interface AffectedSingleVersion {\n version: string\n status?: Enums.Vulnerability.AffectStatus\n }\n\n export interface AffectedVersionRange {\n range: string\n status?: Enums.Vulnerability.AffectStatus\n }\n\n export type AffectedVersion = AffectedSingleVersion | AffectedVersionRange\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models/bom'\nimport { Format } from '../spec/enums'\nimport { UnsupportedFormatError } from '../spec/errors'\nimport { BaseSerializer } from './baseSerializer'\nimport type { Factory as NormalizerFactory } from './json/normalize'\nimport type { Normalized } from './json/types'\nimport type { NormalizerOptions, SerializerOptions } from './types'\n\n/**\n * Multi purpose Json serializer.\n */\nexport class JsonSerializer extends BaseSerializer<Normalized.Bom> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {@link Spec.UnsupportedFormatError | UnsupportedFormatError} if `normalizerFactory.spec` does not support {@link Format.JSON}.\n */\n constructor (normalizerFactory: JsonSerializer['normalizerFactory']) {\n if (!normalizerFactory.spec.supportsFormat(Format.JSON)) {\n throw new UnsupportedFormatError('Spec does not support JSON format.')\n }\n\n super()\n this.#normalizerFactory = normalizerFactory\n }\n\n get normalizerFactory (): NormalizerFactory {\n return this.#normalizerFactory\n }\n\n protected _normalize (\n bom: Bom,\n options: NormalizerOptions = {}\n ): Normalized.Bom {\n return this.#normalizerFactory.makeForBom()\n .normalize(bom, options)\n }\n\n protected _serialize (\n bom: Normalized.Bom,\n { space }: SerializerOptions = {}\n ): string {\n return JSON.stringify(bom, null, space)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models'\n\nexport interface NormalizerOptions {\n /**\n * Whether to sort lists in normalization results. Sorted lists make the output reproducible.\n */\n sortLists?: boolean\n}\n\nexport interface SerializerOptions {\n /**\n * Add indention in the serialization result. Indention increases readability for humans.\n */\n space?: string | number\n}\n\nexport interface Serializer {\n /**\n * @throws {@link Serialize.MissingOptionalDependencyError | MissingOptionalDependencyError}, when a required dependency was not installed\n * @throws {@link Error}\n */\n serialize: (bom: Bom, options?: SerializerOptions & NormalizerOptions) => string\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n// region normalizedString\n\n/** search-item for {@link normalizedString} */\nconst _normalizeStringForbiddenSearch = /\\r\\n|\\t|\\n|\\r/g\n/** replace-item for {@link normalizedString} */\nconst _normalizeStringForbiddenReplace = ' '\n\n/**\n * Make a 'normalizedString', adhering XML spec.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#normalizedString}\n *\n * @remarks\n *\n * quote from the XML schema spec:\n *\n * *normalizedString* represents white space normalized strings.\n * The [·value space·](https://www.w3.org/TR/xmlschema-2/#dt-value-space) of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.\n * The [·lexical space·](https://www.w3.org/TR/xmlschema-2/#dt-lexical-space) of normalizedString is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters.\n * The [·base type·](https://www.w3.org/TR/xmlschema-2/#dt-basetype) of normalizedString is [string](https://www.w3.org/TR/xmlschema-2/#string).\n *\n * @internal\n */\nexport function normalizedString(s: string): string {\n return s.replace(_normalizeStringForbiddenSearch, _normalizeStringForbiddenReplace)\n}\n\n// endregion\n\n// region token\n\n/** search-item for {@link token} */\nconst _tokenMultispaceSearch = / {2,}/g\n/** replace-item for {@link token} */\nconst _tokenMultispaceReplace = ' '\n\n/**\n * Make a 'token', adhering XML spec.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#token}\n *\n * @remarks\n *\n * quote from the XML schema spec:\n *\n * *token* represents tokenized strings.\n * The [·value space·](https://www.w3.org/TR/xmlschema-2/#dt-value-space) of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces.\n * The [·lexical space·](https://www.w3.org/TR/xmlschema-2/#dt-lexical-space) of token is the set of strings that do not contain the carriage return (#xD), line feed (#xA) nor tab (#x9) characters, that have no leading or trailing spaces (#x20) and that have no internal sequences of two or more spaces.\n * The [·base type·](https://www.w3.org/TR/xmlschema-2/#dt-basetype) of token is [normalizedString](https://www.w3.org/TR/xmlschema-2/#normalizedString).\n *\n * @internal\n */\nexport function token(s: string): string {\n // according to spec, `token` inherits from `normalizedString` - so we utilize it here.\n return normalizedString(s).trim().replace(_tokenMultispaceSearch, _tokenMultispaceReplace)\n}\n\n// endregion\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as Normalize from './normalize'\nexport * as Types from './types'\n// export * as Denormalize from './denormalize' // @TODO\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint complexity: [\"error\", 50 ] -- acknowledged */\n/* eslint max-lines: 'off' -- intended */\n\nimport { chainI } from \"../../_helpers/iterable\";\nimport { isNotUndefined } from '../../_helpers/notUndefined'\nimport type { SortableIterable } from '../../_helpers/sortable'\nimport type { Stringable } from '../../_helpers/stringable'\nimport { treeIteratorSymbol } from '../../_helpers/tree'\nimport { escapeUri } from '../../_helpers/uri'\nimport type * as Models from '../../models'\nimport { Tool, ToolRepository } from \"../../models\";\nimport { LicenseExpression, NamedLicense, SpdxLicense } from '../../models/license'\nimport { NamedLifecycle } from '../../models/lifecycle'\nimport { AffectedSingleVersion, AffectedVersionRange } from '../../models/vulnerability/affect'\nimport { isSupportedSpdxId } from '../../spdx'\nimport type { _SpecProtocol as Spec } from '../../spec/_protocol'\nimport { Version as SpecVersion } from '../../spec/enums'\nimport type { NormalizerOptions } from '../types'\nimport { normalizedString, token} from './_xsd'\nimport type { SimpleXml } from './types'\nimport { XmlSchema } from './types'\n\n\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: Factory['spec']) {\n this.#spec = spec\n }\n\n get spec (): Spec {\n return this.#spec\n }\n\n makeForBom (): BomNormalizer {\n return new BomNormalizer(this)\n }\n\n makeForMetadata (): MetadataNormalizer {\n return new MetadataNormalizer(this)\n }\n\n makeForLifecycle (): LifecycleNormalizer {\n return new LifecycleNormalizer(this)\n }\n\n makeForComponent (): ComponentNormalizer {\n return new ComponentNormalizer(this)\n }\n\n makeForService (): ServiceNormalizer {\n return new ServiceNormalizer(this)\n }\n\n\n\n makeForComponentEvidence (): ComponentEvidenceNormalizer {\n return new ComponentEvidenceNormalizer(this)\n }\n\n makeForTool (): ToolNormalizer {\n return new ToolNormalizer(this)\n }\n\n makeForTools (): ToolsNormalizer {\n return new ToolsNormalizer(this)\n }\n\n makeForOrganizationalContact (): OrganizationalContactNormalizer {\n return new OrganizationalContactNormalizer(this)\n }\n\n makeForOrganizationalEntity (): OrganizationalEntityNormalizer {\n return new OrganizationalEntityNormalizer(this)\n }\n\n makeForHash (): HashNormalizer {\n return new HashNormalizer(this)\n }\n\n makeForLicense (): LicenseNormalizer {\n return new LicenseNormalizer(this)\n }\n\n makeForSWID (): SWIDNormalizer {\n return new SWIDNormalizer(this)\n }\n\n makeForExternalReference (): ExternalReferenceNormalizer {\n return new ExternalReferenceNormalizer(this)\n }\n\n makeForAttachment (): AttachmentNormalizer {\n return new AttachmentNormalizer(this)\n }\n\n makeForProperty (): PropertyNormalizer {\n return new PropertyNormalizer(this)\n }\n\n makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n\n makeForVulnerability (): VulnerabilityNormalizer {\n return new VulnerabilityNormalizer(this)\n }\n\n makeForVulnerabilitySource (): VulnerabilitySourceNormalizer {\n return new VulnerabilitySourceNormalizer(this)\n }\n\n makeForVulnerabilityReference (): VulnerabilityReferenceNormalizer {\n return new VulnerabilityReferenceNormalizer(this)\n }\n\n makeForVulnerabilityRating (): VulnerabilityRatingNormalizer {\n return new VulnerabilityRatingNormalizer(this)\n }\n\n makeForVulnerabilityAdvisory (): VulnerabilityAdvisoryNormalizer {\n return new VulnerabilityAdvisoryNormalizer(this)\n }\n\n makeForVulnerabilityCredits (): VulnerabilityCreditsNormalizer {\n return new VulnerabilityCreditsNormalizer(this)\n }\n\n makeForVulnerabilityAffect (): VulnerabilityAffectNormalizer {\n return new VulnerabilityAffectNormalizer(this)\n }\n\n makeForVulnerabilityAffectedVersion (): VulnerabilityAffectedVersionNormalizer {\n return new VulnerabilityAffectedVersionNormalizer(this)\n }\n\n makeForVulnerabilityAnalysis (): VulnerabilityAnalysisNormalizer {\n return new VulnerabilityAnalysisNormalizer(this)\n }\n}\n\nconst xmlNamespace: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot7, 'http://cyclonedx.org/schema/bom/1.7'],\n [SpecVersion.v1dot6, 'http://cyclonedx.org/schema/bom/1.6'],\n [SpecVersion.v1dot5, 'http://cyclonedx.org/schema/bom/1.5'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom/1.4'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom/1.3'],\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom/1.2'],\n [SpecVersion.v1dot1, 'http://cyclonedx.org/schema/bom/1.1'],\n [SpecVersion.v1dot0, 'http://cyclonedx.org/schema/bom/1.0']\n])\n\ninterface XmlNormalizer<TModel, TNormalized> {\n normalize: (data: TModel, options: NormalizerOptions, elementName?: string) => TNormalized | undefined\n\n normalizeIterable?: (data: SortableIterable<TModel>, options: NormalizerOptions, elementName: string) => TNormalized[]\n}\n\nabstract class BaseXmlNormalizer<TModel, TNormalized = SimpleXml.Element> implements XmlNormalizer<TModel, TNormalized> {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n get factory (): Factory {\n return this._factory\n }\n\n /**\n * @param elementName - element name. XML defines structures; the element's name is defined on usage of a structure.\n */\n abstract normalize (data: TModel, options: NormalizerOptions, elementName?: string): TNormalized | undefined\n}\n\n/* eslint-disable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions --\n * since empty strings need to be treated as undefined/null\n */\n\nexport class BomNormalizer extends BaseXmlNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions): SimpleXml.Element {\n const components: SimpleXml.Element = {\n // spec < 1.4 always requires a 'components' element\n type: 'element',\n name: 'components',\n children: data.components.size > 0\n ? this._factory.makeForComponent().normalizeIterable(data.components, options, 'component')\n : undefined\n }\n const services: SimpleXml.Element | undefined = this._factory.spec.supportsServices && data.services.size > 0\n ? {\n type: 'element',\n name: 'services',\n children: this._factory.makeForService().normalizeIterable(data.services, options, 'service')\n }\n : undefined\n const vulnerabilities: SimpleXml.Element | undefined = this._factory.spec.supportsVulnerabilities && data.vulnerabilities.size > 0\n ? {\n type: 'element',\n name: 'vulnerabilities',\n children: this._factory.makeForVulnerability().normalizeIterable(data.vulnerabilities, options, 'vulnerability')\n }\n : undefined\n return {\n type: 'element',\n // the element's name is hardcoded in the XSD\n name: 'bom',\n namespace: xmlNamespace.get(this._factory.spec.version),\n attributes: {\n version: data.version,\n serialNumber: this.#isEligibleSerialNumber(data.serialNumber)\n ? data.serialNumber\n : undefined\n },\n children: [\n this._factory.makeForMetadata().normalize(data.metadata, options, 'metadata'),\n components,\n services,\n this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options, 'dependencies')\n : undefined,\n vulnerabilities\n ].filter(isNotUndefined)\n }\n }\n\n #isEligibleSerialNumber (v: string | undefined): boolean {\n return v !== undefined &&\n // see https://github.com/CycloneDX/specification/blob/ef71717ae0ecb564c0b4c9536d6e9e57e35f2e69/schema/bom-1.4.xsd#L699\n /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$|^\\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\\}$/.test(v)\n }\n}\n\nexport class MetadataNormalizer extends BaseXmlNormalizer<Models.Metadata> {\n normalize (data: Models.Metadata, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n const lifecycles: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataLifecycles && data.lifecycles.size > 0\n ? {\n type: 'element',\n name: 'lifecycles',\n children: this._factory.makeForLifecycle().normalizeIterable(data.lifecycles, options, 'lifecycle')\n }\n : undefined\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options, 'tools')\n : undefined\n const authors: SimpleXml.Element | undefined = data.authors.size > 0\n ? {\n type: 'element',\n name: 'authors',\n children: this._factory.makeForOrganizationalContact().normalizeIterable(data.authors, options, 'author')\n }\n : undefined\n const licenses: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataLicenses && data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const properties: SimpleXml.Element | undefined = this._factory.spec.supportsMetadataProperties && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalDateTimeElement(data.timestamp, 'timestamp'),\n lifecycles,\n tools,\n authors,\n data.component === undefined\n ? undefined\n : this._factory.makeForComponent().normalize(data.component, options, 'component'),\n data.manufacture === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.manufacture, options, 'manufacture'),\n data.supplier === undefined\n ? undefined\n : orgEntityNormalizer.normalize(data.supplier, options, 'supplier'),\n licenses,\n properties\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class LifecycleNormalizer extends BaseXmlNormalizer<Models.Lifecycle> {\n normalize (data: Models.Lifecycle, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return data instanceof NamedLifecycle\n ? {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.description, 'description')\n ].filter(isNotUndefined)\n }\n : {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data, 'phase')\n ]\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Lifecycle>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options, elementName))\n }\n}\n\nexport class ToolNormalizer extends BaseXmlNormalizer<Models.Tool> {\n normalize (data: Models.Tool, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n const externalReferences: SimpleXml.Element | undefined =\n this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.vendor, 'vendor', normalizedString),\n makeOptionalTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.version, 'version', normalizedString),\n hashes,\n externalReferences\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Tool>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(t => this.normalize(t, options, elementName))\n }\n}\n\nexport class ToolsNormalizer extends BaseXmlNormalizer<Models.Tools> {\n normalize (data: Models.Tools, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n let children: SimpleXml.Element[] = []\n if (data.tools.size > 0 || !this._factory.spec.supportsToolsComponentsServices) {\n children = this._factory.makeForTool().normalizeIterable(\n new ToolRepository(chainI(\n Array.from(data.components, Tool.fromComponent),\n Array.from(data.services, Tool.fromService),\n data.tools,\n )), options, 'tool')\n } else {\n if (data.components.size > 0) {\n children.push({\n type: 'element',\n name: 'components',\n children: this._factory.makeForComponent().normalizeIterable(data.components, options, 'component')\n })\n }\n if (data.services.size > 0) {\n children.push({\n type: 'element',\n name: 'services',\n children: this._factory.makeForService().normalizeIterable(data.services, options, 'service')\n })\n }\n }\n return {\n type: 'element',\n name: elementName,\n children\n }\n }\n}\n\nexport class HashNormalizer extends BaseXmlNormalizer<Models.Hash> {\n normalize ([algorithm, content]: Models.Hash, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const spec = this._factory.spec\n return spec.supportsHashAlgorithm(algorithm) && spec.supportsHashValue(content)\n ? {\n type: 'element',\n name: elementName,\n attributes: { alg: algorithm },\n children: token(content)\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.Hash>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n h => this.normalize(h, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends BaseXmlNormalizer<Models.OrganizationalContact> {\n normalize (data: Models.OrganizationalContact, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.email, 'email', normalizedString),\n makeOptionalTextElement(data.phone, 'phone', normalizedString)\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalContact>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oc => this.normalize(oc, options, elementName))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends BaseXmlNormalizer<Models.OrganizationalEntity> {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n ...makeTextElementIter(Array.from(\n data.url, (s): string => escapeUri(s.toString())\n ), options, 'url'\n ).filter(({ children: u }) => XmlSchema.isAnyURI(u)),\n ...this._factory.makeForOrganizationalContact().normalizeIterable(data.contact, options, 'contact')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.OrganizationalEntity>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(oe => this.normalize(oe, options, elementName))\n }\n}\n\nexport class ComponentNormalizer extends BaseXmlNormalizer<Models.Component> {\n normalize (data: Models.Component, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const spec = this._factory.spec\n if (!spec.supportsComponentType(data.type)) {\n return undefined\n }\n const supplier: SimpleXml.Element | undefined = data.supplier === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.supplier, options, 'supplier')\n const version: SimpleXml.Element | undefined = (\n spec.requiresComponentVersion\n ? makeTextElement\n : makeOptionalTextElement\n )(\n data.version ?? '',\n 'version',\n normalizedString\n )\n const hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const swid: SimpleXml.Element | undefined = data.swid === undefined\n ? undefined\n : this._factory.makeForSWID().normalize(data.swid, options, 'swid')\n const extRefs: SimpleXml.Element | undefined = data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = spec.supportsProperties(data) && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n const components: SimpleXml.Element | undefined = data.components.size > 0\n ? {\n type: 'element',\n name: 'components',\n children: this.normalizeIterable(data.components, options, 'component')\n }\n : undefined\n const evidence: SimpleXml.Element | undefined = spec.supportsComponentEvidence && data.evidence !== undefined\n ? this._factory.makeForComponentEvidence().normalize(data.evidence, options, 'evidence')\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: {\n type: data.type,\n 'bom-ref': data.bomRef.value\n },\n children: [\n supplier,\n makeOptionalTextElement(data.author, 'author', normalizedString),\n makeOptionalTextElement(data.publisher, 'publisher', normalizedString),\n makeOptionalTextElement(data.group, 'group', normalizedString),\n makeTextElement(data.name, 'name', normalizedString),\n version,\n makeOptionalTextElement(data.description, 'description', normalizedString),\n makeOptionalTextElement(data.scope, 'scope'),\n hashes,\n licenses,\n makeOptionalTextElement(data.copyright, 'copyright', normalizedString),\n makeOptionalTextElement(data.cpe, 'cpe'),\n makeOptionalTextElement(data.purl, 'purl'),\n swid,\n extRefs,\n properties,\n components,\n evidence\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Component>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n c => this.normalize(c, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class ServiceNormalizer extends BaseXmlNormalizer<Models.Service> {\n normalize (data: Models.Service, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const spec = this._factory.spec\n const provider: SimpleXml.Element | undefined = data.provider === undefined\n ? undefined\n : this._factory.makeForOrganizationalEntity().normalize(data.provider, options, 'provider')\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const extRefs: SimpleXml.Element | undefined = data.externalReferences.size > 0\n ? {\n type: 'element',\n name: 'externalReferences',\n children: this._factory.makeForExternalReference().normalizeIterable(data.externalReferences, options, 'reference')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = spec.supportsProperties(data) && data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n const services: SimpleXml.Element | undefined = data.services.size > 0\n ? {\n type: 'element',\n name: 'services',\n children: this.normalizeIterable(data.services, options, 'service')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: {\n 'bom-ref': data.bomRef.value\n },\n children: [\n provider,\n makeOptionalTextElement(data.group, 'group', normalizedString),\n makeTextElement(data.name, 'name', normalizedString),\n makeOptionalTextElement(data.version, 'version', normalizedString),\n makeOptionalTextElement(data.description, 'description', normalizedString),\n licenses,\n extRefs,\n properties,\n services,\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Service>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n s => this.normalize(s, options, elementName)\n )\n }\n}\n\n\nexport class ComponentEvidenceNormalizer extends BaseXmlNormalizer<Models.ComponentEvidence> {\n normalize (data: Models.ComponentEvidence, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const licenses: SimpleXml.Element | undefined = data.licenses.size > 0\n ? {\n type: 'element',\n name: 'licenses',\n children: this._factory.makeForLicense().normalizeIterable(data.licenses, options)\n }\n : undefined\n const copyright: SimpleXml.Element | undefined = data.copyright.size > 0\n ? {\n type: 'element',\n name: 'copyright',\n children: makeTextElementIter(data.copyright, options, 'text')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n licenses,\n copyright\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class LicenseNormalizer extends BaseXmlNormalizer<Models.License> {\n normalize (data: Models.License, options: NormalizerOptions): SimpleXml.Element {\n switch (true) {\n case data instanceof NamedLicense:\n return this.#normalizeNamedLicense(data, options)\n case data instanceof SpdxLicense:\n return isSupportedSpdxId(data.id)\n ? this.#normalizeSpdxLicense(data, options)\n : this.#normalizeNamedLicense(new NamedLicense(\n // prevent information loss -> convert to broader type\n data.id,\n { url: data.url }\n ), options)\n case data instanceof LicenseExpression:\n return this.#normalizeLicenseExpression(data)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n /* c8 ignore end */\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: 'license',\n attributes: {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n },\n children: [\n makeTextElement(data.name, 'name', normalizedString),\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: 'license',\n attributes: {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n },\n children: [\n makeTextElement(data.id, 'id'),\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): SimpleXml.Element {\n const elem = makeTextElement(data.expression, 'expression', normalizedString)\n elem.attributes = {\n acknowledgement: this._factory.spec.supportsLicenseAcknowledgement\n ? data.acknowledgement\n : undefined\n }\n return elem\n }\n\n /**\n * If there is any {@link Models.LicenseExpression | LicenseExpression} in the set, then this is the only item that is normalized.\n */\n normalizeIterable (data: SortableIterable<Models.License>, options: NormalizerOptions): SimpleXml.Element[] {\n const licenses = options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n\n if (licenses.length > 1) {\n const expressions = licenses.filter(l => l instanceof LicenseExpression)\n if (expressions.length > 0) {\n // could have thrown {@link RangeError} when there is more than one only {@link Models.LicenseExpression | LicenseExpression}.\n // but let's be graceful and just normalize to the most relevant choice: any expression\n return [this.#normalizeLicenseExpression(expressions[0])]\n }\n }\n\n return licenses.map(l => this.normalize(l, options))\n }\n}\n\nexport class SWIDNormalizer extends BaseXmlNormalizer<Models.SWID> {\n normalize (data: Models.SWID, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: elementName,\n attributes: {\n tagId: data.tagId,\n name: data.name,\n version: data.version || undefined,\n tagVersion: data.tagVersion,\n patch: data.patch === undefined\n ? undefined\n : (data.patch ? 'true' : 'false')\n },\n children: [\n data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options, 'text'),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ExternalReferenceNormalizer extends BaseXmlNormalizer<Models.ExternalReference> {\n normalize (data: Models.ExternalReference, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = escapeUri(data.url.toString())\n const hashes: SimpleXml.Element | undefined = this._factory.spec.supportsExternalReferenceHashes && data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeIterable(data.hashes, options, 'hash')\n }\n : undefined\n return this._factory.spec.supportsExternalReferenceType(data.type) &&\n XmlSchema.isAnyURI(url)\n ? {\n type: 'element',\n name: elementName,\n attributes: {\n type: data.type\n },\n children: [\n makeTextElement(url, 'url'),\n makeOptionalTextElement(data.comment, 'comment'),\n hashes\n ].filter(isNotUndefined)\n }\n : undefined\n }\n\n normalizeIterable (data: SortableIterable<Models.ExternalReference>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n r => this.normalize(r, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends BaseXmlNormalizer<Models.Attachment> {\n normalize (data: Models.Attachment, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n attributes: {\n 'content-type': data.contentType\n ? normalizedString(data.contentType)\n : undefined,\n encoding: data.encoding || undefined\n },\n children: data.content.toString()\n }\n }\n}\n\nexport class PropertyNormalizer extends BaseXmlNormalizer<Models.Property> {\n normalize (data: Models.Property, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n attributes: {\n name: data.name\n },\n children: normalizedString(data.value)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Property>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(p => this.normalize(p, options, elementName))\n }\n}\n\nexport class DependencyGraphNormalizer extends BaseXmlNormalizer<Models.Bom> {\n normalize (data: Models.Bom, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const allRefs = new Map<Models.BomRef, Models.BomRefRepository>()\n if (data.metadata.component !== undefined) {\n allRefs.set(data.metadata.component.bomRef, data.metadata.component.dependencies)\n for (const component of data.metadata.component.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIteratorSymbol]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n for (const service of data.services[treeIteratorSymbol]()) {\n allRefs.set(service.bomRef, service.dependencies)\n }\n\n const normalized: Array<(SimpleXml.Element & { attributes: { ref: string } })> = []\n for (const [ref, deps] of allRefs) {\n const dep = this.#normalizeDependency(ref, deps, allRefs, options)\n if (isNotUndefined(dep)) {\n normalized.push(dep)\n }\n }\n\n if (options.sortLists ?? false) {\n normalized.sort(\n ({ attributes: { ref: a } }, { attributes: { ref: b } }) => a.localeCompare(b))\n }\n\n return {\n type: 'element',\n name: elementName,\n children: normalized\n }\n }\n\n #normalizeDependency (\n ref: Models.BomRef,\n deps: Models.BomRefRepository,\n allRefs: Map<Models.BomRef, Models.BomRefRepository>,\n options: NormalizerOptions\n ): undefined | (SimpleXml.Element & { attributes: { ref: string } }) {\n const bomRef = ref.toString()\n if (bomRef.length === 0) {\n // no value -> cannot render\n return undefined\n }\n\n const dependsOn: string[] = Array.from(deps).filter(d => allRefs.has(d) && d !== ref)\n .map(d => d.toString()).filter(d => d.length > 0)\n if (options.sortLists ?? false) {\n dependsOn.sort((a, b) => a.localeCompare(b))\n }\n\n return {\n type: 'element',\n name: 'dependency',\n attributes: { ref: bomRef },\n children: dependsOn.map(d => ({\n type: 'element',\n name: 'dependency',\n attributes: { ref: d }\n }))\n }\n }\n}\n\nexport class VulnerabilityNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Vulnerability> {\n normalize (data: Models.Vulnerability.Vulnerability, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const references: SimpleXml.Element | undefined = data.references.size > 0\n ? {\n type: 'element',\n name: 'references',\n children: this._factory.makeForVulnerabilityReference().normalizeIterable(data.references, options, 'reference')\n }\n : undefined\n const ratings: SimpleXml.Element | undefined = data.ratings.size > 0\n ? {\n type: 'element',\n name: 'ratings',\n children: this._factory.makeForVulnerabilityRating().normalizeIterable(data.ratings, options, 'rating')\n }\n : undefined\n const cwes: SimpleXml.Element | undefined = data.cwes.size > 0\n ? {\n type: 'element',\n name: 'cwes',\n children: (\n options.sortLists\n ? data.cwes.sorted()\n : Array.from(data.cwes)\n ).map(cwe => makeTextElement(cwe, 'cwe'))\n }\n : undefined\n const advisories: SimpleXml.Element | undefined = data.advisories.size > 0\n ? {\n type: 'element',\n name: 'advisories',\n children: this._factory.makeForVulnerabilityAdvisory().normalizeIterable(data.advisories, options, 'advisory')\n }\n : undefined\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? this._factory.makeForTools().normalize(data.tools, options, 'tools')\n : undefined\n const affects: SimpleXml.Element | undefined = data.affects.size > 0\n ? {\n type: 'element',\n name: 'affects',\n children: this._factory.makeForVulnerabilityAffect().normalizeIterable(data.affects, options, 'target')\n }\n : undefined\n const properties: SimpleXml.Element | undefined = data.properties.size > 0\n ? {\n type: 'element',\n name: 'properties',\n children: this._factory.makeForProperty().normalizeIterable(data.properties, options, 'property')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n attributes: { 'bom-ref': data.bomRef.value || undefined },\n children: [\n makeOptionalTextElement(data.id, 'id', normalizedString),\n data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source'),\n references,\n ratings,\n cwes,\n makeOptionalTextElement(data.description, 'description'),\n makeOptionalTextElement(data.detail, 'detail'),\n makeOptionalTextElement(data.recommendation, 'recommendation'),\n advisories,\n makeOptionalDateTimeElement(data.created, 'created'),\n makeOptionalDateTimeElement(data.created, 'published'),\n makeOptionalDateTimeElement(data.created, 'updated'),\n data.credits === undefined\n ? undefined\n : this._factory.makeForVulnerabilityCredits().normalize(data.credits, options, 'credits'),\n tools,\n data.analysis === undefined\n ? undefined\n : this._factory.makeForVulnerabilityAnalysis().normalize(data.analysis, options, 'analysis'),\n affects,\n properties\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Vulnerability>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(v => this.normalize(v, options, elementName))\n }\n}\n\nexport class VulnerabilitySourceNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Source> {\n normalize (data: Models.Vulnerability.Source, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = escapeUri(data.url?.toString())\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.name, 'name', normalizedString),\n XmlSchema.isAnyURI(url)\n ? makeTextElement(url, 'url')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityReferenceNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Reference> {\n normalize (data: Models.Vulnerability.Reference, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.id, 'id'),\n this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source')\n ]\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Reference>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options, elementName))\n }\n}\n\nexport class VulnerabilityRatingNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Rating> {\n normalize (data: Models.Vulnerability.Rating, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n data.source === undefined\n ? undefined\n : this._factory.makeForVulnerabilitySource().normalize(data.source, options, 'source'),\n makeOptionalTextElement(data.score, 'score'),\n makeOptionalTextElement(data.severity, 'severity'),\n this._factory.spec.supportsVulnerabilityRatingMethod(data.method)\n ? makeOptionalTextElement(data.method, 'method')\n : undefined,\n makeOptionalTextElement(data.vector, 'vector', normalizedString),\n makeOptionalTextElement(data.justification, 'justification')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Rating>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options, elementName))\n }\n}\n\nexport class VulnerabilityAdvisoryNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Advisory> {\n normalize (data: Models.Vulnerability.Advisory, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = escapeUri(data.url.toString())\n if (!XmlSchema.isAnyURI(url)) {\n // invalid value -> cannot render\n return undefined\n }\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.title, 'title'),\n makeTextElement(url, 'url')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Advisory>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(\n a => this.normalize(a, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class VulnerabilityCreditsNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Credits> {\n normalize (data: Models.Vulnerability.Credits, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const organizations: SimpleXml.Element | undefined = data.organizations.size > 0\n ? {\n type: 'element',\n name: 'organizations',\n children: this._factory.makeForOrganizationalEntity().normalizeIterable(data.organizations, options, 'organization')\n }\n : undefined\n const individuals: SimpleXml.Element | undefined = data.individuals.size > 0\n ? {\n type: 'element',\n name: 'individuals',\n children: this._factory.makeForOrganizationalContact().normalizeIterable(data.individuals, options, 'individual')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n organizations,\n individuals\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityAnalysisNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Analysis> {\n normalize (data: Models.Vulnerability.Analysis, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const responses: SimpleXml.Element | undefined = data.response.size > 0\n ? {\n type: 'element',\n name: 'responses',\n children: (\n options.sortLists ?? false\n ? data.response.sorted()\n : Array.from(data.response)\n ).map(ar => makeTextElement(ar, 'response'))\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.state, 'state'),\n makeOptionalTextElement(data.justification, 'justification'),\n responses,\n makeOptionalTextElement(data.detail, 'detail')\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class VulnerabilityAffectNormalizer extends BaseXmlNormalizer<Models.Vulnerability.Affect> {\n normalize (data: Models.Vulnerability.Affect, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const versions: SimpleXml.Element | undefined = data.versions.size > 0\n ? {\n type: 'element',\n name: 'versions',\n children: this._factory.makeForVulnerabilityAffectedVersion().normalizeIterable(data.versions, options, 'version')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.ref, 'ref'),\n versions\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.Affect>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(a => this.normalize(a, options, elementName))\n }\n}\n\nexport class VulnerabilityAffectedVersionNormalizer extends BaseXmlNormalizer<Models.Vulnerability.AffectedVersion> {\n normalize (data: Models.Vulnerability.AffectedVersion, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n switch (true) {\n case data instanceof AffectedSingleVersion:\n return this.#normalizeAffectedSingleVersion(data, elementName)\n case data instanceof AffectedVersionRange:\n return this.#normalizeAffectedVersionRange(data, elementName)\n /* c8 ignore start */\n default:\n // this case is expected to never happen - and therefore is undocumented\n throw new TypeError('Unexpected Vulnerability AffectedVersion')\n /* c8 ignore end */\n }\n }\n\n #normalizeAffectedSingleVersion (data: Models.Vulnerability.AffectedSingleVersion, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.version, 'version', normalizedString),\n makeOptionalTextElement(data.status, 'status')\n ].filter(isNotUndefined)\n }\n }\n\n #normalizeAffectedVersionRange (data: Models.Vulnerability.AffectedVersionRange, elementName: string): SimpleXml.Element {\n return {\n type: 'element',\n name: elementName,\n children: [\n makeTextElement(data.range, 'range', normalizedString),\n makeOptionalTextElement(data.status, 'status')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeIterable (data: SortableIterable<Models.Vulnerability.AffectedVersion>, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(av => this.normalize(av, options, elementName))\n }\n}\n\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\ntype StrictTextElement = SimpleXml.TextElement & { children: string }\n\ntype TextElementModifier = (i:string) => string\nconst noTEM: TextElementModifier = (s) => s\n\nfunction makeOptionalTextElement (data: null | undefined | Stringable, elementName: string, mod: TextElementModifier = noTEM): undefined | StrictTextElement {\n const s = mod(data?.toString() ?? '')\n return s.length > 0\n ? makeTextElement(s, elementName)\n : undefined\n}\n\nfunction makeTextElement (data: Stringable, elementName: string, mod: TextElementModifier = noTEM): StrictTextElement {\n return {\n type: 'element',\n name: elementName,\n children: mod(data.toString())\n }\n}\n\nfunction makeTextElementIter (data: Iterable<Stringable>, options: NormalizerOptions, elementName: string, mod: TextElementModifier = noTEM): StrictTextElement[] {\n const r: StrictTextElement[] = Array.from(data, d => makeTextElement(d, elementName, mod))\n if (options.sortLists ?? false) {\n r.sort(({ children: a }, { children: b }) => a.localeCompare(b))\n }\n return r\n}\n\nfunction makeOptionalDateTimeElement (data: null | undefined | Date, elementName: string, mod: TextElementModifier = noTEM): undefined | StrictTextElement {\n const d = data?.toISOString()\n return d === undefined\n ? undefined\n : makeTextElement(d, elementName, mod)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace XmlSchema {\n\n const _AnyUriSchemePattern = /^[a-z][a-z0-9+\\-.]*$/i\n\n /**\n * @see {@link isAnyURI}\n */\n export type AnyURI = string\n\n /**\n * Test whether format is XML::anyURI - best-effort.\n *\n * @see {@link http://www.w3.org/TR/xmlschema-2/#anyURI | anyURI spec}\n * @see {@link https://www.w3.org/2011/04/XMLSchema/TypeLibrary-URI-RFC3986.xsd | RFC 3986}\n * @see {@link https://www.w3.org/2011/04/XMLSchema/TypeLibrary-IRI-RFC3987.xsd | RFC 3987}\n *\n * @TODO add more validation according to spec\n */\n export function isAnyURI (value: AnyURI | any): value is AnyURI {\n if (typeof value !== 'string') {\n // not a string\n return false\n }\n if (value.length === 0) {\n // empty string\n return false\n }\n\n const fragmentPos = value.indexOf('#')\n let beforeFragment = value\n if (fragmentPos >= 0) {\n if (value.includes('#', fragmentPos + 1)) {\n // has a second fragment marker\n return false\n }\n beforeFragment = value.slice(undefined, fragmentPos)\n }\n\n const schemePos = beforeFragment.indexOf(':')\n if (schemePos >= 0) {\n if (!_AnyUriSchemePattern.test(beforeFragment.slice(undefined, schemePos))) {\n // invalid schema\n return false\n }\n }\n\n return true\n }\n\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-namespace -- needed */\nexport namespace SimpleXml {\n\n /**\n * Attribute's name.\n *\n * Must be alphanumeric.\n * Must start with alpha.\n * Must not contain whitespace characters.\n * Should not be literal \"xmlns\".\n */\n export type AttributeName = string\n\n /**\n * Element's name.\n *\n * Must be alphanumeric.\n * Must start with alpha.\n * Must not contain whitespace characters.\n */\n export type ElementName = string\n\n /**\n * Textual representation.\n *\n * Be aware that low-/high-bytes could be represented as numbers.\n * They might need to be converted on serialization.\n */\n export type Text = string | number\n\n /**\n * Unset representation.\n *\n * Do NOT allow null here, as it is context-aware sometimes an empty string or unset,\n * in a space where context is unknown.\n */\n export type Unset = undefined\n\n export type ElementAttributes = Record<AttributeName, Text | Unset>\n\n export type ElementChildren = Iterable<Comment | Element> | Text | Unset\n\n /**\n * Element node.\n */\n export interface Element {\n type: 'element'\n name: ElementName\n namespace?: string | URL\n attributes?: ElementAttributes\n children?: ElementChildren\n }\n\n /**\n * Element node with textual content\n */\n export interface TextElement extends Element {\n children: Text\n }\n\n /**\n * Comment node.\n */\n export interface Comment {\n type: 'comment'\n text?: Text\n }\n\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { Bom } from '../models'\nimport { Format } from '../spec/enums'\nimport { UnsupportedFormatError } from '../spec/errors'\nimport { BaseSerializer } from './baseSerializer'\nimport type { NormalizerOptions } from './types'\nimport type { Factory as NormalizerFactory } from './xml/normalize'\nimport type { SimpleXml } from './xml/types'\n\n/**\n * Base XML serializer.\n */\nexport abstract class XmlBaseSerializer extends BaseSerializer<SimpleXml.Element> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {@link Spec.UnsupportedFormatError | UnsupportedFormatError} if `normalizerFactory.spec` does not support {@link Format.XML}.\n */\n constructor (normalizerFactory: XmlBaseSerializer['normalizerFactory']) {\n if (!normalizerFactory.spec.supportsFormat(Format.XML)) {\n throw new UnsupportedFormatError('Spec does not support XML format.')\n }\n\n super()\n this.#normalizerFactory = normalizerFactory\n }\n\n get normalizerFactory (): NormalizerFactory {\n return this.#normalizerFactory\n }\n\n protected _normalize (\n bom: Bom,\n options: NormalizerOptions = {}\n ): SimpleXml.Element {\n return this.#normalizerFactory.makeForBom()\n .normalize(bom, options)\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { isNotUndefined } from '../_helpers/notUndefined'\nimport type { SerializerOptions } from './types'\nimport type { SimpleXml } from './xml/types'\nimport { XmlBaseSerializer } from './xmlBaseSerializer'\n\n/**\n * XML serializer for web browsers.\n */\nexport class XmlSerializer extends XmlBaseSerializer {\n protected _serialize (\n normalizedBom: SimpleXml.Element,\n { space }: SerializerOptions = {}\n ): string {\n const doc = this.#buildXmlDocument(normalizedBom)\n // @TODO: add indention based on `space`\n return (new XMLSerializer()).serializeToString(doc)\n }\n\n #buildXmlDocument (\n rootElement: SimpleXml.Element\n ): XMLDocument {\n const namespace = null\n const doc = document.implementation.createDocument(namespace, null)\n doc.appendChild(this.#buildElement(rootElement, doc, namespace))\n return doc\n }\n\n #getNS (element: SimpleXml.Element): string | null {\n const ns = (element.namespace ?? element.attributes?.xmlns)?.toString() ?? ''\n return ns.length > 0\n ? ns\n : null\n }\n\n #buildElement (element: SimpleXml.Element, doc: XMLDocument, parentNS: string | null): Element {\n const ns = this.#getNS(element) ?? parentNS\n const node: Element = doc.createElementNS(ns, element.name)\n if (isNotUndefined(element.attributes)) {\n this.#setAttributes(node, element.attributes)\n }\n if (isNotUndefined(element.children)) {\n this.#addChildren(node, element.children, ns)\n }\n return node\n }\n\n #setAttributes (node: Element, attributes: SimpleXml.ElementAttributes): void {\n for (const [name, value] of Object.entries(attributes)) {\n if (isNotUndefined(value) && name !== 'xmlns') {\n // reminder: cannot change a namespace(xmlns) after the fact.\n node.setAttribute(name, `${value}`)\n }\n }\n }\n\n #addChildren (node: Element, children: SimpleXml.ElementChildren, parentNS: string | null = null): void {\n if (children === undefined) {\n return\n }\n\n if (typeof children === 'string' || typeof children === 'number') {\n node.textContent = children.toString() /* eslint-disable-line no-param-reassign -- ack */\n return\n }\n\n const doc = node.ownerDocument\n for (const child of children) {\n if (child.type === 'element') {\n node.appendChild(this.#buildElement(child, doc, parentNS))\n }\n // comments are not implemented, yet\n }\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport spdxExpressionParse from 'spdx-expression-parse'\n\n/* @ts-expect-error: TS6059 -- this works as long as the file/path is available in dist-package. */\nimport { enum as _spdxSpecEnum } from '../res/schema/spdx.SNAPSHOT.schema.json' with { type: 'json' }\n\n/**\n * One of the known SPDX licence identifiers.\n *\n * @see {@link http://cyclonedx.org/schema/spdx | SPDX schema}\n * @see {@link isSupportedSpdxId}\n * @see {@link fixupSpdxId}\n */\nexport type SpdxId = string\n\nconst spdxIds: ReadonlySet<SpdxId> = new Set(_spdxSpecEnum)\n\nconst spdxLowerToActual: Readonly<Record<string, SpdxId>> = Object.freeze(Object.fromEntries(\n _spdxSpecEnum.map(spdxId => [spdxId.toLowerCase(), spdxId])\n))\n\nexport function isSupportedSpdxId (value: SpdxId | any): value is SpdxId {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return spdxIds.has(value)\n}\n\n/** Try to convert a `string`-like to a valid/known {@link SpdxId}. */\nexport function fixupSpdxId (value: string | any): SpdxId | undefined {\n return typeof value === 'string' && value.length > 0\n ? spdxLowerToActual[value.toLowerCase()]\n : undefined\n}\n\nexport function isValidSpdxLicenseExpression (value: string | any): boolean {\n if (typeof value !== 'string') {\n return false\n }\n try {\n spdxExpressionParse(value)\n } catch (err) {\n return false\n }\n return true\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport type { ComponentType, ExternalReferenceType, HashAlgorithm, Vulnerability } from '../enums'\nimport type { HashContent } from '../models'\nimport type { Format, Version } from './enums'\n\n/**\n * This interface is not intended to be public API.\n * This interface may be affected by breaking changes without notice.\n *\n * See the public exported constants, like {@link Spec.Spec1dot4}, that provide objects implementing this interface.\n * See also {@link Spec.SpecVersionDict} for implementations.\n */\nexport interface _SpecProtocol {\n version: Version\n supportsFormat: (f: Format | any) => boolean\n supportsComponentType: (ct: ComponentType | any) => boolean\n supportsHashAlgorithm: (ha: HashAlgorithm | any) => boolean\n supportsHashValue: (hv: HashContent | any) => boolean\n supportsExternalReferenceType: (ert: ExternalReferenceType | any) => boolean\n supportsDependencyGraph: boolean\n supportsToolReferences: boolean\n requiresComponentVersion: boolean\n supportsProperties: (model: any) => boolean\n supportsVulnerabilities: boolean\n supportsVulnerabilityRatingMethod: (rm: Vulnerability.RatingMethod | any) => boolean\n supportsComponentEvidence: boolean\n supportsMetadataLifecycles: boolean\n supportsMetadataLicenses: boolean\n supportsMetadataProperties: boolean\n supportsExternalReferenceHashes: boolean\n supportsLicenseAcknowledgement: boolean\n supportsServices: boolean\n supportsToolsComponentsServices: boolean\n}\n\n/**\n * This class was never intended to be public API,\n *\n * This is a helper to get the exact spec-versions implemented according to {@link _SpecProtocol | Specification}.\n *\n * @internal as this class may be affected by breaking changes without notice\n */\nexport class _Spec implements _SpecProtocol {\n readonly #version: Version\n readonly #formats: ReadonlySet<Format>\n readonly #componentTypes: ReadonlySet<ComponentType>\n readonly #hashAlgorithms: ReadonlySet<HashAlgorithm>\n readonly #hashValuePattern: RegExp\n readonly #externalReferenceTypes: ReadonlySet<ExternalReferenceType>\n readonly #vulnerabilityRatingMethods: ReadonlySet<Vulnerability.RatingMethod>\n readonly #supportsDependencyGraph: boolean\n readonly #supportsToolReferences: boolean\n readonly #requiresComponentVersion: boolean\n readonly #supportsProperties: boolean\n readonly #supportsVulnerabilities: boolean\n readonly #supportsComponentEvidence: boolean\n readonly #supportsMetadataLifecycles: boolean\n readonly #supportsMetadataLicenses: boolean\n readonly #supportsMetadataProperties: boolean\n readonly #supportsExternalReferenceHashes: boolean\n readonly #supportsLicenseAcknowledgement: boolean\n readonly #supportsServices: boolean\n readonly #supportsToolsComponentsServices: boolean\n\n /* eslint-disable-next-line @typescript-eslint/max-params -- architectural decision */\n constructor (\n version: Version,\n formats: Iterable<Format>,\n componentTypes: Iterable<ComponentType>,\n hashAlgorithms: Iterable<HashAlgorithm>,\n hashValuePattern: RegExp,\n externalReferenceTypes: Iterable<ExternalReferenceType>,\n supportsDependencyGraph: boolean,\n supportsToolReferences: boolean,\n requiresComponentVersion: boolean,\n supportsProperties: boolean,\n supportsVulnerabilities: boolean,\n vulnerabilityRatingMethods: Iterable<Vulnerability.RatingMethod>,\n supportsComponentEvidence: boolean,\n supportsMetadataLifecycles: boolean,\n supportsMetadataLicenses: boolean,\n supportsMetadataProperties: boolean,\n supportsExternalReferenceHashes: boolean,\n supportsLicenseAcknowledgement: boolean,\n supportsServices: boolean,\n supportsToolsComponentsServices: boolean\n ) {\n this.#version = version\n this.#formats = new Set(formats)\n this.#componentTypes = new Set(componentTypes)\n this.#hashAlgorithms = new Set(hashAlgorithms)\n this.#hashValuePattern = hashValuePattern\n this.#externalReferenceTypes = new Set(externalReferenceTypes)\n this.#supportsDependencyGraph = supportsDependencyGraph\n this.#supportsToolReferences = supportsToolReferences\n this.#requiresComponentVersion = requiresComponentVersion\n this.#supportsProperties = supportsProperties\n this.#supportsVulnerabilities = supportsVulnerabilities\n this.#vulnerabilityRatingMethods = new Set(vulnerabilityRatingMethods)\n this.#supportsComponentEvidence = supportsComponentEvidence\n this.#supportsMetadataLifecycles = supportsMetadataLifecycles\n this.#supportsMetadataLicenses = supportsMetadataLicenses\n this.#supportsMetadataProperties = supportsMetadataProperties\n this.#supportsExternalReferenceHashes = supportsExternalReferenceHashes\n this.#supportsLicenseAcknowledgement = supportsLicenseAcknowledgement\n this.#supportsServices = supportsServices\n this.#supportsToolsComponentsServices = supportsToolsComponentsServices\n }\n\n get version (): Version {\n return this.#version\n }\n\n supportsFormat (f: Format | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#formats.has(f)\n }\n\n supportsComponentType (ct: ComponentType | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#componentTypes.has(ct)\n }\n\n supportsHashAlgorithm (ha: HashAlgorithm | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#hashAlgorithms.has(ha)\n }\n\n supportsHashValue (hv: HashContent | any): boolean {\n return typeof hv === 'string' &&\n this.#hashValuePattern.test(hv)\n }\n\n supportsExternalReferenceType (ert: ExternalReferenceType | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- fix */\n return this.#externalReferenceTypes.has(ert)\n }\n\n get supportsDependencyGraph (): boolean {\n return this.#supportsDependencyGraph\n }\n\n get supportsToolReferences (): boolean {\n return this.#supportsToolReferences\n }\n\n get requiresComponentVersion (): boolean {\n return this.#requiresComponentVersion\n }\n\n supportsProperties (): boolean {\n // currently a global allow/deny -- might work based on input, in the future\n return this.#supportsProperties\n }\n\n get supportsVulnerabilities (): boolean {\n return this.#supportsVulnerabilities\n }\n\n supportsVulnerabilityRatingMethod (rm: Vulnerability.RatingMethod | any): boolean {\n /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- any */\n return this.#vulnerabilityRatingMethods.has(rm)\n }\n\n get supportsComponentEvidence (): boolean {\n return this.#supportsComponentEvidence\n }\n\n get supportsMetadataLifecycles (): boolean {\n return this.#supportsMetadataLifecycles\n }\n\n get supportsMetadataLicenses (): boolean {\n return this.#supportsMetadataLicenses\n }\n\n get supportsMetadataProperties (): boolean {\n return this.#supportsMetadataProperties\n }\n\n get supportsExternalReferenceHashes (): boolean {\n return this.#supportsExternalReferenceHashes\n }\n\n get supportsLicenseAcknowledgement (): boolean {\n return this.#supportsLicenseAcknowledgement\n }\n\n get supportsServices (): boolean {\n return this.#supportsServices\n }\n\n get supportsToolsComponentsServices(): boolean {\n return this.#supportsToolsComponentsServices\n }\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/* eslint-disable max-lines -- ack */\n\nimport { ComponentType } from '../enums/componentType'\nimport { ExternalReferenceType } from '../enums/externalReferenceType'\nimport { HashAlgorithm } from '../enums/hashAlogorithm'\nimport { RatingMethod as VulnerabilityRatingMethod } from '../enums/vulnerability/ratingMethod'\nimport type { _SpecProtocol } from './_protocol'\nimport { _Spec } from './_protocol'\nimport { Format, Version } from './enums'\n\n/** Specification v1.2 */\nexport const Spec1dot2: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot2,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.Other\n ],\n true,\n false,\n true,\n false,\n false,\n [],\n false,\n false,\n false,\n false,\n false,\n false,\n true,\n false\n))\n\n/** Specification v1.3 */\nexport const Spec1dot3: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot3,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.Other\n ],\n true,\n false,\n true,\n true,\n false,\n [],\n true,\n false,\n true,\n true,\n true,\n false,\n true,\n false\n))\n\n/** Specification v1.4 */\nexport const Spec1dot4: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot4,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.Firmware,\n ComponentType.File\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.Other\n ],\n true,\n false,\n true,\n true,\n true,\n false,\n true,\n false\n))\n\n/** Specification v1.5 */\nexport const Spec1dot5: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot5,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.Platform,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.DeviceDriver,\n ComponentType.Firmware,\n ComponentType.File,\n ComponentType.MachineLearningModel,\n ComponentType.Data\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.DistributionIntake,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.SecurityContact,\n ExternalReferenceType.ModelCard,\n ExternalReferenceType.Log,\n ExternalReferenceType.Configuration,\n ExternalReferenceType.Evidence,\n ExternalReferenceType.Formulation,\n ExternalReferenceType.Attestation,\n ExternalReferenceType.ThreatModel,\n ExternalReferenceType.AdversaryModel,\n ExternalReferenceType.RiskAssessment,\n ExternalReferenceType.VulnerabilityAssertion,\n ExternalReferenceType.ExploitabilityStatement,\n ExternalReferenceType.PentestReport,\n ExternalReferenceType.StaticAnalysisReport,\n ExternalReferenceType.DynamicAnalysisReport,\n ExternalReferenceType.RuntimeAnalysisReport,\n ExternalReferenceType.ComponentAnalysisReport,\n ExternalReferenceType.MaturityReport,\n ExternalReferenceType.CertificationReport,\n ExternalReferenceType.CodifiedInfrastructure,\n ExternalReferenceType.QualityMetrics,\n ExternalReferenceType.POAM,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.CVSSv4,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.SSVC,\n VulnerabilityRatingMethod.Other\n ],\n true,\n true,\n true,\n true,\n true,\n false,\n true,\n true\n))\n\n/** Specification v1.6 */\nexport const Spec1dot6: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot6,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.Platform,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.DeviceDriver,\n ComponentType.Firmware,\n ComponentType.File,\n ComponentType.MachineLearningModel,\n ComponentType.Data,\n ComponentType.CryptographicAsset\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.SourceDistribution,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.DistributionIntake,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.SecurityContact,\n ExternalReferenceType.ModelCard,\n ExternalReferenceType.Log,\n ExternalReferenceType.Configuration,\n ExternalReferenceType.Evidence,\n ExternalReferenceType.Formulation,\n ExternalReferenceType.Attestation,\n ExternalReferenceType.ThreatModel,\n ExternalReferenceType.AdversaryModel,\n ExternalReferenceType.RiskAssessment,\n ExternalReferenceType.VulnerabilityAssertion,\n ExternalReferenceType.ExploitabilityStatement,\n ExternalReferenceType.PentestReport,\n ExternalReferenceType.StaticAnalysisReport,\n ExternalReferenceType.DynamicAnalysisReport,\n ExternalReferenceType.RuntimeAnalysisReport,\n ExternalReferenceType.ComponentAnalysisReport,\n ExternalReferenceType.MaturityReport,\n ExternalReferenceType.CertificationReport,\n ExternalReferenceType.CodifiedInfrastructure,\n ExternalReferenceType.QualityMetrics,\n ExternalReferenceType.POAM,\n ExternalReferenceType.ElectronicSignature,\n ExternalReferenceType.DigitalSignature,\n ExternalReferenceType.RFC9116,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.CVSSv4,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.SSVC,\n VulnerabilityRatingMethod.Other\n ],\n true,\n true,\n true,\n true,\n true,\n true,\n true,\n true\n))\n\n\n/** Specification v1.7 */\nexport const Spec1dot7: Readonly<_SpecProtocol> = Object.freeze(new _Spec(\n Version.v1dot7,\n [\n Format.XML,\n Format.JSON\n ],\n [\n ComponentType.Application,\n ComponentType.Framework,\n ComponentType.Library,\n ComponentType.Container,\n ComponentType.Platform,\n ComponentType.OperatingSystem,\n ComponentType.Device,\n ComponentType.DeviceDriver,\n ComponentType.Firmware,\n ComponentType.File,\n ComponentType.MachineLearningModel,\n ComponentType.Data,\n ComponentType.CryptographicAsset\n ],\n [\n HashAlgorithm.MD5,\n HashAlgorithm['SHA-1'],\n HashAlgorithm['SHA-256'],\n HashAlgorithm['SHA-384'],\n HashAlgorithm['SHA-512'],\n HashAlgorithm['SHA3-256'],\n HashAlgorithm['SHA3-384'],\n HashAlgorithm['SHA3-512'],\n HashAlgorithm['BLAKE2b-256'],\n HashAlgorithm['BLAKE2b-384'],\n HashAlgorithm['BLAKE2b-512'],\n HashAlgorithm.BLAKE3,\n HashAlgorithm['Streebog-256'],\n HashAlgorithm['Streebog-512'],\n ],\n /^([a-fA-F0-9]{32})$|^([a-fA-F0-9]{40})$|^([a-fA-F0-9]{64})$|^([a-fA-F0-9]{96})$|^([a-fA-F0-9]{128})$/,\n [\n ExternalReferenceType.VCS,\n ExternalReferenceType.IssueTracker,\n ExternalReferenceType.Website,\n ExternalReferenceType.Advisories,\n ExternalReferenceType.BOM,\n ExternalReferenceType.MailingList,\n ExternalReferenceType.Social,\n ExternalReferenceType.Chat,\n ExternalReferenceType.Documentation,\n ExternalReferenceType.Support,\n ExternalReferenceType.SourceDistribution,\n ExternalReferenceType.Distribution,\n ExternalReferenceType.DistributionIntake,\n ExternalReferenceType.License,\n ExternalReferenceType.BuildMeta,\n ExternalReferenceType.BuildSystem,\n ExternalReferenceType.ReleaseNotes,\n ExternalReferenceType.SecurityContact,\n ExternalReferenceType.ModelCard,\n ExternalReferenceType.Log,\n ExternalReferenceType.Configuration,\n ExternalReferenceType.Evidence,\n ExternalReferenceType.Formulation,\n ExternalReferenceType.Attestation,\n ExternalReferenceType.ThreatModel,\n ExternalReferenceType.AdversaryModel,\n ExternalReferenceType.RiskAssessment,\n ExternalReferenceType.VulnerabilityAssertion,\n ExternalReferenceType.ExploitabilityStatement,\n ExternalReferenceType.PentestReport,\n ExternalReferenceType.StaticAnalysisReport,\n ExternalReferenceType.DynamicAnalysisReport,\n ExternalReferenceType.RuntimeAnalysisReport,\n ExternalReferenceType.ComponentAnalysisReport,\n ExternalReferenceType.MaturityReport,\n ExternalReferenceType.CertificationReport,\n ExternalReferenceType.CodifiedInfrastructure,\n ExternalReferenceType.QualityMetrics,\n ExternalReferenceType.POAM,\n ExternalReferenceType.ElectronicSignature,\n ExternalReferenceType.DigitalSignature,\n ExternalReferenceType.RFC9116,\n ExternalReferenceType.Citation,\n ExternalReferenceType.Patent,\n ExternalReferenceType.PatentAssertion,\n ExternalReferenceType.PatentFamily,\n ExternalReferenceType.RFC9116,\n ExternalReferenceType.Other\n ],\n true,\n true,\n false,\n true,\n true,\n [\n VulnerabilityRatingMethod.CVSSv2,\n VulnerabilityRatingMethod.CVSSv3,\n VulnerabilityRatingMethod.CVSSv31,\n VulnerabilityRatingMethod.CVSSv4,\n VulnerabilityRatingMethod.OWASP,\n VulnerabilityRatingMethod.SSVC,\n VulnerabilityRatingMethod.Other\n ],\n true,\n true,\n true,\n true,\n true,\n true,\n true,\n true\n))\n\nexport const SpecVersionDict: Readonly<Partial<Record<Version, Readonly<_SpecProtocol>>>> = Object.freeze({\n [Version.v1dot7]: Spec1dot7,\n [Version.v1dot6]: Spec1dot6,\n [Version.v1dot5]: Spec1dot5,\n [Version.v1dot4]: Spec1dot4,\n [Version.v1dot3]: Spec1dot3,\n [Version.v1dot2]: Spec1dot2\n // <= v1.1 is not implemented\n})\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport enum Version {\n v1dot7 = '1.7',\n v1dot6 = '1.6',\n v1dot5 = '1.5',\n v1dot4 = '1.4',\n v1dot3 = '1.3',\n v1dot2 = '1.2',\n v1dot1 = '1.1',\n v1dot0 = '1.0',\n}\n\nexport enum Format {\n XML = 'xml',\n JSON = 'json',\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport class UnsupportedFormatError extends Error {\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './consts'\nexport * from './enums'\nexport * from './errors'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Specifies a well-formed CPE name that conforms to the CPE 2.2 or 2.3 specification.\n * See the [official specification](https://nvd.nist.gov/products/cpe).\n *\n * @see {@link isCPE}\n */\nexport type CPE = string\n\n/* eslint-disable-next-line no-useless-escape -- value directly from XML, revert special-chars(like `&` -> `&`), and surrounded with `^` and `$` */\nconst cpePattern = /^([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$|^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#$$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#$$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){4})$/\n\nexport function isCPE (value: any): value is CPE {\n return typeof value === 'string' &&\n cpePattern.test(value)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { SortableNumbers } from '../_helpers/sortable'\nimport type { PositiveInteger } from './integer'\nimport { isPositiveInteger } from './integer'\n\n/**\n * Integer representation of a Common Weaknesses Enumerations (CWE).\n *\n * @example\n * value `399` might represent `https://cwe.mitre.org/data/definitions/399.html`.\n *\n * @see {@link isCWE}\n */\nexport type CWE = PositiveInteger\n\nexport function isCWE (value: any): value is CWE {\n return isPositiveInteger(value)\n}\n\n/* eslint-disable-next-line @typescript-eslint/no-unnecessary-type-arguments -- docs */\nexport class CweRepository extends SortableNumbers<CWE> {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './cpe'\nexport * from './cwe'\nexport * from './integer'\nexport * from './mimeType'\n\n// yes, this is node-specific, but who cares - these are just types\nexport * from './nodePackageJson'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Integer\n *\n * @see {@link isInteger}\n */\n/* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- intended */\nexport type Integer = number | NonNegativeInteger\n\nexport function isInteger (value: any): value is Integer {\n return Number.isInteger(value)\n}\n\n/**\n * Integer greater than or equal to `0`\n *\n * @see {@link isNonNegativeInteger}\n */\n/* eslint-disable-next-line @typescript-eslint/no-duplicate-type-constituents -- intended */\nexport type NonNegativeInteger = number | PositiveInteger\n\nexport function isNonNegativeInteger (value: any): value is NonNegativeInteger {\n return isInteger(value) &&\n value >= 0\n}\n\n/**\n * Integer greater `0`\n *\n * @see {@link isPositiveInteger}\n */\nexport type PositiveInteger = number\n\nexport function isPositiveInteger (value: any): value is PositiveInteger {\n return isInteger(value) &&\n value > 0\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * @see {@link isMimeType}\n */\nexport type MimeType = string\n\n/* regular expression was taken from the CycloneDX schema definitions. */\nconst mimeTypePattern = /^[-+a-z0-9.]+\\/[-+a-z0-9.]+$/\n\nexport function isMimeType (value: any): value is MimeType {\n return typeof value === 'string' &&\n mimeTypePattern.test(value)\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Intended to represent normalized data structures\n * based on [PackageJson spec](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/package.json)\n * and explained by [PackageJson description](https://docs.npmjs.com/cli/v9/configuring-npm/package-json).\n *\n * Normalization should be done downstream, for example\n * via [`normalize-package-data`](https://www.npmjs.com/package/normalize-package-data).\n */\nexport interface NodePackageJson {\n name?: string\n version?: string\n description?: string\n license?: string\n licenses?: Array<{\n type?: string\n url?: string\n }>\n author?: string | {\n name?: string\n email?: string\n }\n bugs?: string | {\n url?: string\n }\n homepage?: string\n repository?: string | {\n type?: string\n url?: string\n directory?: string\n }\n // ... to be continued\n dist?: any // see https://github.com/CycloneDX/cyclonedx-node-npm/issues/1300\n}\n\n/**\n *\n * Not implemented, yet.\n * TODO: write type guard -- pull-requests welcome\n *\n * @alpha\n */\nexport function isNodePackageJson (value: any): value is NodePackageJson {\n throw new Error('Not implemented')\n /* possible implementation:\n try { assertNodePackageJson(value) }\n catch { return false }\n return true\n */\n}\n\n/**\n *\n * Not implemented, yet.\n * TODO: write type assertion -- pull-requests welcome\n *\n * @throws {@link Error} on error; includes qualitative message\n *\n * @alpha\n */\nexport function assertNodePackageJson (value: any): asserts value is NodePackageJson {\n throw new Error('Not implemented')\n /* possible implementation:\n if ( value === null || value === undefined ) { throw new Error('value not an object') }\n if ( !(typeof value.name in ['undefined', 'string']) ) { throw new Error('unexpected name') }\n etc...\n */\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Generate valid random SerialNumbers for {@link Models.Bom.serialNumber | Models.Bom.serialNumber}.\n */\nexport function randomSerialNumber (): string {\n const b = [\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n // UUID version 4\n Math.round(Math.random() * 0x0FFF) | 0x4000,\n // UUID version 4 variant 1\n Math.round(Math.random() * 0x3FFF) | 0x8000,\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF),\n Math.round(Math.random() * 0xFFFF)\n ].map(n => n.toString(16).padStart(4, '0'))\n return `urn:uuid:${b[0]}${b[1]}-${b[2]}-${b[3]}-${b[4]}-${b[5]}${b[6]}${b[7]}`\n}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * as BomUtility from './bomUtility'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// ... nothing yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nimport { OptPlugError } from '../_optPlug.node/errors'\nimport type { Version } from '../spec'\n\nexport class NotImplementedError extends Error {\n constructor (version: Version) {\n super(`not implemented for CycloneDX version: ${version}`)\n }\n}\n\nexport class MissingOptionalDependencyError extends OptPlugError {}\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './errors'\n/* eslint-disable-next-line @typescript-eslint/consistent-type-exports -- backwards-compat TS4 */\nexport * as Types from './types'\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\nexport * from './index.common'\n\n// region web-specifics\n\n// there is no JSON validator for the web, yet\n// there is no XML validator for the web, yet\n\n// endregion web-specifics\n","/*!\nThis file is part of CycloneDX JavaScript Library.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nSPDX-License-Identifier: Apache-2.0\nCopyright (c) OWASP Foundation. All Rights Reserved.\n*/\n\n/**\n * Details and information describing a validation error.\n */\nexport type ValidationError = NonNullable<any>\n\nexport interface Validator {\n /**\n * Promise completes with one of the following:\n * - `null`, when data was valid\n * - {@link ValidationError | something} representing the error details, when data was invalid\n *\n * Promise rejects with one of the following:\n * - {@link Validation.NotImplementedError | NotImplementedError}, when there is no validator available\n * - {@link Validation.MissingOptionalDependencyError | MissingOptionalDependencyError}, when a required dependency was not installed\n * - {@link Error}\n */\n validate: (data: string) => Promise<null | ValidationError>\n}\n","module.exports = require(\"packageurl-js\");","module.exports = require(\"spdx-expression-parse\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.web.ts\");\n",""],"names":[],"sourceRoot":""}
|