@sap-ux/create 0.15.74 → 0.15.76

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/README.md CHANGED
@@ -168,9 +168,6 @@ Options:
168
168
 
169
169
  Add a new OData service and SAPUI5 model to an existing adaptation project.
170
170
 
171
-
172
- This command is not supported for Cloud Foundry projects.
173
-
174
171
  Example:
175
172
 
176
173
  `npx --yes @sap-ux/create@latest add model`
@@ -13,7 +13,6 @@ const validation_1 = require("../../validation/validation");
13
13
  function addNewModelCommand(cmd) {
14
14
  cmd.command('model [path]')
15
15
  .description(`Add a new OData service and SAPUI5 model to an existing adaptation project.\n
16
- This command is not supported for Cloud Foundry projects.\n
17
16
  Example:
18
17
  \`npx --yes @sap-ux/create@latest add model\``)
19
18
  .option('-s, --simulate', 'Simulate only. Do not write or install.')
@@ -34,12 +33,9 @@ async function addNewModel(basePath, simulate) {
34
33
  basePath = process.cwd();
35
34
  }
36
35
  await (0, validation_1.validateAdpAppType)(basePath);
37
- if (await (0, adp_tooling_1.isCFEnvironment)(basePath)) {
38
- throw new Error('This command is not supported for Cloud Foundry projects.');
39
- }
40
36
  const variant = await (0, adp_tooling_1.getVariant)(basePath);
41
- const answers = await (0, common_1.promptYUIQuestions)(await (0, adp_tooling_1.getPromptsForNewModel)(basePath, variant.layer), false);
42
- const fs = await (0, adp_tooling_1.generateChange)(basePath, "appdescr_ui5_addNewModel" /* ChangeType.ADD_NEW_MODEL */, createNewModelData(variant, answers));
37
+ const answers = await (0, common_1.promptYUIQuestions)(await (0, adp_tooling_1.getPromptsForNewModel)(basePath, variant.layer, logger), false);
38
+ const fs = await (0, adp_tooling_1.generateChange)(basePath, "appdescr_ui5_addNewModel" /* ChangeType.ADD_NEW_MODEL */, await (0, adp_tooling_1.createNewModelData)(basePath, variant, answers, logger));
43
39
  if (!simulate) {
44
40
  await new Promise((resolve) => fs.commit(resolve));
45
41
  }
@@ -52,31 +48,4 @@ async function addNewModel(basePath, simulate) {
52
48
  logger.debug(error);
53
49
  }
54
50
  }
55
- /**
56
- * Returns the writer data for the new model change.
57
- *
58
- * @param {DescriptorVariant} variant - The variant of the adaptation project.
59
- * @param {NewModelAnswers} answers - The answers to the prompts.
60
- * @returns {NewModelData} The writer data for the new model change.
61
- */
62
- function createNewModelData(variant, answers) {
63
- const { name, uri, modelName, version, modelSettings, addAnnotationMode } = answers;
64
- return {
65
- variant,
66
- service: {
67
- name,
68
- uri,
69
- modelName,
70
- version,
71
- modelSettings
72
- },
73
- ...(addAnnotationMode && {
74
- annotation: {
75
- dataSourceName: answers.dataSourceName,
76
- dataSourceURI: answers.dataSourceURI,
77
- settings: answers.annotationSettings
78
- }
79
- })
80
- };
81
- }
82
51
  //# sourceMappingURL=new-model.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/create",
3
3
  "description": "SAP Fiori tools module to add or remove features",
4
- "version": "0.15.74",
4
+ "version": "0.15.76",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -31,21 +31,22 @@
31
31
  "mem-fs": "2.1.0",
32
32
  "mem-fs-editor": "9.4.0",
33
33
  "prompts": "2.4.2",
34
- "@sap-ux/abap-deploy-config-inquirer": "1.8.10",
35
- "@sap-ux/abap-deploy-config-writer": "0.3.9",
36
- "@sap-ux/adp-tooling": "0.18.115",
37
- "@sap-ux/app-config-writer": "0.6.135",
38
- "@sap-ux/cap-config-writer": "0.12.89",
34
+ "@sap-ux/abap-deploy-config-inquirer": "1.8.11",
35
+ "@sap-ux/abap-deploy-config-writer": "0.3.10",
36
+ "@sap-ux/adp-tooling": "0.18.117",
37
+ "@sap-ux/btp-utils": "1.1.14",
38
+ "@sap-ux/app-config-writer": "0.6.136",
39
+ "@sap-ux/cap-config-writer": "0.12.90",
39
40
  "@sap-ux/logger": "0.8.5",
40
41
  "@sap-ux/mockserver-config-writer": "0.9.71",
41
42
  "@sap-ux/odata-service-writer": "0.31.7",
42
- "@sap-ux/preview-middleware": "0.25.23",
43
+ "@sap-ux/preview-middleware": "0.25.25",
43
44
  "@sap-ux/project-access": "1.35.20",
44
- "@sap-ux/system-access": "0.7.6",
45
+ "@sap-ux/system-access": "0.7.7",
45
46
  "@sap-ux/ui5-config": "0.30.3",
46
- "@sap-ux/flp-config-inquirer": "0.4.174",
47
- "@sap-ux/nodejs-utils": "0.2.20",
48
- "@sap-ux/axios-extension": "1.25.30"
47
+ "@sap-ux/flp-config-inquirer": "0.4.176",
48
+ "@sap-ux/nodejs-utils": "0.2.21",
49
+ "@sap-ux/axios-extension": "1.25.31"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@types/diff": "8.0.0",
@@ -53,7 +54,7 @@
53
54
  "@types/mem-fs": "1.1.2",
54
55
  "@types/mem-fs-editor": "7.0.1",
55
56
  "@types/prompts": "2.4.9",
56
- "@sap-ux/inquirer-common": "0.11.35",
57
+ "@sap-ux/inquirer-common": "0.11.36",
57
58
  "@sap-ux/store": "1.5.13"
58
59
  },
59
60
  "scripts": {