Skip to content

Commit

Permalink
remove async method signature for methods which do
Browse files Browse the repository at this point in the history
not require it
  • Loading branch information
tobiasso85 committed Feb 16, 2021
1 parent fed9475 commit d56dd1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/processors/manifestCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async function createManifest(libraryResource, libBundle, descriptorVersion, _in
}

async function createSapApp() {
async function hasManifest(componentPath, libraryPathPrefix) {
function hasManifest(componentPath, libraryPathPrefix) {
const manifestPath = componentPath + "/manifest.json";

const manifestResource = libBundle.findResource(manifestPath.substring(libraryPathPrefix.length));
Expand All @@ -194,14 +194,14 @@ async function createManifest(libraryResource, libBundle, descriptorVersion, _in
return true;
}

async function findEmbeddedComponents() {
function findEmbeddedComponents() {
const result = [];
const prefix = posixPath.dirname(libraryResource.getPath()) + "/";
const components = libBundle.getResources(/^\/(?:[^/]+\/)*Component\.js$/);
for (const comp of components) {
const componentPath = posixPath.dirname(comp.getPath());
log.verbose("checking component at %s", componentPath);
if ( componentPath.startsWith(prefix) && await hasManifest(componentPath, prefix) ) {
if ( componentPath.startsWith(prefix) && hasManifest(componentPath, prefix) ) {
result.push( componentPath.substring(prefix.length) );
} else if ( prefix === "/resources/sap/apf/" ) {
log.verbose("Package %s contains both '*.library' and 'Component.js'. " +
Expand Down Expand Up @@ -314,7 +314,7 @@ async function createManifest(libraryResource, libBundle, descriptorVersion, _in
_version: sectionVersion(APP_DESCRIPTOR_V3_SECTION_SAP_APP),
id: library.getName(),
type: "library",
embeds: await findEmbeddedComponents(),
embeds: findEmbeddedComponents(),
i18n,
applicationVersion: {
version: isValid(library.getVersion()) ? library.getVersion() : getProjectVersion()
Expand Down

0 comments on commit d56dd1d

Please sign in to comment.