@eclipse-scout/cli 24.1.14 → 24.2.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-scout/cli",
3
- "version": "24.1.14",
3
+ "version": "24.2.0-beta.0",
4
4
  "description": "CLI for Eclipse Scout",
5
5
  "author": "BSI Business Systems Integration AG",
6
6
  "homepage": "https://www.eclipse.org/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": "24.1.14",
49
- "@eclipse-scout/tsconfig": "24.1.14",
48
+ "@eclipse-scout/karma-jasmine-scout": "24.2.0-beta.0",
49
+ "@eclipse-scout/tsconfig": "24.2.0-beta.0",
50
50
  "karma-jasmine-html-reporter": "2.1.0",
51
51
  "karma-junit-reporter": "2.0.1",
52
52
  "karma-webpack": "5.0.0",
@@ -560,16 +560,28 @@ function getModuleName() {
560
560
  * @returns a function that should be added to the webpack externals
561
561
  */
562
562
  function rewriteIndexImports(newImport, excludedFolder) {
563
+ // If an import ends by one of these names, it is considered an index import.
564
+ let indexImports = ['index', 'main/js'];
565
+
563
566
  return ({context, request, contextInfo}, callback) => {
564
- // Externalize every import to the main index and replace it with @bsi-scout/datamodel
565
- // Keep imports to the testing index
566
- if (/\/index$/.test(request) && !path.resolve(context, request).includes(excludedFolder)) {
567
+ // Externalize every import to the main index and replace it with newImport
568
+ // Keep imports pointing to excludedFolder
569
+ if (isIndexImport(request) && !path.resolve(context, request).includes(excludedFolder)) {
567
570
  return callback(null, newImport);
568
571
  }
569
572
 
570
573
  // Continue without externalizing the import
571
574
  callback();
572
575
  };
576
+
577
+ function isIndexImport(path) {
578
+ for (let imp of indexImports) {
579
+ if (path.endsWith(imp)) {
580
+ return true;
581
+ }
582
+ }
583
+ return false;
584
+ }
573
585
  }
574
586
 
575
587
  function computeTypeCheck(typeCheck, devMode, watchMode) {