@eclipse-scout/cli 25.1.3 → 25.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-scout/cli",
3
- "version": "25.1.3",
3
+ "version": "25.1.6",
4
4
  "description": "CLI for Eclipse Scout",
5
5
  "author": "BSI Business Systems Integration AG",
6
6
  "homepage": "https://eclipse.dev/scout/",
@@ -45,8 +45,8 @@
45
45
  "karma-jasmine": "5.1.0",
46
46
  "karma-jasmine-ajax": "0.1.13",
47
47
  "@metahub/karma-jasmine-jquery": "4.0.1",
48
- "@eclipse-scout/karma-jasmine-scout": "25.1.3",
49
- "@eclipse-scout/tsconfig": "25.1.3",
48
+ "@eclipse-scout/karma-jasmine-scout": "25.1.6",
49
+ "@eclipse-scout/tsconfig": "25.1.6",
50
50
  "karma-jasmine-html-reporter": "2.1.0",
51
51
  "karma-junit-reporter": "2.0.1",
52
52
  "karma-webpack": "5.0.1",
@@ -58,7 +58,8 @@
58
58
  "webpack": "5.97.1",
59
59
  "yargs-parser": "21.1.1",
60
60
  "fork-ts-checker-webpack-plugin": "9.0.2",
61
- "fork-ts-checker-notifier-webpack-plugin": "9.0.0"
61
+ "fork-ts-checker-notifier-webpack-plugin": "9.0.0",
62
+ "@cyclonedx/webpack-plugin": "5.0.1"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@eclipse-scout/releng": "^25.1.0"
@@ -11,6 +11,7 @@ const fs = require('fs');
11
11
  const path = require('path');
12
12
  const scoutBuildConstants = require('./constants');
13
13
  const CopyPlugin = require('copy-webpack-plugin');
14
+ const {CycloneDxWebpackPlugin} = require('@cyclonedx/webpack-plugin');
14
15
  const MiniCssExtractPlugin = require('mini-css-extract-plugin');
15
16
  const AfterEmitWebpackPlugin = require('./AfterEmitWebpackPlugin');
16
17
  const {SourceMapDevToolPlugin, WatchIgnorePlugin, ProgressPlugin} = require('webpack');
@@ -21,6 +22,8 @@ const {SourceMapDevToolPlugin, WatchIgnorePlugin, ProgressPlugin} = require('web
21
22
  * @param {boolean} args.progress true, to show build progress in percentage. Default is true.
22
23
  * @param {boolean} args.profile true, to show timing information for each build step. Default is false.
23
24
  * @param {boolean} args.watch true, if webpack runs in watch mode. Default is false.
25
+ * @param {boolean} args.cyclonedxSkip true, if no CycloneDX SBOM should be created. Default is false.
26
+ * @param {string} args.cyclonedxVersion CycloneDX version to use. Default is '1.5'.
24
27
  * @param {[]} args.resDirArray an array containing directories which should be copied to dist/res
25
28
  * @param {object} args.tsOptions a config object to be passed to the ts-loader
26
29
  * @param {boolean|'fork'} args.typeCheck
@@ -300,6 +303,19 @@ module.exports = (env, args) => {
300
303
  }
301
304
  })
302
305
  ];
306
+
307
+ const cyclonedxSkip = ('' + nvl(args.cyclonedxSkip, 'false')) === 'true';
308
+ if (!cyclonedxSkip) {
309
+ /** @type {import('@cyclonedx/webpack-plugin').CycloneDxWebpackPluginOptions} */
310
+ const cycloneDxWebpackPluginOptions = {
311
+ specVersion: nvl(args.cyclonedxVersion, '1.5'),
312
+ collectEvidence: true,
313
+ rootComponentType: 'application',
314
+ validateResults: false,
315
+ includeWellknown: false
316
+ };
317
+ config.plugins.push(new CycloneDxWebpackPlugin(cycloneDxWebpackPluginOptions));
318
+ }
303
319
  }
304
320
 
305
321
  return config;
@@ -350,6 +366,10 @@ function libraryConfig(config, options = {}) {
350
366
  const customExternals = options.externals || {};
351
367
  const allExternals = {...packageJsonExternals, ...config.externals, ...customExternals};
352
368
 
369
+ // Remove CycloneDxWebpackPlugin for libraries as dependencies are marked as externals anyway and are therefore not part of the build.
370
+ // The SBOM will be created for application level builds only.
371
+ config.plugins = config.plugins.filter(p => !(p instanceof CycloneDxWebpackPlugin));
372
+
353
373
  // FileList is not necessary in library mode
354
374
  let plugins = config.plugins.map(plugin => {
355
375
  if (plugin instanceof AfterEmitWebpackPlugin) {