Socket
Socket
Sign inDemoInstall

@sap/cds-compiler

Package Overview
Dependencies
1
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/cds-compiler

CDS (Core Data Services) compiler and backends


Version published
Weekly downloads
245K
increased by9.03%
Maintainers
1
Created
Weekly downloads
 

Package description

What is @sap/cds-compiler?

@sap/cds-compiler is a package designed to compile and process Core Data Services (CDS) models. It is part of the SAP Cloud Application Programming Model (CAP) and provides functionalities to parse, compile, and transform CDS models into various formats.

What are @sap/cds-compiler's main functionalities?

Parsing CDS Models

This feature allows you to parse CDS source code into a Core Schema Notation (CSN) model. The code sample demonstrates how to parse a simple CDS model defining an entity 'Books' with a 'title' property.

const cds = require('@sap/cds-compiler');
const source = 'entity Books { title: String; }';
const csn = cds.parse(source);
console.log(JSON.stringify(csn, null, 2));

Compiling CDS Models

This feature allows you to compile CDS source code into a CSN model. The code sample shows how to compile a CDS model into its CSN representation.

const cds = require('@sap/cds-compiler');
const source = 'entity Books { title: String; }';
const csn = cds.compile.to.csn(source);
console.log(JSON.stringify(csn, null, 2));

Transforming CDS Models

This feature allows you to transform CDS models into different formats, such as EDM (Entity Data Model). The code sample demonstrates transforming a CSN model into an EDM format.

const cds = require('@sap/cds-compiler');
const source = 'entity Books { title: String; }';
const csn = cds.compile.to.csn(source);
const edm = cds.compile.to.edm(csn);
console.log(JSON.stringify(edm, null, 2));

Other packages similar to @sap/cds-compiler

Readme

Source

Getting started

Table of Contents

Installation and Usage
Documentation

Installation and Usage

Install with npm:

npm install "@sap/cds-compiler"

Or maintain your package.json dependencies as follows:

  "dependencies": {
    "@sap/cds-compiler": "latest"
  }

Documentation

Please refer to the official CDS documentation.

License

This package is provided under the terms of the SAP Developer License Agreement.

Keywords

FAQs

Last updated on 05 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc