@citolab/tspci-qbci 2.11.0 → 2.12.1
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 +19 -0
- package/package.json +2 -2
- package/readme.md +9 -5
- package/release-notes.md +6 -0
- package/src/createPackage.mjs +14 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.1](https://github.com/Citolab/tspci/compare/v2.12.0...v2.12.1) (2026-08-19)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @citolab/tspci-qbci
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [2.12.0](https://github.com/Citolab/tspci/compare/v2.11.0...v2.12.0) (2026-08-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* include the SBOM in the exported package by default ([376b89a](https://github.com/Citolab/tspci/commit/376b89a5651bb9a420fbd2973d221a7e5200bd35))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [2.11.0](https://github.com/Citolab/tspci/compare/v2.10.0...v2.11.0) (2026-08-19)
|
|
7
26
|
|
|
8
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/tspci-qbci",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
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": "
|
|
14
|
+
"gitHead": "525a89e24eb69a03fbf3f0b76c33f865f38f44ad",
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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`
|
package/src/createPackage.mjs
CHANGED
|
@@ -112,11 +112,13 @@ export const bundle = () => {
|
|
|
112
112
|
|
|
113
113
|
isMaxFileSize(maxJsFileSize, minifiedFilePath);
|
|
114
114
|
|
|
115
|
-
// SBOM:
|
|
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
|
|
217
|
-
//
|
|
218
|
-
//
|
|
219
|
-
//
|
|
220
|
-
|
|
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
|
-
|
|
235
|
-
if (!includeInPackage) {
|
|
237
|
+
if (settings.includeInPackage === false || process.argv.includes("--no-include-sbom")) {
|
|
236
238
|
return "";
|
|
237
239
|
}
|
|
238
|
-
|
|
239
|
-
|
|
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
|
}
|