New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@cap-js/cds-typer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cap-js/cds-typer - npm Package Versions

cap-npm
published 0.26.0 •

Changelog

Source

[0.26.0] - 2024-09-11

Added

  • Added a static .keys property in all entities. That property is dictionary which holds all properties as keys that are marked as key in CDS
  • Added a CLI option --useEntitiesProxy. When set to true, all entities are wrapped into Proxy objects during runtime, allowing top level imports of entity types.
  • Added a static .kind property for entities and types, which contains 'entity' or 'type' respectively
  • Apps need to provide @sap/cds version 8.2 or higher.
  • Apps need to provide @cap-js/cds-types version 0.6.4 or higher.
  • Typed methods are now generated for calls of unbound actions. Named and positional call styles are supported, e.g. service.action({one, two}) and service.action(one, two).
  • Action parameters can be optional in the named call style (service.action({one:1, ...})).
  • Actions for ABAP RFC modules cannot be called with positional parameters, but only with named ones. They have 'parameter categories' (import/export/changing/tables) that cannot be called in a flat order.
  • Services now have their own export (named like the service itself). The current default export is not usable in some scenarios from CommonJS modules.
  • Enums and operation parameters can have doc comments
cap-npm
published 0.25.0 •

Changelog

Source

[0.25.0] - 2024-08-13

Added

  • Declaring a type alias on an enum in cds now also exports it on value level in the resulting type

Fixed

  • Classes representing views and projections will no longer carry ancestry to avoid clashes thereof with aliases fields

Changed

  • All properties are now preceeded with the declare modifier to pass strict tsconfigs using useDefineForClassFields or noImplicitOverride
  • The static actions property of generated classes now includes the types from all inherited classes to also suggest actions defined in a base entity/aspect/type.
cap-npm
published 0.24.0 •

Changelog

Source

[0.24.0] - 2024-07-18

Fixed

  • Suppressed an error that would incorrectly point out naming clashes when an entity was named in singular inflection in the model
  • CDS aspects now also generate a aspect-function in singular inflection, similar to how entities do

Changed

  • Aspects generate named classes again so that tooltips will show more meaningful provenance for properties
  • The TypeScript task for cds build no longer looks for tsconfig.json to determine if the project has TS nature and instead checks the dependencies in the project's package.json for an occurrence of typescript
chgeo
published 0.23.0 •

Changelog

Source

[0.23.0] - 2024-07-04

Fixed

  • Plurals no longer have is_singular attached in the resulting .js files
  • Properties are properly propagated beyond just one level of inheritance
chgeo
published 0.22.0 •

Changelog

Source

[0.22.0] - 2024-06-20

Fixed

  • Fixed a bug where keys would sometimes inconsistently become nullable

Changed

  • Logging now internally uses cds.log and pipes output into the cds-typer logger, which can be configured via cds.env in addition to explicitly passing a --logLevel parameter to CLI. Users now have to use the levels defined in cds.log.levels. The formerly valid levels WARNING, CRITICAL, and NONE are now deprecated and automatically mapped to valid levels for now.
chgeo
published 0.21.2 •

Changelog

Source

[0.21.2] - 2024-06-06

Fixed

  • The typescript build task will no longer attempt to run unless at least cds 8 is installed
chgeo
published 0.21.1 •

Changelog

Source

[0.21.1] - 2024-06-03

Fixed

  • Added missing cds-plugin.js to exported files to properly enable calling cds build --for typescript
chgeo
published 0.21.0 •

Changelog

Source

[0.21.0] - 2024-05-31

Added

  • Added IEEE754Compatible flag which, when set to true, generates decimal fields as (number | string) instead of number. This flag will be removed in the long run
  • Added plugin to cds build TypeScript projects. Can be explicitly called using cds build --for typescript

Changed

  • Types representing CDS events are now only declared to avoid having to make their properties optional
  • Singular forms in generated index.js files now contain a .is_singular property as marker for distinguished handling of singular and plural in the runtime
  • Parameters passed to the CLI now take precedence over configuration contained in the typer section of cds.env

Fixed

  • Entities ending with an "s" are no longer incorrectly truncated within extends-clauses
  • Entity names prefixed with their own namespace (e.g. Name.Name, Name.NameAttachments) are not stripped of their name prefix
chgeo
published 0.20.2 •

Changelog

Source

[0.20.2] - 2024-04-29

Fixed

  • Referring to a property's type in a function/ action parameter no longer refers to the enclosing entity
chgeo
published 0.20.1 •

Changelog

Source

[0.20.1] - 2024-04-24

Fixed

  • Void actions no longer crash the type generation process