@sap-ux/create 0.5.10 → 0.5.11

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.
@@ -8,8 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.addGenerateAdaptationProjectCommand = void 0;
16
+ const chalk_1 = __importDefault(require("chalk"));
13
17
  const tracing_1 = require("../../tracing");
14
18
  const adp_tooling_1 = require("@sap-ux/adp-tooling");
15
19
  const common_1 = require("../../common");
@@ -26,7 +30,12 @@ function addGenerateAdaptationProjectCommand(cmd) {
26
30
  .option('--id [id]', 'id of the adaptation project')
27
31
  .option('--reference [reference]', 'id of the original application')
28
32
  .option('--url [url]', 'url pointing to the target system containing the original app')
33
+ .option('--ft', 'enable the Fiori tools for the generated project')
34
+ .option('--package [package]', 'ABAP package to be used for deployments')
35
+ .option('--transport [transport]', 'ABAP transport to be used for deployments')
29
36
  .action((path, options) => __awaiter(this, void 0, void 0, function* () {
37
+ console.log(`\nThe generation of adaptation projects outside of SAP Business Application Studio is currently ${chalk_1.default.bold('experimental')}.`);
38
+ console.log('Please report any issues or feedback at https://github.com/SAP/open-ux-tools/issues/new/choose.\n');
30
39
  yield generateAdaptationProject(path, Object.assign({}, options), !!options.simulate, !!options.skipInstall);
31
40
  }));
32
41
  }
@@ -36,19 +45,18 @@ exports.addGenerateAdaptationProjectCommand = addGenerateAdaptationProjectComman
36
45
  *
37
46
  * @param basePath target folder of the new project
38
47
  * @param defaults optional defaults
39
- * @param defaults.id id of the new adaptation project
40
- * @param defaults.reference id of the referenced original app
41
- * @param defaults.url url of the target system
42
48
  * @param simulate if set to true, then no files will be written to the filesystem
43
49
  * @param skipInstall if set to true then `npm i` is not executed in the new project
44
50
  */
45
51
  function generateAdaptationProject(basePath, defaults, simulate, skipInstall) {
52
+ var _a;
46
53
  return __awaiter(this, void 0, void 0, function* () {
47
54
  const logger = (0, tracing_1.getLogger)();
48
55
  try {
49
56
  logger.debug(`Called generate adaptation-project for path '${basePath}', skip install is '${skipInstall}'`);
50
57
  let config;
51
58
  if (defaults.id && defaults.reference && defaults.url) {
59
+ const url = new URL(defaults.url);
52
60
  config = {
53
61
  app: {
54
62
  id: defaults.id,
@@ -56,7 +64,15 @@ function generateAdaptationProject(basePath, defaults, simulate, skipInstall) {
56
64
  layer: 'CUSTOMER_BASE'
57
65
  },
58
66
  target: {
59
- url: defaults.url
67
+ url: url.origin,
68
+ client: (_a = url.searchParams.get('sap-client')) !== null && _a !== void 0 ? _a : undefined
69
+ },
70
+ deploy: {
71
+ package: defaults.package ? defaults.package.toUpperCase() : '$TMP',
72
+ transport: defaults.transport ? defaults.transport.toUpperCase() : undefined
73
+ },
74
+ options: {
75
+ fioriTools: defaults.ft
60
76
  }
61
77
  };
62
78
  }
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.5.10",
4
+ "version": "0.5.11",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -29,15 +29,16 @@
29
29
  "commander": "9.4.0",
30
30
  "diff": "5.1.0",
31
31
  "prompts": "2.4.2",
32
- "@sap-ux/adp-tooling": "0.6.0",
33
- "@sap-ux/app-config-writer": "0.3.9",
34
- "@sap-ux/cap-config-writer": "0.2.4",
32
+ "@sap-ux/adp-tooling": "0.7.0",
33
+ "@sap-ux/app-config-writer": "0.3.10",
34
+ "@sap-ux/cap-config-writer": "0.2.5",
35
35
  "@sap-ux/logger": "0.4.0",
36
- "@sap-ux/mockserver-config-writer": "0.2.0",
37
- "@sap-ux/project-access": "1.15.3"
36
+ "@sap-ux/mockserver-config-writer": "0.2.1",
37
+ "@sap-ux/project-access": "1.15.4"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/diff": "5.0.4",
41
+ "@types/mem-fs": "1.1.2",
41
42
  "@types/mem-fs-editor": "7.0.1",
42
43
  "@types/prompts": "2.4.4"
43
44
  },