@sap-ux/adp-tooling 0.7.0 → 0.7.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.
|
@@ -154,16 +154,14 @@ class RoutesHandler {
|
|
|
154
154
|
const params = req.params;
|
|
155
155
|
const controllerName = (0, sanitize_filename_1.default)(params.controllerName);
|
|
156
156
|
const codeExtFiles = yield this.readAllFilesByGlob('/**/changes/*_codeExt.change');
|
|
157
|
+
let controllerPathFromRoot = '';
|
|
157
158
|
let controllerExists = false;
|
|
158
159
|
let controllerPath = '';
|
|
159
|
-
let
|
|
160
|
+
let changeFilePath = '';
|
|
160
161
|
const project = this.util.getProject();
|
|
161
162
|
const sourcePath = project.getSourcePath();
|
|
162
163
|
const projectName = project.getName();
|
|
163
|
-
const getPath = (projectPath, fileName) => path
|
|
164
|
-
.join(projectPath, "changes" /* FolderNames.Changes */, "coding" /* FolderNames.Coding */, fileName)
|
|
165
|
-
.split(path.sep)
|
|
166
|
-
.join(path.posix.sep);
|
|
164
|
+
const getPath = (projectPath, fileName, folder = "coding" /* FolderNames.Coding */) => path.join(projectPath, "changes" /* FolderNames.Changes */, folder, fileName).split(path.sep).join(path.posix.sep);
|
|
167
165
|
for (const file of codeExtFiles) {
|
|
168
166
|
const fileStr = yield file.getString();
|
|
169
167
|
const change = JSON.parse(fileStr);
|
|
@@ -171,12 +169,13 @@ class RoutesHandler {
|
|
|
171
169
|
const fileName = change.content.codeRef.replace('coding/', '');
|
|
172
170
|
controllerPath = getPath(sourcePath, fileName);
|
|
173
171
|
controllerPathFromRoot = getPath(projectName, fileName);
|
|
172
|
+
changeFilePath = getPath(projectName, file.getName(), '');
|
|
174
173
|
controllerExists = true;
|
|
175
174
|
break;
|
|
176
175
|
}
|
|
177
176
|
}
|
|
178
177
|
if (controllerExists && !fs.existsSync(controllerPath)) {
|
|
179
|
-
const errorMsg = `
|
|
178
|
+
const errorMsg = `Please delete the change file at "${changeFilePath}" and retry creating the controller extension.`;
|
|
180
179
|
this.logger.debug(errorMsg);
|
|
181
180
|
res.status(404 /* HttpStatusCodes.NOT_FOUND */).send({ message: errorMsg });
|
|
182
181
|
return;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.7.
|
|
12
|
+
"version": "0.7.2",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"nock": "13.2.1",
|
|
47
47
|
"rimraf": "5.0.1",
|
|
48
48
|
"supertest": "6.3.3",
|
|
49
|
-
"@sap-ux/project-access": "1.
|
|
49
|
+
"@sap-ux/project-access": "1.16.0",
|
|
50
50
|
"@sap-ux/store": "0.4.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
"start": "<%= locals.options?.fioriTools ? 'fiori run' : 'ui5 serve' %> --open /test/flp.html#app-preview",
|
|
22
22
|
"start-editor": "<%= locals.options?.fioriTools ? 'fiori run' : 'ui5 serve' %> --open /test/adaptation-editor.html"<%if (locals.deploy) {%>,
|
|
23
23
|
"deploy": "ui5 build --config ui5-deploy.yaml --exclude-task <%= locals.options?.fioriTools ? 'deploy-to-abap' : 'abap-deploy-task' %> generateFlexChangesBundle generateComponentPreload --clean-dest && <%= locals.options?.fioriTools ? 'fiori deploy' : 'deploy' %> --config ui5-deploy.yaml",
|
|
24
|
-
"undeploy": "<%= locals.options?.fioriTools ? 'fiori undeploy' : 'undeploy' %> --config ui5-deploy.yaml --lrep
|
|
24
|
+
"undeploy": "<%= locals.options?.fioriTools ? 'fiori undeploy' : 'undeploy' %> --config ui5-deploy.yaml --lrep \"apps/<%= app.reference %>/appVariants/<%= app.id %>/\""<%}%>
|
|
25
25
|
}
|
|
26
26
|
}
|