@citolab/tspci-qbci 2.11.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,17 @@
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
+
6
17
  # [2.11.0](https://github.com/Citolab/tspci/compare/v2.10.0...v2.11.0) (2026-08-19)
7
18
 
8
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citolab/tspci-qbci",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "create a .ci file that can be imported into Questify",
5
5
  "author": "patrick <patrick.deklein@cito.nl>, Marcel Hoekstra <marcel.hoekstra@cito.nl>",
6
6
  "repository": "",
@@ -11,7 +11,7 @@
11
11
  "yazl": "^3.3.1"
12
12
  },
13
13
  "scripts": {},
14
- "gitHead": "ad0858f9b665b6778cdf19685e858e167847e930",
14
+ "gitHead": "eb7676525e9bf75daa9b2f42f035faed9b8e9a70",
15
15
  "publishConfig": {
16
16
  "access": "public",
17
17
  "registry": "https://registry.npmjs.org/"
package/readme.md CHANGED
@@ -17,8 +17,12 @@ In the package.json of the pci:
17
17
 
18
18
  ## sbom
19
19
 
20
- A CycloneDX SBOM of the bundle is copied next to the `.ci` package in `ci-dist/` as
21
- `<name>_<version>.sbom.cdx.json`. Pass `--include-sbom` to also add `sbom.cdx.json` to the package
22
- itself; note that Questify does not expect the extra file, so only do that when a customer asks for it.
23
- Pass `--no-sbom` to skip generating one.
24
- See [@citolab/tspci](https://github.com/Citolab/tspci/tree/main/lib/tspci#sbom) for the configuration.
20
+ A CycloneDX SBOM of the bundle is included in the package as `ref/script/sbom.cdx.json`, next to the
21
+ bundle it describes, and copied next to the `.ci` package in `ci-dist/` as
22
+ `<name>_<version>.sbom.cdx.json` for your own technical documentation.
23
+
24
+ It is deliberately not registered in `ref/json/manifest.json`: the `script` array drives what the player
25
+ loads, and the SBOM is data, not a script.
26
+
27
+ Use `--no-include-sbom` to keep it out of the package, or `--no-sbom` to skip generating one. See
28
+ [@citolab/tspci](https://github.com/Citolab/tspci/tree/main/lib/tspci#sbom) for the configuration.
package/release-notes.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.12.0
2
+
3
+ - the SBOM is included in the package as `ref/script/sbom.cdx.json`, next to the bundle
4
+ - it is deliberately not registered in `ref/json/manifest.json`: the `script` array drives what the player loads and the SBOM is data, not a script
5
+ - `--no-include-sbom` keeps it out of the package
6
+
1
7
  # 2.11.0
2
8
 
3
9
  - a CycloneDX SBOM of the bundle is copied next to the `.ci` package in `ci-dist/` as `<name>_<version>.sbom.cdx.json`
@@ -112,11 +112,13 @@ export const bundle = () => {
112
112
 
113
113
  isMaxFileSize(maxJsFileSize, minifiedFilePath);
114
114
 
115
- // SBOM: delivered next to the package by default, optionally inside it
115
+ // SBOM: shipped inside the package next to the bundle it describes, and
116
+ // copied next to the package for your own technical documentation
116
117
  handleSbom({
117
118
  distDirectory: path.join(PACKAGE_ROOT_PATH, path.dirname((packageData.main || "dist/index.js").replace(/^\//, ""))),
118
119
  outputDirectory,
119
120
  packageTempDirectory: outputDirectoryTemp,
121
+ packageDirectory: path.posix.join("ref", "script"),
120
122
  baseName: `${name}_${packageData.version}`,
121
123
  packageData,
122
124
  });
@@ -213,11 +215,12 @@ function addDirectoryToZip(zipFile, rootDir, currentDir) {
213
215
  }
214
216
  }
215
217
 
216
- // The CRA requires an SBOM as part of the technical documentation, not as part
217
- // of the delivery to the customer, so it is written next to the package per
218
- // version. Use --include-sbom (or config.tspci.sbom.includeInPackage) to also
219
- // ship it inside the package, and --no-sbom to skip it altogether.
220
- function handleSbom({ distDirectory, outputDirectory, packageTempDirectory, baseName, packageData }) {
218
+ // The SBOM travels inside the package, because a file next to the zip does not
219
+ // survive an import into another system, and that is exactly the party that
220
+ // needs it. A copy is left next to the package for your own technical
221
+ // documentation. Use --no-include-sbom (or config.tspci.sbom.includeInPackage:
222
+ // false) to keep it out of the package, and --no-sbom to skip it altogether.
223
+ function handleSbom({ distDirectory, outputDirectory, packageTempDirectory, packageDirectory, baseName, packageData }) {
221
224
  const settings = packageData?.config?.tspci?.sbom || {};
222
225
  if (settings.enabled === false || process.argv.includes("--no-sbom")) {
223
226
  return "";
@@ -231,10 +234,11 @@ function handleSbom({ distDirectory, outputDirectory, packageTempDirectory, base
231
234
  fs.copyFileSync(source, path.join(outputDirectory, `${baseName}.${fileName}`));
232
235
  console.log(chalk.green(`created sbom: ${baseName}.${fileName}`));
233
236
 
234
- const includeInPackage = process.argv.includes("--include-sbom") || settings.includeInPackage === true;
235
- if (!includeInPackage) {
237
+ if (settings.includeInPackage === false || process.argv.includes("--no-include-sbom")) {
236
238
  return "";
237
239
  }
238
- fs.copyFileSync(source, path.join(packageTempDirectory, fileName));
239
- return fileName;
240
+ const target = packageDirectory ? path.join(packageTempDirectory, packageDirectory) : packageTempDirectory;
241
+ fs.mkdirSync(target, { recursive: true });
242
+ fs.copyFileSync(source, path.join(target, fileName));
243
+ return packageDirectory ? path.posix.join(packageDirectory, fileName) : fileName;
240
244
  }