Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amplication/code-gen-types

Package Overview
Dependencies
Maintainers
5
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplication/code-gen-types

This library supplies all the contracts for Amplication Code Generation. The purpose is to make the contracts available for inclusion in plugins.

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
462
increased by437.21%
Maintainers
5
Weekly downloads
 
Created
Source

Amplication Code gen types

Amplication Code gen types is the component that defines the shared data structures used by the amplication packages.

Usage

Get properties schema for entity field data type

import { getSchemaForDataType } from "@amplication/code-gen-types";

getSchemaForDataType(EnumDataType.SingleLineText);

Get type of data type properties

import { types } from "@amplication/code-gen-types";

const lookupProperties: types.Lookup = {
  relatedEntityId: "exampleId",
  allowMultipleSelection: false,
};

Technologies

  • TypeScript: the data code is strictly typed with TypeScript.
  • JSON Schema: the data schemas in the package are defined using JSON Schema.
  • Jest: is used for testing.

Development

:bulb: Before you begin, make sure you have all the below installed:

One time set up

After cloning the repository open its root directory and run the following commands:

  • Install dependencies of the monorepo (execute in root directory):
    npm install
    npm run bootstrap
    
  • Build the Data package:
    npm run build -- --scope @amplication/code-gen-types
    

Workflow

Make sure you are in the data directory (packages/amplication-data). Once you are done making changes, run the following commands:

  • Format files (editors like VSCode can do it for you automatically)

    npm run format
    
  • Lint files (editors like VSCode come with integration to display those continuously)

    npm run lint
    
  • Run unit tests

    npm test
    
  • Rebuild the package

    npm run build
    

Keywords

FAQs

Package last updated on 02 Oct 2022

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc