UNPKG

@sap/cds-dk

Version:

Command line client and development toolkit for the SAP Cloud Application Programming Model

952 lines (674 loc) 119 kB
# Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). The format is based on [Keep a Changelog](https://keepachangelog.com/). ## Version 8.9.2 - 2025-04-16 ### Fixed - `cds bind` gives better error messages if the Cloud Foundry org or space are not found. - `cds add html5-repo` works in combination with multitenancy when no app router or Work Zone is set up. ### Changed - The Node version in `gen/db/package.json` file generated by `cds build` is now `>=18`, matching to what `@sap/hdi-deploy` specifies. - `cds` commands now fail if used in combination with the upcoming `@sap/cds` version 9. ## Version 8.9.1 - 2025-04-04 ### Fixed - `cds build` restores compatibility with `@sap/cds` 7, no more crashing there with `TypeError: Cannot read properties of undefined (reading 'enabled')`. - `cds add containerize` works if run before `cds add helm`. - `cds add http` no longer writes headers starting with a placeholder (IntelliJ compatibility) - `cds init --force` overwrites existing files. ## Version 8.9.0 - 2025-03-31 ### Added - `cds import` now adds Cloud SDK dependencies to package.json if an OData service is imported. - `cds deploy --to hana --on k8s` is now supported. - `cds up` automates freezing dependencies, building, and deploying your application. - `cds pull` includes existing extensions if the server is configured accordingly. ### Changed - `cds build` logging is simplified. - `cds add html5-repo` ignores folders in `app/` starting with `.` ### Fixed - `cds add telemetry` is order-independent with other `cds add` commands for Java. - Build task `mtx-extension` now fails with exit code 1 in case of build errors. ### Removed - Removed `before:cds-watch` script. ## Version 8.8.2 - 2025-03-21 ### Fixed - Bump axios to 1.8.4, fixing CVE-2025-27152 ## Version 8.8.1 - 2025-03-11 ### Fixed - `cds init` uses latest Maven Java archetype version 3.8.0 for creating Java projects. - `cds init --add lint` writes complete eslint.config.mjs. - `cds import` no longer fails with an `EXDEV` error in `docker` containers. - `cds import` json schema now contains correct references. ## Version 8.8.0 - 2025-03-03 ### Added - `cds add xsuaa` lets you pass a `--plan` option, e.g. for `cds add xsuaa --plan broker`. - `cds add workzone` and `cds add workzone-standard` support for Kyma. - `cds add typer` now adds a `before:cds-watch` script to run cds-typer before starting `cds watch`. - `cds watch` supports a `before:cds-watch` npm script in your `package.json`, executed once before the initial `cds watch` startup. ### Changed - Running `cds deploy` in dry mode with an output file specified will now only produce a warning in stderr and will not exit with an error code. - `cds deploy --out …` will not generate the specified output file if it would end up empty. - `cds add workzone` adds a transpilation task for UI5 deployment descriptors in TypeScript projects. - `cds add workzone` does not use the deprecated `webide-extension-task-updateManifestJson` task any more. ### Fixed - `cds add approuter` doesn't create entries for `app` and `appconfig` local directories any more. - `cds add telemetry` for Java doesn't erroneously add `cds` configuration or `dependencies` to the `package.json`. - `cds add sample` adds the workzone-specific configuration if `cds.requires.workzone` is `true`. - `cds compile -o` uses the correct file suffix if explicitly specified in the file name. - `cds bind` caches the promise of its `cf -v` call to prevent race conditions. - `cds import --out <folder>` does not fail if executed in a folder with a `.`. - `cds add workzone` has improved support for multitenancy. ## Version 8.7.3 - 2025-02-19 ### Fixed - `cds compile -o` fixes the output file name in `-o <service>.json`. - `cds lint` won't stumble over scalar config objects anymore. - `cds init` uses latest Maven Java archetype version 3.7.2 for creating Java projects. - `cds deploy --to hana --dry` doesn't exit with a `TypeError` if there are no models. - `cds add ias` fixes a few scenarios in combination with multitenancy. ## Version 8.7.2 - 2025-02-14 ### Fixed - `cds compile -o` with a file name such as `cds c srv/cat-service.cds -o srv/cat-service.json`. - `cds compile` without `-o` doesn't print the file name header for single services any more. - `cds add workzone` in combination with multitenancy doesn't throw an error any more. - `cds import --from rfc` stores the input file again in `srv/external/<destination>/...` instead of `srv/external/...`. - `cds import --name` no longer crashes with a `TypeError`. - `cds import --out <filename>` no longer crashes with a `Error: EEXIST`. - `BuildError` no longer cuts off its stack. - `cds bind -a` doesn't concurrently try to check the Cloud Foundry version or OAuth token. - `cds import` now resolves target of association/composition correctly for multiple schema files. ## Version 8.7.1 - 2025-02-04 ### Fixed - `cds add mta` now sets `parameters.instances` explicitly to `1` in Java projects, same as for Node.js projects. - `cds add mta` does not add the `readiness-health-check-type` and `readiness-health-check-http-endpoint` properties to the `mta.yaml` any more. - `cds add -p` correctly parses plugin-contributed options. - `cds watch` correctly escapes its default ignored directories on Windows. - `cds compile` correctly uses `--service=all` as its default. - `cds add ias` correctly writes MTX sidecar config in combination with `cds add multitenancy`. ## Version 8.7.0 - 2025-01-28 ### Added - `cds watch` supports `--exclude` and `--include` options to specify additional paths to include or exclude. Alternatively, set `cds.watch.[include|exclude]` in your CDS config. - `cds import` now updates configuration for Java projects (in `application.yaml` etc.) - `cds import --config` now also accepts a string with flat key-value pairs (like `--config "credentials.destination=foo"`), which is easier to write than the current JSON string (`--config "{\"credentials\": {\"destination\": \"foo\"}}"`). - `cds debug` now supports Java applications, both local and remote. - `cds import` can now import an odata-V4 file with external dependencies(odata-V4 file). Dependencies has to be provided with -d/--dependencies option and must not have any external dependencies. ### Changed - `cds add mta` sets backend and MTX `parameters.instances` to a default of `1` for improved discoverability. - `cds add sample` generates sample .ts files if the project is a TypeScript project - `cds import` now doesn't need beta flag to populate default value for optional action and function parameters as compiler now supports default value for @Core.OptionalParameters. - `cds add portal` now uses a more generic sample translated title instead of "Bookshop". ### Fixed - `cds add mta` in combination with `cds add ias` correctly adds all routes to the backend module. - `cds add mta` adds the DB deployer module without prior installation of `@cap-js/hana`. - `cds add mta` adds the npm-ci builder for nodejs modules to use fixed package-lock versions for dependency vendoring. - `cds build --ws` will no longer require a `db/` folder in the root directory of the project. - `cds import` doesn't throw error while importing odata-V4 file with com.sap.vocabularies. ## Version 8.6.1 - 2024-12-18 ### Fixed - `cds add ams` now creates correct dependencies for Java projects. ## Version 8.6.0 - 2024-12-17 ### Added - `cds repl` got new option `--run` to run a server; also available through `.run` command within the REPL. - `cds repl` got new option `--use` to make the features of a `cds` available as globals. - `cds repl` got new builtin `.inspect` command to inspect object with configurable depth, e.g. `.inspect cds .depth=1`. - `cds watch` now detects a TypeScript project and tries to run with `tsx` if this is installed locally or globally. Otherwise a warning message is emitted. `CDS_TYPESCRIPT=false` can be used to opt out of this behavior. - `cds import --group` to allow RFC importer to organize imported modules under a logical name. - `cds init/add` for Java projects automatically create a `package-lock.json`. - `cds add ias` adds IAS configuration (beta). - `cds add ams` adds AMS configuration (beta). ### Changed - Running `cds init` in the user's home dir w/o a project name now fails. This is to prevent creation of configuration that would act as global (user) configuration leading to follow-up problems with later projects. ### Fixed - `cds add html5-repo` adds an `index.html` as `welcomePage` to the `xs-app.json`, if available. - `cds bind` fixes the recursive call to `mergeCredentials`. - `cds add` won't add a duplicated `SUBSCRIPTION_URL` if it doesn't match the template specification. - `cds watch` gives a better error message for TypeScript projects started with if `tsx` isn't installed. - `cds build` no longer throws an undefined error when processing build plugin messages. ## Version 8.5.1 - 2024-12-05 ### Fixed - `cds build` now logs existing plugin build messages if a BuildError is thrown. ## Version 8.5.0 - 2024-11-26 ### Changed - `cds import` now generates generic action/function in case of bound action/function collision and unbound function collision with @cds.validate = false. - `cds add typescript` creates projects with `cds-tsx` to run apps instead of former `cds-ts`. - `cds deploy` writes error output to `stderr`. - `cds add http` now evaluates mocks users when creating `Authorization` headers ### Added - `cds debug` lets you debug Node.js applications running locally or in Cloud Foundry. - `cds watch --inspect` and `cds watch --inspect-brk` activate the debugger in the same way as the standard Node.js CLI options, i.e. they accept a `host:port` combination and `0` as values. - The existing `cds watch --debug` is now an alias to `cds watch --inspect`. - `cds add cloud-logging` adds cloud-logging as an alternative for application logging in Kyma. - `cds add cloud-logging --with-telemetry` or `cds add telemetry` adds cloud-logging as well as support for `cap-js/telemetry` plugin in Kyma. - `cds add handler` now also works for Node.js projects. It creates an implementation file for each service with event handlers for all entities and actions. - `cds add esm` creates ESM-compatible Node.js projects. Sample code added by `add sample` and `add handler` will respect this setting if added afterwards. Existing code will not be adjusted by `cds add esm`, though. ### Fixed - `cds import` throws proper error message if Annotation element doesn't have Term attribute. - `cds add approuter` no longer enforces Node.js 22, which is not supporter by current `@sap/approuter` version 17. The previous Node.js version 20 is used again. - `cds add -p` with custom options now works if the entry was not in the `package.json` beforehand. - `cds add http` works for actions without parameters. - `cds add workzone` includes the `updateManifestJson` task on initial generation. - `cds build --ws` no longer creates migration tables in shared database or wrong workspace. ## Version 8.4.2 - 2024-11-19 ### Changed - `cds init` uses latest Maven Java archetype version 3.4.1 for creating Java projects. ### Fixed - `cds add -p/--package` correctly parse plugin-contributed options. - `cds add side-by-side-extensibility` does not throw an error. - fix method name in `cds bind` credential handling. - `cds add --help` no longer has missing line breaks in help text. - `cds` commands no longer fail with an error `cds.extend is not a function` with very old versions of `@sap/cds`. - `cds add hana` adds the `requires.db` entry to `.cdsrc.json` for Java projects. - `cds add data` creates decimal values with correct scale `0` if only precision is given, like in `Decimal(15)`. ## Version 8.4.1 - 2024-11-08 ### Added - `cds deploy --no-build` lets you skip the implicit `cds build`. - `cds add data/http` supports new type `cds.Map`. ### Fixed - `cds compile --to <unknown>` shows a cleaner error message. - `cds add data` handles composition of one correctly. - `cds add http` creates payloads for unbound actions in services. - `cds compile --to xsuaa` can now handle annotation expressions in `where` clauses. - `cds add http` produces requests for all expected data and no longer relies on existing data on the side. - `cds add typer` creates `tsconfig.json` that works with `cds-tsx`. ## Version 8.4.0 - 2024-10-29 ### Added - `cds add application-logging` for Java also executes the `cds:add` goal with feature `APPLICATION_LOGGING`. - Added support for `import` and `export` for auto-completion in `package.json` and `.cdsrc.json`. - `cds add side-by-side-extensibility` adds configuration for logic extensibility via extension points (Java). - `cds init --java` can be used as an alias to `cds init --add java`. - Add cds schema for `helm` build plugin. ### Changed - `cds init` does not put comments in JSON files within `.vscode/`. - `cds import --from asyncapi` now uses CloudEvents type in `@topic` annotation. - `cds deploy` does not fall back to the deprecated `hanatrial` service plan any more. ### Fixed - `cds env` now colors is output honoring settings like `FORCE_COLOR`. - `cds add` commands correctly detect Java/Node in Microsoft PowerShell. - `cds add hana` doesn't add `dependencies` to `.cdsrc.json` any more. - `cds add cf-manifest` uses the new `sap_java_buildpack_jakarta` buildpack. - `cds build --production` now correctly formats console log output. - `cds add` correctly handles entries like `cds.requires.auth` if the following configuration is scoped in a profile. - `cds add` plugins can use a shortcut for their options. - `cds import` fix for no entity schema in OData V2. ## Version 8.3.0 - 2024-09-30 ### Added - `cds add mta`, `cds add helm` and `cds add cf-manifest` execute the `mvn cds:add -Dfeature CF/K8S` under the hood for Java projects. - `cds compile --to mermaid` now supports `mta.yaml` to generate a visualization of your deployment descriptor. - `cds add data` now also generates data for models imported with `cds import`. - `cds add data` now also supports structured types. - `cds deploy` now can also write its DDL statements to a separate log file with the `--out <file>` parameter. - `cds add dynatrace` is now supported for Kyma. - `cds import --name ...` to be used in RFC importer (`@sap/cds-rfc`). - `cds add cloud-logging --with-telemetry` and `cds add dynatrace` are added to the `production` profile by default and respect the `for` option. ### Changed - `cds add sample` now uses `@ui5/cli` version 4. - `cds import` now throws a warning for OpenAPI files containing recursive data types. ### Fixed - `cds add workzone`-created apps can now directly be added via Content Manager in SAP Build Work Zone. - Less obtrusive warning about `cds` instead of `cds-ts` in Typescript projects. ## Version 8.2.3 - 2024-09-25 ### Fixed - In `cds.cli.command`, commands now show up in the correct case. - `cds add` plugins don't throw a `TypeError` if `cds.cli.options` is `undefined`. - `cds watch` no longer ignores `*git/` folders, but only `.git/`. - `cds import` updates `package.json` file in `srv` folder if existing. The `srv` folder name is determined by `cds.env.folders.srv` config or parameter `--out`. - `cds import` doesn't change existing service configuration data. Now, `destination` credentials are only saved for the `production` profile. ## Version 8.2.2 - 2024-09-17 ### Fixed - BDSA-2024-6188: vulnerability with express.js 4.19.2 - `cds import --out` copies the given metadata file to the correct output folder. CLI options are propagated to the `cds.import` API. - `cds add sample` no longer creates a irregular whitespace in `admin-service.js`. - `cds login` now correctly fetches tokens again with client credentials (or hints at invalid credentials). - `cds add handler` can now also be called from the `srv` dir. ## Version 8.2.1 - 2024-09-05 ### Fixed - Update `@sap/hdi-deploy` to fix CVE-2024-4067 with `micromatch` 4.0.7 - `cds add` plugins now correctly parse flags (options with `type: 'boolean'`) if not used as the last argument. ## Version 8.2.0 - 2024-09-02 ### Added - `cds add dynatrace` adds configuration for Dynatrace. - `cds add cloud-logging` adds configuration for SAP Cloud Logging. Option `--with-telemetry` allows for configuration with telemetry. - `cds version` shows version information for `@cap-js/db-service`. - `cds add portal` now adds SAP Cloud Portal configuration for Kyma. - `cds add handler` allows to create handler stubs (for Java only, beta) - `cds init --add java --no-db` lets you create a Java project without persistent database. - `cds import` supports plugins. - `cds add containerize` now supports unified-runtime. - `cds add helm` now supports templating in the mountPath in the additionalVolumes. - Experimental support for `tsx` through `cds-tsx`. - `cds bind --to-app-services` now uses `vcap.name` to resolve multiple services with same type. A warning is issued in case of ambiguities. - `cds compile --to ord -o <name>` supports `.json` file extension. - `cds import --destination` applies destination credentials to existing service configurations. ### Changed - `cds add hana` writes configuration for `cds build/compile` to no longer produce native SAP HANA associations. This improves deployment performance, but has a one-time performance penalty (in the next deployment). - `cds login` prints shorter messages about refresh tokens. - `cds init` uses latest Maven Java archetype version 3.2.0 for creating Java projects. ### Fixed - `cds import` fix for single entity schema in OData V2. - `cds add portal` correctly sets the `appId` in its `CommonDataModel.json` from the `manifest.json` app ID. - `cds add html5-repo` adds the SAP BTP Destination service as a hard dependency again for Kyma projects. - `cds build --ws-pack` correctly creates tarball archives for workspaces with nested `node_modules` folders. - `cds import` now shows proper error message in case of bound action collision. - `cds deploy --to hana` now runs an existing `hana` build task configuration instead of a default one. ### Removed - Removed `build` and `build:ts` npm scripts that were generated into `package.json` when adding the `typescript` facet. ## Version 8.1.2 - 2024-08-17 ### Fixed - Dependency update for `axios` to fix CVE-2024-39338 - `cds login` now fetches the passcode URL for the subscriber tenant if the subdomain is given. - `cds build` now correctly generates migration tables for `CodeList` entities. ## Version 8.1.1 - 2024-08-07 ### Added - Add more features to CAP project creation wizard in SAP Business Application Studio. - `cds.add.merge` now you specify a `key` in its `deletions` semantics. ### Changed - `cds init` uses latest Maven Java archetype version 3.1.0 for creating Java projects. ### Fixed - `cds import` now gives proper error message for OData import in case of invalid OData version or invalid encoding. - `cds import` now able to ignore invalid escape sequence in the description of properties for OData V2. - `cds add mta` does not error when the `app/router` folder was deleted. - `cds version -i` does not show a globally installed version when none is installed or linked. - `cds compile --to openapi` no longer fails with `Error: Unknown protocol: graphql`. - `cds add data` can now correctly handle circular dependencies in entities that point to themselves via associations and compositions. - `cds add` returns correct suggestions for shell completion. - `cds version` reports correct `@sap/cds-compiler` version. - `cds deploy` falls back correctly to `@sap/hana-client` when `HDI_DEPLOY_OPTIONS='{"use_hdb":false}'` is set. ## Version 8.1.0 - 2024-07-26 ### Added - `cds compile --to mermaid` can be configured with a layout direction like `LR`. - `cds deploy --to hana` now shows the `hdi-deploy` version when running. ### Changed - Better generation of http files with `cds add http`, especially for draft requests. ### Fixed - `cds add` recognizes `hasCfManifest` as inactive unless a `manifest.yml` file exists. - `cds add` help and suggestions are only shown when the `help` method is implemented. - `cds add sample` does not include the deprecated `synchronizationMode` property in `manifest.json` files any more. - `cds compile --to mermaid` no longer produces empty `namespace` blocks that would lead to rendering errors. - `cds compile --to mermaid` no longer fails for complex queries like joins. - `cds build --for mtx-sidecar` now correctly supports different `srv` folder name. - `cds add audit-log` in combination with `cds add multitenancy` correctly adds the audit-log dependency to the MTX sidecar. - `cds build` adds the correct hdbtabledata file paths to the HANA result set. - `cds add` plugins can now correctly interpret `cds.cli` properties. - `cds deploy --to hana --dry` now shows correct files with their content. - `cds version` now reports the correct version of `@sap/cds` if this one is installed locally along with a local `@sap/cds-dk` installation. - Shell completion now works correctly for `cds init --add`. - `cds build --for mtx-sidecar` no longer fails if the severity of a compilation error has been downgraded from `Error` to `Warning`. ## Version 8.0.3 - 2024-07-20 ### Fixed - `cds build --ws` no longer creates migration tables in shared db if already existing in a workspace. - `cds add destination` adds the destination service as an MTX SaaS dependency. - `cds add html5-repo` adds the HTML5 repo runtime as an MTX SaaS dependency. - `cds add html5-repo` does not add a destination service any more if not required by other services. - `cds add workzone` runs `cds add destination` as a dependent facet. - `cds add` plugins don't fail if custom options are provided via the `options` API. - `cds add data` can now correctly handle circular associations. The maximum depth of associations is increased to 5. - `cds add redis` is separated from `cds add redis-messaging` to allow for separate consumption. - `cds add redis` uses the `standard` service plan by default. - `cds watch` no longer leads to a warning `'@sap/cds' was loaded from different installations` when local project dependencies are installed. - `cds init` uses latest Maven Java archetype version 3.0.0 for creating Java projects. ## Version 8.0.2 - 2024-07-12 ### Added - `cds add malware-scanner` adds configurations for `SAP Malware Scanning service`. ### Changed - `cds add http` stores `http` files in a folder `test/http/` by default. Previously, this was `http/`. - `cds add helm` removed `saasRegistryParameters` key and moved parameters to `saas-registry`. - `cds init` no longer creates a `.cdsrc.json` for Node.js projects. - `cds build` configuration cleanup for `data.model` and `service.model` to only support configuration of a single model folder. - `cds build` now fully supports default model definitions for custom build plugins. ## Version 8.0.1 - 2024-07-09 ### Added - `cds add hana` and `cds build` now support the HANA artifact type `.hdbeshconfig` required for enterprise search integration. - `cds init` adds simplistic `eslint.config.mjs` file to newly created projects. - Running any `cds` command in a TypeScript project will print a hint to `cds-ts`. - The `cds.build.Plugin` class now supports a `baseModel()` method that returns a CSN that doesn't include features when feature toggles are enabled. - `cds add workzone` adds support for SAP BTP Work Zone, Standard Edition. - `cds add helm` now supports using external destinations in `backendDestinations` key. - `cds add` supports the `--java:mvn` option. ### Changed - `cds add multitenancy` now adds the `java` profile in the MTX sidecar config, in addition to `mtx-sidecar`. - `cds init` uses Maven Java archetype version 2.10.1 for creating Java projects. - `cds init --add java` and other `cds add` commands use Java 21 by default. - `cds add helm` now adds env variables directly in _values.yaml_ file instead of mtxs-configmap ref. - `cds init` for a Node.js project adds `@cap-js/cds-types` to its `devDependencies`. - `cds login` now informs about command-line options ignored when fetching a token. - `cds login` now exits with an error in case of clashing parameters. - cds shell completion now suggests files/folders when called directly after cds command, e.g. `cds pac<tab>` will return files/folders starting with `pac`. ### Fixed - `cds add` is failing if one of the `canRun` conditions in the plugin isn't satisfied. - `cds version` and other CLI commands no longer color their output if e.g. stdout is redirected. - `CHANGELOG.md` is part of npm package. - `cds build` determines the correct feature names if a `.cds` file path contains the name `fts`. - `cds watch` now ignores `.git/**` ## Version 8.0.0 - 2024-06-20 ### Added - `cds init --add` now also allows the shortcut `cds init -a`. - `cds add audit-logging` adds configuration for `@cap-js/audit-logging`. - `cds add typescript` initializes a bare CDS project with TypeScript nature. - `cds add containerize` generates `containerize.yaml` file with configuration required to build the container images by `ctz` CLI. - Setting `FORCE_COLOR=1` will now force colored log output. - `cds add --package/-p` allows you to specify remote packages (in `npm add` format). - `cds add helm` asks prompts to fill in data at first execution. - `cds add http` can now generate requests for entities annotated with `odata.draft.enabled`. - `cds import` will now support references in `requestBody` for openapi files. - Multitenancy-related commands now always print the HTTP status on request errors. - `cds add helm` added `HorizontalPodAutoscaler` which can be enabled by `srv.hpa.enabled`. - `cds add attachments` adds configurations for `@cap-js/attachments`. - Shell completion now supports `fish` shell. - `cds add portal` creates configuration for the SAP Cloud Portal service. - `compile --to mermaid` exports a CDS model as a mermaid diagram. ### Fixed - `cds add mta` correctly adds the logging service with `@sap/cds >= 7.5`, if not explicitly disabled. - `cds add` doesn't fail for Java projects if `srv/pom.xml` doesn't exist. - `cds login` now prints the App URL, reports HTTP 404 errors correctly and gives better mitigation hints. - `cds deploy` consistently resolves configured service models, where previously the db model had priority. - `cds build` checks for the existence of a package.json file in the root folder of Node.js projects. - `cds add` sets `cds.cli` before plugins are loaded. - `cds add http` supports custom keys, including composite keys. - `cds add approuter` will not create a `router` subfolder if an `xs-app.json` is found in the `app` directory. ### Changed - `cds deploy --to hana` uses `@sap/hdi-deploy` version 5. - `cds deploy` resolves existing binding for deployment. - `cds import` will not generate `ON condition` for association or composition. - `cds import` will not add the `@cds.ambiguous` annotation for association or composition. - `cds import` now supports OData V2 EDMX file with empty or missing `EntityContainer`. - `cds init` will now initialize a cds 8 project. - `cds add approuter` will not add XSUAA under the hood any longer. - `cds add hana` and `cds build` use `@sap/hdi-deploy` version 5. - `cds add hana` now uses `@cap/js-hana`. - `cds add multitenancy` uses `@sap/cds-mtxs` version 2. - `cds add multitenancy` does not add the `UIFlexDeveloper` role any more. - `cds add helm` doesn't expose srv and sidecar workload in multi tenant mode if approuter is present. - `cds add helm` changed `values.yaml` structure. - `cds add helm` command doesn't generate static files (subcharts and templates) when `cds add` is executed. Instead, it generates the `chart` folder containing all the static data in the `gen` folder when `cds build` is executed. - `cds add xsuaa` now uses `@sap/xssec` version 4. - `cds add tiny-sample` uses the same `schema.cds` file name as `cds add sample`. - `cds add html5-repo` now adds the `deploy_mode: html5-repo` parameter to the _mta.yaml_. - `cds add html5-repo` uses `gen` (Node.js) or `.` (Java) for the app deployer `path`. - `cds add mta` now creates an _mta.yaml_ with schema version 3.3.0. - `cds login` no longer falls back to a legacy URL or a GET request for tokens. - `cds login` now enforces HTTPS when contacting remote URLs. - `cds login` no longer saves Refresh Tokens by default for security reasons. (Use `--save-refresh-token` to enable this feature.) - `cds build` cleanup of build task property `use`. - `cds add helm` default value of `xsappname` will contain Release Namespace as well. - `cds build` allows custom plugins to be executed after the built-in plugins. - `cds login` eagerly fetches the passcode URL (if supported by `@sap/cds-mtxs`) and prints it on prompt. - `cds extend` and `cds activate` have been deprecated and are now removed. (You can still migrate and download projects, see `cds migrate --help` and `cds extend --help`.) - Remove obsolete classic MTX checks and enforce `@sap/cds` >= 7. - `cds build` uses `cds.compile.to.hana` API with `@sap/cds` 8. - `cds bind` and `cds deploy` use direct http requests instead of `cf curl`. - `cds build --for java` no longer generates localized EDMX files by default. It can be enabled using `contentLocalizedEdmx` build task option. - `@cap-js/sqlite`/`better-sqlite3` is used in dependencies instead of `sqlite3`. - `cds add sample` now generates comma-separated CSV files, instead of semicolon-separated, in order to be more consistent with `cds add data`. - `cds build` no longer supports the deprecated register API for custom plugins. - `cds init` no longer adds `devDependencies` for `eslint` and `@sap/eslint-plugin-cds` when creating a new project. - `cds init` now creates `eslint.config.mjs` file with reference to `@sap/cds/eslint.config.mjs`. ### Removed - `cds add notebook` is removed. CAP Jupyter Notebooks have been replaced by custom CAP Notebooks for VS Code which are now part of the CDS Editor. See https://cap.cloud.sap/docs/tools/#add-cds-editor for more. ## Version 7.9.8 - 2024-09-17 ### Fixed - BDSA-2024-6188: vulnerability with express.js 4.19.2 ## Version 7.9.7 - 2024-08-22 ### Fixed - Dependency update for `axios` to fix CVE-2024-39338 - `cds build --for mtx-sidecar` now correctly supports different `srv` folder name. - `cds build --ws-pack` correctly creates tarball archives for workspaces with nested `node_modules` folders. - `cds version` now reports the correct version of `@sap/cds` if this one is installed locally along with a local `@sap/cds-dk` installation. - `cds version -i` does not show a globally installed version when none is installed or linked. - `cds version` reports correct `@sap/cds-compiler` version. - `cds version` can skip over check for Java version ## Version 7.9.6 - 2024-07-19 ### Fixed - `cds add data` can now correctly handle circular associations. The maximum depth of associations is increased to 5. ## Version 7.9.5 - 2024-07-12 ### Added - `cds add hana` and `cds build` now support the HANA artifact type `.hdbeshconfig` required for enterprise search integration. ### Fixed - `cds add` is failing if one of the `canRun` conditions in the plugin isn't satisfied. - `cds watch` now ignores `.git/**` ## Version 7.9.4 - 2024-06-19 ### Fixed - Dependency update to fix CVE-2024-37890 ### Changed - `cds init` uses latest Maven Java archetype version 2.10.1 for creating Java projects. - `cds bind` and `cds deploy` use direct http requests instead of `cf curl`. ## Version 7.9.3 - 2024-06-07 ### Fixed - `cds add data` now has a more precise foreign key type conversion from CSV data, covering edge cases. ## Version 7.9.2 - 2024-05-15 ### Fixed - `cds add data` now uses the correct JSON type for foreign keys from CSV data, e.g. number instead of string - `cds bind` now calls resolve in sequence to avoid file access exceptions ## Version 7.9.1 - 2024-05-02 ### Fixed - `eslint` 9 doesn't crash anymore if called in a project created with `cds init` ### Changed - `cds add mta` will now use the new `sap_java_buildpack_jakarta` buildpack configuration in the `mta.yaml`. ## Version 7.9.0 - 2024-04-30 ### Added - Shell completion in Linux, macOS, Windows for cds commands and parameters (beta) - `cds bind` supports shared service instances. Service keys are created in the space where a service instance was shared from. - `cds add data` now can generate actual data (not only a header line), both as `csv` and `json` structure. - `cds subscribe` now allows to pass tenant metadata and HDI parameters using parameter `--body <json>`. - `cds add http` has a `--dry` flag to write the generated http requests to stdout. - `cds add hana` and `cds build` support undeploy of calculation views by default. - `cds bind` supports custom credentials to overwrite cloud service credentials. - Better support for `profiles` in cds schema for `package.json` and `.cdsrc.json`. - `cds bind` supports custom credentials to overwrite cloud credentials of multiple services. ### Fixed - Revert json schema for cds schemas to `draft-07` to prevent VS Code warnings about unsupported schema features. - `cds add` doesn't fail for projects with a minimal `package.json` w/o `name` and `version` fields - `cds add data` can be executed in projects w/o `package.json` and `.cdsrc.json` files. - `cds add sample` does not fail if the `srv` folder doesn't exist. - `cds add helm` fixed XSUAA tenant-mode not updating on adding `multitenancy` - `cds watched` cannot be called from command line anymore. - `cds login` now correctly handles the case of an expired refresh token and gives more information about token-request errors. - `cds login` now refreshes the token URL if it had previously reverted to a legacy URL. - Command retrieval during cds bootstrap is now more robust. - `cds watch` now ignores all `gen`-folder content to allow tenant subscription in hybrid mode. - `cds build` doesn't copy `.cdsrc-private.json` file into the deployment folder. ### Changed - `cds deploy --to hana` warns about using custom service name, e.g `--to hana:myService` and `--vcap-file` at the same time. - `cds compile` to `openapi` now throws an error when `@protocol : 'none'` is given. - `--data:for` of `cds add data` is now deprecated in favor of `--filter`. - `cds add data` sorts columns with own elements first, assuming they are more significant than the inherited/included elements. - `cds add http --filter` accepts a service/entity/action name or a regex instead of a path. - `cds deploy` and `cds bind` both use Cloud Foundry client for backend communication. - Changes in the `package-lock.json` file don't restart the server e.g. during `cds watch` - `cds init --add java` uses the currently installed Java version for the `pom.xml`. - `cds add mta` derives the JDK version from the `pom.xml` version. - `cds add helm` update default gateway to `kyma-system/kyma-gateway` - `cds lint` supports both legacy (`@eslint@^8`) and flat (`@eslint@^9`) ESLint configurations. - `cds add lint` adds flat ESLint configurations with `@eslint@^9`, `@sap/eslint-plugin-cds@^3.0.0`. - `cds add lint` now requires `ESLint` version 8 or above. ## Version 7.8.2 - 2024-04-15 ### Added - `cds compile` to `openapi` now maps `@ODM.oidReference.entityName` annotation to generate `x-sap-odm-oid-reference-entity-name`. ### Fixed - `cds run/serve --resolve-bindings` correctly work with the new runtime authentication middleware. - `cds add helm-unified-runtime` fixed backend destinations urls for deployments that aren't exposed. ### Changed - New versions of `@sap/cds` and `@sap/eslint-plugin-cds` - `cds add helm` moved `TENANT_HOST_PATTERN` key from configmap to `values.yaml`. - `cds add helm` `web-application` subchart now supports controlling the health probe timings and updated default gateway to `kyma-system/kyma-gateway` ## Version 7.8.1 - 2024-04-02 ### Added - `cds add` plugins now support custom flags. - `cds add kafka` is also enabled for Helm deployments. - `cds add enterprise-messaging` and `cds add enterprise-messaging-shared` now support a `--cloudevents` flag which automatically adds `cds.requires.messaging.format = 'cloudevents'`. ### Fixed - `cds build` does no longer add the model _@sap/cds-mtxs/srv/bootstrap_ for Java projects by mistake if the `--ws` option is set. ## Version 7.8.0 - 2024-03-27 ### Added - `cds add mta` configures readiness health checks via http to `/` for Java and `/health` for Node.js. - `cds add` facets can now also be space-separated, e.g. `cds add mta mtx pipeline`. - `cds add http` adds an `http` folder with `.http` files generated for all services. - `cds add http --filter [path to dir or file]` generates `.http` files only for the specified file or directory. The shortcut is `-f`. - `cds add http --for-app [app name]` uses the hostname and the auth of the specified deployed app. - `cds add http --out` allows to specify the output folder for the http files. The shortcut is `-o`. - `cds build` reclassifies compilation warnings as info messages for extension projects in case they are caused by the SaaS application base model. `cds build --log-level info` logs all messages. Reclassification of message IDs can be customized. - `cds version` now also prints the version of the CAP Java SDK as well as the Java and Maven versions - `cds build` now uses argument `--ws-pack` instead of `--ws` to enable tarball based packaging of npm workspace dependencies for Node.js apps (beta). - `cds import` can now import the Action/Function with binding parameter type of different schema in the scope of a document. ### Changed - `cds add helm` uses `/health` for liveness and readiness checks for Node.js. - `cds pull` now uses an NPM workspace folder (default: .base) for the base model to enable committing it (link it to node_modules with `npm install`). ### Fixed - `cds deploy` always included models from existing `fts/*` folders. Now, it only does so if `cds.requires.toggles` is switched on. - `cds build` now adds the correct HANA tenant database artifacts for a multitenant application in case a second shared database exists. - `cds bind --to-app-services` will throw a better error message if no app name is supplied. ## Version 7.7.2 - 2024-03-08 ### Added - `cds import` now has `beta` flag which can be used to import beta functionality in the CSN/CDS. ### Fixed - `cds deploy --to hana` environment entries from `--vcap-file` option now overwrite environment entries. - `cds add helm` `web-application` subchart now allows annotations to be added to the K8s services and `content-deployment` subchart now allows to set `imagePullPolicy`. ## Version 7.7.1 - 2024-03-01 ### Fixed - `cds build` now allows the SaaS application base model to be located in a subfolder of the mtx extension project using npm workspace setup. Before, such a scenario caused duplicate model definitions. - `cds init` shows better error message if project name contains unsupported characters. ### Changed - `cds init` uses latest Maven Java archetype version 2.7.0 for creating Java projects. ## Version 7.7.0 - 2024-02-26 ### Added - Schema support for declaring schema contributions in cds plugins. - `cds import` now supports `ref` in schema properties for AsyncAPI files. - `cds add html5-repo` is now supported for Cloud Foundry (beta). ### Changed - `cds add mta` will add `npm ci` to its `before-all` build scripts to make `mbt build` more self-contained. ### Fixed - `cds build` for MTX extensions no longer fails in case of duplicate model definitions. - `cds version -i` now prints the same versions in MD form as `cds version` ## Version 7.6.1 - 2024-02-14 ### Changed - `cds login` now automatically discards invalid refresh tokens and retries instead of exiting with an error. - `cds login` now saves the passcode URL received from a failing token request and prints it along with the error and any subsequent passcode prompt. - `cds login` now hints at missing user role as the cause of an error, if applicable. ### Fixed - `cds import` now fixed the `AnnotationPath` attribute value import for Annotation in OData V4 EDMX correctly in the CSN. - `cds import` will now move the imported EDMX file to `srv/external` only if the import is successful. - `cds import` now captures the annotations present within EntityContainer for OData V4 EDMX in the CSN. - `cds deploy` allows usage of `SERVICE_REPLACEMENTS` without specifying `VCAP_SERVICES`. - `cds deploy` gives an error if its service key corresponds to a Service Manager instance. ## Version 7.6.0 - 2024-01-31 ### Added - `cds add application-logging` is now supported for Java. - `cds add` and `cds init` help shows a more complete list of available commands. - `cds bind -2 <service-name>` automatically creates service key named `<service-name>-key` on Cloud Foundry. - `cds bind --to-app-services <app-name>` binds to all services of a deployed app. - `cds build` supports npm workspace setups (beta). ### Changed - Json schemas for `build` and `deploy` moved here from `@sap/cds`. - `cds build` plugins can provide additional json schemas, including root nodes (beta). - `cds add helm` doesn't expose srv workload in single tenant mode if approuter is present. - `cds add hana` also adds draft tables to the `undeploy.json`. - `cds build` uses existing `.npmrc` file from project root for the MTX sidecar build, precedence has `.npmrc` in sidecar folder. - `cds logout --clear-invalid` also deletes expired tokens. - `cds build` requires feature toggles to be switched-on in order to get the corresponding features generated. ### Fixed - `cds build` no longer throws `maximum call stack size exceeded` error when building SaaS extensions. - `cds add approuter` no longer adds `SUBSCRIPTION_URL` configuration to Java projects in some scenarios. - `cds add html5-repo` in combination with `cds add helm` or `cds add helm-unified-runtime` correctly adds HTML5 repo runtime configuration. ## Version 7.5.1 - 2024-01-09 ### Changed - Bump of dependencies - MTXS commands will now use a request timeout to avoid hanging on invalid URLs. - Error messages for invalid URLs have been improved. - Reverting the fix from `7.5.0`: `cds compile` to `openapi` now adds correct schema `$ref` for patch operation. ## Version 7.5.0 - 2023-12-14 ### Added - `cds add` plugin support (beta). - `cds compile` to `openapi` now creates readonly endpoints for entities annotated with `@cds.autoexpose(d)`. - `cds compile` to `openapi` now supports deepInsert and deepUpdate incase of entity property containing a composition. - `cds add liquibase` support for Java. ### Changed - `cds add application-logging` can now be used in place of `cds add kibana`. `cds add kibana` is deprecated. - `cds add application-logging` now uses the `standard` service plan in the `mta.yaml`, instead of `lite`. - `cds add application-logging` doesn't add the `cds.features.kibana_formatter` flag any more. - `cds v -i` will now insert a default placeholder if `repository` or `repository.url` is undefined in your `package.json`. - Use supported node versions in SAP HANA database modules. - `cds build` uses console.log to correctly format log output. - Retrofit `cds build` plugin register API. - `cds build` log output has been streamlined. ### Fixed - `cds add postgres` for Java now uses the `default` profile when called without the `--for` option. - `cds compile` to `openapi` now adds `title` and `description` from `@Core.Description` and `@Core.LongDescription` respectively to reduce duplicate descriptions. - `cds build --production` now loads cds plugins from `devDependencies`. - Less redundant messages on request errors. - Avoid empty error message when `cds push` fails. - Better type definitions for programmatic APIs provided by `cds-dk`. - Better error message if old `@sap/cds` versions <= 5 are used. - Calls from Yeoman generator are now handled correctly. - `cds compile` to `openapi` now adds correct schema `$ref` for patch operation. ## Version 7.4.1 - 2023-11-30 ### Fixed - `semver` is bumped to version `^7` to mitigate [CVE-2022-25883](https://github.com/advisories/GHSA-c2qf-rxjj-qqgw) ### Changed - `cds push` uses the synchronous server API by default again due to stability problems. Use `--async` for the asynchronous call. - `cds add enterprise-messaging` will now correctly replace all `_` by `-`. ## Version 7.4.0 - 2023-11-14 ### Changed - `cds build` plugins can now require their APIs directly from `@sap/cds` (instead of `@sap/cds-dk`). - `cds init` uses latest Maven Java archetype version 2.4.0 for creating Java projects. ### Added - `cds init` for Node.js now has `@cds-models` for `@cap-js/cds-typer` in its `.gitignore`. - `cds add local-messaging` is now supported for Node.js. - `cds add postgres` is now supported for Java. - `cds build` now supports the command line argument `--no-clean` (beta). Clients need to clean the output folder(s) manually for consistent build results. - `cds build` now supports the build task option `flavorLocalizedEdmx` to generate localized instead of non-localized edmx files for Java apps - default is `false`. - `cds subscribe`, `cds unsubscribe`, `cds upgrade` now also support the `--resolve-bindings` flag. - `cds build` now supports the command line argument `--ws` to enable tarball based packaging of npm workspace dependencies for Node.js apps. (beta) - `cds build` now supports SAP HANA schema evolution for draft tables. ### Fixed - `cds deploy --to hana --dry` now prints out the SAP HANA SQL files which will be deployed if `--dry` is not specified. - `cds build` no longer fails if multiple service protocols are configured in object notation. - `cds build` now uses configured compiler options when building Node.js projects. - `cds pull` when amending package.json applies the original indentation - `cds watch --profile hybrid` no longer produces a value `hybrid,hybrid` for `process.env.CDS_ENV` - `cds.schema` now loads lazily. - `cds init` does not print `cd` hint if creating a project in current folder. ### Removed - `cds repl` no longer loads `cds.plugins` on startup to keep `cds` lazy. ## Version 7.3.1 - 2023-10-19 ### Changed - `cds watch --livereload` now reload the client w/o a server restart, so that for e.g. an `.html` file, a reload event is sent, but the server is not restarted. Previously, the two events were coupled. - `cds build` now provides a programmatic plugin API instead of the former configuration based one. ### Added - `cds build` supports the option `contentLocalizedEdmx` to enable/disable the generation of localized edmx files for Java apps - default is `true`. - `cds repl` now loads `cds.plugins` on startup. - `cds add enterprise-messaging-shared` also supports Kyma deployment. - `cds add notifications` adds configurations for notifications plugin. ### Fixed - `cds` commands will now respect the `NO_COLOR` environment variable. - `cds init` no longer adds comments to file `.vscode/launch.json` - `cds bind` prints correct command line recommendation to start spring-boot application - `cds compile` to `openapi` now generates correct query options with `$` prefix. - `cds build` no longer causes `duplicate assignment` compilation errors for specific feature toggle scenarios. - `cds watch` now loads missing service bindings when called from a directory other than cwd. - Multitenant `cds` commands now have any trailing slashes removed from app URLs, fixing certain request failures. - Multitenant `cds` commands now handle request errors more robustly. - `cds build` no longer fails for cds services supporting multiple protocols. - `cds build` uses the correct deployment folder for CSV files. ## Version 7.3.0 - 2023-10-06 ### Changed - `cds login` now eagerly detects expired token and asks for a new passcode if applicable - `cds login` now presents the passcode URL as early as possible - `cds env` now requires `@sap/cds` >= 7.3 to resolve configuration contributed by cds plugins - `cds add connectivity` does not add `connectivity: true` to your `package.json` any more. - `cds watch` now ignores more files/folders: `app/(webapp|dist|target)`, `app/*/(webapp|dist|target)`, `tsconfig.json`, `*.tsbuildinfo` - `cds build` now uses `compile.to.hdbtable` if no migration tables exist. - `cds build` plugin API is refactored. ### Fixed - `cds login` now prints shorter errors (set `DEBUG=req` in env to see all details again). - Fixed issue when creating a CAP project in SAP Business Application Studio's template wizard. - `cds import` now handles name collision within a Schema for OData V4 EDMX. - `cds build` for mtx extension projects no longer creates CSN containing unresolved model associations. - `cds build` no longer creates new migration versions by mistake after schema evolution changes have been manually resolved. - `cds add approuter` creates the `xs-app.json` in the `app` folder again, instead of in `app/router`. - `cds watch` no longer restarts itself in an endless loop (happened in some Typescript scenarios on Windows) ### Added - `cds push` now uses the asynchronous server API by default. Use `--sync` for the synchronous one. - `cds activate` and `cds push` now support the `-2` shortcut for the `--to` option. - Improved error logging for failed HTTP requests. - `cds build` support for custom build plugins. - `cds compile` support for custom compile plugins. - `cds build` creates non-localized edmx files for the nodejs apps. Translations will be applied at runtime. - `cds.schema.overlay4` gets the cds default schema plus overlays from cds-dk. - `cds build` creates non-localized edmx files for the java apps. Translations will be appli