@cyclonedx/cyclonedx-library 1.0.2 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +2 -1
  2. package/dist.node/builders/{fromPackageJson.node.js → fromNodePackageJson.node.js} +10 -1
  3. package/dist.node/builders/fromNodePackageJson.node.js.map +1 -0
  4. package/dist.node/builders/index.node.js +3 -2
  5. package/dist.node/builders/index.node.js.map +1 -1
  6. package/dist.node/factories/{fromPackageJson.node.js → fromNodePackageJson.node.js} +1 -1
  7. package/dist.node/factories/fromNodePackageJson.node.js.map +1 -0
  8. package/dist.node/factories/index.node.js +3 -2
  9. package/dist.node/factories/index.node.js.map +1 -1
  10. package/dist.node/factories/packageUrl.js +17 -5
  11. package/dist.node/factories/packageUrl.js.map +1 -1
  12. package/dist.node/helpers/tree.js +23 -0
  13. package/dist.node/helpers/tree.js.map +1 -0
  14. package/dist.node/models/component.js +8 -0
  15. package/dist.node/models/component.js.map +1 -1
  16. package/dist.node/serialize/bomRefDiscriminator.js +3 -0
  17. package/dist.node/serialize/bomRefDiscriminator.js.map +1 -1
  18. package/dist.node/serialize/json/normalize.js +18 -4
  19. package/dist.node/serialize/json/normalize.js.map +1 -1
  20. package/dist.node/serialize/jsonSerializer.js +3 -0
  21. package/dist.node/serialize/jsonSerializer.js.map +1 -1
  22. package/dist.node/serialize/xml/normalize.js +24 -5
  23. package/dist.node/serialize/xml/normalize.js.map +1 -1
  24. package/dist.node/serialize/xmlBaseSerializer.js +3 -0
  25. package/dist.node/serialize/xmlBaseSerializer.js.map +1 -1
  26. package/dist.node/spec.js +11 -6
  27. package/dist.node/spec.js.map +1 -1
  28. package/dist.node/types/cpe.js +1 -1
  29. package/dist.node/types/cpe.js.map +1 -1
  30. package/dist.web/lib.dev.js +120 -21
  31. package/dist.web/lib.dev.js.map +1 -1
  32. package/dist.web/lib.js +1 -1
  33. package/package.json +4 -2
  34. package/src/builders/{fromPackageJson.node.ts → fromNodePackageJson.node.ts} +16 -4
  35. package/src/builders/index.node.ts +4 -1
  36. package/src/factories/{fromPackageJson.node.ts → fromNodePackageJson.node.ts} +0 -0
  37. package/src/factories/index.node.ts +4 -1
  38. package/src/factories/packageUrl.ts +31 -8
  39. package/src/helpers/tree.ts +20 -0
  40. package/src/models/component.ts +10 -0
  41. package/src/serialize/bomRefDiscriminator.ts +5 -0
  42. package/src/serialize/json/normalize.ts +19 -5
  43. package/src/serialize/jsonSerializer.ts +4 -0
  44. package/src/serialize/xml/normalize.ts +30 -9
  45. package/src/serialize/xmlBaseSerializer.ts +4 -0
  46. package/src/spec.ts +16 -4
  47. package/src/types/cpe.ts +2 -2
  48. package/dist.node/builders/fromPackageJson.node.js.map +0 -1
  49. package/dist.node/factories/fromPackageJson.node.js.map +0 -1
