cds-plugin-ui5 0.2.1 → 0.2.2

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
+ ## [0.2.2](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/cds-plugin-ui5@0.2.1...cds-plugin-ui5@0.2.2) (2023-08-09)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **cds-plugin-ui5:** also include root app dir HTML files ([#789](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/789)) ([d6cdfb6](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/d6cdfb615b2bfffd44559689a68659a80eb57680))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.2.1](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/cds-plugin-ui5@0.2.0...cds-plugin-ui5@0.2.1) (2023-08-01)
7
18
 
8
19
 
@@ -26,6 +26,8 @@ module.exports = async function findUI5Modules({ cwd, skipLocalApps, skipDeps })
26
26
  if (!skipLocalApps) {
27
27
  const appDir = path.join(cwd, "app");
28
28
  if (fs.existsSync(appDir)) {
29
+ // lookup all dirs inside the root app directory for
30
+ // being either a local app or a UI5 application
29
31
  fs.readdirSync(appDir, { withFileTypes: true })
30
32
  .filter((f) => f.isDirectory())
31
33
  .forEach((d) => localApps.add(d.name));
@@ -36,12 +38,22 @@ module.exports = async function findUI5Modules({ cwd, skipLocalApps, skipDeps })
36
38
  appDirs.push(d);
37
39
  }
38
40
  });
39
- }
40
41
 
41
- // look for a single app if no apps were found in the app directories
42
- if (appDirs.length === 0) {
43
- if (fs.existsSync(path.join(appDir, "ui5.yaml"))) {
44
- appDirs.push(appDir);
42
+ // also include all root app directory HTML files if no ui5.yaml is present
43
+ if (!fs.existsSync(path.join(appDir, "ui5.yaml"))) {
44
+ fs.readdirSync(appDir, { withFileTypes: true })
45
+ .filter((f) => {
46
+ return f.isFile();
47
+ })
48
+ .forEach((f) => {
49
+ localApps.add(f.name);
50
+ });
51
+ } else {
52
+ // if a ui5.yaml is present in the root app directory consider this
53
+ // as a UI5 application to be included into the mounting
54
+ if (appDirs.length === 0) {
55
+ appDirs.push(appDir);
56
+ }
45
57
  }
46
58
  }
47
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cds-plugin-ui5",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "A CAP server cds-plugin to inject the middlewares of all related UI5 tooling based projects.",
5
5
  "author": "Peter Muessig",
6
6
  "license": "Apache-2.0",
@@ -24,5 +24,5 @@
24
24
  "@sap/cds": ">=6.8.2",
25
25
  "express": ">=4.18.2"
26
26
  },
27
- "gitHead": "648744879c475e77319f84dfe8f14509bdd4a667"
27
+ "gitHead": "5c08d4699b0f4c0d55bb800f323905ffde4624c0"
28
28
  }