@sap-ux/adp-tooling
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -157,12 +157,10 @@ "use strict"; | ||
const codeExtFiles = yield this.readAllFilesByGlob('/**/changes/*_codeExt.change'); | ||
let controllerPathFromRoot = ''; | ||
let controllerExists = false; | ||
let controllerPath = ''; | ||
let controllerPathFromRoot = ''; | ||
let changeFilePath = ''; | ||
const project = this.util.getProject(); | ||
const sourcePath = project.getSourcePath(); | ||
const projectName = project.getName(); | ||
const getPath = (projectPath, fileName) => path | ||
.join(projectPath, "changes" /* FolderNames.Changes */, "coding" /* FolderNames.Coding */, fileName) | ||
.split(path.sep) | ||
.join(path.posix.sep); | ||
const getPath = (projectPath, fileName, folder = "coding" /* FolderNames.Coding */) => path.join(projectPath, "changes" /* FolderNames.Changes */, folder, fileName).split(path.sep).join(path.posix.sep); | ||
for (const file of codeExtFiles) { | ||
@@ -175,2 +173,3 @@ const fileStr = yield file.getString(); | ||
controllerPathFromRoot = getPath(projectName, fileName); | ||
changeFilePath = getPath(projectName, file.getName(), ''); | ||
controllerExists = true; | ||
@@ -181,3 +180,3 @@ break; | ||
if (controllerExists && !fs.existsSync(controllerPath)) { | ||
const errorMsg = `Controller extension file was not found at ${controllerPath}`; | ||
const errorMsg = `Please delete the change file at "${changeFilePath}" and retry creating the controller extension.`; | ||
this.logger.debug(errorMsg); | ||
@@ -184,0 +183,0 @@ res.status(404 /* HttpStatusCodes.NOT_FOUND */).send({ message: errorMsg }); |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"license": "Apache-2.0", | ||
@@ -50,3 +50,3 @@ "author": "@SAP/ux-tools-team", | ||
"supertest": "6.3.3", | ||
"@sap-ux/project-access": "1.15.4", | ||
"@sap-ux/project-access": "1.15.5", | ||
"@sap-ux/store": "0.4.0" | ||
@@ -53,0 +53,0 @@ }, |
64711
1082