@@ -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,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,uCAAiB;AACnB,CAAC,EAFW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAE7B;;;;;;;;;;;;ACrBD;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB;IACrB,uCAAqB;IACrB,uCAAqB;AACvB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;;;;;;;;;;;;ACvBD;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,IAAY,aASX;AATD,WAAY,aAAa;IACvB,4CAA2B;IAC3B,wCAAuB;IACvB,oCAAmB;IACnB,wCAAuB;IACvB,qDAAoC;IACpC,kCAAiB;IACjB,sCAAqB;IACrB,8BAAa;AACf,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB;;;;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AC,SAAS,CAAC,KAAK,CAAC;AAChC,CAAC;AAFD,8BAEC;AAQD,SAAgB,oBAAoB,CAAE,KAAU;IAC9C,OAAO,SAAS,CAAC,KAAK,CAAC;QACrB,KAAK,IAAI,CAAC;AACd,CAAC;AAHD,oDAGC;AAQD,SAAgB,iBAAiB,CAAE,KAAU;IAC3C,OAAO,SAAS,CAAC,KAAK,CAAC;QACjB,KAAK,GAAG,CAAC;AACjB,CAAC;AAHD,8CAGC;;;;;;;;;;;;ACjDD;;;;;;;;;;;;;;;;;EAiBE;;;AAQF,MAAM,eAAe,GAAG,8BAA8B;AAEtD,SAAgB,UAAU,CAAE,KAAU;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC1B,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;AACnC,CAAC;AAHD,gCAGC;;;;;;;;;;;;AC9BD;;;;;;;;;;;;;;;;;EAiBE;;;AAUF,MAAM,cAAc,GAAG,yEAAyE;AAEhG,SAAgB,SAAS,CAAE,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC3B,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,CAAC;AAHD,8BAGC;;;;;;;;;;;AChCD;;;;;;;;;;;;;;;;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/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/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/helpers/notUndefined.ts","webpack://CycloneDX_library/./src/helpers/sortableSet.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/bomRef.ts","webpack://CycloneDX_library/./src/models/component.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/metadata.ts","webpack://CycloneDX_library/./src/models/organizationalContact.ts","webpack://CycloneDX_library/./src/models/organizationalEntity.ts","webpack://CycloneDX_library/./src/models/swid.ts","webpack://CycloneDX_library/./src/models/tool.ts","webpack://CycloneDX_library/./src/serialize/baseSerializer.ts","webpack://CycloneDX_library/./src/serialize/bomRefDiscriminator.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/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.ts","webpack://CycloneDX_library/./src/types/cpe.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/urn.ts","webpack://CycloneDX_library/external umd \"PackageURL\"","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(require(\"PackageURL\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"PackageURL\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CycloneDX_library\"] = factory(require(\"PackageURL\"));\n\telse\n\t\troot[\"CycloneDX_library\"] = factory(root[\"PackageURL\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE_packageurl_js__) => {\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 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 OperatingSystem = 'operating-system',\n Device = 'device',\n Firmware = 'firmware',\n File = 'file',\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 Distribution = 'distribution',\n License = 'license',\n BuildMeta = 'build-meta',\n BuildSystem = 'build-system',\n ReleaseNotes = 'release-notes',\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'\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","/*!\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 { DisjunctiveLicense, License, LicenseExpression, NamedLicense, SpdxLicense } from '../models'\nimport { fixupSpdxId } from '../spdx'\n\nexport class LicenseFactory {\n makeFromString (value: string): License {\n try {\n return this.makeExpression(value)\n } catch (Error) {\n return this.makeDisjunctive(value)\n }\n }\n\n /**\n * @throws {RangeError} if expression is not eligible\n */\n makeExpression (value: string): LicenseExpression {\n return new LicenseExpression(value)\n }\n\n makeDisjunctive (value: string): DisjunctiveLicense {\n try {\n return this.makeDisjunctiveWithId(value)\n } catch (error) {\n return this.makeDisjunctiveWithName(value)\n }\n }\n\n /**\n * @throws {RangeError} if value is not supported SPDX id\n */\n makeDisjunctiveWithId (value: string | any): SpdxLicense {\n const spdxId = fixupSpdxId(String(value))\n if (undefined === spdxId) {\n throw new RangeError('Unsupported SPDX id')\n }\n\n return new SpdxLicense(spdxId)\n }\n\n makeDisjunctiveWithName (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 { Component } from '../models'\nimport { PackageURL } from 'packageurl-js'\nimport { ExternalReferenceType } from '../enums'\n\nexport class PackageUrlFactory {\n readonly #type: string\n\n constructor (type: PackageURL['type']) {\n this.#type = type\n }\n\n makeFromComponent (component: Component): PackageURL | undefined {\n const qualifiers: { [key: string]: string } = {}\n let subpath: string | undefined\n\n for (const e of component.externalReferences) {\n if (e.type === ExternalReferenceType.VCS) {\n [qualifiers.vcs_url, subpath] = e.url.toString().split('#', 2)\n break\n }\n }\n\n try {\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 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\nexport interface Comparable {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n compare: (other: any) => number\n}\n\nexport abstract class SortableSet<T extends Comparable> extends Set<T> {\n sorted (): T[] {\n return Array.from(this).sort((a: T, b: T) => a.compare(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 * as Types from './types'\nexport * as Enums from './enums'\nexport * as SPDX from './spdx'\nexport * as Models from './models'\nexport * as Factories from './factories/index.web'\nexport * as Spec from './spec'\nexport * as Serialize from './serialize/index.web'\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\nimport { AttachmentEncoding } from '../enums'\n\ninterface OptionalProperties {\n contentType?: Attachment['contentType']\n encoding?: Attachment['encoding']\n}\n\nexport class Attachment {\n contentType?: string\n content: string\n encoding?: AttachmentEncoding\n\n constructor (content: string, op: OptionalProperties = {}) {\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 { isPositiveInteger, isUrnUuid, PositiveInteger, UrnUuid } from '../types'\nimport { Metadata } from './metadata'\nimport { ComponentRepository } from './component'\n\ninterface OptionalProperties {\n metadata?: Bom['metadata']\n components?: Bom['components']\n version?: Bom['version']\n serialNumber?: Bom['serialNumber']\n}\n\nexport class Bom {\n metadata: Metadata\n components: ComponentRepository\n\n /** @see version */\n #version: PositiveInteger = 1\n\n /** @see serialNumber */\n #serialNumber?: UrnUuid\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 {TypeError} if {@see op.version} is not {@see PositiveInteger} nor {@see undefined}\n * @throws {TypeError} if {@see op.serialNumber} is neither {@see UrnUuid} nor {@see undefined}\n */\n constructor (op: OptionalProperties = {}) {\n this.metadata = op.metadata ?? new Metadata()\n this.components = op.components ?? new ComponentRepository()\n this.version = op.version ?? this.version\n this.serialNumber = op.serialNumber\n }\n\n get version (): PositiveInteger {\n return this.#version\n }\n\n /**\n * @throws {TypeError} if value is not {@see 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 (): UrnUuid | undefined {\n return this.#serialNumber\n }\n\n /**\n * @throws {TypeError} if value is neither {@see UrnUuid} nor {@see undefined}\n */\n set serialNumber (value: UrnUuid | undefined) {\n if (value !== undefined && !isUrnUuid(value)) {\n throw new TypeError('Not UrnUuid nor undefined')\n }\n this.#serialNumber = 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\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 {\n value?: string\n\n constructor (value?: string) {\n this.value = value\n }\n\n compare (other: BomRef): 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 { PackageURL } from 'packageurl-js'\n\nimport { CPE, isCPE } from '../types'\nimport { ComponentScope, ComponentType } from '../enums'\nimport { BomRef, BomRefRepository } from './bomRef'\nimport { HashRepository } from './hash'\nimport { OrganizationalEntity } from './organizationalEntity'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { LicenseRepository } from './license'\nimport { SWID } from './swid'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\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 dependencies?: Component['dependencies']\n cpe?: Component['cpe']\n}\n\nexport class Component implements Comparable {\n type: ComponentType\n name: string\n author?: string\n copyright?: string\n description?: string\n externalReferences: ExternalReferenceRepository\n group?: string\n hashes: HashRepository\n licenses: LicenseRepository\n publisher?: string\n purl?: PackageURL\n scope?: ComponentScope\n supplier?: OrganizationalEntity\n swid?: SWID\n version?: string\n dependencies: BomRefRepository\n\n /** @see bomRef */\n readonly #bomRef: BomRef\n\n /** @see cpe */\n #cpe?: CPE\n\n /**\n * @throws {TypeError} if {@see op.cpe} is neither {@see CPE} nor {@see undefined}\n */\n constructor (type: ComponentType, name: string, op: OptionalProperties = {}) {\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 HashRepository()\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.dependencies = op.dependencies ?? new BomRefRepository()\n this.cpe = op.cpe\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 {TypeError} if value is neither {@see CPE} nor {@see 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.toString().localeCompare(other.#cpe.toString())\n }\n /* eslint-disable-next-line @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 }\n}\n\nexport class ComponentRepository extends SortableSet<Component> {\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 { ExternalReferenceType } from '../enums'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\n comment?: ExternalReference['comment']\n}\n\nexport class ExternalReference implements Comparable {\n url: URL | string\n type: ExternalReferenceType\n comment?: string\n\n constructor (url: URL | string, type: ExternalReferenceType, op: OptionalProperties = {}) {\n this.url = url\n this.type = type\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 SortableSet<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 { HashAlgorithm } from '../enums'\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 HashRepository -\n // this way a HashRepository can be constructed from multiple Hash objects.\n algorithm: HashAlgorithm,\n content: HashContent\n]\n\nexport class HashRepository extends Map<Hash[0], Hash[1]> {\n #compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return a1.localeCompare(a2) ||\n c1.localeCompare(c2)\n }\n\n sorted (): Hash[] {\n return Array.from(this.entries()).sort(this.#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 './bomRef'\nexport * from './component'\nexport * from './externalReference'\nexport * from './hash'\nexport * from './license'\nexport * from './metadata'\nexport * from './organizationalContact'\nexport * from './organizationalEntity'\nexport * from './swid'\nexport * from './tool'\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 { isSupportedSpdxId, SpdxId } from '../spdx'\nimport { Attachment } from './attachment'\n\nexport class LicenseExpression {\n static isEligibleExpression (expression: string | any): boolean {\n // smallest known: (A or B)\n return typeof expression === 'string' &&\n expression.length >= 8 &&\n expression[0] === '(' &&\n expression[expression.length - 1] === ')'\n }\n\n /** @see expression */\n #expression!: string\n\n /**\n * @throws {RangeError} if {@see expression} is not eligible({@see LicenseExpression.isEligibleExpression})\n */\n constructor (expression: string) {\n this.expression = expression\n }\n\n get expression (): string {\n return this.#expression\n }\n\n /**\n * @throws {RangeError} if expression is not eligible({@see LicenseExpression.isEligibleExpression})\n */\n set expression (value: string) {\n if (!LicenseExpression.isEligibleExpression(value)) {\n throw new RangeError('Not eligible expression')\n }\n this.#expression = value\n }\n\n compare (other: LicenseExpression): number {\n return this.#expression.localeCompare(other.#expression)\n }\n}\n\ninterface NamedLicenseOptionalProperties {\n text?: NamedLicense['text']\n url?: NamedLicense['url']\n}\n\nexport class NamedLicense {\n name: string\n text?: Attachment\n url?: URL | string\n\n constructor (name: string, op: NamedLicenseOptionalProperties = {}) {\n this.name = name\n this.text = op.text\n this.url = op.url\n }\n\n compare (other: NamedLicense): number {\n return this.name.localeCompare(other.name)\n }\n}\n\ninterface SpdxLicenseOptionalProperties {\n text?: SpdxLicense['text']\n url?: SpdxLicense['url']\n}\n\nexport class SpdxLicense {\n text?: Attachment\n url?: URL | string\n\n /** @see id */\n #id!: SpdxId\n\n /**\n * @throws {RangeError} if {@see id} is not supported SPDX id({@see isSupportedSpdxId})\n */\n constructor (id: SpdxId, op: SpdxLicenseOptionalProperties = {}) {\n this.id = id\n this.text = op.text\n this.url = op.url\n }\n\n get id (): SpdxId {\n return this.#id\n }\n\n /**\n * @throws {RangeError} if value is not supported SPDX id({@see isSupportedSpdxId})\n */\n set id (value: SpdxId) {\n if (!isSupportedSpdxId(value)) {\n throw new RangeError('Unknown SPDX id')\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> {\n #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(this.#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 { Component } from './component'\nimport { ToolRepository } from './tool'\nimport { OrganizationalEntity } from './organizationalEntity'\nimport { OrganizationalContactRepository } from './organizationalContact'\n\ninterface OptionalProperties {\n timestamp?: Metadata['timestamp']\n tools?: Metadata['tools']\n authors?: Metadata['authors']\n component?: Metadata['component']\n manufacture?: Metadata['manufacture']\n supplier?: Metadata['supplier']\n}\n\nexport class Metadata {\n timestamp?: Date\n tools: ToolRepository\n authors: OrganizationalContactRepository\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n\n constructor (op: OptionalProperties = {}) {\n this.timestamp = op.timestamp\n this.tools = op.tools ?? new ToolRepository()\n this.authors = op.authors ?? new OrganizationalContactRepository()\n this.component = op.component\n this.manufacture = op.manufacture\n this.supplier = op.supplier\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 { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\n name?: OrganizationalContact['name']\n email?: OrganizationalContact['email']\n phone?: OrganizationalContact['phone']\n}\n\nexport class OrganizationalContact implements Comparable {\n name?: string\n email?: string\n phone?: string\n\n constructor (op: OptionalProperties = {}) {\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-next-line @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 }\n}\n\nexport class OrganizationalContactRepository extends SortableSet<OrganizationalContact> {\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'\n\ninterface OptionalProperties {\n name?: OrganizationalEntity['name']\n url?: OrganizationalEntity['url']\n contact?: OrganizationalEntity['contact']\n}\n\nexport class OrganizationalEntity {\n name?: string\n url: Set<URL | string>\n contact: OrganizationalContactRepository\n\n constructor (op: OptionalProperties = {}) {\n this.name = op.name\n this.url = op.url ?? new Set()\n this.contact = op.contact ?? 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\nimport { isNonNegativeInteger, NonNegativeInteger } from '../types'\nimport { Attachment } from './attachment'\n\ninterface OptionalProperties {\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}\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 tagVersion */\n #tagVersion?: NonNegativeInteger\n\n /**\n * @throws {TypeError} if {@see op.tagVersion} is neither {@see NonNegativeInteger} nor {@see undefined}\n */\n constructor (tagId: string, name: string, op: OptionalProperties = {}) {\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 {TypeError} if value is neither {@see NonNegativeInteger} nor {@see 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 { HashRepository } from './hash'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\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 {\n vendor?: string\n name?: string\n version?: string\n hashes: HashRepository\n externalReferences: ExternalReferenceRepository\n\n constructor (op: OptionalProperties = {}) {\n this.vendor = op.vendor\n this.name = op.name\n this.version = op.version\n this.hashes = op.hashes ?? new HashRepository()\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-next-line @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 }\n}\n\nexport class ToolRepository extends SortableSet<Tool> {\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 { Bom, BomRef } from '../models'\nimport { BomRefDiscriminator } from './bomRefDiscriminator'\nimport { NormalizerOptions, Serializer, SerializerOptions } from './types'\n\nexport abstract class BaseSerializer<NormalizedBom> implements Serializer {\n serialize (bom: Bom, options?: SerializerOptions & NormalizerOptions): string {\n const bomRefDiscriminator = new BomRefDiscriminator(this.#getAllBomRefs(bom))\n try {\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 bomRefDiscriminator.discriminate()\n\n const normalized = this._normalize(bom, options)\n return this._serialize(normalized, options)\n } finally {\n bomRefDiscriminator.reset()\n }\n }\n\n #getAllBomRefs (bom: Bom): Iterable<BomRef> {\n const bomRefs = new Set<BomRef>()\n if (bom.metadata.component !== undefined) {\n bomRefs.add(bom.metadata.component.bomRef)\n }\n for (const { bomRef } of bom.components) {\n bomRefs.add(bomRef)\n }\n return bomRefs.values()\n }\n\n protected abstract _normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom\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 { BomRef } from '../models'\n\nexport class BomRefDiscriminator {\n readonly #originalValues: ReadonlyMap<BomRef, string | undefined>\n\n readonly #prefix: string\n\n constructor (bomRefs: Iterable<BomRef>, prefix: string = 'BomRef') {\n this.#originalValues = new Map(\n Array.from(bomRefs).map(ref => [ref, ref.value])\n )\n this.#prefix = prefix\n }\n\n [Symbol.iterator] (): IterableIterator<BomRef> {\n return this.#originalValues.keys()\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 * <prefix>.<some-characters>.<some-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\n// not everything is public, yet\n\nexport * as Types from './types'\n\nexport * from './baseSerializer'\n// export * from './baseDeserializer' // TODO\n\nexport * from './bomRefDiscriminator'\n\nexport * as JSON from './json'\nexport * from './jsonSerializer'\n// export * from './jsonDeserializer' // TODO\n\nexport * as XML from './xml'\nexport * from './xmlBaseSerializer'\n// export * from './xmlBaseDeserializer' // 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\nexport * from './index.common'\n\nexport * from './xmlSerializer.web'\n// export * from './xmlDeserializer.web' // 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\nexport * as Types from './types'\n\nexport * as Normalize from './normalize'\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\nimport { isNotUndefined } from '../../helpers/notUndefined'\nimport { Stringable } from '../../helpers/stringable'\nimport * as Models from '../../models'\nimport { Protocol as Spec, Version as SpecVersion } from '../../spec'\nimport { NormalizerOptions } from '../types'\nimport { JsonSchema, Normalized } from './types'\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: 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 makeForTool (): ToolNormalizer {\n return new ToolNormalizer(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 makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n}\n\nconst schemaUrl: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom-1.2b.schema.json'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom-1.3a.schema.json'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom-1.4.schema.json']\n])\n\ninterface Normalizer {\n normalize: (data: object, options: NormalizerOptions) => object | undefined\n\n normalizeRepository?: (data: Iterable<object>, options: NormalizerOptions) => object[]\n}\n\nabstract class Base implements Normalizer {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n abstract normalize (data: object, options: NormalizerOptions): object | 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 Base {\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: data.serialNumber,\n metadata: this._factory.makeForMetadata().normalize(data.metadata, options),\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeRepository(data.components, options)\n // spec < 1.4 requires `component` to be array\n : [],\n dependencies: this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options)\n : undefined\n }\n }\n}\n\nexport class MetadataNormalizer extends Base {\n normalize (data: Models.Metadata, options: NormalizerOptions): Normalized.Metadata {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n return {\n timestamp: data.timestamp?.toISOString(),\n tools: data.tools.size > 0\n ? this._factory.makeForTool().normalizeRepository(data.tools, options)\n : undefined,\n authors: data.authors.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeRepository(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 }\n }\n}\n\nexport class ToolNormalizer extends Base {\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().normalizeRepository(data.hashes, options)\n : undefined,\n externalReferences: this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeRepository(data.externalReferences, options)\n : undefined\n }\n }\n\n normalizeRepository (data: Models.ToolRepository, 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 HashNormalizer extends Base {\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: content\n }\n : undefined\n }\n\n normalizeRepository (data: Models.HashRepository, options: NormalizerOptions): Normalized.Hash[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(h => this.normalize(h, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends Base {\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 normalizeRepository (data: Models.OrganizationalContactRepository, options: NormalizerOptions): Normalized.OrganizationalContact[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends Base {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions): Normalized.OrganizationalEntity {\n const urls = normalizeStringableIter(data.url, options)\n .filter(JsonSchema.isIriReference)\n return {\n name: data.name || undefined,\n /** must comply to {@link https://datatracker.ietf.org/doc/html/rfc3987} */\n url: urls.length > 0\n ? urls\n : undefined,\n contact: data.contact.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeRepository(data.contact, options)\n : undefined\n }\n }\n}\n\nexport class ComponentNormalizer extends Base {\n normalize (data: Models.Component, options: NormalizerOptions): Normalized.Component | undefined {\n return this._factory.spec.supportsComponentType(data.type)\n ? {\n type: data.type,\n name: data.name,\n group: data.group || undefined,\n // version fallback to string for spec < 1.4\n version: data.version || '',\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().normalizeRepository(data.hashes, options)\n : undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeRepository(data.licenses, options)\n : undefined,\n copyright: data.copyright || 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().normalizeRepository(data.externalReferences, options)\n : undefined\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ComponentRepository, options: NormalizerOptions): Normalized.Component[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class LicenseNormalizer extends Base {\n normalize (data: Models.License, options: NormalizerOptions): Normalized.License {\n switch (true) {\n case data instanceof Models.NamedLicense:\n return this.#normalizeNamedLicense(data as Models.NamedLicense, options)\n case data instanceof Models.SpdxLicense:\n return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options)\n case data instanceof Models.LicenseExpression:\n return this.#normalizeLicenseExpression(data as Models.LicenseExpression)\n default:\n // this case is not expected to happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): Normalized.NamedLicense {\n return {\n license: {\n name: data.name,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: data.url?.toString()\n }\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): Normalized.SpdxLicense {\n return {\n license: {\n id: data.id,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: data.url?.toString()\n }\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): Normalized.LicenseExpression {\n return {\n expression: data.expression\n }\n }\n\n normalizeRepository (data: Models.LicenseRepository, options: NormalizerOptions): Normalized.License[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class SWIDNormalizer extends Base {\n normalize (data: Models.SWID, options: NormalizerOptions): Normalized.SWID {\n const url = 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 Base {\n normalize (data: Models.ExternalReference, options: NormalizerOptions): Normalized.ExternalReference | undefined {\n return this._factory.spec.supportsExternalReferenceType(data.type)\n ? {\n url: data.url.toString(),\n type: data.type,\n comment: data.comment || undefined\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ExternalReferenceRepository, options: NormalizerOptions): Normalized.ExternalReference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends Base {\n normalize (data: Models.Attachment, options: NormalizerOptions): Normalized.Attachment {\n return {\n content: data.content,\n contentType: data.contentType || undefined,\n encoding: data.encoding\n }\n }\n}\n\nexport class DependencyGraphNormalizer extends Base {\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 }\n for (const c of data.components) {\n allRefs.set(c.bomRef, new Models.BomRefRepository(c.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\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: string[] = 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 * as Enums from '../../enums'\nimport { HashContent } from '../../models'\nimport { SpdxId } from '../../spdx'\nimport { CPE, Integer, UrnUuid } from '../../types'\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JsonSchema {\n\n /**\n * @see 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}\n */\n export function isIriReference (value: IriReference | any): value is IriReference {\n return typeof value === 'string' &&\n value.length > 0\n // TODO add more validation according to spec\n }\n\n /**\n * @see 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}\n */\n export function isIdnEmail (value: IdnEmail | any): value is IdnEmail {\n return typeof value === 'string' &&\n value.length > 0\n // TODO add more validation according to spec\n }\n\n export type DateTime = string\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Normalized {\n\n export type RefType = string\n\n export interface Bom {\n $schema?: string\n bomFormat: 'CycloneDX'\n specVersion: string\n version: Integer\n serialNumber?: UrnUuid\n metadata?: Metadata\n components?: Component[]\n externalReferences?: ExternalReference[]\n dependencies?: Dependency[]\n }\n\n export interface Metadata {\n timestamp?: JsonSchema.DateTime\n tools?: Tool[]\n authors?: OrganizationalContact[]\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses?: License[]\n }\n\n export interface Tool {\n vendor?: string\n name?: string\n version?: string\n hashes?: Hash[]\n externalReferences?: ExternalReference[]\n }\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 }\n\n export interface NamedLicense {\n license: {\n name: string\n text?: Attachment\n url?: string\n }\n }\n\n export interface SpdxLicense {\n license: {\n /** @see {@link http://cyclonedx.org/schema/spdx} */\n id: SpdxId\n text?: Attachment\n url?: string\n }\n }\n\n export interface LicenseExpression {\n expression: string\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 url: string\n type: Enums.ExternalReferenceType\n comment?: string\n }\n\n export interface Attachment {\n content?: string\n contentType?: string\n encoding?: Enums.AttachmentEncoding\n }\n\n export interface Dependency {\n ref: RefType\n dependsOn?: RefType[]\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 { Bom } from '../models'\nimport { Format, UnsupportedFormatError } from '../spec'\nimport { NormalizerOptions, SerializerOptions } from './types'\nimport { BaseSerializer } from './baseSerializer'\nimport { Factory as NormalizerFactory } from './json/normalize'\nimport { Normalized } from './json/types'\n\n/**\n * Multi purpose Json serializer.\n */\nexport class JsonSerializer extends BaseSerializer<Normalized.Bom> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {UnsupportedFormatError} if {@see normalizerFactory.spec} does not support {@see Format.JSON}.\n */\n constructor (normalizerFactory: 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 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 { 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 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\nexport * as Types from './types'\n\nexport * as Normalize from './normalize'\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\nimport { isNotUndefined } from '../../helpers/notUndefined'\nimport { Stringable } from '../../helpers/stringable'\nimport * as Models from '../../models'\nimport { Protocol as Spec, Version as SpecVersion } from '../../spec'\nimport { NormalizerOptions } from '../types'\nimport { SimpleXml, XmlSchema } from './types'\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: 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 makeForTool (): ToolNormalizer {\n return new ToolNormalizer(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 makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n}\n\nconst xmlNamespace: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom/1.2'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom/1.3'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom/1.4']\n])\n\ninterface Normalizer {\n normalize: (data: object, options: NormalizerOptions, elementName?: string) => object | undefined\n\n normalizeRepository?: (data: Iterable<object>, options: NormalizerOptions, elementName: string) => object[]\n}\n\nabstract class Base implements Normalizer {\n protected readonly _factory: Factory\n\n constructor (factory: Factory) {\n this._factory = factory\n }\n\n /**\n * @param {*} data\n * @param {NormalizerOptions} options\n * @param {string} [elementName] element name. XML defines structures; the element's name is defined on usage of a structure.\n */\n abstract normalize (data: object, options: NormalizerOptions, elementName?: string): object | 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 Base {\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().normalizeRepository(data.components, options, 'component')\n : undefined\n }\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: data.serialNumber\n },\n children: [\n data.metadata\n ? this._factory.makeForMetadata().normalize(data.metadata, options, 'metadata')\n : undefined,\n components,\n this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options, 'dependencies')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class MetadataNormalizer extends Base {\n normalize (data: Models.Metadata, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n const timestamp: SimpleXml.Element | undefined = data.timestamp === undefined\n ? undefined\n : {\n type: 'element',\n name: 'timestamp',\n children: data.timestamp.toISOString()\n }\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? {\n type: 'element',\n name: 'tools',\n children: this._factory.makeForTool().normalizeRepository(data.tools, options, 'tool')\n }\n : undefined\n const authors: SimpleXml.Element | undefined = data.authors.size > 0\n ? {\n type: 'element',\n name: 'authors',\n children: this._factory.makeForOrganizationalContact()\n .normalizeRepository(data.authors, options, 'author')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n timestamp,\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 ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ToolNormalizer extends Base {\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().normalizeRepository(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()\n .normalizeRepository(data.externalReferences, options, 'reference')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.vendor, 'vendor'),\n makeOptionalTextElement(data.name, 'name'),\n makeOptionalTextElement(data.version, 'version'),\n hashes,\n externalReferences\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.ToolRepository, 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 HashNormalizer extends Base {\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: content\n }\n : undefined\n }\n\n normalizeRepository (data: Models.HashRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(h => this.normalize(h, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends Base {\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'),\n makeOptionalTextElement(data.email, 'email'),\n makeOptionalTextElement(data.phone, 'phone')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.OrganizationalContactRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options, elementName))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends Base {\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'),\n ...makeTextElementIter(data.url, options, 'url')\n .filter(({ children: u }) => XmlSchema.isAnyURI(u)),\n ...this._factory.makeForOrganizationalContact().normalizeRepository(data.contact, options, 'contact')\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ComponentNormalizer extends Base {\n normalize (data: Models.Component, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n if (!this._factory.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 hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeRepository(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().normalizeRepository(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()\n .normalizeRepository(data.externalReferences, options, 'reference')\n }\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'),\n makeOptionalTextElement(data.publisher, 'publisher'),\n makeOptionalTextElement(data.group, 'group'),\n makeTextElement(data.name, 'name'),\n makeTextElement(\n // version fallback to string for spec < 1.4\n data.version ?? '',\n 'version'\n ),\n makeOptionalTextElement(data.description, 'description'),\n makeOptionalTextElement(data.scope, 'scope'),\n hashes,\n licenses,\n makeOptionalTextElement(data.copyright, 'copyright'),\n makeOptionalTextElement(data.cpe, 'cpe'),\n makeOptionalTextElement(data.purl, 'purl'),\n swid,\n extRefs\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.ComponentRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class LicenseNormalizer extends Base {\n normalize (data: Models.License, options: NormalizerOptions): SimpleXml.Element {\n switch (true) {\n case data instanceof Models.NamedLicense:\n return this.#normalizeNamedLicense(data as Models.NamedLicense, options)\n case data instanceof Models.SpdxLicense:\n return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options)\n case data instanceof Models.LicenseExpression:\n return this.#normalizeLicenseExpression(data as Models.LicenseExpression)\n default:\n // this case is not expected to happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = data.url?.toString()\n return {\n type: 'element',\n name: 'license',\n children: [\n makeTextElement(data.name, 'name'),\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 = data.url?.toString()\n return {\n type: 'element',\n name: 'license',\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 return makeTextElement(data.expression, 'expression')\n }\n\n normalizeRepository (data: Models.LicenseRepository, options: NormalizerOptions): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class SWIDNormalizer extends Base {\n normalize (data: Models.SWID, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = 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 Base {\n normalize (data: Models.ExternalReference, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = data.url.toString()\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 ].filter(isNotUndefined)\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ExternalReferenceRepository, 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 ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends Base {\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 || undefined,\n encoding: data.encoding || undefined\n },\n children: data.content\n }\n }\n}\n\nexport class DependencyGraphNormalizer extends Base {\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 }\n for (const c of data.components) {\n allRefs.set(c.bomRef, new Models.BomRefRepository(c.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\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\ntype StrictTextElement = SimpleXml.TextElement & { children: string }\n\nfunction makeOptionalTextElement (data: null | undefined | Stringable, elementName: string): undefined | StrictTextElement {\n const s = data?.toString() ?? ''\n return s.length > 0\n ? makeTextElement(s, elementName)\n : undefined\n}\n\nfunction makeTextElement (data: Stringable, elementName: string): StrictTextElement {\n return {\n type: 'element',\n name: elementName,\n children: data.toString()\n }\n}\n\nfunction makeTextElementIter (data: Iterable<Stringable>, options: NormalizerOptions, elementName: string): StrictTextElement[] {\n const r: StrictTextElement[] = Array.from(data, d => makeTextElement(d, elementName))\n if (options.sortLists ?? false) {\n r.sort(({ children: a }, { children: 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\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace XmlSchema {\n\n /**\n * @see isAnyURI\n */\n export type AnyURI = string\n /**\n * Test whether format is XML::anyURI - best-effort.\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 */\n export function isAnyURI (value: AnyURI | any): value is AnyURI {\n return typeof value === 'string' &&\n value.length > 0 &&\n Array.from(value).filter(c => c === '#').length <= 1\n // TODO add more validation according to spec\n }\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\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 interface ElementAttributes {\n [key: AttributeName]: Text | Unset\n }\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 { Bom } from '../models'\nimport { Format, UnsupportedFormatError } from '../spec'\nimport { BaseSerializer } from './baseSerializer'\nimport { NormalizerOptions } from './types'\nimport { Factory as NormalizerFactory } from './xml/normalize'\nimport { 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 {UnsupportedFormatError} if {@see normalizerFactory.spec} does not support {@see Format.XML}.\n */\n constructor (normalizerFactory: 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 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 { SerializerOptions } from './types'\nimport { XmlBaseSerializer } from './xmlBaseSerializer'\nimport { SimpleXml } from './xml/types'\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 normalizedBom: SimpleXml.Element\n ): XMLDocument {\n const namespace = null\n const doc = document.implementation.createDocument(namespace, null)\n doc.appendChild(this.#buildElement(normalizedBom, 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.#setChildren(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 #setChildren (node: Element, children: SimpleXml.ElementChildren, parentNS: string | null = null): void {\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 as Iterable<SimpleXml.Comment | SimpleXml.Element>)) {\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\n/* eslint-disable */\n/* @ts-ignore: TS6059 -- this works as long as the file/path is available in dist-package */\nimport {enum as _spdxSpecEnum} from '../res/spdx.SNAPSHOT.schema.json'\n/* eslint-enable */\n\n/**\n * One of the known SPDX licence identifiers.\n * @see {@link http://cyclonedx.org/schema/spdx}\n * @see isSupportedSpdxId\n * @see fixupSpdxId\n */\nexport type SpdxId = string\n\nconst spdxIds: ReadonlySet<SpdxId> = new Set(_spdxSpecEnum)\n\nconst spdxLowerToActual: ReadonlyMap<string, SpdxId> = new Map(\n _spdxSpecEnum.map(spdxId => [spdxId.toLowerCase(), spdxId])\n)\n\nexport function isSupportedSpdxId (value: SpdxId | any): value is SpdxId {\n return spdxIds.has(value)\n}\n\n/** Try to convert a string to `SpdxId`. */\nexport function fixupSpdxId (value: string | any): SpdxId | undefined {\n return typeof value === 'string' && value.length > 0\n ? spdxLowerToActual.get(value.toLowerCase())\n : 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 { ComponentType, ExternalReferenceType, HashAlgorithm } from './enums'\nimport { HashContent } from './models'\n\nexport enum Version {\n v1dot0 = '1.0',\n v1dot1 = '1.1',\n v1dot2 = '1.2',\n v1dot3 = '1.3',\n v1dot4 = '1.4',\n}\n\nexport enum Format {\n XML = 'xml',\n JSON = 'json',\n}\n\nexport class UnsupportedFormatError extends Error {\n}\n\nexport interface Protocol {\n readonly version: Version\n\n supportsFormat: (f: Format | any) => boolean\n\n supportsComponentType: (ct: ComponentType | any) => boolean\n\n supportsHashAlgorithm: (ha: HashAlgorithm | any) => boolean\n\n supportsHashValue: (hv: HashContent | any) => boolean\n\n supportsExternalReferenceType: (ert: ExternalReferenceType | any) => boolean\n\n readonly supportsDependencyGraph: boolean\n\n readonly supportsToolReferences: boolean\n}\n\n/**\n * @internal This class was never intended to be public,\n * but it is a helper to get the exact spec-versions implemented according to {@see Protocol}.\n */\nclass Spec implements Protocol {\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 #supportsDependencyGraph: boolean\n readonly #supportsToolReferences: boolean\n\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 ) {\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 }\n\n get version (): Version {\n return this.#version\n }\n\n supportsFormat (f: Format | any): boolean {\n return this.#formats.has(f)\n }\n\n supportsComponentType (ct: ComponentType | any): boolean {\n return this.#componentTypes.has(ct)\n }\n\n supportsHashAlgorithm (ha: HashAlgorithm | any): boolean {\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 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\n/** Specification v1.2 */\nexport const Spec1dot2: Readonly<Protocol> = 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))\n\n/** Specification v1.3 */\nexport const Spec1dot3: Readonly<Protocol> = 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))\n\n/** Specification v1.4 */\nexport const Spec1dot4: Readonly<Protocol> = 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))\n\nexport const SpecVersionDict = Object.freeze(Object.fromEntries([\n [Version.v1dot2, Spec1dot2],\n [Version.v1dot3, Spec1dot3],\n [Version.v1dot4, Spec1dot4]\n]) as { [key in Version]?: Readonly<Protocol> })\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 * Define the format for acceptable CPE URIs. Supports CPE 2.2 and CPE 2.3 formats.\n * Refer to {@link https://nvd.nist.gov/products/cpe} for official specification.\n * @see isCPE\n */\nexport type CPE = string\n\n/* eslint-disable-next-line no-useless-escape -- value directly from XML or JSON spec, surrounded with ^$ */\nconst cpePattern = /^([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$|^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!&quot;#$$%&amp;'\\(\\)\\+,\\/:;&lt;=&gt;@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!&quot;#$$%&amp;'\\(\\)\\+,\\/:;&lt;=&gt;@\\[\\]\\^`\\{\\|}~]))+(\\?*|\\*?))|[\\*\\-])){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\nexport * from './cpe'\nexport * from './integer'\nexport * from './mimeType'\nexport * from './urn'\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 * @see isInteger\n */\nexport type Integer = number | NonNegativeInteger\n\nexport function isInteger (value: any): value is Integer {\n return Number.isInteger(value)\n}\n\n/**\n * Integer >= 0\n * @see isNonNegativeInteger\n */\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 > 0\n * @see 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 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 * Defines a string representation of a UUID conforming to RFC 4122.\n * @see {@link https://datatracker.ietf.org/doc/html/rfc4122}\n * @see isUrnUuid\n */\nexport type UrnUuid = string\n\n/* regular expression was taken from the CycloneDX schema definitions. */\nconst urnUuidPattern = /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/\n\nexport function isUrnUuid (value: any): value is UrnUuid {\n return typeof value === 'string' &&\n urnUuidPattern.test(value)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE_packageurl_js__;","// 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,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC5B,uCAAiB;AACnB,CAAC,EAFW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAE7B;;;;;;;;;;;;ACrBD;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,uCAAqB;IACrB,uCAAqB;IACrB,uCAAqB;AACvB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;;;;;;;;;;;;ACvBD;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,IAAY,aASX;AATD,WAAY,aAAa;IACvB,4CAA2B;IAC3B,wCAAuB;IACvB,oCAAmB;IACnB,wCAAuB;IACvB,qDAAoC;IACpC,kCAAiB;IACjB,sCAAqB;IACrB,8BAAa;AACf,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB;;;;;;;;;;;;AC5BD;;;;;;;;;;;;;;;;;EAiBE;;;AAEF,IAAY,qBAiBX;AAjBD,WAAY,qBAAqB;IAC/B,oCAAW;IACX,uDAA8B;IAC9B,4CAAmB;IACnB,kDAAyB;IACzB,oCAAW;IACX,qDAA4B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AAS,CAAC,KAAK,CAAC;AAChC,CAAC;AAFD,8BAEC;AAQD,SAAgB,oBAAoB,CAAE,KAAU;IAC9C,OAAO,SAAS,CAAC,KAAK,CAAC;QACrB,KAAK,IAAI,CAAC;AACd,CAAC;AAHD,oDAGC;AAQD,SAAgB,iBAAiB,CAAE,KAAU;IAC3C,OAAO,SAAS,CAAC,KAAK,CAAC;QACjB,KAAK,GAAG,CAAC;AACjB,CAAC;AAHD,8CAGC;;;;;;;;;;;;ACjDD;;;;;;;;;;;;;;;;;EAiBE;;;AAQF,MAAM,eAAe,GAAG,8BAA8B;AAEtD,SAAgB,UAAU,CAAE,KAAU;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC1B,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;AACnC,CAAC;AAHD,gCAGC;;;;;;;;;;;;AC9BD;;;;;;;;;;;;;;;;;EAiBE;;;AAUF,MAAM,cAAc,GAAG,yEAAyE;AAEhG,SAAgB,SAAS,CAAE,KAAU;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC3B,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;AACjC,CAAC;AAHD,8BAGC;;;;;;;;;;;AChCD;;;;;;;;;;;;;;;;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/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/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/helpers/notUndefined.ts","webpack://CycloneDX_library/./src/helpers/sortableSet.ts","webpack://CycloneDX_library/./src/helpers/tree.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/bomRef.ts","webpack://CycloneDX_library/./src/models/component.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/metadata.ts","webpack://CycloneDX_library/./src/models/organizationalContact.ts","webpack://CycloneDX_library/./src/models/organizationalEntity.ts","webpack://CycloneDX_library/./src/models/swid.ts","webpack://CycloneDX_library/./src/models/tool.ts","webpack://CycloneDX_library/./src/serialize/baseSerializer.ts","webpack://CycloneDX_library/./src/serialize/bomRefDiscriminator.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/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.ts","webpack://CycloneDX_library/./src/types/cpe.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/urn.ts","webpack://CycloneDX_library/external umd \"PackageURL\"","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(require(\"PackageURL\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"PackageURL\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"CycloneDX_library\"] = factory(require(\"PackageURL\"));\n\telse\n\t\troot[\"CycloneDX_library\"] = factory(root[\"PackageURL\"]);\n})(self, (__WEBPACK_EXTERNAL_MODULE_packageurl_js__) => {\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 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 OperatingSystem = 'operating-system',\n Device = 'device',\n Firmware = 'firmware',\n File = 'file',\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 Distribution = 'distribution',\n License = 'license',\n BuildMeta = 'build-meta',\n BuildSystem = 'build-system',\n ReleaseNotes = 'release-notes',\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'\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","/*!\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 { DisjunctiveLicense, License, LicenseExpression, NamedLicense, SpdxLicense } from '../models'\nimport { fixupSpdxId } from '../spdx'\n\nexport class LicenseFactory {\n makeFromString (value: string): License {\n try {\n return this.makeExpression(value)\n } catch (Error) {\n return this.makeDisjunctive(value)\n }\n }\n\n /**\n * @throws {RangeError} if expression is not eligible\n */\n makeExpression (value: string): LicenseExpression {\n return new LicenseExpression(value)\n }\n\n makeDisjunctive (value: string): DisjunctiveLicense {\n try {\n return this.makeDisjunctiveWithId(value)\n } catch (error) {\n return this.makeDisjunctiveWithName(value)\n }\n }\n\n /**\n * @throws {RangeError} if value is not supported SPDX id\n */\n makeDisjunctiveWithId (value: string | any): SpdxLicense {\n const spdxId = fixupSpdxId(String(value))\n if (undefined === spdxId) {\n throw new RangeError('Unsupported SPDX id')\n }\n\n return new SpdxLicense(spdxId)\n }\n\n makeDisjunctiveWithName (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 { Component } from '../models'\nimport { PackageURL } from 'packageurl-js'\nimport { ExternalReferenceType } from '../enums'\n\nexport class PackageUrlFactory {\n readonly #type: PackageURL['type']\n\n constructor (type: PackageURL['type']) {\n this.#type = type\n }\n\n get type (): PackageURL['type'] {\n return this.#type\n }\n\n makeFromComponent (component: Component, sort: boolean = false): PackageURL | undefined {\n /**\n * For the list/spec of the well-known keys, see\n * {@link https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst#known-qualifiers-keyvalue-pairs}\n */\n const qualifiers: PackageURL['qualifiers'] = {}\n let subpath: PackageURL['subpath']\n\n const extRefs = component.externalReferences\n for (const extRef of (sort ? extRefs.sorted() : extRefs)) {\n switch (extRef.type) {\n case ExternalReferenceType.VCS:\n [qualifiers.vcs_url, subpath] = extRef.url.toString().split('#', 2)\n break\n case ExternalReferenceType.Distribution:\n qualifiers.download_url = extRef.url.toString()\n break\n }\n }\n\n const hashes = component.hashes\n if (hashes.size > 0) {\n qualifiers.checksum = Array.from(\n sort ? hashes.sorted() : 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 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\nexport interface Comparable {\n // The purpose of this method is not to test for equality, but have deterministic comparability.\n compare: (other: any) => number\n}\n\nexport abstract class SortableSet<T extends Comparable> extends Set<T> {\n sorted (): T[] {\n return Array.from(this).sort((a: T, b: T) => a.compare(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 treeIterator = 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\nexport * as Types from './types'\nexport * as Enums from './enums'\nexport * as SPDX from './spdx'\nexport * as Models from './models'\nexport * as Factories from './factories/index.web'\nexport * as Spec from './spec'\nexport * as Serialize from './serialize/index.web'\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\nimport { AttachmentEncoding } from '../enums'\n\ninterface OptionalProperties {\n contentType?: Attachment['contentType']\n encoding?: Attachment['encoding']\n}\n\nexport class Attachment {\n contentType?: string\n content: string\n encoding?: AttachmentEncoding\n\n constructor (content: string, op: OptionalProperties = {}) {\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 { isPositiveInteger, isUrnUuid, PositiveInteger, UrnUuid } from '../types'\nimport { Metadata } from './metadata'\nimport { ComponentRepository } from './component'\n\ninterface OptionalProperties {\n metadata?: Bom['metadata']\n components?: Bom['components']\n version?: Bom['version']\n serialNumber?: Bom['serialNumber']\n}\n\nexport class Bom {\n metadata: Metadata\n components: ComponentRepository\n\n /** @see version */\n #version: PositiveInteger = 1\n\n /** @see serialNumber */\n #serialNumber?: UrnUuid\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 {TypeError} if {@see op.version} is not {@see PositiveInteger} nor {@see undefined}\n * @throws {TypeError} if {@see op.serialNumber} is neither {@see UrnUuid} nor {@see undefined}\n */\n constructor (op: OptionalProperties = {}) {\n this.metadata = op.metadata ?? new Metadata()\n this.components = op.components ?? new ComponentRepository()\n this.version = op.version ?? this.version\n this.serialNumber = op.serialNumber\n }\n\n get version (): PositiveInteger {\n return this.#version\n }\n\n /**\n * @throws {TypeError} if value is not {@see 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 (): UrnUuid | undefined {\n return this.#serialNumber\n }\n\n /**\n * @throws {TypeError} if value is neither {@see UrnUuid} nor {@see undefined}\n */\n set serialNumber (value: UrnUuid | undefined) {\n if (value !== undefined && !isUrnUuid(value)) {\n throw new TypeError('Not UrnUuid nor undefined')\n }\n this.#serialNumber = 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\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 {\n value?: string\n\n constructor (value?: string) {\n this.value = value\n }\n\n compare (other: BomRef): 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 { PackageURL } from 'packageurl-js'\n\nimport { CPE, isCPE } from '../types'\nimport { ComponentScope, ComponentType } from '../enums'\nimport { BomRef, BomRefRepository } from './bomRef'\nimport { HashRepository } from './hash'\nimport { OrganizationalEntity } from './organizationalEntity'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { LicenseRepository } from './license'\nimport { SWID } from './swid'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\nimport { treeIterator } from '../helpers/tree'\n\ninterface OptionalProperties {\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 dependencies?: Component['dependencies']\n components?: Component['components']\n cpe?: Component['cpe']\n}\n\nexport class Component implements Comparable {\n type: ComponentType\n name: string\n author?: string\n copyright?: string\n description?: string\n externalReferences: ExternalReferenceRepository\n group?: string\n hashes: HashRepository\n licenses: LicenseRepository\n publisher?: string\n purl?: PackageURL\n scope?: ComponentScope\n supplier?: OrganizationalEntity\n swid?: SWID\n version?: string\n dependencies: BomRefRepository\n components: ComponentRepository\n\n /** @see bomRef */\n readonly #bomRef: BomRef\n\n /** @see cpe */\n #cpe?: CPE\n\n /**\n * @throws {TypeError} if {@see op.cpe} is neither {@see CPE} nor {@see undefined}\n */\n constructor (type: ComponentType, name: string, op: OptionalProperties = {}) {\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 HashRepository()\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.dependencies = op.dependencies ?? new BomRefRepository()\n this.components = op.components ?? new ComponentRepository()\n this.cpe = op.cpe\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 {TypeError} if value is neither {@see CPE} nor {@see 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.toString().localeCompare(other.#cpe.toString())\n }\n /* eslint-disable-next-line @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 }\n}\n\nexport class ComponentRepository extends SortableSet<Component> {\n * [treeIterator] (): Generator<Component> {\n for (const component of this) {\n yield component\n yield * component.components[treeIterator]()\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 { ExternalReferenceType } from '../enums'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\n comment?: ExternalReference['comment']\n}\n\nexport class ExternalReference implements Comparable {\n url: URL | string\n type: ExternalReferenceType\n comment?: string\n\n constructor (url: URL | string, type: ExternalReferenceType, op: OptionalProperties = {}) {\n this.url = url\n this.type = type\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 SortableSet<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 { HashAlgorithm } from '../enums'\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 HashRepository -\n // this way a HashRepository can be constructed from multiple Hash objects.\n algorithm: HashAlgorithm,\n content: HashContent\n]\n\nexport class HashRepository extends Map<Hash[0], Hash[1]> {\n #compareItems ([a1, c1]: Hash, [a2, c2]: Hash): number {\n /* eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- run compares in weighted order */\n return a1.localeCompare(a2) ||\n c1.localeCompare(c2)\n }\n\n sorted (): Hash[] {\n return Array.from(this.entries()).sort(this.#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 './bomRef'\nexport * from './component'\nexport * from './externalReference'\nexport * from './hash'\nexport * from './license'\nexport * from './metadata'\nexport * from './organizationalContact'\nexport * from './organizationalEntity'\nexport * from './swid'\nexport * from './tool'\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 { isSupportedSpdxId, SpdxId } from '../spdx'\nimport { Attachment } from './attachment'\n\nexport class LicenseExpression {\n static isEligibleExpression (expression: string | any): boolean {\n // smallest known: (A or B)\n return typeof expression === 'string' &&\n expression.length >= 8 &&\n expression[0] === '(' &&\n expression[expression.length - 1] === ')'\n }\n\n /** @see expression */\n #expression!: string\n\n /**\n * @throws {RangeError} if {@see expression} is not eligible({@see LicenseExpression.isEligibleExpression})\n */\n constructor (expression: string) {\n this.expression = expression\n }\n\n get expression (): string {\n return this.#expression\n }\n\n /**\n * @throws {RangeError} if expression is not eligible({@see LicenseExpression.isEligibleExpression})\n */\n set expression (value: string) {\n if (!LicenseExpression.isEligibleExpression(value)) {\n throw new RangeError('Not eligible expression')\n }\n this.#expression = value\n }\n\n compare (other: LicenseExpression): number {\n return this.#expression.localeCompare(other.#expression)\n }\n}\n\ninterface NamedLicenseOptionalProperties {\n text?: NamedLicense['text']\n url?: NamedLicense['url']\n}\n\nexport class NamedLicense {\n name: string\n text?: Attachment\n url?: URL | string\n\n constructor (name: string, op: NamedLicenseOptionalProperties = {}) {\n this.name = name\n this.text = op.text\n this.url = op.url\n }\n\n compare (other: NamedLicense): number {\n return this.name.localeCompare(other.name)\n }\n}\n\ninterface SpdxLicenseOptionalProperties {\n text?: SpdxLicense['text']\n url?: SpdxLicense['url']\n}\n\nexport class SpdxLicense {\n text?: Attachment\n url?: URL | string\n\n /** @see id */\n #id!: SpdxId\n\n /**\n * @throws {RangeError} if {@see id} is not supported SPDX id({@see isSupportedSpdxId})\n */\n constructor (id: SpdxId, op: SpdxLicenseOptionalProperties = {}) {\n this.id = id\n this.text = op.text\n this.url = op.url\n }\n\n get id (): SpdxId {\n return this.#id\n }\n\n /**\n * @throws {RangeError} if value is not supported SPDX id({@see isSupportedSpdxId})\n */\n set id (value: SpdxId) {\n if (!isSupportedSpdxId(value)) {\n throw new RangeError('Unknown SPDX id')\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> {\n #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(this.#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 { Component } from './component'\nimport { ToolRepository } from './tool'\nimport { OrganizationalEntity } from './organizationalEntity'\nimport { OrganizationalContactRepository } from './organizationalContact'\n\ninterface OptionalProperties {\n timestamp?: Metadata['timestamp']\n tools?: Metadata['tools']\n authors?: Metadata['authors']\n component?: Metadata['component']\n manufacture?: Metadata['manufacture']\n supplier?: Metadata['supplier']\n}\n\nexport class Metadata {\n timestamp?: Date\n tools: ToolRepository\n authors: OrganizationalContactRepository\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n\n constructor (op: OptionalProperties = {}) {\n this.timestamp = op.timestamp\n this.tools = op.tools ?? new ToolRepository()\n this.authors = op.authors ?? new OrganizationalContactRepository()\n this.component = op.component\n this.manufacture = op.manufacture\n this.supplier = op.supplier\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 { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\n name?: OrganizationalContact['name']\n email?: OrganizationalContact['email']\n phone?: OrganizationalContact['phone']\n}\n\nexport class OrganizationalContact implements Comparable {\n name?: string\n email?: string\n phone?: string\n\n constructor (op: OptionalProperties = {}) {\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-next-line @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 }\n}\n\nexport class OrganizationalContactRepository extends SortableSet<OrganizationalContact> {\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'\n\ninterface OptionalProperties {\n name?: OrganizationalEntity['name']\n url?: OrganizationalEntity['url']\n contact?: OrganizationalEntity['contact']\n}\n\nexport class OrganizationalEntity {\n name?: string\n url: Set<URL | string>\n contact: OrganizationalContactRepository\n\n constructor (op: OptionalProperties = {}) {\n this.name = op.name\n this.url = op.url ?? new Set()\n this.contact = op.contact ?? 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\nimport { isNonNegativeInteger, NonNegativeInteger } from '../types'\nimport { Attachment } from './attachment'\n\ninterface OptionalProperties {\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}\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 tagVersion */\n #tagVersion?: NonNegativeInteger\n\n /**\n * @throws {TypeError} if {@see op.tagVersion} is neither {@see NonNegativeInteger} nor {@see undefined}\n */\n constructor (tagId: string, name: string, op: OptionalProperties = {}) {\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 {TypeError} if value is neither {@see NonNegativeInteger} nor {@see 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 { HashRepository } from './hash'\nimport { ExternalReferenceRepository } from './externalReference'\nimport { Comparable, SortableSet } from '../helpers/sortableSet'\n\ninterface OptionalProperties {\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 {\n vendor?: string\n name?: string\n version?: string\n hashes: HashRepository\n externalReferences: ExternalReferenceRepository\n\n constructor (op: OptionalProperties = {}) {\n this.vendor = op.vendor\n this.name = op.name\n this.version = op.version\n this.hashes = op.hashes ?? new HashRepository()\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-next-line @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 }\n}\n\nexport class ToolRepository extends SortableSet<Tool> {\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 { Bom, BomRef } from '../models'\nimport { BomRefDiscriminator } from './bomRefDiscriminator'\nimport { NormalizerOptions, Serializer, SerializerOptions } from './types'\n\nexport abstract class BaseSerializer<NormalizedBom> implements Serializer {\n serialize (bom: Bom, options?: SerializerOptions & NormalizerOptions): string {\n const bomRefDiscriminator = new BomRefDiscriminator(this.#getAllBomRefs(bom))\n try {\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 bomRefDiscriminator.discriminate()\n\n const normalized = this._normalize(bom, options)\n return this._serialize(normalized, options)\n } finally {\n bomRefDiscriminator.reset()\n }\n }\n\n #getAllBomRefs (bom: Bom): Iterable<BomRef> {\n const bomRefs = new Set<BomRef>()\n if (bom.metadata.component !== undefined) {\n bomRefs.add(bom.metadata.component.bomRef)\n }\n for (const { bomRef } of bom.components) {\n bomRefs.add(bomRef)\n }\n return bomRefs.values()\n }\n\n protected abstract _normalize (bom: Bom, options?: NormalizerOptions): NormalizedBom\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 { BomRef } from '../models'\n\nexport class BomRefDiscriminator {\n readonly #originalValues: ReadonlyMap<BomRef, string | undefined>\n\n readonly #prefix: string\n\n constructor (bomRefs: Iterable<BomRef>, prefix: string = 'BomRef') {\n this.#originalValues = new Map(\n Array.from(bomRefs).map(ref => [ref, ref.value])\n )\n this.#prefix = prefix\n }\n\n get prefix (): string {\n return this.#prefix\n }\n\n /** Iterate over the bomRefs. */\n [Symbol.iterator] (): IterableIterator<BomRef> {\n return this.#originalValues.keys()\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 * <prefix>.<some-characters>.<some-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\n// not everything is public, yet\n\nexport * as Types from './types'\n\nexport * from './baseSerializer'\n// export * from './baseDeserializer' // TODO\n\nexport * from './bomRefDiscriminator'\n\nexport * as JSON from './json'\nexport * from './jsonSerializer'\n// export * from './jsonDeserializer' // TODO\n\nexport * as XML from './xml'\nexport * from './xmlBaseSerializer'\n// export * from './xmlBaseDeserializer' // 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\nexport * from './index.common'\n\nexport * from './xmlSerializer.web'\n// export * from './xmlDeserializer.web' // 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\nexport * as Types from './types'\n\nexport * as Normalize from './normalize'\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\nimport { isNotUndefined } from '../../helpers/notUndefined'\nimport { Stringable } from '../../helpers/stringable'\nimport * as Models from '../../models'\nimport { Protocol as Spec, Version as SpecVersion } from '../../spec'\nimport { NormalizerOptions } from '../types'\nimport { JsonSchema, Normalized } from './types'\nimport { treeIterator } from '../../helpers/tree'\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: 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 makeForTool (): ToolNormalizer {\n return new ToolNormalizer(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 makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n}\n\nconst schemaUrl: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom-1.2b.schema.json'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom-1.3a.schema.json'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom-1.4.schema.json']\n])\n\ninterface Normalizer {\n normalize: (data: object, options: NormalizerOptions) => object | undefined\n\n normalizeRepository?: (data: Iterable<object>, options: NormalizerOptions) => object[]\n}\n\nabstract class Base implements Normalizer {\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: object, options: NormalizerOptions): object | 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 Base {\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: data.serialNumber,\n metadata: this._factory.makeForMetadata().normalize(data.metadata, options),\n components: data.components.size > 0\n ? this._factory.makeForComponent().normalizeRepository(data.components, options)\n // spec < 1.4 requires `component` to be array\n : [],\n dependencies: this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options)\n : undefined\n }\n }\n}\n\nexport class MetadataNormalizer extends Base {\n normalize (data: Models.Metadata, options: NormalizerOptions): Normalized.Metadata {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n return {\n timestamp: data.timestamp?.toISOString(),\n tools: data.tools.size > 0\n ? this._factory.makeForTool().normalizeRepository(data.tools, options)\n : undefined,\n authors: data.authors.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeRepository(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 }\n }\n}\n\nexport class ToolNormalizer extends Base {\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().normalizeRepository(data.hashes, options)\n : undefined,\n externalReferences: this._factory.spec.supportsToolReferences && data.externalReferences.size > 0\n ? this._factory.makeForExternalReference().normalizeRepository(data.externalReferences, options)\n : undefined\n }\n }\n\n normalizeRepository (data: Models.ToolRepository, 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 HashNormalizer extends Base {\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: content\n }\n : undefined\n }\n\n normalizeRepository (data: Models.HashRepository, options: NormalizerOptions): Normalized.Hash[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(h => this.normalize(h, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends Base {\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 normalizeRepository (data: Models.OrganizationalContactRepository, options: NormalizerOptions): Normalized.OrganizationalContact[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends Base {\n normalize (data: Models.OrganizationalEntity, options: NormalizerOptions): Normalized.OrganizationalEntity {\n const urls = normalizeStringableIter(data.url, options)\n .filter(JsonSchema.isIriReference)\n return {\n name: data.name || undefined,\n /** must comply to {@link https://datatracker.ietf.org/doc/html/rfc3987} */\n url: urls.length > 0\n ? urls\n : undefined,\n contact: data.contact.size > 0\n ? this._factory.makeForOrganizationalContact().normalizeRepository(data.contact, options)\n : undefined\n }\n }\n}\n\nexport class ComponentNormalizer extends Base {\n normalize (data: Models.Component, options: NormalizerOptions): Normalized.Component | undefined {\n const spec = this._factory.spec\n const version: string = data.version ?? ''\n return spec.supportsComponentType(data.type)\n ? {\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().normalizeRepository(data.hashes, options)\n : undefined,\n licenses: data.licenses.size > 0\n ? this._factory.makeForLicense().normalizeRepository(data.licenses, options)\n : undefined,\n copyright: data.copyright || 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().normalizeRepository(data.externalReferences, options)\n : undefined,\n components: data.components.size > 0\n ? this.normalizeRepository(data.components, options)\n : undefined\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ComponentRepository, options: NormalizerOptions): Normalized.Component[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class LicenseNormalizer extends Base {\n normalize (data: Models.License, options: NormalizerOptions): Normalized.License {\n switch (true) {\n case data instanceof Models.NamedLicense:\n return this.#normalizeNamedLicense(data as Models.NamedLicense, options)\n case data instanceof Models.SpdxLicense:\n return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options)\n case data instanceof Models.LicenseExpression:\n return this.#normalizeLicenseExpression(data as Models.LicenseExpression)\n default:\n // this case is not expected to happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): Normalized.NamedLicense {\n return {\n license: {\n name: data.name,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: data.url?.toString()\n }\n }\n }\n\n #normalizeSpdxLicense (data: Models.SpdxLicense, options: NormalizerOptions): Normalized.SpdxLicense {\n return {\n license: {\n id: data.id,\n text: data.text === undefined\n ? undefined\n : this._factory.makeForAttachment().normalize(data.text, options),\n url: data.url?.toString()\n }\n }\n }\n\n #normalizeLicenseExpression (data: Models.LicenseExpression): Normalized.LicenseExpression {\n return {\n expression: data.expression\n }\n }\n\n normalizeRepository (data: Models.LicenseRepository, options: NormalizerOptions): Normalized.License[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class SWIDNormalizer extends Base {\n normalize (data: Models.SWID, options: NormalizerOptions): Normalized.SWID {\n const url = 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 Base {\n normalize (data: Models.ExternalReference, options: NormalizerOptions): Normalized.ExternalReference | undefined {\n return this._factory.spec.supportsExternalReferenceType(data.type)\n ? {\n url: data.url.toString(),\n type: data.type,\n comment: data.comment || undefined\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ExternalReferenceRepository, options: NormalizerOptions): Normalized.ExternalReference[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(r => this.normalize(r, options)\n ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends Base {\n normalize (data: Models.Attachment, options: NormalizerOptions): Normalized.Attachment {\n return {\n content: data.content,\n contentType: data.contentType || undefined,\n encoding: data.encoding\n }\n }\n}\n\nexport class DependencyGraphNormalizer extends Base {\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[treeIterator]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIterator]()) {\n allRefs.set(component.bomRef, component.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\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: string[] = 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 * as Enums from '../../enums'\nimport { HashContent } from '../../models'\nimport { SpdxId } from '../../spdx'\nimport { CPE, Integer, UrnUuid } from '../../types'\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace JsonSchema {\n\n /**\n * @see 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}\n */\n export function isIriReference (value: IriReference | any): value is IriReference {\n return typeof value === 'string' &&\n value.length > 0\n // TODO add more validation according to spec\n }\n\n /**\n * @see 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}\n */\n export function isIdnEmail (value: IdnEmail | any): value is IdnEmail {\n return typeof value === 'string' &&\n value.length > 0\n // TODO add more validation according to spec\n }\n\n export type DateTime = string\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Normalized {\n\n export type RefType = string\n\n export interface Bom {\n $schema?: string\n bomFormat: 'CycloneDX'\n specVersion: string\n version: Integer\n serialNumber?: UrnUuid\n metadata?: Metadata\n components?: Component[]\n externalReferences?: ExternalReference[]\n dependencies?: Dependency[]\n }\n\n export interface Metadata {\n timestamp?: JsonSchema.DateTime\n tools?: Tool[]\n authors?: OrganizationalContact[]\n component?: Component\n manufacture?: OrganizationalEntity\n supplier?: OrganizationalEntity\n licenses?: License[]\n }\n\n export interface Tool {\n vendor?: string\n name?: string\n version?: string\n hashes?: Hash[]\n externalReferences?: ExternalReference[]\n }\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 }\n\n export interface NamedLicense {\n license: {\n name: string\n text?: Attachment\n url?: string\n }\n }\n\n export interface SpdxLicense {\n license: {\n /** @see {@link http://cyclonedx.org/schema/spdx} */\n id: SpdxId\n text?: Attachment\n url?: string\n }\n }\n\n export interface LicenseExpression {\n expression: string\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 url: string\n type: Enums.ExternalReferenceType\n comment?: string\n }\n\n export interface Attachment {\n content?: string\n contentType?: string\n encoding?: Enums.AttachmentEncoding\n }\n\n export interface Dependency {\n ref: RefType\n dependsOn?: RefType[]\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 { Bom } from '../models'\nimport { Format, UnsupportedFormatError } from '../spec'\nimport { NormalizerOptions, SerializerOptions } from './types'\nimport { BaseSerializer } from './baseSerializer'\nimport { Factory as NormalizerFactory } from './json/normalize'\nimport { Normalized } from './json/types'\n\n/**\n * Multi purpose Json serializer.\n */\nexport class JsonSerializer extends BaseSerializer<Normalized.Bom> {\n readonly #normalizerFactory: NormalizerFactory\n\n /**\n * @throws {UnsupportedFormatError} if {@see normalizerFactory.spec} does not support {@see Format.JSON}.\n */\n constructor (normalizerFactory: 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 { 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 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\nexport * as Types from './types'\n\nexport * as Normalize from './normalize'\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\nimport { isNotUndefined } from '../../helpers/notUndefined'\nimport { Stringable } from '../../helpers/stringable'\nimport * as Models from '../../models'\nimport { Protocol as Spec, Version as SpecVersion } from '../../spec'\nimport { NormalizerOptions } from '../types'\nimport { SimpleXml, XmlSchema } from './types'\nimport { treeIterator } from '../../helpers/tree'\n\nexport class Factory {\n readonly #spec: Spec\n\n constructor (spec: 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 makeForTool (): ToolNormalizer {\n return new ToolNormalizer(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 makeForDependencyGraph (): DependencyGraphNormalizer {\n return new DependencyGraphNormalizer(this)\n }\n}\n\nconst xmlNamespace: ReadonlyMap<SpecVersion, string> = new Map([\n [SpecVersion.v1dot2, 'http://cyclonedx.org/schema/bom/1.2'],\n [SpecVersion.v1dot3, 'http://cyclonedx.org/schema/bom/1.3'],\n [SpecVersion.v1dot4, 'http://cyclonedx.org/schema/bom/1.4']\n])\n\ninterface Normalizer {\n normalize: (data: object, options: NormalizerOptions, elementName?: string) => object | undefined\n\n normalizeRepository?: (data: Iterable<object>, options: NormalizerOptions, elementName: string) => object[]\n}\n\nabstract class Base implements Normalizer {\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 {*} data\n * @param {NormalizerOptions} options\n * @param {string} [elementName] element name. XML defines structures; the element's name is defined on usage of a structure.\n */\n abstract normalize (data: object, options: NormalizerOptions, elementName?: string): object | 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 Base {\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().normalizeRepository(data.components, options, 'component')\n : undefined\n }\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: data.serialNumber\n },\n children: [\n data.metadata\n ? this._factory.makeForMetadata().normalize(data.metadata, options, 'metadata')\n : undefined,\n components,\n this._factory.spec.supportsDependencyGraph\n ? this._factory.makeForDependencyGraph().normalize(data, options, 'dependencies')\n : undefined\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class MetadataNormalizer extends Base {\n normalize (data: Models.Metadata, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const orgEntityNormalizer = this._factory.makeForOrganizationalEntity()\n const timestamp: SimpleXml.Element | undefined = data.timestamp === undefined\n ? undefined\n : {\n type: 'element',\n name: 'timestamp',\n children: data.timestamp.toISOString()\n }\n const tools: SimpleXml.Element | undefined = data.tools.size > 0\n ? {\n type: 'element',\n name: 'tools',\n children: this._factory.makeForTool().normalizeRepository(data.tools, options, 'tool')\n }\n : undefined\n const authors: SimpleXml.Element | undefined = data.authors.size > 0\n ? {\n type: 'element',\n name: 'authors',\n children: this._factory.makeForOrganizationalContact()\n .normalizeRepository(data.authors, options, 'author')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n timestamp,\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 ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ToolNormalizer extends Base {\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().normalizeRepository(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()\n .normalizeRepository(data.externalReferences, options, 'reference')\n }\n : undefined\n return {\n type: 'element',\n name: elementName,\n children: [\n makeOptionalTextElement(data.vendor, 'vendor'),\n makeOptionalTextElement(data.name, 'name'),\n makeOptionalTextElement(data.version, 'version'),\n hashes,\n externalReferences\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.ToolRepository, 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 HashNormalizer extends Base {\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: content\n }\n : undefined\n }\n\n normalizeRepository (data: Models.HashRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(h => this.normalize(h, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class OrganizationalContactNormalizer extends Base {\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'),\n makeOptionalTextElement(data.email, 'email'),\n makeOptionalTextElement(data.phone, 'phone')\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.OrganizationalContactRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options, elementName))\n }\n}\n\nexport class OrganizationalEntityNormalizer extends Base {\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'),\n ...makeTextElementIter(data.url, options, 'url')\n .filter(({ children: u }) => XmlSchema.isAnyURI(u)),\n ...this._factory.makeForOrganizationalContact().normalizeRepository(data.contact, options, 'contact')\n ].filter(isNotUndefined)\n }\n }\n}\n\nexport class ComponentNormalizer extends Base {\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 )\n const hashes: SimpleXml.Element | undefined = data.hashes.size > 0\n ? {\n type: 'element',\n name: 'hashes',\n children: this._factory.makeForHash().normalizeRepository(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().normalizeRepository(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()\n .normalizeRepository(data.externalReferences, options, 'reference')\n }\n : undefined\n const components: SimpleXml.Element | undefined = data.components.size > 0\n ? {\n type: 'element',\n name: 'components',\n children: this.normalizeRepository(data.components, options, 'component')\n }\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'),\n makeOptionalTextElement(data.publisher, 'publisher'),\n makeOptionalTextElement(data.group, 'group'),\n makeTextElement(data.name, 'name'),\n version,\n makeOptionalTextElement(data.description, 'description'),\n makeOptionalTextElement(data.scope, 'scope'),\n hashes,\n licenses,\n makeOptionalTextElement(data.copyright, 'copyright'),\n makeOptionalTextElement(data.cpe, 'cpe'),\n makeOptionalTextElement(data.purl, 'purl'),\n swid,\n extRefs,\n components\n ].filter(isNotUndefined)\n }\n }\n\n normalizeRepository (data: Models.ComponentRepository, options: NormalizerOptions, elementName: string): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options, elementName)\n ).filter(isNotUndefined)\n }\n}\n\nexport class LicenseNormalizer extends Base {\n normalize (data: Models.License, options: NormalizerOptions): SimpleXml.Element {\n switch (true) {\n case data instanceof Models.NamedLicense:\n return this.#normalizeNamedLicense(data as Models.NamedLicense, options)\n case data instanceof Models.SpdxLicense:\n return this.#normalizeSpdxLicense(data as Models.SpdxLicense, options)\n case data instanceof Models.LicenseExpression:\n return this.#normalizeLicenseExpression(data as Models.LicenseExpression)\n default:\n // this case is not expected to happen - and therefore is undocumented\n throw new TypeError('Unexpected LicenseChoice')\n }\n }\n\n #normalizeNamedLicense (data: Models.NamedLicense, options: NormalizerOptions): SimpleXml.Element {\n const url = data.url?.toString()\n return {\n type: 'element',\n name: 'license',\n children: [\n makeTextElement(data.name, 'name'),\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 = data.url?.toString()\n return {\n type: 'element',\n name: 'license',\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 return makeTextElement(data.expression, 'expression')\n }\n\n normalizeRepository (data: Models.LicenseRepository, options: NormalizerOptions): SimpleXml.Element[] {\n return (\n options.sortLists ?? false\n ? data.sorted()\n : Array.from(data)\n ).map(c => this.normalize(c, options))\n }\n}\n\nexport class SWIDNormalizer extends Base {\n normalize (data: Models.SWID, options: NormalizerOptions, elementName: string): SimpleXml.Element {\n const url = 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 Base {\n normalize (data: Models.ExternalReference, options: NormalizerOptions, elementName: string): SimpleXml.Element | undefined {\n const url = data.url.toString()\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 ].filter(isNotUndefined)\n }\n : undefined\n }\n\n normalizeRepository (data: Models.ExternalReferenceRepository, 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 ).filter(isNotUndefined)\n }\n}\n\nexport class AttachmentNormalizer extends Base {\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 || undefined,\n encoding: data.encoding || undefined\n },\n children: data.content\n }\n }\n}\n\nexport class DependencyGraphNormalizer extends Base {\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[treeIterator]()) {\n allRefs.set(component.bomRef, component.dependencies)\n }\n }\n for (const component of data.components[treeIterator]()) {\n allRefs.set(component.bomRef, component.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\n/* eslint-enable @typescript-eslint/prefer-nullish-coalescing, @typescript-eslint/strict-boolean-expressions */\n\ntype StrictTextElement = SimpleXml.TextElement & { children: string }\n\nfunction makeOptionalTextElement (data: null | undefined | Stringable, elementName: string): undefined | StrictTextElement {\n const s = data?.toString() ?? ''\n return s.length > 0\n ? makeTextElement(s, elementName)\n : undefined\n}\n\nfunction makeTextElement (data: Stringable, elementName: string): StrictTextElement {\n return {\n type: 'element',\n name: elementName,\n children: data.toString()\n }\n}\n\nfunction makeTextElementIter (data: Iterable<Stringable>, options: NormalizerOptions, elementName: string): StrictTextElement[] {\n const r: StrictTextElement[] = Array.from(data, d => makeTextElement(d, elementName))\n if (options.sortLists ?? false) {\n r.sort(({ children: a }, { children: 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\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace XmlSchema {\n\n /**\n * @see isAnyURI\n */\n export type AnyURI = string\n /**\n * Test whether format is XML::anyURI - best-effort.\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 */\n export function isAnyURI (value: AnyURI | any): value is AnyURI {\n return typeof value === 'string' &&\n value.length > 0 &&\n Array.from(value).filter(c => c === '#').length <= 1\n // TODO add more validation according to spec\n }\n\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\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 interface ElementAttributes {\n [key: AttributeName]: Text | Unset\n }\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 { Bom } from '../models'\nimport { Format, UnsupportedFormatError } from '../spec'\nimport { BaseSerializer } from './baseSerializer'\nimport { NormalizerOptions } from './types'\nimport { Factory as NormalizerFactory } from './xml/normalize'\nimport { 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 {UnsupportedFormatError} if {@see normalizerFactory.spec} does not support {@see Format.XML}.\n */\n constructor (normalizerFactory: 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 ): 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 { SerializerOptions } from './types'\nimport { XmlBaseSerializer } from './xmlBaseSerializer'\nimport { SimpleXml } from './xml/types'\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 normalizedBom: SimpleXml.Element\n ): XMLDocument {\n const namespace = null\n const doc = document.implementation.createDocument(namespace, null)\n doc.appendChild(this.#buildElement(normalizedBom, 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.#setChildren(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 #setChildren (node: Element, children: SimpleXml.ElementChildren, parentNS: string | null = null): void {\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 as Iterable<SimpleXml.Comment | SimpleXml.Element>)) {\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\n/* eslint-disable */\n/* @ts-ignore: TS6059 -- this works as long as the file/path is available in dist-package */\nimport {enum as _spdxSpecEnum} from '../res/spdx.SNAPSHOT.schema.json'\n/* eslint-enable */\n\n/**\n * One of the known SPDX licence identifiers.\n * @see {@link http://cyclonedx.org/schema/spdx}\n * @see isSupportedSpdxId\n * @see fixupSpdxId\n */\nexport type SpdxId = string\n\nconst spdxIds: ReadonlySet<SpdxId> = new Set(_spdxSpecEnum)\n\nconst spdxLowerToActual: ReadonlyMap<string, SpdxId> = new Map(\n _spdxSpecEnum.map(spdxId => [spdxId.toLowerCase(), spdxId])\n)\n\nexport function isSupportedSpdxId (value: SpdxId | any): value is SpdxId {\n return spdxIds.has(value)\n}\n\n/** Try to convert a string to `SpdxId`. */\nexport function fixupSpdxId (value: string | any): SpdxId | undefined {\n return typeof value === 'string' && value.length > 0\n ? spdxLowerToActual.get(value.toLowerCase())\n : 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 { ComponentType, ExternalReferenceType, HashAlgorithm } from './enums'\nimport { HashContent } from './models'\n\nexport enum Version {\n v1dot0 = '1.0',\n v1dot1 = '1.1',\n v1dot2 = '1.2',\n v1dot3 = '1.3',\n v1dot4 = '1.4',\n}\n\nexport enum Format {\n XML = 'xml',\n JSON = 'json',\n}\n\nexport class UnsupportedFormatError extends Error {\n}\n\nexport interface Protocol {\n readonly version: Version\n\n supportsFormat: (f: Format | any) => boolean\n\n supportsComponentType: (ct: ComponentType | any) => boolean\n\n supportsHashAlgorithm: (ha: HashAlgorithm | any) => boolean\n\n supportsHashValue: (hv: HashContent | any) => boolean\n\n supportsExternalReferenceType: (ert: ExternalReferenceType | any) => boolean\n\n readonly supportsDependencyGraph: boolean\n\n readonly supportsToolReferences: boolean\n\n readonly requiresComponentVersion: boolean\n}\n\n/**\n * @internal This class was never intended to be public,\n * but it is a helper to get the exact spec-versions implemented according to {@see Protocol}.\n */\nclass Spec implements Protocol {\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 #supportsDependencyGraph: boolean\n readonly #supportsToolReferences: boolean\n readonly #requiresComponentVersion: boolean\n\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 ) {\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 }\n\n get version (): Version {\n return this.#version\n }\n\n supportsFormat (f: Format | any): boolean {\n return this.#formats.has(f)\n }\n\n supportsComponentType (ct: ComponentType | any): boolean {\n return this.#componentTypes.has(ct)\n }\n\n supportsHashAlgorithm (ha: HashAlgorithm | any): boolean {\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 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\n/** Specification v1.2 */\nexport const Spec1dot2: Readonly<Protocol> = 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))\n\n/** Specification v1.3 */\nexport const Spec1dot3: Readonly<Protocol> = 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))\n\n/** Specification v1.4 */\nexport const Spec1dot4: Readonly<Protocol> = 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))\n\nexport const SpecVersionDict = Object.freeze(Object.fromEntries([\n [Version.v1dot2, Spec1dot2],\n [Version.v1dot3, Spec1dot3],\n [Version.v1dot4, Spec1dot4]\n]) as { [key in Version]?: Readonly<Protocol> })\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 * Define the format for acceptable CPE URIs. Supports CPE 2.2 and CPE 2.3 formats.\n * Refer to {@link https://nvd.nist.gov/products/cpe} for official specification.\n * @see isCPE\n */\nexport type CPE = string\n\n/* eslint-disable-next-line no-useless-escape -- value directly from XML, revert special-chars(like `&amp;` -> `&`), 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\nexport * from './cpe'\nexport * from './integer'\nexport * from './mimeType'\nexport * from './urn'\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 * @see isInteger\n */\nexport type Integer = number | NonNegativeInteger\n\nexport function isInteger (value: any): value is Integer {\n return Number.isInteger(value)\n}\n\n/**\n * Integer >= 0\n * @see isNonNegativeInteger\n */\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 > 0\n * @see 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 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 * Defines a string representation of a UUID conforming to RFC 4122.\n * @see {@link https://datatracker.ietf.org/doc/html/rfc4122}\n * @see isUrnUuid\n */\nexport type UrnUuid = string\n\n/* regular expression was taken from the CycloneDX schema definitions. */\nconst urnUuidPattern = /^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/\n\nexport function isUrnUuid (value: any): value is UrnUuid {\n return typeof value === 'string' &&\n urnUuidPattern.test(value)\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE_packageurl_js__;","// 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":""}