@citolab/tspci-tao 2.10.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.12.0](https://github.com/Citolab/tspci/compare/v2.11.0...v2.12.0) (2026-08-19)
7
+
8
+
9
+ ### Features
10
+
11
+ * include the SBOM in the exported package by default ([376b89a](https://github.com/Citolab/tspci/commit/376b89a5651bb9a420fbd2973d221a7e5200bd35))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.11.0](https://github.com/Citolab/tspci/compare/v2.10.0...v2.11.0) (2026-08-19)
18
+
19
+
20
+ ### Features
21
+
22
+ * generate a CycloneDX SBOM of the bundle ([fdc8cf7](https://github.com/Citolab/tspci/commit/fdc8cf7caf8d25b58737866d654315e6cb2e6fcf))
23
+
24
+
25
+
26
+
27
+
6
28
  # [2.10.0](https://github.com/Citolab/tspci/compare/v2.9.13...v2.10.0) (2026-08-18)
7
29
 
8
30
  **Note:** Version bump only for package @citolab/tspci-tao
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci-tao",
3
- "version": "2.10.0",
3
+ "version": "2.12.0",
4
4
  "description": "create a zip file that can be imported into TAO",
5
5
  "author": "patrick <patrick.deklein@cito.nl>, Marcel Hoekstra <marcel.hoekstra@cito.nl>",
6
6
  "repository": "",
@@ -16,5 +16,5 @@
16
16
  "access": "public",
17
17
  "registry": "https://registry.npmjs.org/"
18
18
  },
19
- "gitHead": "7dbead5cfa41583d47bb503d40970df2d3444a1e"
19
+ "gitHead": "eb7676525e9bf75daa9b2f42f035faed9b8e9a70"
20
20
  }
package/readme.md CHANGED
@@ -131,3 +131,17 @@ Other config properties should be placed under: config -> tspci:
131
131
  Add a svg file with the name {typeIdentifier}.svg in the root of the PCI directory to have a custom icon for the PCI in TAO.
132
132
 
133
133
  ![custom icon](https://github.com/Citolab/tspci/blob/main/lib/tspci-tao/readme-images/icon.png)
134
+
135
+ ## sbom
136
+
137
+ A CycloneDX SBOM of the bundle is included in the package as `interaction/runtime/js/sbom.cdx.json`,
138
+ next to the bundle it describes, and copied next to the zip in `dist/` as
139
+ `tao-pci-<typeIdentifier>_<version>.sbom.cdx.json` for your own technical documentation.
140
+
141
+ Note that `imsPciCreator.json` does not list the SBOM in `runtime.src`. It travels with the zip you hand
142
+ over, but whether TAO keeps the file after registering the PCI is untested: TAO copies the files from
143
+ the src lists. Adding it there is a one line change, but a rejected registration is worse than a missing
144
+ file, so that is not done by default.
145
+
146
+ Use `--no-include-sbom` to keep it out of the package, or `--no-sbom` to skip generating one. See
147
+ [@citolab/tspci](https://github.com/Citolab/tspci/tree/main/lib/tspci#sbom) for the configuration.
package/release-notes.md CHANGED
@@ -1,3 +1,33 @@
1
+ # 2.12.0
2
+
3
+ - the SBOM is included in the package as `interaction/runtime/js/sbom.cdx.json`, next to the bundle
4
+ - it is not listed in `runtime.src` of `imsPciCreator.json`, so whether TAO keeps the file after registering the PCI is untested
5
+ - `--no-include-sbom` keeps it out of the package
6
+
7
+ # 2.11.0
8
+
9
+ - a CycloneDX SBOM of the bundle is copied next to the zip in `dist/` as `tao-pci-<typeIdentifier>_<version>.sbom.cdx.json`
10
+ - `--include-sbom` also adds `sbom.cdx.json` to the package itself, `--no-sbom` skips generating one
11
+
12
+ _The notes for 2.4.0 up to and including 2.10.0 were reconstructed from the git history afterwards, so
13
+ they list the highlights per minor version. Versions without an entry contained no changes for this
14
+ package: all packages in this repository are published in lockstep. `CHANGELOG.md` has the complete
15
+ list of published versions._
16
+
17
+ # 2.7.0
18
+
19
+ - added `setResponse`, so TAO can push a response into the PCI
20
+ - added a GPL-3.0 LICENSE file to the package
21
+
22
+ # 2.6.0
23
+
24
+ - support for javascript PCIs, with `onCompleted` implemented by default
25
+ - replaced the deprecated `fs.rmdir` with `fs.rm`
26
+
27
+ # 2.4.0
28
+
29
+ - fixed the destination location of the export
30
+
1
31
  # 2.3.0
2
32
  - added a script to add TAO support in a PCI that only support the IMS interface.
3
33
 
@@ -330,6 +330,17 @@ export const bundle = () => {
330
330
  }
331
331
  // console.log(propertiesToReplace.short)
332
332
 
333
+ // SBOM: shipped inside the package next to the bundle it describes, and
334
+ // copied next to the package for your own technical documentation
335
+ handleSbom({
336
+ distDirectory: path.join(PACKAGE_ROOT_PATH, path.dirname((packageData.main || "dist/index.js").replace(/^\//, ""))),
337
+ outputDirectory,
338
+ packageTempDirectory: outputDirectoryTemp,
339
+ packageDirectory: path.posix.join("interaction", "runtime", "js"),
340
+ baseName: `tao-pci-${propertiesToReplace.typeIdentifier}_${packageData.version}`,
341
+ packageData,
342
+ });
343
+
333
344
  // zip the folder
334
345
  const zipName = `tao-pci-${propertiesToReplace.typeIdentifier}_${packageData.version}.zip`;
335
346
  zipDirectory(outputDirectoryTemp, path.join(outputDirectory, zipName)).then(
@@ -426,3 +437,31 @@ function isBoolean(val) {
426
437
  return false;
427
438
  }
428
439
  }
440
+
441
+ // The SBOM travels inside the package, because a file next to the zip does not
442
+ // survive an import into another system, and that is exactly the party that
443
+ // needs it. A copy is left next to the package for your own technical
444
+ // documentation. Use --no-include-sbom (or config.tspci.sbom.includeInPackage:
445
+ // false) to keep it out of the package, and --no-sbom to skip it altogether.
446
+ function handleSbom({ distDirectory, outputDirectory, packageTempDirectory, packageDirectory, baseName, packageData }) {
447
+ const settings = packageData?.config?.tspci?.sbom || {};
448
+ if (settings.enabled === false || process.argv.includes("--no-sbom")) {
449
+ return "";
450
+ }
451
+ const fileName = settings.fileName || "sbom.cdx.json";
452
+ const source = path.join(distDirectory, fileName);
453
+ if (!fs.existsSync(source)) {
454
+ console.warn(`no SBOM found at ${source}, skipping it`);
455
+ return "";
456
+ }
457
+ fs.copyFileSync(source, path.join(outputDirectory, `${baseName}.${fileName}`));
458
+ console.log(`created sbom: ${baseName}.${fileName}`);
459
+
460
+ if (settings.includeInPackage === false || process.argv.includes("--no-include-sbom")) {
461
+ return "";
462
+ }
463
+ const target = packageDirectory ? path.join(packageTempDirectory, packageDirectory) : packageTempDirectory;
464
+ fs.mkdirSync(target, { recursive: true });
465
+ fs.copyFileSync(source, path.join(target, fileName));
466
+ return packageDirectory ? path.posix.join(packageDirectory, fileName) : fileName;
467
+ }