Skip to content

Commit

Permalink
fix(cap): remove mta and cf-manifest from capability list and add mta…
Browse files Browse the repository at this point in the history
… statically
  • Loading branch information
Marcel Schork committed Oct 17, 2024
1 parent 8102f77 commit b0e6afa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions generators/cap/capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export default [
{ name: "html5-repo", checked: true },
{ name: "portal", checked: false },
// Deployment
{ name: "mta", checked: true },
{ name: "cf-manifest", checked: false },
{ name: "helm", checked: false },
{ name: "helm-unified-runtime", checked: false },
{ name: "containerize", checked: false },
Expand Down
5 changes: 4 additions & 1 deletion generators/cap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ export default class extends Generator {
async writing() {
this.log(chalk.green(`✨ creating new SAP CAP module for ${this.options.config.projectName}`))

// mta is not an option in the prompts, but it is required for the root mta.yaml
const capCapabilities = [...this.options.config.capCapabilities, 'mta']

// TO-DO: check for typescript and configure cap project accordingly
this.spawnCommandSync("npx", ["-p", "@sap/cds-dk", "cds", "init", `${this.options.config.capName}`, "--add", this.options.config.capCapabilities.join(",")],
this.spawnCommandSync("npx", ["-p", "@sap/cds-dk", "cds", "init", `${this.options.config.capName}`, "--add", capCapabilities.join(",")],
this.destinationPath()
)

Expand Down

0 comments on commit b0e6afa

Please sign in to comment.